apeiros_ changed the topic of #ruby to: programming language || ruby-lang.org || Paste >3 lines of text in http://pastie.org || Rails is in #rubyonrails
EzeQL has quit [Remote host closed the connection]
EzeQL has joined #ruby
ilyam has joined #ruby
fayimora_ has joined #ruby
sohocoke has quit [Ping timeout: 245 seconds]
tvw has quit [Ping timeout: 246 seconds]
flip_digits has joined #ruby
rmascarenhas has joined #ruby
Tasser has quit [Ping timeout: 265 seconds]
ikaros has quit [Remote host closed the connection]
ZachBeta has quit [Quit: Computer has gone to sleep.]
fayimora has quit [Ping timeout: 264 seconds]
fayimora_ is now known as fayimora
fbernier has quit [Ping timeout: 246 seconds]
bambanx_ has joined #ruby
andrewhl has joined #ruby
Tasser has joined #ruby
fbernier has joined #ruby
fayimora has quit [Ping timeout: 246 seconds]
cjs226 has joined #ruby
DRCALKIN has quit [Quit: Leaving]
ciopte7_ has quit [Quit: ciopte7_]
mikalv has quit [Ping timeout: 260 seconds]
mikalv has joined #ruby
ken_barber has quit [Remote host closed the connection]
cjs226 has quit [Client Quit]
mikepack has joined #ruby
kylemcgill has joined #ruby
EzeQL has quit [Remote host closed the connection]
EzeQL has joined #ruby
nari_ has quit [Ping timeout: 245 seconds]
Urthwhyte is now known as Urth|Away
perryh_away is now known as perryh
austinbv has joined #ruby
looopy has quit [Remote host closed the connection]
adamkittelson has quit [Ping timeout: 276 seconds]
kenichi has joined #ruby
<krz> given [1,2,3,4,5,6,7,8,9,10] whats a good way to grab 4 of the middle values
<krz> i.e.3,4,5,6 or 4,5,6,7,8
EzeQL has quit [Read error: Connection reset by peer]
<cout> array[start..end]
ghanima has quit [Quit: Leaving.]
<krz> what?
EzeQL has joined #ruby
wagle has quit [Remote host closed the connection]
weasels has joined #ruby
looopy has joined #ruby
otters has quit [Read error: Connection reset by peer]
<keithcelt> ary = [1,2,3,4,5,6,7,8,9,10]; ary[2..5] #=> 3, 4, 5, 6
cj3kim has joined #ruby
<krz> needs to be dynamic
<krz> values in the array can vary
EzeQL has quit [Read error: Connection reset by peer]
deryldoucette has quit [Quit: deryldoucette]
wagle has joined #ruby
<keithcelt> then calculate the start and end based on your criteria, then use the above.
EzeQL has joined #ruby
tworkin has quit [Quit: Leaving.]
Vert has joined #ruby
mengu has quit [Remote host closed the connection]
<Icehawk78> krz: Can you explain your usage in a better way?
<Icehawk78> ie will you ever have an array of less than 6 items?
<Icehawk78> And do you care how predictable the values are, or do you want it to be random?
<krz> ok more specifically. i have an array of 5000 elements. i need to get 100 elements that are in the middle
cableray has quit [Quit: cableray]
alexim has quit [Ping timeout: 244 seconds]
wvdschel has quit [Remote host closed the connection]
austinbv has quit [Quit: austinbv]
<Icehawk78> arr = (0...5000).to_a; size = 100; start = (rand * (arr.size - 2 - size)).to_i + 1; arr[start...start+100]
jimeh2 has quit [Ping timeout: 245 seconds]
<Icehawk78> There's probably a better way of doing that, but I think that would do what you asked.
diegok has quit [Read error: Connection timed out]
sspiff has joined #ruby
<krz> thanks will give this a go
Foxandxss has quit [Quit: KVIrc 4.0.4 Insomnia http://www.kvirc.net/]
EzeQL has quit [Ping timeout: 244 seconds]
Asher has quit [Ping timeout: 248 seconds]
dhaskew_ has quit [Ping timeout: 276 seconds]
spcshpopr8r has joined #ruby
<spcshpopr8r> hiya #ruby
ckrailo has quit [Quit: Computer has gone to sleep.]
stephenjudkins has quit [Quit: stephenjudkins]
Tasser has quit [Ping timeout: 248 seconds]
nfluxx_ has joined #ruby
keithcelt has quit [Remote host closed the connection]
berserkr has quit [Quit: Leaving.]
<bperry> I am trying to figure out why GetOpenFile(self, fptr); is failing with an IOError
<bperry> I can create my own file pointer and socket myself and this works
<bperry> but GetopenFile seems to be the Ruby way to of opening file descriptors
<bperry> has anyone run into this before?
nfluxx has quit [Ping timeout: 245 seconds]
<bperry> this is for a ruby gem written in C
Tasser has joined #ruby
<cout> I think GetOpenFile is if you already have an open file
<bperry> oh... interesting
nfluxx_ has quit [Ping timeout: 240 seconds]
havenn has quit [Remote host closed the connection]
<bperry> the catch is that this code hasn't been touched since 2006 and thing may have changed
<bperry> so that is very possible
<bperry> I will look into that
<bperry> thanks
Solnse has quit [Quit: Leaving.]
looopy has quit [Remote host closed the connection]
kenichi has quit [Remote host closed the connection]
Solnse has joined #ruby
Asher has joined #ruby
chson has quit [Ping timeout: 246 seconds]
mikalv has quit [Ping timeout: 248 seconds]
sohocoke has joined #ruby
mikalv has joined #ruby
looopy has joined #ruby
weasels has quit [Read error: Connection reset by peer]
otters has joined #ruby
Progster has quit [Ping timeout: 252 seconds]
stephenjudkins has joined #ruby
chson has joined #ruby
cj3kim has quit [Quit: This computer has gone to sleep]
KillerFox has quit [Ping timeout: 265 seconds]
EzeQL has joined #ruby
Criztian_ has joined #ruby
mrsolo has quit [Quit: Leaving]
fbernier has quit [Ping timeout: 246 seconds]
AlbireoX has quit [Ping timeout: 246 seconds]
robbyoconnor has joined #ruby
tchebb has quit [Ping timeout: 246 seconds]
Criztian has quit [Ping timeout: 246 seconds]
maletor has quit [Quit: Computer has gone to sleep.]
liluo has joined #ruby
stkowski has quit [Quit: stkowski]
dbgster has joined #ruby
chson has quit [Read error: Connection reset by peer]
chson has joined #ruby
BrokenCog has quit [Quit: leaving]
yankov has quit [Quit: yankov]
shadoi has quit [Ping timeout: 245 seconds]
vitor-br has quit [Quit: Saindo]
ciopte7_ has joined #ruby
c0rn has quit [Quit: Computer has gone to sleep.]
bambanx_ has quit [Read error: Connection reset by peer]
stephenjudkins has quit [Quit: stephenjudkins]
kenperkins has quit [Read error: Operation timed out]
Solnse has quit [Quit: Leaving.]
Hanmac1 has joined #ruby
Hanmac has quit [Ping timeout: 245 seconds]
bambanx_ has joined #ruby
ZachBeta has joined #ruby
syamajala has joined #ruby
adeponte has quit [Remote host closed the connection]
sohocoke has quit [Quit: sohocoke]
bambanx__ has joined #ruby
robbyoconnor has quit [Excess Flood]
tchebb_ has joined #ruby
robbyoconnor has joined #ruby
bambanx_ has quit [Ping timeout: 250 seconds]
niku4i has joined #ruby
bambanx__ has quit [Client Quit]
spcshpopr8r has quit [Remote host closed the connection]
jeremyb has left #ruby [#ruby]
harukomoto has quit [Ping timeout: 250 seconds]
robbyoconnor has quit [Ping timeout: 276 seconds]
shadoi has joined #ruby
shadoi has quit [Remote host closed the connection]
sohocoke has joined #ruby
xaq has quit [Ping timeout: 245 seconds]
bambanx has joined #ruby
sohocoke has quit [Client Quit]
csavola has quit [Quit: csavola]
scb has joined #ruby
vitoravelino`afk is now known as vitoravelino
vitoravelino has quit [Changing host]
vitoravelino has joined #ruby
albemuth has quit [Quit: Computer has gone to sleep.]
savage- has quit [Ping timeout: 252 seconds]
maxwell_ has joined #ruby
KillerFox has joined #ruby
maxwell_ is now known as elliomax
elliomax is now known as maxwellE
maxwellE has left #ruby [#ruby]
jgrevich has quit [Quit: jgrevich]
eka has quit [Quit: Leaving]
cephalopod has joined #ruby
khakimov has joined #ruby
Criztian_ has quit [Remote host closed the connection]
yankov has joined #ruby
L-----D has joined #ruby
akhkharu has quit [Ping timeout: 265 seconds]
akhkharu has joined #ruby
theRoUS has joined #ruby
pdtpatr1ck has joined #ruby
moshee has quit [Ping timeout: 260 seconds]
moshee has joined #ruby
simao has quit [Read error: Operation timed out]
kenperkins has joined #ruby
danblick has joined #ruby
BrokenCog has joined #ruby
tomb_ has quit [Quit: ["Textual IRC Client: www.textualapp.com"]]
wvms has quit [Ping timeout: 240 seconds]
theRoUS is now known as RoUS
stefanp_ has quit [Ping timeout: 265 seconds]
simao has joined #ruby
voodoofish430 has quit [Quit: Leaving.]
Plas has joined #ruby
syamajala has quit [Remote host closed the connection]
chimkan_ has joined #ruby
rmascarenhas has quit [Ping timeout: 244 seconds]
tomb_ has joined #ruby
Plas has quit [Client Quit]
wvms has joined #ruby
uris has quit [Ping timeout: 276 seconds]
Guest51338 has left #ruby [#ruby]
niklasb has quit [Ping timeout: 252 seconds]
TorpedoSkyline has quit [Quit: Leaving]
kenperkins has quit [Ping timeout: 246 seconds]
jd is now known as Jaded
uris has joined #ruby
austinbv has joined #ruby
rmascarenhas has joined #ruby
ken_barber has joined #ruby
c0rn has joined #ruby
yankov has quit [Quit: yankov]
tvw has joined #ruby
austinbv has quit [Client Quit]
withnale_ has joined #ruby
tomb_ has quit [Ping timeout: 245 seconds]
tomb_ has joined #ruby
cj3kim has joined #ruby
JC_SoCal has quit [Max SendQ exceeded]
x0F has quit [Disconnected by services]
x0F_ has joined #ruby
JC_SoCal has joined #ruby
x0F_ is now known as x0F
withnale has quit [Ping timeout: 245 seconds]
withnale_ is now known as withnale
seanstickle has quit [Quit: Nihil sub sole novum]
pygospa has quit [Ping timeout: 245 seconds]
pygospa has joined #ruby
dbgster has quit [Quit: dbgster]
niku4i has quit [Remote host closed the connection]
c0rn has quit []
digitalcakestudi has quit [Remote host closed the connection]
simao_ has joined #ruby
ivar has joined #ruby
jcromartie has quit [Quit: jcromartie]
spaceships has joined #ruby
simao has quit [Ping timeout: 260 seconds]
moosya has quit [Quit: moosya]
t0mmyvyo has joined #ruby
uris has quit [Quit: leaving]
uris has joined #ruby
freeayu3 has joined #ruby
ipoval has joined #ruby
<freeayu3> how to display quotation marks from the string puts &#39;hello world&#39;
Araxia_ has quit [Quit: Araxia_]
fbernier has joined #ruby
araujo has quit [Ping timeout: 252 seconds]
quesada has quit [Ping timeout: 246 seconds]
quesada_ has joined #ruby
kenichi has joined #ruby
wvms has left #ruby [#ruby]
Progster_ has joined #ruby
Progster_ has quit [Client Quit]
Progster has joined #ruby
fulmato has joined #ruby
araujo has joined #ruby
araujo has quit [Changing host]
araujo has joined #ruby
jlwestsr has joined #ruby
t0mmyvyo has quit [Quit: http://twitter.com/tommyvyo]
krz has quit [Quit: krz]
ZachBeta has quit [Quit: Computer has gone to sleep.]
savage- has joined #ruby
Urth|Away is now known as Urthwhyte
mattonrails has quit [Remote host closed the connection]
eywu has quit [Quit: Leaving.]
freeayu3 has quit [Ping timeout: 260 seconds]
baroquebobcat has joined #ruby
ciopte7_ has quit [Quit: ciopte7_]
mpereira has quit [Ping timeout: 260 seconds]
jcromartie has joined #ruby
freeayu3 has joined #ruby
jcromartie has quit [Client Quit]
jlwestsr has quit [Quit: Leaving]
test34 has quit [Ping timeout: 260 seconds]
krusty_ar has quit [Remote host closed the connection]
Tref has joined #ruby
radic has quit [Disconnected by services]
radic_ has joined #ruby
radic_ is now known as radic
austinbv has joined #ruby
harukomoto has joined #ruby
kah_ has quit [Quit: Leaving]
moosya has joined #ruby
mrwalker has joined #ruby
robdodson has joined #ruby
cableray has joined #ruby
albemuth has joined #ruby
godzirra has quit [Read error: Connection reset by peer]
looopy has quit [Remote host closed the connection]
c0rn has joined #ruby
Cakey has joined #ruby
godzirra has joined #ruby
azm has joined #ruby
yoklov has quit [Remote host closed the connection]
yoklov has joined #ruby
yoklov has quit [Remote host closed the connection]
mattonrails has joined #ruby
jimmy has joined #ruby
mattonrails has quit [Remote host closed the connection]
cdepue has quit [Read error: Connection reset by peer]
foo42 has joined #ruby
looopy has joined #ruby
cdepue has joined #ruby
c0rn has quit [Client Quit]
spaceships has quit [Quit: leaving]
weasels has joined #ruby
khakimov has quit [Quit: Computer has gone to sleep.]
austinbv has quit [Quit: austinbv]
foo42 has quit [Quit: haskell]
weasels has quit [Client Quit]
radic has quit [Disconnected by services]
radic_ has joined #ruby
radic_ is now known as radic
weasels has joined #ruby
weasels has quit [Client Quit]
ZachBeta has joined #ruby
weasels has joined #ruby
ZachBeta has quit [Client Quit]
joshman_ has joined #ruby
ZachBeta has joined #ruby
vitoravelino is now known as vitoravelino`afk
ZachBeta has quit [Client Quit]
TrevorBramble has joined #ruby
tvw has quit [Remote host closed the connection]
bambanx_ has joined #ruby
bambanx_ has quit [Client Quit]
ciopte7 has joined #ruby
radic has quit [Read error: Operation timed out]
<bambanx> hi
<bambanx> guys can i do in ruby a method for example with 3 arguments mymethod(arg1, arg2, arg3) and in some cases dont use all , for example call this method mymethod(arg1,arg2) without use arg3 ?
<offby1> yes
<bambanx> how pls offby1 ?
Tref has quit [Quit: Tref]
radic has joined #ruby
<offby1> def mymethod (arg1, arg2, arg3="some default value")
<bambanx> offby1, i dont wanna default values, i wanna arg1 variables but in somes case dont use all args
<offby1> also def method (arg1, arg2, *rest)
becom33 has quit [Ping timeout: 265 seconds]
becom33 has joined #ruby
weasels has quit [Quit: WeeChat 0.3.7]
weasels has joined #ruby
Targen has quit [Ping timeout: 245 seconds]
defendguin has joined #ruby
cableray has quit [Quit: cableray]
<bambanx> offby1, if i declare a method like this mymethod(arg1,arg2,arg3) when i can it only with two method like this mymethod(1,12) it give me a error
<bambanx> offby1, say me wrong number of arguments
igotnolegs has joined #ruby
savage- has quit [Remote host closed the connection]
ananthakumaran has joined #ruby
austinbv has joined #ruby
dhaskew_ has joined #ruby
ryanf has quit [Ping timeout: 248 seconds]
imami|afk is now known as banseljaj
heftig has quit [Ping timeout: 272 seconds]
weasels has quit [Quit: WeeChat 0.3.7]
<horseman> bambanx: so, if you dont use all the args, then what do u expect the value of arg3 to be inside the method?
JohnBat26 has joined #ruby
weasels has joined #ruby
<bambanx> horseman, no this is why i am asking
otters has quit [Quit: Leaving]
c0rn has joined #ruby
<horseman> bambanx: well, that's why you need to provide a default value, as offby1 demonstrated, so that if you dont provide arg3 it still has a value. ok?:)
<bambanx> ok horseman , thanks
gtuckerkellogg has joined #ruby
<bambanx> thanks offby1 too
<bambanx> sorry if i dont understand to the first my english suck and i am learning :) ruby
dhaskew_ has quit [Ping timeout: 246 seconds]
Cakey has quit [Ping timeout: 245 seconds]
xclite has quit [Quit: Leaving]
Chryson has quit [Quit: Leaving]
hadees has quit [Ping timeout: 265 seconds]
weasels has quit [Quit: WeeChat 0.3.7]
otters has joined #ruby
_theriffer_ has quit [Quit: Leaving.]
<bambanx> is posible write a method within a method?
<offby1> no, unfortunately
<horseman> bambanx: depends, how do u want the inner method to behave?
<offby1> oh!
* offby1 's ears perk up
techhelp has joined #ruby
<bambanx> only for work into my main mehtod
Cakey has joined #ruby
techhelp has quit [Read error: Connection reset by peer]
<horseman> offby1: the thing about methods is they're always bound to the receiver, so if you define a method inside a method then it is bound to the receiver too -- in other words its scope is not limited to just the enclosing methods, it becomes a fully fledged instance method on the receiver
<bambanx> in my method with variable quantity of args i am rewriting to much code i am trying to find a way for fix it
<horseman> offby1: so this works:
<horseman> offby1: class A; def alpha; def beta; end; end; end
<bnagy> which in other words, means "don't do that"
<horseman> offby1: a = A.new; a.alpha; a.beta
<horseman> offby1: should be an extra 'end' in that example above :)
jimmy has quit [Remote host closed the connection]
jimmy has joined #ruby
<horseman> bnagy: it's useful in one or two situations
<bambanx> horseman, what mean bound is like a limit?
jimmy has quit [Remote host closed the connection]
Cicloid has quit [Remote host closed the connection]
<bnagy> horseman: suure it is. Name two with a straight face.
<horseman> bambanx: no... :) dont worry :)
emmanuelux has quit [Ping timeout: 264 seconds]
jimmybaker has joined #ruby
<bnagy> you'd be better off using a normal private method
<horseman> bnagy: when doing metaprogramming stuff, i used it when i wrote an 'attr_accessor_with_defaults'
<bnagy> at least then you're expressing some kind of intention that the 'inner' method is special
<bambanx> horseman, i worry i am trying to learn :)
ryanf has joined #ruby
<horseman> bnagy: other examples are when using method_missing, and defining the missing method on the first time someone tries to access it
<offby1> what I really miss (Python doesn't have this either) is an easy inline way to create a new scope, like scheme's "let"
<bnagy> horseman: why does that need a nested method? Surely it's just defining the accessor in class scope?
<bnagy> or do I misunderstand?
<horseman> offby1: it's extremely easy to define a let
<horseman> offby1: let me show u my blog post on it
<bnagy> horseman: again, that's just dynamic method definition, not nested method definition, no?
<horseman> bnagy: but that's the point, ruby doesn't have 'nested' method definitions, but i was giving examples wehre it's still useful to put a 'def blah' inside another method
vipaca has joined #ruby
vipaca has quit [Changing host]
vipaca has joined #ruby
<horseman> bnagy: i.e the: def hello; def goodbye; end; end example
<horseman> bnagy: or were you specifically arguing against actual nested methods (which ruby doesn't have) ?
<bnagy> ok, but that kind of wasn't the question. I was foolishly thinking you were answering it ;)
<offby1> horseman: your cunning disguised fooled me
<offby1> although I should have known from the "u"s
<horseman> hehe
<ryanf> hi horseman
<horseman> ryanf: hey
<horseman> offby1: anyway, i think it's a pretty neat way to abuse default arguments to mimic a let*
<ryanf> how are the horses
<offby1> horseman: that's about the most elegant definition I've seen in any language :)
<horseman> ryanf: flashing into the dark
<bnagy> horseman: more specifically, I thought we were debating about me saying 'don't do that' re trying to make nested methods
fbernier has quit [Ping timeout: 246 seconds]
<horseman> bnagy: oh ok
<horseman> bnagy: cool, i think the strongest argument against nested methods is that methods should be so small that you shouldn't need to actually break it up into other inner methods anyway
razer123 has joined #ruby
<horseman> or more like
<horseman> you can just define private methods on the class that do that stuff, u dont need to be hide that stuff just inside the method
<horseman> but maybe offby1 can give a good reason for using them
<offby1> heh
fbernier has joined #ruby
<offby1> I just wanted a narrow scope, I think
hadees has joined #ruby
gtuckerkellogg has quit [Quit: Computer has gone to sleep.]
<offby1> also it's just natural to me to define functions within functions, being an old lisp-head.
<ryanf> i think it's nice to be able to literally scope helpers inside methods so that it's not part of the broader interface
<ryanf> i sometimes even use procs that way
<ryanf> if it's a tiny helper
dhaskew has joined #ruby
<horseman> i went on a campaign trying to get people to implement it in ruby core but didnt get very far
azm has quit [Ping timeout: 276 seconds]
<horseman> i think it was more or less ignored :P
<horseman> which is a shame cos it's such a cute implementation
<ryanf> yeah i hadnt seen it but read it just now
<ryanf> and enjoyed it
L-----D has quit [Quit: Leaving]
<horseman> ryanf: i really like exploiting default args
<horseman> ryanf: another cool feature of that 'let' is that you can use block control keywords in there to do other stuff, like 'redo'
<bnagy> horseman: yeah, private method is what I said ^^^ up there somewhere
mahmoudimus has quit [Quit: Computer has gone to sleep.]
<horseman> so: let { x = rand(10); case x; when 3; redo; else "puts hi"; end }
simao has joined #ruby
<horseman> ryanf: it also gives u the ability to early-exit out of structures that dont normally allow early-exit, by putting a 'next' in code contained in the let
savage- has joined #ruby
tchebb_ has quit [Quit: Leaving.]
tchebb has joined #ruby
Urthwhyte is now known as Urth|Away
<horseman> against using 'let' though, i've never had a use for it in my life ;)
keanehsiao has joined #ruby
simao_ has quit [Ping timeout: 240 seconds]
rmascarenhas has quit [Quit: leaving]
zommi has joined #ruby
<any-key> I just looked it up
<any-key> never seen it before
<any-key> ...outside of haskell :P
dhaskew has quit [Quit: dhaskew]
mrwalker has quit [Remote host closed the connection]
ilyam_ has joined #ruby
ilyam_ has quit [Client Quit]
ryanf_ has joined #ruby
fulmato has quit [Read error: Operation timed out]
c0rn has quit []
ilyam has quit [Ping timeout: 260 seconds]
brianpWins has quit [Quit: brianpWins]
fbernier has quit [Ping timeout: 246 seconds]
baroquebobcat has quit [Quit: baroquebobcat]
fbernier has joined #ruby
mahmoudimus has joined #ruby
baroquebobcat has joined #ruby
horseman has quit [Read error: Connection reset by peer]
L-----D has joined #ruby
horseman has joined #ruby
yankov has joined #ruby
ryanf__ has joined #ruby
icy` has quit [Quit: Leaving]
DRCALKIN has joined #ruby
davidcelis has joined #ruby
kylemcgill has quit [Remote host closed the connection]
davidcelis has quit [Client Quit]
ryanf__ has quit [Client Quit]
davidcelis has joined #ruby
horseman has quit [Read error: Connection reset by peer]
danielvdotcom has joined #ruby
danielvdotcom has left #ruby [#ruby]
rippa has joined #ruby
joshman_ has quit [Quit: Computer has gone to sleep.]
Cakey has quit [Quit: Lost terminal]
davidcelis has quit [Client Quit]
davidcelis has joined #ruby
davidcelis has quit [Changing host]
davidcelis has joined #ruby
horseman has joined #ruby
moshee has quit [Remote host closed the connection]
pdtpatr1ck has quit [Quit: pdtpatr1ck]
moshee has joined #ruby
moshee has joined #ruby
moshee has quit [Changing host]
pdtpatr1ck has joined #ruby
bambanx has quit [Read error: Connection reset by peer]
albemuth has quit [Quit: Computer has gone to sleep.]
ananthakumaran1 has joined #ruby
Jaded is now known as Jade
philcrissman_ has quit [Remote host closed the connection]
khakimov has joined #ruby
sebastorama has quit [Ping timeout: 244 seconds]
Progster has quit [Ping timeout: 245 seconds]
ananthakumaran has quit [Ping timeout: 244 seconds]
Targen has joined #ruby
robdodson has quit [Quit: robdodson]
mikeycgto has quit [Remote host closed the connection]
chimkan_ has quit [Quit: chimkan_]
lkba has quit [Ping timeout: 246 seconds]
td123 has quit [Ping timeout: 246 seconds]
CheeToS has joined #ruby
ananthakumaran has joined #ruby
amolpujari has joined #ruby
austinbv has quit [Quit: austinbv]
tonini has joined #ruby
ananthakumaran1 has quit [Ping timeout: 250 seconds]
baroquebobcat has quit [Quit: baroquebobcat]
fbernier has quit [Ping timeout: 246 seconds]
horseman has quit [Read error: Connection reset by peer]
techhelp has joined #ruby
Zolrath has quit [Quit: Computer has gone to sleep.]
_theriffer_ has joined #ruby
_theriffer_1 has joined #ruby
horseman has joined #ruby
nirakara has joined #ruby
noodletraveler has joined #ruby
kil0byte has quit []
visof has joined #ruby
hemanth has quit [Read error: Connection reset by peer]
mahmoudimus has quit [Read error: Connection reset by peer]
_theriffer_ has quit [Ping timeout: 265 seconds]
zommi has quit [Remote host closed the connection]
jackiechan0 has joined #ruby
jackiechan0 has quit [Remote host closed the connection]
philcrissman has quit [Remote host closed the connection]
techhelp has quit [Quit: Leaving]
mahmoudimus has joined #ruby
Axsuul has quit [Ping timeout: 256 seconds]
tris has quit [Ping timeout: 256 seconds]
mahmoudimus has quit [Client Quit]
Axsuul has joined #ruby
Vert has quit [Read error: Connection reset by peer]
gtuckerkellogg has joined #ruby
chimkan has joined #ruby
mikepack has quit [Remote host closed the connection]
<shevy> god I hate bundler
techhelp has joined #ruby
<shevy> apparently you must have openssl installed and working to use bundler + rails
cephalopod has quit [Remote host closed the connection]
hamfz_ has quit [Ping timeout: 245 seconds]
tris has joined #ruby
visof has quit [Ping timeout: 246 seconds]
noganex has quit [Ping timeout: 240 seconds]
adeponte has joined #ruby
noodletraveler has quit [Ping timeout: 246 seconds]
jjp has quit [Ping timeout: 240 seconds]
noganex has joined #ruby
<bnagy> why would you not want to have openssl installed and working?
<bnagy> I mean, I'm not so keen about the bundler and Rails part, but...
friskd has joined #ruby
mahmoudimus has joined #ruby
brianpWins has joined #ruby
KL-7 has joined #ruby
nirakara has quit [Quit: This computer has gone to sleep]
Solnse has joined #ruby
KL-7 has quit [Client Quit]
danielvdotcom has joined #ruby
ananthakumaran has quit [Ping timeout: 260 seconds]
kenneth has joined #ruby
mfridh_ has joined #ruby
<kenneth> hey, i'm curious, how is something like attr_accessor implemented
mfridh has quit [Read error: Operation timed out]
<kenneth> is it just def attar_accessor on Object
nirakara has joined #ruby
<horseman> kenneth: no
musl has quit [Read error: Connection reset by peer]
<kenneth> hmm. the reason i'm asking is because i'd like to replicate something like that
techhelp has quit [Quit: This computer has gone to sleep]
musl has joined #ruby
<horseman> kenneth: like this: class Module; def attr_accessor(*args); args.each { |v| define_method(v) { instance_variable_get("@{v}") }; define_method("#{v}=) { |c| instance_variable_set("@#{v|", c) }; end
<horseman> something like tha t^
<horseman> a few typos there but u get the idea
<kenneth> hmm, interesting. why is it defined on the Module class?
<horseman> kenneth: because it defines instance methods, and only modules (and classes, which are a type of module) can have instance methods
<kenneth> and would it be possible to make something like that only works on subclasses of class X?
<horseman> kenneth: Yes
scb has quit [Remote host closed the connection]
<horseman> kenneth: you'd define it like this: class X; def self.attr_accessor...; end
<kenneth> ah, i see
<horseman> then all subclasses could use it
<kenneth> that's awesome. gotta love ruby
<horseman> yeah, ruby is the shit
<horseman> there's usually a way to do something, and the way is typically elegant
<horseman> no matter how ambitious the idea
<kenneth> the only thing i haven't been able to do
maahes has quit [Ping timeout: 252 seconds]
yxhuvud has joined #ruby
harukomoto has quit [Ping timeout: 246 seconds]
jesly_ has quit [Ping timeout: 246 seconds]
<kenneth> being able to create a enqueue do; whatever; end
jesly has quit [Ping timeout: 244 seconds]
<horseman> why cant u do that
<kenneth> which would serialize the block, send it to a queue, and execute it later
<kenneth> because you can't serialize code and capture scope at the same time
scb has joined #ruby
scb has quit [Read error: Connection reset by peer]
<horseman> brb
horseman has quit [Remote host closed the connection]
altiouz has joined #ruby
xjiujiu has joined #ruby
whuffor has quit [Read error: Operation timed out]
lambdan has quit [Read error: Operation timed out]
<bnagy> heisenscope
<bnagy> of course you can
c0rn has joined #ruby
<bnagy> they just haven't done it neatly yet :D I think jruby is probably closest, but I dunno if they want to have features > MRI
yugui_zzz is now known as yugui
<kenneth> i mean if you could, that'd be beyond awesome
<kenneth> that's something that only lisps can do at the moment
<kenneth> essentially, continuations
minijupe has quit [Quit: minijupe]
altiouz has quit [Ping timeout: 256 seconds]
DRCALKIN has quit [Quit: Leaving]
lambdan has joined #ruby
<bnagy> google for marshallable proc
<bnagy> I would quite like it to be a mainstream feature, as well :)
ananthakumaran has joined #ruby
mneorr has quit [Remote host closed the connection]
mneorr has joined #ruby
<bnagy> although if you think through the use cases, in a lot of them you actually want to strip out the old binding
<bnagy> which pretty much leaves you at eval, but it's just that we all love to hate on eval
<bnagy> me included
<kenneth> yeah i mean that was something i really wanted a long time ago
<kenneth> now i've moved on to other things
wvdschel has joined #ruby
<bnagy> there are tons of concurrent programming options for ruby though
mattp_ has quit [Read error: Operation timed out]
AlbireoX has joined #ruby
<bnagy> so despite wanting a marshallable proc, I don't _need_ it
mattp_ has joined #ruby
<kenneth> right
<kenneth> at this point i'm sold on using zeromq
sspiff has quit [Ping timeout: 246 seconds]
<kenneth> and a language-agnostic distributed architecture
<kenneth> most of our product is in php anyway, sadly
cdepue has quit [Remote host closed the connection]
<bnagy> yeah that's pretty much how I approach it
<bnagy> except I'm not sold on pure 0mq for work-queue patterns
<bnagy> so we use beanstalkd for that bit
<kenneth> i'm working on writing my own ruby mvc micro framework as a side project though
<bnagy> celluloid uses 0mq for * afaik though
kaneda_ has joined #ruby
<kenneth> https://github.com/kballenegger/Kenji my toy project
<kenneth> shitty code, actually
polysics has joined #ruby
vipaca has quit [Quit: Leaving...]
Guest80744 has quit [Ping timeout: 260 seconds]
polysics has quit [Remote host closed the connection]
danielvdotcom has quit [Quit: danielvdotcom]
<bnagy> can't comment, sry, my interest in web is zero
techhelp has joined #ruby
<bnagy> although json is really shitty :(
<kenneth> haha, i love json
<kenneth> i like bson more
<kenneth> because it's more compact and extensible
<limed> d3b!im1702
<kenneth> but less user-friendly
KL-7 has joined #ruby
<limed> oh fuck
<kenneth> nice password :)
<limed> welp there goes that password
<savage-> bnagy: no interest in web? do you get to use ruby in your day job?
techhelp has quit [Client Quit]
<bnagy> json is slow, shit, and can't handle binary data. boooo
KL-7 has quit [Client Quit]
<savage-> i like msgpack even more :)
<bnagy> savage-: yeah, more or less nothing but
<kenneth> savage-: it's funny though, i don't use ruby for any web code at work. all our ruby is either deamons or scripts
<savage-> bnagy: oh cool, what are you doing if you don't mind me asking? It just seems that here in SF most Ruby places are web focused.
<kenneth> like we have an irc bot in ruby, capistrano, job queue etc.
<bnagy> msgpack is good, msgpack-rpc is good
<kenneth> but all of our web code is in php
<bnagy> but for ruby<->ruby components I just use DRb
whuffor has joined #ruby
<bnagy> for anything else I use work queues or 0mq (ie no API model)
<bnagy> I use msgpack for serialisation though
<bnagy> savage-: I write large fuzzers
<kenneth> i mean if it was up to me i'd use bson. super fast performance, binary and extensible
<bnagy> and assorted similar stuff
<kenneth> but json is ubiquitous
<kenneth> the only viable alternatives for an api are… well… *is* xml
kaneda has joined #ruby
tewecske has joined #ruby
jhunter has quit [Ping timeout: 252 seconds]
<kenneth> can you do def self.initialize for a class constructor?
kaneda is now known as Guest48615
ivar has quit [Remote host closed the connection]
<bnagy> kenneth: https://gist.github.com/480059 just found this
kaneda_ has quit [Ping timeout: 265 seconds]
<bnagy> as I expected, json and bson both suck
<kenneth> oh wow
<kenneth> i'm dissapointed in bson
heisenmink has joined #ruby
<kenneth> i have a pure c implementation in our iOS sdk and it's fast as shit
<bnagy> msgpack is also 'better' in several other ways
igotnolegs has quit [Quit: Computer has gone to sleep.]
ilyam has joined #ruby
horseman has joined #ruby
shevy has quit [Ping timeout: 245 seconds]
nikhil_ has joined #ruby
uris has quit [Quit: leaving]
replore has joined #ruby
tomzx has quit [Ping timeout: 246 seconds]
xiaotian has joined #ruby
nirakara has quit [Ping timeout: 245 seconds]
neil__ has joined #ruby
akem has quit [Ping timeout: 276 seconds]
tchebb has quit [Quit: Leaving.]
jameshyde has quit [Read error: Connection reset by peer]
lolmaus has joined #ruby
shevy has joined #ruby
ryanf has quit [Disconnected by services]
ryanf_ is now known as ryanf
dwaynecrooks has quit [Read error: Operation timed out]
heftig has joined #ruby
defendguin has quit [Quit: Leaving.]
jesly has joined #ruby
jesly_ has joined #ruby
jackiechan0 has joined #ruby
<jackiechan0> hi there good morning
<kenneth> hey, the compile! method at https://github.com/sinatra/sinatra/blob/master/lib/sinatra/base.rb#1291 -- can anybody explain what it's doing? i'm somewhat confused
francisfish has joined #ruby
codespectator has joined #ruby
sepp2k has joined #ruby
<jackiechan0> kenneth: excuse me can you take a look to my exercize please? i have a little problem i'm studying and i'm n00b tnx
<kenneth> looks like your gets is returning nil
<fowl> jackiechan0, you can't do gets from codepad, because nobody is sitting at the terminal to input
schovi has joined #ruby
<fowl> kenneth, whats confusing about that?
keanehsiao has quit [Quit: keanehsiao]
<jackiechan0> fowl: i don't understand why when i gets.chomp the break string it doesn't break
<jackiechan0> fowl: thanks for helping
<fowl> jackiechan0, because while imput == imput.downcase will go on forever
<fowl> if its true
<jackiechan0> fowl: yeah but i i'mut the 'CIAO NONNA' uppercase that should break the loop
tchebb has joined #ruby
<jackiechan0> fowl: and what i get is the break string puts 'CIAO NIPOTE TORNA PRESTO!!' and the first string puts 'Ciao nipote da quanto tempo? come stai?' string again
<kenneth> jackiechan0: also, it's spelt input ;)
<jackiechan0> fowl: seems that break let me out the loop but since start = '' and while start =='' is still true, it let me get into the loop again
<bnagy> jackiechan0: wtf is while start=='' ??
<bnagy> jackiechan0: just use loop dp
<bnagy> *do
khakimov has quit [Quit: Computer has gone to sleep.]
<kenneth> okay never mind, i'm starting to get it
<kenneth> not the most readable piece of code :p
ABK has joined #ruby
<fowl> jackiechan0, the inner break will only break you out of that loop, but like i said, that condition "while input == input.downcase" is a trap
<bnagy> jackiechan0: and those inner while loops are bad control flow. You actually want to be testing if the input is uppercase
<bnagy> which means one input=gets.chomp and then some kind of if or case statement
danblick has left #ruby [#ruby]
<jackiechan0> bnagy: ok fowl tnx
<bnagy> jackiechan0: basically, the skeleton is loop do; #get input; if input is IN CAPS do this, elsif it's the break command break else be deaf end end
<jackiechan0> mhh
<bnagy> although I would favour a case statement over if elsif imho
maesbn_ has joined #ruby
<jackiechan0> bnagy: i have just a question , what I did at the begin of the skeleton was start=''
<jackiechan0> while start == ''
<jackiechan0> bnagy: i'ts the same to write while true instead ?
<bnagy> yes, that's just an obfuscated way to write 'loop do'
yankov has quit [Read error: Connection reset by peer]
<bnagy> while true is also stupid, just less stupid
noodletraveler has joined #ruby
maesbn_ has quit [Read error: Connection reset by peer]
yankov has joined #ruby
maesbn has joined #ruby
<jackiechan0> bnagy: sorry but i'm using the infos that the book gave to me until now, if i use more advanced options i'll get confused
<bnagy> while (0^3&&3^0)||0%1==0... I mean it's just silly
<bnagy> jackiechan0: I wish you'd stop saying that
<bnagy> if you want to use only what the book gives you, don't ask questions here
<bnagy> if you ask questions here, then listen to the answers
quesada_ is now known as urlwolf
<jackiechan0> bnagy: ok ok i don't want to say that tnx for your time so do loop
<jackiechan0> bnagy: why don't try
Gavilan has left #ruby [#ruby]
<bnagy> jackiechan0: also, remember that while it's an OK book, learn to program was written just after the american civil war
<jackiechan0> bnagy: lol ! do u suggest me to change book ?
akem has joined #ruby
<bnagy> I have no strong opinion on the matter. The exercises seem OK, but some of the "solutions" you present as being from the book are terrible
xiaotian has quit [Quit: Computer has gone to sleep.]
looopy has quit [Remote host closed the connection]
francisfish has quit [Remote host closed the connection]
<jackiechan0> bnagy: the author gives various solutions to the exercises 1) Deaf Grandma -How you could do it: & How I would do it:
andrewhl has quit [Quit: andrewhl]
<bnagy> imho I would rather people break bad habits right at the start, but I'm not didactic
Guest48615 has quit [Ping timeout: 252 seconds]
<jackiechan0> bnagy: i think the same as you, you you get a bad habit maybe you could have difficulty to remove in the future
<jackiechan0> bnagy: anyway.... where did you start learning ruby if i can ask ?
ph^ has joined #ruby
<bnagy> I wrote code, but I already knew how to program and knew several other languages
<bnagy> learning your fourth language is a very different process to learning to program
<bnagy> \o/ length match!
<jackiechan0> bnagy: that's true skeleton of some language is similar so you learnt it very fat
<jackiechan0> *languages
kaneda has joined #ruby
kaneda is now known as Guest50932
<bnagy> the skeletons of every language are similar, if you go deep enough
djdb has joined #ruby
MrGando has joined #ruby
<jackiechan0> bnagy: that's good, if you are able to learn very well a language it will be really easier to learn other
adeponte has quit [Remote host closed the connection]
kaneda_ has joined #ruby
<bnagy> learning to program is something else. Once you can program then languages are just a way to help (or hinder) you with their own flavour of magic incantations and style
<bnagy> here, you're learning about loops and flow control
<bnagy> just happens to be in ruby (allegedly)
abionic has joined #ruby
Guest50932 has quit [Ping timeout: 245 seconds]
<bnagy> anyway, enough philosophy, go make deaf nonna
<jackiechan0> :
<jackiechan0> )
<kenneth> (segments = path.split('/')).shift
Shrink has quit [Ping timeout: 244 seconds]
<kenneth> is there a more idiomatic way of doing that?
noodletraveler has quit [Ping timeout: 245 seconds]
<jackiechan0> bnagy: loops and flow control just happen in ruby?!
<bnagy> there's a constant for the separator, for a start
<bnagy> and some File methods you might want to look at
Morkel has joined #ruby
ABK has quit [Ping timeout: 256 seconds]
<rking> kenneth: Hrm, yep. So you're throwing away the first part completely?
gokul has joined #ruby
<kenneth> yes
<kenneth> it's for a request_uri that starts with a leading /
kevinbond has quit [Quit: kevinbond]
<rking> So far I have: throwaway, *segments = "a/as/sd/f/".split '/' …but I'm sure there's something better re the "throwaway" part.
noodletraveler has joined #ruby
<kenneth> tho i think i might just do this: https://gist.github.com/7da1fd318c0a3ebf0139
<bnagy> you could .split(File::SEPARATOR).drop(1)
<kenneth> no longer a one-liner, but a little more obvious, and saver
<kenneth> safer*
zommi has joined #ruby
<kenneth> oh, drop, neat
<rking> bnagy: Much, much nicer. Thanks.
djdb has quit [Remote host closed the connection]
ananthakumaran has quit [Ping timeout: 248 seconds]
<rking> bnagy: If it's a URL don't you mean '/' not File::SEPARATOR ?
<bnagy> well it will almost always be '/' in any case
<rking> kenneth: BTW the trailing segment is ignored by default.
<bnagy> but I odn't know if there's a URI constant or whatever
KL-7 has joined #ruby
<rking> bnagy: But if you're on Win32 won't it be '\\', and therefore fail on a URL?
<kenneth> oh, it is, rking?
<bnagy> I just hate seeing harcoded slashes, makes me twitchy
<kenneth> with split
<bnagy> rking: actually no, it won't
<bnagy> separator is '/' on windows too
<bnagy> only time you need '\\' is working with native libs
djdb has joined #ruby
<rking> kenneth: Yep, from pry: ? String#split ⇒ "If the limit parameter is omitted, trailing null fields are suppressed.
<rking> "
looopy has joined #ruby
noodletraveler has quit [Ping timeout: 250 seconds]
<kenneth> neat
<horseman> rking: let's make this like a scientology thing, the more people you convert over to pry the higher your rank and spiritual development
<horseman> rking: if you successfully convert certain difficult 'targets' then you progress even faster through the ranks
noodletraveler has joined #ruby
wargasm has quit [Ping timeout: 240 seconds]
<bnagy> (not happening)
<horseman> rking: primary target for u: bnagy
<horseman> bnagy: haha u preempted me
<kenneth> oh, inheritance question: i want to define a class method (self.) that's going to set an @@ on the calling subclass. is that possible?
Tuxist has joined #ruby
<bnagy> horseman: OT http://soundcloud.com/dachip/sets/da-chip-volume-1-2009 epic coding music
* rking looks at L. Ron Baniesterfiend.
<bnagy> kenneth: never use @@, ever, it's wrong in 100% of cases
<kenneth> eh… how do you suggest i store this then?
<bnagy> usually people that are tempted to use @@ want class ivars, but I don't know your pattern
<horseman> bnagy: cool
<kenneth> bnagy: i'm making a superclass that will let its children define routes à-la sinatra. i'm storing the routes in @@routes
<bnagy> kenneth: I don't care what you're doing, if you're using @@ vars you're doing it wrong :D
<kenneth> maybe i'm doing this wrong
<kenneth> but i'm curious what the correct way of doing it is
<bnagy> especially in this case, cause I assume you want the children to be able to have routes that are unique to their own class
<kenneth> precisely
<kenneth> hence my question
<bnagy> class ivar
jhunter has joined #ruby
<kenneth> i thought @@ was class ivar… hmm
<bnagy> assuming it's not just a normal ivar
<bnagy> no, the only thing @@ has going for it is looking like boobs
<kenneth> lol
<bnagy> if you want all instances of a certain class to have the same routes, and have a setter for that stuff in the superclass then it's class ivars
jprovazn_away is now known as jprovazn
jankly_ has quit [Quit: Leaving]
jimeh2 has joined #ruby
<bnagy> you can also make instance methods to make it easier for instances to get their own class ivars, for convenience
kenichi has quit [Remote host closed the connection]
<bnagy> kenneth: nb if you're just going to modify these routes at instance time then I don't see why you can't just have ivars, you would only do all this stuff if you have some meta happening, I think
<kenneth> so something like def self.add_route(r); @routes << r; end
<bnagy> should be, yeah
<bnagy> then you just need to jump through small hoops to access that @routes as an instance
kaneda_ has quit [Ping timeout: 244 seconds]
Hanmac1 is now known as Hanmac
<bnagy> like a class accessor self.routes @routes then instance time you can self.class.routes
<bnagy> or possibly something more elegant, I try and avoid meta these days :/
wargasm has joined #ruby
kaneda_ has joined #ruby
pdtpatr1ck has quit [Quit: pdtpatr1ck]
pdtpatr1ck has joined #ruby
mahmoudimus has quit [Quit: Computer has gone to sleep.]
jimeh2 has quit [Ping timeout: 265 seconds]
noodletraveler has quit [Ping timeout: 245 seconds]
noodletraveler has joined #ruby
Kabaka_ is now known as Kabaka
ryanf has quit [Quit: leaving]
noodletraveler has quit [Ping timeout: 252 seconds]
Neil___ has joined #ruby
noodletraveler has joined #ruby
piotr_ has joined #ruby
eka has joined #ruby
hemanth has joined #ruby
mnaser has quit [Quit: Computer has gone to sleep.]
neil__ has quit [Ping timeout: 265 seconds]
blacktulip has joined #ruby
bosphorus has joined #ruby
horseman has quit [Read error: Connection reset by peer]
ananthakumaran has joined #ruby
arturaz has joined #ruby
banseljaj is now known as imami|afk
neersighted is now known as neersighted[d]
seoaqua has joined #ruby
horseman has joined #ruby
Helius has joined #ruby
<seoaqua> will File.open set a file to nothing if it's aborted by user or by exception?
<hemanth> seoaqua, depends on the mode?
<rking> seoaqua: Well, it will close the IO in an "ensure".
<bnagy> (if you use the block form)
<seoaqua> rking: what if i did not use 'ensure'? will the file be set to zero byte?
noodletraveler has quit [Ping timeout: 244 seconds]
Urth|Away is now known as Urthwhyte
<rking> seoaqua: You implicity do "ensure" by using the block-form of File.open.
rajkane has joined #ruby
<rking> From `echo '$ File.open' | pry` (with the pry-doc gem installed): if (rb_block_given_p()) return rb_ensure(rb_yield, io, io_close, io);
Vendethiel has joined #ruby
noodletraveler has joined #ruby
pdtpatr1ck has quit [Quit: pdtpatr1ck]
<seoaqua> rking: i cant quite follow u. pls tell me directly will the file be zero with block-formed File.open :)
heftig has quit [Quit: leaving]
<seoaqua> rking: i even dont know there is another way of File.open
Eldariof-ru has joined #ruby
<rking> seoaqua: So your scenario is: File.open { |f| f.write buncha_stuff; … fail }, now you're wondering if some/all of buncha_stuff made it to disk?
<rking> seoaqua: Sure, there's the non-block form (which I don't think you generally want): f = File.open
<rking> seoaqua: BTW for things like this the best way is Try It And See. #ruby may give you good info, or it may give some random dude like me a chance to spout half-baked knowledge.
<kenneth> is it not possible to do def self.route(*methods, path, &block)
<seoaqua> rking: my file is randomly set to nothing, and i cant locate the error yet. i assume File.open to be the most suspicious one
hoelzro|away is now known as hoelzro
noodletraveler has quit [Ping timeout: 245 seconds]
<Beoran__> seoaqua, sounds more like the writing fails
sparrovv has joined #ruby
<seoaqua> Beoran__: but the disk could never be full, and there should be no hardware problems
<rking> kenneth: You can do that… why do you ask?
rajkane has quit [Remote host closed the connection]
<kenneth> i'm having trouble with it, it's spitting out an error because somehow path becomes the Proc
nikhil_ has quit [Quit: This computer has gone to sleep]
<rking> kenneth: Gist me more code.
<kenneth> i'm probably doing something wrong here then: def self.get(path, &block); self.route(:get, path, &block); end
<kenneth> er, scratch that, no & on line 2
noodletraveler has joined #ruby
<seoaqua> Beoran__: if i'm writing a huge text string to file /tmp/abc and then Ctrl+C. will the /tmp/abc be noting? or the original text?
<rking> kenneth: Well, your 'block' is misnamed.
<rking> kenneth: A block is a callable thing that cannot possibly have a name.
<rking> kenneth: So I'm wondering if it's a Proc.new {…}, proc {…}, or lambda {…}
<rking> seoaqua: I'd think the implicit .close would flush the buffer
<kenneth> it's used as get '…' do …
tvw has joined #ruby
Vendethiel has quit [Ping timeout: 244 seconds]
maxgas has joined #ruby
<rking> kenneth: Hook it up with more code on a gist. I can't see what's what.
<kenneth> that's a block, no? and then i can grab it as a variable on the get method that gets executed
<kenneth> okay, hold on
<seoaqua> rking: still cant follow u :S
<maxgas> Hello people. I'm a Java guy and i'm having problems understanding some Ruby snippets. Maybe you guys can quickly help with some details?
<maxgas> In this code..
<maxgas> while i < code.size chunk = code[i..-1]
<maxgas> What does i..-1 mean?
<maxgas> The double dots are confusing me.
<maxgas> It's the i minus -1 inside the code string?
<rking> maxgas: '..' creates a range. In this case, it's sort of a special case, since -1 means the last element.
<maxgas> Acessing as an array?
<seoaqua> rking: what's the procedure of File.open? to wirte a tmp file and then mv to the target file? or clean the target file then write to it?
<maxgas> Oh, a range.
<maxgas> I see.
<maxgas> So, a range between the current loop index and -1?
<maxgas> That's strange.
<rking> maxgas: echo 'i=3; code = "asdfgh"; code[i..-1]' | pry ⇒ "fgh"
<rippa> maxgas: if code is an array, that gives you elements from i to last
replore has quit [Remote host closed the connection]
noodletraveler has quit [Ping timeout: 252 seconds]
<maxgas> Oh, i see.
<maxgas> Thanks. :)
BiHi has joined #ruby
noodletraveler has joined #ruby
<rking> seoaqua: It's going to boil down to the syscall open(), which returns a file descriptor. That FD will then get write()s, but the whole thing is buffered (because it's inefficient to write each byte as it comes in). Under normal circumstances, you may or may not see your data due to that buffering, but my understanding is that a close() will flush first.
<maxgas> Ruby's syntax is still a challenge for me.
<maxgas> I'm blinded by c-like languages.
jjp has joined #ruby
* rking wonders how one finds the implementations of things like close() in /usr/src/linux/**/*
<rking> maxgas: Yeah, it's plenty cryptic at times. And it's very difficult to google for stuff like that.
<rking> maxgas: Your 4 options (AFAIK) are: 1) Try it and see. (Or should I say, Pry it and see (?)), 2) grep existing ruby code to see if you can get some context, 3) read a Ruby book straight through, 4) ask somebody.
<seoaqua> rking: so u mean its my second guess? btw,i never used .close , will {} do it?
ronniy has joined #ruby
Shrink has joined #ruby
<maxgas> rking, yeah, i went through google a few times and could not find nothing about the double dots. Ended up here.
<maxgas> IRC is usually my last resort.
<rking> seoaqua: Yes. File.open(…) { … } has an "ensure" inside it, which does an IO#close, and that fluses the stream
<kenneth> rking: this is dirty untested code: https://gist.github.com/7da1fd318c0a3ebf0139
<kenneth> but it's what i've got at the moment
<bnagy> maxgas: check http://ruby-doc.org/core-1.9.3/String.html etc for the classes you're interested in
<bnagy> fastest way of finding stuff if you already have some kind of clue
<horseman> bnagy: do you like banjo patterson
<seoaqua> rking: actually, my questionis, will the target file be truncated before the flush?
looopy has quit [Remote host closed the connection]
<rking> maxgas: For this one you could have done echo '? "asdf".[]' | pry
<rking> seoaqua: I see no reason why.
<bnagy> in this case the docs for String#[] (how we write the instance method [] on the String class)
<seoaqua> rking: before the flush successfully done
<rking> seoaqua: There's nothing in the code path that I see that would do that evilness.
<seoaqua> rking: i really cant find the reason why my file is truncated
* hemanth did a silly gem : gem install xkcd; xkcd ;)
<bnagy> seoaqua: what mode did you open it with
<rking> seoaqua: Break your problem down into a smaller, repeatable bit and go from there.
<seoaqua> bnagy: 'w'
<bnagy> seoaqua: and also, if you have an actual problem, just ask it, don't ask random questions around the topic
cj3kim has quit [Quit: This computer has gone to sleep]
<seoaqua> rking: ok thanks
jackiechan0 has quit [Quit: Sto andando via]
<bnagy> seoaqua: yeah, 'w' will truncate first
<seoaqua> bnagy: ok
<rking> seoaqua: How sure are you that it's not dying before the first write?
ipoval has quit [Quit: ipoval]
<seoaqua> bnagy: is there another kind mode? let me check the manual, thanks a lot~~~
<maxgas> Thanks for the help guys, really. :)
<bnagy> sounds like you want r+
<seoaqua> rking: there was a normal text file,then i start the program, so
<seoaqua> bnagy: hug u
<bnagy> and I always recommend adding 'b' if you ever want your code to run on windows
Jade has quit [Ping timeout: 248 seconds]
<seoaqua> bnagy: not a gay way
tvw has quit [Remote host closed the connection]
<rking> bnagy: But then that fubars the encodings, no?
<bnagy> not that there's anything wrong with that
<bnagy> rking: no it just stops ruby messing with your \r\n stuff
urlwolf has quit [Quit: Konversation terminated!]
roolo has joined #ruby
<rking> bnagy: Nope.
<rking> echo ö > x; ruby -e 'File.open "x", "rb" do |f| p f.read end' ⇒ "\xC3\xB6\n"
foofoobar has joined #ruby
<rking> ruby -e 'File.open "x", "r" do |f| p f.read end' ⇒ "ö\n"
ABK_ has joined #ruby
<bnagy> ?
<rking> bnagy: Encoding gets fubard by the 'b' flag.
<rking> As in, it treats the bytes as chars.
<bnagy> :) No it doesn't, it just read it as binary
<bnagy> the contents of the file are the same
<bnagy> just force_encoding on the string or whatever if you love umlauts
<rking> Well, I'm not sure about all the behaviors, but clearly .inspect gets it wrong after "rb" mode.
<rking> Yeah, no.
<rking> force_encoding is more of a problem than \r.
<bnagy> depends what kind of data you're writing
beneggett has joined #ruby
<rking> kenneth: Do you have any unit tests?
abionic has quit [Ping timeout: 245 seconds]
skogis has joined #ruby
<kenneth> actually, reload, but here's the code that's giving me trouble. i haven't gotten to testing the `call` method, i'm still blocked on the route for now :) https://gist.github.com/7da1fd318c0a3ebf0139
darthdeus has joined #ruby
francisfish has joined #ruby
<kenneth> and no, i don't really do TDD. i know it's all the rage, but i usually build unit tests after i build the feature to prevent regressions, instead of before
<rking> kenneth: Gritty bits like this are perfect for TFD.
yeggeps has quit [Quit: yeggeps]
kylemcgill has joined #ruby
yugui is now known as yugui_zzz
codespectator has quit [Quit: Computer has gone to sleep.]
ukwiz has joined #ruby
<rking> kenneth: I'm really not sure why what you expect to see in 'block' is ending up in 'path'. Is 'block' nil at that point?
<kenneth> rking: NoMethodError: undefined method `split' for #<Proc:0x007fbecc02efd0@(pry):3> \ from /Users/kenneth/Dropbox/dev/azure/kenji/lib/kenji/controller.rb:52:in `block in route'
<kenneth> i expect block to simply be passed along, but it seems to end up in the path variable, and i guess path is eaten up by the splat
<rking> kenneth: Yes, but what is in 'block'?
<kenneth> hmm, lemme see. nil i presume, but lemme check
<kenneth> yeah, def nil
<kenneth> I'm assuming my problem is that block is not ending up in &block, because &block only takes anonymous closures, not variables containing closures
Asher1 has joined #ruby
Choobie has quit [Ping timeout: 245 seconds]
codespectator has joined #ruby
medik has quit [Read error: Connection reset by peer]
<Hanmac> kenneth not 100% true ... &block can take any object with has a to_proc method
Asher has quit [Ping timeout: 240 seconds]
<kenneth> oh, looks like doing self.route(…, &block) instead of just `block` does the magic
medik has joined #ruby
<rking> kenneth: Aha! Good work.
petercs has joined #ruby
fixl has joined #ruby
<kenneth> i ruby syntax always trips me up. that's a sign that i need to spend more time with it
MrGando has quit [Ping timeout: 240 seconds]
brianpWins has quit [Read error: Connection reset by peer]
yankov has quit [Quit: yankov]
indeterminate has joined #ruby
brianpWins has joined #ruby
MrGando has joined #ruby
brianpWins has quit [Remote host closed the connection]
brianpWins has joined #ruby
<kenneth> :p i'm more of a objc / c / php / lisp developer
Asher has joined #ruby
Asher1 has quit [Ping timeout: 244 seconds]
maxgas has quit [Quit: Page closed]
yankov has joined #ruby
piotr__ has joined #ruby
piotr_ has quit [Ping timeout: 276 seconds]
yankov has quit [Client Quit]
<rking> hemanth: Cool. How come you didn't use open() in the XKCD.comic method?
<hemanth> rking, yes with require 'open-uri'
<rking> hemanth: But XKCD.img uses it, but XKCD.comic uses Net::HTTP::Get.new and such.
adambeynon has joined #ruby
<rking> Yep, that's what I'm reading.
<hemanth> Net::HTTP::Get.new?
<rking> Also, as part of the tangent from reading the 'xkcd' gem source, I found this fun oneo 'URI::DEFAULT_PARSER.instance_eval { @regexp }' | pry -rnet/http
seoaqua has quit [Ping timeout: 245 seconds]
<hemanth> strange! I'm using open() it self
brianpWins has quit [Quit: brianpWins]
<rking> hemanth: Oh, shoot. I was looking at the xkcd.rb from "gem install xkcd". It doesn't look like this. =)
<hemanth> rking, :) you must get this with the latest version of the gem
<rking> hemanth: Do you know why my 'gem install' didn't get the latest version?
<hemanth> rking, you have two versions?
<hemanth> gem uninstall xkcd && gem install xkcd
<rking> hemanth: This is the code that came in: # These settings were set by the catalyst build script that automatically
<rking> # built this stage.
rushed has joined #ruby
<rking> # Please consult /usr/share/portage/config/make.conf.example for a more
<rking> # detailed example.
stefanp has joined #ruby
stefanp has quit [Changing host]
stefanp has joined #ruby
<rking> Dargh.
* rking . N00b.
jimeh2 has joined #ruby
Solnse has quit []
workmad3 has joined #ruby
petercs has quit [Quit: Leaving.]
L-----D has quit [Quit: Leaving]
[edu] has joined #ruby
<rking> hemanth: Yep, still getting v0.0.8, which is the one I gisted.
vectorshelve has joined #ruby
<hemanth> rking, kool; try gem install gita;gita
<vectorshelve> hemanth: ?? ^^
* hemanth head-buts vectorshelve
<hemanth> :D
<rking> Could not find a valid gem 'gita' (>= 0) in any repository
<hemanth> rking, strange again!
tatsuya_o has joined #ruby
<hemanth> vectorshelve, works for you?
<horseman> hemanth: r y h3manth
<hemanth> horseman, sorry?
<vectorshelve> horseman: yeah he is
<vectorshelve> hemanth: what works for me ?
<horseman> hemanth: are you h3manth
<hemanth> horseman, i'm h3manth.com
petercs has joined #ruby
<hemanth> vectorshelve, gem install gita;gita
<hemanth> works?
<horseman> hemanth: why the "3"
<hemanth> horseman, mirror E
<hemanth> more l33t like
<horseman> hemanth: it's kind of embarrassing
<horseman> hemanth: i felt embarrassed for you seeing that '3'
<hemanth> horseman, did not get hemanth.com :D
<horseman> hemanth: like "what was he thinking?!?!?!"
<hemanth> horseman, why?
<horseman> hemanth: because it's what 13 year old kids did in 1997
<vectorshelve> hemanth: sorry I cant install gem now.. my apt-get has been blocked by proxy
adambeynon has quit [Quit: adambeynon]
<vectorshelve> horseman: u seem to be an Indian.. interested in an Indian :D
<hemanth> horseman, dsylexic /me :D
cha1tanya has joined #ruby
cha1tanya has quit [Changing host]
cha1tanya has joined #ruby
alup__ has quit [Read error: Connection reset by peer]
ABK_ has quit [Ping timeout: 250 seconds]
<hemanth> vectorshelve, all those are interested in an Indian is an Indian?!
FlyingFoX has quit [Quit: No Ping reply in 180 seconds.]
<vectorshelve> hemanth: what does that sentence mean now ? :)
<hemanth> rking, not happening?
<hemanth> vectorshelve, all those who are interested in an Indian is an Indian?!
<hemanth> vectorshelve, me toggling rapidly b/w windows
<vectorshelve> hemanth: hmmm right
<vectorshelve> hemanth: is there a gem named gita
<rking> hemanth: What not happening?
<hemanth> rking, gem install
<hemanth> vectorshelve, yes
<vectorshelve> hemanth: oh yeah... :) dude... ur amazing 2 gems in 2 days
<vectorshelve> rking: download manually http://rubygems.org/gems/gita
CheeToS has quit [Ping timeout: 265 seconds]
Tuxist64bit has joined #ruby
<hemanth> vectorshelve, nothing amazing about it, rather very silly
foofoobar has quit [Quit: bb]
heftig has joined #ruby
<vectorshelve> hemanth: Its really a cute gem... I will suggest a great logo for this new gem of urs... "Spread spirituality through Ruby" :)
<hemanth> brb
Tuxist has quit [Ping timeout: 245 seconds]
test34 has joined #ruby
mailo has joined #ruby
roolo has quit [Read error: Connection reset by peer]
flype has joined #ruby
alup has joined #ruby
test34 has quit [Ping timeout: 272 seconds]
piotr_ has joined #ruby
piotr__ has quit [Ping timeout: 246 seconds]
<hemanth> vectorshelve, lol nice
<vectorshelve> hemanth: Ruby meets Spirituality :D
<hemanth> vectorshelve, gita; it's not who you think!
Vainoharhainen has joined #ruby
<vectorshelve> hemanth: Bhagavad gita right
<hemanth> vectorshelve, yes not; gita the girl
c0rn has quit []
mohit_ has joined #ruby
mohit__ has joined #ruby
<vectorshelve> hemanth: arey yaar... bura joke.. aur waise b aaj ke zamaane ladkiya itne achche naam thodi rakhte hain.. it will be like sandra.. maria and all that :D
mohit__ has quit [Client Quit]
mohit_ has quit [Client Quit]
<hemanth> vectorshelve, :P
<horseman> vectorshelve: i want you to be banned forever
mohit_ has joined #ruby
mohit_ has quit [Remote host closed the connection]
<vectorshelve> horseman: why ?
mohit_ has joined #ruby
ananthakumaran has quit [Ping timeout: 252 seconds]
mohit_ has quit [Read error: Connection reset by peer]
mohits has joined #ruby
mohits has quit [Changing host]
mohits has joined #ruby
<horseman> vectorshelve: because you're an irritant
ananthakumaran has joined #ruby
<vectorshelve> horseman: can u explain as to how did I irritate u...
ananthakumaran has quit [Read error: Connection reset by peer]
<Hanmac> vectorshelve ignore him, he spamming 99.99% the time
sepp2k has quit [Remote host closed the connection]
<DefV> mai/23
tonini has quit [Remote host closed the connection]
ciopte7 has quit [Quit: ciopte7]
ananthakumaran has joined #ruby
<vectorshelve> Hanmac: ok..
<horseman> vectorshelve: ignore Hanmac, not only is he german but he's also has Aspergers. a lethal combination that possibly makes him the most boring man on the planet
<workmad3> heh
<vectorshelve> Hanmac: becom33 workmad3 shevy all of you ROCK \m/ and horseman STFU ok
fixl has quit [Quit: KVIrc 4.1.3 Equilibrium http://www.kvirc.net/]
<horseman> vectorshelve: i will wear a suit made from your skin b4 the end of the night
<vectorshelve> horseman: hahahaha
<workmad3> vectorshelve: quick bit of advice btw... IRC is pretty brutal, you may want to grow a bit of thicker skin (no offence meant)... also useful because it'll keep horseman warmer in his vectorshelve suit
<vectorshelve> Hanmac: is he justin bieber's dad ? :D
FlyingFoX has joined #ruby
<workmad3> shove a group of highly opinionated, arrogant loudmouths together and then remove all form of visual feedback and sparks are gonna fly :)
Mohan has quit [Ping timeout: 240 seconds]
schovi has quit [Remote host closed the connection]
gtuckerkellogg has quit [Quit: Computer has gone to sleep.]
Mohan has joined #ruby
pietr0 has quit [Remote host closed the connection]
pietr0 has joined #ruby
<workmad3> wow, I killed the conversation
<bnagy> THANKYOU
<workmad3> :)
<vectorshelve> workmad3: yeah thanks to ur boring incongruous obscure philisophical excerpts :D
<workmad3> I aim to please
<vectorshelve> workmad3: PLEAAAAAAASEEEEEEEEEEE :D
<workmad3> anyway, back to work
liluo has quit [Ping timeout: 244 seconds]
stefanp_ has joined #ruby
stefanp has quit [Ping timeout: 265 seconds]
mdw has joined #ruby
* hemanth sits by the side and enjoys the fit
liluo has joined #ruby
<shevy> "AnonNews is an independent and uncensored (but moderated) news platform for Anonymous."
<shevy> someone explain to me the practical difference of moderation and censorship
nirakara has joined #ruby
jackiechan0 has joined #ruby
<bnagy> moderation means no 'HAHAHAHAH COOOOCKS'
<bnagy> censorship means no stuff the publishers disagree with
<Tasser> bnagy, well, the publishers disagree with 'HAHAHAHAH COOOOCKS'
<bnagy> of AnonNews? No, probably not
<vectorshelve> shevy: Not a day without wishing you HAI ;)
<shevy> die vectorshelve
<bnagy> shevy: iow moderated is 'relevant only' censored is 'relevant, but exclusing the following types of content'
<shevy> vectorshelve, go do something useful and learn ruby :)
<vectorshelve> shevy: :D
<vectorshelve> shevy: the same old seasonal words from a ruby veteran :D
<shevy> vectorshelve go work on a project man!
<shevy> vectorshelve we'll need a few thousand manhours of work for a RubyOS
Tuxist64bit has quit [Read error: Connection reset by peer]
<Tasser> shevy, too slow :-P
<vectorshelve> shevy: Hmmm... I will :)
horseman has quit [Remote host closed the connection]
BiHi has quit [Ping timeout: 245 seconds]
pting has quit [Quit: Ex-Chat]
<Tasser> hmm, how do I insert an element in an array and shift the elements on the right by the amount inserted?
Tuxist has joined #ruby
<shevy> array[5,5] = %w( cat dog horse )
<shevy> won't work that?
<shevy> oops
<shevy> one error... a moment
<bnagy> Tasser: insert
BiHi has joined #ruby
<bnagy> [1,2,3,4].insert(2, *['a','a']) => [1, 2, "a", "a", 3, 4]
cha1tanya has quit [Ping timeout: 244 seconds]
<Tasser> nice
<shevy> array = %w( abc def ghi jkl mno pqr stu ); array[5,0] = %w( cat dog horse ); array # => ["abc", "def", "ghi", "jkl", "mno", "cat", "dog", "horse", "pqr", "stu"]
piotr__ has joined #ruby
baniseterfiend` has joined #ruby
gyre007 has joined #ruby
piotr_ has quit [Ping timeout: 246 seconds]
Urthwhyte is now known as Urth|Away
stetho has joined #ruby
Tuxist has quit [Remote host closed the connection]
bluenemo has joined #ruby
bluenemo has quit [Changing host]
bluenemo has joined #ruby
cha1tanya has joined #ruby
ananthakumaran has quit [Read error: Connection reset by peer]
ananthakumaran has joined #ruby
cha1tanya has quit [Remote host closed the connection]
dwaynecrooks has joined #ruby
maesbn has quit [Remote host closed the connection]
ananthakumaran has quit [Read error: Connection reset by peer]
berserkr has joined #ruby
ananthakumaran has joined #ruby
schovi has joined #ruby
clockwize has joined #ruby
maesbn has joined #ruby
ananthakumaran has quit [Read error: Connection reset by peer]
iocor has joined #ruby
ananthakumaran has joined #ruby
codespectator has quit [Ping timeout: 252 seconds]
trung has joined #ruby
bluenemo has quit [Ping timeout: 245 seconds]
<trung> Hi Ruby, Is there a way to reposync all rubygems to a local repository for speed, similar to rhel/cento's `reposync'?
heftig has quit [Quit: leaving]
codespectator has joined #ruby
ecolitan has joined #ruby
codebeaker has joined #ruby
nfk has joined #ruby
jbw has quit [Read error: Operation timed out]
tvw has joined #ruby
_theriffer_1 has quit [Read error: Connection reset by peer]
freeayu3 has quit [Read error: Connection reset by peer]
codespectator has quit [Ping timeout: 248 seconds]
<bnagy> I don't even know how many mirrors there are
<Tasser> trung, sure there is
ZachBeta has joined #ruby
codespectator has joined #ruby
freeayu3 has joined #ruby
mikekelly has joined #ruby
codebeaker has quit [Quit: codebeaker]
mikekelly_ has joined #ruby
_theriffer_ has joined #ruby
clockwize has quit [Read error: Connection reset by peer]
Vainoharhainen has quit [Quit: Linkinus - http://linkinus.com]
luxpir has joined #ruby
mikekelly has quit [Client Quit]
Vainoharhainen has joined #ruby
bluenemo has joined #ruby
mikekelly_ is now known as mikekelly
mikekelly is now known as mikekelly_
mikekelly_ is now known as mikekelly
jesly_ has quit [Ping timeout: 245 seconds]
_theriffer_ has quit [Ping timeout: 245 seconds]
jesly has quit [Ping timeout: 240 seconds]
cantonic has joined #ruby
TheFuzzball has quit [Disconnected by services]
TheFuzzb_ has joined #ruby
jbw has joined #ruby
ecolitan has quit [Remote host closed the connection]
yonggu has quit [Read error: Connection reset by peer]
yonggu has joined #ruby
A124 has joined #ruby
A124 has left #ruby [#ruby]
jackiechan0 has quit [Ping timeout: 245 seconds]
narkoz has joined #ruby
jackiechan0 has joined #ruby
<narkoz> how can I refactor it: message = users > 0 ? 'ok' : nil
<Hanmac> its like: if users > 0 then message = 'ok' else message = nil end
<baniseterfiend`> or just: message = 'ok' if users > 0
<hemanth> gem list > my_list
<hemanth> gem install my_list?
workmad3 has quit [Read error: Operation timed out]
thecreators has quit [Quit: thecreators]
<bnagy> narkoz: yeah, don't crosspost like that, please
MrGando has quit [Read error: Connection reset by peer]
SegFaultAX|work2 has quit [Read error: Connection reset by peer]
SegFaultAX|work2 has joined #ruby
jadon has left #ruby [#ruby]
thecreators_ has joined #ruby
Vendethiel has joined #ruby
mohits has quit [Remote host closed the connection]
zz_chrismcg is now known as chrismcg
gazler_ has quit [Remote host closed the connection]
<shevy> ack
<shevy> narkoz!!!
wargasm has quit [Read error: Connection reset by peer]
<shevy> good that apeiros is not here, he'd ban you outright
adambeynon has joined #ruby
wargasm has joined #ruby
hakanensari has quit [Ping timeout: 265 seconds]
dwaynecrooks has quit [Read error: Operation timed out]
narkoz has left #ruby [#ruby]
jackiechan0 has quit [Quit: Sto andando via]
savr has joined #ruby
<savr> hi
<savr> how do I get bundle install to stop asking for my password?
<savr> it seems like every gem I add requires it now
BiHi has quit [Quit: Computer has gone to sleep]
<shevy> the bundler gurus are on #bundler
<shevy> for my part I try to just avoid anything that uses bundle
chimkan has quit [Quit: chimkan]
urorbit has joined #ruby
Guedes_out is now known as Guedes
urorbit has quit [Quit: Leaving]
<savr> shevy, why?
<shevy> savr it never worked for me. Even when I do something simple, like this, require 'bundler', it explodes into errors NoMethodError: undefined method `root' for Bundler:Module
<shevy> lately it exploded in another error because I did not have openssl installed
<savr> it is working for whatever I'm using it for
<savr> :)
<shevy> I thought you have a problem with passwords ... :P
nirakara has quit [Quit: This computer has gone to sleep]
Eldariof-ru has quit []
jesly_ has joined #ruby
dwaynecrooks has joined #ruby
luxpir has left #ruby ["_part"]
jesly has joined #ruby
berserkr has quit [Quit: Leaving.]
fjfish has joined #ruby
sohocoke has joined #ruby
Eldariof-ru has joined #ruby
<savr> shevy, it takes bundle about 30 seconds to promt for the password
<shevy> hehe
<savr> so I have to run the command and come back to let it run for about 3 min
<shevy> shows its solid design and planning!
<savr> it is horribly slow
n1x has joined #ruby
<shevy> could be a feature :)))
kylemcgill has quit [Remote host closed the connection]
francisfish has quit [Ping timeout: 244 seconds]
<shevy> are you on windows?
flype has quit [Quit: ["Textual IRC Client: www.textualapp.com"]]
wvms has joined #ruby
nari has joined #ruby
greyEAX has quit [Remote host closed the connection]
<savr> shevy, linux
<baniseterfiend`> shevy: sup shevs
liluo has quit [Remote host closed the connection]
<mfridh_> Could anyone shed some light on this failure on nokogiri native extension? Fedora 16: https://gist.github.com/70eadd7c0a1159dccf81 . gem install nokogiri -v 1.5.2 gives same results.
Soda has quit [Read error: Connection reset by peer]
davidcelis has quit [Read error: Connection reset by peer]
davidcelis has joined #ruby
<Hanmac> mfridh_ you need ruby dev package and libxml2 dev package
gokul has quit [Quit: Leaving]
<Hanmac> (but it seems that user make programm is missing)
greyEAX has joined #ruby
mtfk has joined #ruby
fjfish has quit [Read error: Connection reset by peer]
<mtfk> hi anyone know some good solution for override class ?
mneorr has quit [Remote host closed the connection]
francisfish has joined #ruby
<Hanmac> mtfk what are you planing todo??
greyEAX has quit [Remote host closed the connection]
<mfridh_> hah omg
<mfridh_> Hanmac: yeah, make is missing
<mfridh_> too obvious!
<mtfk> I have class let say: class Foo < A
<mtfk> and I make a plugin which should override this class to use class Foo < B
<Hanmac> mtfk this is not possible without breaking other code
radic has quit [Ping timeout: 240 seconds]
<mtfk> so I need remove old one class and then write new one
<Hanmac> but you could define B as module and include it an Foo
<Hanmac> yeah you could remove the old class but its not good style
greyEAX has joined #ruby
<mtfk> if I will include B as module then I still have A
<Hanmac> yeah
<mtfk> which I do not want to have and I will need to override all methods from it to make sure that all which will work will be from B
<Hanmac> i think you should make clear what excatly you want todo
<Hanmac> its still ugly code
<mtfk> I have application where I have model which inherits fromo ActiveRecord and I want to replace it by model which will inherits from ActiveLdap
noodletraveler has quit [Quit: leaving]
<mtfk> replace I mean create plugin which will override functionality of this application
dnyy has quit [Remote host closed the connection]
kil0byte has joined #ruby
<mtfk> beacause I want to have possibility to uninstall plugin and back to orignal functionality
[edu] has left #ruby [#ruby]
<mtfk> and only one thing which works right now is to remove old one model which is not best solution
fearoffish has joined #ruby
savr has left #ruby ["Ex-Chat"]
fermion has joined #ruby
<Hanmac> make a class with does not inherit from any of them, but let the Foo class take an object, you can change the object
Prz has joined #ruby
ananthakumaran has quit [Quit: Leaving.]
ananthakumaran has joined #ruby
francisfish has quit [Remote host closed the connection]
radic has joined #ruby
Vaihdettu has joined #ruby
Beoran_ has joined #ruby
jcromartie has joined #ruby
<mtfk> thanks I will try it, it look like solution for this problem what I have
catphish has joined #ruby
<trung> Tasser: Hello!! Are you there?
<Tasser> probably, probably not
<trung> DOH!!
Beoran__ has quit [Ping timeout: 276 seconds]
<trung> heh, how can i locally reposync gems?
liluo has joined #ruby
<catphish> is there a simple way to handle Time.new(2012, 02, 30) as Time.new(2012, 02, 29) rather then spilling into march?
Targen has quit [Ping timeout: 245 seconds]
[Tritium] has quit [Ping timeout: 245 seconds]
Targen_ has joined #ruby
<Tasser> don't know, did you try gem server ?
fpd has quit [Ping timeout: 245 seconds]
<catphish> i guess a timple check after its set would do :)
fpd has joined #ruby
[Tritium] has joined #ruby
fearoffish has quit [Quit: Computer has gone to sleep.]
<catphish> oh, Date.new is more specific about it
<shevy> trung just copy all .gem files into a dir, then use gem server for it
<shevy> typically the cache/ dir holds all gem files, as in /usr/lib/ruby/gems/1.8/cache/
<Tasser> trung, or simply ask rubygems.org how to create a new mirror
Guest54378 has joined #ruby
<trung> oh i see
francisfish has joined #ruby
<trung> shevy: is there a way to just reposync the whole thing?
<shevy> you want to sync another server
<shevy> just write a simple .rb script that fetches what is available, then download those gems if not exist already
<trung> I see
<trung> Thanks
<shevy> but you probably dont even have a gem server running right now!
<trung> Negative!
<shevy> btw they also say the same there http://docs.rubygems.org/read/chapter/18
<shevy> "Copy any gems you wish to serve into the BASEDIR/gems subdirectory."
<trung> shevy: thanks for the link
<shevy> anyone wanna see really old code from me?
<vectorshelve> shevy: meeeeeeee
Guest54378 is now known as davidw
davidw has quit [Changing host]
davidw has joined #ruby
snearch has joined #ruby
<shevy> vectorshelve http://pastie.org/3949487
<shevy> if I'd start it from 0, I would not cram as much info into initialize()
<shevy> and not do crazy shit like this either:
<shevy> @default_wait_time_before_playing_the_song = @default_wait_time_before_playing_the_song.to_s.gsub(/std/,'')
<shevy>
<vectorshelve> shevy: what is that "e" from line 121 to 134 -> begining of each line
<shevy> vectorshelve I usually keep an alias e to puts, or another method, so that I can lateron change the output method
ananthakumaran has quit [Read error: Connection reset by peer]
<shevy> e is shorter to type, but I usually hook it up into some method that uses ansi colours, for commandline output
<Hanmac> shevy: set_*() methods are bad style
<shevy> and that way I can toggle it
ananthakumaran has joined #ruby
<vectorshelve> shevy: so where is that u define the alias.. in the same file ?
<shevy> vectorshelve usually yes, or on a per-project basis
<shevy> Hanmac well I could get rid of the set_ part, but I dont wanna use = instead either :(
<Hanmac> but "method=" is the ruby way of life :P
<vectorshelve> shevy: ok... nice... but define sensible aliases.. intepretable by laymen.. I mean e for print doesnt make much sense :) just a suggestion
<shevy> vectorshelve what else would you use
<shevy> vectorshelve I mean, the sensible thing would be to use puts :)
<vectorshelve> shevy: write_out :)
<bnagy> shevy: wow that's horrible
<shevy> yeah but puts would tend to be short
xkx has joined #ruby
<shevy> bnagy hah, it's only one file of a larger project, I dont dare show the other files :)))
<shevy> but one fun thing from another file...
Eldariof-ru has quit []
<vectorshelve> shevy: then dont waste lines of ruby code to define aliases for something primitive :)
<shevy> vectorshelve, alias is just one line
<shevy> bnagy, beat that! -> http://pastie.org/3949523
<bnagy> got a bit too carried away with meta
<bnagy> shevy: hahahahhahah
cordoval has joined #ruby
cordoval has left #ruby [#ruby]
<bnagy> shevy: I can't :(
manizzle has joined #ruby
geekbri has joined #ruby
<shevy> yeah!
Eldariof-ru has joined #ruby
tomzx has joined #ruby
<shevy> though I have to say, your substruct method is not easy to understand too!
<shevy> ohhh
<shevy> new can be used as variable
<shevy> I never thought of that so far :)
<shevy> lol I got an idea...
<shevy> new = Object.new
<shevy> new.old
<shevy> YAY!
<bnagy> LOL yeah it's probably not a great idea
<shevy> well at least you document
<bnagy> yeah, that's actually a habit I lost :(
<bnagy> all the doc generators started multiplying too fast for me to keep track
Vaihdettu has quit [Quit: Takki -->]
<shevy> hmm
jaikeerthi has joined #ruby
xjiujiu has quit [Read error: Connection reset by peer]
<shevy> since a while, perhaps two years, I try to document extensively in a web-page like interface. but not so much in a code-internal way
<shevy> like an extensive tutorial
<shevy> (for more important projects, not for tiny scripts.)
<mtfk> Hanmac: what do You think that instead of using Delegator use just Object.send(:remove_const, :Foo)?
fearoffish has joined #ruby
<bnagy> shevy: yeah I just had to kind of write dox for this stuff
Mez has joined #ruby
<Hanmac> imo remove_const would possble broke other code
<Hanmac> Delegator is more SAFE
ZachBeta has quit [Quit: Computer has gone to sleep.]
<Mez> what does << mean in ruby ?
<Mez> (it's hard to google for <<)
<hoelzro> Mez: append
<hoelzro> a = [ 1, 2, 3 ] a << 4 puts a
<Mez> hoelzro - so if I'm getting undefined method << for nil.Nilcass
<Mez> and the line in questiojn is
<rippa> it's bit shift
<Mez> hsh[key] << value
<Mez> which is nil ?
<rippa> 1 << 1 #=> 2
<hoelzro> rippa: ah, thanks, that too
<Mez> (I'd presume the hsh)
<hoelzro> Mez: hsh[key] is nil if it doesn't exist, afaik
<rippa> or if it's nil
<Mez> ah cool :) so it's if key is not set :)
fulmato has joined #ruby
<hoelzro> rippa: ah, once again, good call =)
* hoelzro is still fairly new to Ruby
<Hanmac> rippa: its only a bitshift for integer, string and array use it as add method
<shevy> Mez kinda "append or extend"
<rippa> and MyClass.new uses it for counting chickens
<shevy> I found a good word
<shevy> << means "MAKE TIS BIGGER!"
<shevy> hoelzro we need to train newcomers quickly so they can take over answering questions to newcomers for us :D
* shevy pats hoelzro on the back
Progster has joined #ruby
<Mez> this is weird.
<Mez> My colleague is getting loads of errors in the git gem like that
<Mez> but I'm not getting any
<shevy> dont worry
<shevy> he probably is dumber than you so that is fine
<Mez> we're just using normal code.
<Mez> We're using the same code on different boxes on the same files
chrismcg is now known as zz_chrismcg
<shevy> perhaps he has a heisencat in the computer
ZachBeta has joined #ruby
Shahor has joined #ruby
<Mez> shevy - is there a rule about bot getting support in here? Or are you just being obstructive for the fun of it ?
<shevy> bot?
<shevy> what kind of bot
<Mez> s/bot/not/
<shevy> lol ok
<shevy> Mez, it just depends on the folks who are online and able to help
<hoelzro> Mez: I assume that your Ruby/gem versions are identical?
heftig has joined #ruby
BiHi has joined #ruby
Morkel has quit [Quit: Morkel]
ZachBeta has quit [Client Quit]
<Mez> apparently not.
seanstickle has joined #ruby
<Mez> I have gem 1.3.5
<Mez> he has 1.8. something
<shevy> the latest rubygems version is 1.8.24
<shevy> from looking at 1.3.5 I suspect you use a debian based distribution
<Mez> yeah
<Mez> looks like he's installed it properly at some point
krusty_ar has joined #ruby
`brendan has joined #ruby
Chitown has quit [Ping timeout: 240 seconds]
jayrulez has quit [Quit: Leaving]
frishi has quit [Quit: Leaving...]
Chitown has joined #ruby
eka has quit [Remote host closed the connection]
Neil___ has quit [Remote host closed the connection]
frishi has joined #ruby
jaikeerthi has left #ruby ["ERC Version 5.3 (IRC client for Emacs)"]
felipec has joined #ruby
<felipec> is there a way I can do something like Pythons' subprocess.call(['foo', 'bar']) in ruby? the system command doesn't seem to accept an array
<seanstickle> What are you trying to do?
<felipec> seanstickle: system "mplayer file(with_parenthesis).mkv"
<felipec> I don't want to go through the trouble of shell quoting
<felipec> I don't need a shell
workmad3 has joined #ruby
dhaskew has joined #ruby
wangr has joined #ruby
<seanstickle> felipec: perhaps Kernel#exec fits the bill? http://www.ruby-doc.org/core-1.9.3/Process.html#method-c-exec
<felipec> aha! system 'foo', 'bar'
fukushima has quit [Quit: Leaving...]
<seanstickle> Process#exec I meant.
<rippa> felipec: system *array
keanehsiao has joined #ruby
wlievens has joined #ruby
<wlievens> I'm trying to install Ruby on CentOS 5. Is that possible without building from source?
<wlievens> Not just ruby, RoR and a specific application
tomzx has quit [Ping timeout: 276 seconds]
mengu has joined #ruby
ivar has joined #ruby
mrwalker has joined #ruby
becom33 has quit [Ping timeout: 248 seconds]
mvangala has joined #ruby
neil__ has joined #ruby
<JonnieCache> wlievens: you could find rpms for ruby
<JonnieCache> there is no official ones though afaik
dhaskew has quit [Quit: dhaskew]
<seanstickle> rvm is going to be a better option, I suspect
<seanstickle> Unless you really really can't compile
<JonnieCache> after youve installed ruby, rails, its dependencies and everything else are managed by the gem system
madtyp97 has joined #ruby
madtyp97 has left #ruby [#ruby]
<JonnieCache> rvm on a server can be a nightmare. just do everything by hand, after trying lots of solutions thats what i do now
<seanstickle> But some of the gems may require local compilation
fbernier has joined #ruby
<seanstickle> rvm on a server *can* be a nightmare, but also can be fine.
<JonnieCache> oh yeah there is that. impossible to avoid without massive effort.
<seanstickle> Anything on CentOS 5 is going to be a nightmare. :P
snearch has quit [Quit: Verlassend]
<seanstickle> You might be able to use JRuby on your local machine and then compile the whole app to JVM byte code and deploy to CentOS 5
<seanstickle> That could work, but I make no promises
<JonnieCache> rvm on the server just leads to problems when deploying. the shell environment it sets up is so convoluted its trickly to get it to work via ssh automation
<JonnieCache> tbh thats probably my lack of linux-foo
<seanstickle> JonnieCache: there is server-wide installs of rvm these days
<seanstickle> JonnieCache: it works ok
<wlievens> what is rvm?
<JonnieCache> yeah ive tried that. you still have to load the script and set the shell variables and oh god i dont want to even think about it
<seanstickle> Haha
<seanstickle> wlievens: https://rvm.io//
<JonnieCache> but yeah if youve got years and years of linux admin experience its probably fine
chimkan has joined #ruby
mejzz has joined #ruby
<JonnieCache> now i just manually compile everything, prefix it all to /opt/ruby and i never have a single problem
<wlievens> I don't want to develop in RoR right now (sorry), just need to install it so that I can run Redmine
yonggu_ has joined #ruby
fowl has quit [Ping timeout: 248 seconds]
<mejzz> Hi. Is there a way to set the platform for bundler?
<wlievens> so, your advice is "build from source always"?
<JonnieCache> wlievens: its an unfortunate fact of how the ruby ecosystem works that you end up having to build from source whether you like it or not
emmanuelux has joined #ruby
<JonnieCache> its a longstanding issue
<wlievens> okay
<JonnieCache> there are tools out there to make this easier, rvm is one, ruby-build is another
<seanstickle> I don't consider compilation to be an "unfortunate fact", but others do seem to.
baroquebobcat has joined #ruby
KL-7 has quit [Ping timeout: 244 seconds]
Shahor has quit [Quit: Linkinus - http://linkinus.com]
<JonnieCache> seanstickle: lots of people will be revoluted at the idea of having a compilation toolchain on a production server. security issues etc
<wlievens> thing is I don't know that much about linux
<mejzz> I try to generate a war from redmine but jruby-openssl gem is missin
<wlievens> if I make install and everything
<wlievens> will it install it in a proper directory
<seanstickle> JonnieCache: crazy
<wlievens> such that I can then delete my build directory
<wlievens> or not?
<JonnieCache> wlievens: yes
<wlievens> great
<JonnieCache> wlievens: but if youre inexperienced i suggest using some kind of script
ananthakumaran has quit [Ping timeout: 250 seconds]
<wlievens> I'm not completely inexperienced, I've done this before. I'm just more afraid of installing stuff from source that's all
yonggu has quit [Ping timeout: 246 seconds]
<seanstickle> wlievens: if you have a Debian variant, just apt-get install Ruby.
<seanstickle> wlievens: easy-peasy
<wlievens> CentOS sorry
<seanstickle> Boo
<wlievens> I love apt-get though :)
ananthakumaran has joined #ruby
<wlievens> for my other server (private vpn), this stuff is for work though
jgarvey has joined #ruby
<JonnieCache> wlievens: you could try this actually https://github.com/lnxchk/ruby-1.9.3-rpm
<seanstickle> Just swap out CentOS with FreeBSd
<wlievens> JonnieCache: actually building right now so I think I will sit it out
<wlievens> seanstickle: I'm not in a position to do that with this server I guess
<seanstickle> Dang shame
<JonnieCache> dont knock centos
<wlievens> I probably could if I really wanted to, but then I'd be the guy in charge of that server
<JonnieCache> for work purposes the reliability is nice
* seanstickle knocks CentOS
kaspernj has joined #ruby
<matled> JonnieCache: the only problem I have with compiling from source is that it also moves the responsibility of checking if I have the latest version (mainly for security related fixes)
<seanstickle> The reliability of a C-64 is pretty good too.
<seanstickle> :P
<JonnieCache> if youre just running redmine you dont need all the latest shit. you need a server that wont make extra work for you
<wlievens> yes, you get me
<baniseterfiend`> seanstickle: sup stick
<wlievens> you've used redmine?
<seanstickle> Hey baniseterfiendishly
vectorshelve has quit [Quit: Page closed]
<JonnieCache> wlievens: nope
<seanstickle> I am departing for the verdant shores of Python, I'm afraid
becom33 has joined #ruby
tar_ has joined #ruby
<seanstickle> I will miss the honeyed music of Ruby
<seanstickle> Redmine is … something.
<wlievens> hmm?
<seanstickle> A bad wiki and a mediocre ticket tracker, come together to form a … something.
<seanstickle> ;)
<wlievens> I can't see that character to be honest
<wlievens> it's a black block
<seanstickle> Ellipses.
<seanstickle> . . .
<JonnieCache> black block? oh right sorry
withnale_ has joined #ruby
<wlievens> I was just looking for a relatively light weight project management tool
<JonnieCache> thought you were talking about anarchists
<seanstickle> JonnieCache: haha
<baniseterfiend`> seanstickle: Stick.
<JonnieCache> wlievens: best project management tool is a whiteboard and postit notes
<JonnieCache> if you need to check it remotely point a webcam at it
<seanstickle> A3 paper is my project management too of choice
<seanstickle> *too -> tool
<JonnieCache> ooooh new nmap
<JonnieCache> SCAN ALL THE THINGS
test34- has joined #ruby
test34- has quit [Changing host]
test34- has joined #ruby
withnale_ has quit [Client Quit]
withnale_ has joined #ruby
<JonnieCache> ok first the printer...
<baniseterfiend`> seanstickle: stick, do you have a background in python?
<seanstickle> baniseterfiend`: no, but I have a background in systems administration and devops
<baniseterfiend`> seanstickle: oh you're doing devops stuff
<seanstickle> Yah
fulmato has quit [Ping timeout: 276 seconds]
balboah has joined #ruby
<seanstickle> I'm sure to keep using Ruby in my sideline work though.
mrlemon has joined #ruby
<seanstickle> Cause it's so purty
baroquebobcat has quit [Quit: baroquebobcat]
gauloises has joined #ruby
<baniseterfiend`> seanstickle: i thought a lot of devops stuff is ruby these days with chef/puppet and frens
<seanstickle> There is puppet involved, it is true.
christianrojas has joined #ruby
<baniseterfiend`> seanstickle: maybe you could secretly replace the python with ruby
<seanstickle> Ha
<baniseterfiend`> start by writing you code like this
<baniseterfiend`> def hello
<baniseterfiend`> puts "hi"
<baniseterfiend`> end
nilg has quit [Remote host closed the connection]
philcrissman has joined #ruby
<balboah> My ruby 1.8.7 refuses to find an installed gem, json_pure in particular. Shouldn't "ruby" be getting same paths as "ruby" and "irb"? However gem list says its there
<wlievens> how long should the "linking ruby" part of the build take?
robbyoconnor has joined #ruby
<balboah> aaah require 'rubygems' fixed it
zz_chrismcg is now known as chrismcg
mrwalker has quit [Remote host closed the connection]
narkoz has joined #ruby
ken_barber has quit [Remote host closed the connection]
<mejzz> Is there a way to set a specific platform for bundler?
<mejzz> I would like to "bundle install" for another platform
linoj has joined #ruby
hynkle has joined #ruby
KL-7 has joined #ruby
rbanffy has joined #ruby
jrist-afk is now known as jrist
malcolmva has quit [Ping timeout: 272 seconds]
tomb_ has quit [Quit: Computer has gone to sleep.]
tar_ has quit [Quit: farewell]
narkoz has left #ruby [#ruby]
tk___ has joined #ruby
LOLZIE has joined #ruby
bglusman has joined #ruby
kpshek has joined #ruby
enroxorz has joined #ruby
<enroxorz> join #r.trees
<enroxorz> sorry
<enroxorz> forgot /
KL-7 has quit [Quit: This computer has gone to sleep]
<wlievens> if I "make install" ruby, does it automatically make /usr/bin/ruby point to the version I built?
<wlievens> (there already was a version of ruby installed)
ivar has quit [Remote host closed the connection]
lorandi has joined #ruby
<heftig> wlievens: should be /usr/local/bin/ruby
<heftig> that should be before /usr/bin in the PATH
<wlievens> hmm /usr/local/bin/ruby: No such file or directory
<seanstickle> "/usr/bin/env ruby" is what you'll want to use in a script
axl_ has quit [Read error: Connection reset by peer]
<seanstickle> Do "which ruby"
<wlievens> which ruby
<wlievens> returns /usr/bin/ruby
axl_ has joined #ruby
<wlievens> (but I installed ruby earlier with yum)
<hoelzro> wlievens: why are you clobbering your system Ruby with another Ruby?
<hoelzro> that sounds like a bad idea.
KL-7 has joined #ruby
<wlievens> hoelzro: the Redmine installation tutorial tells me to install ruby from source. Should I uninstall the existing ruby installation first?
v0n has joined #ruby
<hoelzro> I don't see why you couldn't just use your system Ruby...
<hoelzro> but I'm no expert
<wlievens> I think it's because I need the headers for other dependencies
<wlievens> can't find header files for ruby.
<wlievens> (says gem install passenger)
<hoelzro> wlievens: have you tried installing him?
<hoelzro> s/him/them/
<wlievens> installing what?
<hoelzro> the ruby headers?
<wlievens> how?
MrGando has joined #ruby
<hoelzro> yum?
<wlievens> yum install .... <--- fill me in here
<hoelzro> I have no idea
<hoelzro> I don't use CentOS
<hoelzro> hang on
asobrasil has joined #ruby
<hoelzro> wlievens: try ruby-devel
<wlievens> that fetches headers for 1.8.5-24.el5
<wlievens> I seem to need 1.8.6 or higher
ananthakumaran has quit [Quit: Leaving.]
chson has quit [Remote host closed the connection]
<wlievens> so I tried it with a yum repo config file for a repo that has 1.8.6
<hoelzro> what version of CentOS are you on?
<wlievens> 5.4
<hoelzro> ah
<wlievens> CentOS release 5.4 (Final)
<wlievens> then I get errors like
<wlievens> file /usr/lib/ruby/1.8/xmlrpc/datetime.rb from install of ruby-libs-1.8.5-24.el5.i386 conflicts with file from package ruby-libs-1.8.6.383-6.el5.kb.x86_64
<wlievens> should I uninstall the "old" ruby-devel somehow first?
<hoelzro> yes
<wlievens> (it also seems to be for 32 bit which makes even less sense)
<hoelzro> hopefully that doesn't break anything...
<wlievens> is that yum remove ruby-devel?
* hoelzro shrugs
<wlievens> hehe
<hoelzro> more likely ruby-libs
<hoelzro> as far as 'yum remove' goes, I don't know
<wlievens> that seems to do something
dv310p3r has joined #ruby
<wlievens> hmm seems to have some things depending on it
<wlievens> oh well I'll be bold
dv310p3r has quit [Read error: Connection reset by peer]
n1x has quit [Quit: Ex-Chat]
KL-7 has quit [Quit: This computer has gone to sleep]
<wlievens> okay looks nice
flype has joined #ruby
cha1tanya has joined #ruby
becom33 has quit [Ping timeout: 252 seconds]
becom33 has joined #ruby
ivar has joined #ruby
csavola has joined #ruby
trivol has joined #ruby
csavola has quit [Client Quit]
davidw has quit [Ping timeout: 246 seconds]
ElitestFX has joined #ruby
saschagehlich has joined #ruby
rippa has quit [Quit: derp herp]
rbanffy has quit [Quit: Ex-Chat]
rbanffy has joined #ruby
mpereira has joined #ruby
theRoUS has joined #ruby
chrismcg is now known as zz_chrismcg
rmascarenhas has joined #ruby
nilg has joined #ruby
Guest65890 has quit [Remote host closed the connection]
nari has quit [Ping timeout: 260 seconds]
<baniseterfiend`> seanstickle: hi
<seanstickle> Hallo again
<baniseterfiend`> seanstickle: im bored, any interesting discoveries or something you've learned recently?
<wlievens> gem install bundler
<wlievens> ERROR: Error installing bundler:
<wlievens> bundler requires Ruby version >= 1.8.7.
<wlievens> help
gtuckerkellogg has joined #ruby
<seanstickle> I learned some stuff about angels. That's interesting to me. Less so to most other people.
<seanstickle> Also, I've been reading about throughput accounting.
bojicas has joined #ruby
<baniseterfiend`> seanstickle: i've been watching a lot of documentaries about geology
<seanstickle> Also about endogenous retroviruses.
<Tasser> wlievens, install new ruby
<seanstickle> I hear that life is a significant geologic force on earth
<baniseterfiend`> seanstickle: do you know much about the mass extinctions?
<seanstickle> Is that borne out in the documentaries
<seanstickle> I know a fair bit about extinction level events, yeah
<baniseterfiend`> seanstickle: sure, it is
<wlievens> Tasser: are there any newer versions available for centos 5.4?
<Hanmac> wlienvens it seems that you need an newer OS :P
<wlievens> no control over that sorry
<baniseterfiend`> seanstickle: here i'll link you the series, it's not one of those awful gooey-eyed american sensationalist docos
<wlievens> so I build from source?
<baniseterfiend`> seanstickle: it's calm sober stuff by a cynical old brit
<seanstickle> I like Connections with James Burke
<seanstickle> He's a Brit, but not too cynical
<baniseterfiend`> seanstickle: http://www.youtube.com/watch?v=ITfVdYXw9jI
tworkin has joined #ruby
yonggu_ has quit [Remote host closed the connection]
<JonnieCache> baniseterfiend`: enjoy, the greatest documentary program ever made: http://www.youtube.com/watch?v=-QetE6WvBFY indeed it is the blueprint for all documentaries since in some ways
yonggu has joined #ruby
davidw has joined #ruby
<baniseterfiend`> JonnieCache: bronowski?
<seanstickle> baniseterfiend`: that guy looks *exactly* like I would expect a geologist to look like
<baniseterfiend`> JonnieCache: yeah that's very good
davidw is now known as Guest54524
<baniseterfiend`> seanstickle: hehe, i agree (though technically he's a biologist with an interesting in geology, unless you're not talking about the host himself)
dv310p3r has joined #ruby
<baniseterfiend`> interest in*
<seanstickle> I'm talking about the guy with the beard and the crazy hair
<baniseterfiend`> ah yeah
bojicas has quit [Client Quit]
<baniseterfiend`> seanstickle: geology-beards existed long before unix-beards :P and just as ubiquitous
<seanstickle> Ah, the host is a different guy, I see
bojicas has joined #ruby
<JonnieCache> this is also good http://www.youtube.com/watch?v=OutKE3tyG94
companio- has joined #ruby
uris has joined #ruby
<JonnieCache> if only for his awesome transparancies he uses
bojicas has left #ruby [#ruby]
<baniseterfiend`> JonnieCache: cool! though i find penrose kind of incoherent, not his own fault, but he always pitches his general-audience lectures way too high :P
<baniseterfiend`> JonnieCache: you should see his 'general audience' lecture on "twistor theory"
<baniseterfiend`> it's ridiculous, there's old grandmas in the audience and he's talking about quaternions
<JonnieCache> hah yeah i tried to watch that. got about 10 minutes in
<baniseterfiend`> and vector spaces
<seanstickle> baniseterfiend`: this is a *great* series
<seanstickle> Twistors is awesome
<baniseterfiend`> seanstickle: yeah, the one on 'snowball earth' is the most fascinating
<JonnieCache> that one i linked is kind of toned down though compared to another version of the same lecture. its a christmas lecture open to the public
companion has quit [Ping timeout: 252 seconds]
<baniseterfiend`> seanstickle: apparently 600 millions years ago the earth was completely encased in ice 1km thick
<seanstickle> I recently learned that flowers only appeared 300 MM years go
<seanstickle> *ago
<JonnieCache> i saw an amazing docu about the earths core, you should watch that if you can find it. it was a recent bbc one
<JonnieCache> theres all kinds of mad stuff down there, as you might imagine
<wlievens> ahhhhhhhh
<seanstickle> And the Devonian age of no terrestrial life, and short dwarf plants across the land
<wlievens> sudo make install gives me errors
<seanstickle> Baffles my imagination
dv310p3r has quit [Client Quit]
<baniseterfiend`> seanstickle: and it was only due to the most ridiculous outpouring of magma and gas from volcanoes that was able to melt the ice, due to filling the atmosphere with methane and co2 (greenhouse gases)
<seanstickle> Ha
<baniseterfiend`> JonnieCache: ah i think i saw that, they go to a laboratory in japan right?
<wlievens> error: /root/Downloads/ruby-1.9.3-rc1/lib/fileutils.rb:1371:in `initialize': Permission denied - /usr/local/bin/ruby (Errno::EACCES)
<baniseterfiend`> where the have a machine to apply the same temperatures and pressures found in the core
<wlievens> what does that mean?
<JonnieCache> hmm cant quite remember. there was a lot of stuff about stalagmites of molten iron or something
<baniseterfiend`> seanstickle: cool
carloslopes has joined #ruby
<JonnieCache> actually i do vaguely remember a japanese man looking very pleased with his dangerous looking machine
flype has quit [Quit: Computer has gone to sleep.]
eka has joined #ruby
<baniseterfiend`> yeah hehe
<baniseterfiend`> he was proud of himself
<seanstickle> Also learned recently that our mitochondria, the resident bacteria in our cells, are refugees from the oxygen holocaust caused by the overproduction of oxygen by cyanobacteria a few billion years ago
<seanstickle> They hid in other cells to survive the devastation of oxygen in the atmosphere, and now we carry them around
elliot98 has joined #ruby
<seanstickle> Crazy notions.
ananthakumaran has joined #ruby
<baniseterfiend`> seanstickle: was that in a doco or you read that somewhere?
emmanuelux has quit [Remote host closed the connection]
<seanstickle> baniseterfiend`: I was reading a book on symbiotic bacteria and such things
dv310p3r has joined #ruby
<wlievens> any idea why ruby's "make install" step fails?
<baniseterfiend`> cool
<seanstickle> Also read, in a related book, that live birth in mammals was made possible by a horrible immunossuppressive retrovirus disease
<baniseterfiend`> seanstickle: haha
<seanstickle> That, after some mutation, allowed animals to have non-eggshell-contained organisms inside them without rejection by the immune system
<baniseterfiend`> now that is cool
<Hanmac> seanstickle why dont we also carry cloroplasts around ?
<seanstickle> Hanmac: I don't believe so
<seanstickle> Hanmac: but at this point, it wouldn't surprise me
<seanstickle> Oh, "why"
<seanstickle> I dunno.
kil0byte_ has joined #ruby
<Hanmac> it would be cool if we could feed ourself with sunlight :P
<seanstickle> baniseterfiend`: yeah, so the next time you have a friend who is pregnant you can say, "thank goodness for the horrible devastation of ancient AIDS that allowed you to give live birth."
emmanuelux has joined #ruby
<baniseterfiend`> seanstickle: i'll put that on the 'congratulations' card ;)
<seanstickle> But don't be surprised if it doesn't go over well. :)
nu7hatch has joined #ruby
<seanstickle> I brought that up at dinner once with some friends who were going to have children.
<seanstickle> It was not as interesting to them, I don't think
<seanstickle> I am an idiot
<wlievens> there there
exchgr has joined #ruby
KL-7 has joined #ruby
<seanstickle> :)
<wlievens> JonnieCache: mayhaps you have a hint for me?
<wlievens> I'm clueless
<wlievens> I get /root/Downloads/ruby-1.9.3-rc1/lib/fileutils.rb:1371:in `initialize': Permission denied - /usr/local/bin/ruby (Errno::EACCES)
<wlievens> during make install
kil0byte has quit [Ping timeout: 245 seconds]
<baniseterfiend`> seanstickle: what do u think of the aquatic ape theory
elhu has joined #ruby
<JonnieCache> well firstly dont install rc1 of 1.9.3
<Tasser> wlievens, rbenv/rvm
<JonnieCache> install the latest 1.9.3
<seanstickle> baniseterfiend`: I read that years ago, but it seemed to be persuasive, in my limited knowledge.
<wlievens> okay that's a good start
<Tasser> wlievens, ruby guys never liked package managers ;-)
<seanstickle> I've also heard rebuttals that make an equally strong case for the same results in a savannah environment
<seanstickle> Sometimes I think evolutionary theory is a bit of a "Just So" story
<Tasser> wlievens, and wtf @ compiling stuff as root
<seanstickle> Until we have fossils and things
<wlievens> Tasser: what part of "clueless" did you miss?
<wlievens> I'm not supposed to do that?
<seanstickle> Certainly evo-psych is mostly bullshit
<baniseterfiend`> seanstickle: yeah, i liked the explanation of human tears/crying; that we were (like other aquatic animals) covering our eyes with a layer of protective mucas for when we ran into the sea to escape a predator
<baniseterfiend`> mucus
<Tasser> wlievens, grab a basic linux guide
<seanstickle> And our unusual ability to hold our breath for a long time.
<wlievens> Tasser: I know the basic commands mind you
<seanstickle> And forward-facing genitals
<baniseterfiend`> seanstickle: so whenever you see someone cry, you know they're really (evolutionarily speaking anyway :P) getting ready to run into the sea
<Tasser> wlievens, I'd say you shouldn't be let on a server, but I suppose everyone has his time constraints ;-)
joshman_ has joined #ruby
<seanstickle> I dunno, it all makes a good sense.
<seanstickle> But people say that about all sorts of crazy stuff, I guess
<wlievens> Tasser: nobody else in my company is going to. We don't have sysadmins
<wlievens> small company
kil0byte has joined #ruby
<Tasser> wlievens, now that's a hazard I'd say
<wlievens> JonnieCache: what is the latest stable version I should install?
<wlievens> the one with the -p suffix then?
<wlievens> Tasser: small company...
<Tasser> wlievens, then install a linux on yer own and become the sysadmin ;-)
odinswand has joined #ruby
<wlievens> Tasser: not in a million years
mengu_ has joined #ruby
mengu has quit [Ping timeout: 244 seconds]
<wlievens> it's not like this stuff is enjoyable
<Tasser> wlievens, so why are you doing sysadmin work?
<wlievens> because I'm not an autistic idiot? :)
<Tasser> did you draw the smallest straw? ^^
<wlievens> not really, I'm the closest to a sysadmin in this context - unfortunately :)
<wlievens> http://ftp.ruby-lang.org/pub/ruby/1.9/ruby-1.9.3-p194.tar.gz <---- would this be a good version to install?
mikepack has joined #ruby
<Tasser> wlievens, get rbenv or rvm to do that work for you - and compile as user, install as root
kil0byte_ has quit [Ping timeout: 252 seconds]
<wlievens> okay I'll try the rvm route
kil0byte_ has joined #ruby
<Tasser> rvm/rbenv makes it +/- easy to install the ruby, which makes it easy to upgrade, which you want to do from time to time - security n stuff
<wlievens> mkdir: cannot create directory `/usr/local/rvm': Permission denied
Vert has joined #ruby
Targen_ has quit [Ping timeout: 252 seconds]
<wlievens> how is that even possible if I'm logged in as root :-/
<wlievens> ooooh
<Tasser> selinux? -w ?
<Tasser> mount -o ro ?
<wlievens> it seems /usr/local is mapped to a mounted drive
<wlievens> I have no idea what to make of that
<wlievens> ll /usr/local returns: /usr/local -> /[some path physically on another machine]
<wlievens> ll is ls -l ofc
catphish has left #ruby ["Leaving"]
<Tasser> who did setup that?
<wlievens> a colleague - who happens to be absent
kil0byte has quit [Ping timeout: 260 seconds]
<baniseterfiend`> i
<wlievens> Today, at least. But I'm not going to go and change that right now :)
baniseterfiend` is now known as banisterfiend
C0deMaver1ck has joined #ruby
cmarques has joined #ruby
<wlievens> so erm, /usr/local is where software is typically installed?
<wlievens> I'm guessing this mount was set up such that software installed on our other server can be used on this one
PaciFisT has joined #ruby
<Tasser> wlievens, prepare for fuckup...
<wlievens> hah
<wlievens> I'll just go and install ruby on that other server, then
<wlievens> could not possibly go wrong!
sspiff has joined #ruby
sspiff has joined #ruby
<Tasser> probably you can abuse a vagrant instance for production...
<Tasser> vms are a good way to experiment anyway :-)
kaspernj has quit [Quit: Leaving]
bjhaid has joined #ruby
wargasm has quit [Read error: Connection reset by peer]
andrewhl has joined #ruby
uris has quit [Ping timeout: 244 seconds]
<LOLZIE> In a block such as 1000.times { }, is it possible to programmatically find the 1000 from within the block?
ivar has quit [Remote host closed the connection]
<LOLZIE> i.e. is it stored into some sort of variable
eka has quit [Quit: Leaving]
crankycoder has joined #ruby
<heftig> LOLZIE: just give it a variable, e.g. { |x| }
<heftig> it will pass 0 to 999
<LOLZIE> heftig: I'm not looking for the current iteration number, but the total number of times
<heftig> ah, no.
<heftig> well, give it a variable :p
<heftig> a = 1000; a.times { ... }
<LOLZIE> Saying that actually, I've just modified my code to not need this (it was wrong) - would be interesting if there was a way but not necessary :)
bjhaid has quit [Read error: Connection reset by peer]
heisenmink has quit [Quit: Lämnar]
<wlievens> Tasser: vagrant is a virtual machine engine?
<wlievens> is it good? it sounds interesting
ananthakumaran has quit [Quit: Leaving.]
chson has joined #ruby
<wlievens> but - can I then still a RoR app in it on that server? I probably can but I have no clue how
kaspernj has joined #ruby
<Hanmac> LOLZIE & heftig: 1000.times.with_object(1000) {|i,max| ... }
<heftig> ew.
BeLucid has quit [Remote host closed the connection]
<LOLZIE> Hanmac: heh, interesting, thanks
uris has joined #ruby
<heftig> but it's not the same 1000!
<LOLZIE> Haha that's true
<Hanmac> heftig, there is only one 1000, ask the object_id
lolmaus has quit []
<LOLZIE> Really? 0.o
kil0byte has joined #ruby
jackiechan0 has joined #ruby
ben_alman has quit [Excess Flood]
<Hanmac> LOLZIE yeah, Fixnum are stored nearly direkty in the c code ... ( nr * 2 + 1)
C0deMave_ has joined #ruby
wlievens_ has joined #ruby
<wlievens_> it's a very common trick
kil0byte_ has quit [Ping timeout: 245 seconds]
<wlievens_> for interpreters to flag pointer values when they contain native ints
thone_ has joined #ruby
C0deMaver1ck is now known as Guest21824
C0deMave_ is now known as C0deMaver1ck
C0deMaver1ck has quit [Changing host]
C0deMaver1ck has joined #ruby
perryh is now known as perryh_away
wargasm has joined #ruby
mikepack has quit [Remote host closed the connection]
thone has quit [Read error: Operation timed out]
wlievens has quit [Ping timeout: 246 seconds]
Guest21824 has quit [Ping timeout: 248 seconds]
wlievens_ is now known as wlievens
digitalcakestudi has joined #ruby
cdepue has joined #ruby
BeLucid has joined #ruby
chimkan has quit [Ping timeout: 252 seconds]
ABK has joined #ruby
ben_alman has joined #ruby
joshman_ has quit [Ping timeout: 244 seconds]
joast has quit [Quit: Leaving.]
kil0byte_ has joined #ruby
jesly has quit [Ping timeout: 244 seconds]
bluenemo has quit [Remote host closed the connection]
abra has joined #ruby
carloslopes has quit [Ping timeout: 265 seconds]
jesly_ has quit [Ping timeout: 246 seconds]
yankov has joined #ruby
kil0byte has quit [Ping timeout: 248 seconds]
looopy has joined #ruby
mrwalker has joined #ruby
zz_chrismcg is now known as chrismcg
andrewhl has quit [Quit: andrewhl]
bojicas has joined #ruby
neil__ has quit [Remote host closed the connection]
bojicas has quit [Client Quit]
mengu_ has quit [Ping timeout: 246 seconds]
tworkin has quit [Quit: Leaving.]
krusty_ar has quit [Read error: Connection reset by peer]
krusty_ar has joined #ruby
dqminh has joined #ruby
LBRapid has joined #ruby
kil0byte has joined #ruby
wargasm has quit [Read error: Connection reset by peer]
mdw has quit [Remote host closed the connection]
fearoffish has quit [Quit: Computer has gone to sleep.]
deryl has joined #ruby
kevinbond has joined #ruby
kil0byte_ has quit [Ping timeout: 252 seconds]
adeponte has joined #ruby
bjhaid has joined #ruby
mdw has joined #ruby
markborcherding has joined #ruby
chrismcg is now known as zz_chrismcg
fearoffish has joined #ruby
gtuckerkellogg has quit [Ping timeout: 240 seconds]
savage- has quit [Remote host closed the connection]
markborcherding has quit [Remote host closed the connection]
mikepack has joined #ruby
pygospa has quit [Disconnected by services]
pygospa has joined #ruby
joast has joined #ruby
manizzle has quit [Read error: Connection reset by peer]
fermion has quit [Quit: P]
mikepack has quit [Read error: Connection reset by peer]
CheeToS has joined #ruby
francisfish has quit [Remote host closed the connection]
rippa has joined #ruby
niku4i has joined #ruby
minijupe has joined #ruby
tk___ has quit [Quit: ばいばい]
chomp has joined #ruby
Morkel has joined #ruby
djdb has quit [Quit: Ухожу я от вас (xchat 2.4.5 или старше)]
wlievens has quit [Ping timeout: 256 seconds]
davidboy has quit [Remote host closed the connection]
relix has quit [Read error: Connection reset by peer]
cesario has quit [Read error: Connection reset by peer]
si14 has quit [Remote host closed the connection]
lectrick has quit [Read error: Connection reset by peer]
Dr4g has quit [Read error: Connection reset by peer]
moeSeth has quit [Read error: Connection reset by peer]
andev has quit [Read error: Connection reset by peer]
dekz has quit [Remote host closed the connection]
Spaceghostc2c has quit [Remote host closed the connection]
notbrent has quit [Read error: Connection reset by peer]
jrgifford has quit [Remote host closed the connection]
anildigital_work has quit [Read error: Connection reset by peer]
denysonique has quit [Write error: Connection reset by peer]
ziyadb has quit [Read error: Connection reset by peer]
MetaCosm has quit [Read error: Connection reset by peer]
pkondzior has quit [Remote host closed the connection]
_marvin has quit [Read error: Connection reset by peer]
patricksroberts has quit [Read error: Connection reset by peer]
xrl has quit [Read error: Connection reset by peer]
pvh has quit [Read error: Connection reset by peer]
JC_SoCal has quit [Read error: Connection reset by peer]
amar_key has quit [Read error: Connection reset by peer]
randym has quit [Read error: Connection reset by peer]
SeanTAllen has quit [Write error: Connection reset by peer]
bjhaid has quit [Ping timeout: 245 seconds]
kapowaz has quit [Remote host closed the connection]
lectrick has joined #ruby
gauloises has quit [Quit: leaving]
andrewhl has joined #ruby
jprovazn is now known as jprovazn_away
lectrick has quit [Remote host closed the connection]
josephwilk has quit [Remote host closed the connection]
gearaholic has joined #ruby
MetaCosm has joined #ruby
cmarques has quit [Quit: Computer has gone to sleep]
ThatDudeGuy_ has joined #ruby
pkondzior has joined #ruby
jadon has joined #ruby
ckrailo has joined #ruby
dekz has joined #ruby
xrl has joined #ruby
<jadon> can someone please tell me why this property isn't setting correctly? https://gist.github.com/675b7cdcc5a52d0dce44
mikepack has joined #ruby
maesbn has quit [Remote host closed the connection]
JC_SoCal has joined #ruby
ph^ has quit [Remote host closed the connection]
anildigital_work has joined #ruby
mikepack has quit [Read error: Connection reset by peer]
spligak has quit [Remote host closed the connection]
ph^ has joined #ruby
wvms has quit [Quit: wvms]
pvh has joined #ruby
tomb_ has joined #ruby
lkba has joined #ruby
JohnBat26 has quit [Remote host closed the connection]
relix has joined #ruby
kenperkins has joined #ruby
moeSeth has joined #ruby
<hoelzro> jadon: can you verify that your setter is running?
<hoelzro> also, why not just use attr_reader if you're going to override the writer?
francisfish has joined #ruby
<jadon> I've tried a number of things ~ even just manually defining and nada.
<hoelzro> jadon: works for me
chimkan_ has joined #ruby
<hoelzro> what version of Ruby are you on?
<jadon> 1.9.2
Targen has joined #ruby
<hoelzro> hmm, nevermind, it does not work for me.
billiamii has joined #ruby
MasterIdler has joined #ruby
<Hanmac> INFORMATION: in ruby "abc.xyz = bla" returns "bla" indipent from whats inside "xyz="
Synthead has joined #ruby
<seanstickle> True fact
<hoelzro> Hanmac: ah, thank you
<hoelzro> I did not know that
wvms has joined #ruby
<hoelzro> jadon: that explains it
<mrbrdo> what's the pastebin for ruby that executes the code and displays output too?
pygospa has quit [Disconnected by services]
pygospa has joined #ruby
<Hanmac> so abc.send(:xyz=,bla)
oooPaul has joined #ruby
<hoelzro> mrbrdo: codepad?
<jadon> so the override will not work ?
freeayu3 has quit [Quit: 离开]
mnaser has joined #ruby
mnaser has joined #ruby
<Hanmac> jadon, it works but blah.some_option = will not show it ... you need an blah.some_option after that
demici has joined #ruby
demici has left #ruby [#ruby]
Dr4g has joined #ruby
mikepack has joined #ruby
ziyadb has joined #ruby
mikepack has quit [Read error: Connection reset by peer]
<mrbrdo> Hanmac any idea what the reason behind this design is though?
sohocoke has quit [Quit: sohocoke]
<Hanmac> mrbrdo the same reason for this: a = b = c = d = e = 0
notbrent has joined #ruby
macmartine has joined #ruby
saidin_ has joined #ruby
_marvin has joined #ruby
fr0gprince_mac has joined #ruby
wvms has quit [Ping timeout: 244 seconds]
thecreators_ has quit [Quit: thecreators_]
Spaceghostc2c has joined #ruby
lorandi has quit [Quit: Leaving]
ank has joined #ruby
gearaholic has quit [Remote host closed the connection]
mikeycgto has joined #ruby
mikeycgto has quit [Changing host]
mikeycgto has joined #ruby
<makkura> jadon: check your comments
Eldariof-ru has quit []
<mrbrdo> Hanmac seems reasonable, a bit weird though :)
seanstickle has quit [Quit: Nihil sub sole novum]
blooberr has joined #ruby
digitalcakestudi has quit [Quit: Leaving.]
sohocoke has joined #ruby
albemuth has joined #ruby
td123 has joined #ruby
mohit_ has joined #ruby
mohit_ has quit [Read error: Connection reset by peer]
mohit_ has joined #ruby
mohits has joined #ruby
mohits has quit [Changing host]
mohits has joined #ruby
bjhaid has joined #ruby
mohit_ has quit [Client Quit]
lectrick has joined #ruby
randym has joined #ruby
mohits has quit [Client Quit]
tworkin has joined #ruby
mohits has joined #ruby
kish has quit [Ping timeout: 252 seconds]
mohits_ has joined #ruby
imami|afk is now known as banseljaj
mohits has quit [Disconnected by services]
mohits_ is now known as mohits
mohits has quit [Changing host]
mohits has joined #ruby
mohits_ has joined #ruby
ipoval has joined #ruby
amar_key has joined #ruby
mohits has quit [Remote host closed the connection]
mohits_ has quit [Remote host closed the connection]
SeanTAllen has joined #ruby
davidboy has joined #ruby
crankycoder has quit [Remote host closed the connection]
vipaca has joined #ruby
ben225 has joined #ruby
beneggett has quit [Ping timeout: 240 seconds]
ben225 is now known as beneggett
bjhaid has quit [Quit: Leaving.]
kish has joined #ruby
sohocoke has quit [Remote host closed the connection]
techhelp has joined #ruby
kish has quit [Read error: Connection reset by peer]
eywu has joined #ruby
hoelzro is now known as hoelzro|away
crankycoder has joined #ruby
<jadon> messed with it more… even with the suggestions…. no dice. If I'm using attr_accessor for other variables do you think that would cause issue attr_reader for one?
maesbn has joined #ruby
cesario has joined #ruby
schovi has quit [Remote host closed the connection]
khakimov has joined #ruby
kil0byte_ has joined #ruby
techhelp has quit [Client Quit]
ABK has quit [Ping timeout: 276 seconds]
kish has joined #ruby
mneorr has joined #ruby
kish has quit [Read error: Connection reset by peer]
denysonique has joined #ruby
axl_ has quit [Read error: Connection reset by peer]
axl_ has joined #ruby
kil0byte has quit [Ping timeout: 276 seconds]
mikepack has joined #ruby
mahmoudimus has joined #ruby
mengu_ has joined #ruby
kish has joined #ruby
carloslopes has joined #ruby
cbuxton has joined #ruby
ipoval has quit [Quit: ipoval]
kish has quit [Read error: Connection reset by peer]
Axsuul has quit [Read error: Connection reset by peer]
Vendethiel has quit [Ping timeout: 260 seconds]
tworkin has quit [Quit: Leaving.]
Prz has quit [Remote host closed the connection]
dnsdds has joined #ruby
Guest54524 has quit [Ping timeout: 244 seconds]
kish has joined #ruby
Helius has quit [Remote host closed the connection]
kish has quit [Read error: Connection reset by peer]
Targen_ has joined #ruby
joshman_ has joined #ruby
Targen has quit [Ping timeout: 245 seconds]
patricksroberts has joined #ruby
ivar has joined #ruby
berserkr has joined #ruby
timonv has quit [Remote host closed the connection]
altiouz has joined #ruby
kish has joined #ruby
cmarques has joined #ruby
mrwalker_ has joined #ruby
kish has quit [Read error: Connection reset by peer]
pdtpatr1ck has joined #ruby
mrwalker has quit [Read error: Connection reset by peer]
tworkin has joined #ruby
BiHi has quit [Ping timeout: 245 seconds]
MrGando has quit [Quit: Computer has gone to sleep.]
dnyy has joined #ruby
looopy has quit [Remote host closed the connection]
quest88 has quit [Quit: quest88]
kish has joined #ruby
Vendethiel has joined #ruby
kish has quit [Read error: Connection reset by peer]
BiHi has joined #ruby
cek has joined #ruby
<cek> Will ensure block always be run?
rushed has quit [Quit: rushed]
bjhaid has joined #ruby
savage- has joined #ruby
<Hanmac> cek, yeah, except your pc explode
<cek> Hanmac, wrong.
Drewch has joined #ruby
Gowie has joined #ruby
tewecske has quit [Quit: Leaving.]
<jadon> @Hanmac updated gist with output https://gist.github.com/675b7cdcc5a52d0dce44
<cek> How do you write onliner that would rescue any Exception class?
apeiros_ has joined #ruby
kish has joined #ruby
philcrissman_ has joined #ruby
ron has joined #ruby
cha1tanya has quit [Read error: Connection reset by peer]
<Mon_Ouie> begin; …; rescue Exception; …; end
kish has quit [Read error: Connection reset by peer]
<Hanmac> jadon maye your ruby is broken ...
<cek> Mon_Ouie, eh, non beauty
* rking thumbs up the use of Unillipses.
codespectator has quit [Ping timeout: 244 seconds]
<ron> someone please help :( I know nothing about ruby, just trying to get this app running, and I get this error: http://pastebin.com/CWPJdPhv - no matter how many online solutions I've tried following, I keep failing :-/
<Mon_Ouie> It's visually ugly because you want to do it in one line
<jadon> so I'm not crazy ~ this should work no?
<Mon_Ouie> It's also dangerous, and should usually not be done
<cek> raise rescue 'rescued'
<cek> but how about Exception
<Gowie> Hey all, I am trying to subclass array, but I am losing the to_yaml method which I like for debuggin. Anybody have any idea why? The error I get when I call to_yaml is "Anchor value must not be empty". and here is the code I use to subclass Array: https://gist.github.com/2770062
<Mon_Ouie> It is not forbidden to hit the enter key while writing Ruby code
<Hanmac> jadon i test it with 1.8 and 1.9 both works for me and p returns {:name=>"Option 1", :desc=>""}
brasten has joined #ruby
<jadon> it's not using the override for me. I even hardest @some_option to "blah" and still no return outside of what I pass it.
<Hanmac> jadon or is 0 your wanted output?
<jadon> 0 is NOT the wanted output
<Mon_Ouie> Gowie: You forgot to require 'json'?
<jadon> I am trying to just pull from the constant ~ even simplified and set @some_option = "blah" in the setter and still no dice.
kish has joined #ruby
<Gowie> Mon_Ouie: Hm, can you explain why that would matter?
<Hanmac> jadon so the getter still returns 0 ??
<jadon> if I set it to 0 then yes
banseljaj is now known as imami|afk
<Mon_Ouie> Because the to_yaml method is defined in the YAML library
<jadon> it'll return whatever I set it to ~ it will not return whatever is in the setter method though.
<Mon_Ouie> ron: You probably didn't have OpenSSL installed when compiling ruby, which is why it didn't get compiled then
kish has quit [Read error: Connection reset by peer]
francisfish has quit [Remote host closed the connection]
<Mon_Ouie> Install it (the OpenSSL C library), and recompile your ruby
<Hanmac> jadon check if you realy use the currect code
Tomasso has quit [Ping timeout: 245 seconds]
looopy has joined #ruby
<jadon> this is inside a lib ~ exiting rails console and going back in should reset it no?
<Mon_Ouie> jadon: I also doubt you're really just running the code that you've shown us
CheeToS has quit [Ping timeout: 244 seconds]
<Gowie> Mon_Ouie: So I put "require 'json'" at the top of that file and still am getting the same error. What is the connect between the YAML library and json? Maybe that will help me understand you better
<jadon> I did do a separate file as a test.
<Mon_Ouie> Woops, I meant require 'yaml', sorry
<Gowie> Mon_Ouie: Ahhh ok, yepp that makes sense. Thanks
digitalcakestudi has joined #ruby
<ron> Mon_Ouie: already tried that, still getting the error.
<cek> How do you get process exit status in popen3 in 1.8.7?
codespectator has joined #ruby
<Gowie> Mon_Ouie: yeah, that didn't work. Made sense but didn't work
kish has joined #ruby
<Gowie> I mean I guess I can live without it but i'll probably just cry myself to sleep every night
ViperMaul has quit [Ping timeout: 245 seconds]
kish has quit [Read error: Connection reset by peer]
ViperMaul has joined #ruby
<jadon> … that is crazy - if I create pass the same lines in the gist to the file itself and call the file it executes it properly, however if I pass the same lines in the rails console it fails.
Rizzle has quit [Ping timeout: 265 seconds]
yankov has quit [Quit: yankov]
bdnelson has quit []
<Hanmac> so rails is the creap? XD
<shevy> cek, try something like Process.pid or Process.getpgid(Process.ppid())
<shevy> pid = Process.fork { exec(cmd) }
<Mon_Ouie> ron: You did install the development files too (not just the library files)?
<cek> with 3 pipes connected
wargasm has joined #ruby
<jadon> bleh! but it makes no sense no? assigning the property multiple ways in different tests… these should not fail in the rails console.
<ron> Mon_Ouie: I'm not sure. I'm a Java developer.. not used to all those OS packages and dependencies. Specific guidance would be greatly appreciated :)
looopy has quit [Remote host closed the connection]
<Mon_Ouie> Well, that would depend on what OS you're using first
balboah has quit [Quit: balboah]
gyre007 has quit [Quit: Ex-Chat]
kish has joined #ruby
nopolitica has joined #ruby
tvw has quit [Remote host closed the connection]
kish has quit [Read error: Connection reset by peer]
mvangala has quit [Remote host closed the connection]
stetho has quit [Quit: stetho]
neersighted[d] is now known as Viper
maletor has joined #ruby
netogallo has quit [Ping timeout: 260 seconds]
Viper is now known as Guest35872
<apeiros_> heh, the way they figure out that ssl is missing is wrong, though. require returning false is fine. it'd raise a LoadError…
<carloslopes> becom33: are you there?
mrwalker_ has quit [Read error: Connection reset by peer]
<becom33> carloslopes, yes
jjp has quit [Ping timeout: 260 seconds]
<carloslopes> becom33: did you solve the problem yesterday?
mrwalker has joined #ruby
<becom33> carloslopes, yep at the moment no problem . but Im sure I wil come with more
<becom33> :
<becom33> :P
<becom33> carloslopes, hay do you do open source projects ?
<carloslopes> becom33: sweet! :)
kish has joined #ruby
<carloslopes> becom33: i do contributions only :) .. why?
mdw has quit [Remote host closed the connection]
mvangala has joined #ruby
<becom33> nah just I'm working on a one at the moment actually
<apeiros_> carloslopes: señor contributor :)
kish has quit [Read error: Connection reset by peer]
<carloslopes> apeiros_: hahaha :p
<shevy> heya becom33
<carloslopes> becom33: pass the url for me.. i want check it :)
<becom33> heya shevy
<shevy> becom33 are you on github?
<becom33> yep
fayimora has joined #ruby
<carloslopes> becom33: pass your profile :)
kuranai|off is now known as kuranai
<becom33> I Dont have my project hosed in github
<becom33> its on bitbucket
bondar has joined #ruby
tatsuya_o has quit [Remote host closed the connection]
BiHi has quit [Quit: Computer has gone to sleep]
thecreators has joined #ruby
<jadon> @hanmac thanks for the help man ~ for some reason it wasn't working properly when the class was pre-loaded. When I stopped preloading it the property used the override
<becom33> carloslopes, *
jjp has joined #ruby
kish has joined #ruby
<becom33> its not a clean code . still im working on it
dnyy has quit [Read error: Connection reset by peer]
markborcherding has joined #ruby
abra has quit [Ping timeout: 276 seconds]
cdepue has quit [Ping timeout: 260 seconds]
dnyy has joined #ruby
<carloslopes> becom33: hmm let me see it
kish has quit [Read error: Connection reset by peer]
<becom33> okey thanks
abra has joined #ruby
kenichi has joined #ruby
<shevy> hmm
<benwoody> becom33: do you use emacs?
<shevy> come to github becom33 ! :(
<Hanmac> jadon :P another reason why i not like rails :P
bglusman_ has joined #ruby
<shevy> it's more convenient to follow people there for me :P
* Hanmac is on github and on bitbucket too
<becom33> i will shevy when Im done with this test framework
<shevy> cool
bglusman has quit [Read error: Connection reset by peer]
<jadon> lots of tears on the inside now… what a waste of time that was
<shevy> jadon hehehe
<becom33> benwoody, no
<shevy> jadon pain is good when you remember it for the rest of your life!
dwaynecrooks has quit [Quit: Ex-Chat]
<jadon> thankfully there was no loss of life during this process.
<becom33> benwoody, i know I need to get rid of the save files
<benwoody> becom33: :)
theRoUS is now known as coar
netogallo has joined #ruby
<becom33> Hanmac, would you like contribute ?
syamajala has joined #ruby
kish has joined #ruby
ramblex has joined #ruby
cek has quit [Quit: жопа диридай диридиридай]
Morkel has quit [Quit: Morkel]
tatsuya_o has joined #ruby
<Hanmac> what?
kish has quit [Read error: Connection reset by peer]
<shevy> I thinK Hanmac is busy with C-things
<shevy> wait
<shevy> C++
<carloslopes> becom33: interesting project :)
<becom33> carloslopes, thanks
<carloslopes> becom33: i will mark here to see it more patiently later
bjhaid has quit [Ping timeout: 252 seconds]
<becom33> carloslopes, thanks . if can help me to keep a clean code :)
fermion has joined #ruby
Araxia_ has joined #ruby
<becom33> btw does any one know about open source licenses ? i need some help with it
* Hanmac is building wx bindings, and maker and an game-engine and an map parser .... all in or for ruby :P
<shevy> Hanmac cool
<shevy> a game engine? have you had a look at gamebox too btw? https://github.com/shawn42/gamebox
kish has joined #ruby
<Hanmac> shevy currently i use gosu as engine
kish has quit [Read error: Connection reset by peer]
<shevy> \o/ like gamebox hehe
<shevy> everyone's settling for gosu
<shevy> rubygame kinda died :(
fowl has joined #ruby
<Hanmac> me is a little bit part of gosu team ...
yankov has joined #ruby
<shevy> good!
<shevy> the more, the better
<Beoran_> mruby
<Beoran_> that is what we need for games
jimeh2 has quit [Ping timeout: 265 seconds]
Vainoharhainen has quit [Quit: Leaving...]
<shevy> yeah
<shevy> I hope it could even compete with lua one day
bjhaid has joined #ruby
<Beoran_> t least, once it will be done in 2-3 years, I guess?
<Beoran_> well let's say 1 to 2 years and be optimistical :)
<Beoran_> a bit
<shevy> :(
<shevy> 2 years!
<shevy> maaan.... I want that to be TWO MONTHS
<Hanmac> Beoran_ yeah, if it has all c features mri has ...even rubinius is not 100% compatible to mri
coar is now known as nonbot
tatsuya_o has quit [Remote host closed the connection]
kish has joined #ruby
darthdeus has quit [Quit: Linkinus - http://linkinus.com]
nonbot is now known as coar
schovi has joined #ruby
kish has quit [Read error: Connection reset by peer]
andrewhl has quit [Quit: andrewhl]
<Beoran_> Hanmac, the C API will not be compatible a tall
joshman_ has quit [Ping timeout: 248 seconds]
<Beoran_> and it will be limited to mostly standard ISO ruby
syamajala has quit [Remote host closed the connection]
<Hanmac> Beoran_ not for mruby of curse, but i need some features mruby currently not have
<Beoran_> which ones
<Beoran_> ?
<Hanmac> something like RETURN_ENUMERATOR (or something similar)
cj3kim has joined #ruby
cwill747 has joined #ruby
c0rn has joined #ruby
<Beoran_> if it's not in the standard, you'll have to arue why you need t
dnsdds has quit [Ping timeout: 245 seconds]
coar is now known as theRoUS
schaerli has joined #ruby
Foxandxss has joined #ruby
looopy has joined #ruby
mrsolo has joined #ruby
zz_chrismcg is now known as chrismcg
kish has joined #ruby
<Hanmac> Beoran_ i am not talking about the ruby site ...
<Beoran_> Though Enumerable is part of the ISO standard
sparrovv has quit [Ping timeout: 248 seconds]
<Beoran_> you man the C side?
kish has quit [Read error: Connection reset by peer]
<Beoran_> if it exists on the ruby side you can use it on the C side too
<Hanmac> yeah i am an native extendion writer
mk03 has joined #ruby
<Beoran_> well, the C API of mruby is definitely different of that of mri
barefoot has left #ruby [#ruby]
workmad3 has quit [Ping timeout: 256 seconds]
<Hanmac> i know, but i need something similar
fr0gprince_ has quit [Ping timeout: 252 seconds]
Eldariof-ru has joined #ruby
chrismcg is now known as zz_chrismcg
simao has quit [Ping timeout: 252 seconds]
markborcherding has quit [Ping timeout: 276 seconds]
<Beoran_> well I guess you could write a helper fiction that inlcludes the Enumerable module into an Object (or Struct) instance and return that?
saschagehlich has quit [Quit: saschagehlich]
<Hanmac> i only looked at the include files
bjhaid has left #ruby [#ruby]
<Beoran_> opps, not implemented yet
<Beoran_> just an empty module
<Beoran_> or...
bondar has quit [Ping timeout: 260 seconds]
kish has joined #ruby
kish has quit [Read error: Connection reset by peer]
iocor has quit [Quit: Computer has gone to sleep.]
<Beoran_> ah, it's implemented in ruby
<Beoran_> so it would work, I think.
jesly has joined #ruby
jesly_ has joined #ruby
iocor has joined #ruby
niku4i has quit [Remote host closed the connection]
pdtpatr1ck has quit [Quit: pdtpatr1ck]
kish has joined #ruby
kish has quit [Read error: Connection reset by peer]
enroxorz has quit [Ping timeout: 245 seconds]
<Beoran_> struct RClass *r; r = mrb_define_class(mrb, "Range", mrb->object_class); mrb_include_module(mrb, r, mrb_class_get(mrb, "Enumerable"));
<Beoran_> Like that but with your won class, and then return instances of it.
luxurymode has joined #ruby
<Hanmac> Beoran_ i need the to_enum function, but in C
ramblex_ has joined #ruby
luckyruby has joined #ruby
elhu has quit [Ping timeout: 265 seconds]
nfk has quit [Quit: hurf]
nfluxx has joined #ruby
Gowie1 has joined #ruby
kish has joined #ruby
ramblex has quit [Ping timeout: 276 seconds]
kish has quit [Read error: Connection reset by peer]
cdepue has joined #ruby
Gowie has quit [Ping timeout: 246 seconds]
C0deMaver1ck has quit [Ping timeout: 276 seconds]
ramblex_ has quit [Ping timeout: 276 seconds]
fr0gprince_ has joined #ruby
nopolitica has quit [Quit: leaving]
nopolitica has joined #ruby
C0deMaver1ck has joined #ruby
keithcelt has joined #ruby
elliot98 has quit [Remote host closed the connection]
kish has joined #ruby
minijupe has quit [Quit: minijupe]
kish has quit [Read error: Connection reset by peer]
Targen_ has quit [Ping timeout: 240 seconds]
tommyvyo has quit [Read error: Connection reset by peer]
bglusman_ has quit [Read error: Connection reset by peer]
<lectrick> So if I'm writing a deep_dup and a deep_clone method, how will they differ?
<lectrick> The only thing I can find is this: http://railsblogger.blogspot.com/2009/03/ruby-dup-vs-clone.html
bglusman has joined #ruby
mejzz has quit [Ping timeout: 245 seconds]
nlc has joined #ruby
<bnagy> they shouldn't
Rizzle has joined #ruby
<bnagy> dup and clone do different things
abra has quit [Remote host closed the connection]
<bnagy> deep_copy is usually Marshal.load Marshal.dump(obj)
Eldariof59-ru has joined #ruby
hashpuppy has joined #ruby
krusty_ar has quit [Read error: Connection reset by peer]
jesly_ has quit [Ping timeout: 244 seconds]
friskd has quit [Ping timeout: 244 seconds]
kish has joined #ruby
ananthakumaran has joined #ruby
<lectrick> it looks like clone should copy the tainted? but dup shouldn't
<lectrick> or is it the frozen?
krusty_ar has joined #ruby
Eldariof-ru has quit [Read error: Operation timed out]
<bnagy> deep dup in particular makes not much sense
jesly has quit [Ping timeout: 276 seconds]
aszurom has joined #ruby
<bnagy> clone should copy both
kish has quit [Read error: Connection reset by peer]
friskd has joined #ruby
<bnagy> deep_copy > clone > dup
zinjacoder_ has joined #ruby
<hashpuppy> i have module MyModule; module Util; def method1; end; end; then i have module MyModule; module SubModule; def self.blah ... end; end; end; in self.blah, how can I access MyModule::Util::method1? I keep getting unitialized constant
Tomasso has joined #ruby
andrewhl has joined #ruby
cdepue has quit [Remote host closed the connection]
<aszurom> I'm writing my first ruby code? I'm about to ask a bunch of really simple questions :-)
<bnagy> hashpuppy: make it a module_function maybe, or include it or something
<aszurom> I assume that arguments passed to the program will be in some array. Is that Arguments[] by chance?
<vandemar> ARGV
netogallo has quit [Ping timeout: 245 seconds]
Jay_Levitt has joined #ruby
Eldariof27-ru has joined #ruby
<bnagy> aszurom: trollop is a nice gem for proper opt parsing, if argv is too annoying
tommyvyo has joined #ruby
<aszurom> is this correct? filename = File.extend_path(ARGV[0])
elliot98 has joined #ruby
<bnagy> expand+path
friskd has quit [Client Quit]
<bnagy> *_
redgetan has joined #ruby
kish has joined #ruby
Gowie has joined #ruby
<aszurom> ok, but the File object here puts what into filename var?
<aszurom> it makes filename an instance of the File class?
kish has quit [Read error: Connection reset by peer]
<bnagy> assuming you call the correct method, the expanded path of whatever was the first argument
<bnagy> ~/thing -> /home/fred/thing
jackiechan0 has quit [Quit: Sto andando via]
<bnagy> filename will be a string
jackiechan0 has joined #ruby
Eldariof59-ru has quit [Ping timeout: 244 seconds]
<bnagy> there are docs for this, btw :)
<aszurom> yeah, so I'd heard :)
Gowie1 has quit [Ping timeout: 276 seconds]
<aszurom> I wish the content on RubyMonk had gone into file operations
nik_-_ has joined #ruby
mailo has quit [Quit: Linkinus - http://linkinus.com]
<vandemar> or more generically, google "ruby file expand_path" will get you to that page
<bnagy> or Bing
<rking> LOL
<bnagy> ...ok j/k
Gowie1 has joined #ruby
jgrevich has joined #ruby
<rking> Oh wow, it exists!: http://letmebingthatforyou.com/
Gowie has quit [Ping timeout: 244 seconds]
kish has joined #ruby
<bnagy> what...the actual...
jesly has joined #ruby
<aszurom> well, the goal here is that I'm going to pass this code a filename which will be a .csv file. Then I'm going to read the contents of the csv into an array of hashes I think
<rking> Hahaha
jesly_ has joined #ruby
<bnagy> aszurom: dream big, man
kish has quit [Read error: Connection reset by peer]
timonv has joined #ruby
<bnagy> aszurom: check out 'csv' in stdlib. It's pretty darn cool, for free
<aszurom> the end game here is that I have a csv that has 6 columns. I want the total, average, max and min values of each column
bondar has joined #ruby
<aszurom> yeah, csv seemed pretty straightforward
keanehsiao has quit [Quit: keanehsiao]
<aszurom> powershell handled it by actually creating an object that represented the file, and then you'd work methods on the object to manipulate the file
macer1 has joined #ruby
ddv has joined #ruby
ishka has joined #ruby
<rking> For those that don't know, do not follow the link to "Lemon Party".
<rking> =|
trivol has quit [Quit: trivol]
* rking innocence--
ishka has left #ruby [#ruby]
<aszurom> I was expecting Jack Lemon
<aszurom> THERE ARE NO LEMONS
<aszurom> false advertising. I mean, in the other thing there was at least a real cup
<hashpuppy> bnagy: thanks, btw
kish has joined #ruby
<apeiros_> bnagy: same thing as lmgtfy?
jackiechan0 has quit [Ping timeout: 245 seconds]
<bnagy> aszurom: if you have a header row it all gets super easy
<aszurom> I do
<bnagy> apeiros_: apparently
<Beoran_> I thought a lemon was an erotic fanfic
<aszurom> Medowlark Lemon
<rking> apeiros_: Not hardly. lmgtfy uses the deprecated "Google" search engine. This one's better.
kish has quit [Read error: Connection reset by peer]
<aszurom> let me duck duck go that for you?
ananthakumaran has quit [Quit: Leaving.]
ukwiz has quit [Quit: Leaving]
<apeiros_> rking: lol
<bnagy> aszurom: like blah.select {|col,values| col='chainsaws'}.map {||col, vals| vals.max} etc
<bnagy> possibly not working cause I have been drinking... a bit
<aszurom> I thought making headers into a hash was built into csv?
felipec has quit [Quit: Leaving]
<bnagy> yeah it is
airhorns has joined #ruby
<aszurom> headerkeys, values = csv('filename.csv')
Gowie1 has left #ruby [#ruby]
<bnagy> I think what's really relevant here is that rking apparently hadn't heard of lemonparty
<robacarp> lmddgtfy
netogallo has joined #ruby
<rking> Now I've heard and seen of it. =\
<aszurom> if he likes lemonparty, he'll love meatspin and cakefarts
kish has joined #ruby
tvw has joined #ruby
<rking> Ok, good to not know of those.
keithcelt has left #ruby [#ruby]
<robacarp> http://lmddgtfy.com/ expires this month.
<bnagy> rking: there's a really touching site of fathers giving their daughters their first baths. So cute.
<bnagy> just google for 'tubgirl'
Jay_Levitt has quit [Quit: Linkinus - http://linkinus.com]
<aszurom> daddyshand.com
<aszurom> I dunno if that's real or not, but I'm not going
ken_barber has joined #ruby
kish has quit [Read error: Connection reset by peer]
<rking> bnagy: I know that one and goatse (← Although I pride myself on never actually having seen it. I survived the great goatse slashdot wave of '00 unharmed)
<aszurom> Chet from Valve had joked he was going to do something on it
Iicke has joined #ruby
beneggett has quit [Quit: Computer has gone to sleep.]
ananthakumaran has joined #ruby
mengu_ has quit [Quit: Konversation terminated!]
mengu_ has joined #ruby
jrist is now known as jrist-afk
ilyam has quit [Ping timeout: 250 seconds]
<rippa> rking: have you seen boku no pico?
<rking> No.
kish has joined #ruby
<rking> For some reason I'm tempted to search for that one.
<rippa> you haven't seen anything then
<rippa> also A Serbian Film
cdepue has joined #ruby
dphase has joined #ruby
kish has quit [Read error: Connection reset by peer]
looopy has quit [Remote host closed the connection]
tewecske has joined #ruby
tewecske has quit [Max SendQ exceeded]
wargasm has quit [Read error: Connection reset by peer]
voodoofish has quit [Ping timeout: 265 seconds]
robert_ has joined #ruby
<aszurom> Holy Mountain? the one movie I can't make it through
macer1 has quit [Remote host closed the connection]
kish has joined #ruby
dysoco has joined #ruby
ilyam has joined #ruby
<dysoco> now this is a stupid question, but I just can't remember how do you name the ":name" things ? That are like strings
kish has quit [Read error: Connection reset by peer]
wargasm has joined #ruby
<shevy> dysoco symbol
<robert_> shevy: haiii! :D
<dysoco> shevy, thanks!
<robert_> so, I have a string formatted a specific way (e.g. "XXX00YYY"), where I need to extract the specific parts, according to a format and shove them into an array (e.g. [ "XXX", "00", "YYY" ]); what's the best way to do this?
<shevy> dysoco, they always have the same object_id, unlike strings. "foo" has different object id than has "foo" even though both should be the same
<shevy> heya robert_
sungnyc has quit [Read error: Connection reset by peer]
<robert_> how goes it? :D
kiwnix has joined #ruby
kpshek has quit []
<dysoco> shevy, Oh OK, so that's the main difference ?
<shevy> robert_, hmm... how about ... #pack and #unpack? are there any rules that govern that splitting... split on numbers?
Foxandxss has quit [Quit: KVIrc 4.0.4 Insomnia http://www.kvirc.net/]
<dysoco> damn, coming from a C and Java background... Ruby is so "weird" :P
stepnem has quit [Ping timeout: 246 seconds]
<shevy> dysoco, well. symbols are more memory efficient. they also are not that useful at all to know
<aszurom> so you could use symbols to embed emoticons into your code
<robert_> shevy: hmm, I could split on two-digit numbers
<shevy> :P
<shevy> indeed
<aszurom> :D = "Smile"
<robacarp> whoa.
<shevy> the :P smiley is a symbol
sungnyc has joined #ruby
<robacarp> thats brilliant.
<shevy> robert_, hmm ... perhaps .split(/\d\d/) ? not sure though, never tried that
<robert_> hm
<lectrick> dysoco: if by "weird" you mean "friendly, logical, genius, doing way more with way less" :)
voodoofish430 has joined #ruby
<apeiros_> robert_: string.match(/(....)(..)(...)/).captures
<robert_> I need the numbers too, though..
<robert_> aha
<apeiros_> f.ex.
<dysoco> lectrick, nah, just like an old UNIX admin trying an iPhone for the first time
<shevy> dysoco lol
stepnem has joined #ruby
<dysoco> after years of using only UNIX
<shevy> but isnt an iPhone very simple to use?
ron has quit [Quit: ZNC - http://znc.in]
<apeiros_> osx is a unix…
<dysoco> I mean like, traveling in time
<shevy> ruby as a whole can be quite complex
<apeiros_> so an iphone doesn't have to be that unfamiliar :-p
<robert_> hah, sweet. :D
kish has joined #ruby
<robacarp> dysoco: suddenly, 2012!
<dysoco> IDK, I never used an iPhone :P
<bfrog> :blah is also called an atom in other languages
<bfrog> or things like them
<shevy> me neither but my friends all have those fancy smartphones ... and tablets. you can even play games on the latter, where you tilt the tablet and the snowboarding guy moved another way suddenly. I was quite surprised to see that
kish has quit [Read error: Connection reset by peer]
<bfrog> schmartfone
liluo has quit [Remote host closed the connection]
shadoi has joined #ruby
<dysoco> so a Symbol is like a String BUT NOT a string, it's an object, and it's innmutable
<apeiros_> it's also like an integer, but not an integer
<dysoco> let's say is some kind of read-only pointer that derreferences a String in C ? Seriously... no idea
bondar has quit []
<apeiros_> I think that comes pretty close
maesbn has quit [Remote host closed the connection]
<shevy> dysoco as said before shevy> dysoco, well. symbols are more memory efficient. they also are not that useful at all to know
<shevy> :)
<shevy> read-only pointer!
<shevy> I think you can do more with C pointers than with ruby symbols
<shevy> symbols sit around here and just stare at me with stupid poppy eyes
<dysoco> shevy, "are not that useful at all to know" That means you hardly use them ?
<aszurom> how can you tell what version of ruby you're running?
<shevy> puppy
<dysoco> ruby -v
<shevy> dysoco I use them in hashes usually
<aszurom> ok, so osx 10.7 comes with 1.8.7
<shevy> hash[:apeiros] = 'cool swiss'
<apeiros_> dysoco: they're widely used. but they come quite naturally once you accept that they're useful for identifying stuff, and use strings for everything else.
<shevy> dysoco, but they are not really something that I find fascinating
<apeiros_> aszurom: rvm. works fine and gets you the newest rubies with zero hassle.
cableray has joined #ruby
<dysoco> so they are like "tags", a "slim" version of a String variable
ananthakumaran has quit [Quit: Leaving.]
<Hanmac> dysoco i use them in my binding for IDs because i think hundreds of Constants are a no-go
<Mon_Ouie> One of the uses of symbols is similar to enumerations in C
kil0byte_ has quit [Remote host closed the connection]
<shevy> dysoco, they are kinda used like that, yea, but very dumb tags
<apeiros_> dysoco: symbols are not variables. symbols are objects.
kish has joined #ruby
<aszurom> trying to do this: var1, var2 = csv(filename) doesn't work. Says "undefined method 'csv' for mail:Object
<dysoco> apeiros_, I know
fayimora has quit [Ping timeout: 276 seconds]
<shevy> dysoco, the more you know about symbols, the more boring you will find them to be :)
<dysoco> I don't find them exiting actually... :P
fermion has quit [Quit: P]
kish has quit [Read error: Connection reset by peer]
<shevy> aszurom and where did you see csv() method?
ron has joined #ruby
Guest35872 is now known as neersighted
voodoofish has joined #ruby
<dysoco> OK I get it: I use symbols when I don't need to change the value of a string, because they consume less memory (I suppose you compare the IDs and not the chars like Strings)
<shevy> dysoco I think so!
rasbonics has joined #ruby
<aszurom> 3rd section down, first example code under "The 'csv' Method"
ron has left #ruby [#ruby]
<shevy> aszurom yeah I see that example. I am not sure where this method is supposed to reside though
khakimov has quit [Quit: Computer has gone to sleep.]
<Hanmac> dysoco information, NEVER turn user input into symbols, because the symbols cannot be banish, like evil ghosts
<aszurom> oh wait, I see it
<aszurom> derp
<shevy> ah
seanstickle has joined #ruby
mikepack has quit [Read error: Connection reset by peer]
<aszurom> so they actually create a method and then call it
markjwlee has quit [Ping timeout: 245 seconds]
<shevy> yea
ananthakumaran has joined #ruby
<aszurom> I thought csv was a built-in
kenneth has quit [Quit: kenneth]
<dysoco> Hanmac, Oh OK
<oooPaul> There's a stdlib CSV lib that is pure ruby...
<shevy> the CSV module exists. but it has no csv() method inbuilt from what i can see
<aszurom> it's a public class? but maybe that's CSV
<oooPaul> But because it's pure Ruby, it's pretty slow.
<shevy> require 'csv' will always work on a ruby distribution
ElitestFX has quit [Ping timeout: 245 seconds]
<shevy> (unless distributions like debian would have ripped it out...)
kish has joined #ruby
<oooPaul> If you're doing any major CSV work, you'd want to pull in one of the native-compiled gems.
robbyoconnor has quit [Ping timeout: 246 seconds]
bluenemo has joined #ruby
bluenemo has quit [Changing host]
bluenemo has joined #ruby
seanstickle has quit [Client Quit]
<rking> shevy: Debian rips out standard libraries?
seanstickle has joined #ruby
<aszurom> yeah, this is just really light stuff here
kish has quit [Read error: Connection reset by peer]
<yxhuvud> rking: traditionally, yes. Don't know about the current version
<shevy> rking I think it did
<Hanmac> shevy not in the debians i knew
<shevy> rking they once split everything up into a million individual components
mohits has joined #ruby
<rking> Ahh. Hrm.
ramblex has joined #ruby
alexim has joined #ruby
workmad3 has joined #ruby
<shevy> http://www.lucas-nussbaum.net/blog/?p=617 <-- here one part of the idiocy
<shevy> "The core Ruby development community is still dominated by Japanese developers." debian apparently hates japanese
ddv has quit [Quit: *poof*]
zinjacoder_ has quit [Quit: Peace!]
wmoxam has joined #ruby
KL-7 has quit [Ping timeout: 252 seconds]
king313 has joined #ruby
<Hanmac> shevy i know the nussbaum, he is a nice guy
<shevy> can be
zinjacoder has joined #ruby
<shevy> :)
kish has joined #ruby
<aszurom> is there a way to reference a file as an object?
<shevy> aszurom hmm. File.open perhaps?
<aszurom> or do you just open and read/write it?
kish has quit [Read error: Connection reset by peer]
<shevy> file = File.open 'lo.rb' # => #<File:lo.rb>
<shevy> well, most of the time I only need the file content, so I do File.readlines("bla")
<shevy> but you can apply methods on your file object too of course
<shevy> aszurom, have a look through that docu briefly http://ruby-doc.org/core-1.9.3/File.html
ananthakumaran has quit [Ping timeout: 260 seconds]
beneggett has joined #ruby
keithcel_ has joined #ruby
<Hanmac> aszurom informtion. if you open the file with File.open, use the block form, so its automatic closed
<shevy> "Currently we do not to generate the ri and rdoc documentation, as there are good online services providing it (like rdoc.info)."
kenneth has joined #ruby
<shevy> my self-compiled ruby version provides both ri and rdoc
cj3kim has left #ruby ["Leaving"]
kish has joined #ruby
<shevy> hmm
nik_-_ has quit [Quit: nik_-_]
<shevy> suppose they use ri1.8
kish has quit [Read error: Connection reset by peer]
<shevy> or ri1.9
<shevy> :P
workmad3 has quit [Ping timeout: 252 seconds]
jesly has quit [Ping timeout: 252 seconds]
<aszurom> what if I just want to dump the file contents into an array of rows? Can I do that without iterating through each row?
<aszurom> like content <= filename
<shevy> aszurom do you mean any file?
<aszurom> sure
<shevy> File.readlines works quite fine for most part, unless it's like 10 MB log files
mrwalker has quit [Remote host closed the connection]
<aszurom> any text file with multiple lines
<shevy> x = File.readlines('/bla.txt')
<shevy> then x will be an array holding the lines of that file
<Hanmac> aszurom: Dir["*"].map(&File.method(:readlines))
<aszurom> cool, that's a start
mrwalker has joined #ruby
<aszurom> what's the Dir part of that doing?
<Hanmac> Dir["*"] gives you an array of all file names in the current dir
jesly_ has quit [Ping timeout: 260 seconds]
<aszurom> yeah, that opens up another section of curiosity for me? how Ruby references the filesystem in general
workmad3 has joined #ruby
kish has joined #ruby
<Hanmac> if you not change it, the current dir is the same there you start ruby
<rking> aszurom: Be more specific.
kish has quit [Read error: Connection reset by peer]
simao has joined #ruby
<aszurom> well, I have a little familiarity with Powershell, wish is sort of a bastard stepchild of Perl in some ways
flip_digits has quit [Quit: ["Textual IRC Client: www.textualapp.com"]]
becom33 has quit [Quit: Leaving]
<aszurom> in PS, you could say object = contents of directory "path"
<aszurom> and then you could use methods against that object to reveal attributes of files that were present in the path given
<aszurom> it was a whole lot of "did it all for you" type stuff
<aszurom> I wish it was cross platform, but alas, no
Iicke has quit [Quit: Leaving]
adambeynon has quit [Quit: adambeynon]
<Hanmac> aszurom: Dir.pwd returns the current dir from the look of ruby
<aszurom> is the ruby practice to execute a bash command and then read the output from it into an array that you parse?
<Hanmac> depend how big the file is and if you need the whole content
kish has joined #ruby
kpshek has joined #ruby
<aszurom> say I want to get a list of all the files in a directory, and look at their sizes, and maybe just list files with size > 2 megabytes
kish has quit [Read error: Connection reset by peer]
simao has quit [Ping timeout: 244 seconds]
<aszurom> the powershell version of that looks almost like a sql query
azm has joined #ruby
azm has quit [Changing host]
azm has joined #ruby
workmad3 has quit [Ping timeout: 245 seconds]
bglusman has quit [Read error: Connection reset by peer]
bglusman_ has joined #ruby
<aszurom> print get_childitem($path).where(_$.size -gt 2MB)
<Hanmac> aszurom: Dir["*"].find_all {|s| File.size(s) > 2 * 1024**2}
<aszurom> pretty close then
mrwalker_ has joined #ruby
MrGando has joined #ruby
<aszurom> do you change the working directory by injecting a value into Dir.pwd or something?
jackiechan0 has joined #ruby
ronniy has quit [Remote host closed the connection]
mrwalker has quit [Read error: Connection reset by peer]
jesly has joined #ruby
<Hanmac> aszurom: Dir.chdir(path)
jesly_ has joined #ruby
elliot98 has quit [Remote host closed the connection]
kil0byte has joined #ruby
elliot98 has joined #ruby
<aszurom> ok, so Dir is the gateway to the filesystem basically
<Synthead> anyone know much about net-ssh? I'm about to give up on this
kish has joined #ruby
jackiechan0 has quit [Client Quit]
<seanstickle> Synthead: questions are better when specific
<Hanmac> aszurom the other gateways are File, and FileUtils
kish has quit [Read error: Connection reset by peer]
<Hanmac> FileTest maybe too but its not needed anymore (i think)
jrist-afk is now known as jrist
rbanffy has quit [Read error: Connection reset by peer]
<Synthead> seanstickle: I'm starting a ssh connection, then forking a background thread that communicates with it. Running anything using the connection tends to lock up (.sftp.upload! for example). Is there something I'm missing?
d3c has joined #ruby
kish has joined #ruby
kish has quit [Read error: Connection reset by peer]
nopoliti1a has joined #ruby
mneorr_ has joined #ruby
nopolitica has quit [Ping timeout: 244 seconds]
DrShoggoth has joined #ruby
schaerli has quit [Remote host closed the connection]
jackiechan0 has joined #ruby
Morkel has joined #ruby
mikepack has joined #ruby
Jake232 has joined #ruby
mikepack has quit [Read error: Connection reset by peer]
alanp has quit [Remote host closed the connection]
mneorr has quit [Ping timeout: 245 seconds]
kish has joined #ruby
kish has quit [Read error: Connection reset by peer]
td123 has quit [Read error: Connection reset by peer]
imami|afk is now known as banseljaj
alanp has joined #ruby
Eldariof27-ru has quit []
td123 has joined #ruby
Urth|Away is now known as Urthwhyte
<aszurom> so are .collect and .map the same thing?
<yxhuvud> yes
kish has joined #ruby
mikepack has joined #ruby
<seanstickle> .map is the typically more preferred
<rking> seanstickle: Hrm. That's an interesting statement.
Eldariof-ru has joined #ruby
<seanstickle> That's me. Full of interesting statements.
kish has quit [Read error: Connection reset by peer]
<rking> collect is more Smalltalk-ish while map is Perlish, I'd say. It's shorter, so it wins by default, but if you look (echo '$ Enumerable#map' | pry) it actually is "enum_collect()" in C.
<seanstickle> Yep
<seanstickle> foo.map and foo.reduce are so much nicer than foo.collect and foo.inject
<rking> Hrm, reduce vs. inject is something I haven't considered.
mengu_ has quit [Quit: Konversation terminated!]
<Hanmac> imo inject sounds cooler
<rking> There you lose the terseness advantage.
<rking> And it's enum_inject() in C. My guess is .collect and .inject came first.
<seanstickle> They did
<seanstickle> SmallTalky, as you said
<rking> Hrm, k.
<seanstickle> select, reject, collect, inject
<seanstickle> Rhymey
bglusman_ has quit [Read error: Connection reset by peer]
bglusman has joined #ruby
wargasm has quit [Read error: Connection reset by peer]
bosphorus has quit [Remote host closed the connection]
wargasm has joined #ruby
<rking> Hrm. The lib/ dir of the ruby source puts it at 315 map's and 239 collect's, but I'm not accounting for recentness.
ilyam has quit [Remote host closed the connection]
kish has joined #ruby
mischief has quit [Read error: Connection reset by peer]
bbttxu has joined #ruby
<rking> 47 injects, 6 reduces.
ilyam has joined #ruby
kish has quit [Read error: Connection reset by peer]
ilyam has quit [Client Quit]
<rking> My Gem dir says: 489 reduces, 700 injects; 8404 maps, 771 collects.
<rking> So map is the runaway favorite these days, it seems.
netogallo has quit [Ping timeout: 245 seconds]
mikepack has quit [Read error: Connection reset by peer]
<rking> And actually I think I give it the edge for communicability. "map" is more what you're doing than "collecting". Collect implies some kind of search/evaluate/pick process to me, more like an inverted reject (is there one that's already that?)
<Hanmac> rking what about find_all and select?
<rking> Oof, good q.
<Hanmac> i use map for converting, not for collecting, so collect does not make much sense
<rking> 178 find_all, 3028 select (in gems)
<Beoran_> Ruby leads more to there is more than one way to do it
jimeh2 has joined #ruby
<rking> Hanmac: Yeah, I bet Smalltalk chose the name due to /ect$/ hankerings.
kish has joined #ruby
mischief has joined #ruby
<shevy> humpa humpa
kil0byte has quit [Ping timeout: 240 seconds]
<Hanmac> rking info about select and find_all, select is implmented directly in array, but it gets find_all with enumerable
kish has quit [Read error: Connection reset by peer]
niklasb has joined #ruby
<rking> Beoran_: True, but there's this philosophy that has an oriental name that I can't remember for the life of me, "Hold, Break, Release". First you hold to a rule, become disciplined by the standard way. Then you break the rule, feel the pain but feel the adventure. Then, you are released from the rule: freedom and wisdom.
midrange is now known as bradsocks
<Hanmac> rules are made to be broken ... like the laws of physics
<seanstickle> I think that is called bullshido
mohits has quit [Remote host closed the connection]
<rking> Hanmac: Oh, so interesting. I guess Array#select is a speed hack?
jefftrudeau has joined #ruby
akem has quit [Ping timeout: 244 seconds]
<Hanmac> rking ask pry but i think yes
jtrudeau has quit [Ping timeout: 246 seconds]
<Hanmac> rking, Enumerable has its own select method
mikepack has joined #ruby
<rking> Yeah, pry puts $ Enumerable#find_all, Array#find_all, Enumerable#select at enum_find_all(), but you're right, Array#select is its own thing.
netogallo has joined #ruby
<shevy> seanstickle bullshito???
TheFuzzb_ has quit [Quit: Leaving...]
kevinbond has quit [Quit: kevinbond]
<seanstickle> shevy: that is the joke, yes
TheFuzzball has joined #ruby
kish has joined #ruby
mikepack has quit [Read error: Connection reset by peer]
<Hanmac> was he the guy with the iron mask? ... no that was the other one
<Beoran_> rking yes, that's the basics fro growth. rules are there for education
<Beoran_> anwya I'll leave it at that
kish has quit [Read error: Connection reset by peer]
nilg has quit [Remote host closed the connection]
sparrovv has joined #ruby
beneggett has quit [Quit: Computer has gone to sleep.]
StoSun has joined #ruby
minijupe has joined #ruby
araujo has quit [Remote host closed the connection]
beneggett has joined #ruby
kish has joined #ruby
hashpuppy has quit [Quit: hashpuppy]
kish has quit [Read error: Connection reset by peer]
d3c has quit [Quit: Quit]
Urthwhyte is now known as Urth|Away
Targen has joined #ruby
sh1ps has joined #ruby
sparrovv has quit [Ping timeout: 265 seconds]
<sh1ps> hello, I just installed ruby1.9.2 on my machine. ruby -v shows the correct version, but ruby gems is still installing gems to 1.8
mikepack has joined #ruby
<sh1ps> any advice?
<rking> sh1ps: How did you install 1.9.2?
<sh1ps> via apt-get
<rking> =|
<sh1ps> yeah i know
<shevy> nono
<Hanmac> sh1ps do you install the ruby full package for 1.9.2?
<shevy> rking did not want to do =|
<shevy> he wanted to do:
<shevy> =(
<altiouz> sh1ps, how do you know that "but ruby gems is still installing gems to 1.8" ?
kish has joined #ruby
<shevy> like =((((((
<sh1ps> I'm having to do all of this via teamviewer, so every little thing i do is a giant pain in the ass with a ton of lag
<shevy> I keep on telling people that it is time to abandon debian
<rking> shevy: The difference is I'm not emotionally vested in the Debian package. I'm waving from over here in Gentoo+RVMland, and all is well.
<rking> sh1ps: which gem shows which?
<shevy> rking yeah. you are a man that can endure the pain, but so many youngsters are being harmed here
kish has quit [Read error: Connection reset by peer]
<rking> sh1ps: gem -v, for example.
araujo has joined #ruby
araujo has quit [Changing host]
araujo has joined #ruby
<sh1ps> altiouz: the reason i think it's installing to 1.8 is because, for instance, if i type just gem install … it will show that i don't have permission to write to /var/lib/gems/1.8
<shevy> debian ruby uses a different default gem path
dr_bob has joined #ruby
theRoUS has quit [Ping timeout: 260 seconds]
<shevy> yeah that is the one
<sh1ps> gem -v shows 1.7.2
<altiouz> hm. maybe problem with alternatives
<shevy> typical gem path is at /usr/lib/ruby/gems
kil0byte has joined #ruby
hal-j has quit [Ping timeout: 244 seconds]
elux has joined #ruby
<shevy> debian prefers /var for reasons noone other than debian understands
<sh1ps> haha none of this is my preference.
<shevy> latest rubygem version is 1.8.24 btw
<rking> sh1ps: I'm /thinking/ that's old. I'm on 1.9.3p195 and I get gem -v of 1.8.24
<shevy> yeah it is old
<shevy> default 1.9.3 has 1.8.23
<shevy> so I think this must be ruby 1.9.2 or 1.9.1
<pro> whats difference between p and puts
<sh1ps> and to top it all off i can't even use ssh directly, hence why i'm having to use teamviewer
<shevy> pro I think p does .inspect on the object in question, puts calls .to_s
<Hanmac> sh1ps how do you change that ruby -v shows 1.9.2?
kil0byte has quit [Read error: Connection reset by peer]
<rking> shevy: pro?
<sh1ps> i used update-alternatives
kil0byte has joined #ruby
<shevy> rking, that IRC dude here
<shevy> pro you can kinda use p to "debug" in a primitive way. if you want it one level nicer, you can use pp rather than p
<rking> Oh, haha.
havenn has joined #ruby
<shevy> rking, sometimes I fail at tab completion with xchat :)
kish has joined #ruby
<pro> okay
<Hanmac> sh1ps ok, but is ruby1.9.1-full installed?
<sh1ps> hmm i may have just done ruby1.9.2
<sh1ps> *1.9.1
kish has quit [Read error: Connection reset by peer]
Urth|Away is now known as Urthwhyte
nik_-_ has joined #ruby
kil0byte_ has joined #ruby
wargasm has quit [Read error: Connection reset by peer]
workmad3 has joined #ruby
kil0byte has quit [Ping timeout: 276 seconds]
seanstickle has quit [Quit: Nihil sub sole novum]
kapowaz has joined #ruby
chico_chicote has joined #ruby
statix has quit [Remote host closed the connection]
statix has joined #ruby
nfk has joined #ruby
kirun has joined #ruby
kish has joined #ruby
<sh1ps> altiouz: that seems close to what I want, but it's saying --slave is an unknown argument
kil0byte has joined #ruby
<altiouz> hm
kish has quit [Read error: Connection reset by peer]
<sh1ps> even if i was still having this problem, being able to copy/paste would make this MUCH less frustrating.
<sh1ps> >.<
ph^ has quit [Remote host closed the connection]
KL-7 has joined #ruby
mengu has joined #ruby
mengu has quit [Changing host]
mengu has joined #ruby
adeponte has quit [Remote host closed the connection]
<chico_chicote> hey guys, what is a good gem for reading pdf files?
kil0byte_ has quit [Ping timeout: 260 seconds]
wargasm has joined #ruby
kish has joined #ruby
kil0byte_ has joined #ruby
eph3meral has joined #ruby
kish has quit [Read error: Connection reset by peer]
<eph3meral> is rjb on topic in here?
<eph3meral> jruby works fine for me, but rjb is complaining that JAVA_HOME is not set, but I *know* JAVA_HOME is set, I set it in my ~/.zshrc and echo $JAVA_HOME confirms that.
<Hanmac> sh1ps ruby chould be register normaly to update-alternatives, so you shound need to run it again
kil0byte has quit [Ping timeout: 256 seconds]
saltnvinegar has joined #ruby
saltnvinegar has quit [Client Quit]
blizzo has joined #ruby
CptJeanLucPicard has joined #ruby
nfk has quit [Quit: yawn]
<zaargy> eph3meral: you're exporting it to subshells?
kish has joined #ruby
<blizzo> I am stuck on an error. In a test, trying to extract a zip file thats an attachment on a Mail object, when I try to parse it I get a 'string contains null byte'
eph3meral has quit [Client Quit]
sh1ps has quit [Quit: sh1ps]
<CptJeanLucPicard> does anyone here have a link to help me better understand mruby and what it can do?
kish has quit [Read error: Connection reset by peer]
cdepue has quit [Remote host closed the connection]
<Hanmac> mruby is not finish, so you can ignore it today
tatsuya_o has joined #ruby
<havenn> February 2013 is coming.
<CptJeanLucPicard> thanks Hanmac
<CptJeanLucPicard> this summer i swore i will write at least one Ruby library in C
<CptJeanLucPicard> even if it bnever gets used
<Hanmac> for c-extendions you should use MRI ... imo its the best currently
<wmoxam> CptJeanLucPicard: you might want to look at FFI too
kish has joined #ruby
<wmoxam> although you should probably give that task to Data or Geordi
enroxorz has joined #ruby
ElitestFX_ has joined #ruby
<Hanmac> FFI is cool, but for bindings maybe not the best (special if you have an c++ lib)
kish has quit [Read error: Connection reset by peer]
nfk has joined #ruby
<enroxorz> Hanmac: any good sites on how to write C libs for ruby? Not to learn C. THat is a seperate task i am doing this summer...
Prz has joined #ruby
CptJeanLucPicard has quit [Ping timeout: 245 seconds]
<dysoco> enroxorz, you want to write C libs without knowing C ?
<dysoco> or you already do ?
<Mon_Ouie> Anyway, see the README.EXT file
kish has joined #ruby
<enroxorz> dysoco: I promised myself to really learn C by the end of this year. I know syntactically what I am doing but I have only ever done minimum CLI apps. I want to really learn C and understand the Linux Kernel
uris has quit [Read error: Connection reset by peer]
griffindy has joined #ruby
<dysoco> enroxorz, then start by learning C ;)
<enroxorz> dysoco: on it, chief :)
kish has quit [Read error: Connection reset by peer]
banisterfiend has quit [Read error: Connection reset by peer]
<dysoco> enroxorz, you can't learn C "Syntactically" the way you can learn Java if you know C# , it's somewhat more complicated :P
kaspernj has quit [Ping timeout: 246 seconds]
uris has joined #ruby
bosphorus has joined #ruby
harukomoto has joined #ruby
<enroxorz> dysoco: i figured as much. i guess i was spouting malarkey when all I really did in C was write a Hello World CLI app
<dysoco> yeah, I'm also learning
<enroxorz> I just want to learn more of the low level languages. I have been doing ruby, php, and C#/Java for a long time now. I want to become more than I am right now
kuranai is now known as kuranai|off
deryl has quit [Quit: doing system maintenance. back in 20m or so]
WalterN has joined #ruby
looopy has joined #ruby
<dysoco> enroxorz, that's the best you can do: you'll become a better programmer by learning how strings are made of Char's arrays and how Memory Management works
workmad3 has quit [Ping timeout: 260 seconds]
jackiechan0 has quit [Ping timeout: 245 seconds]
<any-key> become one with the machine
closedbracket has joined #ruby
<enroxorz> dysoco: im turning 30 this year. i dont want to be 40 and only know the high level. i just had that horrible realization last week. i need to expand my knowledge
beneggett has quit [Quit: Computer has gone to sleep.]
<dysoco> enroxorz, meh, you've time
kil0byte has joined #ruby
dzhulk has joined #ruby
<pro> i have ruby installed but writing "ruby" to cmd just gives me unkown command, any ways to fix that?
<pro> running windows 7
kil0byte_ has quit [Ping timeout: 244 seconds]
<enroxorz> dysoco: i wish time were more definitive than it ends up being. One day I was 25 and jsut starting my career. Now I am 30 and I feel like time went too fast
<Hanmac> i learned a bit assambler ... its something you dont want to do it a second time
<enroxorz> pro: do you have the bin in the EVN Variables?
<enroxorz> ENV
<pro> no idea, ho to see that
<pro> how*
<Hanmac> you need it in your PATH
<Hanmac> pro look vor "envionment Variables"
<WalterN> enroxorz: lol... make a linked list in C and call it good
<pro> okay thanks
timonv has quit [Remote host closed the connection]
elliot98 has quit [Remote host closed the connection]
saltnvinegar has joined #ruby
mpereira has quit [Ping timeout: 244 seconds]
<enroxorz> pro: do you need help still?
cmarques has quit [Quit: Get MacIrssi - http://www.sysctl.co.uk/projects/macirssi/]
<pro> no i found it, thanks for asking
beneggett has joined #ruby
araujo has quit [Read error: Connection reset by peer]
graspee has joined #ruby
brianpWins has joined #ruby
zastaph has joined #ruby
elliot98 has joined #ruby
<enroxorz> pro: one last thing to consider https://github.com/vertiginous/pik
ciopte7 has joined #ruby
ABK has joined #ruby
sparrovv has joined #ruby
<WalterN> installed RadiantCMS on my server over the weekend
<WalterN> the more I look at this the more I like it
<enroxorz> WalterN: just say what you said. and lol. lol ^ n
saltnvinegar_ has joined #ruby
<shevy> that is a lot of lol
saltnvinegar has quit [Read error: Connection reset by peer]
<shevy> hmm
saltnvinegar_ is now known as saltnvinegar
<shevy> lotlol!
schaerli has joined #ruby
<shevy> I remember someone once saying lol in reallife :(
<enroxorz> did you destroy them, as written in the tomes of the internet?
mpereira has joined #ruby
aszurom has quit [Quit: Leaving]
saltnvinegar has left #ruby [#ruby]
rippa has quit [Ping timeout: 250 seconds]
zommi has quit [Remote host closed the connection]
catphish has joined #ruby
<catphish> can string#encode transliterate?
<catphish> loading iconv now produces a large warning :)
ch4se has joined #ruby
<catphish> "Ruby 1.9.2 doesn't support transliterate while Ruby 1.9.3 supports transliteration but doesn't have the pre-built tables of Iconv."
<catphish> if that's true, the deprecation warning seems a little premature :(
Targen has quit [Ping timeout: 250 seconds]
simao has joined #ruby
mvangala has quit [Remote host closed the connection]
mdw has joined #ruby
mdw_ has joined #ruby
Bonkers has joined #ruby
frogstarr78 has joined #ruby
simao has quit [Ping timeout: 245 seconds]
chico_chicote has quit [Ping timeout: 245 seconds]
araujo has joined #ruby
exchgr has quit [Quit: exchgr]
abionic has joined #ruby
mdw has quit [Ping timeout: 276 seconds]
lukeshu`` has quit [Ping timeout: 246 seconds]
ABK has quit [Ping timeout: 250 seconds]
jimeh2 has quit [Ping timeout: 245 seconds]
Eldariof-ru has quit []
mdw_ has quit [Remote host closed the connection]
ezn-01 has joined #ruby
looopy has quit [Remote host closed the connection]
kil0byte_ has joined #ruby
frogstarr78 has quit [Ping timeout: 240 seconds]
snearch has joined #ruby
blizzo has quit [Quit: leaving]
kil0byte has quit [Ping timeout: 276 seconds]
fbernier has quit [Ping timeout: 246 seconds]
jimeh2 has joined #ruby
krusty_ar has quit [Read error: Connection reset by peer]
mdw has joined #ruby
kil0byte has joined #ruby
luxurymode has quit [Quit: Computer has gone to sleep.]
snearch has quit [Client Quit]
krusty_ar has joined #ruby
dysoco has quit [Quit: Leaving]
<Mon_Ouie> Yeah, that annoys me too
bier has quit [Quit: Ex-Chat]
mdw_ has joined #ruby
<Mon_Ouie> Transliterating is the only reason I'd still use Iconv in 1.9
redgetan has quit [Quit: This computer has gone to sleep]
kil0byte_ has quit [Ping timeout: 260 seconds]
sspiff has quit [Ping timeout: 246 seconds]
krz has joined #ruby
enroxorz has quit [Quit: Page closed]
dr_bob has quit [Read error: Connection reset by peer]
<shevy> I just wrote a "fix-libtool" script, right now it does nothing than symlink an expected .la file... but one day I plan to replace libtool with it... :P
<catphish> Mon_Ouie: why is the deprecation warning there is there's no replacement :(
ciopte7 has quit [Read error: Connection reset by peer]
<catphish> or was someone just being a bit overzealous
<shevy> 1.9.x is very much like a giant patchwork
mdw has quit [Ping timeout: 260 seconds]
ciopte7 has joined #ruby
bier has joined #ruby
Seabass has joined #ruby
fflush has joined #ruby
<Seabass> yay I figured out how to join Ruby irc
<wmoxam> Seabass: how were you able to do it?
<Mon_Ouie> catphish: I'm not sure. I'm also curious what the person who added that warning though about that feature.
<Seabass> on the top left of my browser by status I clicked the x next to first place I was in then I typed /join #ruby on the page after that
<Seabass> may have been #Ruby not sure if case sensitive, I'm new to IRC
<Hanmac> Mon_Ouie whats the Transliterating you are talking about?
<Seabass> to everyone: is there IRC etiquette I need to know?
<any-key> don't be a jerk
looopy has joined #ruby
frogstarr78 has joined #ruby
parsifal_ has joined #ruby
mikepack has quit [Read error: Connection reset by peer]
abionic has quit [Read error: Connection reset by peer]
<graspee> don't join #lisp
<Urthwhyte> have thick skin
<shevy> hi Seabass
<Urthwhyte> although IRC today seems far less hostile than it used to. Declining usership I suppose
<any-key> mostly just neckbeards
<shevy> Seabass is not case sensitive, RUBY ruBY and ruby should all work equally well
tvw has quit [Read error: Connection reset by peer]
<wmoxam> what's wrong with #lisp ?
<graspee> you haven't joined the right channels recently then, Urthwhyte
<any-key> they talk funny
jackiechan0 has joined #ruby
<shevy> Urthwhyte could be freenode policy. I remember I used to be on galaxynet, they were quite strict
<graspee> there are some groups who are very hostile to newcomers
kb_oe has joined #ruby
<shevy> wmoxam (#lixp(nothing(wrong(with(it
scriptmonkey_ has joined #ruby
<shevy> damn
<shevy> #lisp!!!
<graspee> don't go there
<graspee> seriously
kb_oe has quit [Killed (idoru (Spam is off topic on freenode.))]
<philcrissman> Seabass: only real etiquette to keep in mind (other than just not being a jerk) is not to paste blocks of code into the channel; give a link to pastie.org or a gist or something.
sh1ps has joined #ruby
<Seabass> I am just starting to learn Ruby. After I become more familiar with the syntax I hope some ppl will be able to assist in my education. philcrissam: I assumed that at start.
ciopte7 has quit [Ping timeout: 252 seconds]
* wmoxam joins #lisp
<philcrissman> Seabass: you'd be surprised how many people don't assume that. :)
<parsifal_> How do I set up associations with a list of records with FactoryGirl 3? I'm able to associate with a single record fine (e.g. association :book, factory: :book), but how do I do it when it's a one-to-many?
<shevy> Seabass if you have a specific question about something about ruby, the question should be ideally short, and to the point. if you need to demonstrate with code, you can upload to pastie.org and link in #ruby here
<graspee> they are probably still slagging me off in there
<parsifal_> it's hard to find details for FG3 online
kil0byte_ has joined #ruby
<graspee> this channel is uuuuuuuubeer mega amazingly friendly compared to lisp
<graspee> it's hard to believe it's on the same server
<shevy> graspee I always go to #emacs and ask whether emacs is better than vim
<shevy> I also go to #python and ask them sszsHSh shsszss shshshs but they just ignore me :(
<Seabass> shevy: isn't that like trolling?
<graspee> i wasn't trolling though
<shevy> Seabass it's mixed
<shevy> Seabass I dont use vim or emacs, I think both should die :)))
<parsifal_> O_O
kil0byte has quit [Ping timeout: 245 seconds]
<graspee> they were having a discussion about "making a better lisp". i joined in saying stuff about scheme. some people objected to me discussing scheme in a common lisp channel and two people implied i should leave
<graspee> they said scheme was offtopic in a common lisp channel. geez. narrow focus
<shevy> I think lisp died many years ago
<graspee> i have nothing against CL. i love a lot of languages for different reasons. common lisp is one and ruby is another
<graspee> each language i love offers something new
<Hanmac> yeah, lisp died ... but it did not notic yet :ü
<philcrissman> shevy: lisp isn't dead. It just smells funny and doesn't go out much
<shevy> for them, lisp already is the perfect programming language even if it will be 100 years old and the rest of the world evolved
<Urthwhyte> parsifal_: You need to do a post-save hook AFAIK
<scriptmonkey_> what is the best way to handle an objecy initialization that fails? I am creating a hash of objects and if an attempt is made to create one with bad arguments, how does that specifice object get deleted?
<graspee> we don't need to bash lisp though. that's my point. everyone should be tolerant
<shevy> philcrissman, yeah well, programming languages don't really die per se... I am more looking at the amount of influx, especially of young people
<parsifal_> Urthwhyte: I finally tried this: books { [FactoryGirl.create(:book), ...] }
ciopte7 has joined #ruby
<shevy> like 15 years ago people would pick up perl
<shevy> today, perl has much more competition
<parsifal_> Urthwhyte: That seemed to work. Not very clean-looking but it works. Thanks
<shevy> graspee (as(said(lisp(is(not(so(bad
<graspee> perl still offers something though. i would say "code density"
<any-key> today, perl is lame
<parsifal_> I don't feel like perl will appeal to many "brand-new" programmers. It reads like Arabic
<any-key> it always was, but there weren't many other mature scripting languages
<Urthwhyte> parsifal_: http://pastebin.com/VGjPuTu2
<graspee> shevy you forgot to close those brackets
<parsifal_> which is a slight to Arabic
<philcrissman> shevy: if you consider that Clojure is effectively a lisp, there's a fair bit of influx to lisp, I'd say.
dhaskew has joined #ruby
<rking> I wish people would get over the () thing with lisp. That is such a superficial thing.
<graspee> i agree rking
<rking> I wonder if anyone's made STFUlisp, that puts the ( on the left of the first term.
<philcrissman> rking: I like the parens. I think of them as a series of little hugs.
<rking> Urr, on the right.
<philcrissman> (((hugs)))
<graspee> ruby has a lot of parens in it it some situations too
<graspee> they aren't such a bad thing
<parsifal_> Urthwhyte: Yeah; that'd allow you to specify the number of records you want at creation, right? Also, shouldn't it be after_build?
<any-key> any language is like that
<graspee> i know
<graspee> because you have to disambiguate
<Urthwhyte> parsifal_: for my system it has to be after_create
<Urthwhyte> because of some logic
<Urthwhyte> after_build should work fine
<parsifal_> yeah; I'm worried about validations passing
<graspee> and often it's easier to stick a couple of parens in than trust your memory of the precedence rules of the language you are working in are correct
mdw has joined #ruby
<rking> Don't get me wrong. I'm a fan of optional: parens, semis, and {}'s (← python's got us beat on that last one)
<any-key> no parens is only for DSLs
<parsifal_> Urthwhyte: huh, interesting. Apparently I'm using the bleeding edge of FactoryGirl, and there isn't much docu online
mdw_ has quit [Read error: Connection reset by peer]
<Urthwhyte> I'm on
<Urthwhyte> 3.1
<Urthwhyte> it's roughsometimes
<parsifal_> 3.1 is still really new -- should work fine
<shevy> I dont find the syntax of any programming language superficial at all
<Urthwhyte> The codebase is fairly easy to read
<shevy> there is a reason why XML stinks
<parsifal_> Urthwhyte: apparently FG didn't have dynamic blocks for attrs until 3.2?? crazy
<parsifal_> I hate that python requires well-formatted whitespace. Almost as bad as emacs
<shevy> yeah
<Urthwhyte> whoa there
<Urthwhyte> Significant whitespace is *awesome*
<shevy> I would like to omit "end" sometimes
<parsifal_> hey, I keep my code well-formatted
<rking> shevy: Syntax:semantics is almost an exact comparison to human looks:insides.
<shevy> but I dont think any programming language should depend on indent
<parsifal_> better than most I'd argue. But I don't want to have to worry about the whitespace disrupting compilation
<rking> That never happens, though.
<parsifal_> s/compilation/scoping/
<Seabass> would someone like to look at my first script and see what I am doing wrong?
<rking> The only time during Python dev I ever didn't like the significant-horizontal-whitespace was for throwing in foo stuff for debugging and not worrying about indent.
<rking> Seabass: gist it.
<shevy> take DNA. you have four different base blocks in it (A,T,C,G) and you can create a human or a bacteria or a virus with that
<parsifal_> rking: I think that's the only time I've ever ran into it as well, to be fair
<shevy> Seabass, as said use pastie.org
<Urthwhyte> I like gists a lot more
<shevy> pastie.org!!!
<shevy> don't listen to them Seabass !!!!!!!!
<Seabass> I get whispers I think but I don't know how to pastie org it
wmoxam has quit [Quit: leaving]
<Seabass> pastie org is what I went to when I started
<shevy> hmm you load pastie.org (or gist) in your browser, then paste there, then give us the link
<shevy> I dunno what is whispers
<shevy> ewww pastebin
<shevy> hehe
<rking> Haha
<rking> Option C, none of the above.
<philcrissman> noooo, not pastebin.
<shevy> Urthwhyte at least he ignored us both equally :-)
<philcrissman> lol
<Seabass> lol, fine I choose my own way
libertyprime has quit [Quit: leaving]
<Urthwhyte> well pastebin is bad and you should feel bad!
<shevy> Seabass I think you dont indent properly
<shevy> also you use two return player1 return player2
<rking> Yep, the indent is wack.
<Urthwhyte> oof
<shevy> Seabass, the second return can never be reached
<Seabass> i confess, I think I got a bit ahead of myself, trying to do things I don't understand by trail and error
<rking> Vim fixes it with a little gg=G
<shevy> that's why I like rking
_theriffer_ has joined #ruby
<shevy> he knows way more than I do
<rking> \@/
<shevy> AND he is the ONLY guy here who uses gentoo
<rking> ↑ Brains.
* rking kids.
<graspee> i have used gentoo in the past but i'm on fat pangolin at the moment
<Seabass> lol at rking
Prz has quit [Remote host closed the connection]
<shevy> pangolin?
<graspee> ubuntu 12.04
<shevy> lol
_theriffer_ has quit [Remote host closed the connection]
<shevy> that name got me all cracked up
<graspee> my one reason for using gentoo was that i like the word "emerge"
libertyprime has joined #ruby
<shevy> patty pangolin
<Urthwhyte> vim can't fix it
libertyprime has quit [Client Quit]
<shevy> sleeping snake
<shevy> lying lizard
<shevy> eeping elephant
<Urthwhyte> I tried
yxhuvud has quit [Ping timeout: 248 seconds]
<scriptmonkey_> what is the best way to handle an object that fail the initialization?
<Urthwhyte> oh ft didn't get set
<Urthwhyte> hmm
<graspee> i think it helps stuff to have a cute animal personality. maybe ruby should have an animal
<shevy> graspee, did you look at GNU Sourcemange? they "cast" spells and "cook" their recipes in a happy boiling witch pot and they use a grimoire to keep a list of their spells
<shevy> but they use shell scripts for the magic :(
<graspee> really? that sounds awesome
<shevy> yeah I <3 the idea... but I dont like shell scripts
<Urthwhyte> rking: did you manage to get it indented properly?
<Seabass> how do I send whispers or private tells
<graspee> ./msg graspee thanks, man
hynkle has quit [Quit: hynkle]
<shevy> Seabass, /query rking
abionic has joined #ruby
<parsifal_> sleeping snake, that's what they called me in college
Facefox has quit [Ping timeout: 260 seconds]
geekbri has quit [Remote host closed the connection]
<shevy> scriptmonkey_ best way is to have code that does not fail :)
<shevy> scriptmonkey_ depends on what you mean with failing precisely. ie. do you mean an exception?
<rking> Urthwhyte: Yep, sure. In like 1 second. If you have `filetype plugin indent on` in your vim rc files the = cmd is smart, and you can do gg=G
<scriptmonkey_> yes. for example. I am creating an object that uses an IP. what is the best way to handle a bad IP? test before I create the object?
<scriptmonkey_> *uses an IP as the argument to create the object
fflush has quit [Quit: Colloquy for iPad - http://colloquy.mobi]
<Urthwhyte> hmm
<Urthwhyte> not working
altiouz has left #ruby ["Leaving"]
ken_barber1 has joined #ruby
libertyprime has joined #ruby
ken_barber1 has quit [Changing host]
ken_barber1 has joined #ruby
adeponte has joined #ruby
<rking> Urthwhyte: What vim version?
<graspee> the object will still be created though
<Urthwhyte> 7.3.260
<Seabass> http://pastebin.com/44L8eUBs if you run it and type warrior it says undefined method '-' why can't I subtract hash parts
<Urthwhyte> oh, I hate filetype off
Solnse has joined #ruby
<kenichi> ugh, who can tell me how to get rvm to properly codesign a ruby bin?
flip_digits has joined #ruby
abionic has quit [Read error: Connection reset by peer]
nlc has quit [Ping timeout: 256 seconds]
vjt has quit [Ping timeout: 272 seconds]
abionic has joined #ruby
<scriptmonkey_> shevy, are you saying I should check for validity before I try to create the object?
looopy has quit [Remote host closed the connection]
ken_barber has quit [Ping timeout: 260 seconds]
vjt has joined #ruby
daveecee has joined #ruby
cdepue has joined #ruby
mikepack has joined #ruby
davidcelis has quit [Disconnected by services]
daveecee is now known as davidcelis
davidcelis has quit [Changing host]
davidcelis has joined #ruby
davidcelis has quit [Client Quit]
davidcelis_ has joined #ruby
mdw has quit [Remote host closed the connection]
davidcelis has joined #ruby
oneirosFade has joined #ruby
<rking> Oh, I thougt Urthwhyte answered Seabass so I stopped workingg on it.
<Urthwhyte> I didn't know there was a question
<rking> Seabass: If you put p [warstats, arcstats] at the top of Fight#initialize, you'll see that those are Hash objects that you're trying to index as Arrays.
<Seabass> rking: how do you do that redbeep message? is it private?
<oneirosFade> Wow... full room here. So, calling on experience from you folks - if I want to write a Lin/Mac/Win app in Ruby with a GUI, which toolkit am I likely to have the best success with these days?
<rking> Seabass: You want stuff like arcstats['hp'] instead of arcstats[0]
<rking> Seabass: Yeah, I did /msg Seabass
<rking> Seabass: Oh, no, the beep might have been me saying "Seabass"
stephenjudkins has joined #ruby
<rking> Seabass: But for private comms there's /msg and the windowed version: /query
* rking likes how IRC is as strong as ever.
azm has quit [Ping timeout: 256 seconds]
ReachingFarr has left #ruby [#ruby]
flip_digits has quit [Quit: Textual IRC Client: http://www.textualapp.com/]
<rking> Urthwhyte: I have to go (for a long time). When I get back I'll figure out what's up with your indent.
schaerli has quit [Remote host closed the connection]
<Urthwhyte> no worries, I think it's just a filetype issue
<Urthwhyte> I'm about to head to a meeting myself
<rking> Urthwhyte: Try running as vim --noplugin -u NONE then manually doing the :filetype plugin indent on
Urthwhyte is now known as Urth|Away
EzeQL has quit [Read error: Connection reset by peer]
EzeQL has joined #ruby
davidpk has joined #ruby
ConstantineXVI has joined #ruby
<shevy> scriptmonkey_ no, the object in question should handle failure IMHO
<shevy> scriptmonkey_, what I usually do is do some sanitizing via some method(s)
Vendethiel has quit [Ping timeout: 250 seconds]
LBRapid has quit [Quit: Farewell...]
oneirosFade has left #ruby ["WeeChat 0.3.7"]
EzeQL has quit [Remote host closed the connection]
<scriptmonkey_> when I do host = Host.new("494.12.34.1") the host object is created no matter what? is there a way to prevent the creation?
rmascarenhas has quit [Quit: leaving]
MrGando has quit [Quit: Bye]
EzeQL has joined #ruby
<graspee> i don't think so
<parsifal_> later, thanks for the help Urth|Away
abionic has quit [Read error: No route to host]
parsifal_ has quit [Quit: Page closed]
<apeiros_> scriptmonkey_: you can raise in initialize
<apeiros_> you can redefine Host::new
<apeiros_> redefining the latter to return something else than a Host instance is a very bad idea, though.
ThatDudeGuy_ has left #ruby [#ruby]
catphish has left #ruby ["Leaving"]
banseljaj is now known as imami|afk
mvangala has joined #ruby
mikepack has quit [Read error: Connection reset by peer]
<Seabass> is there a way to toggle off the ==joined/left notifications
nopoliti1a has quit [Remote host closed the connection]
davidcelis has quit [Quit: K-Lined]
fr0gprince_mac has quit [Quit: Leaving...]
<any-key> depends on your IRC client
jesly_ has quit [Ping timeout: 244 seconds]
ConstantineXVI has quit [Remote host closed the connection]
jesly has quit [Ping timeout: 276 seconds]
EzeQL has quit [Remote host closed the connection]
bier has quit [Ping timeout: 244 seconds]
EzeQL has joined #ruby
<shevy> scriptmonkey_ I dont know what is class Host, you could perhaps subclass, or extend Host
<shevy> Seabass I use xchat here. I have status messages disabled, I also dont see leaving and quitting members either
EzeQL has quit [Read error: Connection reset by peer]
<any-key> he's on windows
<shevy> I find that those notifications are useless
scriptmonkey_ has quit [Ping timeout: 245 seconds]
<shevy> there is xchat for windows too! silverex build... and another build which i forgot
EzeQL has joined #ruby
deryldoucette has joined #ruby
cwill747 has quit [Remote host closed the connection]
Morkel has quit [Quit: Morkel]
nlc has joined #ruby
elux has quit [Quit: Bye!]
keithcel_ has quit [Remote host closed the connection]
hackeron has quit [Ping timeout: 260 seconds]
EzeQL has quit [Read error: Connection reset by peer]
hackeron has joined #ruby
EzeQL has joined #ruby
dcope has joined #ruby
<dcope> Greetings.
<dcope> What's the best book for a beginner? The one from prag prog?
<UNIXgod> Seabass: on irssi here and I use: /ignore -channels #ruby * PARTS NICKS QUITS JOINS
EzeQL has quit [Read error: Connection reset by peer]
<shevy> dcope the pickaxe is quite ok
<epochwolf> fyi: pickace = prag prog
<dcope> shevy: yep, that's the one i'm looking at
mnaser has quit [Ping timeout: 248 seconds]
<epochwolf> pickaxe*
ken_barber1 has quit [Remote host closed the connection]
narshlob has joined #ruby
<dcope> "Programming Ruby 1.9"
<shevy> dcope in the end though, the only real way to learn ruby is to start writing scripts and build from there :)
<dcope> Definitely.
<dcope> I just need something to get my feet wet to the point that I can read docs and go on my own.
<any-key> give us your code and we'll rip you a new one until you learn ;)
<shevy> the pickaxe has the whole stdlib reference in the last part, it's like 300 pages for that alone or something
<narshlob> how kosher is it to include an external library in a gem? (ie, have the ZeroMQ library be included in a gem that requires it)
<epochwolf> any-key: oh goody, I've got a good one for you
EzeQL has joined #ruby
<any-key> yay
<any-key> lets see it
<epochwolf> any-key: https://gist.github.com/187d24af5fe3f7bc092c is there a better way to generate an xml file than using this method?
keithcelt has joined #ruby
<any-key> interesting use of curly brackets
<any-key> just use "do"
<any-key> it'll look like not java
mikepack has joined #ruby
<any-key> ugh
<shevy> waaaaaaaaah XML
<epochwolf> any-key: I use do for code blocks and curlies for xml blocks.
<epochwolf> any-key: it makes it easier for me to scan the xml structure.
<any-key> fair enough
<any-key> as long as you're consciously doing it :P
<any-key> I don't know of a better way, tbh
<any-key> XML generation is always going to be messy
<any-key> it's XML
stephenjudkins_ has joined #ruby
alexgordon has joined #ruby
mikepack has quit [Read error: Connection reset by peer]
* epochwolf hits alexgordon with a brick!
enviable_ has joined #ruby
EzeQL has quit [Remote host closed the connection]
<shevy> hmm
<shevy> all that violence
beneggett has quit [Quit: Computer has gone to sleep.]
stephenjudkins has quit [Read error: Connection reset by peer]
stephenjudkins_ is now known as stephenjudkins
* dcope flails his arms. ~o~
enviable_ is now known as enviable
<any-key> XML is like violence
EzeQL has joined #ruby
<alexgordon> please don't hit me with XML
<epochwolf> any-key: I've been doing rails for 4~5 years. Half of that is enterprise software so… it's gonna be fugly.
<any-key> heh yeah
linoj has quit [Quit: linoj]
<any-key> I work on a rails project that's been around for around 5 years, there's an interesting mix of old and new rails-isms :P
wvms has joined #ruby
<epochwolf> any-key: yay…
hackeron has quit [Read error: Operation timed out]
<shevy> whoa
<shevy> 5 years
<any-key> we're on ruby 1.9 though!
<any-key> yeah, it's pretty impressive
<shevy> do you feel old?
kaneda_ has quit [Ping timeout: 245 seconds]
<shevy> man damn
<shevy> 5 years ago is only 2007 :(
<any-key> yep
<any-key> I'm 21, I exist to make people here feel old
<epochwolf> any-key: https://gist.github.com/7cbc46772cc821151c5d most of my coworkers prefer to stick constants in the database, what do you think about this?
<shevy> I think next year I'll be ten years on linux...
<shevy> *with
bier has joined #ruby
<epochwolf> any-key: shit… I'm 25.
EzeQL has quit [Read error: Connection reset by peer]
<shevy> perfect
<shevy> you two could marry!
<shevy> and produce happy baby code
<epochwolf> shevy: only if any-key is female.
<any-key> epochwolf: you have a knack for making Ruby look like JS.....
<epochwolf> and is religiously compatiable. :D
<shevy> what
<shevy> religion!
<alexgordon> gotta be pagan to marry epochwolf
schovi has quit [Remote host closed the connection]
<epochwolf> alexgordon: Christian, not pagan XD
looopy has joined #ruby
<alexgordon> same difference!
* epochwolf cries
EzeQL has joined #ruby
<any-key> epochwolf: I'm not a complete rails wizard but I don't see anything terribly wrong with that code other than the JS-style hashes :P
<epochwolf> any-key: I love the new hashes.
<any-key> butbutbut rocketships are awesome
n1x has joined #ruby
keithcelt has quit [Remote host closed the connection]
<epochwolf> any-key: and they use 4 extra characters
<shevy> I dont like the -> syntax
<epochwolf> :rocket => ship vs. rocket:ship
<shevy> wait
<carloslopes> shevy: +1 :)
<shevy> rocket: ship
<shevy> or?
<any-key> meh
<shevy> someone tell me before I have to test on my own ... :P
<epochwolf> shevy: scope :woooo, ->(date){ where :updated_at.gt => date. }
<shevy> argh
<any-key> wait, what
<any-key> agh
<shevy> AND you need the ()
<shevy> :(
kaspernj has joined #ruby
<shevy> imagine if it were
mengu has quit [Read error: Connection reset by peer]
<shevy> -> { where :updated_at.gt => date. }
<shevy> <shevy> argh
<robacarp> the : after the name isn't part of the hash....
mengu_ has joined #ruby
mengu_ has quit [Changing host]
mengu_ has joined #ruby
<shevy> lol I fail at paste
<epochwolf> yes
enviable has quit [Quit: enviable]
bbttxu has quit [Quit: bbttxu]
<epochwolf> any-key: https://gist.github.com/a19133e6659edb8c9d35 this initializer is fun.
Squarepy_ has joined #ruby
<epochwolf> that csv file only has about 1,600 entries so it's not a very large hash.
Squarepy_ has quit [Changing host]
Squarepy_ has joined #ruby
<any-key> that's kinda ugly but easy to follow
* any-key heads home
<epochwolf> bye bye bye!
* epochwolf is looking to get clubbed like a baby seal :D
shadoi1 has joined #ruby
t0mmyvyo has joined #ruby
griffindy has quit [Quit: Computer has gone to sleep.]
<Seabass> how do you make * emote?
Criztian has joined #ruby
shadoi has quit [Read error: No route to host]
<shevy> via /me
<shevy> example /me hops around.
* shevy hops around.
* Seabass understand
* epochwolf clubs Seabass
EzeQL has quit [Ping timeout: 265 seconds]
looopy has quit [Remote host closed the connection]
ZachBeta has joined #ruby
Boohbah has joined #ruby
dagnachewa has joined #ruby
ch4se has quit [Read error: Connection reset by peer]
kish has joined #ruby
carloslopes has quit [Quit: Leaving]
mvangala has quit [Remote host closed the connection]
EzeQL has joined #ruby
kish has quit [Read error: Connection reset by peer]
harukomoto has quit [Ping timeout: 256 seconds]
stkowski has joined #ruby
Urth|Away is now known as Urthwhyte
netogallo has quit [Ping timeout: 252 seconds]
EzeQL has quit [Read error: Connection reset by peer]
EzeQL has joined #ruby
maesbn has joined #ruby
wangr has quit [Ping timeout: 245 seconds]
jrist is now known as jrist-afk
philcrissman_ has quit [Remote host closed the connection]
Guest47629 is now known as zii
zii has quit [Changing host]
zii has joined #ruby
DrShoggoth has quit [Quit: Leaving]
nfk has quit [Quit: yawn]
kish has joined #ruby
kish has quit [Read error: Connection reset by peer]
alexgordon has left #ruby [#ruby]
Facefox has joined #ruby
Urthwhyte is now known as Urth|Away
Zoxc has joined #ruby
<Zoxc> how does the _ variable work?
<apeiros_> the same as every other local variable works
davidcelis has joined #ruby
<apeiros_> unless you mean in irb. there it works with pixie dust (it just contains the last value evaluated)
bluOxigen has joined #ruby
mvangala has joined #ruby
chson has quit [Remote host closed the connection]
<Zoxc> you can do proc {|_,_,_|} with it
<apeiros_> and this is surprising how?
<apeiros_> you can do proc { |a,a,a| too
<Zoxc> no you can't
<apeiros_> oh… interesting… when did that happen…
<apeiros_> ok, in that case, I retract my statement.
<apeiros_> seems it happened in 1.9
kylemcgill has joined #ruby
netogallo has joined #ruby
<apeiros_> 1.8 happily lets you do proc { |a,a,a| }
<Boohbah> how can i do this better? http://pastie.org/3952388
beneggett has joined #ruby
supergiantrobot_ has joined #ruby
EzeQL has quit [Remote host closed the connection]
<Tasser> Boohbah, I wouldn't use binary read and trust your locale...
EzeQL has joined #ruby
<Boohbah> Tasser: they are binary files
digitalcakestudi has quit [Quit: Leaving.]
Squarepy_ is now known as Squarepy
sbanwart has joined #ruby
simao has joined #ruby
jrgifford has joined #ruby
BeLucid has quit [Read error: Connection reset by peer]
<havenn> Boohbah: I like "#{Dir.home}/torrents" better than using the "+".
BeLucid has joined #ruby
skinny_m has joined #ruby
EzeQL has quit [Read error: Connection reset by peer]
EzeQL has joined #ruby
maesbn has quit [Remote host closed the connection]
vipaca has quit [Quit: Leaving...]
kil0byte_ has quit [Remote host closed the connection]
<burgestrand> Crossposter :(
simao has quit [Ping timeout: 245 seconds]
Foxandxss has joined #ruby
<Squarepy> Boohbah, what happens if scan finds more than one hit
ken_barber has joined #ruby
<Boohbah> Squarepy: luckily it didn't :)
chomp has quit [Quit: Leaving]
ken_barber has quit [Changing host]
ken_barber has joined #ruby
ken_barber has quit [Remote host closed the connection]
<havenn> Boobah: Change "if !" to the more idiomatic "unless".
<Boohbah> i am just not sure that i need to build an array and loop over the files twice
odinswand has quit [Quit: Computer has gone to sleep]
jimeh2 has quit [Ping timeout: 260 seconds]
EzeQL has quit [Ping timeout: 250 seconds]
tfitts has joined #ruby
<Squarepy> Boohbah, you can prob ditch the second loop
<narshlob> Boohbah: not sure if this would run without tweaks, but it's close to how I would do it: http://pastie.org/3952440
king313 has quit [Quit: .]
apeiros_ has quit [Remote host closed the connection]
<tfitts> I'm trying to get ruby installed on ubuntu 12.04 and keep running into errors. has anyone here got this setup working?
<Boohbah> narshlob: thanks :)
Sebastien has joined #ruby
asobrasil has left #ruby [#ruby]
TorpedoSkyline has joined #ruby
dagnachewa has quit [Remote host closed the connection]
kaspernj has quit [Remote host closed the connection]
stephenjudkins has quit [Quit: stephenjudkins]
FatherCarbon has quit [Read error: Connection reset by peer]
wilmoore has joined #ruby
FatherCarbon has joined #ruby
Sebastie1 has joined #ruby
zastaph has quit []
strcrzy has quit [Read error: Connection reset by peer]
<graspee> i'm on 12.04
strcrzy_ has joined #ruby
<graspee> i just used the ruby in the repo
TheIronWolf has joined #ruby
TheIronWolf has quit [Client Quit]
<graspee> it's 1.9.3p0 i think
Sebastien has quit [Ping timeout: 256 seconds]
supergiantrobot_ has quit [Quit: supergiantrobot_]
Synthead has quit [Quit: p33 ba115]
cableray has quit [Quit: See you 'round like a donut.]
sh1ps has quit [Quit: sh1ps]
Gekz_ has quit [Quit: No Ping reply in 180 seconds.]
bluenemo has quit [Read error: Connection reset by peer]
Gekz has joined #ruby
ZachBeta has quit [Quit: Computer has gone to sleep.]
<tfitts> graspee: are you using ruby-rvm?
<graspee> no
<graspee> ruby from the repository
tworkin has left #ruby [#ruby]
sh1ps has joined #ruby
<graspee> like apt-get install
arturaz has quit [Ping timeout: 246 seconds]
arturaz has joined #ruby
<tfitts> ok, I got ruby installed, just having trouble with ruby-rvm. not even sure if I need it though really
<tfitts> thanks.
Sebastie1 has quit [Remote host closed the connection]
Sebastien has joined #ruby
`brendan has quit [Quit: - nbs-irc 2.39 - www.nbs-irc.net -]
havenn has quit [Remote host closed the connection]
banisterfiend has joined #ruby
sh1ps has quit [Ping timeout: 265 seconds]
t0mmyvyo has quit [Quit: http://twitter.com/tommyvyo]
Criztian has quit [Remote host closed the connection]
Sebastien has quit [Client Quit]
hackeron has joined #ruby
<TTilus> tfitts: using rvm (or rbenv) you can juggle between several rubies, if you do not inted to, you don't need it
<tfitts> ok cool, I was doing some reading and figured that was what it is for and that I don't need it.
maahes has joined #ruby
beneggett has quit [Quit: Computer has gone to sleep.]
Chryson has joined #ruby
mneorr_ has quit [Remote host closed the connection]
<henn1nk> how is the correct syntax? options = [params[:options].each do |option| { Option.find(option) }]
mneorr has joined #ruby
dv310p3r has quit [Ping timeout: 246 seconds]
blacktulip has quit [Remote host closed the connection]
beneggett has joined #ruby
joshman_ has joined #ruby
EzeQL has joined #ruby
Seabass_ has joined #ruby
stephenjudkins has joined #ruby
CannedCorn has joined #ruby
Targen has joined #ruby
eywu1 has joined #ruby
n1x has quit [Quit: "It's Dawn, /me yawn.. time to sleep (-_-)"]
pting has joined #ruby
sparrovv has quit [Ping timeout: 265 seconds]
mrwalker_ has quit [Remote host closed the connection]
petercs has quit [Ping timeout: 260 seconds]
niklasb has quit [Ping timeout: 260 seconds]
MasterIdler has quit [Ping timeout: 260 seconds]
Urth|Away is now known as Urthwhyte
CannedCorn has quit [Quit: Computer has gone to sleep.]
Squarepy has quit [Quit: Leaving]
skogis has quit [Ping timeout: 245 seconds]
jefftrudeau has quit [Remote host closed the connection]
friskd has joined #ruby
beneggett has quit [Quit: Computer has gone to sleep.]
dnyy has quit [Remote host closed the connection]
tomb_ has quit [Quit: ["Textual IRC Client: www.textualapp.com"]]
zinjacoder_ has joined #ruby
zinjacoder_ has quit [Read error: Connection reset by peer]
luckyruby has quit [Remote host closed the connection]
tobym has joined #ruby
t0mmyvyo has joined #ruby
Seabass has left #ruby [#ruby]
jgarvey has quit [Quit: Leaving]
jackiechan0 has quit [Quit: Sto andando via]
bluOxigen has quit [Ping timeout: 252 seconds]
wvms has quit [Ping timeout: 245 seconds]
wvms has joined #ruby
bglusman has quit [Read error: No route to host]
bglusman has joined #ruby
Jake232 has quit [Quit: Computer has gone to sleep.]
Seabass_ has left #ruby ["Leaving"]
bosphorus has quit [Ping timeout: 245 seconds]
chazbo has joined #ruby
Solnse has quit []
lopin has joined #ruby
Seabass has joined #ruby
t0mmyvyo has quit [Quit: http://twitter.com/tommyvyo]
KL-7 has quit [Quit: This computer has gone to sleep]
ZachBeta has joined #ruby
<friskd> Hey folks, i'm interested in doing some testing on my API. I'd like to be able to send a request like 100 times to my api and have the requests be made in parallel.
<friskd> perhaps divided up into 10 sets happengin simultaneously
yosinof has joined #ruby
<friskd> any gems out there that could make this easy for me?
billiamii has quit []
<friskd> essentially i'm getting duplicate data in my db and I fear its because of simultaneous requests a happenign
<friskd> i'm looking for a way to replicate requests
piotr__ has quit [Ping timeout: 246 seconds]
Urthwhyte is now known as Urth|Away
jtrudeau has joined #ruby
t0mmyvyo has joined #ruby
albemuth has quit [Quit: Computer has gone to sleep.]
<Veejay> friskd: Look up Apache Bench
<friskd> ok
albemuth has joined #ruby
<friskd> Veejay: any others beside that?
albemuth has quit [Client Quit]
uris has quit [Quit: leaving]
sh1ps has joined #ruby
eywu1 has quit [Quit: Leaving.]
<Veejay> Probably, don't know on the top of my head
<Veejay> But then again it's not like ab is complicated
<Veejay> It has a -c parameter for the concurrency and all
Chitown has quit [Ping timeout: 248 seconds]
Gavilan has joined #ruby
t0mmyvyo has quit [Quit: http://twitter.com/tommyvyo]
<friskd> ok.
kirun has quit [Quit: Client exiting]
chimkan_ has quit [Quit: chimkan_]
thecreators has quit [Quit: thecreators]
avalarion has joined #ruby
<avalarion> Hi there
looopy has joined #ruby
<avalarion> I just updated my redmine and restarted everything, now the line of my plugin does not work anymore:
<avalarion> require 'json'
<avalarion> The Error Message is: MissingSourceFile (no such file to load -- json):
C0deMaver1ck has quit [Remote host closed the connection]
<avalarion> is there a difference between libs and files while using require?
chson has joined #ruby
philcrissman_ has joined #ruby
jimeh2 has joined #ruby
<avalarion> gem list --local returns ( with others ): json (1.7.3, 1.6.5)
tatsuya_o has quit [Remote host closed the connection]
Choobie has joined #ruby
FatherCarbon has quit [Read error: Connection reset by peer]
beneggett has joined #ruby
christianrojas has quit [Quit: Linkinus - http://linkinus.com]
chico has joined #ruby
kpshek has quit []
<avalarion> What is a gemfile.lock for?
<davidcelis> avalarion: Gemfile.lock is generated by the most recent successful bundle
jimeh2 has quit [Ping timeout: 265 seconds]
<davidcelis> It's contains the last known "working" versions of the gems you've bundled to fit your current environment
<davidcelis> So bundler will look at THAT file when determining what versions of your bundled gems to use
<avalarion> specs are the installed once?
<avalarion> ones
<davidcelis> ?
<avalarion> If I take a look at this file i have got "gem" than "specs" and in "specs" for example "json (1.7.3)"
yosinof has quit [Quit: Leaving]
greyEAX has quit [Remote host closed the connection]
<davidcelis> Yeah
<davidcelis> specs is like a tree of gems you have installed and any dependencies of those gems that have been installed
<davidcelis> and a specified version
pdtpatr1ck has joined #ruby
niklasb has joined #ruby
<avalarion> is ~> bigger as?
alexim has quit [Read error: Operation timed out]
<davidcelis> "~> 1.0.2" for example means "at least 1.0.2, but not 1.1 or higher"
<avalarion> I have installed json 1.7.3 and rdoc requires ( because its has a "child"-element ) json ~> 1.4
<avalarion> okay...
<avalarion> so my problem is, that I have got a block
<davidcelis> so json ~> 1.4 is any version of JSON 1.4
<davidcelis> 1.4.x, basically
<davidcelis> typically grabs the highest available
<davidcelis> have you read the Bundler docs?
mattonrails has joined #ruby
<avalarion> nope. This is the second time I am trying to do things with ruby. My first was installing redmine and writing a bitbucket hook... and now I had to update redmine and the hook throws errors^^
zeromodulus has quit [Remote host closed the connection]
sh1ps has quit [Quit: sh1ps]
nari has joined #ruby
jimeh2 has joined #ruby
<avalarion> davidcelis: http://pastebin.com/rCK4L07y this is my file. In my opinion I have got a json block with rdoc and the normal installed json, correct?
t0mmyvyo has joined #ruby
<davidcelis> i suggest taking a look at gembundler.com
zeromodulus has joined #ruby
sh1ps has joined #ruby
cdepue has quit [Remote host closed the connection]
<davidcelis> what json are you talkinga bout
<davidcelis> ah
<davidcelis> possibly
sh1ps has quit [Client Quit]
<davidcelis> actually, not necessarily
malcolmva has joined #ruby
<davidcelis> i've got an app where two gems specify multi_json as a dependency
<davidcelis> but with conflicting versioning
<avalarion> is there a way to say: "update yourself"?
<davidcelis> bundle update?
fr0gprince_mac has joined #ruby
Solnse has joined #ruby
xbayrockx1 has joined #ruby
fulmato has joined #ruby
libertyprime has quit [Quit: Lost terminal]
<avalarion> my gemfile ist uptodate
maxwell_ has joined #ruby
xbayrockx has quit [Ping timeout: 250 seconds]
<avalarion> but it is where my redmine is... THere is another on my system I guess?
maxwell_ has left #ruby [#ruby]
oooPaul has quit [Quit: Ciao for now!]
EzeQL has quit [Remote host closed the connection]
libertyprime has joined #ruby
Solnse has quit [Client Quit]
cbuxton1 has joined #ruby
cbuxton has quit [Read error: Connection reset by peer]
ramblex has quit [Quit: ramblex]
kil0byte has joined #ruby
tomzx has joined #ruby
weasels has joined #ruby
weasels has quit [Remote host closed the connection]
simao has joined #ruby
Targen has quit [Ping timeout: 245 seconds]
ConstantineXVI has joined #ruby
macmartine has quit [Quit: macmartine]