xyzodiac has quit [Quit: Computer has gone to sleep.]
enebo has joined #ruby-lang
buzz_ has quit [Quit: buzz_]
slyphon has joined #ruby-lang
anannie has joined #ruby-lang
gearaholic has joined #ruby-lang
sush24 has joined #ruby-lang
richardjortega has joined #ruby-lang
mistym has quit [Remote host closed the connection]
slyphon has quit [Ping timeout: 245 seconds]
rue|w has joined #ruby-lang
kjr has joined #ruby-lang
kjr has quit [Client Quit]
nitti has quit [Remote host closed the connection]
seoaqua has joined #ruby-lang
rue|w has quit [Remote host closed the connection]
a1ph4g33k has joined #ruby-lang
nitti has joined #ruby-lang
carloslopes has joined #ruby-lang
jarib has quit [Excess Flood]
jarib has joined #ruby-lang
vlad_starkov has quit [Remote host closed the connection]
nitti has quit [Remote host closed the connection]
a1ph4g33k has quit [Quit: leaving]
slyphon has joined #ruby-lang
josh^ has quit [Remote host closed the connection]
tdy_ has joined #ruby-lang
seydar has joined #ruby-lang
<seydar>
Mon_Ouie: ping
piyush has quit [Ping timeout: 246 seconds]
malev has joined #ruby-lang
wyhaines has joined #ruby-lang
flebel has quit [Ping timeout: 255 seconds]
dhruvasagar has quit [Ping timeout: 255 seconds]
<Mon_Ouie>
seydar: pong
xyzodiac has joined #ruby-lang
kurko_ has quit [Ping timeout: 245 seconds]
xyzodiac has quit [Client Quit]
<seydar>
Mon_Ouie: as if i haven't said it enoguh before, i'm loving coolline
<Mon_Ouie>
:)
<seydar>
i just upgraded to head so i could use the menu to display completion information
malev has quit [Ping timeout: 240 seconds]
<seydar>
but totally unrelated bug/thing
gsav has joined #ruby-lang
<seydar>
normally, you can buffer STDIN. while a program is loading, if you type a shittonne of characters before the first #gets call is made, #gets will pull from the characters you typed before
<seydar>
HOWEVER
<seydar>
this is not the case with coolline
kurko_ has joined #ruby-lang
<seydar>
i suspect it is because coolline uses io/console
<seydar>
and getch
dr_bob has joined #ruby-lang
<Mon_Ouie>
I see what you mean. I noticed it before, and also assumed that was why it happened.
lcdhoffman has quit [Quit: lcdhoffman]
malev has joined #ruby-lang
dr_bob has quit [Client Quit]
flebel has joined #ruby-lang
<seydar>
also, is there any harm in NOT using Coolline#print to display output information? am i secretly stepping on toes?
gsav has quit [Client Quit]
methods has joined #ruby-lang
<Mon_Ouie>
Coolline#print is just more convenient than remembering to use output.print
vlad_starkov has joined #ruby-lang
<zzak>
good morning!
vlad_starkov has quit [Remote host closed the connection]
<Mon_Ouie>
As far as Coolline is concerned @output doesn't have to be $stdout
<seydar>
k. for my purposes i'm fine, then. thank you
<seydar>
and what's the protocol for NOT displaying a menu?
<Mon_Ouie>
The menu is only displayed when menu.string isn't empty
dr_bob has joined #ruby-lang
nitti has joined #ruby-lang
<seydar>
also, do you have any issues with the cursor being displayed in the middle of the menu string?
mistym has joined #ruby-lang
<seydar>
it's at the appropriate column for where the user types, but it's on the wrong line
nitti has quit [Remote host closed the connection]
<Mon_Ouie>
No, it appears just fine here
<Mon_Ouie>
Oh, wait, I have uncomitted changes
<seydar>
is this something you noticed and addressed recently?
<Mon_Ouie>
Actually, no, my local changes should be unrelated to that
dous has joined #ruby-lang
dous has quit [Changing host]
dous has joined #ruby-lang
dr_bob has quit [Client Quit]
goshakkk has quit [Ping timeout: 245 seconds]
seoaqua has quit [Ping timeout: 244 seconds]
<seydar>
Mon_Ouie: gah, then why do i suck
gsav has joined #ruby-lang
kjr has joined #ruby-lang
runeb has quit [Remote host closed the connection]
heftig has quit [Ping timeout: 245 seconds]
havenn has joined #ruby-lang
Weems has quit [Ping timeout: 245 seconds]
rue|w has joined #ruby-lang
dr_bob has joined #ruby-lang
<seydar>
Mon_Ouie: coolline.rb:252, it should say "go_to(line_no, [prompt_size + @pos + 1, width].min)"
dr_bob has quit [Client Quit]
<seydar>
and line_no should be the line number before the @menu.display call
<seydar>
i have no idea how to compute that though. sorry for failing you
jtoy has joined #ruby-lang
xyzodiac has joined #ruby-lang
no_worries has joined #ruby-lang
<Mon_Ouie>
Normally, Menu#display is setup to go back to the right line
<yxhuvud>
that looks like the default way to indent c in emacs, so I'd say it is perfectly normal. your editor seems to have hardcoded tab to be 2 spaces though, which doesn't look very nice together with 4 space indent.
<zzak>
ruby's C source tends to have a mixture in some places
<zzak>
but that looks like it could be your editor
<sent-hil>
ah
krohrbaugh has joined #ruby-lang
<yxhuvud>
zzak: the default way in emacs is to mix tabs and spaces. 4 space indent, but exchange double indentation for tab.
<darix>
the nice thing is with the % thing you dont need sprintf
<MouseTheLuckyDog>
darix: yeah cool.
<darix>
for multiple arguments pass them as array.
woollyams has quit [Client Quit]
m3nd3s has joined #ruby-lang
<darix>
of@
no_worries has joined #ruby-lang
lcdhoffman has quit [Quit: lcdhoffman]
wyhaines has quit [Remote host closed the connection]
workmad3 has quit [Ping timeout: 260 seconds]
Kingy has quit [Quit: Leaving]
Hakon has joined #ruby-lang
Kingy has joined #ruby-lang
irleif has joined #ruby-lang
elux has joined #ruby-lang
<elux>
hi everyone
<elux>
im trying to figure out how to do this dynamically.... asset.array_object << another_obj sorta like asset.send(:"array_object<<", another_obj) .. or whatever
<elux>
cant seem to figure it out
<elux>
hrmm maybe ill just use push()
<apeiros_>
you're calling two methods.
<apeiros_>
.array_object and .<<
<elux>
indeed
<apeiros_>
there is no `array_method<<` method.
<elux>
yes i kno :) i tried lol
sush24 has joined #ruby-lang
erichmenge has joined #ruby-lang
<apeiros_>
send only invokes *one* method
<apeiros_>
not a whole chain. but you can chain sends.
nazty has quit [Read error: Connection reset by peer]
RORgasm has quit [Remote host closed the connection]
no_worries has quit [Remote host closed the connection]
ryanf has joined #ruby-lang
<erikh>
a lot of it, yes.
ananna has left #ruby-lang [#ruby-lang]
<drbrain>
IIRC, in 1.8 for was faster than each
<drbrain>
… and for is syntax, so no indirection is added
anannie has joined #ruby-lang
<lianj>
"The and and or keywords are banned. It's just not worth it. Always use && and || instead." ^^
RomyRomy has joined #ruby-lang
RomyRomy has left #ruby-lang [#ruby-lang]
kurko_ has quit [Ping timeout: 260 seconds]
elux has quit [Quit: Bye!]
<whitequark>
lianj: you won't believe how much they are misused
<whitequark>
with disastrous consequences
<havenn>
I disagree that &&/|| versus and/or is difficult. Precedence is easy, hardly the 'hard' part of Ruby. I disagree that unless/else is confusing, we use it in English. Having 'private' before a method without a hard return is not idiomatic, I'm curious of the reasoning.
<manveru>
drbrain: for still calls each
woollyams has joined #ruby-lang
coryf has quit [Remote host closed the connection]
<drbrain>
manveru: yes, but in 1.8 scope creation was expensive
Dreamer3 has quit [Quit: Computer has gone to sleep.]
<ryanf>
huh? who uses "unless" and "else" in the same sentence in english?
<ryanf>
I'd be interested to see an example
<manveru>
drbrain: true
<zenspider>
I do
<manveru>
but back then the argument was... if you want to write fast programs, don't use ruby :)
<zenspider>
I also always prefer to put my nominal case first, and sometimes that is best said with unless.
imajes has quit [Excess Flood]
<whitequark>
I personally only disagree with 80-column limit and the strange last statement about regexps
imajes has joined #ruby-lang
<whitequark>
unless/else is sometimes idiomatic, but often not
<havenn>
ryanf: Unless you drop your gun I'll kill the hostage, else(wise) I'll just walk away.
<havenn>
ryanf: Okay, I suck at clear hostage-taking...
<ryanf>
:)
<whitequark>
havenn: people come from Python and write crappy code all around. this IS difficult for some, and this leads to nasty bugs.
apeiron has joined #ruby-lang
apeiron has left #ruby-lang [#ruby-lang]
<whitequark>
having partly cleaned a project from tens of misused and/or's, I'll never ever will recommend using that to anyone.
<havenn>
whitequark: I guess I think it easier to memorize precedence than to avoid the language implementation. I'm more comfy with 'avoid unless you understand' than 'offlimits'.
<zenspider>
I like and/or personally.
<ddd>
I don't understand the "Never leave trailing whitespace." but I almost always end a file with an extra return. Though I do it because I think it 'looks' better (and easier to just start typing when you move to the end of the file) though thats clearly a subjective opinion.
<whitequark>
ddd: trailing return isn't trailing whitespace, and is considered a good practice by some
<ddd>
oh you mean like a space or a tab
justinseiter has quit [Ping timeout: 260 seconds]
<ddd>
got it
<anannie>
Does anyone know about a set of programming exercises I can do to get my programming chops right? Is there perhaps a list of apps I can build inductively, each more complex than the last?
tenderlove has quit [Remote host closed the connection]
qpingu has quit [Quit: Leaving.]
<ddd>
am I wrong for putting a blank line after my context "blah" do lines in my specs, but *not* in my it "blah" do lines?
<andrewvos>
yes
<zenspider>
anannie: you can try out the ruby koans or project euler
Dreamer3 has joined #ruby-lang
<zenspider>
anannie: wha is your current programming experience?
<zenspider>
what... gah
<anannie>
zenspider: Almost nil. I'm up to Zed Shaw's Learn Ruby The Hard Way
qpingu has joined #ruby-lang
<zenspider>
anannie: you might want to take a look at chris pine's book then
<havenn>
anannie: tryruby.org is fun, and codecademy just put out a Ruby track though I haven't tried it
<anannie>
zenspider: Found it. I feel the urge to build things, will it help me get there?
<anannie>
havenn: I chose Zed Shaw's book instead because it seemed like a more gradual introduction to things and therefore more thorough
postmodern has joined #ruby-lang
<ddd>
andrewvos: why? like I put blank line after my class MyClass line but not in my def my_method line but I do after end for that def and for the class. (just looks 'neater' to me) and in the context "blah" do it also highlights the it blocks' indentation a bit. just my take on it. looks neater and cleaner to me.
lcdhoffman has quit [Quit: lcdhoffman]
rue|w has quit [Remote host closed the connection]
<anannie>
zenspider: Did you write the zombie simulation?
<havenn>
anannie: The Hard Way often isn't idiomatic Ruby, but it is valid Ruby. I'd consider it as confusing as _why's Poignant Guide but less poignant or poetic.
tenderlove has joined #ruby-lang
<havenn>
anannie: And no soundtrack!
<anannie>
zenspider: One night I was trying to find some code to read and for fun I tried to search up a zombie simulator and lo and behold it existed. That made my night and suddenly programming seemed funny.
<havenn>
anannie: zenspider is of seattle.rb fame, the envylabs guys did zombie labs (if that is what you mean, for all I know zenspider simulates zombies as well >.>): http://railsforzombies.org/ vs http://www.seattlerb.org/
corundum_ has quit [Quit: okay bye]
<anannie>
havenn: What do you think I should use instead?
corundum has joined #ruby-lang
<drbrain>
I had to restart corundum, it wouldn't respond to my nick command ☹
Madis has quit [Read error: Connection reset by peer]
<anannie>
havenn: It's interesting how people have conflicting recommendations
Madis has joined #ruby-lang
<anannie>
havenn: but with a large enough sample size you can grok what the zeitgeist is and learn from there.
<havenn>
anannie: If you know another scripting language, I can see how it'd be a parachute. From scratch, I'd prefer straight idiomatic Ruby.
<anannie>
havenn: I don't know how to program at all.
chin-tastic has quit [Ping timeout: 246 seconds]
<anannie>
havenn: Let's say I'm a tabula rasa
<anannie>
(I actually don't and I have no opinions right now. I'm unbiased.)
<anannie>
All I've done is go through Zed Shaw's book and tried to get a handle on the language
imajes has quit [Excess Flood]
imajes has joined #ruby-lang
woollyams has quit [Quit: Computer has gone to sleep.]
<havenn>
anannie: I agree with Ruby Koans recommendation (online version is easier but less realistic testing). PS - Would be nice to have a MiniTest version of Ruby Koans.
<havenn>
Seems fairly easy to port?
<havenn>
I've always been bothered how the expected and actual seem reversed in Koans.
<andrewvos>
ddd: That's what indentation is for. You'll get used to it eventually.
<andrewvos>
Do put spaces after 'end' though.
<erikh>
wasn't ruby koans in minitest originally? at least, I seem to remember it being that wya.
<erikh>
maybe I'm thinking of rails for zombies
ivanoats has quit [Remote host closed the connection]
<andrewvos>
erikh: I think it used Test::Unit
<havenn>
erikh: Yeah, I think Koans has always been Test::Unit, I started porting to MiniTest but never got far.
ivanoats has joined #ruby-lang
ivanoats has quit [Changing host]
ivanoats has joined #ruby-lang
<andrewvos>
erikh: Or even its own test code.
<andrewvos>
havenn: You wrote koans?
<havenn>
erikh: Naw, just Test::Unit that works 1.8 && 1.9
<havenn>
andrewvos: Nooo, I didn't.
thatdutchguy has quit [Remote host closed the connection]
thatdutchguy has joined #ruby-lang
<havenn>
andrewvos: Jim Weirich & Joe O'Brien
<andrewvos>
Oh ok
<erikh>
ah
<andrewvos>
Is Jim the Rake guy?
<erikh>
yes
<andrewvos>
Oh
<andrewvos>
Why is it that test people make such cool stuff? I wish I made cool stuff.
<andrewvos>
test=these
<andrewvos>
Wow, that could have been an argument on TDD. Averted.
<erikh>
well, T::U actually comes from smalltalk and rake has been done numerous times in other languages, ruby is really the star there
<erikh>
I still wonder if the tsort standard lib existed before or after rake and if before, why it was not used
<andrewvos>
No I mean in general.
<drbrain>
erikh: before
<erikh>
why didn't he use tsort?
<erikh>
mostly curious, not criticizing.
thatdutchguy has quit [Ping timeout: 260 seconds]
josh^ has joined #ruby-lang
wyhaines has joined #ruby-lang
havenn has quit [Remote host closed the connection]
<drbrain>
I don't know, he didn't use it for RubyGems either
<drbrain>
likely he didn't know it was there and knows how to do a topological sort from memory
wyhaines has quit [Remote host closed the connection]
imajes has quit [Excess Flood]
imajes has joined #ruby-lang
<zenspider>
anannie: yeah. I did a zombie epidemic simulator in ruby w/ gosu (and SDL before that)
jamjam has quit [Ping timeout: 245 seconds]
mrsolo_ has joined #ruby-lang
<anannie>
zenspider: :D Thanks for making that, it somehow inspired me. I want to get to the point where I can whip together a zombie epidemic simulator at whim
benanne has quit [Quit: kbai]
Carnage\ has quit [Ping timeout: 260 seconds]
thatdutchguy has joined #ruby-lang
woollyams has joined #ruby-lang
mrsolo has quit [Ping timeout: 245 seconds]
<erikh>
drbrain: fair 'nuff
_nitti has joined #ruby-lang
flebel has quit [Read error: Operation timed out]
havenn has joined #ruby-lang
flebel has joined #ruby-lang
_nitti has quit [Ping timeout: 246 seconds]
<richardjortega>
how would i convert the UTC time of "1349997021" to a readable time string in ruby?
<matti>
richardjortega: Time.at
<richardjortega>
matti: thank you so much!!!
mistergibson has joined #ruby-lang
<mistergibson>
I'm messing with the include statement. Question: is there any limit to how many nested module elements I can have in This::Path::To::My::Module::For::MixIn ?
<mistergibson>
because oddly enough, and although no syntax errors are thrown - the methods do not show up in the mixed-in namespace ...
darix has quit [Ping timeout: 260 seconds]
darix has joined #ruby-lang
nertzy has joined #ruby-lang
gsav has joined #ruby-lang
thatdutchguy has quit [Remote host closed the connection]
havenn has quit [Remote host closed the connection]
bfreeman has quit [Quit: bfreeman]
kjr has quit [Quit: kjr]
datanoise has quit [Ping timeout: 256 seconds]
<matti>
:>
<mistergibson>
ah, answered my own q ... cheers all :)
Guest604 has joined #ruby-lang
<zenspider>
anannie: no prob
joast has quit [Quit: Leaving.]
datanoise has joined #ruby-lang
rue|w has joined #ruby-lang
joast has joined #ruby-lang
rue|w has quit [Ping timeout: 260 seconds]
mistym has joined #ruby-lang
brianpWins has quit [Quit: brianpWins]
flebel has quit [Read error: Connection reset by peer]