apeiros changed the topic of #ruby-lang to: Nick registration required to talk || Ruby 2.0.0-p247: http://ruby-lang.org (Ruby 1.9.3-p448) || Paste >3 lines of text on http://gist.github.com
micalexander has quit [Remote host closed the connection]
micalexander has joined #ruby-lang
GarethAdams has quit [Ping timeout: 240 seconds]
GaelanAintAround is now known as Gaelan
micalexander has quit [Ping timeout: 272 seconds]
pothibo has quit [Quit: pothibo]
GarethAdams has joined #ruby-lang
GarethAdams has joined #ruby-lang
GarethAdams has quit [Changing host]
ikrima has joined #ruby-lang
majjoha has joined #ruby-lang
micalexander has joined #ruby-lang
micalexander has quit [Remote host closed the connection]
micalexander has joined #ruby-lang
tkuchiki has joined #ruby-lang
JoshuaPaling has joined #ruby-lang
majjoha has quit [Ping timeout: 240 seconds]
tkuchiki has quit [Remote host closed the connection]
tkuchiki has joined #ruby-lang
micalexander has quit [Ping timeout: 256 seconds]
yfeldblum has joined #ruby-lang
tkuchiki has quit [Ping timeout: 256 seconds]
mistym has quit [Quit: Leaving]
hogeo has joined #ruby-lang
zz_michael_mbp is now known as michael_mbp
RubyRookie has quit [Remote host closed the connection]
elia has quit [Quit: Computer has gone to sleep.]
flip_digits has quit [Remote host closed the connection]
hhatch has quit [Ping timeout: 240 seconds]
sepp2k1 has quit [Quit: Leaving.]
ruby-lang829 has quit [Ping timeout: 250 seconds]
stamina has quit [Ping timeout: 260 seconds]
yfeldblum has quit [Remote host closed the connection]
elia has joined #ruby-lang
elia has quit [Remote host closed the connection]
nertzy has joined #ruby-lang
tkuchiki has joined #ruby-lang
CaptainJet has quit [Ping timeout: 248 seconds]
CaptainJet has joined #ruby-lang
Barrin6 has joined #ruby-lang
Easy-Pete has joined #ruby-lang
<Easy-Pete> What is the difference between instance_variable_get(:instvar) and instance_variable_get(instvar)
<Easy-Pete> sorry
yfeldblum has joined #ruby-lang
CoreData has quit [Ping timeout: 272 seconds]
<Easy-Pete> 'instance_variable_get(:@instvar)'
<Easy-Pete> and
<Easy-Pete> 'instance_variable_get(@instvar)'
<banisterfiend> the latter probably doesn't do what u want
CoreData has joined #ruby-lang
lfox has joined #ruby-lang
lfox has quit [Client Quit]
lfox has joined #ruby-lang
<Easy-Pete> banisterfiend What do you mean?
simoz has joined #ruby-lang
<banisterfiend> Easy-Pete You want to pass it either a symbol or a string
lfox has quit [Client Quit]
<banisterfiend> that contains the name of the ivar
tylersmith has joined #ruby-lang
lfox has joined #ruby-lang
Easy-Pete has quit [Ping timeout: 268 seconds]
julweber has quit [Remote host closed the connection]
julweber has joined #ruby-lang
woollyams has joined #ruby-lang
symm- has quit [Read error: Operation timed out]
robbyoconnor has quit [Ping timeout: 256 seconds]
Oloryn_lt2 has joined #ruby-lang
julweber has quit [Ping timeout: 248 seconds]
micalexander has joined #ruby-lang
micalexander has quit [Remote host closed the connection]
micalexander has joined #ruby-lang
micalexa_ has joined #ruby-lang
micalexander has quit [Read error: Connection reset by peer]
shinnya has quit [Ping timeout: 252 seconds]
dhruvasagar has joined #ruby-lang
yfeldblum has quit [Remote host closed the connection]
majjoha has joined #ruby-lang
Cakey has joined #ruby-lang
jperry_ has quit [Quit: jperry_]
majjoha has quit [Read error: Operation timed out]
lfox has quit []
lfox has joined #ruby-lang
Guest90131 has joined #ruby-lang
Guest90131 is now known as diegoviola
JoshuaPaling has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
Coincidental has quit [Remote host closed the connection]
Coincidental has joined #ruby-lang
julweber has joined #ruby-lang
michael_mbp is now known as zz_michael_mbp
Coincidental has quit [Ping timeout: 245 seconds]
julweber has quit [Ping timeout: 252 seconds]
Elico has quit [Ping timeout: 248 seconds]
spuk has quit [Quit: Human beings were created by water to transport it uphill.]
Elico has joined #ruby-lang
spuk has joined #ruby-lang
zz_michael_mbp is now known as michael_mbp
Domon has joined #ruby-lang
Coincidental has joined #ruby-lang
Oloryn_lt2 has quit [Read error: Connection reset by peer]
bzalasky has joined #ruby-lang
ldnunes has quit [Quit: Leaving]
_AJ has joined #ruby-lang
micalexander has joined #ruby-lang
simoz has quit [Ping timeout: 240 seconds]
<_AJ> Anyone having issue installing gems using the —system ruby on Mavericks?
Oloryn_lt2 has joined #ruby-lang
<_AJ> Anyone get it working without a version manager?
saarinen has quit [Quit: saarinen]
saarinen has joined #ruby-lang
micalexa_ has quit [Ping timeout: 268 seconds]
micalexander has quit [Ping timeout: 248 seconds]
micalexander has joined #ruby-lang
CaptainJet has quit []
micalexander has quit [Read error: Connection reset by peer]
micalexander has joined #ruby-lang
jonathanmarvens has quit [Read error: Connection reset by peer]
CaptainJet has joined #ruby-lang
jonatha__ has joined #ruby-lang
sevvie has joined #ruby-lang
sevvie has quit [Client Quit]
arooni-mobile has quit [Ping timeout: 260 seconds]
majjoha has joined #ruby-lang
bzalasky has quit [Remote host closed the connection]
bzalasky has joined #ruby-lang
mistym has joined #ruby-lang
majjoha has quit [Ping timeout: 248 seconds]
bzalasky has quit [Ping timeout: 264 seconds]
<havenwood> _AJ: Works on my machine: sudo gem update --system
<havenwood> _AJ: Oh, on second read looks you weren't asking about updating RubyGems, but same for gems. With `sudo` not seeing trouble.
<_AJ> I had issue install rails, devise, jekyll. Just about any gem.
<_AJ> I might do an Erase and Install has it was running the Developer preview for several months.
charliesome has joined #ruby-lang
slyphon has quit [Quit: I REGRET NOTHiiiiiiiiiinnnngggg….]
achiu1 has joined #ruby-lang
achiu has quit [Ping timeout: 240 seconds]
majjoha has joined #ruby-lang
robbyoconnor has joined #ruby-lang
yours_truly has quit [Quit: Leaving]
stardiviner has joined #ruby-lang
nisstyre has joined #ruby-lang
enmand has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
majjoha has quit [Ping timeout: 264 seconds]
woollyams has quit [Ping timeout: 252 seconds]
mistym_ has joined #ruby-lang
lupine has quit [Ping timeout: 245 seconds]
mistym has quit [Ping timeout: 245 seconds]
jithu has joined #ruby-lang
randym_ has quit [Ping timeout: 248 seconds]
shaileshg_ has quit [Ping timeout: 248 seconds]
Domon_ has quit [Ping timeout: 272 seconds]
bzalasky has joined #ruby-lang
r0bby_ has joined #ruby-lang
robbyoconnor has quit [Ping timeout: 245 seconds]
randym_ has joined #ruby-lang
r0bby_ has quit [Client Quit]
Domon_ has joined #ruby-lang
shaileshg_ has joined #ruby-lang
ikrima has quit [Ping timeout: 260 seconds]
lfox has quit [Quit: ZZZzzz…]
majjoha has joined #ruby-lang
Gaelan is now known as GaelanAintAround
majjoha has quit [Ping timeout: 248 seconds]
nisstyre has quit [Quit: Leaving]
tomzx_mac has quit [Read error: Operation timed out]
jj_reddit4 has joined #ruby-lang
<jj_reddit4> Hey there! I got a CL application i'm building using thor. I want to be able to get an update on what I was last working on. Would I need a database like PG or is it more convenient to write it to a file and make it invisible?
dhruvasagar has quit [Ping timeout: 246 seconds]
pothibo has joined #ruby-lang
<_AJ> If it's simple data, look into using sqlite
<Barrin6> what's CL
<Barrin6> craigslist?
<jj_reddit4> command line application
<_AJ> Command line
<Barrin6> oh lol
pothibo has quit [Client Quit]
<_AJ> SQLite is also pretty portable
<jj_reddit4> the status is going to be like less than 140 characters at best in the directories i use it in
<jj_reddit4> SQLite is choice for my situation?
<_AJ> Check it out for yourself.
ledestin has quit [Ping timeout: 256 seconds]
<_AJ> Pretty easy to impliment if you already have some SQL chops
<jj_reddit4> thanks _AJ
<jj_reddit4> i'll take a look
<_AJ> PG will be overkill
nisstyre has joined #ruby-lang
<_AJ> You'll spend more time setting up the database than writing the app
soba has quit [Ping timeout: 265 seconds]
soba has joined #ruby-lang
mistym has joined #ruby-lang
<Barrin6> i got no sql chops
<Barrin6> I know how to write basic select queries
<Barrin6> that's about it
vbatts has joined #ruby-lang
<Barrin6> oh shit this is pretty good guide _AJ
mistym_ has quit [Ping timeout: 248 seconds]
soba has quit [Ping timeout: 240 seconds]
charliesome has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
majjoha has joined #ruby-lang
amerine has joined #ruby-lang
<Barrin6> I could create my own facebook with sqlite
<hfp> Evening all! I am trying to understand the following snippet: http://pastebin.com/THW9kdq8 . I understand why the first line is "Batman will win", but I don't understand why the second isn't "Batman will win" and then "Ironman will win". Why isn't the lambda executed in the second call?
<lianj> it is
majjoha has quit [Ping timeout: 245 seconds]
<hfp> So why isn't "Batman will win" output from that call?
kitak has quit [Remote host closed the connection]
wbill has joined #ruby-lang
wbill has quit [Excess Flood]
<jrobeson> somebody must have embedded lua in sqlite by now.
<jrobeson> with that, you could have your own single file application
<hfp> lianj: Thanks but I still don't understand...
bzalasky has quit [Remote host closed the connection]
<jrobeson> sometimes you should skip ahead and come back
<jrobeson> later*
bzalasky has joined #ruby-lang
<jrobeson> in case more playing is required for true understanding
<Barrin6> is this from code academy?
<hfp> Barrin6: Yes
<Barrin6> I honestly never understood it either
<Barrin6> i went through that same tutorial
<Barrin6> will probably have to go back to it again
<Barrin6> hfp
<Barrin6> from what I understand with lambda
<Barrin6> if it's called upon, it will break out of the method
<Barrin6> and when it breaks, it means it doesn't execute the rest of the method
<Barrin6> don't ask why
<Barrin6> I don't know
<hfp> Barrin6: This is for procs I think. Lambdas are supposed to come back and execute the rest, no?
<Barrin6> wait isn't that what you said? the lambda is not executing the rest?
<Barrin6> or did I mix those up
bzalasky has quit [Ping timeout: 245 seconds]
<jrobeson> they both handle return different, that is a fact
<hfp> It's weirder than that. The lambda executes the second part (puts "Ironman..." but not the first part "Batman..." when I expected it to output both
<Barrin6> i remember seeing a diagram that explained the difference
<jrobeson> i haven't seen much of that in userland code.
<whitequark> if you have a return statement in proc{} or just a raw block (eg each{}), it returns from the innermost method (def)
<whitequark> if you have a return statement in a lambda{}, it returns just from that lambda.
<Barrin6> userland code?
<jrobeson> doesn't matter
<hfp> whitequark: I get that, but then why the puts from the lambda isn't displayed at all in my snippet?
<whitequark> hfp: there is no puts in your lambda
<hfp> whitequark: True... But Ruby always prints a return, doesn't it?
<whitequark> hfp: what? of course no
<whitequark> return is just, well, return. in fact lambda { "foo" } is equivalent to lambda { return "foo" }
<Barrin6> hfp, get ruby on your computer
<Barrin6> and copy that code into a notepad and save as a .rb file
jonathanmarvens has joined #ruby-lang
<hfp> Yes I'm running it on http://repl.it/languages/Ruby
<Barrin6> run it and you see that it doesn't print a return
jonatha__ has quit [Read error: Connection reset by peer]
<Barrin6> hfp start doing projecteuler in addition to codeacademy http://projecteuler.net/
<Barrin6> i'm 90% done with code academy but doing projecteuler helps me reinforce syntax
<Barrin6> 90% done with the ruby track on code academy*
<hfp> whitequark: Ok I think I'm confused. >> foo = "bar"; foo will output "bar". I was told (seems I misunderstood) that it is why "return" aren't needed in 99% of the cases. What am I missing?
<hfp> >> foo = "bar"; foo
<eval-in> hfp => "bar" (https://eval.in/56980)
<jrobeson> whoa
kitak has joined #ruby-lang
<heftig> hfp: methods automatically return the value of the last expression evaluated
<whitequark> hfp: that's just how a repl works
<whitequark> if you don't execute that expression on its own line in a repl, there won't be anything printed.
havenwood has quit [Remote host closed the connection]
<heftig> puts batman_ironman_lambda calls batman_ironman_lambda and uses its value as a parameter to puts
<heftig> batman_ironman_lambda creates a lambda which returns "Batman...", then calls it. however, that return value is thrown away, since it's not used for anything
<hfp> heftig: Aaaaah I think I'm starting to get it
<heftig> the next expression is "Ironman...", which is also the last one
<heftig> and that one becomes the return value
<hfp> And instead it is overwritten by "Ironman..."
<hfp> Ok makes sense now!
<heftig> the key difference between _proc and _lambda here is that "return" in a proc returns from the enclosing context (the method) instead
<heftig> while "return" in a lambda returns from the lambda
Coincidental has quit [Remote host closed the connection]
jj_reddit4 has left #ruby-lang [#ruby-lang]
<hfp> Excellent I get it now
<heftig> do in batman_ironman_proc, the victor.call returns from the method, so "Ironman..." is never evaluated
<heftig> so in*
GaelanAintAround is now known as Gaelan
Coincidental has joined #ruby-lang
<hfp> Yup
majjoha has joined #ruby-lang
<hfp> Thanks :)
<hfp> Barrin6: did you get this?
jonathanmarvens has quit [Remote host closed the connection]
<Barrin6> sorry was away
<Barrin6> what I miss
Gaelan is now known as GaelanAintAround
kdonrails has joined #ruby-lang
<hfp> Barrin6: That in the lambda, it doesn't puts "Batman...." because the return is overwritten by "Ironman..."
Coincidental has quit [Ping timeout: 252 seconds]
majjoha has quit [Ping timeout: 264 seconds]
postmodern has joined #ruby-lang
havenwood has joined #ruby-lang
<Barrin6> o9hh
<Barrin6> so that's it?
<Barrin6> lambda returns the latest return?
<hfp> No
<Barrin6> oh
<Barrin6> you just substitued by doing victor.call followed by the string
<Barrin6> and that string replaces
<Barrin6> what was in the original lambda
<Barrin6> right?
<Barrin6> no I don't understand
<hfp> The lambda returns something but then the methods returns something else. If somewhere just after the victor.call there was a line of code doing something with the string "Batman" returned from the lambda, we would see it. But nothing is done and so the final evaluation of the whole method returns "Ironman" only and that's what puts outputs
<hfp> If you add a puts to victor.call then you see it
<Barrin6> okay one sec I need to copy your code into my own ruby
<Barrin6> and run it
<Barrin6> okay so I added the puts to victor.call
<Barrin6> now it prints both out
<Barrin6> i mean puts all 3 out
<Barrin6> but both from the lambda method
<hfp> Do you understand why now?
<Barrin6> what do you mean nothing is done?
<Barrin6> and so the evaulation of the whole method returns "Ironman"
<hfp> The lambda returns "Batman..."
<Barrin6> yea it's supposed to
<Barrin6> but method returns iron man
<hfp> But the rest of the code doesn't use this return and instead the next instruction is to return "Ironman..."
<hfp> try and put "return victor.call" instead of "puts victor.call"
<hfp> Or remove "Ironman..." which is essentially the same
<hfp> And it will show "Batman..."
<Barrin6> okay yea I get that part kinda
<Barrin6> I think it's one of those things I will have to go back to
<Barrin6> and maybe get it down later
<hfp> I guess
<hfp> Oh well heftig's explanation made sense for me I thought it would for you too
<Barrin6> :(
<Barrin6> I'm not that smart
huma has joined #ruby-lang
<hfp> It's not about being smart it's just that different explanations make sense to different people
soba has joined #ruby-lang
<Barrin6> Only thing I know is that proc ignores the # of arguments
<Barrin6> where as lambda is strict on them
CaptainJet has quit []
<hfp> Yes
apeiros has quit [Remote host closed the connection]
apeiros has joined #ruby-lang
<hfp> Keep asking to get different answers Barrin6. I got a few answers before it made sense.
<Barrin6> Yea I have to review it later on
<Barrin6> there is a lot of resources on it
robbyoconnor has joined #ruby-lang
<Barrin6> thanks for trying
<hfp> Sure, I hope you figure it out too :)
diegoviola has quit [Ping timeout: 256 seconds]
<Barrin6> anyone know why this is stuck in a long loop. If I change the 500 to 5 it's quick
<Barrin6> hmm might be the array
<Barrin6> going to kill that
<Barrin6> naw can't be
<Barrin6> that still don't work
chickenf_ has joined #ruby-lang
mistym_ has joined #ruby-lang
<Barrin6> oh I forgot the pastbin hehe
soba has quit [Ping timeout: 240 seconds]
mistym has quit [Ping timeout: 245 seconds]
majjoha has joined #ruby-lang
majjoha has quit [Ping timeout: 240 seconds]
<Barrin6> time to ask the stackoverflow gods
bzalasky has joined #ruby-lang
r0bglees0n has quit [Ping timeout: 245 seconds]
kirin` has quit [Ping timeout: 240 seconds]
kirin` has joined #ruby-lang
julweber has joined #ruby-lang
julweber has quit [Ping timeout: 248 seconds]
majjoha has joined #ruby-lang
hfp has quit [Remote host closed the connection]
hfp has joined #ruby-lang
mistym_ is now known as mistym
journeyer has joined #ruby-lang
jsullivandigs has joined #ruby-lang
apeiros has quit [Remote host closed the connection]
journeyer has left #ruby-lang [#ruby-lang]
journeyer has joined #ruby-lang
heftig has quit [Ping timeout: 264 seconds]
micalexander has quit [Remote host closed the connection]
micalexander has joined #ruby-lang
Cakey has left #ruby-lang [#ruby-lang]
tkuchiki has quit [Read error: Connection reset by peer]
tkuchiki has joined #ruby-lang
mbj has joined #ruby-lang
mbj_ has joined #ruby-lang
journeyer has quit [Quit: Leaving]
micalexander has quit [Remote host closed the connection]
micalexander has joined #ruby-lang
Barrin6 has quit [Quit: HydraIRC -> http://www.hydrairc.com <- It'll be on slashdot one day...]
julweber has joined #ruby-lang
mbj_ has quit [Ping timeout: 264 seconds]
mbj has quit [Ping timeout: 248 seconds]
micalexander has quit [Ping timeout: 268 seconds]
saarinen has quit [Quit: saarinen]
julweber has quit [Ping timeout: 272 seconds]
amerine has quit [Ping timeout: 248 seconds]
nazty has quit [Ping timeout: 245 seconds]
apeiros has joined #ruby-lang
nisstyre has quit [Quit: Leaving]
hfp has quit [Read error: No route to host]
arBmind has joined #ruby-lang
arBmind has left #ruby-lang [#ruby-lang]
lsegal has quit [Read error: Connection reset by peer]
lsegal has joined #ruby-lang
amerine has joined #ruby-lang
Domon has quit [Remote host closed the connection]
jithu has quit [Quit: Mother, did it need to be so high?]
Domon has joined #ruby-lang
Nisstyre-laptop has joined #ruby-lang
mdedetrich has quit [Quit: Computer has gone to sleep.]
antonversal has joined #ruby-lang
antonversal has left #ruby-lang [#ruby-lang]
rails_smith has joined #ruby-lang
antonversal has joined #ruby-lang
dhruvasagar has joined #ruby-lang
havenwood has quit [Remote host closed the connection]
tbuehlmann has joined #ruby-lang
nazty has joined #ruby-lang
bzalasky has quit [Remote host closed the connection]
bzalasky has joined #ruby-lang
jithu has joined #ruby-lang
bzalasky has quit [Ping timeout: 256 seconds]
Coincidental has joined #ruby-lang
dagobah has joined #ruby-lang
antonversal has quit [Quit: Leaving.]
jsullivandigs has quit [Remote host closed the connection]
Mon_Ouie has quit [Read error: Operation timed out]
earthquake has joined #ruby-lang
toretore has joined #ruby-lang
_AJ has quit [Quit: Leaving.]
bzalasky has joined #ruby-lang
Nisstyre-laptop has quit [Ping timeout: 246 seconds]
chickenf_ has quit [Quit: Textual IRC Client: www.textualapp.com]
vmoravec has joined #ruby-lang
lsegal has quit [Quit: Quit: Quit: Quit: Stack Overflow.]
Coincidental has quit [Remote host closed the connection]
micalexander has joined #ruby-lang
mlangenberg has joined #ruby-lang
Coincidental has joined #ruby-lang
h_kon has joined #ruby-lang
<mlangenberg> When using MiniTest, can I stub a class method without passing a block?
<blowmage> the block is the scope of the stub
<mlangenberg> e.g. TCPSocket.stub(:new, mock) { } works, but I also need to sub OpenSSL::SSL::SSLSocket
<mlangenberg> making my test ugly
<blowmage> are you nesting the stubs?
<mlangenberg> TCPSocket.stub(:new, mock) { OpenSSL::SSL::SSLSocket.stub(:new) { ... } }
<mlangenberg> could make it a helper though
solars has joined #ruby-lang
micalexander has quit [Ping timeout: 240 seconds]
nignaztic has joined #ruby-lang
Coincidental has quit [Ping timeout: 268 seconds]
nazty has quit [Ping timeout: 246 seconds]
bastilian has joined #ruby-lang
kitak has quit [Read error: Connection reset by peer]
kitak has joined #ruby-lang
arBmind has joined #ruby-lang
julweber has joined #ruby-lang
Coincide_ has joined #ruby-lang
antonversal has joined #ruby-lang
antonversal has left #ruby-lang [#ruby-lang]
mistym has quit [Remote host closed the connection]
ikrima has joined #ruby-lang
r0bglees0n has joined #ruby-lang
chickenf_ has joined #ruby-lang
rickhull has joined #ruby-lang
stardiviner has quit [Ping timeout: 256 seconds]
dhruvasagar has quit [Quit: leaving]
dhruvasagar has joined #ruby-lang
earthquake has quit [Quit: earthquake]
chickenf_ has quit [Ping timeout: 260 seconds]
ngw has quit [Quit: Leaving...]
wallerdev has quit [Quit: wallerdev]
stardiviner has joined #ruby-lang
relix has joined #ruby-lang
kek has joined #ruby-lang
chickenf_ has joined #ruby-lang
ryez has quit [Quit: Page closed]
julweber has quit [Remote host closed the connection]
kek has quit [Ping timeout: 248 seconds]
julweber has joined #ruby-lang
ngw has joined #ruby-lang
benlovell has joined #ruby-lang
julweber has quit [Ping timeout: 245 seconds]
stardiviner has quit [Ping timeout: 248 seconds]
<yorickpeterse> morning
r0bglees0n has quit [Ping timeout: 248 seconds]
Forgetful_Lion has joined #ruby-lang
stardiviner has joined #ruby-lang
bzalasky has quit [Ping timeout: 256 seconds]
mdedetrich has joined #ruby-lang
ryez has joined #ruby-lang
mlangenberg has quit [Quit: mlangenberg]
bastilian has quit [Quit: Linkinus - http://linkinus.com]
mlangenberg has joined #ruby-lang
adambeynon has joined #ruby-lang
stardiviner has quit [Ping timeout: 252 seconds]
kek has joined #ruby-lang
bzalasky has joined #ruby-lang
mdedetrich has quit [Ping timeout: 264 seconds]
julweber has joined #ruby-lang
lupine has joined #ruby-lang
elia has joined #ruby-lang
jonathanmarvens has joined #ruby-lang
jonathanmarvens has quit [Ping timeout: 246 seconds]
stardiviner has joined #ruby-lang
elia has quit [Quit: Computer has gone to sleep.]
ledestin has joined #ruby-lang
postmodern has quit [Quit: Leaving]
mlangenberg has quit [Quit: mlangenberg]
heftig has joined #ruby-lang
chickenf_ has quit [Quit: Computer has gone to sleep.]
postmodern has joined #ruby-lang
mlangenberg has joined #ruby-lang
elia has joined #ruby-lang
bastilian has joined #ruby-lang
chickenf_ has joined #ruby-lang
bzalasky has quit [Remote host closed the connection]
bzalasky has joined #ruby-lang
arBmind has quit [Quit: Leaving.]
ngw has quit [Quit: Leaving...]
bzalasky has quit [Ping timeout: 240 seconds]
ngw has joined #ruby-lang
<maloik> It's incredible how many of my questions on the ror channel go completely ignored
ngw has quit [Read error: Connection reset by peer]
<maloik> (as opposed to here <3)
ngw has joined #ruby-lang
huma has quit [Ping timeout: 245 seconds]
mbj has joined #ruby-lang
huma has joined #ruby-lang
skade has joined #ruby-lang
ikrima has quit [Quit: Computer has gone to sleep.]
sepp2k has joined #ruby-lang
JoshuaPaling has joined #ruby-lang
JoshuaPaling has quit [Client Quit]
workmad3 has joined #ruby-lang
<gnufied> morning guys
<oddmunds> morn
relix has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
mbj has quit [Ping timeout: 256 seconds]
huma has quit [Ping timeout: 245 seconds]
h_kon has quit [Remote host closed the connection]
franckverrot has joined #ruby-lang
h_kon has joined #ruby-lang
Coincide_ has quit [Remote host closed the connection]
Coincidental has joined #ruby-lang
nofxx has quit [Ping timeout: 260 seconds]
nofxx has joined #ruby-lang
Coincidental has quit [Ping timeout: 272 seconds]
jonathanmarvens has joined #ruby-lang
tbuehlmann has quit [Ping timeout: 264 seconds]
arBmind has joined #ruby-lang
stamina has joined #ruby-lang
relix has joined #ruby-lang
<ljarvis> so whats the hot new place to download decent torrents?
<maloik> tpb
<ljarvis> yeah my isp blocks all their shit
<maloik> has that ever been different? :)
<maloik> oh
<maloik> or google 'piratebay proxy list'
<ljarvis> aha! second one works
<maloik> disclaimer: I never download illegal shit, dear NSA, promise!
tbuehlmann has joined #ruby-lang
<ljarvis> +1
arBmind has quit [Quit: Leaving.]
<workmad3> maloik: I doubt the NSA cares if you download tv shows... that's RIAA and MPAA and their ilk
hahuang65 has quit [Ping timeout: 260 seconds]
<ljarvis> I used to enjoy downloading movies and the hours it took to encode them and add them to itunes, but i got tired of it and stopped
<maloik> oh you'll still need to do that of course
<maloik> most stuff is mkv these days
<ljarvis> yeah i mean im thinking of starting again
<workmad3> isp blocks are being put in because of crappy copyright censorship lobbying
<ljarvis> i went to the movies last week
<maloik> but you can pass video through and only encode audio, which means it only takes like 10min for a proper movie
<ljarvis> the price is insane, i feel so old
arBmind has joined #ruby-lang
<workmad3> ljarvis: it really is :(
<whitequark> try vpns
<whitequark> there are some high-performance ones
<workmad3> ljarvis: although the cinema my wife and I tend to use isn't too bad... less than £5 for a ticket before 12, goes up to about £6 for most of the rest of the time and £7 for peak times
<ljarvis> workmad3: that's really good, it's like 9 here
<ljarvis> workmad3: at any time
<workmad3> ljarvis: and they give a free refill on large drinks and large popcorn, which makes seeing two films back-to-back less costly
<ljarvis> workmad3: wow :/
<ljarvis> workmad3: where is that?
enmand has joined #ruby-lang
<workmad3> ljarvis: yeah, that's the odeon prices in the other 2 cinemas nearby
<workmad3> ljarvis: amc cinema in manchester
<ljarvis> yeah odeon is a little cheaper, but ours sucks so bad so i end up at vue
<ljarvis> nothing cheaper than odeon here :(
<workmad3> yeah, those two odeons suck too (trafford centre and printworks... crappy layout, crappy seats, much more expensive for everything)
<ljarvis> ah yeah i've been to the odeon in the trafford centre
nofxx has quit [Ping timeout: 240 seconds]
<ljarvis> funnily enough, that's still better than the one here
<workmad3> we managed to get a refund on tickets there once because it was so crap
<ljarvis> hah
<workmad3> kids talking all the way through, despite multiple complaints, and my wife's drink went and leaked all over her
<ljarvis> :(
<ljarvis> cinemas are not what they were
<workmad3> I think it was HP6 though... so the film was shit anyway :)
<ljarvis> I remember when i could go for a fiver and have a drink, with change
<workmad3> hehe, next you'll be complaining about how cream eggs used to be bigger, along with mars bars, twixes, big macs...
<ljarvis> yes all of those things
<workmad3> :)
<maloik> I think I remember 2.5 euro movies
<maloik> good times
<maloik> it's about 8.5 here now I believe for an adult at all times
<maloik> and all snacks are crazy expensive
<workmad3> maloik: really? the euro has been around for long enough that a cinema trip was that cheap under it?
<maloik> 2000 or 2001 in belgium if I recall
<maloik> I think I was 12 so yea 13 years roughly
enmand has quit [Ping timeout: 272 seconds]
<darix> workmad3: for germany i can say ... for many things you now pay the same digit in euros that you paid in the old currency
<maloik> was a shitty local place mind you, haven't been there in 5 years or so so not sure what prices are there now, but they probably exploded as well
<mlangenberg> Guys, I have an Client class that initializes a TCPSocket. I do have an explicit 'close' method defined, to close the socket. But what if someone forgets? Is there a way to close the socket when the process exits?
<darix> mlangenberg: when the process closes it will be all cleaned up
<workmad3> mlangenberg: does the socket definitely get left open if the process exits or aborts?
<ljarvis> mlangenberg: the socket will close when the process exists
<darix> but you can hook on atexit or so
<ljarvis> and you shouldn't be worrying about "what if someone forgets"
<ljarvis> that's not your job
<workmad3> mlangenberg: I'd also suggest providing a block-style version that scopes the socket, similar to File.open {|f| ...}
<ljarvis> ^
<ljarvis> about to suggest that
<workmad3> :)
<ljarvis> definitely the best apprach
<ljarvis> apprach
<ljarvis> definitely
julweber has quit [Remote host closed the connection]
<darix> ;)
<workmad3> mlangenberg: then you can yield to the block and have an 'ensure my_socket.close'
<mlangenberg> Similar case to this.
julweber has joined #ruby-lang
<mlangenberg> Imagine POOL = Array.new(10) { TCPSocket.new(host, port) }
<workmad3> mlangenberg: ah, so you're worried about a worker in a long-running process grabbing a connection and never releasing it
<mlangenberg> Should I worry about closing those connections?
<workmad3> mlangenberg: for that, I'd suggest that you don't let a work grab its own connection... you pass in a connection and free it up again
<workmad3> *worker
<mlangenberg> Actually, I want to make sure the shutdown of the long-running process doesn't keep an orphaned socket connection around.
<workmad3> mlangenberg: to be a good citizen, you should close all your sockets when closing down
<mlangenberg> block-style api is not usable in this case.
<workmad3> mlangenberg: however, they will be freed up when ruby closes down too
<mlangenberg> what about a TRAP('INT') ?
<mlangenberg> oh ok
<mlangenberg> e.g. you are the author of Dalli::Client, how would you make sure it closes its connections when closing down?
<workmad3> mlangenberg: you should free them up yourself so you can do a graceful shutdown (e.g. send proper close signals on active connections)
julweber has quit [Ping timeout: 240 seconds]
<workmad3> or write logs, etc... graceful shutdown stuff :)
<workmad3> mlangenberg: it depends on how you're planning on it being used
<workmad3> mlangenberg: if you intend another coder to create an instance and use it as they see fit, then it's their job to ensure they clean it up
<yorickpeterse> TIL >= is the same as ==
<yorickpeterse> ensure_css_present!('.review_ratings li.rating', review_html, count: 4) results in an error with [".review_ratings li.rating", "should be >= 4"]
<yorickpeterse> ....there are 5 items
<yorickpeterse> it checks with ==
<yorickpeterse> fucking code
<workmad3> mlangenberg: if you're instead providing a more structured framework where you're owning all the resources and passing them into callbacks etc that the other coder provides, then you should be able to to various 'ensure' blocks and add your own signal handlers to ensure cleanup is done
<mlangenberg> ok
<workmad3> yorickpeterse: hehe :) so the error message is wrong
<mlangenberg> So in case someone decides to use this in Sidekiq, he should use Sidekiq on_shutdown callbacks to close all (in this example) Dalli::Client connections in the pool.
<workmad3> mlangenberg: from what you've implied, it seems you're not doing the framework stuff though... you're passing ownership of the created client to the coder and therefore it's their job to make sure any 'close' calls are made
<workmad3> mlangenberg: yeah :)
<mlangenberg> gotcha
nofxx has joined #ruby-lang
<workmad3> mlangenberg: trying to do it yourself at that point could easily step on the other coder's toes (e.g. they trap an INT themselves to do something like provide a console into the running system, but your handler goes and kills their clients behind the scenes)
mlangenberg has quit [Quit: mlangenberg]
julweber has joined #ruby-lang
hahuang65 has joined #ruby-lang
hahuang65 has quit [Ping timeout: 246 seconds]
Domon has quit [Remote host closed the connection]
arBmind has quit [Quit: Leaving.]
melter has quit [Ping timeout: 245 seconds]
axsuul has quit [Ping timeout: 245 seconds]
h_kon has quit [Remote host closed the connection]
kek has quit [Remote host closed the connection]
ldnunes has joined #ruby-lang
melter has joined #ruby-lang
soba has joined #ruby-lang
soba_ has joined #ruby-lang
mytrile has joined #ruby-lang
soba has quit [Ping timeout: 246 seconds]
enmand has joined #ruby-lang
enmand has quit [Client Quit]
kek has joined #ruby-lang
chickenf_ has quit [Quit: Textual IRC Client: www.textualapp.com]
mlangenberg has joined #ruby-lang
arBmind has joined #ruby-lang
mitchty has quit [Ping timeout: 240 seconds]
heathjs has joined #ruby-lang
heathjs has joined #ruby-lang
heathjs has quit [Changing host]
Y_Ichiro_ has joined #ruby-lang
Y_Ichiro_ has joined #ruby-lang
priodev has quit [Ping timeout: 240 seconds]
heath has quit [Ping timeout: 240 seconds]
MartynKeigher has quit [Ping timeout: 240 seconds]
Y_Ichiro has quit [Ping timeout: 240 seconds]
mitchty has joined #ruby-lang
melter has quit [Ping timeout: 245 seconds]
MartynKeigher has joined #ruby-lang
priodev has joined #ruby-lang
melter has joined #ruby-lang
h_kon has joined #ruby-lang
jithu_ has joined #ruby-lang
dwahyudi has joined #ruby-lang
dwahyudi has left #ruby-lang [#ruby-lang]
jithu has quit [Ping timeout: 248 seconds]
mdedetrich has joined #ruby-lang
kitak has quit [Remote host closed the connection]
Senjai has quit [Quit: ZzZz]
kitak has joined #ruby-lang
kitak has quit [Ping timeout: 246 seconds]
enmand has joined #ruby-lang
mbj has joined #ruby-lang
arooni-mobile has joined #ruby-lang
h_kon has quit [Remote host closed the connection]
mbj has quit [Ping timeout: 245 seconds]
cored has joined #ruby-lang
elia has quit [Quit: (IRC Client: textualapp.com)]
kek has quit [Ping timeout: 248 seconds]
arBmind1 has joined #ruby-lang
arBmind has quit [Ping timeout: 248 seconds]
ledestin has quit [Quit: ledestin]
banisterfiend has quit [Quit: Computer has gone to sleep.]
kek has joined #ruby-lang
h_kon has joined #ruby-lang
Pupeno has joined #ruby-lang
Pupeno has joined #ruby-lang
Pupeno has quit [Changing host]
mdedetrich has quit [Quit: Computer has gone to sleep.]
julweber has quit [Remote host closed the connection]
julweber has joined #ruby-lang
skade has quit [Quit: Computer has gone to sleep.]
guest1 has joined #ruby-lang
guest1 has quit [Client Quit]
julweber has quit [Ping timeout: 264 seconds]
stamina has quit [Quit: WeeChat 0.4.2]
bondar has joined #ruby-lang
kurko_ has joined #ruby-lang
retro|cz has quit [Ping timeout: 245 seconds]
elia has joined #ruby-lang
bondar has quit [Max SendQ exceeded]
julweber has joined #ruby-lang
dhruvasagar has quit [Ping timeout: 245 seconds]
huma has joined #ruby-lang
h_kon has quit [Remote host closed the connection]
fallenhitokiri has quit [Ping timeout: 240 seconds]
headius has joined #ruby-lang
rickhull has quit [Quit: Leaving.]
symm- has joined #ruby-lang
skade has joined #ruby-lang
fallenhitokiri has joined #ruby-lang
kstuart has quit [Quit: kstuart]
skade has quit [Ping timeout: 245 seconds]
sqbell has joined #ruby-lang
kstuart has joined #ruby-lang
GaelanAintAround is now known as Gaelan
tomzx_mac has joined #ruby-lang
cnivolle has joined #ruby-lang
arooni-mobile has quit [Ping timeout: 252 seconds]
breakingthings has joined #ruby-lang
unitbender has joined #ruby-lang
mlangenberg has quit [Quit: mlangenberg]
imperator has joined #ruby-lang
kdonrails has quit [Remote host closed the connection]
Gaelan is now known as GaelanAintAround
kstuart has quit [Quit: kstuart]
unitbender has quit [Quit: Leaving]
h_kon has joined #ruby-lang
kstuart has joined #ruby-lang
vondruch has quit [Quit: Ex-Chat]
Easy-Pete has joined #ruby-lang
mlangenberg has joined #ruby-lang
GaelanAintAround is now known as Gaelan
sqbell has quit [Quit: Page closed]
Gaelan is now known as GaelanAintAround
h_kon has quit [Remote host closed the connection]
banisterfiend has joined #ruby-lang
tkuchiki has quit [Remote host closed the connection]
tkuchiki has joined #ruby-lang
jonathanmarvens has quit [Remote host closed the connection]
headius has quit [Quit: headius]
tkuchiki has quit [Ping timeout: 260 seconds]
bean__ has joined #ruby-lang
postmodern has quit [Quit: Leaving]
jonathanmarvens has joined #ruby-lang
cored has quit [Ping timeout: 272 seconds]
kek has quit [Remote host closed the connection]
kek has joined #ruby-lang
h_kon has joined #ruby-lang
h_kon has quit [Remote host closed the connection]
kstuart has quit [Quit: kstuart]
kstuart has joined #ruby-lang
scampbell has joined #ruby-lang
cored has joined #ruby-lang
kstuart has quit [Remote host closed the connection]
tomzx_mac has quit [Ping timeout: 245 seconds]
kstuart has joined #ruby-lang
iraja has joined #ruby-lang
dhruvasagar has joined #ruby-lang
symm- has quit [Ping timeout: 248 seconds]
wallerdev has joined #ruby-lang
antonversal has joined #ruby-lang
MaddinXx has joined #ruby-lang
kstuart has quit [Quit: kstuart]
majjoha has quit [Ping timeout: 246 seconds]
r0bglees0n has joined #ruby-lang
nathanstitt has joined #ruby-lang
majjoha has joined #ruby-lang
jithu_ has quit [Quit: Mother, did it need to be so high?]
arooni-mobile has joined #ruby-lang
banisterfiend has quit [Quit: Computer has gone to sleep.]
mytrile has quit [Remote host closed the connection]
enebo has joined #ruby-lang
robbyoconnor has quit [Ping timeout: 248 seconds]
Easy-Pete has quit [Ping timeout: 248 seconds]
nigerianceo has joined #ruby-lang
apeiros has quit [Remote host closed the connection]
banisterfiend has joined #ruby-lang
hogeo has quit [Remote host closed the connection]
hogeo has joined #ruby-lang
bf4 has quit [Quit: leaving]
skade has joined #ruby-lang
hogeo has quit [Read error: Connection reset by peer]
hogeo has joined #ruby-lang
CoreData has quit [Ping timeout: 272 seconds]
majjoha has quit [Ping timeout: 248 seconds]
heathjs is now known as heath
mistym has joined #ruby-lang
hogeo has quit [Ping timeout: 252 seconds]
wallerdev has quit [Quit: wallerdev]
apeiros has joined #ruby-lang
ruby-lang528 has joined #ruby-lang
lfox has joined #ruby-lang
lfox has quit [Client Quit]
lfox has joined #ruby-lang
headius has joined #ruby-lang
mr_red has quit [Ping timeout: 248 seconds]
julweber has quit [Remote host closed the connection]
julweber has joined #ruby-lang
mr_red has joined #ruby-lang
apeiros has quit [Remote host closed the connection]
headius has quit [Quit: headius]
mistym_ has joined #ruby-lang
bean__ has quit [Quit: Textual IRC Client: www.textualapp.com]
julweber has quit [Ping timeout: 245 seconds]
mistym has quit [Ping timeout: 272 seconds]
benlovell has quit [Ping timeout: 248 seconds]
joonty has quit [Quit: WeeChat 0.4.1]
mmorga has joined #ruby-lang
Easy-Pete has joined #ruby-lang
huma has quit [Ping timeout: 272 seconds]
amerine has quit [Read error: Connection reset by peer]
mmorga has quit [Read error: Connection reset by peer]
mmorga has joined #ruby-lang
ikrima has joined #ruby-lang
vmoravec has quit [Quit: Leaving]
CoreData has joined #ruby-lang
mistym_ is now known as mistym
workmad3 has quit [Quit: Lost terminal]
workmad3 has joined #ruby-lang
benlovell has joined #ruby-lang
banisterfiend has quit [Quit: Computer has gone to sleep.]
shinnya has joined #ruby-lang
mmorga has quit [Remote host closed the connection]
dhruvasagar has quit [Ping timeout: 264 seconds]
ruby-lang591 has joined #ruby-lang
ruby-lang528 has quit [Ping timeout: 250 seconds]
elia has quit [Ping timeout: 245 seconds]
ruby-lang591 has quit [Ping timeout: 250 seconds]
Easy-Pete has quit [Remote host closed the connection]
majjoha has joined #ruby-lang
Easy-Pete has joined #ruby-lang
mmorga_ has joined #ruby-lang
CoreData has quit [Ping timeout: 272 seconds]
Oloryn_lt21 has joined #ruby-lang
wallerdev has joined #ruby-lang
wallerdev has quit [Client Quit]
wallerdev has joined #ruby-lang
mmorga_ has quit [Remote host closed the connection]
jiuweigui has joined #ruby-lang
kalesage has joined #ruby-lang
hogeo has joined #ruby-lang
havenwood has joined #ruby-lang
Oloryn_lt2 has quit [Ping timeout: 256 seconds]
Oloryn_lt21 has quit [Ping timeout: 260 seconds]
mmorga has joined #ruby-lang
rippa has joined #ruby-lang
Oloryn_lt2 has joined #ruby-lang
<yorickpeterse> so apparently there's people out there using ruby-lint besides me
<yorickpeterse> that's pretty unexpected
<yorickpeterse> (ignoring the 300 watchers on GH which doesn't mean a lot)
<whitequark> haha, talking about GH
<whitequark> parser's got two more stars than ruby_parser \o/
<whitequark> not that it matters very much
kalesage has quit [Ping timeout: 246 seconds]
elia has joined #ruby-lang
<yorickpeterse> parser has the worst SEO name though
* yorickpeterse runs
<whitequark> well, deliberately so!
elia has quit [Client Quit]
<whitequark> also, google "ruby parser"
<whitequark> #2 result is parser
<yorickpeterse> meh
<yorickpeterse> parser is sadly not webscale though
kitak has joined #ruby-lang
<whitequark> PR or GTFO!
CoreData has joined #ruby-lang
enmand has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<yorickpeterse> I can't find how to make it faster :<
<yorickpeterse> most of the time seems to be spent in Parser::Lexer#advance, the lexer is still a black box to me
dhruvasagar has joined #ruby-lang
majjoha has quit [Read error: Operation timed out]
kitak has quit [Ping timeout: 246 seconds]
banisterfiend has joined #ruby-lang
<whitequark> dude
<whitequark> it's four times faster than RP
<whitequark> how faster do you need?!
micalexander has joined #ruby-lang
CoreData has quit [Ping timeout: 272 seconds]
<yorickpeterse> would be nice if it could be halfed :>
bondar has joined #ruby-lang
<yorickpeterse> so that instead of 70ms for file X it takes around 30-40
mlangenberg has quit [Quit: mlangenberg]
<yorickpeterse> (that would actually result in a gross reduction of about 500ms for my use cases)
<yorickpeterse> (in total)
<yorickpeterse> and going from ~1s to 500ms would be neat
tough_griff has joined #ruby-lang
<yorickpeterse> I'll see if I can tear out some proper numbers per file once I get back home
<whitequark> in half? forget about it
<whitequark> or, well
<whitequark> *maybe* it's possible to rewrite the bulk of the ragel loop in C
<yorickpeterse> lol
<yorickpeterse> you drunk?
<yorickpeterse> I was thinking of doing it in Node, closer to the metal
mlangenberg has joined #ruby-lang
mlangenberg has quit [Client Quit]
bondar has quit [Quit: Leaving]
tbuehlmann has quit [Ping timeout: 264 seconds]
workmad3 has quit [Ping timeout: 245 seconds]
elia has joined #ruby-lang
enmand has joined #ruby-lang
tough_griff has quit [Quit: computer went to sleep.]
workmad3 has joined #ruby-lang
hogeo has quit [Remote host closed the connection]
elia has quit [Ping timeout: 264 seconds]
kek has quit [Remote host closed the connection]
Easy-Pete has quit [Ping timeout: 245 seconds]
majjoha has joined #ruby-lang
yfeldblum has joined #ruby-lang
tough_griff has joined #ruby-lang
workmad3 has quit [Ping timeout: 272 seconds]
workmad3 has joined #ruby-lang
MrZYX|off is now known as MrZYX
__butch__ has joined #ruby-lang
workmad3 has quit [Ping timeout: 248 seconds]
hfp has joined #ruby-lang
<hfp> Hi all! I'm back, and I don't have a question yet.
workmad3 has joined #ruby-lang
sepp2k has quit [Quit: Konversation terminated!]
enebo has quit [Quit: enebo]
dhruvasagar has quit [Ping timeout: 272 seconds]
dagobah has quit [Remote host closed the connection]
Johz has joined #ruby-lang
jonathanmarvens has quit [Remote host closed the connection]
mistym has quit [Remote host closed the connection]
dhruvasagar has joined #ruby-lang
tough_griff has quit [Ping timeout: 272 seconds]
workmad3 has quit [Ping timeout: 260 seconds]
jonathanmarvens has joined #ruby-lang
jonathanmarvens has quit [Remote host closed the connection]
workmad3 has joined #ruby-lang
benlovell has quit [Remote host closed the connection]
garrilla has joined #ruby-lang
garrilla has left #ruby-lang [#ruby-lang]
mmorga has quit [Read error: Connection reset by peer]
mmorga has joined #ruby-lang
CoreData has joined #ruby-lang
lfox has quit [Quit: ZZZzzz…]
ngw has quit [Quit: Leaving...]
MaddinXx has quit [Remote host closed the connection]
machuga is now known as machuga|away
workmad3 has quit [Ping timeout: 265 seconds]
workmad3 has joined #ruby-lang
verto has joined #ruby-lang
havenwood has quit [Remote host closed the connection]
sevvie has joined #ruby-lang
sevvie has quit [Client Quit]
havenwood has joined #ruby-lang
relix has quit [Quit: Textual IRC Client: www.textualapp.com]
bzalasky has joined #ruby-lang
sr78ger has joined #ruby-lang
sepp2k has joined #ruby-lang
relix has joined #ruby-lang
skade has quit [Quit: Computer has gone to sleep.]
skade has joined #ruby-lang
havenwood has quit [Ping timeout: 264 seconds]
skade has quit [Client Quit]
workmad3 has quit [Ping timeout: 248 seconds]
CaptainJet has joined #ruby-lang
ruby-lang397 has joined #ruby-lang
workmad3 has joined #ruby-lang
breakingthings has quit []
mistym has joined #ruby-lang
mistym has quit [Changing host]
mistym has joined #ruby-lang
saarinen has joined #ruby-lang
cnivolle has quit [Read error: Connection reset by peer]
cnivolle_ has joined #ruby-lang
ruby-lang927 has joined #ruby-lang
relix has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
wallerdev has quit [Quit: wallerdev]
workmad3 has quit [Ping timeout: 265 seconds]
breakingthings has joined #ruby-lang
workmad3 has joined #ruby-lang
nignaztic has quit [Ping timeout: 252 seconds]
Mon_Ouie has joined #ruby-lang
majjoha has quit [Ping timeout: 245 seconds]
<ruby-lang397> Question from a Ruby newbie: I'm trying to figure out why this code won't work. http://pastebin.com/m5NAp1mB (It should return the sum of the cubed numbers in the array [a..b].) The error msg I get says ** is not a method.
nazty has joined #ruby-lang
<whitequark> >> [1..3]
<eval-in> whitequark => [1..3] (https://eval.in/57198)
<whitequark> it's not an array of numbers, it's an array of (one) range.
<whitequark> use this:
<whitequark> >> (1..3).to_a
<eval-in> whitequark => [1, 2, 3] (https://eval.in/57199)
<whitequark> or, perhaps
<whitequark> (1..3).map { |i| i ** 3 }
<ruby-lang397> so I need to turn the range into an array, right? Also, does the .map method work on a range? (in your second suggestion)
workmad3 has quit [Ping timeout: 272 seconds]
<whitequark> yes and yes
Mon_Ouie has quit [Ping timeout: 252 seconds]
<ruby-lang397> great, thank you!
havenwood has joined #ruby-lang
x0f_ has joined #ruby-lang
VTLob has joined #ruby-lang
dwknoxy has joined #ruby-lang
Naeblis has joined #ruby-lang
mmorga has quit [Remote host closed the connection]
x0f has quit [Ping timeout: 245 seconds]
symm- has joined #ruby-lang
dhruvasagar has quit [Ping timeout: 240 seconds]
dhruvasagar has joined #ruby-lang
adambeynon has quit [Quit: ["Textual IRC Client: www.textualapp.com"]]
yfeldblum has quit [Remote host closed the connection]
lfox has joined #ruby-lang
saarinen has quit [Quit: saarinen]
enmand has quit [Quit: Textual IRC Client: www.textualapp.com]
enmand has joined #ruby-lang
saarinen has joined #ruby-lang
rue has quit [Remote host closed the connection]
solars has quit [Ping timeout: 246 seconds]
enebo has joined #ruby-lang
Easy-Pete has joined #ruby-lang
banisterfiend has quit [Quit: Computer has gone to sleep.]
cnivolle_ has quit [Remote host closed the connection]
mr_red has quit [Ping timeout: 248 seconds]
soba_ has quit [Read error: Connection reset by peer]
mr_red has joined #ruby-lang
ruby-lang927 has quit [Ping timeout: 250 seconds]
kalesage has joined #ruby-lang
hotpancakes has joined #ruby-lang
cored has quit [Ping timeout: 245 seconds]
cored has joined #ruby-lang
cored has joined #ruby-lang
cored has quit [Changing host]
antonversal has quit [Quit: Leaving.]
sevvie has joined #ruby-lang
retro|cz has joined #ruby-lang
havenwood has quit [Remote host closed the connection]
mlangenberg has joined #ruby-lang
havenwood has joined #ruby-lang
bf4 has joined #ruby-lang
bf4 has quit [Client Quit]
bf4 has joined #ruby-lang
Pupeno_ has joined #ruby-lang
havenwood has quit [Ping timeout: 260 seconds]
rickhull has joined #ruby-lang
imperator has quit [Quit: Valete!]
Pupeno has quit [Ping timeout: 264 seconds]
Pupeno_ has quit [Ping timeout: 256 seconds]
__butch__ has quit [Quit: Leaving.]
Oloryn_lt2 has quit [Read error: Connection reset by peer]
__butch__ has joined #ruby-lang
__butch__ has quit [Client Quit]
__butch__ has joined #ruby-lang
sevvie has quit [Read error: Connection reset by peer]
Johz has quit [Quit: Leaving]
__butch__ has quit [Client Quit]
bzalasky has quit [Remote host closed the connection]
antonversal has joined #ruby-lang
bzalasky has joined #ruby-lang
kalesage has quit [Quit: ThrashIRC v2.9 sic populo comunicated]
bzalasky has quit [Ping timeout: 248 seconds]
__butch__ has joined #ruby-lang
__butch__ has quit [Client Quit]
__butch__ has joined #ruby-lang
nazty has quit [Ping timeout: 265 seconds]
diegoviola has joined #ruby-lang
jsullivandigs has joined #ruby-lang
machuga|away is now known as machuga
brianpWins has joined #ruby-lang
majjoha has joined #ruby-lang
rippa has quit [Ping timeout: 248 seconds]
yfeldblum has joined #ruby-lang
charliesome has joined #ruby-lang
majjoha has quit [Ping timeout: 248 seconds]
yfeldblum has quit [Remote host closed the connection]
mmorga has joined #ruby-lang
yfeldblum has joined #ruby-lang
yfeldblum has quit [Remote host closed the connection]
__butch__ has quit [Quit: Leaving.]
__butch__ has joined #ruby-lang
iraja has quit [Remote host closed the connection]
Oloryn_lt2 has joined #ruby-lang
__butch__ has quit [Client Quit]
havenwood has joined #ruby-lang
banisterfiend has joined #ruby-lang
arBmind1 has quit [Quit: Leaving.]
Asher has quit [Quit: Leaving.]
Oloryn_lt2 has quit [Read error: Connection reset by peer]
hotpancakes has quit [Remote host closed the connection]
hotpancakes has joined #ruby-lang
shinnya has quit [Ping timeout: 264 seconds]
sevvie has joined #ruby-lang
hotpancakes has quit [Ping timeout: 272 seconds]
ninjago has joined #ruby-lang
arooni-mobile has quit [Ping timeout: 268 seconds]
specialblend has joined #ruby-lang
scampbell has quit [Ping timeout: 246 seconds]
mbj has joined #ruby-lang
diegoviola has quit [Ping timeout: 272 seconds]
huma has joined #ruby-lang
sr78ger has quit [Quit: Textual IRC Client: www.textualapp.com]
bzalasky has joined #ruby-lang
<mlangenberg> I'm trying to write a test for a method that returns a binary string.
<mlangenberg> My test is: to_s.must_equal "\x02"
<mlangenberg> but failure: -"\u0002"
<mlangenberg> +"\x02\
antonversal has quit [Quit: Leaving.]
nazty has joined #ruby-lang
Pupeno has joined #ruby-lang
Pupeno has joined #ruby-lang
Pupeno has quit [Changing host]
nazty has quit [Client Quit]
Mon_Ouie has joined #ruby-lang
arBmind has joined #ruby-lang
<mistym> mlangenberg: The returned string is being returned as unicode. If you want raw bytes, make sure you set its encoding to ASCII-8bit
cnivolle has joined #ruby-lang
yfeldblum has joined #ruby-lang
<mlangenberg> Ah, I see my error because there seems to be a newline at the end
<mlangenberg> actual: \x01
<mlangenberg> "
enebo has quit [Quit: enebo]
yfeldblum has quit [Remote host closed the connection]
Pupeno has quit [Ping timeout: 248 seconds]
<mlangenberg> mistym: do I set that on the returned string? And how?
Mon_Ouie has quit [Ping timeout: 272 seconds]
mmorga has quit [Remote host closed the connection]
bzalasky has quit [Remote host closed the connection]
<mlangenberg> ah, force_encoding(Encoding::ASCII_8BIT)
sevvie has quit [Read error: Connection reset by peer]
bzalasky has joined #ruby-lang
specialblend has quit [Quit: specialblend]
<mistym> mlangenberg: Yep
ninjago has quit [Remote host closed the connection]
yfeldblum has joined #ruby-lang
Asher has joined #ruby-lang
bzalasky has quit [Ping timeout: 240 seconds]
arBmind has left #ruby-lang [#ruby-lang]
mmorga has joined #ruby-lang
<mlangenberg> Awesome, tests green
mlangenberg has left #ruby-lang [#ruby-lang]
yfeldblum has quit [Remote host closed the connection]
jsullivandigs has quit [Remote host closed the connection]
jsullivandigs has joined #ruby-lang
hahuang65 has joined #ruby-lang
Mon_Ouie has joined #ruby-lang
Mon_Ouie has quit [Changing host]
Mon_Ouie has joined #ruby-lang
mistym is now known as mistym_lunch
mark06 has joined #ruby-lang
<mark06> how can I make eval bring local variables to where it has been called from?
<mark06> I don't want to use $global_vars
jsullivandigs has quit [Ping timeout: 265 seconds]
<r0bglees0n> mark06: binding.eval("local_name")
rickhull has quit [Quit: Leaving.]
Mon_Ouie has quit [Ping timeout: 260 seconds]
<mark06> I don't get it
<mark06> the eval will parse many local vars
<mark06> the text contains many local vars
<whitequark> mark06: so you want eval("foo = 1"); foo ?
cored has quit [Ping timeout: 252 seconds]
<mark06> whitequark: no, foo, bar,baz etc... all are on a single file
<mark06> whitequark: I want the same effect as putting $ in the beginning
<whitequark> try posting an example
<whitequark> of your expected behavior
yfeldblum has joined #ruby-lang
<mark06> file contents:
<mark06> foo =1
<mark06> bar=2
<mark06> baz=3
<mark06> then I read file
<mark06> then I eval its contents
mistym has joined #ruby-lang
<mark06> expected: these three vars be available after eval
<mark06> what happens in fact: they are not
<mark06> workaround: put $ in the beginning of them:
<mark06> $foo=1
<mark06> $bar=2
<mark06> $baz=3
CoreData has quit [Quit: CoreData]
<mark06> then they are available after eval as $foo, $bar, $baz
<mark06> I want that, except that I don't want to make them global
CoreData has joined #ruby-lang
CoreData has quit [Client Quit]
CoreData has joined #ruby-lang
wallerdev has joined #ruby-lang
Coincidental has joined #ruby-lang
MaddinXx has joined #ruby-lang
nazty has joined #ruby-lang
nazty has quit [Read error: Connection reset by peer]
relix has joined #ruby-lang
MaddinXx has quit [Remote host closed the connection]
bzalasky has joined #ruby-lang
hotpancakes has joined #ruby-lang
rue has joined #ruby-lang
MaddinXx has joined #ruby-lang
Asher has quit [Quit: Leaving.]
benanne has joined #ruby-lang
mbj has quit [Ping timeout: 272 seconds]
cored has joined #ruby-lang
cored has quit [Changing host]
cored has joined #ruby-lang
stamina has joined #ruby-lang
yfeldblum has quit [Remote host closed the connection]
Easy-Pete has quit [Quit: Lost terminal]
yfeldblum has joined #ruby-lang
yfeldblum has quit [Remote host closed the connection]
imperator has joined #ruby-lang
mmorga has quit [Remote host closed the connection]
mmorga has joined #ruby-lang
enebo has joined #ruby-lang
enmand has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
ikrima has quit [Quit: Computer has gone to sleep.]
jackhammer2022 has joined #ruby-lang
retro|cz has quit [Ping timeout: 240 seconds]
ldnunes has quit [Quit: Leaving]
<drbrain> mark06: eval cannot create local variables in the outer scope
<drbrain> mark06: the outer scope has already been parsed and the local variable names decided
ecnalyr has joined #ruby-lang
<mark06> :(
<mark06> I ended up writing a small parser
ecnalyr has quit [Remote host closed the connection]
enmand has joined #ruby-lang
mistym has quit [Remote host closed the connection]
yfeldblum has joined #ruby-lang
nazty has joined #ruby-lang
Coincidental has quit [Remote host closed the connection]
tough_griff has joined #ruby-lang
<whitequark> mark06: btw, if you want a full ruby parser, "gem install parser".
Coincidental has joined #ruby-lang
huma has quit [Ping timeout: 240 seconds]
jhulten has joined #ruby-lang
nazty has quit [Client Quit]
nazty has joined #ruby-lang
mmorga has quit [Remote host closed the connection]
vlad_starkov has joined #ruby-lang
Coincidental has quit [Ping timeout: 272 seconds]
mr_red has quit [Ping timeout: 241 seconds]
hotpancakes has quit [Remote host closed the connection]
mistym_lunch is now known as mistym
mr_red has joined #ruby-lang
hotpancakes has joined #ruby-lang
Coincidental has joined #ruby-lang
__butch__ has joined #ruby-lang
enmand has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
hotpancakes has quit [Remote host closed the connection]
ldnunes has joined #ruby-lang
kevinfagan has quit [Ping timeout: 260 seconds]
hotpancakes has joined #ruby-lang
iraja has joined #ruby-lang
apeiros has joined #ruby-lang
nathanstitt has quit [Ping timeout: 240 seconds]
kek has joined #ruby-lang
bzalasky has quit [Remote host closed the connection]
bzalasky has joined #ruby-lang
enmand has joined #ruby-lang
MaddinXx has quit [Remote host closed the connection]
kurko_ has quit [Ping timeout: 265 seconds]
cored has quit [Ping timeout: 252 seconds]
nathanstitt has joined #ruby-lang
bzalasky has quit [Ping timeout: 256 seconds]
fragamus has joined #ruby-lang
ruby-lang397 has quit [Ping timeout: 250 seconds]
tough_griff has quit [Quit: computer went to sleep.]
<r0bglees0n> mark06: ruby use to have what was suppose to be a bug, so that TOPLEVEL_BINDING.eval("xxx") could access locals from another script. it may have been fixed and probably not a good idea to rely on it either
vlad_sta_ has joined #ruby-lang
jackhammer2022 has quit [Quit: Computer has gone to sleep.]
kek has quit [Remote host closed the connection]
vlad_starkov has quit [Read error: Connection reset by peer]
kek has joined #ruby-lang
iraja has quit [Remote host closed the connection]
Mothore has joined #ruby-lang
nisstyre has joined #ruby-lang
datanoise has joined #ruby-lang
julweber has joined #ruby-lang
ledestin has joined #ruby-lang
Mon_Ouie has joined #ruby-lang
ecnalyr has joined #ruby-lang
workmad3 has joined #ruby-lang
enmand has quit [Ping timeout: 272 seconds]
<zenspider> zenweb version 3.3.0 has been released! | software releases by ryan davis - http://t.co/LHs4xAVgXO
enmand has joined #ruby-lang
vlad_sta_ has quit [Remote host closed the connection]
lfox has quit [Quit: ZZZzzz…]
lfox has joined #ruby-lang
michael_mbp is now known as zz_michael_mbp
crankharder has quit [Quit: leaving]
vlad_starkov has joined #ruby-lang
crankharder has joined #ruby-lang
<mark06> r0bglees0n: parsing starts from line 31, better result in the end cause the file looks more like a data file
kek has quit [Remote host closed the connection]
kek has joined #ruby-lang
yfeldblum has quit [Remote host closed the connection]
yfeldblum has joined #ruby-lang
__butch__ has quit [Quit: Leaving.]
kek has quit [Ping timeout: 260 seconds]
breakingthings has quit []
nathanstitt has quit [Quit: I growing sleepy]
douchie1984 has joined #ruby-lang
mdedetrich has joined #ruby-lang
enmand has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
enmand has joined #ruby-lang
douchie1984 has left #ruby-lang [#ruby-lang]
mark06 has left #ruby-lang [#ruby-lang]
vlad_starkov has quit [Remote host closed the connection]
adambeynon has joined #ruby-lang
vlad_starkov has joined #ruby-lang
vlad_starkov has quit [Remote host closed the connection]
julweber has quit [Remote host closed the connection]
fragamus has quit [Quit: Computer has gone to sleep.]
julweber has joined #ruby-lang
kurko_ has joined #ruby-lang
workmad3 has quit [Ping timeout: 246 seconds]
julweber has quit [Ping timeout: 272 seconds]
Mothore has quit [Quit: Computer has gone to sleep.]
Mothore has joined #ruby-lang
Senjai has joined #ruby-lang
Senjai has quit [Changing host]
Senjai has joined #ruby-lang
skade has joined #ruby-lang
rikai_ has quit [Read error: Connection reset by peer]
rikai has joined #ruby-lang
relix has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
enebo has quit [Quit: enebo]
Mothore has quit [Ping timeout: 260 seconds]
Asher has joined #ruby-lang
MrZYX is now known as MrZYX|off
verto has quit [Ping timeout: 272 seconds]
dhruvasagar has quit [Ping timeout: 272 seconds]
vlad_starkov has joined #ruby-lang
ecnalyr has quit [Remote host closed the connection]
jrobeson has quit [Ping timeout: 248 seconds]
jrobeson has joined #ruby-lang
bf4 has quit [Read error: Connection reset by peer]
bf4 has joined #ruby-lang
vlad_starkov has quit [Remote host closed the connection]
KM|2 has joined #ruby-lang
vlad_starkov has joined #ruby-lang
charliesome has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
mdedetrich has quit [Quit: Computer has gone to sleep.]
KM has quit [Ping timeout: 265 seconds]
norplr_ has quit [Quit: Connection closed for inactivity]
nisstyre has quit [Quit: Leaving]
hotpancakes has quit [Remote host closed the connection]
mdedetrich has joined #ruby-lang
hotpancakes has joined #ruby-lang
thepumpkin has joined #ruby-lang
hotpancakes has quit [Ping timeout: 240 seconds]
julweber has joined #ruby-lang
tomzx_mac has joined #ruby-lang
dwknoxy has quit [Quit: Computer has gone to sleep.]
ndrst has quit [Ping timeout: 272 seconds]
ndrst has joined #ruby-lang
benanne has quit [Quit: kbai]
CoreData1 has joined #ruby-lang
Boohbah is now known as Boohbah_4core
Boohbah_4core is now known as Boohbah
mdedetrich has quit [Quit: Computer has gone to sleep.]
CoreData has quit [Ping timeout: 252 seconds]
adambeynon has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
vlad_sta_ has joined #ruby-lang
mdedetrich has joined #ruby-lang
vlad_starkov has quit [Ping timeout: 240 seconds]
bf4 has quit [Ping timeout: 240 seconds]
imperator has quit [Quit: Valete!]
ecnalyr has joined #ruby-lang
datanoise has quit [Ping timeout: 240 seconds]
yfeldblum has quit [Ping timeout: 240 seconds]
tough_griff has joined #ruby-lang
yfeldblum has joined #ruby-lang
postmodern has joined #ruby-lang
vlad_starkov has joined #ruby-lang
apeiros has quit [Remote host closed the connection]
apeiros has joined #ruby-lang
vlad_sta_ has quit [Ping timeout: 256 seconds]
hotpancakes has joined #ruby-lang
enmand has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
sepp2k has quit [Quit: Leaving.]
lfox has quit [Quit: ZZZzzz…]
symm- has quit [Ping timeout: 272 seconds]
Mothore has joined #ruby-lang
bf4 has joined #ruby-lang
Mothore has quit [Ping timeout: 272 seconds]
bf4 has quit [Ping timeout: 272 seconds]
charliesome has joined #ruby-lang
jiuweigui has quit [Quit: iQuit!]
Mothore has joined #ruby-lang
skade has quit [Quit: Computer has gone to sleep.]
datanoise has joined #ruby-lang
datanoise has quit [Ping timeout: 240 seconds]
micalexander has quit [Remote host closed the connection]
micalexander has joined #ruby-lang
willdrew has joined #ruby-lang
willdrew has quit [Remote host closed the connection]
willdrew has joined #ruby-lang
vlad_sta_ has joined #ruby-lang
willdrew has quit [Remote host closed the connection]
willdrew has joined #ruby-lang
willdrew has quit [Remote host closed the connection]
vlad_starkov has quit [Ping timeout: 248 seconds]
micalexander has quit [Ping timeout: 265 seconds]
nigerianceo has quit []
Coincidental has quit [Remote host closed the connection]
Coincidental has joined #ruby-lang
vlad_starkov has joined #ruby-lang
charlies_ has joined #ruby-lang
charliesome has quit [Ping timeout: 272 seconds]
Coincidental has quit [Ping timeout: 241 seconds]
vlad_sta_ has quit [Ping timeout: 240 seconds]
fuhgeddaboudit has joined #ruby-lang