apeiros_ changed the topic of #ruby-lang to: Ruby 2.0.0-p0: http://ruby-lang.org (Ruby 1.9.3-p392) || Paste >3 lines of text on http://gist.github.com
randalla1ordon has left #ruby-lang [#ruby-lang]
randallagordon has joined #ruby-lang
lele|w has joined #ruby-lang
lele has joined #ruby-lang
rking has quit [Quit: WeeChat 0.4.0-rc1]
chendo_ has quit [Quit: Computer has gone to sleep.]
sepp2k has quit [Remote host closed the connection]
gregmoreno has quit [Ping timeout: 255 seconds]
rwk1 has joined #ruby-lang
sailias has joined #ruby-lang
rwk1 has quit [Ping timeout: 240 seconds]
jxw has quit [Quit: Textual IRC Client: www.textualapp.com]
fraggle has joined #ruby-lang
lolzie has joined #ruby-lang
fraggle has quit [Client Quit]
agarie has joined #ruby-lang
wyhaines has quit [Remote host closed the connection]
lele has quit [Ping timeout: 246 seconds]
lele|w has quit [Ping timeout: 246 seconds]
lele|w has joined #ruby-lang
jfelchner has quit [Ping timeout: 264 seconds]
jfelchner has joined #ruby-lang
bawigga has quit [Quit: Textual IRC Client: www.textualapp.com]
kurko_ has quit [Quit: Computer has gone to sleep.]
sailias has quit [Quit: Leaving.]
wmoxam has joined #ruby-lang
lele has joined #ruby-lang
idkazuma has quit [Remote host closed the connection]
nXqd has joined #ruby-lang
symm- has joined #ruby-lang
Nuru has joined #ruby-lang
mwjcomputing has joined #ruby-lang
nXqd has quit [Ping timeout: 248 seconds]
gregmoreno has joined #ruby-lang
znz_jp has quit [Quit: kill -QUIT $$]
znz_jp has joined #ruby-lang
<Nuru> Hi folks. Can someone tell me what 'class << self' means?
<Nuru> It's hard to Google :-)
mwjcomputing has left #ruby-lang ["Leaving"]
Aria has joined #ruby-lang
tenderlove has quit [Remote host closed the connection]
marr has quit []
nibbo has quit [Ping timeout: 260 seconds]
yfeldblum has quit [Ping timeout: 256 seconds]
dingus_khan has joined #ruby-lang
<hahuang65> Nuru: anything within that section is defined as a class method, rather than an instance method.
pr0ton has quit [Ping timeout: 255 seconds]
tripaql has joined #ruby-lang
tripaql has quit [Client Quit]
<Nuru> hahuang65: Thanks. What does "class" refer to in that statement?
rwk1 has joined #ruby-lang
bzalasky has joined #ruby-lang
<drbrain> "class <<" means "open the singleton class of"
<Nuru> drbrain: OK, sorry, I'm new to Ruby (coming from Java, python, perl, and JavaScript). Singleton class?
<drbrain> Nuru: think of it as "where class methods live" for now
<Nuru> drbrain: Objects don't share classes?
<soahccc> When using the whenever gem, do I have a chance to chain multiple rake jobs or do I have to use the "raw" statement
<Nuru> I though all Foo objects shared a Foo class
<drbrain> Nuru: the singleton class allows you to customize an instance of an object
<drbrain> so for class << Foo, you are customizing Foo
Aiur has quit [Quit: ["Textual IRC Client: www.textualapp.com"]]
jonahR has joined #ruby-lang
pr0ton has joined #ruby-lang
gregmore_ has joined #ruby-lang
reactormonk has quit [Ping timeout: 255 seconds]
yfeldblum has joined #ruby-lang
mistym_away has quit [Remote host closed the connection]
<hahuang65> Nuru: class method is something like BankAccount.open (since you don't have a bank account yet, you'd need to open one), and an instance method would be like bank_account.deposit(100), since you have a instance of the BankAccount class, and you're depositing money into it.
<hahuang65> Nuru: make more sense?
gregmore_ has quit [Ping timeout: 252 seconds]
<Nuru> drbrain: Thanks for the link. So I'm customizing just this object, not all objects of the same class as I would with
<Nuru> 'class Foo'
slyphon has quit [Quit: slyphon]
lsegal` has joined #ruby-lang
lsegal` has quit [Client Quit]
slyphon has joined #ruby-lang
lsegal has joined #ruby-lang
glebm has quit [Ping timeout: 252 seconds]
glebm has joined #ruby-lang
idkazuma has joined #ruby-lang
wmoxam has quit [Read error: Connection reset by peer]
wmoxam has joined #ruby-lang
r3nrut has joined #ruby-lang
hahuang65 has quit [Quit: Computer has gone to sleep.]
kain has quit [Quit: exit]
lcdhoffman has quit [Quit: lcdhoffman]
dhruvasagar has joined #ruby-lang
dingus_khan has quit [Ping timeout: 256 seconds]
r3nrut has quit [Ping timeout: 264 seconds]
jackhammer2022 has joined #ruby-lang
Domon has joined #ruby-lang
sabfer has joined #ruby-lang
justinmcp has quit [Ping timeout: 240 seconds]
justinmcp has joined #ruby-lang
emocakes has joined #ruby-lang
Nuru has quit [Changing host]
Nuru has joined #ruby-lang
crudson has left #ruby-lang [#ruby-lang]
Nuru is now known as jgro
jgro is now known as cgor
cgor is now known as Nuru
ritek has quit [Quit: Bye]
codewrangler has joined #ruby-lang
codewrangler has quit [Client Quit]
ddd has quit [Read error: Connection reset by peer]
ddd has joined #ruby-lang
slyphon has quit [Quit: slyphon]
mistym_away has joined #ruby-lang
yxhuvud has quit [Quit: Nettalk6 - www.ntalk.de]
mbr has quit [Read error: Operation timed out]
mbr has joined #ruby-lang
yxhuvud has joined #ruby-lang
bzalasky has quit [Remote host closed the connection]
valeri_ufo has quit [Read error: Connection reset by peer]
valeri_uF0 has joined #ruby-lang
mistym_away has quit [Remote host closed the connection]
bawigga has joined #ruby-lang
lolzie has quit [Quit: Page closed]
kurko_ has joined #ruby-lang
breakingthings has joined #ruby-lang
<breakingthings> bool = false; str = "hello"; bool = true if !bool && str.include? "hell"; bool
<breakingthings> >>bool = false; str = "hello"; bool = true if !bool && str.include? "hell"; bool
<eval-in> breakingthings => /tmp/execpad-418868afbbac/source-418868afbbac:2: syntax error, unexpected tSTRING_BEG, expecting keyword_end ... (http://eval.in/13765)
<breakingthings> why does this occur gentlefolk
thufir_ has quit [Remote host closed the connection]
<breakingthings> if ! value && str.include? "something"
<breakingthings> errors at the " of the "something" string
bzalasky has joined #ruby-lang
bzalasky has quit [Remote host closed the connection]
xxaM has joined #ruby-lang
mistym_away has joined #ruby-lang
pr0ton has quit [Quit: pr0ton]
alec_eiffel has joined #ruby-lang
ryanf has quit [Quit: leaving]
tylersmith has joined #ruby-lang
tylersmith has quit [Client Quit]
wallerdev has joined #ruby-lang
pkh has quit [Read error: Connection reset by peer]
bawigga has quit [Quit: Textual IRC Client: www.textualapp.com]
Aria has quit [Remote host closed the connection]
yfeldblum has quit [Ping timeout: 256 seconds]
bluepojo has quit [Read error: Operation timed out]
jonahR has quit [Quit: jonahR]
dhruvasagar has quit [Ping timeout: 264 seconds]
dhruvasagar has joined #ruby-lang
stonerfish has joined #ruby-lang
jstemmer has quit [Ping timeout: 256 seconds]
jstemmer has joined #ruby-lang
yfeldblum has joined #ruby-lang
dingus_khan has joined #ruby-lang
Sublinhado has quit [Quit: Saindo]
stonerfish has quit [Quit: Leaving.]
vlad_starkov has quit [Remote host closed the connection]
vlad_starkov has joined #ruby-lang
hnanon has joined #ruby-lang
<hnanon> Can anyone help with forcing two decimal places on a number?
kain has joined #ruby-lang
<drbrain> hnanon: use String#sprintf
<hnanon> I tried that. This is what I have:
<hnanon> employee_activations[ tds[0].text.gsub(/\(.+/, '').gsub(/\u00a0/,'').gsub(/Employee :/, '') ] = {"Activations" => sprintf('%.2d', activations)}
<hnanon> see the end of the line
<drbrain> what value is in activations?
<hnanon> an integer
<drbrain> and you want which output?
<drbrain> 5.00 or 05 or " 5"?
<hnanon> something like 5.oo
<hnanon> 5.00
<drbrain> d is for decimal
<drbrain> you want f for float
<hnanon> Hmm, LET ME TRY THAT.
<hnanon> whoops
<drbrain> … f isn't the only way to do floating point, there are several depending on what kind of exponent you want
<drbrain> but "f for float" is easy to remember
tenderlove has joined #ruby-lang
vlad_starkov has quit [Remote host closed the connection]
woollyams has joined #ruby-lang
<hnanon> Thank you. That worked great.
Gaelan has joined #ruby-lang
<drbrain> \o/
<hnanon> Ahh... small problem...
sabfer has quit [Quit: sabfer]
<hnanon> So some values are alread two decimals, like 10.35...
<hnanon> they get overwritten to 10.00.
breakingthings has quit []
Nisstyre-laptop has joined #ruby-lang
wallerdev has quit [Quit: wallerdev]
<drbrain> hnanon: where does activations come from?
<hnanon> Wait...sorry...I accidentally changed another float value to an integer. It should have been a float.
<hnanon> Working now. Pardon me.
<drbrain> :D
<hnanon> Can I do the same thing here:
<hnanon> if value["Hours"].nil? value["Hours"]=0.00 end
Asher has joined #ruby-lang
<drbrain> same thing?
<hnanon> sprintf('%.2f', 0.00)
<drbrain> if you're storing a String in hours, why not just put "0.00" there?
<hnanon> So what I have would not need to be changed.
Banistergalaxy has quit [Ping timeout: 256 seconds]
<drbrain> 0.00 is a float, "0.00" is a string
dhruvasagar has quit [Ping timeout: 252 seconds]
<hnanon> Ahh, got it.
emocakes has quit [Quit: emocakes]
rwk1 has quit [Remote host closed the connection]
Artheist has joined #ruby-lang
<hnanon> drbain: Thanks alot for your help the past few days.
<hnanon> It's my first script and I couldn't be more pleased.
<hnanon> You and zenspider.
macmartine has joined #ruby-lang
macmartine has quit [Client Quit]
mwjcomputing has joined #ruby-lang
<drbrain> :D
mistym_away has quit [Remote host closed the connection]
mwjcomputing has quit [Ping timeout: 248 seconds]
dingus_khan has quit [Read error: Operation timed out]
Domon has quit [Remote host closed the connection]
lsegal has quit [Quit: Quit: Quit: Quit: Stack Overflow.]
intellitech has left #ruby-lang [#ruby-lang]
Gaelan has quit [Remote host closed the connection]
lsegal has joined #ruby-lang
Gaelan has joined #ruby-lang
rwk1 has joined #ruby-lang
bluepojo has joined #ruby-lang
rwk1 has quit [Ping timeout: 256 seconds]
fire has quit [Ping timeout: 245 seconds]
baba has joined #ruby-lang
kurko_ has quit [Quit: Computer has gone to sleep.]
bryanl has quit [Ping timeout: 255 seconds]
rwk1 has joined #ruby-lang
pasties has quit [Ping timeout: 240 seconds]
fosky has joined #ruby-lang
bryanl has joined #ruby-lang
pasties has joined #ruby-lang
bzalasky has joined #ruby-lang
Domon has joined #ruby-lang
JohnBat26 has joined #ruby-lang
bzalasky has quit [Remote host closed the connection]
bluepojo_ has joined #ruby-lang
bluepojo has quit [Read error: Connection reset by peer]
bluepojo_ has quit [Remote host closed the connection]
bluepojo has joined #ruby-lang
dhruvasagar has joined #ruby-lang
bit65 has joined #ruby-lang
bryanl has quit [Ping timeout: 248 seconds]
bit65 has left #ruby-lang [#ruby-lang]
yfeldblum has quit [Ping timeout: 272 seconds]
bryanl has joined #ruby-lang
ruby-lang908 has joined #ruby-lang
agarie_ has joined #ruby-lang
nXqd has joined #ruby-lang
emocakes has joined #ruby-lang
ruby-lang908 has quit [Ping timeout: 245 seconds]
agarie has quit [Ping timeout: 264 seconds]
pkrnj has quit [Quit: Textual IRC Client: www.textualapp.com]
dhruvasagar has quit [Ping timeout: 245 seconds]
bryanl has quit [Ping timeout: 245 seconds]
intellitech has joined #ruby-lang
kosine has joined #ruby-lang
ritek has joined #ruby-lang
bryanl has joined #ruby-lang
bryanl has quit [Ping timeout: 246 seconds]
bryanl has joined #ruby-lang
emocakes has quit [Ping timeout: 246 seconds]
Guest51128 has joined #ruby-lang
Guest51128 has left #ruby-lang [#ruby-lang]
kain has quit [Quit: exit]
noop has joined #ruby-lang
mjio has quit []
Artheist has quit [Remote host closed the connection]
torrieri has joined #ruby-lang
torrieri has joined #ruby-lang
dmwuw has quit [Remote host closed the connection]
Nuru has quit [Quit: Nuru]
jxie has quit [Quit: leaving]
dingus_khan has joined #ruby-lang
alec_eiffel has quit [Quit: Page closed]
dingus_khan has quit [Ping timeout: 252 seconds]
kgrz has joined #ruby-lang
jackhammer2022 has quit [Quit: Textual IRC Client: http://www.textualapp.com/]
Asher has quit [Quit: Leaving.]
ddd has quit [Quit: heading home]
nXqd has quit [Ping timeout: 256 seconds]
nXqd has joined #ruby-lang
zavier has quit [Quit: WeeChat 0.3.8]
tbuehlmann has joined #ruby-lang
woollyams has quit [Quit: Computer has gone to sleep.]
Wardrop has joined #ruby-lang
tenderlove has quit [Remote host closed the connection]
dingus_khan has joined #ruby-lang
<dingus_khan> drbrain! are you still around?
<dingus_khan> wait, is the red message drbrain: is this red?
<dingus_khan> dammit, I don't know how to IRC
kgrz has quit [Quit: Computer has gone to sleep.]
tbuehlmann has quit [Read error: Connection reset by peer]
ryanf has joined #ruby-lang
kgrz has joined #ruby-lang
dhruvasagar has joined #ruby-lang
dr_bob has joined #ruby-lang
agarie_ has quit [Remote host closed the connection]
bluepojo has quit [Remote host closed the connection]
kain has joined #ruby-lang
<cHarNe2> dingus_khan: irc is simple, textextexte <RETURN> :)
<dingus_khan> cHarNe2: how do I know when it's a red message like that one?
<dingus_khan> as in one that I've sent?
<cHarNe2> well, i dont know. i cant see the red colors. they are only in you irc-client
kosine has quit [Quit: Leaving]
<cHarNe2> dingus_khan: what client are you using?
<cHarNe2> mirc?
<dingus_khan> xchat
<cHarNe2> dingus_khan: hmm, never used that one
<dingus_khan> yeah, I think it came with xubuntu,
zavier has joined #ruby-lang
charliesome_ has joined #ruby-lang
<cHarNe2> dingus_khan: ohh, they ship that already installed?
<dingus_khan> ok, trying ti now ^cHarNe2 !
<dingus_khan> (that's what they mean by hat, right?)
<cHarNe2> goodie :)
<dingus_khan> it worked?!
<cHarNe2> he uses hat as example because the guys name is ChaosHat :P
tbuehlmann has joined #ruby-lang
<dingus_khan> I'm not gonna lie: most of the explanation that guy gave made zero sense to me, lol
zmack has joined #ruby-lang
kgrz has quit [Quit: Computer has gone to sleep.]
charliesome has quit [Disconnected by services]
charliesome_ is now known as charliesome
symm- has quit [Ping timeout: 256 seconds]
apeiros_ has joined #ruby-lang
Averna has quit [Quit: Leaving.]
benlovell has joined #ruby-lang
<dingus_khan> night!
dingus_khan has quit [Quit: Leaving]
idkazuma has quit [Remote host closed the connection]
lele|w has quit [Ping timeout: 248 seconds]
lele|w has joined #ruby-lang
lele has quit [Ping timeout: 252 seconds]
ryanf has quit [Quit: leaving]
lele has joined #ruby-lang
tbuehlmann has quit [Ping timeout: 245 seconds]
dhruvasagar has quit [Ping timeout: 264 seconds]
dhruvasagar has joined #ruby-lang
torrieri has quit [Quit: Leaving...]
Nisstyre-laptop has quit [Ping timeout: 264 seconds]
DEac- has quit [Read error: No route to host]
DEac- has joined #ruby-lang
kgrz has joined #ruby-lang
idkazuma has joined #ruby-lang
io_syl has quit [Quit: Computer has gone to sleep.]
francisfish has quit [Remote host closed the connection]
kgrz has quit [Quit: Computer has gone to sleep.]
alessio_rocco has joined #ruby-lang
dhruvasagar has quit [Ping timeout: 252 seconds]
gnufied has joined #ruby-lang
dhruvasagar has joined #ruby-lang
<gnufied> morning
Guest99422 has joined #ruby-lang
Guest99422 has quit [Changing host]
Guest99422 has joined #ruby-lang
Guest99422 is now known as Boohbah
swav has quit [Remote host closed the connection]
chendo_ has joined #ruby-lang
torrieri has joined #ruby-lang
<yorickpeterse> morning
<injekt> hi
reactormonk has joined #ruby-lang
gnufied has quit [Quit: Leaving.]
torrieri has quit [Ping timeout: 248 seconds]
adambeynon has joined #ruby-lang
gnufied has joined #ruby-lang
chendo_ has quit [Quit: Computer has gone to sleep.]
kgrz has joined #ruby-lang
Xzyx987X has joined #ruby-lang
gnufied has quit [Client Quit]
eval-in has quit [Read error: Connection reset by peer]
mytrile has joined #ruby-lang
Xzyx987X_ has quit [Ping timeout: 264 seconds]
Averna has joined #ruby-lang
idkazuma has quit [Remote host closed the connection]
musl_ has joined #ruby-lang
Mellett68_ has joined #ruby-lang
imajes_ has joined #ruby-lang
gnufied has joined #ruby-lang
kuja_ has joined #ruby-lang
threeday1onk has joined #ruby-lang
rwjblue_ has joined #ruby-lang
ReinH_ has joined #ruby-lang
relrod_ has joined #ruby-lang
bougyman_ has joined #ruby-lang
Gate_ has joined #ruby-lang
rtl_ has joined #ruby-lang
znouza has quit [Ping timeout: 255 seconds]
Weems2 has joined #ruby-lang
znz_v0 has joined #ruby-lang
benwoody_ has joined #ruby-lang
pbjorklund_ has joined #ruby-lang
dhruvasagar has quit [Ping timeout: 256 seconds]
mitchty_ has joined #ruby-lang
kuja has quit [*.net *.split]
Weems has quit [*.net *.split]
bougyman has quit [*.net *.split]
znz_v has quit [*.net *.split]
imajes has quit [*.net *.split]
Mellett68 has quit [*.net *.split]
threedaymonk has quit [*.net *.split]
mitchty has quit [*.net *.split]
ohsix has quit [*.net *.split]
rtl has quit [*.net *.split]
benwoody has quit [*.net *.split]
flexd has quit [*.net *.split]
knu has quit [*.net *.split]
norplr has quit [*.net *.split]
pbjorklund has quit [*.net *.split]
fuzzy8balls has quit [*.net *.split]
rwjblue has quit [*.net *.split]
musl has quit [*.net *.split]
relrod has quit [*.net *.split]
zenspider has quit [*.net *.split]
Gate has quit [*.net *.split]
ReinH has quit [*.net *.split]
imajes_ is now known as imajes
ohsix has joined #ruby-lang
dhruvasagar has joined #ruby-lang
techlife has quit [Ping timeout: 245 seconds]
znouza has joined #ruby-lang
quazimodo has joined #ruby-lang
solars has joined #ruby-lang
<quazimodo> http://rhnh.net/2011/05/28/speeding-up-rails-startup-time <-- has this patch been merged into ruby 1.9.3?
<quazimodo> http://rhnh.net/2011/05/28/speeding-up-rails-startup-time <-- has this patch been merged into ruby 1.9.3?
<quazimodo> http://rhnh.net/2011/05/28/speeding-up-rails-startup-time <-- has this patch been merged into ruby 1.9.3?
<quazimodo> http://rhnh.net/2011/05/28/speeding-up-rails-startup-time <-- has this patch been merged into ruby 1.9.3?
<quazimodo> http://rhnh.net/2011/05/28/speeding-up-rails-startup-time <-- has this patch been merged into ruby 1.9.3?
<quazimodo> oh shit - I am so sorry!
* quazimodo profusely apologises for that
<yorickpeterse> heh
flexd has joined #ruby-lang
fuzzy8balls has joined #ruby-lang
fraggle has joined #ruby-lang
* apeiros_ blinks
<apeiros_> quazimodo: could you please link again? I can't quite see it yet :-p
Kuukunen has quit [Ping timeout: 245 seconds]
techlife has joined #ruby-lang
Averna has quit [Quit: Leaving.]
<quazimodo> lol
fraggle has quit [Client Quit]
Averna has joined #ruby-lang
francisfish has joined #ruby-lang
norplr has joined #ruby-lang
xxaM has quit [Quit: lol]
Averna has quit [Client Quit]
<quazimodo> has it been merged, tho?
dEPy has joined #ruby-lang
lsegal has quit [Quit: Quit: Quit: Quit: Stack Overflow.]
dEPy has left #ruby-lang [#ruby-lang]
<yorickpeterse> I believe so
<yorickpeterse> At least, Ruby 2.0 did contain some patches for require() to speed it up
Kuukunen has joined #ruby-lang
xcombelle has joined #ruby-lang
kgrz has quit [Quit: Computer has gone to sleep.]
fosky has quit [Remote host closed the connection]
kgrz has joined #ruby-lang
dhruvasagar has quit [Ping timeout: 246 seconds]
swav has joined #ruby-lang
dhruvasagar has joined #ruby-lang
benlovell has quit [Quit: Computer has gone to sleep.]
jgoss has quit [Ping timeout: 240 seconds]
runeb has joined #ruby-lang
dhruvasagar has quit [Ping timeout: 240 seconds]
benlovell has joined #ruby-lang
dhruvasagar has joined #ruby-lang
torrieri has joined #ruby-lang
chris2 has quit [Ping timeout: 246 seconds]
vlad_starkov has joined #ruby-lang
<andrewvos> GOod MOOOORNINGGGGG internet
torrieri has quit [Ping timeout: 252 seconds]
hnanon has quit [Ping timeout: 245 seconds]
toretore has joined #ruby-lang
chris2 has joined #ruby-lang
thufir_ has joined #ruby-lang
<apeiros_> moin andrewvos
<apeiros_> btw., I got your sc2 friend request last week-end…
<andrewvos> apeiros_: wat?
<andrewvos> me?
<apeiros_> I got stranded on the US server, I'm normally on the EU ones
<apeiros_> I think so
<apeiros_> unless I misremember something :)
<andrewvos> I don't own starcraft
<apeiros_> hm
<apeiros_> hm, gotta check back who it was then :-|
<yorickpeterse> andrewvos: morning richard
r0bglees0n has joined #ruby-lang
zmack has quit [Remote host closed the connection]
sonne has quit [Read error: Operation timed out]
Demux_ has quit [Ping timeout: 240 seconds]
Demux has joined #ruby-lang
yfeldblum has joined #ruby-lang
<andrewvos> yorickpeterse: Morning dickhead
<andrewvos> :)
<yorickpeterse> pfff
benlovell has quit [Quit: Computer has gone to sleep.]
sush24 has joined #ruby-lang
postmodern has quit [Quit: Leaving]
skade has joined #ruby-lang
<yorickpeterse> clearly richard hammond didn't get enough attention last night
runeb has quit [Read error: Connection reset by peer]
realDAB has joined #ruby-lang
benlovell has joined #ruby-lang
sonne has joined #ruby-lang
dhruvasagar has quit [Ping timeout: 245 seconds]
baba has quit [Ping timeout: 252 seconds]
<injekt> :D
<injekt> hamster
dhruvasagar has joined #ruby-lang
jbsan has quit [Quit: jbsan]
torrieri has joined #ruby-lang
runeb has joined #ruby-lang
toretore has quit [Quit: Leaving]
lele|w has quit [Ping timeout: 246 seconds]
Domon has quit [Remote host closed the connection]
alessio_rocco has quit [Ping timeout: 256 seconds]
torrieri has quit [Ping timeout: 256 seconds]
alessio_rocco has joined #ruby-lang
<andrewvos> :)
lele|w has joined #ruby-lang
lele has quit [Ping timeout: 246 seconds]
sush24 has quit [Quit: This computer has gone to sleep]
dhruvasa1ar has joined #ruby-lang
knu has joined #ruby-lang
nibbo has joined #ruby-lang
lele has joined #ruby-lang
dhruvasagar has quit [Ping timeout: 240 seconds]
sabfer has joined #ruby-lang
lele has quit [Ping timeout: 246 seconds]
woollyams has joined #ruby-lang
sabfer has quit [Ping timeout: 240 seconds]
vmoravec__ has joined #ruby-lang
woollyams has quit [Client Quit]
vmoravec_ has quit [Ping timeout: 252 seconds]
lele has joined #ruby-lang
vmoravec__ has quit [Ping timeout: 245 seconds]
<whitequark> yorickpeterse: 45
shirokuro11 has joined #ruby-lang
<whitequark> of those: 6 are "line numbers are wrong" (actually there are much more, I've disabled some of the line number tests); 10 are related to comment/newline parsing
<whitequark> the rest is cond/cmdarg-related
<chris2> bougyman_: interested in a ipsvd-musl?
firefux has quit [Ping timeout: 264 seconds]
thone_ has joined #ruby-lang
thone has quit [Ping timeout: 245 seconds]
yfeldblum has quit [Ping timeout: 256 seconds]
firefux has joined #ruby-lang
gnufied has quit [Quit: Leaving.]
gnufied has joined #ruby-lang
kgrz has quit [Quit: Computer has gone to sleep.]
realDAB has quit [Quit: realDAB]
torrieri has joined #ruby-lang
judofyr has joined #ruby-lang
torrieri has quit [Ping timeout: 272 seconds]
valeri_ufo has joined #ruby-lang
sepp2k has joined #ruby-lang
<yorickpeterse> whitequark: so do you plan on submitting this as a PR or by creating a spinoff?
realDAB has joined #ruby-lang
benlovel_ has joined #ruby-lang
cout_ has joined #ruby-lang
babinho_ has joined #ruby-lang
Squarepy has joined #ruby-lang
kgrz has joined #ruby-lang
Mon_Ouie has joined #ruby-lang
valeri_uF0 has quit [Read error: Connection reset by peer]
benlovell has quit [Ping timeout: 246 seconds]
babinho has quit [Ping timeout: 246 seconds]
cout has quit [Ping timeout: 246 seconds]
benlovel_ is now known as benlovell
dostoyevsky has joined #ruby-lang
<dostoyevsky> When I use irb I can load a gem but when I use "ruby" it won't be found... any ideas?
wmoxam has quit [Ping timeout: 264 seconds]
<yorickpeterse> Code/errors first
<yorickpeterse> also, what Ruby version are you using?
<dostoyevsky> Is there a ruby variable I can query to see the version?
<judofyr> dostoyevsky: RUBY_VERSION
<yorickpeterse> dostoyevsky: `ruby --version`
mitchty_ has quit [Quit: znc broke]
<dostoyevsky> yorickpeterse: I suspect irb and ruby use a different version of ruby
<Wardrop> I understand that catch/throw is used to terminate or short circuit the execution of some kind of code, but is there anyway to determine whether the code ended naturally, or whether it was ended because of a throw/catch?
<Wardrop> I want to perform some action if a certain symbol is thrown
<judofyr> Wardrop: res = catch(:foo) { …; :ok }; if res == :ok; … end
<Mon_Ouie> catch will return what you threw otherwise
<Wardrop> judofyr: Oh yeah, of course. Cheers.
<dostoyevsky> %echo 'p RUBY_VERSION; require "bundler"' | irb # -> "1.8.7"; true
<quazimodo> ruby 2.0?
<judofyr> dostoyevsky: and what does `ruby -v` say?
<dostoyevsky> %echo 'p RUBY_VERSION; require "bundler"' | ruby # -> "1.8.7"; -:1:in `require': no such file to load -- bundler (LoadError)
<judofyr> dostoyevsky: but yeah, you're on 1.8.7 so you need to `require "rubygems"` first
<judofyr> dostoyevsky: also, don't use Ruby 1.8.7. it's going to be end-of-lifed soon
<dostoyevsky> ah... but why does it work in irb?
<Mon_Ouie> Because for some reason it was already required. Maybe something in your irbrc?
<dostoyevsky> Mon_Ouie: Seems so... If I use "irb -f" I get the same error
alessio_rocco has quit [Ping timeout: 252 seconds]
alessio_rocco has joined #ruby-lang
happydude has joined #ruby-lang
vlad_starkov has quit [Ping timeout: 272 seconds]
Squarepy has joined #ruby-lang
Squarepy has quit [Changing host]
realDAB has quit [Quit: realDAB]
<injekt> end of liffeedddd
dustint has joined #ruby-lang
lolzie has joined #ruby-lang
yfeldblum has joined #ruby-lang
<yorickpeterse> `@entries = ApiV0OpenAnswerDecorator.decorate(@entries)`
<yorickpeterse> somebody shoot me in the foot for me
sush24 has joined #ruby-lang
mistym_away has joined #ruby-lang
wmoxam has joined #ruby-lang
La0fer has quit [Ping timeout: 260 seconds]
torrieri has joined #ruby-lang
torrieri has quit [Changing host]
torrieri has joined #ruby-lang
mistym_away has quit [Remote host closed the connection]
<andrewvos> what the hell is that
<yorickpeterse> Ruby
<yorickpeterse> HURRDURR PRESENTATION LOGIC IN MODEL IS BAD. LETS MOVE IT INTO A PSEUDO MODEL THAT'S A LOT SLOWER
scampbell has joined #ruby-lang
carloslopes has joined #ruby-lang
<injekt> ah decorators
idkazuma has joined #ruby-lang
torrieri has quit [Ping timeout: 256 seconds]
<andrewvos> I'm going to leave this conversation because I'm at the point where I just hate programming so much that something might push me over the edge.
<injekt> :D
<yorickpeterse> andrewvos: calm down richard, go drive a car for a bit
<yorickpeterse> Don't switch into...*puts on sunglasses*...fifth gear
<yorickpeterse> YEEEAAAAAAHHHH
<andrewvos> hahaah
sailias has joined #ruby-lang
kgrz has quit [Ping timeout: 264 seconds]
<yorickpeterse> so don't get me wrong, the core idea of decorators isn't that bad
<yorickpeterse> but why the fuck are draper, and the others, so god awful slow
* andrewvos SNAPS
<yorickpeterse> LOL PERFORMANCE? SURELY YOUR DATABASE IS THE BOTTLENECK RIGHT>?
benwoody_ has left #ruby-lang [#ruby-lang]
<gnufied> WHY ARE WE SHOUTING?
kgrz has joined #ruby-lang
<andrewvos> Because programmers make me hate programming.
<charliesome> yorickpeterse: dude thats premature optimizations. stop prematurely optimizing you premature optimizer. small efficiencies. blah blah blah
<charliesome> if its not the bottleneck why optimize it?
vlad_starkov has joined #ruby-lang
<charliesome> </sarcasm>
rwk1 has quit [Read error: Connection timed out]
rwk1 has joined #ruby-lang
dhruvasa1ar has quit [Ping timeout: 245 seconds]
mistym_away has joined #ruby-lang
vlad_starkov has quit [Ping timeout: 248 seconds]
breakingthings has joined #ruby-lang
kgrz has quit [Quit: Computer has gone to sleep.]
tbuehlmann has joined #ruby-lang
<andrewvos> I love that article :)
<yorickpeterse> can we please not link to PHP stuff in here?
<breakingthings> but yorickpeterse I would never have found something to laugh at this morning
<breakingthings> do you hate my happiness
babinho_ has left #ruby-lang [#ruby-lang]
charliesome has quit [Quit: Textual IRC Client: www.textualapp.com]
<andrewvos> I hate your happiness
rwk1 has quit [Read error: Connection timed out]
sepp2k has quit [Quit: Leaving.]
rwk1 has joined #ruby-lang
maxmanders has joined #ruby-lang
<yorickpeterse> I hate your php-ness
<yorickpeterse> (god that t-shirt was awful)
maxmanders has quit [Read error: Connection reset by peer]
maxmanders has joined #ruby-lang
cored has quit [Ping timeout: 260 seconds]
vmoravec__ has joined #ruby-lang
bougyman_ has quit [Changing host]
bougyman_ has joined #ruby-lang
cored has joined #ruby-lang
cored has quit [Changing host]
cored has joined #ruby-lang
Wardrop has quit [Quit: Wardrop]
cout_ is now known as cout
kristofferrr has joined #ruby-lang
bougyman_ is now known as bougyman
Taranis has quit [Quit: leaving]
stevechiagozie has joined #ruby-lang
glebm has quit [Quit: Computer has gone to sleep.]
rwk1 has quit [Read error: Connection timed out]
kurko_ has joined #ruby-lang
rwk1 has joined #ruby-lang
<whitequark> yorickpeterse: PR, at first
kgrz has joined #ruby-lang
realDAB has joined #ruby-lang
Gaelan has quit [Remote host closed the connection]
Gaelan has joined #ruby-lang
tonni_ has quit [Ping timeout: 260 seconds]
<yorickpeterse> ah
sush24 has quit [Quit: This computer has gone to sleep]
Paradox has quit [Ping timeout: 245 seconds]
torrieri has joined #ruby-lang
noop has quit [Quit: Leaving]
mistym_away has quit [Remote host closed the connection]
jerrytgarcia has joined #ruby-lang
torrieri has quit [Ping timeout: 240 seconds]
sush24 has joined #ruby-lang
thufir_ has quit [Quit: Leaving.]
glebm has joined #ruby-lang
tonni has joined #ruby-lang
wnd has quit [Excess Flood]
wnd has joined #ruby-lang
symm- has joined #ruby-lang
mistym has joined #ruby-lang
mistym has quit [Changing host]
mistym has joined #ruby-lang
srbaker has quit [Quit: Textual IRC Client: www.textualapp.com]
srbaker has joined #ruby-lang
skade has quit [Ping timeout: 240 seconds]
realDAB has quit [Quit: realDAB]
outoftime has joined #ruby-lang
davidbalber|away is now known as davidbalbert
anonymuse has joined #ruby-lang
realDAB has joined #ruby-lang
tonni has quit [Read error: Connection reset by peer]
tonni has joined #ruby-lang
skade has joined #ruby-lang
jacktrick has joined #ruby-lang
maxmanders has quit [Quit: Computer has gone to sleep.]
jacky has quit [Ping timeout: 245 seconds]
runeb- has joined #ruby-lang
runeb has quit [Read error: Connection reset by peer]
runeb- is now known as runeb
jacktrick has quit [Quit: Leaving]
<cored> hello
<cored> I'm trying to match any word inside an array and generate a new array, this is teh code I have
<cored> pattern = "hi"; %w{hello hi here}.select { |w| w =~ /pattern/ }
<cored> but that doesn't work
<wnd> try /#{pattern}/
sepp2k has joined #ruby-lang
<cored> ok
<wnd> or even Regexp.new(pattern).match(c)
<wnd> match(w)
<cored> wnd: what does the #{} do
<cored> ?
<wnd> I really don't /know/, but precompiling the regexp might be faster if you have lots of data
<cored> #{} so that's precompile the regex?
<wnd> says "evaluate this here", like in x = "foo"; puts "xyzzy #{x}"
<wnd> when I mentioned precompiling, I meant that if you have plenty of data, "re = Regexp.new(pattern); input.select{|w| re.match(w)}" might be fater
<cored> got it
realDAB has quit [Quit: realDAB]
realDAB has joined #ruby-lang
kith_ has joined #ruby-lang
gnufied has quit [Quit: Leaving.]
davejlong has joined #ruby-lang
kith has quit [Ping timeout: 260 seconds]
<davejlong> Has anyone used SQL Server with Grape outside of ActiveRecord? I'm having a lot of trouble finding any resources on the topic.
<injekt> cored: array.grep(/pattern/)
<injekt> cored: #{} is for interpolation
<cored> injekt: yes, I notice that hehe
<cored> injekt: I was kinda confuse
<cored> injekt: but the problem is not that, the other method will send a block so I have to use the format that they send in the block something like method { |match| "[#{match}]" } to format the output in the array
<injekt> cored: uh what?
<cored> so the array will end with ["[match]" "other item"]
Gaelan has quit [Remote host closed the connection]
<cored> injekt: didn't you get it?
kurko_ has quit [Ping timeout: 240 seconds]
<injekt> cored: no :)
tonni has quit [Read error: Connection reset by peer]
tonni has joined #ruby-lang
kurko_ has joined #ruby-lang
<cored> he
<cored> well, I'm just playing around with arrays and regex's
gnufied has joined #ruby-lang
<cored> %w{hello here} if I send "h" with a block { |match| "[#{match}]" } I want to get ["[h]ello" "[h]ere"]
Asher has joined #ruby-lang
dhruvasagar has joined #ruby-lang
Gaelan has joined #ruby-lang
realDAB has quit [Quit: realDAB]
<injekt> irb(main):009:0> %w(hello here).grep(/[h]+/).map { |s| s.gsub($&, "[#{$&}]") }
<injekt> => ["[h]ello", "[h]ere"]
<injekt> using an e, you would get: ["h[e]llo", "h[e]r[e]"]
<cored> ok
<injekt> assuming that's what you're talking about
<cored> the only thing is that the format is not fixed
<injekt> right, so adapt it ;)
<cored> I will do something like my_method { |match| "format here" }
<injekt> ahh
<cored> I'm guess that this $& if for getting the match
<cored> right ?
<injekt> right
<cored> I in that case should be something like
<cored> .grep(/pattern+/)
yianna has joined #ruby-lang
yianna is now known as ykk
<ykk> hey, can someone please point out how i can use gsub to switch a forward slash for an underscore?
<ykk> having trouble googling the answer and the documentation doesn't specify
lolzie has quit [Quit: Page closed]
<injekt> ykk: .gsub('/', '_')
<injekt> tr is faster though
<ykk> hey injekt thank you for mechanize
<injekt> ykk: I didn't write it I just help out with it, but you're welcome for that!
<ykk> had problems with nokogiri saving images with File.open rewrote it all with Mechanize and going to use .save_as
<cored> injekt: which means you can do something like s.gsub($&, yield $&)
<injekt> ykk: sweet
<injekt> cored: right
<injekt> cored: with parenthesis of course
<ykk> been with computers since 12 years old, opening them up and stuff. been on irc the whole time too but no language has ever grabbed me like ruby =D
jerrytgarcia has quit [Read error: Connection reset by peer]
jerrytgarcia has joined #ruby-lang
bantic has joined #ruby-lang
<yorickpeterse> not even vulgar language?
<ykk> after i finish these few projects i started I want to write something with Mechanize that will backup movies that you purchased with Amazon
<antbody> everyother language just tastes like crap after ruby :p
<cored> injekt: yes, I changed the code you have here
<cored> self.grep(/#{pattern}+/).map { |word| word.gsub($&, yield($&)) }
<antbody> though probably with multithreaded code it doesn't shine that much
<injekt> cored: ok
sush24 has quit [Quit: This computer has gone to sleep]
bzalasky has joined #ruby-lang
<cored> why is it that this doesn't work .grep(/#{pattern}+/i)
<cored> for case insensitive matching
<injekt> it does
<cored> I'm getting 'expected regex'
<cored> for match in downcase
<injekt> cored: what's in pattern?
<cored> "c" to match ["Chocolate is sweet" "Snow is cold"]
<cored> there should be three matches
<cored> using /#{pattern}+/i
<injekt> you know ["Chocolate is sweet" "Snow is cold"] with no comma is ["Chocolate is sweetSnow is cold"]
<breakingthings> sweetSnow
<injekt> and it's because 'c' is matched not 'C'
<injekt> so gsub wont work
<cored> hm
sush24 has joined #ruby-lang
<cored> but I thought that it should match everything because of the case insensitive part
<injekt> maybe you should just capture the match
<injekt> it does match
<cored> injekt: yes I made a mistake on the array definition, but is an array
<cored> so, probably I should do something like
<cored> Regexp.new(/#{pattern}+/, Regexp::CASEINSENSITIVE).match(word)
<cored> and then use match[0] in gsub
<cored> ?
<cored> let me try that
<injekt> eh, also as you're using select any matched words will be removed, is that desirable?
carloslopes has quit [Remote host closed the connection]
bstrie_ has left #ruby-lang [#ruby-lang]
glebm has quit [Quit: Computer has gone to sleep.]
<injekt> or if you want a one-liner - array.map { |s| s.gsub(/(#{pattern})+/i, &block) }
bstrie has joined #ruby-lang
lcdhoffman has joined #ruby-lang
<cored> oh the part of the block is cool
<cored> if there's no block sended it won't execute right ?
<injekt> it'll return an enumerator
<injekt> but yeah the replacement will not take place
<cored> oh I notice something interested
<cored> if you change the actual array you don't mess up the order
<cored> but if you creates a new array you will get an ordered list
MartynKeigher has quit [Excess Flood]
<injekt> map creates a new array
dhruvasagar has quit [Ping timeout: 264 seconds]
MartynKeigher has joined #ruby-lang
<cored> then this is weird
dhruvasagar has joined #ruby-lang
<apeiros_> injekt: if pattern is an actual Regexp instance, you don't need () around it for the + to work
<injekt> apeiros_: yup
<apeiros_> >> pattern = /ell/; "hellellello"[/#{pattern}+/]
<apeiros_> oh, eval-in gone again?
<injekt> heh
<injekt> forgot about that
traore has joined #ruby-lang
traore has quit [Client Quit]
<cored> http://rubular.com/ oh that's cool
<cored> to test regex
<lianj> irb too
xcombelle has quit [Read error: Connection reset by peer]
voker57 has quit [Read error: Connection reset by peer]
<cored> lianj: ;-)
bzalasky has quit [Remote host closed the connection]
torrieri has joined #ruby-lang
mobile has joined #ruby-lang
bit65 has joined #ruby-lang
<apeiros_> cored: http://www.debuggex.com
<injekt> yeah, THAT is cool
<cored> apeiros_: nice thanks
<cored> trying to match a sequence of characters now
ruby-lang029 has joined #ruby-lang
<cored> so if you have good and I send good as the pattern it should change it to [g][o][o][d]
<cored> first failed approach
<cored> gsub(/#{pattern.split(//).join(" ")}/i, &block)
mlpinit has joined #ruby-lang
<injekt> dont split the pattern
<injekt> wrap it in []
torrieri has quit [Ping timeout: 246 seconds]
<injekt> array.map { |s| s.gsub(/([#{pattern}+])/i, &block) }
baz_ has joined #ruby-lang
<injekt> this is where I'd simply use gsub(pattern) and pass the entire patten in myself
<apeiros_> cored: /[g]/ is exactly the same as plain /g/
<apeiros_> [] is 1 character
<cored> testing the regex
<injekt> apeiros_: he means that as the output not input
<apeiros_> ah
<cored> apeiros_: yes as the input
<injekt> uh
<injekt> lol
<apeiros_> or maybe not :D
TheNotary has joined #ruby-lang
<cored> injekt: sorry, mis typed
<cored> :-P
<injekt> im confused
<cored> injekt: is what you said
<injekt> ok
<cored> [] will match each character
<injekt> the pattern i wrote will work
<cored> individually that's what I wanted
<injekt> right
mobile has quit [Quit: mobile]
TheNotary has quit [Client Quit]
TheNotary has joined #ruby-lang
<bit65> cored: [] matches only one of the enclosing characters
<injekt> irb(main):002:0> %w(foo bar).map { |s| s.gsub(/([#{'fo'}+])/i) { |i| "[#{i}]" } }
<injekt> => ["[f][o][o]", "bar"]
<injekt> the 'fo' is in place of pattern
havenwood has quit [Remote host closed the connection]
alessio_rocco has quit [Remote host closed the connection]
symm- has quit [Ping timeout: 248 seconds]
mytrile has quit [Remote host closed the connection]
soknee has joined #ruby-lang
mobile has joined #ruby-lang
mobile has quit [Client Quit]
skbierm has joined #ruby-lang
gnufied has quit [Quit: Leaving.]
kgrz has quit [Quit: Computer has gone to sleep.]
<injekt> the + is obv not needed
pablonvz has joined #ruby-lang
gnufied has joined #ruby-lang
skbierm has quit [Client Quit]
nXqd has quit [Ping timeout: 245 seconds]
skbierm has joined #ruby-lang
soknee has quit [Quit: Leaving.]
soknee has joined #ruby-lang
Gaelan has quit [Remote host closed the connection]
io_syl has joined #ruby-lang
nXqd has joined #ruby-lang
pablonvz has quit [Quit: pablonvz]
gregmore_ has joined #ruby-lang
glebm has joined #ruby-lang
setmeaway2 has quit [Quit: Leaving]
setmeaway has joined #ruby-lang
mlpinit has quit [Quit: mlpinit]
Gaelan has joined #ruby-lang
bit65 has quit [Quit: leaving]
G________ has joined #ruby-lang
G________ has quit [Client Quit]
<yorickpeterse> whitequark: I see you're having fun with ruby_parser
kbouwser has joined #ruby-lang
vlad_starkov has joined #ruby-lang
benlovell has quit [Quit: Computer has gone to sleep.]
nXqd has quit [Ping timeout: 248 seconds]
stef_204 has joined #ruby-lang
scottschecter has quit [Ping timeout: 256 seconds]
skbierm_ has joined #ruby-lang
dhruvasagar has quit [Ping timeout: 240 seconds]
havenwood has joined #ruby-lang
skade has quit [Read error: Connection reset by peer]
scottschecter has joined #ruby-lang
skbierm has quit [Ping timeout: 256 seconds]
dhruvasagar has joined #ruby-lang
<cored> injekt: hm
<cored> injekt: I wrote a new example to my spec
<cored> injekt: in that case that oyu pase it will also match %w(foo bar f)
<cored> and the f will returned like [f]
<cored> but the patterns says 'foo' entirely
<cored> I think the problem is that even when I'm atching individual characters I want to just format individual chracters with the formatter in the block
<cored> is like fuzzy finder for sublime
mixandgo has joined #ruby-lang
brianpWins has joined #ruby-lang
<chris2> is evaluation order of ruby specified?
<chris2> a[x] = y. does x or y come first?
vlad_sta_ has joined #ruby-lang
<sepp2k> x comes first. Evaluation order of method arguments is left to right.
<chris2> that matches my expectation
randallagordon has quit [Quit: Changing server]
vlad_starkov has quit [Ping timeout: 256 seconds]
gregmoreno has quit [Remote host closed the connection]
randallagordon has joined #ruby-lang
gregmore_ has quit []
gregmoreno has joined #ruby-lang
davejlong has quit [Read error: Connection reset by peer]
lcdhoffman has quit [Quit: lcdhoffman]
dhruvasagar has quit [Ping timeout: 256 seconds]
tylersmith has joined #ruby-lang
torrieri has joined #ruby-lang
flujan has joined #ruby-lang
flujan has left #ruby-lang [#ruby-lang]
flujan has joined #ruby-lang
flujan has quit [Quit: flujan]
flujan has joined #ruby-lang
<flujan> Talking about performance, which is the difference between Thread.new and Proc.new?
<judofyr> flujan: Thread.new is completely different and *way* slower
<judofyr> they have nothing to do with each other
<havenwood> flujan: Proc isn't concurrency related. It is a type of closure, along with blocks and lambdas.
<flujan> judofyr: I am considering to use threads to put some code to run I'm parallel. It is possible with proc.new?
<eam> thread is a parallel execution context. proc is a unit of code logic
Uranio has joined #ruby-lang
<judofyr> flujan: Proc has nothing to with with concurrency
<judofyr> flujan: it's just an anonymous method
torrieri has quit [Ping timeout: 248 seconds]
<havenwood> flujan: Totally different concepts, but they can be used together.
guilleiguaran__ has left #ruby-lang [#ruby-lang]
<flujan> judofyr: Hum… OK, some people are using it for this purpose…
<judofyr> flujan: nope, don't think so…
<havenwood> flujan: You may be thinking fork?
carloslopes has joined #ruby-lang
<flujan> havenwood: Yeah. I have a script that require a lot of classes. It spawns another ruby script using system…
<flujan> but I need to perform the some requires on the script system evokes…
<flujan> So I am thinking about put everything on a scripts and run with threads when applicable
<havenwood> flujan: Jesse Storimer wrote a great book on UNIX Processes in Ruby, and his book on Threads is coming out in a couple weeks. Worth reading!
<havenwood> flujan: Rather than learning the intricacies of threads, it may be more practical to use a concurrency library like Celluloid or Agent.
<havenwood> flujan: Unless you're threading for learning or fun, in which case Storimer's book would be a big win!
<havenwood> flujan: Here is a basic usage example for Celluloid: https://github.com/celluloid/celluloid/blob/master/examples/basic_usage.rb
alec_eiffel has joined #ruby-lang
<flujan> havenwood: ok checken the book, celluloid and agent… thanks for the tips.
<havenwood> flujan: Celluloid is Erlang-style actor model. Agent is Go-style channels.
<injekt> I love go channels
breakingthings has quit []
<rue> They’re so happening
rtl_ has left #ruby-lang [#ruby-lang]
<havenwood> Agent isn't easy to Google, so: https://github.com/igrigorik/agent
<havenwood> injekt: +1 channels!
solars has quit [Ping timeout: 240 seconds]
rtl_ has joined #ruby-lang
r0bby has joined #ruby-lang
amerine has joined #ruby-lang
<injekt> interesting I had no idea about agent
<flujan> havenwood: I have read about erlang and the actor pattern. Isn't it the same thing that the YARV do with GIL? No GIL but still a single point to manage the threads?
shirokuro11 has quit [Remote host closed the connection]
<bougyman> no, erlang wraps each facet in a process.
<bougyman> similar to unix processes.
<havenwood> injekt: Just the single aspect of channels extracted, but I've had a lot of fun playing with iChannel too: https://github.com/robgleeson/ichannel
robbyoconnor has quit [Ping timeout: 256 seconds]
glebm has quit [Quit: Computer has gone to sleep.]
<havenwood> injekt: Matz tweeted about Agent a few months back, and Ilya being the library author piqued my curiosity!
chrismar035 has joined #ruby-lang
chase has quit [Quit: chase]
pablonvz has joined #ruby-lang
realDAB has joined #ruby-lang
<apeiros_> Ilya seems to be an interesting guy
<havenwood> flujan: Good brief explanation of Celluloid's actor (cell) model: https://github.com/celluloid/celluloid#readme
<apeiros_> lots of knowledge, especially wrt performance
pablonvz has quit [Remote host closed the connection]
<havenwood> I wish Celluloid would drop 'actor' entirely from the vernacular and use 'cell' ubiquitously.
<havenwood> apeiros_: Makes me wonder if we'll see Ilya's Agent work in Ruby 3000's stdlib. :O
realDAB has quit [Ping timeout: 248 seconds]
kbouwser has quit [Quit: Textual IRC Client: www.textualapp.com]
<flujan> havenwood: I read the basic_usage example… So I will create a new class that in my case, connects do the database( do a dump ) write on a text file. Can I all Class.async.new ?
photis has joined #ruby-lang
photis has quit [Client Quit]
photis has joined #ruby-lang
forrest has joined #ruby-lang
<havenwood> flujan: Usually, you do: Class.new.async.method_that_runs_async
musl_ has quit [Quit: WeeChat 0.3.9.2]
TheNotary has quit [Quit: Leaving]
musl has joined #ruby-lang
<havenwood> flujan: I suppose you could monkey patch class, then run a Class.async.new but that definitely isn't the normal use-case.
mlpinit has joined #ruby-lang
wobblini has quit [Ping timeout: 245 seconds]
benwoody_ has joined #ruby-lang
banister`sleep has joined #ruby-lang
runeb has quit [Remote host closed the connection]
<flujan> havenwood: thanks for the tip of celluloid. it is really cool. It will fit my needs. I just found a example of file read/write using it. Will post here if someone search the history: http://rubysource.com/an-introduction-to-celluloid-part-i/
apeiros_ has quit [Remote host closed the connection]
Mon_Ouie has quit [Ping timeout: 245 seconds]
dhruvasagar has joined #ruby-lang
mlpinit has quit [Quit: mlpinit]
r0bby_ has joined #ruby-lang
davidbalbert is now known as davidbalber|away
nXqd has joined #ruby-lang
r0bby has quit [Ping timeout: 264 seconds]
gregmoreno has quit [Read error: Connection reset by peer]
gregmore_ has joined #ruby-lang
gregmore_ has quit [Remote host closed the connection]
nXqd has quit [Ping timeout: 256 seconds]
gregmoreno has joined #ruby-lang
Mon_Ouie has joined #ruby-lang
skade has joined #ruby-lang
musl has quit [Quit: WeeChat 0.3.9.2]
musl has joined #ruby-lang
kennyvb has quit [Ping timeout: 252 seconds]
jxpx777 has joined #ruby-lang
mlpinit has joined #ruby-lang
musl has quit [Remote host closed the connection]
musl has joined #ruby-lang
kennyvb has joined #ruby-lang
musl has quit [Remote host closed the connection]
musl has joined #ruby-lang
breakingthings has joined #ruby-lang
maxmanders has joined #ruby-lang
swav has quit [Remote host closed the connection]
skade has quit [Read error: Connection reset by peer]
ruby-lang029 has quit [Ping timeout: 245 seconds]
alec_eiffel has quit [Ping timeout: 245 seconds]
musl has quit [Remote host closed the connection]
musl has joined #ruby-lang
torrieri has joined #ruby-lang
banister`sleep has quit [Read error: Connection reset by peer]
mistym is now known as mistym_coffee
skade has joined #ruby-lang
nXqd has joined #ruby-lang
maxmanders has quit [Quit: Computer has gone to sleep.]
torrieri has quit [Ping timeout: 252 seconds]
kristofferrr has quit [Quit: ❤]
gnufied has quit [Quit: Leaving.]
jperry2 has joined #ruby-lang
glebm has joined #ruby-lang
havenwood has quit [Remote host closed the connection]
jacktrick has joined #ruby-lang
apeiros_ has joined #ruby-lang
havenwood has joined #ruby-lang
davidbalber|away is now known as davidbalbert
spuk has joined #ruby-lang
mrsolo has joined #ruby-lang
MaddinXx has joined #ruby-lang
Gaelan has quit [Remote host closed the connection]
Gaelan has joined #ruby-lang
pr0ton has joined #ruby-lang
glebm has quit [Quit: Computer has gone to sleep.]
glebm has joined #ruby-lang
photis has quit [Quit: photis]
glebm has quit [Client Quit]
idkazuma has quit [Remote host closed the connection]
jbsan has joined #ruby-lang
skade has quit [Quit: Computer has gone to sleep.]
rwilcox has joined #ruby-lang
emmdeeess has joined #ruby-lang
<emmdeeess> what is the best way to query a
<emmdeeess> MS SQL server from ruby?
<yorickpeterse> emmdeeess: http://sequel.rubyforge.org/
spuk has quit [Quit: Human beings were created by water to transport it uphill.]
spuk_ has joined #ruby-lang
<havenwood> +1 sequel gem
torrieri has joined #ruby-lang
torrieri has quit [Client Quit]
<emmdeeess> just "gem install sequel"?
<yorickpeterse> well, you of course have to know how to use it
<emmdeeess> i'm playing with dbi, but having some issues with the connection string
dr_bob has left #ruby-lang [#ruby-lang]
<havenwood> emmdeeess: Sequel has good dbi or odbc support.
<emmdeeess> thank you, i'm reading about it now
<emmdeeess> does anyone have an example of connecting to a SQL server and sending a query?
kith_ is now known as kith
agile has quit [Ping timeout: 245 seconds]
<whitequark> yorickpeterse: "fun"
<whitequark> as much fun as letting someone rape your brain, voluntarily, and then do that again because the previous one was not enough
<havenwood> emmdeeess: DB = Sequel.connect adapter: 'odbc', database: 'omgwtfbbq'; DB[:icecream].filter(flavor: 'Chocolate').avg(:price)
Nisstyre has quit [Ping timeout: 264 seconds]
agile has joined #ruby-lang
<emmdeeess> how do you define the server name?
jacktrick has quit [Quit: Leaving]
havenwood has quit [Remote host closed the connection]
havenwood has joined #ruby-lang
tylersmith has quit [Quit: tylersmith]
nXqd has quit [Ping timeout: 245 seconds]
havenwood has quit [Ping timeout: 240 seconds]
nXqd has joined #ruby-lang
davejlong has joined #ruby-lang
judofyr has quit [Remote host closed the connection]
Nisstyre has joined #ruby-lang
Mon_Ouie has quit [Ping timeout: 264 seconds]
zmack_ has joined #ruby-lang
jacktrick has joined #ruby-lang
glebm has joined #ruby-lang
agile has quit [Remote host closed the connection]
mistym_coffee is now known as mistym
fire has joined #ruby-lang
agile has joined #ruby-lang
benanne has joined #ruby-lang
zmack_ has quit [Remote host closed the connection]
lcdhoffman has joined #ruby-lang
<emmdeeess> ok, i think i've got the connection string right, but now i get Sequel::AdapterNotFound: LoadError: cannot load such file -- odbc
dhruvasagar has quit [Ping timeout: 264 seconds]
sepp2k has quit [Quit: Leaving.]
glebm has quit [Quit: Computer has gone to sleep.]
dhruvasagar has joined #ruby-lang
hramrach has joined #ruby-lang
jerrytgarcia has quit [Quit: Linkinus - http://linkinus.com]
davidbalbert is now known as davidbalber|away
maxmanders has joined #ruby-lang
musl has quit [Quit: WeeChat 0.3.9.2]
<injekt> emmdeeess: you need to install odbc
<emmdeeess> is it a gem?
musl has joined #ruby-lang
<emmdeeess> sorry if these are stupid questions
davidbalber|away is now known as davidbalbert
<emmdeeess> ahh, it's called ruby-odbc, not just odbc
<emmdeeess> it is not installing, i did get activerecord-sqlserver-adaptor to install, can i use that?
mistym is now known as mistym_meeting
r0bby_ is now known as robbyoconnor
Nisstyre-laptop has joined #ruby-lang
<injekt> no that's ironically for activerecord..
happydude has quit [Quit: Leaving]
glebm has joined #ruby-lang
CoverSlide has joined #ruby-lang
sepp2k has joined #ruby-lang
Gaelan has quit [Remote host closed the connection]
stef_204 has quit [Quit: quitting]
glebm has quit [Ping timeout: 256 seconds]
agarie has joined #ruby-lang
glebm has joined #ruby-lang
Nisstyre-laptop has quit [Quit: Leaving]
ryanf has joined #ruby-lang
Uranio has quit [Quit: while you reading this, a kitty dies]
bantic has quit [Read error: Connection reset by peer]
ryanf has quit [Client Quit]
robbyoconnor has quit [Read error: Connection reset by peer]
mistym_meeting is now known as mistym
robbyoconnor has joined #ruby-lang
<injekt> emmdeeess: you might want to join #sequel
dhruvasagar has quit [Ping timeout: 264 seconds]
robbyoconnor has quit [Remote host closed the connection]
robbyoconnor has joined #ruby-lang
pr0ton has quit [Ping timeout: 245 seconds]
ryanf has joined #ruby-lang
<cored> injekt: it's seems that apeiros_ got it right
<injekt> cored: hm?
<cored> injekt: the change is for the output not for the input, the match should be for the entire set of characters but the output should get presented separate
davidbalbert is now known as davidbalber|away
<cored> injekt: like /good/ will match [[g][o][o][d]] but not [g]o
<yorickpeterse> so apparently an article I wrote 2 years ago hit HN again, and it's not even that well written
<injekt> cored: ok ..
<yorickpeterse> yet my new stuff never gets uptokes on HN :<
wallerdev has joined #ruby-lang
<injekt> yorickpeterse: haha!
<injekt> :/
<injekt> HN is shit anyway
fire has quit [Ping timeout: 246 seconds]
Gaelan has joined #ruby-lang
<yorickpeterse> meh, the articles are ok
<yorickpeterse> I find that the discussions are mostly a [go|lisp|haskell] circlejerk
<yorickpeterse> basically the stuff nobody uses :>
<injekt> hey man people use go and lisp
<injekt> and nerds use haskell
<yorickpeterse> implying people in this channel are not nerds
davidbalber|away is now known as davidbalbert
<injekt> i use haskell... :(
<ykk> =D
<injekt> anyway lisp is for nerds too
<ykk> how come?
<injekt> because (()))((((()))))
<injekt> )
<injekt> ykk: why do I use haskell?
<yorickpeterse> damn it, where's that XKCD comic
<yorickpeterse> http://xkcd.com/224/
<ykk> yeah
<ykk> like for what
<ykk> gimme some reasons and examples =P
<ykk> por favor
<injekt> for when I want to feel special
<yorickpeterse> to feel good about himself
<yorickpeterse> and to show off in bars
<injekt> ^
<cored> injekt: :-P
<ykk> aahaha
<cored> yorickpeterse: I show off in bars doing Ruby
<yorickpeterse> "Hey baby, wanna see my Glassgow haskell compiler?"
tyler has joined #ruby-lang
<cored> at least the chicks dig it
<ykk> yes we do
<ykk> lots of female ruby gals
<ykk> errr lots of ruby gals
<injekt> lol female ruby gals
<ykk> actually goto a womans only ruby group here in nyc
<injekt> not to be mistaken for female ruby guys
<yorickpeterse> Rails girls?
<ykk> yorick..... was that an induendo?
<yorickpeterse> No, it's seriously a group
<ykk> haha
<yorickpeterse> http://railsgirls.com/
<yorickpeterse> a fairly well known one I might say
<yorickpeterse> I believe they were actually the first introduction to Ruby for our female dev co-worker
<injekt> i love how the events are like everywhere within 2 months
<yorickpeterse> (we only have 4 devs so go figure about the ratio)
<yorickpeterse> interesting enough, men are slowly becoming a minority where I work
robbyoconnor has quit [Remote host closed the connection]
<yorickpeterse> Hm wait, 13 co-workers of which only 5 are female
<yorickpeterse> errr, 6 actually from next month
<yorickpeterse> two of them are Swedish with the same name
<yorickpeterse> which is confusing
<yorickpeterse> injekt: why are you not counting co-workers? we need to settle the score of last night
robbyoconnor has joined #ruby-lang
<ykk> hey are you guys in ny and wanna hire me as a junior programmer? =D
<injekt> yorickpeterse: um
<injekt> yorickpeterse: 1 developer
<injekt> that'd be me
<injekt> hiring soon
<ykk> really? I learn real fast
<whitequark> yorickpeterse: (same name) hehe
<whitequark> name clashing
<yorickpeterse> yeah, and they also speak the same barbaric language
<yorickpeterse> ykk: nope, based in .nl
fire has joined #ruby-lang
sush24 has quit [Quit: This computer has gone to sleep]
<yorickpeterse> ykk: out of curiosity, how junior junior are you?
<darix> yorickpeterse: we should be careful ... that 17y old sold his company for 30m to yahoo
<darix> (:
<ykk> i don't know, i have been in the scene for 20 years, building pc's since I was a kid. Started ruby about 10 weeks ago and already writing functional programs with some guidance here and there and source code =P
<yorickpeterse> meh, no fucks given
<yorickpeterse> I'd rather be 20 and broke than 17, rich and not having experienced anything
<yorickpeterse> ykk: Aah, so you're not completely new to brogramming
<injekt> he's experienced being a millionaire
<yorickpeterse> I should clarify that I don't really care for money beyond what I need to survive (that sounds so dramatic)
<injekt> :)
<whitequark> yorickpeterse: experienced as in what?
<yorickpeterse> lyfe
<yorickpeterse> About a year ago I decided to stop being a cunt with money and just spend some on travelling and such
<yorickpeterse> much better than saving it up for now, especially with shit interest rates and such
<yorickpeterse> plus more fun
<yorickpeterse> though having a million or two would make that easier
flujan has quit [Quit: flujan]
<ykk> yorick no i'm not, but completely new to loving a programming language. lol Dabbled writing scripts in ruby for MUD's when I was a kid
<whitequark> ykk: ... but Ruby is just twenty years old
<breakingthings> whitequark: are thou of the implication that one could not be using ruby whilst they are younger than ruby?
hahuang65 has joined #ruby-lang
<cored> why is that getting applied to all the chars in the array
<cored> if I'm checking for a pattern before it, talking about the inject
<whitequark> breakingthings: aye
<whitequark> or it is probably the reverse
francisfish has quit [Remote host closed the connection]
runeb has joined #ruby-lang
francisfish has joined #ruby-lang
lectrick_ has left #ruby-lang [#ruby-lang]
<breakingthings> whitequark: I'm only a few months older than rubby
davidbalbert is now known as davidbalber|away
pr0ton has joined #ruby-lang
<yorickpeterse> I'm 12
<yorickpeterse> and what is this
agarie has quit [Read error: Connection reset by peer]
* yorickpeterse goes back to having an arguement with his cat
jacktrick has quit [Quit: Leaving]
agarie has joined #ruby-lang
davidbalber|away is now known as davidbalbert
francisfish has quit [Ping timeout: 256 seconds]
<cHarNe2> erhmm, is it bad design to pass a class-method from one class, to a class within antoher class, that executes the method?
<injekt> :/
<injekt> pass a class-method?
<cHarNe2> ye
<cHarNe2> or does it not work?
<injekt> cHarNe2: wanna show some code?
tylersmith has joined #ruby-lang
<cHarNe2> i can try to do that, gimme a sec.
swav has joined #ruby-lang
runeb has quit [Read error: Connection reset by peer]
<cHarNe2> it's a lot of code tho.. better just explain.
<injekt> how about strip all the code that doesn't matter and paste the example of your question
<cored> does gsub supports a way to set a conditional or the block or sustitution just applies to the match in the regex?
<cored> can I match something and sustitute a part of the match?
<injekt> cored: extract the match first then use gsub on it?
jfelchner has quit [Ping timeout: 240 seconds]
<cored> [pattern+] will match each character
<apeiros_> cored: you can use captures and put the captures back in the replacement
<cored> but also individually, the output I'm looking for should be the exact pattern but the sustitution will show each char inside a []
<injekt> pattern+ is useless if you've split it into chars
<cored> apeiros_: I'm trying with $1
<apeiros_> "foozar".gsub(/(foo).(ar)/, '\1b\2')
<injekt> foozarrr
<cored> apeiros_: I tried that pattern
davidbalbert is now known as davidbalber|away
<cHarNe2> injekt: somthing like this a suppose: http://pastie.org/7128944
davidbalber|away is now known as davidbalbert
<cored> "good go".gsub(/go/) #=> "good [g][o]"
jfelchner has joined #ruby-lang
<apeiros_> \bgo\b
<injekt> cHarNe2: yeah you dont want that
<apeiros_> cHarNe2: load? o0
<cored> apeiros_: the formatter is part of a block that I send to the method, I just split the word inside my map but at first I tried to
<cHarNe2> require?
<injekt> cHarNe2: also method(:sp.add_to_playlist) wont work, that'll call 'add_to_playlist' on a Symbol instance
<injekt> cHarNe2: yes require
<cHarNe2> ok
<injekt> cHarNe2: also, just pass sp in and execute the method from within the SpotiThin class
<injekt> SpotiThin.new(port, sp)
<cHarNe2> ohh, that seems like a better
<cHarNe2> ok, ill try this out and get back soon :)
agile has quit [Remote host closed the connection]
<cored> apeiros_: gsub(/\b[#{pattern}+]\b/i, &block)
<apeiros_> cored: um, [ already is a word boundary, no point putting \b there.
<apeiros_> also… [ needs escaping
<apeiros_> if it isn't meant to be a character class, that is. if it is meant to be a character class, #{pattern}+ makes no sense.
agile has joined #ruby-lang
maxmanders has quit [Ping timeout: 264 seconds]
runeb has joined #ruby-lang
<cored> apeiros_: look at this sample ["Love [i][s] good", "Chocolate [i][s] sweet", "Snow [i][s] cold", "Good [i][s] not evil"]
<apeiros_> is that the input?
maxmanders has joined #ruby-lang
<cored> the array also have [I love dogs] which as you can tell did not match because I and s are separate
<apeiros_> or the desired output?
<cored> the desired output
<cored> the only item remaining is [I love dogs]
<apeiros_> cored: and what's the input?
<cored> ["Love is good", "Chocolate is sweet", "Snow is cold", "Good is not evil", "I love dogs"]
<apeiros_> and by what rule is it decided, which words go from "..." to "[.][.][.]"?
Nisstyre-laptop has joined #ruby-lang
<cored> I send a pattern, wait let me show you the code I have
ritek has quit [Remote host closed the connection]
MaddinXx has quit [Remote host closed the connection]
ritek has joined #ruby-lang
MaddinXx has joined #ruby-lang
<apeiros_> cored: the value for pattern would also be of interest
<cored> as you can see at first I get all the strings that have the pattern and then I try to sustitute it with what the block sends for the formatting
<cored> in the example I send you will be 'is'
runeb has quit [Remote host closed the connection]
<apeiros_> cored: 'is' or /is/=
<apeiros_> cored: 'is' or /is/?
<cored> they are sending an string, but I transforms it into a regex in the code
<cored> I'm guessing that I have to implement the thing that gsub is doing now
<bougyman> transforms it properly
<cored> bougyman: ?
MaddinXx has quit [Read error: Connection reset by peer]
_dabradley has left #ruby-lang [#ruby-lang]
<apeiros_> cored: and why #{pattern}+?
chessguy has quit [Remote host closed the connection]
havenwood has joined #ruby-lang
<apeiros_> I mean, why the +?
<bougyman> that's what I meant.
MaddinXx has joined #ruby-lang
<bougyman> you're putting it in a character class.
<apeiros_> that code seems somewhat odd for what you try to do
<bougyman> i'm sure that's not what they expect.
<bougyman> escape the [ as \[ if you're trying to match a left bracket.
<bougyman> similarly \] for the right.
<apeiros_> cored: so the pattern is supposed to be a full word, e.g. with ["Fission rocks"] and pattern='is', you don't want ["F[i][s]ssion rocks"], right?
<cored> apeiros_: the first one if for getting all the strings that have the pattersn and then applying the transformation to each of them
<apeiros_> cored: but + is *consecutive*. it'd only match is, isis, isisis etc.
<bougyman> not without grouping
<cored> I thought that was 1 or 0
<cored> sorry 1 or more
<apeiros_> yes, 1 or more *consecutively*
<cored> apeiros_: yes
<apeiros_> a regex does not jump around in your string. it starts at the left and works its way through to the right.
<cored> apeiros_: yes
<cored> apeiros_: and also yes to the format you gave me in the top
<apeiros_> was the first yes the answer to my question?
<apeiros_> this one: >> cored: so the pattern is supposed to be a full word, e.g. with ["Fission rocks"] and pattern='is', you don't want ["F[i][s]ssion rocks"], right?
<cored> apeiros_: yes
<apeiros_> k
<apeiros_> cored: strings.map { |string| string.gsub(/\b#{Regexp.escape(pattern)}\b/) { |word| word.gsub(/./, '[\0]') } } # something along these lines
<apeiros_> ah, forgot the select. pasting.
<cored> apeiros_: is ok the select is easy enough
<cored> why are you escaping the regex ?
<apeiros_> I'm not escaping the regex. I'm escaping the string.
<apeiros_> because otherwise special chars in the pattern have a meaning.
<cored> it works fine with gsub(/#{pattern}/i) { |word| word.gsub(/./, &block) }
<cored> oh ok
<cored> sorry
JohnBat26 has quit [Quit: KVIrc 4.3.1 Aria http://www.kvirc.net/]
<cored> but with what I paste it also works, so you basically match first the pattern and then for each character of the pattern
<apeiros_> cored: http://pastie.org/7129263
<apeiros_> hu? I can't edit a paste anymore?
<apeiros_> well then, new paste: http://pastie.org/7129290
tonni_ has joined #ruby-lang
wmoxam has quit [Ping timeout: 245 seconds]
<apeiros_> cored: yours is broken in a couple of ways. #{pattern}+ does not work the way you think. and since pattern is a string and not a regex, it even doesn't work the way I said earlier (I stated that it being a regex was required, though)
<apeiros_> with pattern == 'is', /#{pattern}+/i becomes /is+/, which matches "is", "iss", "isssssssss" etc.
<apeiros_> it will also match *anywhere* in the string, so "Fission rocks" would match.
tonni has quit [Ping timeout: 245 seconds]
cored has quit [Ping timeout: 264 seconds]
<apeiros_> word.gsub(/[#{pattern}+]/i # this works even more different from what you seem to think
<injekt> Fission does rock
cored has joined #ruby-lang
cored has quit [Changing host]
cored has joined #ruby-lang
<whitequark> fission?
<whitequark> like, dividing uranium?
<apeiros_> first word I came up to which contains 'is'
<apeiros_> *came up with
<cored> apeiros_: I think I gave you the wrong expectation, because I love dogs also expects [I] love dog[s] just because I and S are is without all the things in between
<cored> apeiros_: that won't match if I have just an I and just an 's' in the string
<apeiros_> …
<apeiros_> that was one thing I actually asked.
<apeiros_> well then, I'm playing now.
Nisstyre-laptop has quit [Quit: Leaving]
<cored> hehe
<cored> oki
<cored> thanks, I'll try to fix it
<cored> it's just one example remaining
robbyoconnor has quit [Ping timeout: 245 seconds]
<yorickpeterse> lol Ruby prescanning:
<yorickpeterse> >> puts foo.foo
<yorickpeterse> damn it, the bot is gone
<injekt> now don't you look silly
<yorickpeterse> whatever, yolo swag
* yorickpeterse hangs himself
<yorickpeterse> oh interesting, this seems to be an Rbx case
<lianj> then cut the rope fast
<yorickpeterse> tehee
<yorickpeterse> Struct.new(...).new(...).send(:binding) # fuck ERB
sailias has quit [Ping timeout: 272 seconds]
davejlong has quit [Ping timeout: 256 seconds]
<injekt> wat
<injekt> yorickpeterse: use erubis with a hash
<yorickpeterse> Hm, never looked at Erubis
<yorickpeterse> also, erubis is in stdlib?
<yorickpeterse> nope, seems not
<cHarNe2> injekt: i think it works as it should now
emmdeeess has quit [Ping timeout: 256 seconds]
<injekt> yorickpeterse: no
<injekt> yorickpeterse: then yeah, Struct.fuckyou it is
<yorickpeterse> pretty much
<yorickpeterse> ActiveStruct
<yorickpeterse> ActiveStruct.to_binding(:erb).with_variables(:foo => bar)
Squarepy has quit [Quit: Leaving]
<injekt> ActiveStructWithErbBindingAndHashWithIndifferentAccess
<yorickpeterse> DEPRECATED: using a Hash for with_variables is deprecated, please use `set_variable(:foo, :bar)` instead
<injekt> with_hash(hash) #=> using a hash with with_hash is deprecated, please use ActiveHash
<yorickpeterse> rake generate:everything # best Rake task name so far
<yorickpeterse> (unrelated to Rails)
relrod_ is now known as relrod
jgoss has joined #ruby-lang
jgoss has joined #ruby-lang
jgoss has quit [Changing host]
carloslopes has quit [Remote host closed the connection]
skbierm_ has quit [Quit: Verlassend]
<yorickpeterse> <3 sprintf
<yorickpeterse> related, current status: http://pastie.org/pastes/7129563/text
<yorickpeterse> around 8 hours of hacking on Rbx and about an hour or two on my own code. Result? Saved myself about a month or two worth of work
<injekt> :D
fraggle has joined #ruby-lang
chessguy has joined #ruby-lang
musl has quit [Remote host closed the connection]
musl has joined #ruby-lang
tonni_ has quit [Read error: Connection reset by peer]
musl has quit [Client Quit]
tonni has joined #ruby-lang
pr0ton has quit [Quit: pr0ton]
pr0ton has joined #ruby-lang
zenspider has joined #ruby-lang
pkrnj has joined #ruby-lang
scampbell has quit [Quit: Leaving]
symm- has joined #ruby-lang
musl has joined #ruby-lang
jamilbk has joined #ruby-lang
<jamilbk> hello folks, anyone know how i can break from a Net::HTTP streaming block with getting the Zlib::BufError?
<cored> it's seems that this problem can't be solve with regex
musl has quit [Client Quit]
<jamilbk> ^without getting
<cored> the fuzzy finder also match something like pattern = "si"; "[S]now [i]s cold" but not "I eat" because the I needs the "s" in the front for that pattern
musl has joined #ruby-lang
postmodern has joined #ruby-lang
<cored> whitequark: hm
musl has quit [Client Quit]
<cored> whitequark: no regex
<whitequark> cored: why do you insist on regexps?
chessguy has quit [Remote host closed the connection]
<cored> whitequark: I started this solution like this want to take it as far as it can :-)
woollyams has joined #ruby-lang
pr0ton has quit [Quit: pr0ton]
Wardrop has joined #ruby-lang
<yorickpeterse> hm, 12MB extra for loading 112 files full of definitions for Ruby's core lib
<yorickpeterse> (of RAM)
<yorickpeterse> I expected worse
adambeynon has quit [Quit: ["Textual IRC Client: www.textualapp.com"]]
<yorickpeterse> whitequark: hey, want to see something cool?
<yorickpeterse> and quite possibly wtf worthy
<yorickpeterse> "Showing 115 changed files with 8,708 additions and 20 deletions."
forrest has quit [Quit: Leaving]
mjio has joined #ruby-lang
breakingthings has quit []
stevechiagozie has quit [Quit: Computer has gone to sleep.]
gregmore_ has joined #ruby-lang
MaddinXx has quit [Remote host closed the connection]
<zenspider> yorickpeterse: that's some seriously loquacious shit. why does define_instance_method take a block instead of *args ?
mistym has quit [Remote host closed the connection]
Wardrop has quit [Quit: Wardrop]
gregmoreno has quit [Ping timeout: 264 seconds]
Axsuul has joined #ruby-lang
dustint has quit [Ping timeout: 240 seconds]
robbyoconnor has joined #ruby-lang
Gaelan has quit [Remote host closed the connection]
Gaelan has joined #ruby-lang
robbyoconnor has quit [Read error: Connection reset by peer]
Gaelan has quit [Read error: Connection reset by peer]
Gaelan has joined #ruby-lang
ryanf_ has joined #ruby-lang
nXqd has quit [Ping timeout: 246 seconds]
ryanf has quit [Ping timeout: 245 seconds]
robbyoconnor has joined #ruby-lang
soknee has quit [Quit: Leaving.]
sailias has joined #ruby-lang
pkrnj has quit [Quit: Computer has gone to sleep.]
chessguy has joined #ruby-lang
mixandgo has quit [Quit: mixandgo]
g0bl1n has joined #ruby-lang
wmoxam has joined #ruby-lang
lcdhoffman has quit [Quit: lcdhoffman]
zmack has joined #ruby-lang
zmack has quit [Remote host closed the connection]
jamilbk has quit [Quit: jamilbk]
mistym_away has joined #ruby-lang
<cored> it is possible to stub a require
<cored> ?
<drbrain> cored: yes…
<cored> how?
<cored> I don't want to make my CLI to have a ton of dependencies so I was asking the user to give me the name of the lib to require and he will be in charge on doing so
<cored> but in the specs I need to test another behavior which depends on that part so I need to stub the requre
<zenspider> def require in your test class
<cored> oh
<cored> nice, thanks
brianpWins has quit [Quit: brianpWins]
<cored> it's seems that rspec did not like that
dumfries has quit [Ping timeout: 256 seconds]
breakingthings has joined #ruby-lang
stevechiagozie has joined #ruby-lang
dumfries has joined #ruby-lang
chrismar035 has quit [Quit: chrismar035]
<TTilus> already googled "rspec stub require"?
<cored> yes
<cored> did smething like Kernel.should_receive(:require).and_return(true)
<cored> no luck
<ykk> with Mechanize I have a table which has date, links to pic galleries (in another table), description
<ykk> i got the dates becoming folders, descriptions saved in there but can't figure out an approach for opening the links and iterating through the table to save images
<outoftime> cored: you could try Object.any_instance.should_receive(:require)#...
<ykk> i had it with page = agent.get(gall_links) then it would return the page i was currently on and the new page i opened
MaddinXx has joined #ruby-lang
<ykk> which was too much and i can't target the new table =\
MaddinXx has quit [Remote host closed the connection]
<cored> outoftime: ok
<outoftime> cored: seems vaguely icky but it might work. anywho, i'm out. hope you find success
outoftime has quit [Quit: Leaving]
mixandgo has joined #ruby-lang
skade has joined #ruby-lang
mixandgo has quit [Client Quit]
Gaelan has quit [Remote host closed the connection]
mwjcomputing has joined #ruby-lang
davidbalbert is now known as davidbalber|away
benanne has quit [Quit: kbai]
kurko_ has quit [Quit: Computer has gone to sleep.]
<ykk> durp got it
mineiro has joined #ruby-lang
lcdhoffman has joined #ruby-lang
rue_XIV has joined #ruby-lang
anonymuse has quit [Quit: Leaving...]
g0bl1n has quit [Quit: g0bl1n]
sailias has quit [Quit: Leaving.]
rue has quit [Ping timeout: 252 seconds]
robbyoconnor has quit [Ping timeout: 252 seconds]
chessguy has quit [Remote host closed the connection]
mlpinit has quit [Quit: mlpinit]
soknee has joined #ruby-lang
MehLaptop has joined #ruby-lang
soknee has quit [Client Quit]
rwilcox has quit [Quit: ["Textual IRC Client: www.textualapp.com"]]
Gaelan has joined #ruby-lang
gregmore_ has quit [Remote host closed the connection]
xuweirong has joined #ruby-lang
wmoxam has quit [Ping timeout: 264 seconds]
gregmoreno has joined #ruby-lang
hagebake is now known as hagabaka
pkrnj has joined #ruby-lang
xuweirong has quit [Client Quit]
xuweirong has joined #ruby-lang
xuweirong has quit [Client Quit]
symm- has quit [Quit: Leaving...]
r0bglees0n has quit [Quit: WeeChat 0.3.8]
wmoxam has joined #ruby-lang
chessguy has joined #ruby-lang
skade has quit [Quit: Computer has gone to sleep.]
punchfac_ has joined #ruby-lang
symm- has joined #ruby-lang
bluepojo has joined #ruby-lang
punchfacechamp has quit [Ping timeout: 260 seconds]
maxmanders has quit [Quit: Computer has gone to sleep.]
dRbiG has quit [Read error: Operation timed out]
dustint has joined #ruby-lang
dRbiG has joined #ruby-lang
charliesome has joined #ruby-lang
idkazuma has joined #ruby-lang