<msch>
I tried reading the gc.c code but my MRI-internals-foo is weak
Alina-malina has quit [Read error: Connection reset by peer]
chihhsin_cloud has joined #ruby
dik_dak has quit [Quit: Leaving]
freerobby has quit [Quit: Leaving.]
joelroa_ has quit [Ping timeout: 272 seconds]
binaryhat has joined #ruby
joelroa_ has joined #ruby
marcdel has joined #ruby
marcdel has quit [Client Quit]
mikepack has quit [Ping timeout: 264 seconds]
stryek has quit [Ping timeout: 240 seconds]
<centrx>
msch, Do you want to implement a destructor of some kind? Is that the idea?
mgberlin has quit [Remote host closed the connection]
<msch>
centrx yep. and it's working fine for every object except the latest
joelroa has quit [Ping timeout: 272 seconds]
<msch>
centrx e.g. I have two objects a, b and I do ObjectSpace.define_finalizer for a and b then only a gets finalized, while b stays around "forever" (found out via ObjectSpace.each_object)
<msch>
centrx and if I then define_finalizer for another object c, only then does b get finalized
joelroa has joined #ruby
joelroa has quit [Max SendQ exceeded]
habanany has joined #ruby
<centrx>
msch, It says right in the doc for define_finalizer that it is only called when the object is garbage collected
<msch>
centrx yes. and the object should be garbage collected, there are no more references to it (figured that also out via ObjectSpace)
joelroa_ has quit [Ping timeout: 240 seconds]
<centrx>
msch, The usual Ruby idiom would be to use a block of some kind, which executes your finalization at the end/after the block
<msch>
jep, but unfortunately that doesn't work in my case
<centrx>
msch, Garbage collection is not done immediately when an object has no more references...
joelroa has joined #ruby
<centrx>
msch, What is your case?
<msch>
centrx it is when I run GC.start (and it really only depends on whether or not I call define_finalizer before for another object. Creating arbitrary amounts of garbage before calling GC.start doesn't matter)
<msch>
centrx I'm working on a proper OO abstraction for Ruby's thread local variables. Basically Java's ThreadLocal
<Oog_>
in a block you just do lines with val1 val2 how is that interpreted?
joelroa has quit [Ping timeout: 264 seconds]
<Oog_>
is taht the same as :from => blah ?
<Oog_>
from blah
joelroa__ has joined #ruby
<pontiki>
that's a mini DSL
centrx has quit [Remote host closed the connection]
Matriks has joined #ruby
<Oog_>
whats that
<pontiki>
but from, to, subject, and body are actually methods implmented on the object returned from Mail.new
centrx has joined #ruby
<pontiki>
Domain Specific Language
habanany1 has quit [Quit: Leaving.]
<Oog_>
ohhh
habanany has joined #ruby
<Oog_>
they are methods
<Oog_>
ok i see
joelroa_ has quit [Ping timeout: 264 seconds]
randomnick_ has quit [Ping timeout: 246 seconds]
joelroa has joined #ruby
<Oog_>
thanks
matchaw has joined #ruby
segmond has joined #ruby
thejoecarroll has quit [Ping timeout: 264 seconds]
tungd has quit [Remote host closed the connection]
tungd has joined #ruby
zumba_addict has joined #ruby
joelroa__ has quit [Ping timeout: 264 seconds]
joelroa_ has joined #ruby
<Oog_>
before i write my own is there a string function that will take a string and return max X characters and if the string is longer than X make the last 3 chars in returned string ...
joelroa has quit [Ping timeout: 264 seconds]
slowcon has joined #ruby
<pontiki>
what?
joelroa has joined #ruby
Alina-malina has joined #ruby
thejoecarroll has joined #ruby
<Oog_>
like i have a long string and i want to display the first 17 characters with ... at the end but if the string < 20 chars i want the whole thing
<pontiki>
oh
<pontiki>
it'd probably take more time to search for one than to write it
<centrx>
ActiveSupport/Rails might have it
chihhsin_cloud has quit [Quit: Connection closed for inactivity]
joelroa_ has quit [Ping timeout: 272 seconds]
tungd has quit [Ping timeout: 272 seconds]
<Oog_>
you are rght truncate thanks
joelroa_ has joined #ruby
tungd has joined #ruby
centrx has quit [Quit: And...it's gone]
slowcon has quit [Quit: slowcon]
agent_white has quit [Ping timeout: 264 seconds]
joelroa has quit [Ping timeout: 272 seconds]
joelroa has joined #ruby
agent_white has joined #ruby
kobain has quit []
charliesome has joined #ruby
habanany has quit [Ping timeout: 272 seconds]
mikecmpbll has joined #ruby
tommyvyo__ has quit [Quit: Connection closed for inactivity]
joelroa_ has quit [Ping timeout: 272 seconds]
brian_____ has quit [Quit: brian_____]
PLejeck has joined #ruby
zumba_addict_ has joined #ruby
joelroa_ has joined #ruby
zumba_addict has quit [Ping timeout: 264 seconds]
zumba_addict_ is now known as zumba_addict
cj3kim_ has joined #ruby
tatsuo has quit [Remote host closed the connection]
_rohitnair88 has joined #ruby
joelroa has quit [Ping timeout: 264 seconds]
tungd has quit [Ping timeout: 264 seconds]
tatsuo has joined #ruby
tungd has joined #ruby
joelroa has joined #ruby
joelroa_ has quit [Ping timeout: 272 seconds]
Steve445 has joined #ruby
joelroa_ has joined #ruby
shaileshg has joined #ruby
zumba_addict_ has joined #ruby
<shaileshg>
Hi, what does *variable_name means in ruby
<shaileshg>
I have seen it being used like this
<shaileshg>
_, id, content = *m
joelroa has quit [Ping timeout: 272 seconds]
zumba_addict has quit [Ping timeout: 272 seconds]
zumba_addict_ is now known as zumba_addict
<shaileshg>
could anyone explain me ?
joelroa has joined #ruby
Okt has joined #ruby
mikecmpbll has quit [Quit: i've nodded off.]
Hien has quit [Ping timeout: 245 seconds]
<Steve445>
its it used in a argument?
Vovko has joined #ruby
<Steve445>
like def get_house_address(*args)
<shaileshg>
Steve445: no
mikepack has quit [Remote host closed the connection]
mikecmpbll has joined #ruby
<shaileshg>
there it would be unspecified number of arguments..
<shaileshg>
right?
tatsuo_ has joined #ruby
<charliesome>
shaileshg: it splats the m array out over teh variables on the left
mikepack has joined #ruby
<shaileshg>
its being used like a, b, c = *d
<charliesome>
_, id, content = *m is the same as
<charliesome>
_ = m[0]; id = m[1]; content = m[2]
<shaileshg>
charliesome: oh.. okay
joelroa_ has quit [Ping timeout: 272 seconds]
cj3kim_ has quit [Ping timeout: 272 seconds]
<charliesome>
well, mostly the same
tonyhb has joined #ruby
<shaileshg>
charliesome: what do you mean by mostly the same
<charliesome>
if m is an array that's how it works
<shaileshg>
if its not, then?
<charliesome>
if m is something else, then it behaves slightly differently but you shouldn't need to worry about that
joelroa_ has joined #ruby
Steve445 has quit [Quit: Steve445]
<shaileshg>
and if its on receiving side like.. txdist, *inputs = content.split(/_TXINPUT_/)
LaPetiteFromage has quit [Quit: LaPetiteFromage]
<shaileshg>
a, *b = c
<charliesome>
that puts the first element of the array in a
<shaileshg>
would a = c[0] and b=c[1..n]
<shaileshg>
?
<charliesome>
and the rest of the elements in b
<charliesome>
yes
jso has joined #ruby
joelroa has quit [Ping timeout: 272 seconds]
<shaileshg>
one place i found it being used though not an array
joelroa has joined #ruby
<shaileshg>
what would it mean then?
tatsuo has quit [Ping timeout: 272 seconds]
<charliesome>
it calls to_a on the element and turns it into an array
<shaileshg>
charliesome: oh. okay :)
<charliesome>
if the object doesn't have to_a it just wraps it in an array
<charliesome>
a, b = *1
<charliesome>
that sets a to 1 and b to nil
mikepack has quit [Ping timeout: 272 seconds]
<shaileshg>
charliesome: hmm.
<ryanuber>
i have a question on convention.
joelroa_ has quit [Ping timeout: 272 seconds]
joelroa_ has joined #ruby
<ryanuber>
when do/don't you use parenthesis in compound statements?
<ryanuber>
well, maybe that answers it.
<ryanuber>
if its compound you probably are required to use ()'s
<shaileshg>
when interepreter won't get confused without it
<shaileshg>
a b(c)
<diegoviola>
any vimmers here? what do you guys think of the neovim project?
Hien has joined #ruby
<diegoviola>
sounds fascinating to me
pierre1_ has joined #ruby
<shaileshg>
ryanuber: a b c would confused interpreter thinking b, c are args to a
Lightstalker has quit [Ping timeout: 264 seconds]
joelroa has quit [Ping timeout: 264 seconds]
banister has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
joelroa has joined #ruby
<shaileshg>
charliesome: is there any special meaning of "_" as a variable?
banister has joined #ruby
mikecmpbll has quit [Quit: i've nodded off.]
<charliesome>
nope
<charliesome>
by convention it means you're uninterested in the value
<shaileshg>
then why is _ used?
<popl>
22:55 < charliesome> by convention it means you're uninterested in the value
mikecmpbll has joined #ruby
<shaileshg>
popl: hmm
<ryanuber>
shaileshg: any idea if it makes any difference in the compiler?
<shaileshg>
ryanuber: there is no compiler as such..
joelroa_ has quit [Ping timeout: 272 seconds]
tungd has quit [Ping timeout: 272 seconds]
<shaileshg>
till a accepts two or more args, a b c should be fine.. but if a accepts only single arg, a b c would complain
bluehavana_ has quit [Quit: Connection closed for inactivity]
joelroa_ has joined #ruby
apeiros has quit [Remote host closed the connection]
apeiros has joined #ruby
<apeiros>
popl: hi there
joelroa has quit [Ping timeout: 272 seconds]
rootshift_ has joined #ruby
joelroa__ has joined #ruby
<popl>
apeiros: Hi.
<popl>
I have your code open in vim right now. :)
<popl>
I have been familiarizing myself with it.
<popl>
Well, between eating and other stuff.
klaut has joined #ruby
<apeiros>
:D
phansch has joined #ruby
<popl>
I thought I had a version of vim compiled with +ruby but I must have updated with my system package since then (Slackware's vim has support for python but not ruby).
<popl>
I was trying to get omnifunc to work.
joelroa_ has quit [Ping timeout: 272 seconds]
joelroa has joined #ruby
<popl>
I also changed fontsize in my terminal to better support the long lines in your code.
joelroa has quit [Max SendQ exceeded]
<apeiros>
oh, you're an 80 columner? :)
<popl>
I'm old, man. :P
<apeiros>
heh
<popl>
Anyways, usually yeah.
<popl>
But I am not stuck to it.
<popl>
I do have a colorcolumn set in vim to remind me if I'm going over.
yasu____ is now known as yasu
<popl>
apeiros: It's probably mostly a holdover from university
<popl>
.
joelroa__ has quit [Ping timeout: 272 seconds]
<popl>
old habits…
joelroa has joined #ruby
<popl>
apeiros: Anyways, thanks for letting me take a look and all. I'm learning about Ruby too.
browndawg has quit [Read error: Connection timed out]
<popl>
(from your code, I mean)
beond has quit [Quit: beond]
milhite has joined #ruby
jlebrech has quit [Quit: Computer has gone to sleep.]
<apeiros>
I generally try to stay below 100 cols. with bbedit I had rulers on 100 and 120. but since switching to sublime, I no longer have them :(
<zxd>
need some help with god, it seems it dosen't find the gems when running a ruby program
<zxd>
if I run it manually it works
<apeiros>
zxd: you need a priest
<popl>
Ah, I was going to ask what you used to edit.
<apeiros>
*scnr*
<jhass>
apeiros: :o sublime does support rulers (even multiples at the same time!)
<zxd>
running in rvm environment
<apeiros>
jhass: great. I was too lazy to research that. but since you know how…
<apeiros>
jhass: where/how can I activate them?
plexus_ has joined #ruby
<popl>
probably some clicky thing
browndawg has joined #ruby
<popl>
;)
<apeiros>
popl: sublime sadly has most of its config in .json files
joelroa_ has joined #ruby
<jhass>
just add "rulers": [80, 100, 120] to your user settings
<popl>
hah
<popl>
could be worse, I guess
<apeiros>
noice!
<apeiros>
thanks jhass. I'm now rulerified
end_guy has quit [Ping timeout: 240 seconds]
<jhass>
yw
carraroj has quit [Ping timeout: 272 seconds]
joelroa has quit [Ping timeout: 264 seconds]
AxonetBE has quit [Quit: AxonetBE]
<apeiros>
fuck. sunday. last holiday :(
joelroa__ has joined #ruby
<apeiros>
and I only polished 2 gems
<apeiros>
and didn't even finish polishing the 2nd
<popl>
You're on holiday?
<apeiros>
yeah, last 14 days
end_guy has joined #ruby
ItSANgo_ has joined #ruby
joelroa_ has quit [Ping timeout: 264 seconds]
joelroa has joined #ruby
<popl>
Oh well. You can do that (polish your gems) when you're supposed to be working. ;)
<apeiros>
sadly, I'm too loyal to do that :-/
cj3kim_ has joined #ruby
m104 has quit [Quit: bye]
lkba has quit [Ping timeout: 264 seconds]
eka has joined #ruby
<popl>
I probably would be, too, if I had a decent job. :P
joelroa__ has quit [Ping timeout: 264 seconds]
cj3kim has quit [Ping timeout: 264 seconds]
joelroa_ has joined #ruby
<apeiros>
yeah, I guess if my job was not decent, I wouldn't be loyal either.
<popl>
I don't work in software right now. :(
kitak has quit [Remote host closed the connection]
joelroa has quit [Ping timeout: 272 seconds]
lewix has joined #ruby
WillAmes has joined #ruby
phreax has joined #ruby
Guest46592 has joined #ruby
Guest24602 has joined #ruby
go|dfish has joined #ruby
txdv has joined #ruby
yxhuvud has quit [Quit: Leaving]
Alina-malina has quit [Quit: Leaving]
yxhuvud has joined #ruby
joelroa_ has quit [Ping timeout: 264 seconds]
joelroa has joined #ruby
Wolland has quit [Remote host closed the connection]
mneorr has joined #ruby
mlpinit has joined #ruby
joelroa_ has joined #ruby
agjacome has joined #ruby
alexju has quit [Remote host closed the connection]
vlad_starkov has joined #ruby
lewix has quit [Ping timeout: 264 seconds]
ultraflash3 has quit [Remote host closed the connection]
joelroa has quit [Ping timeout: 264 seconds]
joelroa__ has joined #ruby
browndawg has quit [Read error: Connection timed out]
relix has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<apeiros>
class variables not only exist, they're even shared.
joelroa_ has quit [Ping timeout: 265 seconds]
SolarSailor has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<apeiros>
which is why they're generally being disadvised
<jokke>
oh they're shared
<jokke>
that kinda sucks
<certainty>
that's a way to put it :)
joelroa_ has joined #ruby
<apeiros>
yeah. use instance variables in the class level instead.
wchun has quit [Quit: Leaving]
<jokke>
huh?
<certainty>
huhu
<apeiros>
class Foo; @bar = "default"; class << self; attr_accessor :bar; end; end
meatherly has joined #ruby
<jokke>
oh ok
<apeiros>
aha
<popl>
certainty: less coffee, more whiskey
<jokke>
apeiros: i think i found a way around it
joelroa has quit [Ping timeout: 252 seconds]
vlad_starkov has joined #ruby
joelroa has joined #ruby
<diegoviola>
any vimmers here? what do you guys think of this "neovim" project that aims to refactor and modernize the vim codebase? http://neovim.org/
<certainty>
popl: it's 11:50 am here
<certainty>
or you mean irish coffee?
joelroa_ has quit [Ping timeout: 246 seconds]
AxonetBE has joined #ruby
ItSANgo_ has quit [Quit: Leaving...]
meatherly has quit [Ping timeout: 240 seconds]
<popl>
certainty: You could certainly do that.
joelroa_ has joined #ruby
<certainty>
certainly :)
<pipework>
diegoviola: it's exciting
<shevy>
popl less coffee more whiskers?
<diegoviola>
pipework: sure
<popl>
The earliest I've ever had a drink was 8-9 in the morning.
browndawg has joined #ruby
gigetoo has joined #ruby
brucele_ has joined #ruby
<popl>
shevy: What am I, a cat?
<brucele_>
what does line 4 of this code actually do?
<diegoviola>
pipework: i've sent an email to the vim_dev@googlegroups.com mailing list asking Bram Moolenaar about his opinion on this project
<diegoviola>
pipework: let's wait and see what he has to say
<pipework>
diegoviola: Wait on your own. I don't really have much interest in what he has to say.
<pipework>
Ask tpope instead.
joelroa has quit [Ping timeout: 252 seconds]
<diegoviola>
pipework: ok
joelroa has joined #ruby
<diegoviola>
sorry about that. :)
<popl>
I use tpope's vim stuff
<jokke>
okay, i can't wrap my head around this. I'm writing a dsl and i need a class to be namespaced. So in my "config" i could write something like Namespace.new :foo do; Bar.new :bar do; # bar has namespace :foo; end; end; Bar.new :foobar do # foobar has namespace :global; end
<jokke>
you know what i mean/
<jokke>
?
joelroa_ has quit [Ping timeout: 240 seconds]
<jokke>
i have no idea how or where i could keep track of the namespace.
ultraflash3 has joined #ruby
<jokke>
i know Bar.new :foo :namespace do; end would be much easier...
<plexus_>
jokke: typically you would have a global to thread-local "current_namespace" somewhere
<plexus_>
that
<plexus_>
that's how Shoes and Rake do it
joelroa_ has joined #ruby
<jokke>
plexus_: aah
<plexus_>
at least I'm certain Shoes does it that way
<jokke>
that totally makes sens
<jokke>
e
vlad_starkov has quit [Remote host closed the connection]
<apeiros>
plexus_: I seriously doubt that rake does it that way
<jokke>
i just need to be careful when setting it
<jokke>
so that i don't store it as a reference but as a copy
<apeiros>
at least rake can easily track the current namespace, and I don't see how such an pattern would be necessary.
vlad_starkov has joined #ruby
vlad_starkov has quit [Remote host closed the connection]
joelroa has quit [Ping timeout: 264 seconds]
joelroa has joined #ruby
<apeiros>
jokke: as plexus_ points out without telling - your real problem lies not with where to store it, but how to access it. cause of this is that Bar.new is not part of your DSL
<apeiros>
Fractional_: ruby convention has Foo::BarBaz in foo/barbaz.rb
<apeiros>
Fractional_: rails convention has Foo::BarBaz in foo/bar_baz.rb
<Fractional_>
apeiros: What do you mean by Barbaz?
<jokke>
apeiros: you lost me there
joelroa_ has quit [Ping timeout: 246 seconds]
<jokke>
whats thingy Bar, :bar do ... end
<jokke>
?
andy__ has joined #ruby
nyuszika7h has joined #ruby
brucele_ has quit [Ping timeout: 264 seconds]
aryaching has joined #ruby
nyuszika7h has left #ruby ["WeeChat 0.4.4-dev"]
<plexus_>
jokke: just an example of a DSL method
joelroa_ has joined #ruby
<apeiros>
jokke: the equivalent to your Bar.new :bar do … end
<jokke>
oh. yeah
<apeiros>
jokke: but I have no idea what your DSL is building, so I can't provide a meaningful name
<apeiros>
hence 'thingy'
<jokke>
ok
<plexus_>
his point is you can keep track of the current context without having to resort to globals I think
<apeiros>
correct
<jokke>
hmm
joelroa has quit [Ping timeout: 246 seconds]
<apeiros>
`namespace :foo do` creates a proxy which tracks the namespace. since thingy is called in that proxy, thingy knows it's currently in :foo, and that :bar is [:foo, :bar]
<apeiros>
and I'm pretty sure that's how rake does it
reflux has joined #ruby
joelroa has joined #ruby
<jokke>
:/
<jokke>
sorry, i'm way too unexperienced in dsls to get what you're saying :D
<pipework>
diegoviola: Seems like something I wouldn't mind.
joelroa_ has quit [Ping timeout: 252 seconds]
<diegoviola>
pipework: fine, but you sugggested to ask him
joelroa_ has joined #ruby
nism has joined #ruby
joelroa has quit [Ping timeout: 240 seconds]
<shevy>
perhaps pipework did not mean it :>
dingus_khan has quit [Remote host closed the connection]
carraroj has joined #ruby
carraroj has quit [Client Quit]
agent_white has joined #ruby
<diegoviola>
or you are referring to the removal of the vi compatibility?
<pipework>
Oh, I meant it. His opinion is pretty good. But I don't mind the implications personally.
nism has quit [Read error: Connection reset by peer]
andy__ has quit [Ping timeout: 240 seconds]
agent_white has left #ruby [#ruby]
<pipework>
I'm a mere user who only makes his own colorschemes and silly plugins
joelroa has joined #ruby
browndawg has quit [Read error: Connection timed out]
<diegoviola>
pipework: are you referring to the removal of the vi compatibility? or you say that you don't mind about his opinion?
<diegoviola>
not sure i understand, sorry
<pipework>
diegoviola: I don't care about removing vi compatibility, and I don't mind the implications of operating systems not shipping with neovim because it doesn't have that 'feature'
<diegoviola>
I see
wjlafrance has quit [Quit: This computer has gone to sleep]
<diegoviola>
why not have more core developers then
<shevy>
do you want the granddads to be software maintainers?
<pipework>
Sure, why not?
<pipework>
diegoviola: Perhaps he hasn't found anyone who is able to meet his standards.
<diegoviola>
what if the community splits and then they don't care about maintaining vim compatibility anymore and then we have plugins that work with neovim and doesn't in vim, and vice-versa
<pipework>
such is life
joelroa has quit [Ping timeout: 264 seconds]
<diegoviola>
emacs community will be laughing at us
joelroa has joined #ruby
bleak has joined #ruby
francisfish has quit [Remote host closed the connection]
rickruby has joined #ruby
<certainty>
don't think so
<pipework>
diegoviola: We'll laugh at them for years to come because they may have the best tetris client, but we have an acceptable editor something they've never been able to accomplish.
maztah is now known as maZtah
francisfish has joined #ruby
mjs2600 has quit [Ping timeout: 264 seconds]
<jokke>
apeiros: but i'm not going to use instance_eval
davidcollom_ is now known as davidcollom
<jokke>
i'm just gonna yield self
<shevy>
Linus Torvalds 1991 started linux, age: 23. matz created ruby when he was 30, larry created perl when he was 33, guido created python when he was 35
<diegoviola>
pipework: they have evil-mode
shredding has joined #ruby
<diegoviola>
haha
<popl>
shredding: I have ten toenails.
<certainty>
and viper and whatnot
<popl>
s/shredding/shevy/
<shredding>
Nice for u
<pipework>
If only they had a good text editor.
<popl>
shredding: sorry.
<diegoviola>
pipework: evil mode
<shredding>
:)
<pipework>
diegoviola: And?
<shevy>
popl cool, what can your toenails implement?
joelroa_ has quit [Ping timeout: 265 seconds]
mercwithamouth has joined #ruby
joelroa_ has joined #ruby
davidcollom is now known as davidcollom_
<certainty>
rms started on GNU Emacs when he was around 30 as well
davidcollom_ is now known as davidcollom
<certainty>
seems to be a good age
<shevy>
certainty don't depress me :(
oracal has quit [Ping timeout: 264 seconds]
<shevy>
things go downhill past that... bram started on vim when he was 30
<popl>
shevy: each can help implement the growth of millions of dermatophytes.
joelroa has quit [Ping timeout: 252 seconds]
OdNairy has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<shevy>
popl damn you are a fungus man!
rickruby has quit [Ping timeout: 265 seconds]
<pipework>
shevy: Are you 12?
<shevy>
like those thingies in invasion of the body snatchers... except that they were more zombie plants like
francisfish has quit [Ping timeout: 252 seconds]
<certainty>
well those were exceptional people
joelroa has joined #ruby
<shevy>
pipework Are you stupid?
<diegoviola>
pipework: vim is good, if evil-mode can make emacs more like "vim" then they already have a good editor.
<popl>
Yeah, Linus only implemented two new lives.
<certainty>
s/were/are/
<pipework>
shevy: By some measure, yes.
<popl>
What a selfish individual.
<pipework>
diegoviola: Not sure.
<shevy>
pipework nah I think you are very clever, you just pretend
<pipework>
shevy: I don't even know how to spell clever.
OdNairy has joined #ruby
<shevy>
like saying "hey it is no problem if a coder is 60 years old!!!"
* popl
<-
<diegoviola>
pipework: it probably won't be the same, but if it's more like vim then it's probably better...
<popl>
;P
<diegoviola>
pipework: or improved
<pipework>
shevy: Is it?
<shevy>
pipework you said it is not
<certainty>
diegoviola: again i don't think so. What don't you like about emacs?
browndawg has joined #ruby
<pipework>
shevy: I don't see why ageism would have a place in this.
<diegoviola>
certainty: i never tried emacs and i never said it's bad
<popl>
shevy: Are you Italian?
<shevy>
right because the granddads are performing so well
<diegoviola>
certainty: i actually "ran" emacs a few times but i never really used it
<shevy>
popl nope
<certainty>
diegoviola: you said it would probably be better if it was more like vi :)
<pipework>
Young people are just as likely to let their projects go unmaintained, but not for the excusable reason that the developer has expired.
<certainty>
or vim
joelroa_ has quit [Ping timeout: 240 seconds]
<diegoviola>
certainty: well i shouldn't have said that, i was just responding to pipework because he said emacs would never have a good editor
<shevy>
still they happily outperform your granddaddies, fail early, fail often
<pipework>
TIL shevy wants to use software written by toddler.
rootshift_ has quit [Quit: My MacBook has decided to go to sleep. Zzzz..]
mavcunha_ has quit [Ping timeout: 240 seconds]
joelroa_ has joined #ruby
tacos1de has joined #ruby
ultraflash3 has quit [Read error: Operation timed out]
joelroa has quit [Ping timeout: 265 seconds]
joelroa has joined #ruby
meatherly has joined #ruby
habanany has joined #ruby
yfeldblum has quit [Remote host closed the connection]
<apeiros>
shevy: some things in stdlib are ancient…
aryaching has joined #ruby
yfeldblum has joined #ruby
joelroa_ has quit [Ping timeout: 240 seconds]
<shevy>
hehe
joelroa_ has joined #ruby
meatherly has quit [Ping timeout: 248 seconds]
joelroa has quit [Ping timeout: 240 seconds]
tacos1de has quit [Remote host closed the connection]
DrCode has quit [Remote host closed the connection]
ktosiek has quit [Ping timeout: 264 seconds]
tacos1de has joined #ruby
<certainty>
i'd go with EscapeHTML in this case for the acronym rule you suggested
joelroa has joined #ruby
arianit has quit [Ping timeout: 252 seconds]
ktosiek has joined #ruby
p8952 has joined #ruby
yfeldblum has quit [Ping timeout: 265 seconds]
brucele_ has quit [Ping timeout: 264 seconds]
<shevy>
EscapeHTML.escapeHTML()
joelroa_ has quit [Ping timeout: 246 seconds]
DrCode has joined #ruby
<apeiros>
methods are always lowercase, not much to discuss there :-p
<apeiros>
escape_html
<shevy>
I think the problem is that, class CGI or class Cgi, is not so much a difference, class CGI probably looks better. but the moment you want to append something to that, things can look ugly
<shevy>
how about
<shevy>
class CSS_Transformer
<shevy>
:)
joelroa_ has joined #ruby
agjacome has quit [Quit: leaving]
arietis has joined #ruby
<apeiros>
u.g.l.y.
<hermanmunster>
U_G_L_Y
<apeiros>
shevy: CSS::Transformer
Butcho has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
joelroa has quit [Ping timeout: 246 seconds]
<hermanmunster>
I would stick with CSSTransformer
Butcho has joined #ruby
ctp has quit [Quit: Leaving...]
<hermanmunster>
and then i would get on with the rest of my life :)
reflux has quit [Ping timeout: 240 seconds]
makara has quit [Ping timeout: 265 seconds]
joelroa has joined #ruby
<toretore>
i don't understand why this is even a question, there is only one correct and obvious answer
<toretore>
CSSTransformer
jsilver_ has quit [Read error: Connection reset by peer]
<toretore>
it's the way it's always been
jsilver has joined #ruby
Butcho has quit [Client Quit]
mavcunha has quit [Quit: Computer has gone to sleep.]
<pontiki>
i think certainty won that round
joelroa_ has quit [Ping timeout: 246 seconds]
posu has joined #ruby
<shevy>
hmmm
joelroa_ has joined #ruby
<shevy>
ruby people can never agree on anything
mikecmpbll has joined #ruby
<hermanmunster>
i think we agreed... CSSTransformer
<hermanmunster>
but it doesn't matter. call it CatBag
<shevy>
but apeiros did not agree!
<shevy>
CatBag would be much simpler
<vlad_starkov>
Question: Is it a good convention to use _underscores in private methods names?
<toretore>
no
joelroa has quit [Read error: Operation timed out]
reflux has joined #ruby
<shevy>
vlad_starkov I don't think you will find many ruby people do that
<toretore>
apeiros: but what is "improperly initialized"?
<apeiros>
toretore: setting it to nil
<apeiros>
you can't operate on it until you access it for the first time
posu has joined #ruby
<vlad_starkov>
Question: do I need to call explicitly `attr_reader :something` if I already set method `def something ... end` ?
tanema has joined #ruby
<apeiros>
toretore: e.g. if @_data results in a hash, proper initialization would be {}
Olipro has quit [Ping timeout: 246 seconds]
sameerynho has quit [Quit: Leaving]
<apeiros>
vlad_starkov: no
<apeiros>
vlad_starkov: attr_reader :something creates a def something
<apeiros>
so all you'd end up with is overriding one of the two methods, depending which you do first
<vlad_starkov>
apeiros: I mean, the :something is just computable value
<apeiros>
`attr_reader :something` results in `def something; return @something; end`
joelroa_ has quit [Ping timeout: 240 seconds]
<vlad_starkov>
apeiros: nice, thanks!
joelroa_ has joined #ruby
joelroa has quit [Ping timeout: 265 seconds]
Matriks has joined #ruby
<certainty>
apeiros: again to _ vs. _something for unused vars. I don't get it. If they're unused names are meaningless. As soon you're using them you'll give them a proper name
<apeiros>
certainty: unused doesn't mean meaningless
tanema has quit [Ping timeout: 246 seconds]
<apeiros>
certainty: for somebody reading the code it can have value to understand what you're not using
joelroa has joined #ruby
joelroa has quit [Max SendQ exceeded]
<apeiros>
certainty: btw., sometimes I don't even use _ for unused vars
ctp has joined #ruby
<apeiros>
as it is, def foo(used, *) is valid in ruby :D
tjr9898 has joined #ruby
<toretore>
_foo communicates that 1) it's unused and 2) what it is
<apeiros>
same for: x,y,* = whatever
dorei has quit []
<apeiros>
or proc { |x,*|
<certainty>
but as the code doesn't use it, why would i care?
<apeiros>
certainty: if you never read the code, you wouldn't
<apeiros>
15:16 apeiros: certainty: unused doesn't mean meaningless
<apeiros>
15:16 apeiros: certainty: for somebody reading the code it can have value to understand what you're not using
timonv has quit [Remote host closed the connection]
<apeiros>
sorry, but I can only repeat what I already said.
<certainty>
yeah yeah i get that, i'm thinking of examples
<apeiros>
every case is equivalently an example.
shredding has quit [Quit: shredding]
timonv has joined #ruby
<certainty>
def foo(x,_); code_that_never_uses__; end
<certainty>
no need to know what _ is since it is not used
<pontiki>
code is a letter to our future selves and others
joelroa_ has quit [Ping timeout: 264 seconds]
opter has joined #ruby
Guest97300 has quit [Quit: Konversation terminated!]
Azure has quit [Read error: Connection reset by peer]
aagdbl has quit [Quit: Leaving]
joelroa has joined #ruby
<apeiros>
def foo(x,_) does not answer the questions: "what did I ignore?" and "why did I ignore them?"
<certainty>
i know all that, i'm with you generally but for this case i don't see the value
<apeiros>
the "what" often also answers the "why"
charliesome has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<apeiros>
it's the same story all over as "why would I name my vars anything else than a,b,c…?"
<apeiros>
the code doesn't care
<apeiros>
neither will anybody never reading your code
<certainty>
it's easier to reason about the code if they are meaningful
<apeiros>
15:18 apeiros: 15:16 apeiros: certainty: unused doesn't mean meaningless
<apeiros>
:-p
<certainty>
also sometimes leaving stuff out actually tells something
Azure has joined #ruby
<apeiros>
no
<apeiros>
it may now, to you, because *you* *now* still know what you actually left off.
ktosiek has quit [Quit: No Ping reply in 90 seconds.]
<opter>
hi, I'm something kinda weird is happening. I can run my ruby script from the terminal, but not from text mate2. from textmate2 it tells me, Loaderror: cannot load such file. any ideas?
<apeiros>
it's infinitely harder to figure out what has been left off/out than understanding something which is there.
<toretore>
certainty: think blocks instead: something.each{|_foo, bar, _baz| do_something_with(bar) }
<apeiros>
try some of those "spot the missing thing" pics.
lolmaus has quit [Quit: No Ping reply in 180 seconds.]
krnflake has quit [Excess Flood]
lolmaus has joined #ruby
<apeiros>
it's hard even if the diff happens in only a couple of seconds.
<apeiros>
it's no different for code.
justinxreese has quit [Ping timeout: 244 seconds]
krnflake has joined #ruby
<pontiki>
opter: does textmate have the same running environment as your terminal session (i srsly doubt it does)
ktosiek has joined #ruby
<opter>
pontiki: I would agree with you, but not sure how to check or set it.
joelroa has quit [Ping timeout: 240 seconds]
kindjal has joined #ruby
JStoker has quit [Excess Flood]
SolarSailor has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
justinxreese has joined #ruby
<certainty>
toretore: why would i prefer that over |_,bar,_|? damn i'm lagging
<certainty>
maybe i'm just being thick with that one
JStoker has joined #ruby
<pontiki>
it's been ages and ages since i ran textmate, so i'm not sure how to do this, but if you can execute a program from inside textmate, run 'gem env'
<apeiros>
*you* *now* know what those variables are. why bother to name them?
tanema has joined #ruby
<apeiros>
inventory style :D
<apeiros>
same reason why I initialize my lazy ivars with nil in initialize.
joelroa__ has joined #ruby
<toretore>
i don't do that with getters, i think it's clear enough
<certainty>
apeiros: who said i don't? nah it makes sense now
<opter>
pontiki: can I run gem env within a gem file? when I do from text mate, I get a namerror
<certainty>
toretore: oh i've seen this alot in Prolog
<toretore>
nobody will ever see the ivar apart from the getter
<apeiros>
toretore: I do it with all ivars
joelroa has quit [Ping timeout: 265 seconds]
<apeiros>
toretore: that way all I have to look at is initialize and I know what's available in a class
<apeiros>
no hidden secrets
danshultz has joined #ruby
* apeiros
is lazy and likes to make his live easy
<toretore>
i think it's a sort of philosophical decision for me: ivars for getters aren't supposed to be visible to anyone else
akitada has joined #ruby
bbloom has joined #ruby
<apeiros>
well, the person who reads the code of initialize is the person who works on the class definition. so not part of "anyone else"
joelroa_ has quit [Ping timeout: 264 seconds]
<opter>
pontiki: i ran Gem.path and got /usr/local/opt/rbenv/versions/1.9.3-p392/lib/ruby/gems/1.9.1 from text mate and /usr/local/opt/rbenv/versions/2.1.0-rc1/lib/ruby/gems/2.1.0
<opter>
from the terminal
<apeiros>
and I don't do handholding for people who go against best practices like "don't inherit from classes you don't own" and "don't access internals of an object"
<toretore>
i actually try to not have any ivars in my initialize
<apeiros>
those people either know what they're doing and are aware of the inherent risks, or they deserve to get bitten :)
joelroa has joined #ruby
<apeiros>
toretore: then what do you use initialize for, if not for, you know, initializing?
joelroa__ has quit [Read error: Operation timed out]
dorei has joined #ruby
<shevy>
apeiros how long are your initialize methods? :)
<toretore>
what if i don't need to do any initializing?
<apeiros>
shevy: go to github and check
<pontiki>
opter: yeah, that's where things break for me and most os/x GUI apps
<apeiros>
toretore: don't have an initialize method. but the only kind of objects which don't need initializing are classes and modules…
Morrolan has joined #ruby
<certainty>
opter: i bet the shell that textmate uses doesn't respect your login-shell's environment like not sourcing all rcs
<apeiros>
anything else has state and therefore needs initializing
<apeiros>
@quote is not in a valid state if it's nil
joelroa has joined #ruby
davidcollom_afk is now known as davidcollom
<apeiros>
I'll repeat, the only case where you don't need initialization is when your object is in a valid state if *all* ivars your object *will ever use* are nil.
<apeiros>
and that too is only true because ruby autovivifies ivars.
<toretore>
apeiros: argument against accessing ivars: you are manipulating shared state between your methods
<shevy>
apeiros what is the maximum amount of @ivars you ever had in a class that you wrote in ruby?
<pontiki>
GH slow this morning?
<apeiros>
toretore: yes. ivar is internal state. internal state is only the concern of people actually working on the code of your class.
ctp has quit [Quit: Leaving...]
timonv has quit [Ping timeout: 258 seconds]
<LadyRainicorn>
haha, obviously toretore is using dynamically defined instance variables
joelroa has joined #ruby
<apeiros>
toretore: that's THE POINT of objects
davidcollom is now known as davidcollom_
<apeiros>
that's THE POINT of having ivars
<apeiros>
to share them across methods
<apeiros>
otherwise you don't need OO.
davidcollom_ is now known as davidcollom
<toretore>
well, maybe i'm just not that into oop ;)
opter has quit [Quit: opter]
<toretore>
it's pretty well established that shared state is not a good thing
<apeiros>
shevy: no idea. I doubt I've ever gone beyond 10
dunckr has joined #ruby
jpierre03 has quit [Read error: Connection reset by peer]
mlpinit has joined #ruby
<apeiros>
toretore: that's IMO a misunderstanding
<apeiros>
shared *within* the object *is* a good thing. that's the point. that's the boundary of the object.
<Mon_Ouie>
def quote; @quote ||= …; end is also accessing "shared" state (across methods)
<apeiros>
shared across objects - yes, that's where you create coupling.
<certainty>
ruby isn't exactly the best choice for not doing OO though
banister has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
jpierre03 has joined #ruby
joelroa_ has quit [Ping timeout: 246 seconds]
<shevy>
hey!
<shevy>
you can use ruby without having to do .new ever!
F1skr has quit [Quit: WeeChat 0.4.3]
<toretore>
something i've seen numerous times: ivars being shared and manipulated between methods resulting in possible corruption if they're not called in the right order
jonr22 has quit [Remote host closed the connection]
<apeiros>
toretore: … 2) require as little information as possible for initialization this results in lazy getters
<toretore>
this in turn restricts you usage of these methods
<apeiros>
what's the rationale on that one?
joelroa_ has joined #ruby
Naoe-Kanno has joined #ruby
<apeiros>
"toretore: something i've seen numerous times" - yeah, you can't prevent people from fucking up. no matter what you do.
<apeiros>
only accessing via methods won't stop that.
<toretore>
i guess you can say "convention over configuration" but that's a loaded term
<apeiros>
whether I do @foo << "bar" or foo << "bar" won't change that I push data on @foo.
SHyx0rmZ has quit [Ping timeout: 265 seconds]
<toretore>
it's not about protecting other people from their own stupidity
<toretore>
it's about making your code flexible
<toretore>
not making assumptions
<apeiros>
toretore: I don't see how "making your code flexible" fits with that "what I've seen numerous times"
<apeiros>
but we can shorten that
joelroa has quit [Ping timeout: 265 seconds]
<apeiros>
15:59 toretore: something i've seen numerous times: ivars being shared and manipulated between methods resulting in possible corruption if they're not called in the right order
<apeiros>
using accessors doesn't change that.
knigitz has quit []
davidcollom is now known as davidcollom_
prc has joined #ruby
davidcollom_ is now known as davidcollom
RKornmeyer has left #ruby [#ruby]
joelroa has joined #ruby
musl_ has quit [Quit: WeeChat 0.4.3-dev]
bthesorceror has joined #ruby
<toretore>
example: class Template; def initialize(d); @data = d; def strip_html; @data.gsub!( ... ); end; def replace_vars(); @data.gsub!( .. ) end def render; strip_html; replace_vars; @data end end
davidcollom is now known as davidcollom_
davidcollom_ is now known as davidcollom
timonv_ has quit [Remote host closed the connection]
<toretore>
accessors alone doesn't prevent it, but it's part of a broader philisophy
<certainty>
shevy: of course you can. It's just a not what ruby leans forward to
knigitz has joined #ruby
bthesorceror has quit [Remote host closed the connection]
joelroa_ has quit [Ping timeout: 240 seconds]
IceDragon has joined #ruby
browndawg has quit [Read error: Operation timed out]
<shevy>
ruby wants you to use @@!
bthesorceror has joined #ruby
<apeiros>
toretore: "accessors alone doesn't prevent it" - how about, "accessors add zero to prevent it"
<toretore>
sure
<apeiros>
it's always whatever other precaution you add.
joelroa_ has joined #ruby
<apeiros>
using accessors adds zero security.
jpierre03 has quit [Read error: Connection reset by peer]
<IceDragon>
shevy, what in heavens name is @@!
<apeiros>
and "whatever other precaution" you can take with ivars just the same.
nichtdiebohne has joined #ruby
<toretore>
sure
<toretore>
i'm not saying you can't
jpierre03 has joined #ruby
<shevy>
IceDragon it is a prison
<apeiros>
so I'll repeat - using accessors instead of ivars gains you nothing. but it loses you semantics. it loses you performance.
<shevy>
@@IceDragon@@
browndawg has joined #ruby
<IceDragon>
D;
<IceDragon>
Nuuuuu
<shevy>
try to escape you stupid little dragon
<toretore>
apeiros: not using them means you can't change what "data" means
<toretore>
if i used an ivar i couldn't set it after and have it upcase
<LadyRainicorn>
Iran and Ponicorns and North Korea.
<apeiros>
barcodes, yay! is that a "lines" barcode? (code 128)
<pontiki>
Iran has a country-wide intranet
<apeiros>
seems like
joelroa_ has joined #ruby
<toretore>
yes, 128 is 1d
<LadyRainicorn>
toretore: If you need to process on setting, yes an accessor method is helpful potentially.
<LadyRainicorn>
But not an attr_accessor one.
scarolan_ has joined #ruby
<pontiki>
i wouldn't actually call that an accessor
<pontiki>
it's a method
<pontiki>
that's it
<apeiros>
toretore: ok, what does that class show me?
<toretore>
what's the difference?
<apeiros>
or that specific method
<toretore>
ok, i'm tired of this now
<toretore>
let's talk about something else
TheTFEF has joined #ruby
andy__ has joined #ruby
joelroa has quit [Ping timeout: 265 seconds]
<certainty>
let's talk about _ vs _something :D
joelroa has joined #ruby
<pontiki>
let's talk about rubylisp!
<toretore>
i thought we'd already settled that :P
<certainty>
:)
<apeiros>
initializing through a normalizing method is fine in my book. I *might* @type = nil after line 160, just to have the ivar list. and yes, that'd be declaring it, not initializing it, since init happens in self.type = type
<certainty>
pontiki: there is rubylisp?
cj3kim has quit [Read error: Connection reset by peer]
scarolan has quit [Ping timeout: 264 seconds]
<pontiki>
you started it, certainty
<pontiki>
you and your scheming wasy
cj3kim has joined #ruby
<pontiki>
ways*
<apeiros>
toretore: thanks for the discussion then :)
no0code has quit [Ping timeout: 246 seconds]
<certainty>
pontiki: oh i wasn't aware :)
* apeiros
hands toretore half of the internet
<toretore>
apeiros: in the end it comes down to a style choice: i don't think initialize should be used to "declare" its state
<pontiki>
certainty: i'm making it a trend
<certainty>
good trend
<shevy>
wow
joelroa_ has quit [Ping timeout: 264 seconds]
<toretore>
apeiros: and thank you, good sir!
<shevy>
toretore gets half of the internet :(
TheTFEF is now known as Nightmare
<toretore>
i want the bottom half
<apeiros>
toretore: it's not necessary to declare its state, I agree with that. that's just a convenience thing IMO.
<shevy>
toretore, yeah, always grab for the ass of the internet!
<certainty>
i doubt the NSA likes its internet to be cut in half
joelroa_ has joined #ruby
<shevy>
as long as it can monitor you it's ok
<apeiros>
toretore: IMO a class "declares" a contract. instances of that class satisfy a couple of invariants. and the first moment those invariants are satisfied is after initialization.
<apeiros>
toretore: and IMO, an ivar has one of two purposes - it stores state or it serves as a cache
andy__ has quit [Ping timeout: 246 seconds]
<toretore>
but to me the contract is its methods
dunckr has quit []
opter has joined #ruby
joelroa has quit [Ping timeout: 265 seconds]
Salve has joined #ruby
<apeiros>
toretore: yes. which is why you can do that thing where you move all initialization into separate accessors
pdkl has joined #ruby
joelroa has joined #ruby
shredding has joined #ruby
<apeiros>
which is what you call implicit state, if I now understand you correctly
dgfdgf has joined #ruby
firefly2013 has left #ruby [#ruby]
mjs2600 has joined #ruby
bthesorc_ has quit [Remote host closed the connection]
`MArceLL` has quit [Ping timeout: 246 seconds]
bthesorceror has joined #ruby
davidcollom is now known as davidcollom_
<apeiros>
that's possible, but IMO makes the code harder to follow, and it also means that you only have an external contract. that one certainly is the more important one. my classes usually have an internal contract too - which is that an ivar will never change its class and after initialize, all ivars are ready to operate on them.
cj3kim has quit [Read error: Connection reset by peer]
<apeiros>
anyway, that's roughly the outline of how I view classes/objects
<toretore>
well, the external contract is the same as the internal contract
joelroa_ has quit [Ping timeout: 264 seconds]
mlpinit has quit [Quit: Leaving...]
<apeiros>
no
rickruby has joined #ruby
cj3kim has joined #ruby
davidcollom_ is now known as davidcollom
brian_____ has joined #ruby
<apeiros>
external contract does not have to deal with private/protected methods, and doesn't have to deal with ivars.
<apeiros>
since those are not externally visible.
<apeiros>
(well, protected methods are a different story, but I think we can ignore those here)
joelroa_ has joined #ruby
<toretore>
and when you don't have ivars or private methods they're the same ;)
<toretore>
i don't like private methods either
pdkl has left #ruby ["The world is coming to an end and I am going to watch it on CNN."]
<apeiros>
well, you do have ivars, even with accessors. otherwise your method-only class wouldn't have to do all those ||= shenanigans :-p
<toretore>
i don't like classes that hide everything, and its contract is just a single method, the end result (whatever that may be to the author)
<pontiki>
your challenge for today, rewrite your class completely without ivars
txdv has quit [Read error: Connection reset by peer]
<toretore>
it's making assumptions that all you care about is that final step
<apeiros>
a class shouldn't hide everything. but it has its inner, private life, and its public interface.
<apeiros>
that separation is the thing which allows you to refactor
<certainty>
pontiki: i wrote a datastructure without using ivars, does that count too?
<toretore>
i don't see it like that
mjs2600 has quit [Ping timeout: 240 seconds]
joelroa has quit [Ping timeout: 269 seconds]
<apeiros>
16:23 toretore: it's making assumptions that all you care about is that final step
<apeiros>
don't follow
txdv has joined #ruby
joelroa has joined #ruby
<pontiki>
certainty: it counts for something, but this contest is to change an implementation :)
<apeiros>
and "and its contract is just a single method" - I don't understand how this is a conclusion from what I said. nothing says a class must only have a single public method…
<certainty>
damn
<toretore>
if you look at the class i linked to, you'll see that everything is accessible
<toretore>
the encoding method is the final result
<toretore>
but you can get to every step before that
<toretore>
because sometime in the future someone may need it
joelroa_ has quit [Ping timeout: 264 seconds]
davidcollom_ is now known as davidcollom
<apeiros>
toretore: in that class, what does `return '' unless extra` instead of `return '' unless @extra` gain you?
Salve has quit [Remote host closed the connection]
joelroa_ has joined #ruby
Salve has joined #ruby
<toretore>
i can't say for what, but i don't want to assume they don't
kenneth has joined #ruby
rickruby has quit [Ping timeout: 318 seconds]
sski has quit [Write error: Broken pipe]
<toretore>
well, you can see my thought process there :)
bthesorceror has joined #ruby
<toretore>
as in "why should i hide this from the user of my class? i guess there's no reason i should"
<toretore>
someone might find it interesting
<toretore>
now we're back to style again ;)
sski has joined #ruby
<apeiros>
I can tell you what you lose - I have to check what the `extra` method does. with `@extra` it's immediately clear that nothing else happens. clarity.
joelroa has quit [Ping timeout: 265 seconds]
<toretore>
how is that more clear?
<toretore>
the name of the method already tells me what it does
davidcollom is now known as davidcollom_
<apeiros>
"have to lookup what #extra" does vs. "don't have to lookup anything"
joelroa has joined #ruby
<toretore>
there is no difference there
davidcollom_ is now known as davidcollom
Muz_ is now known as Muz
<apeiros>
um, yes, there is. I have to read one less method
<apeiros>
because you see, with something like self.data = "#{data}" it actually matters
<LadyRainicorn>
If I see `self.extra = extra`, I do not now know the value or self.extra, nor what happened.
<apeiros>
it's not the same as @data = "#{data}"
<apeiros>
it does indeed do additional work
<toretore>
LadyRainicorn: that's the point
<apeiros>
so it pays off to visit that method and check what it does
davidcollom is now known as davidcollom_
davidcollom_ is now known as davidcollom
<toretore>
actually, the "#{data}" could well be moved to inside data=
<LadyRainicorn>
So your point is to make people look around your code more for no reason?
<toretore>
ah, how did we start this again
<apeiros>
hehe
joelroa_ has quit [Ping timeout: 252 seconds]
<apeiros>
sorry
mavcunha has joined #ruby
<LadyRainicorn>
By your advocation of an insane anti-pattern?
einarj has quit [Remote host closed the connection]
Salve has quit [Ping timeout: 265 seconds]
* apeiros
stops and goes for dinner
<apeiros>
cya toretore
<toretore>
the point is: i use my instance the same way someone would use it from the outside
joelroa_ has joined #ruby
<apeiros>
toretore: STAHP!
sski has quit [Ping timeout: 265 seconds]
scarolan_ has quit [Ping timeout: 265 seconds]
<toretore>
lol
<toretore>
enjoy your dinner apeiros
<LadyRainicorn>
People shouldn't be accessing ivars from the outside save for magic.
rubyracer has joined #ruby
<toretore>
self.data is settable at *any* time from the outside
Salve has joined #ruby
mavcunha_ has quit [Ping timeout: 252 seconds]
joelroa has quit [Ping timeout: 240 seconds]
<toretore>
and everything will work as expected; it doesn't have to reset any state
opter has left #ruby [#ruby]
nomenkun has quit [Remote host closed the connection]
davidcollom is now known as davidcollom_
monkegjinni has joined #ruby
joelroa has joined #ruby
davidcollom_ is now known as davidcollom
_mtr has joined #ruby
nomenkun has joined #ruby
pigzzcanfly has joined #ruby
<toretore>
it will never be in an inconsistent state because it's manipulated from the outside, which it is designed to deal with
Salve has quit [Remote host closed the connection]
OdNairy has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
davidcollom is now known as davidcollom_
joelroa_ has quit [Ping timeout: 264 seconds]
mneorr has joined #ruby
Salve has joined #ruby
lewix has joined #ruby
davidcollom_ is now known as davidcollom
joelroa_ has joined #ruby
davidcollom is now known as davidcollom_
jle` has quit [Ping timeout: 264 seconds]
davidcollom_ is now known as davidcollom
tgkokk has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
AndChat266961 has joined #ruby
nomenkun has quit [Ping timeout: 265 seconds]
joelroa has quit [Ping timeout: 265 seconds]
davidcollom is now known as davidcollom_
monkegjinni has quit [Ping timeout: 264 seconds]
OdNairy has joined #ruby
joelroa has joined #ruby
jph98 has quit [Quit: jph98]
OdNairy has quit [Client Quit]
davidcollom_ is now known as davidcollom
mneorr has quit [Ping timeout: 265 seconds]
Salve has quit [Ping timeout: 265 seconds]
joelroa_ has quit [Ping timeout: 240 seconds]
lewix has quit [Ping timeout: 252 seconds]
joelroa_ has joined #ruby
davidcollom is now known as davidcollom_
<apeiros>
toretore: a) every object is only manipulated from the outside, b) every object is also manipulated from the inside, even yours (@x ||= … is manipulation), c) it's never in an inconsistent state *because it's designed not to be*
davidcollom_ is now known as davidcollom
<apeiros>
and c) can be applied for "use ivars internally" style classes just as well
AndChat266961 has quit [Client Quit]
bthesorceror has quit [Write error: Broken pipe]
<toretore>
sure, i'm not saying otherwise
<toretore>
it's about style and coding philisophy: to me, ivars hide something from the outside
bthesorceror has joined #ruby
davidcollom is now known as davidcollom_
AndChat266961 has joined #ruby
joelroa has quit [Ping timeout: 265 seconds]
<toretore>
when you expose everything you have to make sure that it stays consistent
joelroa has joined #ruby
davidcollom_ is now known as davidcollom
[krisbulman] is now known as krisbulman
AndChat266961 has quit [Read error: Connection reset by peer]
<toretore>
which, imo, results in better designed code
davidcollom_ is now known as davidcollom
<apeiros>
toretore: methods hide something from the outside too
joelroa_ has quit [Ping timeout: 246 seconds]
<apeiros>
not using private methods can force you to repeat logic, because every method has to deal with it on its own
axsuul has joined #ruby
joelroa_ has joined #ruby
_mtr has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
shaileshg has joined #ruby
<apeiros>
though, private is IMO only an advisory. a hint.
bthesorceror has quit [Ping timeout: 264 seconds]
<toretore>
no, because they all access whatever needs that logic applied from the single method ;)
meatherly has joined #ruby
<apeiros>
is it just me or does that not parse? :D
yasushi has quit [Remote host closed the connection]
Rollabun_ has quit [Remote host closed the connection]
joelroa has quit [Ping timeout: 265 seconds]
<toretore>
that sentence has implied state: "the single method (that would exist)" :P
joelroa has joined #ruby
<certainty>
you need context sensitive grammars for this to parse
<toretore>
yes
davidcollom is now known as davidcollom_
<toretore>
i assumed a human reader
ceej has joined #ruby
<toretore>
that's bad of me, to be making assumptions like that
sikor_sxe has joined #ruby
yfeldblum has joined #ruby
yasushi has joined #ruby
joelroa_ has quit [Read error: Operation timed out]
<apeiros>
what's it with you and thinking "if it's not X, it all must be a single method"? :)
meatherly has quit [Ping timeout: 240 seconds]
davidcollom_ is now known as davidcollom
<toretore>
haha
joelroa_ has joined #ruby
Jake232 has joined #ruby
krisbulman is now known as [krisbulman]
joelroa has quit [Ping timeout: 252 seconds]
davidcollom is now known as davidcollom_
eka has quit [Quit: My computer has gone to sleep. ZZZzzz…]
joelroa has joined #ruby
jonahR has joined #ruby
davidcollom_ is now known as davidcollom
yfeldblum has quit [Ping timeout: 240 seconds]
yasushi has quit [Ping timeout: 263 seconds]
vlad_starkov has quit [Remote host closed the connection]
sanav has joined #ruby
<certainty>
uncomfortable silence
joelroa_ has quit [Ping timeout: 257 seconds]
<sanav>
i'm looking for fusion of languages like C , C++ , VB with ruby
joelroa_ has joined #ruby
<sanav>
Can any one guide me ?
davidcollom is now known as davidcollom_
koshian_ is now known as Koshian
<dorei>
for calling C libs functions from within ruby u can use ffi
davidcollom_ is now known as davidcollom
<sanav>
dorei: will it make ruby work faster ?
Jake232 has quit [Ping timeout: 264 seconds]
joelroa has quit [Ping timeout: 269 seconds]
<dorei>
isnt it already fast enough? :D
vlad_starkov has joined #ruby
<sanav>
dorei: haha ! yes , it is but its slower than scala .
joelroa has joined #ruby
<sanav>
dorei: i don't want to learn new language i.e scala
Matriks_ has joined #ruby
Mongey has joined #ruby
Matriks has quit [Read error: Connection reset by peer]
davidcollom is now known as davidcollom_
petey has joined #ruby
davidcollom_ is now known as davidcollom
joelroa_ has quit [Ping timeout: 265 seconds]
<certainty>
sanav: that's a strange combination
<sanav>
i have a question .Why we are using C lib when ruby can do all things that C can do easily .What i'm looking for is speed .For example we use assembly language with C to make it more faster .Can we do that with ruby ?
obs has joined #ruby
<shevy>
sanav speed
<certainty>
sanav: if you have applications where you chose to substitute highly optimized assembly as generated by decent C compilers with your own, then ruby is probably not what you want
<pontiki>
speed kills
davidcollom is now known as davidcollom_
Thanatermesis has quit [Ping timeout: 246 seconds]
joelroa has quit [Ping timeout: 240 seconds]
davidcollom_ is now known as davidcollom
dkamioka has quit [Remote host closed the connection]
joelroa has joined #ruby
<sanav>
i have another weird question .I heard C++ is mostly used in game industries .Can we write gems using C++ ? .I'm newbie .Sorry !
<LadyRainicorn>
Technically speaking you can, but gems are for Ruby, and C++ is not Ruby.
dkamioka has joined #ruby
obs_ has joined #ruby
<Morrolan>
Plus, not all Ruby implementations support gems with C parts.
joelroa_ has joined #ruby
davidcollom is now known as davidcollom_
obs has quit [Remote host closed the connection]
obs_ has quit [Remote host closed the connection]
<sanav>
any language that fuse excellently with ruby ?
davidcollom_ is now known as davidcollom
IcyDragon has joined #ruby
joelroa has quit [Ping timeout: 248 seconds]
Solnse has joined #ruby
<shevy>
sanav you can write with C++, and store the cpp files in ext/ subdirectory of your gem
pigzzcanfly has quit [Remote host closed the connection]
joelroa has joined #ruby
<shevy>
Hanmac1 writes ruby bindings to wxwidget right now
leonidlm has quit [Read error: Operation timed out]
jonahR has quit [Quit: jonahR]
rootshift_ has joined #ruby
IceDragon has quit [Ping timeout: 240 seconds]
andy__ has joined #ruby
joelroa_ has quit [Read error: Operation timed out]
Polysics has joined #ruby
davidcollom is now known as davidcollom_
davidcollom_ is now known as davidcollom
joelroa_ has joined #ruby
<danneu>
/part
<danneu>
-_-
danneu has left #ruby ["WeeChat 0.4.1"]
gja has quit [Quit: This computer has gone to sleep]
joelroa has quit [Ping timeout: 265 seconds]
andy__ has quit [Ping timeout: 246 seconds]
joelroa has joined #ruby
Mongey has quit [Quit: Mongey]
davidcollom is now known as davidcollom_
kitak has quit [Remote host closed the connection]
<Morrolan>
It's a regular HTTP API. This class is just an abstraction layer over the various APIs you are using for testing/staging/development/production.
<zumba_addict>
however, when I was debugging our web app, when it does a REST call, it goes directly to the endpoint that we've defined in backboneJS route
joelroa has quit [Ping timeout: 265 seconds]
<zumba_addict>
there is a javascritp file where we defined all our endpoints
doodlehaus has quit [Remote host closed the connection]
joelroa has joined #ruby
<zumba_addict>
that's what makes me confused if it's really talking to our ruby setup
<Morrolan>
Your JS endpoint should probably match the ones used by the Ruby application.
petey has quit [Remote host closed the connection]
banister has joined #ruby
<zumba_addict>
but do you agree with me that if I am seeing a direct POST to the remote server rather than to my http://localhost, it's not talking to my localhost when doing the CRUD
fridim_ has joined #ruby
<Morrolan>
Err, if it accesses a remote server then it accesses the remote server, yes.
joelroa_ has quit [Ping timeout: 252 seconds]
<zumba_addict>
ok. Now that makes me wonder where we are using all the configs that were written in ruby by the contractor
banister has quit [Client Quit]
<zumba_addict>
maybe because of the way it was coded, I remember when we were using it before, we were doing a POST locally to a json file
joelroa_ has joined #ruby
<zumba_addict>
i saw it first few weeks i joined the team
axsuul has joined #ruby
<zumba_addict>
i've been with them for 8 months now and I haven't seen any code change in these rb files except environment.rb
shabgrd is now known as shabgard
<Morrolan>
There is a todo in that file about cleaning up a messy fake API.
eka has joined #ruby
<Morrolan>
Seems the contractors had to leave before they were done. Running out of money? :P
<zumba_addict>
yeah. I remember they say fake API
Olipro has joined #ruby
<zumba_addict>
:D
<certainty>
it really is a mess
joelroa has quit [Ping timeout: 264 seconds]
<zumba_addict>
but now, I also remember we update the fqdn listed in environment.rb
armyriad has quit [Ping timeout: 247 seconds]
<zumba_addict>
and the url gets used in our javascript. maybe i'm partly wrong
alex88 has joined #ruby
joelroa has joined #ruby
<zumba_addict>
i'll do more analysis once I get back. Thanks for the help :)
<zumba_addict>
gtg now
<certainty>
poor soul :)
<Morrolan>
Aight. G'luck.
armyriad has joined #ruby
banister has joined #ruby
banister has quit [Client Quit]
armyriad has quit [Max SendQ exceeded]
larissa has joined #ruby
armyriad has joined #ruby
gja has quit [Quit: This computer has gone to sleep]
joelroa_ has quit [Ping timeout: 265 seconds]
pigzzcanfly has joined #ruby
joelroa_ has joined #ruby
ktosiek_ has joined #ruby
doodlehaus has joined #ruby
mneorr has joined #ruby
Mon_Ouie has quit [Ping timeout: 264 seconds]
pwh has joined #ruby
eka has quit [Quit: My computer has gone to sleep. ZZZzzz…]
Olipro has quit [Ping timeout: 246 seconds]
joelroa has quit [Ping timeout: 265 seconds]
LadyRainicorn has quit [Ping timeout: 264 seconds]
lewix has joined #ruby
Azulinho has joined #ruby
tibounise has joined #ruby
joelroa has joined #ruby
<tibounise>
Hey !
<tibounise>
How do you check in Ruby if you can write to a folder ?
<apeiros>
File.writable? dir # I'd assume
Mongey has quit [Quit: Mongey]
sanav has quit [Quit: Page closed]
ktosiek has quit [Ping timeout: 246 seconds]
<certainty>
or try and rescue Errno::EACCES
<tibounise>
The .writable? method only exists for the File class, here I want to check if I can read/write into a folder
<certainty>
dunno if that works for windows though
lachesis has quit [Remote host closed the connection]
joelroa_ has quit [Ping timeout: 246 seconds]
[gmi] has joined #ruby
mneorr has quit [Ping timeout: 245 seconds]
joelroa_ has joined #ruby
yacks has quit [Quit: Leaving]
lewix has quit [Ping timeout: 265 seconds]
<certainty>
tibounise: doesn't make a difference at least on *nix
<Morrolan>
Btw, you needn't repeat your question every other second. ;)
bhaak has joined #ruby
joelroa has joined #ruby
<jglover>
Morrolan: yeah haha sorry about that. It wasn't on purpose. I'm using irssi and nothing showed up when I pressed enter, and I didn't notice that I had a lag
<jglover>
Morrolan: anyways, i think it must be redirection because the code after the puts statement is being executed. So I don't think it's beeing hung up anywhere
dkamioka has quit [Remote host closed the connection]
cj3kim has quit [Ping timeout: 265 seconds]
p8952 has joined #ruby
<jglover>
does rack redirect by any chance? this wasn't happening before I started using rackup
hoypriest has quit [Remote host closed the connection]
<jglover>
ah yes it does
carraroj has joined #ruby
joelroa_ has quit [Ping timeout: 246 seconds]
joelroa_ has joined #ruby
rickruby has joined #ruby
joelroa has quit [Ping timeout: 240 seconds]
jglover has quit [Quit: Lost terminal]
kcombs has joined #ruby
northlight31 has quit [Remote host closed the connection]
<shevy>
it is so simplistic that it is not even useful on its own!
Rainicorn is now known as LadyRainicorn
<jhass>
oh it is
LadyRainicorn has quit [Client Quit]
Rainicorn has joined #ruby
joelroa has quit [Ping timeout: 264 seconds]
joelroa__ has joined #ruby
Mon_Ouie has joined #ruby
Mon_Ouie has quit [Changing host]
Mon_Ouie has joined #ruby
joelroa_ has quit [Ping timeout: 264 seconds]
geopet has quit []
nomenkun has quit [Ping timeout: 252 seconds]
joelroa has joined #ruby
joelroa__ has quit [Read error: Operation timed out]
Salve has joined #ruby
OdNairy has joined #ruby
Matriks_ has quit [Ping timeout: 264 seconds]
Hobogrammer_ has joined #ruby
axl_ has joined #ruby
joelroa_ has joined #ruby
joelroa has quit [Ping timeout: 246 seconds]
Hobogrammer has quit [Ping timeout: 240 seconds]
joelroa has joined #ruby
oracal has quit [Quit: Leaving]
Matriks has joined #ruby
guinslym_ has left #ruby [#ruby]
saarinen has joined #ruby
Mongey has joined #ruby
joelroa_ has quit [Ping timeout: 264 seconds]
marcdel has joined #ruby
Kricir has quit [Ping timeout: 252 seconds]
joelroa_ has joined #ruby
vlad_starkov has joined #ruby
habanany has joined #ruby
joelroa has quit [Ping timeout: 240 seconds]
poulson has quit [Read error: Connection reset by peer]
rickruby has quit [Remote host closed the connection]
jonah_k has joined #ruby
vlad_starkov has quit [Remote host closed the connection]
joelroa has joined #ruby
msch has joined #ruby
segmond has joined #ruby
vlad_starkov has joined #ruby
ravster has joined #ruby
<ravster>
hey all
rickruby has joined #ruby
<shevy>
hey raver
tylersmith has joined #ruby
<ravster>
Is it possible to ask Rspec to run a particular group of tests only on a particular platform? I'm trying to fiddle with the Parallel gem and see if I can make it pass on jruby.
joelroa_ has quit [Ping timeout: 265 seconds]
rickruby has quit [Remote host closed the connection]
danshultz has quit [Remote host closed the connection]
joelroa_ has joined #ruby
nobitanobi has quit [Ping timeout: 265 seconds]
danshultz has joined #ruby
cj3kim has joined #ruby
jonah_k has quit [Ping timeout: 252 seconds]
joelroa has quit [Ping timeout: 246 seconds]
mehlah has joined #ruby
andy__ has quit [Remote host closed the connection]
tejas has quit [Quit: This computer has gone to sleep]
andy__ has joined #ruby
alexju has quit [Remote host closed the connection]
joelroa has joined #ruby
joelroa_ has quit [Read error: Operation timed out]
kies has quit [Ping timeout: 240 seconds]
danshultz has quit [Ping timeout: 252 seconds]
joelroa_ has joined #ruby
<jhass>
hm I guess you could tag them and add a tag filter in your spec_file.rb depending on the platform
ilyam has joined #ruby
andy__ has quit [Ping timeout: 265 seconds]
sski has quit [Remote host closed the connection]
joelroa has quit [Ping timeout: 264 seconds]
charles81 has joined #ruby
sski has joined #ruby
joelroa has joined #ruby
gja has joined #ruby
mikecmpbll has joined #ruby
zigomir has joined #ruby
joelroa_ has quit [Ping timeout: 249 seconds]
gja has quit [Client Quit]
joelroa_ has joined #ruby
Mon_Ouie has quit [Ping timeout: 259 seconds]
hiyosi has quit [Ping timeout: 259 seconds]
sski has quit [Ping timeout: 264 seconds]
gja has joined #ruby
gja has quit [Changing host]
gja has joined #ruby
aspires has quit []
Azulinho has joined #ruby
aspires has joined #ruby
joelroa__ has joined #ruby
enebo has joined #ruby
yfeldblu_ has joined #ruby
gwb3 has joined #ruby
trhodes has joined #ruby
mneorr has joined #ruby
enebo has quit [Client Quit]
mneorr has quit [Ping timeout: 260 seconds]
joelroa_ has quit [Ping timeout: 264 seconds]
joelroa has quit [Ping timeout: 465 seconds]
gwb3 is now known as Guest57917
mgberlin has joined #ruby
ultraflash3 has joined #ruby
joelroa__ has quit [Read error: Operation timed out]
TTilus has joined #ruby
<shevy>
sometimes I am not seeing the tree in the forest
sawtooth_ has joined #ruby
riceandbeans has joined #ruby
riceandbeans has quit [Changing host]
riceandbeans has joined #ruby
DrForr_ has joined #ruby
Nigel_ has joined #ruby
queequeg1 has joined #ruby
<havenwood>
shevy: roll in the moss
<shevy>
lol
emdub has joined #ruby
deepy has joined #ruby
Guest49885 has quit [Excess Flood]
deepy is now known as Guest92733
kindjal has joined #ruby
riceandb1ans has quit [Remote host closed the connection]
gl- has quit [Remote host closed the connection]
JStoker has quit [Excess Flood]
sawtooth1 has quit [Write error: Broken pipe]
emdub_ has quit [Write error: Broken pipe]
queequeg2 has quit [Write error: Broken pipe]
Zhann_ has quit [Write error: Broken pipe]
mikee has quit [Write error: Broken pipe]
Hamled has quit [Write error: Broken pipe]
18WAFUUR3 has quit [Write error: Broken pipe]
pr1x_ has quit [Write error: Broken pipe]
gigetoo has quit [Write error: Broken pipe]
G has quit [Write error: Broken pipe]
carraroj has quit [Write error: Broken pipe]
habanany has quit [Ping timeout: 330 seconds]
dgfdgf has quit [Ping timeout: 330 seconds]
justinxreese has quit [Ping timeout: 330 seconds]
Deele has quit [Ping timeout: 330 seconds]
freerobby has quit [Ping timeout: 330 seconds]
halfie has quit [Ping timeout: 330 seconds]
Angelous has quit [Ping timeout: 330 seconds]
mattyohe_ has quit [Ping timeout: 330 seconds]
kapowaz has quit [Ping timeout: 330 seconds]
Guest85414______ has quit [Ping timeout: 330 seconds]
Jakee` has quit [Ping timeout: 330 seconds]
im0b has quit [Ping timeout: 330 seconds]
Jelco_ has quit [Ping timeout: 330 seconds]
dachi has quit [Ping timeout: 330 seconds]
tubbo has quit [Ping timeout: 330 seconds]
ihme-TTilus has quit [Remote host closed the connection]
freerobby has joined #ruby
Jelco has joined #ruby
Jelco has joined #ruby
Jelco has quit [Changing host]
kindjal has quit [Client Quit]
miah has quit [Remote host closed the connection]
Angelous- has joined #ruby
Deele has joined #ruby
mattyohe_ has joined #ruby
gja has quit [Write error: Broken pipe]
gl- has joined #ruby
mikee has joined #ruby
im0b_ has joined #ruby
Jakee`_ has joined #ruby
Guest85414______ has joined #ruby
ultraflash3 has quit [Ping timeout: 250 seconds]
Hamled has joined #ruby
tubbo has joined #ruby
zoscoy has joined #ruby
maZtah is now known as maZtah
`MArceLL` has joined #ruby
halfie has joined #ruby
kapowaz has joined #ruby
dachi has joined #ruby
meatherly has joined #ruby
zoscoy has quit [Client Quit]
JStoker has joined #ruby
miah has joined #ruby
einarj has joined #ruby
gigetoo has joined #ruby
pr1x has joined #ruby
joelroa has joined #ruby
gja has joined #ruby
gja has joined #ruby
gja has quit [Changing host]
justinxreese has joined #ruby
Zhann has joined #ruby
ctp has quit [Quit: Leaving...]
joelroa_ has joined #ruby
meatherly has quit [Ping timeout: 265 seconds]
Vivekananda has quit [Quit: Ex-Chat]
PLejeck has quit [Changing host]
PLejeck has joined #ruby
PLejeck is now known as nuck
timonv has quit [Remote host closed the connection]
<shevy>
itadder you create local vars inside a method
<centrx>
Are you one of the smart girls, or are you a dumb boy
<itadder>
I thought that it was possible for me to define two varible then call them back
<shevy>
so they are not persistent
<itadder>
centrx: dumb boy :)
<itadder>
oh
mgberlin has quit [Remote host closed the connection]
<centrx>
You can use num1 and num2 in the block, they need to in the block variables like { |n1, n2| use n1 and n2 }
<shevy>
itadder also, you pass in a {} which is not what you want
<jhass>
itadder: nope, the way you do it is by letting the block accept parameters and pass them in your method: def foo; yield 1, 2; end; foo {|num1, num2| ... }
<shevy>
becaue you are not calling yield yet itadder
<centrx>
^
joelroa_ has quit [Ping timeout: 252 seconds]
shabgrd has joined #ruby
<itadder>
bah
<itadder>
heehe
kies has joined #ruby
joelroa_ has joined #ruby
cj3kim has quit [Ping timeout: 264 seconds]
supersym has joined #ruby
joelroa has quit [Ping timeout: 264 seconds]
shabgard has quit [Ping timeout: 240 seconds]
joelroa has joined #ruby
<itadder>
oh so jhass I can let the block accept input
<Kilo`byte>
wtf is wrong
<shevy>
ur mom
<Kilo`byte>
i have the ruby-dbus gem installed
<Kilo`byte>
YET require 'dbus' fails
<Kilo`byte>
(same for require 'ruby-dbus'
<Kilo`byte>
)
<Kilo`byte>
shevy: no, your mom is not wrong :P muhahahaha
<jhass>
Kilo`byte: anything on gem which dbus?
<Kilo`byte>
jhass: ?
<Kilo`byte>
whatcha mean
<jhass>
command. to run. on your shell
joelroa_ has quit [Ping timeout: 264 seconds]
<shevy>
perhaps the gem is unmaintained since a long time
<Kilo`byte>
last commit was 8 days ago
<Kilo`byte>
LoadError: cannot load such file -- dbus
<Kilo`byte>
gem install ruby-dbus
<shevy>
and you are sure that this is the way to install it?
vlad_starkov has quit [Read error: Connection reset by peer]
joelroa_ has quit [Ping timeout: 246 seconds]
skammer has joined #ruby
joelroa_ has joined #ruby
shredding has joined #ruby
joelroa has quit [Ping timeout: 246 seconds]
pfg has quit [Ping timeout: 246 seconds]
KarolisNo has quit [Read error: Connection reset by peer]
KarolisNo has joined #ruby
joelroa has joined #ruby
Xaitec has joined #ruby
aryaching_ has quit [Ping timeout: 240 seconds]
hiyosi has joined #ruby
pfg has joined #ruby
Jetchisel has quit [Quit: "Unfortunately time is always against us" -- *Morpheus*]
pfg has quit [Max SendQ exceeded]
joelroa_ has quit [Ping timeout: 265 seconds]
jackal has joined #ruby
jackal is now known as thebirthdayparty
pfg has joined #ruby
joelroa_ has joined #ruby
<thebirthdayparty>
can anyone suggest a good text editor with auto format for ubuntu
false_economy has joined #ruby
<Jamo_>
vim
<thebirthdayparty>
looking for highlighting and autospacing
<Jamo_>
or sublime text
Azulinho has quit [Read error: Operation timed out]
<thebirthdayparty>
thank you
binaryhat has quit [Quit: Leaving]
<havenwood>
thebirthdayparty: gedit with gmate
joelroa has quit [Ping timeout: 241 seconds]
<thebirthdayparty>
awesome i love gedit
<thebirthdayparty>
gmate is an addon i suppose?
joelroa has joined #ruby
mjs2600 has joined #ruby
dingus_khan has quit [Remote host closed the connection]
mneorr has joined #ruby
hiyosi has quit [Ping timeout: 253 seconds]
lewix has quit [Remote host closed the connection]
tkuchiki has joined #ruby
plexus_ has quit [Ping timeout: 265 seconds]
joelroa_ has quit [Ping timeout: 265 seconds]
confounds has joined #ruby
estebistec has left #ruby [#ruby]
joelroa_ has joined #ruby
<thebirthdayparty>
i can not get gmate installed dang
<havenwood>
thebirthdayparty: Sublime is very nice but not cheap.
Atrumx has joined #ruby
<thebirthdayparty>
is there any other free alternative to gedit
joelroa has quit [Ping timeout: 240 seconds]
<thebirthdayparty>
when i hate gmate installed how will i specify to do the spacing
<thebirthdayparty>
i think i got it, not sure how to activate it for ruby though
joelroa has joined #ruby
xerox357 has quit [Remote host closed the connection]
Hobogrammer_ has quit [Ping timeout: 240 seconds]
mneorr has quit [Ping timeout: 265 seconds]
xerox357 has joined #ruby
<havenwood>
thebirthdayparty: Tabulation plugin for setting spaces based on file type.
joelroa_ has quit [Ping timeout: 265 seconds]
Matriks has quit [Remote host closed the connection]
<havenwood>
thebirthdayparty: geany is on alternative
<havenwood>
one*
<thebirthdayparty>
geany looks cool
dingus_khan has joined #ruby
kirun has quit [Quit: Client exiting]
<thebirthdayparty>
havenwood how long have you been working with ruby?
<havenwood>
thebirthdayparty: two years and change
false_economy has quit [Remote host closed the connection]
dx7 has joined #ruby
dingus_khan has quit [Remote host closed the connection]
false_economy has joined #ruby
dx7 has quit [Remote host closed the connection]
<thebirthdayparty>
do you remember that awkward phase when you understood the syntax but didnt know enough library yet to start buildling sophisticated code?
saarinen has quit [Quit: saarinen]
<havenwood>
thebirthdayparty: yup
<thebirthdayparty>
any tips on getting past that?
Olipro has joined #ruby
joelroa has quit [Ping timeout: 257 seconds]
<thebirthdayparty>
should i move on to working with a gui library such at gtk or shoes or something?
dingus_khan has joined #ruby
bonhoeffer has quit [Quit: bonhoeffer]
joelroa has joined #ruby
shredding has quit [Quit: shredding]
meatherly has joined #ruby
<thebirthdayparty>
havenwood geany is installed, i have it set to ruby , highlighting is working but not indentation, do i need to change anything?
<havenwood>
thebirthdayparty: i'm not sure, not a geany user :)
vpretzel has joined #ruby
joelroa_ has joined #ruby
<havenwood>
thebirthdayparty: i think reading other's code on the Githubs is helpful
<thebirthdayparty>
are there any topics in particular that would be helpful
<havenwood>
thebirthdayparty: playing around with Shoes4 on JRuby is fun as far as GUI bindings go
joelroa has quit [Ping timeout: 252 seconds]
<thebirthdayparty>
ok
<thebirthdayparty>
thank you
dingus_khan has quit [Remote host closed the connection]
<havenwood>
thebirthdayparty: hard to guess what all you know to recommend something sane :P
joelroa has joined #ruby
meatherly has quit [Ping timeout: 240 seconds]
bonhoeffer has joined #ruby
Naoe-Kanno has quit [Ping timeout: 240 seconds]
mercwithamouth has joined #ruby
thebirthdayparty has quit [Quit: Leaving]
ktosiek has joined #ruby
<havenwood>
get familiar with all the stuff in the stdlib, the dark corners
maroloccio has joined #ruby
joelroa_ has quit [Ping timeout: 246 seconds]
<centrx>
Ignore stdlib and get familiar with Ruby Core :)
SHyx0rmZ has joined #ruby
joelroa_ has joined #ruby
bonhoeffer has quit [Client Quit]
<havenwood>
that first!
ktosiek_ has quit [Ping timeout: 252 seconds]
dx7 has joined #ruby
tkuchiki has quit [Remote host closed the connection]
joelroa has quit [Ping timeout: 246 seconds]
saarinen has joined #ruby
lazyguru_ has joined #ruby
joelroa has joined #ruby
joelroa has quit [Max SendQ exceeded]
danshultz has joined #ruby
KarolisNo has quit [Remote host closed the connection]
GinoMan has quit [Ping timeout: 264 seconds]
joelroa_ has quit [Ping timeout: 265 seconds]
joelroa has joined #ruby
jackneill has quit [Read error: Operation timed out]
v4n has joined #ruby
ikaros has joined #ruby
kcombs has joined #ruby
joelroa has quit [Ping timeout: 246 seconds]
atmosx has joined #ruby
joelroa has joined #ruby
gja has quit [Quit: This computer has gone to sleep]
dingus_khan has joined #ruby
lewix has joined #ruby
ravster has quit [Quit: Leaving.]
atmosx has quit [Client Quit]
Kricir has joined #ruby
joelroa_ has joined #ruby
jph98 has joined #ruby
<shevy>
second that!
joelroa has quit [Ping timeout: 265 seconds]
gja has joined #ruby
joelroa has joined #ruby
xerox357 has quit [Remote host closed the connection]
dingus_khan has quit [Remote host closed the connection]
mikepack_ has joined #ruby
joelroa has quit [Read error: Operation timed out]
r0bby has joined #ruby
mavcunha has joined #ruby
mikepack has quit [Read error: Connection reset by peer]
mikepack_ has quit [Remote host closed the connection]
joelroa has joined #ruby
robbyoconnor has quit [Ping timeout: 264 seconds]
Synthead has joined #ruby
bonhoeffer has joined #ruby
mrsolo has joined #ruby
sski has quit [Ping timeout: 259 seconds]
mrsolo has quit [Client Quit]
xerox357 has joined #ruby
joelroa_ has quit [Ping timeout: 264 seconds]
joelroa_ has joined #ruby
<Senjai>
Fiddle is about as dark as the stdlib gets
<Senjai>
:P
nakadai has joined #ruby
bonhoeffer has quit [Client Quit]
joelroa has quit [Ping timeout: 252 seconds]
dingus_khan has joined #ruby
ouie has quit [Ping timeout: 264 seconds]
zachallett has joined #ruby
Synthead has quit [Ping timeout: 265 seconds]
joelroa has joined #ruby
dingus_khan has quit [Remote host closed the connection]
dx7 has quit [Remote host closed the connection]
Megtastique has joined #ruby
dx7 has joined #ruby
joelroa_ has quit [Ping timeout: 240 seconds]
joelroa_ has joined #ruby
jcs222 has quit [Quit: leaving]
vlad_starkov has joined #ruby
claymore has quit [Ping timeout: 240 seconds]
chipotle_ has quit [Quit: cya]
atlas__ has joined #ruby
davidcollom is now known as davidcollom_
joelroa has quit [Ping timeout: 265 seconds]
joelroa has joined #ruby
<atlas__>
hey all, it's my first day learning ruby, I'm just wondering about array.map and array.each, I've been experimenting with them and have a piece of code here: http://pastebin.com/wCrtHrXU
no0code has joined #ruby
dx7 has quit [Ping timeout: 246 seconds]
<atlas__>
im wondering if there's a more concise way to sum the sqaures, within the code block of the first map ??
eka has joined #ruby
dingus_khan has joined #ruby
vlad_starkov has quit [Read error: Connection reset by peer]
dingus_khan has quit [Remote host closed the connection]
andy__ has joined #ruby
joelroa_ has joined #ruby
xerox357 has quit [Remote host closed the connection]
dx7 has joined #ruby
gja has quit [Quit: This computer has gone to sleep]
dingus_khan has joined #ruby
dingus_khan has quit [Remote host closed the connection]
joelroa has quit [Ping timeout: 246 seconds]
mgberlin has quit [Ping timeout: 246 seconds]
joelroa has joined #ruby
joelroa_ has quit [Ping timeout: 246 seconds]
pfg has quit [Ping timeout: 246 seconds]
joelroa_ has joined #ruby
rickruby has joined #ruby
Cache_Money_ has joined #ruby
Kricir has quit [Remote host closed the connection]
armyriad has quit [Quit: Leaving]
joelroa has quit [Ping timeout: 240 seconds]
pfg has joined #ruby
arietis has quit [Quit: Computer has gone to sleep.]
joelroa has joined #ruby
Guest65086 is now known as Radar
Megtastique has quit []
mojjojo has joined #ruby
mgberlin has joined #ruby
joelroa_ has quit [Read error: Operation timed out]
ephemerian has quit [Quit: Leaving.]
joelroa_ has joined #ruby
rickruby has quit [Remote host closed the connection]
dx7 has quit [Remote host closed the connection]
armyriad has joined #ruby
joelroa has quit [Ping timeout: 246 seconds]
kitak has quit [Remote host closed the connection]
kitak has joined #ruby
dx7 has joined #ruby
stkowski has joined #ruby
joelroa has joined #ruby
Hanmac has joined #ruby
mburns_ is now known as mburns
rickruby has joined #ruby
Wixy has joined #ruby
<Wixy>
Hello!
<centrx>
Ahoy
george2 has joined #ruby
Kricir has joined #ruby
Hanmac1 has quit [Ping timeout: 264 seconds]
<Wixy>
I know it's not even close to JSON's specification, but can you think of any way to parse something like this: {foo: function() { return 123 }}
<Wixy>
?
<jhass>
no, you can only eval it with javascript
<Wixy>
(as a string at least)
Astral_ has quit [Ping timeout: 265 seconds]
joelroa_ has quit [Ping timeout: 246 seconds]
<Wixy>
maybe I should try with node.js
<LadyRainicorn>
eval it with a JS interpeter in a sandbox and output JSON.
<jhass>
I mean if they really all look like that you throw a simple regex on it, but as soon as it gets more complex...
<Wixy>
I have to do some processing with config files that has JSON with embeded functions
dingus_khan has joined #ruby
tibounise has quit [Quit: WeeChat 0.4.2]
<Wixy>
I wanted to do that in ruby :|
<jhass>
aka javascript
danshultz has quit [Remote host closed the connection]
<LadyRainicorn>
You can use therubyracer
<centrx>
Wixy, There are several JavaScript interpretors for Ruby
nathancahill has quit [Quit: nathancahill]
joelroa_ has joined #ruby
<Wixy>
parsing it as: {foo: "function() { return 123 }"} is just fine
danshultz has joined #ruby
<Wixy>
I'm not going to change the function anyway
yann2 has joined #ruby
<Wixy>
but yeah, it could be complex, I can't use a regexp
jack_rabbit has joined #ruby
dx7 has quit [Ping timeout: 265 seconds]
<LadyRainicorn>
Can this be any JS function or is it very restricted?
<yann2>
small question: in ruby 2 if I have a function def myfunc(options), and I call it like this: myfunc(options: 'one'), will it assign a hash {:options => 'one'} to options, or just 'one', and why?
joelroa has quit [Ping timeout: 265 seconds]
saarinen has quit [Quit: saarinen]
<Wixy>
LadyRainicorn, any function
<confounds>
yann2 the former
meatherly has joined #ruby
jle` has joined #ruby
joelroa has joined #ruby
Xaitec has quit [Quit: Leaving]
<jhass>
yann2: a hash, since what you pass the implicit version of myfunc({options: 'one'}) (and it's a method, not a function ;) )
<LadyRainicorn>
Then you need to write a teensy bit of JS to convert it to Ruby.
<LadyRainicorn>
(or a lot of parsing logic)
<yann2>
alright thank you :)
<Wixy>
yann2, and just in case, it also works in ruby 1.9.x
lewix has quit [Remote host closed the connection]
joelroa_ has quit [Ping timeout: 252 seconds]
<Wixy>
LadyRainicorn, the point is I don't really want to convert it to ruby. if I can parse that json object and convert all functions to string, that's fine as well
<Wixy>
and should be a lot easier
<jhass>
please stop calling it json, it's a javascript object not json
<yann2>
Wixy, yes, actually that's why I m here - I showed a piece of code why I use the former, and a friend took it for named parameters and warned me for support in ruby < 2
<havenwood>
atlas__: its Ruby so you can always implement a more concise way, like `class Numeric; def squared; self * self; end end` so you can then: 1.upto(4).map &:squared #=> [1, 4, 9, 16]
Hanmac1 has joined #ruby
<LadyRainicorn>
The problem is that you at least need to parse the JavaScript.
<LadyRainicorn>
And because it can contain anything, it basically needs to parse JS generally.
joelroa_ has joined #ruby
danshultz has quit [Ping timeout: 264 seconds]
Hanmac has quit [Ping timeout: 264 seconds]
AlSquire has quit [Quit: This computer has gone to sleep]
<Wixy>
ok, I'm going to do this in nodejs, it'll be more sane
<Wixy>
thanks
dingus_khan has quit [Remote host closed the connection]
MatthewsFace has joined #ruby
<RubyPanther>
Good choice Wixy
joelroa has quit [Ping timeout: 265 seconds]
meatherly has quit [Ping timeout: 264 seconds]
dx7 has joined #ruby
Rainicorn has joined #ruby
joelroa has joined #ruby
dangerousdave has quit [Quit: My Mac Pro has gone to sleep. ZZZzzz…]
Knife007 has joined #ruby
<Knife007>
fayimora here?
<havenwood>
fayimora__:
<havenwood>
Knife007: hi
<Knife007>
sup
<fayimora__>
Yes! Knife007
<fayimora__>
Sup?
LadyRainicorn has quit [Ping timeout: 252 seconds]
Rainicorn has quit [Client Quit]
joelroa_ has quit [Ping timeout: 265 seconds]
kalleth_ is now known as kalleth
<Knife007>
do you use a desktop irc client
<havenwood>
LimeChat
joelroa_ has joined #ruby
jph98 has quit [Quit: jph98]
crazymykl has quit [Remote host closed the connection]
<Knife007>
thanks!
<Knife007>
is that available for windows
crazymykl has joined #ruby
_bart has quit [Remote host closed the connection]
<fayimora__>
I used colloquy for a while but I use a cloud service now
joelroa has quit [Ping timeout: 265 seconds]
Knife007 has quit [Client Quit]
neodon1 has joined #ruby
neodon1 has left #ruby [#ruby]
joelroa has joined #ruby
mojjojo has quit [Quit: mojjojo]
Salve_ has joined #ruby
agjacome has quit [Ping timeout: 265 seconds]
<Xuisce>
havenwood: same here
<Xuisce>
havenwood: I love it
joelroa_ has quit [Ping timeout: 240 seconds]
mojjojo has joined #ruby
Salve has quit [Ping timeout: 240 seconds]
TuxLyn has joined #ruby
TuxLyn has left #ruby [#ruby]
reflux has quit [Ping timeout: 240 seconds]
joelroa has quit [Ping timeout: 264 seconds]
funburn has joined #ruby
joelroa has joined #ruby
wjlafrance has joined #ruby
cashnguns has joined #ruby
helpa has joined #ruby
Stalkr_ has joined #ruby
mojjojo has quit [Quit: mojjojo]
joelroa_ has joined #ruby
linduxed has joined #ruby
xerox357 has joined #ruby
mojjojo has joined #ruby
<Stalkr_>
I hate asking since it's probably been asked countless of times: what books do you recommend for people with a Java background?
zachallett has quit [Remote host closed the connection]
artmann has quit [Quit: No Ping reply in 180 seconds.]
klaut_ has quit [Remote host closed the connection]
rubyracer has quit [Quit: Konversation terminated!]
lkba has quit [Ping timeout: 240 seconds]
<hfp>
Hi guys! `gem install foo` is very slow on my Mac. I enter the command and nothing happens for several seconds. I just typed `gem install rails` about a minute and a half ago and only now is it fetching packages. Why is that? I installed ruby using brew.
andrewhl has joined #ruby
joelroa_ has quit [Ping timeout: 264 seconds]
xerox357 has quit [Ping timeout: 246 seconds]
joelroa_ has joined #ruby
<Stalkr_>
centrx: I have been going through it, page 129, but it's a weird combination of teaching really basic and intermediate Ruby stuff
artmann has joined #ruby
zeade has joined #ruby
<Stalkr_>
So I was curious if there were something better out there. It explains what OOP is which I assumed the reader knew
<Stalkr_>
but it definitely has some interesting chapters as well, mixins was new to me
confounds has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<centrx>
You might like "Metaprogramming Ruby"
<centrx>
Someone had a great list here
<centrx>
pipework,
joelroa has quit [Ping timeout: 264 seconds]
<centrx>
pipework, Wake up fellow Rubyist!
<v4n>
hfp: you can try turning off rdoc and ri when installing gems: gem install --no-rdoc --no-ri gem's_name
joelroa has joined #ruby
andy__ has quit [Remote host closed the connection]
<Stalkr_>
I would imagine there is some sort of 'Ruby Reading/Learning Path' out there, but it all seems outdated with 2.1.0 and Rails 4.0.0 (I am in it for web development mostly)
<hfp>
v4n: I'm new to Ruby and Rails, won't I miss the doc?
andy__ has joined #ruby
<centrx>
Stalkr_, Ruby 2.1 has minimal syntax changes
<centrx>
Stalkr_, Even a book for Ruby 1.8 will get you most all of the core parts
<centrx>
Stalkr_, Similar, The basic parts of Rails are the same since 3.0
<jhass>
well, strong parameters is quite an essential change
<Stalkr_>
I see. I understand update 1.9 was the major one in Ruby, but maybe there were some newer 'paths' out there
<centrx>
Yes, there are significant changes, sure
<v4n>
hfp: You can try that and see if it solves your problem. If it does run (gem rdoc --all) to install the doc for the gem(s)
<centrx>
Stalkr_, That is correct
joelroa_ has quit [Ping timeout: 264 seconds]
randomnick_ has quit [Read error: Operation timed out]
<centrx>
Stalkr_, You might also like RubyMonk and Ruby Koans, online interactive. I don't know if you can skip ahead in those, I assume yo ucan
<Stalkr_>
How is Eloquent Ruby and Well-Grounded Rubyist? I see those titles get thrown a lot, but maybe they are more suited for already Ruby developers?
joelroa_ has joined #ruby
<Stalkr_>
Ruby Koans looks really interesting, that's the one with tests right?
Faris has joined #ruby
<hfp>
v4n: I see. running `sudo gem install foo` or `gem install foo` from a non-root prompt has no incidence? I can use both?
mjs2600 has quit [Remote host closed the connection]
<hfp>
Stalkr_: I'm doing the Ruby koans, it's very interesting but impossible to understand all the subtleties they want to teach you without the help of #ruby
joelroa has quit [Ping timeout: 240 seconds]
<Stalkr_>
hfp: Did you have prior experience with Ruby and/or other languages?
Faris has quit [Client Quit]
faris_ has joined #ruby
<v4n>
hfp: Using sudo will do a system wide install of the gem.
devyn is now known as drserialize
faris_ has quit [Client Quit]
<hfp>
Stalkr_: Well I played around with PHP mostly
Faris has joined #ruby
joelroa has joined #ruby
jobewan has joined #ruby
andy__ has quit [Ping timeout: 265 seconds]
<hfp>
v4n: I'm not sure if I should do a system-wide install or not. What's the usual way?
atlas__ has quit [Ping timeout: 252 seconds]
<Stalkr_>
hfp: How do you like Ruby compared to PHP? I would like to convert a mate to start using Ruby, but I think it's an impossible mission
joelroa_ has quit [Read error: Operation timed out]
<hfp>
Stalkr_: Ruby is infinitely better :)
<jhass>
Stalkr_: just take some data transforming 20-50 lines of java he wrote and rewrite it in 1-2 lines of ruby ;)
<centrx>
PHP is an abomination and a scourge on the face of the earth.
<hfp>
Stalkr_: PHP is very messy and inconsistent, Ruby is to the point (as jhass pointed out) and easy to read
<hfp>
Stalkr_: Yeh, not much love for PHP here haha
joelroa_ has joined #ruby
havenwood has quit [Remote host closed the connection]
dseitz has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
havenwood has joined #ruby
<Stalkr_>
Unfortunately we are forced to use Java, and the guy has only been playing around with PHP for three years, so he hate to unlearn what he knows. He has a hard time with Java for example because of the OOP design
joelroa has quit [Ping timeout: 252 seconds]
<centrx>
Poor fellow
vlad_starkov has joined #ruby
dseitz has joined #ruby
Hobogrammer has joined #ruby
<Stalkr_>
I must find other Rubyists to do awesome things with
joelroa has joined #ruby
lkba has joined #ruby
Faris has quit [Remote host closed the connection]
kitak has quit [Remote host closed the connection]
Soliah has joined #ruby
kitak has joined #ruby
Soliah has quit [Client Quit]
Guest60679 has joined #ruby
adambeynon_ has quit [Ping timeout: 246 seconds]
robmozart_ has quit [Ping timeout: 246 seconds]
mattyohe_ has quit [Ping timeout: 245 seconds]
<centrx>
Stalkr_, We are located in #ruby :)
joelroa_ has quit [Ping timeout: 265 seconds]
<Stalkr_>
I hope you guys are not like the rest of freenode
kapowaz has quit [Ping timeout: 246 seconds]
havenwood has quit [Ping timeout: 252 seconds]
Kricir has quit [Remote host closed the connection]
mattyohe_ has joined #ruby
joelroa_ has joined #ruby
<Stalkr_>
Is the Ruby community nice?
<centrx>
Stalkr_, You mean getting net-splitted all the time?
charliesome has joined #ruby
kitak has quit [Read error: No route to host]
<centrx>
Stalkr_, There is a principle in Ruby called MINASWAN
kitak has joined #ruby
<hermanmunster>
PHP is pure filth.
<yann2>
is there anything specially wrong with this method? http://pastealacon.com/34032 it fails at i += 1 " undefined method `+' for nil:NilClass" though the variable is defined a few lines above...
adambeynon_ has joined #ruby
mityaz has quit [Quit: See ya!]
<centrx>
Stalkr_, Matz Is Nice So We Are Nice
vlad_starkov has quit [Ping timeout: 264 seconds]
robmozart_ has joined #ruby
joelroa has quit [Ping timeout: 246 seconds]
<v4n>
hfp: As a rule of thumb use sudo only if you know what you are doing.
<Stalkr_>
centrx: Third hit on Google: Minaswan is DEAD
<Stalkr_>
oh noes
<hfp>
v4n: Noted, thanks
joelroa has joined #ruby
<centrx>
yann2, I get b.rb:6:in `rescue in <main>': undefined local variable or method `interval' for main:Object (NameError)
mostlybadfly has quit [Ping timeout: 245 seconds]
kapowaz has joined #ruby
Mongey has joined #ruby
Hobogrammer has quit [Ping timeout: 264 seconds]
<yann2>
centrx, interesting. Now i m even more confused :)
<centrx>
yann2, I get some weird characters copying from that pastie, before the i += 1, that could be related or it might just be the pastie site
<centrx>
Stalkr_, uh oh
neodon has quit [Quit: Leaving]
drserialize is now known as devyn
<yann2>
fuck me
cj3kim has quit [Read error: Connection reset by peer]
<yann2>
you might be right
<yann2>
let me rewrite that whole s+++
cj3kim has joined #ruby
<Stalkr_>
centrx: What I meant was other channels seems to have some kind of superior complex (if that's what it's called). Too good to help out the newbies
joelroa_ has quit [Ping timeout: 264 seconds]
mostlybadfly has joined #ruby
Faris has joined #ruby
joelroa_ has joined #ruby
<centrx>
Stalkr_, I see a lot of newbies being helped here
<Stalkr_>
That's great
Hobogrammer has joined #ruby
<centrx>
Stalkr_, But in general I think that sort of thing is common with IRC channels
<yann2>
centrx, you re an ace. that might actually be a cut and paste issue error on my side
<yann2>
my linux likes to insert non breaking spaces instead of spaces in cut & paste
<yann2>
I destroyed 12 root servers a couple months ago because of a similar issue :'(
Jetchisel has joined #ruby
<jhass>
ouch
joelroa has quit [Ping timeout: 246 seconds]
<centrx>
Stalkr_, It can also be misinterpreted. Sometimes people come in and just want an answer as though we are their personal slaves, and refuse to do any sort of web search or independent thinking.
<Stalkr_>
I totally understand that's annoying too
joelroa has joined #ruby
joelroa has quit [Max SendQ exceeded]
false_economy has quit []
joshwines has joined #ruby
kayamm has joined #ruby
<yann2>
centrx, seriously thanks a lot, spent like an hour and a half on it and probably wouldnt have figured it out
snuffeluffegus has joined #ruby
<centrx>
You are welcome
bitcrave has joined #ruby
atlas__ has joined #ruby
kayamm has quit [Client Quit]
joelroa_ has quit [Ping timeout: 252 seconds]
workmad3 has joined #ruby
kayamm has joined #ruby
mojjojo has quit [Quit: mojjojo]
kitak has quit [Remote host closed the connection]
joelroa has joined #ruby
ddd has joined #ruby
ddd has quit [*.net *.split]
Kricir has joined #ruby
brian_____ has quit [Quit: brian_____]
<Stalkr_>
centrx: I will continue reading the Pick Axe. Do you recommend reading through the library from A - Z or use it merely as a reference?
<Stalkr_>
So far I have done A - L reading
<centrx>
Stalkr_, at ruby-doc.org you mean?
ringaroses has quit [Read error: Connection reset by peer]
kapowaz has quit [Ping timeout: 245 seconds]
joelroa has quit [Ping timeout: 246 seconds]
relix has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
Liothen has joined #ruby
kapowaz has joined #ruby
<Stalkr_>
centrx: I meant the 'Programming Ruby' book
joelroa has joined #ruby
robmozart_ has quit [Ping timeout: 240 seconds]
Steve445 has joined #ruby
<Stalkr_>
First 400 pages are kind of introduction to the language and its uses. The second half is a huge library, documenting the classes and methods