apeiros changed the topic of #ruby-lang to: Ruby 2.0.0-p247: http://ruby-lang.org (Ruby 1.9.3-p448) || Paste >3 lines of text on http://gist.github.com
Nisstyre-laptop has joined #ruby-lang
bradsmith has joined #ruby-lang
tanema has quit [Remote host closed the connection]
tkuchiki has joined #ruby-lang
tkuchiki has quit [Read error: Connection reset by peer]
tkuchiki_ has joined #ruby-lang
brushbox has joined #ruby-lang
marr has quit [Ping timeout: 240 seconds]
hogeo has joined #ruby-lang
tkuchiki_ has quit [Ping timeout: 240 seconds]
benanne has quit [Quit: kbai]
Mon_Ouie has quit [Ping timeout: 264 seconds]
ssb123 has quit [Remote host closed the connection]
_santana has joined #ruby-lang
_santana is now known as santana
nathanstitt has joined #ruby-lang
kurko_ has quit [Ping timeout: 256 seconds]
kurko_ has joined #ruby-lang
brushbox has quit [Quit: Leaving.]
kurko_ has quit [Quit: Computer has gone to sleep.]
bradsmith has quit [Remote host closed the connection]
bradsmith has joined #ruby-lang
bradsmith has quit [Read error: Connection reset by peer]
bradsmith has joined #ruby-lang
saarinen has joined #ruby-lang
tanema has joined #ruby-lang
tanema has quit [Remote host closed the connection]
bradsmith has quit [Remote host closed the connection]
bradsmith has joined #ruby-lang
bradsmith has quit [Remote host closed the connection]
santana has quit [Remote host closed the connection]
saarinen has quit [Quit: saarinen]
woollyams has joined #ruby-lang
retro|cz has joined #ruby-lang
saarinen has joined #ruby-lang
tkuchiki has joined #ruby-lang
JoshuaPaling has joined #ruby-lang
nathanstitt has quit [Quit: I growing sleepy]
nathanstitt has joined #ruby-lang
tkuchiki has quit [Remote host closed the connection]
postmodern has joined #ruby-lang
postmodern has quit [Client Quit]
postmodern has joined #ruby-lang
mistym has joined #ruby-lang
ssb123 has joined #ruby-lang
ssb123 has quit [Ping timeout: 245 seconds]
nathanstitt has quit [Quit: I growing sleepy]
vjacob has quit [Quit: Leaving]
nathanstitt has joined #ruby-lang
tomzx_mac has joined #ruby-lang
Senjai has joined #ruby-lang
richardburton has joined #ruby-lang
richardburton has quit [Client Quit]
Domon has joined #ruby-lang
saarinen has quit [Quit: saarinen]
Sammidysam has joined #ruby-lang
<Sammidysam> Is there an easy way to use Rake to build a Ruby gem (i.e. do the equivalent of gem build blah.gemspec in Rake)?
<Sammidysam> Actually, I don't need Rake to do that at all.
<Sammidysam> Never mind.
kstuart has quit [Read error: Operation timed out]
Sammidysam has quit [Client Quit]
Domon has quit [Remote host closed the connection]
shinnya has quit [Ping timeout: 276 seconds]
bougyman has quit [Ping timeout: 276 seconds]
thepumpkin has quit [Remote host closed the connection]
Domon has joined #ruby-lang
mrpot4to_ has joined #ruby-lang
mrpot4to_ has quit [Read error: Connection reset by peer]
MrPoT4tO has joined #ruby-lang
bougyman has joined #ruby-lang
bougyman has joined #ruby-lang
pkrnj has joined #ruby-lang
wallerdev has quit [Quit: wallerdev]
_jpb__ has joined #ruby-lang
<drbrain> sstrickl: Gem::PackageTask
<drbrain> oops, tab complete fail
mistym has quit [Remote host closed the connection]
nathanstitt has quit [Quit: I growing sleepy]
ssb123 has joined #ruby-lang
wallerdev has joined #ruby-lang
thepumpkin has joined #ruby-lang
<zzak> drbrain: i wonder if we should nodoc lib/test/*
mistym has joined #ruby-lang
<zzak> "This is just a compatibility layer, use minitest"
<zzak> i will ask sora
<soraher> hi
<soraher> umm
<zzak> soraher: こんにちわ!
<soraher> こんにちは!
<zzak> は
<soraher> ("こんにちは" and "こんにちわ" pronounced samely)
<zzak> soraher: ha wa
ssb123 has quit [Remote host closed the connection]
<soraher> は can pronounce "wa" or "ha"
<soraher> zzak: okay, the question is "can we nodoc lib/test/unit," right?
<zzak> わどうけn
<zzak> わどうけん
<zzak> soraher: はい
<soraher> zzak: I can't agree to remove existing docs for existing users, but I can agree writing "this is just a compatibility layer ..."
<soraher> (this may help you about は and わ: http://japanese.about.com/blqow2.htm)
<zzak> see "stats"
<soraher> wow
<soraher> umm... sorry, I have to go out for the lunch; I'll see later, can you file a ticket?
<zzak> soraher: ok! thank you!
arooni-mobile__ has joined #ruby-lang
arooni-mobile has joined #ruby-lang
bri is now known as bryno
bryno is now known as bri
<zzak> soraher: i am getting sleepy, so please reply on ticket
postmodern has quit [Quit: Leaving]
postmodern has joined #ruby-lang
wallerdev has quit [Quit: wallerdev]
wallerdev has joined #ruby-lang
_jpb__ has quit [Ping timeout: 246 seconds]
kurko_ has joined #ruby-lang
_jpb__ has joined #ruby-lang
<erikh> does anyone remember the name of the linux fs events api?
<erikh> inotify
<erikh> nevermind
<drbrain> OS X took the good name, fseventsd
<erikh> heh
<erikh> doing a deployment systemw ith it
<erikh> fully orchestrated without any http whatsoever
Nisstyre-laptop has quit [Quit: Leaving]
kurko_ has quit [Quit: Computer has gone to sleep.]
sstrickl has quit [Quit: sstrickl]
<erikh> brb legally changing my name to "Erik the Automator"
postmodern has quit [Quit: Leaving]
zorg24 has quit [Ping timeout: 240 seconds]
postmodern has joined #ruby-lang
postmodern has quit [Quit: Leaving]
postmodern has joined #ruby-lang
_jpb__ has quit [Ping timeout: 276 seconds]
hahuang61 has joined #ruby-lang
saarinen has joined #ruby-lang
rikai_ has quit [Ping timeout: 240 seconds]
rikai_ has joined #ruby-lang
spuk_ has quit [Quit: Reconnecting]
spuk has joined #ruby-lang
spuk has quit [Changing host]
spuk has joined #ruby-lang
Bosox20051 has joined #ruby-lang
Bosox20051 has quit [Remote host closed the connection]
postmodern has quit [Quit: Leaving]
postmodern has joined #ruby-lang
<freedrull> that sounds sweet
<freedrull> just detect new git commits through inotify or something?
wallerdev has quit [Quit: wallerdev]
MrPoT4tO has quit [Read error: Connection reset by peer]
postmodern has quit [Quit: Leaving]
nneko001__ has joined #ruby-lang
apeiros has quit [Remote host closed the connection]
apeiros has joined #ruby-lang
macmartine has joined #ruby-lang
havenwood has joined #ruby-lang
poga_ has joined #ruby-lang
poga has quit [Ping timeout: 240 seconds]
postmodern has joined #ruby-lang
tonni has quit [Remote host closed the connection]
hahuang61 has quit [Read error: Connection reset by peer]
apeiros has quit [Remote host closed the connection]
apeiros has joined #ruby-lang
hahuang61 has joined #ruby-lang
macmartine has quit [Quit: Computer has gone to sleep.]
heftig has quit [Ping timeout: 245 seconds]
postmodern has quit [Quit: Leaving]
postmodern has joined #ruby-lang
riotbit has joined #ruby-lang
rickhull has joined #ruby-lang
apeiros has quit [Ping timeout: 260 seconds]
jg_ has joined #ruby-lang
hahuang61 has quit [Ping timeout: 260 seconds]
thebastl has joined #ruby-lang
_jpb__ has joined #ruby-lang
<matti> soraher: These two particles in Japanese can be the most confusing ones ;)
<soraher> yes, especially for learners...
<matti> Yeah.
poga_ has quit [Remote host closed the connection]
<matti> I remember struggling with them when I was learning and was quite new to Japanese.
<matti> But then... add -masu et al form and Keigo and it gets even funniner - languae wise.
<matti> language*
<matti> :)
_jpb__ has quit [Ping timeout: 240 seconds]
<matti> Coffee time!
riotbit has quit [Quit: riotbit]
seoaqua has joined #ruby-lang
poga has joined #ruby-lang
_jpb_ has quit [Remote host closed the connection]
pkrnj has quit [Quit: Textual IRC Client: www.textualapp.com]
riotbit has joined #ruby-lang
tomzx_mac has quit [Ping timeout: 264 seconds]
apeiros has joined #ruby-lang
hahuang61 has joined #ruby-lang
hhatch has joined #ruby-lang
vlad_starkov has joined #ruby-lang
yfeldblum has quit [Ping timeout: 260 seconds]
vlad_starkov has quit [Ping timeout: 264 seconds]
vlad_starkov has joined #ruby-lang
scmx has joined #ruby-lang
<yorickpeterse> morning
vlad_starkov has quit [Ping timeout: 256 seconds]
richardburton has joined #ruby-lang
mislav has joined #ruby-lang
yxhuvud has quit [Ping timeout: 264 seconds]
<erikh> freedrull: nah, build containers and signal a pull from deployment machines
<erikh> deployment machines pull the container, and kick the old one out and start the new one
<erikh> kind of like how heroku works more or less
sr78ger has joined #ruby-lang
sr78ger has quit [Client Quit]
<erikh> just with files, inotify and ssh
<erikh> to keep it simple.
JoshuaPaling has quit [Quit: Textual IRC Client: www.textualapp.com]
postmodern has quit [Quit: Leaving]
<erikh> http://ascii.io/a/4695 is the container build process -- deployment I'll probably tackle tomorrow
<erikh> there's a rakefile in the repo it pulls that has additional build instructions -- similar to a buildpack.
hahuang61 has quit [Ping timeout: 240 seconds]
postmodern has joined #ruby-lang
dc5ala has joined #ruby-lang
woollyams has quit [Ping timeout: 252 seconds]
<erikh> maybe i'll just use etcd, seems like it does what i need
vlad_starkov has joined #ruby-lang
vlad_sta_ has joined #ruby-lang
vlad_starkov has quit [Ping timeout: 264 seconds]
hahuang61 has joined #ruby-lang
dagobah has joined #ruby-lang
emiltin has joined #ruby-lang
mistym has quit [Remote host closed the connection]
mbj has joined #ruby-lang
mistym has joined #ruby-lang
saarinen has quit [Quit: saarinen]
saarinen has joined #ruby-lang
saarinen has quit [Client Quit]
postmodern has quit [Quit: Leaving]
emiltin has quit [Quit: Computer has gone to sleep.]
ledestin has quit [Ping timeout: 248 seconds]
postmodern has joined #ruby-lang
Pupeno has joined #ruby-lang
Pupeno has joined #ruby-lang
arooni-mobile has quit [Ping timeout: 248 seconds]
arooni-mobile__ has quit [Ping timeout: 264 seconds]
heftig has joined #ruby-lang
<yorickpeterse> check this out
<yorickpeterse> good_comment = r[2] && (r[2].css('img').empty? || (r[2].css('img')[0] && r[2].css('img')[0].attr('src') == '/Img/valuation/Comments_positive.gif')) && r[2].at('td')
<yorickpeterse> it's a oneliner!
* yorickpeterse would slap yorickpeterse, but is not being violent today
<yorickpeterse> :<
<maloik> it's over (however many characters vim preachers use as their max line length)
JohnBat26 has joined #ruby-lang
JohnBat26 has quit [Client Quit]
JohnBat26 has joined #ruby-lang
mislav has quit [Remote host closed the connection]
bousquet has joined #ruby-lang
mbj has quit [Ping timeout: 264 seconds]
emiltin has joined #ruby-lang
mbj has joined #ruby-lang
arBmind has joined #ruby-lang
lsegal has quit [Quit: Quit: Quit: Quit: Stack Overflow.]
cads has quit [Ping timeout: 246 seconds]
marr has joined #ruby-lang
jxie has quit [Quit: leaving]
richardburton has quit [Quit: Leaving.]
<erikh> yorickpeterse: you could probably walk r[2].css('img') with inject
<erikh> and just reduce it to the closest result
<yorickpeterse> note that there's about 15 lines of code like that
<erikh> then validate if that's empty or the gif
<yorickpeterse> I'm not going to touch it
* erikh sighs
<yorickpeterse> it's going to go out of teh door anyway
<yorickpeterse> * the
postmodern has quit [Ping timeout: 246 seconds]
sascha_d has quit [Quit: obai]
mistym has quit [Remote host closed the connection]
solars has joined #ruby-lang
Mon_Ouie has joined #ruby-lang
<maloik> someone's been drilling here ever since I got into the office
<maloik> I think I'll be deaf by the end of the day
<maloik> if not by the drilling then by trying to make my music go louder
amerine has joined #ruby-lang
mbj has quit [Read error: Connection reset by peer]
<ljarvis> moin
arBmind has quit [Quit: Leaving.]
<maloik> o/
<yorickpeterse> so a while ago there was this self hosted feed reader (I think in Ruby) which made the frontpage on HN, does anybody remember the name of it?
<yorickpeterse> Because fuck feedly for removing SSL from the free plan, and screw paying for it
<ljarvis> stringer?
<maloik> yea thats the one a colleague uses as well
<yorickpeterse> that's the one, ta
julweber has joined #ruby-lang
<yorickpeterse> oh nice, and it's Sinatra too
<yorickpeterse> that means I have to use a slightly smaller leash instead of the big one for Rails
mbj has joined #ruby-lang
dc5ala has quit [Quit: Ex-Chat]
arBmind has joined #ruby-lang
richardburton has joined #ruby-lang
Senjai has quit [Ping timeout: 264 seconds]
kuja has quit [Ping timeout: 264 seconds]
emiltin has quit [Quit: Computer has gone to sleep.]
kuja has joined #ruby-lang
richardburton has quit [Ping timeout: 264 seconds]
mbj has quit [Remote host closed the connection]
mbj has joined #ruby-lang
banister_ has quit [Remote host closed the connection]
Oloryn_lt2 has joined #ruby-lang
Forgetful_Lion has joined #ruby-lang
GeissT has quit [Ping timeout: 248 seconds]
mbj has quit [Quit: leaving]
Oloryn_lt2 has quit [Ping timeout: 256 seconds]
bryanl has quit [Ping timeout: 264 seconds]
bryanl has joined #ruby-lang
Kabaka has quit [Remote host closed the connection]
TvL2386 has joined #ruby-lang
emiltin has joined #ruby-lang
Kabaka has joined #ruby-lang
Newbie0086 has joined #ruby-lang
julweber has quit [Remote host closed the connection]
emiltin has quit [Quit: Computer has gone to sleep.]
heftig has quit [Ping timeout: 245 seconds]
sjltaylor has joined #ruby-lang
barttenbrinke has joined #ruby-lang
<ljarvis> fuck you coffeescript
postmodern has joined #ruby-lang
<ddfreyne> Mmmm... coffee...
<darix> teascript would be better
<yorickpeterse> I was just about to suggest that
kstuart has joined #ruby-lang
banister has joined #ruby-lang
TvL2386 has quit [Quit: Ex-Chat]
rickruby has quit [Ping timeout: 248 seconds]
<maloik> Trying to debug something where I can't File.read a file, is there any reason ruby could raise a no such file error other than the path being wrong ?
<maloik> file permissions seem to be okay as well
jxie has joined #ruby-lang
Newbie0086 has quit [Quit: 离开]
rickruby has joined #ruby-lang
vlad_sta_ has quit [Remote host closed the connection]
sjltaylor has quit [Remote host closed the connection]
richardburton has joined #ruby-lang
dernise_ has quit [Ping timeout: 256 seconds]
<maloik> oh god
<maloik> oh god oh god oh god
<maloik> it's monday alright....
rickruby has quit [Remote host closed the connection]
<maloik> 20 minutes gone because I just didn't see the fucking file is called paid_order and not order_paid
<yorickpeterse> haha
zzak has quit [Ping timeout: 268 seconds]
<yorickpeterse> I haven't had my Monday morning derp yet
sjltaylor has joined #ruby-lang
<yorickpeterse> which is more frightening
richardburton has quit [Ping timeout: 248 seconds]
minivan has joined #ruby-lang
rickruby has joined #ruby-lang
<maloik> I get so angry, productivity just takes a nosedive
sindork has quit [Quit: No Ping reply in 180 seconds.]
onewheelskyward has quit [Ping timeout: 264 seconds]
<maloik> good thing its almost lunchtime, can go take a walk to the store
sindork has joined #ruby-lang
skade has joined #ruby-lang
banister has quit [Remote host closed the connection]
onewheelskyward has joined #ruby-lang
sindork has quit [Client Quit]
onewheelskyward has quit [Max SendQ exceeded]
Guest44466 has quit [Ping timeout: 248 seconds]
sindork has joined #ruby-lang
vlad_starkov has joined #ruby-lang
onewheelskyward has joined #ruby-lang
relix has joined #ruby-lang
Guest98488 has joined #ruby-lang
onewheelskyward has quit [Max SendQ exceeded]
zzak has joined #ruby-lang
rickhull has quit [Quit: Leaving.]
onewheelskyward has joined #ruby-lang
sindork has quit [Quit: No Ping reply in 180 seconds.]
sindork has joined #ruby-lang
bousquet has quit [Remote host closed the connection]
zzak has quit [Ping timeout: 246 seconds]
scottschecter has quit [Ping timeout: 260 seconds]
Guest98488 has quit [Ping timeout: 246 seconds]
ddd_ has joined #ruby-lang
seoaqua has quit [Ping timeout: 264 seconds]
zzak has joined #ruby-lang
havenwood has quit [Remote host closed the connection]
<maloik> *I-have-no-idea-what-im-doing-dog-picture* Does anyone know how to render an ActionMailer (or any type of) view that includes locals and a partial being rendered as a string ?
<maloik> I'm replacing an action mailer with a model of my own to make a call to a ticketing API
<maloik> erb probably won't work because of the partial, as far as I can tell, and I'm having trouble figuring out what else would work... tried a number of ActionView and ActionController classes/methods but no luck so far
scottschecter has joined #ruby-lang
Perry has quit [Ping timeout: 240 seconds]
ledestin has joined #ruby-lang
<spike|spiegel> maloik: it require some gutting, and this isn't the place for it... ask #rubyonrails... also, if you want just the rendered output.. it's available in mail object at some "raw_" method
<maloik> I'll take a look at that
Perry has joined #ruby-lang
shtirlic has quit [Ping timeout: 264 seconds]
shtirlic has joined #ruby-lang
julweber has joined #ruby-lang
onewheelskyward has quit [Max SendQ exceeded]
onewheelskyward has joined #ruby-lang
skade has quit [Quit: Computer has gone to sleep.]
Dernise has joined #ruby-lang
tkuchiki has joined #ruby-lang
richardburton has joined #ruby-lang
realDAB has joined #ruby-lang
matled- has joined #ruby-lang
hogeo has quit [Ping timeout: 240 seconds]
matled has quit [Read error: Connection reset by peer]
matled- is now known as matled
linc01n has quit [Ping timeout: 240 seconds]
richardburton has quit [Ping timeout: 264 seconds]
tkuchiki has quit [Remote host closed the connection]
linc01n has joined #ruby-lang
tanema has joined #ruby-lang
tkuchiki has joined #ruby-lang
tkuchiki has quit [Read error: Connection reset by peer]
tkuchiki has joined #ruby-lang
tkuchiki_ has joined #ruby-lang
tkuchiki has quit [Read error: Connection reset by peer]
Domon has quit [Remote host closed the connection]
Domon has joined #ruby-lang
tkuchiki has joined #ruby-lang
tkuchiki_ has quit [Read error: Connection reset by peer]
MaddinXx has joined #ruby-lang
Domon has quit [Ping timeout: 256 seconds]
tkuchiki has quit [Ping timeout: 264 seconds]
<Dernise> is double fork the only way to keep a process running even if I close it's parent?
Forgetful_Lion_ has joined #ruby-lang
mitchty has quit [Ping timeout: 240 seconds]
heftig has joined #ruby-lang
Forgetful_Lion has quit [Ping timeout: 240 seconds]
mitchty has joined #ruby-lang
vlad_starkov has quit [Remote host closed the connection]
hhatch has quit [Ping timeout: 264 seconds]
hhatch has joined #ruby-lang
sjltaylor has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
poga has quit [Remote host closed the connection]
Pupeno has quit [Remote host closed the connection]
realDAB has quit [Quit: realDAB]
havenwood has joined #ruby-lang
skade has joined #ruby-lang
havenwood has quit [Ping timeout: 240 seconds]
<manveru> nohup works too i think
realDAB has joined #ruby-lang
ldnunes has joined #ruby-lang
postmodern has quit [Quit: Leaving]
banister has joined #ruby-lang
Pupeno has joined #ruby-lang
Pupeno has joined #ruby-lang
Pupeno has quit [Changing host]
arBmind1 has joined #ruby-lang
arBmind has quit [Ping timeout: 240 seconds]
poga has joined #ruby-lang
JoshuaPaling has joined #ruby-lang
<andrewvos> Erm
<andrewvos> I'm parsing a doc with nokogiri
<andrewvos> And I have a sccript that outputs stuff
<andrewvos> At some point it stops writing out
<yorickpeterse> ok
<andrewvos> And the text I can see has "it's" with a weird diamon looking character (like in a pack of cards)
<andrewvos> And in vim this character looks like ^R
<andrewvos> WAT IS HAPPENING
<yorickpeterse> encodings?
<andrewvos> xml doc specifies utf 8
<andrewvos> but I'm using SAX by the way
kurko_ has joined #ruby-lang
<yorickpeterse> The XML tag specifying UTF8 means fuck all
<yorickpeterse> I've had plenty of cases where it said "Hi I'm UTF8" but it was sending ASCII 8bit
<andrewvos> Hmm, any ideas then?
<yorickpeterse> what happens if you force the encoding to UTF8/ASCII?
<andrewvos> How would I do that?
<yorickpeterse> call #force_encoding
JoshuaPaling has quit [Quit: Textual IRC Client: www.textualapp.com]
<yorickpeterse> >> "장".force_encoding(Encoding::ASCII)
<eval-in> yorickpeterse => "\xEC\x9E\xA5" (https://eval.in/42804)
<yorickpeterse> >> "\xEC\x9E\xA5".force_encoding(Encoding::UTF8)
<eval-in> yorickpeterse => uninitialized constant Encoding::UTF8 (NameError) ... (https://eval.in/42805)
<yorickpeterse> >> "\xEC\x9E\xA5".force_encoding(Encoding::UTF_8)
<eval-in> yorickpeterse => "장" (https://eval.in/42806)
<yorickpeterse> fuck you Ruby
<andrewvos> yorickpeterse: I don't really have that option inside the sax parser
<yorickpeterse> eh yes you do, in the `characters` method
<yorickpeterse> or just cast it before parsing
richardburton has joined #ruby-lang
<andrewvos> yorickpeterse: But the point is the parser has broken and doesn't parse anythign else properly after this point, I think
<yorickpeterse> Hence you try to cast it to the right encoding before you parse it
<yorickpeterse> just to see if that helps anything
<andrewvos> Hm
<andrewvos> I don't actually parse the stuff that comes into characters(s)
<yorickpeterse> input = 'your disgusting pile of wtf'; parse(input.force_encoding(...))
<andrewvos> I just put it in a string
<andrewvos> I think the issue is nokogiri doesn't parse nodes correctly after that
richardburton has quit [Ping timeout: 240 seconds]
breakingthings has joined #ruby-lang
GarethAdams has quit [Ping timeout: 264 seconds]
Sammidysam has joined #ruby-lang
Banistergalaxy has quit [Ping timeout: 264 seconds]
corecode has joined #ruby-lang
<corecode> is there a way to unpack an array with just one element?
poga has quit [Ping timeout: 246 seconds]
Banistergalaxy has joined #ruby-lang
<corecode> i.e., a,b = [1,2], but for just a single element: a = [1]
<corecode> should i just use a, _ = [1]?
<corecode> but that seems... a bit odd
vlad_starkov has joined #ruby-lang
<corecode> oh, with comma? a, = [1]
<corecode> creepy
GarethAdams has joined #ruby-lang
<ljarvis> ...
<ljarvis> you're doing this for initializing a new array?
<ljarvis> well, obviously not because that makes no sense
<ljarvis> so, a = arr[0]
<corecode> no, results from unpack
<corecode> before i had a,b = data.unpack('CC')
<andrewvos> yorickpeterse: So worked out hwat's happening. As soon as nokogiri encounters ^R it thinks the rest of the document is text inside a node
<andrewvos> Ignores <> characters etc
<andrewvos> And just calls #characters forever
<corecode> now i only have a single byte, so a, = data.unpack('C')
<andrewvos> This is making me sad
<andrewvos> Plus the file is 13gb
<yorickpeterse> andrewvos: wat
<yorickpeterse> wat
<ljarvis> corecode: unpack returns an array, unpack('C').first
<yorickpeterse> that sounds like a bug
<andrewvos> wat wat wat
<andrewvos> waaaaat
<ljarvis> >> "abc".unpack('C')[0]
<eval-in> ljarvis => 97 (https://eval.in/42807)
<yorickpeterse> ljarvis: that's not human readable
<yorickpeterse> you need #first_element_of_this_array
<ljarvis> ur not human readable
<yorickpeterse> No, I dazzle people too much
<ljarvis> like a rainbow?
* yorickpeterse throws his hair back
<yorickpeterse> which is pretty hard since my hair is not that long
<ljarvis> ok bieber
<yorickpeterse> look who's talking
<corecode> ljarvis: yes, but you see the broken symmetry there?
<ljarvis> isn't that the bieber calling the bieber bieber
<ljarvis> corecode: no
<corecode> ljarvis: how do you unpack two elements?
<ljarvis> corecode: you want the first element and to ignore the rest
<ljarvis> corecode: you're not unpacking two elements
<corecode> yes, but say you wanted
vlad_starkov has quit [Ping timeout: 248 seconds]
<ljarvis> then say you want that
<ljarvis> if you wanted two, I would write it differently
<corecode> how?
realDAB has quit [Quit: realDAB]
<ljarvis> a, b = foo.unpack('CC').first(2)
<ljarvis> why fetch more than you need
<ljarvis> yes you can do a, b, _ = ...
<corecode> CC only returns 2 elements anyways
<corecode> so no need for .first(2)
<ljarvis> it's a matter of choice, I choose to not be a dick
<ljarvis> that was an example
<corecode> sure
<ljarvis> a, b = foo.unpack('CC').first(20000000000)
<ljarvis> that ruined my point
<corecode> but we could leave away the first, right?
<ljarvis> yes
<ljarvis> >> a, b = [1,2,3]; [a, b]
<eval-in> ljarvis => [1, 2] (https://eval.in/42808)
<corecode> right.
<corecode> so if i want to just get the (only) element from the unpack() array result
<corecode> it breaks the symmetry if i use .first
<ljarvis> there is no symmetry, you only want 1 element
<corecode> but just appending a comma does the trick
<ljarvis> sigh
<ljarvis> ok
<corecode> yes, there is a symmetry, even tho you might not see it
vlad_starkov has joined #ruby-lang
<ljarvis> right-o
<andrewvos> Nokogiri::XML::Reader will work with a 13gb file?
<andrewvos> Seems to require you pass in the text of the file
Banistergalaxy has quit [Ping timeout: 240 seconds]
<andrewvos> Not a file name or anything like that
<ljarvis> correct
<ljarvis> or a file handle
<andrewvos> ljarvis: So it will stream read?
Banistergalaxy has joined #ruby-lang
<andrewvos> ljarvis: Like, not load all that shit into memory?
anonymuse has joined #ruby-lang
<ljarvis> andrewvos: correct
<andrewvos> ljarvis: Thanks dude
<ljarvis> andrewvos: np (fwiw xmlreader IS a streaming API in itself)
Sammidysam has left #ruby-lang ["Leaving"]
scampbell has joined #ruby-lang
yfeldblum has joined #ruby-lang
tanema has quit [Remote host closed the connection]
<maloik> Anyone aware of any particularities with -%> erb tags? I'm rendering using ERB.new(...).result, and if my template contains those it's throwing errors
<maloik> they used to work fine when used by actionmailer
<ljarvis> rails uses erubis
<maloik> fml
<yorickpeterse> that took longer than expected
<yorickpeterse> photoshop with a trackball is hard
<yorickpeterse> well, the gimp in this case (even worse)
dernise_ has joined #ruby-lang
<ddfreyne> NICE HAIR.
<ljarvis> wow
<ljarvis> gb2work
<yorickpeterse> hahaha
wallerdev has joined #ruby-lang
Dernise has quit [Ping timeout: 248 seconds]
<yorickpeterse> oh, apparently there's already a perfect bieber fro cutout on /r/cutouts
<ljarvis> oh no
<yorickpeterse> hahaha
<maloik> I'm surprised there's no (easily findable) bieberify tool
<maloik> rails rumble is getting closer... there's no way I won't win with that
<yorickpeterse> you can do it with websites though
JohnBat26 has quit [Quit: KVIrc 4.3.1 Aria http://www.kvirc.net/]
<yorickpeterse> oh, bieber.ly no longer exists
<maloik> wasnt that the url shortener?
<yorickpeterse> No, it put some picture of justin bieber as an overlay
<ljarvis> who wouldn't want that
JohnBat26 has joined #ruby-lang
<maloik> jarvis.ly
<maloik> do you own that domain ?
<maloik> if not: WHY NOT ???
banister has quit [Remote host closed the connection]
<yorickpeterse> So HTTP API question:
<yorickpeterse> do I just return a raw set of Hash instances (the results of JSON.parse()) or do I return a somewhat saner dataset?
<yorickpeterse> which would basically be a set of custom classes with the exact same data
<yorickpeterse> inb4 Hashie::Mash
hashkey_ has joined #ruby-lang
Kabaka has quit [Remote host closed the connection]
<yorickpeterse> Hashie::Mash is the perfect example of a schizophrenic data structure
hashkey is now known as Guest20842
Guest20842 has quit [Killed (hubbard.freenode.net (Nickname regained by services))]
hashkey_ is now known as hashkey
<yorickpeterse> "ohhh god I'm a Hash...No an OpenStruct....No! A Hash with indifferent access!...NO! ALL OF IT!"
hashkey has quit [Client Quit]
tanema has joined #ruby-lang
hashkey has joined #ruby-lang
Kabaka has joined #ruby-lang
pipework has quit [Remote host closed the connection]
jbsan has joined #ruby-lang
<ljarvis> why wouldn't you just send the json?
<ljarvis> maloik: I do not
tkuchiki has joined #ruby-lang
corecode has left #ruby-lang ["ERC Version 5.3 (IRC client for Emacs)"]
tomzx_mac has joined #ruby-lang
tkuchiki has quit [Read error: Connection reset by peer]
tkuchiki_ has joined #ruby-lang
w00x has joined #ruby-lang
<yorickpeterse> ljarvis: well for example, this JSON returns dates. I'm 100% sure this will have to be parsed to a Time object at some point, so why not make that easier by doing it for the dev?
<yorickpeterse> (that's just one small example)
richardburton has joined #ruby-lang
<ljarvis> sure, but if you're then transferring that back over http it would be back to json for me
<yorickpeterse> Oh, it's not being kicked around over HTTP after the initial request
<yorickpeterse> it's a read-only API that we'll consume, then we do some magic and store the data in a DB
<yorickpeterse> (basically)
<ljarvis> I believe this calls for a MultipleTypeHashFactoryBuilder
tkuchiki_ has quit [Ping timeout: 276 seconds]
<yorickpeterse> WithIndifferentAccess
<ljarvis> as always
tdm00 has joined #ruby-lang
richardburton has quit [Ping timeout: 256 seconds]
thebastl has quit [Read error: Operation timed out]
ssb123 has joined #ruby-lang
wallerdev has quit [Quit: wallerdev]
relix has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
wmoxam has joined #ruby-lang
MaddinXx has quit [Remote host closed the connection]
<andrewvos> PCDATA invalid Char value 25
<andrewvos> /Users/andrewvos/.gem/ruby/1.9.3/gems/nokogiri-1.6.0/lib/nokogiri/xml/reader.rb:106:in `read'
<andrewvos> Ok so now finally I get an error
<andrewvos> The parser doesn't just continue for forever
<andrewvos> So I can't exactly just replace all occurences of this in the xml file
<andrewvos> Because it's humungous
<andrewvos> And I can't use Reader or SAX
<andrewvos> The in memory parser works
<ljarvis> that wouldn't make a difference, it's a libxml issue, not nokogiri
tonni has joined #ruby-lang
<andrewvos> Well the normal Nokogiri::XML parser works
<ljarvis> that's what you should use
banister has joined #ruby-lang
<andrewvos> ljarvis: XML file is gigantic
<ljarvis> sure but XML::Document cares about stuff like encoding
<ljarvis> XML::Reader is much lower level
<andrewvos> Ye
<ljarvis> the Document class uses its own encoding reader
<andrewvos> Well I can't exactly purchase 20gigs of ram for my mac
<ericwood> a SAX parser shouldn't use that much memory
<ericwood> how large is the dataset?
<andrewvos> Yes I tried the sax parser, it crashes
<ericwood> dang
<andrewvos> I tried the Reader parser, it crashes
<andrewvos> I tried in memory (with a trimmed down xml file), and it works
<ericwood> >.>
hogeo has joined #ruby-lang
elia has joined #ruby-lang
rwilcox has joined #ruby-lang
cored has joined #ruby-lang
<ljarvis> andrewvos: what are you doing with the data?
havenwood has joined #ruby-lang
marr has quit [Read error: Connection reset by peer]
<andrewvos> ljarvis: Nothing at the moment. Was going to store it in elasticsearch
<andrewvos> Is there some way I can wrap the File.open call and replace any non parseable characters?
madumo has joined #ruby-lang
<ljarvis> andrewvos: you can implement your own reader
<ljarvis> pretty easily
MaddinXx has joined #ruby-lang
havenwood has quit [Ping timeout: 260 seconds]
Banistergalaxy has quit [Ping timeout: 240 seconds]
<ljarvis> and send that into a sax parser instance
Banistergalaxy has joined #ruby-lang
<ljarvis> and as you're reading node by node, you can store the data somewhere
ledestin has quit [Quit: ledestin]
wallerdev has joined #ruby-lang
tonni has quit [Remote host closed the connection]
elia has quit [Ping timeout: 240 seconds]
<andrewvos> ljarvis: Any idea where I would start?
<andrewvos> ljarvis: I kind of have no idea how to do that
tomzx_mac has quit [Ping timeout: 264 seconds]
<andrewvos> ljarvis: Like what methods do I have to implement
<ljarvis> andrewvos: check out Nokogiri::XML::SAX::Document
minivan has quit [Read error: No route to host]
<ljarvis> andrewvos: You can inherit this class for your own, then override what you need
<andrewvos> ljarvis: Kinda want to use Reader now though
<ljarvis> I'd probably use Reader too, but someone put some herps in your derps
<andrewvos> ljarvis: I get the same error with the SAX parser
pipework has joined #ruby-lang
<andrewvos> ljarvis: Well, I don't even get an error it just fucking breaks and does some crazy shit
<ljarvis> andrewvos: of course, but the sax parser allows you to check for stuff like this at runtime, that's the advantage
elia has joined #ruby-lang
<andrewvos> I was just going to implement my own io object
<andrewvos> That wraps file.open
<ljarvis> sure
vlad_starkov has quit [Remote host closed the connection]
<ljarvis> andrewvos: have you found the offending chars?
poga has joined #ruby-lang
<andrewvos> ljarvis: yep
<ljarvis> andrewvos: what are they?
<andrewvos> Not sure really
<ljarvis> do you have a chunk of xml with them in?
<andrewvos> itPeter: s
<andrewvos> When I paste it I get that
<andrewvos> that obviously should be "it's"
<ljarvis> oO
<andrewvos> Going to go get coffee FML
maxmanders has joined #ruby-lang
Mon_Ouie has quit [Ping timeout: 240 seconds]
nathanstitt has joined #ruby-lang
vlad_starkov has joined #ruby-lang
Y_Ichiro_ has joined #ruby-lang
Y_Ichiro_ has joined #ruby-lang
MartynKeigher2 has joined #ruby-lang
kirin` has quit [Disconnected by services]
linc01n has quit [Ping timeout: 240 seconds]
MartynKeigher has quit [Ping timeout: 240 seconds]
linc01n has joined #ruby-lang
Y_Ichiro has quit [Read error: Connection reset by peer]
kirin` has joined #ruby-lang
wmoxam_ has joined #ruby-lang
wmoxam has quit [Write error: Connection reset by peer]
ssb123 has quit [Remote host closed the connection]
kurko_ has quit [Ping timeout: 271 seconds]
ssb123 has joined #ruby-lang
thebastl has joined #ruby-lang
ssb123 has quit [Remote host closed the connection]
kurko_ has joined #ruby-lang
sreffotsirk has joined #ruby-lang
shinnya has joined #ruby-lang
<lianj> >> -2147483647.is_a?(Fixnum)
<eval-in> lianj => false (https://eval.in/42819)
<lianj> why does my ruby say its true
Mon_Ouie has joined #ruby-lang
skade has quit [Ping timeout: 276 seconds]
<yorickpeterse> ha wtf
<yorickpeterse> >> -2147483647.class
<eval-in> yorickpeterse => Bignum (https://eval.in/42820)
<yorickpeterse> ah, 32bit
<lianj> >> ['foo'].pack('p').size
<eval-in> lianj => 4 (https://eval.in/42821)
<lianj> oh, duh
<yorickpeterse> lololol
<lianj> crap
<yorickpeterse> is_a?(Numeric) is probably a better idea
<yorickpeterse> also, charlie should lrn2sysadmin
Pupeno has quit [Read error: Connection reset by peer]
Pupeno has joined #ruby-lang
Pupeno has joined #ruby-lang
Pupeno has quit [Changing host]
ssb123 has joined #ruby-lang
loincloth has joined #ruby-lang
bondar has joined #ruby-lang
AndChat| has joined #ruby-lang
bondar has quit [Client Quit]
pothibo has joined #ruby-lang
<lianj> yorickpeterse: yea thanks. tests passing on shitty 32bit now
Banistergalaxy has quit [Ping timeout: 260 seconds]
<yorickpeterse> I don't exactly understand why there's Bignum
<yorickpeterse> 123987192387193871938123 is still an integer
<ljarvis> >> 123987192387193871938123.class
<eval-in> ljarvis => Bignum (https://eval.in/42823)
<ljarvis> sure thing BRO
<whitequark> yorickpeterse: lrn2sysadmin?
<whitequark> 32bit VMs are cheaper because lower memory consumption
<whitequark> and you're most significantly billed for RAM
<yorickpeterse> whitequark: unless you run < 64MB that's a non issue
<yorickpeterse> or unless you run Rails
adambeynon has joined #ruby-lang
<yorickpeterse> >> Float::MAX
<eval-in> yorickpeterse => 1.7976931348623157e+308 (https://eval.in/42824)
<yorickpeterse> hm
sascha_d has joined #ruby-lang
<whitequark> yorickpeterse: speak for yourself ;)
<yorickpeterse> what?
<whitequark> re: non issue.
<whitequark> it greatly depends on the host and workload.
<yorickpeterse> if anything eval.in's resource usage would be CPU bound
<yorickpeterse> unless charlie keeps everything around in memory
<yorickpeterse> (true webscale)
<whitequark> lol no. it's sitting there doing nothing most of the time, but the RAM is still allocated
<whitequark> and you *are* billed for caches as well
bondar has joined #ruby-lang
havenwood has joined #ruby-lang
<whitequark> (if it's xen, at least.)
<yorickpeterse> depends on the host
svanharmelen has joined #ruby-lang
<svanharmelen> I have a question about the compilation of ruby-1.9.3 (448) on RH…
<svanharmelen> I'm using the src rpm's from RH (for their openswift env) to create RH6 packages
<svanharmelen> during the rpmbuild it also does a 'make check TEST=$DISABLED_TESTS' which fails with 4 failures and 4 errors
<svanharmelen> so how to go about this?
<svanharmelen> is this step a standard step? Because usually I only see ./configure && make && make test && make install
<svanharmelen> so it the 'make check' really needed and normally used?
wmoxam_ is now known as wmoxam
wmoxam has quit [Changing host]
wmoxam has joined #ruby-lang
mistym has joined #ruby-lang
MaddinXx has quit [Remote host closed the connection]
x0f_ has joined #ruby-lang
jg_ has quit [Quit: Leaving]
x0f has quit [Read error: Operation timed out]
sjltaylor has joined #ruby-lang
rwilcox has quit [Ping timeout: 240 seconds]
e-dard has joined #ruby-lang
jp- has joined #ruby-lang
MaddinXx_ has joined #ruby-lang
joshuawscott has joined #ruby-lang
Kabaka has quit [Ping timeout: 240 seconds]
ssb123 has quit [Remote host closed the connection]
elia has quit [Ping timeout: 264 seconds]
Kabaka has joined #ruby-lang
<andrewvos> parser << line.gsub("^Y", "")
<andrewvos> I don't even know what that means
<andrewvos> But now it is in my code
sjltaylor has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
ssb123 has joined #ruby-lang
<ljarvis> it means remove any Y at the beginning of a line
mistym has quit [Remote host closed the connection]
<andrewvos> ljarvis: It does not
<ljarvis> oh
<ljarvis> that's not even regexp
<andrewvos> ljarvis: That's how I pasted it in
<ljarvis> fuck you and your mind tricks
<andrewvos> It's some weird character
<ljarvis> u r
<andrewvos> Is there a third character there that I cannot see?
<e-dard> Does anyone in here use travis to build their Ruby projects?
<maloik> YES! failday is over
<maloik> worst monday in months in term of facepalming and fails
vlad_starkov has quit [Remote host closed the connection]
_whitelogger has joined #ruby-lang
_whitelogger has joined #ruby-lang
mistym has joined #ruby-lang
<tubbo> e-dard: chmod the file 77
<tubbo> 777*
Senjai has joined #ruby-lang
<e-dard> tubbo: yep I figured that out :)
<tubbo> ok
<e-dard> tubbo: now got *another* error *yay!*
<tubbo> hmm
efrainolivares has joined #ruby-lang
<e-dard> tubbo: https://gist.github.com/e-dard/8b33fe480eabba730c33 I think this is something to do with zeus
<e-dard> I don't know why zeus is running in CI though (I don't think it is
<e-dard> but I'm sure I've seen something like this in local tests when zeus running
Kabaka has joined #ruby-lang
<e-dard> Also, in .travis.yml I have rvm: - 1.9.3, so why is it using ruby 1.9.1?
mistym has quit [Remote host closed the connection]
jsullivandigs has joined #ruby-lang
mistym has joined #ruby-lang
towski has joined #ruby-lang
Squarepy has quit [Quit: Leaving]
JohannHann has joined #ruby-lang
thebastl has joined #ruby-lang
Senjai has quit [Ping timeout: 260 seconds]
<tubbo> e-dard: works locally (outside zeus)?
<tubbo> e-dard: it's not, all 1.9.x gems are stored in a /1.9.1/ dir.
thepumpkin has quit [Ping timeout: 260 seconds]
<e-dard> works locally yes
<e-dard> (outside zeus)
e-dard was kicked from #ruby-lang by apeiros [if you cross-post, you must at least tell that in all channels where you cross-post]
DarkBushido has joined #ruby-lang
e-dard has joined #ruby-lang
<ljarvis> right out the park
e-dard has left #ruby-lang [#ruby-lang]
e-dard has joined #ruby-lang
JohannHann has quit [Ping timeout: 248 seconds]
efrainolivares has quit [Quit: efrainolivares]
__butch__ has joined #ruby-lang
mistym has quit [Quit: Leaving.]
* e-dard being driven to despair :)
nneko001__ has quit [Quit: Konversation terminated!]
Senjai has joined #ruby-lang
mistym has joined #ruby-lang
jasiek has left #ruby-lang [#ruby-lang]
thepumpkin has joined #ruby-lang
itcharlie has joined #ruby-lang
hahuang61 has quit [Ping timeout: 260 seconds]
mistym has quit [Quit: Leaving]
thepumpkin has quit [Ping timeout: 256 seconds]
efrainolivares has joined #ruby-lang
thebastl has quit [Remote host closed the connection]
scmx has joined #ruby-lang
mistym has joined #ruby-lang
mistym has quit [Client Quit]
mistym has joined #ruby-lang
Banistergalaxy has joined #ruby-lang
Banistergalaxy has quit [Client Quit]
Banistergalaxy has joined #ruby-lang
AndChat| has quit [Ping timeout: 260 seconds]
<darix> so much violence
mistym has quit [Quit: Leaving]
mistym_ has joined #ruby-lang
mistym has joined #ruby-lang
mistym has joined #ruby-lang
lun__ has quit [Remote host closed the connection]
dagobah has quit [Remote host closed the connection]
thebastl has joined #ruby-lang
richardburton has quit [Quit: Leaving.]
thepumpkin has joined #ruby-lang
JohnBat26 has joined #ruby-lang
mistym_ has quit [Changing host]
mistym_ has joined #ruby-lang
mistym has quit [Disconnected by services]
mistym_ is now known as mistym
maxmanders has quit [Quit: Computer has gone to sleep.]
mistym_ has joined #ruby-lang
iliketurtles has joined #ruby-lang
mistym has quit [Quit: Leaving]
mistym_ has quit [Client Quit]
mistym has joined #ruby-lang
mistym has quit [Changing host]
mistym has joined #ruby-lang
mistym has quit [Client Quit]
iliketurtles has quit [Client Quit]
mistym has joined #ruby-lang
madumo has quit [Quit: madumo]
iliketurtles has joined #ruby-lang
julweber has joined #ruby-lang
mbj has quit [Ping timeout: 246 seconds]
arooni-mobile has quit [Ping timeout: 246 seconds]
JohannHann has joined #ruby-lang
JohannHann has left #ruby-lang [#ruby-lang]
arooni-mobile__ has quit [Ping timeout: 276 seconds]
tylersmith has joined #ruby-lang
yxhuvud has joined #ruby-lang
RickHull has joined #ruby-lang
sreffotsirk has quit [Quit: ❤]
hahuang61 has joined #ruby-lang
setmeaway has quit [Ping timeout: 246 seconds]
scmx has quit [Ping timeout: 260 seconds]
scmx has joined #ruby-lang
thepumpkin has quit [Remote host closed the connection]
efrainolivares has quit [Quit: efrainolivares]
scampbell has quit [Remote host closed the connection]
thepumpkin has joined #ruby-lang
julweber has quit [Remote host closed the connection]
havenwood has quit [Remote host closed the connection]
richardburton has joined #ruby-lang
efrainolivares has joined #ruby-lang
sreffotsirk has joined #ruby-lang
DarkBushido has quit [Remote host closed the connection]
sreffotsirk has quit [Client Quit]
efrainolivares has quit [Quit: efrainolivares]
Dernise has quit [Ping timeout: 246 seconds]
pkrnj has joined #ruby-lang
hahuang65 has joined #ruby-lang
richardburton has quit [Ping timeout: 276 seconds]
hahuang65 has quit [Client Quit]
efrainolivares has joined #ruby-lang
solars has joined #ruby-lang
havenwood has joined #ruby-lang
AndChat| has joined #ruby-lang
benanne has joined #ruby-lang
cads has joined #ruby-lang
Banistergalaxy has quit [Ping timeout: 276 seconds]
mrsolo has joined #ruby-lang
bradland has joined #ruby-lang
MaddinXx_ has joined #ruby-lang
io_syl has joined #ruby-lang
apeiros has joined #ruby-lang
richardburton has joined #ruby-lang
scmx has quit [Ping timeout: 246 seconds]
Banistergalaxy has joined #ruby-lang
hhatch has quit [Ping timeout: 276 seconds]
julweber has joined #ruby-lang
julweber has quit [Remote host closed the connection]
AndChat| has quit [Ping timeout: 264 seconds]
jsullivandigs has quit [Remote host closed the connection]
saarinen has joined #ruby-lang
jsullivandigs has joined #ruby-lang
jsullivandigs has quit [Ping timeout: 264 seconds]
hhatch has joined #ruby-lang
Nisstyre-laptop has joined #ruby-lang
breaking_ has joined #ruby-lang
banister has joined #ruby-lang
breakingthings has quit [Ping timeout: 264 seconds]
breaking_ is now known as breakingthings
Pupeno has quit [Ping timeout: 276 seconds]
Nisstyre-laptop is now known as Nisstyre
yxhuvud2 has joined #ruby-lang
yxhuvud has quit [Ping timeout: 276 seconds]
efrainolivares has quit [Quit: efrainolivares]
adambeynon has quit [Quit: ["Textual IRC Client: www.textualapp.com"]]
Squarepy has joined #ruby-lang
mbj has joined #ruby-lang
julweber has joined #ruby-lang
thepumpkin has quit [Remote host closed the connection]
ssb123 has quit [Remote host closed the connection]
arBmind has joined #ruby-lang
thebastl has quit [Remote host closed the connection]
mbj has quit [Read error: Connection reset by peer]
towski has quit [Remote host closed the connection]
ssb123 has joined #ruby-lang
efrainolivares has joined #ruby-lang
mbj has joined #ruby-lang
mbj has quit [Client Quit]
mbj has joined #ruby-lang
Squarepy has quit [Quit: Leaving]
relix has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
anonymuse has quit [Remote host closed the connection]
RickHull1 has joined #ruby-lang
RickHull has quit [Ping timeout: 269 seconds]
Y_Ichiro_ is now known as Y_Ichiro
anonymuse has joined #ruby-lang
vlad_starkov has joined #ruby-lang
riotbit has quit [Quit: riotbit]
banister has quit [Remote host closed the connection]
thebastl has joined #ruby-lang
waxjar has quit [Remote host closed the connection]
yxhuvud has joined #ruby-lang
efrainolivares has quit [Quit: efrainolivares]
yxhuvud2 has quit [Ping timeout: 276 seconds]
waxjar has joined #ruby-lang
BayaBaya has joined #ruby-lang
thebastl has quit [Remote host closed the connection]
Dernise has joined #ruby-lang
Pupeno_ has joined #ruby-lang
<yorickpeterse> ugh, I do actually for once need to perform gender analysis on text
<yorickpeterse> bah
Pupeno_ has quit [Ping timeout: 240 seconds]
rippa has quit [Quit: {#`%${%&`+'${`%&NO CARRIER]
pothibo has quit [Quit: pothibo]
tonni has joined #ruby-lang
iliketurtles has quit [Quit: zzzzz…..]
dr_bob has joined #ruby-lang
fcahoon has joined #ruby-lang
Dernise has quit [Ping timeout: 240 seconds]
Dernise has joined #ruby-lang
rails_smith has joined #ruby-lang
jbsan has quit [Quit: jbsan]
MaddinXx_ has quit [Remote host closed the connection]
<yorickpeterse> https://github.com/bmuller/sexmachine AAAAAAAnnnnndddd the name for the worst Gem name goes toooooo bmuller
Nisstyre has quit [Quit: Leaving]
MaddinXx has joined #ruby-lang
<yxhuvud> *giggle*
JohnBat26 has quit [Quit: KVIrc 4.3.1 Aria http://www.kvirc.net/]
maxmanders has joined #ruby-lang
efrainolivares has joined #ruby-lang
maxmanders has quit [Max SendQ exceeded]
maxmanders has joined #ruby-lang
maxmanders has quit [Client Quit]
maxmanders has joined #ruby-lang
maxmanders has quit [Max SendQ exceeded]
maxmanders has joined #ruby-lang
fcahoon has quit [Quit: Leaving]
wallerdev has quit [Quit: wallerdev]
maxmanders has quit [Ping timeout: 246 seconds]
vlad_starkov has quit [Remote host closed the connection]
jbsan has joined #ruby-lang
Mon_Ouie has quit [Quit: WeeChat 0.4.1]
Mon_Ouie has joined #ruby-lang
Mon_Ouie has joined #ruby-lang
mbj has quit [Read error: Connection reset by peer]
saarinen has quit [Quit: saarinen]
<tubbo> gem install say_it_loud
<tubbo> say_it_loud
<tubbo> => "I'M BLACK AND I'M PROUD!"
<whitequark> yorickpeterse: it's not that bad
<whitequark> I mean, it isn't really offensive
iliketurtles has joined #ruby-lang
<yorickpeterse> I'm willing to bet the name was considered a pun of intercourse
ledestin has joined #ruby-lang
<yorickpeterse> "hurr hurr...sex...machine..GENIUS!"
sjltaylor has joined #ruby-lang
BayaBaya has quit [Quit: Leaving]
<whitequark> well, that's your mind being dirty, not his
RickHull1 has quit [Quit: Leaving.]
thepumpkin has joined #ruby-lang
banister has joined #ruby-lang
Nisstyre-laptop has joined #ruby-lang
robbyoconnor has quit [Excess Flood]
robbyoconnor has joined #ruby-lang
<tubbo> yorickpeterse: are you really offended by the word "sex"?
<tubbo> :P
vlad_starkov has joined #ruby-lang
Nisstyre-laptop is now known as Nisstyre
<yorickpeterse> No?
<yorickpeterse> Also "offended" is like the worst word to describe it
Mon_Ouie has quit [Ping timeout: 248 seconds]
robbyoconnor has quit [Ping timeout: 240 seconds]
<yorickpeterse> https://rubygems.org/gems/balls e.g. this doesn't offend me either, but I do believe the name is stupid
robbyoconnor has joined #ruby-lang
<yorickpeterse> https://github.com/YorickPeterse/reddit-stats anyway, this is the result of my evening "can't be fucked" hack
vlad_starkov has quit [Ping timeout: 276 seconds]
mbj has joined #ruby-lang
__butch__ has quit [Remote host closed the connection]
efrainolivares has quit [Quit: efrainolivares]
efrainolivares has joined #ruby-lang
postmodern has joined #ruby-lang
Mon_Ouie has joined #ruby-lang
io_syl has quit [Quit: io_syl]
efrainolivares has quit [Quit: efrainolivares]
skade has joined #ruby-lang
ldnunes has quit [Quit: Leaving]
<Dernise> What's the limit of concurency in ruby threads ?
daihuws has quit [Quit: Leaving]
jsullivandigs has joined #ruby-lang
daihuws has joined #ruby-lang
daihuws has left #ruby-lang [#ruby-lang]
breakingthings has quit [Quit: breakingthings]
jsullivandigs has quit [Ping timeout: 240 seconds]
Forgetful_Lion_ has quit [Remote host closed the connection]
<darix> Dernise: 1 at a time on MRI. more on rubinius and jruby
<soahccc> darix: isn't that parallelism or am I mixing it up now?
<darix> soahccc: just a guess he was referring to how many things can run in parallel
richardburton1 has joined #ruby-lang
richardburton has quit [Ping timeout: 264 seconds]
<Dernise> darix: If I want to do two things at the same time, is that possible in ruby?
<darix> Dernise: depends on what things
<darix> Dernise: in mri only one thread really runs at the same time. but of course it will do some scheduling between threads
jp- has quit [Quit: OK, I believe you… but my tommy gun don't]
<Dernise> I would like to run a command with popen3, get every new lines in its stdout and do actions on theses lines. I also want my program to continue running while doing this
<darix> your program would keep running
<darix> it just might block on IO if you dont read fast enough
<drbrain> Dernise: popen3 with a block is probably what you want
sepp2k has joined #ruby-lang
<darix> so as long as your code in the block is fast enough dont worry about multithreaded
<Dernise> In a block does my program continue running ?
<drbrain> Dernise: as darix said, your program stays running
<drbrain> here is an example without a block using popen4 (like 3, but with PID for process management):
<darix> a short 50 line example
<darix> ;)
<drbrain> I never said short
<drbrain> :D
<amerine> seems short enough to me.
<amerine> meh
<drbrain> Dernise: the block form closes in/out/err for you (which will terminate your program)
hhatch has quit [Ping timeout: 240 seconds]
<drbrain> oh nice, popen3 now has the same capability as popen4
cads has quit [Read error: Operation timed out]
mistym has quit [Ping timeout: 240 seconds]
<Dernise> I'll try something.
<drbrain> actually, the docs say the block will close in/out/err but it doesn't wait for your program to terminate
<drbrain> (your program may not exit when its stdin closes)
<Dernise> Ok I'll gist you something and you will understand
<Dernise> What I want to do is to write Hello world while craftbukkit is running
<Dernise> So the execution continues
joshuawscott has quit [Quit: Leaving.]
<drbrain> you want to write it to craftbukkit?
<Dernise> No. I just want to run the code in the block in parallel with hello world
<drbrain> ah, ok
<Dernise> Just an example hugh
<drbrain> you can wrap the popen3 block in a thread
<drbrain> craftbukkit = Thread.start do Open3.popen3 … end
tanema has quit [Remote host closed the connection]
<drbrain> then craftbukkit.join at the very end of your program (this will wait for craftbukkit)
saarinen has joined #ruby-lang
<onewheelskyward> I like your variable naming.
iliketurtles has quit [Quit: zzzzz…..]
<drbrain> it helps me know what the thread does :D
banister has left #ruby-lang [#ruby-lang]
banisterfiend has joined #ruby-lang
pipework has quit [Remote host closed the connection]
<Dernise> My program is running forever (it's a server) so, can I avoid craftbukkit.join?
<drbrain> you definitely need the craftbukkit.join then
<banisterfiend> drbrain: what's up these days? working on any interesting new projects?
<drbrain> this makes the main thread wait on the craftbukkit thread
richardburton1 has quit [Read error: Connection reset by peer]
<drbrain> banisterfiend: tinkering on https://github.com/drbrain/drb-worm
richardburton1 has joined #ruby-lang
<drbrain> since the craftbukkit thread never exits, neither will your program
<drbrain> if craftbukkit crashes (or you shut it down) your program will exit
<banisterfiend> drbrain: fun project
<banisterfiend> drbrain: messing with any other languages?
mistym has joined #ruby-lang
mistym has joined #ruby-lang
mistym has quit [Changing host]
<drbrain> not so much
<banisterfiend> drbrain: haven't drunk the functional programming kool-aid? :)
<drbrain> functional programming is awesome
<drbrain> I built a compiler for a scheme-like in scheme in college
<drbrain> but I like playing with multi-processing more (thus drb)
<banisterfiend> drbrain: cool, here's something you might like (even if you dont program haskell, it has a great survey of all concurrent/parallel programming technologies available today) http://chimera.labs.oreilly.com/books/1230000000929/index.html
<x0f_> it's like having a cake and no side dishes while eating it.
<banisterfiend> drbrain: i haven't got passed about page 30, but my gut tells me it's important :)
<banisterfiend> past*
<Dernise> Threads are not in parallel in ruby ?
s0ber has quit [Remote host closed the connection]
s0ber has joined #ruby-lang
benanne has quit [Quit: kbai]
efrainolivares has joined #ruby-lang
zeusmns has quit [Ping timeout: 248 seconds]
<Dernise> Wow I did it. But I don't know how
efrainolivares has quit [Client Quit]
w00x has quit [Ping timeout: 248 seconds]
mbj_ has joined #ruby-lang
<Dernise> My code is working and I dont know why. It's frustrating.
zeusmns has joined #ruby-lang
solars has quit [Read error: Operation timed out]
dabradley has quit [Ping timeout: 248 seconds]
<drbrain> banisterfiend: thanks, I'll check it out
<andrewvos> Why does google analytics need to get the tracker.gif?
<drbrain> Dernise: threads cannot run ruby at the same time, but they will switch on things like blocking IO
dabradley has joined #ruby-lang
<Dernise> drbrain: I forked the process to do parallelism. Is that "safe"
<Dernise> ?*
mbj has quit [Ping timeout: 240 seconds]
<drbrain> yes
wmoxam has quit [Ping timeout: 248 seconds]
RickHull has joined #ruby-lang
iliketurtles has joined #ruby-lang
<drbrain> when you fork { … } in ruby, in the child process all other threads are killed
efrainolivares has joined #ruby-lang
<Dernise> In java I used to do that with threads, why is that not possible with ruby ?
<drbrain> why is which not possible?
<RickHull> i'm collecting data from jenkins on job success/failures. the idea is to look for hotspots or trends. e.g. i know what machine the job executed on and at what time
<Dernise> I think I don't understand what are threads.
<RickHull> what sort of automatic analysis tools can tell me that a bunch of failures are clustered on this machine, or during this time window, etc?
<drbrain> in general (java, posix, ruby) threads are separate streams of execution in the same process
<drbrain> but they share the same memory space
<drbrain> processes do not share the same memory space
nathanstitt has quit [Quit: I growing sleepy]
<drbrain> ruby supports separate threads, but two threads cannot run the ruby VM (execute ruby code) at the same time
<drbrain> for CRuby
<banisterfiend> rickhull: hey ricky, ltns
<Dernise> So what are they usefull for?
<drbrain> a ruby thread can execute other C code outside the ruby VM at the same time as the ruby VM though
<drbrain> the best use for threads in ruby is for handling IO, such as for a web server
<drbrain> well, this class of problem
richardburton1 has quit [Quit: Leaving.]
julweber has quit [Remote host closed the connection]
<RickHull> banisterfiend: yup, i've even started using pry regularly now!
<drbrain> most of the threads will be waiting for IO to go in or out
<drbrain> so ruby can switch between them
richardburton has joined #ruby-lang
<drbrain> and there is little blocking
<banisterfiend> rickhull: good boy! :) Which state are you from btw?
<RickHull> Georgia, but i've moved from east coast to west coast. SF now
<RickHull> to be closer to you :P
<drbrain> outside CRuby, threads can be used when it is easier to use shared memory to communicate between compute-heavy threads than it is to use inter-process communication
ledestin has quit [Quit: ledestin]
<banisterfiend> rickhull: i'm in netherlands :)
<RickHull> no shit, long term?
<banisterfiend> rickhull: but if you're stoned all the time, then i guess we're close in spirit
<banisterfiend> (jk, i dont actually smoke tha tmuch, though there's a "coffeeshop" 5 mins from where i live)
<RickHull> well, I am still recovering from Outside Lands music festival
<banisterfiend> rickhull: semi-longterm, it's a beautiful country. Little bridges cobblestone streets, ancient buildings. I'm living in an old stone house that dates back to the 1500s
killtheliterate is now known as killthe|afk
<RickHull> y, i was quite taken with the dutch lifestyle and culture the last time i visited, almost 15 years ago
<RickHull> spent about a week in amsterdam, and few days outside the city
setmeaway has joined #ruby-lang
<RickHull> do you ever commute by boat?
<x0f_> drbrain, isn't the "parallel c-code invocation" still experimental?
<banisterfiend> rickhull: no, but i could :) i live adjacent to a canal
joshuawscott has joined #ruby-lang
<banisterfiend> rickhull: it's 'orientation week' at the local university, the dutch youth love to have get on boats, park under a bridge, and have dance parties
<drbrain> x0f_: no, but the functions are now in the header files
<banisterfiend> it's pretty unusual ;)
<drbrain> but they've been in use throughout 1.9.x
<drbrain> x0f_: I updated zlib to use them so now you can inflate/deflate in parallel!
<x0f_> ahh, ok. nice to know though. could be beneficial for heavy processing stuff.
<x0f_> yeah! awesome.
<Dernise> What I'm doing is a server that will communicate informations to a website, informations such as CPU usage and the console of a program. Well it's a monitor for programs such as craftbukkit.. So I'm running each process with open3 and I would like to send every new lines in the console to my website without blocking the server
<drbrain> similar to the web server usage
<drbrain> Dernise: that sounds like a perfect usage of threads
arBmind has quit [Quit: Leaving.]
<Dernise> I'll try to fork everytime I open a new program use open3 in this fork and then get every new lines
<Dernise> Hm...
<drbrain> you can open3 a new program and monitor it with threads, too
<drbrain> so you have multiple child programs you are monitoring using multiple threads
nathanstitt has joined #ruby-lang
skade has quit [Quit: Computer has gone to sleep.]
<x0f_> you just need to fork once and have the pid and pipes available for communication and signals with the child process.
<Dernise> I used rufus scheduler to monitor it :')
dr_bob has quit [Quit: Tune in next week when you'll hear Dr. Bob say...]
matti has quit [Ping timeout: 246 seconds]
<Dernise> Every 3s I check the CPU usage? This might not be the best way to do it
jbsan has quit [Quit: jbsan]
<drbrain> it should be fine
<drbrain> 3s is a long time for a computer
nathanstitt has quit [Quit: I growing sleepy]
<Dernise> an other way would have been to spawn a new thread that would wake up every 3s
sjltaylor has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<drbrain> I wouldn't worry about having "too many" threads if they mostly sleep or wait
<whitequark> they eat memory though
tdm00 has quit [Quit: Computer has gotten very, very sleepy.]
efrainolivares has quit [Quit: efrainolivares]
pkrnj has quit [Quit: Computer has gone to sleep.]
ledestin has joined #ruby-lang
cads has joined #ruby-lang
nathanstitt has joined #ruby-lang
efrainolivares has joined #ruby-lang
iliketurtles has quit [Quit: zzzzz…..]
nathanstitt has quit [Client Quit]
MaddinXx has quit [Remote host closed the connection]
julweber has joined #ruby-lang
MaddinXx_ has joined #ruby-lang
tomzx_mac has joined #ruby-lang
iliketurtles has joined #ruby-lang
<Dernise> last question, is it possible to read a stream that is not closed without blocking (ie : stderr)
MaddinXx_ has quit [Remote host closed the connection]
<drbrain> yes, you can readpartial or read_nonblock
matti has joined #ruby-lang
matti has quit [Changing host]
matti has joined #ruby-lang
<drbrain> or place the IO in non-blocking mode
<Dernise> thanks !
julweber has quit [Ping timeout: 264 seconds]
jbsan has joined #ruby-lang
scottschecter has quit [Ping timeout: 260 seconds]
scottschecter has joined #ruby-lang
tanema has joined #ruby-lang
joshuawscott has quit [Quit: Leaving.]
<gnufied> stdout or stderr streaming is bit tricky, the only way I have found it to be truly unbuffered is to use tty and io/console
efrainolivares has quit [Quit: efrainolivares]
efrainolivares has joined #ruby-lang
anonymuse has quit [Remote host closed the connection]
tanema has quit [Ping timeout: 256 seconds]
VTLob has quit [Quit: VTLob]
kurko_ has quit [Quit: Computer has gone to sleep.]
setmeaway has quit [Quit: Leaving]
saarinen has quit [Quit: saarinen]
saarinen has joined #ruby-lang
pkrnj has joined #ruby-lang
joshuawscott has joined #ruby-lang
tylersmith has quit [Remote host closed the connection]
tylersmith has joined #ruby-lang
tylersmith has quit [Ping timeout: 264 seconds]
saarinen has quit [Quit: saarinen]
jwoods has quit [Ping timeout: 248 seconds]
Senjai has quit [Ping timeout: 240 seconds]
<xuser> drbrain: did you gave up on rubinius?
malev has quit [Quit: Leaving]
krohrbaugh1 has joined #ruby-lang
realDAB has joined #ruby-lang
saarinen has joined #ruby-lang
krohrbaugh1 has quit [Read error: Connection reset by peer]
dhsmith_ has joined #ruby-lang
krohrbaugh1 has joined #ruby-lang
<drbrain> xuser: how do you mean?
<drbrain> once I was paid to work on rubinius, but no more
tanema has joined #ruby-lang
<drbrain> since I maintain rdoc and rubygems, working on rubinius also is too much to do for free
<xuser> drbrain: was looking at the contributors, you stop contributing some years ago
<xuser> drbrain: oh ok
richardburton has quit [Quit: Leaving.]
wallerdev has joined #ruby-lang
<banisterfiend> drbrain: do you still believe in rubinius? (i.e do you think it will realize its potential?)
dhsmith has quit [Ping timeout: 256 seconds]
krohrbaugh has quit [Ping timeout: 264 seconds]
<xuser> yeah, I was just curious if he stop believing in it :)
<drbrain> banisterfiend: I think so, yes
realDAB has quit [Quit: realDAB]
<drbrain> I think two large projects (rdoc + rubygems) is too much to also keep ruby fun for me
<drbrain> well, almost too much :D
<drbrain> three would definitely be too much
<xuser> drbrain: I guess engineyard lower the resources to rubinius?
<banisterfiend> drbrain: one big project is enough for me, it's already kind of a chore
<drbrain> xuser: for a while, yes
<drbrain> well, I guess they're still at two paid people
kstuart has quit [Ping timeout: 248 seconds]
<xuser> drbrain: has there ever be any plans in removing the GIL from cRuby?
<banisterfiend> xuser: i think they tried once and got a reduction in performance
<banisterfiend> they had a bunch of finer grained locks
<drbrain> xuser: eventually, yes
<xuser> banisterfiend: oh they tried, nice, I guess is not so simple
<xuser> drbrain: cool
<drbrain> I tried moving object allocation to a separate lock from the GVL but it was difficult
<drbrain> I learned some stuff and need to try again
<drbrain> model 1 was ruby 1.8's model
<xuser> well kudos for trying
<xuser> drbrain: I guess 1.9 should make easier cause it uses native threads?
<drbrain> yes
<drbrain> the big problem with moving to model 3 is C extension compatibility
<xuser> drbrain: you mean like making C extensions thread-safe?
<drbrain> they would also need to lock/unlock fine-grained locks properly
<drbrain> instead of rb_ary_aref/rb_ary_aset a C extension can directly manipulate the data structure via RARRAY_PTR()
lguardiola has quit [Ping timeout: 264 seconds]
<drbrain> if you call the rb_ary_* functions ruby can operate the locks for you
<drbrain> if you use RARRAY_PTR macro ruby cannot make the same assumption
dhsmith_ has quit [Remote host closed the connection]
<zzak> drbrain: want me to merge that literals patch?
<drbrain> zzak: sure!
<zzak> ty
<drbrain> I just wanted to clarify why I left it out
* xuser needs to learn son ruby internals
<xuser> s/son/some
<drbrain> BTW, I think my GC allocation lock would not necessarily make things faster
mrsolo has quit [Quit: Leaving]
<drbrain> I just wanted to try it
<banisterfiend> zzak: we also need a patch to expose attached object for singleton classes, what's the chance of something like that being merged? :)
vlad_starkov has joined #ruby-lang
lguardiola has joined #ruby-lang
<zzak> drbrain: thank you for the review
<zzak> its much better patch now
<drbrain> :D
<zzak> banisterfiend: could you explain?
dhsmith has joined #ruby-lang
dhsmith has quit [Remote host closed the connection]
dhsmith has joined #ruby-lang
vlad_starkov has quit [Ping timeout: 240 seconds]
<zzak> someone assigned doc patch to drbrain
<banisterfiend> zzak: obj.singleton_class.__attached__ #=>> obj :)
<zzak> zomg
<banisterfiend> it's not useful except when doing slightly warped metaprograming, but when doing that warped metaprogramming, there's actually no way of getting back the attached object unless you use something like ObjectSpace
<zzak> banisterfiend: like inherited?
<banisterfiend> zzak: no
wmoxam has joined #ruby-lang
<drbrain> zzak: you should update the maintainers list with an entry for "documentation patches"
<zzak> drbrain: good idea