<bnagy>
rubyinstaller: ok, your username changed at some point
uris has joined #ruby
<bnagy>
no idea how, but your home dir isn't your home dir anymore
<bnagy>
do you have two users with almost identical names?
<bnagy>
ahhh depending how you sudo it won't change ~
<bnagy>
open a new terminal
<bnagy>
and see if you username is williammurphy now
Sheehan has joined #ruby
<bnagy>
I bet you created an admin user or something with a slightly different username
maletor has quit [Quit: Computer has gone to sleep.]
stephenjudkins has joined #ruby
jenrzzz-mac has joined #ruby
<bnagy>
...actually ~williamtmurphy is owned by williammurphy... that's weird in any universe... but anyway, open a new terminal and we should see who you really are
<bnagy>
SCOOBY DOO MOMENT
<dsimon>
it's always the park janitor
<bnagy>
no shit, right? Or the creepy guy that owns the big house?
albemuth has joined #ruby
exchgr is now known as ex
ex is now known as exchgr
<bnagy>
it's like old pulp fuction from the 30s. Plot plot plot, guns, hardboiled cop, turns out the dago did it the end
<dsimon>
yeah
<dsimon>
i mean, scooby doo was not a bad show
<dsimon>
but it only had one episode
<bnagy>
two, counting the porn version
<dsimon>
damn you, rule 34!
<rubyinstaller>
yeah, that's weird
L-----D has joined #ruby
<rubyinstaller>
I just restarted terminal and did "whoami; cd ~; stat ." and got: "williamtmurphy," "234881026 421659 drwxr-xr-x 42 williammurphy staff 0 1428 "Jun 7 21:30:32 2012" "Jun 6 22:37:31 2012" "Jun 6 22:37:31 2012" "Jan 8 15:33:16 2012" 4096 0 0 ."
<bnagy>
rubyinstaller: are you teleoperating this mac, which is physically at the international space station?
<rubyinstaller>
Damn, I'm gonna restart. See you guys in a sec.
rubyinstaller has quit [Quit: Page closed]
<bnagy>
ave atque vale
<bnagy>
... "ok looks like it didn't come up clean, next shuttle is in August, so..."
simao has joined #ruby
<dsimon>
nothing quite like trying to run vim remotely over ssh while dealing with appreciable lightspeed delay
PragCypher has joined #ruby
tomb__ has quit [Quit: Computer has gone to sleep.]
pk1001100011 has quit [Quit: Burn your gods and kill the king; Subjugate your suffering; Dead heart, in a dead world]
shtirlic has quit [Read error: Connection reset by peer]
<EstanislaoStanis>
How would I change a variable's value inside an object when I'm outside that object?
<bnagy>
ok
Targen has joined #ruby
<heftig>
instance_variable_set or instance_eval/exec
<bnagy>
EstanislaoStanis: usually you'd put variables you might want to change in an instance variable in the object, and access it from the outside with setter methods
cousine has quit [Remote host closed the connection]
<bnagy>
rubyinstaller: um. Right. I don't know wtf was done to your machine
<bnagy>
which username do you log in as?
<rubyinstaller>
EstanislaoStanis: I think you can access that variable as object.var, as long as you created an accessor/setter method for var, or used the attar_accessor function in the object's class defn.
<rubyinstaller>
williamtmurphy
havenn has joined #ruby
<bnagy>
ok. I don't know how to change a user's home dir (or how it was done to you), allow me to consult the oracle
krusty_ar has quit [Read error: Connection reset by peer]
zeromodulus has quit [Remote host closed the connection]
benatwork has quit [Ping timeout: 246 seconds]
mikepack has joined #ruby
fivetwentysix has joined #ruby
krusty_ar has joined #ruby
<Boohbah>
man usermod
<banisterfiend>
Boohbah: sup boob
<Boohbah>
usermod -d /home/newdir username
<Boohbah>
banisterfiend: hey there
chessguy has quit [Remote host closed the connection]
<Boohbah>
i'm still watching your pry repo, only under a different github account :)
<bnagy>
Boohbah: not on osx
<Boohbah>
bnagy: oh, sorry
Gavilan has joined #ruby
<banisterfiend>
Boohbah: bnagy is a huge pry fan too
<bnagy>
rubyinstaller: everything I can think of off the top of my head is slightly destructive to or the other of those users
<banisterfiend>
in fact it's all he really likes to talk about
<bnagy>
davidokner: interpreted or compiled was a useful distinction in 1989, it's not any more
<davidokner>
wmoxam, ok. And, it says compiled to byte code and JIT compiled to machine code I think anyway.
<Gavilan>
bnagy: Why is that?
burgestrand has quit [Ping timeout: 260 seconds]
<davidokner>
I wouldn't want to do any really low level stuff that needed to be super efficient anyway. I like higher level stuff so a higher level language is best for me, even for games I guess.
<davidokner>
I'm about to check out RubyGame.
<bnagy>
Gavilan: because of the bits in between those two poles
<davidokner>
I couldn't find a book on RubyGame like I could on PyGame.
<bnagy>
which are where just about every scripty language sit
burgestrand has joined #ruby
<davidokner>
Having a self contained file is good though, but I don't have to compile to do that.
Yarou has joined #ruby
<bnagy>
Gavilan: ie it's a false dichotomy
<Gavilan>
bnagy: mmm, okay...
uris has quit [Quit: leaving]
yannis has joined #ruby
theRoUS is now known as theRoUS|abest
mrdtt has quit [Ping timeout: 245 seconds]
<EstanislaoStanis>
bnagy: So is an ivar an instance variable? I thought that's what @... was. What's the difference between using initialize or just @...?
<EstanislaoStanis>
I know initialize is called when an object is created.
mrdtt has joined #ruby
<bnagy>
EstanislaoStanis: yeah, @ivar is an instance variable, but when you define one 'naked' inside a class like that you're actually declaring a class ivar. When you declare it in initialize it gets run in the context of the instance, so it's a 'normal' ivar
<bnagy>
EstanislaoStanis: best thing to do is to inspect self at various points, to get the hang of what's going on
siksia has quit [Ping timeout: 245 seconds]
<bnagy>
s/best/one possible/
r0bby has joined #ruby
<EstanislaoStanis>
inspect self? like just put self.inspect in my code?
noodletraveler has quit [Quit: leaving]
shtirlic_ has quit [Read error: Connection reset by peer]
<bnagy>
yeah or 'p self'
<bnagy>
just for your own edification
adeponte has joined #ruby
shtirlic has joined #ruby
imami|afk is now known as banseljaj
<EstanislaoStanis>
p self == puts self ?
<bnagy>
no it's like puts self.inspect
mrdtt has quit [Client Quit]
<EstanislaoStanis>
Oh, ok.
td123 has quit [Read error: Connection reset by peer]
robbyoconnor has quit [Ping timeout: 245 seconds]
td123 has joined #ruby
<EstanislaoStanis>
Ok, so when I put @var 'naked' inside a class is it like putting @@var inside an object?
simao has joined #ruby
simao has quit [Changing host]
simao has joined #ruby
fayimora has quit [Ping timeout: 264 seconds]
mrdtt has joined #ruby
siksia has joined #ruby
fayimora has joined #ruby
Doppp has joined #ruby
fayimora has quit [Client Quit]
rouss has joined #ruby
EstanislaoStanis is now known as EstanislaoStan
<bnagy>
no
liluo has quit [Remote host closed the connection]
<bnagy>
@@vars are different again, just forget they exist
azm has joined #ruby
azm has quit [Changing host]
azm has joined #ruby
simao has quit [Ping timeout: 265 seconds]
<EstanislaoStan>
Hmm, I'm still confused. All I know right now is that I should put 'naked' class level variables in an initialize method, but not why. Do you know anywhere this is documented that I could take a look at?
<bnagy>
you need to work through a tutorial or something
<bnagy>
there are millions
r0bby is now known as robbyoconnor
cj3kim has joined #ruby
<EstanislaoStan>
Yeah, I just wasn't sure what to search for that would pull one up.
Tricks has quit [Read error: Connection reset by peer]
<bnagy>
try 'cute pictures of otters'
<EstanislaoStan>
So just relavant terms, ok.
Tricks has joined #ruby
niku4i has quit [Remote host closed the connection]
<bnagy>
the most popular ones are probably learn to program and learn ruby the hard way
<bnagy>
not counting dead tree versions
mikepack has quit [Read error: Connection reset by peer]
mikepack has joined #ruby
<baniste__>
bnagy: which book did u learn from nags
khakimov has joined #ruby
libertyprime has quit [Quit: Lost terminal]
libertyprime has joined #ruby
benatwork has joined #ruby
fungoat has quit [Quit: fungoat]
BodieSoft has quit [Quit: Page closed]
Tricks has quit [Read error: Connection reset by peer]
<bnagy>
none
Johhny7892 has joined #ruby
<otters>
bnagy: I do *not* put photographs of myself on the internet
<bnagy>
although when I was learning I think pickaxe was kind of the only option
<Johhny7892>
Just a super quick ri question. I like to work offline sometimes, so ri can be much-needed. It seems for me though it doesn't show some of the methods. For example, it shows Array's methods added by Active Support but nothing else
benatwork has quit [Ping timeout: 246 seconds]
mikeycgto has quit [Remote host closed the connection]
<bnagy>
otters: rule 34
<otters>
technically true
<otters>
but I haven't put it *on the internet*
josefig has joined #ruby
josefig has joined #ruby
josefig has quit [Changing host]
nooodl has joined #ruby
nazty has joined #ruby
dv310p3r has joined #ruby
<Johhny7892>
Maybe it just never got setup properly.
<baniste__>
Johhny7892: i like to use pry for reading docs offline. Yeah.
L-----D has quit [Quit: Leaving]
ZachBeta has quit [Quit: Computer has gone to sleep.]
seanstickle has quit [Quit: Nihil sub sole novum]
<bnagy>
s/(pry).*/\1/
<baniste__>
bnagy: hey there.
maletor has joined #ruby
<Johhny7892>
Never tried it, but I'll give it a look
jenrzzz-mac has joined #ruby
azm has quit [Ping timeout: 252 seconds]
<pradeepto>
def << (item) items << item; end <---what does this construct mean?
<baniste__>
Johhny7892: gem install pry pry-doc
<pradeepto>
<< is a method that adds item to the items?
youdonotexist has quit [Read error: Connection reset by peer]
<pradeepto>
is that correct?
<baniste__>
Johhny7892: you'll need pry-doc for core docs/source, and u view it using: show-doc Array#<< (for example)
youdonotexist has joined #ruby
libertyprime has quit [Quit: Lost terminal]
<Johhny7892>
pradeepto: Yes
<pradeepto>
thanks.
libertyprime has joined #ruby
<Johhny7892>
baniste__: Sounds good thanks
<baniste__>
Johhny7892: cool thing about that is u can also go: show-source Array#<< and see the actual C source
mohits has quit [Ping timeout: 246 seconds]
<davidokner>
Does "Gem Install RubyGame" install all dependancies?
<baniste__>
davidokner: dont use rubygame
<baniste__>
davidokner: use gosu
<baniste__>
or ray
<davidokner>
I'm trying to figure out if I should use gem to install or the macpack download they have.
<davidokner>
Why not, use Gosu?
<Johhny7892>
Do you use it for debugging too? I was wondering what most people use for debugging ruby
<baniste__>
davidokner: rubygame is defunkt
<baniste__>
Johhny7892: i use it for debugging too. It's ok for debugging + irb replacement
<davidokner>
There is an update posted for RubyGame on July 2011
<baniste__>
davidokner: 1 year ago? :)
csprite has quit [Quit: ChatZilla 0.9.88.2 [Firefox 12.0/20120420145725]]
<baniste__>
davidokner: gosu is updated almost weekly
<davidokner>
So Gosu is the laternative?
<davidokner>
Ok, do I need updates? Can I find enough tutorials for Gosu?
libertyprime has quit [Client Quit]
<baniste__>
davidokner: gosu is the most active ruby game framework, it has the most resources and tutorials etc
<Azure>
q: How would I go through a hash that has hashes as values and those hashes have hashes with values etc., and process/map those values?
<baniste__>
davidokner: libgosu.org
<davidokner>
oh ok
libertyprime has joined #ruby
<davidokner>
I just installed the RubyGame Gem.
<davidokner>
Can I uninstall it?
<baniste__>
davidokner: see if u can figure out how :)
<davidokner>
there is an uninstall command and it worked
<baniste__>
good boy
<davidokner>
that was easy
<Johhny7892>
Sometimes I have issues with how Ruby names things - like what is 'tr'? But that one is quite aptly named :D
adeponte has left #ruby [#ruby]
<eam>
Johhny7892: the unix command tr
schickung has quit [Quit: schickung]
<Johhny7892>
Well, that's what I get for using Windows ha ha
<Azure>
An example of what I'm working with: (very simplified, not including normal integers or other objects) http://pastie.org/4048156
* Azure
can supply the whole output if needed.
<davidokner>
Have any indie games been made with Gosu?
<baniste__>
bnagy: hey nags
<baniste__>
davidokner: yes
<Johhny7892>
baniste, thanks pry works great
<baniste__>
Johhny7892: you can type: show-source TheClass#method_name to view the source for most methods too
<davidokner>
There is an indie game called "Fez"
<baniste__>
davidokner: no one is interested, go tell your mom
wmoxam has quit [Ping timeout: 246 seconds]
hynkle has joined #ruby
kenneth has quit [Quit: kenneth]
looopy has joined #ruby
albemuth has joined #ruby
jenrzzz-mac has quit [Quit: jenrzzz-mac]
advorak_ has joined #ruby
siksia has quit [Ping timeout: 265 seconds]
ryanf has quit [Quit: leaving]
mikepack has quit [Remote host closed the connection]
AlbireoX`Laptop has quit [Remote host closed the connection]
minijupe has joined #ruby
savage- has joined #ruby
<davidokner>
Ok, thanks
davidokner has left #ruby [#ruby]
nilg` has joined #ruby
siksia has joined #ruby
williamcotton has quit [Quit: williamcotton]
rippa has joined #ruby
shtirlic has quit [Read error: Connection reset by peer]
zeromodulus has joined #ruby
shtirlic has joined #ruby
lxsameer has joined #ruby
lxsameer has joined #ruby
lxsameer has quit [Changing host]
lxsameer has quit [Client Quit]
PragCypher has quit [Read error: Connection reset by peer]
lxsameer has joined #ruby
lxsameer has quit [Changing host]
lxsameer has joined #ruby
PragCypher has joined #ruby
IrishGringo has quit [Quit: ChatZilla 0.9.88.2 [Firefox 12.0/20120420145725]]
<bnagy>
Azure: if it's a fixed depth, you can just do it 'manually' (you can call map inside another map), otherwise write a recursive function
lxsameer has quit [Client Quit]
hynkle has quit [Quit: hynkle]
stephenjudkins has quit [Read error: Connection reset by peer]
stephenjudkins has joined #ruby
IrishGringo has joined #ruby
akem has joined #ruby
akem has quit [Changing host]
akem has joined #ruby
krusty_ar has quit [Ping timeout: 244 seconds]
itnomad has quit [Quit: Leaving]
Karmaon has quit [Read error: Connection reset by peer]
stephenjudkins has quit [Read error: Connection reset by peer]
vitor-br has quit [Quit: Saindo]
Karmaon has joined #ruby
Johhny7892 has quit [Quit: Page closed]
IrishGringo has quit [Quit: ChatZilla 0.9.88.2 [Firefox 12.0/20120420145725]]
mohits has joined #ruby
IrishGringo has joined #ruby
mohits has quit [Changing host]
mohits has joined #ruby
Bonkers has joined #ruby
<Bonkers>
you would think this is easy, but somehow I still have not found a good way, how can I create a DateTime or Time object that is for a specific date, time, and timezone? Say, 5/1/2011, 12:34pm in America/Los_Angeles time.
mayankkohaley has joined #ruby
ringotwo has quit [Remote host closed the connection]
L-----D has joined #ruby
stephenjudkins has joined #ruby
zombor has quit [Remote host closed the connection]
stephenjudkins has quit [Read error: Connection reset by peer]
stephenjudkins has joined #ruby
tonini has joined #ruby
ABK has joined #ruby
crankycoder has quit [Remote host closed the connection]
stephenjudkins has quit [Read error: Connection reset by peer]
Solnse has joined #ruby
stephenjudkins has joined #ruby
nirakara has joined #ruby
fantazo has joined #ruby
stephenjudkins has quit [Read error: Connection reset by peer]
stephenjudkins has joined #ruby
digitalcakestudi has quit [Ping timeout: 244 seconds]
simao has joined #ruby
nipra has joined #ruby
stephenjudkins has quit [Read error: Connection reset by peer]
quest88 has quit [Quit: quest88]
stephenjudkins has joined #ruby
youdonotexist has quit [Quit: youdonotexist]
simao has quit [Ping timeout: 265 seconds]
kenperkins has joined #ruby
apeiros_ has joined #ruby
yoklov has quit [Quit: bye!]
yxhuvud has joined #ruby
stephenjudkins has quit [Read error: Connection reset by peer]
brianpWins has joined #ruby
apeiros_ has quit [Remote host closed the connection]
USCMonstar has joined #ruby
<USCMonstar>
hi - i have a really dumb question that i'm hoping to get help on
savage- has quit [Remote host closed the connection]
bengl has left #ruby [#ruby]
jenrzzz-mac has joined #ruby
josefig has quit [Quit: Computer has gone to sleep.]
igotnolegs has quit [Quit: Computer has gone to sleep.]
psycho_one has joined #ruby
abionic has joined #ruby
minijupe has quit [Quit: minijupe]
baniste__ has quit [Ping timeout: 245 seconds]
froy has quit [Ping timeout: 245 seconds]
stephenjudkins has joined #ruby
USCMonstar has quit [Quit: Page closed]
niku4i has joined #ruby
froy has joined #ruby
ABK has quit [Ping timeout: 252 seconds]
spider_man_415 has joined #ruby
<spider_man_415>
hi - hoping for some help on this: class Person def initialize(first_name, last_name, age) # instance variables @first_name = first_name @last_name = last_name @age = age end def first_name puts @first_name end def last_name puts @last_name end def age puts @age end end p = Person.new("spider","man",25) p.first_name + p.last_name + " i
uxp has quit [Ping timeout: 276 seconds]
<spider_man_415>
after creating the Person class, why can't I do this: p.first_name + p.last_name
<spider_man_415>
i'm getting this error message "undefined method `+' for nil:NilClass (NoMethodError)"
justsee has quit [Quit: Leaving...]
niku4i has quit [Ping timeout: 245 seconds]
benatwork has joined #ruby
lkba has quit [Ping timeout: 246 seconds]
<bnagy>
spider_man_415: because your first_name method returns nil
<bnagy>
also, use pastie.org or gist or something, please don't paste that kind of stuff in channel
tvw has joined #ruby
uxp has joined #ruby
justsee has joined #ruby
justsee has quit [Client Quit]
<spider_man_415>
ok - i'll check out wwhat pastie or gist is. but my p.first_name method doesn't return nil, it returns the "spider" argument after I instantiate p = Person.new("spider","man",25)
shadoi has quit [Quit: Leaving.]
<spider_man_415>
pastie: hi
<spider_man_415>
pastie: hi!
justsee has joined #ruby
justsee has quit [Read error: Connection reset by peer]
benatwork has quit [Ping timeout: 246 seconds]
L-----D has quit [Quit: Leaving]
<spider_man_415>
bnagy: ok - i'll check out wwhat pastie or gist is. but my p.first_name method doesn't return nil, it returns the "spider" argument after I instantiate p = Person.new("spider","man",25)
a_a_g has joined #ruby
Solnse has quit [Read error: Connection reset by peer]
<burgestrand>
spider_man_415: it does, that’s what the error message is telling you
Solnse has joined #ruby
dhruvasagar has joined #ruby
<spider_man_415>
burgestrand: what should i do then? i pasted the code here: http://codetidy.com/2884/ can you please let me know what I am doing incorrectly?
ABK_ has joined #ruby
abionic has quit [Ping timeout: 240 seconds]
Xpl01t has joined #ruby
albemuth has quit [Quit: Computer has gone to sleep.]
banisterfiend has joined #ruby
nirakara has quit [Ping timeout: 244 seconds]
EstanislaoStan has quit []
shtirlic has quit [Read error: Connection reset by peer]
shtirlic has joined #ruby
shtirlic has quit [Read error: Connection reset by peer]
shtirlic has joined #ruby
spider_man_415 has quit [Ping timeout: 245 seconds]
artOfWar_ has quit [Ping timeout: 260 seconds]
<godzirra>
I'm still having trouble with Guard. I'm not sure what I'm doing wrong here. :(
<godzirra>
I'm going to paste some code.
cezar has joined #ruby
<godzirra>
Can anyone take a look at my pastie and tell me what I'm doing wrong? http://pastie.org/4048538 ... Its not automatically reloading when I run guard start, nor is it giving me notifications in Growl. I installed the growl, guard, guard-rspec and guard-livereload gem.
cezar has quit [Client Quit]
ipoval has quit [Quit: ipoval]
ipoval has joined #ruby
davidcelis has quit [Quit: K-Lined]
<godzirra>
Actually the growl part I have working. Just not sure why its not autoreloading when I make a change.
ryanf_ has joined #ruby
ryanf has quit [Disconnected by services]
ryanf_ is now known as ryanf
ryanf is now known as ryanf_
ryanf_ is now known as ryanf
nirakara has joined #ruby
burgestrand has quit [Quit: Leaving.]
kenperkins has quit [Quit: Computer has gone to sleep.]
stephenjudkins has quit [Read error: Connection reset by peer]
ZifreCL has quit [Ping timeout: 245 seconds]
keanehsiao has joined #ruby
pygospa has quit [Disconnected by services]
TheRealPygo has joined #ruby
<Muz>
tl:dr
mrdtt has quit [Quit: Leaving]
airhorns has quit [Quit: airhorns]
tatsuya_o has quit [Remote host closed the connection]
SegFaultAX has joined #ruby
fridim_ has joined #ruby
mikepack has quit [Remote host closed the connection]
twodollarz has joined #ruby
stephenjudkins has joined #ruby
simao has joined #ruby
socomm has quit [Read error: Connection reset by peer]
socomm has joined #ruby
Ammar01 has joined #ruby
keanehsiao has quit [Quit: keanehsiao]
rdctnst has quit [Quit: Leaving]
Bosma has quit [Ping timeout: 245 seconds]
khakimov has quit [Quit: Computer has gone to sleep.]
poga has joined #ruby
maletor has joined #ruby
pk1001100011 has joined #ruby
simao has quit [Ping timeout: 265 seconds]
Ammar_iD has quit [Ping timeout: 245 seconds]
cyong has quit [Ping timeout: 248 seconds]
ryanf has quit [Ping timeout: 244 seconds]
fantazo has quit [Remote host closed the connection]
poga has quit [Remote host closed the connection]
sako has quit [Ping timeout: 245 seconds]
x0F has quit [Disconnected by services]
x0F_ has joined #ruby
x0F_ is now known as x0F
darkc0met has joined #ruby
tatsuya_o has joined #ruby
cj3kim has quit [Quit: Leaving]
ukd1 has joined #ruby
<ukd1>
hey guys - I'm getting a strange error - "/Users/russ/Sites/bench/test.rb:17: [BUG] rb_gc_mark(): unknown data type 0x19(0x7f932397bbb0) non object" - full output here http://pastie.org/4048744
stewart_ has quit [Ping timeout: 252 seconds]
looopy has quit [Remote host closed the connection]
billiamii has quit [Quit: Leaving]
nikhil_ has quit [Quit: This computer has gone to sleep]
stewart_ has joined #ruby
hoelzro|away is now known as hoelzro
andrewhl has quit [Remote host closed the connection]
siksia has quit [Ping timeout: 256 seconds]
mneorr has quit [Ping timeout: 246 seconds]
tatsuya_o has quit [Remote host closed the connection]
gilead has joined #ruby
ipoval has quit [Quit: ipoval]
havenn has quit [Remote host closed the connection]
Targen has quit [Ping timeout: 246 seconds]
siksia has joined #ruby
zommi has quit [Remote host closed the connection]
banseljaj is now known as imami|afk
dnyy has joined #ruby
mogstad has left #ruby [#ruby]
elhu has joined #ruby
ephemerian has joined #ruby
ibash has quit [Quit: ibash]
<_br_>
ukd1: did you try to switch vm? e.g. if you run on 1.9.2 do you get the same error?
mneorr has joined #ruby
vectorshelve has quit [Ping timeout: 245 seconds]
<ukd1>
_br_ not yet, will try now
emmanuelux has quit [Remote host closed the connection]
mdw_ has quit [Remote host closed the connection]
a_a_g has quit [Quit: Leaving.]
mdw has joined #ruby
a_a_g has joined #ruby
Advocation has joined #ruby
ronniy has joined #ruby
jimeh2 has joined #ruby
ringotwo has quit [Remote host closed the connection]
mdw has quit [Ping timeout: 252 seconds]
qwerxy has joined #ruby
Axsuul has quit [Remote host closed the connection]
ringotwo has joined #ruby
CheeToS has quit [Ping timeout: 244 seconds]
Advocation has quit [Read error: Connection reset by peer]
Advocation has joined #ruby
benatwork has joined #ruby
hynkle has quit [Ping timeout: 244 seconds]
cameron__ has joined #ruby
arturaz has joined #ruby
Solnse is now known as crepes
TheHunter_1039 has quit [Quit: TheHunter_1039]
benatwork has quit [Ping timeout: 246 seconds]
maletor has quit [Quit: Computer has gone to sleep.]
zz_chrismcg is now known as chrismcg
MrGando_ has joined #ruby
Eldariof-ru has joined #ruby
MrGando has quit [Ping timeout: 265 seconds]
skinny_much has joined #ruby
<ukd1>
_br_ btw, that worked
hynkle has joined #ruby
<ukd1>
thanks
jackiechan0 has joined #ruby
<_br_>
ukd1: I'm not sure, but you might want to submit this pastie to the bugtracker of ruby 1.9.3, I'm suspecting you found a bug
<_br_>
ukd1: welcome
<ukd1>
_br_ ok - i will
<ukd1>
it's kinda frustrating as it's not obvious what it was
<ukd1>
meh
<ukd1>
was it just a guess from your end?
Xpl01t has quit []
<_br_>
ukd1: well, you use a recent 1.9.3 on mac and get a c backtrace. For me that spells vm issue.
sameerynho has quit [Ping timeout: 244 seconds]
BiHi has joined #ruby
_iori_ has joined #ruby
iori has quit [Read error: Connection reset by peer]
iori_ has joined #ruby
demian`_ has quit [Quit: demian`_]
recursive has joined #ruby
[Neurotic] has quit [Quit: Leaving]
<recursive>
im terrible at databases, if i i have id autoincrement on a mysql table column, before i commit, can i set the id using `insert into table(id,name) values(1,'some name') -- also will this reset the next available id to 3 instead of 2 as it normally would have been if i did not specify the id?
d3c has quit [Quit: Sleep]
_iori_ has quit [Ping timeout: 240 seconds]
Advocation has quit [Ping timeout: 265 seconds]
<hoelzro>
recursive: you can set the ID
<hoelzro>
I'm pretty sure that it won't reset the next available id
<hoelzro>
but don't count on that =)
zeromodulus has quit [Remote host closed the connection]
d3c has joined #ruby
schickung has joined #ruby
DuoSRX has joined #ruby
zeromodulus has joined #ruby
<recursive>
hoelzro: ill check it out, not that it really matters, but wanted to know
abionic has joined #ruby
crepes is now known as Solnse
indian has quit [Ping timeout: 252 seconds]
qwerxy has quit [Quit: offski]
sameerynho has joined #ruby
zeromodulus has quit [Ping timeout: 245 seconds]
lun_ has joined #ruby
perryh is now known as perryh_away
ABK_ has quit [Ping timeout: 265 seconds]
roolo has joined #ruby
mdw has joined #ruby
siksia has quit [Ping timeout: 260 seconds]
siksia has joined #ruby
MrGando_ has quit [Remote host closed the connection]
lun_ has quit [Quit: Lost terminal]
simao has joined #ruby
stewart_ has left #ruby [#ruby]
abionic has quit [Ping timeout: 248 seconds]
wlievens has joined #ruby
<recursive>
thanks man, worked
recursive has left #ruby [#ruby]
<wlievens>
I would like to get a Date object for today at 1 sec before midnight
<wlievens>
how would I go about that? I'm a ruby newbie
fserb has joined #ruby
bluOxigen has joined #ruby
<wlievens>
or, alternatively, I would like to compare dates (e.g. the <= operator) taking only the day/month/year into account
<bnagy>
Date?
<bnagy>
as opposed to DateTime
<wlievens>
I use Date.today
<wlievens>
does that return a Date or a DateTime?
<bnagy>
a Date
<wlievens>
hmm
<wlievens>
but if I do Date + 1.day
<wlievens>
I seem to get a DateTime
AlbireoX`Laptop has joined #ruby
<bnagy>
I have nfi where 1.day comes from, it's stupid
<bnagy>
must be rails insanity
<wlievens>
this is a rails app yes
<wlievens>
I found the 1.day code in an example piece of code for looping through dates
<wlievens>
Date.today indeed returns a Date
<wlievens>
hmmm NO
<wlievens>
it doesn't
<wlievens>
hmm it does, but its odd
<bnagy>
yeah it does
<wlievens>
oh god yes
<wlievens>
now I see my bug
<wlievens>
today is the end date, the object I start my loop from is a DateTime
<wlievens>
so my question is again: how can I convert a datetime to a date
tomb__ has joined #ruby
<bnagy>
.to_date
<wlievens>
thanks
dv310p3r has quit [Ping timeout: 246 seconds]
robotmay has joined #ruby
sameerynho has quit [Ping timeout: 244 seconds]
dv310p3r has joined #ruby
Guest8514 has joined #ruby
Nitrodist has joined #ruby
dnyy has quit [Remote host closed the connection]
Solnse has quit []
<Nitrodist>
has anyone extended RuntimeError non-trivially?
milestone has joined #ruby
<banisterfiend>
Nitrodist: in what sense
<Nitrodist>
like, I want the exception to capture a bunch of state for debugging -- specifically stuff from RestClient with the response, request, etc.
skinny_much has quit [Remote host closed the connection]
sameerynho has joined #ruby
<Nitrodist>
most of the stuff in libraries that I see is limited to just subclassing runtimeerror to differentiate the class..
Shahor has joined #ruby
<bnagy>
normally you'd subclass StandardError
d3c has quit [Read error: No route to host]
d3c has joined #ruby
<banisterfiend>
Nitrodist: well, i modify exception objects to carry around state for me
<banisterfiend>
but it can be pretty useful to hack exception objects from time to time
<Nitrodist>
yeah, this is useful
<Nitrodist>
I like reading code
<Nitrodist>
especially in gems that are awesome
Guest8514 is now known as davidw
davidw has quit [Changing host]
davidw has joined #ruby
FND has joined #ruby
arvidkahl has quit [Read error: Connection timed out]
arvidkahl has joined #ruby
cameron__ has quit [Read error: Connection reset by peer]
xnm has quit [Ping timeout: 246 seconds]
webusnix has joined #ruby
Helius has joined #ruby
maccosmo has joined #ruby
rouss has quit [Ping timeout: 252 seconds]
arvidkahl has quit [Read error: Operation timed out]
vlad_starkov has joined #ruby
<FND>
can anyone think of a reason for this confusion:
<FND>
my_foo.class # Foo
<FND>
my_foo.is_a? Foo # false
<FND>
my_foo.class.name # "Foo"
<FND>
my_foo.class == Foo # false
<banisterfiend>
FND: if the Foo constant was reassigned
<banisterfiend>
class Foo; end
<banisterfiend>
my_foo = Foo.new
<banisterfiend>
Foo = Class.new
<FND>
banisterfiend: yeah, I just checked object_id - they're different
<banisterfiend>
that will result in your equalities/inequalities holding
* FND
is very confused how that might have happened
<banisterfiend>
FND: grep the code for 'Foo ='
<banisterfiend>
or potentially Object.const_set(:Foo, Class.new)
lolmaus has joined #ruby
benatwork has joined #ruby
<bnagy>
shouldn't you get a constant reassigned warning, anyway?
<bnagy>
another option is a namespace conflict from two or more requires?
arvidkahl has joined #ruby
<FND>
I've already tried that, banisterfiend, but couldn't find anything - I suspect something's going awry in the unfathomable depths of Rails and DataMapper
<FND>
bnagy: I'm not getting any warning, don't see any potential for namespace conflicts either
* FND
sighs
<banisterfiend>
FND: cool :)
vlad_starkov has quit [Read error: Connection reset by peer]
tectonic has quit [Ping timeout: 244 seconds]
flype has joined #ruby
<banisterfiend>
FND: if you could set a watchpoint that would be pretty handy here
<banisterfiend>
im not sure if debugger supports watchpoints
Advocation has joined #ruby
jimeh2 has quit [Ping timeout: 248 seconds]
luckyruby has quit [Remote host closed the connection]
mfridh has joined #ruby
tectonic has joined #ruby
<FND>
banisterfiend: I'll have to read up on that, thanks
NEaRLy has joined #ruby
fivetwentysix has quit [Quit: fivetwentysix]
NEaRLy has quit [Remote host closed the connection]
Advocation has quit [Read error: Connection reset by peer]
strnx has quit [Excess Flood]
Advocation has joined #ruby
cantonic_ has joined #ruby
fmcgeough_ has joined #ruby
moosya_ has joined #ruby
maccosmo_ has joined #ruby
<charliesome>
FND: if you're using rails, then it could be that rails reloaded your class
Y_Ichiro_ has joined #ruby
Y_Ichiro_ has joined #ruby
strnx has joined #ruby
x0F_ has joined #ruby
x0F has quit [Disconnected by services]
siksia has quit [Ping timeout: 246 seconds]
cantonic has quit [Ping timeout: 246 seconds]
cantonic_ is now known as cantonic
x0F_ is now known as x0F
maccosmo has quit [Ping timeout: 244 seconds]
maccosmo_ is now known as maccosmo
zeromodulus has joined #ruby
simao has quit [Ping timeout: 265 seconds]
dcope_ has joined #ruby
<FND>
charliesome: yes, I suspect something like that as well - as it only seems to happen in development, not test mode
<charliesome>
FND: yeah that's your problem
starburs1 has joined #ruby
trebaum_ has joined #ruby
trebaum_ has quit [Changing host]
trebaum_ has joined #ruby
c0rn has joined #ruby
kaktus_ has joined #ruby
<FND>
charliesome: gracias
kkiero_ has joined #ruby
xkx_ has joined #ruby
ringotwo has quit [Remote host closed the connection]
ekaleido_ has joined #ruby
ozzloy_ has joined #ruby
LiquidIn1ect has joined #ruby
musl has quit [Read error: Connection reset by peer]
Y_Ichiro has quit [Quit: No Ping reply in 180 seconds.]
starburst has quit [Remote host closed the connection]
c0rn_ has quit [Remote host closed the connection]
xkx has quit [Remote host closed the connection]
kkiero has quit [Remote host closed the connection]
ozzloy has quit [Ping timeout: 260 seconds]
LiquidInsect has quit [Remote host closed the connection]
ekaleido has quit [Remote host closed the connection]
fmcgeough_ is now known as fmcgeough
arvidkahl has quit [Ping timeout: 244 seconds]
icooba has quit [Read error: Connection reset by peer]
siksia has joined #ruby
icooba has joined #ruby
Icehawk78 has quit [Ping timeout: 240 seconds]
qwerxy has joined #ruby
simao has joined #ruby
stepnem has joined #ruby
moted has quit [Ping timeout: 260 seconds]
Icehawk78 has joined #ruby
ahuman_ has joined #ruby
arvidkahl has joined #ruby
moted has joined #ruby
ahuman has quit [Ping timeout: 260 seconds]
zeromodulus has quit [Ping timeout: 245 seconds]
palmfrond has quit [Read error: Connection reset by peer]
musl has joined #ruby
PhilK has quit [Ping timeout: 260 seconds]
mrdtt has joined #ruby
palmfrond has joined #ruby
Araxia_ is now known as Araxia
hemanth has quit [Remote host closed the connection]
DuoSRX has quit [Ping timeout: 260 seconds]
Apocalypse has quit [Ping timeout: 260 seconds]
tonini has quit [Remote host closed the connection]
tomb__ is now known as _tomb
blacktulip has joined #ruby
bubu\a has joined #ruby
iaj_ is now known as iaj
sameerynho has quit [Quit: Leaving]
coolwaters has joined #ruby
mayankkohaley_ has joined #ruby
DuoSRX has joined #ruby
mayankkohaley has quit [Ping timeout: 252 seconds]
mayankkohaley_ is now known as mayankkohaley
Apocalypse has joined #ruby
PhilK has joined #ruby
AlbireoX`Laptop has quit [Remote host closed the connection]
atnight has joined #ruby
dhruvasagar has quit [Read error: Connection reset by peer]
seoaqua has joined #ruby
stephenjudkins has quit [Quit: stephenjudkins]
jenrzzz-mac has joined #ruby
dhruvasagar has joined #ruby
dr_bob has joined #ruby
piotr_ has joined #ruby
uris has joined #ruby
fserb has quit [Quit: ttyl]
n1x has joined #ruby
liluo has joined #ruby
n1x has left #ruby [#ruby]
_adeponte has joined #ruby
tk___ has joined #ruby
Foxandxss has joined #ruby
FND has left #ruby [#ruby]
kaneda_ has quit [Ping timeout: 248 seconds]
kaneda_ has joined #ruby
gioele has joined #ruby
liluo has quit [Remote host closed the connection]
recursive has joined #ruby
dwaynecrooks has joined #ruby
schickung has quit [Quit: schickung]
mrdtt has quit [Remote host closed the connection]
<gioele>
hi, I use `define_method` to do some metaprogramming inside modules that are then included inside a proper class (see <https://gist.github.com/2894800>). I would like to move all these metaprogramming methods to a single module to reduce code duplication, but it looks like I cannot include modules in modules, at least not in this case. Suggestions?
<recursive>
i have a rails app that is being run behind nginx-unicorn, the log files are stored at log/unicorn.stderr and log/unicorn.stdout. when an error occurs, a 404 page actually happens as an error is not thrown. so for example if i have something like `link_to nil.name, my_path` in a view, i will receive a 404 after about 30 seconds of time, there will also be no log entry until i kill -TERM the process in which case the log file
Kartagis has quit [Ping timeout: 246 seconds]
<shevy>
the rails guys are on #rubyonrails usually
Kartagis has joined #ruby
jackiechan0 has quit [Quit: Sto andando via]
cheater has quit [Ping timeout: 246 seconds]
jackiechan0 has joined #ruby
maasha has joined #ruby
vlad_starkov has joined #ruby
mrdtt has joined #ruby
<maasha>
Hey
<Nitrodist>
gioele: can you access it through its namespace?
fermion has joined #ruby
<maasha>
What is an efficient way to transform a hash so all keys (which are strings) are turned to symbols?
ringotwo has quit [Remote host closed the connection]
odinswand has quit [Quit: Lost terminal]
pk1001100011 has quit [Remote host closed the connection]
siksia has quit [Ping timeout: 245 seconds]
jbw_ has joined #ruby
olrrai__ has quit [Ping timeout: 246 seconds]
cousine has joined #ruby
bluenemo has joined #ruby
pk1001100011 has joined #ruby
NEaRLy has quit [Remote host closed the connection]
siksia has joined #ruby
nanderoo has joined #ruby
codespectator has joined #ruby
iocor has quit [Quit: Computer has gone to sleep.]
<codespectator>
Is there a quick way to select eavery nth item in an array?
zomgbie has quit [Ping timeout: 256 seconds]
<locriani>
TTilus: yeah, but these are huge files
<locriani>
so the parse error may not occur until halfway through etc
<locriani>
also
<locriani>
they have a street field
<locriani>
that contains things like "Liquor License needed"
<locriani>
or "Ask about the great rates on x"
<locriani>
:psyduck:
radic has quit [Remote host closed the connection]
ringotwo has joined #ruby
<Defusal>
codespectator, arr.select.with_index {|x, i| i % n == 0 }
gioele has left #ruby [#ruby]
<codespectator>
Defusal thanks
<matled>
.map(&:first) :)
<Defusal>
matled, it'll select the items without their indexes
<matled>
oh, right
hemanth has quit [Read error: Connection reset by peer]
hemanth has joined #ruby
jenrzzz-mac has quit [Quit: jenrzzz-mac]
vectorshelve has joined #ruby
bashdy has joined #ruby
fridim_ has quit [Ping timeout: 246 seconds]
mohits has quit [Read error: Connection reset by peer]
binaryplease has joined #ruby
mohits has joined #ruby
mohits has quit [Changing host]
mohits has joined #ruby
BiHi has joined #ruby
geekbri has joined #ruby
hynkle has quit [Quit: hynkle]
punkrawkR has joined #ruby
cousine has quit [Remote host closed the connection]
vitoravelino`afk is now known as vitoravelino
dv310p3r has quit [Quit: Leaving]
uttumuttu has joined #ruby
<uttumuttu>
Hello. Here's a contrived line-by-line copying of two files (in and out): while(line = in.gets) out.puts(line) end
ph^ has quit [Remote host closed the connection]
maasha has quit [Quit: Page closed]
<uttumuttu>
I'm wondering what factors might make the process considerably slower than raw copying of the files at IO level.
ph^ has joined #ruby
<uttumuttu>
OS level, I mean.
dr_diamond has joined #ruby
dr_diamond has quit [Changing host]
dr_diamond has joined #ruby
dr_diamond has quit [Client Quit]
krusty_ar has joined #ruby
<JonnieCache>
well, everything is going throug the posix api, then the ruby interpreter, then back though the posix api again
<JonnieCache>
obviously that will be a lot slower than just keeping the data in the posix player
<JonnieCache>
*layer
<locriani>
it also would be a non atomic copy
<locriani>
and ruby provides resources to directly copy a file
<locriani>
but in the first
<uttumuttu>
but assuming that the files and read and written (internally) in largish chunks, and that each line is reasonably long (e.g., > 80 characters), there really shouldn't be too much overhead caused by the interpreting
<locriani>
no
<locriani>
there will be significant overhead since you're thrashing the GC
<Defusal>
uttumuttu, it is a high level language
`brendan has joined #ruby
<Defusal>
there will be a lot of overhead
<locriani>
you'll end up creating an object for each in.gets call that will need to be collected
<Defusal>
assuming you're on *nix
<Defusal>
i would suggest spawning 'cp'
<locriani>
so number of lines is literally the number of times you're allocating an object
dr_diamond has joined #ruby
<Defusal>
cp is very fast and efficient using few CPU cycles
<locriani>
and although ruby is actually fairly fast, the gc is very very slow
<JonnieCache>
object instantiation is also slow to start with
<locriani>
ruby provides File.copy
moshee has quit [Ping timeout: 252 seconds]
<locriani>
oh
moshee has joined #ruby
moshee has quit [Changing host]
moshee has joined #ruby
ph^ has quit [Ping timeout: 265 seconds]
<Defusal>
locriani, what does that actually do though :)
<locriani>
I lied, it's FileUtils.cp now
<JonnieCache>
tbh that code is closer to cat than cp
<Defusal>
i compared a number of options not too long ago
<Defusal>
as i was going to use ZeroCopy for the highest efficiency and performance
<uttumuttu>
Defusal: certainly it's a contrived example; of course I'm filtering and processing the lines. I'm just wondering whether the basic read-write-loop can contain a bottleneck.
<Defusal>
i found it was not worth the effort over the performance of `cp`
<JonnieCache>
the bottleneck in this context is the whole of ruby
<locriani>
uttumuttu: ah gotcha
<Defusal>
just don't use rsync, as that is absolutely terrible in that regard
<locriani>
uttumuttu: it's probably better to copy the file a separate step
<locriani>
FileUltils.copy source, dest
mohits has quit [Ping timeout: 260 seconds]
<Defusal>
uttumuttu, you could also look at using mapped memory
<locriani>
while (line = source.gets) ...
<JonnieCache>
yeah uttumuttu i would copy the file separately using raw posix in whatever way then filter it afterwards, or whatever works best.
<JonnieCache>
or put it into redis. redis solves all problems
<locriani>
I'm actually curious now how fileutils handles that
<JonnieCache>
;)
mohits has joined #ruby
mohits has quit [Changing host]
mohits has joined #ruby
fgwaegeawgfwa has joined #ruby
Gavilan has quit [Ping timeout: 252 seconds]
dhruvasagar has quit [Ping timeout: 260 seconds]
asuka_ has quit [Read error: Connection reset by peer]
ZachBeta has quit [Quit: Computer has gone to sleep.]
fbernier has joined #ruby
Hanmac1 is now known as Hanmac
iori_ has quit [Remote host closed the connection]
binaryplease has quit [Quit: WeeChat 0.3.8]
binaryplease has joined #ruby
ethanol has joined #ruby
binaryplease has quit [Client Quit]
<ethanol>
any capybara users here? if so; can anyone tell me how I could close firefox and reopen it for each test? (i need to use a different profile every time, addons related)
t0mmyvyo has joined #ruby
<Muz>
Depeding on how you're running the capybara tests, add a close call in the teardown or equivalent thereof, and a spawn in the setup
<Muz>
In RSPec or Cucumber this can be done with the before/after hooks
Raduwen has joined #ruby
workmad3 has joined #ruby
<JonnieCache>
you have to go over capybara's head and talk directly to selenium-webdriver
<Defusal>
anyone around that has experience with GC?
<JonnieCache>
its api lets you do anything you want, use different profiles and so on
<ethanol>
Muz: using cucumber yes
<Muz>
ethanol: in that case, you could put something into the Background of your feature file
<Muz>
Background: Given I start Firefox with the "foo" profile
mohits has quit [Remote host closed the connection]
Vainoharhainen has quit [Ping timeout: 246 seconds]
<Muz>
And then step def that to do a close, and reopen with the "foo" parameter as the profile
<JonnieCache>
Muz: look at Selenium::WebDriver::Firefox and specifically Selenium::WebDriver::Firefox::Profile
<Muz>
ethanol: ^ probably cares more than I do ;)
advorak has quit [Quit: This computer has gone to sleep]
BeLucid has quit [Read error: Connection reset by peer]
IPGlider has joined #ruby
BeLucid has joined #ruby
maccosmo has quit [Quit: maccosmo]
moshee has quit [Ping timeout: 245 seconds]
moshee has joined #ruby
moshee has quit [Changing host]
moshee has joined #ruby
dcope_ has quit [Changing host]
dcope_ has joined #ruby
dcope_ is now known as dcope
workmad3 has quit [Ping timeout: 248 seconds]
hynkle has joined #ruby
workmad3 has joined #ruby
uttumuttu has quit [Quit: Page closed]
koshian is now known as Koshian
zomgbie has joined #ruby
uris has quit [Quit: leaving]
webusnix has quit [Quit: Ухожу я от вас (xchat 2.4.5 или старше)]
Advocation has quit [Ping timeout: 246 seconds]
asuka has joined #ruby
kenperkins has joined #ruby
asuka is now known as asuka_
zomgbie has quit [Ping timeout: 246 seconds]
yonggu has quit [Read error: Connection reset by peer]
yonggu has joined #ruby
stefanp has joined #ruby
stefanp has quit [Changing host]
stefanp has joined #ruby
wangr has joined #ruby
Blob has joined #ruby
Bonkers has quit [Read error: Connection reset by peer]
wangr_ has joined #ruby
rippa has quit [Quit: derp herp]
krz has quit [Quit: krz]
wangr_ has quit [Remote host closed the connection]
dv310p3r has joined #ruby
sepp2k has joined #ruby
Progster has joined #ruby
Blob has quit [Remote host closed the connection]
llaskin has joined #ruby
maccosmo has joined #ruby
fgwaegeawgfwa has left #ruby [#ruby]
<llaskin>
is there a way to print out the trace of any call within a method? for example given gist: https://gist.github.com/2895472 is there a way to figure out that when you call line 9, you are actually then calling method2, which calls method1 at line 5 which does stuff at line 2?
Helius has quit [Remote host closed the connection]
<bnagy>
mcteapot: the code says 'make a new array containing the classes of all the objects in my array, and see if there is more than one class there'
<Progster>
bnagy works great. What does &:class do ?
<ethanol>
Muz: how could I use my examples parameters in the background too?
<shevy>
Progster apply this on each element
<bnagy>
Progster: it's just a 1.9 shortcut to send a simple method to every object in an enuerable
<llaskin>
bnagy how can I use caller backwards?
<llaskin>
can you explain?
<bnagy>
caller will show what called what to get where you are, but you sound like you want to predict execution
<bnagy>
and absent insane voodoo, you can't
nazty has quit [Ping timeout: 245 seconds]
wmoxam has joined #ruby
<mcteapot>
hmm I keep getting SyntaxErrors
dwaynecrooks has quit [Quit: Ex-Chat]
<bnagy>
llaskin: write 3 methods that call each other in a chain, and put p caller in the last one to be called
<shevy>
mcteapot that's because you add them :D
<mcteapot>
is it like a version problem :(
<shevy>
what version
maccosmo has quit [Quit: maccosmo]
<mcteapot>
1.8.7
<llaskin>
bnagy, will take me a bit to get something printed up, cuz i have an idea about something
<llaskin>
this will be epic if it works though
nlc has joined #ruby
<Muz>
ethanol: you can use <value> examples with the background. For your use case you can instead put a teardown item in the background
fermion has quit [Quit: P]
vectorshelve has quit [Quit: Page closed]
<Muz>
And then a step into the scneario to start firefox with your given profile
<Muz>
Also: http://dpaste.com/756641/ Background steps are ran once between scenarios overriding anything that the test may have set
rapha has joined #ruby
<rapha>
Hi!
maccosmo has joined #ruby
wmoxam has quit [Client Quit]
fermion has joined #ruby
probst has joined #ruby
<rapha>
If I want to do 16 substitutions on one string, should I chain gsub() or would it be better to try and stuff everything into one regexp?
krusty_ar_ has joined #ruby
lolmaus has quit []
<hoelzro>
rapha: 16? that's a very precise number...
<JonnieCache>
from this month 1.8.7 will only get security fixes, not bugfixes. in 1 year it will get no fixes at all
carlyle has joined #ruby
<JonnieCache>
plus its slow so stop using it :)
stringoO has joined #ruby
andrewhl has joined #ruby
<shevy>
ohhhhh
Corey has joined #ruby
<shevy>
this month already hmm
<jeffsmykil>
oh there is a .capitalize how nice
hasrb has joined #ruby
dr_bob has quit []
llaskin has left #ruby [#ruby]
<shevy>
JonnieCache, I am on 1.9.x now
siksia has quit [Ping timeout: 265 seconds]
<shevy>
but speed reason was never a reason not to use ruby for me :)
<JonnieCache>
true that
<shevy>
I notice the difference though
<shevy>
some scripts suddenly finish seemingly instantena... instan... uhm
<shevy>
instantaneous
schovi has quit [Remote host closed the connection]
<shevy>
difficult word :P
ben_alman has joined #ruby
<shevy>
jeffsmykil most common tasks have a method on class String. if you need a method, that is not on string, you can add it. class String; def my_method; # add your code here; end; end
krusty_ar_ has quit [Remote host closed the connection]
snearch has joined #ruby
strnx has joined #ruby
etehtsea has joined #ruby
fridim_ has joined #ruby
<ptka>
hello, sorry for the noob question, but is there something like wxpython for ruby?
krusty_ar has joined #ruby
<shevy>
ptka there are ruby bindings to wxwidgets... but I think they are inactive, or even abandoned them now
nari has joined #ruby
<shevy>
if you can use other bindings, ruby-gtk works okish, ruby-qt is also ok. ruby-tk exists too. in general I think python has an edge here though over ruby
theRoUS|abest has joined #ruby
<ptka>
yes, that's why I am asking, it seems that wxruby is abandoned
<shevy>
the fate of most GUI things in ruby (save the www)
<ptka>
:\
Liothen has quit [Read error: Operation timed out]
zaydana has quit [Quit: zaydana]
d3c has quit [Quit: Sleep]
bbttxu has joined #ruby
CannedCorn has joined #ruby
Liothen has joined #ruby
Liothen has quit [Changing host]
Liothen has joined #ruby
albemuth has joined #ruby
kevinbond has joined #ruby
d3c has joined #ruby
chomp has joined #ruby
adambeynon has joined #ruby
fridim_ has quit [Ping timeout: 264 seconds]
internet_user has joined #ruby
wlievens has quit []
maccosmo has quit [Quit: maccosmo]
flype has joined #ruby
lxsameer has joined #ruby
lxsameer has quit [Changing host]
lxsameer has joined #ruby
siksia has joined #ruby
tsou has joined #ruby
kenperkins has quit [Quit: Computer has gone to sleep.]
milestone has quit [Read error: Operation timed out]
PragCypher has joined #ruby
mxweas_ has quit [Ping timeout: 244 seconds]
<rapha>
another question; i want to do something only to parts of a string (in my case, to all parts enclosed in "[[]]") leaving the rest of the string as-is. do i have to loop through the entire string, character by character, or is there again a better solution?
<rapha>
(.scan doesn't cut it as it will not return anything if no match is made)
ptka has quit [Quit: leaving]
Araxia has quit [Read error: Connection reset by peer]
<rapha>
(and .split doesn't cut it as it doesn't tell me what resulting slice was inside the brackets and what slice was not)
xaq has quit [Read error: Connection reset by peer]
xaq has joined #ruby
quest88 has joined #ruby
rizzylt has joined #ruby
enroxorz has quit [Quit: Ex-Chat]
xaq has quit [Read error: Connection reset by peer]
lxsameer has quit [Ping timeout: 256 seconds]
xaq has joined #ruby
williamcotton has joined #ruby
fabrice31 has quit [Remote host closed the connection]
crankycoder has quit [Remote host closed the connection]
ringotwo has quit [Remote host closed the connection]
xaq has quit [Read error: Connection reset by peer]
nooodl has quit [Ping timeout: 246 seconds]
hasrb has joined #ruby
ABK has joined #ruby
khakimov has quit [Quit: Computer has gone to sleep.]
xaq has joined #ruby
ABK has quit [Read error: Connection reset by peer]
brianpWins has quit [Quit: brianpWins]
kaneda_ has quit [Ping timeout: 245 seconds]
crankycoder has joined #ruby
ABK has joined #ruby
emmanuelux has joined #ruby
xaq has quit [Read error: Connection reset by peer]
c0rn_ has quit []
ABK has quit [Read error: Connection reset by peer]
xaq has joined #ruby
ringotwo has joined #ruby
ABK has joined #ruby
<godzirra>
Can anyone take a look at my pastie and tell me what I'm doing wrong? http://pastie.org/4048538 ... Its not automatically reloading when I run guard start and then make changes to the script and save them. I installed the growl, guard, guard-rspec and guard-livereload gem.
udante has quit [Quit: Leaving...]
xaq has quit [Read error: Connection reset by peer]
xaq has joined #ruby
billiamii has joined #ruby
PragCypher has joined #ruby
ABK has quit [Read error: Connection reset by peer]
minijupe has joined #ruby
ABK has joined #ruby
xaq has quit [Read error: Connection reset by peer]
xaq has joined #ruby
oz has joined #ruby
ABK has quit [Read error: Connection reset by peer]
xaq has quit [Read error: Connection reset by peer]
xaq has joined #ruby
rippa has joined #ruby
ABK has joined #ruby
ABK has quit [Read error: Connection reset by peer]
ABK has joined #ruby
ABK has quit [Read error: Connection reset by peer]
ABK has joined #ruby
ABK has quit [Read error: Connection reset by peer]
ABK has joined #ruby
crankycoder has quit [Remote host closed the connection]
ABK has quit [Read error: Connection reset by peer]
ekaleido_ is now known as ekaleido
ABK has joined #ruby
ABK has quit [Read error: Connection reset by peer]
Araxia_ has quit [Quit: Araxia_]
theRoUS has quit [Ping timeout: 260 seconds]
tcopp has joined #ruby
elux has joined #ruby
jackiechan0 has joined #ruby
hasrb has quit [Ping timeout: 245 seconds]
<shevy>
bartj well there is a cache/ dire
<shevy>
bartj, usually /usr/lib/ruby/gems/1.8/cache/
<shevy>
debian uses another path
Targen has joined #ruby
<shevy>
bartj I dont use heroku so I am not sure how to use it, but dont they give a README or something that shows how to use it?
<tommylommykins>
hmm
TheHunter_1039 has joined #ruby
hasrb has joined #ruby
* tommylommykins
is looking for the most uptodate netbeans for plain ruby
akem has joined #ruby
<tommylommykins>
*most uptodate netbeans plugin for plain ruby
<tommylommykins>
Is it still the package posted by Thomas Enebo in early January?
ibash has quit [Quit: ibash]
siksia has quit [Read error: Connection reset by peer]
<tommylommykins>
Or is there currently some better free editor for ruby?
<hoelzro>
there's always Vim =)
PragCypher has quit [Remote host closed the connection]
<tommylommykins>
...If I wanted to use vim, I'd already be using it ;)
* tommylommykins
wants a big fat sexy IDE to have and to hold :P
<_br_>
<StarWars Persuade> You w a n t to use VIM </StarWars Persuade>
binaryplease has joined #ruby
* tommylommykins
has a crappy enough job that openVMS is his primary operating system at work... I don't want more text mode utilities when I'm out of work... :P
siksia has joined #ruby
ryannielson has joined #ruby
loonysalmon has joined #ruby
examancer has quit [Read error: Operation timed out]
fridim_ has joined #ruby
andrewhl has joined #ruby
<ethanol>
exit
<ethanol>
close, damnit
ipoval has joined #ruby
ethanol has left #ruby [#ruby]
<tommylommykins>
butbut, how do you lot live without your editor telling you all the syntax errors at write-time
airhorns has joined #ruby
albemuth has joined #ruby
<hoelzro>
:set compiler
<hoelzro>
:make
<hoelzro>
now Vim tells me about syntax errors.
baroquebobcat has joined #ruby
<hoelzro>
I don't even use that feature, honestly
<hoelzro>
I just suspend and run the test suite
deryl has quit [Ping timeout: 252 seconds]
<hoelzro>
syntax errors become apparent very quickly that way =)
Richmond_ has joined #ruby
freeayu has joined #ruby
deryl has joined #ruby
codespec_ has joined #ruby
siksia has quit [Ping timeout: 256 seconds]
* _br_
agrees with hoelzro
ryannielson has quit [Quit: ryannielson]
fserb has joined #ruby
<_br_>
Never again an editor without different modes to speed up your work.
codespectator has quit [Ping timeout: 252 seconds]
Richmond has quit [Ping timeout: 245 seconds]
ckrailo has joined #ruby
oooPaul has joined #ruby
ringotwo has quit [Remote host closed the connection]
iocor has quit [Quit: Computer has gone to sleep.]
codespec_ has quit [Ping timeout: 244 seconds]
siksia has joined #ruby
xaxisx has quit [Quit: xaxisx]
Enekoos has joined #ruby
jrist is now known as jrist-scrum
emmanuelux has quit [Remote host closed the connection]
udante has joined #ruby
udante has quit [Remote host closed the connection]
<ekaleido>
god i hate rails
* tommylommykins
wonders how many ruby people are like him and have never touched rails
brianpWins has joined #ruby
hoelzro is now known as hoelzro|away
<cout>
tommylommykins: me
Enekoos has quit [Client Quit]
<cout>
I started using ruby about 3 years before rails was created, and I never jumped on the bandwagon
<_br_>
weird question, lets say I have an error, e.g. ArgumentError, and now when I get that I want to extend it by another cutomerror class dynamically. Whats the right way? .class_eval ?
Enekoos has joined #ruby
<_br_>
tommylommykins: me
yannis has joined #ruby
<ekaleido>
its hideous and makes me want to gouge out my eyeballs
<cout>
br: extend it to what end?
<tommylommykins>
ah, good, that makes me feel better
youdonotexist has joined #ruby
<_br_>
cout: there are some fields which get written, which don't extend in the error class
fivetwentysix has joined #ruby
<cout>
br: if you just want to append something to the message, then you can call .gsub! on the String returned from #message
<cout>
br: if you want to add new data to the exception, it's better to raise a new exception that holds a reference to the original
wvms has quit [Quit: wvms]
emmanuelux has joined #ruby
<_br_>
cout: I see. Hm, ok lets try that
nfk has quit [Quit: yawn]
emmanuelux has quit [Remote host closed the connection]
strnx has quit [Excess Flood]
* tommylommykins
wonders what ruby tends to get used for apart from rails in the commrecial world
theRoUS has joined #ruby
<tommylommykins>
nobody else in my office knows ruby except me :(
sleetdrop has joined #ruby
azm has joined #ruby
azm has quit [Changing host]
azm has joined #ruby
<Defusal>
tommylommykins, lots :)
<cout>
tommylommykins: NASA uses ruby
bglusman has quit [Remote host closed the connection]
* tommylommykins
assumes python and dotnet tend to win over ruby in terms of crummy-internal-tools :s
<cout>
tommylommykins: and e used ruby in the financial industry for writing regression tests and control scripts for our C++-based trading infrastructure
bglusman has joined #ruby
<cout>
python has a much bigger following in scientific computing
RegEchse has joined #ruby
<_br_>
Sorry, but who cares about the language? Different Languages are good for different things. All have their purpose and they help us to shape the way how we think about problems.
<godzirra>
Can anyone take a look at my pastie and tell me what I'm doing wrong? http://pastie.org/4048538 ... Its not automatically reloading when I run guard start and then make changes to the script and save them. I installed the growl, guard, guard-rspec and guard-livereload gem.
sleetdrop has quit [Remote host closed the connection]
ionas has joined #ruby
<ionas>
Hi, I want to save and retrieve a sorted directory structure. each node has a unique name per hierarchy level, domain.tld/path/to/document path/to/antoher/document, this/is/first_document this/is/second_document etc… where to read into … gems? docs?
<cout>
_br_: I'm confused at your contradictory statements
sleetdrop has joined #ruby
kenperkins has joined #ruby
<shevy>
_br_ still, some languages are better than others
bglusman has quit [Ping timeout: 260 seconds]
MasterIdler has joined #ruby
strnx has joined #ruby
<_br_>
cout: Its a bit tricky. The reason is seems contraditory is that this whole language issue is much more complex. There was a very interesting discussion on this topic and PG also wrote a very interesting essay about this. Let me see if I can dig that up.
<_br_>
shevy: What does "better" mean?
<shevy>
_br_ any given aspect you want to compare
Divinite has joined #ruby
<shevy>
- less lines of code
<shevy>
would be one
<shevy>
- speed
kenperkins has quit [Client Quit]
<shevy>
is another one
<cout>
_br_: I think language choice is very important, but not nearly as important as actually getting things done.
<shevy>
yeah
<shevy>
though hopefully I will never have to write a shell script in my life again
indian has joined #ruby
ben_alman has quit [Excess Flood]
nfk has joined #ruby
emmanuelux has joined #ruby
ben_alman has joined #ruby
codespectator has joined #ruby
jrist-scrum is now known as jrist
ipoval has quit [Quit: ipoval]
jeffsmykil has left #ruby [#ruby]
wallerdev has joined #ruby
strnx has quit [Max SendQ exceeded]
sleetdrop has quit [Remote host closed the connection]
<shevy>
godzirra no idea sorry. i dont use growl etc..., if it were pure ruby code, I could try to help, but I dont use the things you use here
<shevy>
what I notice between python and ruby is that often the python projects have better documentation
danishman has joined #ruby
<shevy>
pygtk3 for example
riginding has joined #ruby
carloslopes has joined #ruby
<_br_>
cout: ack, getting things done is No 1 :)
thone_ has joined #ruby
<shevy>
_br_ I agree with the gist of that statement
alexim has quit [Quit: sleep]
<_br_>
shevy: shell script? hehe which shell tcsh ? :DD
<shevy>
any
<shevy>
I hate them all
<tommylommykins>
_br_: Have you never seen VBA before?
<shevy>
one day I will have finished my own shell
<shevy>
+ pry
<shevy>
:)
* tommylommykins
is pretty sure the crappiness of VBA actively costs people who use it a lot of money
<_br_>
tommylommykins: hehe... nice, good argument you try to win there. All languages had their purpose at some point in time.
<shevy>
it's a dual bladed sword tommylommykins
<shevy>
a friend of mine is making a fortune just writing macros for ... I think MS excel and so on
<_br_>
shevy: tried the rush shell?
<tommylommykins>
_br_: VBA is ridiculous... M took VBS and removed all sorting and searching tools, and then declared it was going to be the scripting langue of excel for ever more
<shevy>
_br_ I think so. but it requires pure ruby syntax or? I want a shell that combines simplicify of i.e. bash but scriptability of ruby
<tommylommykins>
*MS took VB6
<_br_>
tommylommykins: well, I'm not saying that every language is perfect.
<cout>
shevy: pygtk has good documentation because its docs are based on the docs for gtk
<godzirra>
_br_: All good. I'll just keep asking periodically. :)
<shevy>
I think I will have to learn C properly if I ever have a chance to make a real replacement for bash :(
<shevy>
_br_ do you know the fish shell btw?
thone has quit [Ping timeout: 252 seconds]
<godzirra>
shevy: The ruby stuff I've seen usually has pretty good documentation, but I've had no end of trouble figuring out why Guard isn't working.
<_br_>
shevy: sure :) But I am really comfy with my tuned zsh ...
PaciFisT has joined #ruby
<cout>
shevy: but in general, IMO ruby libraries are better documented than python libraries (though this see-saws back and forth between the two communities every few years)
sirecote is now known as sirecote
<shevy>
cout well, the ruby documentation has improved in the last some 3 years, compared to the 3 years before...
<tommylommykins>
cout: but ruby stdlib is all stuffy and not-all-that-well-documented. Is python worse?
<shevy>
but the python guys often have those huge fat tutorials
<Defusal>
shevy, bash is awesome at what it is meant for
<cout>
tommylommykins: it depends on what class/function you are looking at
<cout>
tommylommykins: some stuff is better, some worse
<Defusal>
i use very little bash, as i hate cryptic syntax, but even i cannot deny the fact that it is great at what it does
<_br_>
Defusal: bash? Can that do command autocompletion? I mean for parameters? Man page lookup of parameters? etc.?
<shevy>
in bash autocompletion is quite easy
binaryplease has joined #ruby
<cout>
tommylommykins: e.g. "pydoc list" is okay, but if I take the documentation at face value, I would think I had to call __getitem__() to get a value at a particular index instead of using the [] operator
<shevy>
ry h<PRESS TAB>
<Defusal>
yes it can
<_br_>
Oh, ok thats new to me :)
<shevy>
I tried to find out how to do the same in zsh and failed
<Defusal>
but i was speaking about bash scripting, rather than bash REPL
savage- has joined #ruby
Eldariof-ru has quit [Ping timeout: 245 seconds]
<Defusal>
bash can do a lot actually
<_br_>
bah, shell scripting is ugly, no matter which shell, agree with shevy on that
<Defusal>
you can search history very easily
<_br_>
Alone the quotation issue in bash and the other shells is insane
<shevy>
complete -F completion_for_ry ry
<cout>
_br_: not all shell scripting has to be ugly, just the shells that are posix-compliant :(
* tommylommykins
wonders if it's worth trying it as his windows ruby encironment
chson has joined #ruby
indian has quit [Ping timeout: 245 seconds]
zx has joined #ruby
savage- has quit [Remote host closed the connection]
mdw has joined #ruby
savage- has joined #ruby
azm has quit [Ping timeout: 240 seconds]
indian has joined #ruby
thecreators has joined #ruby
gheegh has quit [Ping timeout: 244 seconds]
kaneda_ has joined #ruby
mdw has quit [Remote host closed the connection]
alexim has joined #ruby
<shevy>
tommylommykins I think it was cancelled years ago
cousine has quit [Remote host closed the connection]
<shevy>
_br_ yeah one day... but it will need other computers
<tommylommykins>
ah
* tommylommykins
remembers trying to run it a long time ago... And the first thing I wrote broke the executable :s
<shevy>
hehe
<shevy>
puts 'hello world'
_adeponte has quit [Remote host closed the connection]
cbuxton has quit [Quit: Leaving.]
adeponte has joined #ruby
<tommylommykins>
I think that one worked :s
cbuxton has joined #ruby
<tommylommykins>
maybe it was th second one. I created four threads and made them all infinite loop on nothing
looopy has joined #ruby
lxsameer has joined #ruby
lxsameer has quit [Changing host]
lxsameer has joined #ruby
fivetwentysix has quit [Quit: fivetwentysix]
bigoldrock has joined #ruby
fbernier has quit [Ping timeout: 244 seconds]
Ammar01 has quit [Quit: Leaving]
lxsameer has quit [Ping timeout: 245 seconds]
andrewhl has quit [Remote host closed the connection]
bricker88 has joined #ruby
sorin has left #ruby [#ruby]
kenperkins has joined #ruby
lxsameer has joined #ruby
artOfWar has joined #ruby
bartj has quit [Ping timeout: 240 seconds]
artOfWar has quit [Remote host closed the connection]
artOfWar has joined #ruby
kpshek has joined #ruby
kpshek has quit [Client Quit]
Ankhers has joined #ruby
lxsameer has quit [Ping timeout: 245 seconds]
kenichi has joined #ruby
BiHi has quit [Quit: bye]
<shevy>
lol
Markvilla has joined #ruby
examancer has joined #ruby
bglusman has joined #ruby
hemanth has quit [Read error: Connection reset by peer]
lxsameer has joined #ruby
fbernier has joined #ruby
hemanth has joined #ruby
etehtsea has quit [Ping timeout: 244 seconds]
crankycoder has joined #ruby
jmuniz has joined #ruby
ringotwo has joined #ruby
qwerxy has quit [Ping timeout: 244 seconds]
digitalcakestudi has joined #ruby
bglusman has quit [Ping timeout: 245 seconds]
carloslopes has quit [Quit: Leaving]
ringotwo has quit [Remote host closed the connection]
lxsameer has quit [Ping timeout: 244 seconds]
ringotwo has joined #ruby
mrdtt has quit [Remote host closed the connection]
bartj has joined #ruby
DMKE has joined #ruby
DMKE has quit [Changing host]
DMKE has joined #ruby
ionas has quit [Quit: ionas]
benatwork has quit [Remote host closed the connection]
wilmoore has joined #ruby
d3vic3 has quit [Read error: No route to host]
fbernier has quit [Read error: Connection reset by peer]
Zol has joined #ruby
ionas has joined #ruby
<Zol>
I found a project on RubyForge
binaryplease has quit [Quit: WeeChat 0.3.8]
<Zol>
Rather; I just installed Fedora 17 - what's the best way to handle my ruby enviroment?
<Zol>
rvm?
<Zol>
rbenv?
bluOxigen has joined #ruby
lxsameer has joined #ruby
Araxia_ has joined #ruby
<Spaceghostc2c>
Yes.
nooodl has joined #ruby
adamkittelson has joined #ruby
jmuniz has quit [Quit: Later Nerds!]
zamn has joined #ruby
simao has quit [Ping timeout: 265 seconds]
<zamn>
is there any issues with mysql2 and the latest version of rails?
<zamn>
i cant seem to install the damn thing ~_~
<_br_>
zamn: try #rails ? Maybe they know?
zamn has left #ruby [#ruby]
flak has joined #ruby
flak is now known as Guest96042
<_br_>
Zol: What's better? Apple or Orange? They're both tasty, but they are different :). RVM is older and hooks into the enviroment with various shell hacks. Its trying to integrate everything. rbenv, is newer, and tries to be only good for specific things.... Try both, then decide?
fermion has quit [Quit: P]
<Zol>
_br_: Well, I do prefer Grapefruit. ;) But you are right, thanks!
Araxia_ has quit [Read error: No route to host]
<Zol>
Another thing, is there some kind of package management connected to RubyForge?
<Zol>
Aha, rubygems, thanks again.
rippa has quit [Ping timeout: 248 seconds]
sleetdrop has quit [Remote host closed the connection]
willpots has quit [Quit: willpots]
fbernier has joined #ruby
Guedes is now known as Guedes_out
werdnativ has joined #ruby
QKO has quit [Ping timeout: 248 seconds]
Guest96042 has quit [Quit: {#`%${%&`+'${`%&NO CARRIER]
hasrb has quit [Remote host closed the connection]
rippa has joined #ruby
elhu has quit [Ping timeout: 260 seconds]
bglusman has joined #ruby
jdripper has quit [Quit: Leaving.]
Ripp__ has joined #ruby
Ripp___ has quit [Ping timeout: 265 seconds]
fivetwentysix has joined #ruby
bartj has quit [Quit: Leaving]
ozzloy_ is now known as ozzloy
ozzloy has quit [Changing host]
ozzloy has joined #ruby
<nat2610>
anyone know REXML ? I can't find the method that will return the tag of the element I'm currently looking at ?
lxsameer has quit [Quit: Leaving]
QKO has joined #ruby
Enekoos has quit [Remote host closed the connection]
banjara has joined #ruby
schickung has quit [Quit: schickung]
headius has quit [Quit: headius]
<Zol>
I can run rvm in zsh?
<Zol>
can't*
<Zol>
Says bash >= 4.1 required, does that exclude zsh?
tk___ has quit [Quit: ばいばい]
zomgbie has quit [Ping timeout: 252 seconds]
headius has joined #ruby
<ukd1>
is type hinting supported in ruby?
Enekoos has joined #ruby
<yxhuvud>
no
<_br_>
Zol: no, I'm using zsh fine with rvm
<Markvilla>
Zol: I'm using rvm in zsh
<Markvilla>
probably its not in your PATH
<bricker88>
ukd1: Don't think so, but you can implement it manually. raise { "Only strings allowed" if !args.is_a? String }. Or, just convert everything to the type you want with to_s, to_i, etc.
xaxisx has joined #ruby
<ukd1>
bricker88, ok thanks - I'm coming from php and missing a couple of things (but not some other things) :P
<Mon_Ouie>
You usually shouldn't do that — most of the type, relying on duck-typing is a better approach
<Mon_Ouie>
most of the time*
hemanth has quit [Read error: Connection reset by peer]
hemanth has joined #ruby
<_br_>
Mon_Ouie: It depends, Design by Contract has its upsides
Hunner has joined #ruby
noganex has quit [Read error: Operation timed out]
<ukd1>
is doing MyClass.something ok as a static method call or should it be MyClass::something ?
<Hunner>
Hi. If I have `case ... ; when x ; begin ...` how can I escape the case? break/next are unexpected, and return isn't what I want...
andrewhl has joined #ruby
<Zol>
http://pastie.org/4051703 - I get these errors when trying "gem install muby", I think it's related to the ncurses library, however, what can I do to fix the errors?
<Mon_Ouie>
Sure, but having a type contract can often induce requirements you can't meet (without e.g. subclassing in a case where it doesn't make sense)
<Mon_Ouie>
ukd1: Both work, but MyClass.something is the most common way
fivetwentysix has quit [Quit: fivetwentysix]
Divinite has quit [Quit: Divinite has left :(]
<Mon_Ouie>
Also they're called "class methods" in Ruby, not "static methods"
<ukd1>
yea - i'm reading about that now :-)
<ukd1>
is Class::method not good?
noganex has joined #ruby
riginding has quit [Read error: Connection reset by peer]
loonysalmon has quit [Quit: Page closed]
<Mon_Ouie>
Hunner: Hunner You can't exit early from a case construct. You can just use "if cond; …; end" instead of "break unless cond; …"
<_br_>
Mon_Ouie: I'm not sure about the "can't meet scenario". I just use it quite often because its in my opinion better to fail fast to instead of to continue and mess around with a uncertain state due to wrong inputs/outputs. Obviously DbC alone is not enough to make a good program imo.
zomgbie has joined #ruby
<Hunner>
Mon_Ouie: Okay. Just looking to avoid lots of indentation and odd function calls :). Thanks
<LiquidIn1ect>
Anyone know of a gem or other utility that would concatenate yaml files for me? I mean I could just use cat but I think something more content-aware might be better...
<Mon_Ouie>
ukd1: :: is usually reserved for constant lookup (as in File::Separator)
<ukd1>
thanks :-) I'll stick with .
LiquidIn1ect is now known as LiquidInsect
pdtpatrick has joined #ruby
chrismcg is now known as zz_chrismcg
bbttxu has quit [Quit: bbttxu]
<Mon_Ouie>
_br_: But that an object doesn't have the class you expected doesn't mean it will fail — as long as that object has the same interface.
<ukd1>
Mon_Ouie it's just more painful having to check the requirements manually rather than having it supported, imho
Yarou has quit [Quit: Leaving]
<Mon_Ouie>
And when it fails (indeed, you won't know it early with this approach), you'll be told about a method that should have been implemented, instead of being told that the method expected a certain kind of object
fflush has joined #ruby
<Hunner>
If I have `@var ||= begin ...` is there a way to return early from that? `return` bypasses the ||= assignment
<Hunner>
s/return early/return a value early/
ringotwo has quit [Remote host closed the connection]
<_br_>
Mon_Ouie: In my experience working with larger systems this can bite you, and end up in long debugging sessions.
<Mon_Ouie>
No. You can only return early from blocks, loops and methods (and the program itself :p).
Shoobdidoo has joined #ruby
strnx has quit [Excess Flood]
werdnativ has quit [Quit: werdnativ]
<Hunner>
Mon_Ouie: thanks
froy has quit [Quit: kablam!]
strnx has joined #ruby
freeayu has quit [Quit: 离开]
the_jeebster1 has joined #ruby
strnx has quit [Client Quit]
Eldariof-ru has joined #ruby
stephenjudkins has quit [Quit: stephenjudkins]
hynkle has quit [Quit: hynkle]
afallows_ has joined #ruby
Shoobdidoo has quit [Quit: Verlassend]
indian has quit [Ping timeout: 245 seconds]
Ripp__ has quit [Quit: No Ping reply in 180 seconds.]
Ankhers has quit [Remote host closed the connection]
<Johnny7886>
Ha ha, that would work, but I'm tempted not to peek
ringotwo has quit [Remote host closed the connection]
<Johnny7886>
It's like looking at the back of a puzzle book
ringotwo has joined #ruby
<shadoi>
It's just a hash
<shadoi>
with some checks
crankycoder has quit [Remote host closed the connection]
davidw has joined #ruby
d3c has quit [Quit: Sleep]
davidw is now known as Guest20110
<Johnny7886>
Hmmm
looopy has joined #ruby
Morkel has quit [Quit: Morkel]
<Johnny7886>
Is there a reason to use split.each instead of each_char?
Aaton_off is now known as Aaton
<Johnny7886>
Yeah, pretty sure this is a tree/trie not a dawg
<shadoi>
yeah it would store all suffixes separately
manufv has quit [Changing host]
manufv has joined #ruby
cpruitt has joined #ruby
Bosma has quit [Ping timeout: 245 seconds]
<shadoi>
you'd have to use arrays with references to common nodes.
<Johnny7886>
I guess you could make the arguement that on a modern computer you wouldn
<Johnny7886>
t't even care that much about the size difference in most cases
<shadoi>
yeah, size isn't such a huge issue these days.
<shadoi>
still, with large datasets it can matter a great deal.
rizzylt has joined #ruby
nobitanobi has joined #ruby
<Johnny7886>
I can see for some other applications - like those pocket dictionaries or handheld electronic games
<Johnny7886>
Or calculators
<Johnny7886>
I used to have a dictionary app on my calculator back in school called DAWG. Never got what it meant until a day or too ago ha ha: http://www.detachedsolutions.com/dawg/
<shadoi>
hehe
<nobitanobi>
What does the 01 do in here: Date.strptime('01','%d') — I want to get the format YYYYMM of the month we are currently in, but this gives me YYYY-MM-DD
DaytonaRomero has left #ruby [#ruby]
<shadoi>
01 is the data, %d is the format for it.
blacktulip has quit [Remote host closed the connection]
<nobitanobi>
Then, why if I write: Date.strptime('01','%d%m') - I get invalid date?
<shadoi>
because you don't have a %m
<shadoi>
you only have a %d
nilg` has quit [Remote host closed the connection]
mrsolo has quit [Quit: Leaving]
<shadoi>
try: Date.strptime('01-03','%d%m')
<Johnny7886>
banister_ also told me about the GADDAG http://en.wikipedia.org/wiki/GADDAG which is pretty interesting. It's larger in memory but specially designed for fast scrabble move lookups
<banister_>
i dont think u meant to msg me?
<shadoi>
nobitanobi: oops, remove that hyphen
jrist is now known as jrist-afk
<nobitanobi>
shadoi
<nobitanobi>
shadoi: But that gives me the month 03 - I want the current month
<shadoi>
nobitanobi: I think you're looking for strftime
<Johnny7886>
Oh, sorry, no. I'm an IRC idiot ha ha
<shadoi>
so that you can format the current date/time the way you want.
<nobitanobi>
mmm shadoi ok
<oooPaul>
Date.strptime is *parsing* a string for date fields (hence the 'p')
<oooPaul>
strftime will *format* a date into a string (hence the 'f')
Gavilan has joined #ruby
<luckyruby>
Is there a better way to do: if not %w(foo bar).include?(blah)
<Sou|cutter>
luckyruby: define better?
<luckyruby>
better in terms of readability
<Johnny7886>
Well, %w isn't super readable to non rubyists
manufv has quit [Ping timeout: 246 seconds]
<shadoi>
luckyruby: assign the array beforehand and then use something like: unless word_list.include? "blah"
<Sou|cutter>
shadoi: yeah, that's about the only thing I can think of
<Johnny7886>
Yeah, that would work better
<luckyruby>
i guess the tradeoff there is memory
<shadoi>
nope
<shadoi>
same amount used.
axl_ has quit [Ping timeout: 256 seconds]
<luckyruby>
u sure? heard somewhere that assigning a value to a variable creates an object that needs to be GC'd
<shadoi>
GC will reap when it goes out of scope
<Johnny7886>
Still has to create the whole list no matter what
bluenemo has quit [Remote host closed the connection]
<nobitanobi>
shadoi: I fail to see how would I accomplish that with strftime. I want to get the current month year in this format YYYYMM
jenrzzz-mac has quit [Quit: jenrzzz-mac]
maccosmo has quit [Quit: maccosmo]
maccosmo has joined #ruby
stephenjudkins has quit [Quit: stephenjudkins]
<shadoi>
nobitanobi: Time.now.strftime("%M%Y")
<shadoi>
err.. reverse those
Dreamer3 has joined #ruby
<nobitanobi>
%m :)
<nobitanobi>
thanks
Gm4n has quit [Ping timeout: 248 seconds]
<shadoi>
yar
tds has joined #ruby
<shadoi>
was just pulling it out of my ass. :)
<tds>
why does Dir["/path/**"] not match all directories recursively, but Dir["/path/**/**"] does?
<tds>
I am confused..
vlad_starkov has quit [Remote host closed the connection]
mengu has joined #ruby
chson has quit [Remote host closed the connection]
Gm4n has joined #ruby
zx has quit [Ping timeout: 248 seconds]
jackiechan0 has quit [Quit: Sto andando via]
jenrzzz-mac has joined #ruby
<nobitanobi>
shadoi: my concern here is that, when doing strptime I could do things like this: next_date = current_date >> 1
mvangal__ has quit [Remote host closed the connection]
<nobitanobi>
and it would give me the next month
banseljaj is now known as imami|afk
elux has quit [Quit: Bye!]
stephenjudkins has joined #ruby
<nobitanobi>
So, if I did: mydate = Date.strptime('01','%d') => #<Date: 2012-06-01 (4912159/2,0,2299161)>
wmoxam has quit [Ping timeout: 256 seconds]
<nobitanobi>
I could do: mydate >> 1 => #<Date: 2012-07-01 (4912219/2,0,2299161)>
<nobitanobi>
but with current_date = Time.now.strftime("%Y%m") - I can not use that operator right?
<shadoi>
You can still parse the output and use strptime
<shevy>
I prefer .striptease
Johnny7886 has quit [Quit: Page closed]
<shevy>
it's slower
<shevy>
tds I think Dir["/path/*/**"] does too, or?
<Markvilla>
What is the best syntax coloring for Ruby? 1,2,3 GO! :P
<shadoi>
twilight.
<Mon_Ouie>
Same as for other languages
<shevy>
white colour on white background
<Mon_Ouie>
(Except for whitespace)
saschagehlich has quit [Quit: saschagehlich]
niku4i has joined #ruby
<the_jeebster>
solarized theme
`brendan has quit [Quit: - nbs-irc 2.39 - www.nbs-irc.net -]
<nobitanobi>
If I have a YYYYMM like this: mytime = Time.now.strftime("%Y%m") — How do I get the next YYYYMM from that my_time? I have tried doing strptime from that mytime but I don't get it.
statix has quit []
<nobitanobi>
There is no way I can get the current date in YYYYMM format so I can use >> and << operators?
carlyle has quit [Remote host closed the connection]
niku4i has quit [Ping timeout: 246 seconds]
mhi^ has joined #ruby
wvms has joined #ruby
saschagehlich has joined #ruby
<nobitanobi>
If I have mytime = Time.now.strftime("%Y%m") — and I try to parse it with Date so I can use >> I get: #<Date: 2020-12-06 (4918379/2,0,2299161)>
<nobitanobi>
which is wrong
digitalcakestudi has quit [Quit: Leaving.]
counterbeing has quit [Quit: Computer has gone to sleep.]
ibash has quit [Quit: ibash]
visof has quit [Ping timeout: 260 seconds]
<tds>
shevy: no they return different things
Guest20110 has quit [Quit: Leaving]
Guest20110 has joined #ruby
<tds>
unclear why
looopy has quit [Remote host closed the connection]
Urthwhyte has joined #ruby
<shevy>
tds hmm
Urthwhyte has left #ruby [#ruby]
<tds>
the docs are a bit unclear
<tds>
i thought one ** would suffice as it says that it will match directories recursively
mayankkohaley has quit [Remote host closed the connection]
Serraphyn has joined #ruby
Bosma has joined #ruby
moktod has joined #ruby
internet_user has quit [Remote host closed the connection]
kenneth has quit [Ping timeout: 256 seconds]
rbanffy has quit [Remote host closed the connection]
Serraphyn has left #ruby ["Leaving"]
PaciFisT1 has quit [Quit: Leaving.]
kenneth has joined #ruby
PaciFisT has joined #ruby
<tds>
shevy: any ideas?
schovi has joined #ruby
PaciFisT has quit [Client Quit]
manufv has joined #ruby
Axsuul has joined #ruby
azm has joined #ruby
azm has quit [Changing host]
azm has joined #ruby
balki_ has joined #ruby
politoed has quit [Ping timeout: 244 seconds]
khakimov has joined #ruby
booginga has joined #ruby
theRoUS has quit [Ping timeout: 260 seconds]
politoed has joined #ruby
autojack has joined #ruby
dv310p3r has quit [Ping timeout: 244 seconds]
<autojack>
anyone here using rbenv? I'm trying to figure out a way to use it and support multiple versions of bundler under one version of ruby.
jcromartie has quit [Read error: Connection reset by peer]
manufv has quit [Changing host]
manufv has joined #ruby
jcromartie has joined #ruby
balki has quit [Ping timeout: 252 seconds]
SeoxyS has joined #ruby
the_jeebster has quit [Quit: Leaving.]
ZachBeta has joined #ruby
rizzylt has quit [Read error: Operation timed out]
DMKE has quit [Ping timeout: 260 seconds]
looopy has joined #ruby
kenneth has quit [Ping timeout: 240 seconds]
SeoxyS is now known as kenneth
lorandi has quit [Quit: Leaving]
ukd1 has quit [Quit: ukd1]
<shevy>
tds no idea
<shevy>
I usually use /*/** I think or /**/*
<tds>
yeah
<tds>
thanks
<tds>
ill try it out
<shevy>
I dont understand the logic behind it either
<shevy>
but I am just content to use it and aim for the proper result :P
Guest52008 has joined #ruby
Ripp__ has quit [Ping timeout: 246 seconds]
Ripp__ has joined #ruby
booginga has left #ruby ["Leaving"]
Richmond_ has quit [Quit: Leaving]
manufv has left #ruby [#ruby]
pdtpatrick_ has joined #ruby
emmanuelux has quit [Quit: @+]
khyron320 has quit [Quit: Leaving]
krusty_ar has quit [Read error: Connection reset by peer]
rapha has left #ruby ["Bye!"]
nu7hatch has quit [Remote host closed the connection]
Axsuul has quit [Ping timeout: 240 seconds]
kenneth has quit [Ping timeout: 265 seconds]
pdtpatrick has quit [Ping timeout: 240 seconds]
pdtpatrick_ is now known as pdtpatrick
westoque has quit [Quit: westoque]
tvw has quit [Remote host closed the connection]
Criztian_ has joined #ruby
rodasc has joined #ruby
krusty_ar has joined #ruby
hadees_ has joined #ruby
dhodgkin_ has joined #ruby
kenneth has joined #ruby
qwerxy has joined #ruby
poindont` has joined #ruby
Defusal_ has joined #ruby
IrishGringo_ has joined #ruby
coolwate_ has joined #ruby
kpshek has quit []
DMKE has joined #ruby
ereslibre_laptop has joined #ruby
ereslibre_laptop has quit [Changing host]
ereslibre_laptop has joined #ruby
wvdschel has joined #ruby
headius has quit [Quit: headius]
phrame_ has joined #ruby
mdhopkins_ has joined #ruby
emmanuelux has joined #ruby
chrismcgh has joined #ruby
rpgsimmaster_ has joined #ruby
kalleth__ has joined #ruby
jacobw2 has joined #ruby
epochwolf|vps2 has joined #ruby
epochwolf|vps2 has quit [Changing host]
epochwolf|vps2 has joined #ruby
ozzloy_ has joined #ruby
nebiros_ has joined #ruby
kmwhite_ has joined #ruby
kaktus has joined #ruby
mnaser_ has joined #ruby
Vendethiel has quit [Ping timeout: 245 seconds]
flagg0205 has joined #ruby
sv__ has joined #ruby
rpgsimmaster_ has quit [Client Quit]
jenrzzz-mac has quit [Quit: jenrzzz-mac]
looopy has quit [Remote host closed the connection]
schovi has quit [Ping timeout: 260 seconds]
TaTonka_ has joined #ruby
aetaric_ has joined #ruby
eighty4_ has joined #ruby
Limb_ has joined #ruby
emmanuel__ has joined #ruby
tectonic_ has joined #ruby
GordonFreeman has joined #ruby
nopper` has joined #ruby
Azure|dc has joined #ruby
companio- has joined #ruby
coolwaters has quit [*.net *.split]
ozzloy has quit [*.net *.split]
Criztian has quit [*.net *.split]
kaktus_ has quit [*.net *.split]
tectonic has quit [*.net *.split]
Defusal has quit [*.net *.split]
twodollarz has quit [*.net *.split]
mnaser has quit [*.net *.split]
IrishGringo has quit [*.net *.split]
td123 has quit [*.net *.split]
Hanmac has quit [*.net *.split]
kalleth has quit [*.net *.split]
hadees has quit [*.net *.split]
Dr4g has quit [*.net *.split]
nat2610 has quit [*.net *.split]
kryptek_ has quit [*.net *.split]
flagg0204 has quit [*.net *.split]
TaTonka has quit [*.net *.split]
companion_ has quit [*.net *.split]
denysonique has quit [*.net *.split]
sspiff has quit [*.net *.split]
iamjarvo has quit [*.net *.split]
DavidTiger has quit [*.net *.split]
sonkei has quit [*.net *.split]
sam113101 has quit [*.net *.split]
dkannan has quit [*.net *.split]
anildigital_work has quit [*.net *.split]
notbrent has quit [*.net *.split]
nisstyre has quit [*.net *.split]
mdhopkins has quit [*.net *.split]
MoMo has quit [*.net *.split]
MetaCosm has quit [*.net *.split]
otters has quit [*.net *.split]
pkondzior has quit [*.net *.split]
lectrick has quit [*.net *.split]
cesario has quit [*.net *.split]
ziyadb has quit [*.net *.split]
Limb has quit [*.net *.split]
Azure has quit [*.net *.split]
zz_chrismcg has quit [*.net *.split]
whuffor has quit [*.net *.split]
nopper has quit [*.net *.split]
crodas has quit [*.net *.split]
jacobw has quit [*.net *.split]
poindontcare has quit [*.net *.split]
kmwhite has quit [*.net *.split]
rpgsimmaster has quit [*.net *.split]
nebiros has quit [*.net *.split]
aetaric has quit [*.net *.split]
sv- has quit [*.net *.split]
eighty4 has quit [*.net *.split]
ereslibre has quit [*.net *.split]
mattp_ has quit [*.net *.split]
Gonzih has quit [*.net *.split]
dhodgkin has quit [*.net *.split]
phrame has quit [*.net *.split]
epochwolf|vps has quit [*.net *.split]
dhodgkin_ is now known as dhodgkin
tectonic_ is now known as tectonic
phrame_ is now known as phrame
hadees_ is now known as hadees
TaTonka_ is now known as TaTonka
mdhopkins_ is now known as mdhopkins
aetaric_ is now known as aetaric
Azure|dc is now known as Azure
Sheehan has quit [Quit: Sheehan]
rdesfo has joined #ruby
uris has quit [Quit: leaving]
v0n has quit [Quit: Quitte]
mattp_ has joined #ruby
Facefox has quit [Ping timeout: 240 seconds]
sako has joined #ruby
ozzloy_ is now known as ozzloy
pk1001100011 has quit [Ping timeout: 244 seconds]
becom33 has joined #ruby
emmanuel__ has quit [Remote host closed the connection]
emmanuelux has quit [Remote host closed the connection]
DrShoggoth has quit [Quit: Leaving]
fgwaegeawgfwa has joined #ruby
Gavilan has quit [Ping timeout: 244 seconds]
bradb has joined #ruby
tatsuya_o has quit [Remote host closed the connection]
emmanuelux has joined #ruby
nat2610 has joined #ruby
notbrent has joined #ruby
Gonzih has joined #ruby
twodollarz has joined #ruby
otters has joined #ruby
DavidTiger has joined #ruby
fbernier has quit [Ping timeout: 240 seconds]
whuffor has joined #ruby
iamjarvo has joined #ruby
sonkei has joined #ruby
saschagehlich has quit [Quit: saschagehlich]
nisstyre has joined #ruby
sako has quit [Ping timeout: 265 seconds]
sam113101 has joined #ruby
Hanmac has joined #ruby
Facefox has joined #ruby
zeromodulus has joined #ruby
jgarvey has quit [Quit: Leaving]
schickung has joined #ruby
GordonFreeman is now known as td123
DMKE has quit [Quit: Pingpong.]
MasterIdler_ has joined #ruby
tris has quit [Excess Flood]
MasterIdler_ has quit [Client Quit]
Croms has joined #ruby
williamcotton has joined #ruby
denysonique has joined #ruby
MasterIdler has quit [Ping timeout: 245 seconds]
MrGando has joined #ruby
Dr4g has joined #ruby
proghat has joined #ruby
kenneth has quit [Read error: Connection reset by peer]
ziyadb has joined #ruby
tris has joined #ruby
kenneth has joined #ruby
dv_ has quit [Read error: Connection reset by peer]
lectrick has joined #ruby
cesario has joined #ruby
pdtpatrick has quit [Read error: Connection reset by peer]
Guest20110 has quit [Ping timeout: 245 seconds]
pdtpatrick has joined #ruby
Bosma has quit [Quit: leaving]
MoMo has joined #ruby
MetaCosm has joined #ruby
andrewhl has quit [Remote host closed the connection]
dv_ has joined #ruby
andrewhl has joined #ruby
robotmay has quit [Remote host closed the connection]
anildigital_work has joined #ruby
cbuxton has quit [Ping timeout: 240 seconds]
d3vic3 has joined #ruby
dv_ has quit [Read error: Connection reset by peer]
chomp has quit [Quit: Leaving]
billiamii has quit []
looopy has joined #ruby
roams has quit [Ping timeout: 244 seconds]
indian has joined #ruby
youdonotexist has quit [Quit: youdonotexist]
brianpWins has quit [Quit: brianpWins]
looopy_ has joined #ruby
pkondzior has joined #ruby
Sheehan has joined #ruby
Guest52008 has quit [Ping timeout: 245 seconds]
looopy has quit [Ping timeout: 244 seconds]
DuoSRX has quit [Remote host closed the connection]
Bosma has joined #ruby
nfk has quit [Quit: yawn]
digitalcakestudi has joined #ruby
pcboy_ has quit [Ping timeout: 245 seconds]
baroquebobcat has quit [Quit: baroquebobcat]
Progster has quit [Ping timeout: 240 seconds]
Aaton is now known as Aaton_off
albemuth has quit [Quit: Computer has gone to sleep.]
qwerxy has quit [Quit: offski]
ZachBeta has quit [Quit: Computer has gone to sleep.]
Sheehan has quit [Quit: Sheehan]
jord_ has joined #ruby
d3vic3 has quit [Quit: leaving]
Guest52008 has joined #ruby
Markvilla has quit [Quit: Markvilla]
ZachBeta has joined #ruby
Markvilla has joined #ruby
TomJ has joined #ruby
TomJ has joined #ruby
radic has joined #ruby
oooPaul has quit [Quit: Ciao for now!]
artOfWar has quit [Ping timeout: 256 seconds]
kirun has quit [Quit: Client exiting]
kenneth has quit [Read error: Connection reset by peer]
looopy_ has quit [Remote host closed the connection]
zeromodulus has quit [Remote host closed the connection]
becom33 has joined #ruby
ph^ has quit [Ping timeout: 245 seconds]
dcolebatch has quit [Quit: Weekend?! :)]
andrewhl has quit [Remote host closed the connection]
emmanuelux has quit [Quit: @+]
emmanuelux has joined #ruby
Sheehan has joined #ruby
IPGlider has quit []
BrokenCog has joined #ruby
<MrGando>
Hey guys, are words used more than symbol operators for things like ! vs not , or the infamous unless ? what is a better practice , to try to always use 'words' ? or 'symbols' ?
<jamesaxl>
MrGando, both are recommend , and use what you want
<MrGando>
jamesaxl what are big projects using these days ? like rails ? a mixture of both ? only words ? only symbols ?
nobitanobi has quit [Quit: Leaving.]
RegEchse has quit [Quit: <3 WeeChat (v0.3.8-rc2)]
<jamesaxl>
MrGando, there is many way to do it
chessguy has joined #ruby
zx has joined #ruby
<banister_>
MrGando: people use symbols
<MrGando>
jamesaxl hmmm, would love to read an elaborate discussion on the subject. I'm trying to enforce coding standards on a project and I need to take a more informed decision
<banister_>
MrGando: the 'and' / 'or' are used in different contexts, they're not used really as boolean operators so much as flow control operators
autojack has left #ruby [#ruby]
<banister_>
MrGando: but in fact, i hardly see and/or used at all. I would say it's almost non-idiomatic to use them
<Spooner>
and/or/not have different precedence than &&/||/!, which means it often makes more sense to use one or the other.
olrrai__ has quit [Quit: Saliendo]
<MrGando>
banister_ what about equal, eql , and == === etc ?
<banister_>
MrGando: those are completely different
olrrai has joined #ruby
<banister_>
MrGando: they have different meaning altogether, they're not analogous to the case of and/&&
<MrGando>
banister_ you mean is a different case than and, or, not ?
<banister_>
MrGando: so dont talk about them in teh same breath
<MrGando>
banister_ ok, I thought so
azm has quit [Ping timeout: 245 seconds]
<banister_>
MrGando: why dont you buy a book? :)
<MrGando>
banister_ ( I read about those and thought they where different things and each had it's own uses )
<banister_>
MrGando: this kidn of stuff you get from reading a book
cpruitt has quit [Quit: cpruitt]
<banister_>
MrGando: Yeah, eql?, equal?, == and === have different behaviour
<chessguy>
anybody interested in pairing for a bit?
<banister_>
equal? is for when they're exactly the same object, as in the same place in memory
<MrGando>
banister_ well, I've read books that use and/or and others I've read are using && ||
<banister_>
MrGando: == is for semantic equality, where you define yourself what it means for 2 objects to be equal
<banister_>
MrGando: == is normally quite ducky-typey, in that the objects dont typically have to be the same type to be equal
<banister_>
MrGando: eql? is like == but less ducktypey, the objects typically share the same class
ZachBeta has quit [Quit: Computer has gone to sleep.]
<MrGando>
banister_ I understand, you can have two different string objects with the same contents... and have them being == , but not ===
<banister_>
MrGando: no, i haven't said what === means yet :)
<MrGando>
banister_ :$ hahaha
<MrGando>
banister_ sorry!
Sheehan has quit [Quit: Sheehan]
<banister_>
MrGando: and im sure it doesnt mean what u think it means :) === is not the same as equal?
banjara has quit [Quit: Leaving.]
minijupe has quit [Quit: minijupe]
<banister_>
=== is a weird operator called 'case equality', it's what's used in a case/when situation. in the case of classes, klass === obj is equivalent to obj.is_a?(klass), in teh case of Range u get range === obj, equivalent to range.include?(obj) and there's a few others
<MrGando>
banister_ thanks for the aclaration :)
<chessguy>
banister_: do you think of === as being like a semantic "matching" operator?
maccosmo_ has joined #ruby
ZachBeta has joined #ruby
tewecske has quit [Quit: Leaving.]
Criztian_ has quit [Remote host closed the connection]
tds has left #ruby [#ruby]
<MrGando>
banister_ any particular book you recommend ?
kenichi has quit [Remote host closed the connection]
sv__ has quit [Ping timeout: 265 seconds]
cbuxton has joined #ruby
maccosmo has quit [Ping timeout: 252 seconds]
maccosmo_ is now known as maccosmo
adamkittelson has quit [Remote host closed the connection]
emmanuelux has quit [Remote host closed the connection]