bsdbandit-01 has quit [Read error: Connection reset by peer]
bsdbandit-01 has joined #ruby
bsdbandit-01 has quit [Read error: Connection reset by peer]
jinie has joined #ruby
vondruch has quit [Ping timeout: 240 seconds]
ElCapitanMarklar has quit [Remote host closed the connection]
ua_ has quit [Quit: Leaving]
TCZ has quit [Quit: Kindergarten is elsewhere!]
dionysus69 has joined #ruby
dionysus69 has joined #ruby
dionysus69 has quit [Changing host]
schaerli_ has joined #ruby
vondruch has joined #ruby
burgestrand has quit [Quit: burgestrand]
schaerli__ has quit [Ping timeout: 264 seconds]
hmmm has joined #ruby
dionysus69 has quit [Ping timeout: 265 seconds]
hmmm has quit [Client Quit]
bsdbandit-01 has joined #ruby
bsdbandit-01 has quit [Read error: Connection reset by peer]
cuerbot has joined #ruby
prion has joined #ruby
elcuervo has quit [Ping timeout: 240 seconds]
ua has joined #ruby
akem has quit [Ping timeout: 256 seconds]
coniptor has quit [Ping timeout: 256 seconds]
akem has joined #ruby
coniptor has joined #ruby
vondruch has quit [Quit: vondruch]
vondruch has joined #ruby
bsdbandit-01 has joined #ruby
bsdbandit-01 has quit [Read error: Connection reset by peer]
stryek has joined #ruby
bsdbandit-01 has joined #ruby
FrankyCyborg has joined #ruby
bsdbandit-01 has quit [Read error: Connection reset by peer]
burgestrand has joined #ruby
dfucci has quit [Ping timeout: 264 seconds]
Caspy has joined #ruby
impermanence has joined #ruby
jeromelanteri has quit [Remote host closed the connection]
bsdbandit-01 has joined #ruby
jinie has quit [Ping timeout: 256 seconds]
bsdbandit-01 has quit [Read error: Connection reset by peer]
bsdbandit-01 has joined #ruby
bsdbandit-01 has quit [Read error: Connection reset by peer]
jinie has joined #ruby
jinie has quit [Ping timeout: 264 seconds]
jeromelanteri has joined #ruby
dfucci has joined #ruby
impermanence has quit [Quit: Connection closed]
dfucci has quit [Ping timeout: 272 seconds]
spacesuitdiver has joined #ruby
somazero has quit [Remote host closed the connection]
gavlee has joined #ruby
jinie has joined #ruby
dfucci has joined #ruby
ChmEarl has joined #ruby
jinie has quit [Ping timeout: 246 seconds]
dfucci has quit [Ping timeout: 264 seconds]
dfucci has joined #ruby
ruurd has joined #ruby
jinie has joined #ruby
dfucci has quit [Ping timeout: 256 seconds]
jinie has quit [Client Quit]
jinie has joined #ruby
<alexherbo2>
TheBrayn: it is a bit too much involvement to set up the data for testing. I was expecting a single line
burgestrand has quit [Quit: burgestrand]
burgestrand has joined #ruby
meinside has quit [Quit: Connection closed for inactivity]
Xiti has quit [Quit: Leaving]
burgestrand has quit [Quit: burgestrand]
burgestrand has joined #ruby
ua has quit [Ping timeout: 246 seconds]
schaerli_ has quit [Ping timeout: 240 seconds]
blackmesa1 has quit [Ping timeout: 264 seconds]
Xiti has joined #ruby
prion has quit [Ping timeout: 264 seconds]
cb- has joined #ruby
TomyWork has quit [Quit: Leaving]
Iarfen has joined #ruby
ua has joined #ruby
burgestrand has quit [Quit: burgestrand]
bsdbandit-01 has joined #ruby
spacesuitdiver has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
bsdbandit-01 has quit [Read error: Connection reset by peer]
thad_the_man has joined #ruby
<thad_the_man>
I have a file and a regex. I want to generate a list of line numbers that match the regex. What's the best way assuming I do not use popen?
<SeepingN>
and why do you restict yourself immediately?
burgestrand has joined #ruby
<SeepingN>
how about system calls to egrep?
akem has quit [Ping timeout: 246 seconds]
Mary_ has joined #ruby
prion has joined #ruby
bsdbandit-01 has joined #ruby
bsdbandit-01 has quit [Read error: Connection reset by peer]
<havenwood>
thad_the_man: How about?: File.foreach(path).with_index.filter_map { |line, line_no| line_no if line.match?(pattern) }
coniptor has quit [Ping timeout: 264 seconds]
akem has joined #ruby
<havenwood>
thad_the_man: Or `with_index(1)` if you want 1-indexed rather than 0-indexed lines.
siery has quit [Ping timeout: 265 seconds]
burgestrand has quit [Quit: burgestrand]
coniptor has joined #ruby
burgestrand has joined #ruby
Technodrome has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
spacesuitdiver has joined #ruby
<havenwood>
thad_the_man: File.foreach(path).lazy.with_index(1).filter_map { |line, line_no| line_no if line.match?(pattern)
<havenwood>
}.force
burgestrand has quit [Quit: burgestrand]
prion has quit [Ping timeout: 264 seconds]
FrankyCyborg has quit [Quit: The Sleep Monster got me!]
vondruch has quit [Read error: Connection reset by peer]
dfucci has joined #ruby
aesthe has joined #ruby
Technodrome has joined #ruby
<adam12>
with_index(1) :O how have I never seen that before.
dfucci has quit [Ping timeout: 256 seconds]
cthulchu_ has joined #ruby
bsdbandit-01 has joined #ruby
<al2o3-cr>
File.foreach(path).lazy.filter_map { $. if _1[/regexp/] }.force
prion has joined #ruby
cb- has quit [Ping timeout: 246 seconds]
<al2o3-cr>
haha the nearly extinct special globals :)
bsdbandit-01 has quit [Read error: Connection reset by peer]
<thad_the_man>
Thanks.
maryo87 has quit [Ping timeout: 246 seconds]
bsdbandit-01 has joined #ruby
bsdbandit-01 has quit [Read error: Connection reset by peer]
dfucci has joined #ruby
schaerli_ has joined #ruby
bsdbandit-01 has joined #ruby
dfucci has quit [Ping timeout: 264 seconds]
bsdbandit-01 has quit [Read error: Connection reset by peer]
blackmesa1 has joined #ruby
bsdbandit-01 has joined #ruby
coniptor has quit [Ping timeout: 264 seconds]
blackmesa1 has quit [Ping timeout: 260 seconds]
blackmesa1 has joined #ruby
siery has joined #ruby
bsdbandit-01 has quit [Read error: Connection reset by peer]
coniptor has joined #ruby
cliluw has joined #ruby
cliluw has quit [Ping timeout: 246 seconds]
siery has quit [Read error: Connection reset by peer]
aesthe has quit [Ping timeout: 264 seconds]
siery has joined #ruby
aesthe has joined #ruby
dionysus69 has joined #ruby
dionysus69 has joined #ruby
aesthe has quit [Quit: Leaving]
Iarfen has quit [Remote host closed the connection]
cliluw has joined #ruby
bsdbandit-01 has joined #ruby
bsdbandit-01 has quit [Read error: Connection reset by peer]
bsdbandit-01 has joined #ruby
cnsvc has joined #ruby
gix has joined #ruby
bsdbandit-01 has quit [Read error: Connection reset by peer]
coniptor has quit [Ping timeout: 240 seconds]
schaerli_ has quit [Ping timeout: 265 seconds]
prion has quit [Ping timeout: 246 seconds]
coniptor has joined #ruby
cd has joined #ruby
siery has quit [Ping timeout: 264 seconds]
burgestrand has joined #ruby
Technodrome has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
bsdbandit-01 has joined #ruby
bsdbandit-01 has quit [Read error: Connection reset by peer]
burgestrand has quit [Quit: burgestrand]
dfucci has joined #ruby
bsdbandit-01 has joined #ruby
bsdbandit-01 has quit [Read error: Connection reset by peer]
burgestrand has joined #ruby
dfucci has quit [Ping timeout: 264 seconds]
blackmesa1 has quit [Ping timeout: 260 seconds]
cliluw has quit [Ping timeout: 264 seconds]
bsdbandit-01 has joined #ruby
bsdbandit-01 has quit [Read error: Connection reset by peer]
GankMove has quit [Read error: Connection reset by peer]
<adam12>
Result of my JSON-RPC library search: mostly _very_ unmaintained. Lots of them claiming to be more maintained than X, which predated it by Y years.
cliluw has joined #ruby
cliluw has quit [Remote host closed the connection]
cliluw has joined #ruby
cliluw has quit [Ping timeout: 256 seconds]
pwnd_sfw8 has joined #ruby
pwnd_sfw has quit [Ping timeout: 260 seconds]
pwnd_sfw8 is now known as pwnd_sfw
blackmesa1 has joined #ruby
Iarfen has joined #ruby
Reshi_ has joined #ruby
spacesuitdiver has quit [Ping timeout: 240 seconds]
roshanavand has joined #ruby
bsdbandit-01 has joined #ruby
bsdbandit-01 has quit [Read error: Connection reset by peer]
cliluw has joined #ruby
spacesuitdiver has joined #ruby
dionysus69 has quit [Read error: Connection reset by peer]
dionysus69 has joined #ruby
dionysus69 has quit [Changing host]
dionysus69 has joined #ruby
roshanavand has quit [Ping timeout: 246 seconds]
kristian_on_linu has joined #ruby
blackmesa1 has quit [Ping timeout: 272 seconds]
blackmesa1 has joined #ruby
linoge has quit [Remote host closed the connection]
Xiti has quit [Quit: Leaving]
pwnd_sfw3 has joined #ruby
coniptor has quit [Ping timeout: 256 seconds]
pwnd_sfw has quit [Ping timeout: 246 seconds]
pwnd_sfw3 is now known as pwnd_sfw
cthulchu_ has quit [Ping timeout: 264 seconds]
burgestrand has quit [Quit: burgestrand]
siery has joined #ruby
coniptor has joined #ruby
dfucci has joined #ruby
dionysus69 has quit [Ping timeout: 260 seconds]
dfucci has quit [Ping timeout: 256 seconds]
bsdbandit-01 has joined #ruby
cliluw has quit [Ping timeout: 240 seconds]
bsdbandit-01 has quit [Read error: Connection reset by peer]
blackmesa1 has quit [Ping timeout: 264 seconds]
_aeris_ has quit [Remote host closed the connection]
_aeris_ has joined #ruby
bsdbandit-01 has joined #ruby
cliluw has joined #ruby
roshanavand has joined #ruby
Mary_ has left #ruby ["Leaving"]
coniptor has quit [Ping timeout: 264 seconds]
prepend has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
kristian_on_linu has quit [Remote host closed the connection]
ruby[bot] has quit [Remote host closed the connection]
ruby[bot] has joined #ruby
Xiti has joined #ruby
GodFather has quit [Ping timeout: 272 seconds]
coniptor has joined #ruby
Reshi_ has quit [Ping timeout: 264 seconds]
Guest48 has joined #ruby
powerhouse has quit [Read error: Connection reset by peer]
Guest48 has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Guest48 has joined #ruby
orbyt_ has joined #ruby
meinside has joined #ruby
bsdbandit-01 has quit [Read error: Connection reset by peer]