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
jaimef has joined #ruby-lang
charliesome has quit [Ping timeout: 240 seconds]
ckim has joined #ruby-lang
ckim has quit [Remote host closed the connection]
ckim has joined #ruby-lang
enmand has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
charliesome has joined #ruby-lang
micalexander has quit [Remote host closed the connection]
micalexander has joined #ruby-lang
flgr has quit [Ping timeout: 248 seconds]
<julian__1> Best way to keep a Curses window open?
<julian__1> without a getch?
pr0ton has quit [Quit: pr0ton]
<julian__1> some sort of infinite loop?
flgr has joined #ruby-lang
lfox has joined #ruby-lang
<drbrain> julian__1: don't call #close on it
micalexander has quit [Ping timeout: 272 seconds]
<julian__1> drbrain: say I have win1
<julian__1> it disappears unless I write win1.getch
benanne has quit [Remote host closed the connection]
<julian__1> it's waiting for user input before it closes
Coincidental has joined #ruby-lang
<julian__1> but windows seem to close automatically ?
toertore has quit [Quit: Leaving]
<julian__1> drbrain: When I say the window disappears
<julian__1> it never shows up
<julian__1> but I assume it sort of exists, but disappears 'too quickly' to be seen
<drbrain> julian__1: did you refresh it?
<julian__1> unless I use win1.getch
<julian__1> ah
<julian__1> no
<drbrain> refresh says "I made changes to this window, please redraw it"
<julian__1> :P
<julian__1> thanks for the english :)
<julian__1> the docs don't really explain what's going on
<julian__1> well, they do a little
bantic has quit [Quit: bantic]
hahuang65 has quit [Ping timeout: 256 seconds]
Rarrikins has quit [Ping timeout: 272 seconds]
Rarrikins has joined #ruby-lang
ikrima has quit [Ping timeout: 272 seconds]
pr0ton has joined #ruby-lang
ikrima has joined #ruby-lang
ikrima has quit [Client Quit]
ikrima has joined #ruby-lang
uta has joined #ruby-lang
lfox has quit [Quit: ZZZzzz…]
uta has quit [Remote host closed the connection]
relix has joined #ruby-lang
relix has quit [Client Quit]
uta has joined #ruby-lang
julweber_ has joined #ruby-lang
julweber_ has quit [Remote host closed the connection]
julweber_ has joined #ruby-lang
julweber has quit [Ping timeout: 272 seconds]
brianpWins has joined #ruby-lang
kgrz has quit [Remote host closed the connection]
torrieri has joined #ruby-lang
julweber_ has quit [Ping timeout: 240 seconds]
symm- has quit [Ping timeout: 248 seconds]
enmand has joined #ruby-lang
musty has joined #ruby-lang
Rarrikins has quit [Ping timeout: 272 seconds]
stamina has quit [Read error: Connection reset by peer]
Rarrikin1 has joined #ruby-lang
mistym has quit [Remote host closed the connection]
<julian__1> drbrain: How would you propose creating windows dynamically?
musty_ has joined #ruby-lang
enmand has quit [Ping timeout: 272 seconds]
<julian__1> This says that create_window is a private method
enmand has joined #ruby-lang
<julian__1> I assume this is because foo isn't an object..maybe it's because I haven't created foo?
<julian__1> haven't created it as an object, or something?
musty has quit [Read error: Connection reset by peer]
hfp has joined #ruby-lang
musty_ is now known as musty
sepp2k1 has quit [Quit: Leaving.]
<hfp> Hi guys, just wondering if var = gets.chomp.lowercase is the same as var = gets.chomp.lowercase!
<julian__1> Maybe I should create a public method?
torrieri_ has joined #ruby-lang
<julian__1> and create the object (win1 whatever) from a string within the public method using the instance_variable_set method
torrieri has quit [Read error: Connection reset by peer]
torrieri has joined #ruby-lang
<julian__1> hfp: No, they're not the same.
torrieri_ has quit [Ping timeout: 272 seconds]
<hfp> julian__1: That's what I can't wrap my head around.
<julian__1> hfp: If a method as an '!' after it means it's a bang method, meaning it actually changes the variable it's called on
musty_ has joined #ruby-lang
ikrima has quit [Quit: Computer has gone to sleep.]
<julian__1> hfp: I'll create a pastebin to show you
<hfp> so var = "STRING".downcase will not change var's contents to "string"?
<hfp> Ok thanks julian__1
julweber has joined #ruby-lang
musty has quit [Read error: Connection reset by peer]
jiuweigui has quit [Quit: iQuit!]
<julian__1> hfp: Does that help? :)
kgrz has joined #ruby-lang
<julian__1> hfp: A bang method actually goes and re-writes the variable it's called on
<julian__1> hfp: A 'normal' method returns what it's done, but doesn't actually change the variable at all
<hfp> julian__1: Yes, thanks although it's counter intuitive. If you assign the variable explicitly why require a '!' ? Isn't it redundant?
musty_ has quit [Ping timeout: 248 seconds]
<charliesome> hfp: ! doesn't rewrite the variable
<charliesome> most ! methods will mutate the actual object they're called on
axsuul has joined #ruby-lang
<charliesome> which is subtly different
guns has joined #ruby-lang
<hfp> I see. So var1 = "DOG".lowercase will still leave var1's contents as "DOG"?
<julian__1> hfp: Yes, exactly
kgrz has quit [Ping timeout: 248 seconds]
<julian__1> no
<julian__1> well yes, but you're syntax is a little weird
<julian__1> var1 = "Dog" var1.lowercase
<julian__1> that will leave var1's contents as "Dog"
<hfp> So calling these methods when assigning variables without the '!' is utterly useless then.
<heftig> hfp: var1.lowercase! will mutate var1's string, making it lowercase
julweber has quit [Ping timeout: 248 seconds]
<heftig> hfp: var1 = var1.lowercase will make a copy of var1, lowercase it, then assign it to var1
<heftig> the difference is significant when you have other references to the string
<heftig> watch:
<julian__1> heftig: I think he understands
<heftig> >> var1 = "DOG"; var2 = var1; var1.lowercase!; [var1, var2]
<eval-in> heftig => undefined method `lowercase!' for "DOG":String (NoMethodError) ... (https://eval.in/55565)
<heftig> oops
<heftig> >> var1 = "DOG"; var2 = var1; var1.downcase!; [var1, var2]
<eval-in> heftig => ["dog", "dog"] (https://eval.in/55566)
<heftig> >> var1 = "DOG"; var2 = var1; var1 = var1.downcase; [var1, var2]
<eval-in> heftig => ["dog", "DOG"] (https://eval.in/55567)
<heftig> also, this will fail:
<heftig> >> var1 = "DOG".freeze; var1.downcase!
<eval-in> heftig => can't modify frozen String (RuntimeError) ... (https://eval.in/55569)
<heftig> and this won't:
<heftig> >> var1 = "DOG".freeze; var1 = var1.downcase
<eval-in> heftig => "dog" (https://eval.in/55570)
<hfp> Ok, I think I get it now. I'm still not sure how this much granularity is useful but I guess I'll figure it out when I've learnt more.
kgrz has joined #ruby-lang
jsullivandigs has quit [Remote host closed the connection]
jsullivandigs has joined #ruby-lang
<hfp> Thanks!
<julian__1> hfp: When you say a method without a '!' is utterly useless that actually shows you've got the right idea
jonahR has joined #ruby-lang
<julian__1> it doesn't actually change anything, but I wouldn't say they were useless
<heftig> hfp: internally, .lowercase is pretty much just a .dup and a .lowercase!
<hfp> I'm getting there is a subtlety although I can't see any practical use yet. I just started learning so I guess this will come later.
<julian__1> hefp: say you wanted to give a user of your program a personalised greeting.
<julian__1> maybe you'd want to .upcase their name
<julian__1> but not .upcase! because that would rewrite their data
jsullivandigs has quit [Ping timeout: 272 seconds]
<julian__1> hfp: puts username.upcase
<julian__1> that would output username in capitals, but keep username untouched
<hfp> I see. What I'm still not clear on is whether var1 = "dog".upcase and var2 = "dog".upcase! are equivalent or not.
<hfp> i.e. will var1 == var2 be true or false.
<julian__1> false :)
<julian__1> after running that code
<julian__1> var1 #=> dog
<julian__1> var2 #=> DOG
kek has quit [Remote host closed the connection]
enmand has quit [Ping timeout: 272 seconds]
<julian__1> oh wait
pr0ton has quit [Ping timeout: 240 seconds]
<julian__1> hold on actually, I'm not sure there
<hfp> When I try I'm getting true
<julian__1> yeah
<julian__1> sorry you're right
<julian__1> they would be the same
<hfp> Ok, that's what was confusing me.
<julian__1> good, you're fine then :L
<hfp> I have a clear picture now, thanks!
enmand has joined #ruby-lang
<julian__1> hfp: Good good, sorry I didn't read your code properly just then
<julian__1> they're called bang methods btw
<julian__1> if you want to google them
<hfp> Will do
<julian__1> thought there's not much to get
<julian__1> I think you probably understand them :)
<julian__1> just not when to use them...that'll just come with time I suppose.
dhruvasagar has quit [Read error: Operation timed out]
<julian__1> to be honest, bang methods are just there to keep things a little bit more concise
<julian__1> * don't click that
<julian__1> ^ that one
<hfp> Thanks, I understand now
jsullivandigs has joined #ruby-lang
fuhgeddaboudit has joined #ruby-lang
nathanstitt has quit [Quit: I growing sleepy]
r0bgleeson has quit [Ping timeout: 272 seconds]
ikrima has joined #ruby-lang
mdedetrich has quit [Quit: Computer has gone to sleep.]
nathanstitt has joined #ruby-lang
<julian__1> instance_variable_set
<julian__1> is there a method like this to set variables?
<julian__1> OH, never mind
<whitequark> local variables?
<whitequark> no. technically you can do it with eval, but it's a bad enough idea that I won't explain how
nofxx has quit [Ping timeout: 272 seconds]
<hfp> Oh another easy one: is there something like i++ to increment i by 1 or do I have to write the whole i = i + 1 ?
julian__1 has quit [Ping timeout: 248 seconds]
stevew_ has quit [Ping timeout: 272 seconds]
mdedetrich has joined #ruby-lang
jxie has quit [Ping timeout: 240 seconds]
guns has quit [Quit: guns]
uta has quit [Remote host closed the connection]
<whitequark> hfp: i += 1
jxie has joined #ruby-lang
<hfp> Thanks
Johz has quit [Remote host closed the connection]
ikrima has quit [Ping timeout: 240 seconds]
Erwin has joined #ruby-lang
ikrima has joined #ruby-lang
ErwinNH has quit [Ping timeout: 248 seconds]
kurko_ has joined #ruby-lang
r0bgleeson has joined #ruby-lang
mannyt has joined #ruby-lang
lfox has joined #ruby-lang
havenwood has quit [Remote host closed the connection]
kurko_ has quit [Quit: Computer has gone to sleep.]
Grimscribe has joined #ruby-lang
symm- has joined #ruby-lang
ndrst has quit [Ping timeout: 245 seconds]
ndrst has joined #ruby-lang
mmorga has joined #ruby-lang
mistym has joined #ruby-lang
lfox has quit [Quit: ZZZzzz…]
torrieri has quit [Quit: Linkinus - http://linkinus.com]
ikrima has quit [Quit: Computer has gone to sleep.]
Erwin has quit [Quit: Leaving]
mmorga has quit [Ping timeout: 256 seconds]
kireevco_ has joined #ruby-lang
ssb123 has quit [Remote host closed the connection]
ssb123 has joined #ruby-lang
micalexander has joined #ruby-lang
micalexa_ has joined #ruby-lang
micalexander has quit [Read error: Connection reset by peer]
ssb123 has quit [Ping timeout: 245 seconds]
nathanstitt has quit [Quit: I growing sleepy]
Coincidental has quit [Remote host closed the connection]
Coincidental has joined #ruby-lang
charliesome has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
Coincidental has quit [Ping timeout: 272 seconds]
julian_ has joined #ruby-lang
retro|cz has quit [Ping timeout: 272 seconds]
Coincide_ has joined #ruby-lang
bastilian has quit [Quit: Linkinus - http://linkinus.com]
hahuang65 has joined #ruby-lang
jithu has joined #ruby-lang
charliesome has joined #ruby-lang
stevew_ has joined #ruby-lang
mdedetrich has quit [Quit: ["Textual IRC Client: www.textualapp.com"]]
imperator has joined #ruby-lang
mdedetrich has joined #ruby-lang
banisterfiend has quit [Quit: Computer has gone to sleep.]
greenrecyclebin has joined #ruby-lang
lsegal has joined #ruby-lang
<imperator> good evening
rickyrickyrice has joined #ruby-lang
rickyrickyrice has quit [Client Quit]
kgrz has quit [Remote host closed the connection]
havenwood has joined #ruby-lang
jithu has quit [Quit: Mother, did it need to be so high?]
charliesome has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
alexju has joined #ruby-lang
GaelanAintAround is now known as Gaelan
enmand has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
stevew_ has quit [Quit: WeeChat 0.4.1]
dhruvasagar has joined #ruby-lang
Gaelan is now known as GaelanAintAround
Oak has joined #ruby-lang
dhruvasagar has quit [Ping timeout: 272 seconds]
Grimscribe has quit [Quit: Grimscribe]
lsegal has quit [Read error: Connection reset by peer]
lsegal has joined #ruby-lang
saarinen has quit [Quit: saarinen]
rljohnsn_ has joined #ruby-lang
rickhull has quit [Quit: Leaving.]
Barrin6 has joined #ruby-lang
dhruvasagar has joined #ruby-lang
jithu has joined #ruby-lang
yfeldblum has quit [Read error: Operation timed out]
<Barrin6> yo
<Barrin6> anyone mind helping me?
jayne has quit [Read error: Connection reset by peer]
jithu has quit [Quit: Mother, did it need to be so high?]
jayne has joined #ruby-lang
<Barrin6> oh it stops looping when I use return
dhruvasagar has quit [Read error: Operation timed out]
alexju_ has joined #ruby-lang
hahuang65 has quit [Read error: Connection reset by peer]
kgrz has joined #ruby-lang
tomzx_mac has quit [Read error: Operation timed out]
rickhull has joined #ruby-lang
alexju has quit [Ping timeout: 272 seconds]
simoz has joined #ruby-lang
kgrz has quit [Ping timeout: 256 seconds]
solars has joined #ruby-lang
hahuang65 has joined #ruby-lang
solars has quit [Ping timeout: 272 seconds]
Rarrikin1 has quit [Ping timeout: 248 seconds]
rljohnsn_ has quit [Quit: ~ Trillian - www.trillian.im ~]
kireevco_ has quit [Ping timeout: 248 seconds]
r0bby_ has joined #ruby-lang
jonahR has quit [Quit: jonahR]
bzalasky has joined #ruby-lang
jsullivandigs has quit [Remote host closed the connection]
jsullivandigs has joined #ruby-lang
simoz has quit [Ping timeout: 272 seconds]
bzalasky has quit [Remote host closed the connection]
bzalasky has joined #ruby-lang
jsullivandigs has quit [Ping timeout: 248 seconds]
bzalasky has quit [Ping timeout: 248 seconds]
hahuang65 has quit [Ping timeout: 272 seconds]
dhruvasagar has joined #ruby-lang
alexju_ has quit [Remote host closed the connection]
alexju has joined #ruby-lang
julweber has joined #ruby-lang
io_syl has quit []
alexju has quit [Ping timeout: 272 seconds]
ckim has quit [Remote host closed the connection]
ckim has joined #ruby-lang
Coincide_ has quit [Remote host closed the connection]
Coincidental has joined #ruby-lang
jithu has joined #ruby-lang
ckim has quit [Ping timeout: 248 seconds]
tbuehlmann has joined #ruby-lang
Coincidental has quit [Ping timeout: 272 seconds]
hahuang65 has joined #ruby-lang
mucker has joined #ruby-lang
Oak has quit [Quit: Later guys... :) (me liking http://hexchat.github.io/ very much)]
dhruvasagar has quit [Ping timeout: 248 seconds]
Elico has quit [Ping timeout: 272 seconds]
Elico has joined #ruby-lang
greenrecyclebin has quit [Ping timeout: 240 seconds]
amerine has quit [Quit: Textual IRC Client: www.textualapp.com]
Oak has joined #ruby-lang
Oak has joined #ruby-lang
Oak has quit [Changing host]
Barrin6 has quit [Quit: HydraIRC -> http://www.hydrairc.com <- Now with extra fish!]
Asher has quit [Quit: Leaving.]
hahuang65 has quit [Ping timeout: 272 seconds]
Scader has joined #ruby-lang
Scader has quit [Read error: Connection reset by peer]
skade has joined #ruby-lang
Oak has quit [Quit: Later guys... :) (me liking http://hexchat.github.io/ very much)]
rippa has joined #ruby-lang
hahuang65 has joined #ruby-lang
brianpWins has quit [Quit: brianpWins]
skade has quit [Quit: Computer has gone to sleep.]
slyphon has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
mj12albert has quit [Quit: Textual IRC Client: www.textualapp.com]
mj12albert has joined #ruby-lang
mj12albert has quit [Max SendQ exceeded]
solars has joined #ruby-lang
wallerdev has quit [Quit: wallerdev]
jsullivandigs has joined #ruby-lang
tonni has quit [Remote host closed the connection]
tonni has joined #ruby-lang
majjoha has joined #ruby-lang
Boohbah has joined #ruby-lang
ckim has joined #ruby-lang
tonni has quit [Ping timeout: 264 seconds]
fuhgeddaboudit has quit [Ping timeout: 248 seconds]
ckim has quit [Ping timeout: 272 seconds]
fuhgeddaboudit has joined #ruby-lang
ledestin has joined #ruby-lang
skade has joined #ruby-lang
solars has quit [Read error: Operation timed out]
fuhgeddaboudit has quit [Ping timeout: 272 seconds]
hakunin_ has joined #ruby-lang
Elico has quit [Ping timeout: 272 seconds]
hakunin has quit [Ping timeout: 272 seconds]
hahuang65 has quit [Ping timeout: 240 seconds]
Rarrikins has joined #ruby-lang
guest132435 has quit [Quit: guest132435]
Coincide_ has joined #ruby-lang
Rarrikins has quit [Ping timeout: 272 seconds]
hahuang65 has joined #ruby-lang
MaddinXx_ has joined #ruby-lang
Asher has joined #ruby-lang
apeiros has quit [Remote host closed the connection]
apeiros has joined #ruby-lang
Elico has joined #ruby-lang
havenwood has quit [Remote host closed the connection]
adambeynon has joined #ruby-lang
Rarrikins has joined #ruby-lang
face has joined #ruby-lang
faces has quit [Ping timeout: 272 seconds]
martndemus has joined #ruby-lang
CoreData has joined #ruby-lang
CoreData has quit [Ping timeout: 272 seconds]
richardburton has joined #ruby-lang
richardburton1 has joined #ruby-lang
richardburton has quit [Read error: Connection reset by peer]
Rarrikins has quit [Ping timeout: 248 seconds]
chobbit is now known as chobbit[back]
chobbit[back] is now known as chobbit
richardburton1 has quit [Quit: Leaving.]
richardburton has joined #ruby-lang
richardburton has quit [Client Quit]
Rarrikins has joined #ruby-lang
hahuang65 has quit [Ping timeout: 256 seconds]
richardburton has joined #ruby-lang
vlad_starkov has joined #ruby-lang
diegoviola has joined #ruby-lang
hahuang65 has joined #ruby-lang
arBmind has joined #ruby-lang
Rarrikins has quit [Ping timeout: 272 seconds]
martndemus has quit [Ping timeout: 272 seconds]
rickhull has quit [Quit: Leaving.]
guest132435 has joined #ruby-lang
ikrima has joined #ruby-lang
benanne has joined #ruby-lang
michael_mbp is now known as zz_michael_mbp
majjoha has quit [Ping timeout: 240 seconds]
toretore has joined #ruby-lang
freedrull has quit [Read error: Connection reset by peer]
jsullivandigs has quit [Remote host closed the connection]
jsullivandigs has joined #ruby-lang
tonni has joined #ruby-lang
enmand has joined #ruby-lang
VTLob has joined #ruby-lang
jsullivandigs has quit [Ping timeout: 256 seconds]
lsegal has quit [Quit: Quit: Quit: Quit: Stack Overflow.]
enmand has quit [Ping timeout: 272 seconds]
ruurd has joined #ruby-lang
jithu has quit [Quit: Mother, did it need to be so high?]
jithu has joined #ruby-lang
jiuweigui has joined #ruby-lang
martndemus has joined #ruby-lang
martndemus has quit [Ping timeout: 245 seconds]
mdedetrich has quit [Quit: Computer has gone to sleep.]
mdedetrich has joined #ruby-lang
martndemus has joined #ruby-lang
mistym has quit [Remote host closed the connection]
sepp2k has joined #ruby-lang
majjoha has joined #ruby-lang
guest132435 has quit [Quit: guest132435]
_if has joined #ruby-lang
majjoha has quit [Ping timeout: 272 seconds]
Coincide_ has quit [Remote host closed the connection]
Coincidental has joined #ruby-lang
Coincidental has quit [Ping timeout: 245 seconds]
stamina has joined #ruby-lang
_if has quit [Remote host closed the connection]
Rarrikins has joined #ruby-lang
canton7 has quit [Remote host closed the connection]
canton7 has joined #ruby-lang
bastilian has joined #ruby-lang
diegoviola has quit [Ping timeout: 272 seconds]
CoreData has joined #ruby-lang
symm- has quit [Ping timeout: 272 seconds]
jithu_ has joined #ruby-lang
jithu has quit [Ping timeout: 240 seconds]
jxie has quit [Quit: leaving]
jithu_ has quit [Quit: Mother, did it need to be so high?]
jithu has joined #ruby-lang
ikrima has quit [Quit: Computer has gone to sleep.]
CoreData has quit [Ping timeout: 272 seconds]
CoreData has joined #ruby-lang
benanne has quit [Read error: Operation timed out]
benanne has joined #ruby-lang
jsullivandigs has joined #ruby-lang
tonni has quit [Read error: Connection reset by peer]
tonni has joined #ruby-lang
jsullivandigs has quit [Ping timeout: 272 seconds]
CoreData has quit [Ping timeout: 272 seconds]
vlad_starkov has quit [Remote host closed the connection]
<Mon_Ouie> You probably want to use #select
majjoha has joined #ruby-lang
chobbit has quit [Quit: WeeChat 0.4.0]
axsuul has quit [Ping timeout: 265 seconds]
krzyzaq has joined #ruby-lang
jiuweigui has quit [Quit: iQuit!]
Elico has quit [Ping timeout: 272 seconds]
relix has joined #ruby-lang
mdedetrich has quit [Quit: Computer has gone to sleep.]
cnivolle has joined #ruby-lang
adambeynon has quit [Quit: ["Textual IRC Client: www.textualapp.com"]]
jsullivandigs has joined #ruby-lang
mdedetrich has joined #ruby-lang
mdedetrich has quit [Client Quit]
Oloryn_lt2 has joined #ruby-lang
retro|cz has joined #ruby-lang
jsullivandigs has quit [Ping timeout: 245 seconds]
Oloryn_lt2 has quit [Read error: Connection reset by peer]
vlad_starkov has joined #ruby-lang
jsullivandigs has joined #ruby-lang
bzalasky has joined #ruby-lang
Oloryn_lt2 has joined #ruby-lang
brixen has quit [Read error: Operation timed out]
shtirlic_ has quit [Ping timeout: 240 seconds]
jtoy has quit [Ping timeout: 268 seconds]
jsullivandigs has quit [Remote host closed the connection]
machuga has quit [Ping timeout: 248 seconds]
r0bby_ has quit [Ping timeout: 245 seconds]
vlad_starkov has quit [Ping timeout: 272 seconds]
onewheelskyward has quit [Ping timeout: 252 seconds]
jsullivandigs has joined #ruby-lang
samkottler has quit [Ping timeout: 268 seconds]
r0bby_ has joined #ruby-lang
bastilian has quit [Quit: Leaving...]
krzyzaq has quit [Quit: krzyzaq]
elia has joined #ruby-lang
vlad_starkov has joined #ruby-lang
ckim has joined #ruby-lang
jsullivandigs has quit [Ping timeout: 272 seconds]
mucker has quit [Remote host closed the connection]
ckim_ has joined #ruby-lang
mucker has joined #ruby-lang
mucker has quit [Read error: Connection reset by peer]
vlad_starkov has quit [Remote host closed the connection]
mucker has joined #ruby-lang
ckim has quit [Read error: Connection reset by peer]
VTLob has quit [Quit: VTLob]
cnivolle has quit [Remote host closed the connection]
cnivolle has joined #ruby-lang
benanne has quit [Quit: kbai]
ckim_ has quit [Remote host closed the connection]
cnivolle has quit [Ping timeout: 264 seconds]
julweber has quit [Remote host closed the connection]
julweber has joined #ruby-lang
julweber has quit [Ping timeout: 272 seconds]
aomdoa has joined #ruby-lang
bastilian has joined #ruby-lang
schaerli has joined #ruby-lang
martndemus has quit [Ping timeout: 272 seconds]
aomdoa has quit [Quit: Leaving]
VTLob has joined #ruby-lang
<matti> Mon_Ouie: ;]
<Mon_Ouie> 'alut matti ;)
Oloryn_lt2 has quit [Quit: Leaving.]
relix has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
yxhuvud has quit [Remote host closed the connection]
jtoy has joined #ruby-lang
onewheelskyward has joined #ruby-lang
MaddinXx_ has quit [Remote host closed the connection]
machuga has joined #ruby-lang
shtirlic has joined #ruby-lang
brixen has joined #ruby-lang
arBmind has quit [Quit: Leaving.]
yxhuvud has joined #ruby-lang
Oloryn_lt2 has joined #ruby-lang
zz_michael_mbp is now known as michael_mbp
io_syl has joined #ruby-lang
* imperator just watched erlang, the movie, part 2
Forgetful_Lion has joined #ruby-lang
martndemus has joined #ruby-lang
Forgetful_Lion_ has joined #ruby-lang
Forgetful_Lion has quit [Ping timeout: 256 seconds]
Forgetful_Lion_ has quit [Read error: Connection reset by peer]
schaerli has quit [Remote host closed the connection]
Forgetful_Lion has joined #ruby-lang
Forgetful_Lion has quit [Read error: Connection reset by peer]
schaerli has joined #ruby-lang
Forgetful_Lion has joined #ruby-lang
<sluukkonen> outlaw techno psychobitch \o/
schaerli has quit [Ping timeout: 272 seconds]
GaelanAintAround is now known as Gaelan
martndemus has quit [Ping timeout: 272 seconds]
<imperator> just reading some ryan dahl quotes now....lol
relix has joined #ruby-lang
chaos_ has left #ruby-lang [#ruby-lang]
soahccc has joined #ruby-lang
<soahccc> I would like to make an application which runs as a daemon. It would perform a lot of IO tasks so it waits most of the time. These tasks are rescheduled like any minute or so and based on the results it takes actions. So a main thread + task runners. I also need to communicate with the process externally (console, API). What would be my options? I don't know if eventmachine would be good for this.
cnivolle_ has joined #ruby-lang
tomzx_mac has joined #ruby-lang
enmand has joined #ruby-lang
ledestin has quit [Ping timeout: 272 seconds]
hashkey_ has joined #ruby-lang
tkuchiki_ has joined #ruby-lang
tkuchiki has quit [Read error: Connection reset by peer]
hashkey_ is now known as Guest48545
ledestin has joined #ruby-lang
havenwood has joined #ruby-lang
hashkey has quit [Ping timeout: 240 seconds]
Guest48545 has quit [Client Quit]
jiuweigui has joined #ruby-lang
vlad_starkov has joined #ruby-lang
vlad_starkov has quit [Remote host closed the connection]
Gaelan is now known as GaelanAintAround
Squarepy has joined #ruby-lang
martndemus has joined #ruby-lang
mannyt has quit [Quit: mannyt]
Oloryn_lt2 has quit [Quit: Leaving.]
s0ber has quit [Remote host closed the connection]
s0ber has joined #ruby-lang
Rarrikins has quit [Ping timeout: 265 seconds]
s0ber has quit [Remote host closed the connection]
s0ber has joined #ruby-lang
Forgetful_Lion_ has joined #ruby-lang
Rarrikins has joined #ruby-lang
ledestin has quit [Ping timeout: 248 seconds]
Forgetful_Lion has quit [Ping timeout: 240 seconds]
nvg has joined #ruby-lang
menga_ has joined #ruby-lang
Oloryn_lt2 has joined #ruby-lang
hashkey has joined #ruby-lang
menga_ has left #ruby-lang [#ruby-lang]
ledestin has joined #ruby-lang
apeiros has quit [Remote host closed the connection]
bzalasky has quit [Remote host closed the connection]
bzalasky has joined #ruby-lang
nathanstitt has joined #ruby-lang
bzalasky has quit [Ping timeout: 240 seconds]
sdpy has joined #ruby-lang
banisterfiend has joined #ruby-lang
<darix> soahccc: it could
<darix> soahccc: though i would look into existing job schedule things like sidekiq and resque
jxie has joined #ruby-lang
fuhgeddaboudit has joined #ruby-lang
retro|cz has quit [Read error: Operation timed out]
nvg has left #ruby-lang [#ruby-lang]
schaerli has joined #ruby-lang
Rarrikins has quit [Ping timeout: 240 seconds]
charliesome has joined #ruby-lang
Rarrikins has joined #ruby-lang
bzalasky has joined #ruby-lang
<yorickpeterse> man it's so satisfying to be able to go to my own bathroom again after being in Paris for 2 nights
benanne has joined #ruby-lang
bzalasky has quit [Remote host closed the connection]
bzalasky has joined #ruby-lang
mannyt has joined #ruby-lang
mannyt has quit [Read error: Connection reset by peer]
mucker has quit [Remote host closed the connection]
ledestin has quit [Ping timeout: 272 seconds]
<imperator> thanks for sharing that
ledestin has joined #ruby-lang
bzalasky has quit [Ping timeout: 272 seconds]
wallerdev has joined #ruby-lang
mannyt has joined #ruby-lang
mannyt has quit [Read error: Connection reset by peer]
barttenbrinke has joined #ruby-lang
wallerdev has quit [Quit: wallerdev]
mannyt has joined #ruby-lang
<julian_> How can I inspect an object?
<julian_> when .inspect isn't working?
<foucist> julian_: you can't
<foucist> julian_: could check and see what methods the object has
<julian_> that could work
mannyt has quit [Read error: Connection reset by peer]
<julian_> how would one do that?
barttenbrinke has quit [Ping timeout: 248 seconds]
mannyt has joined #ruby-lang
<julian_> foucist: Actually, what I want to do is this
<julian_> I have a .self method. How could I actually get the value of .self?
<julian_> foobar.mymethod
<julian_> inside mymethod, how can I return "foobar" ?
charliesome has quit [Quit: Textual IRC Client: www.textualapp.com]
* imperator wonders what "inspect isn't working" means
<julian_> It simply returns the cryptic #<Object:0X39580349058> type of thing
<imperator> you want the class of self? self.class
<julian_> That's got it!
<julian_> Oh wait
<julian_> no, it hasn't
<julian_> I'll make a pastebin
McSoFake has joined #ruby-lang
elia has quit [Quit: Computer has gone to sleep.]
mannyt has quit [Read error: Connection reset by peer]
<julian_> imperator:
<julian_> something like this http://pastebin.com/z3vvFLbQ
Oloryn_lt2 has quit [Quit: Leaving.]
<imperator> julian_, no way to do that afaik, and really i gotta wonder why you would care what the caller's variable name is in the first place
<julian_> okay, well hopefully there is a better way to do this
mucker has joined #ruby-lang
<imperator> what are you ultimately trying to accomplish?
<julian_> I'll make another pastie :)
schaerli has quit [Remote host closed the connection]
Forgetful_Lion has joined #ruby-lang
ruurd has quit [Quit: Leaving...]
Forgetful_Lion_ has quit [Ping timeout: 240 seconds]
<julian_> imperator: http://pastebin.com/FDnSndBp
mannyt has joined #ruby-lang
<julian_> I also need the self as a string to make a query on an array, to check certain window attributes
ckim has joined #ruby-lang
<julian_> I have an array that holds all window attributes
<imperator> julian_, i don't understand why're you're reopening Object
<imperator> why not have a "Window" class
<imperator> its attributes should be accessors
<julian_> imperator: Ah okay, I'll try that
mannyt has quit [Read error: Connection reset by peer]
<julian_> imperator: So using attraccess I can make the 'self' availble to the method?
<julian_> or what?
<julian_> what do you mean by attributes, actually/
ykk` has joined #ruby-lang
<julian_> the parameters?
<ykk`> hey everyone
imt_ has joined #ruby-lang
tbuehlmann has quit [Remote host closed the connection]
<ykk`> my wrists are hurting and I read Pragmatic The Healthy Programmer. your wrists need to be in that rested position
vlad_starkov has joined #ruby-lang
<julian_> imperator: Thanks v much
<imperator> julian_, this is pretty basic stuff, i feel like you're trying to write a ruby program without really understanding ruby
ledestin has quit [Quit: ledestin]
wallerdev has joined #ruby-lang
vlad_starkov has quit [Ping timeout: 272 seconds]
bzalasky has joined #ruby-lang
netShadow has joined #ruby-lang
mucker has quit [Ping timeout: 272 seconds]
kireevco_ has joined #ruby-lang
<soahccc> darix: well I thought about more "in ram" stuff. The footprint of the tasks is pretty small and I don't have a database backend. Scheduling is not pretty easy in my case and I don't want to rely on a system service (standalone if you want)
<soahccc> err. scheduling IS pretty easy in my case
majjoha has quit [Ping timeout: 245 seconds]
snarfmason has joined #ruby-lang
banisterfiend has quit [Quit: Computer has gone to sleep.]
banisterfiend has joined #ruby-lang
Oloryn_lt2 has joined #ruby-lang
julian_ has quit [Ping timeout: 256 seconds]
McSoFake has quit [Quit: McSoFake]
<r0bgleeson> ykk`: well if you ever get a spaceship that keyboard will match the interior
<ykk`> haha
<ykk`> it's not the prettiest but that company has a brushed metal one
rickhull has joined #ruby-lang
<r0bgleeson> i dont know much about those keyboards, not a concern i worry about too much
ikrima has joined #ruby-lang
shinnya has quit [Ping timeout: 265 seconds]
majjoha has joined #ruby-lang
Forgetful_Lion_ has joined #ruby-lang
Forgetful_Lion_ has quit [Read error: Connection reset by peer]
bzalasky has quit [Remote host closed the connection]
Forgetful_Lion_ has joined #ruby-lang
majjoha has quit [Ping timeout: 272 seconds]
bzalasky has joined #ruby-lang
Forgetful_Lion has quit [Ping timeout: 248 seconds]
benanne has quit [Quit: kbai]
bzalasky has quit [Ping timeout: 248 seconds]
samkottler has joined #ruby-lang
Johz has joined #ruby-lang
cnivolle_ has quit [Remote host closed the connection]
cnivolle has joined #ruby-lang
vlad_starkov has joined #ruby-lang
Elico has joined #ruby-lang
ruurd has joined #ruby-lang
cnivolle has quit [Ping timeout: 272 seconds]
vlad_starkov has quit [Ping timeout: 256 seconds]
tbuehlmann has joined #ruby-lang
dhruvasagar has joined #ruby-lang
x0f has joined #ruby-lang
ruurd has quit [Quit: Leaving...]
ndrst has quit [Read error: Operation timed out]
ndrst has joined #ruby-lang
x0f_ has quit [Ping timeout: 248 seconds]
kgrz has joined #ruby-lang
relix has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
relix has joined #ruby-lang
majjoha has joined #ruby-lang
enmand has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
Voker57 has quit []
mbj has joined #ruby-lang
Forgetful_Lion has joined #ruby-lang
TheMoonMaster has quit [Remote host closed the connection]
majjoha has quit [Ping timeout: 248 seconds]
Johz_ has joined #ruby-lang
metus_violarium has joined #ruby-lang
Forgetful_Lion_ has quit [Ping timeout: 240 seconds]
<tubbo> i can't fuckin type on those things :(
<tubbo> i prefer to take frequent breaks instead. it's better for the rest of your body anyway...like your eyes, brain and legs.
<tubbo> speaking of which
<tubbo> :D
Johz has quit [Ping timeout: 272 seconds]
Johz__ has joined #ruby-lang
Johz__ has quit [Client Quit]
<darix> ykk`: i have the MS natural key since 15y now. i can recommend those if you dont want to go to kinesis
<darix> ykk`: natural key 4000 atm
Johz_ has quit [Ping timeout: 248 seconds]
michael_mbp is now known as zz_michael_mbp
dhruvasagar has quit [Ping timeout: 240 seconds]
<micalexa_> does ruby have a built in method to find out if a hash has more than one key value pair
snarfmason has quit [Quit: Computer has gone to sleep.]
<tbuehlmann> micalexa_, yes, you can use #count or #size for that
Grimscribe has joined #ruby-lang
<havenwood> micalexa_: #one? #empty?
snarfmason has joined #ruby-lang
<micalexa_> ok cool
vlad_starkov has joined #ruby-lang
ykk` has quit [Quit: ykk`]
<havenwood> class Hash; def more_than_one?; self.size > 1 end end
<havenwood> or something like
<havenwood> class Hash; def one_or_less?; self.one? || self.empty? end end
Coincidental has joined #ruby-lang
<micalexa_> havenwood: cool, I just need to do if hash.one? ... end. thats cool right?
<havenwood> micalexa_: yup, to check if one element in the hash
mlangenberg has joined #ruby-lang
<micalexa_> havenwood: just trying to limit thor input, unless you know a better way thor (thats if you are familiar with it)
<micalexa_> otherwise thanks
<havenwood> i don't know better way, just remember {}.one? #=> false
<micalexa_> yep cool
cnivolle has joined #ruby-lang
Bees has joined #ruby-lang
slyphon has joined #ruby-lang
cnivolle_ has joined #ruby-lang
cnivolle_ has quit [Read error: Connection reset by peer]
majjoha has joined #ruby-lang
cnivolle has quit [Ping timeout: 265 seconds]
cnivolle has joined #ruby-lang
Bees has quit [Quit: Page closed]
enmand has joined #ruby-lang
csffsc has joined #ruby-lang
cnivolle_ has joined #ruby-lang
majjoha has quit [Ping timeout: 256 seconds]
cnivolle has quit [Read error: Connection reset by peer]
cnivolle has joined #ruby-lang
Oloryn_lt2 has quit [Quit: Leaving.]
cnivolle has quit [Read error: Connection reset by peer]
cnivolle has joined #ruby-lang
cnivolle_ has quit [Ping timeout: 272 seconds]
n8nl has joined #ruby-lang
imt_ has quit [Quit: Leaving]
cnivolle_ has joined #ruby-lang
sdpy has quit [Remote host closed the connection]
cnivoll__ has joined #ruby-lang
Johz has joined #ruby-lang
cnivolle has quit [Read error: Connection reset by peer]
cnivolle_ has quit [Read error: No route to host]
cnivoll__ has quit [Read error: Connection reset by peer]
cnivolle_ has joined #ruby-lang
Grimscribe has quit [Quit: Grimscribe]
cnivolle_ has quit [Read error: No route to host]
cnivolle has joined #ruby-lang
lsegal has joined #ruby-lang
cnivolle has quit [Read error: Connection reset by peer]
Oloryn_lt2 has joined #ruby-lang
vlad_starkov has quit [Read error: Connection reset by peer]
cnivolle has joined #ruby-lang
guest132435 has joined #ruby-lang
mbj has quit [Ping timeout: 240 seconds]
cnivolle_ has joined #ruby-lang
Forgetful_Lion_ has joined #ruby-lang
Forgetful_Lion_ has quit [Read error: Connection reset by peer]
Forgetful_Lion_ has joined #ruby-lang
mbj has joined #ruby-lang
Forgetful_Lion_ has quit [Read error: Connection reset by peer]
Squarepy has quit [Quit: Leaving]
Forgetful_Lion_ has joined #ruby-lang
cnivolle has quit [Ping timeout: 265 seconds]
majjoha has joined #ruby-lang
Forgetful_Lion_ has quit [Read error: Connection reset by peer]
s0ber has quit [Read error: Connection reset by peer]
s0ber has joined #ruby-lang
cnivoll__ has joined #ruby-lang
Forgetful_Lion_ has joined #ruby-lang
Forgetful_Lion has quit [Ping timeout: 240 seconds]
Forgetful_Lion_ has quit [Read error: Connection reset by peer]
Forgetful_Lion has joined #ruby-lang
cnivolle_ has quit [Ping timeout: 248 seconds]
Forgetful_Lion has quit [Read error: Connection reset by peer]
Forgetful_Lion has joined #ruby-lang
mbj has quit [Ping timeout: 240 seconds]
majjoha has quit [Ping timeout: 240 seconds]
Barrin6 has joined #ruby-lang
cnivoll__ has quit [Ping timeout: 240 seconds]
martndemus has quit [Ping timeout: 245 seconds]
rickhull has quit [Quit: Leaving.]
cnivolle has joined #ruby-lang
majjoha has joined #ruby-lang
mbj has joined #ruby-lang
Grimscribe has joined #ruby-lang
<Barrin6> i have a very nooby question
<Barrin6> i just installed rubygems
<Barrin6> I opened up interactive ruby
<Barrin6> and did "gem-v"
<Barrin6> shouldn't it give me the gem version?
<Barrin6> nvm
<Barrin6> doesn't work in interactive ruby
<Barrin6> has to be in cmd
dsg_ has joined #ruby-lang
adambeynon has joined #ruby-lang
krzyzaq has joined #ruby-lang
vlad_starkov has joined #ruby-lang
<imperator> correct
<imperator> in irb, Gem::VERSION
jithu has quit [Ping timeout: 272 seconds]
<Barrin6> wow in irb it's case senstive
<Barrin6> bastards
jeff_r has joined #ruby-lang
<Barrin6> I think I'll go back to playing with projecteuler a little bit more
shtirlic has quit [Read error: Connection reset by peer]
shtirlic has joined #ruby-lang
rickhull has joined #ruby-lang
cnivolle has quit [Ping timeout: 240 seconds]
mlangenberg has quit [Quit: mlangenberg]
tbuehlmann has quit [Remote host closed the connection]
rippa has quit [Quit: {#`%${%&`+'${`%&NO CARRIER]
Coincidental has quit [Remote host closed the connection]
Coincidental has joined #ruby-lang
esad has joined #ruby-lang
cnivolle has joined #ruby-lang
cnivolle has quit [Remote host closed the connection]
Coincidental has quit [Ping timeout: 245 seconds]
cnivolle has joined #ruby-lang
relix has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
cnivolle has quit [Ping timeout: 272 seconds]
mbj has quit [Ping timeout: 248 seconds]
relix has joined #ruby-lang
tonni has quit [Remote host closed the connection]
Oloryn_lt2 has quit [Ping timeout: 245 seconds]
Oloryn_lt2 has joined #ruby-lang
shtirlic has quit [Quit: ZNC - http://znc.in]
kireevco_ has quit [Ping timeout: 248 seconds]
havenwood has quit [Remote host closed the connection]
austinja has joined #ruby-lang
Coincidental has joined #ruby-lang
charliesome has joined #ruby-lang
cnivolle has joined #ruby-lang
Coincidental has quit [Remote host closed the connection]
Coincidental has joined #ruby-lang
guest132435 has quit [Ping timeout: 245 seconds]
majjoha has quit [Ping timeout: 248 seconds]
benwoody has joined #ruby-lang
Coincide_ has joined #ruby-lang
Coincidental has quit [Read error: Connection reset by peer]
kgrz has quit [Remote host closed the connection]
kgrz has joined #ruby-lang
jeff_r has quit [Remote host closed the connection]
jeff_r has joined #ruby-lang
symm- has joined #ruby-lang
<Barrin6> I have a question for you folks
jmeeuwen_ has joined #ruby-lang
<Barrin6> is (5..10).inject(1)
<Barrin6> and then the block
<Barrin6> why is there an arguement of 1?
<Barrin6> where as in the 2nd example, the inject takes no argument
Johz has quit [Ping timeout: 272 seconds]
jmeeuwen has quit [Ping timeout: 252 seconds]
jwollert has quit [Ping timeout: 252 seconds]
aef has quit [Remote host closed the connection]
cnivolle has quit [Remote host closed the connection]
kgrz has quit [Ping timeout: 272 seconds]
jmeeuwen_ is now known as jmeeuwen
<Mon_Ouie> The optional argument, as described in your link, is the initial value of the accumulator
jwollert has joined #ruby-lang
cnivolle has joined #ruby-lang
martndemus has joined #ruby-lang
mlangenberg has joined #ruby-lang
jeff_r has quit [Ping timeout: 272 seconds]
csffsc has quit [Remote host closed the connection]
adambeynon has quit [Quit: Textual IRC Client: www.textualapp.com]
csffsc has joined #ruby-lang
csffsc_ has joined #ruby-lang
austinja has quit [Quit: austinja]
csffsc_ has quit [Remote host closed the connection]
cnivolle has quit [Ping timeout: 272 seconds]
martndemus has quit [Ping timeout: 248 seconds]
csffsc has quit [Ping timeout: 265 seconds]
mlangenberg has quit [Quit: mlangenberg]
cnivolle has joined #ruby-lang
cnivolle_ has joined #ruby-lang
Oloryn_lt2 has quit [Ping timeout: 256 seconds]
relix has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
benwoody has quit [Quit: benwoody]
rickhull has quit [Quit: Leaving.]
relix has joined #ruby-lang
Oloryn_lt2 has joined #ruby-lang
cnivolle has quit [Ping timeout: 256 seconds]
allie_p has joined #ruby-lang
char_ has joined #ruby-lang
guest132435 has joined #ruby-lang
ruurd has joined #ruby-lang
char_ has quit [Client Quit]
Oloryn_lt2 has quit [Quit: Leaving.]
netShadow has quit [Quit: netShadow]
ikrima has quit [Quit: Computer has gone to sleep.]
kgrz has joined #ruby-lang
<Barrin6> when you say initial value of the accumatlor
<Barrin6> what does that mena?
<Barrin6> oh the starting value?
<Barrin6> by default I assume it is 0?
<Barrin6> if you leave out the argument
<Barrin6> so if you didn't include that initial value
<Barrin6> it would always return 0
<Barrin6> that makes sense
cnivolle_ has quit [Remote host closed the connection]
<Barrin6> no it still works
martndemus has joined #ruby-lang
majjoha has joined #ruby-lang
<Barrin6> i guess default is 1
<canton7> if you don't specify a default, it uses the first value in the collection
<canton7> "If you do not explicitly specify an initial value for memo, then the first element of collection is used as the initial value of memo."
<canton7> again, from the doc page you linked
<Barrin6> ohhh
<Barrin6> yea
<Barrin6> my bad
<Barrin6> thank you
<canton7> :)
<Barrin6> cool I solved projecteuler #6 in 5 mins
<Barrin6> so proud
krzyzaq has quit [Quit: krzyzaq]
enmand has quit [Ping timeout: 272 seconds]
CoreData has joined #ruby-lang
majjoha has quit [Ping timeout: 272 seconds]
enmand has joined #ruby-lang
kgrz has quit [Ping timeout: 265 seconds]
rchar has joined #ruby-lang
<rchar> I have a question
<canton7> I have an answer... What are the chances of it answering your question?
<rchar> is there a way, given a range of integers and some integer outside the range, to wrap the integer to a value inside the range
s0ber_ has joined #ruby-lang
CoreData has quit [Ping timeout: 272 seconds]
<rchar> for example, 7.wrap_in (1..5) would give you 2
bastilian has quit [Ping timeout: 245 seconds]
<canton7> for ranges beginning at 1, yuse %
<canton7> *use
<rchar> right
Grimscribe has quit [Quit: Grimscribe]
<canton7> for ranges starting > 1, remove the offset, mod, add the offset again
<canton7> >> 7 % 5
<eval-in> canton7 => 2 (https://eval.in/55864)
s0ber has quit [Read error: Connection reset by peer]
<canton7> s/1/0 above
s0ber_ is now known as s0ber
<rchar> right
<rchar> does that handle numbers below the range?
<rchar> 3.wrap_in (4..10) => 10
<canton7> something like http://codepad.org/4DcBG9yM
<rchar> i'm guessing there's nothing in the standard library that has that kind of conversion
<canton7> and no, more fun and games required for numbers below the range
<Mon_Ouie> There's no problem with number below the range
<Mon_Ouie> >> ((3 - 4) % (10-4+1)) + 4
<eval-in> Mon_Ouie => 10 (https://eval.in/55866)
metus_violarium has quit [Quit: Konversation terminated!]
cnivolle has joined #ruby-lang
<canton7> ooh true. I think I'm probably unreasonably scared of % involving negative numbers, from C
<Mon_Ouie> In Ruby, % (a.k.a mod) uses the sign of the rhs for its return valuesa
<Mon_Ouie> rem uses the sign of the lhs
<Mon_Ouie> Woops, except they're called modulo* and remainder*
cnivolle_ has joined #ruby-lang
guest132435 has quit [Quit: guest132435]
cnivolle has quit [Read error: No route to host]
<rchar> thanks!
<Mon_Ouie> (In C89 it's undefined — or implementation-defined? — behavior, in C99 it behaves like remainder
<Mon_Ouie> )
cnivolle has joined #ruby-lang
dsg_ has quit [Quit: Textual IRC Client: www.textualapp.com]
cnivolle_ has quit [Ping timeout: 265 seconds]
esad has quit [Quit: ["Textual IRC Client: www.textualapp.com"]]
cnivolle has quit [Ping timeout: 272 seconds]
<r0bgleeson> Mon_Ouie: hey!
<r0bgleeson> you here?
tonni has joined #ruby-lang
<Mon_Ouie> r0bgleeson: 'alut
<r0bgleeson> Mon_Ouie: salut, do you know if it is possible to create a manifest of ELPA packages? it's probably very easy to write a function to do that?
mlangenberg has joined #ruby-lang
<Mon_Ouie> I don't know how off the top of my head
havenwood has joined #ruby-lang
nathanstitt has quit [Quit: I growing sleepy]
<r0bgleeson> Mon_Ouie: package-install-file might be the one
<r0bgleeson> checking it out
<r0bgleeson> thx :)
<Barrin6> if I finish all of project euler with ruby
<Barrin6> am I considered an expert? :D
<Mon_Ouie> A math expert
<r0bgleeson> being able to solve problems is more valuable than learning language X.
rickhull has joined #ruby-lang
nisstyre has quit [Quit: Leaving]
zz_michael_mbp is now known as michael_mbp
<Barrin6> but not sure if math problems are applicable to real world problems
Grimscribe has joined #ruby-lang
<r0bgleeson> well, iirc, project euler problems aren't easy, so im sure you'll be able to apply to real world problems just fine
jeff_r has joined #ruby-lang
<Barrin6> I'm not a programmer, but are most real world problems just math problems to a programmer?
<r0bgleeson> depends on the programmer
<r0bgleeson> in rails, i doubt it
Rarrikins has quit [Ping timeout: 240 seconds]
michael_mbp is now known as zz_michael_mbp
Rarrikins has joined #ruby-lang
jeff_r has quit [Ping timeout: 256 seconds]
mlangenberg has quit [Quit: mlangenberg]
ruurd has quit [Quit: Leaving...]
<Barrin6> why am I getting invalid octal digit on this? http://pastebin.com/dVz6wg2d
<Barrin6> for line 21
<Barrin6> it's pointing to the #8 on 0588
<workmad3> Barrin6: the number is spread across new lines, so each separate line is a different number
<Mon_Ouie> A number literal that starts with a "0" is parsed as octal
<Barrin6> ohhh
<Barrin6> shit
<workmad3> :)
<Barrin6> I'll just make it a string instead
<Barrin6> to avoid that problem
mdedetrich has joined #ruby-lang
mlangenberg has joined #ruby-lang
Johz has joined #ruby-lang
kgrz has joined #ruby-lang
rchar has quit [Quit: Lost terminal]
majjoha has joined #ruby-lang
kgrz has quit [Ping timeout: 245 seconds]
majjoha has quit [Ping timeout: 272 seconds]
mistym has joined #ruby-lang
relix has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
jrobeson has quit [Read error: Connection reset by peer]
ikrima has joined #ruby-lang
martndemus has quit [Ping timeout: 248 seconds]
jrobeson has joined #ruby-lang
ledestin has joined #ruby-lang
<Barrin6> so proud of myself here http://pastebin.com/ySPM4uUx
<Barrin6> didn't think I would save it as quick
<Barrin6> but I did
skade has quit [Quit: Computer has gone to sleep.]
relix has joined #ruby-lang
<workmad3> Barrin6: want a one-liner for that? :)
mlangenberg has quit [Quit: mlangenberg]
<Barrin6> lol
<Barrin6> there is no way
<workmad3> val.split('').reject{|i| i == "\n"}.map(&:to_i).each_cons(5).map{|a| a.reduce(&:*)}.max
<Barrin6> there is a .each_cons(5)?
<Barrin6> didn't know that
<workmad3> yup :)
<workmad3> well, there's an each_cons method, that takes how many consecutive elements you want each time :)
<Barrin6> didn't know that
<workmad3> and now you do ;)
relix has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<Barrin6> haha thanks
mdedetrich has quit [Quit: Computer has gone to sleep.]
majjoha has joined #ruby-lang
charliesome has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
majjoha has quit [Ping timeout: 272 seconds]
martndemus has joined #ruby-lang
<Barrin6> damn
<Barrin6> #9 is hard to understand how to start
<workmad3> Barrin6: maybe start by considering the constraints
rickhull has quit [Quit: Leaving.]
<Barrin6> yea
<Barrin6> I have to break this down
<Barrin6> real good
martndemus has quit [Ping timeout: 272 seconds]
bastilian has joined #ruby-lang
sepp2k1 has joined #ruby-lang
<Barrin6> fuck
<Barrin6> i'm stuck
sepp2k has quit [Ping timeout: 256 seconds]
<ledestin> why isn't there a clock that can't be changed by user?
<drbrain> ledestin: there isn't?
<ledestin> you can't rely on Time.now - time due to the fact that time can be changed by user
<ledestin> drbrain: well, RTC on Linux, but that's not cross-platform
<drbrain> ledestin: you'll need a monotonic clock
<drbrain> Ruby 2.1 has support for reading it
vlad_starkov has quit [Remote host closed the connection]
<drbrain> but it shouldn't be hard to FFI it up
<ledestin> drbrain: very cool, I'll research it
<ledestin> drbrain: FFI?
<drbrain> ledestin: wikipedia says clock_gettime and CLOCK_MONOTONIC is what you're looking for
<drbrain> ledestin: FFI (and the builtin fiddle) allow you to wrap C functions without writing a C extension
<ledestin> drbrain: thanks a lot mate, I was in a pinch, looking to make my own clock maybe
<workmad3> Barrin6: where are you stuck?
<Barrin6> standby
<Barrin6> I'm having trouble writing out the psuedo code
Johz has quit [Ping timeout: 240 seconds]
majjoha has joined #ruby-lang
<imperator> and internal clocks are reliable?
<workmad3> Barrin6: well, consider what you need
csffsc has joined #ruby-lang
* imperator would use net-ntp
majjoha has quit [Ping timeout: 240 seconds]
zz_michael_mbp is now known as michael_mbp
shinnya has joined #ruby-lang
skade has joined #ruby-lang
wallerdev has quit [Quit: wallerdev]
Forgetful_Lion has quit [Remote host closed the connection]
benanne has joined #ruby-lang
Rarrikins has quit [Ping timeout: 256 seconds]
Johz has joined #ruby-lang
Rarrikins has joined #ruby-lang
ssb123 has joined #ruby-lang
nathanstitt has joined #ruby-lang
workmad3 has quit [Ping timeout: 240 seconds]
Barrin6 has quit [Quit: HydraIRC -> http://www.hydrairc.com <- Would you like to know more?]
mdedetrich has joined #ruby-lang
alexju has joined #ruby-lang
vlad_starkov has joined #ruby-lang
Coincide_ has quit [Remote host closed the connection]
Coincidental has joined #ruby-lang
toretore has quit [Quit: Leaving]
Johz has quit [Remote host closed the connection]
VTLob has quit [Quit: VTLob]
majjoha has joined #ruby-lang
vlad_starkov has quit [Ping timeout: 265 seconds]
Johz has joined #ruby-lang
Coincidental has quit [Ping timeout: 272 seconds]
fuhgeddaboudit has quit [Ping timeout: 240 seconds]
Rarrikins has quit [Ping timeout: 248 seconds]
skade has quit [Quit: Computer has gone to sleep.]
majjoha has quit [Ping timeout: 245 seconds]
Rarrikins has joined #ruby-lang
apeiros has joined #ruby-lang
alexju has quit [Read error: Connection reset by peer]
fuhgeddaboudit has joined #ruby-lang
nathanstitt has quit [Quit: I growing sleepy]