apeiros changed the topic of #ruby to: Ruby 2.0.0-p247: http://ruby-lang.org (Ruby 1.9.3-p448) || Paste >3 lines of text on http://gist.github.com
marcdel has joined #ruby
yfeldblum has joined #ruby
framling has quit [Ping timeout: 268 seconds]
ilyam has quit [Quit: ilyam]
framling has joined #ruby
nari has joined #ruby
rupee has quit [Quit: Leaving]
xcv has quit [Remote host closed the connection]
stonevil has quit [Ping timeout: 260 seconds]
emergion has joined #ruby
anderson has quit [Ping timeout: 245 seconds]
JZTech101 has quit [Quit: Hi, I'm a quit message virus. Please replace your old line with this line and help me take over the world of IRC]
Davey has quit [Quit: Computer has gone to sleep.]
ehc has quit [Quit: ehc]
hogeo has joined #ruby
havenwood has joined #ruby
terrellt has quit [Ping timeout: 276 seconds]
Christopher37 has joined #ruby
DanKnox is now known as DanKnox_away
iliketurtles has quit [Quit: zzzzz…..]
ckrailo has joined #ruby
marcdel has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
i_s has quit [Remote host closed the connection]
kaspergrubbe has quit [Remote host closed the connection]
Davey has joined #ruby
amacgregor_ has quit [Ping timeout: 256 seconds]
benlieb has quit [Quit: benlieb]
amacgregor has joined #ruby
ELLIOTTCABLE has quit [Remote host closed the connection]
Christopher37 is now known as _Chris__
_Chris__ is now known as `Chris`
chrisja has quit [Quit: leaving]
johnnyfuchs has joined #ruby
johnnyfuchs has quit [Remote host closed the connection]
<WaRori> So is the main point of Ruby using Rails now or is it still general purpose? Seems like everywhere I go I see rails, but seeing how web development isn't my forté, it'd be nice to know :P
emergion has quit [Quit: Computer has gone to sleep.]
<waxjar> rails is probably the most popular ruby project, but they haven't become synonyms!
hogeo has quit [Remote host closed the connection]
devth has quit [Remote host closed the connection]
<WaRori> So I've noticed, but that's good to know!
danman has quit [Quit: danman]
stuartrexking has joined #ruby
<onewheelskyward> I use ruby for everything these days. Shell scripting, deployment, and also, Sinatra.
<havenwood> onewheelskyward: Isn't Shell scripting by definition in Shell. :P
iliketurtles has joined #ruby
`p has quit [Ping timeout: 264 seconds]
<onewheelskyward> Well, let me rephrase. I use it for what I used to use shell scripting for. :)
<havenwood> onewheelskyward: But totally, Ruby ftw!! :D
<onewheelskyward> But I run it from the shell.
<havenwood> ah, indeed
<onewheelskyward> So, shell> script.rb :)
<havenwood> good point
codesoda has joined #ruby
ckrailo has quit [Quit: Textual IRC Client: http://www.textualapp.com/]
fermion has joined #ruby
<zendeavor> i'll note that file-extensions don't belong on command names
devoldmx has joined #ruby
<onewheelskyward> Why not?
<zendeavor> just for the record
<onewheelskyward> I agree with you on binaries, but not for uncompiled source.
<havenwood> i don't know the 'why', but i admit I strip the '.rb' every time i use a shebang.
<zendeavor> suppose you write a script command.sh which you call from other scripts; now assume you rewrite command.sh in ruby and change the name to command.rb
<zendeavor> now you have to change every call in every other script s/command\.sh/command\.rb/g
<onewheelskyward> Yep. And now I know exactly what I'm getting.
<havenwood> You don't need to know the extension if there's a #!/usr/bin/env ruby, so nice to just omit methinks.
<Rubba> how do i select the second pair onwards in a hash (i.e. all but the first pair)
mrsolo has quit [Quit: Leaving]
<zendeavor> onewheelskyward: now suppose you distribute your command.sh, then change it to command.rb; everyone else who called your command.sh also has to update every caller as well
<onewheelskyward> What about maintaining someone else's code? It'd be nice to see that this file is ruby, that file is python in a folder with dozens of scripts in it.
sean_s has quit [Quit: sean_s]
cody-- has joined #ruby
<zendeavor> the _command_ shouldn't have an extension
<zendeavor> you don't execute ls.elf
<waxjar> i don't think there is such a thing as the first pair Rubba
<havenwood> onewheelskyward: I dunno, when they open it they see the shebang and no myster.
jmeeuwen has quit [Quit: Disconnecting from stoned server.]
<Rubba> waxjar i wanna call hash.each do { |key,v| } but ignore the first iteration
<onewheelskyward> havenwood True, but that doesn't help demystify things at a first glance.
jmeeuwen has joined #ruby
<zendeavor> onewheelskyward: imo, just symlink command.<ext> into foo/bin/command sans extension
<onewheelskyward> zendeavor in that type of deployment scenario, yes, a wrapper is the way to go.
<zendeavor> then you retain it on your _source_ file, just like everyone else
babykosh has quit [Quit: babykosh]
<Rubba> is there an elegant ruby way besides setting some sort of indicator variable within the block
<zendeavor> a wrapper? nonsense.
blackmesa has quit [Ping timeout: 240 seconds]
iliketurtles has quit [Quit: zzzzz…..]
<zendeavor> just remove the extension upon deployment, why wrap it in some other script? that's just an extra shell
cody-- has quit [Read error: Connection reset by peer]
sean_s has joined #ruby
cody-- has joined #ruby
<zendeavor> onewheelskyward: it's quite common to deploy with `ln -s /usr/local/bin/command /usr/local/share/command/command.ext'
<zendeavor> it solves the problem neatly, and is perfectly valid solution even for your local ~/bin
pentameter has quit [Remote host closed the connection]
<zendeavor> it reduces the cognitive burden of having to remember to update every caller to use the new extension
<zendeavor> i for one forget such things often and have silent failures because i tend to throw away stderr of the caller after i finish debugging it
zeade has quit [Quit: Leaving.]
yshh has quit [Remote host closed the connection]
louism2wash has quit [Quit: This computer has gone to sleep]
xcthulhu has joined #ruby
dankest has quit [Quit: dankest]
druonysuse has joined #ruby
fridim_ has joined #ruby
Giorgio has quit [Ping timeout: 246 seconds]
popl has joined #ruby
nezumi has quit [Ping timeout: 264 seconds]
RichardBaker has quit [Ping timeout: 245 seconds]
baroquebobcat has quit [Quit: baroquebobcat]
<havenwood> Rubba: I'd prolly use #each_with_index
xcthulhu has quit [Ping timeout: 260 seconds]
MrZYX is now known as MrZYX|off
<havenwood> Rubba: As converting to an Array and back seems hacky
fermion has quit [Quit: Textual IRC Client: www.textualapp.com]
druonysuse has quit [Ping timeout: 256 seconds]
<brisbin> Rubba: why do you have this requirement? also, hash order is only guaranteed in 2.0 IIRC
mahmoudimus has quit [Quit: Computer has gone to sleep.]
<brisbin> better to skip a specific key, not "the first"
julian-delphiki has joined #ruby
codesoda has quit [Remote host closed the connection]
<popl> ruby hashes have order?
huoxito has quit [Quit: Leaving]
osvico has quit []
<havenwood> >> {first: 1, second: 2, third: 3}.each_with_index { |(k, v), index| puts "#{k}: #{v}" unless index == 0 }
<eval-in> havenwood => second: 2 ... (https://eval.in/39866)
<Rubba> err well i'm calling data from a SQL query and presenting it in a table, and each row happens to be a hash
<brisbin> popl: after 2.0 (again IIRC, not sure) you'll get them in the order of insert, before that it's non-determinant
<Rubba> so i was generating the table as row.each { |cell| <td>cell</td> }
<popl> brisbin: that's weird
<brisbin> i know
<popl> thanks havenwood
<havenwood> Thought it was 1.9. ^
kaspergrubbe has joined #ruby
<havenwood> Continued in 2.0**
<brisbin> Rubba: the results aren't an array of hashes? it's one hash?
tgunr_ has quit [Quit: Nity nite]
bean has quit [Ping timeout: 245 seconds]
<Rubba> yeah it's an array of hashes, where each row is a hash
niklasb has quit [Ping timeout: 256 seconds]
<Rubba> each row in the table being returned by sql, that is
<havenwood> Rubba: If its an Array of Hashes, easy: array[-1..1].each
bean has joined #ruby
<popl> hah, rbtree
<brisbin> and you want to skip the first pair of each row or the first elemen tof the array?
<havenwood> oops [1..-1]**
<Rubba> first pair of each row
<havenwood> oh
<Rubba> each row is returned as {[column, cell],[column, cell]} etc.
<popl> I remember implementing that in different languages. Fun.
niklasb has joined #ruby
<Rubba> anyway, i've found a workaround, i just used row.select to choose the pairs i need
julian-delphiki has quit [Ping timeout: 256 seconds]
<brisbin> Rubba: as a future reader of your code, i'd rather see you access each column of the row explicitly and put it somewhere in the html
emergion has joined #ruby
<brisbin> <td>row[:name]</td><tr><td>row[:title]</td></tr>...
DrShoggoth has joined #ruby
<Rubba> yeah i agree that's good practice but the column names are dynamic so it was proving a bit of a headache/unecessary work to do that
<brisbin> i see
mahmoudimus has joined #ruby
nari has quit [Ping timeout: 268 seconds]
kaspergrubbe has quit [Ping timeout: 264 seconds]
DonRichie has quit [Ping timeout: 240 seconds]
DonRichie has joined #ruby
lkba has quit [Ping timeout: 264 seconds]
sdegutis has joined #ruby
sdegutis has joined #ruby
grillermo has quit [Quit: bandtastic.me]
smathieu has quit [Remote host closed the connection]
jb41 has quit [Ping timeout: 264 seconds]
Speed has quit [Quit: When two people dream the same dream, it ceases to be an illusion.]
limon7 has joined #ruby
sergiocampama has joined #ruby
BillCriswell has joined #ruby
tobyo has quit [Ping timeout: 260 seconds]
RORgasm has joined #ruby
emergion has quit [Ping timeout: 260 seconds]
Myrth has joined #ruby
Myrth has left #ruby [#ruby]
bradhe has quit [Remote host closed the connection]
bradhe has joined #ruby
d2dchat has joined #ruby
julian-delphiki has joined #ruby
d2dchat has quit [Remote host closed the connection]
ewnd9 has joined #ruby
butblack has joined #ruby
ravster has left #ruby [#ruby]
RORgasm has quit [Ping timeout: 256 seconds]
sean_s has quit [Ping timeout: 256 seconds]
tkuchiki has joined #ruby
bean has quit [Ping timeout: 246 seconds]
marcdel has joined #ruby
Lewix has quit [Remote host closed the connection]
bradhe has quit [Ping timeout: 245 seconds]
bean has joined #ruby
julian-delphiki has quit [Ping timeout: 245 seconds]
lkba has joined #ruby
ckrailo has joined #ruby
mootpointer has joined #ruby
mary5030 has joined #ruby
sean_s has joined #ruby
yshh has joined #ruby
smathieu has joined #ruby
Davey has quit [Quit: Computer has gone to sleep.]
thomasle_ has quit [Remote host closed the connection]
graft has quit [Ping timeout: 256 seconds]
iliketurtles has joined #ruby
r0bgleeson has quit [Ping timeout: 260 seconds]
optimusprimem has quit [Excess Flood]
`Chris` has quit [Ping timeout: 246 seconds]
zastern has quit [Remote host closed the connection]
optimusprimem has joined #ruby
sailias has joined #ruby
twoism has quit [Remote host closed the connection]
nezumi has joined #ruby
butblack has left #ruby [#ruby]
nari has joined #ruby
miskander has joined #ruby
mikepack_ has quit [Remote host closed the connection]
ColKurtz has quit [Quit: Textual IRC Client: www.textualapp.com]
ry4nn has quit [Ping timeout: 248 seconds]
ntus1017 has quit [Remote host closed the connection]
millerti has quit [Quit: millerti]
mikepack has joined #ruby
hogeo has joined #ruby
wmoxam has joined #ruby
iliketurtles has quit [Ping timeout: 246 seconds]
Lewix has joined #ruby
Lewix has quit [Changing host]
Lewix has joined #ruby
JZTech101 has joined #ruby
marcdel has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
codeski has quit [Ping timeout: 246 seconds]
sevenseacat has joined #ruby
randomau_ has joined #ruby
pipework has joined #ruby
iliketurtles has joined #ruby
sdegutis has quit [Remote host closed the connection]
chjunior has joined #ruby
grillermo has joined #ruby
L8D has left #ruby [#ruby]
randomautomator has quit [Ping timeout: 264 seconds]
randomau_ has quit [Ping timeout: 264 seconds]
niklasb has quit [Ping timeout: 264 seconds]
ian__ has joined #ruby
<ian__> I'm trying to implement single variable gradient descent with a linear hypothesis equation. I'm doing it in ruby, and the problem is the theta values aren't converging.
<ian__> not sure if anyone can help since I'm sure it's not a problem with ruby but my lack of understanding of the algorithm
<ian__> but here's the code http://pastie.org/8191890
<pontiki> it's not
chjunior has quit [Client Quit]
mikepack has quit [Remote host closed the connection]
<pontiki> i am not going to study up on what to me is some obscure algorithm
<ian__> ok sorry I asked
maroloccio has quit [Quit: WeeChat 0.4.0]
<pjeide> good thing there are so many hundreds of other people who might be interested in such a thing
Lewix has quit [Remote host closed the connection]
RichardBaker has joined #ruby
chjunior has joined #ruby
ssvo has joined #ruby
xaxxon has joined #ruby
machuga|away is now known as machuga
arya__ has quit [Ping timeout: 264 seconds]
<zendeavor> "single variable gradient descent with a linear hypothesis equation"
<xaxxon> hey, how do I see what methods of my class come from included modules? My understanding is that it's "above" your class between your class and it's superclass. I know how to say obj.public_methods.. but I can't figure out how to get to the .. whatever.. that has the module methods
<ismaelrb> ian__ do you know about stackoverflow.com ?
<xaxxon> what methods available to my object, I mean
BillCriswell has quit [Remote host closed the connection]
julian-delphiki has joined #ruby
gazarsgo has quit [Quit: gazarsgo]
<bnagy> ian__: where's a link to the algorithm? We can at least check your implementation
<bnagy> most of those things have a pseudocode version up somewhere...
sdegutis has joined #ruby
grillermo has quit [Ping timeout: 246 seconds]
<ian__> alright one sec
arya_ has joined #ruby
RichardBaker has quit [Client Quit]
robbyoconnor has quit [Read error: Connection reset by peer]
<xaxxon> hrmm.. looks like Class has included_modules
robbyoconnor has joined #ruby
gazarsgo has joined #ruby
<xaxxon> so I guess I could iterate through those..
RichardBaker has joined #ruby
RichardBaker has quit [Client Quit]
bean has quit [Ping timeout: 268 seconds]
JZTech101 has quit [Quit: Hi, I'm a quit message virus. Please replace your old line with this line and help me take over the world of IRC]
JZTech101 has joined #ruby
RichardBaker has joined #ruby
dmiller has joined #ruby
optimusprimem has quit [Ping timeout: 245 seconds]
[narcan] has joined #ruby
<bnagy> sounds promising
<bnagy> but methods that are defined in your class as well as in an included module will be resolved from your class
<bnagy> so you just need to deal with that
ravster has joined #ruby
pencilcheck has joined #ruby
<ian__> can't find good pseudocode for this
<ian__> don't worry, I'll go somewhere else
<bnagy> ok, can you find a mathy link?
ewnd9 has quit [Read error: Operation timed out]
<ian__> I found an implementation in R that meets you half way I suppose http://www.r-bloggers.com/regression-via-gradient-descent-in-r/
ravster has left #ruby [#ruby]
ntus1017 has joined #ruby
wmoxam has quit [Ping timeout: 264 seconds]
pen has quit [Ping timeout: 264 seconds]
adeponte has quit [Remote host closed the connection]
<bnagy> ian__: ok I am confused. I'm not seeing any 1/anything in your code?
rickruby has joined #ruby
n_blownapart has joined #ruby
jmeeuwen has quit [Quit: Disconnecting from stoned server.]
codezombie has quit [Quit: Linkinus - http://linkinus.com]
jmeeuwen has joined #ruby
<bnagy> the stuff you pasted uses some kind of reciprocal for all their various versions
RichardBaker has quit [Quit: RichardBaker]
vlad_starkov has joined #ruby
n_blownapart has quit [Remote host closed the connection]
bzitzow has quit [Ping timeout: 245 seconds]
RichardBaker has joined #ruby
<bnagy> basically keep subtracting alpha 1/some_sum_or_other until it converges
iliketurtles has quit [Quit: zzzzz…..]
<bnagy> but without the reciprocal I can't intuitively see how it can converge
<ian__> the reciprocal?
Domon has joined #ruby
<bnagy> 1/something
wmoxam has joined #ruby
<ian__> I'll try 1/@x_values.length
<bnagy> like to me, it looks like something similar to 1 - 1/2 - 1/3 - 1/4... until the fraction gets really tiny, at which point we have "converged", yeah?
ckrailo has quit [Quit: Computer has gone to sleep.]
vlad_starkov has quit [Ping timeout: 260 seconds]
rodacato has joined #ruby
<ian__> I don't know
<ian__> I have no idea how it's supposed to converge
Yakko has joined #ruby
<bnagy> ok.. did you read that blog post you linked me to?
ismaelrb has quit [Quit: Textual IRC Client: www.textualapp.com]
<bnagy> and the refs it links?
<ian__> yeah
<bnagy> sorry to sound like an ass.. but do you understand the actual maths?
<ian__> uggh I guess not
mootpointer has quit [Quit: Computer has gone to sleep.]
<bnagy> ok. basically, until convergence we're doing x - alpha times change in F(x) where F is a function
<bnagy> forget alpha cause it's a constant
<bnagy> so we subtract F(x) from x until x stops changing
<ian__> I let it equal 1 for now
nbouscal has joined #ruby
<bnagy> which means that F(x) has to be something that will return smaller and smaller values - looks like it's an ML error rate in this context
<bnagy> as we get closer to 'right' our func returns a smaller value
oddraisin has joined #ruby
Vivekananda has quit [Ping timeout: 256 seconds]
heftig has quit [Quit: Quitting]
<bnagy> so I kind of understand the algorithm, I just can't see it in your code
miskander has quit [Quit: miskander]
DocEternal has quit [Quit: Page closed]
<bnagy> btu I see lots of stuff like 1/m times the sum from 1 to m of something about some pairs
<bnagy> which makes sense, like if we're doing "thing" with 6 pairs, we divide by 6
viszu has joined #ruby
x1337807x has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<bnagy> the rest I could probably work out if I tried, but maybe you can take it from here?
mootpointer has joined #ruby
<ian__> I think I understand this much
<ian__> I did the actual x - alpha times change in F(x)
marius has quit [Ping timeout: 256 seconds]
<ian__> I found the partial derivatives, with respect to m and b
eka has quit [Quit: Computer has gone to sleep.]
<ian__> and m and b are variables that should converge eventually
cody-- has quit [Quit: Computer has gone to sleep.]
lele has quit [Ping timeout: 245 seconds]
danman has joined #ruby
<zendeavor> you might speak to #algorithms to see if you're implementation matches the algo
<ian__> bnagy, thank you for taking time out
<zendeavor> your*
<ian__> I'll take this somewhere else, but it means a lot
<zendeavor> it's not that you have to leave
<zendeavor> just that they are more likely to grok both sides
tobyo has joined #ruby
DanKnox_away is now known as DanKnox
<ian__> ok I'll do that
tgunr has joined #ruby
<bnagy> must. not. study. newthing. :<
dankest has joined #ruby
dankest has quit [Read error: Connection reset by peer]
<ian__> I'm trying something that's too hard for me
<zendeavor> no such thing.
lele has joined #ruby
<zendeavor> all you have to know is the expected result and expected intermediate values
<zendeavor> if your implementation matches those within a reasonable skew, you're doing pretty well
<zendeavor> *expected ... of a given input
nathancahill has joined #ruby
<ian__> well the problem is when I run the program with each iteration the m and b values approach infinity, they don't converge
noyb has joined #ruby
<ian__> I can see why looking at the code
nathancahill has quit [Client Quit]
<ian__> but I can't spot the discrepancy between what I've written and how the pseudo code
<ian__> is written
m104 has joined #ruby
robustus has quit [Ping timeout: 264 seconds]
sean_s has quit [Quit: sean_s]
PhatBaja has quit [Quit: Leaving.]
marius has joined #ruby
robustus has joined #ruby
nathancahill has joined #ruby
Rubba has quit [Ping timeout: 245 seconds]
endash has quit [Quit: endash]
postmodern has quit [Quit: Leaving]
n_blownapart has joined #ruby
sdegutis has quit [Remote host closed the connection]
larissa has joined #ruby
sdegutis has joined #ruby
sdegutis has joined #ruby
grillermo has joined #ruby
adeponte has joined #ruby
keen______ has joined #ruby
nkts_ has joined #ruby
keen_____ has quit [Ping timeout: 245 seconds]
marius has quit [Ping timeout: 260 seconds]
k0rupted has quit [Ping timeout: 260 seconds]
m104 has quit [Quit: brb]
k0rupted_ has quit [Ping timeout: 276 seconds]
sn0wb1rdz has quit [Quit: ZNC - http://znc.in]
blip99 has joined #ruby
JZTech101 has quit [Ping timeout: 245 seconds]
ckrailo has joined #ruby
nathancahill has quit [Quit: nathancahill]
codeski has joined #ruby
DanKnox is now known as DanKnox_away
sn0wb1rdz has joined #ruby
[narcan] has quit [Ping timeout: 245 seconds]
rodacato has quit [Remote host closed the connection]
anonymuse has joined #ruby
sn0wb1rdz has quit [Client Quit]
grillermo has quit [Ping timeout: 246 seconds]
sn0wb1rdz has joined #ruby
ckrailo has quit [Client Quit]
xaxxon has quit [Quit: Leaving]
mootpointer has quit [Quit: Computer has gone to sleep.]
sn0wb1rdz has quit [Client Quit]
npulse has joined #ruby
postmodern has joined #ruby
ffio has joined #ruby
robscomputer has quit [Remote host closed the connection]
ckrailo has joined #ruby
robscomputer has joined #ruby
<bnagy> ian__: when you do each_pair you can have each_pair {|x,y| ... that will make your code easier to read
ewnd9 has joined #ruby
<ian__> really?
mootpointer has joined #ruby
<bnagy> also, if you could rename some of your variables it would make it easier to read
tgunr has quit [Quit: Nity nite]
alvaro_o has quit [Quit: Ex-Chat]
nadirvar_ has quit [Ping timeout: 260 seconds]
noyb has quit [Ping timeout: 264 seconds]
tjbiddle has quit [Quit: tjbiddle]
reset has quit [Read error: Operation timed out]
<bnagy> like if you're trying to match that R code, then there should be an alpha and a theta in there
bricker`LA has joined #ruby
tjbiddle has joined #ruby
robscomputer has quit [Ping timeout: 268 seconds]
emilevictor has joined #ruby
danman has quit [Ping timeout: 246 seconds]
vlad_starkov has joined #ruby
danman has joined #ruby
fridim_ has quit [Ping timeout: 256 seconds]
sayan has joined #ruby
sn0wb1rd has joined #ruby
St_Marx has quit [Quit: Leaving]
St_Marx has joined #ruby
wmoxam has quit [Ping timeout: 264 seconds]
<ian__> figured it out!
m104 has joined #ruby
limon7 has quit [Remote host closed the connection]
smathieu has quit [Remote host closed the connection]
limon7 has joined #ruby
vlad_starkov has quit [Ping timeout: 264 seconds]
<bnagy> show?
<ian__> ok one sec
Wasp has joined #ruby
radic__ has joined #ruby
tjbiddle has quit [Quit: tjbiddle]
sn0wb1rd has quit [Quit: ZNC - http://znc.in]
<ian__> two mistakes
<ian__> and you were right, I should have had an alpha
mahmoudimus has quit [Quit: Computer has gone to sleep.]
<ian__> not always necessary but in this case it's nice to have
Mars` has joined #ruby
JZTech101 has joined #ruby
RORgasm has joined #ruby
<Mars`> does anyone have any experence with xmpp4?
<ian__> and then I forgot to multiply by -1 the errors, so I was actually maximizing the error instead of minimizing
osvico has joined #ruby
<ian__> oops
radic_ has quit [Ping timeout: 240 seconds]
<bnagy> ian__: hm. Do you have a correct result vector, or a test output of any kind
mootpointer has quit [Quit: Computer has gone to sleep.]
<bnagy> cause I am not sure but I still don't think that matches the R code
<ian__> ok one sec
<Wasp> hi, started playing ruby warrior, but run into somehow strange problem. Can anyone tell me, whats wrong here: http://pastie.org/8192147
<pontiki> what is ruby warrior?
<Wasp> (extreme reduced to the core: failes with "Unknown direction nil. ..."
<pontiki> ta
<Wasp> pontiki: if i do the same localy (without @) it has no complains
<bnagy> ian__: also, apart from the each_pair I would recommend cleaning up, in your iteration just do m -= step*sum_m(m, b)
<bnagy> you don't need the temp vars in ruby
<ian__> ok
<ian__> I'm new to ruby too lol
<pontiki> Wasp: i'm not sure i can answer; this is the first i've heard of ruby warrior
<pontiki> however, i am impressed
<Wasp> do you see any error in syntax? on my simple class?
<havenwood> pontiki: Wasp: if you guys didn't know, nice new canvas wrapper for eye candy with RubyWarrior: https://www.bloc.io/ruby-warrior/#/
Guest84975 has joined #ruby
danman has quit [Ping timeout: 246 seconds]
<Wasp> havewood, i am on that site, thats how i came to ruby warrior and ruby at all
danman has joined #ruby
<Wasp> but just that simple snippet doesnt work
<pontiki> wasp: nope: https://eval.in/39868
<havenwood> Wasp: Aha, nice - makes sense.
braincra- has joined #ruby
<ian__> ok so that includes the output
Guest84975 is now known as sn0wb1rdz
[narcan] has joined #ruby
<Wasp> pontiki: its my (faulty?) code, isnt it?
<Wasp> does it work for you
<Wasp> ?
shadoi has quit [Quit: Leaving.]
<pontiki> wasp: i have not one clue what your code is supposed to do
<pontiki> all i can say is that it is syntax clean
<Wasp> its an issue about syntax not about my intension
iliketurtles has joined #ruby
<pontiki> the eval.in link shows it is syntactically correct
<pontiki> no syntax errors or warnings
<ian__> actually bnagy I need the temp variables because I need to change m and b together since they depend on each other
<Wasp> okay intension: intension is to store a symbol inside a static class variable and be able to pass it to a function
<pontiki> if you have something different, paste the error messages
RORgasm has quit [Ping timeout: 264 seconds]
blast_hardcheese has left #ruby ["WeeChat 0.3.8"]
Astralum has quit [Ping timeout: 268 seconds]
asgardBSD has joined #ruby
optimusprimem has joined #ruby
optimusprimem has quit [Changing host]
optimusprimem has joined #ruby
<Wasp> @direction seems to be NIL
<Wasp> "Unknown direction nil. Should be :forward, :backward, :left or :right."
<pontiki> do you know what a class variable is?
codemonkey010101 has joined #ruby
<Wasp> global variable for class player
codemonkey010101 has quit [Remote host closed the connection]
<Wasp> (in my case)
braincrash has quit [Ping timeout: 256 seconds]
JZTech101 has quit [Ping timeout: 245 seconds]
<pontiki> as i have not seen this ruby warrior until 5 minutes ago, i'm not sure how instruction is given
<Wasp> just start with level one, thats how i started with warrior as also with ruby ;)
<pontiki> wasp, do you know how you designate a class variable? and how such a thing is distinct from an instance variable?
Guest21857 is now known as ned
<bnagy> ian__: ugh, ok.. not how I'd write that but whatever. You're not doing the thing in that post you linked at all
`Chris` has joined #ruby
viszu has quit [Quit: Leaving.]
nbouscal has quit [Quit: Computer has commenced electric sheep tracking protocol.]
jblack has quit [Quit: Lost terminal]
anonymuse has quit [Remote host closed the connection]
<Wasp> in fact its a instance varaible but should do as well .. tried class varaible (@@) as well, but it is not allowed
nbouscal has joined #ruby
Kricir has joined #ruby
hippyphysicist has joined #ruby
<havenwood> Wasp: Try initializing the instance variable in an #initialize method: def intialize; @direction...
<Wasp> pontiki: okay thx for your syntax check
moos3 has quit [Quit: Computer has gone to sleep.]
<ian__> bnagy, you're right, it's not quite the same
moos3 has joined #ruby
<havenwood> def initialize**
nbouscal has quit [Client Quit]
larissa has quit [Quit: Leaving]
hippyphysicist has quit [Read error: Connection reset by peer]
chjunior has quit [Remote host closed the connection]
<Wasp> havenwood: strange, that was the trick
<havenwood> Wasp: In a module, you can define an instance variable like that just in the open scope. The class Player is itself instantiated and only has access to instance variables defined in that instance of the class.
<Wasp> thx man, you saved my some sleep(less) that night :))
<havenwood> Wasp: de nada
nadirvar_ has joined #ruby
Voodoofish430 has quit [Quit: Leaving.]
machuga is now known as machuga|away
<Wasp> havenwood: gracias
<bnagy> ian__: oic why the R code looks weird, they've done it as matrix maths
iliketurtles has quit [Ping timeout: 246 seconds]
chjunior has joined #ruby
amacgregor_ has joined #ruby
<Wasp> havenwood: back inside man real code: strange that all other static variables are fine o.O
<ian__> yeah, that stuff's beyond me
<ian__> it's what I'm doing next though lol
io_syl has quit [Ping timeout: 264 seconds]
PhatBaja has joined #ruby
<Wasp> just the one with the symbol fails -- and i could swear it already worked some time before (when i was deleting clueless some code for debugging)
JZTech101 has joined #ruby
amacgregor has quit [Ping timeout: 260 seconds]
cyong has joined #ruby
iliketurtles has joined #ruby
matchaw has quit [Ping timeout: 264 seconds]
[narcan] has quit [Quit: -[AppDelegate installMalware]: unrecognized selector sent to instance 0x156109c0]
<bnagy> that's actually much more like your code
matchaw has joined #ruby
<bnagy> you can use the Matrix class in ruby, it has a transpose
fredjean has joined #ruby
PhatBaja has quit [Ping timeout: 245 seconds]
<Pandee> does SciTE not come with the ruby installer anymore?
<ian__> yeah
<ian__> sorry, I didn't get you a great link
luckyruby has quit [Remote host closed the connection]
smathieu has joined #ruby
<bnagy> ian__: but you're still not doing it right afaict
<bnagy> delta <- t(X) %*% error / length(y)
<bnagy> you're not dividing through by vector length anywhere
<ian__> oh yeah, yeah I couldn't figure out why that was needed
nbouscal has joined #ruby
<ian__> like, you could have 1/m right
<ian__> but that doesn't seem to help it converge
[narcan] has joined #ruby
<ian__> so I got rid of it
<bnagy> ok well I have no idea what your code is actually doing :)
<bnagy> I can understand the two R links now though
[narcan] has quit [Read error: Connection reset by peer]
gazarsgo has quit [Quit: gazarsgo]
DrShoggoth has quit [Quit: Leaving]
blip99 has quit [Ping timeout: 264 seconds]
sdegutis has quit [Remote host closed the connection]
tyman has joined #ruby
<Pandee> is aptana a decent ide for ruby beginners?
<zendeavor> do you use a power-editor of any kind already
<Pandee> for ruby, no
<zendeavor> for anything.
<bnagy> augh double negative
<Pandee> i was trying to use vim before my linux crashed
<zendeavor> it it doesn't feel like too much of a cognitive load, i would recommend taking vim or emacs seriously
<bnagy> ian__: augh you have a double negative.. that's why it.. augh
<havenwood> Sublime Text 2 is a nice cross-platform option if you aren't in the mood for an emacs/vim plunge.
<bnagy> <3 ST2
<Pandee> i plan on using vim after i get a good grasp on ruby
<havenwood> I don't use Sublime, but saw ST3 is out.
<havenwood> ST3 beta**
smathieu has quit [Ping timeout: 268 seconds]
<zendeavor> was about to say, alternatives include sublime text or textmate as well
<pontiki> subl2 has the great advantage of not needing much of a learning curve to get to some deviously clever bits
<Pandee> i'll check that one out, haven thx
<pontiki> but i stick with emacs
<bnagy> Pandee: don't use vim
<havenwood> Pandee: Are you on Windows or OS X?
<ian__> lol I'm sorry
<bnagy> I mean, I love vim, I have used it for 20 years
<Pandee> currently windows, but when i get back home from work it'll be linux/windows
<havenwood> Pandee: TextMate 2 if fantastic if your on OS X.
<havenwood> Pandee: Ah, then yeah ST2/3.
<zendeavor> vim is...a debatable choice, when you realise how poorly it *groks* code
<bnagy> but I can't see any reason for new programmers to learn it unless they want to spend a lot of time editing via ssh sessions
<Pandee> bnagy: yea, when i was learning python, i ended up having to learn linux, and then vim. It was quite a bit all at oncec
devoldmx3 has joined #ruby
n_blownapart has quit [Remote host closed the connection]
<zendeavor> that's a strange thing to say
<zendeavor> nothing about python requires linux or vim
<Pandee> well, as a programmer i figured that learning to develop in a linux environment was a smart change
<zendeavor> python for windows even comes with a sort-of IDE
<bnagy> ian__: seriously.. I just don't think your code is going to work
<Pandee> especially for django, getting that to work on windows isn't very easy
<ian__> bnagy, but it does
<zendeavor> well, i wouldn't recommend doing any devel on windows...ever
<bnagy> ian__: well one number gets bigger
<zendeavor> but you migth say i'm biased.
grillermo has joined #ruby
<bnagy> but that's not the same thing
<ian__> I'm going to implement an algorithm tomorrow for multiple variables
<ian__> like, more than m and b
<bnagy> why is b getting bigger, if it starts at 0 and you say it should converge at 0?
<Pandee> heh, i think that's the general consensus
<ian__> as many as you want sort of thing
Megtastique has joined #ruby
<Pandee> a lot of tutorials just assume you're on linux
Senjai has quit [Read error: Operation timed out]
<zendeavor> those who are born and bred on windows are equally vehement
<ian__> bnagy, it overshoots then reconverges
devoldmx27 has joined #ruby
<ian__> it's a terrible data set
<ian__> I should have chosen one that forced there to be error
<havenwood> Pandee: At least assume your on some posix system, either Linux, OS X, BSD, whatev other than Windows.
<zendeavor> erm, bsd isn't posix
<zendeavor> linux isn't posix either
<zendeavor> they just happen to mostly agree with posix, but both explicitly avoid full posix adherence
devoldmx has quit [Ping timeout: 264 seconds]
<havenwood> zendeavor: OS X is :P http://www.opengroup.org/homepage-items/c987.html
<zendeavor> yes i know osx is, but ehhhh
devoldmx3 has quit [Ping timeout: 246 seconds]
<zendeavor> i think it's more for showboating than anything.
<bnagy> ian__: ok, well whatever, just saying, your code is not linear regression by gradient descent
<bnagy> I don't know what it is, but it's not that
<havenwood> posix-ish
<havenwood> posixy
<bnagy> so I guess something's going to break for you later :/
<ian__> one sec I'll show you latest
<Pandee> I'm currently trying to lobby my wife into getting a mac so i can use it for dev
<zendeavor> Pandee: i'd recommend a power-editor, any power-editor, before you ever use an IDE of any kind
<zendeavor> i <3 text-objects so i use vim.
<zendeavor> it sucks though
<zendeavor> super hard.
grillermo has quit [Ping timeout: 264 seconds]
<ian__> bnagy, if you implement this then awesome sauce http://pastie.org/8192229
endash has joined #ruby
<Pandee> im downloading sublime text at the moment
sailias has quit [Ping timeout: 256 seconds]
rbento has joined #ruby
rbento has quit [Max SendQ exceeded]
<zendeavor> i want to learn emacs but i'd feel dirty using evil-mode
benlieb has joined #ruby
<zendeavor> the finger-gymnastics required to navigate code is just such a drain though
<ian__> I like to use vim to clean the sink
<zendeavor> ...
axeman- has joined #ruby
x1337807x has joined #ruby
nbouscal has quit [Ping timeout: 246 seconds]
x1337807x has quit [Client Quit]
[narcan] has joined #ruby
<bnagy> ian__: you could straightline port that second link I posted
rickmasta has joined #ruby
<ian__> I'm happy with my creation
tyman has quit [Ping timeout: 264 seconds]
<zendeavor> that's a poor attitude, when it's been noted that your implementation isn't actually accurate
<zendeavor> known as complacency
<ian__> but my creation works!
<zendeavor> fsvo works
<zendeavor> this is why so many shell scripts are such garbage
<zendeavor> Works For Me™
<ian__> lol
<bnagy> ian__: how does it work? the data you have has a slope of exactly 2 with no error
<bnagy> it should return precisely 2 for that data
<ian__> because the slope hasn't fully converged after 500 interations I rounded to one decimal place
sergiocampama has quit [Quit: sergiocampama]
<bnagy> hahah
<bnagy> seriously, your code doesn't do what you think it does
<ian__> yeah it does
mahmoudimus has joined #ruby
<ian__> it converges very unbeautifully
<ian__> but it still conveges
<[narcan]> is there a way of running resque standalone without rake, cant figure out how to get rake to stop supressing errors
<ian__> and to the right value
<bnagy> did you test some different data?
<ian__> using the gradient descent algorithm that I intended to implement
<ian__> I'll do that right now
<ian__> the problem is I need a data set that I know the right answer to
jmimi has joined #ruby
eldariof has joined #ruby
henn has joined #ruby
henn has joined #ruby
henn has quit [Changing host]
<zendeavor> get a good old fashioned pen, a few sheets of paper, and figure it out.
<zendeavor> you really don't need to know the "right answer," just the mathematical relationships.
<[narcan]> how come the examples for resque just flat out down work, frustrating :/
<zendeavor> if you're lacking that understanding, you shouldn't be surprised that you find an algorithm difficult to implement
rbento has joined #ruby
rbento has quit [Max SendQ exceeded]
<ian__> it works with other data sets too
yacks has quit [Quit: Leaving]
rbento has joined #ruby
rbento has quit [Max SendQ exceeded]
mootpointer has joined #ruby
huoxito has joined #ruby
<ian__> I need to know what the values m and b should converge to
<ian__> for the test data sets
<zendeavor> mhm.
<ian__> I know the math
<ian__> not very good at articulating myself
<ian__> but I can do the partial derivatives
<ian__> I got the overall gradient descent right
rbento has joined #ruby
<ian__> my problem was I didn't put in an alpha value that caused the values to overshoot instead of converge
setient has joined #ruby
<bnagy> ian__: ok, first up, try making your vectors longer
smathieu_ has joined #ruby
krz has joined #ruby
Kruppe has quit [Remote host closed the connection]
emilevictor has quit [Quit: emilevictor]
<bnagy> I'm testing your code for you :)
<ian__> I naively thought an alpha value of 1 would work by default
sdegutis has joined #ruby
Mars` has quit [Ping timeout: 256 seconds]
<bnagy> eg if I try with 100 point, it just dies
<ian__> dies?
<bnagy> The linear equation that best fits the data is approximately y = NaNx + NaN
osvico has quit [Read error: Connection reset by peer]
io_syl has joined #ruby
Lewix has joined #ruby
tgunr has joined #ruby
axeman- has quit [Remote host closed the connection]
<ian__> oh yeah lol
<ian__> uggh
<ian__> it's doing that for arrays of 20
<ian__> aww
pupoque_ has quit [Read error: Connection reset by peer]
smathieu_ has quit [Ping timeout: 245 seconds]
pupoque_ has joined #ruby
<bnagy> btw for trivial examples you can just have y be x scaled by whatever
iliketurtles has quit [Quit: zzzzz…..]
zdiN0bot has joined #ruby
TIJ has quit [Ping timeout: 256 seconds]
ehaliewicz has quit [Remote host closed the connection]
ananthakumaran has joined #ruby
asgardBSD has quit [Remote host closed the connection]
matchaw has quit [Read error: Connection reset by peer]
Lewix has quit [Remote host closed the connection]
<ian__> hmm, it seems to work if I adjust the step value
<ian__> but yeah that's really lame
Lewix has joined #ruby
Lewix has joined #ruby
Lewix has quit [Changing host]
<ian__> the step value has to be very precise
<ian__> which shouldn't be the case
ntus1017 has quit [Remote host closed the connection]
Lewix has quit [Read error: Connection reset by peer]
Lewix has joined #ruby
kaspergrubbe has joined #ruby
<bnagy> yep
matchaw has joined #ruby
fridim_ has joined #ruby
nadirvar_ has quit [Quit: Computer has gone to sleep.]
<bnagy> it's doing _something_
osvico has joined #ruby
sayan has quit [Quit: Leaving]
<bnagy> like for short arrays it yields a not-insane slope and intercept
<ian__> well no it's converging at the right value if the step function is right
<ian__> and the longer the array the more precise the step value has to be
<bnagy> ian__: try @x_values = (1..10);@y_values = (1..10).map {|e| e*5 + 5}
<bnagy> that should yield 5 and 5
<bnagy> which it more or less does for very short sets
sayan has joined #ruby
<bnagy> once that's working you can add some "noise"
<bnagy> like add +-20% of e*5
<bnagy> you should still get a nice linear regression, especially with more points
<bnagy> but I urge you to reread the real algorithm
ssvo has quit [Ping timeout: 268 seconds]
kaspergrubbe has quit [Ping timeout: 256 seconds]
pjeide has quit [Ping timeout: 264 seconds]
SirFunk has joined #ruby
Mars` has joined #ruby
h4mz1d has joined #ruby
<Pandee> how is ruby in steel?
<ian__> uggh, bnagy doesn't work so well
<ian__> I don't understand why
Megtastique has quit [Quit: Megtastique]
<zendeavor> investigate it before bnagy does it for you
<zendeavor> and defeats the purpose of the exercise
<bnagy> ian__: srsly, start porting that second link
<ian__> ok
<havenwood> Pandee: Most Rubyists don't use an IDE (just a nice text editor and the command line), but only one I've actually ever seen used is RubyMine.
<bnagy> you keep saying 'partial derivative' .. but you're not really taking one properly
bdd_newbie has joined #ruby
<bnagy> like it's supposed to be with respect to a cost function, which is the error rate along the 'guessed' curve and the real data
<Pandee> havenwood: how do rubyists test their program as they go?
PhatBaja has joined #ruby
<bdd_newbie> can Net::FTP negotiate a secure connection?
<Pandee> havenwood: i thought the official python ide was very useful because you can test as you go
<sevenseacat> Pandee: is that a trick question
adman65 has joined #ruby
<Pandee> not at all
<bnagy> but you don't have a cost function.. tbh I can see your code works but I don't understand how :P
<sevenseacat> we write tests, and run them.
<havenwood> Pandee: So like in TextMate 2 I can do a keystroke and either run my code or a line of it or smart get results where i want them. Not a stupid text editor.
<sevenseacat> test driven development, usually.
GeissT has quit [Quit: MillBroChat AdIRC User]
<bdd_newbie> how can I develop a simple secure ftp client
<havenwood> Pandee: I don't think ST2/3 has a repl built in, but there is a well-supported addon.
<bnagy> well, not curve. Line.
axeman- has joined #ruby
<ian__> but I have a cost function
<havenwood> Pandee: Also yeah, TDD. Minitest is built in to Ruby, you run the command line test from your editor or within your editor.
<Pandee> havenwood: yea, i saw it doesn't. The addon is installed through a git command. I haven't learned git yet, so i was a little bummed on that
ahawkins has quit [Ping timeout: 264 seconds]
<Mars`> does anyone have any experience with jabber?
<havenwood> Pandee: You can use the Package Controller from inside Sublime. I am only vaguely familiar.
nbouscal has joined #ruby
ewnd9 has quit [Ping timeout: 268 seconds]
<Pandee> oh okay
<havenwood> Pandee: Once you install that Package Controller thingy, you install your packages with that.
<havenwood> Pandee: A Sublime user might know better. :P
PhatBaja has quit [Ping timeout: 245 seconds]
kobain has quit [Quit: El motor por excelencia http://www.europio.org/]
GeissT has joined #ruby
doggfrank has joined #ruby
<pontiki> pandee, i typically use guard, with guard-rspec and guard-cucumber, so any changes i make in either tests or code are tested on the fly
<ian__> bnagy, the cost function is SUM(y - y_est)^2
tonini has joined #ruby
<ian__> which is SUM(y - (mx + b))^2
<havenwood> pontiki: Nice, haven't tried Guard but watching for filesystem changes to run tests sounds like a really neat idea.
mary5030 has quit [Remote host closed the connection]
<ian__> I need partial derivatives with respect to m and b
<Pandee> thx for the help havenwood. So Guard is an add-on for sublime text?
<havenwood> Pandee: Nope, a general tool.
<bnagy> ian__: yeah, should be divided through by the length, and you're not squaring
<bnagy> ok I see why your code works at all now
ssvo has joined #ruby
<ian__> yes I should do 1/mSUM(y - (mx+b))^2
<havenwood> Pandee: It triggers something being run when code changes: https://github.com/guard/guard#readme
<sevenseacat> guard is a good tool.
<ian__> I don't need the cost function to be defined in the code
<sevenseacat> i keep it running in a terminal while developing
<ian__> I just need the partial derivatives which i hate
<ian__> have
<bnagy> ian__: you really should, it would make it a lot easier
<Pandee> i see, nice. that's exactly what im lookin for
<ian__> alright I will
ericmathison has joined #ruby
codeski has quit [Ping timeout: 268 seconds]
<Pandee> i definitely miss using linux where all you do is just apt-get install guard, or something like that !
<sevenseacat> well guard is a gem, so its just gem install guard
<zendeavor> gem install guard from where in windows?
<havenwood> Pandee: Take 15 min and learn git basics (will serve you well): http://try.github.io/levels/1/challenges/1
amacgregor_ has quit [Ping timeout: 260 seconds]
<sevenseacat> ew, windows.... from a command line prompt with ruby installed and loaded
tomzx_mac has quit [Ping timeout: 246 seconds]
nadirvar_ has joined #ruby
<Pandee> havenwood: i think it is time for the git initiation yes
<bnagy> ian__: when I simplify your sum_m func it's sum -= (y - m*x - b)*x
<bnagy> based on what you say I think you want **2 not *x
bluOxigen has joined #ruby
<zendeavor> Pandee: might as well just get back to linux nd not break it this time
<bnagy> ... but that doesn't work
<Pandee> zendeavor: yea, can't wait to
<pontiki> vagrant
<pontiki> haha, havenwood and i are on the same wavelength
<sevenseacat> i didnt like vagrant when i tried it
sdegutis has left #ruby [#ruby]
<ian__> bnagy, the sum_m is using the partial derivative with respect to m
<ian__> and sum_b is using the partial derivative with respect to b
<zendeavor> it won't hurt to familiarize yourself with the environment for a couple weeks, then dig into development
k0rupted has joined #ruby
k0rupted_ has joined #ruby
<zendeavor> Pandee:
pjeide has joined #ruby
JZTech101 has quit [Quit: Bye]
arielo has joined #ruby
pjeide has joined #ruby
pjeide has quit [Changing host]
<bnagy> ian__: I was just saying that's exactly what your code does, which doesn't seem right
<Pandee> ah, vagrant is for virtual linuxx
<bnagy> I just simplified the pair[0] stuff
<havenwood> Pandee: ya, just command line
<havenwood> Pandee: No GUI
<Pandee> ah
arielo has quit [Remote host closed the connection]
m104 has quit [Quit: brb]
whowantstolivefo has quit [Read error: Connection reset by peer]
<ian__> bnagy, I'm going to rewrite with your suggestions
whowantstolivefo has joined #ruby
<RubyPanther> I use linux but not apt, and the gui emacs but also 17 xterms
<havenwood> RubyPanther: distro?
<RubyPanther> fedora
<havenwood> i've been enjoying Fedora 19
h4mz1d has quit [Ping timeout: 277 seconds]
<zendeavor> arch for life <3
<havenwood> RubyPanther: but no apt :O
<RubyPanther> the distro formerly known as redhat linux
<Pandee> with vagrant you can still install programs and they'll be there when you bring it up again?
<sevenseacat> yes.
<RubyPanther> slackware is more fun, but fedora is more server-friendly
<havenwood> Pandee: yes
<Pandee> that's brilliant
<havenwood> Pandee: Then you can save your virtualized setup as a 'box' to distribute to others or yourself.
<havenwood> Pandee: With whole dev environ ready to go.
<havenwood> Pandee: (It uses VirtualBox.)
<RubyPanther> you'll be living in the future
<Pandee> i see
<havenwood> ... in the distant future ...
raddazong has quit [Changing host]
raddazong has joined #ruby
raddazong is now known as madhatter
<havenwood> Pandee: http://www.vagrantbox.es/
osvico has quit [Ping timeout: 245 seconds]
<havenwood> Pandee: Good list of base boxes ^
m104 has joined #ruby
anderson has joined #ruby
arielo has joined #ruby
<Pandee> So a 'box' is server space somewhere that somebody else can connect to, to see your work
<Pandee> and saves your work remotely
<havenwood> no, they just took the term 'box' from VirtualBox
Mattix has quit [Read error: Connection reset by peer]
<Wasp> can pass a (boolean) hash to condition statment somehow easy?
<pontiki> a "base box" is a starting point you build up your virtual machine in
Mattix has joined #ruby
<Pandee> oh ok
<pontiki> where it lives is rather irrelevant
<Pandee> so a base box is your environment basically
<pontiki> yes
<Wasp> what i suspect: a = (1 = true; 2 = true} ; puts "yo" if a ;
<ian__> bnagy, almost done, I'm hoping this is more readable
arielo has quit []
<ian__> I've explained my steps
<pontiki> and with vagrant, you can build this up to how you might want it for all new development, and then save that as a box
<pontiki> and spool up new instances off that
arielo has joined #ruby
thepumpkin has quit [Ping timeout: 268 seconds]
<Wasp> the funny thing is: my code will work, but returns true (or in my case "yo") even when one item is false
<havenwood> Wasp: The code you pasted is kinda nonsensical.
<pontiki> Wasp: a will always be truthy in that case
<havenwood> Wasp: You can't set the value of 1 and 2. Open a ( and close a }. If `a` is anything but false or nil it is true.
<pontiki> >> a = Hash.new ; puts "yo" if a
<eval-in> pontiki => yo ... (https://eval.in/39876)
<havenwood> Wasp: Are some of those ='s meant to be =='s? I'm confused.
iliketurtles has joined #ruby
<Pandee> thx all for the help, its pretty interesting discovering all these new technologies, good night
emilevictor has joined #ruby
becky_ has quit [Read error: Operation timed out]
`Chris` has quit [Read error: No route to host]
`Chris` has joined #ruby
arielo has quit [Remote host closed the connection]
ewnd9 has joined #ruby
apeiros has joined #ruby
stuartrexking has quit [Quit: Linkinus - http://linkinus.com]
axeman- has quit [Ping timeout: 264 seconds]
sleetdrop has joined #ruby
axeman- has joined #ruby
eldariof has quit [Ping timeout: 264 seconds]
<Wasp> havenwood: sry, yes, ment to be :)
<Wasp> ment to be: a = Hash.new(false) ; puts "all elem. are true" if a
RORgasm has joined #ruby
<havenwood> Wasp: Ah, that is asking truthiness of hash itself (always true) not its default value (false).
<Wasp> as like as you noticed: evalutes to true nevertheless one hash is false
<havenwood> >> a = Hash.new(false)[:anything] ; puts "all elem. are true" if a
<eval-in> havenwood => nil (https://eval.in/39879)
ninegrid has quit [Remote host closed the connection]
<havenwood> Wasp: Ask the truthiness of a key of the hash, if the key isn't found it'll be falsy.
<havenwood> Wasp: But that is the case whether you define a default or not. (Since `nil` if the default default.)
smathieu has joined #ruby
<Wasp> default default ^^
<havenwood> Wasp: nil is only returned there ^ cause of #puts, a is false
<havenwood> s/if/is
dhruvasagar has joined #ruby
nadirvar_ has quit [Quit: Computer has gone to sleep.]
ninegrid has joined #ruby
ssvo has quit [Ping timeout: 246 seconds]
RORgasm has quit [Ping timeout: 256 seconds]
nbouscal has quit [Quit: Computer has commenced electric sheep tracking protocol.]
<havenwood> >> Hash.new(false)[:anything]
<eval-in> havenwood => false (https://eval.in/39884)
<havenwood> >> {}[:anything]
<eval-in> havenwood => nil (https://eval.in/39886)
LiquidInsect has quit [Read error: Connection reset by peer]
smathieu has quit [Ping timeout: 256 seconds]
<Wasp> what i expect is false ( = here: no output)
<havenwood> Wasp: a is the hash
wallerdev has quit [Quit: wallerdev]
<havenwood> Wasp: hashes are true
<Wasp> okay, what is the simplest way to archive my obvious goal?
<havenwood> Wasp: An idiom to check truthiness is to prefix two !!'s, so:
<havenwood> >> []
<eval-in> havenwood => [] (https://eval.in/39889)
<havenwood> >> !![]
<eval-in> havenwood => true (https://eval.in/39890)
<havenwood> >> !!Array.new(false)
<eval-in> havenwood => no implicit conversion of false into Integer (TypeError) ... (https://eval.in/39891)
zdiN0bot has left #ruby [#ruby]
Solnse has joined #ruby
baroquebobcat has joined #ruby
<havenwood> Wasp: Point is, even if all the Hash's key/value pairs are false or nil, the Hash is true.
<havenwood> key/value pair values**
<havenwood> This is true: {first: false, second: false}
LiquidInsect has joined #ruby
banghouse has quit [Remote host closed the connection]
<havenwood> Wasp: Are you trying to return false if any value is falsey? Or if the last set value is falsey? Cause Hashes aren't false.
<Wasp> what i try to archive as most as simple and coastless is false if one or more values of the hash are falsy
npulse has quit [Quit: Lost terminal]
<Wasp> what i got so far is: https://eval.in/39900 .. but doesn't looks much effevtive to me
<havenwood> puts 'fail' if a.values.any { |value| value == false }
<ian__> bnagy, this is an updated version, it doesn't work, but I've gone through every step
<havenwood> any?**
mootpointer has quit [Read error: Connection reset by peer]
huoxito has quit [Quit: Leaving]
<Wasp> havenwood: okay thats what i have already too, so there is no simple operation/operator for that common(?) operation?
intuxicated has joined #ruby
<havenwood> Wasp: I wanna stop spamming eval but one last:
<havenwood> >> >> a = Hash.new(false); a[:x] = true; a[:y] = false; puts 'found a falsey' if a.values.any? { |value| !value }
<eval-in> havenwood => /tmp/execpad-862d083ccc01/source-862d083ccc01:2: syntax error, unexpected >> ... (https://eval.in/39902)
<havenwood> >> a = Hash.new(false); a[:x] = true; a[:y] = false; puts 'found a falsey' if a.values.any? { |value| !value }
<eval-in> havenwood => found a falsey ... (https://eval.in/39903)
<Wasp> i have no problem with it ;)
<havenwood> Wasp: Yeah, default means the default value returned when you ask for a key from that hash that does not exist.
<Wasp> okay "any?" sounds more effective then "all?" :) .. hopefully it is implemented as you would suspect it :)
<havenwood> Wasp: #all? makes sense there
<apeiros> they're both the same efficient
<Wasp> "def any ; return !all end" ;)
<Wasp> apeiros: do you know the implementation?
jsummerfield has joined #ruby
<apeiros> Wasp: both iterate all values, but short-cut if they can
ninegrid has quit [Quit: brb]
<Wasp> "all?" HAS to check for all entries while any can break on first hit
<apeiros> that is: all? short-cuts on the first which "is not", any? short-cuts on the first which "is"
<apeiros> Wasp: nonsense
<apeiros> all? can short-cut the same. it's just opposite in which case it can short-cut.
<havenwood> Wasp: When it finds the first false, they aren't *all* true. :P
d2dchat has joined #ruby
saarinen has quit [Quit: saarinen]
* Wasp meant for the intention ; per se my assertion is wrong indeed
PhatBaja has joined #ruby
thesheff17 has quit [Ping timeout: 260 seconds]
<Wasp> oh
<Wasp> even for my intetion my assertion is wrong, your right :)
<havenwood> {aim: true}.all? { |e| e } versus {aim: true}.any? { |e| !e }
<havenwood> oops, forgot the .values.
<apeiros> if you don't want to iterate, don't use hash-values to store the relevant values
fgo has joined #ruby
<Wasp> but?
<havenwood> Wasp: Oh, i'm adding superfluous blocks too, i'm tired.
<Wasp> @ apeiros
<apeiros> depends on what you do. I don't know what you use the keys for.
DanielRb has quit [Remote host closed the connection]
avril14th has quit [Remote host closed the connection]
<havenwood> Wasp: This should suffice for your values truthiness check: a.values.all?
<apeiros> if all you're interested in is whether you ever have a false value stored, all you need is a flag.
<havenwood> no need for { |e| e }
<Wasp> havenwood: me too, should go to bed, it is already morning (again) but like to kill the sludges in level 6 more "cool" ;)
endash has quit [Quit: endash]
DanielRb has joined #ruby
<apeiros> if your values per key can change from true to false and back, then it gets more complex.
<havenwood> Nice they made block optional on #all? and friends. :D
<Wasp> .. its more complex :)
<apeiros> anyway, main question is: do you prematurely optimize?
PhatBaja has quit [Ping timeout: 245 seconds]
<Wasp> of cause i do :)
<Wasp> there is a complte tower of sludges, thick sludges and archers to kill :D
warren has left #ruby ["Leaving"]
* Wasp is talking about ruby warrior
<zendeavor> you're supposed to explore the language on your own for that, really
<zendeavor> kinda the point
nadirvar_ has joined #ruby
<Wasp> zendeavor: i do, just wondering about some point?
<havenwood> Well, you'll need some Erlang-like concurrency for RubyWarrior so checkout Celluloid, and maybe pass it through some Go-like channels so look at Agent.
<havenwood> Need to pull out the big guns fer snake killen!
<apeiros> inline assembler
<havenwood> yes, that too!
<apeiros> neverdie
<Wasp> are you serious?! there is something else on that topic? :)
<Wasp> was googling for perl warrior (and friends) but nothing found
<havenwood> need speed for when we scale to RubyGlobalBattle
<apeiros> enterprise ruby (not to confuse with ruby enterprise edition)
<havenwood> RubyEnterpriseWarrior (in XML of course)
<havenwood> Wasp: I think Ryan Bates made it from scratch. Hadn't seen much of it till the new gui wrapper came out lately and it resurged. Fun stuff.
nadirvar_ has quit [Read error: Connection reset by peer]
TIJ has joined #ruby
ninegrid has joined #ruby
<Wasp> ehm, what do you mean by erlang? do you mean the ericsson (computer) language?
<havenwood> Wasp: I was just jesting, but yeah.
mootpointer has joined #ruby
<popl> erlang is neat
<havenwood> Wasp: http://celluloid.io/
<Wasp> i realy like functional languages
ananthakumaran has quit [Ping timeout: 245 seconds]
<havenwood> Wasp: Elixir seems lovely.
<popl> I had to do something in Erlang for school before. That was really fun.
tagrudev has joined #ruby
<havenwood> popl: Looked at Elixir yet?
<popl> No I haven't.
<Wasp> .. ah nice, was still stuck with camera "film" and ruby stuff named celluloid too
<Wasp> :)
<havenwood> Seems Jose Valim is kicking ass with it.
<havenwood> popl: I really dig some of the concepts
<popl> I just looked it up on Wikipedia, hah. :)
benlieb has quit [Quit: benlieb]
<popl> I will read about it, thanks.
<popl> oh, built on beam
<popl> neat
<Wasp> okay, but celluloid isn't erlang, isnt it?
<havenwood> popl: I like the whole arity method thing. Yeah, apparently native fast too.
<Wasp> its just a framework for ruby
<havenwood> Wasp: It is Erlang-like Actor model for Ruby. Quite sophisticated to the point that some stuff might be ported back upstream.
soup_ has joined #ruby
<havenwood> Wasp: It is a Ruby gem.
<popl> hey thanks, havenwood
<Wasp> too bad
<havenwood> popl: No prob, i want to learn more elixir. Was having a ton of fun exploring in the repl.
<Wasp> would be interested in some similar "game" as like as ruby warrior for another language than ruby
sayan has quit [Ping timeout: 268 seconds]
sleetdrop has quit [Quit: Textual IRC Client: www.textualapp.com]
amacgregor has joined #ruby
<popl> elixir syntax reminds me of ruby :P
_anildigital is now known as anildigital
<havenwood> popl: Authored by Jose Valim, a Rubyist!
<popl> ah
<popl> INBREEDING
<popl> :)
<havenwood> hehe
apeiros has quit [Remote host closed the connection]
rickmasta has quit [Quit: Leaving...]
serp` has joined #ruby
ckrailo has quit [Quit: Computer has gone to sleep.]
fridim_ has quit [Ping timeout: 260 seconds]
Megtastique has joined #ruby
pygospa has quit [Disconnected by services]
pygospa has joined #ruby
Zolo has quit [Remote host closed the connection]
henn has quit [Quit: Leaving]
avril14th has joined #ruby
dawkirst has quit [Ping timeout: 245 seconds]
soup__ has joined #ruby
pygospa has quit [Disconnected by services]
pygospa has joined #ruby
darth_chatri has joined #ruby
ananthakumaran has joined #ruby
iliketurtles has quit [Quit: zzzzz…..]
soup_ has quit [Quit: soup_]
timonv has joined #ruby
Megtastique has quit [Quit: Megtastique]
browndawg has joined #ruby
soup__ has left #ruby [#ruby]
noyb has joined #ruby
guns has joined #ruby
decoponio has joined #ruby
pygospa has quit [Disconnected by services]
TheRealPygo has joined #ruby
dagobah has joined #ruby
hitesh has joined #ruby
optimusprimem has quit [Ping timeout: 245 seconds]
timonv has quit [Remote host closed the connection]
dawkirst has joined #ruby
danman has quit [Quit: danman]
eoinkelly has joined #ruby
optimusprimem has joined #ruby
smathieu has joined #ruby
gstamp has quit [Quit: Computer has gone to sleep.]
vlad_starkov has joined #ruby
pranny has joined #ruby
dmiller has quit [Remote host closed the connection]
optimusprimem has quit [Excess Flood]
m104 has quit [Quit: bye]
smathieu has quit [Ping timeout: 264 seconds]
eoinkelly has quit [Quit: eoinkelly]
optimusprimem has joined #ruby
kaspergrubbe has joined #ruby
fgo has quit [Remote host closed the connection]
mootpointer has quit [Quit: Computer has gone to sleep.]
gstamp has joined #ruby
yfeldblum has quit [Ping timeout: 256 seconds]
fgo has joined #ruby
kaspergrubbe has quit [Ping timeout: 264 seconds]
saintcajetan has quit [Remote host closed the connection]
optimusprimem has quit [Ping timeout: 245 seconds]
workmad3 has joined #ruby
noop has joined #ruby
optimusprimem has joined #ruby
echevemaster has quit [Quit: Leaving]
tonini has quit [Remote host closed the connection]
iliketurtles has joined #ruby
zoee has joined #ruby
pjeide` has joined #ruby
ebanoid has joined #ruby
optimusprimem has quit [Ping timeout: 245 seconds]
pjeide has quit [Disconnected by services]
workmad3 has quit [Ping timeout: 246 seconds]
vlad_starkov has quit [Remote host closed the connection]
pjeide` has left #ruby [#ruby]
bluOxigen has quit [Remote host closed the connection]
sayan has joined #ruby
pjeide has joined #ruby
sayan has quit [Read error: Connection reset by peer]
sayan has joined #ruby
noyb has quit [Ping timeout: 246 seconds]
andikr has joined #ruby
graydot has joined #ruby
tonini has joined #ruby
saarinen has joined #ruby
apeiros has joined #ruby
tms has joined #ruby
havenwood has quit [Remote host closed the connection]
neonlex has joined #ruby
Yakko has quit [Quit: No Ping reply in 180 seconds.]
dmiller has joined #ruby
Yakko has joined #ruby
ericmathison has quit [Quit: leaving]
krainboltgreene has joined #ruby
tyman has joined #ruby
emilevictor has quit [Quit: emilevictor]
cyong has quit [Quit: Leaving.]
axeman- has quit [Ping timeout: 256 seconds]
axeman- has joined #ruby
aganov has joined #ruby
Kar- has joined #ruby
zeotron has joined #ruby
tommyvyo has quit [Quit:]
xcv has joined #ruby
dmiller has quit [Ping timeout: 260 seconds]
AntelopeSalad_ has joined #ruby
browndawg has quit [Ping timeout: 246 seconds]
bearwithclaws has joined #ruby
AntelopeSalad has quit [Ping timeout: 252 seconds]
poseid has joined #ruby
<poseid> morning
yshh has quit [Remote host closed the connection]
<poseid> anyone has a quick example of rounding errors with float, that can be resolved with decimal?
zeotron has quit [Remote host closed the connection]
bearwithclaws has left #ruby [#ruby]
iliketurtles has quit [Quit: zzzzz…..]
<sevenseacat> ive seen a lot over time, but none i havent resolved a long time ago.
<sevenseacat> anything involving calculations on things with more than two or three DP
bzitzow has joined #ruby
krz has quit [Ping timeout: 260 seconds]
ejnahc has quit [Remote host closed the connection]
arya_ has quit [Ping timeout: 268 seconds]
ejnahc has joined #ruby
codecop has joined #ruby
_droid has joined #ruby
baroquebobcat has quit [Quit: baroquebobcat]
TacitBlue has joined #ruby
<_droid> hi people, i'm tryin to install ruby 2.0.0 on my kubuntu system, with shell script from chruby and in around the end I get this error message:
<_droid> "Read error at byte 2587393 (Connection reset by peer).!!! Download of https://github.com/rubinius/rubinius/archive/release-2.0.0-rc1.tar.gz failed!"
<_droid> Can someone help?
<poseid> ok, thanks, I will play around
baroquebobcat has joined #ruby
bluOxigen has joined #ruby
popl has quit [Quit: We must make an idol of our fear, and call it God.]
optimusprimem has joined #ruby
optimusprimem has joined #ruby
optimusprimem has quit [Changing host]
`Chris` has quit [Remote host closed the connection]
postmodern has quit [Ping timeout: 264 seconds]
<_droid> anyone?
apakatt has joined #ruby
guns has quit [Quit: guns]
RORgasm has joined #ruby
apakatt_ has joined #ruby
optimusprimem has quit [Ping timeout: 245 seconds]
apakatt has quit [Read error: Connection reset by peer]
postmodern has joined #ruby
baroquebobcat has quit [Quit: baroquebobcat]
smathieu has joined #ruby
io_syl has quit [Quit: io_syl]
axeman- has quit [Read error: Connection reset by peer]
BrianJ has quit [Quit: Computer has gone to sleep.]
Domon has quit [Remote host closed the connection]
Gooder` has quit [Ping timeout: 264 seconds]
Gooder has joined #ruby
axeman- has joined #ruby
blaxter has joined #ruby
baroquebobcat has joined #ruby
ewnd9 has quit [Read error: Operation timed out]
RORgasm has quit [Ping timeout: 264 seconds]
kaspergrubbe has joined #ruby
<Crawford> _droid: does it happen every time you try doing it?
vikhyat_ has quit [Remote host closed the connection]
stayarrr has joined #ruby
stayarrr has quit [Client Quit]
<_droid> Crawford: im trying it right now for the 3rd time, it runs through all the revriously processed steps but then tries to download that tar.gz file for a minute or 2 then stops
serp` has quit [Ping timeout: 268 seconds]
kaspergrubbe has quit [Remote host closed the connection]
stayarrr has joined #ruby
heftig has joined #ruby
ewnd9 has joined #ruby
vikhyat has joined #ruby
<_droid> Crawford: and now it tells me this:
<_droid> Read error at byte 2587393 (Connection reset by peer).!!! Download of https://github.com/rubinius/rubinius/archive/release-2.0.0-rc1.tar.gz failed!
smathieu has quit [Ping timeout: 264 seconds]
<_droid> Crawford: i mean this:
<_droid> mv: cannot move `/usr/local/src/jruby-1.7.4' to `/opt/rubies/jruby-1.7.4/jruby-1.7.4': Directory not empty
<_droid> !!! Installation of jruby 1.7.4 failed!
stoffus has joined #ruby
axeman- has quit [Ping timeout: 246 seconds]
stayarrr has quit [Client Quit]
<canton7> looks like it's already installed there
dash_ has joined #ruby
<_droid> canton7: the funny thing is that it is kinda nested
axeman- has joined #ruby
<_droid> canton7: should I delete the jruby-1.7.4 folder and try it again?
<Crawford> i've got no clue
danman has joined #ruby
DrCode has quit [Ping timeout: 240 seconds]
luckyruby has joined #ruby
postmodern has quit [Ping timeout: 245 seconds]
_Andres has joined #ruby
danman has quit [Ping timeout: 245 seconds]
optimusprimem has joined #ruby
optimusprimem has joined #ruby
optimusprimem has quit [Changing host]
danman has joined #ruby
sayan has quit [Read error: Connection reset by peer]
Domon has joined #ruby
DrCode has joined #ruby
sayan has joined #ruby
tr4656 has quit [Ping timeout: 240 seconds]
jsummerfield has quit [Quit: jsummerfield]
dash_ has quit [Ping timeout: 246 seconds]
d45h has joined #ruby
vlad_starkov has joined #ruby
baroquebobcat has quit [Quit: baroquebobcat]
tr4656 has joined #ruby
mouse has joined #ruby
flou has joined #ruby
nkts_ has quit [Quit: -]
optimusprimem has quit [Ping timeout: 245 seconds]
greenarrow has joined #ruby
PhatBaja has joined #ruby
browndawg has joined #ruby
justsee has left #ruby [#ruby]
ffio_ has joined #ruby
PhatBaja has quit [Ping timeout: 245 seconds]
<mouse> hi. Just a small question that I've unable to google an answer. I have a class A, then I have a "class B < A". I create instance for class A and would like to initialize superclass of B with this instance: aobj = A.new; bobj = B.new(aobj); How to do this in B.initialize?
<apeiros> B.new(obj) will invoke initialize with 1 argument, passing obj as that argument
postmodern has joined #ruby
<apeiros> if you want to copy over state, you'll have to do it manually
threesome has joined #ruby
Giorgio has joined #ruby
Deele has joined #ruby
<mouse> apeiros, if class A accepts and checks arguments (such as Mysql2::Client), then simple B.new(client) wouldn't work. ok, I'll set instance variable without inheritance.
axeman- has quit [Remote host closed the connection]
Kricir has quit [Remote host closed the connection]
mklappstuhl has joined #ruby
<apeiros> mouse: it means you have to write your own initialize
Solnse has quit []
<mouse> right, as an option
<apeiros> no, not as an option
hamakn has joined #ruby
mklappstuhl has quit [Remote host closed the connection]
<apeiros> if A#initialize and B#initialize differ, you have no choice
<mouse> thank you
Evixion has quit [Read error: Connection reset by peer]
mklappstuhl has joined #ruby
mumble has joined #ruby
TheRealPygo is now known as pygospa
jibi has joined #ruby
optimusprimem has joined #ruby
skasio_ has joined #ruby
Al_ has joined #ruby
Evixion has joined #ruby
arturaz has joined #ruby
skasio has quit [Ping timeout: 245 seconds]
timonv has joined #ruby
danman has quit [Quit: danman]
camilasan has joined #ruby
v0apihgt34 has joined #ruby
poga has joined #ruby
ffio has quit [Quit: WeeChat 0.4.1]
optimusprimem has quit [Excess Flood]
browndawg1 has joined #ruby
BizarreCake has joined #ruby
optimusprimem has joined #ruby
optimusprimem has joined #ruby
optimusprimem has quit [Changing host]
browndawg has quit [Ping timeout: 264 seconds]
maxmanders has joined #ruby
v0apihgt34 has quit [Read error: Connection reset by peer]
seivan has left #ruby [#ruby]
danman has joined #ruby
d2dchat has quit [Remote host closed the connection]
lnormous has quit [Ping timeout: 268 seconds]
ian__ has quit [Quit: Leaving]
Lewix has quit [Remote host closed the connection]
v0apihgt34 has joined #ruby
v0apihgt34 has quit [Read error: Connection reset by peer]
optimusprimem has quit [Max SendQ exceeded]
stoffus has quit [Ping timeout: 264 seconds]
Rix has quit [Ping timeout: 264 seconds]
neonlex has quit [Quit: neonlex]
optimusprimem has joined #ruby
optimusprimem has joined #ruby
optimusprimem has quit [Changing host]
ybart has joined #ruby
danman has quit [Read error: Connection reset by peer]
jmimi has quit [Ping timeout: 268 seconds]
danman has joined #ruby
Lewix has joined #ruby
Rix has joined #ruby
anildigital is now known as _anildigital
v0apihgt34 has joined #ruby
v0apihgt34 has quit [Read error: Connection reset by peer]
Es0teric has quit [Quit: Computer has gone to sleep.]
gju has joined #ruby
v0apihgt34 has joined #ruby
v0apihgt34 has quit [Read error: Connection reset by peer]
vlad_starkov has quit [Remote host closed the connection]
Mars` has quit [Ping timeout: 268 seconds]
kreisys has joined #ruby
niceguyjames has joined #ruby
Mars` has joined #ruby
jonahR has quit [Quit: jonahR]
<Wasp> okay need ask for help/tip again -.-
tatsuya_o has joined #ruby
mikecmpbll has joined #ruby
Coffers has joined #ruby
<Wasp> for some reason the function warrior.feel(d).captive? will not return if it has do be: https://eval.in/39952#
<Wasp> see code: https://eval.in/39952
<Wasp> but if i just replayce the var "d" with it value it works well (so far)
bdd_newbie has quit [Quit: Page closed]
smathieu has joined #ruby
v0apihgt34 has joined #ruby
millerti has joined #ruby
stoffus has joined #ruby
Kricir has joined #ruby
millerti has quit [Client Quit]
<mikecmpbll> Wasp: that sounds unlikely
v0apihgt34 has quit [Read error: Connection reset by peer]
v0apihgt34 has joined #ruby
v0apihgt34 has quit [Read error: Connection reset by peer]
PhatBaja has joined #ruby
saarinen has quit [Quit: saarinen]
<Wasp> mikecmpbll: try code here: https://www.bloc.io/ruby-warrior/#
v0apihgt34 has joined #ruby
v0apihgt34 has quit [Read error: Connection reset by peer]
noname001 has joined #ruby
v0apihgt34 has joined #ruby
v0apihgt34 has quit [Read error: Connection reset by peer]
tatsuya__ has joined #ruby
<mikecmpbll> what i gotta do :/
tyman has quit [Quit: tyman]
PhatBaja has quit [Client Quit]
kaspergrubbe has joined #ruby
optimusprimem has quit [Ping timeout: 245 seconds]
<Wasp> so what do i do?
smathieu has quit [Ping timeout: 256 seconds]
juo100 has joined #ruby
ephemerian has joined #ruby
optimusprimem has joined #ruby
optimusprimem has joined #ruby
optimusprimem has quit [Changing host]
tatsuya_o has quit [Ping timeout: 245 seconds]
<mikecmpbll> Wasp: i've no idea what it's meant to do and what in what way it's not working
vikhyat has quit [Remote host closed the connection]
relix has joined #ruby
<Wasp> sry, no many status logs, oversaw your message
v0apihgt34 has joined #ruby
<Wasp> just paste the code in and hit run
v0apihgt34 has quit [Read error: Connection reset by peer]
vikhyat has joined #ruby
intuxicated_ has joined #ruby
<Wasp> code is a (simplied) class to "control" a warrior
<Wasp> just try, i am sure you will get it if you see it
<mikecmpbll> undefined method `feel`
<Wasp> :)
mumble has quit [Quit: WeeChat 0.4.0]
Kricir has quit [Ping timeout: 256 seconds]
optimusprimem has quit [Excess Flood]
Mars` has quit [Ping timeout: 264 seconds]
<Wasp> oh, first level okay did't know that
<mikecmpbll> ok, 2nd level the dude just walks backwards over and over
<Wasp> better that one :)
danman has quit [Quit: danman]
v0apihgt34 has joined #ruby
intuxicated has quit [Ping timeout: 264 seconds]
v0apihgt34 has quit [Read error: Connection reset by peer]
v0apihgt34 has joined #ruby
v0apihgt34 has quit [Read error: Connection reset by peer]
Megtastique has joined #ruby
stonevil has joined #ruby
marr has joined #ruby
tr4656 has quit [Ping timeout: 245 seconds]
pdtpatrick has quit [Read error: Operation timed out]
darth_chatri1 has joined #ruby
jgrevich has quit [Ping timeout: 245 seconds]
<Wasp> code again (below without each-loop but passing var for function, works well: https://eval.in/39960
pdtpatrick has joined #ruby
intuxicated_ has quit [Ping timeout: 264 seconds]
darth_chatri has quit [Ping timeout: 260 seconds]
tr4656 has joined #ruby
timonv has quit [Remote host closed the connection]
Megtastique has quit [Ping timeout: 256 seconds]
jgrevich has joined #ruby
zodiak has quit [Ping timeout: 264 seconds]
Lewix has quit [Remote host closed the connection]
schickung has joined #ruby
<_droid> is someone here a bash expert?
<Wasp> bash is evil :)
<Wasp> you want to use sh, for scripting
<mouse> sh is better :)
<_droid> i tried to install ruby from source, and I don't know what i did but now my bash gives me the following error message:
<_droid> -bash: /usr/share/ruby-rvm/scripts/hook: No such file or directory
<_droid> -bash: /usr/share/ruby-rvm/scripts/initialize: No such file or directory
Mars` has joined #ruby
<Wasp> what does "file /usr/share/ruby-rvm/scripts/initialize" say?
elaptics`away is now known as elaptics
jmimi has joined #ruby
<Wasp> @ _droid
goodgame has joined #ruby
darth_chatri1 has quit [Read error: Connection reset by peer]
tms has quit [Read error: Connection reset by peer]
darth_chatri has joined #ruby
<Nilium> Sounds like a possible case of someone doing something rvm didn't like.
tms has joined #ruby
<Wasp> aaaaah found the error in my example i guess
<Wasp> lets check if there is something similiar in real code
trusktr has joined #ruby
_droid has quit [Ping timeout: 264 seconds]
_droid has joined #ruby
nomenkun has joined #ruby
shaunbak_ has joined #ruby
end_guy has quit [Ping timeout: 240 seconds]
end_guy_ has joined #ruby
camilasan has quit [Remote host closed the connection]
camilasan has joined #ruby
PhatBaja has joined #ruby
pyrac has joined #ruby
camilasan has quit [Remote host closed the connection]
camilasan has joined #ruby
timonv has joined #ruby
Kricir has joined #ruby
luckyruby has quit [Remote host closed the connection]
v0apihgt34 has joined #ruby
dmiller has joined #ruby
Mars` has quit [Ping timeout: 256 seconds]
intuxicated has joined #ruby
intuxicated has quit [Changing host]
intuxicated has joined #ruby
pyrac has quit [Ping timeout: 256 seconds]
pyrac has joined #ruby
camilasan has quit [Ping timeout: 260 seconds]
Kricir has quit [Ping timeout: 260 seconds]
adeponte has quit [Remote host closed the connection]
krz has joined #ruby
maz-dev has joined #ruby
dmiller has quit [Ping timeout: 264 seconds]
graydot has quit [Quit: graydot]
PhatBaja has quit [Ping timeout: 245 seconds]
sevenseacat has quit [Quit: Leaving.]
LiquidInsect has quit [Ping timeout: 256 seconds]
LiquidInsect has joined #ruby
nayena has joined #ruby
camilasan has joined #ruby
ferdev has joined #ruby
lkba has quit [Ping timeout: 245 seconds]
kreantos has joined #ruby
graydot has joined #ruby
fgo has quit [Remote host closed the connection]
rdark has joined #ruby
LucidDreamZzZz has quit [Remote host closed the connection]
LucidDreamZzZz has joined #ruby
trusktr has left #ruby ["Leaving"]
v0apihgt34 has quit [Read error: Connection reset by peer]
ghr has joined #ruby
v0apihgt34 has joined #ruby
maasdesigner1 has joined #ruby
maasdesigner1 has quit [Client Quit]
maasdesigner1 has joined #ruby
maasdesigner1 is now known as maasdesigner
hanmac has joined #ruby
krz has quit [Quit: krz]
maasdesigner has quit [Client Quit]
r0bgleeson has joined #ruby
lkba has joined #ruby
ZuzzleBuzzer has joined #ruby
axeman- has joined #ruby
bzitzow has quit [Read error: Operation timed out]
oceanbreeze has quit [Quit: http://www.kiwiirc.com/ - A hand crafted IRC client]
yuhsien_ has joined #ruby
intuxicated has quit [Ping timeout: 260 seconds]
axeman- has quit [Read error: Connection reset by peer]
vlad_starkov has joined #ruby
goodgame has left #ruby ["Quitte"]
axeman- has joined #ruby
r0bgleeson has quit [Ping timeout: 268 seconds]
limon7 has quit [Remote host closed the connection]
lkba has quit [Read error: Connection reset by peer]
limon7 has joined #ruby
jlebrech has quit [Quit: Konversation terminated!]
RORgasm has joined #ruby
jlebrech has joined #ruby
alienaut has joined #ruby
mburns has joined #ruby
vlad_starkov has quit [Ping timeout: 245 seconds]
smathieu has joined #ruby
bricker`1A has joined #ruby
tms has quit [Quit: Konversation terminated!]
RORgasm has quit [Ping timeout: 268 seconds]
trepidaciousMBR has joined #ruby
pyrac has quit [Quit: pyrac]
BRMatt has joined #ruby
nari has quit [Ping timeout: 245 seconds]
smathieu has quit [Ping timeout: 245 seconds]
bricker`LA has quit [Ping timeout: 268 seconds]
fgo has joined #ruby
MrZYX|off is now known as MrZYX
amacgregor has quit [Read error: Connection reset by peer]
krainbol_ has joined #ruby
krainbol_ has quit [Client Quit]
krainbol_ has joined #ruby
matthieua has joined #ruby
krainboltgreene has quit [Ping timeout: 264 seconds]
krainbol_ is now known as krainboltgreene
<avril14th> Hello, I have a file name mask: '**/*.rb', is it possible to write 'all subfolders except [dir1, dir2]' without code?
smathieu has joined #ruby
_ffio_ has joined #ruby
ffio_ has quit [Ping timeout: 268 seconds]
smathieu has quit [Read error: Connection reset by peer]
adeponte has joined #ruby
Catbuntu has joined #ruby
blackmesa has joined #ruby
ZuzzleBuzzer has quit [Quit: ZuzzleBuzzer]
axeman- has quit [Ping timeout: 256 seconds]
timonv has quit [Remote host closed the connection]
bricker`1A has quit [Quit: leaving]
stonevil has quit [Remote host closed the connection]
stonevil has joined #ruby
intuxicated has joined #ruby
axeman- has joined #ruby
jibi has quit [Quit: .]
stayarrr has joined #ruby
krz has joined #ruby
mklappstuhl has quit [Remote host closed the connection]
kreantos has quit [Ping timeout: 245 seconds]
stonevil has quit [Ping timeout: 264 seconds]
_anildigital is now known as anildigital
tonini_ has joined #ruby
axeman- has quit [Ping timeout: 256 seconds]
gju has left #ruby ["Verlassend"]
axeman- has joined #ruby
emergion has joined #ruby
teddyp1cker has joined #ruby
kreantos has joined #ruby
mklappstuhl has joined #ruby
pygospa has quit [Disconnected by services]
TheRealPygo has joined #ruby
pyrac has joined #ruby
dEPy has joined #ruby
tonini_ has quit [Quit: Lost terminal]
tonini has quit [Remote host closed the connection]
pygospa has joined #ruby
blz37 has quit [Ping timeout: 260 seconds]
TheRealPygo has quit [Ping timeout: 264 seconds]
cascalheira has joined #ruby
apakatt_ has quit [Quit: Leaving...]
jmimi1 has joined #ruby
Kricir has joined #ruby
jmimi has quit [Ping timeout: 256 seconds]
timonv has joined #ruby
gstamp has quit [Quit: Computer has gone to sleep.]
juo100 has quit [Quit: juo100]
mneorr has joined #ruby
<mikecmpbll> why is a leading underscore used for some ruby variables?
<mikecmpbll> or methods, for that matter.
dmiller has joined #ruby
PhatBaja has joined #ruby
<canton7> I've never seen that style in the wild
Kricir has quit [Ping timeout: 256 seconds]
AikiLinux has joined #ruby
dmiller has quit [Read error: Operation timed out]
PhatBaja has quit [Ping timeout: 245 seconds]
<mikecmpbll> for example @_routes and the method _with_routes
<mikecmpbll> and _routes_context
<mikecmpbll> might be a rails core convention but it's ruby none-the-less.
<hanmac> mikecmpll i use "_" as variable when i dont want to use it in an each like object.each_slice(3) {| one,_,third | … }
Spooner has joined #ruby
<mikecmpbll> hanmac, yeah I'm familiar with that use of underscore, this is different however.
<mikecmpbll> i'll crosspost to #rubyonrails see if their any the wiser.
<hanmac> mikecmpbll: the methods wich begin with "_" are mostly for internal behavior (but needed outside so they cant be private or protected)
<mikecmpbll> hanmac: interesting.
graydot has quit [Quit: graydot]
vlad_starkov has joined #ruby
axeman- has quit [Ping timeout: 245 seconds]
Elhu has joined #ruby
jmimi1 has quit [Ping timeout: 268 seconds]
axeman- has joined #ruby
jmimi has joined #ruby
niceguyjames has quit [Quit: Computer has gone to sleep.]
<hanmac> mikecmpbll: so for sample it may not a good idea to call _methods directly when you are not know that you are doing (but mostly _methods are undocumented)
v1apihgt34 has joined #ruby
v1apihgt34 has quit [Read error: Connection reset by peer]
<mikecmpbll> hanmac: gotcha, sounds reasonable, thanks.
denver has joined #ruby
krz has quit [Quit: krz]
gyre007 has joined #ruby
v1apihgt34 has joined #ruby
vlad_starkov has quit [Remote host closed the connection]
blackmesa has quit [Ping timeout: 240 seconds]
obs__ has joined #ruby
cads has quit [Ping timeout: 268 seconds]
Steppen has joined #ruby
vlad_starkov has joined #ruby
Iszak has joined #ruby
graydot has joined #ruby
Iszak has quit [Max SendQ exceeded]
Iszak has joined #ruby
adambeynon has joined #ruby
Iszak has quit [Max SendQ exceeded]
axeman- has quit [Ping timeout: 264 seconds]
axeman- has joined #ruby
Iszak has joined #ruby
[narcan] has quit [Quit: -[AppDelegate installMalware]: unrecognized selector sent to instance 0x156109c0]
Iszak has quit [Max SendQ exceeded]
Giorgio has quit [Ping timeout: 260 seconds]
stayarrr has quit [Quit: Leaving...]
Steppen has quit [Client Quit]
Iszak has joined #ruby
Iszak has quit [Max SendQ exceeded]
Gooder` has joined #ruby
mikecmpbll has quit [Quit: ["Textual IRC Client: www.textualapp.com"]]
krz has joined #ruby
Iszak has joined #ruby
shevy2 has joined #ruby
Iszak has quit [Max SendQ exceeded]
smathieu has joined #ruby
realDAB has joined #ruby
v1apihgt34 has quit [Read error: Connection reset by peer]
Gooder has quit [Ping timeout: 246 seconds]
krz has quit [Client Quit]
v1apihgt34 has joined #ruby
v1apihgt34 has quit [Read error: Connection reset by peer]
krz has joined #ruby
krz has quit [Changing host]
krz has joined #ruby
shevy2 is now known as shevy
<shevy> damn
<shevy> I am on ruby 2.0.0 something now
axeman- has quit [Ping timeout: 264 seconds]
<shevy> psych.rb:205:in `parse': (acids.yml): invalid trailing UTF-8 octet at line 1 column 1 (Psych::SyntaxError)
<shevy> bastards!
axeman- has joined #ruby
apakatt has joined #ruby
smathieu has quit [Ping timeout: 264 seconds]
Kelet has quit [Read error: Connection reset by peer]
niceguyjames has joined #ruby
jprovazn has joined #ruby
AikiLinux has left #ruby ["Leaving is such sweet sorrow."]
jprovazn has quit [Client Quit]
darth_chatri has quit [Quit: Leaving.]
apakatt has quit [Client Quit]
skasio_ has quit [Quit: leaving]
chris____ has joined #ruby
skasio has joined #ruby
iFire has quit [Read error: Connection reset by peer]
chris____ has quit [Remote host closed the connection]
optimusprimem has joined #ruby
optimusprimem has joined #ruby
axeman- has quit [Read error: Connection reset by peer]
iFire has joined #ruby
axeman- has joined #ruby
tatsuya_o has joined #ruby
chris____ has joined #ruby
tatsuya_o has quit [Remote host closed the connection]
teddyp1cker has quit [Remote host closed the connection]
tatsuya__ has quit [Ping timeout: 246 seconds]
rickmasta has joined #ruby
mikecmpbll has joined #ruby
lkba has joined #ruby
r0bgleeson has joined #ruby
Kelet has joined #ruby
ybart has quit [Ping timeout: 268 seconds]
heftig has quit [Ping timeout: 268 seconds]
kaspergrubbe has quit [Remote host closed the connection]
heftig has joined #ruby
javar has joined #ruby
ybart has joined #ruby
ismlages has joined #ruby
rickmasta has quit [Quit: Leaving...]
_ffio_ has quit [Ping timeout: 268 seconds]
schickung has quit [Ping timeout: 246 seconds]
GeissT has quit [Ping timeout: 256 seconds]
Zai00 has joined #ruby
javar has quit [Remote host closed the connection]
Kelet has quit [Read error: Connection reset by peer]
javar has joined #ruby
amacgregor has joined #ruby
AndChat| has joined #ruby
Pandee has quit [Ping timeout: 246 seconds]
jb41 has joined #ruby
mneorr has quit [Remote host closed the connection]
Kricir has joined #ruby
mneorr has joined #ruby
joonty_ has joined #ruby
chris____ has quit [Ping timeout: 245 seconds]
joonty has quit [Ping timeout: 240 seconds]
keen______ has quit [Ping timeout: 246 seconds]
mneorr has quit [Read error: Connection reset by peer]
mneorr_ has joined #ruby
_droid has left #ruby [#ruby]
keen______ has joined #ruby
adeponte has quit [Remote host closed the connection]
<shevy> when I have a class like:
<shevy> class Foo;end
<shevy> is there a way to put it into a new module namespace, without having to edit the file?
Kricir has quit [Ping timeout: 264 seconds]
krainboltgreene has quit [Ping timeout: 256 seconds]
schickung has joined #ruby
<_br_> shevy: Phew, tricky one. How about serializing it with e.g. ruby2ruby or sourcify and dynamically reloading the whole chunk? While you do remove the object from ObjectSpace before you do so?
schickung has quit [Client Quit]
pusewicz_ has joined #ruby
<_br_> shevy: Or if its a file, why not read the file and just create a tempfile with the new layout and requiring that?
<shevy> hmm
juo100 has joined #ruby
juo100 has quit [Client Quit]
joonty_ is now known as joonty
<pusewicz_> Guys, I'm working on adding support to more countries and updating the current phone format info in a phonie gem https://github.com/wmoxam/phonie
<_br_> Otherwise I'm not aware its possible to dynamically change object namespaces. Possibly a crazy ObjectSpace hack might be possible.
joonty has quit [Quit: WeeChat 0.4.1]
<shevy> I see _br_
<shevy> it did sound like a little extra work
<pusewicz_> It would be great if some of you had a look here, and ideally reported issues with missing data and or wrong formats?
joonty has joined #ruby
<_br_> shevy: Yeah, unfortuantely.
<shevy> didn't have the idea for ObjectSpace before though, that sounds interesting
relix has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<_br_> I can't advise it though. It will be quite un-maintainable. :)
<shevy> cool idea pusewicz_
<_br_> pusewicz_: Yeah, this is nice. Sure, will take a look later :)
<pusewicz_> Thanks!
relix has joined #ruby
anonymuse has joined #ruby
kaspergrubbe has joined #ruby
dawkirst has quit [Ping timeout: 264 seconds]
emergion has quit [Quit: Computer has gone to sleep.]
Domon has quit [Remote host closed the connection]
realDAB has quit [Quit: realDAB]
anonymuse has quit [Remote host closed the connection]
<_br_> oh I hate CSS.
camilasan has quit [Remote host closed the connection]
mklappstuhl has quit [Remote host closed the connection]
Kelet has joined #ruby
hanmac has quit [Quit: Leaving.]
mouse has quit [Ping timeout: 264 seconds]
camilasan has joined #ruby
cj3kim has quit [Remote host closed the connection]
osvico has joined #ruby
<shevy> hehe
<shevy> I think the core idea behind CSS is ok
RORgasm has joined #ruby
<shevy> it got too complex though
tatsuya_o has joined #ruby
obs__ is now known as obs
dawkirst has joined #ruby
tvw has joined #ruby
RORgasm has quit [Ping timeout: 245 seconds]
keen_______ has joined #ruby
kaspergrubbe has quit [Remote host closed the connection]
keen______ has quit [Ping timeout: 245 seconds]
mouse has joined #ruby
razi has joined #ruby
<joonty> shevy: i think advanced gui is a complex concept though
<shevy> well, the www showed that there can be elegant solutions to it
<joonty> i'd say the main problem with css is incompatibility and inconsistency between different browsers
camilasan has quit [Remote host closed the connection]
relix has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<shevy> different browsers? isn't everyone using only chrome already? :-)
<joonty> hehe that would be nice
<nayena> unfortunately its like 50% still using IE
<joonty> we just had a client who required an app to work in IE 6
<joonty> and that's over 12 years old now!
camilasan has joined #ruby
<joonty> which is half the lifetime of the internet
ferdev has quit [Quit: ferdev]
<shevy> ewwwwwww
stonevil has joined #ruby
darth_chatri has joined #ruby
mneorr_ has quit [Remote host closed the connection]
manutter has joined #ruby
Kelet has quit [Read error: Connection reset by peer]
mneorr has joined #ruby
jonahR has joined #ruby
hanmac has joined #ruby
juo100 has joined #ruby
juo100 has quit [Client Quit]
camilasan has quit [Remote host closed the connection]
mneorr has quit [Ping timeout: 264 seconds]
relix has joined #ruby
verto has joined #ruby
mneorr has joined #ruby
krainboltgreene has joined #ruby
<_br_> shevy: Chrome? Eh? Too slow. Firefox.
kaspergrubbe has joined #ruby
tatsuya__ has joined #ruby
ffio has joined #ruby
vlad_starkov has quit [Remote host closed the connection]
companion has quit [Ping timeout: 240 seconds]
germanstudent has quit [Ping timeout: 264 seconds]
verto has quit [Ping timeout: 264 seconds]
anderson has quit [Read error: Connection reset by peer]
cj3kim has joined #ruby
tatsuya_o has quit [Ping timeout: 245 seconds]
anderson has joined #ruby
guiocavalcanti has joined #ruby
zodiak has joined #ruby
companion has joined #ruby
Elhu has quit [Quit: Computer has gone to sleep.]
machuga|away is now known as machuga
jonathanwallace has joined #ruby
Zai00 has quit [Quit: Zai00]
ldnunes has joined #ruby
cj3kim has quit [Read error: Connection reset by peer]
germanstudent has joined #ruby
javar has quit [Quit: javar]
atno has joined #ruby
Neomex has joined #ruby
Kricir has joined #ruby
Neomex has quit [Client Quit]
tacos1de has quit [Ping timeout: 240 seconds]
graydot has quit [Quit: graydot]
greenarrow has quit [Ping timeout: 245 seconds]
bdd_newbie has joined #ruby
gustavn has joined #ruby
<bdd_newbie> Hi everyone , does anyone know how to start a secure connection to Amazon s3 with aws-sdk
codecop has quit [Remote host closed the connection]
PhatBaja has joined #ruby
<bdd_newbie> also if i need to take any steps to establish a secure connection with ftp server on client side
xcv has quit [Remote host closed the connection]
tacos1de has joined #ruby
<_br_> bdd_newbie: I don't know about aws-sdk. But FTP is per definition not secure. If you want encrypted tunnel for FTP switch to SFTP.
axeman- has quit [Read error: Connection reset by peer]
Kricir has quit [Ping timeout: 264 seconds]
axeman- has joined #ruby
ExxKA has joined #ruby
LucidDreamZzZz has quit [Remote host closed the connection]
ewnd9 has quit [Remote host closed the connection]
LucidDreamZzZz has joined #ruby
<bdd_newbie> _br_: is there another library for sftp other than net:sftp
timeout has joined #ruby
Kelet has joined #ruby
PhatBaja has quit [Ping timeout: 245 seconds]
tk has joined #ruby
axeman- has quit [Read error: Connection reset by peer]
axeman- has joined #ruby
tk is now known as Guest76359
jonathanwallace has quit [Ping timeout: 264 seconds]
<_br_> bdd_newbie: Something wrong with net::sftp? Check out rubytoolbox website, its helpful for questions like this.
homelinen has quit [Ping timeout: 264 seconds]
<bdd_newbie> ohk...the problem is in the way we use sftp library
mercwithamouth has joined #ruby
Kelet has quit [Client Quit]
<bdd_newbie> we have to wrap all commands inside sftp.start() block
nayena has left #ruby ["Linkinus - http://linkinus.com"]
arya_ has joined #ruby
anonymuse has joined #ruby
xcv has joined #ruby
adeponte has joined #ruby
mklappstuhl has joined #ruby
Kelet has joined #ruby
emergion has joined #ruby
niklasb has joined #ruby
anonymuse has quit [Remote host closed the connection]
guiocavalcanti has quit [Read error: Connection reset by peer]
franks2 has quit [Changing host]
franks2 has joined #ruby
adeponte has quit [Ping timeout: 256 seconds]
byprdct has quit [Quit: Textual IRC Client: www.textualapp.com]
pusewicz_ has quit [Ping timeout: 264 seconds]
yuhsien_ has quit [Ping timeout: 264 seconds]
Kelet has quit [Read error: Connection reset by peer]
dekz__ has quit [Ping timeout: 245 seconds]
guiocavalcanti has joined #ruby
rbento has quit [Quit: Textual IRC Client: www.textualapp.com]
anildigital is now known as _anildigital
Nenor has joined #ruby
chris____ has joined #ruby
g3orge has joined #ruby
eka has joined #ruby
hogeo has quit [Remote host closed the connection]
_anildigital is now known as anildigital
Deele has quit [Ping timeout: 240 seconds]
germanstudent has quit [Ping timeout: 264 seconds]
dhruvasagar has quit [Read error: Operation timed out]
cj3kim has joined #ruby
arya_ has quit [Ping timeout: 268 seconds]
cj3kim has quit [Read error: Connection reset by peer]
poga has quit [Remote host closed the connection]
germanstudent has joined #ruby
camilasan has joined #ruby
colonolGron has joined #ruby
Elhu has joined #ruby
mercwithamouth has quit [Quit: leaving]
juo100 has joined #ruby
mercwithamouth has joined #ruby
PhatBaja has joined #ruby
arya_ has joined #ruby
ewnd9 has joined #ruby
osvico has quit [Ping timeout: 268 seconds]
pusewicz_ has joined #ruby
thepumpkin has joined #ruby
PhatBaja has quit [Ping timeout: 245 seconds]
ryannielson has joined #ruby
hitesh has quit [Quit: Leaving]
mark_locklear has joined #ruby
arya_ has quit [Read error: Connection reset by peer]
mikecmpbll has quit [Quit: ["Textual IRC Client: www.textualapp.com"]]
arya_ has joined #ruby
nfk has joined #ruby
nfk has joined #ruby
nfk has quit [Changing host]
tacos1de has quit [Ping timeout: 240 seconds]
Speed has joined #ruby
javar has joined #ruby
xcv has quit [Remote host closed the connection]
Kelet has joined #ruby
tacos1de has joined #ruby
juo100 has quit [Quit: juo100]
GeissT has joined #ruby
thiagopnts has joined #ruby
thiagopnts has quit [Changing host]
thiagopnts has joined #ruby
xcv has joined #ruby
geekbri has joined #ruby
blackmesa has joined #ruby
krz has quit [Quit: krz]
axeman- has quit [Ping timeout: 264 seconds]
devoldmx has joined #ruby
devoldmx has quit [Remote host closed the connection]
devoldmx3 has joined #ruby
ravster has joined #ruby
d2dchat has joined #ruby
flou has quit [Ping timeout: 264 seconds]
wallerdev has joined #ruby
axeman- has joined #ruby
devoldmx27 has quit [Ping timeout: 264 seconds]
blip99 has joined #ruby
adambeynon has quit [Quit: Textual IRC Client: www.textualapp.com]
Beoran_ has quit [Read error: Connection reset by peer]
adambeynon has joined #ruby
nari has joined #ruby
pipework has quit [Remote host closed the connection]
Tricon has joined #ruby
smathieu has joined #ruby
enebo has joined #ruby
sambao21 has joined #ruby
hanmac has quit [Quit: Leaving.]
evenix has joined #ruby
evenix has quit [Remote host closed the connection]
klip has quit [Remote host closed the connection]
Uranio has quit [Quit: while you reading this, a kitty dies]
guiocava_ has joined #ruby
ferdev has joined #ruby
jonahR has quit [Quit: jonahR]
enebo has quit [Client Quit]
decoponio has quit [Ping timeout: 246 seconds]
ExxKA has quit [Quit: This computer has gone to sleep]
guiocavalcanti has quit [Ping timeout: 256 seconds]
smathieu has quit [Ping timeout: 268 seconds]
bluOxigen has quit [Ping timeout: 256 seconds]
mklappst_ has joined #ruby
hanmac has joined #ruby
krainboltgreene has quit [Quit: krainboltgreene]
emergion has quit [Quit: Computer has gone to sleep.]
devoldmx3 has quit [Read error: Connection reset by peer]
mklappstuhl has quit [Ping timeout: 264 seconds]
blackmesa has quit [Ping timeout: 240 seconds]
jp- has joined #ruby
ssvo has joined #ruby
mercwithamouth has quit [Ping timeout: 246 seconds]
iFire_ has joined #ruby
fermion_ has joined #ruby
breakingthings has joined #ruby
decoponio has joined #ruby
homelinen has joined #ruby
iFire has quit [Ping timeout: 264 seconds]
<bdd_newbie> on using Net:sftp my command prompt is getting stuck
<bdd_newbie> any ideas why
Beoran_ has joined #ruby
<bdd_newbie> my server is connected
dmiller has joined #ruby
pranny has quit [Quit: Leaving.]
blackmesa has joined #ruby
ewnd9 has quit [Ping timeout: 264 seconds]
guiocava_ is now known as guiocavalcanti
gyre007 has quit [Remote host closed the connection]
quickycoder has joined #ruby
fgo has quit [Remote host closed the connection]
colonolGron has quit [Quit: Lost terminal]
thesheff17 has joined #ruby
gyre007 has joined #ruby
Xeago has joined #ruby
realDAB has joined #ruby
arya_ has quit [Ping timeout: 256 seconds]
blackmesa has quit [Remote host closed the connection]
arya_ has joined #ruby
axeman- has quit [Ping timeout: 264 seconds]
dmiller has quit [Remote host closed the connection]
axeman- has joined #ruby
<blip99> hi all, I need some help making a regular expression to use for gsub. I have a string "abc AS def", I want to get rid of everything from the "AS" onwards so that I end up with "abc" only
Deele has joined #ruby
RORgasm has joined #ruby
noop has quit [Ping timeout: 264 seconds]
xcv has quit [Remote host closed the connection]
nikeita has joined #ruby
blip99 has quit [Remote host closed the connection]
blip99 has joined #ruby
<g3orge> /abc/ would work
_veer has quit [Read error: Connection reset by peer]
_veer has joined #ruby
<blip99> g3orge: the problem is abc varies, and so does def. only the "AS" is fixed in every string
<blip99> a.map { |element| element.gsub(/AS/, "")}
atno has quit [Remote host closed the connection]
<blip99> this just removes the AS ^
<blip99> a.map { |element| element.gsub(/AS\+/, "")}
<realDAB> blip99: s.sub(/\s+AS.*/, "")
<bdd_newbie> hi my sftp client doesnt work , it just gets stuck with a blinking cursor
<blip99> and this doesn't
<bdd_newbie> any ideas why
yshh has joined #ruby
Zai00 has joined #ruby
RORgasm has quit [Ping timeout: 256 seconds]
adambeynon has quit [Quit: Textual IRC Client: www.textualapp.com]
<g3orge> blip99: you can use the !~ operator with the /AS/ instead of the =~ operator
smathieu has joined #ruby
nikeita has quit [Ping timeout: 246 seconds]
<blip99> realDAB: oh, thanks
g3orge has quit [Quit: leaving]
devoldmx has joined #ruby
sventon has joined #ruby
<shevy> _br_ yeah I use firefox too
vlad_starkov has joined #ruby
nikeita has joined #ruby
ssvo has quit [Ping timeout: 256 seconds]
smathieu has quit [Ping timeout: 268 seconds]
kpshek has joined #ruby
anonymuse has joined #ruby
Rokko11 has joined #ruby
dphase has left #ruby [#ruby]
relix has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
PhatBaja has joined #ruby
nezumi has quit [Ping timeout: 264 seconds]
Tricon has quit [Quit: Leaving...]
mikecmpbll has joined #ruby
arya_ has quit [Ping timeout: 256 seconds]
tomzx_mac has joined #ruby
<mikecmpbll> i'm having a moron moment, is arr[arr.length-1] = "foo" the most efficient way to replace the last element of an array?
mansi has joined #ruby
arya_ has joined #ruby
PhatBaja has quit [Ping timeout: 245 seconds]
kaspergrubbe has quit [Remote host closed the connection]
<shevy> problem is always to ask for the most efficient way
<hanmac> mikecmpmbll use "-1" directly
relix has joined #ruby
<shevy> array = [1,2,3] # => [1, 2, 3]
<shevy> array[-1] = 'foo' # => "foo"
<shevy> array # => [1, 2, "foo"]
fernandoaleman has joined #ruby
<shevy> hanmac, I am now on ruby 2.0.0something :(
ArchBeOS has joined #ruby
<shevy> #<Psych::SyntaxError: (network.yml): invalid trailing UTF-8 octet at line 1 column 1>
<hanmac> shey pah i am on 2.1dev
<shevy> did you compile it?
<hanmac> on this machine i use rvm for compiling (but use only one ruby)
v0n has joined #ruby
pranny has joined #ruby
pranny has quit [Client Quit]
<hanmac> shevy can you post the network.yml file and sample code so i can test if it happens on my ruby too?
LaPetiteFromage has joined #ruby
adambeynon has joined #ruby
<shevy> hanmac it's encoding problem
<shevy> it demands UTF
<shevy> but I dont use UTF, so I have to switch from yaml
browndawg1 has left #ruby [#ruby]
fernandoaleman has left #ruby [#ruby]
yfeldblum has joined #ruby
niceguyjames has quit [Quit: Computer has gone to sleep.]
ntus1017 has joined #ruby
browndawg has joined #ruby
Tricon has joined #ruby
<hanmac> hm the YAML module looks a bit shity so it does not have flags for encoding … :/
fredjean has quit [Quit: Computer has gone to sleep.]
baordog has joined #ruby
niceguyjames has joined #ruby
shevy has quit [Ping timeout: 264 seconds]
anildigital is now known as _anildigital
suporte85 has joined #ruby
ehc has joined #ruby
kaspergrubbe has joined #ruby
bdd_newbie has quit [Quit: Page closed]
<Xeago> would this do what I expect it to do: redirect_to start_trial_path and return unless @subscription
<Xeago> redirect and return if @subscription is falsy
pjeide has left #ruby [#ruby]
Guest8419 has quit [Ping timeout: 245 seconds]
sailias has joined #ruby
[narcan] has joined #ruby
<hanmac> Xeago i am not 100% sure that it does what you want i think you should investigate more
realDAB has quit [Quit: realDAB]
<Xeago> >> @a = "a"; puts a and return unless false
<eval-in> Xeago => undefined local variable or method `a' for main:Object (NameError) ... (https://eval.in/39977)
<Xeago> >> @a = "a"; puts @a and return unless false
<eval-in> Xeago => a ... (https://eval.in/39978)
bklane has joined #ruby
ewnd9 has joined #ruby
haxrbyte has joined #ruby
intuxicated has quit [Ping timeout: 264 seconds]
sailias has quit [Ping timeout: 268 seconds]
jerius has joined #ruby
<hanmac> Xeago for sample with puts, your return is never called because puts return nil
wmoxam has joined #ruby
sailias has joined #ruby
<Xeago> >> @a = "a"; puts @a and return unless false; "4"
<eval-in> Xeago => a ... (https://eval.in/39982)
jlast has joined #ruby
haxrbyte_ has joined #ruby
<Xeago> I'll just amek it multiline
shevy has joined #ruby
<jb41> is it normal, that when I'm doing gem install rails, the documentation is installing about 10 minutes, and still doesn't end?
xcv has joined #ruby
<Xeago> jb41: it is common to disable installing of documentation
<Xeago> --no-rdoc --no-ri if I recall correctly
<hanmac> jb41 you should be happy that rails is even documented ;P
<jb41> hanmac: I am ; )
<Xeago> most people read docs online tho
dhruvasagar has joined #ruby
<jb41> btw. where can I find that docs, that are installing to all gems?
<Xeago> I think you can start gem server and then brows em
<jb41> hmm.., as I think now, it's really good, that it's documented so well
<Xeago> or it is located somewhere under $GEM_HOME or whatever that is
kpshek has quit []
huoxito has joined #ruby
thoolihan has joined #ruby
<hanmac> jb41 "gem server" uses your local rdoc stuff to show the docs of your installed gems
haxrbyte has quit [Ping timeout: 268 seconds]
amacgregor_ has joined #ruby
ffranz has joined #ruby
nikeita has quit [Quit: sleep]
vlad_starkov has quit [Remote host closed the connection]
<jb41> well, it's good to know that I've docs of every gem on my HDD. Lol, I was always googling them -_-"
<jb41> hanmac: thanks
amacgregor has quit [Ping timeout: 256 seconds]
akells` has joined #ruby
axl_ has joined #ruby
TIJ has quit [Quit: Konversation terminated!]
orionstein_away is now known as orionstein
TIJ has joined #ruby
brbcoding has joined #ruby
devoldmx3 has joined #ruby
zoee has quit [Quit: zoee]
sailias has quit [Ping timeout: 264 seconds]
Trynemjoel has quit [Max SendQ exceeded]
sailias has joined #ruby
Trynemjoel has joined #ruby
klip has joined #ruby
devoldmx has quit [Ping timeout: 256 seconds]
dmiller has joined #ruby
thoolihan has quit [Quit: thoolihan]
alex__c2022 has joined #ruby
blip99 has quit [Ping timeout: 256 seconds]
niceguyjames has quit [Quit: Computer has gone to sleep.]
v0n has quit [Read error: Operation timed out]
cj3kim has joined #ruby
niceguyjames has joined #ruby
niceguyjames has quit [Client Quit]
devoldmx3 has quit [Read error: Connection reset by peer]
geekbri_ has joined #ruby
jefflyne has joined #ruby
geekbri_ has quit [Remote host closed the connection]
dmiller has quit [Ping timeout: 245 seconds]
danman has joined #ruby
yuhsien_ has joined #ruby
dekz__ has joined #ruby
MrThePlague has joined #ruby
MrThePlague has joined #ruby
MrThePlague has quit [Changing host]
devoldmx has joined #ruby
pentameter has joined #ruby
pipework has joined #ruby
geekbri has quit [Ping timeout: 264 seconds]
cj3kim has quit [Ping timeout: 256 seconds]
momomomomo has joined #ruby
scarolan has joined #ruby
tomzx_mac has quit [Ping timeout: 264 seconds]
ebanoid has quit [Quit: brbomgwtfbbq]
theRoUS has joined #ruby
theRoUS has quit [Changing host]
theRoUS has joined #ruby
mercwithamouth has joined #ruby
Davey has joined #ruby
scarolan has quit [Ping timeout: 256 seconds]
asteve has joined #ruby
dhruvasagar has quit [Ping timeout: 256 seconds]
scarolan has joined #ruby
akells` has quit [Remote host closed the connection]
valerio1 has joined #ruby
limon7 has quit [Remote host closed the connection]
quickycoder has left #ruby [#ruby]
limon7 has joined #ruby
tkuchiki has quit [Remote host closed the connection]
thiagopnts has quit [Quit: Leaving.]
mercwithamouth has quit [Client Quit]
mercwithamouth has joined #ruby
_maes_ has quit [Quit: Miranda IM! Smaller, Faster, Easier. http://miranda-im.org]
sleetdrop has joined #ruby
sleetdrop has quit [Max SendQ exceeded]
scarolan has quit [Ping timeout: 264 seconds]
sleetdrop has joined #ruby
sleetdrop has quit [Max SendQ exceeded]
scarolan has joined #ruby
interactionjaxsn has joined #ruby
rodacato has joined #ruby
sleetdrop has joined #ruby
sleetdrop has quit [Max SendQ exceeded]
ghr has quit [Quit: Computer has gone to sleep.]
ghr has joined #ruby
sambao21 has quit [Quit: Computer has gone to sleep.]
nikeita has joined #ruby
senayar has joined #ruby
io_syl has joined #ruby
Kricir has joined #ruby
RORgasm has joined #ruby
sailias has quit [Ping timeout: 264 seconds]
scarolan has quit [Ping timeout: 268 seconds]
scarolan has joined #ruby
BillCriswell has joined #ruby
sambao21 has joined #ruby
blackmesa has joined #ruby
Senjai has joined #ruby
nbouscal has joined #ruby
xcv has quit [Remote host closed the connection]
mary5030 has joined #ruby
<shevy> jb41 yeah for some reason, documentation installation is so slow in ruby
<shevy> I only read online docu these days
<shevy> I can not be bothered to check for local docu
<shevy> except when I wrote it myself hahahaha
scarolan has quit [Ping timeout: 256 seconds]
baroquebobcat has joined #ruby
xcv has joined #ruby
scarolan has joined #ruby
sailias has joined #ruby
banghouse has joined #ruby
banghouse is now known as Guest75681
rhys has joined #ruby
JZTech101 has joined #ruby
nikeita has quit [Quit: sleep]
cody-- has joined #ruby
pygospa has quit [Ping timeout: 246 seconds]
zachrab has joined #ruby
thiagopnts has joined #ruby
thiagopnts has joined #ruby
thiagopnts has quit [Changing host]
ehc has quit [Quit: ehc]
_anildigital is now known as anildigital
andikr has quit [Remote host closed the connection]
scarolan has quit [Ping timeout: 264 seconds]
Kricir has quit [Remote host closed the connection]
Guest75681 is now known as banghouse
axeman- has quit [Ping timeout: 256 seconds]
Tricon has quit [Quit: Linkinus - http://linkinus.com]
d45h has quit [Quit: d45h]
pygospa has joined #ruby
scarolan has joined #ruby
arya_ has quit [Ping timeout: 268 seconds]
axeman- has joined #ruby
adman65 has quit [Quit: adman65]
Bry8Star{T2 has quit [Ping timeout: 240 seconds]
tagrudev has quit [Remote host closed the connection]
wagster has joined #ruby
GeissT has quit [Quit: MillBroChat AdIRC User]
kobain has joined #ruby
arya_ has joined #ruby
scarolan has quit [Ping timeout: 246 seconds]
scarolan has joined #ruby
kpshek has joined #ruby
ananthakumaran has quit [Quit: Leaving.]
cantonic has joined #ruby
ntus1017 has quit [Remote host closed the connection]
axeman- has quit [Ping timeout: 268 seconds]
ArchBeOS has quit [Remote host closed the connection]
arturaz has quit [Quit: Leaving]
axeman- has joined #ruby
blackmesa has quit [Ping timeout: 240 seconds]
vasilakisFiL has joined #ruby
darth_chatri has quit [Quit: Leaving.]
nbouscal has quit [Quit: Computer has commenced electric sheep tracking protocol.]
<vasilakisFiL> hey guys, in a project that I use celluoid(an actor based library) accidentally I declared a new class Response.. after a bunge of errors I discovered that there is already a Response class defined in celluloid..so I guess I have to change the name of my class..but is there any other way? sorry new to ruby
scarolan has quit [Ping timeout: 256 seconds]
PaulePanter has quit [Remote host closed the connection]
JZTech101 has quit [Quit: Bye]
scarolan has joined #ruby
xcv has quit [Remote host closed the connection]
v0apihgt34 has quit [Read error: Connection reset by peer]
blip99 has joined #ruby
scarolan has quit [Ping timeout: 246 seconds]
v0n has joined #ruby
Evixion has quit [Read error: Connection reset by peer]
tommyvyo has joined #ruby
tommyvyo has quit [Changing host]
tommyvyo has joined #ruby
darth_chatri has joined #ruby
scarolan has joined #ruby
axeman- has quit [Ping timeout: 264 seconds]
JZTech101 has joined #ruby
devoldmx has quit [Read error: Connection reset by peer]
JZTech101 has quit [Read error: Connection reset by peer]
axeman- has joined #ruby
<Soulcutter> vasilakisFiL: Celluloid's is namespaced under the Celluloid module - you should probably not be declaring your own classes in that namespace
Bry8Star{T2 has joined #ruby
Evixion has joined #ruby
musl_ has quit [Quit: WeeChat 0.4.1]
ehc has joined #ruby
jonathanwallace has joined #ruby
Rokko11 has quit [Quit: Page closed]
limon7 has quit [Quit: Konversation terminated!]
<jlebrech> can anyone help me with the oauth2 gem?
jefflyne has quit [Quit: My Mac Mini has gone to sleep. ZZZzzz…]
guiocavalcanti has quit [Read error: Connection timed out]
devoldmx has joined #ruby
ryannielson has quit [Quit: ryannielson]
scarolan has quit [Ping timeout: 264 seconds]
JZTech101 has joined #ruby
scarolan has joined #ruby
<vasilakisFiL> thanks Soulcutter
axeman- has quit [Ping timeout: 245 seconds]
Giorgio has joined #ruby
axeman- has joined #ruby
mouse has quit [Quit: Ex-Chat]
baroquebobcat has quit [Quit: baroquebobcat]
guiocavalcanti has joined #ruby
<mercwithamouth> could someone tell me how i'd go about testing a method with minitest?
guiocavalcanti has quit [Remote host closed the connection]
<mercwithamouth> hrmm sort of vague...i'll come back later today with an example. i have to make a quick run
<Soulcutter> mercwithamouth: http://lmgtfy.com/?q=minitest%20tutorial
Takle has joined #ruby
scarolan has quit [Ping timeout: 264 seconds]
codeski has joined #ruby
scarolan has joined #ruby
stoffus has quit [Ping timeout: 245 seconds]
r0bglees0n has joined #ruby
v0n has quit [Quit: WeeChat 0.4.2-dev]
v0n has joined #ruby
baroquebobcat has joined #ruby
nari has quit [Ping timeout: 246 seconds]
TIJ has quit [Ping timeout: 246 seconds]
tacos1de has quit [Remote host closed the connection]
johnnyfuchs has joined #ruby
r0bgleeson has quit [Ping timeout: 256 seconds]
ntus1017 has joined #ruby
tommyvyo has quit [Quit:]
scarolan has quit [Ping timeout: 246 seconds]
<mercwithamouth> Soulcutter: well no...it deals more so with mocking. i have an idea now....
stonevil has quit [Remote host closed the connection]
kaspergrubbe has quit [Remote host closed the connection]
Takle has quit [Remote host closed the connection]
pyrac has quit [Quit: pyrac]
io_syl has quit [Quit: io_syl]
haxrbyte_ has quit [Read error: Connection reset by peer]
scarolan has joined #ruby
letstest has joined #ruby
threesome has quit [Read error: Operation timed out]
stonevil has joined #ruby
<letstest> hi, i am trying to use RSpec for some tests, but i want to access the results in the after hook so that I can report the results to a 3rd party api. is this possible?
tacos1de has joined #ruby
kpshek has quit []
jsummerfield has joined #ruby
jlast_ has joined #ruby
gazarsgo has joined #ruby
realDAB has joined #ruby
axeman- has quit [Ping timeout: 256 seconds]
baroquebobcat has quit [Quit: baroquebobcat]
<brisbin> letstest: the around hook might be better, it's handed the example object which may hold this info after it's run
nathancahill has joined #ruby
scarolan has quit [Ping timeout: 245 seconds]
alex__c2022 has quit [Read error: Operation timed out]
<brisbin> you also might be able to create a custom formatter, which reports to the API as part of outputting the results
axeman- has joined #ruby
tommyvyo has joined #ruby
jlast has quit [Ping timeout: 245 seconds]
scarolan has joined #ruby
cj3kim has joined #ruby
<letstest> thanks brisbin, checking out the around hook
endash has joined #ruby
<letstest> how do i access the result though?
<brisbin> got me
Krajsnick has joined #ruby
stonevil has quit [Remote host closed the connection]
<letstest> brisbin - i found a solution
devoldmx has quit [Read error: Connection reset by peer]
<letstest> after(:each) do if example.exception != nil puts "test failed" end end
scarolan has quit [Ping timeout: 264 seconds]
sventon has quit [Remote host closed the connection]
scarolan has joined #ruby
alex__c2022 has joined #ruby
cj3kim has quit [Ping timeout: 245 seconds]
tobyo has quit [Ping timeout: 264 seconds]
stonevil has joined #ruby
rodacato has quit [Remote host closed the connection]
kurtisnelson has joined #ruby
stoffus has joined #ruby
browndawg has quit [Ping timeout: 264 seconds]
letstest has quit [Quit: Page closed]
anay has joined #ruby
sambao21 has quit [Quit: Computer has gone to sleep.]
devoldmx has joined #ruby
mercwithamouth has quit [Ping timeout: 264 seconds]
danman has quit [Read error: Connection reset by peer]
scarolan has quit [Ping timeout: 264 seconds]
danman has joined #ruby
scarolan has joined #ruby
PhatBaja has joined #ruby
_maes_ has joined #ruby
<shevy> anyone has an idea to move away from yaml for my config stuff?
<shevy> problem is that yaml mandates UTF, which I dont use, so it restricts me down
<Kelet> what about JSON?
Speed has quit [Quit: When two people dream the same dream, it ceases to be an illusion.]
nitish has joined #ruby
<shevy> hmm
<shevy> json requires one to have leading { and trailing } characters in those files?
<hanmac> shevy i looked into the yaml code and there "should" be options for load_file where you can set the encoding, but they are not there :/
<hanmac> imo its a Feature that should be requested
<Kelet> shevy, just make a 10-liner for parsing ini files to instance variables or something then
mikecmpbll has quit [Quit: ["Textual IRC Client: www.textualapp.com"]]
camilasan has quit [Remote host closed the connection]
<shevy> ok Kelet
<Kelet> shevy, split on equals - left side is variable name, right side is value. each newline is a new variable. boom.
scarolan has quit [Ping timeout: 245 seconds]
mklappst_ has quit [Remote host closed the connection]
PhatBaja has quit [Ping timeout: 245 seconds]
scarolan has joined #ruby
Cyrus has quit [Quit: Cyrus.sleep()]
camilasan has joined #ruby
thiagopnts has quit [Quit: Leaving.]
bradsmith has joined #ruby
adambeynon has quit [Ping timeout: 240 seconds]
<jb41> i have two versions of bundler (1.3.5, 1.2.3), rails-4.0.0 needs >=1.3.0, how can I delete bundler 1.2.3, or make rails using 1.3.5?
jefflyne has joined #ruby
<hanmac> jb41 use gem cleanup
guiocava_ has joined #ruby
scarolan has quit [Ping timeout: 256 seconds]
ssvo has joined #ruby
<jb41> doesn't works, I still have 1.2.3 and 1.3.5
scarolan has joined #ruby
<Xeago> jb41: gem uninstall bundler-1.2.3 I suppose
<Xeago> or you can leave out the version
<Xeago> I think it prompts
<Xeago> or just uninstall both
Guest76359 has quit [Quit: ばいばい]
<Xeago> and then just install bundler again, it'll use the newest
<jb41> Attempting to uninstall bundler-1.2.3
<jb41> Unable to uninstall bundler-1.2.3: Gem::InstallError: gem "bundler" is not installed
<jb41> Clean Up Complete
nikeita has joined #ruby
<jb41> wtf?
<Xeago> and then use bundler to install the required version by rails
<shevy> hanmac do you use bundler?
<jb41> I think I messed up too much with bundler
anay has quit [Remote host closed the connection]
realDAB has quit [Quit: realDAB]
jlast_ has quit [Remote host closed the connection]
ckrailo has joined #ruby
jlast has joined #ruby
<shevy> hehe that's what people often say :D
<jb41> doesn't matter, looks like its working properly, I hope... ;)
denver has quit [Remote host closed the connection]
niklasb has quit [Ping timeout: 245 seconds]
senayar_ has joined #ruby
momomomomo has quit [Quit: momomomomo]
kpshek has joined #ruby
scarolan has quit [Ping timeout: 264 seconds]
browndawg has joined #ruby
scarolan has joined #ruby
senayar has quit [Ping timeout: 264 seconds]
senayar_ is now known as senayar
fredjean has joined #ruby
xcv has joined #ruby
terrellt has joined #ruby
malcolmva has quit [Read error: Connection reset by peer]
malcolmva has joined #ruby
randomautomator has joined #ruby
momomomomo has joined #ruby
rodacato has joined #ruby
geggam has joined #ruby
zachrab has quit [Remote host closed the connection]
scarolan has quit [Ping timeout: 264 seconds]
scarolan has joined #ruby
cj3kim has joined #ruby
onr has joined #ruby
sayan has quit [Ping timeout: 246 seconds]
Kricir has joined #ruby
cj3kim has quit [Read error: Connection reset by peer]
LiVe0UR0LiFe has joined #ruby
adambeynon has joined #ruby
realDAB has joined #ruby
LiVe0UR0L has joined #ruby
lnormous has joined #ruby
<LiVe0UR0LiFe> !
scarolan has quit [Ping timeout: 264 seconds]
stoffus has quit [Ping timeout: 264 seconds]
mansi has quit [Read error: Connection reset by peer]
cody-- has quit [Quit: Computer has gone to sleep.]
scarolan has joined #ruby
ananthakumaran has joined #ruby
momomomomo has quit [Quit: momomomomo]
mnaser has quit [Excess Flood]
darth_chatri has quit [Quit: Leaving.]
mansi has joined #ruby
LiVe0UR0LiFe has quit [Quit: LiVe0UR0LiFe]
chris____ has quit [Read error: Connection reset by peer]
wu_lmao has quit [Quit: wu_lmao]
mansi has quit [Read error: Connection reset by peer]
LiVe0UR0L has quit []
stoffus has joined #ruby
chris____ has joined #ruby
markalanevans_ has joined #ruby
mansi has joined #ruby
aganov has quit [Quit: aganov]
stonevil has quit [Remote host closed the connection]
Kricir has quit [Ping timeout: 256 seconds]
momomomomo has joined #ruby
enebo has joined #ruby
fantazo has joined #ruby
h4mz1d has joined #ruby
stonevil has joined #ruby
momomomomo has quit [Client Quit]
f1gjam has joined #ruby
scarolan has quit [Ping timeout: 246 seconds]
sambao21 has joined #ruby
guiocava_ has quit [Read error: Connection timed out]
<f1gjam> hey guys, I am new to ruby and I am trying to get a ruby file call a method from another ruby file, so say, fileA calls method from fileB. The problem I have is that, when I do require_relative('fileB') it seems that this executes fileB which then fails as it doesn't have the required parameters passed
threesome has joined #ruby
alup has quit [Quit: Leaving]
scarolan has joined #ruby
jonathanwallace has quit [Ping timeout: 264 seconds]
mansi has quit [Read error: Connection reset by peer]
anay has joined #ruby
mansi has joined #ruby
ffio has quit [Quit: WeeChat 0.4.1]
<Kelet> f1gjam, Does your fileB have things outside of classes, modules, methods, etc?
<f1gjam> well i am not using a class, but yes it does
<f1gjam> and they are all set
rickruby has quit [Remote host closed the connection]
<f1gjam> where it fails, is on the method I am trying to call
brennanMKE has joined #ruby
machuga is now known as machuga|away
jonathanwallace has joined #ruby
<qhartman> Is there a more idiomatic way to to do this sort of test on a variable: 'if !foo.nil? and foo == "bar"'. That feels clunky but I haven't thought of anything better yet.
<Kelet> The general idiom is to stick your outer code into a method or something, and call it as-needed.
reppard has joined #ruby
<Kelet> @ f1gjam
<MrZYX> qhartman: nil == "bar" is false, so...
ArchBeOS has joined #ruby
<reppard> jello
<canton7> qhartman, why doesn't "if foo == "bar"" work?
<f1gjam> Kelet: let me paste my code so you have better idea of what I am doing
reppard has quit [Client Quit]
Kruppe has joined #ruby
kreantos has quit [Ping timeout: 256 seconds]
mupkoo has joined #ruby
<f1gjam> Kelet: fileA = http://dpaste.com/1324941/
terrellt has quit [Ping timeout: 240 seconds]
<f1gjam> Kelet: fileB = http://dpaste.com/1324941/
<f1gjam> woops
Coffers has quit [Quit: ["Textual IRC Client: www.textualapp.com"]]
<f1gjam> Kelet: FileB = http://dpaste.com/1324940/
scarolan has quit [Ping timeout: 264 seconds]
AndChat- has joined #ruby
<Kelet> f1gjam, So you put lines 72, 74, 77 into a method, and call it when you need it.
scarolan has joined #ruby
nikeita has quit [Quit: sleep]
lkba has quit [Read error: Connection reset by peer]
<f1gjam> oh yeah I get it
<Kelet> and maybe line 8
<f1gjam> i was calling it, but then it get called later in the file
codeski has quit [Quit: leaving]
<f1gjam> thanks
<f1gjam> so simple and I missed it :)
stoffus has quit [Ping timeout: 268 seconds]
erry has quit [Remote host closed the connection]
nathancahill has quit [Quit: nathancahill]
erry_ has joined #ruby
tyman has joined #ruby
<pontiki> is something like def with(o,&b);yield o;end already defined in Ruby someplace? or is there a more idiomatic way of doing that?
tobyo has joined #ruby
<MrZYX> #tap?
<pontiki> yus!
<pontiki> ta
erry_ has quit [Changing host]
erry_ has joined #ruby
<pontiki> why didn't i think of that?
erry_ is now known as erry
amacgregor_ has quit [Read error: Connection reset by peer]
slap_stick has joined #ruby
scarolan has quit [Ping timeout: 264 seconds]
scarolan has joined #ruby
<slap_stick> hey, is there a way to use a value of a variable in the variable name?
<hoelzro> slap_stick: for example?
<f1gjam> Kelet: thanks all working now
<slap_stick> a="b" c_#{b} = "d" or something
<slap_stick> is it even possible?
<MrZYX> real world use case? most of the time you want a hash
<slap_stick> sorry swaap b for a in that last bit
tkuchiki has joined #ruby
<hoelzro> slap_stick: what's the use case?
<hoelzro> sounds like you want a hash
<hoelzro> oh, MrZYX just said that =/
<Kelet> slap_stick, Look into instance_variable_set if you're sure you want to do that
optimusprimem has quit [Ping timeout: 245 seconds]
hitesh has joined #ruby
<MrZYX> Kelet: that isn't _exactly_ doing what he wants
hitesh has quit [Max SendQ exceeded]
<Kelet> MrZYX, why not
xcv has quit [Remote host closed the connection]
_maes_ has quit [Read error: Connection reset by peer]
<MrZYX> he's talking about locals
<hoelzro> also, only show people where the weapons are stored once you know they'll be responsible with them =)
hitesh has joined #ruby
<hanmac> slap_stick, you cant create dynamicly local variables at runtime … (even with regex you can only make them at parse time)
hitesh has quit [Max SendQ exceeded]
Appineer has joined #ruby
Appineer has left #ruby [#ruby]
hitesh has joined #ruby
kayloos has joined #ruby
scarolan has quit [Ping timeout: 264 seconds]
scarolan has joined #ruby
jonathanwallace has quit [Quit: WeeChat 0.4.0]
hitesh has quit [Max SendQ exceeded]
hitesh has joined #ruby
ybart has quit [Quit: ybart]
vlad_starkov has joined #ruby
tyman has quit [Quit: tyman]
m8 has joined #ruby
hitesh has quit [Max SendQ exceeded]
hitesh has joined #ruby
LaPetiteFromage has quit [Quit: LaPetiteFromage]
hitesh has quit [Max SendQ exceeded]
_maes_ has joined #ruby
hitesh has joined #ruby
scarolan has quit [Ping timeout: 246 seconds]
hitesh has quit [Max SendQ exceeded]
scarolan has joined #ruby
jonathanwallace has joined #ruby
mikecmpbll has joined #ruby
senayar has quit [Remote host closed the connection]
Mon_Ouie has joined #ruby
cj3kim has joined #ruby
alex__c2022 has quit [Quit: alex__c2022]
Voodoofish430 has joined #ruby
_maes_ has quit [Client Quit]
Mars` has joined #ruby
goodgame has joined #ruby
razi has quit [Ping timeout: 264 seconds]
nomenkun has quit [Remote host closed the connection]
kpshek has quit [Read error: Connection reset by peer]
_maes_ has joined #ruby
kpshek has joined #ruby
mahmoudimus has quit [Quit: Computer has gone to sleep.]
scarolan has quit [Ping timeout: 245 seconds]
LiVe0UR0LiFe has joined #ruby
mikepack has joined #ruby
cj3kim has quit [Ping timeout: 256 seconds]
scarolan has joined #ruby
guiocavalcanti has joined #ruby
maz-dev has quit [Remote host closed the connection]
noname001 has quit [Ping timeout: 264 seconds]
timonv has quit [Remote host closed the connection]
Catbuntu has quit [Remote host closed the connection]
S0da has joined #ruby
bzitzow has joined #ruby
RichardBaker has quit [Quit: RichardBaker]
PhatBaja has joined #ruby
scarolan has quit [Ping timeout: 268 seconds]
aqil has joined #ruby
scarolan_ has joined #ruby
LiVe0UR0LiFe has quit [Read error: Connection reset by peer]
axl_ has quit [Quit: axl_]
codecop has joined #ruby
Catbuntu has joined #ruby
h4mz1d has quit [Ping timeout: 264 seconds]
axeman- has quit [Ping timeout: 264 seconds]
avril14th has quit [Remote host closed the connection]
axeman- has joined #ruby
Neomex has joined #ruby
ewnd9 has quit [Remote host closed the connection]
Neomex has quit [Client Quit]
alex__c2022 has joined #ruby
ewnd9 has joined #ruby
PhatBaja has quit [Ping timeout: 245 seconds]
henn has joined #ruby
henn has joined #ruby
henn has quit [Changing host]
smathieu has joined #ruby
<f1gjam> ok, new problem, I want to 'package' my scripts into a single file, and just run ruby myScript which then runs the correct rb file
<f1gjam> whats the best way to do this
poseid has quit [Quit: Leaving.]
camilasan has quit [Remote host closed the connection]
scarolan_ has quit [Ping timeout: 256 seconds]
ColKurtz has joined #ruby
scarolan has joined #ruby
nomadic has quit [Ping timeout: 245 seconds]
Krajsnick has quit [Remote host closed the connection]
<kurtisnelson> f1gjam: sounds like you want to make a gem
codecop has quit [Remote host closed the connection]
Krajsnick has joined #ruby
anildigital is now known as _anildigital
Krajsnick has quit [Remote host closed the connection]
<f1gjam> kurtisnelson: ok let me look up creating a gem
<kurtisnelson> bundle gem GEM_NAME is the quick way
scarolan has quit [Ping timeout: 245 seconds]
<jb41> does anybody use lazy high charts with rails 4.0.0?
scarolan has joined #ruby
<jb41> it seems that it's not working here, or i'm doing something wrong...
kreisys has quit [Quit: Computer has gone to sleep.]
blip99 has quit [Ping timeout: 264 seconds]
end_guy_ is now known as end_guy
bradhe has joined #ruby
browndawg has quit [Quit: Leaving.]
mikecmpbll has quit [Quit: ["Textual IRC Client: www.textualapp.com"]]
blaxter has quit [Quit: foo]
realDAB has quit [Quit: realDAB]
thiagopnts has joined #ruby
thiagopnts has joined #ruby
<ericwood> jb41: #rubyonrails
mityaz has joined #ruby
timonv has joined #ruby
<jb41> sorry
<ericwood> no worries
bradhe has quit [Remote host closed the connection]
LiVe0UR0L has joined #ruby
ephemerian has quit [Quit: Leaving.]
bradhe has joined #ruby
rodacato has quit [Remote host closed the connection]
scarolan has quit [Ping timeout: 246 seconds]
dankest has joined #ruby
<LiVe0UR0L> hi all
<LiVe0UR0L> any one has any ruby ebooks
<LiVe0UR0L> i want to learn it
scarolan has joined #ruby
<zendeavor> google has lots
<ericwood> google for "ruby ebooks"
<LiVe0UR0L> any suggestion!
<zendeavor> the ones in the google results
<LiVe0UR0L> i want books that you have read them
browndawg has joined #ruby
<LiVe0UR0L> the books you learned from them
sayan has joined #ruby
<zendeavor> the ones in the google results.
rodacato has joined #ruby
pskosinski has joined #ruby
_veer has quit [Ping timeout: 256 seconds]
<Xeago> zendeavor: learn ruby the hard way
<Xeago> sorry LiVe0UR0L
<zendeavor> yeah him
<Xeago> but honestly, use google
bradhe has quit [Ping timeout: 264 seconds]
goodgame has quit [Ping timeout: 245 seconds]
scarolan has quit [Ping timeout: 264 seconds]
superscott[8] has joined #ruby
Vivekananda has joined #ruby
Kricir has joined #ruby
scarolan has joined #ruby
_veer has joined #ruby
ffranz has quit [Ping timeout: 256 seconds]
Krajsnick has joined #ruby
mneorr has quit [Remote host closed the connection]
todd_work has quit [Ping timeout: 264 seconds]
<f1gjam> are you required to put ruby gems as required ??
mneorr has joined #ruby
chrisja has joined #ruby
mahmoudimus has joined #ruby
shaunbak_ has quit [Remote host closed the connection]
pskosinski has quit [Ping timeout: 240 seconds]
zmike1234 has joined #ruby
pskosinski has joined #ruby
i_s has joined #ruby
toddWork_ has joined #ruby
scarolan has quit [Ping timeout: 268 seconds]
scarolan has joined #ruby
<robert_> argh; this is really pissing me off- gem is saying rubygems-bundler isn't installed, yet I've just installed it like twice.
adeponte has joined #ruby
mneorr has quit [Ping timeout: 246 seconds]
<zendeavor> fix your paths
BillCris_ has joined #ruby
sailias1 has joined #ruby
codecop has joined #ruby
DanKnox_away is now known as DanKnox
tatsuya_o has joined #ruby
sailias has quit [Ping timeout: 264 seconds]
tjbiddle has joined #ruby
BillCriswell has quit [Read error: Operation timed out]
scarolan has quit [Ping timeout: 268 seconds]
Kar- has quit [Read error: Connection reset by peer]
Matip has joined #ruby
scarolan has joined #ruby
mrsolo has joined #ruby
tatsuya__ has quit [Ping timeout: 256 seconds]
zeade has joined #ruby
twoism has joined #ruby
LiVe0UR0L has left #ruby [#ruby]
tatsuya_o has quit [Ping timeout: 264 seconds]
Kricir has quit [Remote host closed the connection]
ffranz has joined #ruby
Mattix has quit [Read error: Operation timed out]
manutter has quit [Quit: KVIrc 4.2.0 Equilibrium http://www.kvirc.net/]
<robert_> zeade: I haven't touched my paths. it shows other gems just fine.
scarolan has quit [Ping timeout: 264 seconds]
bradhe has joined #ruby
vasilakisFiL has left #ruby ["Konversation terminated!"]
javar has quit [Quit: javar]
scarolan has joined #ruby
Kar- has joined #ruby
Tarential has quit [Excess Flood]
bradsmith has quit [Remote host closed the connection]
Tarential has joined #ruby
ehc has quit [Quit: ehc]
iliketurtles has joined #ruby
axl_ has joined #ruby
apeiros has quit [Remote host closed the connection]
Spooner has quit [Remote host closed the connection]
scarolan has quit [Ping timeout: 264 seconds]
ItsAshleyP has joined #ruby
byprdct has joined #ruby
scarolan has joined #ruby
<ItsAshleyP> Hello! I'm new to programming, so just joining to learn some tips and get some advice!
rupee has joined #ruby
<zendeavor> start with C
jsummerfield has quit [Quit: jsummerfield]
l3ck has joined #ruby
Elhu has quit [Quit: Computer has gone to sleep.]
<ItsAshleyP> really? I'm been told to start with ruby?!
saarinen has joined #ruby
<zendeavor> how misleading
<ItsAshleyP> really? How come?
<zendeavor> you actually should start with some maths background
<MrZYX> ItsAshleyP: zendeavor is just trolling ;)
<zendeavor> not so much trolling as being perfectly honest.
h4mz1d has joined #ruby
bradsmith has joined #ruby
<ItsAshleyP> I'm so confused! Everyone is telling me something different, haha...some are telling me to start with Java, Ruby, PHP, etc...I don't know where to start!
thomasle_ has joined #ruby
cads has joined #ruby
RichardBaker has joined #ruby
<MrZYX> ruby is a perfect choice ;)
<hanmac> going C -> C++ -> Ruby is good because with this you allways feel better ;P
<brisbin> start by finding a problem to solve, solve it in any language
<zendeavor> ruby will suit you just fine if you can accept that you won't be likely to write inefficient algorithms by default
<alienaut> i think c is good choice for beginning
<zendeavor> s/won't/will/
<spike|spiegel> hanmac: C -> C++ doesn't make me feel better :)
<hanmac> when you do C++ you are happy that you dont need to do pure C anymore ;P
<spike|spiegel> it makes me want to stab someone.
<ItsAshleyP> I'm looking more for mobile web and app development...so which is the best
<ItsAshleyP> iOS...
<Xeago> none
blaxter_ has joined #ruby
<zendeavor> they all blow
<alienaut> pure c is good for learning basics.
<ItsAshleyP> lwow..
scarolan has quit [Ping timeout: 256 seconds]
<Xeago> ItsAshleyP: you want a background
<Xeago> write some pseudo code to find the first 10 prime numbers
<zendeavor> you can't just dive straight into mobile development
<ItsAshleyP> I'm basically learning from scratch...
<zendeavor> it requires special attention to detail
popl has joined #ruby
<brisbin> sure you can, there's a small chance it'll end well
scarolan has joined #ruby
trepidaciousMBR has quit [Ping timeout: 264 seconds]
<hanmac> you can programm for iOS? i thought you need to sell your soul to apple to do that
<Xeago> then show people that pseudocode - that is the most important part
<ItsAshleyP> hanmac: lol
<Xeago> as long as you know what heck you are doing
<alienaut> ItsAshleyP: do you know how to use command line?
nitish has quit [Remote host closed the connection]
<zendeavor> ItsAshleyP: you need to learn from scratch with mathematics and a lower level high-level language like C
<Xeago> language, framework - it all becomes irrelevant
<aedorn> C->Prolog->OCAML->INTERCAL is the path to true insanity.
<zendeavor> anything that ends in INTERCAL is insanity
<Xeago> Prolog was cool..
axeman- has quit [Ping timeout: 256 seconds]
<Xeago> so was OCAML
<zendeavor> prolog is mindboggling to reason about
<ItsAshleyP> Who here is self taught?
<Xeago> mostly
* brisbin raises hand
<Xeago> taught by others of course, but on my own accord
<ItsAshleyP> brisbin: how long did it take?
<alienaut> ItsAshleyP: http://www.codeschool.com/
<zendeavor> still not done.
<aedorn> I'm self taught. I was taught to draw, not to program.
<brisbin> i'll never be done, so i cann't answer that
h4mz1d has quit [Max SendQ exceeded]
<zendeavor> nor is the answer releavnt to you
<zendeavor> relevant
maniacal has joined #ruby
<ItsAshleyP> what do you all think about codeacademy?
<Xeago> sure do it
<zendeavor> whatever floats your boat ItsAshleyP
h4mz1d has joined #ruby
<Xeago> but again, having some background on which you can rely is important
<Xeago> one possible background is mathematics
<alienaut> codecademy is ok for beginners
<zendeavor> ItsAshleyP: have you seen the MIT Structure and Interpretation lecture videos?
<ItsAshleyP> zendeavor: no I haven't
<ItsAshleyP> does anyone tutor here? haha
<zendeavor> it's on youtube.
<zendeavor> free.
<ItsAshleyP> I can't find a tutor in my area (NC)
<Xeago> ItsAshleyP: a tutor won't help
blip99 has joined #ruby
<ItsAshleyP> zendeavor: thanks, I'l check those out
<ItsAshleyP> Xeago: really? why?
<zendeavor> ItsAshleyP: you'll realize that you may aspire to different goals after you watch the course.
blackmesa has joined #ruby
<alienaut> ItsAshleyP: you may also take this course https://www.udacity.com/course/cs101
<Xeago> because you need some backing experience
<Xeago> as I said, try making some pseudo code to find the first 10 prime numbers
<zendeavor> and tutors aren't teachers, they are supplementary
<ItsAshleyP> alienaut: I have recently signed up for the Udacity program
<Xeago> pseudo code is code that is designed by your descretion
pskosinski has quit [Ping timeout: 240 seconds]
scarolan has quit [Ping timeout: 256 seconds]
<aedorn> hmmm
l3ck has quit [Quit: Bye!]
jorge_ has joined #ruby
scarolan has joined #ruby
<ItsAshleyP> I'm good at learning hands on...I need a course to follow
<zendeavor> learn ruby the hard way
nomadic has joined #ruby
<zendeavor> learn python the hard way
<zendeavor> learn c the hard way
<zendeavor> start with C
<zendeavor> and mathematics.
<spike|spiegel> start with logic.
<zendeavor> programming is, in a nutshell, one of the hardest fields of applied mathematics.
<ItsAshleyP> zendeavor: I will take your advice and start with C....how long have you been programming
<resure> C is bad for starting
<zendeavor> C is _perfect_ for starting.
<resure> Nope
<ItsAshleyP> WOW...lol
<resure> Pascal is MUCH better as first language
<zendeavor> learning sugar syntax is bad.
<spike|spiegel> NO, hand written assembly is perfect for starting.
<alienaut> i think any language is ok for starting
<wmoxam> c is bad for starting
<ItsAshleyP> resure: why is C bad for starting?
Yakko has quit [Quit: No Ping reply in 180 seconds.]
<ItsAshleyP> wmoxam: why?
<wmoxam> start with Scheme
pskosinski has joined #ruby
nikeita has joined #ruby
<hanmac> resure QBasic is good for starting … on an 386er ;P
Yakko has joined #ruby
<wmoxam> ItsAshleyP: beginners shouldn't be starting with manual memory management ;)
<endash> I think ruby is great for starting, but only a subset… think, "Ruby: The Easy Parts" a la "Javascript: The Good Parts"
obs has quit [Remote host closed the connection]
h4mz1d has quit [Ping timeout: 256 seconds]
dagobah has quit [Remote host closed the connection]
<endash> mostly… no metaprogramming
sn0wb1rdz has quit [Quit: ZNC - http://znc.in]
<zendeavor> beginners should absolutely start with memory management
<resure> ItsAshleyP: because there a lot of things that should be in first language
vlad_starkov has quit [Read error: Connection reset by peer]
<aedorn> ItsAshleyP: So what you should get from this is that everyone has an opinion, and it's all right, or wrong. Your best bet is exploring everything you can and figuring out what directly gets your attention first and then going that route until something else grabs it.
<zendeavor> that's one of the most fundamental and important concepts to consider when writing any and every algorithm.
<resure> What is include? What is main function? Why they should be in simple program? Etc etc.
<endash> I definitely have a different idea of what makes a beginner
dhruvasagar has joined #ruby
<wmoxam> zendeavor: completely disagree
<zendeavor> scripting != automation
<zendeavor> erm
<ItsAshleyP> resure: thanks
vlad_starkov has joined #ruby
<zendeavor> scripting == automation != programming
<ItsAshleyP> aedorn: good advice
<zendeavor> they are subsets
scarolan has quit [Ping timeout: 264 seconds]
<wmoxam> I'd say that Go is also decent for beginners
<resure> Beginner should learn basic algorithms and _programming_, not parts of C language. That's why I think it's better to start with something more simple (without sugar, just simple and logical language).
scarolan has joined #ruby
<wmoxam> Go doesn't have a ton of concepts to learn
<wmoxam> which is good
<endash> I definitely agree that we start people off way too high, with a "writing rails controllers for dummies" approach, but I'd handle the very low level stuff (like working space or complexity) academically and keep the language itself simple
<ItsAshleyP> I've heard the most popular, at the moment, are PHP , Objective C and Ruby
<zendeavor> C is an extremely minimal grammar, that makes it fit *great* for beginner programming
<zendeavor> ItsAshleyP: never touch php, ever, in your life.
<ItsAshleyP> zendeavor: why not?
<spike|spiegel> PHP is awesome. just for the lulz.
timonv has quit [Remote host closed the connection]
<aedorn> ItsAshleyP: As a side note, I know quite a few people who started specifically with basic iOS applications before anything else and they're programming just fine in all things now. Same with those who start with HTML/JavaScript first, or Ruby, or Erlang, or C, or even Prolog.
<ItsAshleyP> aedorn: how long have you been programming?
<endash> We don't gotta tear new programmers down to brass tacks and rebuild them in order for them to be good programmers, though
BillCris_ is now known as BillCriswell
<aedorn> just under 30 years
<zendeavor> ItsAshleyP: consider formal education; they don't start by teaching you how to write objective-C.
<superscott[8]> you should learn php only to learn why you should never touch any language that is like php
<ItsAshleyP> aedorn: wow, thats great
bklane has quit [Remote host closed the connection]
<ItsAshleyP> aedorn: do you use any other chat platforms? kik? twitter?
<zendeavor> ItsAshleyP: computer science courses DO teach languages like java and python as a means of teaching how to construct algorithms
<zendeavor> but not as a means of teaching how to *program*
<ItsAshleyP> zendeavor: I sign up for CS101...online
<ItsAshleyP> signed*
<ItsAshleyP> so I will be starting that soon
<zendeavor> i know, and i'm a bit disappointed that it uses a web-spider as the target program
<alienaut> ItsAshleyP: go for it. when it's done try other courses too.
<zendeavor> prefer not to involve WWW in beginner programming
rodacato has quit [Remote host closed the connection]
<ItsAshleyP> alienaut: I will!
AndChat- has quit [Quit: Bye]
iAreBaboon_ has joined #ruby
scarolan has quit [Ping timeout: 264 seconds]
cody-- has joined #ruby
<alienaut> ItsAshleyP: try coursera.org too
iAreBaboon_ has quit [Remote host closed the connection]
lkba has joined #ruby
<ItsAshleyP> alienaut: ok
<zendeavor> khanacademy
scarolan has joined #ruby
<ItsAshleyP> zeadeavor: will do
<Kelet> My first CS course was taught in C, my second CS course was taught in MIPS assembly :|
<popl> khaaaaaaaaaaaaaaaaaanacademy.com
<zendeavor> lolol Kelet
<aedorn> ItsAshleyP: Just Google Talk (gmail chat now, I guess, or is it Google+ chat? heh)
<alienaut> ItsAshleyP: take a look https://www.coursera.org/course/programming1
rickmasta has joined #ruby
<ItsAshleyP> aedorn: I have google chat..I thin
<ItsAshleyP> think*
<Kelet> Then they cram Java down our throat but never allow us to use any of the standard API that's of worth
vy has joined #ruby
zcreative has joined #ruby
<ItsAshleyP> alienaut:will do
itcharlie has joined #ruby
<alienaut> khanacademy is awesome for math learning but i never liked their cs programs
<zendeavor> Kelet: yeah, sounds a lot like CIS courses that teach shell scripting
<vy> What's wrong with pygments? When I try to gem install pygments it complains that Could not find a valid gem 'pygments' (>= 0) in any repository. Any ideas?
<zendeavor> alienaut: that is the point, entirely.
rodacato has joined #ruby
<ItsAshleyP> alienaut: I'm actually enrolled in that program!
<zendeavor> ItsAshleyP: if you want exercises to get started with, try euler
<ItsAshleyP> zendeavor: thanks....so your saying that I have to be great in Math to program?
tkuchiki has quit [Remote host closed the connection]
rdark has quit [Quit: leaving]
<zendeavor> no but you need a good grasp
<Xeago> ItsAshleyP: no, but math can be a good thing to fall back on
dhruvasagar has quit [Ping timeout: 264 seconds]
blip99 has quit [Ping timeout: 264 seconds]
<zendeavor> you can get by with just a logical approach to most algorithms
<Kelet> vy, gem install pygments.rb
<ItsAshleyP> zendeavor: ok
Dwarf has quit [Max SendQ exceeded]
<zendeavor> having a good grasp on mathematics is important for writing optimal algos
<Kelet> .rb is part of the actual project name
<Kelet> as yuck as that is
ferdev has quit [Quit: ferdev]
* Kelet thinks of PDF.rb
<zendeavor> you have to understand the numerical relationships
<vy> Kelet: Thanks so much.
<ItsAshleyP> zendeavor: this seems HARD
<Xeago> ItsAshleyP: as I said, a good, rough and tough first excercise is the calculate the first 10 prime numbers
<ItsAshleyP> I feel lost! lol
<zendeavor> i'm gonna stick with "write in C"
scarolan has quit [Ping timeout: 256 seconds]
graft has joined #ruby
graft has joined #ruby
graft has quit [Changing host]
<zendeavor> you don't even have to get *good* at C
awarner has quit [Ping timeout: 240 seconds]
<Kelet> I'd say see what your CS class uses and use whatever they use
<zendeavor> just learn the minimal grammar and how to create and manage a variety of data structures
scarolan has joined #ruby
nathancahill has joined #ruby
awarner has joined #ruby
<zendeavor> then when you move to something like python or ruby, the creation of data structures will be more or less
<zendeavor> automatic
_anildigital is now known as anildigital
<zendeavor> and you will only need to think back on your C days and think "this would work better as a ... instead of a ..."
spider-mario has joined #ruby
<ItsAshleyP> thanks for the advice everyone!
alienaut has left #ruby [#ruby]
<zendeavor> whoever led you here deserves a chop in the neck btw.
<ItsAshleyP> zendeavor: why?
<zendeavor> because they should have told you all of this instead.
<zendeavor> passing the buck, blegh.
sepp2k has joined #ruby
<ItsAshleyP> zendeavor: very true
<ItsAshleyP> zendeavor: thx
<zendeavor> what they really meant was
dhruvasagar has joined #ruby
grzywacz has joined #ruby
<zendeavor> "i don't want to be the one who has to explain why your implementation sucks, so just go use another language and ask them instead"
<aedorn> heh
scarolan has quit [Ping timeout: 245 seconds]
<zendeavor> on that note, i don't want to be the one to tell you why your ruby sucks, so go use C and ask them instead
LucidDreamZzZz has quit [Ping timeout: 240 seconds]
mikeg has joined #ruby
<zendeavor> ^_^
Zai00 has quit [Quit: Zai00]
Mars` has quit [Ping timeout: 245 seconds]
<ItsAshleyP> zeadeavor: I'm going to try C also
ItsAshleyP has quit [Quit: Page closed]
scarolan has joined #ruby
hitesh has joined #ruby
cj3kim has joined #ruby
anay has quit [Read error: Connection reset by peer]
luckyruby has joined #ruby
maniacal has quit [Ping timeout: 256 seconds]
mupkoo has quit [Read error: Connection reset by peer]
mupkoo has joined #ruby
mupkoo has quit [Remote host closed the connection]
bklane has joined #ruby
mneorr has joined #ruby
gansbrest has joined #ruby
axeman- has joined #ruby
scarolan has quit [Ping timeout: 264 seconds]
c0rn has joined #ruby
<gansbrest> hi. Getting this error duplicate argument name def get_target_ips(role, env, role, context)
<gansbrest> what would that mean, I can't see any duplicates there
scarolan has joined #ruby
apeiros has joined #ruby
<gansbrest> oh wait
saarinen has quit [Quit: saarinen]
cj3kim has quit [Ping timeout: 268 seconds]
<gansbrest> getting crazy )
dhruvasagar has quit [Ping timeout: 264 seconds]
pskosinski has quit [Quit: Til rivido Idisti!]
nignaztic has joined #ruby
<Kelet> lol
reset has joined #ruby
TIJ has joined #ruby
Hien has quit [Quit: leaving]
s00pcan_ has joined #ruby
scarolan has quit [Ping timeout: 256 seconds]
nazty has quit [Ping timeout: 264 seconds]
saarinen has joined #ruby
c0rn has quit [Quit: Computer has gone to sleep.]
scarolan has joined #ruby
Hien has joined #ruby
LucidDreamZzZz has joined #ruby
cantonic has quit [Quit: cantonic]
saarinen has quit [Client Quit]
Giorgio has quit [Ping timeout: 246 seconds]
sailias1 is now known as sailias
mneorr has quit [Remote host closed the connection]
gansbrest has quit [Quit: Ex-Chat]
suporte85 has quit [Quit: Saindo]
AndChat| has quit [Ping timeout: 268 seconds]
mneorr has joined #ruby
TIJ has quit [Quit: Konversation terminated!]
c0rn has joined #ruby
x1337807x has joined #ruby
chris____ has quit [Remote host closed the connection]
Banistergalaxy has joined #ruby
<tjbiddle> I'm writing a CLI and don't want to display stack traces unless --debug is specified. Can I catch exceptions inside a class rather than inside a method?
scarolan has quit [Ping timeout: 264 seconds]
rodacato has quit [Remote host closed the connection]
jorge_ has quit [Remote host closed the connection]
ehc has joined #ruby
scarolan has joined #ruby
<apeiros> tjbiddle: you can, but it won't do what you expect it to
jorge_ has joined #ruby
eldariof has joined #ruby
<tjbiddle> apeiros: Meaning?
<apeiros> it'll rescue (not *catch*, catch means something entirely different) exceptions raised by the class body code
stoffus has joined #ruby
<apeiros> restructure your code to have a single "main" method from which the rest of the code runs
rippa has joined #ruby
<apeiros> typically this is done in the fashion of your executable simply containing this:
<apeiros> require 'yourapp/cli'; YourApp::CLI.run(ARGV)
<apeiros> and then you'd have the rescue in CLI::run
codesoda has joined #ruby
anildigital is now known as _anildigital
tatsuya_o has joined #ruby
chris____ has joined #ruby
pyrac has joined #ruby
mneorr has quit [Ping timeout: 264 seconds]
hitesh has quit [Read error: Connection reset by peer]
<apeiros> (this has the positive side effect of making your whole app easier to test)
<tjbiddle> apeiros: Hm. Trying to figure out if I can still inherit from Thor (CLI parsing gem) to grab the --verbose and --debug args, yet have a 'main' method. Been getting closer to that every time I've refactored - but haven't hit it yet. Probably just thinking about it wrong. Thanks!
<apeiros> k, don't know about Thor. yw, good luck :)
scarolan has quit [Ping timeout: 264 seconds]
robbyoconnor has quit [Read error: Connection reset by peer]
rippa has quit [Client Quit]
guiocavalcanti has quit [Ping timeout: 264 seconds]
guiocavalcanti has joined #ruby
robbyoconnor has joined #ruby
jorge_ has quit [Ping timeout: 268 seconds]
scarolan has joined #ruby
sn0wb1rdz has joined #ruby
kpshek has quit [Ping timeout: 256 seconds]
swordsmanz has quit [Ping timeout: 256 seconds]
robscomputer has joined #ruby
cj3kim has joined #ruby
vy has quit []
Dwarf has joined #ruby
[narcan] has quit [Quit: -[AppDelegate installMalware]: unrecognized selector sent to instance 0x156109c0]
cody-- has quit [Quit: Computer has gone to sleep.]
mikeg has quit [Remote host closed the connection]
scarolan has quit [Ping timeout: 264 seconds]
erry has quit [Read error: Operation timed out]
robscomputer has quit [Remote host closed the connection]
scarolan has joined #ruby
io_syl has joined #ruby
ferdev has joined #ruby
blaxter_ has quit [Quit: foo]
terrellt has joined #ruby
kpshek has joined #ruby
rippa has joined #ruby
asteve has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
DocEternal has joined #ruby
matthieua has quit [Quit: Textual IRC Client: www.textualapp.com]
ninegrid has quit [Ping timeout: 246 seconds]
cibs has quit [Ping timeout: 256 seconds]
scarolan has quit [Ping timeout: 256 seconds]
Al_ has quit [Quit: Al_]
cibs has joined #ruby
PhatBaja has joined #ruby
stonevil has quit [Remote host closed the connection]
scarolan has joined #ruby
f1gjam has quit [Quit: f1gjam]
Kruppe has quit [Ping timeout: 264 seconds]
ColKurtz has quit [Quit: Textual IRC Client: www.textualapp.com]
wagster has quit [Quit: Textual IRC Client: www.textualapp.com]
sn0wb1rdz is now known as arangamani
PhatBaja has quit [Ping timeout: 245 seconds]
scarolan has quit [Ping timeout: 256 seconds]
sambao21 has quit [Quit: Computer has gone to sleep.]
dbRenaud is now known as zz_dbRenaud
devoldmx has quit [Read error: Connection reset by peer]
scarolan has joined #ruby
<shevy> constant_definitions.rb:1: Use RbConfig instead of obsolete and deprecated Config.
<shevy> hmm
akells` has joined #ruby
devoldmx has joined #ruby
<shevy> the code would be the same, just rather than Config, one would use RbConfig ?
sambao21 has joined #ruby
PhatBaja has joined #ruby
LaPetiteFromage has joined #ruby
jorge_ has joined #ruby
marcdel has joined #ruby
hamakn has quit [Remote host closed the connection]
reset has quit [Quit: Leaving...]
vikhyat_ has joined #ruby
Xeago has quit [Remote host closed the connection]
vikhyat has quit [Ping timeout: 246 seconds]
akells` has quit [Ping timeout: 256 seconds]
<robert_> shevy :D
scarolan has quit [Ping timeout: 264 seconds]
scarolan has joined #ruby
aqil has quit [Ping timeout: 246 seconds]
cibs has quit [Ping timeout: 256 seconds]
browndawg has quit [Quit: Leaving.]
Xeago has joined #ruby
splittingred has joined #ruby
cibs has joined #ruby
Elhu has joined #ruby
s00pcan_ has quit [Quit: Lost terminal]
Xeago has quit [Remote host closed the connection]
maniacal has joined #ruby
poseid has joined #ruby
javar has joined #ruby
mariappp has joined #ruby
ColKurtz has joined #ruby
ninegrid has joined #ruby
senayar has joined #ruby
scarolan has quit [Ping timeout: 264 seconds]
javar has quit [Client Quit]
<robert_> splittingred: fancy seeing you here. :p
adambeynon has quit [Quit: ["Textual IRC Client: www.textualapp.com"]]
scarolan has joined #ruby
<splittingred> oh?
arangamani is now known as sn0wb1rd
<robert_> splittingred: I've only ever seen you in modx. :p
<splittingred> ah, ha - no, i no longer work with modx; and have been doing ruby for 3-someodd years
<splittingred> generally prefer it to php
kayloos has quit [Remote host closed the connection]
<robert_> same.
jonathanwallace has quit [Quit: WeeChat 0.4.0]
carlyle has joined #ruby
<robert_> I'm trying to figure out why gem won't work correctly.
eregon has quit [Quit: No Ping reply in 180 seconds.]
<robert_> it thinks a gem isn't installed, but it is.
<robert_> fun, huh?
<splittingred> always
eregon has joined #ruby
interactionjaxsn has quit [Remote host closed the connection]
valerio1 has quit [Quit: Leaving.]
axeman- has quit [Remote host closed the connection]
interactionjaxsn has joined #ruby
mariappp has quit [Client Quit]
<Krajsnick> Is there an easy way of filtering out only specified key/value pairs from a Hash, and have it return a hash with only the value(s) I want
maria_ has joined #ruby
mariappp has joined #ruby
mariappp has quit [Client Quit]
maria_ has quit [Client Quit]
scarolan has quit [Ping timeout: 245 seconds]
bluOxigen has joined #ruby
machuga|away is now known as machuga
<lectrick> Idea: Embed a class' unit tests inside itself. Crazy-talk?
mariappp has joined #ruby
kevinykchan has quit [Quit: Computer has gone to sleep.]
<fryguy> lectrick: not really, it's somewhat common in python (doctest, etc)
<lectrick> so I could just do Classname.test and if nothing raises, unit test good
maria_ has joined #ruby
chris____ has quit [Remote host closed the connection]
jonahR has joined #ruby
chasep_work has joined #ruby
<fryguy> i don't know if anybody in ruby community does it though
scarolan has joined #ruby
<lectrick> fryguy: I can start.
maria_ has quit [Client Quit]
mariappp has quit [Client Quit]
<Krajsnick> fryguy: thanks!
mariappp has joined #ruby
<chasep_work> I've installed a gem (barometer) but when I do 'require barometer' in a script, it errors out, saying "cannot load such file -- barometer (LoadError)"
<chasep_work> any ideas?
<maniacal> test
<MrZYX> lectrick: not sure I'd like it, I mean is it the responsibility of a class representing, lets say a car, to test itself? Or isn't that rather the job of a distinct class, a car tester so to say
<MrZYX> chasep_work: can it be that you're still on ruby 1.8?
<fryguy> chasep_work: does the gem actually install a lib called barometer? are you using the same instance of ruby that you used to gem install it, or is it in a different rvm or something?
<chasep_work> ruby 1.9.3p194 (2012-04-20 revision 35410) [x86_64-linux]
interactionjaxsn has quit [Ping timeout: 264 seconds]
lnormous has quit [Ping timeout: 264 seconds]
<apeiros> lectrick: languages like eiffel even go beyond that and use design by contract. google it. I loved it and am still sad that ruby doesn't offer it.
<apeiros> (and no, even with rubys awesome metaprogramming you can't really add an equivalent)
cascalheira has quit [Quit: Linkinus - http://linkinus.com]
<chasep_work> fryguy: I do not know the answer to those questions, let me see if I can figure them out
relix has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<shevy> hehe
<MrZYX> chasep_work: do other gems work?
<shevy> apeiros will never stop liking eiffel :D
goshakkk has joined #ruby
<chasep_work> MrZYX: yes, all the other gems I've installed work fine, in the same scripts
zcreative has quit [Quit: Computer has gone to sleep.]
JimmyAtCMU has joined #ruby
<apeiros> shevy: that particular aspect belongs into any sane language
LaPetiteFromage has quit [Ping timeout: 264 seconds]
scarolan has quit [Ping timeout: 268 seconds]
<robert_> I'm having trouble using activesupport from a gemspec; my paths are those from sudo (or from simply logging in to the box); has anybody experienced similar trying to use activesupport and ruby 2.0?
kennyvb has quit [Quit: ZNC - http://znc.in]
timeout has quit [Quit: leaving]
scarolan has joined #ruby
LaPetiteFromage has joined #ruby
<JimmyAtCMU> Hi folks, what are some good resources for me to learn Ruby from scratch? (I have programming experience with Python and C.)
kennyvb has joined #ruby
nikeita has quit [Quit: sleep]
mark_locklear has quit [Quit: Leaving]
<chasep_work> okay, I added the gem to the Gemfile, ran bundle install (which didn't install anything, since it was already installed) and now it works
twoism has quit [Remote host closed the connection]
<MrZYX> well, that's expected behaviour
<MrZYX> I was just about to ask if you use bundler
iliketurtles has quit [Quit: zzzzz…..]
<chasep_work> MrZYX: ah, okay.. I've very little experience with Ruby, even less when you look beyond coding..... but, now I know a little more
<chasep_work> thanks for everyones help
<lectrick> apeiros: ah, interesting
saarinen has joined #ruby
saarinen has quit [Client Quit]
<lectrick> apeiros: surely you could approximate some sort of DbC solution in ruby?
scarolan has quit [Ping timeout: 264 seconds]
twoism has joined #ruby
aces1up has joined #ruby
reset has joined #ruby
Neomex has joined #ruby
scarolan has joined #ruby
<aces1up> how can i recursively call a method and also pass in a block IF it was passed?
saarinen has joined #ruby
<aces1up> if i do method(var, &block) it wants to ALWAYS have a block.
<aces1up> i just want to make it optional and pass it back to recursive method if it exists.
Neomex has quit [Client Quit]
browndawg has joined #ruby
<apeiros> lectrick: not really, no. one of the most important things is missing: 'old'
interactionjaxsn has joined #ruby
<apeiros> you can't sanely implement that in pure ruby. it needs language support (you want COW for that)
cantonic has joined #ruby
lemonsparrow_ has joined #ruby
<apeiros> the rest: yes, you can somewhat approximate. but without 'old', many things are pointless for objects with mutable state.
JimmyAtCMU has left #ruby [#ruby]
<MrZYX> aces1up: if block; recursive_call_with_block; else recursive_call_without_block; end;
<lectrick> apeiros: what does "old" do?
c0rn has quit [Ping timeout: 256 seconds]
devoldmx has quit [Read error: No route to host]
c0rn has joined #ruby
<apeiros> it provides the value prior to the method call
<lectrick> also, unrelated: Is it unreasonable to expect an object to be able to initialize with .new and no arguments at all?
lemonsparrow_ is now known as lemonsparrow
<apeiros> so you can perform comparisons between the object's state before and after the call in a method's post-conditions
<robert_> apeiros: hai.
<apeiros> hi robert_
<robert_> how's it going?
<aces1up> MrZYX cool got that part ok.. but how in this method(var, &block=nil)
LaPetiteFromage has quit [Ping timeout: 256 seconds]
<aces1up> that won't be allowed.
<lectrick> apeiros: can't you just use inspection to store that and compare it?
scarolan has quit [Ping timeout: 246 seconds]
<lectrick> apeiros: introspection I mean
<apeiros> lectrick: .new with no argument - depends on the class
<MrZYX> aces1up: yes, block will be nil if you pass no block
<aces1up> or just have not &block just block?
<lectrick> apeiros: re: .new ... but expecting ANY class to be able to do so? maybe unreasonable
<apeiros> lectrick: no. there is no sane way in plain ruby.
<apeiros> lectrick: you mean *every*?
<aces1up> rmerge!(other_hash, &block=nil)
<apeiros> then yes, unreasonable
scarolan has joined #ruby
<lectrick> apeiros: yeah, every. ok
<aces1up> won't accept it with the &
<apeiros> lectrick: are you looking for Class#allocate?
<lectrick> apeiros: is it at least a good guideline?
<aces1up> so just use block then?
babykosh has joined #ruby
S0da has quit [Quit: S0da]
<apeiros> lectrick: no
LaPetiteFromage has joined #ruby
<MrZYX> aces1up: def recursive(a, &block); if block; recursive(a, &block); else; recursive(a); end; end;
<apeiros> lectrick: Class#new should be able to create a fully fledged object
<lectrick> apeiros: I know about Class#allocate... just sometimes frustrated by merely wanting to grab an object instance
<apeiros> with a valid state
<lectrick> with no args?
L_p has joined #ruby
<babykosh> having a hell of a time installing 1.9.3p448 with rvm anyone else have trouble?
ananthakumaran has quit [Quit: Leaving.]
stoffus has quit [Ping timeout: 246 seconds]
<aces1up> MrZYX i tried that approach
<aces1up> wrong number of arguments calling `rmerge!` (2 for 1
<lectrick> babykosh: update rvm? also check the rvm channel
<babykosh> I did :( I am thanks
<aces1up> when not passing so just recursive(a, nil) on no block?
<tjbiddle> apeiros: Mind looking over something?
L_p has quit [Client Quit]
<apeiros> tjbiddle: no, but watching sc2 lifecast
<MrZYX> aces1up: exactly like I wrote, not ", nil"
L_p has joined #ruby
<apeiros> read: might reply late
<tjbiddle> apeiros: Heh - no worries. Take your time :-) Much appreciated! https://gist.github.com/thomasbiddle/5b71b63a30a1084c085f
ananthakumaran has joined #ruby
scarolan has quit [Ping timeout: 264 seconds]
senayar has quit [Remote host closed the connection]
<tjbiddle> Taking a second look at that - can probably use instance vars instead of class vars pretty easily. But besides the point :p
kleinerdrache has joined #ruby
scarolan has joined #ruby
Elhu has quit [Ping timeout: 256 seconds]
erry__ has joined #ruby
<kleinerdrache> can i do a wildcard variable for other params on a method definition?
Zolo has joined #ruby
<apeiros> tjbiddle: line 26 is probably a bug (@logger instead of @@logger)
banghouse has quit [Remote host closed the connection]
tvw has quit []
Elhu has joined #ruby
<apeiros> tjbiddle: if you're new to ruby, don't use @@class_variables - you probably do not know how they *really* work (they have nasty behaviors and are usually not what you want)
<kleinerdrache> oh params={} just seems to work
<kleinerdrache> def foo, bar, params={}
<kleinerdrache> right?
<tjbiddle> apeiros: It is, but interestingly enough it worked - Unless I somehow deleted it before copying.
<tjbiddle> apeiros: Not new to Ruby - But have never used class vars. Seemed like it may be what I want - but refactoring now to get rid of it already :p
rickmasta has quit [Quit: Leaving...]
gnufied has quit [Ping timeout: 264 seconds]
<apeiros> tjbiddle: any specific thing you want to know? or just generic advice?
<tjbiddle> Generic advice - and is that the correct way to approach what we were talking about earlier with rescuing exceptions on a cli app?
jbpros has joined #ruby
phantummm has joined #ruby
erry__ is now known as erry
scarolan has quit [Ping timeout: 264 seconds]
gnufied has joined #ruby
<apeiros> tjbiddle: ah, I see. Well, regarding BTInflection::start - yes, that's about what I meant.
scarolan has joined #ruby
<apeiros> tjbiddle: re generic advice: @@log_level - drop it, not needed. you can write a delegator with patches the call through to @@logger
<apeiros> you can even easily set the initial level
zmike1234 has quit [Quit: ~]
browndawg has left #ruby [#ruby]
<apeiros> I'd also probably move initialization of the logger into BTInflection::start and just default to Logger.new(STDOUT) with log-level Logger::WARN
L_p has quit [Quit: l_p]
gnufied has left #ruby [#ruby]
heftig has quit [Read error: Connection reset by peer]
Poloniy has joined #ruby
heftig has joined #ruby
SeySayux has quit [Ping timeout: 256 seconds]
scarolan has quit [Ping timeout: 264 seconds]
SeySayux has joined #ruby
scarolan has joined #ruby
rodacato has joined #ruby
atyz has joined #ruby
anonymuse has quit [Remote host closed the connection]
brennanMKE has quit [Read error: Connection reset by peer]
echevemaster has joined #ruby
unstable has joined #ruby
dmiller has joined #ruby
tatsuya_o has quit [Remote host closed the connection]
alvaro_o has joined #ruby
Olipro has quit [Ping timeout: 246 seconds]
havenwood has joined #ruby
<aces1up> MrZYX thanks, got it working, MrZYX have any suggestions on how to get this hash working?
anonymus_ has joined #ruby
scarolan has quit [Ping timeout: 264 seconds]
Dysruption has joined #ruby
scarolan has joined #ruby
cantonic has quit [Ping timeout: 264 seconds]
<Dysruption> what's the best way to package my .rb into an exe or standalone application?
dmiller has quit [Ping timeout: 264 seconds]
<MrZYX> aces1up: sanity check: the values do differ in your real code?
chris____ has joined #ruby
<havenwood> Dysruption: Take a look at Ocra: https://github.com/larsch/ocra#readme
<apeiros> aces1up: a.keys-b.keys # => all keys from a which are not present in b
<apeiros> and I hope you get how to delete an array of keys yourself ;-)
zcreative has joined #ruby
<aces1up> MrZYX yes they will be different.
<Dysruption> rubyscript2exe isn't working
<Dysruption> but i'll look at ocra
<havenwood> Dysruption: You can just put a shebang on the first line if you want to run it as a binary in *nix.
<aces1up> apeiros cool thanks.
marcdel has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<Dysruption> havenwood: it has to run in windows also unfortunately :/
timonv has joined #ruby
intuxicated has joined #ruby
<havenwood> Dysruption: I guess just Ocra the Windows version and `#!/usr/bin/env ruby` for pretty much everything else.
sambao21 has quit [Quit: Computer has gone to sleep.]
<Dysruption> havenwood: okay I'll give it a shot, thank you
<robert_> shevy: hai. sup? :D
lkba has quit [Quit: Bye]
lkba has joined #ruby
ananthakumaran has quit [Quit: Leaving.]
<aces1up> apeiros hey also when creating my own hash functions ex monkey patching Hash, when should i use self.key vs key, or does it matter? SHould i just always use self?
<shevy> hey robert_ ... struggling with moving to ruby 1.9 / 2.0 still ...
<apeiros> aces1up: it's methods, not functions :-p
sambao21 has joined #ruby
<aces1up> yeh still can't get that outta my head.
scarolan has quit [Ping timeout: 256 seconds]
<apeiros> aces1up: def self.method_name creates methods on the class, not for its instances
<aces1up> methods just seems like weird name.
<Dysruption> havenwood: does this work with ruby 2.0
<aces1up> no
<shevy> aces1up, well methods are just functions more intimately associated with objects
<aces1up> i meant referencing.
<robert_> shevy: I see. Same, sort of.
scarolan has joined #ruby
<aces1up> like class Hash ; def mymethod ; self.keys ; end
<shevy> robert_ :( it never stops!
<shevy> robert_ but I am going to have to use something else than yaml
<robert_> shevy: don't I know it, lol
<aces1up> or should it just be called direct like "keys"
<aces1up> i have seen both used.
<havenwood> Dysruption: I don't target Windows so I haven't tried it. If you have problems with 2.0 start a Github Issue, though it may 'just work'.
<shevy> robert_ right now I have to fix "circular require" in an ancient project, that is so boring ...
<aces1up> confused as to why you would use one over the other.
asteve has joined #ruby
<shevy> aces1up in your example it does not seem to be the same, or?
<shevy> keys could be a local variable name too, self.keys could never be
RichardBaker has quit [Quit: RichardBaker]
caveat- has quit [Ping timeout: 264 seconds]
<aces1up> Class Hash ; def mymethod() ; #self.keys would call keys on instance of Hash ; end
rodacato has quit [Remote host closed the connection]
Al_ has joined #ruby
ewnd9 has quit [Ping timeout: 264 seconds]
<shevy> and why is self. used here at all
<robert_> shevy: I'm having weird issues with active_support and ruby 2.0; for some reason, it doesn't want to load correctly.
<shevy> robert_ yay!
scarolan has quit [Ping timeout: 246 seconds]
<shevy> robert_ time to use php again
sayan has quit [Ping timeout: 245 seconds]
<robert_> shevy: tell me about it.
<robert_> I'll take my weird issues over php's nonsequiteur, thanks. :p
<apeiros> aces1up: I only write self.foo when for some reason necessary (e.g. self.class - due to `class` being a keyword)
codesoda_ has joined #ruby
<apeiros> reboot - laters
<shevy> http://www.tiobe.com/index.php/content/paperinfo/tpci/index.html ack ruby is behind javascript again
apeiros has quit [Remote host closed the connection]
scarolan has joined #ruby
Elhu has quit [Quit: Computer has gone to sleep.]
Ciscoridze has joined #ruby
c0rn has quit [Quit: Computer has gone to sleep.]
cantonic has joined #ruby
caveat- has joined #ruby
BizarreCake has quit [Ping timeout: 264 seconds]
<Krajsnick> can I combine an assignment with a case-statement in ruby=?
codesoda has quit [Ping timeout: 245 seconds]
<Krajsnick> like "my_var = case method"
<shevy> biolang_parser.rb:9: warning: setting Encoding.default_external
<shevy> ^^^ is there a way to disable this warning?
<matled> Krajsnick: yeah, that works
<shevy> yeah Krajsnick
browndawg has joined #ruby
tabolario has joined #ruby
<havenwood> shevy: Have you looked at how Tiobe does it rankings? It is humorously pathetic it turns out.
mikepack has quit [Read error: Connection reset by peer]
kleinerdrache has quit [Quit: Ex-Chat]
mikepack has joined #ruby
<matled> Krajsnick: same for if, the value of an if is the value of the last expression of the branch that is executed (or nil if there is no else and the condition is false)
_veer has quit [Ping timeout: 264 seconds]
scarolan has quit [Ping timeout: 246 seconds]
<havenwood> I think RedMonk is a more sensible metric, just looking at SO and Github popularity: http://redmonk.com/sogrady/2013/07/25/language-rankings-6-13/
noop has joined #ruby
scarolan has joined #ruby
Elhu has joined #ruby
zeade has quit [Quit: Leaving.]
jonathanwallace has joined #ruby
twoism has quit [Remote host closed the connection]
marcdel has joined #ruby
colonolGron has joined #ruby
norm has left #ruby [#ruby]
<shevy> havenwood cool
<shevy> hmmmmm
<shevy> even there, php is more popular :(
havenwood has quit [Remote host closed the connection]
anonymus_ is now known as anonymuse
sam113101 is now known as sam113101_afk
havenwood has joined #ruby
cantonic has quit [Quit: cantonic]
sam113101_afk is now known as sam113101
marius has joined #ruby
scarolan has quit [Ping timeout: 268 seconds]
apeiros has joined #ruby
scarolan has joined #ruby
hamakn has joined #ruby
jbpros has quit [Quit: jbpros]
B|aster has joined #ruby
tvw has joined #ruby
havenwood has quit [Ping timeout: 264 seconds]
shadoi has joined #ruby
Blaster has quit [Ping timeout: 256 seconds]
kayloos has joined #ruby
jbpros has joined #ruby
scarolan has quit [Ping timeout: 264 seconds]
<aces1up> any help to get my recursive compare_delete method working?
hamakn has quit [Ping timeout: 264 seconds]
scarolan has joined #ruby
anonymuse has quit [Remote host closed the connection]
colonolGron has quit [Ping timeout: 256 seconds]
RichardBaker has joined #ruby
kayloos has quit [Remote host closed the connection]
stonevil has joined #ruby
marcdel has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<Nilium> Well, the first step would be to make it recursive.
anonymuse has joined #ruby
nikeita has joined #ruby
Al_ has quit [Quit: Al_]
cody-- has joined #ruby
d2dchat has quit [Remote host closed the connection]
<zendeavor> =\
x1337807x has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
scarolan has quit [Ping timeout: 264 seconds]
scarolan has joined #ruby
brianpWins has joined #ruby
jbpros has quit [Quit: jbpros]
cj3kim has quit [Remote host closed the connection]
<apeiros> aces1up: generally doc tools pick up comments *before* the method definition, not within
<apeiros> also convention is to leave a space after the # sign
timonv has quit [Remote host closed the connection]
<Nilium> zendeavor: Well it's true. >_>
jbpros has joined #ruby
<Nilium> Neither method is recursive as is
love_color_text has joined #ruby
<Nilium> Plus I'm not really sure why someone would want to implement this as a recursive function.
tatsuya_o has joined #ruby
c0rn has joined #ruby
aces1up has quit []
Banistergalaxy has quit [Ping timeout: 256 seconds]
scarolan has quit [Ping timeout: 246 seconds]
<apeiros> I want to implement Integer#+ recursively
Dysruption has quit [Quit: Dysruption]
scarolan has joined #ruby
ebanoid has joined #ruby
<apeiros> also TrueClass#& and #|
browndawg has left #ruby [#ruby]
codesoda has joined #ruby
peregrine81 has joined #ruby
jbpros has quit [Ping timeout: 264 seconds]
rubarlion has joined #ruby
codesoda_ has quit [Ping timeout: 264 seconds]
pencilcheck has quit [Read error: Connection reset by peer]
Banistergalaxy has joined #ruby
scarolan has quit [Ping timeout: 256 seconds]
pen has joined #ruby
scarolan has joined #ruby
love_color_text has quit [Remote host closed the connection]
henn has quit [Ping timeout: 264 seconds]
<shevy> ruby setup.rb config
<shevy> setup.rb:804: Use RbConfig instead of obsolete and deprecated Config.
<shevy> hmm
<shevy> is setup.rb deprecated ?
codesoda_ has joined #ruby
<apeiros> the setup.rb you used is
codesoda has quit [Ping timeout: 264 seconds]
xcv has joined #ruby
cj3kim has joined #ruby
fcahoon has joined #ruby
vlad_starkov has quit [Read error: Connection reset by peer]
<shevy> hmm
poga has joined #ruby
scarolan has quit [Ping timeout: 264 seconds]
<shevy> http://i.loveruby.net/en/projects/setup/ is the latest I think, 3.4.1, also gives that warning
bhaak is now known as variantdealer
<shevy> apeiros, how do you install for local testing? when you update one of your projects for instance
decoponio has quit [Quit: Leaving...]
vlad_starkov has joined #ruby
scarolan has joined #ruby
<apeiros> shevy: report a bug then
cody-- has quit [Quit: Computer has gone to sleep.]
<apeiros> shevy: I don't install for testing
<apeiros> my test/runner.rb does the setup without the need for an installation
pyrac has quit [Quit: pyrac]
arya_ has quit []
<shevy> cool
sepp2k1 has joined #ruby
nikeita has quit [Quit: sleep]
pitzips has joined #ruby
scarolan has quit [Ping timeout: 264 seconds]
scarolan has joined #ruby
SiliconDon has joined #ruby
Catbuntu has quit [Quit: Leaving]
vlad_starkov has quit [Ping timeout: 264 seconds]
jbpros has joined #ruby
sepp2k has quit [Ping timeout: 264 seconds]
stoffus has joined #ruby
SiliconDon has quit [Client Quit]
kreisys has joined #ruby
fmcgeough has joined #ruby
colonolGron has joined #ruby
SiliconDon has joined #ruby
Zolo has quit [Remote host closed the connection]
senayar has joined #ruby
farn has quit [Quit: farn]
inf-groupoid has joined #ruby
arya_ has joined #ruby
bradhe has quit [Remote host closed the connection]
davedev24 has joined #ruby
<inf-groupoid> Noob here. How do I take a slice of an array from a given index to the end of the array? I tried xs[1...] and xs[1...-1], but the former is a syntax error and the latter excludes the last element of the list.
manutter has joined #ruby
tlewin has joined #ruby
scarolan has quit [Ping timeout: 246 seconds]
SiliconDon has quit [Client Quit]
Myconix has joined #ruby
SiliconDon has joined #ruby
dmiller_ has joined #ruby
<tjbiddle> apeiros: Thanks :-) Reimplemented. Scratched the class vars - But I am using a singleton pattern.
<tlewin> jon #twitlive
poga has quit [Remote host closed the connection]
<tjbiddle> apeiros: Mind giving your 2c again? I'll put together another gist if so
Nanuq has quit [Ping timeout: 245 seconds]
scarolan has joined #ruby
<apeiros> inf-groupoid: 1..-1
<apeiros> ranges with ... exclude the end
radic__ has quit [Ping timeout: 245 seconds]
poga has joined #ruby
senayar has quit [Ping timeout: 246 seconds]
<inf-groupoid> apeiros: Ah, thanks!
<apeiros> tjbiddle: just paste it, somebody else might give his 2c ;-)
zeade has joined #ruby
SiliconDon has quit [Client Quit]
Myconix has quit [Client Quit]
<tjbiddle> apeiros: Heh - alright :p
farn has joined #ruby
gustavn has quit [Quit: Leaving]
manutter has quit [Client Quit]
stonevil has quit [Remote host closed the connection]
saarinen has quit [Quit: saarinen]
brianpWins has quit [Quit: brianpWins]
alekst has joined #ruby
dmiller_ has quit [Ping timeout: 245 seconds]
pyrac has joined #ruby
x1337807x has joined #ruby
twoism has joined #ruby
hanmac has quit [Quit: Leaving.]
scarolan has quit [Ping timeout: 264 seconds]
<apeiros> tjbiddle: set_log_level --> log_level =
<apeiros> also, again, IMO unnecessary to store the loglevel yourself
scarolan has joined #ruby
<tjbiddle> apeiros: It's not accessible by the Logger object
saarinen has joined #ruby
<tjbiddle> Logger.level throws an exception
bamdad has joined #ruby
<apeiros> and @logger.level ?
codesoda_ is now known as codesoda
PhatBaja has quit [Quit: Leaving.]
<tjbiddle> wow
bradhe has joined #ruby
<tjbiddle> nevermind.
<tjbiddle> I could have sworn it did - Just tested in IRB and it didn't.
Speed has joined #ruby
saarinen has quit [Client Quit]
<apeiros> :)
<apeiros> Logger.level != Logger#level btw.
Dysruption has joined #ruby
<apeiros> former is calling it on Logger, latter is calling it on an instance
<tjbiddle> Yeah - I may have done that.
brianpWins has joined #ruby
<tjbiddle> Not sure, but hey - works, lol.
jorge_ has quit [Remote host closed the connection]
jorge_ has joined #ruby
saarinen has joined #ruby
gyre007 has quit [Ping timeout: 264 seconds]
brennanMKE has joined #ruby
scarolan has quit [Ping timeout: 245 seconds]
stonevil has joined #ruby
scarolan has joined #ruby
axl_ has quit [Quit: axl_]
gazarsgo has quit [Quit: gazarsgo]
Nanuq has joined #ruby
tlewin has quit [Quit: Page closed]
c0rn has quit [Quit: Computer has gone to sleep.]
reset has quit [Quit: Leaving...]
jorge_ has quit [Ping timeout: 264 seconds]
jaimef has quit [Excess Flood]
manutter has joined #ruby
gazarsgo has joined #ruby
<tjbiddle> apeiros: Thanks very much :-) This looks 100% better than what I started with
scarolan has quit [Ping timeout: 245 seconds]
senayar has joined #ruby
scarolan has joined #ruby
juo has joined #ruby
Elhu has quit [Quit: Computer has gone to sleep.]
anonymuse has quit [Remote host closed the connection]
happy4crazy has joined #ruby
Elhu has joined #ruby
stayarrr has joined #ruby
codesoda has quit [Remote host closed the connection]
radic has joined #ruby
x1337807x has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<happy4crazy> I'm trying to get Ruby 2.0 to work with DTrace, but for some reason I don't see any Ruby probes
codesoda has joined #ruby
<happy4crazy> e.g. with `sudo dtrace -l | grep ruby`
<happy4crazy> I've tried installing 2.0 with RVM as well as from source (with the --enable-dtrace flag)
jaimef has joined #ruby
eldariof has quit [Read error: Operation timed out]
codesoda_ has joined #ruby
pskosinski has joined #ruby
goshakkk has quit [Quit: Textual IRC Client: www.textualapp.com]
scarolan has quit [Ping timeout: 256 seconds]
pipework has quit [Remote host closed the connection]
thepumpkin has quit [Remote host closed the connection]
rsahae has joined #ruby
pskosinski has quit [Client Quit]
scarolan has joined #ruby
marcdel has joined #ruby
colonolGron has quit [Ping timeout: 256 seconds]
optimusprimem has joined #ruby
optimusprimem has joined #ruby
optimusprimem has quit [Changing host]
smathieu has quit [Remote host closed the connection]
anonymuse has joined #ruby
pipework has joined #ruby
rippa has quit [Quit: {#`%${%&`+'${`%&NO CARRIER]
peregrine81 has quit [Quit: peregrine81]
iliketurtles has joined #ruby
senayar has quit [Read error: No route to host]
codesoda has quit [Ping timeout: 268 seconds]
senayar has joined #ruby
<shevy> words.rb:20:in `scan': invalid byte sequence in US-ASCII (ArgumentError)
<shevy> hmmm
<shevy> ohhhh
<shevy> because I used File.readlines() somewhere else
metrix has joined #ruby
brennanMKE has quit [Read error: Connection reset by peer]
x1337807x has joined #ruby
brennanMKE has joined #ruby
scarolan has quit [Ping timeout: 245 seconds]
sayd has left #ruby ["Textual IRC Client: www.textualapp.com"]
Foo_Bar has joined #ruby
babykosh has quit [Quit: babykosh]
colonolGron has joined #ruby
<Foo_Bar> Hi, how should I learn Ruby from start? Any suggestions?
scarolan has joined #ruby
<shevy> Foo_Bar write many many small scripts
<shevy> have them do small things
<shevy> reuse that and build upwards
brbcoding has quit []
<shevy> Foo_Bar, work through this online tutorial first http://pine.fm/LearnToProgram/?Chapter=00
<shevy> make notes for yourself as you progress
Dysruption has quit [Quit: Dysruption]
<Foo_Bar> Thanks! I will do so now. :)
RichardBaker has quit [Ping timeout: 264 seconds]
ckrailo has quit [Quit: Textual IRC Client: http://www.textualapp.com/]
alekst has quit [Quit: Leaving...]
ckrailo has joined #ruby
rodacato has joined #ruby
lnormous has joined #ruby
<onewheelskyward> there are a ton of online resources ranging from guided to self-paced.
<onewheelskyward> Code academy comes to mind. Google learn ruby and see what pops up.
<metrix> if I throw the following into irb I get an undefined method for nil:nilclass : {}["abc"]["def"] is there a way to check to see if a hash within a hash exists without checking every level?
<shevy> hey we have array.uniq, but is there a simple way to get all non_uniqs?
JZTech101 has quit [Read error: Connection reset by peer]
<shevy> as in duplicates
ssvo_ has joined #ruby
mdmcaf has quit [Quit: Leaving]
stoffus has quit [Ping timeout: 245 seconds]
Giorgio has joined #ruby
<shevy> got it
<shevy> array.detect { |e| array.count(e) > 1 }
resure has quit [Changing host]
resure has joined #ruby
scarolan has quit [Ping timeout: 256 seconds]
<tjbiddle> How can I find out what class a method comes from? (In particular - the `warn` method - But in general as well)
Olipro has joined #ruby
Olipro has quit [Read error: Connection reset by peer]
scarolan has joined #ruby
<shevy> good question tjbiddle
thepumpkin has joined #ruby
trivol has joined #ruby
<shevy> it must be within .ancestors I think?
ssvo has quit [Ping timeout: 264 seconds]
poga has quit [Remote host closed the connection]
<shevy> metrix I dont think there is an easy way, but if your hash is complicated, you could use a method to query it, and safeguard against nil entries
<shevy> {}["abc"]["def"] if your_hash.has_key? 'abc'
<metrix> I am loading a yaml file that has hash values that don't exist in most cases. I want an empty array for those that don't exist
poga has joined #ruby
<metrix> and actually nilclass has a to_a feature which may give me what I need.
<interactionjaxsn> metrix: hash.fetch(:missing_hash){[]}
davedev24 has quit [Remote host closed the connection]
scarolan has quit [Ping timeout: 240 seconds]
goleldar has joined #ruby
<metrix> interesting
PhatBaja has joined #ruby
Foo_Bar has quit [Quit: irc2go]
<tjbiddle> shevy: Hm, I think that's for modules? It wouldn't work in irb when I tried with a method
<goleldar> I can't seem to get each_with_object to work with my code. Am I doing something wrong? https://gist.github.com/justinleveck/6125866
scarolan has joined #ruby
zastern has joined #ruby
yano has quit [Remote host closed the connection]
<metrix> enteractionjaxsn: {}["abc"]["def"].fetch(:missing_hash){[]} undefined method error in IRB
dagen has joined #ruby
jorge_ has joined #ruby
<popl> goleldar: I don't see #each_with_object anywhere in that code.
yekta has joined #ruby
<popl> goleldar: did you paste the wrong URL?
c0rn has joined #ruby
<interactionjaxsn> { one: 1, two: 2 }.fetch(:three){ [] }
dagen has left #ruby [#ruby]
nikeita has joined #ruby
peregrine81 has joined #ruby
marcdel has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
c0rn has quit [Client Quit]
codesoda_ has quit [Remote host closed the connection]
<goleldar> ok I updated it with both versions and the test file
<goleldar> when I run the tests with the each_with_object it returns the wrong results
c0rn has joined #ruby
jmimi has quit [Ping timeout: 245 seconds]
scarolan has quit [Ping timeout: 240 seconds]
JZTech101 has joined #ruby
<popl> what do you expect? what results do you get?
scarolan has joined #ruby
<goleldar> with each_with_object hamming_distance always returns 0
<goleldar> with inject it returns the correct values
<shevy> x =~ /'(.+)'/ # => nil
<shevy> hmmm
Guest10893 has joined #ruby
alex__c2022 has quit [Quit: alex__c2022]
<shevy> moment
RichardBaker has joined #ruby
<shevy> oh well
<shevy> I must give up on regexes, my brain is not made for them
<popl> quitter
nikeita has quit [Quit: bye bye]
reset has joined #ruby
<apeiros> shevy: your string does not contain single quotes
<popl> ^
<apeiros> >> 'http://pir.georgetown.edu/'.include?("'")
<eval-in> apeiros => false (https://eval.in/40042)
machuga is now known as machuga|away
<shevy> hmm
<apeiros> not a regex problem.
<shevy> ohhhh
pipework has quit [Remote host closed the connection]
<shevy> indeed
scarolan has quit [Ping timeout: 240 seconds]
<shevy> somehow my brain has already determined that there must be a ' inside
jorge_ has quit [Ping timeout: 264 seconds]
scarolan has joined #ruby
v1rr3n has joined #ruby
<epitron> been using 'sed' too much? :)
kaspergrubbe has joined #ruby
danman_ has joined #ruby
louism2wash has joined #ruby
<shevy> no, I actually hate sed, but here is what happened, I think
<shevy> in IRB, if you input a string with '' it replaces them with ""
<shevy> x = 'abc' # => "abc"
<shevy> x # => "abc"
<shevy> I am unsure if that is ruby behaviour or irb behaviour, but it confused me anyway
<shevy> I think it would be easier if I would use only this
<shevy> x = "abc"
<shevy> do you guys do that?
<apeiros> it replaces nothing
<graft> why do you have quotes in your regexp?
<apeiros> String#inspect just uses "
<graft> there are no quotes in your string
danman has quit [Ping timeout: 268 seconds]
danman_ is now known as danman
<graft> oh i am behind by a few lines
<louism2wash> Hey guys, I am trying to better understand threading. Hypothetically, if you had an application that could have n users simultaneously accessing it would ruby spin up n threads to support these requests? Thanks.
pyrac has quit [Quit: pyrac]
<shevy> graft I try to find all duplicate entries in a huge case/when structure
<apeiros> louism2wash: ruby does what you tell it to do
scarolan has quit [Ping timeout: 264 seconds]
<apeiros> it doesn't magically do whatever
<shevy> apeiros hmm I see
<apeiros> if you tell it to spin up a thread per accessing user, then yes, it will
havenwood has joined #ruby
bradhe has quit [Remote host closed the connection]
scarolan has joined #ruby
smathieu has joined #ruby
bamdad has quit [Quit: bamdad]
bradhe has joined #ruby
<louism2wash> apeiros: what would happen if you tell it to have a max of n threads and then it gets n+1 requests. Would it put that sixth request into a queue and then start executing once another thread is through processing?
<apeiros> louism2wash: you don't understand. what happens depends *entirely on what code you write on how to deal with it*
christopherhaine has joined #ruby
workmad3 has joined #ruby
<graft> louism2wash: threading isn't magic, and since threading knows nothing about your users or their connections, no, it won't put anything onto a queue
sailias has quit [Ping timeout: 264 seconds]
<graft> louism2wash: if you want your n+1 user to wait in a queue you have to build it
vlad_starkov has joined #ruby
marcdel has joined #ruby
<louism2wash> graft: thanks
christopherhaine has left #ruby [#ruby]
<louism2wash> apeiros: thanks
chris____ has quit [Read error: Connection reset by peer]
chris____ has joined #ruby
bamdad has joined #ruby
happy4crazy has left #ruby [#ruby]
stonevil has quit [Remote host closed the connection]
scarolan has quit [Ping timeout: 240 seconds]
danman_ has joined #ruby
jmimi has joined #ruby
stonevil has joined #ruby
anonymuse has quit [Remote host closed the connection]
scarolan has joined #ruby
yano has joined #ruby
danman_ has quit [Client Quit]
Zai00 has joined #ruby
danman has quit [Ping timeout: 240 seconds]
bradhe has quit [Ping timeout: 276 seconds]
Davey has quit [Quit: Computer has gone to sleep.]
popl has quit [Quit: We must make an idol of our fear, and call it God.]
vlad_starkov has quit [Ping timeout: 264 seconds]
smathieu has quit [Ping timeout: 240 seconds]
chris____ has quit [Read error: Connection reset by peer]
slap_stick has quit [Quit: CGI:IRC (Session timeout)]
Al_ has joined #ruby
chris____ has joined #ruby
reset has quit [Quit: Leaving...]
Es0teric has joined #ruby
scarolan has quit [Ping timeout: 248 seconds]
anonymuse has joined #ruby
carlyle has quit [Remote host closed the connection]
scarolan has joined #ruby
phantummm has quit [Quit: phantummm]
stonevil has quit [Ping timeout: 276 seconds]
bradhe has joined #ruby
kirun has joined #ruby
ehc has quit [Quit: ehc]
Spooner has joined #ruby
zcreative has quit [Quit: ["Textual IRC Client: www.textualapp.com"]]
tatsuya_o has quit [Remote host closed the connection]
marcdel has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
guiocavalcanti has quit [Remote host closed the connection]
tatsuya_o has joined #ruby
Xeago has joined #ruby
poga has quit [Remote host closed the connection]
havenwood has quit [Remote host closed the connection]
guiocavalcanti has joined #ruby
havenwood has joined #ruby
axl_ has joined #ruby
lemonsparrow has quit [Quit: Page closed]
kubrat has joined #ruby
alyi has joined #ruby
scarolan has quit [Ping timeout: 264 seconds]
scarolan has joined #ruby
Kar- has quit [Remote host closed the connection]
vlad_starkov has joined #ruby
Pandee has joined #ruby
Coolhand has quit [Remote host closed the connection]
ericmathison has joined #ruby
reset has joined #ruby
cj3kim has quit [Remote host closed the connection]
manutter has quit [Quit: KVIrc 4.2.0 Equilibrium http://www.kvirc.net/]
havenwood has quit [Ping timeout: 246 seconds]
kubrat has left #ruby [#ruby]
Al__ has joined #ruby
alyi has quit [Remote host closed the connection]
havenwood has joined #ruby
scarolan has quit [Ping timeout: 276 seconds]
scarolan has joined #ruby
noop has quit [Ping timeout: 264 seconds]
emergion has joined #ruby
Al_ has quit [Ping timeout: 276 seconds]
awarner has quit [Remote host closed the connection]
DocEternal has quit [Quit: Page closed]
tatsuya_o has quit [Remote host closed the connection]
cj3kim has joined #ruby
RichardBaker has quit [Ping timeout: 264 seconds]
spider-mario has quit [Remote host closed the connection]
Coolhand has joined #ruby
jp- has quit [Quit: OK, I believe you… but my tommy gun don't]
ldnunes has quit [Quit: Leaving]
scarolan has quit [Ping timeout: 241 seconds]
awarner has joined #ruby
akells` has joined #ruby
kreisys has quit [Quit: Computer has gone to sleep.]
v0n has quit [Ping timeout: 246 seconds]
roger_rabbit has quit [Quit: WeeChat 0.3.2]
Mon_Ouie has quit [Ping timeout: 256 seconds]
scarolan has joined #ruby
OffTheRails has quit [Remote host closed the connection]
soulcake has quit [Ping timeout: 248 seconds]
workmad3 has quit [Ping timeout: 264 seconds]
kayloos has joined #ruby
christopherhaine has joined #ruby
jds_ has joined #ruby
christopherhaine has quit [Client Quit]
rsahae has quit [Ping timeout: 264 seconds]
scarolan has quit [Ping timeout: 276 seconds]
rsahae has joined #ruby
wmoxam has quit [Ping timeout: 256 seconds]
shadoi1 has joined #ruby
Giorgio has quit [Remote host closed the connection]
shadoi has quit [Read error: Connection reset by peer]
soulcake has joined #ruby
MrThePlague has quit [Remote host closed the connection]
tatsuya_o has joined #ruby
stonevil has joined #ruby
brennanM_ has joined #ruby
Al__ has quit [Read error: Connection reset by peer]
colonolGron has quit [Quit: Lost terminal]
tatsuya_o has quit [Remote host closed the connection]
Davey has joined #ruby
Al_ has joined #ruby
brennanMKE has quit [Ping timeout: 246 seconds]
jbpros has quit [Quit: jbpros]
yekta has quit [Quit: yekta]
atno has joined #ruby
mariappp has quit [Ping timeout: 264 seconds]
smathieu has joined #ruby
grzywacz has quit [Quit: :wq]
Xeago has quit [Remote host closed the connection]
mityaz has quit [Quit: See ya!]
niklasb has joined #ruby
guiocavalcanti has quit [Remote host closed the connection]
kreisys has joined #ruby
Cyrus_ has joined #ruby
carlyle has joined #ruby
chris____ has quit [Read error: No route to host]
jonathanwallace has quit [Ping timeout: 264 seconds]
chris____ has joined #ruby
ehc has joined #ruby
stuartrexking has joined #ruby
guiocavalcanti has joined #ruby
guiocavalcanti has quit [Remote host closed the connection]
guiocavalcanti has joined #ruby
jalcine has quit [Excess Flood]
x1337807x has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
stonevil has quit [Remote host closed the connection]
apakatt has joined #ruby
Guest10893 has quit [Ping timeout: 264 seconds]
x1337807x has joined #ruby
superscott[8] has quit [Quit: superscott[8]]
Al_ has quit [Read error: Connection reset by peer]
Al_ has joined #ruby
ebanoid has quit [Quit: brbomgwtfbbq]
cj3kim has quit [Read error: Connection reset by peer]
cj3kim has joined #ruby
farn has quit [Quit: farn]
sdegutis has joined #ruby
farn has joined #ruby
mariappp has joined #ruby
henn has joined #ruby
<sdegutis> is it okay to do TCPSocket#read on a background thread?
threesome has quit [Ping timeout: 245 seconds]
vlad_starkov has quit [Remote host closed the connection]
cj3kim has quit [Read error: Connection reset by peer]
yacks has joined #ruby
<sam113101> 1 thread 1 client?
cj3kim has joined #ruby
<sdegutis> i dont understand that question
thiagopnts has quit [Quit: Leaving.]
grh has joined #ruby
fgo has joined #ruby
orionstein is now known as orionstein_away
<apeiros> sdegutis: why should it not be ok?
almostwhitehat has joined #ruby
fgo has quit [Remote host closed the connection]
kreisys has quit [Quit: Computer has gone to sleep.]
<sdegutis> cuz i was using Golang recently and it made me paranoid about whats ok or not on background threads
<sdegutis> i basically want to be able to read and write with a TCP socket at the same time. i dont know how threading works in ruby.
<apeiros> sdegutis: I suspect you're giving us partial information and expect us to read your mind
<sdegutis> i dont understand Thread#join :(
<apeiros> sdegutis: is that "background thread" the only thread accessing the socket?
<apeiros> Thread#join will stop the current thread until the thread you called .join on is finished.
<sdegutis> apeiros: im writing a client that will talk to a server, but the language is a custom language im creating where you can send and receive messages simultaneously, and i want my client to be able to wait for new messages without blocking it from sending messages to the server
<sdegutis> apeiros: yeah.
jerius has quit [Ping timeout: 256 seconds]
dEPy has quit [Remote host closed the connection]
<onewheelskyward> So you're building a message queue?
<sdegutis> other that this, its a 1-thread app
<sdegutis> i guess?
Nosnam has joined #ruby
arya__ has joined #ruby
fcahoon has quit [Quit: Leaving]
pentameter has quit [Read error: Connection reset by peer]
smoothbutta has joined #ruby
x1337807x has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
zcreative has joined #ruby
almostwhitehat has quit [Ping timeout: 240 seconds]
jalcine has joined #ruby
arya_ has quit [Ping timeout: 256 seconds]
Kricir has joined #ruby
m8 has quit [Quit: Sto andando via]
emergion has quit [Quit: Computer has gone to sleep.]
alexim has joined #ruby
Xeago has joined #ruby
akells` has quit [Remote host closed the connection]
fermion_ has quit [Quit: Textual IRC Client: www.textualapp.com]
superscott[8] has joined #ruby
<sdegutis> is there already a message queue built into ruby?
Mon_Ouie has joined #ruby
Mon_Ouie has joined #ruby
Mon_Ouie has quit [Changing host]
zcreative has quit [Client Quit]
<apeiros> there is Queue
<apeiros> which is thread-safe
<havenwood> sdegutis: Is the queue of a specific size, or just any size you want it?
arya__ has quit [Ping timeout: 246 seconds]
tvw has quit []
<havenwood> Yay Queue! :D
bradhe has quit [Remote host closed the connection]
gnufied has joined #ruby
bradhe has joined #ruby
BillCriswell has quit [Remote host closed the connection]
<sdegutis> havenwood: i dont think there is a size
Kricir has quit [Ping timeout: 276 seconds]
dmiller has joined #ruby
arya_ has joined #ruby
rsahae has quit [Quit: rsahae]
<sdegutis> you'll be sending and receiving messages at an indeterminate rate indefinitely
<havenwood> sdegutis: kk, was just gunna say SizedQueue is another thread safe option.
<sdegutis> ah
luckyruby has quit [Remote host closed the connection]
bamdad has quit [Quit: bamdad]
<havenwood> sdegutis: Or if you want a thread safe Array or Hash, maybe thread_safe gem: https://github.com/headius/thread_safe#readme
<havenwood> Though 2/3rds of that gem is the Java ext support >.>
atyz has quit [Quit: Linkinus - http://linkinus.com]
x1337807x has joined #ruby
xibalba has joined #ruby
<xibalba> ozzloy,
xibalba has left #ruby ["Leaving"]
<sdegutis> maybe that will get rid of this error I'm seeing
donal has joined #ruby
<sdegutis> "`recvfrom': recv for buffered IO (IOError)"
<sdegutis> oh no, they're unrelated.
Synthead has joined #ruby
donal has left #ruby [#ruby]
dmiller has quit [Ping timeout: 248 seconds]
splittingred has quit [Ping timeout: 264 seconds]
bradhe has quit [Ping timeout: 240 seconds]
mikeg has joined #ruby
Guest10893 has joined #ruby
afd__ has quit [Ping timeout: 264 seconds]
bamdad has joined #ruby
theRoUS has quit [Ping timeout: 268 seconds]
jlast has quit [Remote host closed the connection]
PsiCat has joined #ruby
maniacal has quit [Ping timeout: 256 seconds]
d2dchat has joined #ruby
<havenwood> sdegutis: If you're really looking for an implementation of channels in Ruby, Ilya Gregorik did the Agent gem, which Matz gave a shout out to a few months back.
_veer has joined #ruby
_veer has joined #ruby
_veer has quit [Changing host]
<sdegutis> havenwood: thanks, that might be what i need
<sdegutis> honestly i dont really know what i need
peregrine81 has quit [Quit: peregrine81]
interactionjaxsn has quit [Remote host closed the connection]
johnnyfuchs has quit [Remote host closed the connection]
arya_ has quit []
<sdegutis> i just know that this is way easier in an event-loop-driven app (objc) than ruby
<havenwood> Or there's r0bgleeson's ichannel for an inter-process communication channel: https://github.com/robgleeson/ichannel#readme
marius has quit [Quit: -]
Mon_Ouie has quit [Ping timeout: 246 seconds]
grh has quit [Ping timeout: 240 seconds]
interactionjaxsn has joined #ruby
arya_ has joined #ruby
rubarlion has quit [Remote host closed the connection]
<sdegutis> havenwood: that would be cool, but i have to use TCP
<havenwood> sdegutis: Celluloid::IO is pretty easy, and is threaded/evented-io: https://github.com/celluloid/celluloid-io#readme
mansi has quit [Remote host closed the connection]
<havenwood> sdegutis: Or EventMachine is the oldy-goldy.
guiocava_ has joined #ruby
mansi has joined #ruby
guiocavalcanti has quit [Ping timeout: 246 seconds]
<sdegutis> well i think Agent looks right for this queue, thanks
LaPetiteFromage_ has joined #ruby
rsahae has joined #ruby
Vivekananda has quit [Ping timeout: 246 seconds]
sailias has joined #ruby
blitz has joined #ruby
Vivekananda has joined #ruby
<blitz> I have a function that returns two variables, and I want to append those returned values to two separate lists - results, errors << function() doesn't seem to work
LaPetiteFromage has quit [Ping timeout: 246 seconds]
LaPetiteFromage_ is now known as LaPetiteFromage
<blitz> I'm guessing there is no way to do this on one line
interactionjaxsn has quit [Ping timeout: 240 seconds]
<terrellt> You could probably shift it into an array and do something fancy, but it'd be less readable than just writing it out.
<sdegutis> havenwood: is there some lib for TCP sockets to? TCPSocket seems very low-level and is randomly raising exceptions in #recvfrom, which i cant find anything about
louism2wash has quit [Quit: This computer has gone to sleep]
<havenwood> sdegutis: Depends what you're trying to do i think.
<havenwood> sdegutis: There are definately a plethora of libs built on top of Socket.
<sdegutis> i mean, i need the low-level-ness of reading a certain number of bytes. i just wish it would do error-handling/looping for me
<havenwood> hmm
afd__ has joined #ruby
<rsahae> hey #ruby
<rsahae> I have a convention question
mansi has quit [Ping timeout: 248 seconds]
blitz has left #ruby ["Leaving"]
<rsahae> I have a method which is 100% just a wrapper for another method
<rsahae> for example
trivol has quit [Ping timeout: 245 seconds]
<rsahae> def exec str; ssh.exec! str; end
<rsahae> where ssh is some ssh instance
<rsahae> like an instance variable
<rsahae> since the Net::SSH method is a bang method
<rsahae> does convention say my method should be a bang method?
<rsahae> so
<rsahae> def exec! str; @ssh.exec! str; end
baordog has quit [Remote host closed the connection]
Guest10893 has quit [Ping timeout: 240 seconds]
<rsahae> or am I free to name it with or without the bang
jinie has quit [Read error: Operation timed out]
zodiak has quit [Ping timeout: 268 seconds]
<rsahae> obviously I'm free to name it whatever I want
<rsahae> but what is the convention for a wrapper like this?
senayar has quit [Remote host closed the connection]
havenwood has quit [Remote host closed the connection]
havenwood has joined #ruby
nari has joined #ruby
Zai00 has quit [Quit: Zai00]
thiagopnts has joined #ruby
thiagopnts has quit [Changing host]
thiagopnts has joined #ruby
Krajsnick has quit [Remote host closed the connection]
PaulePanter has joined #ruby
Al_ has quit [Read error: Connection reset by peer]
wmoxam has joined #ruby
<chasep_work> http://pastie.org/8194943 what am I doing wrong?
Al_ has joined #ruby
<apeiros> everything
includex has joined #ruby
<chasep_work> it's actually part of a class method, so the @ isn't the issue
<MrZYX> .strip! returns nil if it doesn't change anything
Xeago has quit [Remote host closed the connection]
<chasep_work> ah, okay
senayar has joined #ruby
<chasep_work> I read the description of that wrong
mercwithamouth has joined #ruby
babykosh has joined #ruby
havenwood has quit [Ping timeout: 240 seconds]
jinie has joined #ruby
kaspergrubbe has quit [Remote host closed the connection]
<sdegutis> is there no TCPSocket wrapper for Ruby?
<sdegutis> im googling like crazy with no luck
<MrZYX> also to_s() looks weird in ruby :P and #{} calls that anyway
<chasep_work> MrZYX: is there a method that is going to return the string, but without leading/trailing whitespace?
<MrZYX> .strip
RichardBaker has joined #ruby
blip- has joined #ruby
<MrZYX> but there really is no need to call it
jefflyne has quit [Quit: My Mac Mini has gone to sleep. ZZZzzz…]
dorei has joined #ruby
<dorei> hello, how can I convert a class method into proc ?
h4mz1d has joined #ruby
<beingjohnm> would ruby (net::http specifically) perform differently on CentOS compared to Ubuntu? I'm receiving an error on one system and I can't figure it out.
codesoda has joined #ruby
senayar has quit [Ping timeout: 245 seconds]
zodiak has joined #ruby
<sdegutis> oh i see now, its https://github.com/celluloid/celluloid-io
<apeiros> dorei: depends. proc { |*args| Foo.bar(*args) } # one way, Foo.method(:bar) is another (the latter creates a Method instance, but that might be sufficient in most cases)
bradhe has joined #ruby
tatsuya_o has joined #ruby
<apeiros> oh, cross-poster
<chasep_work> MrZYX: well, why isn't @page_number @page_number.to_s().strip || rand(2..409).to_s() giving me an empty (or perhaps whitespace) string back? I can leave off the .to_s() or the .strip, and it's still the same
dorei was kicked from #ruby by apeiros [cross-posting without informing in all channels that you cross-post is unwelcome. this is only a kick, not a ban. consider it a warning.]
mikeg has quit [Remote host closed the connection]
dorei has joined #ruby
brennanMKE has joined #ruby
<dorei> oh, i didnt know about cross posting ,sorry
<apeiros> it's nothing one needs to know. it's basic decency.
<dorei> it's really strange that there are two channels about ruby though
<sdegutis> fwiw i didnt know it was wrong either, and i consider myself a pretty decent person
<zendeavor> they are about two different topicalities related to ruby.
blip- has quit [Remote host closed the connection]
<sdegutis> but that wasnt obvious
maniacal has joined #ruby
<apeiros> zendeavor: no. they were just founded by different people.
<zendeavor> both official?
thiagopnts has quit [Quit: Leaving.]
<apeiros> define official. #ruby-lang is mentioned on ruby-lang.org
brennanM_ has quit [Ping timeout: 276 seconds]
<apeiros> neither was founded by matz
<zendeavor> by freenode standards
<MrZYX> chasep_work: an empty string is still true in ruby, so this still won't do what you want
<zendeavor> ## prefix for non-official channels
<apeiros> by freenode standards, I think both would actually need ##
<zendeavor> then i concede.
<apeiros> not entirely sure, though, as I don't really care :)
gazarsgo has quit [Quit: gazarsgo]
<chasep_work> MrZYX: ah! that explains it
<zendeavor> means nothing to me, really
breakingthings has quit [Quit: breakingthings]
arya_ has quit [Ping timeout: 276 seconds]
<_br_> /names
LaPetiteFromage has quit [Quit: LaPetiteFromage]
<apeiros> dorei: re basic decency: of course you didn't inform #ruby-lang that you got an answer already. somebody else wastes time to answer your question. qed.
maniacal has quit [Ping timeout: 240 seconds]
sailias has quit [Ping timeout: 240 seconds]
mariappp has quit [Ping timeout: 264 seconds]
<apeiros> your question at least wasn't one where somebody would spend a couple of minutes on it.
rhys has quit [Quit: Leaving]
<chasep_work> MrZYX: got it working. Thanks again!
tatsuya_o has quit [Ping timeout: 248 seconds]
maniacal has joined #ruby
jds_ has quit [Remote host closed the connection]
zenergi has joined #ruby
mikeg has joined #ruby
senayar has joined #ruby
saarinen has quit [Quit: saarinen]
rubarlion has joined #ruby
nathancahill has quit [Quit: nathancahill]
kpshek has quit []
nemesit|znc has quit [Ping timeout: 240 seconds]
jonathanwallace has joined #ruby
asobrasil has left #ruby [#ruby]
Elhu has quit [Quit: Computer has gone to sleep.]
maniacal has quit [Ping timeout: 240 seconds]
tabolario has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
x1337807x has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
h4mz1d has quit [Ping timeout: 248 seconds]
zenergi has quit [Ping timeout: 240 seconds]
Kruppe has joined #ruby
jorge_ has joined #ruby
chris____ has quit [Ping timeout: 264 seconds]
h4mz1d has joined #ruby
stayarrr has quit [Quit: Leaving...]
apakatt has quit [Quit: Leaving...]
Nosnam has quit []
devoldmx has joined #ruby
Senjai has quit [Ping timeout: 264 seconds]
havenwood has joined #ruby
babykosh has quit [Quit: babykosh]
vlad_starkov has joined #ruby
<bricker> Sorry for cross-post, thought I was in #ruby when I first posted this:
<bricker> Why does Ruby's RSS::Parser thing that "Fri, 26 July 2013 15:20:00 EST" is a "not available value" for pubDate?
<bricker> think*
nemesit|znc has joined #ruby
Megtastique has joined #ruby
tomzx_mac has joined #ruby
bradhe has quit [Remote host closed the connection]
jorge_ has quit [Ping timeout: 240 seconds]
saarinen has joined #ruby
bradhe has joined #ruby
dorei has left #ruby [#ruby]
niklasb has quit [Ping timeout: 245 seconds]
chxane has joined #ruby
mikepack has quit [Ping timeout: 246 seconds]
bklane has quit [Remote host closed the connection]
kirun has quit [Quit: Client exiting]
mikepack has joined #ruby
ravster has left #ruby [#ruby]
fridim__ has joined #ruby
vlad_starkov has quit [Ping timeout: 245 seconds]
jefflyne has joined #ruby
h4mz1d has quit [Ping timeout: 276 seconds]
Al_ has quit [Quit: Al_]
mikeg has quit [Remote host closed the connection]
codecop has quit [Remote host closed the connection]
devoldmx3 has joined #ruby
x1337807x has joined #ruby
maniacal has joined #ruby
bklane has joined #ruby
devoldmx has quit [Ping timeout: 241 seconds]
maniacal has quit [Remote host closed the connection]
d2dchat has quit [Remote host closed the connection]
rodacato has quit [Remote host closed the connection]
wmoxam has quit [Ping timeout: 240 seconds]
gstamp has joined #ruby
sambao21 has quit [Quit: Computer has gone to sleep.]
bklane has quit [Remote host closed the connection]
Megtastique has quit [Quit: Megtastique]
larissa has joined #ruby
<sdegutis> is there a small sinatra-esque lib for sending and receiving custom TCP messages in Ruby?
devoldmx3 has quit [Read error: Connection reset by peer]
dmiller has joined #ruby
bradhe has quit [Remote host closed the connection]
rsahae has quit [Quit: rsahae]
bradhe has joined #ruby
bradhe has quit [Read error: Connection reset by peer]
bradhe has joined #ruby
emergion has joined #ruby
_bart has quit [Remote host closed the connection]
bamdad has quit [Quit: bamdad]
freerobby has quit [Quit: Leaving.]
<xybre> sdegutis: could you pseudocode what it would look like in gist?
geggam has quit [Remote host closed the connection]
Nisstyre has quit [Quit: Leaving]
<sdegutis> sure
jmimi has left #ruby [#ruby]
dmiller has quit [Ping timeout: 248 seconds]
c0rn has quit [Quit: Computer has gone to sleep.]
Megtastique has joined #ruby
emergion has quit [Client Quit]
c0rn has joined #ruby
akells` has joined #ruby
nathancahill has joined #ruby
Pandee has quit []
<sdegutis> xybre: those are the only 3 functions i need. TCPSocket has the first one, but the second one is missing, and the third one (aka #recvfrom) is broken
kayloos has quit [Remote host closed the connection]
nathancahill has quit [Client Quit]
MrZYX is now known as MrZYX|off
mansi has joined #ruby
Ciscoridze has quit [Quit: WeeChat 0.4.1]
alexyz has joined #ruby
fredjean has quit [Quit: Computer has gone to sleep.]
kayloos has joined #ruby
alexyz has left #ruby [#ruby]
akells` has quit [Ping timeout: 264 seconds]
RichardBaker has quit [Ping timeout: 264 seconds]
rodacato has joined #ruby
mansi has quit [Ping timeout: 240 seconds]
_maes_ has quit [Quit: Miranda IM! Smaller, Faster, Easier. http://miranda-im.org]
aces1up has joined #ruby
<aces1up> can someone help me with my rmerge_existing! method here? http://codepad.org/3zrTqBwo
<aces1up> trying to get it to work correctly.
Tricon has joined #ruby
<xybre> sdegutis: pretty sure all that is doable. Do you have the Ruby TCP book?
AntelopeSalad_ is now known as AntelopeSalad
emergion has joined #ruby
<sdegutis> theres a book on this?
<sdegutis> xybre: i didnt even know there was one
<aces1up> should recursively merge all nested hashes and only merge hash if it has existing keys.
<sdegutis> xybre: im familiar with TCP. it just seems like someone would have written a lib to wrap all the logic for me
<havenwood> sdegutis: Great book, all of Storimer's are!
<sdegutis> kinda like CocoaAsyncSocket did for ObjC
maxmanders has quit [Quit: Computer has gone to sleep.]
maniacal has joined #ruby
chris____ has joined #ruby
mary5030 has quit [Ping timeout: 264 seconds]
<xybre> sdegutis: Its pretty nifty, Jesse Storimer wrote it. I do agree with you though, Ruby's socket programming interface just plain sucks. readpartial should do your read_to_length bit
<sdegutis> readpartial eh? hmm
<sdegutis> xybre: what is #read_to_length defined on?
mansi has joined #ruby
emergion has quit [Ping timeout: 260 seconds]
xcv has quit [Remote host closed the connection]
<xybre> sdegutis: you can also use gets with your delimiter. For example socket.gets("\r\n").
<xybre> It's been a few months since I did socket programming, so I had to look at my example app for the answers >.<
<havenwood> sdegutis: Do you want to block if there is no data to read?
<sdegutis> havenwood: well, i want to wait until there is data
<sdegutis> celluloid-io looked maybe relevant but way overkill
<sdegutis> some context:
max_ has joined #ruby
mansi has quit [Ping timeout: 264 seconds]
stuartrexkin has joined #ruby
<sdegutis> im writing a window manager for Mac. i want you to be able to register for global hot keys, and to be able to tell it to do things.
chris____ is now known as `Chris`
<sdegutis> im creating a custom TCP protocol to send JSON messages back and forth describing actions and stuff
<xybre> celluloid-io seems pretty neat, but last I checked it hadn't fully implemented the functionality, and it doesn't actually improve on the interface, it just makes it more robust.
<sdegutis> and i want to write a client in ruby that controls the app.
<sdegutis> later i also want to write clients in python and clojure etc
<havenwood> sdegutis: Maybe look at nio4r (what Celluloid::IO uses under the hood): https://github.com/celluloid/nio4r#readme
<sdegutis> thanks
<havenwood> sdegutis: ^ would give you evented-io without the actor model or threading.
<havenwood> and a more 'modern' approach than EM
Matip has quit [Quit: Leaving]
PsiCat has quit [Read error: Operation timed out]
Synthead has quit [Ping timeout: 245 seconds]
<sdegutis> thanks :)
mercwithamouth has quit [Quit: leaving]
atno has quit [Remote host closed the connection]
mercwithamouth has joined #ruby
<xybre> sdegutis: here's the TCP book too http://www.jstorimer.com/products/working-with-tcp-sockets
Mattix has joined #ruby
stuartrexking has quit [Ping timeout: 245 seconds]
Mattix has left #ruby [#ruby]
Tricon has quit [Quit: Leaving...]
brennanM_ has joined #ruby
brennanMKE has quit [Ping timeout: 246 seconds]
max_ has quit [Ping timeout: 245 seconds]
Myconix has joined #ruby
kaspergrubbe has joined #ruby
IceDragon has joined #ruby
razi has joined #ruby
<tjbiddle> Is there an equivalent to String.index() but look left instead of right?
osvico has joined #ruby
axl_ has quit [Quit: axl_]
jorge_ has joined #ruby
PhatBaja has quit [Quit: Leaving.]
tommyvyo has quit [Quit:]
tommyvyo has joined #ruby
kaspergrubbe has quit [Ping timeout: 245 seconds]
tommyvyo has quit [Client Quit]
devoldmx has joined #ruby
BillCriswell has joined #ruby
codesoda has left #ruby [#ruby]
mannyt has joined #ruby
tommyvyo has joined #ruby
sdegutis has quit [Remote host closed the connection]
tobyo has quit [Ping timeout: 268 seconds]
predator117 has joined #ruby
anonymuse has quit [Remote host closed the connection]
<zendeavor> reverse it
apeiros has joined #ruby
havenwood has quit [Remote host closed the connection]
predator217 has quit [Ping timeout: 256 seconds]
chrisja has quit [Quit: leaving]
havenwood has joined #ruby
jds_ has joined #ruby
sam113101 is now known as sam113101_afk
<tjbiddle> zendeavor: Haha, that's exactly what I did - And then added a comment: '# Lmao. there has to be an easier way to do this. Will find it later.'
rubarlion has quit [Ping timeout: 240 seconds]
sam113101_afk is now known as sam113101
x1337807x has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
havenwood has quit [Ping timeout: 245 seconds]
Davey has quit [Quit: Computer has gone to sleep.]
jds_ has quit [Ping timeout: 246 seconds]
axl_ has joined #ruby
sambao21 has joined #ruby
Dysruption has joined #ruby
mannyt has quit [Ping timeout: 245 seconds]
<Dysruption> what's the best way to store a ruby hash in a file for other programs to access
<Dysruption> i'm using JSON now but I'm having trouble preserving order
Davey has joined #ruby
<zendeavor> 1.9 creates sorted hashes by default
mannyt has joined #ruby
zenergi has joined #ruby
zenergi has quit [Client Quit]
<Nilium> Pretty sure it also preserves order of insertion. I think.
zachrab has joined #ruby
<zachrab> does anyone know the opposite of merge? I want to pop a hash off according to a key
sambao21 has quit [Ping timeout: 264 seconds]
enebo has quit [Quit: enebo]
mannyt has quit [Client Quit]
<zendeavor> tjbiddle: is #rindex() what you need?
<tjbiddle> zendeavor: Those look the same: https://gist.github.com/thomasbiddle/b95c56b356bee18f6a99
<aces1up> i need help with my recursive merge only existing keys in hash method here : http://codepad.org/MFYi6le1 seems to work until it gets to the top level hash which then just overwrites all the work previously done in the recursive loops.
dmiller has joined #ruby
<Nilium> zachrab: What's would the opposite of a merge do?
<Nilium> An intersection?
<zendeavor> >> "test".rindex('t')
<eval-in> zendeavor => 3 (https://eval.in/40048)
<zendeavor> tjbiddle: hrm?
<aces1up> they discuss that here.
Megtastique has quit [Quit: Megtastique]
[narcan] has joined #ruby
<tjbiddle> zendeavor: 't' is both the first and last character of 'test' ;-)
randomau_ has joined #ruby
<aces1up> want the resulting hash to have exactly the same keys as the first hash "h", but with values updated from the second hash "j" #<---- i want this but recusively in a hash.