apeiros_ changed the topic of #ruby to: Ruby 1.9.3-p286: http://ruby-lang.org || Paste >3 lines of text on http://gist.github.com
<arietis> how do i update hash values in ruby?
<arietis> are hashes mutable?
mercwithamouth has joined #ruby
hsbt_away is now known as hsbt
lggr has quit [Ping timeout: 255 seconds]
baroquebobcat has quit [Quit: baroquebobcat]
<arietis> looks like they are
<arietis> :)
<davidcelis> in what language are they not?
cbuxton has quit [Quit: Leaving.]
lggr has joined #ruby
<arietis> davidcelis: obj-c
Goles has quit [Ping timeout: 245 seconds]
advorak has quit [Quit: This computer has gone to sleep]
<davidcelis> lol objective-c
<davidcelis> lolbjective-c*
<arietis> there are mutable and immutable collections
<arietis> :)
Banistergalaxy has joined #ruby
kjellski has quit [Quit: Leaving]
vitor-br has joined #ruby
clj_newb has quit [Ping timeout: 245 seconds]
<davidcelis> NSMutable*
AndChat| has joined #ruby
lggr has quit [Ping timeout: 265 seconds]
friskd has quit [Read error: Operation timed out]
brianpWins has quit [Quit: brianpWins]
aantix_ has joined #ruby
c0rn_ has quit [Quit: Computer has gone to sleep.]
Banistergalaxy has quit [Ping timeout: 246 seconds]
aantix_ has quit [Read error: Connection reset by peer]
mercwithamouth has quit [Ping timeout: 255 seconds]
advorak has joined #ruby
aantix_ has joined #ruby
lggr has joined #ruby
judd7 has joined #ruby
Banistergalaxy has joined #ruby
Banistergalaxy has quit [Write error: Broken pipe]
Banistergalaxy has joined #ruby
aantix has quit [Ping timeout: 246 seconds]
melder has joined #ruby
AndChat| has quit [Ping timeout: 246 seconds]
nga4 has quit []
hackeron has quit [Ping timeout: 260 seconds]
nari_ has quit [Ping timeout: 246 seconds]
axl_ has quit [Quit: axl_]
justsee has joined #ruby
justsee has joined #ruby
justsee has quit [Changing host]
JonnieCache has joined #ruby
aantix_ has quit [Ping timeout: 246 seconds]
sneakyness_wk has quit [Quit: bro]
dagnachewa has quit [Read error: Connection reset by peer]
panpainter_ has joined #ruby
lggr has quit [Ping timeout: 255 seconds]
nitti has joined #ruby
* profx_ is about to watch last night's The Walking Dead
panpainter_ has quit [Client Quit]
tchebb has quit [Ping timeout: 246 seconds]
panpainter has quit [Ping timeout: 240 seconds]
jlwestsr has joined #ruby
dagnachewa has joined #ruby
mercwithamouth has joined #ruby
judd7 has quit [Quit: judd7]
AndChat| has joined #ruby
JonnieCache has quit [Read error: Operation timed out]
nitti has quit [Ping timeout: 260 seconds]
gmcabrita has joined #ruby
lggr has joined #ruby
slainer68 has quit [Remote host closed the connection]
dagnachewa has quit [Read error: Connection reset by peer]
Dreamer3 has quit [Quit: Computer has gone to sleep.]
Banistergalaxy has quit [Ping timeout: 246 seconds]
Dreamer3 has joined #ruby
chin-tastic has joined #ruby
AndChat| has quit [Ping timeout: 255 seconds]
axl_ has joined #ruby
lggr has quit [Ping timeout: 276 seconds]
hackeron has joined #ruby
jeffreybaird has quit [Quit: jeffreybaird]
lggr has joined #ruby
dakine has joined #ruby
tommyvyo has quit [Quit: ["Textual IRC Client: www.textualapp.com"]]
ZenGuy311 has quit [Ping timeout: 245 seconds]
squareduck has quit [Quit: Page closed]
mklappstuhl has joined #ruby
<profx_> ruby is now updated
ryanlecompte has quit [Remote host closed the connection]
davidcelis has quit [Quit: K-Lined.]
mikepack has quit [Remote host closed the connection]
lggr has quit [Ping timeout: 272 seconds]
judd7 has joined #ruby
judd7 has quit [Client Quit]
mando has joined #ruby
machogeek has joined #ruby
Goles has joined #ruby
<Spooner> arietis Just have irb/pry open all the time. You can work on those hypotheticals all you like then ;)
jjang has quit [Remote host closed the connection]
nwertman has quit [Quit: nwertman]
lggr has joined #ruby
syamajala has quit [Remote host closed the connection]
<machogeek> given this data set (http://pastie.org/private/hy9tkt6ozjfb2spohkzwg) is there a method to easily parse this in ruby or will i need to write a regex to split the values up?
rTypo has joined #ruby
mahmoudimus has joined #ruby
judd7 has joined #ruby
Synthead has quit [Quit: p33 ba115]
LouisGB has quit [Ping timeout: 265 seconds]
lggr has quit [Ping timeout: 245 seconds]
artOfWar has quit [Remote host closed the connection]
fridim_ has quit [Remote host closed the connection]
<blazes816> machogeek: how are they delimited? if it's tabs, you can split each line on \t
<machogeek> \t dose not import correctly
<machogeek> let me rephrase my question
mklappstuhl has quit [Ping timeout: 246 seconds]
<machogeek> Penny for your thoughts? I have a exercise I am working through, creating a import rake task around this data (http://pastie.org/private/hy9tkt6ozjfb2spohkzwg) It dose not parse correctly using '/t' and ruby 1.9.2 CSV's support. Is it best to use REGEX or is there something out there that will hold up to dirty data like this?
lggr has joined #ruby
cbuxton has joined #ruby
Foxandxss has quit [Quit: KVIrc 4.2.0 Equilibrium http://www.kvirc.net/]
lggr has quit [Ping timeout: 240 seconds]
lledet has joined #ruby
mahmoudimus has quit [Ping timeout: 240 seconds]
lggr has joined #ruby
cbuxton has quit [Ping timeout: 260 seconds]
bryan has joined #ruby
bryan is now known as Guest84615
nyrb has quit [Ping timeout: 260 seconds]
mklappstuhl has joined #ruby
nwertman has joined #ruby
slainer68 has joined #ruby
blazes816 has quit [Quit: blazes816]
lggr has quit [Ping timeout: 256 seconds]
nwertman has quit [Client Quit]
zeromodu_ has joined #ruby
mklappstuhl has quit [Ping timeout: 260 seconds]
<Spooner> machogeek: A regex sounds like the best solution. Since you have strings that aren't delimited (except by dates/number columns), you are going to struggle using anything else, I think.
zeromodulus has quit [Ping timeout: 246 seconds]
cardoni has quit [Quit: cardoni]
sguselnikov has joined #ruby
heftig has quit [Quit: leaving]
yshh has joined #ruby
lggr has joined #ruby
arietis has quit [Ping timeout: 252 seconds]
pac1 has joined #ruby
sn0wb1rd has quit [Quit: sn0wb1rd]
slainer68 has quit [Ping timeout: 248 seconds]
<machogeek> Spooner: I agree and thanks for the followup. Now i need to brush up on my regex :)
kiyoura has joined #ruby
judd7 has quit [Quit: judd7]
Kruppe has joined #ruby
MACscr has joined #ruby
lggr has quit [Ping timeout: 246 seconds]
mrsolo has quit [Quit: Leaving]
heftig has joined #ruby
<MACscr> hmm, suggestions for getting past this passenger install error? I dont know much about ruby at all: http://pastie.org/private/fcpca1hvdao91otibwwqg
<MACscr> this is on a CentOS 5.8 box with Ruby 1.8.7 installed
Kruppe has quit [Remote host closed the connection]
<Spooner> MACscr : Looks like you don't have make installed.
<machogeek> install bundler
<MACscr> rofl
<MACscr> i thought i had checked that
<vegardx> what system are you using?
lggr has joined #ruby
<MACscr> "system"?
<Spooner> MACscr : If it is installed, it presumably isn't finding it in the path (exec just runs CLI commands).
<vegardx> Your package manager probably already have passenger.
<vegardx> MACscr: Debian, ubuntu, freebsd, etc?
<MACscr> centos 5.x is ancient, so passenger isnt available for ruby 1.8.7
<vegardx> ah, centos
mikepack has joined #ruby
<MACscr> i installed make and now its working
<MACscr> thank you!
<Spooner> MACscr : On Debian I'd install build-essential. No idea about Centos.
<Spooner> Aha!
havenn has quit [Remote host closed the connection]
SegFaultAX|work has quit [Ping timeout: 272 seconds]
<vegardx> Debian Wheezy feels a little more usable with Ruby than Squeeze and family.
<Spooner> Last person I saw with Centos had Ruby 1.8.5 installed, so you are doing well :D
baroquebobcat has joined #ruby
twoism_ has quit [Remote host closed the connection]
<MACscr> Spooner: its been an "experience" =P
dmiller has quit [Remote host closed the connection]
chrishunt has quit [Ping timeout: 260 seconds]
<vegardx> Managing ruby on any system without in-depth knowledge of the inner workings is "interesting"
<vegardx> I've lost so much hair the past few days.
lggr has quit [Ping timeout: 245 seconds]
<MACscr> php is so much easier to work with from a system admin perspective
bricker has quit [Ping timeout: 248 seconds]
<vegardx> But learned a lot about how ruby want's to do stuff, and why it's totally different from how most OSes want to do it.
<vegardx> But then again, PHP can be SHIT(tm)
marienz has quit [Remote host closed the connection]
kpshek has joined #ruby
<waxjar> i think ruby actually tries to do it "the right way", at least more so than php
iamjarvo has quit [Ping timeout: 245 seconds]
lggr has joined #ruby
SeoxyS has joined #ruby
<vegardx> waxjar: probably, but right now most package maintainer seems to disagree on the choices
<vegardx> and that makes it a lot harder
tchebb has joined #ruby
daniel_- has quit [Quit: WeeChat 0.3.9]
sn0wb1rd has joined #ruby
kenneth has quit [Read error: Connection reset by peer]
SeoxyS is now known as kenneth
<waxjar> yeah, that's true.
nitti has joined #ruby
<vegardx> Ruby has too fast development
<vegardx> makes it hard to keep up in the old but stable ways.
phanousit has joined #ruby
kenneth has quit [Read error: Connection reset by peer]
kenneth has joined #ruby
phanousit is now known as siameseguy
ckrailo has quit [Quit: Leaving...]
x82_nicole has joined #ruby
<siameseguy> Hello, is anyone familiar with the gem ransack?
kpshek has quit [Ping timeout: 272 seconds]
lggr has quit [Ping timeout: 246 seconds]
tjbiddle_ has joined #ruby
nitti has quit [Ping timeout: 246 seconds]
hemanth has quit [Read error: Connection reset by peer]
PragCypher has quit [Quit: Leaving]
hemanth has joined #ruby
tjbiddle_ has quit [Client Quit]
natashatherobot has quit [Quit: natashatherobot]
lggr has joined #ruby
cardoni has joined #ruby
cbuxton has joined #ruby
Banistergalaxy has joined #ruby
tjbiddle has quit [Ping timeout: 246 seconds]
AndChat| has joined #ruby
arubin has joined #ruby
lggr has quit [Ping timeout: 240 seconds]
steffes has joined #ruby
Banistergalaxy has quit [Ping timeout: 246 seconds]
lggr has joined #ruby
splud has quit [Quit: splud]
cbuxton1 has joined #ruby
cbuxton has quit [Read error: Connection reset by peer]
AndChat| has quit [Ping timeout: 246 seconds]
alvaro_o has quit [Quit: Ex-Chat]
Trioke has quit [Ping timeout: 276 seconds]
lggr has quit [Ping timeout: 260 seconds]
steffes has quit [Remote host closed the connection]
x82_nicole has quit [Quit: Textual IRC Client: www.textualapp.com]
hemanth has quit [Read error: Connection reset by peer]
mmitchell has joined #ruby
glyytchy has joined #ruby
adeponte has quit [Remote host closed the connection]
hemanth has joined #ruby
swarley has joined #ruby
lggr has joined #ruby
davidcelis has joined #ruby
manizzle has joined #ruby
alvaro_o has joined #ruby
<Spooner> vegardx : I'd be surprised if Ruby was advancing massively faster than its peers. 1.8.7 has been around for a 4 years (1.8 for double that) and 1.9.2-3 (where .3 is a tiny step forward) has been around for over 2 years, I think.
Takehiro has joined #ruby
pac1 has quit [Quit: I got it one line of code at a time]
<vegardx> Spooner: I'm more thinking about gems :)
voodoofish430 has quit [Quit: Leaving.]
mahmoudimus has joined #ruby
<vegardx> And that package mantainers lag behind and there are no good routines to let ruby handle itself
<vegardx> Well, in wheezy things seem to get a lot better though
<swarley> I'm writing a wrapper for Nokogiri to give it Hpricot style methods
<swarley> who wants to guess the name
<Spooner> Oh right. I can't see a good reason to manage gems via package managers when gem works fine within Ruby.
lggr has quit [Ping timeout: 246 seconds]
<Spooner> swarley : Hokocot? Niancat?
<vegardx> Spooner: I would agree with you, but then you suddently get conflicts because other packages require gems that are in the package manager, and etc.
<swarley> Hprigiri
mahmoudimus has quit [Client Quit]
lggr has joined #ruby
tfrew has joined #ruby
<Spooner> vegardx: In fairness I havent' tried to do anything with gems in PMs, so I don't know how much of a mess it is. I suspect the PM route is designed more in an attempt to idiot-proof it, so you can get a full instant rails package, for exsample, rather than needing to install ruby and then gems? Which I guess is marketed at people new to Ruby rather than people who use it already?
hoofman has joined #ruby
eignerchris has quit [Remote host closed the connection]
<vegardx> Spooner: More or less, yes. Like, if you want redmine, it will fetch the gems you need to via, the package manager.
<Spooner> Wheras Ruby people would use rvm et al along with Bundler to have an internal management of the same thing, which seems more complex to outsiders until they actually try the pre-packaged route? I really don't know though.
brianpWins has joined #ruby
<Spooner> vegardx : Trying to mix the two systems sounds like a recipe for tears though :D
<vegardx> I guess it stems from ruby not doing so well with the versions at first, but now has done great things with rvm and bundler. So they are just lagging behind and things will probably get a lot better the next year or so.
<vegardx> Spooner: And hairloss. Lots and lots of hairloss!
starship has quit [Killed (leguin.freenode.net (Nickname regained by services))]
Guest74193 is now known as starship
mercwithamouth has quit [Ping timeout: 245 seconds]
adeponte has joined #ruby
Guest73184 has joined #ruby
hemanth has quit [Read error: Connection reset by peer]
<vegardx> But now I understand more about how ruby wants thing done, and can take a decision about using the package manager at all.
adeponte has quit [Remote host closed the connection]
hemanth has joined #ruby
<vegardx> so all in all, very good learnig experience
<Spooner> vegardx : No, I have that too and I never use PMs to manage Ruby :D
<vegardx> but frustrating
hemanth has quit [Read error: Connection reset by peer]
hemanth has joined #ruby
lggr has quit [Ping timeout: 260 seconds]
<swarley> this is more daunting than i expected
<Spooner> Haven't you finished it yet? You've been at it for at least fifteen minutes, swarley!
<swarley> :(
<Spooner> Or are you still working on the name?
nari_ has joined #ruby
elico has quit [Quit: elico]
icole has joined #ruby
fg3 has joined #ruby
philcrissman has joined #ruby
<swarley> I finished the name
<swarley> Right now i'm working on the / method
<Spooner> I think it needs another 'i' in it.
eignerchris has joined #ruby
advorak has quit [Quit: Leaving]
<Spooner> Sorry, not helpful. I haven't used either library directly.
hadees has joined #ruby
v0n has joined #ruby
lggr has joined #ruby
mando has quit [Remote host closed the connection]
mikepack has quit [Remote host closed the connection]
rTypo has quit [Quit: testing]
<fg3> ll
<Spooner> &&
<swarley> well the hardest part is that xpaths can be weird
mando has joined #ruby
<swarley> */p/**/a[@class="class/name"]
<swarley> so i need a way to parse that efficiently into levels
iamjarvo has joined #ruby
miso1337 has joined #ruby
<Spooner> Just look at how hpricot does it?
lggr has quit [Ping timeout: 276 seconds]
hemanth has quit [Read error: Connection reset by peer]
<swarley> essentially i need to get ["*", "p", "**", "a[@class=\"class/name"]"]
<swarley> hpricot is all in c x_x
hemanth has joined #ruby
<swarley> i suppose i can dig through there though
<Spooner> There is a reason they are both in C, but I guess parsing queries isn't the hard bit.
<swarley> Well, if i was handling the XML itself, I would be writing the wrapper in C
mikepack has joined #ruby
<swarley> but since i am just wrapping functions, its pointless
<swarley> I'd just be making ruby calls
<Spooner> Yeah, of course.
lggr has joined #ruby
<Paradox> LE
mercwithamouth has joined #ruby
axl_ has quit [Quit: axl_]
<swarley> oh god
<swarley> there are hundreds of goto statements
<Spooner> No, we are talking about _why. He can do no evil ;)
miso1337 has quit [Ping timeout: 245 seconds]
<swarley> case 32: goto st25;
<swarley> case 62: goto tr18;
<swarley> case 91: goto st26;
<Spooner> Generated code? No human would write that crap.
<swarley> Probably, there are also a lot of #line preprocessor directives
<swarley> which indicates use of yacc/lex
<Spooner> Makes sense.
<swarley> but it does use a bunch of ruby statements..
miso1337 has joined #ruby
h4mz1d has joined #ruby
<swarley> but its probably all within lex
mikepack has quit [Remote host closed the connection]
uris_ has joined #ruby
<Spooner> Could have started machine-generated before it was hooked into Ruby.
<Spooner> So, anyway, probably not the place for you to look ;)
lggr has quit [Ping timeout: 255 seconds]
<swarley> Well, lex looks like PATTERN { CodeBlock }
<swarley> so it could just be that
<Spooner> It is a million years ago since I played with yacc, so don't remind me of the horror (I can't remember what I used it for even).
<swarley> I enjoy playing with lex
<swarley> not so much YACC
lggr has joined #ruby
sguselnikov has quit [Quit: Textual IRC Client: http://www.textualapp.com/]
<swarley> you can probably get away with using XML with just lex
melzz_ has quit [Remote host closed the connection]
<Spooner> You're not right in the head. I have to forgive you a lot.
tfrew has quit [Ping timeout: 256 seconds]
cbuxton1 has quit [Quit: Leaving.]
<swarley> i'm not right in the head? :c
tfrew has joined #ruby
maletor has quit [Quit: Computer has gone to sleep.]
chendo_ has joined #ruby
hemanth has quit [Read error: Connection reset by peer]
hemanth has joined #ruby
hemanth has quit [Read error: Connection reset by peer]
hemanth has joined #ruby
jasond has quit [Ping timeout: 246 seconds]
ttt has joined #ruby
seanyo has joined #ruby
joeycarmello has joined #ruby
Vert has quit [Read error: Connection reset by peer]
lggr has quit [Ping timeout: 260 seconds]
lggr has joined #ruby
tommyvyo has joined #ruby
joeycarmello has quit [Ping timeout: 265 seconds]
hemanth has quit [Read error: Connection reset by peer]
hemanth has joined #ruby
hemanth has quit [Read error: Connection reset by peer]
hemanth has joined #ruby
tpe11etier has quit [Quit: tpe11etier]
paolooo has quit [Ping timeout: 245 seconds]
baroquebobcat has quit [Quit: baroquebobcat]
lggr has quit [Ping timeout: 256 seconds]
Tearan has quit [Quit: Sleepy Badger....]
chrishunt has joined #ruby
<swarley> alright i think i found a solution
nitti has joined #ruby
<swarley> [4] pry(main)> "*/p/**/a[@class=\"class/name\"]".scan(/(.+?)(?:\[(.+?)\])*[\/]*/).map {|x| x.delete_if(&:nil?) }
<swarley> => [["*"], ["p"], ["*"], ["*"], ["a", "@class=\"class/name\""]]
<swarley> bah i just noticed there is a problem
* swarley tries again
<Spooner> x.delete_if(&:nil?) --> x.compact
<Paradox> any easy way to copy/paste on ruby, without using the clipboard gem or pbcopy
Synthead has joined #ruby
lggr has joined #ruby
<swarley> ah, i was looking for that
<swarley> @ Spooner
<swarley> i went through like, 6 different methods
<Spooner> swarley : Yeah, I can never remember it. It doesn't imply nil removal to me.
baroquebobcat has joined #ruby
<Spooner> Paradox : Er no, the clipboard gem is...you know...for that.
<Paradox> Spooner, thats what i was afraid of
<Paradox> ah well
<Paradox> guess i'll use the gem
<Paradox> i like to minimize gem dependencies as much as possible
nitti has quit [Ping timeout: 260 seconds]
hemanth has quit [Read error: Connection reset by peer]
hemanth has joined #ruby
indian has quit [Ping timeout: 246 seconds]
<Spooner> There wouldn't be a gem if it was possible to do otherwise (well, the main advantage of the gem is that it manages several simple, but different methods on all OSes).
hemanth has quit [Read error: Connection reset by peer]
<xbayrockx> anyone have a raspberry pi?
<profx_> ppl @ work do
hemanth has joined #ruby
<swarley> blah, i hate regex sometimes
seoaqua has joined #ruby
lggr has quit [Ping timeout: 252 seconds]
JonnieCache has joined #ruby
Bosma has joined #ruby
radic has quit [Read error: Operation timed out]
Orcris has quit [Ping timeout: 246 seconds]
lggr has joined #ruby
maletor has joined #ruby
medik- has quit [Quit: Leaving]
hemanth has quit [Read error: Connection reset by peer]
hemanth has joined #ruby
lggr has quit [Ping timeout: 246 seconds]
hemanth has quit [Read error: Connection reset by peer]
hemanth has joined #ruby
<profx_> i say that about the inlaws
skaczor has quit [Ping timeout: 244 seconds]
swarley has quit [Ping timeout: 248 seconds]
lggr has joined #ruby
h4mz1d has quit [Ping timeout: 246 seconds]
freezey has joined #ruby
swarley has joined #ruby
shammancer has joined #ruby
Banistergalaxy has joined #ruby
xaq has quit [Remote host closed the connection]
lggr has quit [Ping timeout: 252 seconds]
hemanth has quit [Read error: Connection reset by peer]
alvaro_o has quit [Quit: Ex-Chat]
hemanth has joined #ruby
xaq has joined #ruby
maletor has quit [Quit: Computer has gone to sleep.]
lggr has joined #ruby
xaq has quit [Remote host closed the connection]
Takehiro has quit [Remote host closed the connection]
radic has joined #ruby
xaq has joined #ruby
siameseguy has quit [Quit: siameseguy]
tjbiddle has joined #ruby
avandendorpe has joined #ruby
lggr has quit [Ping timeout: 240 seconds]
cakehero has quit [Quit: Computer has gone to sleep.]
krz has quit [Ping timeout: 260 seconds]
Bosma has quit [Quit: leaving]
hemanth has quit [Read error: Connection reset by peer]
hemanth has joined #ruby
lggr has joined #ruby
hemanth has quit [Read error: Connection reset by peer]
hemanth has joined #ruby
phanousit has joined #ruby
xaq has quit [Remote host closed the connection]
phanousit has left #ruby [#ruby]
elico has joined #ruby
fir_ed has quit [Ping timeout: 245 seconds]
cakehero has joined #ruby
indian has joined #ruby
xaq has joined #ruby
voodoofish has joined #ruby
lggr has quit [Ping timeout: 246 seconds]
lggr has joined #ruby
adeponte has joined #ruby
Takehiro has joined #ruby
sent-hil has joined #ruby
mando has quit [Remote host closed the connection]
lggr has quit [Ping timeout: 244 seconds]
swarley has quit [Ping timeout: 276 seconds]
Goles has quit [Quit: Textual IRC Client: http://www.textualapp.com/]
slainer68 has joined #ruby
Konboi has joined #ruby
lggr has joined #ruby
apok_ has joined #ruby
kiyoura has quit [Quit: Leaving]
freeayu has quit [Read error: Connection reset by peer]
apok has quit [Ping timeout: 240 seconds]
freeayu has joined #ruby
Progster has quit [Ping timeout: 246 seconds]
slainer68 has quit [Ping timeout: 260 seconds]
tfrew has quit [Ping timeout: 256 seconds]
lggr has quit [Ping timeout: 240 seconds]
mahmoudimus has joined #ruby
apok_ has quit [Ping timeout: 240 seconds]
mneorr has joined #ruby
mneorr_ has quit [Ping timeout: 252 seconds]
dakine has quit [Ping timeout: 260 seconds]
cibs has quit [Quit: leaving]
arielpts has quit [Ping timeout: 246 seconds]
lggr has joined #ruby
cj3kim has joined #ruby
charliesome has joined #ruby
krz has joined #ruby
dmiller has joined #ruby
theRoUS has quit [Remote host closed the connection]
lggr has quit [Ping timeout: 248 seconds]
Tearan has joined #ruby
Bosma has joined #ruby
c0rn_ has joined #ruby
Lemtzas has joined #ruby
yourmysin_ has quit [Remote host closed the connection]
lggr has joined #ruby
hadees has quit [Quit: hadees]
Banistergalaxy has quit [Ping timeout: 246 seconds]
friskd has joined #ruby
nitti has joined #ruby
Spooner has quit [Ping timeout: 276 seconds]
a_a_g has joined #ruby
friskd has left #ruby [#ruby]
Kruppe has joined #ruby
lggr has quit [Ping timeout: 252 seconds]
<kenneth> quick question
hadees has joined #ruby
<kenneth> i have [:one, :two, :three] and [1, 2, 3]
nitti has quit [Ping timeout: 260 seconds]
kn330 has quit [Ping timeout: 276 seconds]
<kenneth> how do i get {one: 1, two: 2, three: 3} in one line?
<kenneth> (functionally)
<bnagy> Hash[ a.zip(b) ] maybe
lggr has joined #ruby
CaptainJet has quit []
reset has quit [Quit: Linkinus - http://linkinus.com]
lggr has quit [Ping timeout: 260 seconds]
kn330 has joined #ruby
scott[8] has joined #ruby
indian has quit [Ping timeout: 240 seconds]
<kenneth> perfect
scott[8] has quit [Quit: scott[8]]
reset has joined #ruby
scott[8] has joined #ruby
Guest22757 has quit [Ping timeout: 240 seconds]
lggr has joined #ruby
philcrissman has quit [Remote host closed the connection]
machogeek has quit [Quit: machogeek]
philcrissman has joined #ruby
mando has joined #ruby
aetaric has joined #ruby
rakl has quit [Quit: sleeping]
sn0wb1rd has quit [Quit: sn0wb1rd]
Elico1 has joined #ruby
lggr has quit [Ping timeout: 272 seconds]
wedtm is now known as wedtm|away
xaq has quit [Read error: Connection reset by peer]
philcrissman has quit [Ping timeout: 260 seconds]
justinmcp has quit [Remote host closed the connection]
Guest84615 has quit [Remote host closed the connection]
xaq has joined #ruby
hadees has quit [Quit: hadees]
lggr has joined #ruby
hadees has joined #ruby
Mon_Ouie has joined #ruby
kn330 has quit [Ping timeout: 244 seconds]
hadees has quit [Client Quit]
lggr has quit [Ping timeout: 246 seconds]
kenneth has quit [Quit: kenneth]
elsifaka has quit [Read error: Connection reset by peer]
hadees has joined #ruby
elsifaka has joined #ruby
sn0wb1rd has joined #ruby
Elico1 has quit [Remote host closed the connection]
lggr has joined #ruby
arielpts has joined #ruby
kn330 has joined #ruby
awarner has quit [Remote host closed the connection]
baroquebobcat has quit [Quit: baroquebobcat]
reset has quit [Ping timeout: 255 seconds]
avandendorpe has left #ruby [#ruby]
quest88 has joined #ruby
vitor-br has quit [Quit: Saindo]
lggr has quit [Ping timeout: 246 seconds]
tjbiddle has quit [Read error: Connection reset by peer]
tjbiddle has joined #ruby
lggr has joined #ruby
mneorr has quit [Ping timeout: 246 seconds]
kn330 has quit [Ping timeout: 244 seconds]
elico has quit [Quit: elico]
ZubKonst has joined #ruby
mneorr has joined #ruby
Takehiro_ has joined #ruby
Takehiro has quit [Read error: Connection reset by peer]
macmartine has joined #ruby
ZubKonst_ has quit [Ping timeout: 245 seconds]
lggr has quit [Ping timeout: 252 seconds]
kenneth has joined #ruby
fg3 has quit [Read error: Connection reset by peer]
lggr has joined #ruby
cakehero has quit [Quit: Computer has gone to sleep.]
cakehero has joined #ruby
kn330 has joined #ruby
xaq has quit [Remote host closed the connection]
Drewch has quit [Quit: ZNC - http://znc.in]
lggr has quit [Ping timeout: 256 seconds]
siyusong has joined #ruby
icole has quit [Remote host closed the connection]
gabrielrotbart has quit [Ping timeout: 245 seconds]
GVRV has joined #ruby
baroquebobcat has joined #ruby
matrixise has quit [Ping timeout: 246 seconds]
sr___ has joined #ruby
mmitchell has quit [Remote host closed the connection]
<harushimo> I finally figured out the program
<harushimo> thanks everyone
joeycarmello has joined #ruby
<harushimo> that was rough
<harushimo> good night
harushimo has quit [Quit: Leaving]
lggr has joined #ruby
Takehiro_ has quit [Remote host closed the connection]
lggr has quit [Ping timeout: 252 seconds]
scott[8] has quit [Quit: scott[8]]
<iamjarvo> im trying to think of a one liner that would iterate over an array of arrays
akem has quit [Read error: Connection timed out]
lggr has joined #ruby
tommyvyo has quit [Quit: ["Textual IRC Client: www.textualapp.com"]]
kn330 has quit [Ping timeout: 244 seconds]
akem has joined #ruby
shadoi has quit [Quit: Leaving.]
<mando> iamjarvo: like so? [["foo", "bar"], [], ["baz"]].map{|x| x.map{|y| puts y.inspect}}
v0n has quit [Ping timeout: 246 seconds]
daniel_hinojosa1 has quit [Quit: Leaving.]
justinmcp has joined #ruby
lggr has quit [Ping timeout: 265 seconds]
akem has quit [Max SendQ exceeded]
icole has joined #ruby
paolooo has joined #ruby
lggr has joined #ruby
mercwithamouth has quit [Ping timeout: 252 seconds]
wpaulson has joined #ruby
wpaulson has quit [Client Quit]
RudyValencia has joined #ruby
xorgnak has joined #ruby
lggr has quit [Ping timeout: 246 seconds]
seoaqua has quit [Ping timeout: 252 seconds]
nemesit has joined #ruby
arubin has quit [Quit: Computer has gone to sleep.]
lggr has joined #ruby
ForevernadeAFK has joined #ruby
uris_ has quit [Quit: Lost terminal]
mikepack has joined #ruby
hemanth has quit [Read error: Connection reset by peer]
hemanth has joined #ruby
<iamjarvo> mando: thanks. i was hoping there was something simpler
<bnagy> don't use map when you should be using each
hemanth has quit [Read error: Connection reset by peer]
hemanth has joined #ruby
quest88 has quit [Quit: quest88]
<iamjarvo> bnagy: whats up? hows thailand
<bnagy> uh in .au at the moment
Forevernade has quit [Ping timeout: 245 seconds]
<iamjarvo> ahh i see
<bnagy> anyway, you don't have much choice - you can use nested.flatten.each {|e| #do stuff}
lggr has quit [Ping timeout: 244 seconds]
<iamjarvo> kk thanks
<bnagy> but you lose info about what arrays were there, or nested.each {|ary| ary.each {|elem| ...
kn330 has joined #ruby
<bnagy> or if they are deeply nested you gotta recurse
<mando> bnagy: thanks - I've never looked at the source of map vs. each :)
ffranz has quit [Quit: Leaving]
lggr has joined #ruby
xiphiasx_ has quit [Read error: Operation timed out]
<bnagy> basically map transforms each elem, each does something with each elem
<bnagy> although they can both be used wrongly
<profx_> and you have to define the mapping after you |element| ?
<profx_> im just trying to understand as well
<iamjarvo> bnagy: so is this from a "code reading / intention" perspective?
<bnagy> mainly yeah
<iamjarvo> thats interesting ive never thought of that. but it does make sense
<bnagy> (1..3).map {|x| x**2}
<mando> yeah - #map has to create a collector to hold the results, which #each just yields them
<profx_> so all mappings look like: array.map { |element| element.function } ?
<bnagy> vs %w( cat dog frog ).each {|a| puts "I Like #{a}s"}
glupo has joined #ruby
<bnagy> profx_: no, but the elem will be transformed into whatever the block evaluation is
mahmoudimus has quit [Quit: Computer has gone to sleep.]
<profx_> element.function is the block evaluation ?
<bnagy> doesn't have to take that form
<profx_> yeah, as you stated, it could be x**@
<bnagy> like [1,2,3].map {|e| 4 } => [4,4,4]
<profx_> x**2
lggr has quit [Ping timeout: 246 seconds]
gabrielrotbart has joined #ruby
<profx_> then what is the reasoning you would use .each ?
<bnagy> when you're using the element, not transforming it
<profx_> so finding the max element in an array ?
<bnagy> uh except there's a method for that :/
freezey has quit [Quit: freezey]
g-ram has quit [Quit: Textual IRC Client: http://www.textualapp.com/]
seoaqua has joined #ruby
<profx_> im just thinking of an example off the top of my head
<bnagy> actually reduce would be better for that if you were banned from using max
<bnagy> but let's not get into the weeds
<iamjarvo> i guess each would be for straight iterating over the collection and not transforming it
xorgnak has quit [Remote host closed the connection]
lggr has joined #ruby
Takehiro has joined #ruby
xaq has joined #ruby
xorgnak has joined #ruby
maletor has joined #ruby
<profx_> and if |element| is an array ?
jenrzzz has joined #ruby
sent-hil has quit [Remote host closed the connection]
rakl has joined #ruby
Quadlex has joined #ruby
icole has quit [Remote host closed the connection]
lggr has quit [Ping timeout: 240 seconds]
gabrielr_ has joined #ruby
gabrielrotbart has quit [Read error: Connection reset by peer]
xorgnak has quit [Read error: No route to host]
lggr has joined #ruby
xorgnak has joined #ruby
Takehiro has quit [Ping timeout: 260 seconds]
reset has joined #ruby
Takehiro has joined #ruby
lggr has quit [Ping timeout: 245 seconds]
mando has quit [Remote host closed the connection]
jenrzzz has quit [Ping timeout: 245 seconds]
Takehiro has quit [Remote host closed the connection]
cakehero has quit [Quit: Leaving...]
quest88 has joined #ruby
lggr has joined #ruby
ananthakumaran has joined #ruby
becom33 has joined #ruby
lggr has quit [Ping timeout: 255 seconds]
<bnagy> sry, had to go out - if it's an array you do whatever you do to Arrays
fir_ed has joined #ruby
<Quadlex> Hmm. Stuck on an architecture issue
lggr has joined #ruby
h4mz1d has joined #ruby
nyrb has joined #ruby
<Quadlex> I've a class which holds data, and has a "datatype" variable. I need to provide that type to an external service
ForevernadeAFK has quit [Remote host closed the connection]
<Quadlex> It's derived from the presence or otherwise of other values
<Quadlex> Should I set it manually, set it automatically, or figure it out in a business layer?
xiphiasx_ has joined #ruby
<Quadlex> Manually has the benefit of demonstrating intent
ananthakumaran has quit [Quit: Leaving.]
em0ral has joined #ruby
<Quadlex> Bsuiness layer means I on;y have to worry about it when I fuck with the external service BUT anything else using the object needs to know which values create which type
mikepack has quit [Remote host closed the connection]
freeayu has quit [Ping timeout: 252 seconds]
lggr has quit [Ping timeout: 244 seconds]
freeayu has joined #ruby
lggr has joined #ruby
h4mz1d has quit [Ping timeout: 246 seconds]
<bnagy> why not just have the class be the type?
Tearan has quit [Quit: Sleepy Badger....]
em0ral has left #ruby [#ruby]
lledet has quit [Ping timeout: 252 seconds]
rippa has joined #ruby
lggr has quit [Ping timeout: 260 seconds]
mahmoudimus has joined #ruby
eignerchris has quit [Remote host closed the connection]
<Quadlex> bnagy: *{facepalm}* Or I could do things the logical way, sure.
<Quadlex> TY
xorgnak has quit [Remote host closed the connection]
lggr has joined #ruby
icole has joined #ruby
mmitchell has joined #ruby
margle has joined #ruby
lggr has quit [Ping timeout: 245 seconds]
davorb has joined #ruby
macmartine has quit [Quit: Computer has gone to sleep.]
icole has quit [Ping timeout: 260 seconds]
akem has joined #ruby
lggr has joined #ruby
mmitchell has quit [Ping timeout: 246 seconds]
akem has quit [Client Quit]
thedeadghost has joined #ruby
akem has joined #ruby
emmanuelux has quit [Quit: emmanuelux]
Takehiro has joined #ruby
Elhu has joined #ruby
lggr has quit [Ping timeout: 245 seconds]
reset has quit [Quit: Leaving...]
chin-tastic has quit [Ping timeout: 245 seconds]
Elhu has quit [Client Quit]
ananthakumaran has joined #ruby
lggr has joined #ruby
Takehiro has quit [Ping timeout: 265 seconds]
hemanth has left #ruby ["Leaving"]
drago757 has quit [Quit: drago757]
yxhuvud has joined #ruby
lggr has quit [Ping timeout: 248 seconds]
hussein- has joined #ruby
hussein- has quit [Client Quit]
baroquebobcat has quit [Quit: baroquebobcat]
ericwood has quit [Ping timeout: 260 seconds]
cyt93cs has quit [Ping timeout: 245 seconds]
ericwood has joined #ruby
lggr has joined #ruby
davorb has quit [Quit: leaving]
bluOxigen has joined #ruby
dmiller_ has joined #ruby
drago757 has joined #ruby
lggr has quit [Ping timeout: 248 seconds]
reset has joined #ruby
dmiller has quit [Ping timeout: 260 seconds]
cardoni has quit [Quit: cardoni]
lggr has joined #ruby
reset has quit [Client Quit]
Kruppe has quit [Remote host closed the connection]
sspiff has quit [Ping timeout: 252 seconds]
cyt93cs_ has joined #ruby
justinmcp has quit [Ping timeout: 245 seconds]
glyytchy has quit [Quit: glyytchy]
lggr has quit [Ping timeout: 252 seconds]
justinmcp has joined #ruby
lggr has joined #ruby
seanyo has quit [Ping timeout: 246 seconds]
justsee has quit [Quit: Leaving...]
cyt93cs_ has quit [Ping timeout: 265 seconds]
cyt93cs_ has joined #ruby
lggr has quit [Ping timeout: 246 seconds]
ryanf has joined #ruby
glyytchy has joined #ruby
lggr has joined #ruby
rakunHo has joined #ruby
c0rn_ has quit []
fantazo has joined #ruby
rippa has quit [Ping timeout: 255 seconds]
lggr has quit [Ping timeout: 244 seconds]
Tearan has joined #ruby
joeycarmello has quit [Remote host closed the connection]
Synthead has quit [Remote host closed the connection]
answer_42 has joined #ruby
Shamgar has quit [Read error: No route to host]
slainer68 has joined #ruby
lggr has joined #ruby
<xbayrockx> anyone know of a cheap and miniature solar system that can povide power to a mini usb device?
ryanf has quit [Quit: broken pipes |||]
deeprogram has joined #ruby
samuel02 has joined #ruby
glyytchy has quit [Quit: glyytchy]
Shamgar has joined #ruby
Mon_Ouie has quit [Ping timeout: 246 seconds]
slainer68 has quit [Ping timeout: 276 seconds]
lggr has quit [Ping timeout: 252 seconds]
jenrzzz has joined #ruby
IrishGringo has quit [Ping timeout: 244 seconds]
Banistergalaxy has joined #ruby
elico has joined #ruby
emanu has joined #ruby
<reactormonk> xbayrockx, nuclear reactor?
tonini has joined #ruby
lggr has joined #ruby
gabrielr_ has quit [Remote host closed the connection]
jerius has joined #ruby
roadt has quit [Ping timeout: 265 seconds]
djdb has joined #ruby
lggr has quit [Ping timeout: 246 seconds]
drago757 has quit [Quit: drago757]
lggr has joined #ruby
RudyValencia has quit [Quit: Hacked By Chinese!]
ryanf has joined #ruby
Krists has joined #ruby
iamjarvo has quit [Ping timeout: 245 seconds]
Krists has quit [Remote host closed the connection]
lggr has quit [Ping timeout: 246 seconds]
fschuindt has joined #ruby
maletor has quit [Quit: Computer has gone to sleep.]
<fschuindt> Guys, how I joint two arrays in one? Like [1, 2] + [3, 4] = [1, 2, 3, 4]
lggr has joined #ruby
<bnagy> fschuindt: ... yes, that is correct
<fschuindt> bnagy: oh, I have when its happens
irleif has joined #ruby
Takehiro has joined #ruby
<fschuindt> bnagy: hahaha, thank you
<bnagy> :P
<fschuindt> bnagy: hate*
justinmcp has quit [Remote host closed the connection]
Takehiro has quit [Read error: Connection reset by peer]
Takehiro has joined #ruby
Takehiro has quit [Remote host closed the connection]
lggr has quit [Ping timeout: 248 seconds]
maesbn has joined #ruby
Banistergalaxy has quit [Quit: Bye]
Banistergalaxy has joined #ruby
lggr has joined #ruby
kyletcarey has quit [Ping timeout: 240 seconds]
Erfankam has joined #ruby
lggr has quit [Ping timeout: 265 seconds]
justinmcp has joined #ruby
aganov has joined #ruby
khakimov has quit [Quit: Computer has gone to sleep.]
und3f has joined #ruby
lggr has joined #ruby
<shevy> bnagy: sex*
cardoni has joined #ruby
mneorr has quit [Ping timeout: 246 seconds]
xaq has quit [Remote host closed the connection]
lggr has quit [Ping timeout: 246 seconds]
irleif has quit [Quit: Computer has gone to sleep.]
fixl has joined #ruby
Banistergalaxy has quit [Read error: Connection reset by peer]
imami|afk is now known as banseljaj
Banistergalaxy has joined #ruby
lggr has joined #ruby
jerius has quit [Quit: Computer has gone to sleep.]
jenrzzz has quit [Ping timeout: 252 seconds]
senny has joined #ruby
zommi has joined #ruby
fatninja has joined #ruby
AndChat| has joined #ruby
xaq has joined #ruby
Tom2 has quit [Ping timeout: 265 seconds]
irleif has joined #ruby
AndChat- has joined #ruby
AndChat| has quit [Client Quit]
Banistergalaxy has quit [Ping timeout: 260 seconds]
lggr has quit [Ping timeout: 256 seconds]
Banistergalaxy has joined #ruby
davorb has joined #ruby
georgi has joined #ruby
Forevernade has joined #ruby
lggr has joined #ruby
nemesit|osx has joined #ruby
xaq has quit [Remote host closed the connection]
hemanth has joined #ruby
maletor has joined #ruby
jenrzzz has joined #ruby
AndChat- has quit [Ping timeout: 260 seconds]
a_a_g has quit [Quit: Leaving.]
nemesit has quit [Ping timeout: 240 seconds]
cibs has joined #ruby
sakh has quit [Ping timeout: 255 seconds]
Morkel has joined #ruby
lggr has quit [Ping timeout: 245 seconds]
kil0byte has quit [Remote host closed the connection]
workmad3 has joined #ruby
piotr_ has joined #ruby
JohnBat26 has joined #ruby
Vinz_` is now known as Vinz_
lggr has joined #ruby
paolooo has quit [Quit: Page closed]
miso1337_ has joined #ruby
sterNiX has quit [Excess Flood]
xorgnak has joined #ruby
Tom2 has joined #ruby
lggr has quit [Ping timeout: 260 seconds]
sterNiX has joined #ruby
Banistergalaxy has quit [Read error: Connection reset by peer]
jprovazn_away is now known as jprovazn
Banistergalaxy has joined #ruby
lggr has joined #ruby
miso1337 has quit [Ping timeout: 246 seconds]
miso1337_ is now known as miso1337
timonv has quit [Remote host closed the connection]
mucker has joined #ruby
dhruvasagar has joined #ruby
fschuindt has quit [Remote host closed the connection]
mneorr has joined #ruby
bartj3 has joined #ruby
xorgnak has quit [Remote host closed the connection]
vectorshelve has joined #ruby
xorgnak has joined #ruby
joelio_ has quit [Read error: Connection reset by peer]
wedgeV has quit [Remote host closed the connection]
Erfankam has quit [Remote host closed the connection]
Erfankam has joined #ruby
sakh has joined #ruby
lggr has quit [Ping timeout: 244 seconds]
anderse has joined #ruby
Vinz_ is now known as Vinz_`
siyusong has quit [Quit: Computer has gone to sleep.]
hemanth has quit [Read error: Connection reset by peer]
workmad3 has quit [Ping timeout: 255 seconds]
hemanth has joined #ruby
lggr has joined #ruby
thone has joined #ruby
quest88 has quit [Quit: quest88]
xorgnak has quit [Remote host closed the connection]
xorgnak has joined #ruby
jenrzzz has quit [Read error: Operation timed out]
dangerousdave has joined #ruby
thone_ has quit [Ping timeout: 248 seconds]
ryanf has quit [Quit: leaving]
lggr has quit [Ping timeout: 248 seconds]
jerius has joined #ruby
dangerousdave has quit [Client Quit]
Romoku has joined #ruby
zigomir has joined #ruby
MACscr has left #ruby [#ruby]
JonnieCache has quit [Ping timeout: 255 seconds]
becom33 has quit [Ping timeout: 246 seconds]
xorgnak has quit [Remote host closed the connection]
becom33 has joined #ruby
<Romoku> Hi guys, anyone have any tips to share about working with XML in ruby?
lggr has joined #ruby
xorgnak has joined #ruby
mucker has quit [Ping timeout: 260 seconds]
irleif has quit [Quit: Computer has gone to sleep.]
mneorr has quit [Remote host closed the connection]
hotovson_ has joined #ruby
mneorr has joined #ruby
mneorr has quit [Remote host closed the connection]
mneorr has joined #ruby
hoelzro|away is now known as hoelzro
burgestrand1 has quit [Ping timeout: 240 seconds]
dangerousdave has joined #ruby
mfridh_ is now known as mfridh
lggr has quit [Ping timeout: 246 seconds]
anderse has quit [Quit: anderse]
glyytchy has joined #ruby
wallerdev has quit [Quit: wallerdev]
lggr has joined #ruby
hemanth has quit [Read error: Connection reset by peer]
dr_bob has joined #ruby
hemanth has joined #ruby
Takehiro has joined #ruby
sspiff has joined #ruby
sspiff has joined #ruby
sspiff has quit [Remote host closed the connection]
mahmoudimus has quit [Quit: Computer has gone to sleep.]
lggr has quit [Ping timeout: 246 seconds]
Takehiro has quit [Ping timeout: 246 seconds]
xorgnak has quit [Read error: Connection reset by peer]
lggr has joined #ruby
a_a_g has joined #ruby
justinmcp has quit [Remote host closed the connection]
emanu has quit [Quit: emanu]
xorgnak has joined #ruby
mahmoudimus has joined #ruby
lggr has quit [Ping timeout: 244 seconds]
Tearan has quit [Quit: Sleepy Badger....]
Virunga has joined #ruby
eldariof has joined #ruby
lggr has joined #ruby
xorgnak has quit [Remote host closed the connection]
lggr has quit [Ping timeout: 244 seconds]
sspiff has joined #ruby
elsifaka has quit [Quit: Veloma e!]
lggr has joined #ruby
becom33 has quit [Ping timeout: 245 seconds]
monkegjinni has joined #ruby
becom33 has joined #ruby
xorgnak has joined #ruby
lggr has quit [Ping timeout: 246 seconds]
krz has quit [Quit: krz]
mahmoudimus has quit [Quit: Computer has gone to sleep.]
Elhu has joined #ruby
love_color_text has quit [Remote host closed the connection]
emanu has joined #ruby
artnez has quit [Quit: artnez]
lggr has joined #ruby
tjbiddle has quit [Quit: tjbiddle]
xorgnak has quit [Remote host closed the connection]
elaptics`away is now known as elaptics
icole has joined #ruby
xorgnak has joined #ruby
Virunga is now known as LennyLinux
emanu has quit [Client Quit]
xorgnak has quit [Remote host closed the connection]
berserkr has quit [Quit: Leaving.]
scottrb has joined #ruby
QKO has joined #ruby
Ivo has joined #ruby
QKO_ has quit [Read error: Connection reset by peer]
lolmaus has joined #ruby
Banistergalaxy has quit [Ping timeout: 240 seconds]
lggr has quit [Ping timeout: 252 seconds]
Takehiro has joined #ruby
clj_newb has joined #ruby
awestroke has joined #ruby
morf has joined #ruby
lggr has joined #ruby
lggr has quit [Ping timeout: 245 seconds]
scottrb has quit [Quit: Leaving]
sspiff has quit [Remote host closed the connection]
zii has quit [Read error: Connection reset by peer]
Xeago has joined #ruby
icole has quit [Remote host closed the connection]
elsifaka has joined #ruby
sterNiX has quit [Ping timeout: 244 seconds]
lggr has joined #ruby
SmoothSage has quit [Read error: Connection reset by peer]
SmoothSage has joined #ruby
fir_ed has quit [Ping timeout: 248 seconds]
lggr has quit [Ping timeout: 252 seconds]
Archisze has joined #ruby
Averna has quit [Quit: Leaving.]
GVRV has quit [Ping timeout: 240 seconds]
lggr has joined #ruby
himsin has quit [Ping timeout: 246 seconds]
sspiff has joined #ruby
robotmay has joined #ruby
cezar has joined #ruby
sterNiX has joined #ruby
himsin has joined #ruby
lggr has quit [Ping timeout: 248 seconds]
frederic has joined #ruby
lggr has joined #ruby
anbz has joined #ruby
hamed_r has joined #ruby
anbz has left #ruby [#ruby]
piotr_ has quit [Ping timeout: 246 seconds]
monkegjinni has quit [Ping timeout: 246 seconds]
slainer68 has joined #ruby
ephemerian has joined #ruby
lggr has quit [Ping timeout: 246 seconds]
piotr_ has joined #ruby
Takehiro has quit [Remote host closed the connection]
monkegjinni has joined #ruby
a_a_g has quit [Read error: Connection reset by peer]
a_a_g has joined #ruby
hemanth has quit [Read error: Connection reset by peer]
JonnieCache has joined #ruby
hemanth has joined #ruby
Vainoharhainen has joined #ruby
lggr has joined #ruby
zii has joined #ruby
himsin has quit [Ping timeout: 246 seconds]
frederic has quit [Read error: Connection reset by peer]
pskosinski has joined #ruby
himsin has joined #ruby
pskosinski has quit [Read error: Connection reset by peer]
justsee has joined #ruby
justsee has quit [Changing host]
justsee has joined #ruby
lggr has quit [Ping timeout: 248 seconds]
clj_newb has quit [Ping timeout: 252 seconds]
LouisGB has joined #ruby
frederic has joined #ruby
ABK has joined #ruby
himsin has quit [Ping timeout: 246 seconds]
lggr has joined #ruby
himsin has joined #ruby
timmow has joined #ruby
GeekOnCoffee has quit [Ping timeout: 244 seconds]
Erfankam1 has joined #ruby
lggr has quit [Ping timeout: 260 seconds]
tchebb has quit [Ping timeout: 256 seconds]
workmad3 has joined #ruby
GeekOnCoffee has joined #ruby
<JonnieCache> never seen this in a class definition before: `class GalleryPhoto < Sequel::Model(DB[:gallery_photos].order(:sort_order, :id))`
<JonnieCache> whats that called and what does it do?
Erfankam has quit [Ping timeout: 246 seconds]
<hoelzro> JonnieCache: it's just subclassing a class returned from a method call
irleif has joined #ruby
<JonnieCache> hmmmm
<JonnieCache> so class names are actually method calls?
<JonnieCache> is the class name actually an implicit call to some constructor?
<hoelzro> no
<hoelzro> when you do class Something < SomethingElse
a_a_g has quit [Read error: Connection reset by peer]
<hoelzro> it's just calling a method on the SomethingElse object to create the new class
a_a_g has joined #ruby
hemanth has quit [Read error: Connection reset by peer]
<hoelzro> consider puts String in irb/pry
hemanth has joined #ruby
piotr_ has quit [Remote host closed the connection]
irleif has quit [Client Quit]
lggr has joined #ruby
Dreamer3 has quit [Ping timeout: 246 seconds]
pskosinski has joined #ruby
sepp2k has joined #ruby
hbpoison has joined #ruby
<JonnieCache> hmm i still dont really understand
<JonnieCache> what method is being called?
anderse has joined #ruby
<JonnieCache> < ?
clj_newb has joined #ruby
<hoelzro> I can't remember
<hoelzro> the < is just sugar
irleif has joined #ruby
roadt has joined #ruby
timonv has joined #ruby
* JonnieCache looks for his copy of TRPL
lggr has quit [Ping timeout: 245 seconds]
Jork1 has joined #ruby
<hoelzro> there's no reason you couldn't do the following:
<hoelzro> c = MyClass ; class D < c ... end
<JonnieCache> I understand that
Jork1 has quit [Client Quit]
sterNiX has quit [Ping timeout: 246 seconds]
<hoelzro> which parameters? D and c?
<JonnieCache> i want to know where those parameters are sent
lggr has joined #ruby
<hoelzro> probably Class.new
a_a_g has quit [Quit: Leaving.]
a_a_g has joined #ruby
<JonnieCache> class A < B(c, d) i want to know where c and d end up
<hoelzro> that's up to B
<JonnieCache> theyre passed to some method on B, so which method?
<hoelzro> B could just return an anonymous class that closes over the variables
<hoelzro> B's a method, not a class in this case
<hoelzro> it just *looks* like a class
<JonnieCache> hmmmmmmmmm
<hoelzro> because having a method name on the RHS of < looks funny
<JonnieCache> curiouser and curiouser
<hoelzro> consider class A < b(c, d)
Beoran_ has joined #ruby
<hoelzro> the difference is in the naming, that's it
Jork1 has joined #ruby
<JonnieCache> lol i just called pry's show-method on B and it just dumped the whole class
lggr has quit [Ping timeout: 255 seconds]
sterNiX has joined #ruby
_JamieD_ has joined #ruby
vlad_starkov has joined #ruby
irleif has quit [Quit: Computer has gone to sleep.]
Beoran__ has quit [Ping timeout: 246 seconds]
frederic has quit [Remote host closed the connection]
_JamieD_ has quit [Client Quit]
deeprogram has left #ruby [#ruby]
_JamieD_ has joined #ruby
hemanth has quit [Read error: Connection reset by peer]
lupine_85 has quit [Ping timeout: 268 seconds]
hemanth has joined #ruby
hemanth has quit [Read error: Connection reset by peer]
hemanth has joined #ruby
colinbm has joined #ruby
a_a_g1 has joined #ruby
lggr has joined #ruby
good_afternoon has joined #ruby
jerius has quit [Quit: Computer has gone to sleep.]
frederic has joined #ruby
a_a_g has quit [Ping timeout: 256 seconds]
monkegjinni has quit [Ping timeout: 246 seconds]
vlad_starkov has quit [Remote host closed the connection]
cj3kim has quit [Ping timeout: 276 seconds]
lggr has quit [Ping timeout: 260 seconds]
Takehiro has joined #ruby
Archisze has quit [Read error: Connection reset by peer]
bobbbo has joined #ruby
bobbbo has quit [Client Quit]
lggr has joined #ruby
tvw has joined #ruby
<shevy> output.rb:52: warning: global variable `$use_colours' not initialized
<shevy> how would I ask whether it is initialized or not?
<shevy> the code is like this right now:
<shevy> run_this if $use_colours
mtfk_ has joined #ruby
beachandbytes has joined #ruby
<mtfk_> hi, how to create require switch using OptionParse?
<hoelzro> shevy: defined?
<hoelzro> or set it at the top
<hoelzro> $use_colours = false
<shevy> hoelzro hmm like: run_this if defined?($use_colours) ?
<hoelzro> and override later if needed
<hoelzro> shevy: that works, but I think explicitly initializing it to the default would be best
mklappstuhl has joined #ruby
<shevy> yeah hmm
lggr has quit [Ping timeout: 255 seconds]
hemanth has quit [Read error: Connection reset by peer]
hemanth has joined #ruby
hemanth has quit [Read error: Connection reset by peer]
hemanth has joined #ruby
lggr has joined #ruby
glyytchy has quit [Quit: glyytchy]
jgrevich has quit [Quit: jgrevich]
Dreamer3 has joined #ruby
a_a_g1 has quit [Ping timeout: 252 seconds]
Takehiro has quit [Remote host closed the connection]
seoaqua has quit [Ping timeout: 244 seconds]
a_a_g has joined #ruby
justinmcp has joined #ruby
icole has joined #ruby
lggr has quit [Ping timeout: 245 seconds]
lupine_85 has joined #ruby
bluenemo has joined #ruby
bluenemo has quit [Changing host]
bluenemo has joined #ruby
baphled has quit [Ping timeout: 246 seconds]
icole has quit [Ping timeout: 246 seconds]
manizzle has quit [Ping timeout: 265 seconds]
lggr has joined #ruby
cardoni has quit [Quit: cardoni]
seoaqua has joined #ruby
cardoni has joined #ruby
cascalheira has joined #ruby
hoelzro is now known as hoelzro|away
hemanth has quit [Read error: Connection reset by peer]
lggr has quit [Ping timeout: 246 seconds]
a_a_g has quit [Read error: Connection reset by peer]
hemanth has joined #ruby
a_a_g has joined #ruby
hemanth has quit [Read error: Connection reset by peer]
hemanth has joined #ruby
lggr has joined #ruby
maletor has quit [Quit: Computer has gone to sleep.]
CodeDroid__ has joined #ruby
brtdv has quit [Ping timeout: 260 seconds]
samphippen has joined #ruby
roadt has quit [Ping timeout: 246 seconds]
mklappstuhl has quit [Ping timeout: 246 seconds]
cardoni has quit [Quit: cardoni]
brtdv has joined #ruby
lggr has quit [Ping timeout: 246 seconds]
arielpts has quit [Ping timeout: 246 seconds]
seoaqua has quit [Ping timeout: 260 seconds]
lggr has joined #ruby
seoaqua has joined #ruby
Erfankam1 has quit [Quit: Leaving.]
arielpts has joined #ruby
manizzle has joined #ruby
jlwestsr has quit [Ping timeout: 246 seconds]
lkba has quit [Ping timeout: 272 seconds]
justinmcp has quit [Remote host closed the connection]
hemanth has quit [Read error: Connection reset by peer]
hemanth has joined #ruby
a_a_g has quit [Read error: Connection reset by peer]
lggr has quit [Ping timeout: 246 seconds]
a_a_g has joined #ruby
hemanth has quit [Read error: Connection reset by peer]
hemanth has joined #ruby
banseljaj has quit [Excess Flood]
banseljaj has joined #ruby
adeponte has quit [Remote host closed the connection]
elico has quit [Quit: elico]
banseljaj is now known as imami|afk
lggr has joined #ruby
brtdv has quit [Ping timeout: 260 seconds]
arturaz has joined #ruby
roadt has joined #ruby
irleif has joined #ruby
margle has quit [Quit: Computer has gone to sleep.]
tonini has quit [Remote host closed the connection]
samphippen has quit [Quit: Computer has gone to sleep.]
lggr has quit [Ping timeout: 255 seconds]
_cheney2 has joined #ruby
_cheney has quit [Ping timeout: 256 seconds]
elico has joined #ruby
pac1 has joined #ruby
chussenot has joined #ruby
a_a_g has quit [Read error: Connection reset by peer]
a_a_g has joined #ruby
love_color_text has joined #ruby
hemanth has quit [Read error: Connection reset by peer]
hemanth has joined #ruby
glupo has quit [Remote host closed the connection]
lkba has joined #ruby
lggr has joined #ruby
hoelzro|away is now known as hoelzro
hbpoison has quit [Ping timeout: 256 seconds]
love_color_text has quit [Ping timeout: 245 seconds]
brtdv has joined #ruby
seoaqua has quit [Ping timeout: 260 seconds]
lggr has quit [Ping timeout: 260 seconds]
chussenot_ has joined #ruby
chussenot has quit [Ping timeout: 244 seconds]
chussenot_ is now known as chussenot
fantazo has quit [Remote host closed the connection]
lggr has joined #ruby
R0ute1 has joined #ruby
rakl has quit [Quit: sleeping]
a_a_g has quit [Read error: Connection reset by peer]
a_a_g has joined #ruby
w4lt3r has joined #ruby
samphippen has joined #ruby
w4lt3r is now known as w4lk3r
hemanth has quit [Read error: Connection reset by peer]
PapaSierra has joined #ruby
_val_ has joined #ruby
good_morning has joined #ruby
hemanth has joined #ruby
chussenot has quit [Read error: Connection reset by peer]
lggr has quit [Ping timeout: 246 seconds]
<_val_> Hello everyone. I've a process running like git 24274 5.1 1.3 299876 140188 ? Sl 11:34 1:11 Rack: /var/www/myruby/ Now I want to remove myruby on some other partition due to lack on space on root partitiion '/'. What happens with the process. How would I savely move this directory to let's say /srv/data/myruby
<_val_> I always could keep a symlink on /var/www/myruby which points to /srv/data/myruby but the process won't be aware I guess.
good_afternoon has quit [Ping timeout: 276 seconds]
lggr has joined #ruby
rakl has joined #ruby
<PapaSierra> morning. i'm a ruby noob. i'm using capistrano to deploy. from a syntax, namespace and variable scope point of view i'm not sure if this will work: http://www.hastebin.com/mukayiwegu.rb notice the use of :deploy_to on line 19. it is declared on either line 3 or 8. please take a look and let me know what to do.
haxrbyte has joined #ruby
areil has joined #ruby
Man has joined #ruby
Man has left #ruby [#ruby]
haxrbyte_ has joined #ruby
a_a_g has quit [Read error: Connection reset by peer]
lggr has quit [Ping timeout: 260 seconds]
good_afternoon has joined #ruby
a_a_g has joined #ruby
hemanth has quit [Read error: Connection reset by peer]
<shevy> most folks here don't know capistrano
hemanth has joined #ruby
Man has joined #ruby
<PapaSierra> shevy sorry that was just a detail. my question is ruby related, not capistrano related
<Man> hi all people
fermion has joined #ruby
lggr has joined #ruby
Man has left #ruby [#ruby]
<PapaSierra> it's just a syntax/scoping/namespacing question
<shevy> ok then
<shevy> if your question is purely ruby related
<shevy> then you have this:
<shevy> task :my_task do; run "touch #{:deploy_to}/myfile"; end
<shevy> right?
<PapaSierra> i'm ok with the basics of ruby, i've read some tutes and practiced a little. but this hash and namespace is beyond me
reinaldob has joined #ruby
haxrbyte has quit [Ping timeout: 255 seconds]
<shevy> I don't see a hash in this part of the code
<PapaSierra> yeah that's what i *mean* but i'm not sure if the syntax is right
<PapaSierra> sorry, not hash. symbol
<shevy> ok
<JonnieCache> PapaSierra: it looks fine to me
<PapaSierra> my feeling is by the time i hit line 19 the variable will be inaccessible due to name spaces?
<shevy> you call a method called task() and you pass one argument to it, named :my_task
good_morning has quit [Ping timeout: 276 seconds]
<JonnieCache> PapaSierra: the key is, the stuff inside those `task` blocks isnt all run at once, those tasks functions are being stored and run later on
<shevy> you also pass it a block
<shevy> run "touch #{:deploy_to}/myfile"
<shevy> this looks wrong to me
<shevy> you try to use #{} on a symbol, which makes no sense at all
<shevy> ah
<shevy> it becomes a string :)
<shevy> so it would be like:
<shevy> run "touch deploy_to/myfile"
<PapaSierra> eek
<JonnieCache> its supposed to be a method call, PapaSierra you should remove the : in that case
<shevy> not sure if that is what you want
<PapaSierra> what i *want* is: "touch /var/www/staging/myfile"
<shevy> if you remove the : ruby would believe it is a method or a variable, as it does not find a variable, it would try to run a method called deploy_to()
<shevy> k sounds as if you want a variable
<JonnieCache> thats what you want
<PapaSierra> JonnieCache remove the : before :deploy_to?
<shevy> but I dont see that variable anywhere
lggr has quit [Ping timeout: 245 seconds]
<shevy> :foo is always a symbol, never a variable
<JonnieCache> yes, on line 19
<JonnieCache> with the : its a symbol, which is basically like a string
<JonnieCache> you want it to be a method call
<PapaSierra> yes, so i want the value set up in line 3 to be used in line 19
<JonnieCache> exactly
<shevy> PapaSierra ruby code is terse, but you always need to make sure that what you write down is what you really want to use :)
<JonnieCache> the `set` method in capistrano creates a method with that name
<JonnieCache> its a bit weird but thats how capistrano works
<shevy> hehe
<shevy> I would not have known :)
<shevy> it all looks like magic to me here
lggr has joined #ruby
<JonnieCache> PapaSierra: as you can see it sets different values for staging and production
<PapaSierra> oh, so once again i've bitten off more than i can chew! classic me
<PapaSierra> right
<JonnieCache> no you havent its fine :)
<shevy> why? this is specific to a project ... capistrano
<shevy> without reading documentation, noone would know what set() does
<PapaSierra> so when i "call" that function i should get a returned string like "/var/www/staging"
<shevy> didn't JonnieCache say it creates a method for you
<shevy> probably called deploy_to() and it would return that string?
<PapaSierra> shevy that's my bad, being new to ruby i didn't know what syntax comes from ruby and what belongs to capistrano. apologies
<JonnieCache> yes
<shevy> then you could use that in line 19
Axsuul has quit [Ping timeout: 272 seconds]
<shevy> PapaSierra nono it all uses ruby syntax anyway, I just mean that the capistrano guys wrote those methods
<PapaSierra> so on line 19 i need touch #{deploy_to}/myfile
Axsuul has joined #ruby
<shevy> you could write a capistrano replacement on your own too :)
<JonnieCache> indeed
<PapaSierra> perfect. i've learned a little more ruby today!
x0F has quit [Disconnected by services]
x0F_ has joined #ruby
<shevy> what I dont understand is this:
hsbt is now known as hsbt_away
<shevy> task :migrate do; end
x0F_ is now known as x0F
<shevy> the do end seems not necessary
good_morning has joined #ruby
<JonnieCache> shevy: probably correct, i think thats in a lot of example code thats out there
<shevy> as it is empty anyway!
<shevy> hehe seems so
<PapaSierra> hmm, well that's copy/paste from a capistrano guide, so my guess is maybe you can add stuff in the middle?
<shevy> I always try to use as little syntax as possible (unless it becomes not readable)
<shevy> yeah probably they want to encourage you to add something there
monkegjinni has joined #ruby
lggr has quit [Ping timeout: 245 seconds]
<PapaSierra> yeah, following blogs is very often misleading. i try to stick as close to the official docs as possible
<shevy> yup!
<PapaSierra> thanks again, i'm quite excited about my new knowledge!
good_afternoon has quit [Ping timeout: 276 seconds]
lggr has joined #ruby
ForevernadeAFK has joined #ruby
Forevernade has quit [Ping timeout: 256 seconds]
ananthakumaran1 has joined #ruby
ananthakumaran has quit [Ping timeout: 246 seconds]
rakl has quit [Ping timeout: 246 seconds]
dhruvasagar has quit [Ping timeout: 255 seconds]
lggr has quit [Ping timeout: 240 seconds]
dhruvasagar has joined #ruby
roadt has quit [Ping timeout: 246 seconds]
GVRV has joined #ruby
good_afternoon has joined #ruby
Xeago_ has joined #ruby
good_morning has quit [Ping timeout: 276 seconds]
Xeago has quit [Ping timeout: 255 seconds]
lggr has joined #ruby
atran has joined #ruby
<atran>
mercwithamouth has joined #ruby
hbpoison has joined #ruby
good_morning has joined #ruby
manizzle has quit [Ping timeout: 246 seconds]
lggr has quit [Ping timeout: 255 seconds]
chussenot has joined #ruby
atran has quit [Quit: Leaving]
areil has quit [Ping timeout: 246 seconds]
areil has joined #ruby
lggr has joined #ruby
atran has joined #ruby
good_afternoon has quit [Ping timeout: 276 seconds]
<shevy> match AWKScriptCodeHl +\(\<awk\>\_.\{-}[=\\]\@<!\(\\$\)\@<!\)\@<=[=\\]\@<!'\_.\{-}[\\]\@<!'+
jenrzzz has joined #ruby
<shevy> how can people like this
<hoelzro> like what?
<hoelzro> Vim syntax highlighting?
Guest22757 has joined #ruby
margle has joined #ruby
lggr has quit [Ping timeout: 260 seconds]
acrocity_ has joined #ruby
justsee has quit [Ping timeout: 248 seconds]
acrocity_ is now known as acrocity
lggr has joined #ruby
bartj3 has quit []
acrocity- has quit [Ping timeout: 260 seconds]
roadt has joined #ruby
manizzle has joined #ruby
lggr has quit [K-Lined]
Xeago_ has quit [Ping timeout: 240 seconds]
Xeago has joined #ruby
love_color_text has joined #ruby
mercwithamouth has quit [Ping timeout: 252 seconds]
baphled has joined #ruby
Xeago has quit [Remote host closed the connection]
atran has quit [Quit: Leaving]
samphippen has quit [Quit: Computer has gone to sleep.]
pantomime_is_che has joined #ruby
Xeago has joined #ruby
R0ute1 has quit [Remote host closed the connection]
bartj3 has joined #ruby
pantomime_is_che has quit [Client Quit]
pantomime_cheap has joined #ruby
CodeDroid__ has quit [Read error: Connection reset by peer]
workmad3 has quit [Ping timeout: 255 seconds]
pothibo has joined #ruby
workmad3 has joined #ruby
hsbt_away is now known as hsbt
hsbt is now known as hsbt_away
hsbt_away is now known as hsbt
irleif has quit [Quit: Computer has gone to sleep.]
Krists has joined #ruby
josh^ has quit [Read error: Connection reset by peer]
samphippen has joined #ruby
d3vic3 has joined #ruby
niklasb has joined #ruby
replore_ has joined #ruby
daniel_- has joined #ruby
daniel_- has quit [Changing host]
daniel_- has joined #ruby
DZwijnenburg has joined #ruby
DZwijnenburg has quit [Client Quit]
chussenot has quit [Quit: chussenot]
DZwijnenburg has joined #ruby
<DZwijnenburg> Hi
<kn330> Good Evening folks!
manizzle has quit [Remote host closed the connection]
<PapaSierra> JonnieCache you still there?
<PapaSierra> everything is working great, but in capistrano i'm now trying to do $ cap deploy:cleanup and it says "Please specify the name of your application, set :application, 'foo'". does my application have a name?! wth?
bartj3 has quit []
sebastorama has joined #ruby
rumba has joined #ruby
kpshek has joined #ruby
jerius has joined #ruby
<Xeago> PapaSierra: an application probably needs a name
<Xeago> so it can be referred to later on
Takehiro has joined #ruby
<PapaSierra> Xeago i've read some of the capistrano guide and i've never come across naming your application, so i'm not sure where/how to give it a name
<Xeago> Please specify the name of your application, set :application, 'foo'
<Xeago> by using set :application, 'name of applicatino'
<PapaSierra> in my Capfile? ok, makes sense i guess. not sure why it's necessary though
bairui has quit [Read error: Connection reset by peer]
<PapaSierra> but thanks, i'll try that
bairui has joined #ruby
charliesome has quit [Quit: Textual IRC Client: www.textualapp.com]
hamed_r has quit [Ping timeout: 255 seconds]
tfrew has joined #ruby
replore_ has quit [Ping timeout: 245 seconds]
replore has joined #ruby
<JonnieCache> PapaSierra: it wants you to choose a name
<JonnieCache> its not asking you to type in some prexisting name
Banistergalaxy has joined #ruby
nari_ has quit [Ping timeout: 245 seconds]
jerius has quit [Quit: Computer has gone to sleep.]
<Xeago> PapaSierra: products we have where I work have the following names: sunshine booter, morebutter, nopants
<Xeago> add a comma after sunshine
<Xeago> sometimes a product spinoff a marketing request originating from a funny joke
<Xeago> and we name it that way
colinbm has quit [Quit: colinbm]
<Xeago> it's useful to have a handle to use when referring to something
pantomime_cheap has quit [Quit: Leaving]
pantomime_cheap has joined #ruby
jenrzzz has quit [Ping timeout: 260 seconds]
postmodern has quit [Quit: Leaving]
fermion has quit [Ping timeout: 240 seconds]
<JonnieCache> Xeago: wtf
<JonnieCache> are those test names?
akem has quit [Read error: Connection reset by peer]
akem has joined #ruby
Guest22757 has quit [Ping timeout: 252 seconds]
daniel_- has quit [Ping timeout: 252 seconds]
rakunHo has quit [Remote host closed the connection]
linoj has quit [Quit: linoj]
akem has quit [Max SendQ exceeded]
akem has joined #ruby
<mtfk_> how to set require switch in OptionParser, is any dry way to do that or for each switch I need to check that manually?
mtfk_ is now known as mtfk
monkegjinni has quit [Read error: Connection reset by peer]
monkegjinni has joined #ruby
Takehiro has quit [Remote host closed the connection]
<Xeago> JonnieCache: nope of products in production
<Xeago> sunshine is our adserver
<Xeago> booter kicks off bad videos
<Xeago> morebutter highlights good videos
<JonnieCache> ohh
<JonnieCache> those arent really products
<Xeago> nopants also kicks off bad videos but uses different algorithms/semantics to come to a conclusion
<Xeago> they are
<Xeago> :)
<JonnieCache> products are for sale
<Xeago> we sell it
<Xeago> nopants usually takes a bit longer than booter
_Mon_Ouie_ has joined #ruby
Morkel has quit [Quit: Morkel]
<Xeago> They are part of our suite
<JonnieCache> who are you selling to? other devs?
<Xeago> video marketing company's
<Xeago> we also have a backing company, videofyme
<Xeago> which uses all of these products
<JonnieCache> fair enough. they are slightly unusual names though :)
Takehiro has joined #ruby
<Xeago> as I said, most of our products are spinoffs of idea's afte rjokes
My_Hearing has quit [Read error: Connection reset by peer]
<Xeago> mostly on friday afternoon after some lager
skaczor has joined #ruby
chussenot has joined #ruby
larissa has joined #ruby
pantomime_cheap has quit [Quit: Leaving]
<Xeago> what is the difference between a proc and a lambda?
<PapaSierra> Xeago, JonnieCache sorry i had a meeting. if my project is called "Online Betting App", should i then edit my Capfile and add the line:
<PapaSierra> set :application, "bettingapp"
<Xeago> for example, there is no right way to name an app
<Xeago> I am currently working on an app that is called sweetpony
<Xeago> it doesn't do anything with pony's
<PapaSierra> and that's the name of the entire project?
<Xeago> it's our search platform
coin3d has joined #ruby
<Xeago> while it is an 'entire project', it is not everything we do where I work
<JonnieCache> PapaSierra: there are only two hard problems in computer science: cache invalidaiton, and naming things
<Xeago> PapaSierra: why are you named PapaSierra?
<JonnieCache> all toher problems can be reduced to special cases of the above two
<Xeago> so I can refer to you uniquely
<JonnieCache> *other
<Xeago> JonnieCache: *correction vs correction*
<Xeago> or vimstyle
<Xeago> but vimstyle requires typing the misspelling which is dubious
<PapaSierra> i'm still not seeing the logic. a Capfile is specific to a project (unless this is a misguided assumption on my part), so me doing $ cd bettingapp/; cap deploy:cleanup should be enough to uniquely identify the betting app without having to give it a name. what am i missing?
<Xeago> you could make it dynamic
fg3 has joined #ruby
<PapaSierra> oh, so one capfile could apply to multiple apps?
<Xeago> it could
<PapaSierra> ok
<Xeago> then again
<Xeago> that's how one could use capistrano
bbttxu has quit [Quit: bbttxu]
xkx_ is now known as xkx
<PapaSierra> hmm after all that cap deploy:cleanup wants a password, and it doesn't make it clear password for what?
<Xeago> it should've printed the command that requires it?
<Xeago> no idea, because I don't deal with deploys atm
miso1337 has quit [Quit: afk]
<PapaSierra> bizarre. "connection failed for: online.co.ke (Net::SSH::AuthenticationFailed: vagrant)"
<PapaSierra> it's pretty ambiguous about its intent
<PapaSierra> i think i'll go back to manual clean ups
jeffreybaird has joined #ruby
<PapaSierra> for instance this makes no sense: executing "ls -xt /u/apps/sleepout/releases"
sepp2k has quit [Ping timeout: 246 seconds]
<Xeago> it prolly wants a listing of that
dhruvasagar has quit [Ping timeout: 265 seconds]
<PapaSierra> but i've never seen anything like /u/apps/sleepout/releases before, so that's just not right
<Xeago> look what cleanup does
<Xeago> read the capfile
dhruvasagar has joined #ruby
samphippen has quit [Quit: Computer has gone to sleep.]
<PapaSierra> it's not in my capfile
<PapaSierra> cleanup must be defined in some sourcecode somewhere
<JonnieCache> its part of capistrano itself
<JonnieCache> cleanup removes old versions
<PapaSierra> right
<JonnieCache> that youve deployed
<PapaSierra> i understand that's what it is supposed to do
<fg3> noob help needed - article: http://goo.gl/G05Jb section: Dynamic Attributes -- failing test: must return the attribute value if present in profile
<PapaSierra> i just figured it would (should?) be as easy as $ cap deploy:cleanup, but it doesn't work that way
<PapaSierra> shoot, i feel stupid now. it does work, i was just using a multi staged deploy, like testing, staging, production
<Xeago> fg3: go on
fixl has quit [Quit: KVIrc 4.3.1 Aria http://www.kvirc.net/]
<fg3> Xeago, wondering why the test is failing - it's not supposed to be failing
<Xeago> well I can't tell how it is failing
<Xeago> if you don't supply all the information
<fg3> Xeago, any help is appreciated
kyktommy has joined #ruby
<fg3> Xeago, what other info do you need
<Xeago> the actual value
<Xeago> for example
<Xeago> everything you have done
<Xeago> checked yourself
<Xeago> etc
<Xeago> creditcard number + pin
<Xeago> etc
<Xeago> :)
<matti> ;]
<Xeago> at which step are you?
fatninja has quit []
<Xeago> did you implement method_missing?
<fg3> Xeago, player.id is supposed to equal 1 -- I checked the fixture file and id = 1 there. -- tried printing debug from test file and does not show on screen
krz has joined #ruby
<fg3> I finished the Dynamic attributes section of the article
fatninja has joined #ruby
<Xeago> did you restart your test environment?
<Xeago> to be sure it reloaded your files
ssspiff has joined #ruby
<fg3> I erased and reloaded test data - ran tests 5 times
<Xeago> do tests for username pass?
sspiff has quit [Ping timeout: 246 seconds]
<fg3> yes
<Xeago> what does player.profile do?
<fg3> test results: http://pastebin.com/XzwLXiNe
sepp2k has joined #ruby
bbttxu has joined #ruby
<Xeago> fg3: if you run player.profile in irb
<Xeago> what does it return?
<fg3> I don't know - trouble printing debug data to console
<Xeago> do you know how to start your code within irb?
iamjarvo has joined #ruby
dhruvasagar has quit [Ping timeout: 276 seconds]
<fg3> Xeago, no - how?
[Neurotic] has quit [Remote host closed the connection]
dhruvasagar has joined #ruby
<Xeago> load /lib/dish.rb into irb
<Xeago> and then try figuring out why player.profile returns
<fg3> Xeago, is that the exact command "load xxx into irb"
<Xeago> no
beit has joined #ruby
roadt has quit [Ping timeout: 246 seconds]
Ivo has quit [Quit: WeeChat 0.3.9]
<Xeago> tho as there's only 1 file in dish/
<Xeago> you could call irb <file>
<Xeago> e.g. irb lib/dish/player.rb
<fg3> Xeago, lib/dish.rb loads files under lib/dish dynamically -- fails when trying to load using irb
nitti has joined #ruby
skogis has joined #ruby
CodeDroid__ has joined #ruby
<Xeago> try dish/player.rb
CodeDroid__ has quit [Client Quit]
seoaqua has joined #ruby
<fg3> Xeago, fails
<fg3> NameError: uninitialized constant Dish::Player::HTTParty
<Xeago> .. require your gems first
<fg3> Xeago, how
<Xeago> see your gemfile
<fg3> yes
<Xeago> you would require 'httparty'
francisfish has joined #ruby
nitti has quit [Ping timeout: 246 seconds]
samphippen has joined #ruby
Axsuul has quit [Ping timeout: 246 seconds]
rippa has joined #ruby
margle has quit [Quit: Computer has gone to sleep.]
margle has joined #ruby
dakine has joined #ruby
jlwestsr has joined #ruby
reuf has joined #ruby
clj_newb has quit [Ping timeout: 255 seconds]
<vectorshelve> can anyone help me with this string interpolation issue
<Xeago> whya re you escaping the ' ?
<Xeago> does it work with simple variables?
<vectorshelve> Xeago: i am getting the string in a yaml and then interpolating it in the script file.. could u correct it ?
colinbm has joined #ruby
krawchyk has joined #ruby
<Xeago> I have no idea what's going wrong tbh
roadt has joined #ruby
<vectorshelve> Xeago: https://gist.github.com/3898974
<Xeago> as I said I have no idea what's going wrong
<Xeago> I don't udnerstand the error message
<Xeago> do you get a string from the interpolated part in irb?
freeayu has quit [Ping timeout: 260 seconds]
monkegjinni has quit [Ping timeout: 246 seconds]
saac has joined #ruby
tk__ has joined #ruby
yshh has quit [Remote host closed the connection]
chussenot has quit [Quit: chussenot]
miso1337 has joined #ruby
pantomime_cheap has joined #ruby
chussenot has joined #ruby
healpay has quit [Quit: Leaving]
samphippen has quit [Quit: Computer has gone to sleep.]
tommyvyo has joined #ruby
carloslopes has joined #ruby
seanyo has joined #ruby
frogprince_mac has joined #ruby
matrixise has joined #ruby
hsbt is now known as hsbt_away
mucker has joined #ruby
aquaranto has joined #ruby
Takehiro has quit [Remote host closed the connection]
qubit has left #ruby [#ruby]
freeayu has joined #ruby
fermion has joined #ruby
verto|off is now known as verto
cdzombak has joined #ruby
samphippen has joined #ruby
iamjarvo has quit [Ping timeout: 246 seconds]
bigmcq77 has quit [Quit: Computer has gone to sleep.]
valio has joined #ruby
<valio> Hey, consider the following example def prime?; (2..Math.sqrt(self)).inject(true) { |is_prime, el| is_prime and "self" % el == 0 }; end
<valio> and this method is in the Integer clas
<valio> for example
linoj has joined #ruby
<valio> my question is
awarner has joined #ruby
<valio> how can I access the self instance
joukokar_ has quit [Ping timeout: 248 seconds]
<Xeago> what should it point to?
<valio> the upper self instance in which the method is defined
Jork1 has quit [Quit: Jork1]
arietis has joined #ruby
<Xeago> you could do the following: me=self
<Xeago> and use me
<valio> hmm
<valio> is there any other way
<Xeago> probably
<valio> I thought about that
mando has joined #ruby
slainer68 has quit [Remote host closed the connection]
<valio> in java if you have nested defined classes you can access this with classname.this e.g. Upper.this Inner1.this etc
<valio> :)
<valio> I hoped there is something similar here
bartj3 has joined #ruby
ssspiff has quit [Ping timeout: 246 seconds]
sspiff has joined #ruby
sebastorama has quit [Quit: Computer has gone to sleep.]
cantonic_ has joined #ruby
Servidorv has joined #ruby
_val_ has left #ruby [#ruby]
sterNiX has quit [Ping timeout: 260 seconds]
dhruvasagar has quit [Ping timeout: 246 seconds]
verto is now known as verto|off
invisime has joined #ruby
geekbri has joined #ruby
dhruvasagar has joined #ruby
sterNiX has joined #ruby
slainer68 has joined #ruby
cantonic has quit [Ping timeout: 252 seconds]
cantonic_ is now known as cantonic
moshee has quit [Ping timeout: 246 seconds]
moshee has joined #ruby
moshee has quit [Changing host]
moshee has joined #ruby
frogprince_mac has quit [Quit: Leaving...]
mando has quit [Remote host closed the connection]
jrajav has joined #ruby
<hoelzro> valio: Ruby doesn't do that, for better or for worse
<hoelzro> I would suggest the technique Xeago suggested
axl_ has joined #ruby
<JonnieCache> i'd chose a better name than `me` though
<hoelzro> agreed
ewag has joined #ruby
vectorshelve has quit [Quit: Page closed]
IrishGringo has joined #ruby
sailias has joined #ruby
roadt has quit [Ping timeout: 248 seconds]
reuf has quit [Read error: Connection reset by peer]
hoelzro has quit [Quit: leaving]
rob___ has joined #ruby
rob___ is now known as hoelzro
pantomime_cheap has quit [Quit: Leaving]
pantomime_cheap has joined #ruby
hsbt_away is now known as hsbt
rbuck has joined #ruby
<rbuck> hi, is it possible to apply &:to_i to each value of a hash?
<hoelzro> rbuck: hash.each_value(&:to_i) doesn't work?
dhruvasagar has quit [Ping timeout: 252 seconds]
DarkStar1 has joined #ruby
clj_newb has joined #ruby
philcrissman has joined #ruby
<DarkStar1> Hello. I was here last week asking about how to migrate a ruby site. I was then told to abandon it later that day but I've now been told to try and get it back up as soon as possible.
<rbuck> hoelzro: nope, the values remain unchanged as strings
GoGoGarrett has joined #ruby
tfrew has quit [Quit: Lost terminal]
<hoelzro> rbuck: oh, you're trying to change the hash itself?
thisirs has joined #ruby
chussenot has quit [Quit: chussenot]
<hoelzro> if that's the case, use each_pair and change the hash in place
<rbuck> hoelzro: i dont mind if it changes the original hash or returns a new one, i just need to write a function that takes a symbol (:to_i in this case) and applies the conversion to the hash
<hoelzro> hash.each_pair { |k, v| hash[k] = v.to_i }
<DarkStar1> to begin with I am trying to find out which ruby version to use. (going through tutorial setups) and I now know it's a Rails: 3.0.10
chussenot has joined #ruby
<DarkStar1> but I'm guessing that says nothing about the ruby version which I can't find anywhere
nari has joined #ruby
mmitchell has joined #ruby
<DarkStar1> does anyone know how I might be able to decipher this?
d2dchat has joined #ruby
pantomime_cheap has quit [Quit: Leaving]
pantomime_cheap has joined #ruby
Takehiro has joined #ruby
chimay has joined #ruby
kyktommy has quit [Quit: kyktommy]
frogprince_mac has joined #ruby
chrisramon has joined #ruby
<Xeago> Darkstar1: I think 1.8.7 is the lowest for rails 3.0
Mon_Ouie has joined #ruby
<Xeago> however, you might still want to use ruby 1.9.3
yshh has joined #ruby
<DarkStar1> Xeago: Wont I worry about backwards compatibility?
<Xeago> why would you?
<DarkStar1> on 1.9.3
<DarkStar1> just asking. I know squat about the whole framework. I'm told to just migrate the site
<DarkStar1> that's it.
A124 has joined #ruby
Takehiro has quit [Ping timeout: 240 seconds]
<Xeago> you're having existing code?
monkegjinni has joined #ruby
Ivo has joined #ruby
sertaconay has joined #ruby
Takehiro has joined #ruby
Jork1 has joined #ruby
Appineer has joined #ruby
wedgeV has joined #ruby
iaj has quit [Ping timeout: 260 seconds]
seoaqua has quit [Read error: Connection reset by peer]
<DarkStar1> Xeago: yeah. I have a Gemfile and a Gemfile.lock
<DarkStar1> file(s)
Coolhand has quit [Remote host closed the connection]
dpk has quit [Excess Flood]
<rbuck> hoelzro: thanks
<DarkStar1> Xeago: And some other source files. but I was given to understand that those two are very important
dpk has joined #ruby
<Xeago> that is hardly enough informatino to determine the ruby version
<Xeago> best you can do is check whether dependency's require a specific ruby
codefyre has joined #ruby
iaj has joined #ruby
wedgeV_ has joined #ruby
wedgeV has quit [Client Quit]
wedgeV_ has quit [Client Quit]
sterNiX has quit [Ping timeout: 255 seconds]
wedgeV has joined #ruby
beit_ has joined #ruby
wedgeV_ has joined #ruby
dmerrick has joined #ruby
wedgeV_ has quit [Client Quit]
sterNiX has joined #ruby
jrist-afk is now known as jrist
beit has quit [Ping timeout: 246 seconds]
<DarkStar1> Xeago: how can I top that?
endzyme has joined #ruby
Konboi has quit [Remote host closed the connection]
<endzyme> Anyone using Fog.io cloud provisioning API? If so has anyone done work with AutoScalers and tagging AWS machines via AutoScalers?
<DarkStar1> In the gem file there're two references to git servers. 1 of them I can bypass by setting up a local git and placing the directories inside
jasond has joined #ruby
BeLucid has quit [Remote host closed the connection]
nitti has joined #ruby
nwertman has joined #ruby
good_afternoon has joined #ruby
sixteneighty has joined #ruby
bbttxu has quit [Quit: bbttxu]
pantomime_cheap has quit [Quit: Leaving]
pantomime_cheap has joined #ruby
good_morning has quit [Read error: Connection reset by peer]
asteve has joined #ruby
a_a_g has quit [Quit: Leaving.]
fg3 has left #ruby ["Leaving"]
zmo_ has joined #ruby
gmurphey has quit [Ping timeout: 252 seconds]
ananthakumaran1 has quit [Quit: Leaving.]
Uranio has joined #ruby
ABK has quit [Ping timeout: 240 seconds]
<DarkStar1> Xeago: I think it may have been a 1.91
theRoUS has joined #ruby
nari has quit [Ping timeout: 260 seconds]
v0n has joined #ruby
matrixise has quit [Read error: Connection reset by peer]
samphippen has quit [Quit: Computer has gone to sleep.]
jcoglan has joined #ruby
<jcoglan> hello
<jcoglan> does anyone use the twitter gem? (version 4)
monkegjinni has quit [Ping timeout: 246 seconds]
scx has joined #ruby
replore has quit [Remote host closed the connection]
ffranz has joined #ruby
possibilities has joined #ruby
monkegjinni has joined #ruby
starship has quit [Killed (zelazny.freenode.net (Nickname regained by services))]
Guest73184 is now known as starship
gmurphey has joined #ruby
stopbit has joined #ruby
Guest66015 has joined #ruby
morf has quit [Quit: eof]
pantomime_cheap has quit [Quit: Leaving]
nitti has quit [Remote host closed the connection]
mvangala has joined #ruby
beit_ has quit [Quit: beit_]
codefyre has quit [Quit: Leaving]
samphippen has joined #ruby
iamjarvo has joined #ruby
Appineer has quit [Remote host closed the connection]
fermion has quit [Ping timeout: 246 seconds]
Appineer has joined #ruby
jrist is now known as jrist-afk
sterNiX has quit [Read error: Connection timed out]
dakine has quit [Remote host closed the connection]
sterNiX has joined #ruby
hiroyuki has quit [Read error: Connection reset by peer]
bbttxu has joined #ruby
Spooner has joined #ruby
joshman_ has joined #ruby
chin-tastic has joined #ruby
scx has quit [Remote host closed the connection]
Serial_Killer_C has joined #ruby
DrShoggoth has joined #ruby
IrishGringo has quit [Read error: Operation timed out]
beit has joined #ruby
beit has quit [Client Quit]
hiroyuki has joined #ruby
thisirs has quit [Remote host closed the connection]
robotmay has quit [Read error: Connection reset by peer]
chin-tastic has quit [Remote host closed the connection]
chin-tastic has joined #ruby
robotmay has joined #ruby
F1skr has joined #ruby
sterne has joined #ruby
ttt has quit [Remote host closed the connection]
chin-tas` has joined #ruby
SmoothSage has quit [Ping timeout: 246 seconds]
chin-tastic has quit [Ping timeout: 246 seconds]
miso1337 has quit [Read error: Connection reset by peer]
greasegum has joined #ruby
wallerdev has joined #ruby
miso1337 has joined #ruby
miso1337 has quit [Read error: Connection reset by peer]
ttt has joined #ruby
miso1337 has joined #ruby
ttt has quit [Remote host closed the connection]
morozovm has joined #ruby
miso1337_ has joined #ruby
Eplemosen has joined #ruby
miso1337 has quit [Read error: Connection reset by peer]
miso1337_ is now known as miso1337
chrisja has joined #ruby
rippa has quit [Ping timeout: 256 seconds]
undersc0re97 has quit [Read error: Connection reset by peer]
undersc0re97 has joined #ruby
miso1337_ has joined #ruby
miso1337 has quit [Read error: Connection reset by peer]
miso1337_ is now known as miso1337
cardoni has joined #ruby
monkegjinni has quit [Ping timeout: 246 seconds]
freezey has joined #ruby
miso1337 has quit [Read error: Connection reset by peer]
miso1337 has joined #ruby
margle has quit [Quit: Computer has gone to sleep.]
monkegjinni has joined #ruby
chrisramon has quit [Ping timeout: 246 seconds]
ZubKonst_ has joined #ruby
jrist-afk is now known as jrist
centipedefarmer has joined #ruby
zigomir has quit [Read error: Operation timed out]
mikepack has joined #ruby
xclite has joined #ruby
mando has joined #ruby
Ankhers has joined #ruby
bigmcq77 has joined #ruby
miso1337 has quit [Read error: Connection reset by peer]
miso1337_ has joined #ruby
cviebrock has joined #ruby
ZubKonst has quit [Ping timeout: 246 seconds]
cviebrock has left #ruby [#ruby]
andynu has joined #ruby
irleif has joined #ruby
<shevy> not me
<shevy> then again I dont really use twitter myself, I only sometimes read what others twitter about
SmoothSage has joined #ruby
djdb has quit [Quit: Ухожу я от вас (xchat 2.4.5 или старше)]
Appineer has quit [Remote host closed the connection]
frogprince_mac has quit [Quit: Leaving...]
miso1337_ has quit [Read error: Connection reset by peer]
nari has joined #ruby
beit has joined #ruby
miso1337 has joined #ruby
emanu has joined #ruby
Serial_Killer_C has quit [Remote host closed the connection]
carlyle has joined #ruby
morozovm has quit [Read error: Connection reset by peer]
cardoni has quit [Quit: cardoni]
quest88 has joined #ruby
morozovm has joined #ruby
jrgifford has joined #ruby
samphippen has quit [Quit: Computer has gone to sleep.]
miso1337 has quit [Read error: Connection reset by peer]
miso1337_ has joined #ruby
dnstbr has joined #ruby
<Servidorv> hey guys
<Servidorv> good morning
<Servidorv> can anyone help me understand a little problem i have with a each
<Servidorv> im new to ruby
nitti has joined #ruby
<Servidorv> and i've been strugleling with these since yesterday
<hoelzro> servidorv: we can help =)
mneorr has quit [Remote host closed the connection]
<hoelzro> what exactly is the issue you're having?
miso1337 has joined #ruby
<Servidorv> here is the code https://gist.github.com/3895926 the problem is that it returns the complete posts hash and i only need it to return the likes hash that is inside the posts hash
miso1337_ has quit [Read error: Connection reset by peer]
<hoelzro> the method returns the posts hash?
<Servidorv> yeah
<Servidorv> it returns the complete posts hash
<Xeago> because the last statement ending is the end of posts.each
<hoelzro> exactly
<hoelzro> so add a line after line 21:
<Servidorv> ok so can anyone please rewrite my code so i can understand how it should be written
<hoelzro> containing likes
<hoelzro> or whatever you mean to return
anderse has quit [Read error: Connection reset by peer]
anderse has joined #ruby
<Servidorv> what do you mean after since likes is inside posts so if i want to manipulate likes i have to be inside the posts each right??
quest88 has quit [Quit: quest88]
<hoelzro> well, what are you trying to return?
<Servidorv> ok here is the thing
<Servidorv> i have a hash with posts
<Servidorv> i am saving that already
<Servidorv> but now inside each post i have another hash that is likes
jrgifford has quit []
<Servidorv> i need to get the likes
<Servidorv> only
samphippen has joined #ruby
miso1337 has quit [Read error: Connection reset by peer]
<Servidorv> so i can save them separetly from posts
miso1337 has joined #ruby
<Servidorv> the reason is because i need to count the likes per each user, and do a ranking of user with the most likes
nateberkopec has joined #ruby
<hoelzro> servidorv: so put the result in a variable outside of your each, and return that
<hoelzro> ex:
<hoelzro> total = 0 ; (1..10).each { |n| total += n } return total
miso1337 has quit [Read error: Connection reset by peer]
miso1337 has joined #ruby
cakehero has joined #ruby
<arietis> what's easiest way to keep track of some counter?
<arietis> on
<Servidorv> oh so that way
mikepack has quit []
mikepack has joined #ruby
mikepack has quit [Remote host closed the connection]
monkegji_ has joined #ruby
<Servidorv> i will have all the likes in one var only
<awestroke> arietis: or one could to (1..10).inject(:+)
monkegjinni has quit [Read error: No route to host]
mikepack has joined #ruby
nwertman has quit [Quit: nwertman]
possibilities has quit [Remote host closed the connection]
<arietis> i'm generating integer with every new request and it's incremented by one
<arietis> should i save it to sqlite db?
pantomime_cheap has joined #ruby
Archisze has joined #ruby
<Xeago> arietis: no
<Servidorv> hoelzro: sorry to ask but can you rewrite my code so i can fully understand what you mean
<Servidorv> please
<Xeago> redis would be more suited
<arietis> this integer is some kind of id which is unique for every new request
<Xeago> servidorv: each returns the initial array
<hoelzro> servidorv: I'm not entirely sure what you're trying to do
<Spooner> arietis That is a spec, not code question. If you need it you need it, but we can't tell you.
<Xeago> arietis: the simple way would be a global
morozovm has quit [Read error: Connection reset by peer]
<arietis> Xeago: but global can occasionally reset, no?
<Xeago> if your app restarts
moshee has quit [Ping timeout: 260 seconds]
<Xeago> I'd recommend redis
moshee has joined #ruby
moshee has quit [Changing host]
moshee has joined #ruby
<arietis> kk, thanks
morozovm has joined #ruby
<Spooner> Why use a second db, Xeago?
sterne has left #ruby ["ERC Version 5.3 (IRC client for Emacs)"]
jessed has joined #ruby
<Spooner> Well, I'm assuming all this data is coming from a db, arietis ?
<arietis> Spooner: not yet
<arietis> i'm prototyping architecture
<Spooner> OK. So probably not worth install redis in addition to the source db just to store a single integer then ;)
<Xeago> Spooner: not a second db :)
<arietis> but i have no source db so far
<arietis> i thought about sqlite
<Xeago> does your architecture cross machines?
<Xeago> if so, use redis
<Xeago> else write it to a locked file
<Xeago> good enough for a prototype
karstensrage has quit [Read error: Connection reset by peer]
Banistergalaxy has quit [Ping timeout: 240 seconds]
lledet has joined #ruby
<Spooner> If it is just a prototype, might as well just use a variable. Don't over-complicate it, xeago ;)
davorb has quit [Quit: leaving]
maletor has joined #ruby
darkc0met has quit [Ping timeout: 240 seconds]
lorn has quit [Quit: ZNC - http://znc.sourceforge.net]
Banistergalaxy has joined #ruby
chrismcg is now known as zz_chrismcg
dkannan has quit [Ping timeout: 240 seconds]
karstensrage has joined #ruby
karstensrage has quit [Max SendQ exceeded]
Takehiro has quit [Remote host closed the connection]
Guest77727 has joined #ruby
jprovazn is now known as jprovazn_away
darkc0met has joined #ruby
yshh has quit [Remote host closed the connection]
lorn has joined #ruby
<Xeago> he might need it across different process/apps
<Xeago> imo, redis is easier than that
<invisime> yeah, xeago. Spooner's right. yagni.
<Xeago> yagni?
IrishGringo has joined #ruby
<Spooner> Yes, but we suggest that after the guy actually needs it.
irleif has quit [Quit: Computer has gone to sleep.]
lolmaus has quit []
<Spooner> I don't think anyone, including arietis, really knows what is required at this point.
DrShoggoth has quit [Remote host closed the connection]
Uranio has quit [Ping timeout: 260 seconds]
replore_ has joined #ruby
roadt has joined #ruby
nari has quit [Ping timeout: 260 seconds]
elux has joined #ruby
davorb has joined #ruby
jrajav has quit []
csaunders has joined #ruby
iamjarvo has quit [Ping timeout: 245 seconds]
khakimov has joined #ruby
anachronistic has joined #ruby
maesbn has quit [Remote host closed the connection]
lewis has joined #ruby
<lewis> hi
good_afternoon has quit [Quit: Leaving]
dkannan has joined #ruby
JohnBat26 has quit [Read error: Operation timed out]
havenn has joined #ruby
davorb has left #ruby [#ruby]
rabidpraxis has joined #ruby
blazes816 has joined #ruby
pantomime_cheap has quit [Quit: Leaving]
davidcelis has quit [Quit: K-Lined.]
hadees has quit [Quit: hadees]
pantomime_cheap has joined #ruby
mneorr has joined #ruby
ckrailo has joined #ruby
<Spooner> arietis : Or maybe I'm understating your knowledge of your own project. Sorry.
<awestroke> lewis: hello good sir!
zz_chrismcg is now known as chrismcg
hbpoison has quit [Ping timeout: 246 seconds]
binaryplease has joined #ruby
nitti has quit [Remote host closed the connection]
adeponte has joined #ruby
davorb has joined #ruby
Jork1 has quit [Quit: Jork1]
<lewis> hi awestroke
clj_newb has quit [Ping timeout: 245 seconds]
nitti has joined #ruby
baroquebobcat has joined #ruby
adeponte has quit [Remote host closed the connection]
maletor has quit [Quit: Computer has gone to sleep.]
binaryplease has quit [Client Quit]
cascalheira has quit [Quit: Linkinus - http://linkinus.com]
chrismcg is now known as zz_chrismcg
sent-hil has joined #ruby
hoelzro is now known as hoelzro|away
morozovm has quit [Read error: Connection reset by peer]
morozovm has joined #ruby
xaq has joined #ruby
greasegum has quit [Ping timeout: 256 seconds]
tk__ has quit [Quit: ばいばい]
csaunders has quit [Quit: Computer has gone to sleep.]
ttt has joined #ruby
F1skr has quit [Ping timeout: 244 seconds]
larissa has quit [Quit: Leaving]
Takehiro has joined #ruby
aganov has quit [Remote host closed the connection]
csaunders has joined #ruby
emanu has quit [Quit: emanu]
ttt has quit [Ping timeout: 240 seconds]
kenneth has quit [Quit: kenneth]
emanu has joined #ruby
w4lk3r has quit [Quit: Page closed]
Takehiro has quit [Ping timeout: 252 seconds]
panpainter has joined #ruby
emanu has quit [Client Quit]
carloslopes has quit [Quit: Leaving.]
vlad_starkov has joined #ruby
bapa has quit [Ping timeout: 276 seconds]
timonv has quit [Remote host closed the connection]
hbpoison has joined #ruby
cardoni has joined #ruby
<JonnieCache> Xeago: yagni = you aint gonna need it
Morkel has joined #ruby
timonv has joined #ruby
vlad_starkov has quit [Ping timeout: 248 seconds]
Serial_Killer_C has joined #ruby
frogprince_mac has joined #ruby
morozovm has quit [Read error: Connection reset by peer]
becom33 has quit [Quit: Leaving]
zodiak has joined #ruby
morozovm has joined #ruby
timonv has quit [Remote host closed the connection]
Synthead has joined #ruby
monkegji_ has quit [Ping timeout: 260 seconds]
chrishunt has quit [Ping timeout: 260 seconds]
baphled has quit [Read error: Operation timed out]
Guest76766 has quit [Ping timeout: 256 seconds]
chussenot has quit [Quit: chussenot]
hbpoison has quit [Ping timeout: 240 seconds]
<arietis> Spooner: Xeago: so for curent state of project i need to store number only
khakimov has quit [Quit: Computer has gone to sleep.]
thedeadghost has quit [Ping timeout: 240 seconds]
pantomime_cheap has quit [Quit: Leaving]
artnez has joined #ruby
pantomime_cheap has joined #ruby
prettymuchbryce has joined #ruby
bluOxigen has quit [Ping timeout: 265 seconds]
rbuck has quit [Quit: Leaving.]
g0bl1n has joined #ruby
jgrevich has joined #ruby
yshh has joined #ruby
ryanlecompte has joined #ruby
mmitchell has quit [Ping timeout: 240 seconds]
mmitchell has joined #ruby
netstatic has joined #ruby
dr_bob has quit [Quit: Leaving.]
macmartine has joined #ruby
chussenot has joined #ruby
chrisramon has joined #ruby
hbpoison has joined #ruby
freeayu has quit [Remote host closed the connection]
zommi has quit [Quit: Leaving.]
iamjarvo has joined #ruby
jrajav has joined #ruby
samphippen has quit [Quit: Computer has gone to sleep.]
fir_ed has joined #ruby
LennyLinux has quit [Remote host closed the connection]
thedeadghost has joined #ruby
mercwithamouth has joined #ruby
greasegum has joined #ruby
dnstbr has quit [Quit: Computer has gone to sleep.]
hbpoison has quit [Ping timeout: 256 seconds]
otters has quit [Ping timeout: 272 seconds]
Rydefalk has quit [Read error: Connection reset by peer]
sebastorama has joined #ruby
Rydefalk has joined #ruby
morozovm has quit [Read error: Connection reset by peer]
sebastorama has quit [Client Quit]
morozovm has joined #ruby
brianpWins has quit [Quit: brianpWins]
zmo_ has quit [Ping timeout: 255 seconds]
DZwijnenburg has quit [Ping timeout: 244 seconds]
graft has joined #ruby
graft has quit [Changing host]
graft has joined #ruby
colinbm has quit [Quit: colinbm]
sebastorama has joined #ruby
pantomime_cheap has quit [Quit: Leaving]
morozovm has quit [Read error: Connection reset by peer]
pantomime_cheap has joined #ruby
morozovm has joined #ruby
<Servidorv> hey guys
<Servidorv> sorry but i have to tell you
<Servidorv> I F MADE IT!!!!!!!!!!!!!!!!!!!
sambio has joined #ruby
<Servidorv> i made it work
Bosma has quit [Quit: leaving]
<Servidorv> and i understand why too
<Servidorv> :)
ckrailo has quit [Quit: Computer has gone to sleep.]
<Servidorv> thanks for all that helped me since yesterday
otters has joined #ruby
<Servidorv> THANKS YOU ALL
netstatic has left #ruby [#ruby]
RubyRails has left #ruby [#ruby]
bigkevmcd has quit [Ping timeout: 246 seconds]
cbuxton has joined #ruby
starship is now known as kkh
kkh is now known as starship
elsifaka has quit [Quit: Veloma e!]
Krists has quit [Ping timeout: 246 seconds]
Bosma has joined #ruby
chussenot has quit [Quit: chussenot]
hadees has joined #ruby
perun_ has quit [Ping timeout: 260 seconds]
<shevy> made what work
bigmcq77 has quit [Quit: Computer has gone to sleep.]
falkenbt has joined #ruby
francisfish has quit [Remote host closed the connection]
<falkenbt> hi, I have a problem installing the gem redcarpet, maybe some of you guys can help me out, I'm new to this
<falkenbt> the make fails with
headius has joined #ruby
<falkenbt> gcc -I. -I/usr/lib/ruby/1.8/i686-linux -I/usr/lib/ruby/1.8/i686-linux -I. -D_FORTIFY_SOURCE=2 -D_FILE_OFFSET_BITS=64 -fPIC -fno-strict-aliasing -g -g -O2 -fPIC -c rc_render.c In file included from rc_render.c:17:0: redcarpet.h:6:21: fatal error: ruby/st.h: No such file or directory
aantix has joined #ruby
<falkenbt> the missing file (st.h) is located under /usr/lib/ruby/1.8/i686-linux/st.h
<falkenbt> not sure why gcc is looking for it in ruby/st.h and how to change this
sn0wb1rd has quit [Quit: sn0wb1rd]
Mon_Ouie has quit [Ping timeout: 246 seconds]
tjbiddle has joined #ruby
chin-tas` has quit [Ping timeout: 265 seconds]
Mon_Ouie has joined #ruby
morozovm has quit [Read error: Connection reset by peer]
davidcelis has joined #ruby
morozovm has joined #ruby
ryanf has joined #ruby
aruntomar has joined #ruby
<JonnieCache> i wish i didnt suck so badly at sql :(
<RubyPanther> falkenbt: 1.8.x quit being the "stable version" years ago. Years.
jessed has quit [Quit: jessed]
Bosma has quit [Quit: leaving]
pantomime_cheap has quit [Quit: Leaving]
Vinz_` is now known as Vinz_
ckrailo has joined #ruby
tjbiddle_ has joined #ruby
pantomime_cheap has joined #ruby
<RubyPanther> it has been so long, I can't remember the compilation issues
Bosma has joined #ruby
chussenot has joined #ruby
aces1up has quit [Remote host closed the connection]
_cheney2 is now known as _cheney
aces1up has joined #ruby
chussenot has left #ruby [#ruby]
senny has quit [Remote host closed the connection]
bigkevmcd has joined #ruby
recycle has joined #ruby
tjbiddle has quit [Ping timeout: 240 seconds]
tjbiddle_ is now known as tjbiddle
maletor has joined #ruby
margle has joined #ruby
SegFaultAX|work has joined #ruby
clj_newb has joined #ruby
und3f has quit [Remote host closed the connection]
und3f has joined #ruby
CaptainKnots has quit [Quit: bazinga!]
kenneth has joined #ruby
<falkenbt> RubyPanther: thanks, how about 1.9.1?
<DarkStar1> Anyone here have experience with refinery cms
<RubyPanther> falkenbt: if it is the same error, I would just add the dir it is really in to -I
adeponte has joined #ruby
<RubyPanther> I don't remember the names of all the compilation options, I look back at prior examples every time even though I write a lot of ruby C :o
<RubyPanther> but the one wit hthe -I that is hte one
sn0wb1rd has joined #ruby
Bosma has quit [Quit: leaving]
philcrissman has quit [Ping timeout: 245 seconds]
Bosma has joined #ruby
lxsameer has joined #ruby
<lxsameer> how can i work with e c library
JonnieCache has quit [Ping timeout: 246 seconds]
chrishunt has joined #ruby
<RubyPanther> Nice of them to use that chapter for the giveaway :)
carlyle has quit [Remote host closed the connection]
carlyle has joined #ruby
<lxsameer> RubyPanther: thanks man
rippa has joined #ruby
jbw has quit [Ping timeout: 265 seconds]
Takehiro has joined #ruby
CodeDroid__ has joined #ruby
chimay has quit [Quit: WeeChat 0.4.0-dev]
nitti has quit [Remote host closed the connection]
artOfWar has joined #ruby
carlyle has quit [Ping timeout: 245 seconds]
artOfWar has quit [Remote host closed the connection]
artOfWar has joined #ruby
mmitchell has quit [Remote host closed the connection]
Takehiro has quit [Ping timeout: 246 seconds]
mahmoudimus has joined #ruby
xaq_ has joined #ruby
xaq has quit [Read error: Connection reset by peer]
nitti has joined #ruby
jcoglan has quit [Ping timeout: 246 seconds]
clj_newb has quit [Ping timeout: 256 seconds]
clj_newb has joined #ruby
freezey has quit [Ping timeout: 244 seconds]
Nathandim has joined #ruby
<shevy> dumdedum
<shevy> ruby needs to take off really
<Servidorv> hey guys, need to talk to someone about a mothod
<shevy> we need a real RubyOS
<shevy> a mothod? the mother in a method?
freezey has joined #ruby
<Servidorv> what would be the best way to do an rank
<Spooner> No, it is a bit like a butterfly, shevy, only browner.
<shevy> a prank?
<shevy> servidorv, you use funny words
Banistergalaxy has quit [Ping timeout: 245 seconds]
<Servidorv> rank
<shevy> Spooner, haha
<Servidorv> user rank
pothibo has quit [Quit: pothibo]
<shevy> make an array or a hash and sort it by [criteria here]
<Spooner> You have to give a bit more info before we can reasonably give you any answer.
<Servidorv> i have an array with each like per posts
<Servidorv> and each comment per post
<shevy> yes now decide how to sort it
<shevy> you can use .sort or .sort_by
<Servidorv> yeah the thing is that in the array i only have the user id and name
<shevy> you can sort everything man!
ffranz has quit [Quit: Leaving]
<Servidorv> i have to do the rank my self
carloslopes has joined #ruby
<Servidorv> im reading thanks
<shevy> it explains <=> syntax
<shevy> when you understood both links, you never have to ask anything sort-related again :)
<shevy> especially the <=> part
<shevy> array.sort { |x, y| y <=> x }
<Servidorv> yeah but thats not what i was looking for
<Servidorv> i dont need to sort it
<Servidorv> i need to get each like look in the db if the user exists than it it exists i have to add 1+ to the likes table
miso1337 has quit [Quit: afk]
<invisime> <3 flying saucer operator.
freezey has quit [Ping timeout: 246 seconds]
cezar has quit [Remote host closed the connection]
<Servidorv> get it??
jbw has joined #ruby
freezey has joined #ruby
<Servidorv> i have to count how many time has the user posted or liked something and than save the result in the db
morozovm has quit [Read error: Connection reset by peer]
<Servidorv> first save the result separate ex: likes=3 posts=4 totalrank = 7
morozovm has joined #ruby
wedtm|away is now known as wedtm
brianpWins has joined #ruby
wpaulson has joined #ruby
freezey_ has joined #ruby
<Spooner> shevy Not asking for specific Ruby implementation, but design the whole script ;)
<shevy> servidorv I really dont know what you mean
<Spooner> servidorv : totalrank = likes.size + posts.size
<shevy> you pull the data from the database into your -> ruby script
recycle has quit [Remote host closed the connection]
<shevy> from there you can work and sort
bluenemo has quit [Remote host closed the connection]
<shevy> once you sorted it, store it back into the database again
STyler has joined #ruby
sneakyness_wk has joined #ruby
<Servidorv> i already have the data
<Servidorv> im getting it from facebook
mrsolo has joined #ruby
<Servidorv> so now i have an array with all the likes per posts and all the comments por post, but not just the number the actual username and faceid of each like and each comment per post
freezey has quit [Ping timeout: 252 seconds]
ananthakumaran has joined #ruby
freezey_ is now known as freezey
Virunga has joined #ruby
alfism has joined #ruby
pantomime_cheap has quit [Quit: Leaving]
sent-hil has quit [Remote host closed the connection]
pantomime_cheap has joined #ruby
<arietis> am i using eql?() in order to compare strings?
<arietis> why '?'
<Spooner> arietis : It is a Ruby convention. Methods can have ? or ! at the end of them.
c0rn_ has joined #ruby
<matti> Why not?
Neurotiquette has joined #ruby
<Spooner> arietis : Methods that return booleans, have ?, methods which are "dangerous" (usually change in place or make a permanent change) have !
replore_ has quit [Remote host closed the connection]
Virunga is now known as LennyLinux
<Spooner> arietis : Though just use... str1 == str2 like everyone else
<Neurotiquette> I was iterating over a collection with each_with_index queried from a db (mongo) using mongoid and outputting the "i" for every record iterated and was surprised when "i" surpassed the number of records in the database. Any idea what the heck is going on or how I can figure it out?
<Spooner> Neurotiquette : Is i a unique ID, not the simple index per se?
mrsolo has quit [Client Quit]
<Neurotiquette> Spooner: Nah, it should have been a simple index
hbpoison has joined #ruby
<Neurotiquette> Spooner: that's how each_with_index works so far as I can tell
* Spooner nods.
<Xeago> Neurotiquette: the each with index method on a collection provided by a gem might be overriden to use db keys as index
mrsolo has joined #ruby
slainer68 has quit [Remote host closed the connection]
<Neurotiquette> Xeago: Ahh. That makes sense. Doubt that's the case this time around though. It was definitely linear, and mongo id's aren't pretty and incrementtal like that.
<Spooner> Neurotiquette : Try each.with_index instead. as xeago says, it might be overriding each_with_index to mean each_with_row_id
apok has joined #ruby
greasegum has quit [Ping timeout: 240 seconds]
Vainoharhainen has quit [Quit: Leaving...]
<Neurotiquette> oh. didn't know you can do that… that works, thanks
<Xeago> Spooner: is that collection.each.withindex?
<arietis> Spooner: i just wanna check if object is nil or string, i suppose i shouldn't compare at all in thic case and just check class type
<arietis> this*
<Neurotiquette> Mongoid::Criteria .. but it's iterable
stephenjudkins has joined #ruby
tommyvyo has quit [Quit: Textual IRC Client: http://www.textualapp.com/]
<Spooner> Yes, collection.each_with_index is old, but since we have #with_index, you can index everything now (e..g map.with_index)
tchebb has joined #ruby
<Spooner> arietis : If you just need to check for nils, use str.nil?
tchebb has quit [Client Quit]
<Spooner> Or just: if str
hbpoison has quit [Ping timeout: 256 seconds]
<arietis> Spooner: kk, thanks
sertaconay has quit [Read error: Connection reset by peer]
margle has quit [Quit: Computer has gone to sleep.]
tchebb has joined #ruby
stkowski has joined #ruby
brianpWins has quit [Read error: Connection reset by peer]
sertaconay has joined #ruby
yshh has quit [Remote host closed the connection]
robotmay_ has joined #ruby
brianpWins has joined #ruby
robotmay has quit [Read error: Connection reset by peer]
jimgg has joined #ruby
daniel_- has joined #ruby
daniel_- has quit [Changing host]
daniel_- has joined #ruby
jimgg has left #ruby [#ruby]
apok has quit [Remote host closed the connection]
apok has joined #ruby
dpk has quit [Quit: Terminated with extreme prejudice - dircproxy 1.2.0]
perun_ has joined #ruby
chin-tas` has joined #ruby
siyusong has joined #ruby
asteve has quit []
asteve has joined #ruby
amskah has joined #ruby
elaptics is now known as elaptics`away
siyusong has quit [Client Quit]
Archisze has quit [Remote host closed the connection]
clj_newb has quit [Ping timeout: 272 seconds]
carlyle has joined #ruby
beachandbytes has quit [Ping timeout: 240 seconds]
chin-tas` is now known as chin-tastic
dpk has joined #ruby
voodoofish430 has joined #ruby
amskah has quit [Client Quit]
jrajav has quit []
c0rn_ has quit [Remote host closed the connection]
dpk has quit [Excess Flood]
dpk has joined #ruby
c0rn_ has joined #ruby
krz has quit [Quit: krz]
Liquid_X has quit [Remote host closed the connection]
CaptainKnots has joined #ruby
CaptainKnots has quit [Changing host]
CaptainKnots has joined #ruby
kn330 has quit [Ping timeout: 256 seconds]
<awestroke> I need to run a ruby app on a machine where I cannot install gems. so I thought of bundling the gems I needed with --path=./vendor
<awestroke> unfortunately the host doesn't have bundler either
<awestroke> so that fails too
DZwijnenburg has joined #ruby
<Xeago> why does that fail?
<Xeago> isn't ./vender in the gempath?
ephemerian has quit [Quit: Leaving.]
nitti_ has joined #ruby
dpk has quit [Excess Flood]
PapaSierra has quit [Ping timeout: 246 seconds]
DZwijnenburg has quit [Client Quit]
dpk has joined #ruby
workmad3 has quit [Ping timeout: 256 seconds]
dpk has quit [Excess Flood]
ffranz has joined #ruby
dpk has joined #ruby
<awestroke> Xeago: can't require bundler/setup in the program
Banistergalaxy has joined #ruby
nitti_ has quit [Remote host closed the connection]
<Xeago> remove that line, or vendor bundler aswell
dpk has quit [Excess Flood]
dpk has joined #ruby
nitti has quit [Ping timeout: 240 seconds]
<awestroke> I found "gem install <gem> -i <path>" now. how do I let "require" find the gems installed into the custom path?
SegFaultAX|work has quit [Ping timeout: 260 seconds]
xaq_ has quit [Remote host closed the connection]
setient has joined #ruby
Morkel has quit [Quit: Morkel]
mohsinhijazee has joined #ruby
mucker has quit [Quit: leaving]
<mohsinhijazee> Hi everyone!
moos3 has joined #ruby
<mohsinhijazee> Do you need an interface (Java, C#) in Ruby which is highly dynamic language? I think not. Am I right? I mean duck typing is there.
nitti has joined #ruby
nitti has quit [Remote host closed the connection]
<Xeago> no
ndboost has joined #ruby
Nathandim has quit [Quit: Leaving]
reuf has joined #ruby
dpk has quit [Excess Flood]
cjs226 has joined #ruby
<Spooner> mohsinhijazee : Yeah, all ducks here.
apok has quit [Ping timeout: 272 seconds]
dpk has joined #ruby
<mohsinhijazee> Spooner: Thank you, I thought the same. Actually, got a project where need to translate from Java to Ruby :)
<RubyPanther> mohsinhijazee: the idea of an interface in Ruby is that there is some known selection of methods that foo needs to have to support bar. So you might have a mixin Omg and the document says your class needs to implement #next and #omg
<Spooner> mohsinhijazee : We have mixins (Module) which can look a bit like interfaces, but they are implementation, not just declarations.
<RubyPanther> it is not formalized in the code
pantomime_cheap has quit [Quit: Leaving]
<mohsinhijazee> RubyPanther: Right. And when there responds_to? I think consumer should confirm it right there.
serp1 has joined #ruby
pantomime_cheap has joined #ruby
xaq has joined #ruby
<RubyPanther> mohsinhijazee: yes, that is the one and only way they should attempt to confirm
tvw has quit [Read error: Connection reset by peer]
<DarkStar1> anyone here tell me how to get ruby to use mysql instead of sqlite?
sneakyness_wk has quit [Ping timeout: 260 seconds]
dpk has quit [Excess Flood]
<mohsinhijazee> Spooner: RubyPanther: here's an interesting read http://stackoverflow.com/questions/4437291/what-is-java-interface-equivalent-in-ruby
shevy has quit [Ping timeout: 246 seconds]
dpk has joined #ruby
<mohsinhijazee> I hope sharing links isn't against the policies here, please pardon me, new to the room.
Liquid_X has joined #ruby
serp1 has left #ruby [#ruby]
<Spooner> No, fine.
SegFaultAX|work has joined #ruby
kn330 has joined #ruby
F1skr has joined #ruby
dpk has quit [Excess Flood]
mmitchell has joined #ruby
<Spooner> darkstar Well, you just use mysql instead of sqlite. If you mean "how do you get Rails to use mysql instead of sqlite?" then that is a very different question.
mmitchell has quit [Remote host closed the connection]
<RubyPanther> Jörg W Mittag explains it pretty well
mmitchell has joined #ruby
dpk has joined #ruby
Vinz_ is now known as Vinz_`
dpk has quit [Excess Flood]
nitti has joined #ruby
Vinz_` is now known as Vinz_
dpk has joined #ruby
<mohsinhijazee> Besides apidock, and ruby-doc.org what are other good resources about ruby?
Takehiro has joined #ruby
minijupe has joined #ruby
<Spooner> mohsinhijazee : If you have a lot of Java to convert, you might be better just using JRuby and importing your Java stuff.
sn0wb1rd has quit [Remote host closed the connection]
jcoglan has joined #ruby
<mohsinhijazee> Spooner: its a small file system emulator, that must be converted for sake of showing Ruby features.
sent-hil has joined #ruby
shadoi has joined #ruby
<mohsinhijazee> Spooner: RubyPanther: Can you guys guide me about some really awesome online books on Ruby the language only? Thanks in advance. :)
tinhead has joined #ruby
<Spooner> http://pine.fm/LearnToProgram/ (you'll want to skip through the beginning bits quickly).
bricker has joined #ruby
dpk has quit [Client Quit]
<Spooner> http://www.ruby-doc.org/docs/ProgrammingRuby/ (for an older version of Ruby, but a full and good manual).
dpk has joined #ruby
sepp2k1 has joined #ruby
bluOxigen has joined #ruby
Takehiro has quit [Ping timeout: 246 seconds]
sepp2k has quit [Ping timeout: 246 seconds]
<DarkStar1> Spooner: yes I mean How do I get rails to use mysql
<mohsinhijazee> RubyPanther: Thank you, that would suffice.
graft has quit [Ping timeout: 245 seconds]
<Spooner> Darkstar1 : Yeah, Ruby != Rails. You might get more joy asking on #rubyonrails (but someone might know here).
<arietis> RubyPanther: last link is nice, bookmarked
<DarkStar1> can't figure out how to get this damn site/app up and running
JohnBat26 has joined #ruby
headius has quit [Quit: headius]
<RubyPanther> Mongrel sucks, but Zed is awesome.
<DarkStar1> Spooner: You'll have to forgive, I'm completely new to ruby or rails. I've just been asked to get this thing going
reinaldob has quit [Remote host closed the connection]
dpk has quit [Excess Flood]
dpk has joined #ruby
ndboost has quit [Remote host closed the connection]
<Spooner> Darkstar1 : Don't worry, 9/10 Rails devs don't realise that Ruby is a standalone language ;)
ckrailo has quit [Quit: Computer has gone to sleep.]
<iamjarvo> Spooner: haha
eldar has joined #ruby
ndboost has joined #ruby
samphippen has joined #ruby
shevy has joined #ruby
<DarkStar1> Ok. Well I won't be working with the tech once I get this site up and running so I hope this is achievable without having to read a few thousand pages :)
g0bl1n has quit [Ping timeout: 246 seconds]
davidcelis has quit [Quit: K-Lined.]
chrisramon has quit [Ping timeout: 245 seconds]
ndboost has quit [Remote host closed the connection]
davidcelis has joined #ruby
dpk has quit [Client Quit]
<Spooner> It is probably very easy, Darkstar1, but not too many Rails-people in here (though there are some). #rubyonrails should sort you out in a jiffy.
apok_ has joined #ruby
margle has joined #ruby
stephenjudkins has quit [Quit: stephenjudkins]
dpk has joined #ruby
wpaulson has quit [Quit: Colloquy for iPhone - http://colloquy.mobi]
dpk has quit [Excess Flood]
dpk has joined #ruby
robotmay_ has quit [Remote host closed the connection]
bluOxigen has quit [Ping timeout: 245 seconds]
ndboost has joined #ruby
haxrbyte has joined #ruby
dpk has quit [Excess Flood]
robustus has joined #ruby
bbttxu has quit [Quit: bbttxu]
dpk has joined #ruby
dpk has quit [Excess Flood]
kn330 has quit [Remote host closed the connection]
hoelzro|away is now known as hoelzro
vlad_starkov has joined #ruby
schaerli has joined #ruby
asobrasil has joined #ruby
rubious has joined #ruby
dpk has joined #ruby
moshee has quit [Ping timeout: 248 seconds]
dpk has quit [Excess Flood]
moshee has joined #ruby
moshee has quit [Changing host]
moshee has joined #ruby
graft has joined #ruby
pantomime_cheap has quit [Quit: Leaving]
Scriptwriter has quit [Read error: Connection reset by peer]
pantomime_cheap has joined #ruby
dpk has joined #ruby
haxrbyte_ has quit [Ping timeout: 246 seconds]
grubles has left #ruby ["AndroIRC - Android IRC Client ( http://www.androirc.com )"]
dpk has quit [Excess Flood]
chetan- has joined #ruby
dpk has joined #ruby
macmartine has quit [Quit: ["Textual IRC Client: www.textualapp.com"]]
vlad_starkov has quit [Ping timeout: 240 seconds]
alvaro_o has joined #ruby
gmurphey has quit [Ping timeout: 246 seconds]
hbpoison has joined #ruby
mucker has joined #ruby
JohnBat26 has quit [Quit: KVIrc 4.3.1 Aria http://www.kvirc.net/]
mneorr has quit [Remote host closed the connection]
chrisramon has joined #ruby
ndboost has quit [Remote host closed the connection]
_JamieD_ has quit [Quit: _JamieD_]
savage- has joined #ruby
ryanlecompte has quit [Read error: Connection reset by peer]
irleif has joined #ruby
Xeago_ has joined #ruby
Xeago_ has quit [Remote host closed the connection]
mrsolo has quit [Quit: This computer has gone to sleep]
areil has quit [Remote host closed the connection]
gmurphey has joined #ruby
mrsolo has joined #ruby
Xeago has quit [Ping timeout: 246 seconds]
wpaulson has joined #ruby
wpaulson has quit [Client Quit]
freezey has quit [Quit: freezey]
swarley has joined #ruby
JohnBat26 has joined #ruby
baphled has joined #ruby
<swarley> does anyone know offhand how to take a splat as an argument in a ruby C extension?
baroquebobcat has quit [Quit: baroquebobcat]
<hoelzro> swarley: take a splat?
<hoelzro> like, an arbitrary # of args?
<swarley> def meth(*splat)
<blazes816> i tried to figure it out for a while the other day but gave up
dnstbr has joined #ruby
<blazes816> and make it take an array
icole has joined #ruby
<hoelzro> I see
<hoelzro> good question...
* swarley looks for a stdlib method that takes a splat
daniel_- has quit [Read error: Operation timed out]
<hoelzro> can you think of any core method that behave that way?
<hoelzro> =)
<hoelzro> great minds think alike
<swarley> xD
clj_newb has joined #ruby
icole has quit [Read error: Connection reset by peer]
<hoelzro> ah, argc = -2
<hoelzro> swarley: ^^
passbe has quit [Ping timeout: 260 seconds]
<swarley> oh, that's odd
lewis has left #ruby [#ruby]
<hoelzro> indeed
icole has joined #ruby
baroquebobcat has joined #ruby
slainer68 has joined #ruby
mohsinhijazee has quit [Remote host closed the connection]
ukd1 has joined #ruby
sent-hil has quit [Read error: Connection reset by peer]
mmitchell has quit [Remote host closed the connection]
thecreators has joined #ruby
hadees has quit [Quit: hadees]
mmitchell has joined #ruby
hbpoison has quit [Ping timeout: 255 seconds]
freezey has joined #ruby
<matti> swarley: Splat is annoying.
Trioke has joined #ruby
<ukd1> does anyone know a good alternative to vcr that works well with rspec2?
<shevy> matti: like flies!
<tos9> Can I take a poll? How many of you use reST for documentation? I really really dislike rubydoc, and I dislike comments-for-documentation in general, so I guess I dislike yard too, but slightly less than rubydoc. I like reST a lot though from other languages, but, OOC how many people in the ruby community use it [not that it'd discourage me, so this really is just a poll for curiosity's sake]?
xaq has quit [Ping timeout: 260 seconds]
<matti> swarley: Part is -2 for argc, part how parse.y will then handle it.
stephenjudkins has joined #ruby
<swarley> Meh, depends. What I'm doing right now required a splat for it to work and still look pretty
nitti has quit [Remote host closed the connection]
<shevy> tos9 I only document by explaining in my .rb files, and writing a tutorial. I gave up on everything else related to ruby
m3rl0x has joined #ruby
<matti> swarley: You could do -2 and RARRAY iteration.
DarkStar1 has left #ruby [#ruby]
<shevy> within my .rb files, I dont follow any particular convention
<swarley> hm
<m3rl0x> could someone help me, given the string "a b c" how would i remove "a b" and get only "c"
<shevy> rdoc dislikes stuff like # ======= #
<Neurotiquette> Anyone got any idea how to query with mongoid for all records that have a float value of NaN inside of a hash?
roadt has quit [Ping timeout: 245 seconds]
<Neurotiquette> I can't find an example on stack overflow or anywhere
<swarley> m3rl0x; str.split[1]
slainer68 has quit [Ping timeout: 240 seconds]
<swarley> oh whoops
Servidorv has quit [Quit: Easy as 3.14159265358979323846...]
Michael_ has joined #ruby
<swarley> str.split.last
<tos9> shevy: Cool. When you say "explain", is that user documentation or comments for developers?
timmow has quit [Ping timeout: 252 seconds]
jbw has quit [Ping timeout: 252 seconds]
<swarley> i thought you said "b"
aruntomar has left #ruby [#ruby]
<m3rl0x> str.split.last(|file|)
<shevy> tos9 comments for me mostly hehe :)
Monie has joined #ruby
Monie has quit [Changing host]
Monie has joined #ruby
<swarley> I'm debating whether or not to write a whole xml parser or just write the interface over nokogiri
<ukd1> Neurotiquette, paste a sample of the doc?
<swarley> what
<swarley> m3rl0x; that's invalid syntax
<shevy> tos9 in my tutorials, I try to give specific usage examples, and in add-on sections I often try to explain how this or that is done
<matti> swarley: Writing XML parses seems like a pain.
<swarley> it probably is
Serial_Killer_C has quit [Remote host closed the connection]
<m3rl0x> swarley, str.split.last(|file|)
<m3rl0x> ('#{file}').str.split.last
margle has quit [Quit: Computer has gone to sleep.]
sambio has quit [Ping timeout: 240 seconds]
<swarley> first of all
<swarley> not .str
<swarley> secondly
<swarley> "#{file}"
<reactormonk> file.to_s
mmitchell has quit [Ping timeout: 245 seconds]
<swarley> and you probably want file.read instead of #{file} if its an io object
<Neurotiquette> ukd1: http://pastebin.com/enV4yYYS
jgrevich_ has joined #ruby
sent-hil has joined #ruby
<Neurotiquette> ukd1: I want to match all records like that with mongoid… ones where mill_per_ia (float value) is NaN
<Neurotiquette> BTW before you start in I know problems inherent with using float for money. In this case lack of precision is ok.
jgrevich has quit [Ping timeout: 252 seconds]
jgrevich_ is now known as jgrevich
iamjarvo has quit [Ping timeout: 245 seconds]
CodeDroid__ has quit [Ping timeout: 260 seconds]
Serial_Killer_C has joined #ruby
dnstbr has quit [Quit: ["Textual IRC Client: www.textualapp.com"]]
<tinhead> m3rl0x: File.read("test.txt").split[-1]
pantomime_cheap has quit [Quit: Leaving]
<ukd1> Neurotiquette, try matching it with {$type: 6}
slainer68 has joined #ruby
<ukd1> Neurotiquette, try matching it with {'$type': 6}
passbe has joined #ruby
pantomime_cheap has joined #ruby
Russell^^ has joined #ruby
<Neurotiquette> ukd1: Can you please type the whole query or link me to a doc? I'm having to "feel around" for a lot of this stuff. Very new to Ruby
<ukd1> Neurotiquette - see - https://jira.mongodb.org/browse/SERVER-2157
frederic has quit [Remote host closed the connection]
<Neurotiquette> ukd1: K thank you :)
<ukd1> Neurotiquette, have a read of some of the schema design stuff for mongo as well
mklappstuhl has joined #ruby
<Neurotiquette> ukd1: I have, briefly… but you're right, I should dive a little deeper when I get a moment.
brianstorti has joined #ruby
mucker has quit [Read error: Connection reset by peer]
minijupe has quit [Quit: minijupe]
mucker has joined #ruby
hadees has joined #ruby
rakl has joined #ruby
headius has joined #ruby
jbw has joined #ruby
Neomex has joined #ruby
hadees has quit [Client Quit]
sneakyness_wk has joined #ruby
hadees has joined #ruby
Xeago has joined #ruby
mneorr has joined #ruby
SmoothSage has quit [Ping timeout: 240 seconds]
sterNiX has quit [Ping timeout: 246 seconds]
Michael_ has quit [Ping timeout: 245 seconds]
dakine has joined #ruby
monkegjinni has joined #ruby
<swarley> also, does ruby pass a ruby version to the compiler as a macro when an extension is being compiled?
<swarley> RUBY_VERSION or something?
ForevernadeAFK has quit [Read error: Connection reset by peer]
jslowe has joined #ruby
bryan has joined #ruby
<Mon_Ouie> I think you can check the ruby headers for that
Forevernade has joined #ruby
nyrb has quit [Ping timeout: 246 seconds]
bryan is now known as Guest13057
<swarley> I'm looking at README.EXT
<swarley> and the compatibility macros don't include a version
xorigin has joined #ruby
mneorr has quit [Remote host closed the connection]
<hoelzro> hmm
<hoelzro> apparenty there's HAVE_RUBY_VERSION_H
<hoelzro> and ruby/version.h
monkegjinni has quit [Ping timeout: 255 seconds]
mneorr has joined #ruby
xorigin has left #ruby [#ruby]
Takehiro has joined #ruby
<swarley> hm
brianstorti has quit []
<swarley> i also need to figure how to get a class object
brianstorti has joined #ruby
tinhead has left #ruby [#ruby]
<swarley> i think i found it
<swarley> rb_path_to_class
minijupe has joined #ruby
<hoelzro> swarley: isn't there a rb_get_global or something?
Takehiro has quit [Ping timeout: 252 seconds]
possibilities has joined #ruby
hiroyuki has quit [Remote host closed the connection]
<swarley> Yeah, but path to class sounds more like what I need
jcoglan has quit [Ping timeout: 244 seconds]
<arietis> how can i get such string from datetime object? "1994-11-05T13:15:30Z"
mklappstuhl has quit [Ping timeout: 248 seconds]
lledet has quit [Read error: Connection reset by peer]
lledet has joined #ruby
<arietis> by default it adds +-hh:mm
<arietis> i wanna get Z instead
locriani has quit [Read error: Operation timed out]
brandonblack has joined #ruby
<Spooner> arietis : Use DateTime#strftime to get exactly what you want?
locriani has joined #ruby
h4mz1d has joined #ruby
<arietis> Spooner: right, thanks
medik- has joined #ruby
nitti has joined #ruby
sterNiX has joined #ruby
<Spooner> However, be aware that the timezone offset does matter ;)
<arietis> well, time is random value in my case
saac has quit [Ping timeout: 244 seconds]
theoros has left #ruby [#ruby]
dakine has quit [Remote host closed the connection]
maletor has quit [Quit: Computer has gone to sleep.]
jarred has joined #ruby
mmitchell has joined #ruby
stkowski has quit [Quit: stkowski]
imami|afk is now known as banseljaj
minijupe has quit [Quit: minijupe]
mmitchel_ has joined #ruby
mmitchell has quit [Ping timeout: 245 seconds]
mmitchel_ has quit [Remote host closed the connection]
margle has joined #ruby
whalesalad has joined #ruby
margle has quit [Client Quit]
emmanuelux has joined #ruby
Michael_ has joined #ruby
burgestrand has joined #ruby
davidcelis has quit [Quit: K-Lined.]
jcoglan has joined #ruby
maletor has joined #ruby
ffranz has quit [Quit: Leaving]
mmitchell has joined #ruby
<m3rl0x> Could i get some help with this? http://pastebin.com/j0mp7DGk
possibilities has quit [Read error: Connection reset by peer]
strmpnk has quit [Quit: Lost terminal]
yekta has joined #ruby
Morkel has joined #ruby
Morkel has quit [Client Quit]
Morkel has joined #ruby
ffranz has joined #ruby
Morkel has quit [Read error: Connection reset by peer]
<elico> m3rl0x: what do you want to achieve ?
guilhermekfe has joined #ruby
Morkel has joined #ruby
francisfish has joined #ruby
<guilhermekfe> What should I do in order to make ruby understand a ',' as a '.' in mathematical operations?
<m3rl0x> elico, so the input is "a b c d" and I would like to only get "d"
margle has joined #ruby
thedeadghost has quit [Read error: Operation timed out]
jrist is now known as jrist-afk
baphled has quit [Ping timeout: 276 seconds]
telagraphic_ has joined #ruby
<elico> you would also need chomp
<m3rl0x> well the problem is that I am still getting the same output and its not just giving me d
<Mon_Ouie> guilhermekfe: Depends on the usage of that. If it's just because you don't like dots like that in your code, deal with it; if it's to parse user input, Ruby's syntax for floats doesn't matter for that.
<elico> what is the problem?
baphled has joined #ruby
francisfish has quit [Remote host closed the connection]
dnyy has quit [Quit: Connection closed for inactivity]
Xeago has quit [Ping timeout: 240 seconds]
<m3rl0x> elico, so i am opening a file that has lots of lines with "a b c d" I need to read the file, and get a list of d
<elico> if it's a fixed size array you can just use the number of the variable in the arry
<elico> and not use -1...
<telagraphic_> doesn't rvm install ruby and gems system-wide? right?
<m3rl0x> elico, well i was doing .split.last
miphe has joined #ruby
<guilhermekfe> Mon_Ouie: yeah, I'm getting numbers in the form of 3,14 instead of 3.14
skrewler has joined #ruby
<elico> you need to print the value.. you are printing the whole line..
hbpoison has joined #ruby
kaichanvong has quit [Quit: Connection closed for inactivity]
brianstorti has quit [Quit: Textual IRC Client: http://www.textualapp.com/]
<elico> the Var is messed with a capital V
margle has quit [Quit: Computer has gone to sleep.]
mneorr has quit [Remote host closed the connection]
<Mon_Ouie> You can translate "," into "." and use to_f (etc.) or split on "," to get the integral and decimal parts of the number
mneorr has joined #ruby
<Mon_Ouie> (You might have to check input for validity, too)
<havenn> telagraphic_: Single-user install is RVM default. If you prefix the install script with sudo it will multi-user install to /usr/local/rvm
<m3rl0x> elico, thank you!
<elico> NP
SegFaultAX|work has quit [Ping timeout: 252 seconds]
<telagraphic_> havenn: interesting, does this error at the bottom of the first file look like that type of cause: https://gist.github.com/3899636
<telagraphic_> havenn: im trying to run cucumber and then it gives me that one
<guilhermekfe> Mon_Ouie: yeah, I'm gonna make this on the client side
pantomime_cheap has quit [Quit: Leaving]
hbpoison has quit [Ping timeout: 256 seconds]
pantomime_cheap has joined #ruby
dakine has joined #ruby
ckrailo has joined #ruby
JonnieCache has joined #ruby
fuleo2 has quit []
<havenn> telagraphic_: Since your RVM is single-user, be sure to not prefix sudo when you 'gem install ...'
<havenn> telagraphic_: If you 'gem list cucumber' what do you get?
niklasb has quit [Quit: WeeChat 0.3.9]
<swarley> bored. I just I'll just make my own XML parser
kirun has joined #ruby
niklasb has joined #ruby
<swarley> I guess I'll just*
<telagraphic_> its listed under local gems
<havenn> telagraphic_: I'd check your Gemfile, add 'gem cucumber' if it isn't there, and then run the 'bundle' command.
<telagraphic_> version 1.2.1, 1.1.4
<telagraphic_> ok
sent-hil has quit [Remote host closed the connection]
<telagraphic_> its already listed in my gem file
<swarley> does anyone know how to do something like def herp(var="default") in a c extention?
<havenn> telagraphic_: And you've already run 'bundle install'?
<swarley> oh wait
<swarley> split has a default
<havenn> swarley: You can change the default with $; variable too: $; = '.'; 'split.on.periods'.split
<telagraphic_> it says "using cucumber (1.1.3)"
ukd1 has quit [Quit: leaving]
mneorr has quit [Remote host closed the connection]
xaq has joined #ruby
mneorr has joined #ruby
<Mon_Ouie> Just define a function with varargs and use rb_scan_args, changing the value if it's set to Qnil
<swarley> havenn; that's not what I'm asking
<swarley> Mon_Ouie; thank you
<havenn> swarley: I was just blathering, realized it wouldn't help. >.>
<JohnBat26> Can I get hash key as Symbols when I parse YAML ?
<swarley> Mon_Ouie; so, rb_scan_args(argc, argv, "1*", argument_one, splat); ?
<swarley> JohnBat26; you can do :key:
<swarley> or you can recreate the entire hash
<swarley> or "string".to_sym
iamjarvo has joined #ruby
bbttxu has joined #ruby
<JohnBat26> swarley: I parse my yaml: YAML.load_file('../mediation.yml')
xaq has quit [Remote host closed the connection]
jrist-afk is now known as jrist
<JohnBat26> and get hash with keys as String
<swarley> yes
<JohnBat26> But I want keys as Symbols
<swarley> Then you have to write the keys as :key: in the source file
<burgestrand> swarley: argument_one and splat are pointers to VALUEs
<swarley> yeah
<JohnBat26> swarley: What better symbols of Strings?
<burgestrand> (so, usually it’s &argument_one and &splat, if you are using locals)
<burgestrand> Strings
<JohnBat26> swarley: for memoty consumption ?
<JohnBat26> memory
Drewch has joined #ruby
<Spooner> JohnBat26 : Symbols. As said, YAML.load loads what is in the yaml file, so put symbols in the yaml and you get yaml when you load. Put strings in and you get...strings ;)
<Spooner> *get symbols when you load
<Mon_Ouie> swarley: If you want to define something like def foo(a, *rest), sure
<JohnBat26> Spooner: Thanks
<Mon_Ouie> Or wait, not sure about the syntax anymore
<swarley> JohnBat26; it depends
<swarley> If you'll be dealing with those same symbols hundreds of times
<swarley> probably symbols
tommyvyo has joined #ruby
tommyvyo has quit [Changing host]
tommyvyo has joined #ruby
tjbiddle has quit [Ping timeout: 245 seconds]
seich- is now known as seich
<swarley> but if its just once, don't bother with it
<Mon_Ouie> It'd be "01" for def foo(arg = ?) I think
<swarley> sec, let me check pickaxe
tjbiddle has joined #ruby
jcoglan has quit [Read error: Operation timed out]
<swarley> rb_scan_args(argc, argv, "12", &name, &one, &two);
<Spooner> swarley : Although unique strings probably use the same amount of memory as symbols, symbols still have the advantage of cheap comparison (since they are just ints really).
cjs226 has quit []
greasegum has joined #ruby
<havenn> But on the other hand, Symbols aren't garbage collected like Strings.
x82_nicole has joined #ruby
irleif has quit [Quit: Computer has gone to sleep.]
<swarley> Spooner; yeah but if you only use them once in a program then you are just adding memory that never gets collected
jessed has joined #ruby
<swarley> Like, you can crash an erlang program if you use something like 175,000 atoms i think
lxsameer has quit [Quit: Leaving]
<Spooner> swarly Ah right, I thought you meant by using them once that they were unique, not referring to temp symbols filling the GC. Good point.
<swarley> atoms being the symbols of erlang
mando has quit [Remote host closed the connection]
greasegum has quit [Client Quit]
<swarley> But i believe that symbol collection is being worked on in 2.0 or something right?
<arietis> how do i access object in subhash of hash?
jenrzzz has joined #ruby
<arietis> hash[subhashkey][key]?
<swarley> arielpts; hash[key_that_points_to_hash][key]
<arietis> wrong name
<arietis> :)
<Mon_Ouie> As far as Ruby is concerned, a hash that contains another hash is nothing special
<swarley> that is shorthand for hash.method(:[]).call(subhashkey).method(:[]).call(key)
<swarley> That's how ruby see's it
<swarley> sees*
<swarley> mmm method chaining
<swarley> tasty
novato has joined #ruby
novato has left #ruby [#ruby]
alfism has quit [Quit: alfism]
<arietis> same with array?
<swarley> yes
<swarley> because you're just sending a chain of methods
dnstbr has joined #ruby
Neomex has quit [Quit: Neomex]
kramutils has joined #ruby
cakehero has quit [Quit: Computer has gone to sleep.]
akem has quit [Read error: Operation timed out]
yaymukund has joined #ruby
marty_mcfly has quit [Ping timeout: 245 seconds]
<yaymukund> so I've got a `module User::Payments::Subscriptions`. How do I shorten that so I cna just say Subscriptions.method?
x82_nicole has quit [Quit: Textual IRC Client: www.textualapp.com]
<yaymukund> if I require it, it looks like I still have to do User::Payments::Subscriptions
telagraphic_ has quit [Ping timeout: 245 seconds]
<ddd> I don't know that you can, short of making an ivar out of it
akem has joined #ruby
<ddd> @ivar = User::Payments::Subscriptions.new
<ddd> @ivar.method
<yaymukund> ah, okay. yeah my old solution was to do Subscriptions = User::Payments::Subscriptions
CaptainKnots has quit [Quit: bazinga!]
csaunders has quit [Quit: ["Textual IRC Client: www.textualapp.com"]]
<ddd> don;t use captial S for vars. They mean constants in Ruby
<yaymukund> I now know that is a constant, which might have unintended effects, but I dunno
<yaymukund> yeah
<ddd> unless you want a single
<yaymukund> haha
<ddd> hehe
wallerdev has quit [Quit: wallerdev]
<ddd> driving in circles together, trying to get to the same location. funny
rippa has quit [Ping timeout: 272 seconds]
wallerdev has joined #ruby
davidcelis has joined #ruby
seanyo has quit [Ping timeout: 245 seconds]
daniel_- has joined #ruby
Archisze has joined #ruby
awarner has quit [Remote host closed the connection]
telagraphic_ has joined #ruby
<havenn> yaymukund: I like your old way. What unintended effects might there be?
stephenjudkins has quit [Quit: stephenjudkins]
<havenn> yaymukund: Seems safe to me. ;)
<yaymukund> I dunno. I think it's okay actually. It's fine if the module is a singleton
sent-hil has joined #ruby
erichmenge has joined #ruby
<yaymukund> er, nm, ignore the singleton comment
<yaymukund> I just don't know how constants behave yet, so I need to go read up on that some more
hadees has quit [Quit: hadees]
lushious has quit [Ping timeout: 252 seconds]
ivanacostarubio has joined #ruby
ndboost has joined #ruby
maletor has quit [Quit: Computer has gone to sleep.]
<ddd> in that case, the Subscription, you can update it, but ruby will bitch because its a constant, and there can only be one Subscription so you can use it throughout the app. I just don't like modifying constants, so I use ivars like @subscription (and it follows proper naming conventions)
<ddd> but thats me. I'm nuts :)
mucker has quit [Quit: leaving]
JonnieCache has quit [Ping timeout: 272 seconds]
samrose has joined #ruby
maletor has joined #ruby
Hanmac has joined #ruby
erikwr has quit [Quit: erikwr]
<havenn> ddd: In this case the value really is constant, no? Subscriptions is always going to be User::Payments::Subscriptions or am I confused?
Axsuul has joined #ruby
<Spooner> yaymukund : You could also 'include User::Payments' (in a class) to expose the direct use of Subscriptions in it and obviously anything in User can use Payments::Subscriptions, etc.
Serial_Killer_C has quit [Remote host closed the connection]
Vert has joined #ruby
zodiak has quit [Remote host closed the connection]
sailias has quit [Quit: Leaving.]
sambio has joined #ruby
<ddd> havenn: no you are correct
<yaymukund> Spooner: I was kind of against that but I might do that, since this is all happening in a test for Subscriptions anyway!
m3rl0x has quit [Ping timeout: 248 seconds]
<Spooner> havenn : It could be a constant, certainly, but if you are needing to make constant references into namespaces, then you are either adverse to typing or the design is off ;)
<yaymukund> makes more sense to me the more I think about it
tvw has joined #ruby
<havenn> Spooner: Yeah, I like your way, just didn't occur to me.
<ddd> Spooner: hehe I think in this case its adverseness to typing :)
dakine has quit [Quit: Leaving]
<ddd> gotta admit it gets old typing the full chain sometimes
lushious has joined #ruby
<Spooner> If you are doing it 100s of times, though, just def new_subscription(*args); User::Payments::Subscriptions.new *args; end
mahmoudimus has quit [Quit: Computer has gone to sleep.]
linoj has quit [Ping timeout: 240 seconds]
<Spooner> Ruby gives you too many ways to skin a cat sometimes ;)
<yaymukund> ddd, havenn, Spooner: thanks! I'm always happy with how friendly this channel is :)
Ori has joined #ruby
iamjarvo has quit [Ping timeout: 245 seconds]
hsbt is now known as hsbt_away
hsbt_away is now known as hsbt
<Spooner> yaymukund : You get $50 in credit. Once out, we take a leg per answer.
<ddd> Spooner: lol true true
<ddd> hahahaha
<yaymukund> hahaha
mahmoudimus has joined #ruby
<ddd> yaymukund: and for the really hard questions we take the spine
<Ori> Hi guys, having a problem with brew install wondering if you could help
cjs226 has joined #ruby
<Ori> trying to "brew install --HEAD ruby-build" and getting "Error: You must: brew install git" even though it's already installed
<burgestrand> Ori: /join #machomebrew
Serial_Killer_C has joined #ruby
<Spooner> burgestrand : I read that as Macho Brew ;)
justinmcp has joined #ruby
cakehero has joined #ruby
<burgestrand> Could very well be.
<Ori> burgestrand: 10x, will do
tvw has quit [Ping timeout: 245 seconds]
<burgestrand> Ori: 1UP
jenrzzz has quit [Ping timeout: 255 seconds]
freezey has quit [Quit: freezey]
ndboost has quit [Remote host closed the connection]
hadees has joined #ruby
freezey has joined #ruby
m3rl0x has joined #ruby
tvw has joined #ruby
cdzombak has quit []
headius has quit [Quit: headius]
cjs226 has quit []
karakedi has joined #ruby
slainer68 has quit [Remote host closed the connection]
hbpoison has joined #ruby
und3f has quit [Quit: Leaving.]
flagg0204 has quit [Ping timeout: 255 seconds]
jankly has joined #ruby
flagg0204 has joined #ruby
h4mz1d has quit [Ping timeout: 248 seconds]
awarner has joined #ruby
morozovm has quit [Read error: Connection reset by peer]
karakedi has quit [Ping timeout: 245 seconds]
hbpoison has quit [Ping timeout: 255 seconds]
mklappstuhl has joined #ruby
morozovm has joined #ruby
Ori has quit [Quit: Page closed]
answer_42 has quit [Ping timeout: 276 seconds]
Michael__ has joined #ruby
Michael_ has quit [Ping timeout: 252 seconds]
hadees has quit [Ping timeout: 246 seconds]
Servidorv has joined #ruby
tvw has quit [Ping timeout: 245 seconds]
<Servidorv> hey guys
jankly has quit [Client Quit]
Tearan has joined #ruby
<swarley> ohi
<Servidorv> i have a question, if i want to start an array u={} then have an each and a map lets say u = users.map{}
<Servidorv> than return u
<Servidorv> is that correct??
BSaboia has joined #ruby
eindoofus has joined #ruby
jenrzzz has joined #ruby
<eindoofus> Hi, I'm a novice in Java learning Ruby and the book I'm going over the naming conventions and I'm somewhat confused about Global and Class variables.
sent-hil has quit [Remote host closed the connection]
schaerli has quit [Ping timeout: 245 seconds]
sent-hil has joined #ruby
<eindoofus> Could someone please explain the difference?
nitti has quit [Remote host closed the connection]
ivanacostarubio has left #ruby [#ruby]
S1kx has quit [Ping timeout: 256 seconds]
<Servidorv> here is the actuall code
cbuxton1 has joined #ruby
<Spooner> eindoofus : A class variable is like a static variable in java.
mando has joined #ruby
Milosh88 has joined #ruby
<eindoofus> Spooner: thanks. what about a global variable?
cbuxton has quit [Ping timeout: 255 seconds]
<Spooner> eindoofus : A global is, well, globally accessible from anywhere. Avoid them if you can - class variables are a lot nicer (though we only use class instance variables now; class variables are sort of deprecated- look them up if you need to know the difference).
syamajala has joined #ruby
Tearan has quit [Quit: Sleepy Badger....]
steffes has joined #ruby
Milosh88 has left #ruby [#ruby]
<eindoofus> Cool, good to know. I'm assuming it's the same case when using Ruby on Rails?
<Spooner> eindoofus : Rails is just a framework written in Ruby. It isn't fundamentally different to Ruby itself.
ewanbje has joined #ruby
ananthakumaran has quit [Quit: Leaving.]
<Spooner> eindoofus : Though I am not sure if it is still standard practice to use cattr_reader et al in Rails (which is just a wrapper around a @@class_variable).
hadees has joined #ruby
scx has joined #ruby
<eindoofus> thanks for your help. take care
jenrzzz has quit [Ping timeout: 256 seconds]
eindoofus has left #ruby ["Leaving"]
gmcabrita has left #ruby [#ruby]
yxhuvud has quit [Ping timeout: 246 seconds]
stephenjudkins has joined #ruby
fduf has joined #ruby
Hanmac has quit [Remote host closed the connection]
brandonblack has quit [Remote host closed the connection]
nitti has joined #ruby
BrianJ has joined #ruby
SegFaultAX|work has joined #ruby
freezey has quit [Quit: freezey]
workmad3 has joined #ruby
freezey has joined #ruby
SJr has quit [Excess Flood]
chussenot has joined #ruby
hadees has quit [Quit: hadees]
SJr has joined #ruby
slainer68 has joined #ruby
banseljaj is now known as imami|afk
BrianJ has quit [Quit: ["Textual IRC Client: www.textualapp.com"]]
headius has joined #ruby
<swarley> how does nokogiri's stream based reading work?
<swarley> Like, does it evaluate as it reads from the source?
hadees has joined #ruby
<Spooner> swarley : That is my understanding of streams, yes.
hadees has quit [Remote host closed the connection]
awestroke has quit [Remote host closed the connection]
<swarley> Kay, i suppose i could just add something that if the argument is a string i can just wrap it in a stringio object
<Spooner> swarley : Otherwise it would be like hpricot and read the whole file into memory (I believe that is how it does it).
<swarley> Well, i think that's unavoidable.
judd7 has joined #ruby
<swarley> But the amount of times you load it into memory can be reduced
<Spooner> Unavoidable in your wrapper?
<Spooner> It should only need to be read once.
<swarley> Well, at this point
<swarley> I'm just making a whole new library
fduf has quit [Quit: leaving]
<swarley> Because i decided i wanted to go a different way on syntax
fduf has joined #ruby
<arietis> are sha1 classes part of standard lib?
<swarley> xml["tag",{:class => /blah/}]
<Spooner> You don't need a new library to do that. Just wrap nokogiri and just write a new API, surely?
<swarley> Yeah, but i like being difficult
<swarley> arielpts; i'm not sure what you're asking but you can get hexdigests from Digest::SHA1
<swarley> which is in the standard
<Spooner> swarley : You mean xml["tag", :class => /blah/] You shouldn't need the {}
<swarley> right
<swarley> you dont need it, but it never hurts
<swarley> But that does look better
<arietis> swarley: wrong name once again
<arietis> :)
skipper has joined #ruby
<swarley> asdf sorry
<Spooner> Or, rather xml[:tag, :class => /blah/] - I'm not sure if I like hash args in an index though. Seems a bit icky.
hydrozen has joined #ruby
slainer68 has quit [Ping timeout: 256 seconds]
krawchyk has quit [Remote host closed the connection]
<hydrozen> What does the 'import' function do in Ruby? Is there documentation somewhere?
<swarley> Spooner; :tag refers to the block name. So i suppose symbols could be used
<Spooner> swarley : You are doing a Ruby system rather than a text one then?
Hanmac has joined #ruby
<swarley> Yeah, I think its a bit easier to read dont you think?
Archisze has quit [Quit: http://quassel-irc.org - Chat comfortably. Anywhere.]
ephemerian has joined #ruby
<burgestrand> hydrozen: where did you see it?
<swarley> also, i think I'm going to use URI based open calls
Michael__ has quit [Remote host closed the connection]
<burgestrand> hydrozen: I don't know of one
<Spooner> swarley : I would rather use it, yes, but then I'd rather not use anything as dumb as XML ;) Why we need magic to read it is beyond me, since YAML/JSON/etc is designed for serialisation to the sort of data we use all the time. Sheesh!
<swarley> file:// html:// etc
sepp2k1 has quit [Remote host closed the connection]
<hydrozen> they seem to use it to load a file that does not end with .rb
<burgestrand> hydrozen: probably something specific to rake
<Spooner> hydrozen: import is just like load, but it loads it up at the end of the file rather than immediately.
steffes has quit [Remote host closed the connection]
<Spooner> And yes, require will only load .rb files, so you need to use #load or #import
<Spooner> For .rake files.
moos3 has quit [Ping timeout: 256 seconds]
<hydrozen> Spooner: but import is provided by Rake or by Ruby?
<Spooner> I didn't realise it was Rake-specific though.
<Spooner> It must be Rake, yes. It isn't there in regular ruby.
hotovson_ has quit [Remote host closed the connection]
JohnBat26 has quit [Quit: KVIrc 4.3.1 Aria http://www.kvirc.net/]
<hydrozen> ok, cool. Thanks people.
carlyle has quit [Remote host closed the connection]
Morkel has quit [Quit: Morkel]
eldar has quit []
morozovm has quit [Read error: Connection reset by peer]
chichou has joined #ruby
morozovm has joined #ruby
<Trioke> It there any way to address hash key using the "dot" syntax, i.e. value = hash.key instead of hash[:key]?
<Spooner> Trioke : Hash, no, but you can patch or extend Hash to do it (using method_missing).
<Trioke> Spooner: Okay, thanks.
hotovson has joined #ruby
<mando> Trioke: I usually wrap the hash in an OpenStruct if I want to do something like that
<skipper> Trioke: Or use a Struct or OpenStruct
asteve has quit []
justinmc_ has joined #ruby
beit has quit [Quit: beit]
m3rl0x has quit [Quit: Leaving]
geekbri has quit [Remote host closed the connection]
jenrzzz has joined #ruby
<Trioke> mando: w00t, thanks for that!
justinmcp has quit [Ping timeout: 260 seconds]
hotovson has quit [Ping timeout: 245 seconds]
CaptainKnots has joined #ruby
chin-tastic has quit [Remote host closed the connection]
<mando> Trioke: np
<mando> I stand on the shoulders of giants
chin-tastic has joined #ruby
<mando> cowboyd taught me that trick
sambio has quit [Ping timeout: 265 seconds]
macmartine has joined #ruby
morozovm has quit [Read error: Connection reset by peer]
Eplemosen has quit [Quit: Hexchat FTW! http://www.hexchat.org/]
ndboost has joined #ruby
mengu has joined #ruby
morozovm has joined #ruby
sambio has joined #ruby
h4mz1d has joined #ruby
awestroke has joined #ruby
ndboost has quit [Remote host closed the connection]
heisenmink has joined #ruby
awestroke has quit [Read error: Connection reset by peer]
<swarley> so i'm looking at rb_file_open_internal
<swarley> nevermind
Michael_ has joined #ruby
fduf has quit [Remote host closed the connection]
NemesisD has joined #ruby
ffranz has quit [Ping timeout: 244 seconds]
chin-tastic has quit [Ping timeout: 240 seconds]
hbpoison has joined #ruby
<Trioke> mando: Lol, cowboys :P.
<mando> no, seriously :)
<mando> cowboyd == Charles Lowell :)
<Trioke> mando: Oh, did not know that :).
<mando> However, I can see how that could be misinterpreted as a joke
ffranz has joined #ruby
<mando> I'm also in Texas, which makes it potentially doubly apropos
vlad_starkov has joined #ruby
judd7 has quit [Quit: judd7]
<mando> "Any of y'all know how to use 'dem dot syntax on a hash?"
[Neurotic] has joined #ruby
<Trioke> Lol! :P
robustus has quit [Ping timeout: 255 seconds]
<mando> *scene*
<Trioke> I hear Dairy Queen is THE place to make deals in Texas?
erichmenge has quit [Quit: Linkinus - http://linkinus.com]
<telagraphic_> hey all again, im trying to run cucumber, but im getting an error saying that i need to allow write permissions
s0ber has quit [Read error: Connection reset by peer]
tommyvyo has quit [Quit: Textual IRC Client: http://www.textualapp.com/]
<davidcelis> solution: don't use cucumber
<telagraphic_> ok, thanks
<voodoofish430> no the solution he was hoping for....
sambio_ has joined #ruby
<telagraphic_> but surely i can chmod the permissions
sambio has quit [Ping timeout: 265 seconds]
s0ber has joined #ruby
<voodoofish430> you should be able to
invisime has quit [Quit: Leaving.]
Ankhers has quit [Ping timeout: 255 seconds]
<telagraphic_> hmmm
<telagraphic_> i tried sudo chmod ug+rw Gemfile.lock
valio has quit [Quit: Leaving]
<tos9> There appears to have been a Ruby Grammar project, but it appears to have died. Are there ruby implementation authors in here? What do you use for lex/parsing Ruby? (I want to write a little toy interpreter for a subset of Ruby, so I could just write it from scratch on just the parts of the grammar I want if it doesn't exist in a nice form already)
anderse has quit [Quit: anderse]
<telagraphic_> but it cannot access it
<tos9> The parse.y file in the ruby language repository looks really nasty to try and look at.
stephenjudkins__ has joined #ruby
kevinr has joined #ruby
<blazes816> tos9: I believe mdi uses yac for the grammar
<blazes816> tos9: I'd look at rubinius, and see how to handle it
kevinr has quit [Client Quit]
<tos9> blazes816: Yeah, I'm looking at those two. Rubinius looks like it has its own thing written (other than md?i) but I haven't decyphered it yet. It definitely looks more promising though
stephenjudkins has quit [Ping timeout: 252 seconds]
stephenjudkins__ is now known as stephenjudkins
vlad_starkov has quit [Read error: Connection reset by peer]
<blazes816> tos9: in general parsers are difficult to read/comprehend, but I'd imagine rubinius would be your best bet
elux has quit [Quit: Bye!]
<Servidorv> hey guys, i have an array with user_id , page_id of users, and i have a hash od user_id: #
<Servidorv> how can i build a mothod that will compare the and build an array so it ends up with an array of the user_id, page_id, #
<Servidorv> ??
kevinr has joined #ruby
<tos9> blazes816: Yeah, I was hoping for something slightly more compact. Doesn't look like I'm going to get it :P, but that's OK. At some small risk, I was looking for the equivalent of what Python has, which is quite compact (http://docs.python.org/reference/grammar.html). I guess I'll stick at Rubinius. Thanks :).
morozovm has quit [Read error: Connection reset by peer]
Boohbah has quit [Ping timeout: 245 seconds]
morozovm has joined #ruby
<blazes816> tos9: i'm not positive, but I believe the parser.y file is generated from some source file. it may be in the repo
sambio has joined #ruby
kyletcarey has joined #ruby
whalesalad has quit [Quit: whalesalad]
<blazes816> tos9: also i forgot, try #ruby-lang
sent-hil has quit [Remote host closed the connection]
morozovm has quit [Client Quit]
<tos9> Oh! Is it? Thought I'd checked. I'll look again.
Michael_ has quit [Remote host closed the connection]
sambio_ has quit [Read error: Connection reset by peer]
freezey has quit [Quit: freezey]
jarred_ has joined #ruby
x82_nicole has joined #ruby
sambio_ has joined #ruby
sailias has joined #ruby
sailias has quit [Client Quit]
Michael_ has joined #ruby
jarred has quit [Read error: Connection reset by peer]
wpaulson has joined #ruby
sambio has quit [Ping timeout: 256 seconds]
tjbiddle_ has joined #ruby
jenrzzz has quit [Ping timeout: 245 seconds]
sent-hil has joined #ruby
Boohbah has joined #ruby
sent-hil has quit [Remote host closed the connection]
Boohbah is now known as Guest79607
rumba has quit [Quit: Page closed]
carloslopes has quit [Quit: Leaving.]
jarred_ has quit [Ping timeout: 245 seconds]
jarred has joined #ruby
heisenmink has quit [Remote host closed the connection]
bbttxu has quit [Quit: bbttxu]
tjbiddle has quit [Ping timeout: 260 seconds]
Michael_ has quit [Remote host closed the connection]
aquarant_ has joined #ruby
tjbiddle_ has quit [Read error: Connection reset by peer]
headius_ has joined #ruby
headius has quit [Disconnected by services]
headius_ is now known as headius
aquaranto has quit [Ping timeout: 252 seconds]
tjbiddle has joined #ruby
yekta has quit [Quit: yekta]
reset has joined #ruby
telagraphic_ has quit [Ping timeout: 245 seconds]
dmiller_ has quit [Ping timeout: 246 seconds]
h4mz1d has quit [Ping timeout: 246 seconds]
Hanmac has quit [Remote host closed the connection]
leifmadsen has joined #ruby
wpaulson has quit [Quit: Colloquy for iPhone - http://colloquy.mobi]
syamajala has quit [Remote host closed the connection]
Guest13057 is now known as _bry4n
Michael_ has joined #ruby
mmitchell has quit [Remote host closed the connection]
wereHamster is now known as wereGuineaPig
wereGuineaPig is now known as wereHamster
nitti has quit [Remote host closed the connection]
<x82_nicole> Is it possible to play with libraries from the command line? Just to see if they're even working? For example, Mongo_Mapper
dangerousdave has quit [Quit: Leaving...]
sebastorama has quit [Quit: Computer has gone to sleep.]
jgarvey has quit [Quit: Leaving]
gmurphey has quit [Ping timeout: 260 seconds]
<voodoofish430> x82_nicole: IRB?
tommyvyo has joined #ruby
jrist is now known as jrist-afk
mercwithamouth has quit [Ping timeout: 276 seconds]
<Spooner> tos9 The Ruby devs hang out in #rubylang, I think.
stephenjudkins has quit [Quit: stephenjudkins]
<lectrick> How do I output the ESC character in ruby? I tried "\e" and no go. Basically I want to output a bit of ANSI.
dmiller has joined #ruby
<Spooner> lectrick : http://flori.github.com/term-ansicolor/ (or similar gem)
khakimov has joined #ruby
mando has quit [Remote host closed the connection]
Guest79607 has quit [Ping timeout: 256 seconds]
<tos9> Spooner: Ah, cool, thanks. I'm gonna educate myself slightly more then and then ask there. Thanks again to you both.
Boohbah_ has joined #ruby
jrajav has joined #ruby
nemesit|osx has quit [Quit: Leaving...]
joshman_ has quit [Ping timeout: 276 seconds]
GoGoGarrett has quit [Remote host closed the connection]
sent-hil has joined #ruby
caveat- has quit [Remote host closed the connection]
BSaboia has quit [Read error: Connection reset by peer]
caveat- has joined #ruby
xclite has quit [Remote host closed the connection]
tjbiddle_ has joined #ruby
LennyLinux has quit [Remote host closed the connection]
seanyo has joined #ruby
kirun has quit [Quit: Client exiting]
kevinr has quit [Remote host closed the connection]
alanp has quit [Read error: Connection reset by peer]
alanp_ has joined #ruby
Hanmac has joined #ruby
tjbiddle has quit [Ping timeout: 246 seconds]
tjbiddle_ is now known as tjbiddle
chrisramon has quit [Quit: chrisramon]
JonnieCache has joined #ruby
skrewler has quit [Quit: skrewler]
FifthWall has joined #ruby
stephenjudkins has joined #ruby
skipper has quit [Remote host closed the connection]
judd7 has joined #ruby
<swarley> how does this look for a regular expression that catches urls
hoelzro is now known as hoelzro|away
<swarley> "^(?:.+?\://)*(?:.+?\\.)+"
sent-hil has quit [Remote host closed the connection]
cakehero has quit [Quit: Computer has gone to sleep.]
jeffreybaird has quit [Quit: jeffreybaird]
hotovson_ has joined #ruby
<lectrick> Spooner: I like that gem but I figured it out anyway, I have to do "\e[<code>m". I was missing the open bracket.
cakehero has joined #ruby
xaq has joined #ruby
cakehero has quit [Client Quit]
<Spooner> lectrick : Yeah, I was telling you both "don't roll your own" and "if you need to roll your own, look here" ;)
<swarley> oz; lol holy crap
<oz> swarley: regex-es are a psychopath sport :)
<swarley> that doesnt even look really
<swarley> real*
<swarley> how the hell do i put that into ruby?!? LOL
<Spooner> swarley : Whatever you do, you shouldn't just use URI :D
h4mz1d has joined #ruby
<swarley> Spooner; uri fails if you dont have a (.+?)://
Serial_Killer_C has quit [Remote host closed the connection]
<Spooner> swarley : It does? Well, without meh://, it isn't a URI ;)
samuel02 has quit [Remote host closed the connection]
<swarley> [18] pry(main)> URI.regexp =~ "meh://www.google.com"
<swarley> => 0
<swarley> according to uri it is
alvaro_o has quit [Quit: Ex-Chat]
alvaro_o has joined #ruby
alvaro_o has quit [Read error: Connection reset by peer]
<Spooner> Yes, but strictly you can have arbitrary prefixes (not just http://, ftp://, since you can add them).
<blazes816> a uri must have a scheme, but it doesn't matter what it is
<blazes816> baconsandwich://github.com
alvaro_o has joined #ruby
frogprince_mac has quit [Quit: Leaving...]
<blazes816> check against /^https?:\/\// if you need to ensure it's a http uri
chrisja has quit [Quit: leaving]
<oz> I'm not sure I want to use the baconsandwich protocol though.
emanu has joined #ruby
swarley has quit [Read error: Connection reset by peer]
<Spooner> oz you can use chickpea:// and 99% of the time it still works.
dmiller has quit [Remote host closed the connection]
swarley has joined #ruby
F1skr has quit [Ping timeout: 248 seconds]
forced_request has joined #ruby
<swarley> its okay everyone, you can stop panicing now
<swarley> i'm back
<swarley> panicking
<Spooner> Sorry, I didn't notice you'd gone.
judd7 has quit [Quit: judd7]
<oz> :)
<swarley> :c
postmodern has joined #ruby
<swarley> but yeah, URI.regexp is not reliable
A124 has quit [Quit: Leaving.]
mercwithamouth has joined #ruby
Servidorv has quit [Quit: Relax, its only ONES and ZEROS!]
reset has quit [Quit: Leaving...]
gabrielrotbart has joined #ruby
F1skr has joined #ruby
<swarley> for the record
<swarley> i think this would work for general url recognition
<swarley> /^(\w+\:\/\/)*([\w0-9]+\.)+([\w0-9]+\/)+$/
<swarley> havnt tested it yet though
axl_ has quit [Quit: axl_]
ping-pong has quit [Ping timeout: 248 seconds]
mercwithamouth has quit [Ping timeout: 276 seconds]
ping-pong has joined #ruby
<swarley> hm, nope
GVRV has quit [Ping timeout: 240 seconds]
jessed has quit [Quit: jessed]
<jrajav> TL;DR: /^([a-z0-9+.-]+):(?://(?:((?:[a-z0-9-._~!$&'()*+,;=:]|%[0-9A-F]{2})*)@)?((?:[a-z0-9-._~!$&'()*+,;=]|%[0-9A-F]{2})*)(?::(\d*))?(/(?:[a-z0-9-._~!$&'()*+,;=:@/]|%[0-9A-F]{2})*)?|(/?(?:[a-z0-9-._~!$&'()*+,;=:@]|%[0-9A-F]{2})+(?:[a-z0-9-._~!$&'()*+,;=:@/]|%[0-9A-F]{2})*)?)(?:\?((?:[a-z0-9-._~!$&'()*+,;=:/?@]|%[0-9A-F]{2})*))?(?:#((?:[a-z0-9-._~!$&'()*+,;=:/?@]|%[0-9A-F]{2})*))?$/i
judd7 has joined #ruby
anachronistic has quit [Quit: anachronistic]
<swarley> jesus christ that's a ton of regex
headius has quit [Quit: headius]
workmad3 has quit [Ping timeout: 276 seconds]
stopbit has quit [Quit: Leaving]
<swarley> gah and i cant even get it to work
joeycarmello has joined #ruby
<jrajav> Are schemes really only supposed to be lowercase?
<jrajav> I can put in HTTP in my browser but browsers shove a lot of user idiocy under the rug :P
jeffreybaird has joined #ruby
<swarley> just like people who type www.?
Hanmac has quit [Ping timeout: 240 seconds]
<jrajav> Oh, missed the /i option at the end
<jrajav> It's all case insensitive
<swarley> RegexpError: target of repeat operator is not specified: /^([a-z0-9+.-]+):(?:\/\/(?:((?:[a-z0-9-._~!$&'()*+,;=:]|%[0-9A-F]{2})*)@)?((?:[a-z0-9-._~!$&'()*+,;=]|%[0-9A-F]{2})*)(?::(d*))?(\/(?:[a-z0-9-._~!$&'()*+,;=:@\/]|%[0-9A-F]{2})*)?|(\/?(?:[a-z0-9-._~!$&'()*+,;=:@]|%[0-9A-F]{2})+(?:[a-z0-9-._~!$&'()*+,;=:@\/]|%[0-9A-F]{2})*)?)(?:?((?:[a-z0-9-._~!$&'()*+,;=:\/?@]|%[0-9A-F]{2})*))?(?:#((?:[a-z0-9-._~!$&'()*+,;=:\/?@]|%[0-9A-F]{2})*))?$/
<swarley> oh gee, that helps
<jrajav> At least it told you the LINE, right? :P
<jrajav> Technically thats better than the alternative
himsin_ has joined #ruby
himsin_ has quit [Remote host closed the connection]
himsin has quit [Quit: Leaving]
hotovson has joined #ruby
himsin has joined #ruby
v0n has quit [Ping timeout: 246 seconds]
aquaranto has joined #ruby
judd7 has quit [Quit: judd7]
manizzle has joined #ruby
<arietis> how do i get sha1 hash from file?
hotovson_ has quit [Ping timeout: 245 seconds]
joeycarmello has quit [Remote host closed the connection]
<arietis> Digest::SHA1.hexdigest file?
dmiller has joined #ruby
lledet has quit [Quit: lledet]
aquarant_ has quit [Ping timeout: 240 seconds]
himsin is now known as djorr
gabrielrotbart has quit [Remote host closed the connection]
endzyme has quit [Ping timeout: 240 seconds]
<Spooner> arietis : If it is a file, just use Digest::SHA1.file("frog.fish"), which loads it as a stream, not the whole file at once.
gabrielrotbart has joined #ruby
hadees has joined #ruby
<arietis> Spooner: kk
<Spooner> Oh no, Digest::SHA256.file("X11R6.8.2-src.tar.bz2").hexdigest
<Spooner> Well, obviously not SHA256 in your case.
<Spooner> arietis : You want to learn how I just found that out though. Much more useful.
nitti has joined #ruby
telagraphic has joined #ruby
<arietis> Spooner: i have docset viewer
<arietis> i wasn't sure if it's porper way
<arietis> proper*
<arietis> :)
<Spooner> arietis: 1) start pry 2) require 'digest/sha1' 3) ls Digest::SHA1 4) show-doc Digest::SHA1.file
judd7 has joined #ruby
vlad_starkov has joined #ruby
crates has joined #ruby
nitti has quit [Ping timeout: 245 seconds]
acmiller has joined #ruby
hsbt is now known as hsbt_away
bambanx has joined #ruby
hsbt_away is now known as hsbt
hbpoison has quit [Ping timeout: 256 seconds]
mercwithamouth has joined #ruby
judd7 has quit [Quit: judd7]
jeffreybaird has quit [Quit: jeffreybaird]
prettymuchbryce has quit [Quit: prettymuchbryce]
brianpWins has quit [Quit: brianpWins]
reset has joined #ruby
jslowe has quit [Read error: Connection reset by peer]
emanu has quit [Quit: emanu]
prettymuchbryce has joined #ruby
<shadewind> I'm trying to understand Ruby a bit... is a function declaration a statement? that is, is it in imperative or is it a declaration like in C?
pac1 has quit [Quit: I got it one line of code at a time]
Moogs has joined #ruby
headius has joined #ruby
bambanx has left #ruby ["Saliendo"]
<shadewind> it seems like a statement
josh^ has joined #ruby
pac1 has joined #ruby
<shadewind> as in "create this function which contains this code" as opposed to "I'm telling you there is a function which contains this code"
cakehero has joined #ruby
jarred_ has joined #ruby
x82_nicole has quit [Quit: Computer has gone to sleep.]
_bry4n has quit [Remote host closed the connection]
jarred has quit [Ping timeout: 246 seconds]
jarred_ is now known as jarred
dnstbr has quit [Quit: ["Textual IRC Client: www.textualapp.com"]]
niklasb has quit [Quit: WeeChat 0.3.9]
justinmc_ has quit [Ping timeout: 252 seconds]
<Spooner> shadewind : It should be pretty obvious that it is actually creating the method. Otherwise we'd need some sort of silly .h going on.
hsbt is now known as hsbt_away
macmartine has quit [Quit: ["Textual IRC Client: www.textualapp.com"]]
hydrozen has quit [Quit: Computer has gone to sleep.]
daniel_-_ has joined #ruby
<shadewind> Spooner: well, the parser could scan the file for declarations before executing or something but fair enough
justinmcp has joined #ruby
nari has joined #ruby
<shadewind> Spooner: in that case, class Foobar simply means "set the current class to Foobar until the corresponding end keyword"
<heftig> shadewind: indeed
<heftig> self becomes the class as well
daniel_-_ has quit [Client Quit]
<shadewind> yes
<heftig> so def self.foo has the same effect as def Foobar.foo
macmartine has joined #ruby
<shadewind> which means that Foobar refers to the class object, right?
S1kx has joined #ruby
S1kx has quit [Changing host]
S1kx has joined #ruby
<heftig> yes
<Spooner> shadewind : Everything in Ruby is dynamic. You can add or remove methods at any time.
<shadewind> Spooner: yeah
reset has quit [Quit: Linkinus - http://linkinus.com]
daniel_- has quit [Ping timeout: 245 seconds]
kpshek has quit []
<swarley> indeed
<swarley> Oh man i just realized how easy state based parsing is going to be with the ruby c api
<blazes816> indubitably
hadees has quit [Quit: hadees]
<Spooner> shadewind: And get used to saying "methods" not "functions", since we don't have functions in Ruby.
thecreators_ has joined #ruby
thecreators has quit [Ping timeout: 246 seconds]
thecreators_ is now known as thecreators
adurity has joined #ruby
<shadewind> Spooner: right
reset has joined #ruby
mengu has quit [Read error: Connection reset by peer]
mengu has joined #ruby
mengu has quit [Changing host]
mengu has joined #ruby
nwertman has joined #ruby
sent-hil has joined #ruby
<Spooner> Although, to cover my back, one could argue that lambda/block/proc are strictly anonymous functions.
hadees has joined #ruby
nateberkopec has quit [Quit: Leaving...]
daniel_- has joined #ruby
<shadewind> but anything declared top level become class members of Object?
<heftig> shadewind: "def" without receiver in top-level context adds private methods to Object
<heftig> er, private instance methods
<heftig> so they're callable everywhere, unless shadowed
lewis has joined #ruby
<shadewind> so they are instance methods?
bier has quit [Read error: Operation timed out]
<shadewind> what object is self in the top level?
<heftig> shadewind: an anonymous instance of Object the VM calls "main"
<shadewind> I see
coin3d has quit [Quit: coin3d]
<shadewind> makes sense
freakazoid0223 has quit [Read error: Connection reset by peer]
seanyo has quit [Remote host closed the connection]
<Spooner> shadewind : But a lot of the functiony-looking things are actually methods in Kernel (e.g. Kernel#puts).
<swarley> Ah, parser time
<shadewind> yeah, I know
h4mz1d has quit [Ping timeout: 260 seconds]
skogis has quit [Ping timeout: 260 seconds]
<shadewind> so then "def foobar" means "define an instance method for self"?
Michael_ has quit [Remote host closed the connection]
<heftig> depends on the context
<heftig> as i said, in top-level context it adds a private instance method to the class Object. this is special-cased
<shadewind> I see, so it cannot be generalized in the way I'm attempting?
<heftig> in a module/class context (which you can get via "module X", "class X", X.class_exec/module_exec/class_eval/module_eval) it adds instance methods to self
<heftig> in any other context it adds singleton methods to self (instance methods of the singleton class of self)
anachronistic has joined #ruby
anachronistic has quit [Client Quit]
<shadewind> singleton class? sounds like an implicitly created class which inherits from the class of the object?
<shadewind> from the way you're describing it
judd7 has joined #ruby
slainer68 has joined #ruby
<heftig> yes.
chrisramon has joined #ruby
<heftig> its superclass is the object's class, and its only instance is the object itself
tvw has joined #ruby
Michael_ has joined #ruby
<shadewind> so the "actual class" of myFoobar is not Foobar but this singleton class?
thecreators has quit [Ping timeout: 255 seconds]
hadees has quit [Quit: hadees]
<heftig> shadewind: yes. though since it initially doesn't define anything, it's virtually invisible
judd7 has quit [Client Quit]
<shadewind> interesting
<shadewind> ruby seems like an extremely uniform language
hackeron has quit [Read error: Operation timed out]
<shadewind> not quite up to the level of LISP but a lot more than most languages
hackeron has joined #ruby
<heftig> it has got a lot of ugly perlisms :p
<shadewind> seems more elegant than Python still
macmartine has quit [Quit: Computer has gone to sleep.]
<jrajav> Yeah, "uniform" is not something I'd ascribe to Ruby
<jrajav> lol
jlwestsr has quit [Ping timeout: 246 seconds]
<swarley> heftig; perl is worse than ruby though
<swarley> in the lines of
<swarley> following its own rules
<swarley> -> for example, odd break in normal syntax
<swarley> but perl has odd conditional syntax at time, very important that you remember what you're doing
uris has quit [Quit: Leaving]
A124 has joined #ruby
cardoni has quit [Quit: cardoni]
jrcloud has joined #ruby
bier has joined #ruby
<jrcloud> Hey guys whats a good place to go for ruby on rails IRC help
<Eiam> #rubyonrails
<jrcloud> Kk, my client is acting weird, not letting me into that room.
drago757 has joined #ruby
<jrcloud> Thank you Eiam
<Eiam> you likely need to be registered
<jrcloud> ah dang
<jrcloud> Like my nick registerd?
<Eiam> yes
<jrcloud> Ok, I'll figure out how to do that.
<jrcloud> thanks alot
<Eiam> jrcloud: /msg nickserv help
Foxandxss has joined #ruby
lkba has quit [Ping timeout: 272 seconds]
<jrcloud> Hey Eiam
<jrcloud> Sorry for the dumb questions
<jrcloud> I just registered
xaq has quit [Remote host closed the connection]
<jrcloud> Still can't get in. Can you get in?
icole has quit [Remote host closed the connection]
rabidpraxis has quit [Remote host closed the connection]
<Eiam> yes I am in the channel now. your client should tell you why you aren't allowed in.
<jrcloud> I'm using a dumb GUI client, I"ll use irssi and see what's up
mwilson` has quit [Excess Flood]
mwilson` has joined #ruby
jjang has joined #ruby
jrcloud has quit [Quit: Leaving.]
panpainter has quit [Quit: panpainter]
Tearan has joined #ruby
jenrzzz has joined #ruby
jrclouda has joined #ruby
<jrclouda> Hey Eiam, I joined but now I get "can't send to channel
<jrclouda> ever seen that
<swarley> Hey question
<shadewind> jrclouda: have you identified with nickserv?
<jrclouda> Yes
<swarley> is there a way that i should deallocate strings that i'm done with in a C extension?
<jrclouda> I'm in there now as just jrcloud
<swarley> a Ruby string
<shadewind> dunno then
jlwestsr has joined #ruby
g-ram has joined #ruby
<jrclouda> shit
ephemerian has quit [Quit: Leaving.]
<Eiam> jrclouda: have you verified your acount yet?
<jrclouda> Yes, I registered my nick jrcloud
<jrclouda> I can see what everyone is saying in that room
judd7 has joined #ruby
<jrclouda> It just won't allow me to post
judd7 has quit [Client Quit]
akem has quit [Ping timeout: 276 seconds]
<jrclouda> This room gave me no issues :(
<Eiam> jrclouda: -> #freenode
<jrclouda> kk
jrajav has quit []
judd7 has joined #ruby
judd7 has quit [Client Quit]
<jrclouda> Thanks alot Eiam i appreciate it
<Eiam> np
Michael_ has quit [Remote host closed the connection]
lkba has joined #ruby
<jrclouda> Got it sorted Eiam thanks!
akemEikko has joined #ruby
Michael_ has joined #ruby
ckrailo has quit [Quit: Computer has gone to sleep.]
Moogs has quit [Quit: Leaving.]
Moogs has joined #ruby
akem has joined #ruby
<arietis> i wanna calculate digests for group of files
<arietis> how to properly add these files in array?
hbpoison has joined #ruby
mercwithamouth has quit [Ping timeout: 246 seconds]
riley526 has joined #ruby
rubious has quit [Quit: Linkinus - http://linkinus.com]
rubious has joined #ruby
kenneth has quit [Read error: Connection reset by peer]
akemEikko has quit [Ping timeout: 265 seconds]
<arietis> @files << File.open(file)?
jrclouda has left #ruby [#ruby]
rubious has quit [Read error: Connection reset by peer]
rubious has joined #ruby
Jellyg00se has quit [Quit: Leaving]
cardoni has joined #ruby
manizzle is now known as WeLoveCP
hbpoison has quit [Ping timeout: 256 seconds]
jarred has quit [Ping timeout: 245 seconds]
jjang has quit [Remote host closed the connection]
WeLoveCP is now known as manizzle_
bobajett has joined #ruby
hiroyuki has joined #ruby
<bobajett> folks what's the ruby idiom for Perl's: $file = $ARGV[0] || die "No argument provided";
nitti has joined #ruby
jarred has joined #ruby
judd7 has joined #ruby
nateberkopec has joined #ruby
Jellyg00se has joined #ruby
manizzle_ is now known as WeLoveCP
Moogs has quit [Read error: Connection reset by peer]
<Spooner> bobajett : To use optparser or slop gem ;) You would file = ARGV[0] || raise "bleh" as a direct equivalent though.
NemesisD has quit [Quit: leaving]
xaq has joined #ruby
nateberkopec has quit [Client Quit]
WeLoveCP is now known as manizzle_
<bobajett> file = ARGV[0] || raise "bleh" # gives me => syntax error, unexpected tSTRING_BEG, expecting keyword_do or '{' or '('
pantomime_cheap has quit [Quit: Leaving]
slainer68 has quit [Remote host closed the connection]
justinmcp has quit [Remote host closed the connection]
<swarley> does anyone else apologize to their computer when it segfaults because of their code?
pantomime_cheap has joined #ruby
blazes816 has quit [Quit: blazes816]
<Spooner> bobajett Oh, sorry, || has too high a precedence. It works with "or" instead.
nitti has quit [Ping timeout: 246 seconds]
nari has quit [Ping timeout: 260 seconds]
joukokar has joined #ruby
kenneth has joined #ruby