apeiros changed the topic of #ruby-lang to: Nick registration required to talk || Ruby 2.0.0-p195: http://ruby-lang.org (Ruby 1.9.3-p429) || Paste >3 lines of text on http://gist.github.com
swav has quit [Remote host closed the connection]
cirenyc has quit [Quit: Leaving...]
<eam> does ruby (specifically ffi) have anything that'll read a C header file and generate FFI::Struct classes for each typedef?
justinmburrous has quit [Ping timeout: 264 seconds]
<eam> similar to perl's h2xs is what I'm after
<matti> eam: I haven't seen one.
<mistym> eam: Do you need it to happen at runtime?
<eam> nope, not runtime -- I want to translate the kerberos headers into structs and there are just too many to do by hand
marr has quit [Ping timeout: 246 seconds]
<mistym> Use swig and ffi-gen, then.
<zenspider> there was one in ruby 1.8 in ext/dl/h2rb
rsync has joined #ruby-lang
<zenspider> it might at least get you started
<mistym> swig has builtin ruby support, but I think only for C extensions. ffi-swig-generator has a commandline tool which can take swig's XML output and turn that into ffi classes
<rsync> Good Morning
<zenspider> MY FAVORITE TOOL!
<eam> ah grat thanks both
<eam> *great
<eam> I happen to be on 1.8 unfortunately
<zenspider> nothing unfortunate about it... now you can use the tool
ehutzelman has quit [Remote host closed the connection]
cofin has joined #ruby-lang
<zenspider> tho I think you need a source checkout... it doesn't look like it would be installed
runeb has joined #ruby-lang
<eam> nabbed it -- looks like it wants to write to /usr/include, sigh -- but this is a good start :)
runeb has quit [Ping timeout: 261 seconds]
tylersmith has joined #ruby-lang
<eam> oooh, very close. I think I can work with this. It biffed a few corner cases where C's integer types differ from ruby, eg 0x7fffffff vs 0x7fffffffL
tylersmi_ has joined #ruby-lang
jonahR has quit [Ping timeout: 240 seconds]
<eam> but only 7 or so syntax errors out of a 3.5k line transform
tylersmith has quit [Ping timeout: 256 seconds]
<zenspider> eam: nice
jonahR has joined #ruby-lang
cofin has quit [Quit: cofin]
Junkyardhands has joined #ruby-lang
cofin has joined #ruby-lang
ruurd has quit [Quit: Leaving...]
arubin has joined #ruby-lang
Junkyardhands has quit [Remote host closed the connection]
hogeo has joined #ruby-lang
tylersmi_ has quit [Ping timeout: 264 seconds]
tkuchiki has joined #ruby-lang
justinmburrous has joined #ruby-lang
kstuart has quit [Ping timeout: 260 seconds]
justinmburrous has quit [Remote host closed the connection]
cofin has quit [Quit: cofin]
vlad_starkov has joined #ruby-lang
brianpWins has joined #ruby-lang
gregmoreno has quit [Ping timeout: 252 seconds]
<eam> what does #$ do in a string?
<manveru> same as #$foo is same as #{$foo}
<manveru> -same as
<eam> aah
<manveru> also for #@foo
<manveru> and #@@foo
<perry> what's the best pcap gem? I tried out pcaprub because it had the most downloads on rubygems.org, but found out that it didn't do packet processing.
<eam> found it while trying to build a character set in a regex, [a-z.!@#$]+ blew up
<manveru> yeah, use Regexp.escape i think
<manveru> hm, no
<manveru> not for char groups
<eam> I'm just going to keep # away from $ and @ I guess =/
<jroes> whoa, #$ does string interpolation? how come no one uses it?
<jroes> I almost never see anyone use that syntax
<eam> jroes: #$ for $globals only
<manveru> almost nobody uses globals
<manveru> i use #@ sometimes
<jroes> oh, whoops
<eam> that's a neat trick
vlad_starkov has quit [Ping timeout: 268 seconds]
<manveru> but yeah... in a world where people use pass_a_string("#{"foo".to_s}")
ia___ has joined #ruby-lang
cored has quit [Ping timeout: 260 seconds]
pskosinski has quit [Quit: pskosinski]
teleological has joined #ruby-lang
rwk1 has joined #ruby-lang
wmoxam has quit [Ping timeout: 252 seconds]
dankest has quit [Quit: Leaving...]
bzalasky has joined #ruby-lang
nathanstitt has joined #ruby-lang
cirenyc has joined #ruby-lang
swav has joined #ruby-lang
runeb has joined #ruby-lang
runeb has quit [Remote host closed the connection]
swav has quit [Read error: Operation timed out]
cofin has joined #ruby-lang
lsegal has joined #ruby-lang
yxhuvud2 has quit [Quit: Nettalk6 - www.ntalk.de]
mistym has quit [Remote host closed the connection]
x0f_ has quit [Ping timeout: 240 seconds]
GarethAdams has quit [Quit: Leaving...]
yxhuvud has joined #ruby-lang
x0f has joined #ruby-lang
swav has joined #ruby-lang
x0f has quit [Ping timeout: 264 seconds]
brianpWins has quit [Quit: brianpWins]
x0f has joined #ruby-lang
tylersmith has joined #ruby-lang
nathanstitt has quit [Quit: I growing sleepy]
nathanstitt has joined #ruby-lang
nevill has joined #ruby-lang
mdedetrich has joined #ruby-lang
mdedetrich has quit [Max SendQ exceeded]
mdedetrich has joined #ruby-lang
gregmoreno has joined #ruby-lang
bzalasky has quit [Remote host closed the connection]
bzalasky has joined #ruby-lang
bzalasky has quit [Remote host closed the connection]
nathanstitt has quit [Ping timeout: 246 seconds]
bzalasky has joined #ruby-lang
nathanstitt has joined #ruby-lang
Kabaka has quit [Read error: Connection reset by peer]
Kabaka has joined #ruby-lang
stringly_typed has joined #ruby-lang
bzalasky has quit [Remote host closed the connection]
Domon has joined #ruby-lang
dankest has joined #ruby-lang
brianpWins has joined #ruby-lang
machuga|away is now known as machuga
jsullivandigs has quit [Remote host closed the connection]
jsullivandigs has joined #ruby-lang
nathanstitt has quit [Read error: Connection reset by peer]
nathanstitt has joined #ruby-lang
cstrahan has quit [Ping timeout: 240 seconds]
justinmburrous has joined #ruby-lang
Aaaarg has joined #ruby-lang
jsullivandigs has quit [Ping timeout: 264 seconds]
justinmburrous has quit [Remote host closed the connection]
gregmore_ has joined #ruby-lang
ivanoats has joined #ruby-lang
ivanoats has quit [Changing host]
ivanoats has joined #ruby-lang
ivanoats has quit [Remote host closed the connection]
ivanoats has joined #ruby-lang
gregmoreno has quit [Ping timeout: 240 seconds]
jsullivandigs has joined #ruby-lang
dankest has quit [Quit: Leaving...]
GeissT has joined #ruby-lang
saarinen has quit [Quit: saarinen]
saarinen has joined #ruby-lang
krz has joined #ruby-lang
machuga is now known as machuga|away
dankest has joined #ruby-lang
arubin has quit [Quit: Textual IRC Client: www.textualapp.com]
mistym has joined #ruby-lang
mistym has joined #ruby-lang
cofin has quit [Quit: cofin]
shinnya has quit [Ping timeout: 240 seconds]
fosky has joined #ruby-lang
stringly_typed has quit [Quit: Computer has gone to sleep.]
chana has joined #ruby-lang
Nisstyre-laptop has joined #ruby-lang
havenwood has quit [Remote host closed the connection]
stringly_typed has joined #ruby-lang
richardjortega has joined #ruby-lang
richardjortega has left #ruby-lang [#ruby-lang]
jerrytgarcia has joined #ruby-lang
jerrytgarcia has quit [Client Quit]
Mon_Ouie has quit [Ping timeout: 248 seconds]
ryanf has joined #ruby-lang
rwk1 has quit [Remote host closed the connection]
benlovell has joined #ruby-lang
brianpWins has quit [Quit: brianpWins]
mdedetrich has quit [Quit: Computer has gone to sleep.]
mdedetrich has joined #ruby-lang
cofin has joined #ruby-lang
dankest has quit [Quit: Leaving...]
benlovell has quit [Ping timeout: 240 seconds]
stringly_typed has quit [Quit: stringly_typed]
cirenyc has quit [Quit: Leaving...]
Domon has quit [Read error: Connection reset by peer]
Kero has quit [Read error: Operation timed out]
Domon has joined #ruby-lang
Kero has joined #ruby-lang
DomKM has quit [Quit: Leaving.]
vlad_starkov has joined #ruby-lang
vlad_starkov has quit [Ping timeout: 246 seconds]
nathanstitt has quit [Quit: I growing sleepy]
dankest has joined #ruby-lang
tylersmith has quit [Remote host closed the connection]
<drbrain> perry: capp is
io_syl has quit [Ping timeout: 252 seconds]
cirenyc has joined #ruby-lang
justinmburrous has joined #ruby-lang
<drbrain> perry: if by "packet processing" you mean "able to extract the packet headers" then capp is what you want
rwk1 has joined #ruby-lang
justinmburrous has quit [Remote host closed the connection]
pipework has quit [Remote host closed the connection]
DomKM has joined #ruby-lang
rwk1 has quit [Ping timeout: 252 seconds]
cirenyc has quit [Ping timeout: 252 seconds]
Domon has quit [Ping timeout: 245 seconds]
dhruvasagar has quit [Ping timeout: 255 seconds]
nevill has quit [Quit: nevill]
rwk1 has joined #ruby-lang
nevill has joined #ruby-lang
justinmburrous has joined #ruby-lang
cofin has quit [Quit: cofin]
Domon has joined #ruby-lang
gja has joined #ruby-lang
gja has joined #ruby-lang
gja has quit [Changing host]
justinmb_ has joined #ruby-lang
justinmburrous has quit [Ping timeout: 268 seconds]
Domon has quit [Remote host closed the connection]
ivanoats has quit [Remote host closed the connection]
io_syl has joined #ruby-lang
Nisstyre-laptop is now known as Nisstyre
cirenyc has joined #ruby-lang
nlv has joined #ruby-lang
rikai has quit [Remote host closed the connection]
randalla1ordon has joined #ruby-lang
vlad_starkov has joined #ruby-lang
<perry> drbrain, nice ;)
gregmore_ has quit [Remote host closed the connection]
cirenyc has quit [Ping timeout: 264 seconds]
randallagordon has quit [Ping timeout: 256 seconds]
<drbrain> perry: I only included the packet types I ordinarily see, but adding currently unknown headers is not hard
vlad_starkov has quit [Ping timeout: 240 seconds]
<drbrain> later
<perry> bye
amerine has quit [Quit: Textual IRC Client: www.textualapp.com]
teleological has quit [Remote host closed the connection]
GeissT has quit [Quit: MillBroChat AdIRC User]
sush24 has joined #ruby-lang
hhatch has joined #ruby-lang
chana has quit [Quit: chana]
io_syl has quit [Ping timeout: 245 seconds]
io_syl has joined #ruby-lang
brianpWins has joined #ruby-lang
ivanoats has joined #ruby-lang
ivanoats has quit [Changing host]
ivanoats has joined #ruby-lang
justinmb_ has quit [Remote host closed the connection]
rikai has joined #ruby-lang
sush24 has quit [Ping timeout: 245 seconds]
cirenyc has joined #ruby-lang
gregmoreno has joined #ruby-lang
cirenyc has quit [Ping timeout: 246 seconds]
sush24 has joined #ruby-lang
sush24 has quit [Client Quit]
henrikhodne has quit [Quit: Computer has gone to sleep.]
teleological has joined #ruby-lang
macmartine has joined #ruby-lang
tylersmith has joined #ruby-lang
dhruvasagar has joined #ruby-lang
DomKM has quit [Quit: Leaving.]
apeiros has quit [Remote host closed the connection]
apeiros has joined #ruby-lang
gregmoreno has quit [Ping timeout: 256 seconds]
Domon has joined #ruby-lang
nevill has quit [Quit: nevill]
tylersmith has quit [Ping timeout: 252 seconds]
skade has joined #ruby-lang
apeiros has quit [Remote host closed the connection]
ruurd has joined #ruby-lang
apeiros has joined #ruby-lang
JohnBat26 has joined #ruby-lang
saarinen has quit [Quit: saarinen]
TvL2386 has joined #ruby-lang
saarinen has joined #ruby-lang
xxaM has quit [Remote host closed the connection]
xxaM has joined #ruby-lang
ruurd has quit [Quit: Leaving...]
nevill has joined #ruby-lang
shireesh has joined #ruby-lang
cirenyc has joined #ruby-lang
Domon has quit [Remote host closed the connection]
cirenyc has quit [Ping timeout: 246 seconds]
arooni-mobile has joined #ruby-lang
apeiros has quit [Ping timeout: 245 seconds]
sush24 has joined #ruby-lang
Averna has quit [Quit: Leaving.]
macmartine has quit [Quit: Computer has gone to sleep.]
nevill has quit [Quit: nevill]
Domon has joined #ruby-lang
verto has quit [Ping timeout: 248 seconds]
apeiros has joined #ruby-lang
Uranio has quit [Remote host closed the connection]
crackity_jones has joined #ruby-lang
Uranio has joined #ruby-lang
tbuehlmann has joined #ruby-lang
fosky has quit [Read error: Connection reset by peer]
Rizzle has quit [Read error: Connection reset by peer]
MartynKeigher has quit [Ping timeout: 255 seconds]
tdy has quit [Read error: Connection reset by peer]
zenspider has quit [Ping timeout: 245 seconds]
tdy has joined #ruby-lang
zenspider has joined #ruby-lang
MartynKeigher has joined #ruby-lang
bzalasky has joined #ruby-lang
runeb has joined #ruby-lang
ruurd has joined #ruby-lang
wallerdev has quit [Quit: wallerdev]
stringly_typed has joined #ruby-lang
shireesh has quit [Ping timeout: 241 seconds]
ivanoats has quit [Remote host closed the connection]
cirenyc has joined #ruby-lang
ruurd has quit [Quit: Leaving...]
dankest has quit [Quit: Leaving...]
cirenyc has quit [Ping timeout: 240 seconds]
runeb has quit [Remote host closed the connection]
nevill has joined #ruby-lang
teleological has quit [Remote host closed the connection]
tylersmith has joined #ruby-lang
stringly_typed has quit [Quit: Computer has gone to sleep.]
dhruvasagar has quit [Ping timeout: 260 seconds]
Mon_Ouie has joined #ruby-lang
tomzx_mac has quit [Ping timeout: 252 seconds]
tylersmith has quit [Ping timeout: 252 seconds]
jsullivandigs has quit [Remote host closed the connection]
Nisstyre has quit [Quit: Leaving]
vlad_starkov has joined #ruby-lang
x0f has quit [Ping timeout: 264 seconds]
stringly_typed has joined #ruby-lang
vlad_starkov has quit [Ping timeout: 268 seconds]
x0f has joined #ruby-lang
stringly_typed has quit [Client Quit]
cirenyc has joined #ruby-lang
vmoravec has joined #ruby-lang
henrikhodne has joined #ruby-lang
cirenyc has quit [Ping timeout: 245 seconds]
crackity_jones has quit [Quit: Computer has gone to sleep.]
Domon has quit [Remote host closed the connection]
gnufied has joined #ruby-lang
vlad_starkov has joined #ruby-lang
Domon has joined #ruby-lang
nignaztic has joined #ruby-lang
gfarfl has quit [Read error: Connection reset by peer]
dagobah has joined #ruby-lang
benlovell has joined #ruby-lang
Domon has quit [Remote host closed the connection]
nazty has quit [Ping timeout: 246 seconds]
_ffio_ has joined #ruby-lang
ffio_ has quit [Ping timeout: 276 seconds]
ruurd has joined #ruby-lang
mistym has quit [Remote host closed the connection]
vlad_starkov has quit [Remote host closed the connection]
mistym has joined #ruby-lang
henrikhodne has quit [Quit: Goodbye.]
mytrile has joined #ruby-lang
mistym has quit [Ping timeout: 252 seconds]
henrikhodne has joined #ruby-lang
saarinen has quit [Quit: saarinen]
nignaztic has quit [Read error: Connection reset by peer]
nignaztic has joined #ruby-lang
saarinen has joined #ruby-lang
cirenyc has joined #ruby-lang
cirenyc has quit [Ping timeout: 276 seconds]
sush24 has quit [Read error: Connection reset by peer]
workmad3 has joined #ruby-lang
tylersmith has joined #ruby-lang
arooni-mobile has quit [Ping timeout: 252 seconds]
gja has quit [Ping timeout: 246 seconds]
tylersmith has quit [Ping timeout: 260 seconds]
runeb has joined #ruby-lang
dhruvasagar has joined #ruby-lang
sush24 has joined #ruby-lang
teleological has joined #ruby-lang
tenderlove has quit [Remote host closed the connection]
GarethAdams has joined #ruby-lang
firstdayonthejob has quit [Quit: WeeChat 0.4.1]
stef_204 has joined #ruby-lang
runeb has quit [Ping timeout: 264 seconds]
teleological has quit [Ping timeout: 246 seconds]
x0f has quit [Ping timeout: 252 seconds]
x0f has joined #ruby-lang
Criztian has joined #ruby-lang
barttenbrinke has joined #ruby-lang
eban has quit [Quit: WeeChat 0.4.0]
eban has joined #ruby-lang
Mon_Ouie has quit [Ping timeout: 252 seconds]
barttenbrinke has quit [Remote host closed the connection]
gja has joined #ruby-lang
judofyr has joined #ruby-lang
bzalasky has quit [Remote host closed the connection]
mikewintermute has joined #ruby-lang
<yorickpeterse> morning
<judofyr> morning
<mikewintermute> why does arity give different results here: http://pastie.org/8038383
<mikewintermute> seems to be the difference between |x| and |x=0|
<judofyr> mikewintermute: because the second one accepts 0 arguments
<mikewintermute> proc {|x=1|}.arity
<mikewintermute> => 0
lsegal has quit [Quit: Quit: Quit: Quit: Stack Overflow.]
<mikewintermute> how about that?
<judofyr> makes sense to me
rolfb has joined #ruby-lang
GarethAdams has quit [Quit: Leaving...]
cirenyc has joined #ruby-lang
<apeiros> >> def foo(x=1);end;method(:foo).arity
<eval-in> apeiros => -1 (https://eval.in/33517)
<apeiros> inconsistent, though
<apeiros> ah, wait… proc is always basically the same as def foo(*args)
<apeiros> >> def foo(*args);end;method(:foo).arity
<eval-in> apeiros => -1 (https://eval.in/33518)
<apeiros> ok, still inconsistent :D
<judofyr> arity is a mess
benlovell has quit [Quit: leaving]
<manveru> use #parameters
<manveru> more work, but at least reliable
<judofyr> yeah
<apeiros> I want Method/Proc#source
<judofyr> >> proc { |x=1| }.parameters
<eval-in> judofyr => [[:opt, :x]] (https://eval.in/33519)
<manveru> [6] pry(main)> ->(x, y = 1, z: 2){}.parameters
<manveru> => [[:req, :x], [:opt, :y], [:key, :z]]
<mikewintermute> So why does |x=1| mean 0 arguments?
<judofyr> mikewintermute: because why not?
<manveru> it's -1, not 0
cirenyc has quit [Ping timeout: 245 seconds]
<manveru> -1 means it's variable
<erikh> proc is 0
workmad3 has quit [Ping timeout: 240 seconds]
<erikh> but proc is likely always 0
<erikh> 'cause proc
<manveru> no idea about proc... who uses that anyway :P
<erikh> nope, i'm wrong
<erikh> it does communicate arity right...
* erikh is confused now
tenderlove has joined #ruby-lang
Mon_Ouie has joined #ruby-lang
gja has quit [Read error: Connection reset by peer]
saarinen has quit [Quit: saarinen]
gja has joined #ruby-lang
gja has joined #ruby-lang
gja has quit [Changing host]
tenderlove has quit [Ping timeout: 240 seconds]
ebouchut has joined #ruby-lang
gh0zt has quit []
swav has quit [Read error: Connection reset by peer]
swav has joined #ruby-lang
workmad3 has joined #ruby-lang
nveselinov has quit [Read error: Connection reset by peer]
adambeynon has joined #ruby-lang
sush24 has quit [Ping timeout: 264 seconds]
tylersmith has joined #ruby-lang
rsync has quit [Quit: rsync]
dinesh- has joined #ruby-lang
mikko has joined #ruby-lang
rwk1 has quit [Remote host closed the connection]
cirenyc has joined #ruby-lang
barttenbrinke has joined #ruby-lang
benlovell has joined #ruby-lang
sush24 has joined #ruby-lang
tylersmith has quit [Ping timeout: 264 seconds]
<injekt> MOIN
<injekt> also caps
<judofyr> caps is cool
<injekt> no u r
dfdf has joined #ruby-lang
cirenyc has quit [Ping timeout: 252 seconds]
marr has joined #ruby-lang
<injekt> I hate waiting for deliveries
<apeiros> then don't wait for the delivery!
<gnufied> but typically you wait 9 months for that
<gnufied> how can you shorten it?
<gnufied> nerds!
rwk1 has joined #ruby-lang
gregmoreno has joined #ruby-lang
<injekt> lol
<injekt> using base64?
barttenbrinke has quit [Remote host closed the connection]
workmad3 has quit [Ping timeout: 246 seconds]
barttenbrinke has joined #ruby-lang
gregmoreno has quit [Ping timeout: 264 seconds]
<yorickpeterse> wat
<gnufied> exactly.
elia has joined #ruby-lang
tonni has joined #ruby-lang
dinesh- has quit [Quit: Linkinus - http://linkinus.com]
sush24 has quit [Ping timeout: 260 seconds]
barttenbrinke has quit [Ping timeout: 252 seconds]
vlad_starkov has joined #ruby-lang
sush24 has joined #ruby-lang
andrewvos has joined #ruby-lang
kgrz has joined #ruby-lang
rwk1 has quit [Remote host closed the connection]
sush24 has quit [Ping timeout: 245 seconds]
mbj has joined #ruby-lang
sush24 has joined #ruby-lang
stef_204 has quit [Remote host closed the connection]
dfdf has quit [Remote host closed the connection]
barttenbrinke has joined #ruby-lang
andrewvos has quit [Quit: leaving]
Domon has joined #ruby-lang
kashyapkmbc has joined #ruby-lang
kgrz has quit [Quit: ["Textual IRC Client: www.textualapp.com"]]
mbj has quit [Remote host closed the connection]
Domon has quit [Remote host closed the connection]
srji has joined #ruby-lang
Domon has joined #ruby-lang
kashyapkmbc has quit [Remote host closed the connection]
kgrz has joined #ruby-lang
GarethAdams has joined #ruby-lang
tylersmith has joined #ruby-lang
lupine has quit [Ping timeout: 264 seconds]
stamina has joined #ruby-lang
glebm has joined #ruby-lang
mbj has joined #ruby-lang
postmodern has quit [Quit: Leaving]
cirenyc has joined #ruby-lang
tylersmith has quit [Ping timeout: 256 seconds]
tonni has quit [Remote host closed the connection]
glebm has quit [Quit: Computer has gone to sleep.]
ia___ has quit [Quit: ia___]
cirenyc has quit [Ping timeout: 252 seconds]
<yorickpeterse> check this Gem out: http://hastebin.com/tonibuwawu.rb
<yorickpeterse> Hm I don't know, maybe you can't run that to begin with if Ruby is not installed?
rwk1 has joined #ruby-lang
<whitequark> >cucumber
<yorickpeterse> it actually works in this case
<gnufied> yorickpeterse: there is a odd chance that, person may be using other language driver?
<yorickpeterse> as in, the people that use it are happy with it because they don't know Ruby/rspec
<gnufied> it doesn't have to be ruby
<yorickpeterse> gnufied: it couldn't even parse that file to begin with in that case
<yorickpeterse> since the step definitions are still ruby
<gnufied> yorickpeterse: yeah, just now noticed.
<gnufied> it is ruby syntax
barttenbrinke has quit [Remote host closed the connection]
henrikhodne has quit [Quit: Computer has gone to sleep.]
lupine has joined #ruby-lang
jbsan has quit [Quit: jbsan]
glebm has joined #ruby-lang
<canton7> corner cases like the ruby binary not being in $PATH, not called 'ruby', etc....?
<yorickpeterse> no, just not thinking about it in this case
<apeiros> `` wouldn't raise anyway
<apeiros> oh, it does
sepp2k has joined #ruby-lang
sush24 has quit [Ping timeout: 268 seconds]
sush24 has joined #ruby-lang
barttenbrinke has joined #ruby-lang
cirenyc has joined #ruby-lang
MaddinXx_ has joined #ruby-lang
charliesome has joined #ruby-lang
mytrile has quit [Remote host closed the connection]
cirenyc has quit [Ping timeout: 256 seconds]
henrikhodne has joined #ruby-lang
vlad_starkov has quit [Ping timeout: 268 seconds]
nevill has quit [Quit: nevill]
gja has quit [Quit: This computer has gone to sleep]
tylersmith has joined #ruby-lang
srji has quit [Quit: leaving]
nlv has quit [Remote host closed the connection]
mikewintermute has quit [Quit: mikewintermute]
barttenbrinke has quit [Remote host closed the connection]
sepp2k has quit [Quit: Leaving.]
sush24 has quit [Ping timeout: 268 seconds]
cirenyc has joined #ruby-lang
tylersmith has quit [Ping timeout: 276 seconds]
krskrft has joined #ruby-lang
cirenyc has quit [Ping timeout: 264 seconds]
tenderlove has joined #ruby-lang
sush24 has joined #ruby-lang
barttenbrinke has joined #ruby-lang
gja has joined #ruby-lang
tenderlove has quit [Ping timeout: 241 seconds]
kamilc__ has joined #ruby-lang
sush24 has quit [Quit: This computer has gone to sleep]
sush24 has joined #ruby-lang
glebm has quit [Quit: Computer has gone to sleep.]
TvL2386 has quit [Quit: Ex-Chat]
barttenbrinke has quit [Remote host closed the connection]
krskrft has quit [Quit: Textual IRC Client: www.textualapp.com]
Domon has quit [Remote host closed the connection]
glebm has joined #ruby-lang
Guedes0 has quit [Ping timeout: 255 seconds]
pskosinski has joined #ruby-lang
cirenyc has joined #ruby-lang
faces has joined #ruby-lang
face has quit [Read error: Connection reset by peer]
amerine has joined #ruby-lang
benlovell has quit [Ping timeout: 264 seconds]
kgrz has quit [Ping timeout: 256 seconds]
barttenbrinke has joined #ruby-lang
tylersmith has joined #ruby-lang
barttenbrinke has quit [Ping timeout: 246 seconds]
<injekt> ugh cucumber
<injekt> almost as tasteless as the plant
gja has quit [Ping timeout: 240 seconds]
tylersmith has quit [Ping timeout: 260 seconds]
gja has joined #ruby-lang
gja has joined #ruby-lang
<whitequark> injekt: what?!
<whitequark> the plant is far better
kamilc__ has quit [Quit: Leaving...]
<whitequark> even if you take into account everything EXCEPT the fruit
kamilc__ has joined #ruby-lang
tenderlove has joined #ruby-lang
teleological has joined #ruby-lang
<gnufied> yeah cucumber plant is awesome. I grew up eating that for lunch everyday in summer
<gnufied> cucumber and little salt.
<injekt> ugh it's dull and boring
<gnufied> kicks ass.
<gnufied> inject's ass
<gnufied> injekt*
<injekt> maybe it kicks celerys ass
<injekt> but that's about it
<apeiros> inkjet*
<whitequark> there are also sea cucumbers
<gnufied> we don't get celery in India
<gnufied> But it cucumber probably kicks celery as
<apeiros> whitequark: those are icky… breathing through their anus…
<injekt> wat
ldnunes has joined #ruby-lang
tenderlove has quit [Ping timeout: 252 seconds]
rwk1 has quit [Remote host closed the connection]
<apeiros> thought it was from zefrank too, but seems not
<apeiros> its defense mechanism is also rather disgusting :)
nertzy3 has quit [Quit: Leaving]
Linkedipsoul has joined #ruby-lang
rwk1 has joined #ruby-lang
wmoxam has joined #ruby-lang
barttenbrinke has joined #ruby-lang
henrikhodne has quit [Quit: Computer has gone to sleep.]
workmad3 has joined #ruby-lang
jonahR has quit [Quit: jonahR]
justinmburrous has joined #ruby-lang
henrikhodne has joined #ruby-lang
justinmburrous has quit [Remote host closed the connection]
elia has quit [Quit: (IRC Client: textualapp.com)]
gja has quit [Quit: This computer has gone to sleep]
jonahR has joined #ruby-lang
<whitequark> apeiros: well, a lot of animals breathe through their anus
<whitequark> in fact, anus is kind of more important, you being deuterostome and all
cored has joined #ruby-lang
cored has joined #ruby-lang
benlovell has joined #ruby-lang
ddfreyne has quit [Excess Flood]
ddfreyne has joined #ruby-lang
Linkedipsoul_ has joined #ruby-lang
barttenbrinke has quit [Remote host closed the connection]
Linkedipsoul has quit [Ping timeout: 245 seconds]
workmad3 has quit [Ping timeout: 264 seconds]
adambeynon has quit [Quit: ["Textual IRC Client: www.textualapp.com"]]
tenderlove has joined #ruby-lang
justinmburrous has joined #ruby-lang
sush24 has quit [Ping timeout: 268 seconds]
adambeynon has joined #ruby-lang
hashkey has joined #ruby-lang
tenderlove has quit [Ping timeout: 264 seconds]
barttenbrinke has joined #ruby-lang
Linkedipsoul__ has joined #ruby-lang
sush24 has joined #ruby-lang
rwk1 has quit [Remote host closed the connection]
Linkedipsoul_ has quit [Ping timeout: 256 seconds]
wmoxam has quit [Ping timeout: 264 seconds]
justinmburrous has quit [Remote host closed the connection]
<yorickpeterse> wat
machuga|away is now known as machuga
GarethAdams has quit [Ping timeout: 240 seconds]
scampbell has joined #ruby-lang
tylersmith has joined #ruby-lang
verto has joined #ruby-lang
sush24 has quit [Quit: This computer has gone to sleep]
<yorickpeterse> what about it?
kamilc__ has quit [Quit: Leaving...]
kamilc__ has joined #ruby-lang
tylersmith has quit [Ping timeout: 252 seconds]
carloslopes has joined #ruby-lang
mikewintermute has joined #ruby-lang
<whitequark> teh name
lcashdol has joined #ruby-lang
tomzx_mac has joined #ruby-lang
rwk1 has joined #ruby-lang
glebm has quit [Quit: Computer has gone to sleep.]
cirenyc has quit [Quit: Leaving...]
dhruvasagar has quit [Ping timeout: 252 seconds]
gja has joined #ruby-lang
rwk1 has quit [Ping timeout: 268 seconds]
hogeo has quit [Remote host closed the connection]
justinmburrous has joined #ruby-lang
jperry_ has quit [Remote host closed the connection]
scottschecter has quit [Ping timeout: 276 seconds]
adambeynon has quit [Quit: ["Textual IRC Client: www.textualapp.com"]]
ikrima has joined #ruby-lang
krz has quit [Quit: krz]
Criztian has quit [Ping timeout: 256 seconds]
adambeynon has joined #ruby-lang
wmoxam has joined #ruby-lang
mucker has joined #ruby-lang
jperry_ has joined #ruby-lang
tomzx_ has joined #ruby-lang
tenderlove has joined #ruby-lang
kamilc__ has quit [Quit: Leaving...]
GarethAdams has joined #ruby-lang
rsl has quit [Quit: Textual IRC Client: www.textualapp.com]
kamilc__ has joined #ruby-lang
tenderlove has quit [Ping timeout: 240 seconds]
rsl has joined #ruby-lang
lcashdol has quit [Quit: Leaving.]
cofin has joined #ruby-lang
vbatts|work has joined #ruby-lang
Criztian has joined #ruby-lang
breakingthings has joined #ruby-lang
ia___ has joined #ruby-lang
cirenyc has joined #ruby-lang
Eric has joined #ruby-lang
Eric is now known as Guest97144
jxie has quit [Quit: leaving]
cirenyc has quit [Read error: Connection reset by peer]
elia has joined #ruby-lang
tylersmith has joined #ruby-lang
vlad_starkov has joined #ruby-lang
teleological has quit [Remote host closed the connection]
tylersmith has quit [Ping timeout: 252 seconds]
workmad3 has joined #ruby-lang
thiagoborges has joined #ruby-lang
philnyc has joined #ruby-lang
randallagordon has joined #ruby-lang
sush24 has joined #ruby-lang
randalla1ordon has quit [Ping timeout: 252 seconds]
tenderlove has joined #ruby-lang
lguardiola has quit [Quit: Good bye!]
jbsan has joined #ruby-lang
lguardiola has joined #ruby-lang
cstrahan has joined #ruby-lang
KU0N has joined #ruby-lang
tenderlove has quit [Ping timeout: 260 seconds]
barttenbrinke has quit [Remote host closed the connection]
teleological has joined #ruby-lang
mdedetrich has quit [Quit: Computer has gone to sleep.]
sush24_ has joined #ruby-lang
rwilcox has joined #ruby-lang
<yorickpeterse> :WiBro, lol xD"
<yorickpeterse> errr, "
sush24 has quit [Ping timeout: 252 seconds]
Guest97144 has quit [Quit: Linkinus - http://linkinus.com]
rwk1 has joined #ruby-lang
lguardiola__ has joined #ruby-lang
fragamus has joined #ruby-lang
lguardiola__ has quit [Client Quit]
gja has quit [Quit: This computer has gone to sleep]
rolfb has quit [Quit: Leaving...]
KU0N has quit [Quit: Leaving...]
vbatts|work has quit [Read error: Operation timed out]
rwk1 has quit [Ping timeout: 240 seconds]
hashkey has quit [Ping timeout: 264 seconds]
heftig has quit [Quit: Quitting]
jbsan has quit [Quit: jbsan]
tomzx_ is now known as tomzx
tomzx_mac has quit [Ping timeout: 264 seconds]
heftig has joined #ruby-lang
KU0N has joined #ruby-lang
chana has joined #ruby-lang
henrikhodne has quit [Quit: Computer has gone to sleep.]
dhruvasagar has joined #ruby-lang
workmad3 has quit [Ping timeout: 264 seconds]
ruurd has quit [Quit: Leaving...]
fragamus has quit [Quit: Computer has gone to sleep.]
DomKM has joined #ruby-lang
enebo has joined #ruby-lang
tenderlove has joined #ruby-lang
jonahR has quit [Quit: jonahR]
pipework has joined #ruby-lang
tenderlove has quit [Ping timeout: 276 seconds]
crackity_jones has joined #ruby-lang
ia___ has quit [Quit: ia___]
tkuchiki has quit [Remote host closed the connection]
nathanstitt has joined #ruby-lang
seydar has joined #ruby-lang
glebm has joined #ruby-lang
davemaurakis has joined #ruby-lang
davemaurakis has quit [Remote host closed the connection]
<seydar> i know this is OT, but can someone recommend a server hosting site? slash any reason why i shouldn't use ec2?
ruurd has joined #ruby-lang
<mucker> seydar: testing server ?
rwk1 has joined #ruby-lang
lcashdol has joined #ruby-lang
KU0N has quit [Quit: Leaving...]
<seydar> mucker: personal server, primarily, but it could likely see work as a testing server as well
lcashdol has quit [Read error: Connection reset by peer]
lcashdol has joined #ruby-lang
<mucker> seydar: I prefer lowendbox.com to ec2. See budget corner in quickweb.co.nz . works well for small-traffic blogs too.
lguardiola has quit [Quit: Good bye!]
tylersmith has joined #ruby-lang
<seydar> what makes you prefer it to ec2?
tonni has joined #ruby-lang
<mucker> cheap. 6$. I just ssh in whenever I want, without remembering to start the instance.
lguardiola has joined #ruby-lang
rwk1 has quit [Ping timeout: 240 seconds]
<yorickpeterse> seydar: EC2 doesn't make sense for VPS'
crackity_jones has quit [Quit: Computer has gone to sleep.]
<yorickpeterse> It's generally more expensive than actual VPS providers such as Linode
<pipework> DigitalOcean is pretty cool for personal stuff.
<seydar> yorickpeterse: you recommend linode?
<yorickpeterse> Yes
tonni has quit [Remote host closed the connection]
<seydar> eesh, Linode's $20/month fee looks exorbitant compared to the cheap stuff i've seen
<yorickpeterse> DO seems to be the new cool kid on the block but they're far too young for my taste
<yorickpeterse> Plus their most interesting plans aren't available in their Amsterdam data centre
tylersmith has quit [Ping timeout: 252 seconds]
<yorickpeterse> which means I'll end up paying about the same as Linode for a box in the US east coast
<yorickpeterse> instead of in London
vbatts|work has joined #ruby-lang
io_syl has quit [Ping timeout: 260 seconds]
wesside has joined #ruby-lang
<seydar> DO looks pretty tempting, pipework
<pipework> seydar: I like it a lot, but I'm friends with someone who works there and they have a pretty good culture.
sush24_ has quit [Read error: Connection reset by peer]
shinnya has joined #ruby-lang
mikko has quit [Remote host closed the connection]
mikewintermute has quit [Quit: mikewintermute]
MaddinXx_ has quit [Remote host closed the connection]
vmoravec has quit [Quit: Leaving]
tenderlove has joined #ruby-lang
<seydar> confession: godaddy has really good deals
<seydar> i think. not sure if they give me root access
tkuchiki has joined #ruby-lang
<seydar> oh, wait, i lied. not good deals at all
tenderlove has quit [Ping timeout: 264 seconds]
teleological has quit [Remote host closed the connection]
<athetius> seydar lie("At least their SSL certs are cheap.")
hashkey has joined #ruby-lang
<seydar> oh shit i didn't even think about ssl certs
sush24_ has joined #ruby-lang
hashkey is now known as Guest4995
* whitequark giggles
<yorickpeterse> I don't get it
Guest4995 is now known as hashkey
teleological has joined #ruby-lang
chana has quit [Quit: chana]
<seydar> are there any major discrepancies between 32bit and 64bit in the world of ruby?
teleological has quit [Remote host closed the connection]
mistym has joined #ruby-lang
mistym has joined #ruby-lang
gnufied has quit [Quit: Leaving.]
fess has quit [Read error: Connection reset by peer]
rwk1 has joined #ruby-lang
chana has joined #ruby-lang
<athetius> seydar I don't think so, minus more math power in 64bit
<seydar> in this modern day and age, is there any reason i should hang back in the 32bit world?
vlad_starkov has quit [Remote host closed the connection]
<athetius> Some programs (like SecondLife's client) are only avail in 32bit linux, there might be a few drivers also. That being said, I said nothing about ruby. Luckily you can always run 32bit in 64bit.
rwk1 has quit [Ping timeout: 252 seconds]
teleological has joined #ruby-lang
ffio has joined #ruby-lang
_ffio_ has quit [Ping timeout: 252 seconds]
DomKM has quit [Quit: Leaving.]
brycek has joined #ruby-lang
sush24_ has quit [Ping timeout: 252 seconds]
jsullivandigs has joined #ruby-lang
bzalasky has joined #ruby-lang
_carloslopes has joined #ruby-lang
sush24_ has joined #ruby-lang
artie has joined #ruby-lang
<whitequark> yorickpeterse: wait for a while and see what happens
<yorickpeterse> You mean...nothing? :>
* yorickpeterse runs
_carloslopes has quit [Remote host closed the connection]
carloslopes has quit [Ping timeout: 264 seconds]
dhruvasagar has quit [Ping timeout: 252 seconds]
artie has quit [Remote host closed the connection]
<erikh> seydar: if you have minimal ram 32-bit will usually be more efficient
<erikh> minimal = ~512MB
<erikh> pretty rare these days, but worth knowing
<pipework> Pretty common in VPS stuff though.
<erikh> it's getting much rarer
<pipework> Disagree. :)
<erikh> yeah, ok.
judofyr has quit [Remote host closed the connection]
tkuchiki has quit [Remote host closed the connection]
<erikh> sorry, I thought you were talking about something more than a virtual raspberry pi
skade has quit [Quit: Textual IRC Client: www.textualapp.com]
<pipework> And just in that list alone, digital oceans' 512mb plan is the most popular, and with linode's upgrade to 1gb for the cheapest, it's more true.
smook2 has joined #ruby-lang
<pipework> lolk.
cofin has quit [Quit: cofin]
gnufied1 has joined #ruby-lang
sush24_ has quit [Read error: Connection reset by peer]
<yorickpeterse> Personally I'm happy with paying around 45 USD for a massively overkill Linode box since besides the hack thing Linode has been nothing but amazing
<yorickpeterse> (note that said box has received various free upgrades, hence it's even more overpowered)
<yorickpeterse> 8 cores and 2GB of RAM for 1 static website, a simple Ruby website and an IRC bot
northelks has joined #ruby-lang
<yorickpeterse> and ofc my IRC client, very important
<athetius> yorickpeterse: I agree, I love my Linode
* brycek cries into cat about the "lifetime" joyent box
wallerdev has joined #ruby-lang
Criztian has quit [Remote host closed the connection]
davemaurakis has joined #ruby-lang
arooni-mobile has joined #ruby-lang
workmad3 has joined #ruby-lang
cofin has joined #ruby-lang
sush24_ has joined #ruby-lang
charliesome has quit [Quit: Textual IRC Client: www.textualapp.com]
<yorickpeterse> heh
nveselinov has joined #ruby-lang
rwk1 has joined #ruby-lang
nveselinov has quit [Read error: Connection reset by peer]
<cout> is there a method already written somewhere that will parse the content-type header, e.g. Content-Type: foo/bar; charset=blah; action="foo:bar:baz:HiThere"
bzalasky has quit [Remote host closed the connection]
<cout> I can write one myself buy I'm afraid I'll get the details wrong
nveselinov has joined #ruby-lang
teleological has quit [Remote host closed the connection]
machuga is now known as machuga|away
tylersmith has joined #ruby-lang
vlad_starkov has joined #ruby-lang
dhruvasagar has joined #ruby-lang
rwk1 has quit [Ping timeout: 246 seconds]
tylersmith has quit [Ping timeout: 252 seconds]
glebm has quit [Quit: Computer has gone to sleep.]
benlovell has quit [Ping timeout: 245 seconds]
artie has joined #ruby-lang
<cout> so sad that this channel has died :(
DeFii has joined #ruby-lang
barttenbrinke has joined #ruby-lang
DeFii has left #ruby-lang [#ruby-lang]
anjen has joined #ruby-lang
artie has quit [Remote host closed the connection]
Defu has joined #ruby-lang
Defu has left #ruby-lang [#ruby-lang]
teleological has joined #ruby-lang
lguardiola_ has joined #ruby-lang
lguardiola_ has quit [Client Quit]
<yorickpeterse> refactoring is the best
randallagordon has quit [Ping timeout: 246 seconds]
workmad3 has quit [Ping timeout: 240 seconds]
tbuehlmann has quit [Remote host closed the connection]
yalue has joined #ruby-lang
randallagordon has joined #ruby-lang
Rizzle has joined #ruby-lang
io_syl has joined #ruby-lang
<cout> wow, this is some real ruby-fu
<cout> OpenURI::Meta.init(o=''); o.meta_add_field('content-tpe', type); @body_encoding = o.encoding
<cout> that's nuts
<injekt> heh
<yorickpeterse> httpclient is one of the few HTTP libraries I really, really like
<yorickpeterse> well, the only one in Ruby land actually
<injekt> Anyway there's a http parser written in Ruby
<yorickpeterse> meh, Net::HTTP
<yorickpeterse> fuckit, home tiem. lets see if I can make a run for my train so I can be home early
ruurd has quit [Remote host closed the connection]
<pipework> I also bought a cheap VPS from chicagoVPS that costs me $3.33/month
philnyc has quit [Ping timeout: 252 seconds]
<pipework> 2gb of ram, 4-core , nothing interesting.
<injekt> erikh> sorry, I thought you were talking about something more than a virtual raspberry pi
<injekt> lol'd
elia has quit [Read error: Connection reset by peer]
_elia has joined #ruby-lang
tylersmith has joined #ruby-lang
dhruvasagar has quit [Ping timeout: 240 seconds]
anjen has quit [Quit: anjen]
tenderlove has joined #ruby-lang
_elia has quit [Client Quit]
Uranio has quit [Ping timeout: 252 seconds]
ruurd has joined #ruby-lang
rwk1 has joined #ruby-lang
ruurd has quit [Remote host closed the connection]
kstuart has joined #ruby-lang
rwk1 has quit [Ping timeout: 246 seconds]
lguardiola has quit [Quit: Good bye!]
lguardiola has joined #ruby-lang
ddd_ is now known as ddd
mikko has joined #ruby-lang
stringly_typed has joined #ruby-lang
DomKM has joined #ruby-lang
dankest has joined #ruby-lang
lguardiola has quit [Client Quit]
lguardiola has joined #ruby-lang
jxie has joined #ruby-lang
fragamus has joined #ruby-lang
enebo has quit [Quit: enebo]
machuga|away is now known as machuga
davemaurakis has quit [Remote host closed the connection]
davemaurakis has joined #ruby-lang
stef_204 has joined #ruby-lang
stringly_typed has quit [Ping timeout: 260 seconds]
saarinen has joined #ruby-lang
gja has joined #ruby-lang
gja has quit [Changing host]
gja has joined #ruby-lang
seydar has quit [Quit: leaving]
shinnya has quit [Read error: Operation timed out]
davemaurakis has quit [Ping timeout: 268 seconds]
cofin has quit [Quit: cofin]
barttenbrinke has quit [Remote host closed the connection]
dhruvasagar has joined #ruby-lang
mucker has quit [Quit: leaving]
GarethAdams has quit [Quit: Leaving...]
rwk1 has joined #ruby-lang
sharma__ has joined #ruby-lang
sush24_ has quit [Ping timeout: 276 seconds]
stef_204 has quit [Quit: KVIrc 4.2.0 Equilibrium http://www.kvirc.net/]
ikrima has quit [Quit: Computer has gone to sleep.]
rwk1 has quit [Ping timeout: 240 seconds]
barttenbrinke has joined #ruby-lang
glebm has joined #ruby-lang
foca_ has quit [Ping timeout: 245 seconds]
realDAB has joined #ruby-lang
duckinator has quit [Ping timeout: 252 seconds]
nick_h_ has quit [Ping timeout: 252 seconds]
henrikhodne has joined #ruby-lang
gregmoreno has joined #ruby-lang
tpope has quit [Ping timeout: 264 seconds]
cout has quit [Ping timeout: 276 seconds]
Aloysius1 has joined #ruby-lang
<Aloysius1> G'day! If I have script A which I want to run as a demon from script B, is there a way to capture script A's stdout without changing script A? So, if A is "puts 'hello, world!'" is there a way that I can start that from B so that 'hello, world!' ends up in a file (without changing A at all)?
davemaurakis has joined #ruby-lang
saarinen has quit [Quit: saarinen]
crackity_jones has joined #ruby-lang
sharma__ has quit [Quit: Leaving]
sush24 has joined #ruby-lang
tpope has joined #ruby-lang
justinmburrous has quit [Remote host closed the connection]
barttenbrinke has quit [Remote host closed the connection]
stringly_typed has joined #ruby-lang
gja has quit [Quit: This computer has gone to sleep]
__butch__ has joined #ruby-lang
cmckni3 has joined #ruby-lang
saarinen has joined #ruby-lang
andrewvos has joined #ruby-lang
<andrewvos> HELLO INTERNETSS
<andrewvos> Three
nick_h has joined #ruby-lang
<andrewvos> I was expecting to see a dozen
tpope has quit [Remote host closed the connection]
<freedrull> is the variable $0 special in some way? i cant see why it would be used here https://github.com/resque/resque/blob/master/lib/resque/worker.rb#L352
JohnBat26 has quit [Ping timeout: 245 seconds]
foca has joined #ruby-lang
tpope has joined #ruby-lang
<yorickpeterse> Aloysius1: require 'open3'; stdout, stderr, process = Open3.capture3('your command')
<yorickpeterse> for example
<yorickpeterse> if you want an actual daemon you can try something like https://github.com/bazaarlabs/dante
andrewvos has quit [Ping timeout: 246 seconds]
dagobah has quit [Remote host closed the connection]
duckinator has joined #ruby-lang
tkuchiki has joined #ruby-lang
<whitequark> hmmm, somehow flip-flops do not work on me
gnufied1 has quit [Quit: Leaving.]
<erikh> injekt: :)
<whitequark> >> 10.times.select { |i| true if (i == 3)...(i == 7) }
<eval-in> whitequark => [3, 4, 5, 6, 7] (https://eval.in/33558)
<whitequark> >> 10.times.select { |i| true if (i == 3)..(i == 7) }
<eval-in> whitequark => [3, 4, 5, 6, 7] (https://eval.in/33559)
cout has joined #ruby-lang
<erikh> I like linode
<erikh> I wouldn't run a production service on it though
<yorickpeterse> erikh: how so?
<erikh> it's overpriced for the machines
<yorickpeterse> heh, I was about to ask if it was because of the price
<erikh> and the machines are pretty limited
<yorickpeterse> they are indeed a tad expensive
<erikh> I run my own stuff on a linode and another host
<yorickpeterse> However, as with many other hosts the moment you go cheaper you generally end up with less
zmike123 has joined #ruby-lang
<yorickpeterse> Hm, DO seems to've enabled their cheaper plans again in Amsterdam
vbatts|work has quit [Ping timeout: 245 seconds]
<yorickpeterse> but meh, that means having to set up a server again and having to handle backups myself
glebm has quit [Quit: Computer has gone to sleep.]
barttenbrinke has joined #ruby-lang
apeiros has quit [Remote host closed the connection]
apeiros has joined #ruby-lang
glebm has joined #ruby-lang
apeiros has quit [Read error: Connection reset by peer]
apeiros has joined #ruby-lang
__butch__ has quit [Quit: Leaving.]
sush24 has quit [Ping timeout: 240 seconds]
<yorickpeterse> hm, apparently DO does have that
glebm has quit [Quit: Computer has gone to sleep.]
sush24 has joined #ruby-lang
<Aloysius1> injekt: Thanks. I saw that but it didn't seem to apply. I'll check it again.
gnufied has joined #ruby-lang
<Aloysius1> Yorisk: I was using Daemon but I can't figure out how to capture STDOUT with it.
mrsolo has joined #ruby-lang
<yorickpeterse> You mean Process.daemon?
gnufied has quit [Client Quit]
<Aloysius1> No, the Daemons gem: https://www.ruby-toolbox.com/projects/daemons
<yorickpeterse> ah
__butch__ has joined #ruby-lang
glebm has joined #ruby-lang
sepp2k has joined #ruby-lang
kamilc__ has quit [Quit: Leaving...]
crackity_jones has quit [Quit: Computer has gone to sleep.]
snarfmason has quit [Quit: Textual IRC Client: www.textualapp.com]
snarfmason has joined #ruby-lang
krz has joined #ruby-lang
vbatts|work has joined #ruby-lang
kamilc__ has joined #ruby-lang
justinmburrous has joined #ruby-lang
cofin has joined #ruby-lang
rwk1 has joined #ruby-lang
glebm has quit [Quit: Computer has gone to sleep.]
rwk1 has quit [Ping timeout: 240 seconds]
elia has joined #ruby-lang
realDAB has quit [Quit: realDAB]
tkuchiki has quit [Remote host closed the connection]
jonahR has joined #ruby-lang
jammi has joined #ruby-lang
jammi has left #ruby-lang [#ruby-lang]
crackity_jones has joined #ruby-lang
teleological has quit [Remote host closed the connection]
barttenbrinke has quit [Remote host closed the connection]
dhruvasagar has quit [Ping timeout: 264 seconds]
dhruvasagar has joined #ruby-lang
crackity_jones has quit [Quit: Computer has gone to sleep.]
firstdayonthejob has joined #ruby-lang
saarinen has quit [Quit: saarinen]
atmosx has joined #ruby-lang
rwk1 has joined #ruby-lang
lcashdol1 has joined #ruby-lang
lcashdol has quit [Read error: Connection reset by peer]
lcashdol1 has quit [Client Quit]
glebm has joined #ruby-lang
dhruvasagar has quit [Ping timeout: 264 seconds]
dhruvasagar has joined #ruby-lang
rwk1 has quit [Ping timeout: 245 seconds]
stringly_typed has quit [Quit: Computer has gone to sleep.]
havenwood has joined #ruby-lang
_elia has joined #ruby-lang
elia has quit [Ping timeout: 252 seconds]
_elia has quit [Ping timeout: 256 seconds]
dhruvasagar has quit [Ping timeout: 260 seconds]
dhruvasagar has joined #ruby-lang
mbj has quit [Quit: Lost terminal]
saarinen has joined #ruby-lang
senseinerd has joined #ruby-lang
teleological has joined #ruby-lang
senseinerd has quit [Client Quit]
ruurd has joined #ruby-lang
henrikhodne has quit [Quit: Computer has gone to sleep.]
stderr_ has joined #ruby-lang
stderr_ has left #ruby-lang [#ruby-lang]
Nisstyre has joined #ruby-lang
malev has joined #ruby-lang
saarinen has quit [Quit: saarinen]
solars has quit [Ping timeout: 246 seconds]
vbatts|work has quit [Ping timeout: 256 seconds]
henrikhodne has joined #ruby-lang
postmodern has joined #ruby-lang
danrabinowitz_ has quit [Quit: Peace.]
danrabinowitz has joined #ruby-lang
danrabinowitz has quit [Remote host closed the connection]
DomKM has quit [Quit: Leaving.]
rwk1 has joined #ruby-lang
faramir has joined #ruby-lang
danrabinowitz has joined #ruby-lang
rwk1 has quit [Ping timeout: 276 seconds]
tenderlove has quit [Remote host closed the connection]
vbatts|work has joined #ruby-lang
<Aloysius1> ping
randallagordon is now known as randallagordon_
vlad_starkov has quit [Remote host closed the connection]
havenwood has quit [Ping timeout: 245 seconds]
randallagordon_ is now known as randallagordon
mahlon__ is now known as mahlon
<whitequark> yorickpeterse: let's do something fuuuuun
<whitequark> like
Taranis has joined #ruby-lang
<whitequark> correctly implement flip-flops!
<yorickpeterse> get out
<yorickpeterse> I'm setting up a new Debian box and will be cooking dinner in a bit
<yorickpeterse> my sysvinit is so god damn rusty
<whitequark> 19>> if (bar; a, b = foo); end
<eval-in> whitequark => undefined local variable or method `bar' for main:Object (NameError) ... (https://eval.in/33578)
<whitequark> 18>> if (bar; a, b = foo); end
<eval-in> whitequark => undefined local variable or method `bar' for main:Object (NameError) ... (https://eval.in/33579)
* whitequark completely borked this part of parser
<whitequark> isn't even close
<yorickpeterse> heh
<yorickpeterse> lol, shutdown server and monit goes "OMGWTFBBQ HIGH CPU USAGE"
<yorickpeterse> guess I have to make it less pedantic
symm- has joined #ruby-lang
opple has joined #ruby-lang
opple has left #ruby-lang [#ruby-lang]
tonni has joined #ruby-lang
tonni has quit [Remote host closed the connection]
DomKM has joined #ruby-lang
<pipework> "You aren't taking me down without a fight, yorickpeterse!"
ruurd has quit [Quit: Leaving...]
jxie_ has joined #ruby-lang
__butch__ has quit [Read error: Connection reset by peer]
__butch__ has joined #ruby-lang
sepp2k1 has joined #ruby-lang
realDAB has joined #ruby-lang
sepp2k has quit [Ping timeout: 264 seconds]
jxie has quit [Ping timeout: 245 seconds]
runeb has joined #ruby-lang
<yorickpeterse> pretty much
danrabinowitz has quit [Remote host closed the connection]
danrabinowitz has joined #ruby-lang
<cout> whitequark: I was just trying to explain flip-flops to my coworkers yesterday
<cout> they had never heard of them
scottschecter has joined #ruby-lang
tomzx has quit [Quit: tomzx]
realDAB has quit [Quit: realDAB]
atmosx has quit [Quit: Computer has gone to sleep.]
workmad3 has joined #ruby-lang
yalue has quit [Quit: Leaving]
mistym has quit [Remote host closed the connection]
runeb has quit [Remote host closed the connection]
Asher has quit [Quit: Leaving.]
Asher has joined #ruby-lang
mistym has joined #ruby-lang
mistym has quit [Changing host]
mistym has joined #ruby-lang
ruurd has joined #ruby-lang
ruurd has quit [Read error: Connection reset by peer]
esimmers has joined #ruby-lang
esimmers has left #ruby-lang [#ruby-lang]
rwk1 has joined #ruby-lang
<whitequark> cout: thankfully
mistym has quit [Ping timeout: 276 seconds]
<apeiros> I'll recount all the 10 top reasons of why you must know flip-flops:
<whitequark> ЖВ
<whitequark> *:D
<whitequark> (keyboard layouts be damned.)
<apeiros> (I'll start the moment there actually is a reason…)
runeb has joined #ruby-lang
gix has quit [Quit: Client exiting]
rwk1 has quit [Ping timeout: 264 seconds]
gix has joined #ruby-lang
cofin has quit [Quit: cofin]
saarinen has joined #ruby-lang
s0ber has quit [Read error: Connection reset by peer]
s0ber has joined #ruby-lang
<cout> apeiros: waiting... :)
synthetix has joined #ruby-lang
swav_ has joined #ruby-lang
swav has quit [Ping timeout: 245 seconds]
<crankharder> so like, is Blah not defined at the point of #inherited ?
tenderlove has joined #ruby-lang
elia has joined #ruby-lang
crackity_jones has joined #ruby-lang
krz has quit [Quit: krz]
crackity_jones has quit [Client Quit]
vbatts|work has quit [Quit: MeSoChatty 0.3.8]
crackity_jones has joined #ruby-lang
<drbrain> crankharder: it is defined, but that is all
zmike123 has quit [Quit: Выходжу]
<drbrain> inherited is invoked at line 7, not 9
<drbrain> crankharder: (per the backtrace)
mbj has joined #ruby-lang
workmad3 has quit [Ping timeout: 252 seconds]
elia has quit [Ping timeout: 246 seconds]
richardjortega has joined #ruby-lang
richardjortega has quit [Remote host closed the connection]
runeb has quit [Remote host closed the connection]
scampbell has quit [Remote host closed the connection]
adambeynon has quit [Quit: ["Textual IRC Client: www.textualapp.com"]]
pipework has quit [Remote host closed the connection]
pipework has joined #ruby-lang
crackity_jones has quit [Quit: Computer has gone to sleep.]
runeb has joined #ruby-lang
pipework has quit [Ping timeout: 276 seconds]
stringly_typed has joined #ruby-lang
runeb has quit [Remote host closed the connection]
hinbody has joined #ruby-lang
runeb has joined #ruby-lang
sush24 has quit [Quit: This computer has gone to sleep]
havenwood has joined #ruby-lang
machuga is now known as machuga|away
teleological has quit [Remote host closed the connection]
rwk1 has joined #ruby-lang
faramir has quit [Ping timeout: 240 seconds]
runeb has quit [Remote host closed the connection]
wallerdev has quit [Quit: wallerdev]
rwk1 has quit [Ping timeout: 276 seconds]
elia has joined #ruby-lang
joschi has quit [Remote host closed the connection]
ldnunes has quit [Quit: Leaving]
joschi has joined #ruby-lang
davemaurakis has quit [Remote host closed the connection]
<Aloysius1> So, I'm looking at Dante and it seems to run inline code (as opposed to demonizing scripts, a la Daemons). So it can capture stdout becuse it's its own stdout.
cofin has joined #ruby-lang
brycek has left #ruby-lang [#ruby-lang]
wesside has quit [Quit: Computer has gone to sleep.]
stringly_typed has quit [Quit: Computer has gone to sleep.]
danrabinowitz has quit [Remote host closed the connection]
__butch__ has quit [Quit: Leaving.]
krames has joined #ruby-lang
chana has quit [Quit: chana]
<Aloysius1> So it seems like I can use one of the "open"s if I don't need a daemon. Or a daemon if I don't need stdout. Not both.
danrabinowitz has joined #ruby-lang
chana has joined #ruby-lang
vlad_starkov has joined #ruby-lang
synthetix has quit [Ping timeout: 268 seconds]
stringly_typed has joined #ruby-lang
vlad_starkov has quit [Read error: Connection reset by peer]
<wmoxam> 2
henrikhodne has quit [Quit: Computer has gone to sleep.]
jonahR has quit [Quit: jonahR]
<drbrain> wmoxam: today's artisinal, shade-grown, hand-picked random number?
chana has quit [Quit: chana]
ezkl has joined #ruby-lang
thiagoborges has quit [Remote host closed the connection]
<wmoxam> drbrain: organic too
<drbrain> ooh
<wmoxam> cage free
<wmoxam> free run
Aaaarg has quit [Read error: Operation timed out]
Aaaarg has joined #ruby-lang
Todd has quit [Read error: Connection reset by peer]
verto has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
ezkl has quit [Quit: Textual IRC Client: www.textualapp.com]
Todd has joined #ruby-lang
verto has joined #ruby-lang
teleological has joined #ruby-lang
<zenspider> rawr
<zenspider> flip-flops are awesome!
rickhull has joined #ruby-lang
Todd has quit [Ping timeout: 268 seconds]
krames has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
hhatch has quit [Ping timeout: 276 seconds]
wmoxam has quit [Ping timeout: 264 seconds]
chana has joined #ruby-lang
breakingthings has quit [Quit: breakingthings]
<apeiros> cout: you'll have to keep waiting :-)
Kabaka has quit [Remote host closed the connection]
<cout> ok
<cout> still waiting..
Todd has joined #ruby-lang
<cout> I don't know of anyone ever actually using the flip flop operator
<cout> for some reason nathaniel talbott comes to mind, but other than him...
<zenspider> I used it just the other day
<zenspider> lke... within the last 2 weeks. for realsies
<zenspider> it is fantastic for grabbing hunks of text w/o maintaining more complex state
Kabaka has joined #ruby-lang
<apeiros> cout: that was kinda the joke…
<cout> zenspider: you know I almost mentioned your name too, but then I thought "no, even ryan's too sane for that" :)
<zenspider> AM NOT
<apeiros> he wrote things like neverdie and wilson
<cout> haha
<zenspider> print if /^ def/../^ end/
<apeiros> and you think he's too sane? :)
<zenspider> I didn't do neversaydie... that was totally tenderlove
<zenspider> I did do wilson
<apeiros> good
<apeiros> then enterprise ruby
<zenspider> I did however convert activerecord to XML and run it
ruurd has joined #ruby-lang
stringly_typed has quit [Quit: Computer has gone to sleep.]
<eam> is the ruby regex documented anywhere?
<whitequark> eam: yes
<eam> I just learned \A and \a both exist -- which is extremely odd
<eam> and \A doesn't seem to match ^
<whitequark> oh, it's dark and full of terrors
<eam> behavior wise
<cout> I still hope one day to build a fuel management system that runs on a subset of ruby
<eam> why can't this just be pcre >:|
<manveru> that's why there's \a\A^ and \z\Z$
havenwood has quit [Remote host closed the connection]
havenwood has joined #ruby-lang
<cout> eam: shouldn't be hard to call into pcre from ruby :)
<drbrain> what is \a?
<eam> drbrain: it appears \a is the 0x07 character, and not an anchor
<eam> so that's good
<drbrain> yeah, I thought so
<eam> but \A and ^ have differing behavior
<eam> which is very bad
<drbrain> no it isn't
<eam> only \z and \Z should differ
<eam> and \Z should be $
<eam> for non-multiline matches
<drbrain> why do you think that?
<eam> because that's what those symbols mean
<eam> this syntax predates ruby
stringly_typed has joined #ruby-lang
rwk1 has joined #ruby-lang
<drbrain> eam: then perl is broken too?
havenwood has quit [Ping timeout: 276 seconds]
<eam> no, perl is correct
<eam> \z \Z $
<eam> \A ^
<eam> the capital version is identical to the symbol, in non-multiline match mode
<eam> and \z exists to always match end of string
<eam> that's not what ruby does
<drbrain> eam: http://perldoc.perl.org/perlre.html says: " ^ Match the beginning of the line" and "\A Match only at beginning of string"
<drbrain> which is what ruby does
cored has quit [Ping timeout: 240 seconds]
dhruvasagar has quit [Read error: Operation timed out]
<eam> drbrain: ^ matches the beginning of the string too
<eam> the bug is that ^ in ruby matches after a newline when *not* in multiline mode with a /m modifier
<eam> outside of multiline mode ^ and \A are synonyms
<eam> (except in ruby)
<drbrain> ruby doesn't implement perl regular expressions though
<drbrain> so I don't see where the bug in ruby is
<eam> oh come on with the "the implementation is the reference"
<eam> the function of these symbols is established
<eam> clearly a bug
<drbrain> and in ruby they are established and documented
<drbrain> and have been for years
<eam> actually it's not
<eam> I'm reading this doc
<eam> it doesn't explain the behavior in multiline / non-multiline
rwk1 has quit [Ping timeout: 252 seconds]
<heftig> >> "foo\nbar\nbaz".scan(/^.*$/)
<eval-in> heftig => ["foo", "bar", "baz"] (https://eval.in/33587)
<eam> (probably because perl semantics are assumed)
<heftig> >> "foo\nbar\nbaz".scan(/^.*$/m)
<eval-in> heftig => ["foo\nbar\nbaz"] (https://eval.in/33588)
krames has joined #ruby-lang
<heftig> i think this is pretty deliberate
<drbrain> eam: which doc?
<manveru> the oniguruma ones
<manveru> the only page i ever visit on geocities :)
<drbrain> well, ruby 2 doesn't use oniguruma anymore (onigmo instead, a fork)
<eam> oh my god
<eam> ruby regex has multiline matching on by default?
<manveru> yeah, the handling of encodings differs a bit afaik
<eam> the /m operator is inverted from perl?
<eam> is that what I'm running into?
wallerdev has joined #ruby-lang
malev has quit [Remote host closed the connection]
<heftig> eam: the multiline modifier only seems to affect the behavior of .
<whitequark> eam: no, it's not inverted
<whitequark> what heftig says
<heftig> in multiline mode, . matches \n
nathanstitt has quit [Quit: I growing sleepy]
<eam> but multiline mode doesn't change anchor behavior at all?
<whitequark> yes
<heftig> nope
<heftig> it doesn't
<whitequark> eam: the anchor gotcha is actually a cause of a multitude of security bugs.
<whitequark> unfortunately.
<eam> whitequark: yeah I'm aware, ruby's break from the established syntax just created one
<eam> for me
<eam> because of this difference between PCRE and ruby RE
<eam> =/
<eam> in all other RE languages I'm aware of that support ^ and multiline match, ^ anchors on string start unless multiline is on
gnufied has joined #ruby-lang
Kabaka has quit [Remote host closed the connection]
smook2 has quit [Ping timeout: 255 seconds]
Kabaka has joined #ruby-lang
* zenspider pops some popcorn and enjoys the trainwreck^Wshow
stringly_typed has quit [Quit: Computer has gone to sleep.]
<Aloysius1> I can't find anything recent on this: If I'm reading an IO object (this is from a PTY.spawn call) is there a simple way to say "read-data unless there is no data to read"?
<zenspider> you prolly want to use seleect
<zenspider> select even
<cout> zenspider: is that trainwreck <beginning-of-line> Wshow or trainwreck <beginning-of-string> Wshow ? :)
<eam> haha
<zenspider> cout: boo
<zenspider> beginning-of-line, of course
<eam> cout: if only ruby RE had a way to distinguish the two!
<zenspider> uhh
<eam> so from what I can tell, the symbol anchors in ruby ^$ are always in multiline mode
<eam> and /m never modifies anchor behavior
<heftig> (?<=\n)
chana has quit [Quit: chana]
<eam> and I think I'm going to stick to PCRE in ruby from now on =/
<drbrain> Aloysius1: or read_nonblock
<heftig> Aloysius1: or readpartial
<drbrain> I always forget about readpartial
<heftig> ah, readpartial will block
gnufied has quit [Quit: Leaving.]
<heftig> read_nonblock is what you want
<heftig> the doc even has an example using select
justinmburrous has quit [Remote host closed the connection]
kamilc__ has quit [Quit: Linkinus - http://linkinus.com]
chana has joined #ruby-lang
cored has joined #ruby-lang
cored has quit [Changing host]
cored has joined #ruby-lang
<rickhull> am I totally off base here? https://github.com/nathansobo/treetop/issues/34
rwk1 has joined #ruby-lang
x0f_ has joined #ruby-lang
<drbrain> rickhull: I agree with you
saarinen has quit [Quit: saarinen]
<ged_> rickhull: absolutely not.
<drbrain> rickhull: can you show a performance improvement by removing polyglot?
<rickhull> whew, ok
<ged_> I've been surprised by the exact same thing
<rickhull> drbrain: doubtful
<rickhull> i mean, i guess i could try
<rickhull> it's more of principle for me
ged_ is now known as ged
<drbrain> rickhull: this is why I've avoided gems depending on treetop
<rickhull> for me, it's json_select
<drbrain> it uses polyglot by default which adds behavior I'm afraid of
tomzx has joined #ruby-lang
saarinen has joined #ruby-lang
<zenspider> yup yup
rwk1 has quit [Ping timeout: 245 seconds]
<rickhull> in practice, i'm sure the behavior is ok. but it's a whole unnecessary layer of uncertainty
<ged> Also: mail.
<ged> (the gem)
x0f has quit [Ping timeout: 252 seconds]
krames has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
wmoxam has joined #ruby-lang
intellitech has quit [Quit: SMOKE BOMB!]
kstuart has quit [Quit: kstuart]
<Aloysius1> Thanks zenspider, drbrain and heftig. (Even if readpartial does block.)
mossplix has joined #ruby-lang
kstuart has joined #ruby-lang
mossplix has quit [Client Quit]
<Aloysius1> Huh. Works for a while, then..."Uncaught exception: Resource temporarily unavailable - read would block"
mossplix has joined #ruby-lang
<drbrain> you need to rescue and continue, the documentation on read_nonblock explains this
mbj has quit [Ping timeout: 240 seconds]
<heftig> you need to rescue IO::WaitReadable
<Aloysius1> drbrain: Yeah...thanks.
<Aloysius1> Thanks, guys. Reading thoroughly now.
mistym has joined #ruby-lang
mistym has joined #ruby-lang
<rickhull> IME, depending on what you're trying to do, you can end up down a rabbit hole of edge cases trying to avoid blocking reads
<rickhull> basically end up with a massive amounts of state, when a different approach might be cleaner
ffio_ has joined #ruby-lang
stringly_typed has joined #ruby-lang
ffio has quit [Ping timeout: 245 seconds]
<rickhull> Aloysius1: what is your objective at a high level?
DomKM has quit [Quit: Leaving.]
jbsan has joined #ruby-lang
<rickhull> one approach that worked for me was a worker thread doing blocking reads, then taking action when the read completes
<rickhull> now you've got a thread management / communication issue, but that can be relatively easier to deal with
<rickhull> ~~~depending~~~ :P
<Aloysius1> rickhull: I'm running a bunch of processes that dump to stdout. NOt really doing much.
kstuart has quit [Quit: kstuart]
<rickhull> i've not done a PTY.spawn
<rickhull> but does that represent a user typing in commands, that you could call e.g. gets on?
<rickhull> are you trying to merge / multiplex their output?
<rickhull> "running a bunch of processes that dump to STDOUT" — where is the read()ing happening?
kstuart has joined #ruby-lang
stringly_typed has quit [Ping timeout: 252 seconds]
<Aloysius1> Basically, I have a bunch of scripts that read and write to a queue, and they can be configured to dump to stdout.
<rickhull> i.e. write to STDOUT instead of queue
<Aloysius1> So I was putting together a monitor that can start, stop, collect the stdout, redirect it if necessary, etc.
<rickhull> ? or in addition to?
<rickhull> writing the same messages? or a different sort of output?
<rickhull> probably doesn't matter, i think get the gist
<Aloysius1> It's data transformation. Data comes in point A, gets shoved into the queue, read by process B, transformed and pushed back into the queue, where it's picked up by processes C and D that push it some place else.
<rickhull> i'd be tempted to do blocking reads with threads on each IO. or a select loop
<Aloysius1> It's, like, data processing 101, if you're from the '60s. I like to imagine little operators running tapes from the shelves, mounting them on the drives...
<Aloysius1> Right now, I'm envisioning an array of these spawned processes and just running through the array to see if there's any data.
<rickhull> if a read blocks under the current approach, what is actually blocked? some other processing, or a read on a different IO?
<Aloysius1> Well, this is all outside the actual work process, or as outside as I can make it. I probably should just have the work scripts log rather than dump to IO.
sepp2k1 has quit [Quit: Leaving.]
<Aloysius1> Just Daemon-ize them.
<rickhull> FYI: select() is designed to monitor an array of IOs and return the one has output ready to process
<Aloysius1> But I kind of got into a thing where I said "Well, why should my scripts have to care whether they're run from the CLI or started by a process.)
<rickhull> so select() itself will block, so that would block any auxiliary processing
<rickhull> but it only blocks if all the IOs have nothing ready
tenderlove has quit [Remote host closed the connection]
<rickhull> it won't block reading from IO.a if IO.b is ready
rsync has joined #ruby-lang
<rickhull> er, i didn't explain that quite right
tenderlove has joined #ruby-lang
<Aloysius1> Well, I'd like the monitor to be able to start and stop the processes. So I could use that...but I'd have to run it in a separate thread?
rwk1 has joined #ruby-lang
<rickhull> as I see it, yeah. but maybe there is a clever way to avoid a thread
<rickhull> select() has a configurable timeout, so that would be one way to do it. but not clever
<Aloysius1> heh
<rickhull> so you could block on select for 1 second, if nothing has any IO for you
<Aloysius1> That gets close to what I'm doing without select, yeah.
<rickhull> then do any necessary processing, then try select again
<rickhull> but ugh
<rickhull> my approach would be to keep the main thread running, and have a worker thread for each IO, blocking
<rickhull> and dumping any messages into a shared queue
<rickhull> which the main thread can consume and process
wmoxam has quit [Ping timeout: 252 seconds]
<Aloysius1> *nod*
<zenspider> I wanted more regexp trainwreck
<rickhull> i'm a little concerned about what the main thread should be doing, and if it *ought* to block
<rickhull> if there is "nothing to do"
<rickhull> you mentioned start/stop processes
<rickhull> what would trigger it do that?
<Aloysius1> That would be user input.
<rickhull> ok, so the main thread needs to be responsive to user input
rwk1 has quit [Ping timeout: 276 seconds]
<rickhull> probably blocking on user input
tenderlove has quit [Ping timeout: 268 seconds]
<rickhull> so a user input thread, and a main thread
<rickhull> and the main thread blocks waiting for something to do
arooni-mobile has quit [Ping timeout: 276 seconds]
<rickhull> either process user input, or IO
hahuang65 has joined #ruby-lang
<Aloysius1> Yeah, that's probably sensible.
kstuart has quit [Quit: kstuart]
<rickhull> could get hairy. could also take the same approach with select
<rickhull> $stdin goes in the array of IOs
<Aloysius1> Ah--I hadn't thought of that. Trying to think how that would work. I was going to tie this into something like HighLine.
<rickhull> how comfortable are you with threads? understand the need for mutex/locking/synchronization?
<Aloysius1> Pretty comfortable. I started back with OS/2. :-P
<rickhull> cool. there are lots of pitfalls with the threaded approach, but easily manageable with the right awareness
andrewvos has joined #ruby-lang
<rickhull> understanding how select operates can be tricky
<rickhull> in this case, i might be tempted to try select
<Aloysius1> Well, I'm doing this mostly as window dressing so it's not a bad idea to experiment with it.
davemaurakis has joined #ruby-lang
mrsolo has quit [Quit: This computer has gone to sleep]
<Aloysius1> Ruby has a similar thread implementation to Smalltalk, I think? They're in-VM not the OS's, right?
<rickhull> yeah, green threads
<rickhull> jruby has OS threads
<rickhull> rbx too?
<brixen> mri 1.9+ has native threads with a global lock
<brixen> JRuby and Rubinius have native threads with no global lock
<rickhull> i use threads in ruby mainly to manage blocking reads. not for trying to maximize e.g. CPU usage
<rickhull> brixen: ah, thx
<Aloysius1> brixen: good to know
x0f_ has quit [Ping timeout: 245 seconds]
x0f has joined #ruby-lang
pskosinski has quit [Ping timeout: 240 seconds]
smook2 has joined #ruby-lang
mdedetrich has joined #ruby-lang
x0f has quit [Ping timeout: 264 seconds]
x0f has joined #ruby-lang
smook2 has quit [Ping timeout: 255 seconds]
arooni-mobile has joined #ruby-lang
<rickhull> Aloysius1: i tried to make a toy select example, and it doesn't work, heh
<rickhull> it's been a long time since i've messed with it
<Aloysius1> Heh.
<rickhull> one problem is that you don't know how to much to read
<rickhull> only that there is some data.
rwk1 has joined #ruby-lang
kstuart has joined #ruby-lang
<Aloysius1> Correct. And it could be wildly variable.
<rickhull> i'm sure there is some flavor of read that will handle that without blocking
<rickhull> but then you're back to the problem of buffering and maintaining state
<Aloysius1> Only that there MIGHT be some data, even.
<rickhull> since we're talking files, i assume you are using a newline boundary between "messages"
kstuart has quit [Client Quit]
<Aloysius1> Well, the data itself is passing through queues. It never gets to be a file. I could preface the messages with a length. But I'm trying to keep my scripts ignorant.
<rickhull> the last system i worked on involving these things did in fact use a 2 (or 4, depending) byte length header
<rickhull> and i implemented it with threads. so each thread logic was very simple
<rickhull> length = read(2)
<rickhull> msg = read(length)
<rickhull> do_something(msg)
<rickhull> pseudocode, obviously
arooni-mobile has quit [Ping timeout: 252 seconds]
andrewvos has quit [Ping timeout: 252 seconds]
<rickhull> blocking reads on everything
andrewvos has joined #ruby-lang
rwk1 has quit [Ping timeout: 240 seconds]
<Aloysius1> Very Pascal. ReXX, too, did that. I thought it was slick but, no, we gotta have terminating nulls.
<rickhull> yeah, seen djb netstrings?
<Aloysius1> Nope.
justinmburrous has joined #ruby-lang
<Aloysius1> Ha. Looks cool.
<rickhull> so i think you can use readpartial with select
<rickhull> select guarantees it won't block
<rickhull> and you can slurp whatever is there with readpartial
<drbrain> select only guarantees you can read 1 byte
<rickhull> readpartial(255) when 1 byte is available
<drbrain> and, maybe not even that
<rickhull> should return that bye
<Aloysius1> Yeah, I started with readpartial but had some trouble. I'll try it with select.
<drbrain> yeah
<drbrain> well, no, you should get one byte
<rickhull> yeah, that's what i was saying, i think
<rickhull> it seems the semantics here are that you never know when to stop reading
<rickhull> so you're basically buffering a big blob
<rickhull> have to decide what the granularity is, to multiplex or otherwise collect the outputs
tomzx has left #ruby-lang [#ruby-lang]
Asher has quit [Ping timeout: 260 seconds]
Asher1 has joined #ruby-lang
kstuart has joined #ruby-lang
kstuart has quit [Client Quit]
<rickhull> otherwise, if you can rely on a newline, by convention, say
<rickhull> i'd probably be tempted to call gets within a thread
<rickhull> then your message granularity is lines