havenwood changed the topic of #ruby to: Ruby 3.3.5 (3.4.0-preview2) https://www.ruby-lang.org | Logs https://libera.irclog.whitequark.org/ruby
dhruvasagar has joined #ruby
dhruvasagar has quit [Ping timeout: 252 seconds]
__DuBPiRaTe__ has quit [Quit: Leaving]
phenom has quit [Quit: Everyone has a plan until they get punched in the face. -Mike Tyson-]
phenom has joined #ruby
dhruvasagar has joined #ruby
dhruvasagar has quit [Ping timeout: 265 seconds]
dhruvasagar has joined #ruby
dhruvasagar has quit [Ping timeout: 276 seconds]
dhruvasagar has joined #ruby
mange has joined #ruby
dhruvasagar has quit [Ping timeout: 264 seconds]
dhruvasagar has joined #ruby
dhruvasagar has quit [Ping timeout: 252 seconds]
jhass has quit [Remote host closed the connection]
dhruvasagar has joined #ruby
cappy has joined #ruby
dhruvasagar has quit [Ping timeout: 248 seconds]
dhruvasagar has joined #ruby
tuxcrafter59 has quit [Quit: Client closed]
tuxcrafter59 has joined #ruby
jhass has joined #ruby
dhruvasagar has quit [Ping timeout: 252 seconds]
dhruvasagar has joined #ruby
dhruvasagar has quit [Ping timeout: 252 seconds]
grenierm has joined #ruby
dhruvasagar has joined #ruby
hwpplayer1 has joined #ruby
cappy has quit [Quit: Leaving]
dhruvasagar has quit [Ping timeout: 252 seconds]
dhruvasagar has joined #ruby
dhruvasagar has quit [Ping timeout: 252 seconds]
hwpplayer1 has quit [Remote host closed the connection]
dhruvasagar has joined #ruby
dhruvasagar has quit [Ping timeout: 246 seconds]
dhruvasagar has joined #ruby
EternalSunshine has joined #ruby
dhruvasagar has quit [Remote host closed the connection]
dhruvasagar has joined #ruby
EternalSunshine has quit [Quit: WeeChat 4.4.2]
dhruvasagar has quit [Ping timeout: 252 seconds]
mahlon_ is now known as mahlon
dhruvasagar has joined #ruby
grenierm has quit [Ping timeout: 256 seconds]
EternalSunshine has joined #ruby
EternalSunshine has quit [Quit: WeeChat 4.4.2]
EternalSunshine has joined #ruby
EternalSunshine has quit [Client Quit]
grenierm has joined #ruby
Linux_Kerio has joined #ruby
Linux_Kerio has quit [Read error: Connection reset by peer]
victori has quit [Read error: Connection reset by peer]
victori has joined #ruby
dhruvasagar has quit [Ping timeout: 264 seconds]
dhruvasagar has joined #ruby
hwpplayer1 has joined #ruby
lunarkitty has quit [Quit: The Lounge - https://thelounge.chat]
dhruvasagar has quit [Ping timeout: 252 seconds]
lunarkitty has joined #ruby
dhruvasagar has joined #ruby
lunarkitty has quit [Client Quit]
lunarkitty has joined #ruby
lunarkitty has quit [Quit: The Lounge - https://thelounge.chat]
lunarkitty has joined #ruby
rvalue has quit [Read error: Connection reset by peer]
rvalue has joined #ruby
user71 has joined #ruby
weaksauc_ has joined #ruby
weaksauce has quit [Ping timeout: 245 seconds]
dhruvasagar has quit [Ping timeout: 272 seconds]
dhruvasagar has joined #ruby
hwpplayer1 has quit [Ping timeout: 252 seconds]
ftajhii has quit [Ping timeout: 248 seconds]
mange has quit [Quit: Zzz...]
desnudopenguino has quit [Ping timeout: 255 seconds]
tuxcrafter59 has quit [Quit: Client closed]
sarna has quit [Remote host closed the connection]
sarna has joined #ruby
Linux_Kerio has joined #ruby
dhruvasa` has joined #ruby
greybeard has joined #ruby
kiwi_36 has joined #ruby
kiwi_36 has quit [Client Quit]
kiwi_36 has joined #ruby
dhruvasa` has quit [Ping timeout: 248 seconds]
dhruvasagar has quit [Ping timeout: 252 seconds]
hwpplayer1 has joined #ruby
dhruvasa` has joined #ruby
dhruvasagar has joined #ruby
Linux_Kerio has quit [Ping timeout: 248 seconds]
Linux_Kerio has joined #ruby
Linux_Kerio has quit [Ping timeout: 265 seconds]
hwpplayer1 has quit [Quit: ERC 5.5.0.29.1 (IRC client for GNU Emacs 29.4)]
grenierm has quit [Ping timeout: 256 seconds]
dhruvasa` has quit [Ping timeout: 272 seconds]
dhruvasagar has quit [Ping timeout: 272 seconds]
DuckZ has joined #ruby
<DuckZ> hello, I'm doing some regex matching through a log file which sometimes contains invalid characters, which makes the matching function throw. Is there a way to sanitise the input and remove anything that'd make the regex error out?
dhruvasagar has joined #ruby
dhruvasa` has joined #ruby
dhruvasa` has quit [Ping timeout: 265 seconds]
dhruvasagar has quit [Ping timeout: 265 seconds]
dhruvasa` has joined #ruby
dhruvasagar has joined #ruby
dhruvasa` has quit [Ping timeout: 252 seconds]
dhruvasagar has quit [Ping timeout: 252 seconds]
dhruvasa` has joined #ruby
dhruvasagar has joined #ruby
dhruvasagar has quit [Remote host closed the connection]
dhruvasa` has quit [Remote host closed the connection]
dhruvasagar has joined #ruby
dhruvasa` has joined #ruby
thefuture_ has joined #ruby
kiwi_36 has quit [Ping timeout: 252 seconds]
lunarkitty has quit [Remote host closed the connection]
dhruvasagar has quit [Remote host closed the connection]
dhruvasa` has quit [Remote host closed the connection]
dhruvasagar has joined #ruby
dhruvasa` has joined #ruby
dhruvasagar has quit [Ping timeout: 248 seconds]
dhruvasa` has quit [Ping timeout: 248 seconds]
dhruvasagar has joined #ruby
dhruvasa` has joined #ruby
oneeyedalien has joined #ruby
konsolebox has quit [Ping timeout: 248 seconds]
oneeyedalien has quit [Quit: Leaving]
desnudopenguino has joined #ruby
hwpplayer1 has joined #ruby
<adam12> DuckZ: Example of what you're seeing?
<DuckZ> > ip_from_logs.rb:250:in `match': invalid byte sequence in UTF-8 (ArgumentError)
<adam12> DuckZ: Is the file utf-8?
<adam12> DuckZ: Could maybe try formatting the result string with `string.encode('UTF-8', replace: nil)` or something.
dhruvasa` has quit [Remote host closed the connection]
dhruvasagar has quit [Remote host closed the connection]
hwpplayer1 has quit [Remote host closed the connection]
thefuture_ has quit [Remote host closed the connection]
hwpplayer1 has joined #ruby
brw9 has quit [Quit: The Lounge - https://thelounge.chat]
brw9 has joined #ruby
fercell has joined #ruby
cappy has joined #ruby
<DuckZ> file is a mess, it's the output of my serial cable connection to another device, it ends up containing all sort of binary rubbish, in that specific case I think it's a transmission error, probably I unplugged the cable or something happened
<DuckZ> so it's fine to ignore anything that looks non-ascii and non-utf, or it may be all ascii I'm not sure
<DuckZ> this is the line where it throws: "{ 12.018} bluetoH{ 12.030} bluetoothd[835]" and in the hex editor I see "af a8 48 f8" between "o" and "{"
Milos_ is now known as Milos
<DuckZ> trying `raw_line = raw_line.encode('UTF-8', replace: nil)` btw it's not making any difference unfortunately
mark22k has left #ruby [The Lounge - https://thelounge.chat]
<DuckZ> ok with these parameters it's working `options = {:invalid => :replace, :replace => ""}` idk how to do it inline, I'm passing **options
<DuckZ> documentation says: :invalid: nil (default): Raise exception. https://ruby-doc.org/3.3.5/encodings_rdoc.html#label-Encoding+Options
vnpower_ has quit [Remote host closed the connection]
vnpower_ has joined #ruby
Linux_Kerio has joined #ruby
hwpplayer1 has quit [Quit: bye]
cappy has quit [Quit: Leaving]
greybeard has quit [Quit: Leaving.]
user71 has quit [Quit: Leaving]
FetidToot has quit [Quit: Ping timeout (120 seconds)]
FetidToot has joined #ruby
gr33n7007h has quit [Quit: WeeChat 4.4.2]
gr33n7007h has joined #ruby
lunarkitty has joined #ruby
dstein64- has joined #ruby
dstein64 has quit [Ping timeout: 248 seconds]
dstein64- is now known as dstein64
ruby[bot] has quit [Remote host closed the connection]
ruby[bot] has joined #ruby
Linux_Kerio has quit [Ping timeout: 265 seconds]