ChanServ changed the topic of #ruby-lang to: Ruby 1.9.3-p125: http://ruby-lang.org | Paste >3 lines of text on http://pastie.org or use a gist
nofxx has joined #ruby-lang
nofxx has quit [Changing host]
nofxx has joined #ruby-lang
ddbt-nl has joined #ruby-lang
tomzx_ has quit [Ping timeout: 246 seconds]
ddbt-nl has left #ruby-lang [#ruby-lang]
adam_ has joined #ruby-lang
adam_ has left #ruby-lang [#ruby-lang]
dous has joined #ruby-lang
dous has quit [Changing host]
dous has joined #ruby-lang
adam_ has joined #ruby-lang
slyphon has joined #ruby-lang
<adam_> Has anyone got pango to work with RMagick?
adam_ is now known as adamIsAdam
<adamIsAdam> I need to do text formatting with rmagick, and since RVG doesn't support line wrapping, that's no good.
dous has quit [Ping timeout: 246 seconds]
dc5ala has joined #ruby-lang
deryl has quit [Quit: deryl]
deryl has joined #ruby-lang
kain has joined #ruby-lang
dous has joined #ruby-lang
chimkan has quit [Quit: chimkan]
ryanf has quit [Quit: leaving]
krz has joined #ruby-lang
ryanf has joined #ruby-lang
nofxx has quit [Ping timeout: 272 seconds]
FluffyCode has quit [Remote host closed the connection]
cantonic has quit [Read error: Connection reset by peer]
rizzy has quit [Ping timeout: 255 seconds]
cantonic has joined #ruby-lang
dfr|mac has quit [Remote host closed the connection]
lcdhoffman has joined #ruby-lang
nofxx has joined #ruby-lang
nofxx has quit [Changing host]
nofxx has joined #ruby-lang
dc5ala has quit [Ping timeout: 246 seconds]
coryf has joined #ruby-lang
lcdhoffman has quit [Quit: lcdhoffman]
banisterfiend has quit [Remote host closed the connection]
bendrix415 has joined #ruby-lang
dc5ala has joined #ruby-lang
savage- has joined #ruby-lang
<bendrix415> i have a simple alert, if val > crit
<bendrix415> then alert, i would like to check val a few more times as the val may change over a minute
<bendrix415> what is the best way to accomplish with out multiple if's
rizzy has joined #ruby-lang
dous has quit [Remote host closed the connection]
bglusma__ has quit [Remote host closed the connection]
bglusman has joined #ruby-lang
bglusman has quit [Remote host closed the connection]
brunocoelho has joined #ruby-lang
cantonic has quit [Quit: cantonic]
banisterfiend has joined #ruby-lang
w0lverine has joined #ruby-lang
neocoin has quit [Remote host closed the connection]
ryanf has quit [Quit: leaving]
coryf has quit [Remote host closed the connection]
snorkdude has joined #ruby-lang
w0lverine has quit [Quit: w0lverine]
seanstickle has quit [Quit: seanstickle]
brunocoelho has quit [Remote host closed the connection]
rizzy has quit [Quit: Leaving]
chimkan_ has joined #ruby-lang
vertroa has quit [Ping timeout: 246 seconds]
dous has joined #ruby-lang
savage- has quit [Remote host closed the connection]
dous has quit [Ping timeout: 250 seconds]
<rking> adamIsAdam: Worst-case is you call inkscape to render it out for you.
fgomez has quit [Ping timeout: 246 seconds]
postmodern has quit [Quit: Leaving]
<banisterfiend> rking: oh hello, didnt see oyu there
<rking> Yeah it's me.
snorkdude has quit [Remote host closed the connection]
fgomez has joined #ruby-lang
chimkan_ has quit [Quit: chimkan_]
savage- has joined #ruby-lang
dhruvasagar has joined #ruby-lang
arooni-mobile has joined #ruby-lang
spuk has quit [Ping timeout: 240 seconds]
rodj has joined #ruby-lang
spuk has joined #ruby-lang
mac_br has joined #ruby-lang
mac_br has quit [Client Quit]
mac_br has joined #ruby-lang
ryanf has joined #ruby-lang
banisterfiend has quit [Remote host closed the connection]
mac_br has quit [Client Quit]
gregmore_ has joined #ruby-lang
gregmoreno has quit [Read error: Operation timed out]
mac_br has joined #ruby-lang
hinbody has joined #ruby-lang
snorkdude has joined #ruby-lang
banisterfiend has joined #ruby-lang
sevvie has quit [Quit: sevvie]
snorkdude has quit [Remote host closed the connection]
mark06 has joined #ruby-lang
tjadc has quit [Remote host closed the connection]
savage- has quit [Remote host closed the connection]
bryancp has joined #ruby-lang
towski has joined #ruby-lang
w0lverine has joined #ruby-lang
dous has joined #ruby-lang
dous has quit [Changing host]
dous has joined #ruby-lang
<adamIsAdam> rking: thanks, i think i'm going to use the caption: functionality of rmagick.
<rking> adamIsAdam: Cool.
dous has quit [Ping timeout: 246 seconds]
Asher has quit [Quit: Leaving.]
mark06 has left #ruby-lang [#ruby-lang]
rodj has quit [Quit: rodj]
ramonmaruko has quit [Quit: Leaving.]
ramonmaruko has joined #ruby-lang
dfr|mac has joined #ruby-lang
burgestrand has joined #ruby-lang
mac_br has left #ruby-lang [#ruby-lang]
postmodern has joined #ruby-lang
w0lverine has quit [Quit: w0lverine]
bytephilia has joined #ruby-lang
urbanmonk has joined #ruby-lang
dhruvasagar has quit [Quit: leaving]
dhruvasagar has joined #ruby-lang
gnufied has joined #ruby-lang
bryancp has quit [Remote host closed the connection]
deryldoucette has joined #ruby-lang
hramrach has quit [Remote host closed the connection]
w0lverine has joined #ruby-lang
r0bby has joined #ruby-lang
deryl has quit [Ping timeout: 244 seconds]
deryldoucette is now known as deryl
robbyoconnor has quit [Ping timeout: 244 seconds]
neocoin has joined #ruby-lang
Dreamer3 has quit [Quit: Leaving...]
Dreamer3 has joined #ruby-lang
burgestrand has quit [Quit: Leaving.]
wallerdev has joined #ruby-lang
savage- has joined #ruby-lang
yxhuvud has joined #ruby-lang
dous has joined #ruby-lang
dous has quit [Changing host]
dous has joined #ruby-lang
deryl has quit [Quit: deryl]
countdigi has quit [Ping timeout: 246 seconds]
fgomez has quit [Quit: leaving]
dous has quit [Ping timeout: 246 seconds]
ChadStud1uffin has quit [Ping timeout: 244 seconds]
countdigi has joined #ruby-lang
bytephilia has quit [Remote host closed the connection]
havenn has joined #ruby-lang
gokul has joined #ruby-lang
gokul has quit [Client Quit]
iMichael has joined #ruby-lang
gokul has joined #ruby-lang
banisterfiend has quit [Remote host closed the connection]
banisterfiend has joined #ruby-lang
burgestrand has joined #ruby-lang
dfr|mac has quit [Remote host closed the connection]
wallerdev has quit [Quit: wallerdev]
gnufied has quit [Quit: Leaving.]
gnufied has joined #ruby-lang
jtoy has joined #ruby-lang
sailias has joined #ruby-lang
gnufied has quit [Quit: Leaving.]
|Vargas| has joined #ruby-lang
sailias has quit [Client Quit]
savage- has quit [Remote host closed the connection]
gnufied has joined #ruby-lang
dous has joined #ruby-lang
dhruvasagar has quit [Ping timeout: 272 seconds]
bendrix415 has quit [Quit: ChatZilla 0.9.88.2 [Firefox 12.0/20120424093957]]
dous has quit [Ping timeout: 246 seconds]
RickHull has left #ruby-lang [#ruby-lang]
apeiros_ has quit [Remote host closed the connection]
urbanmonk has quit [Quit: Bye!]
whatasunnyday has joined #ruby-lang
gnufied has quit [Quit: Leaving.]
postmodern has quit [Quit: Leaving]
iMichael has quit [Quit: Page closed]
havenn has quit [Remote host closed the connection]
towski has quit [Remote host closed the connection]
<certainty> moin
andrewhl has quit [Remote host closed the connection]
andrewhl has joined #ruby-lang
andrewhl has quit [Read error: Connection reset by peer]
fgomez has joined #ruby-lang
chancancode has joined #ruby-lang
<banisterfiend> certainty: do you think it's appropriate to greet the channel in german when english is the lingua franca and german is a dying, medieval language?
<chancancode> Can someone explain to me why anonymous classes don't "inherit" constants from their superclass?
<drbrain> banisterfiend: ☹
krz has quit [Quit: krz]
<drbrain> chancancode: constant scoping doesn't work that way
cha1tanya has joined #ruby-lang
<drbrain> chancancode: … why the class_eval?
<chancancode> Oh it's Eric :D
<drbrain> chancancode: … Class.new accepts a block
lsegal has quit [Quit: Quit: Quit: Quit: Stack Overflow.]
<chancancode> drbriain: Yeah my original version is w/o the class_eval, but since that doesn't work, I tried it with class_eval
<chancancode> This is what I wanted to do. When I'm using MiniTest::Unit, I can define a constant on MT::U::TestCase and it'd be available to all my tests w/o polluting the global namespace.
jtoy has quit [Quit: jtoy]
<chancancode> But I couldn't figure out a way to do the same thing for the Spec syntax.
JohnBat26 has joined #ruby-lang
<drbrain> chancancode: I'm not sure how to work around the block constant lookup issue
<certainty> banisterfiend: i certainly will stop it if you guys find it inapropriate. It's just a habbit. I use to hang around at other english channels, where i do the same. Oh and as an aside. I don't think german is dying ;p
<banisterfiend> certainty: im just trolling ;)
<certainty> banisterfiend: oh, sorry. I'm not good at getting such things via irc. I'm much better at it when i actually see faces :)
<drbrain> chancancode: banisterfiend often doesn't think before he types ☹
<drbrain> oops, certainty ^^
<burgestrand> chancancode: perhaps you could use const_missing to allow the lookup to go through
ttilley has quit [Ping timeout: 246 seconds]
<burgestrand> Naw, it’s in the wrong scope. Bugger.
<chancancode> burgestrand: How would that work? (Do I define that in Kernel or something, and check if self < MiniTest::Spec?)
<burgestrand> Yeah, it’d be a bit hacky. :p
<burgestrand> If it would even work at all.
<burgestrand> Meh.
<chancancode> Hmm. Or maybe I could just define constant_missing on MiniTest::Spec?
arooni-mobile has quit [Ping timeout: 246 seconds]
<burgestrand> chancancode: it needs to be defined on the object you try to retrieve the constant from I’m afraid.
<chancancode> Hmmm
<burgestrand> chancancode: const_get works however. http://codepad.org/VEpAfQHr
<burgestrand> You can remove the self from that: http://codepad.org/2IG9rHrg
schroedinbug has quit [Quit: WeeChat 0.3.8]
<chancancode> Thanks burgestrand
dous has joined #ruby-lang
workmad3 has joined #ruby-lang
<chancancode> To be clear, this is what I am trying to accomplish: https://gist.github.com/cce63fb339063f75ca55
guns has quit [Read error: Operation timed out]
<chancancode> So the conclusion is, there's pretty much no trivial way to make this work because of how blocks are scoped, correct?
dous has quit [Ping timeout: 246 seconds]
<samuelkadolph> Make it a method
<samuelkadolph> Who cares if it isn't an actual const?
<samuelkadolph> And if it must be all caps, you can do SOME_CONST()
havenn has joined #ruby-lang
<chancancode> oh :D
<chancancode> Good enough! Thanks!
rutkla has joined #ruby-lang
ryanf has quit [Quit: leaving]
u_u has quit [Ping timeout: 240 seconds]
kain has quit [Ping timeout: 272 seconds]
solars has joined #ruby-lang
kain has joined #ruby-lang
jasiek has quit [Remote host closed the connection]
zmack has joined #ruby-lang
rue has quit [Remote host closed the connection]
kitallis has joined #ruby-lang
slaytanic has quit [Read error: Connection reset by peer]
slaytanic has joined #ruby-lang
burgestrand has quit [Quit: Leaving.]
burgestrand has joined #ruby-lang
workmad3 has quit [Ping timeout: 246 seconds]
u_u has joined #ruby-lang
guns has joined #ruby-lang
guns is now known as Guest29788
Guest29788 has quit [Client Quit]
tomb_ has quit [Quit: Computer has gone to sleep.]
tomb_ has joined #ruby-lang
WillMarshall has joined #ruby-lang
rolfb has joined #ruby-lang
Dreamer3 has quit [Ping timeout: 246 seconds]
dhruvasagar has joined #ruby-lang
Dreamer3 has joined #ruby-lang
Wardrop has joined #ruby-lang
Wardrop has quit [Client Quit]
Wardrop has joined #ruby-lang
Wardrop has left #ruby-lang [#ruby-lang]
shevy has joined #ruby-lang
Wardrop has joined #ruby-lang
havenn has quit [Remote host closed the connection]
<Wardrop> I've got a bit of a problem at the moment with converting arbitrary ruby structures to json, namely, NaN float values. There doesn't seem to exist in the ruby JSON library (in stdlib), any means of converting NaN values to something such as nil or 0.
<Wardrop> Leaving them as NaN causes the JSON library to throw an exception, as NaN literals are not valid JSON.
<Wardrop> The JSON library does have an option to leave ignore NaN values, except then NaN literals get sent to the client where they're invalid - it just moves the problem to the client.
igotnolegs has quit [Quit: Computer has gone to sleep.]
<Wardrop> Does anyone know how I might be able to convert these NaN values to something such as zero or nil either before the JSON library hits it, or somehow through the JSON library?
<Wardrop> It's absolutely got me pissed this problem as it's caused me to be called into work while on holidays.
<burgestrand> Wardrop: could you provide an example of a ruby value you cannot encode to JSON containing one of these NaN values?
<Wardrop> [0.0/0].to_json
<burgestrand> Ah, there we go, managed to make a NaN. Turns out the old "NaN".to_f did not work anymore.
<Wardrop> Make sure you: require 'json'
<Wardrop> I'd preferably like to monkey patch the JSON library
<burgestrand> Aye, tricky problem.
<Wardrop> Otherwise, the last resort would be to pre-process the data I plan to convert to JSON; though that'll require all kinds of recursion and will be relatively fragile if some more exotic object comes along.
<Wardrop> The NaN's are coming as a result of the EXIFR library; a library used for extracting EXIF information from TIFF's and JPEG's, though I suppose this highlights the fragility of the JSON library in stdlib.
slaytanic has quit [Read error: Connection reset by peer]
neocoin has quit [Remote host closed the connection]
dhruvasagar has quit [Ping timeout: 246 seconds]
publicvoid has quit [Remote host closed the connection]
<Wardrop> ok, looks like if I monkey-patch the to_json method on Float, that may solve the problem.
dhruvasagar has joined #ruby-lang
<burgestrand> Yeah, I tried that, it was ignored.
slaytanic has joined #ruby-lang
<burgestrand> If it works for you by all means do.
mk03 has quit [Remote host closed the connection]
dous has joined #ruby-lang
dous has quit [Changing host]
dous has joined #ruby-lang
zmack has quit [Remote host closed the connection]
<burgestrand> Hm.
<burgestrand> Wardrop: I have a solution, but I don’t think you’ll be able to use to_json but that’s probably acceptable.
<burgestrand> Give me a second.
<burgestrand> Wardrop: http://ideone.com/eY8H4
<burgestrand> Should change that a little bit.
<burgestrand> Wardrop: better variant: http://ideone.com/JYGR6
d3vic3 has joined #ruby-lang
<Wardrop> I did mention that earlier. You may have missed it: "The JSON library does have an option to leave ignore NaN values, except then NaN literals get sent to the client where they're invalid - it just moves the problem to the client."
dous has quit [Ping timeout: 264 seconds]
<Wardrop> Thanks none the less though
<burgestrand> Turns out generate even takes a hash. Heh.
Hakon has joined #ruby-lang
WillMarshall has quit [Quit: Computer has gone to sleep.]
* burgestrand shrugs
cdt has joined #ruby-lang
tjadc has joined #ruby-lang
srbartlett has quit [Remote host closed the connection]
dhruvasagar has quit [Ping timeout: 246 seconds]
dhruvasagar has joined #ruby-lang
kitallis has quit [Ping timeout: 244 seconds]
FastJack_ has left #ruby-lang [#ruby-lang]
NeVeR_ has joined #ruby-lang
adamIsAdam has quit [Quit: adamIsAdam]
Z33K|Lux has quit [Ping timeout: 264 seconds]
workmad3 has joined #ruby-lang
whatasunnyday has quit [Quit: Leaving]
Hakon has quit [Quit: Leaving...]
dominikh has quit [Remote host closed the connection]
dominikh has joined #ruby-lang
toretore has joined #ruby-lang
judofyr has joined #ruby-lang
heftig has quit [Ping timeout: 248 seconds]
s1n4 has joined #ruby-lang
* s1n4 is confused
<s1n4> which on is the official channel ? #ruby or #ruby-lang ?
<certainty> there is an official channel?
zmack has joined #ruby-lang
<bnagy> this is the official one, fwiw
r0bby is now known as robbyoconnor
<s1n4> and #ruby ?
<s1n4> is it official too ?
<bnagy> no, because this is the official one :)
<certainty> heh
<bnagy> there is one official channel. It is this one.
<s1n4> hmm
s1n4 has left #ruby-lang ["leaving"]
<certainty> lol
Rizzle has quit [Read error: Connection reset by peer]
<bnagy> not official is not the same as 'illegal' or 'filled with pederasts' or whatever
Rizzle has joined #ruby-lang
neocoin has joined #ruby-lang
Rizzle has quit [Read error: Connection reset by peer]
future_chimp has joined #ruby-lang
Hakon has joined #ruby-lang
Rizzle has joined #ruby-lang
Rizzle has quit [Read error: Connection reset by peer]
dous has joined #ruby-lang
dous has joined #ruby-lang
Rizzle has joined #ruby-lang
Rizzle has quit [Read error: Connection reset by peer]
dous has quit [Ping timeout: 244 seconds]
me has joined #ruby-lang
me is now known as Guest70188
Guest70188 has left #ruby-lang [#ruby-lang]
Rizzle has joined #ruby-lang
Guest70188 has joined #ruby-lang
Guest70188 has left #ruby-lang [#ruby-lang]
Rizzle has quit [Read error: Connection reset by peer]
Rizzle has joined #ruby-lang
fgomez has quit [Remote host closed the connection]
Rizzle has quit [Read error: Connection reset by peer]
vesan has quit [Read error: Connection reset by peer]
Rizzle has joined #ruby-lang
Rizzle has quit [Read error: Connection reset by peer]
tomb_ has left #ruby-lang [#ruby-lang]
Rizzle has joined #ruby-lang
dhruvasagar has quit [Ping timeout: 244 seconds]
Rizzle has quit [Read error: Connection reset by peer]
dhruvasagar has joined #ruby-lang
Rizzle has joined #ruby-lang
vesan has joined #ruby-lang
Rizzle has quit [Read error: Connection reset by peer]
gokul has quit [Ping timeout: 240 seconds]
Rizzle has joined #ruby-lang
mssola has joined #ruby-lang
Rizzle has quit [Read error: Connection reset by peer]
jasiek has joined #ruby-lang
Rizzle has joined #ruby-lang
Rizzle has quit [Client Quit]
heftig has joined #ruby-lang
virunga has joined #ruby-lang
charliesome has joined #ruby-lang
dhruvasagar has quit [Ping timeout: 240 seconds]
dhruvasagar has joined #ruby-lang
fgomez has joined #ruby-lang
mjbamford has joined #ruby-lang
Leeky is now known as Leeky_afk
gokul has joined #ruby-lang
gokul is now known as Guest46343
qwerxy has joined #ruby-lang
mjbamford has quit [Ping timeout: 245 seconds]
rue has joined #ruby-lang
heftig has quit [Ping timeout: 248 seconds]
just4dos has joined #ruby-lang
mssola has quit [Ping timeout: 246 seconds]
mssola has joined #ruby-lang
seoaqua has joined #ruby-lang
seoaqua has quit [Client Quit]
phlipper has quit [Ping timeout: 244 seconds]
seoaqua has joined #ruby-lang
<seoaqua> will Tread::join make the program single-threaded? pls check https://github.com/rinzi/rwspider/blob/master/lib/rwspider/client.rb at line 153
<yorickpeterse> seoaqua: No
<yorickpeterse> Thread.join will merely state that the app should wait for the thread to finish executing before terminating the script
<yorickpeterse> If you want to ensure thread safety there's two ways of doing it: 1. don't use threads 2. use a mutex
<yorickpeterse> Also, your indentation is horrible
* certainty likes 1
<rue> yorickpeterse: 2. is kind of ambiguous :P
dhruvasagar has quit [Ping timeout: 246 seconds]
<rue> yorickpeterse: Also, #join is not before terminating the script
<rue> It’s a blocking call
dhruvasagar has joined #ruby-lang
<rue> The #join call you see at the end of a program is just to ensure that the threads finish. Otherwise, they are killed when the main thread exits
<yorickpeterse> Hm, you're correct
<yorickpeterse> Either way, I'd say it's a bad way to ensure only one thread runs
<seoaqua> yorickpeterse, really? maybe i tested in a wrong way
dhruvasagar has quit [Ping timeout: 264 seconds]
dhruvasagar has joined #ruby-lang
<seoaqua> rue, by my testing .join will make threads run in a line(single-threaded)
<seoaqua> rue, i need to re-test it now :)
<rue> It’s pointless to make threads if you don’t intend them to run in parallel
<rue> Fibers might be more appropriate for such a use case
<seoaqua> what if i have a huge queue of tasks and need to run 100 threads at the same time
<rue> You can use a thread pool
<seoaqua> now i put the threads into an Array and foreach to see if anyone is dead ,clear it and put in the new task
<rue> Although besides that, I’m not sure what #join has to do with it?
<workmad3> yorickpeterse: there's more than those 2 ways to ensure thread safety... you could use a semaphore instead of a mutex, you can avoid shared mutable data...
sepp2k has joined #ruby-lang
<seoaqua> that's tow different questions:)
<seoaqua> i dont know how to controll the ThreadPool. it's a gem ,right?
x0F has quit [Disconnected by services]
x0F_ has joined #ruby-lang
x0F_ is now known as x0F
<seoaqua> there is no way to know how many threads have been finished, so i dont know when to insert new ones
<bnagy> you might want to look at Parallel (gem)
<bnagy> or something, it does all that stuff for you
<bnagy> Parallel.each( brazillian_things, in_threads: 16 ) {|thing| #do stuff
<bnagy> pus you get RO access to your binding, which is awesomez
srbartlett has joined #ruby-lang
<seoaqua> bnagy, thanks
<rue> seoaqua: The point of the pool is that it handles it for you
dhruvasagar has quit [Ping timeout: 246 seconds]
dhruvasagar has joined #ruby-lang
w0lverine has quit [Quit: w0lverine]
anildigital_work has joined #ruby-lang
dhruvasagar has quit [Ping timeout: 244 seconds]
dhruvasagar has joined #ruby-lang
snorkdude has joined #ruby-lang
<seoaqua> Thread.new{ sleep 3; puts 't1'}.join ; Thread.new{ puts 't2' }.join could this test represent my problem?
<seoaqua> i think .join will make threads single-threaded
heftig has joined #ruby-lang
<burgestrand> seoaqua: join will make the calling thread wait until the receiving thread exits
<seoaqua> burgestrand, so ruby will execute one thread by one thread?
<burgestrand> seoaqua: no, all other threads will run, just not the one calling other_thread.join
<burgestrand> seoaqua: if you have five threads, and one of them do other_thread.join, four threads will run, one will wait
<seoaqua> burgestrand, i see
charliesome has quit [Ping timeout: 244 seconds]
<seoaqua> burgestrand, thanks
<burgestrand> seoaqua: :)
s1n4 has joined #ruby-lang
dous has joined #ruby-lang
dous has quit [Changing host]
dous has joined #ruby-lang
valeri_uF0 has left #ruby-lang [#ruby-lang]
<seoaqua> how can we merge the two ruby groups here? i sent Matz an email and didn't get a response
valeri_ufo has joined #ruby-lang
<bnagy> now there's a surprise
chancancode has quit [Remote host closed the connection]
dous has quit [Ping timeout: 244 seconds]
<seoaqua> bnagy, what?
icooba has joined #ruby-lang
rutkla_ has joined #ruby-lang
rutkla has quit [Ping timeout: 264 seconds]
<bnagy> I'm shocked that matz didn't reply to an email about something that has absolutely nothing to do with him
dhruvasagar has quit [Ping timeout: 264 seconds]
dhruvasagar has joined #ruby-lang
JoshWines has quit [Quit: Leaving]
runeb has joined #ruby-lang
<shevy> seoaqua matz has nothing to do with either of the channels
<yorickpeterse> seoaqua: it didn't occur to you that Matz might be a very busy person as well?
<yorickpeterse> And as mention by both shevy and bnagy, he has nothing to do with this (community managed) IRC channel
nofxx has quit [Ping timeout: 240 seconds]
mihar has quit [Ping timeout: 246 seconds]
poopppman has joined #ruby-lang
mihar has joined #ruby-lang
poopppman has quit [K-Lined]
dhruvasagar has quit [Ping timeout: 246 seconds]
dhruvasagar has joined #ruby-lang
Xzyx987X has quit [Ping timeout: 264 seconds]
nofxx has joined #ruby-lang
charliesome has joined #ruby-lang
dhruvasagar has quit [Ping timeout: 244 seconds]
<rue> He does, actually, in that he can assert rights over the channel.
dhruvasagar has joined #ruby-lang
<rue> And is, in fact, required to do so
mwjcomputing has joined #ruby-lang
<shevy> good old freenode policies
dhruvasagar has quit [Ping timeout: 249 seconds]
<rue> I was a little miffed that they didn’t even force ##ruby…
dhruvasagar has joined #ruby-lang
jbsan has quit [Quit: jbsan]
Guest46343 has quit [Quit: Leaving]
dous has joined #ruby-lang
dous has quit [Changing host]
dous has joined #ruby-lang
dhruvasagar has quit [Ping timeout: 246 seconds]
dhruvasagar has joined #ruby-lang
bryancp has joined #ruby-lang
runeb has quit [Remote host closed the connection]
gsav has joined #ruby-lang
dhruvasagar has quit [Ping timeout: 246 seconds]
nofxx has quit [Ping timeout: 246 seconds]
dhruvasagar has joined #ruby-lang
runeb has joined #ruby-lang
lcdhoffman has joined #ruby-lang
neocoin has quit [Remote host closed the connection]
nofxx has joined #ruby-lang
nofxx has quit [Changing host]
nofxx has joined #ruby-lang
jxie has quit [Quit: leaving]
lcdhoffman has quit [Quit: lcdhoffman]
charliesome has quit [Quit: Textual IRC Client: www.textualapp.com]
vesan has quit [Read error: Connection reset by peer]
Axsuul has quit [Ping timeout: 272 seconds]
carloslopes has joined #ruby-lang
nofxx has quit [Ping timeout: 244 seconds]
lcdhoffman has joined #ruby-lang
virunga is now known as papagno
Fullmoon has joined #ruby-lang
Fullmoon has quit [Client Quit]
papagno is now known as saette
saette is now known as saetta
vesan has joined #ruby-lang
saetta is now known as papagno
jbsan has joined #ruby-lang
papagno is now known as virunga
NeVeR_ has quit [Ping timeout: 246 seconds]
rutkla has joined #ruby-lang
s1n4 has quit [Quit: peace out]
lcdhoffman has quit [Quit: lcdhoffman]
rutkla_ has quit [Ping timeout: 240 seconds]
lcdhoffman has joined #ruby-lang
lcdhoffman has quit [Client Quit]
bytephilia has joined #ruby-lang
cha1tanya has quit [Ping timeout: 246 seconds]
nofxx has joined #ruby-lang
nofxx has quit [Changing host]
nofxx has joined #ruby-lang
kitallis has joined #ruby-lang
kitallis has quit [Client Quit]
sevvie has joined #ruby-lang
nofxx has quit [Ping timeout: 244 seconds]
havenn has joined #ruby-lang
tommyvyo has joined #ruby-lang
neocoin has joined #ruby-lang
dhruvasagar has quit [Read error: Connection reset by peer]
dhruvasagar has joined #ruby-lang
nofxx has joined #ruby-lang
nofxx has quit [Changing host]
nofxx has joined #ruby-lang
srbartlett has quit [Remote host closed the connection]
dhruvasagar has quit [Ping timeout: 246 seconds]
dhruvasagar has joined #ruby-lang
melter has quit [Read error: Connection reset by peer]
lcdhoffman has joined #ruby-lang
gnufied has joined #ruby-lang
melter has joined #ruby-lang
dhruvasagar has quit [Ping timeout: 264 seconds]
dhruvasagar has joined #ruby-lang
nofxx has quit [Ping timeout: 240 seconds]
jbsan has quit [Quit: jbsan]
Michagogo has joined #ruby-lang
dv310p3r has joined #ruby-lang
hynkle has joined #ruby-lang
gnufied has quit [Quit: Leaving.]
dous has quit [Remote host closed the connection]
<Michagogo> Why is there a #ruby and a #ruby-lang?
nofxx has joined #ruby-lang
dous has joined #ruby-lang
GeekOnCoffee has joined #ruby-lang
mwjcomputing2 has joined #ruby-lang
benwoody has joined #ruby-lang
adambeynon has joined #ruby-lang
<judofyr> because #ruby-lang is BEST!!1!!1
rcassidy has joined #ruby-lang
<workmad3> Michagogo: politics
Michagogo has quit [Remote host closed the connection]
bytephilia has quit [Quit: Computer has gone to sleep.]
<whitequark> btw, parallel gem is awesome
Hanmac has joined #ruby-lang
chiel has joined #ruby-lang
Michagogo has joined #ruby-lang
<whitequark> if you only need map/reduce, then you can have fast implementations for both mri and jruby for fre
<whitequark> *free
<whitequark> that's how I figured out that on my workload, mri is faster than jruby :)
<Hanmac> whitequark "mri is faster then jruby" do you mean the default methods like map or inject/reduce or do you mean the pure ruby code?
<Muz> Or do you mean the time taking to spawn up instances of the interpreter?
<Muz> *taken
akamike has joined #ruby-lang
<whitequark> neither. I have a workload which is basically very heavy on allocation, GC and CPU
<whitequark> in fact it can be used as a RAM test
<whitequark> basically I load a lot of data and then do the heavy processing on it
* Hanmac likes mri more because he makes c++ gems for ruby
<whitequark> in MRI case, I fork and then collect the results. in JRuby case, I create the equivalent number of threads and then collect the results.
jbsan has joined #ruby-lang
<whitequark> and what I see is that basically MRI is marginally faster than any version of JRuby
<whitequark> I have tried increasing heap size for JRuby, but that didn't change much.
outoftime has joined #ruby-lang
nofxx has quit [Ping timeout: 244 seconds]
rolfb has quit [Quit: Leaving...]
<workmad3> whitequark: is that because your runs are short so you're seeing a high impact from jruby's startup time?
<whitequark> workmad3: is 100s short?
<whitequark> I've been bothering with parallel at all because it's fucking slow
<whitequark> (without parallel, that'd be 400s on my i7 with 4 physical cores)
<workmad3> whitequark: jruby startup time can be 3%-5% of that, in my (very limited) experience :)
<whitequark> by the way, hyperthreading is worthless.
Michagogo has left #ruby-lang [#ruby-lang]
<whitequark> going from 4 cores to 8 cores doesn't give any increase in performance; it indeed gives a slight decrease due to overhead.
<whitequark> parallel gem is awesome because it includes a cross-platform method to determine amount of physical cores.
dhruvasagar has quit [Ping timeout: 246 seconds]
<Hanmac> i cant wait for a mruby benchmark
<whitequark> like if it's something actually interesting.
srbartlett has joined #ruby-lang
<whitequark> I'm absolutely sure that the only way you could get Ruby to run fast enough to be actually usable in embedded is to do whole-program analysis
<whitequark> not some funky bytecode-to-C translation, which, while allows for some optimizations by a decent compiler (i.e. not gcc), is still very naive
<whitequark> and mruby isn't suited for whole-program analysis at all
d3vic3 has quit [Quit: leaving]
<whitequark> just look at its IR.
srbartlett has quit [Ping timeout: 240 seconds]
Hanmac has quit [Ping timeout: 246 seconds]
nofxx has joined #ruby-lang
<whitequark> if you're curious what I consider the right approach, I have an article about that: http://whitequark.org/blog/2011/12/21/statically-compiled-ruby/
chiel has left #ruby-lang [#ruby-lang]
<whitequark> and I'm currently working full-time on implementing that.
<yorickpeterse> whitequark: Please, get a custom theme for that blog :)
<yorickpeterse> It's *everywherE*
<yorickpeterse> s/E/e
havenn has quit [Remote host closed the connection]
<yorickpeterse> Other than that I like how you're actually going into detail, it's hard to find proper technical blags these days
nofxx has quit [Ping timeout: 246 seconds]
valeri_ufo has quit [Read error: Connection reset by peer]
valeri_ufo has joined #ruby-lang
<whitequark> yorickpeterse: it's just an overview :)
<whitequark> and you can expect a very in-depth series of articles on writing decompilers for interpreted languages
<whitequark> based on what I've did for furnace-avm2
<yorickpeterse> neat
<Muz> [6~[6~[6~[6~[6~[6~[6~aa [6~[6~
<yorickpeterse> Is furnace more general purpose or aimed at Ruby?
<yorickpeterse> Because if the latter it means I have competition :)
<Muz> Whoops.
<whitequark> yorickpeterse: Furnace is a framework which provides common stuff like AST, CFG and relevant algorithms
<whitequark> Furnace for AVM2 is an implementation which is targeted at AVM2, but everything except AVM2-specific stages is pretty generic
<yorickpeterse> Ah
<yorickpeterse> Well, my stuff is Ruby specific so that's fine :)
<whitequark> i.e. my DICM transformation, SSA optimizer and CFG reducer (basically the same stuff Emscripten uses to recreate loops) are ISA-independent
<whitequark> [DICM stands for Dataflow Invariant Code Motion. I kind of (re)invented it. It's mostly useful for "fixing" obfuscated code.]
Hanmac has joined #ruby-lang
stephendavis89 has joined #ruby-lang
<yorickpeterse> So how exactly would one use Furnace, I take it they have to write some sort of declaration of the syntax and what not?
<whitequark> Furnace only works with ASTs
<whitequark> you have to write your own parser for whatever format you have
<whitequark> there's also Foundry, i.e my Ruby implementation I'm working on.
sailias has joined #ruby-lang
<whitequark> I aim to write a proper and as complete as it is possible [targets can place restrictions of different severity] implementation of Ruby for usage in compile-time, and a backend infrastructure flexible enough to be able to codegen both JavaScript and LLVM
<whitequark> JS is a significantly easier target, and it'll be a nice intermediate step
retro|cz has joined #ruby-lang
jxie has joined #ruby-lang
andrewhl has joined #ruby-lang
<judofyr> whitequark: I have a YARV-to-JS at github.com/judofyr/rubyscript
JohnBat26 has quit [Ping timeout: 244 seconds]
gnufied has joined #ruby-lang
<rue> Is there a best practice for setup/teardown or transacting the DB for tests for mongoid?
<judofyr> whitequark: the Object model might be interesting: https://github.com/judofyr/rubyscript/blob/master/lib/rubyscript/base.js
<rue> “As someone who writes tests, I want to have a clean database to test against”
wmoxam_ has joined #ruby-lang
<yorickpeterse> My biggest gripe so far with parsing Ruby is that Ripper is somewhat meh
<yorickpeterse> What annoys me most is that it uses different callbacks (and formats) for calls such as `puts "Foo"` and `puts("Foo")`
nofxx has joined #ruby-lang
nofxx has quit [Changing host]
nofxx has joined #ruby-lang
<whitequark> judofyr: I have, too
<whitequark> yorickpeterse: I use Melbourne from Rubinius
<judofyr> whitequark: lookups (methods, constants) in my version uses plain JS lookups though (with a prototype-chain), so it should be faster
<judofyr> you've actually ported the C code
<judofyr> woah
stephendavis89 has quit [Ping timeout: 245 seconds]
<yorickpeterse> whitequark: I strictly decided not to use Rubinius as it makes it harder to use the tool. The beauty of YARV is that it's installed on almost, if not every, Ruby dev's machine
<yorickpeterse> plus Ripper comes with YARV so it means no (at least for now) external deps
<whitequark> yorickpeterse: rvm 1.9.3 do gem install melbourne
<whitequark> judofyr: lookups through prototype chain are indeed more fast and less correct.
<yorickpeterse> whitequark: oh? Hm, interesting
<yorickpeterse> Hmpf, last gem release was in 2010
<judofyr> whitequark: "less correct"? in what sense? I believe I implemented lookup correctly (although I need a loop to handle modules)
<whitequark> judofyr: hmmm, now that's interesting
<yorickpeterse> meh, my own parser is getting pretty complete so switching would be a waste
<whitequark> I've evaluated the prototype chain method and decided it can't handle complete Ruby semantics
<whitequark> judofyr: do you handle every single arrow here: http://whitequark.org/images/static-ruby/ruby-eigenclass.png ?
<whitequark> yorickpeterse: 2010, whatever, I don't care, 1.9 syntax didn't change for ages and so didn't Melbourne
<whitequark> yorickpeterse: what's your parser is written in? Treetop/Parslet?
<rue> Answering my question, http://procbits.com/tag/mongoid/, database_cleaner
Hanmac has left #ruby-lang [#ruby-lang]
<whitequark> judofyr: I'm pretty sure you don't. I was writing not a "Ruby-like" implementation but a completely compatible one to MRI
<whitequark> there are way too many Ruby-like languages already, nobody needs another one
<whitequark> Mirah, whatever
<whitequark> toys
<rue> Do too
<judofyr> whitequark: I was aiming for full-ruby too. (although I never finished it)
Avishek12 has joined #ruby-lang
<whitequark> *shrug* coldruby was completed in two weeks or so, intermittenly
<whitequark> it's not that hard
<yorickpeterse> whitequark: Ripper
<judofyr> whitequark: I know. but it still takes time :)
<whitequark> yorickpeterse: ahh, so you're the Ripper author
<yorickpeterse> it basically converts Ripper's sexp output into a collection of token classes that can carry a bit more information
<yorickpeterse> No
<yorickpeterse> I didn't write Ripper, I'm just using it
<yorickpeterse> If I wrote Ripper I would've at least documented it more properly :)
<yorickpeterse> Though I intend to fix that once I have the time to send a PR
<judofyr> whitequark: Mirah has a completely different goal though
<whitequark> so, what do you do with its output?
<judofyr> whitequark: it's a Java-alternative, not a Ruby-alternative
<whitequark> judofyr: indeed
snorkdude has quit [Remote host closed the connection]
<yorickpeterse> whitequark: was that re: me?
sailias has quit [Quit: Leaving.]
erichmenge has joined #ruby-lang
<whitequark> yorickpeterse: yep
<seoaqua> i was afk
<rue> It’s numberwang!
<whitequark> what
<seoaqua> but the op told me matz has the administrator previledge of this channel
<yorickpeterse> whitequark: Well, the Sexp output Ripper generates isn't very useful in its own. It's a pain to write code such as `args[0][2][0]` just to get the line number. On top of that the format can differ quite a bit depending on the context.
<yorickpeterse> What I'm doing is converting this output to an array of custom token classes, each containing it's own data such as the line number, method name, etc
<whitequark> yorickpeterse: the sexp format looks like that for a reason.
dfr|mac has joined #ruby-lang
<yorickpeterse> Once the parser is solid enough (right now I'm having some trouble with *args for example) I'll be moving on to the actual analysis part
<whitequark> it's very generic and its generic-ness is incredibly useful if you want to write transformations
<yorickpeterse> True
<whitequark> I have solved the exact same problem like this in Furnace:
<yorickpeterse> I should probably push the code to Github somewhere this week, that way I can have other Rubyists yell at me :)
<whitequark> there's an AST::Node class which has type (sexps without an explicit types, i.e. just lists, are arrays), children, and metadata.
<whitequark> children are whatever you want them to be. there are no restrictions whatsoever
<yorickpeterse> atm I have a bunch of special purpose token classes (e.g. ClassToken) but I feel I may have too many
<whitequark> and data like line numbers or barriers or whatever is added to the metadata hash
<yorickpeterse> Not a huge fan of an accessor/reader named `metadata` or `extra` though
<whitequark> it's a tradeoff between flexibility and usability.
<whitequark> yeah neither am I, but this is the case when it's perfectly applicable
nagato has quit [Quit: my website: http://stardiviner.dyndns-blog.com/]
<whitequark> was totally worth it
<yorickpeterse> hold on, lemme get the output so you can see what I'm on about
<whitequark> yep I understand what do you mean
<whitequark> Melbourne has a similar output formt
<yorickpeterse> Oh fuck that's right, I didn't push it to anything
<yorickpeterse> Hmpf
<whitequark> I will convert it to my internal AST format
<yorickpeterse> meh, I'll put it on GH this evening
<whitequark> yours is pretty much unusable for transformations.
Mchl has quit [Quit: ZNC - http://znc.sourceforge.net]
<whitequark> if I have a getlocal somewhere and I want to replace it, I don't care whether it was a + token or a class one
Hakon has quit [Quit: Leaving...]
<whitequark> I just want to replace the subtree and that's it
andrewhl has quit [Remote host closed the connection]
<yorickpeterse> Well, I don't have a separate class for *every* item
andrewhl has joined #ruby-lang
Mchl has joined #ruby-lang
<whitequark> basically the only thing you need is a Visitor where for each node there'll be a function which will explicitly visit every subtree, as opposed to non-subtree data
<whitequark> even it is not mandatory, but the old code I had with send magic wasn't clean at all
<whitequark> so I decided to rewrite it in a stricter way
burgestrand has quit [Quit: Leaving.]
tonni has quit [Remote host closed the connection]
coryf has joined #ruby-lang
<whitequark> actually I stole the visitor idea from UglifyJS, where it has landed from Common Lisp
Avishek12 has quit [Ping timeout: 260 seconds]
<judofyr> I think I have a Ripper-to-RubyParser somewhere
snorkdude has joined #ruby-lang
<whitequark> well, I could maybe sometimes use the Ripper parser
dfr|mac has quit [*.net *.split]
nofxx has quit [*.net *.split]
wmoxam_ has quit [*.net *.split]
gnufied has quit [*.net *.split]
jbsan has quit [*.net *.split]
x0F has quit [*.net *.split]
just4dos has quit [*.net *.split]
virunga has quit [*.net *.split]
Wardrop has quit [*.net *.split]
ramonmaruko has quit [*.net *.split]
vertroa_ has quit [*.net *.split]
naquad has quit [*.net *.split]
VGoff has quit [*.net *.split]
setmeaway has quit [*.net *.split]
kirin` has quit [*.net *.split]
t0h_ has quit [*.net *.split]
Skif has quit [*.net *.split]
ReinH has quit [*.net *.split]
thorncp has quit [*.net *.split]
mahlon has quit [*.net *.split]
ged has quit [*.net *.split]
SubSpawn has quit [*.net *.split]
anacond109 has quit [*.net *.split]
<whitequark> but I actually may have a need to marshal the AST sometimes, and for that case, my own format is the best choice
andrewhl has quit [Ping timeout: 246 seconds]
<whitequark> at least due to compatibility reasons
<whitequark> yorickpeterse: may I recommend you a book?
Avishek12 has joined #ruby-lang
<yorickpeterse> whitequark: Yes of course
<whitequark> worth every cent and every minute spent
|Vargas| has quit [Quit: ...]
<yorickpeterse> If you could take a look at my shitty code somewhere this week and yell at me that would be lovely :)
<whitequark> sure
<whitequark> I hang out on #r-l most of the time, and I'm in UTC+3
<whitequark> or maybe +4, dunno
<whitequark> something like that
<yorickpeterse> Ah, UTC+2 here
Avishek12 is now known as 92AABBCCG
ged has joined #ruby-lang
kirin` has joined #ruby-lang
dfr|mac has joined #ruby-lang
nofxx has joined #ruby-lang
gnufied has joined #ruby-lang
jbsan has joined #ruby-lang
wmoxam_ has joined #ruby-lang
x0F has joined #ruby-lang
just4dos has joined #ruby-lang
ramonmaruko has joined #ruby-lang
virunga has joined #ruby-lang
vertroa_ has joined #ruby-lang
Wardrop has joined #ruby-lang
VGoff has joined #ruby-lang
naquad has joined #ruby-lang
setmeaway has joined #ruby-lang
t0h_ has joined #ruby-lang
Skif has joined #ruby-lang
ReinH has joined #ruby-lang
thorncp has joined #ruby-lang
mahlon has joined #ruby-lang
SubSpawn has joined #ruby-lang
anacond109 has joined #ruby-lang
rutkla has quit [Excess Flood]
kirin` has quit [Max SendQ exceeded]
ged is now known as Guest42577
judofyr has quit [Remote host closed the connection]
kirin` has joined #ruby-lang
zmack has quit [Remote host closed the connection]
wmoxam_ has quit [Read error: Connection reset by peer]
bfreeman has quit [Quit: bfreeman]
deryl has joined #ruby-lang
<solars> hey, I've got some content that apparently is utf-8, and post it through net-http. somehow with special characters it seems to hang forever. does anyone know something about this problem with ruby 1.9?
snorkdude has quit [Remote host closed the connection]
<whitequark> solars: testcase please
snorkdude has joined #ruby-lang
dv310p3r has quit [Ping timeout: 272 seconds]
<solars> it's a bit difficult to make it publicly accessible, but where it fails is this: https://gist.github.com/aacaf823d8d481dea642
<solars> the xml (bottom of the gist) is sent to the server through that method
itsmeduncan has joined #ruby-lang
tonni has joined #ruby-lang
deryl has quit [Quit: deryl]
enebo has joined #ruby-lang
andrewhl has joined #ruby-lang
<yorickpeterse> Does it work with regular ASCII text?
<rue> s/where it fails/where I assume it fails/
<yorickpeterse> I have a feeling it might be the SSL part instead of the encoding
KillerFox has quit [Ping timeout: 265 seconds]
<solars> yes it works with regular ascii
<solars> I think the problem is this 3/4 character there
<solars> but I don't really know how to encode this for xml
nofxx has quit [Ping timeout: 240 seconds]
<solars> such that ü is &#252; for example (xml entities)
deryl has joined #ruby-lang
KillerFox has joined #ruby-lang
<yorickpeterse> Assuming the data can be converted to UTF8 you can do so using `some_string.encode('utf-8')`
<solars> let me try that
<yorickpeterse> Though as far as I'm aware Net::HTTP doesn't give a rat's ass about your encoding and just sends it along the wire as it's told
<solars> yeah thats why I get the timeout I think..
shevy has quit [Ping timeout: 246 seconds]
<workmad3> solars: net::http isn't responsible for XML encoding
<workmad3> solars: you should use an XML library for that :P
<workmad3> solars: XML escaping even :)
<solars> yeah sure, I already gsub'ed the u umlaut as above - but I have no idea what kind of methods/lib do this kind of encoding as it doesn't look like html entities
slux_ has joined #ruby-lang
brunocoelho has joined #ruby-lang
<workmad3> solars: well, what created the XML you're sending?
<solars> I don't know, but I'd send them to mars immediately
<workmad3> solars: because it should probably be some form of XML library, like nokogiri :)
<solars> it comes out of a huge java buggy java app :)
<yorickpeterse> oh boy, that sounds fun
<solars> I've already turned into hulk today..
<workmad3> solars: you could also try setting the content-type more appropriately
<workmad3> solars: e.g. to 'text/xml; charset=utf-8'
<solars> does anyone know a rest helper lib? I think there was one called rest... something, which provides a bit more abstraction on top of nethttp - maybe it does better encoding
jrbing has left #ruby-lang [#ruby-lang]
<solars> workmad3, I will try that as well
<workmad3> solars: rest-client maybe? or just httparty (not a rest client specifically, but a nicer layer on top of plain net/http)
<solars> ah rest client could be, yeah
<solars> I will try both
<solars> maybe it works :)
apeiros_ has joined #ruby-lang
nofxx has joined #ruby-lang
nofxx has quit [Changing host]
nofxx has joined #ruby-lang
dfr|mac has quit [Remote host closed the connection]
shevy has joined #ruby-lang
coryf has quit [Remote host closed the connection]
carloslopes has quit [Quit: Leaving.]
jbsan has quit [Quit: jbsan]
jtoy has joined #ruby-lang
cantonic has joined #ruby-lang
jbsan has joined #ruby-lang
gnufied has quit [Quit: Leaving.]
chimkan_ has joined #ruby-lang
<cantonic> Hi jarib - hope you can help me. I am using watir-webdriver with headless gem. My development machine is a mac and since I upgraded to mountain lion i get "Xvfb not found on your system". Do you have a clue how to work around that? I don't want to turn headless off since the production machine is ubuntu with xvfb
savage- has joined #ruby-lang
akira989 has joined #ruby-lang
nofxx has quit [Ping timeout: 246 seconds]
chimkan___ has joined #ruby-lang
dhruvasagar has joined #ruby-lang
chimkan_ has quit [Ping timeout: 250 seconds]
chimkan___ has quit [Client Quit]
arooni-mobile has joined #ruby-lang
zmack has joined #ruby-lang
jaeckel has joined #ruby-lang
jaeckel has left #ruby-lang [#ruby-lang]
<workmad3> cantonic: didn't they remove x11 (and probably by extension xvfb) in mountain lion?
chimkan has joined #ruby-lang
jbsan has quit [Quit: jbsan]
<cantonic> workmad3: phew… i dunno :(
chimkan has quit [Client Quit]
<cantonic> yeah, maybe i have to upgrade x11
<workmad3> cantonic: probably worth investigating... I remember reading something about it, but I'm still on snow leopard :)
<cantonic> workmad3: yeah you are right. http://support.apple.com/kb/HT5293?viewlocale=en_US
<cantonic> workmad3: but generally mountain lion is quite cool. you should try it out
<cantonic> but how do they say? never change a running system? ;)
chimkan has joined #ruby-lang
<workmad3> cantonic: 'if it aint broke, don't fuck it up by upgrading to mountain lion'?
jbsan has joined #ruby-lang
nofxx has joined #ruby-lang
nofxx has quit [Changing host]
nofxx has joined #ruby-lang
<cantonic> yeah, i should have gone with lion.
<workmad3> cantonic: there's one for that too... want to make a guess at what it is? :)
<cantonic> workmad3: tell me :)
<workmad3> cantonic: 'if it aint broke, don't f*** it up by upgrading to lion' ;)
<workmad3> cantonic: or, alternatively, 'eww, inverse scrolling!!'
<cantonic> i remember that one :)
<cantonic> workmad3: inverse scrolling is cool
<workmad3> cantonic: sure it is....
<cantonic> workmad3: you have to get used to it but after 2 days it feels better
* workmad3 backs away from the crazy person
<cantonic> lol
<cantonic> workmad3: you have an iphone or ipad?
<workmad3> cantonic: I've heard the same thing is true about having your eyes removed with an ice-cream scoop
<workmad3> cantonic: as long as the ice-creame scoop is apple-branded, anyway...
<cantonic> workmad3: inverse scrolling makes totally sence, doesn't it
<workmad3> cantonic: it does... when you're actually touching the screen
<cantonic> yeah and this gives you the same feeling :)
<workmad3> cantonic: it doesn't, IMO, when you're using something that isn't the screen
<cantonic> even on a trackpad
<workmad3> cantonic: I remain unconvinced :P
<cantonic> hehehe
neocoin has quit [Remote host closed the connection]
chimkan___ has joined #ruby-lang
<workmad3> cantonic: incidentally, I have an apple ice-cream scoop here, and I've heard it makes total sense to have your eyeballs forcibly removed...
cantonic has left #ruby-lang [#ruby-lang]
cantonic has joined #ruby-lang
<cantonic> workmad3: ah sorry, i closed the window. what was your last sentence?
<workmad3> cantonic: just the offer of a vicious mutilation by an 'apple' product :)
arooni-mobile has quit [Ping timeout: 246 seconds]
erichmenge has quit [Quit: Be back later]
erichmenge has joined #ruby-lang
<cantonic> workmad3: do you know ghandi? he said "First they ignore you, then they laugh at you, then they fight you, then you win." :D
chimkan has quit [Ping timeout: 246 seconds]
chimkan___ is now known as chimkan
<workmad3> cantonic: depends what you class as 'winning' :P
achiu has quit [Quit: WeeChat 0.3.7]
erichmenge has quit [Client Quit]
<cantonic> winning = convincing everyone that inverse scrolling is the best thing that could have happened to us since the industrial revolution :D
achiu has joined #ruby-lang
<workmad3> cantonic: winning = removing your eyeballs with an ice-cream scoop...
<workmad3> cantonic: hey look, we could both win! :D
<cantonic> hahaha
jastix has joined #ruby-lang
cha1tanya has joined #ruby-lang
chimkan has quit [Quit: chimkan]
solars has quit [Ping timeout: 244 seconds]
<yorickpeterse> whitequark: Here, go hate on this code when you have some time left: https://github.com/YorickPeterse/rlint. Example of the AST: https://gist.github.com/8af7b935daad5109ebd2
cantonic has quit [Quit: cantonic]
<yorickpeterse> Not sure if I like it how method calls are shown in reverse order (due to them being parsed that way) but it will do for now
<yorickpeterse> Hmpf, it also seems to die on multiple method parameters
bytephilia has joined #ruby-lang
tonni has quit [Remote host closed the connection]
zz_chrismcg has left #ruby-lang [#ruby-lang]
chrismcg has joined #ruby-lang
gnufied has joined #ruby-lang
92AABBCCG has quit []
cdt has quit [Quit: Ex-Chat]
gnufied has quit [Quit: Leaving.]
tjadc has quit [Ping timeout: 246 seconds]
butchanton has joined #ruby-lang
bfreeman has joined #ruby-lang
adam_ has joined #ruby-lang
<jarib> cantonic: sorry, i've never used Xvfb on OS X. if i usually use virtualbox if i need to get browser stuff out of my way
erichmenge has joined #ruby-lang
scampbell has joined #ruby-lang
rodj has joined #ruby-lang
Leeky_afk is now known as Leeky
fgomez has quit [Ping timeout: 246 seconds]
adam_ has quit [Quit: adam_]
w0lverine has joined #ruby-lang
carloslopes has joined #ruby-lang
towski has joined #ruby-lang
carloslopes has joined #ruby-lang
headius has joined #ruby-lang
workmad3 has quit [Ping timeout: 246 seconds]
adam___ has joined #ruby-lang
mk03 has joined #ruby-lang
Cidiomar has joined #ruby-lang
arooni-mobile has joined #ruby-lang
chrismcg is now known as zz_chrismcg
jbsan has quit [Quit: jbsan]
snorkdude has quit [Remote host closed the connection]
havenn has joined #ruby-lang
future_chimp has quit [Quit: Leaving]
jbsan has joined #ruby-lang
dv310p3r has joined #ruby-lang
cirenyc has joined #ruby-lang
gnufied has joined #ruby-lang
gnufied has quit [Client Quit]
<cirenyc> What is the best way to use that mapping to create a new hash from an existing hash.
<cirenyc> Given that the keys in CC_FIELDS_STORED should be the keys of the new hash and the values are pulled from the old hash using the values in CC_FIELDS_STORED?
benanne has joined #ruby-lang
nofxx has quit [Ping timeout: 272 seconds]
publicvoid has joined #ruby-lang
coryf has joined #ruby-lang
Cidiomar has quit [Quit: Cidiomar]
dv310p3r has quit [Ping timeout: 264 seconds]
qwerxy has quit [Read error: Operation timed out]
coryf_ has joined #ruby-lang
Carnage\ has joined #ruby-lang
coryf has quit [Ping timeout: 250 seconds]
nofxx has joined #ruby-lang
nofxx has quit [Changing host]
nofxx has joined #ruby-lang
coryf has joined #ruby-lang
coryf has quit [Read error: Connection reset by peer]
burgestrand has joined #ruby-lang
coryf_ has quit [Read error: No route to host]
havenn has quit [Remote host closed the connection]
coryf has joined #ruby-lang
<apeiros_> cirenyc: what approach have you tried so far?
rcassidy has quit [Quit: leaving]
<apeiros_> also, I understand your source hash looks like {name: "…", :address_line1: "…", …} and your resulting hash should look like {name: "…", address_street_1: "…", …} - is that correct?
adam___ has left #ruby-lang [#ruby-lang]
<apeiros_> cirenyc: yeah, that looks sane
burgestrand has quit [Ping timeout: 244 seconds]
<apeiros_> is customer.active_card a plain hash?
<cirenyc> It's an object that responds to string keys and dot notation
<apeiros_> then your original problem description isn't quite correct :-p
<apeiros_> no values_at I suppose?
<apeiros_> anyway, if this code doesn't have performance issues, I'd leave it as is
akira989 has quit [Remote host closed the connection]
<apeiros_> alternatives would be to use values_at (if available) + zip + Hash::[], or map + Hash::[]
lsegal has joined #ruby-lang
benjamin-patch has joined #ruby-lang
coryf has quit [Ping timeout: 264 seconds]
akira989 has joined #ruby-lang
<cirenyc> apeiros_: okay, going to leave as is, but I goofed somewhere. I'm getting wrong values in the new hash with that code.
<apeiros_> should not be due to the code you just pasted
<apeiros_> at least I see nothing wrong with that piece
coryf has joined #ruby-lang
lcdhoffman has quit [Quit: lcdhoffman]
naz has joined #ruby-lang
slux_ has quit [Remote host closed the connection]
rutkla has joined #ruby-lang
w0lverine has quit [Quit: w0lverine]
rockpapergoat has joined #ruby-lang
havenn has joined #ruby-lang
fgomez has joined #ruby-lang
dc5ala has quit [Quit: Ex-Chat]
<cirenyc> apeiros_: yeah, not sure why yet, but I'm getting back the CC_FIELD values (the symbol, not the actual value)
<cirenyc> {:address_street_1 => :address_line1, .. }
jackhammer2022 has joined #ruby-lang
dv310p3r has joined #ruby-lang
mrsolo has joined #ruby-lang
slux has joined #ruby-lang
fgomez has quit [Ping timeout: 246 seconds]
slux has quit [Remote host closed the connection]
sepp2k has quit [Read error: Connection reset by peer]
slux has joined #ruby-lang
sepp2k has joined #ruby-lang
<apeiros_> cirenyc: oh, I should have looked closer
nofxx has quit [Ping timeout: 250 seconds]
<apeiros_> cirenyc: why do you do `credit_card = CC_FIELDS.each`?
<yxhuvud> hmm. will classes be garbage collected if nothing (including constants) refer to them?
<apeiros_> you already assigned a value to credit_card. and you override it with CC_FIELDS (CC_FIELDS.each returns CC_FIELDS)
<apeiros_> yxhuvud: don't know how it is in 1.9, but in 1.8, code did not get GCed afaik
bytephilia has quit [Read error: Operation timed out]
<yxhuvud> frown.
<cirenyc> apeiros_: yup, I just saw that. brain fart w/ that extra assignment. thanks for catching.
cha1tanya has quit [Ping timeout: 244 seconds]
sevvie has quit [Quit: sevvie]
jbsan has quit [Quit: jbsan]
sevvie has joined #ruby-lang
lcdhoffman has joined #ruby-lang
lcdhoffman has quit [Client Quit]
lcdhoffman has joined #ruby-lang
lcdhoffman has quit [Client Quit]
Weems has quit [Read error: Connection reset by peer]
lcdhoffman has joined #ruby-lang
nofxx has joined #ruby-lang
nofxx has quit [Changing host]
nofxx has joined #ruby-lang
benjamin-patch has quit [Quit: Computer has gone to sleep.]
sevvie has quit [Quit: sevvie]
jbsan has joined #ruby-lang
snorkdude has joined #ruby-lang
jbsan has quit [Client Quit]
jaylevitt has joined #ruby-lang
w0lverine has joined #ruby-lang
s0ber_ has joined #ruby-lang
yorickpeterse1 has joined #ruby-lang
yorickpeterse1 has quit [Changing host]
yorickpeterse1 has joined #ruby-lang
yorickpeterse has quit [Disconnected by services]
yorickpeterse1 is now known as yorickpeterse
zmack_ has joined #ruby-lang
My_Hearing has joined #ruby-lang
s0ber has quit [Write error: Broken pipe]
s0ber_ is now known as s0ber
amerine has joined #ruby-lang
cout_ has joined #ruby-lang
derpemil1 has joined #ruby-lang
epitron_ has joined #ruby-lang
shajith_ has joined #ruby-lang
lucas_ has joined #ruby-lang
matti_ has joined #ruby-lang
lzhz has joined #ruby-lang
bmaland has joined #ruby-lang
jaska_ has joined #ruby-lang
dhruvasa1ar has joined #ruby-lang
zmack has quit [Ping timeout: 244 seconds]
spuk_ has joined #ruby-lang
havenn has quit [Remote host closed the connection]
Jay_Levitt has quit [Excess Flood]
abuiles has quit [Excess Flood]
Jay_Levitt has joined #ruby-lang
ruskie has quit [Excess Flood]
abuiles has joined #ruby-lang
amerine_ has quit [Write error: Broken pipe]
bmaland_ has quit [Write error: Broken pipe]
derpemily has quit [Write error: Broken pipe]
epitron__ has quit [Write error: Broken pipe]
shajith has quit [Write error: Broken pipe]
cout has quit [Write error: Broken pipe]
dhruvasagar has quit [Write error: Broken pipe]
Mon_Ouie has quit [Write error: Broken pipe]
lucas has quit [Remote host closed the connection]
lzhz_ has quit [Remote host closed the connection]
jaska has quit [Remote host closed the connection]
zigidias has quit [Ping timeout: 646 seconds]
gianlucadv has quit [Ping timeout: 646 seconds]
matti has quit [Remote host closed the connection]
spuk has quit [Write error: Broken pipe]
matti_ is now known as matti
gianlucadv has joined #ruby-lang
zigidias_ has joined #ruby-lang
akira989 has quit [Remote host closed the connection]
Weems has joined #ruby-lang
gsav has quit [Ping timeout: 244 seconds]
jaska_ has left #ruby-lang [#ruby-lang]
kain has quit [Ping timeout: 250 seconds]
jaska has joined #ruby-lang
voker57 has quit [Remote host closed the connection]
Weems has quit [Read error: Connection reset by peer]
Weems has joined #ruby-lang
jackhammer2022 has quit [Quit: leaving]
solars has joined #ruby-lang
ruskie has joined #ruby-lang
neocoin has joined #ruby-lang
jbsan has joined #ruby-lang
bryancp has quit [Remote host closed the connection]
arooni-mobile has quit [Ping timeout: 264 seconds]
qpingu has joined #ruby-lang
zmack_ has quit [Remote host closed the connection]
havenn has joined #ruby-lang
havenn has quit [Remote host closed the connection]
cout_ is now known as cout
akira989 has joined #ruby-lang
arooni-mobile has joined #ruby-lang
cirenyc has quit [Ping timeout: 246 seconds]
akira989 has quit [Remote host closed the connection]
jtoy has quit [Quit: jtoy]
deryl has quit [Quit: deryl]
workmad3 has joined #ruby-lang
erichmenge has quit [Quit: Be back later]
erichmenge has joined #ruby-lang
macmartine has joined #ruby-lang
erichmenge has quit [Client Quit]
erichmenge has joined #ruby-lang
lcdhoffman has quit [Quit: lcdhoffman]
erichmenge has quit [Client Quit]
runeb has quit [Remote host closed the connection]
tpope_ has left #ruby-lang [#ruby-lang]
t4nkd has joined #ruby-lang
tpope has joined #ruby-lang
tjadc has joined #ruby-lang
mwjcomputing has quit [Quit: Leaving]
<whitequark> yorickpeterse: I seen what you did there :)
rodj has quit [Ping timeout: 245 seconds]
<whitequark> I'll write my comments tomorrow, it's time to get some sleep
havenn has joined #ruby-lang
banisterfiend has quit [Read error: Connection reset by peer]
jastix has quit [Quit: Leaving]
banisterfiend has joined #ruby-lang
<yorickpeterse> Ok, thanks :)
benanne has quit [Quit: kbai]
benanne has joined #ruby-lang
bryancp has joined #ruby-lang
dfr|mac has joined #ruby-lang
snorkdude has quit [Remote host closed the connection]
Axsuul has joined #ruby-lang
bryancp has quit [Remote host closed the connection]
havenn has quit [Remote host closed the connection]
chimkan_ has joined #ruby-lang
deryl has joined #ruby-lang
My_Hearing is now known as Mon_Ouie
Weems has quit [Read error: Connection reset by peer]
headius_ has joined #ruby-lang
headius has quit [Disconnected by services]
headius_ is now known as headius
lcdhoffman has joined #ruby-lang
slux has quit [Ping timeout: 250 seconds]
neocoin has quit [Remote host closed the connection]
lcdhoffman has quit [Read error: Connection reset by peer]
lcdhoffman has joined #ruby-lang
Guest42577 has left #ruby-lang [#ruby-lang]
ged has joined #ruby-lang
Xzyx987X has joined #ruby-lang
workmad3 has quit [Ping timeout: 246 seconds]
pxjorge has joined #ruby-lang
imajes has quit [Excess Flood]
imajes has joined #ruby-lang
wallerdev has joined #ruby-lang
dous has quit [Remote host closed the connection]
dous has joined #ruby-lang
RickHull has joined #ruby-lang
snorkdude has joined #ruby-lang
dous has quit [Ping timeout: 252 seconds]
lcdhoffman has quit [Quit: lcdhoffman]
snorkdude has quit [Remote host closed the connection]
solars has quit [Quit: WeeChat 0.3.7]
adambeynon has quit [Quit: ["Textual IRC Client: www.textualapp.com"]]
rockpapergoat has quit [Remote host closed the connection]
solars has joined #ruby-lang
u_u has quit [Ping timeout: 246 seconds]
dv310p3r has quit [Quit: Leaving]
runeb has joined #ruby-lang
qwerxy has joined #ruby-lang
runeb has quit [Ping timeout: 245 seconds]
jtoy has joined #ruby-lang
u_u has joined #ruby-lang
bryancp has joined #ruby-lang
lcdhoffman has joined #ruby-lang
akira989 has joined #ruby-lang
havenn has joined #ruby-lang
gsav has joined #ruby-lang
indstry has joined #ruby-lang
workmad3 has joined #ruby-lang
hahuang65 has joined #ruby-lang
jtoy has quit [Quit: jtoy]
workmad3 has quit [Quit: Lost terminal]
workmad3 has joined #ruby-lang
headius has quit [Quit: headius]
snorkdude has joined #ruby-lang
dju has quit [Write error: Broken pipe]
gsav has quit [Ping timeout: 245 seconds]
dju has joined #ruby-lang
tommyvyo has quit [Quit: Textual IRC Client: http://www.textualapp.com/]
qwerxy has quit [Quit: offski]
carloslopes has quit [Quit: Leaving.]
rodj has joined #ruby-lang
hynkle has quit [Quit: Computer has gone to sleep.]
snorkdude has quit [Remote host closed the connection]
TorpedoSkyline has joined #ruby-lang
slux has joined #ruby-lang
rodj has quit [Quit: rodj]
macmartine has quit [Quit: ["Textual IRC Client: www.textualapp.com"]]
<rue> So
gsav has joined #ruby-lang
<erikh> yes
scampbell has quit [Remote host closed the connection]
<RickHull> mhmm
<erikh> YEAAAAAAHHHHHHHHHHHHHHHH
workmad3 has quit [Ping timeout: 244 seconds]
<RickHull> i chuckled. time to head home
<erikh> later.
krz has joined #ruby-lang
t4nkd has quit [Quit: Linkinus - http://linkinus.com]
mbriggs has joined #ruby-lang
ilyam has joined #ruby-lang
cantonic has joined #ruby-lang
RickHull has quit [Ping timeout: 265 seconds]
JoshWines has joined #ruby-lang
yxhuvud has quit [Ping timeout: 264 seconds]
hahuang65 has quit [Quit: Computer has gone to sleep.]
t0h_ has quit [Ping timeout: 240 seconds]
jaylevitt has quit [Quit: Leaving...]
solars has quit [Quit: WeeChat 0.3.7]
postmodern has joined #ruby-lang
thone has joined #ruby-lang
t0h has joined #ruby-lang
mssola has quit [Quit: Konversation terminated!]
thone_ has quit [Ping timeout: 246 seconds]
ylluminate has joined #ruby-lang
banisterfiend has quit [Read error: Connection reset by peer]
havenn has quit [Remote host closed the connection]
havenn has joined #ruby-lang
sailias has joined #ruby-lang
hahuang65 has joined #ruby-lang
banisterfiend has joined #ruby-lang
postmodern has quit [Ping timeout: 248 seconds]
dhruvasa1ar has quit [Ping timeout: 250 seconds]
gsav has quit [Ping timeout: 246 seconds]
flebel has quit [Excess Flood]
havenn has quit [Remote host closed the connection]
countdigi has quit [Ping timeout: 246 seconds]
flebel has joined #ruby-lang
bfreeman_ has joined #ruby-lang
bfreeman has quit [Read error: Connection reset by peer]
MrPunkin has joined #ruby-lang
postmodern has joined #ruby-lang
gsav has joined #ruby-lang
u_u has quit [Ping timeout: 252 seconds]
hahuang65 has quit [Quit: Textual IRC Client: http://www.textualapp.com/]
akira989 has quit [Remote host closed the connection]
enebo has quit [Quit: enebo]
gsav has quit [Ping timeout: 248 seconds]
bryancp has quit [Remote host closed the connection]
mbriggs has quit [Remote host closed the connection]
headius has joined #ruby-lang
indstry has quit [Remote host closed the connection]
countdigi has joined #ruby-lang
tonni has joined #ruby-lang
TorpedoSkyline has quit [Quit: Computer has gone to sleep.]
srbartlett has joined #ruby-lang
sailias has quit [Quit: Leaving.]
coryf has quit [Remote host closed the connection]
u_u has joined #ruby-lang
setmeaway has quit [Ping timeout: 240 seconds]
andremaha has joined #ruby-lang
srbartlett has quit [Remote host closed the connection]
dfr|mac has quit [Remote host closed the connection]
sailias has joined #ruby-lang
itsmeduncan has quit [Quit: itsmeduncan]
nofxx has quit [Ping timeout: 240 seconds]
headius has quit [Quit: headius]
nazty has joined #ruby-lang
itsmeduncan has joined #ruby-lang
r0bby has joined #ruby-lang
naz has quit [Ping timeout: 244 seconds]
andremaha has quit [Quit: Colloquy for iPhone - http://colloquy.mobi]
rutkla has quit [Ping timeout: 240 seconds]
robbyoconnor has quit [Ping timeout: 246 seconds]
deryl-android has joined #ruby-lang
toretore has quit [Quit: Leaving]
neocoin has joined #ruby-lang
nofxx has joined #ruby-lang
benanne has quit [Quit: kbai]
fgomez has joined #ruby-lang
mbriggs has joined #ruby-lang
krzkrzkrz has joined #ruby-lang
sailias has quit [Read error: Connection reset by peer]
sailias1 has joined #ruby-lang
nagato has joined #ruby-lang
krz has quit [Ping timeout: 252 seconds]
krzkrzkrz is now known as krz
deryl-android has left #ruby-lang [#ruby-lang]
deryldoucette has joined #ruby-lang
<deryldoucette> weird. said i was banned but i'd already registered before the nick change
butchanton has quit [Quit: Leaving.]
setmeaway has joined #ruby-lang
_whitelogger has joined #ruby-lang
outoftime has quit [Quit: Leaving]
andrewhl has quit [Ping timeout: 245 seconds]
seanstickle has joined #ruby-lang
brdude has quit [Quit: brdude]
mbriggs has joined #ruby-lang
sandbags has joined #ruby-lang
gregmore_ has quit [Read error: Connection reset by peer]
gregmoreno has joined #ruby-lang
brunocoelho has quit [Remote host closed the connection]
t_ has joined #ruby-lang
rubynewbie has joined #ruby-lang
mbriggs has quit [Remote host closed the connection]
banisterfiend has quit [Remote host closed the connection]
nagato has quit [Quit: my website: http://stardiviner.dyndns-blog.com/]
brdude has joined #ruby-lang
S1kx has joined #ruby-lang
bfreeman_ has quit [Quit: bfreeman_]
nagato has joined #ruby-lang
sora_h is now known as s0ra_h
s0ra_h is now known as sora_h