apeiros_ changed the topic of #ruby to: Ruby 1.9.3-p362: http://ruby-lang.org (ruby-2.0.0-preview2) || Paste >3 lines of text on http://gist.github.com
hack has joined #ruby
cableray has quit [Quit: cableray]
vlad_starkov has quit [Ping timeout: 240 seconds]
<davidcelis> >> "hi"
<eval-in> davidcelis: Output: "" (http://eval.in/5925)
<davidcelis> so unless you use puts, this bot is useless? cool story
kiyoura has joined #ruby
stevechiagozie has quit [Quit: stevechiagozie]
yshh has joined #ruby
dankest has quit [Quit: Leaving...]
rakl has quit [Quit: sleeping]
baphled has quit [Ping timeout: 255 seconds]
dankest has joined #ruby
nga4 has quit [Ping timeout: 255 seconds]
rakm has joined #ruby
Takehiro has joined #ruby
<reactormonk> davidcelis, it's not really ruby-aware
<davidcelis> ?
<reactormonk> >> puts ENV['PATH']
<eval-in> reactormonk: Output: "\n" (http://eval.in/5926)
<reactormonk> !
slainer68 has quit [Remote host closed the connection]
jamescarr has joined #ruby
emmanuelux has quit [Remote host closed the connection]
<davidcelis> >> puts ENV['USER']
<eval-in> davidcelis: Output: "\n" (http://eval.in/5927)
<davidcelis> ...
<atmosx> now, what's the easiest auth method over http… https and private certs? hm
slainer68 has joined #ruby
jamescarr has quit [Client Quit]
postmodern has joined #ruby
Takehiro has quit [Ping timeout: 276 seconds]
anachronistic has quit [Quit: anachronistic]
lateau has quit [Ping timeout: 240 seconds]
gabrielrotbart has quit [Remote host closed the connection]
TheEmpty has joined #ruby
love_color_text has quit [Remote host closed the connection]
zeade has quit [Quit: Leaving.]
yshh has quit [Ping timeout: 260 seconds]
<Eiam> so whats going on when i get something like myFunc(:blah => ["val1","val2"])
<Eiam> is that being magically transformed into myFunc({:blah => ["val1","val2"]})
<TheEmpty> yes
* Eiam growls at ruby
<Eiam> sometimes I don't like magic
dmerrick has quit [Quit: dmerrick]
<Eiam> why? because you can't go into irb and write :blah => ["yo"]
iamjarvo has joined #ruby
slainer68 has quit [Remote host closed the connection]
asteve has quit [Quit: Computer has gone to sleep.]
<Eiam> it barfs. why? because thats not a valid construct. but somehow in a method parameter thats OK.
<banisterfiend> Eiam: buy a book on ruby
<Eiam> either require the {} or don't, but why let people use it with in some places, and without in others?
tommyvyo has joined #ruby
<TheEmpty> It knows that data is expected there, so it parses for it.
<TheEmpty> Because it looks better without ;)
<Eiam> oh please, totally subjective there
ekristen has quit [Quit: ekristen]
chrisftw_tired has joined #ruby
<chrisftw_tired> hi everyone
<TheEmpty> Not if you're a rubuist
<chrisftw_tired> I was on here last night with heroku rails trouble
<chrisftw_tired> someone helped me
<chrisftw_tired> who was it?
<Eiam> im not sure what is required to make me a 'rubyist' i've been reading & writing it for over a year now
<banisterfiend> Eiam: it's a special case, if the last parameter passed to a method is a hash then u can leave off the {}
<TheEmpty> Yet you don't know the rules of the lang
<chrisftw_tired> curse my memory
<Eiam> banisterfiend: I have a book, and as you can see I was able to explain what was happening, I just don't agree with it
SeanLazer has joined #ruby
<banisterfiend> Eiam: it's a kind of poor man's named parameters
<Eiam> ^
<Eiam> thats exactly what it feels like
<Eiam> cause thats how I do named parameters in javascript
<TheEmpty> >> def asd(one,two); puts one; puts two; end; asd once:true, false
<eval-in> TheEmpty: Output: "/tmp/execpad-c699a320957d/source-c699a320957d:1: syntax error, unexpected $end, expecting tASSOC\ndef asd(one,two); puts one; puts two; end; asd once:true, false\n ^\n" (http://eval.in/5928)
<TheEmpty> >> def asd(one,two); puts one; puts two; end; asd {once:true}, false
<eval-in> TheEmpty: Output: "/tmp/execpad-478bc34f5001/source-478bc34f5001:1: syntax error, unexpected ',', expecting $end\ndef asd(one,two); puts one; puts two; end; asd {once:true}, false\n ^\n" (http://eval.in/5929)
<TheEmpty> bah
<banisterfiend> Eiam: well that's what it is, and it's not particularly confusing about when it's valid, the rule is simple "last parameter in an argument list"
fbernier has quit [Read error: Connection reset by peer]
ehlu has joined #ruby
<Eiam> sure, so glance at a function with 5 parameters enclosed in (), and it looks like 5 parameters
<Eiam> but wait, its really the last parameter beacuse its all just one object
<Eiam> anyway, I'm ranting. I see this all the time, have been staring at this contstruct for over a year and I *still* don't like it =) so there.
<banisterfiend> Eiam: not really, because normal parameters dont look like that
<Eiam> banisterfiend: why not? myFunc({:a =>"b"},:b =>"a")
<TheEmpty> Eiam: no because they are tASSOC not objects
<banisterfiend> Eiam: so you would not confuse them for normal parameters, at least i never did, and since you're the only one i've heard complaining about it, i guess it didnt confuse many other peole either
<TheEmpty> ^^^
<banisterfiend> Eiam: why not what? :b => "a", :c => "d" don't look like normal parameters, so im not going to confuse them for such
jamescarr has joined #ruby
mmitchell has joined #ruby
dankest has quit [Quit: Leaving...]
<Eiam> guess I don't see what you mean by the word normal
<Eiam> they seem normal to me
nateberkopec has quit [Quit: Linkinus - http://linkinus.com]
arietis has quit [Quit: Textual IRC Client: http://www.textualapp.com/]
<banisterfiend> Eiam: :b => "a" <---- normal parameters dont look like that
nicoulaj has quit [Remote host closed the connection]
<banisterfiend> Eiam: they dont have a key/value association
sailias has quit [Quit: Leaving.]
pskosinski has quit [Quit: Learn Life's Little Lessons]
<Eiam> banisterfiend: myFunc({:b => "a"}) looks suspciously like what you just posted
_bart has quit [Quit: _bart]
ffranz has quit [Quit: Leaving]
ekristen has joined #ruby
<banisterfiend> Eiam: except it's enclosed in {} was are strikingly obvious
<banisterfiend> which are*
mmitchell has quit [Remote host closed the connection]
joeycarmello has quit [Remote host closed the connection]
<Eiam> right. its strikingly obvious when your data structure is a hash. so why break the rule and invent a new rule for some special case where you can define a hash without making it strikingly obvious? =0
<Eiam> oh, thats right, DRY/magic it up when you can, more special rules
<banisterfiend> Eiam: no, because they're a nice way of faking named parameters
_bart has joined #ruby
ekristen has quit [Client Quit]
karupanerura has quit [Excess Flood]
jimeh has quit [Quit: Computer has gone to sleep.]
<banisterfiend> Eiam: adding real named parameters probalby required a significant amount of internal changes, these 'fake' naemd parameters are mostly good enough to tide us over until we get proper language support (which we get in 2.0)
<Eiam> one of these days I'm going to find a language that I really really love, that just fits with my brain
<Eiam> one day.
Goles has joined #ruby
<chrisftw_tired> i ahve a simple question
<Eiam> ruby is as close as i've come, but a lot of things about it still bother me =)
<chrisftw_tired> how do I put speech marks inside a string array?
<chrisftw_tired> Like this? phrases=[" ... ", " ahem ", ""... ""]
karupanerura has joined #ruby
<Eiam> ellipsis ? …
Goles has quit [Max SendQ exceeded]
Goles has joined #ruby
<Eiam> …\u2026 ?
<chrisftw_tired> sorry?
<banisterfiend> Eiam: lots of langauges have special cases where you can simplify syntax in the common situation
joofsh has joined #ruby
<chrisftw_tired> oh
<Eiam> ruby-1.9.3-p0 :002 > phrases=[" ... ", " ahem ", "'... '"]
<Eiam> => [" ... ", " ahem ", "'... '"]
<Eiam> I don't get the question, that works fine for me
<chrisftw_tired> thanks
<banisterfiend> Eiam: scala has a lot more than ruby, iirc
<chrisftw_tired> but twitter doesnt like '
<chrisftw_tired> it wants "
<chrisftw_tired> (im using an api)
pskosinski has joined #ruby
<Eiam> tried escaping them then? \"
<Eiam> banisterfiend: I'm working my way through scheme atm
love_color_text has joined #ruby
x82_nicole has quit [Quit: Computer has gone to sleep.]
<chrisftw_tired> ["\"Eliam\""]
joofsh has quit [Remote host closed the connection]
<apeiros_> Eiam: are you hand-crafting JSON?
* Quadlex shudders
<apeiros_> if so: STOP DOING THAT. use a JSON library. one even comes with ruby.
<Eiam> apeiros_: haha, as it so happens I am currently hand crafting what is translated into JSON via "fake named parameters"
<apeiros_> in that case, see last message.
_bart has quit [Quit: _bart]
<Eiam> but its merely to prototype an idea as I tweak if its even possible. once i work out of its possible, the machine will totally generate it for me =)
<apeiros_> yeah, even then. it's a bad idea. don't do it.
<Eiam> so yes, this annoyance will go away as soon as I'm done prototyping to see if it works =)
<apeiros_> using a proper json library is easier anyway.
jlast has joined #ruby
jamescarr has quit [Quit: jamescarr]
jamescarr has joined #ruby
kokainepizza has quit [Quit: My pooter is sleep.]
<Eiam> *shrug*
<Eiam> I'm not going to bust out a json library to twiddle with a single line of code and a single function call
<apeiros_> oh dear
<apeiros_> because `require 'json'` is so hard. have fun with your broken output.
blazes816 has joined #ruby
<waxjar> there's a json library in the std. lib.
Chryson has quit [Quit: Leaving]
jlast has quit [Ping timeout: 244 seconds]
<waxjar> basically turns hashes into json and vice versa.
<Eiam> okay so you suggest I just say myFunc({:a =>"b"}.to_json) instead of doing myFunc(:a => "b") ?
<apeiros_> no
<Eiam> later on myFunc (which technically isn't mine, its another library function someone else wrote, calls args.to_json anyway..
<apeiros_> I suggest that wherever you handcraft json, you use .to_json instead.
yshh has joined #ruby
jeffreybaird has joined #ruby
<Eiam> and again, thats what I just showed as an example then. my hand crafted json being to_json'd
<atmosx> shit
<Eiam> and you said no..
<atmosx> almost 3:00 am
<atmosx> Good night fellow rubyistS! :-)
dankest has joined #ruby
atmosx has quit [Quit: And so the story goes…]
<apeiros_> walltalk. pointless. as said, have fun with your broken output.
nricciar has quit [Ping timeout: 245 seconds]
<Eiam> I just don't get what you are suggesting, I just gave an example of what I thought you said, and you said no thats not what I said
<Eiam> then said the same thing I just said, so yeah, clearly walltalk
imami|afk is now known as banseljaj
_cheney2 has quit [Quit: Nettalk6 - www.ntalk.de]
_cheney has joined #ruby
mtweiou has joined #ruby
<apeiros_> there's no handcrafted json in `myFunc(:a => "b")`
<Eiam> Typing myfunc(:a => ["obj1","obj2","obj3"], :b =>"yo") is totally handcrafting json..
<mtweiou> hello, I want to execute some code pieces as a background process, is this possible?
<Eiam> as I mentioned, it later is called as args.to_json. how is that not handcrafted json
<apeiros_> mtweiou: yes, see Kernel#spawn
mercwithamouth has quit [Ping timeout: 240 seconds]
mercwithamouth has joined #ruby
<Eiam> apeiros_: okay, well if thats not handcrafting json then I was wrong, I'm not handcrafting json, sorry for the confusion =)
mjolk2 has quit [Quit: This computer has gone to sleep]
<apeiros_> Eiam: you're not making sense
<mtweiou> apeiros_: oh, I tried to do this with fork and process.detach
<apeiros_> first you say "I'm not busting out a json lib", then you suddenly say "I call to_json in there"
zastern has quit [Remote host closed the connection]
<apeiros_> but I'm off of this.
<banisterfiend> apeiros_: he's a pretty confused guy generally, i think
slainer68 has joined #ruby
<Eiam> i said myFunc isn't my function, but the author of it turns the args to_json later anyway
<apeiros_> yeah, think so too.
yshh has quit [Read error: Connection reset by peer]
<banisterfiend> either he's really young (like < 15) or he's on drugs
yshh has joined #ruby
<apeiros_> banisterfiend: you should talk with him then, you've got experience with that :-p
<Eiam> I don't know how I should feel fitting into neither category =0
benlieb has joined #ruby
<mtweiou> apeiros_: Kernel#spawn doesn't allow me to execute a code block, does it?
<banisterfiend> apeiros_: you dont have experience with drugs? what are you, some kind of pussy?
<banisterfiend> ;)
<apeiros_> mtweiou: ah, you mean deamonize?
<apeiros_> mtweiou: yeah, there's a gem which makes it easier
<mtweiou> apeiros_: no, I don't want a deamon
<apeiros_> banisterfiend: depends on your definition of drugs
<the_jeebster> mushrooms do wonders for the ol' noggin :)
<mtweiou> apeiros_: I want to clear my clipboard in the background after $n seconds
<mtweiou> apeiros_: I already have the clipboard clear code
<the_jeebster> I'd imagine the ruby community is probably where "drugs" are most prevalent
<mtweiou> I just need the background stuff
<mtweiou> apeiros_: this is my code, but it creates zombie processes http://pastie.org/5618971
yshh has quit [Ping timeout: 248 seconds]
<waxjar> drugs are bad, mkay?
<the_jeebster> who has the right to tell you what you can and can't be doing at the end of the day. it's just an advantage of power at the end of the day
<the_jeebster> humans weren't meant to be 'governed'
<Eiam> and you said I was young or on drugs...
<the_jeebster> ha, whatever. seriously. why should I go to jail if I feel like peeing out in the woods and somebody calls the authorities?
Umren|2 has quit [Read error: Connection reset by peer]
<Eiam> I didn't say you should go to jail for peeing in the woods =0
<the_jeebster> no but the government does
<blazes816> i was wondering where you were last weekend jeebster
<the_jeebster> this is why I like portugal for certain social standpoints. fiscal, not so much
slainer68 has quit [Ping timeout: 264 seconds]
<the_jeebster> shit they can't keep me in that tin box, too much to see in the world
dagnachew has quit [Quit: Leaving]
<waxjar> mtweiou: https://gist.github.com/4448988 something like that?
jamescarr has quit [Quit: jamescarr]
<apeiros_> mtweiou: sorry, reallife
<mtweiou> apeiros_: no problem ;)
vlad_starkov has joined #ruby
jeffreybaird has quit [Quit: jeffreybaird]
dreinull has quit [Remote host closed the connection]
pavilionXP__ has joined #ruby
<mtweiou> waxjar: it also creates zombie process (at least the process is still alive after the sleep)
pavilionXP has quit [Read error: Connection reset by peer]
<waxjar> yeah, it closes itself after it did cleared the clipboard though :)
<waxjar> *no did
chrisftw_tired has left #ruby [#ruby]
<mtweiou> does it?
woolite64 has quit []
<waxjar> yep
pavilionXP__ has quit [Max SendQ exceeded]
<mtweiou> If I run ps fux I still see the a xclip proccess
marr has quit [Ping timeout: 244 seconds]
<mtweiou> even 5 minutes after the script execution
pavilionXP__ has joined #ruby
vlad_starkov has quit [Ping timeout: 248 seconds]
pavilionXP__ has quit [Max SendQ exceeded]
mele- has joined #ruby
<waxjar> but you're running a ruby script, right?
pavilionXP__ has joined #ruby
Xeago has quit [Remote host closed the connection]
<mtweiou> waxjar: right
<mtweiou> I guess it is a bug of the gem I am using to access the clipboard
pavilionXP__ has quit [Max SendQ exceeded]
<waxjar> possibly. my example didn't have any ruby processes or say processes running after
Xeago has joined #ruby
Goles has quit [Quit: Computer has gone to sleep.]
sepp2k1 has quit [Remote host closed the connection]
Glacer232 has quit [Quit: Textual IRC Client: www.textualapp.com]
yshh has joined #ruby
nkts has joined #ruby
rburton- has quit [Ping timeout: 244 seconds]
pavilionXP__ has joined #ruby
nga4 has joined #ruby
ossareh has joined #ruby
invisime has quit [Quit: Leaving.]
pavilionXP__ has quit [Max SendQ exceeded]
pavilionXP__ has joined #ruby
<ossareh> 'lo. I think I'm being super dense - I'm not clear on how to create a method on an object that can be called in both the static and non-static manner.
mtweiou has quit [Quit: Page closed]
Goles has joined #ruby
jblack has quit [Ping timeout: 244 seconds]
wallerdev has quit [Quit: wallerdev]
<ossareh> ah, nvm - I am being dense :D
wallerdev has joined #ruby
v0n has joined #ruby
horofox has quit [Quit: horofox]
ltsstar has quit [Quit: ltsstar]
pavilionXP has joined #ruby
pavilionXP__ has quit [Read error: Connection reset by peer]
<shevy> ossareh static and non static?
asteve has joined #ruby
<shevy> perhaps you mean "def foo" vs. "def self.foo"
joeycarmello has joined #ruby
<Eiam> vs class << self def foo ?
SeanLazer has quit [Quit: SeanLazer]
Goles has quit [Ping timeout: 252 seconds]
thufir_ has quit [Quit: Leaving.]
tommyvyo has quit [Quit: Computer has gone to sleep.]
<Eiam> freenode weather forecast - http://zxq9.com/archives/763
Xeago has quit [Remote host closed the connection]
SeanLazer has joined #ruby
<banisterfiend> Eiam: def self.foo is more or less equivalent to class << self def foo ;)
<Eiam> #ruby was not mentioned however =( only #rails
<Eiam> banisterfiend: I know =p except when its not equivalent
<Eiam> i've forgot whatever that special case was and decided that class << self works best for how I think so that what I use
asteve has quit [Changing host]
asteve has joined #ruby
pavilionXP__ has joined #ruby
pavilionXP has quit [Read error: Connection reset by peer]
alexspeller has quit [Remote host closed the connection]
pavilionXP__ has quit [Max SendQ exceeded]
mmokrysz has joined #ruby
<Eiam> banisterfiend: no need to elucidate the answer, I've read more than one article about the difference more than once, i just forget stuff like that after awhile.
io_syl has quit [Ping timeout: 272 seconds]
Kuifje has quit [Ping timeout: 255 seconds]
JarJar has quit [Quit: Leaving]
<banisterfiend> Eiam: you can set visibility and aliases etc inside a class << self
<Eiam> ah you did it anyway ;)
murz has joined #ruby
<banisterfiend> Eiam: yeah, im a big boss dogg :)
pavilionXP__ has joined #ruby
mjolk has joined #ruby
<Eiam> I'm sure details like that help with mastery. I can't help but let things like that slide out of my brain, I rarely have to deal with the alternative forms, and the answer to refresh the difference is a quick google away
pavilionXP__ has quit [Max SendQ exceeded]
smarx007 has joined #ruby
v0n has quit [Ping timeout: 248 seconds]
pavilionXP__ has joined #ruby
lateau has joined #ruby
pavilionXP__ has quit [Max SendQ exceeded]
pavilionXP__ has joined #ruby
mele- has quit [Quit: Linkinus - http://linkinus.com]
pavilionXP__ has quit [Max SendQ exceeded]
pavilionXP__ has joined #ruby
lateau has quit [Remote host closed the connection]
lateau` has joined #ruby
alexspeller has joined #ruby
alexspeller has quit [Read error: Connection reset by peer]
nkts has quit []
mmitchell has joined #ruby
mmokrysz has quit [Quit: Leaving.]
io_syl has joined #ruby
RagingDave has quit [Quit: Ex-Chat]
ryanh has joined #ruby
<shevy> is there a general simple way to split up a file into subsections ... nothing but based on identifiers, that are the headers
nopper has quit [Ping timeout: 260 seconds]
hotovson has quit [Remote host closed the connection]
<shevy> like ... "NOTE 1\n we have to eat chicken \nblabla NOTE 2\n chicken is good"
joofsh has joined #ruby
<shevy> like, split that file into "NOTE" keyword subsections hmm
iamjarvo has quit [Ping timeout: 248 seconds]
nopper has joined #ruby
jjbohn has joined #ruby
iamjarvo has joined #ruby
Virunga has quit [Remote host closed the connection]
<Quadlex> ...Sigh
hotovson has joined #ruby
<Quadlex> When did Apple discontinue airline adapters?
alanjc has joined #ruby
jblack has joined #ruby
<waxjar> shevy, read the full file into a string, then call split on it? or is that too naive
zeade has joined #ruby
ryez has quit [Ping timeout: 240 seconds]
hotovson has quit [Ping timeout: 248 seconds]
shevy has quit [Ping timeout: 248 seconds]
dhruvasagar has joined #ruby
pskosinski has quit [Quit: Learn Life's Little Lessons]
bbloom has quit [Ping timeout: 248 seconds]
yoshie902a has joined #ruby
smarx007 has quit [Ping timeout: 260 seconds]
jjbohn has quit [Quit: Leaving...]
lateau` has quit [Read error: Connection reset by peer]
<yoshie902a> What code would convert this text/string into a nested hash? I'm not sure how to deal with the nesting. http://pastie.org/5619195
samphippen has quit [Quit: Computer has gone to sleep.]
smarx007 has joined #ruby
<apeiros_> yoshie902a: looks like ordinary yaml
<apeiros_> ie., YAML.load, or YAML.load_file
<yoshie902a> apeiros_: unfortunately, I tried and it's not yaml
<apeiros_> then I'd find out what format it is
<apeiros_> else, look into StringScanner (part of stdlib)
<apeiros_> (else = if all else fails)
<yoshie902a> apeiros_: it's just a standard format, plus or minus fields from a government filing
cableray has joined #ruby
<apeiros_> "standard format" means nothing. you need a name if you want to find an existing lib for it.
lateau has joined #ruby
jrist is now known as jrist-afk
<yoshie902a> apeiros_: There is no lib for it. I need to figure out the logic to write the code. "standard" in terms of all the filings are formatted the same.
Goles has joined #ruby
<apeiros_> ok
love_color_text has quit [Remote host closed the connection]
smarx007 has quit [Ping timeout: 244 seconds]
<apeiros_> yoshie902a: btw., works fine if you substitute the leading tabs with 2 spaces
<apeiros_> YAML.load(raw_data_here.gsub(/^\t+/) { |m| ' '*m.length })
cableray has quit [Client Quit]
<yoshie902a> cool, I'll try it
shevy has joined #ruby
v0n has joined #ruby
Goles has quit [Ping timeout: 252 seconds]
cableray has joined #ruby
benlieb has quit [Quit: benlieb]
darthdeus has quit [Quit: Leaving...]
ryanh has quit [Ping timeout: 260 seconds]
havenn has quit [Remote host closed the connection]
v0n has quit [Ping timeout: 252 seconds]
maletor has quit [Quit: Computer has gone to sleep.]
havenn has joined #ruby
sn0wb1rd has quit [Quit: sn0wb1rd]
lateau has quit [Ping timeout: 265 seconds]
ryanh has joined #ruby
ephemerian has quit [Quit: Leaving.]
dhruvasagar has quit [Ping timeout: 260 seconds]
havenn has quit [Read error: No route to host]
snuglepuss has joined #ruby
<yoshie902a> apeiros_: I tried it, got the following error http://old.pastie.org/5619286
darthdeus has joined #ruby
pavilionXP__ has quit [Read error: Connection reset by peer]
tvw has quit [Ping timeout: 248 seconds]
pavilionXP has joined #ruby
Takehiro has joined #ruby
cableray has quit [Quit: cableray]
pavilionXP has quit [Max SendQ exceeded]
pavilionXP has joined #ruby
alexspeller has joined #ruby
alexspeller has quit [Read error: Connection reset by peer]
pavilionXP has quit [Max SendQ exceeded]
havenn has joined #ruby
pavilionXP has joined #ruby
jjbohn has joined #ruby
pavilionXP has quit [Max SendQ exceeded]
pavilionXP has joined #ruby
Takehiro has quit [Ping timeout: 248 seconds]
Hanmac1 has joined #ruby
eka has quit [Quit: Computer has gone to sleep.]
love_color_text has joined #ruby
daniel_hinojosa has quit [Ping timeout: 248 seconds]
Hanmac has quit [Ping timeout: 240 seconds]
mrdtt has joined #ruby
Guest9041 has quit [Remote host closed the connection]
x82_nicole has joined #ruby
zeade has quit [Quit: Leaving.]
carlzulauf has quit [Ping timeout: 244 seconds]
snuglepuss has quit [Remote host closed the connection]
<yoshie902a> apeiros_: thanks for the help. any idea what caused the error? I was thinking the keys having spaces. Would the spaces break it?
mockra has quit [Remote host closed the connection]
x82_nicole has quit [Client Quit]
crackfu has joined #ruby
daniel_hinojosa has joined #ruby
stevechiagozie has joined #ruby
dankest has quit [Quit: Leaving...]
berserkr has quit [Quit: Leaving.]
headius has joined #ruby
kinginky has joined #ruby
sn0wb1rd has joined #ruby
miskander has quit [Quit: miskander]
ehlu has quit [Quit: WeeChat 0.3.8]
headius has quit [Client Quit]
carlzulauf has joined #ruby
headius has joined #ruby
xAndy is now known as xandy
SeanLazer has quit [Quit: SeanLazer]
v0n has joined #ruby
jduan1981 has quit [Ping timeout: 265 seconds]
peregrine81 has joined #ruby
peregrine81 has quit [Remote host closed the connection]
Solnse has joined #ruby
bigmac has quit [Ping timeout: 255 seconds]
<the_jeebster> so ruby include? checks the object id value, no?
niklasb has quit [Ping timeout: 272 seconds]
SeanLazer has joined #ruby
<yoshie902a> the_jeebster: Returns true if the given object is present in self (that is, if any object == anObject), false otherwise.
mercwithamouth has quit [Ping timeout: 240 seconds]
<yoshie902a> a = [ "a", "b", "c" ] ; a.include?("b") #=> true
guns has joined #ruby
jblack has quit [Ping timeout: 265 seconds]
mercwithamouth has joined #ruby
gregorg_taf has joined #ruby
jonathanwallace1 has joined #ruby
matled- has joined #ruby
blazes816_ has joined #ruby
cjk101010_ has joined #ruby
kloeri_ has joined #ruby
wereHams1er has joined #ruby
io_syl has quit [Ping timeout: 252 seconds]
jjbohn has quit [Quit: Linkinus - http://linkinus.com]
adrock has joined #ruby
alexspeller has joined #ruby
hamfz__ has joined #ruby
trent1 has joined #ruby
yaroslav has joined #ruby
cdabba_ has joined #ruby
NobbZ has joined #ruby
emsilva has joined #ruby
jjbohn has joined #ruby
alexspeller has quit [Read error: Connection reset by peer]
blazes816 has quit [*.net *.split]
adeponte has quit [*.net *.split]
cdabba has quit [*.net *.split]
hamfz_ has quit [*.net *.split]
jonathanwallace has quit [*.net *.split]
matled has quit [*.net *.split]
wereHamster has quit [*.net *.split]
gregorg has quit [*.net *.split]
mame0 has quit [*.net *.split]
NobbZ|away has quit [*.net *.split]
Gm4n has quit [*.net *.split]
LiquidInsect has quit [*.net *.split]
zz_chrismcg has quit [*.net *.split]
kloeri has quit [*.net *.split]
cjk101010 has quit [*.net *.split]
tomaw has quit [*.net *.split]
distax has quit [*.net *.split]
felipe has quit [*.net *.split]
tos9 has quit [*.net *.split]
peterpan has quit [*.net *.split]
KillerFox has quit [*.net *.split]
matled- is now known as matled
LiquidIn1ect has joined #ruby
chrismcgh has joined #ruby
blazes816_ is now known as blazes816
jbw has quit [Ping timeout: 272 seconds]
emsilva has quit [Changing host]
emsilva has joined #ruby
adrock has left #ruby [#ruby]
tos9 has joined #ruby
Gm4n has joined #ruby
Guest9041 has joined #ruby
lolcathost has joined #ruby
lolcathost is now known as Guest86792
wardr0id has quit [Ping timeout: 248 seconds]
Guest86792 has quit [Client Quit]
krz has joined #ruby
jfl0wers has quit [Quit: jfl0wers]
bigmac has joined #ruby
<havenn> the_jeebster: ['a', 'b', 'c'].map(&:object_id).include? 'a'.object_id #=> false
kinginky has quit [Ping timeout: 255 seconds]
stevechiagozie has quit [Quit: stevechiagozie]
ryanh has quit [Quit: Computer has gone to sleep.]
jaygen has joined #ruby
<the_jeebster> havenn: yeah I tried it out afterwards. looks good
jaygen_ has quit [Read error: Operation timed out]
tomaw has joined #ruby
bigmac is now known as i8igmac
karasawa has joined #ruby
i8igmac has quit [Quit: Leaving]
bigmac has joined #ruby
lolcathost has joined #ruby
pwelch has joined #ruby
jbw has joined #ruby
xnm has joined #ruby
v0n has quit [Ping timeout: 276 seconds]
philips_ has quit [Excess Flood]
stevechiagozie has joined #ruby
<yoshie902a> I'm trying to replace all the spaces in the keys with underscores. my code is not working. any ideas? http://pastie.org/5619470
The_8472 has quit [Read error: Operation timed out]
The_8472 has joined #ruby
ehlu has joined #ruby
t6d_ has joined #ruby
jduan1981 has joined #ruby
infinitiguy has joined #ruby
t6d has quit [Ping timeout: 264 seconds]
t6d_ is now known as t6d
jjbohn has quit [Quit: Leaving...]
stevechiagozie has quit [Quit: stevechiagozie]
ner0x has quit [Quit: Leaving]
joofsh has quit [Remote host closed the connection]
zodiak has quit [Ping timeout: 272 seconds]
aharris6 has joined #ruby
<havenn> yoshie902a: a.gsub(/[ |A-Z]+:/) { |m| m.gsub ' ', '_' }
a_a_g has joined #ruby
alexspeller has joined #ruby
alexspeller has quit [Read error: Connection reset by peer]
mame0 has joined #ruby
xpen has joined #ruby
KillerFox has joined #ruby
the_jeebster has quit [Quit: Leaving.]
jlast has joined #ruby
alexspeller has joined #ruby
alexspeller has quit [Read error: Connection reset by peer]
zodiak has joined #ruby
SeanLazer has quit [Quit: SeanLazer]
Jessykinz has joined #ruby
deadlytoah has joined #ruby
<yoshie902a> havenn: thanks, any idea how to convert a YAML to a hash?
philips_ has joined #ruby
<havenn> yoshie902a: require 'yaml'; {}.to_yaml
alexspeller has joined #ruby
<havenn> oh, you want other way around >.>
alexspeller has quit [Read error: Connection reset by peer]
<yoshie902a> havenn: yup
Jake232 has quit [Quit: Computer has gone to sleep.]
twopoint718 has joined #ruby
<yoshie902a> I didn't see a to_hash
xpen_ has joined #ruby
<yoshie902a> havenn: I"m actually trying to convert the following string into a hash http://pastie.org/5619470
infinitiguy has quit [Quit: Leaving.]
bradleyprice has quit [Remote host closed the connection]
<yoshie902a> so far I was able to convert to yaml, but I have no idea how to get it into a hash
xpen has quit [Ping timeout: 248 seconds]
<havenn> yoshie902a: YAML.parse string
<havenn> yoshie902a: Is the YAML a Hash?
emsilva has quit [Quit: Textual IRC Client: www.textualapp.com]
SeanLazer has joined #ruby
xpen has joined #ruby
<yoshie902a> havenn: when I converted to YAML, I got this http://pastie.org/5619536, not really a clean looking hash that I was looking for. I used Psych.parse(c) c is my string
xpen_ has quit [Ping timeout: 248 seconds]
locriani has quit [Read error: Connection reset by peer]
xpen_ has joined #ruby
locriani has joined #ruby
otters has quit [Remote host closed the connection]
elico has joined #ruby
fungoat has joined #ruby
xpen has quit [Ping timeout: 276 seconds]
cha1tanya has joined #ruby
jamescarr has joined #ruby
yaroslav has quit [Quit: yaroslav]
<havenn> yoshie902a: The ALLCAPs string thing is you are starting with is an odd format. >.> This at least gets it down to symbols and strings, but you still need to parse it into a nested Hash: a.squeeze("\t").split("\t").map { |s| s.end_with?(':') ? s.gsub(' ', '_').downcase.delete(':').to_sym : s }
<havenn> s/is you/that you/
theRoUS has quit [Ping timeout: 248 seconds]
bigmac has quit [Quit: Leaving]
jduan1981 has quit [Ping timeout: 248 seconds]
zeade has joined #ruby
otters has joined #ruby
<yoshie902a> havenn: what is s/is you/ that you/?
<havenn> yoshie902a: Oh, just shorthand correction. I wrote 'is you' above but meant 'that you'.
<yoshie902a> never mind, got it sub
<yoshie902a> I tried but it does not seem to work.
x82_nicole has joined #ruby
<yoshie902a> it just creates an array
x82_nicole has quit [Client Quit]
zeade has quit [Client Quit]
MattRb has quit [Quit: MattRb]
mjolk has quit [Quit: returning some videotapes]
maletor has joined #ruby
xpen has joined #ruby
<havenn> yoshie902a: Yeah, if it was a flat hash you could just do Hash[array] with the array, but you've got hashes within hashes so you'd have to have some logic to parse the array into a nested hash.
<havenn> yoshie902a: I didn't see it was nested through all the caps and \t's until I parsed it. :P
<yoshie902a> havenn: the logic is what I'm having trouble with.
cyong has joined #ruby
Takehiro has joined #ruby
<yoshie902a> Yah, I noticed you squeezed the "\t", so you wouldn't see the nesting
xpen_ has quit [Ping timeout: 248 seconds]
maletor has quit [Ping timeout: 276 seconds]
<yoshie902a> havenn: this is what I need to convert to a hash.. http://old.pastie.org/5619582
<yoshie902a> been working all day on it and can't figure it out
cha1tanya has quit [Quit: Leaving]
Spami has quit [Quit: This computer has gone to sleep]
Tarential has quit [Excess Flood]
MattRb has joined #ruby
aharris6 has left #ruby ["Leaving..."]
Tarential has joined #ruby
slainer68 has joined #ruby
darthdeus has quit [Ping timeout: 248 seconds]
alexspeller has joined #ruby
adrock has joined #ruby
Jessykinz has quit []
t6d has quit [Quit: t6d]
ping-pong has quit [Ping timeout: 260 seconds]
slainer68 has quit [Ping timeout: 255 seconds]
a_a_g has quit [Quit: Leaving.]
tommyvyo has joined #ruby
ner0x has joined #ruby
alexspeller has quit [Ping timeout: 252 seconds]
SeanLazer has quit [Quit: SeanLazer]
stevechiagozie has joined #ruby
_student has quit [Ping timeout: 260 seconds]
jaywastaken has quit [Remote host closed the connection]
MattRb has quit [Quit: MattRb]
alekst has joined #ruby
<aedorn> is there another gem besides Chronic that will do natural language date/time parsing that I'm not aware of?
<yoshie902a> aedorn: openNLP
mercwithamouth has quit [Ping timeout: 240 seconds]
<yoshie902a> you need jruby for it
<aedorn> hmm. can't use jruby
ping-pong has joined #ruby
skryking has joined #ruby
love_color_text has quit [Remote host closed the connection]
stevechiagozie has quit [Quit: stevechiagozie]
MattRb has joined #ruby
zeade has joined #ruby
alekst has quit [Quit: Leaving...]
yoshie902a has quit [Quit: yoshie902a]
io_syl has joined #ruby
Solnse has quit [Ping timeout: 265 seconds]
zeade has quit [Quit: Leaving.]
jonahR has joined #ruby
crackfu has quit [Remote host closed the connection]
shevy has quit [Ping timeout: 255 seconds]
adrock has quit [Quit: Mango IRC for iOS and OS X, http://mediaware.sk/mango]
jlast has quit [Remote host closed the connection]
diegoviola has quit [Ping timeout: 276 seconds]
adrock has joined #ruby
jonahR has quit [Ping timeout: 248 seconds]
LKiS has joined #ruby
diego has joined #ruby
_alejandro has joined #ruby
shevy2 has joined #ruby
diego is now known as diegoviola
adrock has quit [Client Quit]
shevy2 is now known as shevy
scruple has joined #ruby
adrock has joined #ruby
joofsh has joined #ruby
adrock has quit [Remote host closed the connection]
jekotia has quit [Quit: ChatZilla 0.9.89-rdmsoft [XULRunner 1.9.0.17/2009122204]]
asteve has quit [Quit: Computer has gone to sleep.]
joofsh has quit [Remote host closed the connection]
elico has quit [Quit: elico]
joeycarmello has quit [Remote host closed the connection]
elico has joined #ruby
deadlytoah has quit [Ping timeout: 248 seconds]
ananthakumaran has joined #ruby
<headius> aedorn: you could probably call it through rjb
<headius> no idea of perf etc, but yeah
otters has quit [Remote host closed the connection]
ehm_may has joined #ruby
cha1tanya has joined #ruby
cha1tanya has quit [Changing host]
cha1tanya has joined #ruby
kenneth has quit [Quit: kenneth]
ananthakumaran has quit [Client Quit]
m4n has joined #ruby
jlast has joined #ruby
adeponte has joined #ruby
adeponte has quit [Remote host closed the connection]
adeponte has joined #ruby
Takehiro has quit [Remote host closed the connection]
x82_nicole has joined #ruby
love_color_text has joined #ruby
chriskk has quit [Quit: chriskk]
adeponte has quit [Remote host closed the connection]
adeponte has joined #ruby
xemu has quit [Quit: Nettalk6 - www.ntalk.de]
jamescarr has quit [Quit: jamescarr]
Solnse has joined #ruby
yoshie902a has joined #ruby
yoshie902a has quit [Client Quit]
tommyvyo has quit [Quit: Computer has gone to sleep.]
x82_nicole has quit [Client Quit]
x82_nicole has joined #ruby
jamescarr has joined #ruby
lele has quit [Ping timeout: 246 seconds]
a_a_g has joined #ruby
fungoat has quit [Quit: fungoat]
mmitchell has quit [Remote host closed the connection]
jlast has quit [Ping timeout: 264 seconds]
lele has joined #ruby
jonahR has joined #ruby
woolite64 has joined #ruby
chimkan_ has joined #ruby
joeycarmello has joined #ruby
elico has quit [Quit: elico]
ananthakumaran has joined #ruby
uris has quit [Quit: Leaving]
kenneth has joined #ruby
twopoint718 has left #ruby [#ruby]
MattRb has quit [Quit: MattRb]
MattRb has joined #ruby
rakl has joined #ruby
mpereira has quit [Ping timeout: 260 seconds]
jamescarr has quit [Quit: jamescarr]
_alejandro has quit [Remote host closed the connection]
jamescarr has joined #ruby
madwilliamflint has quit []
jduan1981 has joined #ruby
Paradox has joined #ruby
maletor has joined #ruby
<Hanmac_> there is no, use Hash[stuff]
cyong has quit [Quit: Leaving.]
blazes816 has quit [Quit: blazes816]
kiyoura has quit [Quit: Leaving]
benlieb has joined #ruby
<Hanmac_> huch wrong timezone
joeycarmello has quit [Ping timeout: 276 seconds]
jlast has joined #ruby
maletor has quit [Quit: Computer has gone to sleep.]
assurbanipal has joined #ruby
bradleyprice has joined #ruby
TheEmpty_ has joined #ruby
elliottcable is now known as ellio
<shevy> I am not happy with linux ...
ellio is now known as iott
iott is now known as ttcab
ttcab is now known as cable
TheEmpty has quit [Ping timeout: 248 seconds]
<a_a_g> there is always Windows ...
<shevy> :(
<shevy> windows is even worse
rakl has quit [Quit: sleeping]
<a_a_g> i know, that was sarcastic :)
<a_a_g> what the problem with linux?
cable is now known as elliottcable
<shevy> a_a_g just the little things, everything keeps on changing
bbloom has joined #ruby
<shevy> I have no /etc/inittab anymore for instance and this makes me angry
<a_a_g> ah. wrong distro perhaps?
<shevy> hmm could be
<shevy> people told me to use arch
<a_a_g> never used it. vanilla debian is pretty good as well
hackerdude has quit [Remote host closed the connection]
pwelch has quit [Quit: pwelch]
<shevy> they seem to have moved the logic into rc-sysinit*
<shevy> for no real gain i can see so far... please enjoy this beauty here:
<shevy> eval "$(sed -nre 's/^[^#][^:]*:([0-6sS]):initdefault:.*/DEFAULT_RUNLEVEL="\1";/p' /etc/inittab || true)"
infinitiguy has joined #ruby
<shevy> does this make you warm and fuzzy inside?
<a_a_g> wtf is that?
<shevy> I don't even get it... they got rid of /etc/inittab, yet in the replacement, the script refers to it still
<shevy> a_a_g I think some sed replacement going on there
<shevy> "# Check for default runlevel in /etc/inittab"
benlieb has quit [Quit: benlieb]
<shevy> why do they get rid of inittab in the first place, yet still refer to it ...
<a_a_g> its not going to work if there is no inittab file there
<a_a_g> its probably an artifact left over
<shevy> yeah
<shevy> it's not really important, it just annoys me
<a_a_g> i rarely touch inittab et al manually
koshii has joined #ruby
<shevy> there is no inherent beauty in any of that
<shevy> I mean, in the whole of linux...
<a_a_g> ah yes. thats true
<a_a_g> give freebsd a try. they keep things simple
elico has joined #ruby
<shevy> I am going to eventually!
yacks has quit [Ping timeout: 276 seconds]
<shevy> unfortunately, linux seems to allow much more tinkering...
<a_a_g> linux is a unix clone for the 386 created by i386 hackers. freebsd is a unix for the 386 created by unix hackers
<shevy> I liked linux from scratch (minus the time one had to invest)
<shevy> yeah but I am not a hacker, I am clueless. I am a tinker, I kick on things until they work or fail
<shevy> with ruby it works very well so far
ks` has joined #ruby
sambio has quit []
<a_a_g> if you just want to configure the runlevels, you can use sysv-rc-conf
<shevy> hmm, apt-get install it?
<shevy> ok did that
infinitiguy has quit [Quit: Leaving.]
<shevy> sysv-rc-conf
<shevy> Segmentation fault
Hanmac_ has quit [Ping timeout: 245 seconds]
<shevy> but the latter one is my fault ;)
a_a_g has quit [Quit: Leaving.]
jlast has quit [Ping timeout: 248 seconds]
browndawg has joined #ruby
stevechiagozie has joined #ruby
sayan has joined #ruby
cascalheira has quit [Ping timeout: 248 seconds]
elico has quit [Remote host closed the connection]
jrajav has quit [Quit: I tend to be neutral about apples]
cj3kim has joined #ruby
elsifaka has joined #ruby
stevechi1gozie has joined #ruby
mpfundstein has joined #ruby
joeycarmello has joined #ruby
stevechi1gozie has quit [Client Quit]
<davidokner> Which was the online Ruby training compnay that gives you those little trophies to show your ability to employers to show you can program?
stevechiagozie has quit [Quit: Textual IRC Client: www.textualapp.com]
<davidokner> Somebody is asking me if anybody gives a certicate of some sort
v0n has joined #ruby
<davidokner> Is that TeamTreeHouse.com ?
stevechiagozie has joined #ruby
mpfundstein has quit [Ping timeout: 255 seconds]
Norrin has joined #ruby
bradleyprice has quit [Remote host closed the connection]
ks` has quit [Quit: rcirc on GNU Emacs 24.1.1]
artnez has joined #ruby
<shevy> I think I am going to remove all shell scripts here and just use ruby scripts
rakl has joined #ruby
vikhyat has joined #ruby
DrCode_ has joined #ruby
Guest9041 has quit [Read error: Connection reset by peer]
DrCode has quit [Ping timeout: 276 seconds]
DrCode_ is now known as DrCode
asdfljk0 has joined #ruby
jlast has joined #ruby
yacks has joined #ruby
Hanmac has joined #ruby
karasawa has quit [Ping timeout: 255 seconds]
mmitchell has joined #ruby
karasawa has joined #ruby
Guest9041 has joined #ruby
<bnagy> bash scripts are fine if they're less than say 10 lines and don't use functions
<bnagy> just that people get carried away
atmosx has joined #ruby
pyro111 has joined #ruby
vikhyat_ has joined #ruby
vikhyat has quit [Ping timeout: 248 seconds]
mmitchell has quit [Ping timeout: 248 seconds]
Goles has joined #ruby
aquagrunty has joined #ruby
<aquagrunty> argh
<aquagrunty> why is it so hard to connect to ms sql
stevechiagozie has quit [Quit: Computer has gone to sleep.]
Guest9041 has quit [Ping timeout: 265 seconds]
yfeldblum has quit [Ping timeout: 260 seconds]
huntercoool has quit [Ping timeout: 248 seconds]
jlast has quit [Ping timeout: 240 seconds]
akemrir has joined #ruby
Guest9041 has joined #ruby
<atmosx> heroku is killing me and I don't know why
<Hanmac> HAHA all projects on travis does fail because rails is not compatible with the newest ruby patch level .D
<atmosx> who's travis?
ehm_may has quit [Quit: Linkinus - http://linkinus.com]
<atmosx> i see
<Hanmac> its an automatic code testing page .. (like jenkins?) and many projects (not only rails) does have problems with p362
cj3kim has quit [Quit: Leaving]
a_a_g has joined #ruby
Guest9041 has quit [Ping timeout: 248 seconds]
yfeldblum has joined #ruby
v0n has quit [Ping timeout: 252 seconds]
koshii has quit [Remote host closed the connection]
murz has quit [Quit: Linkinus - http://linkinus.com]
Goles has quit [Quit: Computer has gone to sleep.]
vlad_starkov has joined #ruby
karasawa has quit [Ping timeout: 255 seconds]
karasawa has joined #ruby
Guest9041 has joined #ruby
yacks has quit [Remote host closed the connection]
Driscoll has quit [Ping timeout: 248 seconds]
<asdfljk0> why?
<asdfljk0> what kind of problems are people having with 362?
asdfljk0 has quit [Quit: asdfljk0]
<atmosx> hm
jlast has joined #ruby
<atmosx> I'm getting paranoid with heroku: time is correct, no errors, no logs, nothing …but I can see diff thingsin the local and remote copy
<atmosx> blah
<Hanmac> asdfljk0 there some problems with the GC and when a block needs to turned into a proc object (or something like that)
Guest9041 has quit [Ping timeout: 272 seconds]
iamjarvo has quit [Quit: Leaving.]
cha1tanya has quit [Quit: Leaving]
_bart has joined #ruby
joeycarmello has quit [Ping timeout: 260 seconds]
virtuose has quit [Ping timeout: 252 seconds]
Guest9041 has joined #ruby
generalissimo has joined #ruby
tagrudev has joined #ruby
djdb has joined #ruby
vlad_starkov has quit [Remote host closed the connection]
<shevy> Hanmac he is gone
jlast has quit [Ping timeout: 246 seconds]
Takehiro has joined #ruby
swex_ has joined #ruby
swex has quit [Ping timeout: 248 seconds]
v0n has joined #ruby
sayan has quit [Read error: Connection reset by peer]
robustus has quit [Ping timeout: 255 seconds]
Guest9041 has quit [Ping timeout: 272 seconds]
robustus has joined #ruby
vlad_starkov has joined #ruby
Nisstyre-laptop has quit [Quit: Leaving]
Guest9041 has joined #ruby
headius has quit [Quit: headius]
karasawa has quit [Ping timeout: 256 seconds]
aganov has joined #ruby
yacks has joined #ruby
ryanf_ has joined #ruby
yacks has quit [Max SendQ exceeded]
yacks has joined #ruby
huoxito has quit [Quit: Leaving]
IceDragon has quit [Quit: Space~~~]
ryanf has quit [Ping timeout: 255 seconds]
ner0x has quit [Quit: Leaving]
Pip has joined #ruby
andrewhl has quit [Remote host closed the connection]
Guest9041 has quit [Ping timeout: 245 seconds]
jaygen has quit [Remote host closed the connection]
elico has joined #ruby
joeycarmello has joined #ruby
ryanf_ has quit [Quit: broken pipes |||]
statarb3 has quit [Ping timeout: 272 seconds]
nomenkun has joined #ruby
kn330 has quit [Ping timeout: 264 seconds]
Takehiro has quit [Remote host closed the connection]
karasawa has joined #ruby
sayan has joined #ruby
nomenkun has quit [Ping timeout: 276 seconds]
jlast has joined #ruby
Takehiro has joined #ruby
yshh has quit [Remote host closed the connection]
vikhyat_ has quit [Remote host closed the connection]
Guest9041 has joined #ruby
pyro111 has quit [Quit: Leaving]
yshh has joined #ruby
<Hanmac> huch ... (i configured my current client not to show appear and disappear messages)
Pip has quit [Ping timeout: 248 seconds]
smarx007 has joined #ruby
alanjc has quit [Remote host closed the connection]
jamescarr has quit [Quit: jamescarr]
Takehiro has quit [Remote host closed the connection]
Guest9041 has quit [Read error: Connection reset by peer]
v0n has quit [Ping timeout: 248 seconds]
charliesome has joined #ruby
love_color_text has quit [Remote host closed the connection]
ryanf has joined #ruby
jlast has quit [Ping timeout: 260 seconds]
Morkel has joined #ruby
Guest9041 has joined #ruby
slainer68 has joined #ruby
daniel_hinojosa has quit [Quit: Leaving.]
slainer68 has quit [Ping timeout: 255 seconds]
vikhyat has joined #ruby
zigomir has joined #ruby
Solnse has quit [Ping timeout: 260 seconds]
atmosx has quit [Quit: And so the story goes…]
moshee has quit [Ping timeout: 255 seconds]
Solnse has joined #ruby
moshee has joined #ruby
moshee has quit [Changing host]
moshee has joined #ruby
Guest9041 has quit [Ping timeout: 245 seconds]
jduan1981 has quit [Quit: jduan1981]
yacks has quit [Read error: Operation timed out]
_bart has quit [Quit: _bart]
diegoviola has quit [Quit: WeeChat 0.3.9.2]
adeponte has quit [Remote host closed the connection]
dhruvasagar has joined #ruby
hamfz__ has quit [Ping timeout: 248 seconds]
h4mz1d has quit [Ping timeout: 248 seconds]
yacks has joined #ruby
Guest9041 has joined #ruby
xpen has quit [Ping timeout: 248 seconds]
rakl has quit [Quit: sleeping]
elsifaka has quit [Quit: Veloma e!]
hotovson has joined #ruby
jlast has joined #ruby
mafolz has joined #ruby
Umren has joined #ruby
clocKwize has joined #ruby
Takehiro has joined #ruby
shemerey has joined #ruby
baphled has joined #ruby
Guest9041 has quit [Ping timeout: 245 seconds]
fyolnish has joined #ruby
secretary has joined #ruby
cascalheira has joined #ruby
h4mz1d has joined #ruby
hamfz__ has joined #ruby
smarx007 has quit [Read error: Connection reset by peer]
polymar has joined #ruby
Guest9041 has joined #ruby
lkba has joined #ruby
secretary has quit [Remote host closed the connection]
jlast has quit [Ping timeout: 248 seconds]
adeponte has joined #ruby
mpfundstein has joined #ruby
koffiekop has quit [Remote host closed the connection]
wreckimnaked has joined #ruby
adeponte has quit [Remote host closed the connection]
lirimaery has quit [Quit: leaving]
dross has quit [Quit: leaving]
ewnd9 has joined #ruby
gregorg_taf has quit [Changing host]
gregorg_taf has joined #ruby
gregorg_taf is now known as gregorg
nemesit has joined #ruby
virtuose has joined #ruby
elsifaka has joined #ruby
cha1tanya has joined #ruby
baphled has quit [Ping timeout: 240 seconds]
dross has joined #ruby
pcarrier has joined #ruby
Beoran__ has joined #ruby
track7 has quit [Read error: Connection reset by peer]
elaptics`away is now known as elaptics
karasawa has quit [Ping timeout: 260 seconds]
Beoran_ has quit [Ping timeout: 248 seconds]
karasawa has joined #ruby
jimeh has joined #ruby
love_color_text has joined #ruby
coasterD has quit [Ping timeout: 244 seconds]
aquaranto has quit [Read error: Operation timed out]
spacebug has quit [Read error: Connection reset by peer]
Takehiro has quit [Read error: Connection reset by peer]
spacebug has joined #ruby
<bnagy> heeelp
<bnagy> hPrinter.send( "read_array_of_" + WinTypes::HANDLE.to_sym.to_s, 1 ).first there must be a better way?
love_color_text has quit [Remote host closed the connection]
<bnagy> FFI::MemoryPointer has no #read( :uint64 ) or similar
aquaranto has joined #ruby
methoddk has joined #ruby
Yaku has joined #ruby
<bnagy> and no #read_uint64 at all, so you have to use the array form
<bnagy> that is HORRIBLE :(
generalissimo has quit [Remote host closed the connection]
<Hanmac> sometimes an C-ext can be more ruby than pure ruby code :P
Elhu has joined #ruby
love_color_text has joined #ruby
hoelzro|away is now known as hoelzro
Takehiro has joined #ruby
gokul has joined #ruby
arturaz has joined #ruby
jlast has joined #ruby
hemanth_ has quit [Read error: Connection reset by peer]
hemanth_ has joined #ruby
love_color_text has quit [Remote host closed the connection]
xkx has quit [Read error: Connection reset by peer]
xkx has joined #ruby
xsdg has quit [Read error: Operation timed out]
cristian1 has quit [Read error: Connection reset by peer]
cristian has joined #ruby
hiroyuki has quit [Read error: Connection reset by peer]
woolite64 has quit [Read error: Connection reset by peer]
bjeanes- has quit [Ping timeout: 244 seconds]
woolite64 has joined #ruby
hiroyuki has joined #ruby
krisfremen has quit [Remote host closed the connection]
krisfremen has joined #ruby
jhchabran has quit [Quit: No Ping reply in 180 seconds.]
Guest99924 has quit [Ping timeout: 244 seconds]
weeb1e has quit [Quit: No Ping reply in 180 seconds.]
Coolhand has quit [Quit: No Ping reply in 180 seconds.]
jhchabran has joined #ruby
bapa has quit [Quit: No Ping reply in 180 seconds.]
weeb1e has joined #ruby
Coolhand has joined #ruby
methoddk has quit [Ping timeout: 244 seconds]
bapa has joined #ruby
Martz has quit [Quit: Martz]
kevinfagan has joined #ruby
kevinfagan has quit [Read error: Connection reset by peer]
Kevin_ has joined #ruby
jbpros has quit [Quit: May the Cuke be with you!]
nw has quit [Ping timeout: 244 seconds]
bier has quit [Ping timeout: 244 seconds]
Martz has joined #ruby
jbpros has joined #ruby
shammancer has quit [Ping timeout: 244 seconds]
tris has quit [Ping timeout: 244 seconds]
jrabbit has quit [Ping timeout: 244 seconds]
moted has quit [Ping timeout: 244 seconds]
nw has joined #ruby
pdtpatrick has quit [Ping timeout: 244 seconds]
jrabbit has joined #ruby
Takehiro has quit [Remote host closed the connection]
elaptics has quit [Ping timeout: 244 seconds]
pdtpatrick has joined #ruby
xsdg has joined #ruby
marr has joined #ruby
love_color_text has joined #ruby
Kevin_ has quit [Client Quit]
kevinfagan has joined #ruby
bier has joined #ruby
verto|off has joined #ruby
bjeanes has joined #ruby
verto|off is now known as verto
tris has joined #ruby
elaptics has joined #ruby
_bart has joined #ruby
verto is now known as Guest92373
ephemerian has joined #ruby
jlast has quit [Ping timeout: 248 seconds]
akl_ has joined #ruby
<horse> Good morning chaps
<horse> i'm trying to install bundeler by using "gem install bundler"
shammancer has joined #ruby
<horse> but i'm getting a 404. i think it's again becuase i'm behind a proxy
moted has joined #ruby
<horse> is there a proxy switch i can use?
havenn has quit [Remote host closed the connection]
havenn has joined #ruby
<apeiros_> horse: set your http_ and https_proxy env vars
slainer68 has joined #ruby
vlad_starkov has quit [Remote host closed the connection]
six has left #ruby [#ruby]
rdark has joined #ruby
<horse> @apeiros thanks that worked. i thought i had already set them
havenn has quit [Ping timeout: 260 seconds]
josh0x0 has joined #ruby
rezzack has quit [Quit: Leaving.]
methoddk has joined #ruby
aquagrunty has left #ruby [#ruby]
pcarrier has quit []
jaygen has joined #ruby
josh0x0 has quit [Quit: josh0x0]
woolite64 has quit [Ping timeout: 245 seconds]
jaygen has quit [Read error: Operation timed out]
vlad_starkov has joined #ruby
joeycarmello has quit [Ping timeout: 260 seconds]
guns has quit [Quit: guns]
jacktrick has joined #ruby
jacktrick has quit [Client Quit]
francisfish has joined #ruby
jlast has joined #ruby
distax has joined #ruby
Nisstyre-laptop has joined #ruby
tvw has joined #ruby
MattRb has quit [Quit: MattRb]
RagingDave has joined #ruby
darthdeus has joined #ruby
arietis has joined #ruby
Solnse2 has joined #ruby
mengu has joined #ruby
mengu has quit [Client Quit]
havenn has joined #ruby
Solnse has quit [Ping timeout: 276 seconds]
timmow has joined #ruby
gokul has quit [Quit: Leaving]
elsifaka has quit [Quit: Veloma e!]
akl_ has quit [Remote host closed the connection]
berserkr has joined #ruby
Solnse2 is now known as Solnse
lolcathost has quit [Ping timeout: 260 seconds]
methoddk has quit [Ping timeout: 244 seconds]
jlast has quit [Ping timeout: 260 seconds]
havenn has quit [Ping timeout: 255 seconds]
darthdeus has left #ruby ["Linkinus - http://linkinus.com"]
rakm has quit [Ping timeout: 248 seconds]
Coolhand has quit [Read error: Connection reset by peer]
cascalheira has quit [Quit: Linkinus - http://linkinus.com]
Coolhand has joined #ruby
jds has joined #ruby
joeycarmello has joined #ruby
whowantstolivefo has joined #ruby
rakm has joined #ruby
elsifaka has joined #ruby
gyre007 has joined #ruby
dawkirst has joined #ruby
shemerey has quit [Quit: Linkinus - http://linkinus.com]
love_color_text has quit [Remote host closed the connection]
elsifaka has quit [Quit: Veloma e!]
akl_ has joined #ruby
dawkirst has left #ruby [#ruby]
dawkirst has joined #ruby
vlad_starkov has quit [Remote host closed the connection]
mengu has joined #ruby
cdt has joined #ruby
guns has joined #ruby
yshh has quit [Remote host closed the connection]
mjolk has joined #ruby
pcarrier has joined #ruby
mjolk is now known as Guest59052
blacktulip has joined #ruby
kloeri_ is now known as kloeri
robbyoconnor has quit [Ping timeout: 255 seconds]
r0bby has joined #ruby
r0bby is now known as robbyoconnor
Fox_candy has joined #ruby
lkba has quit [Quit: Bye]
mrdtt has quit [Ping timeout: 252 seconds]
hamfz__ has quit [Ping timeout: 248 seconds]
lateau` has joined #ruby
jlast has joined #ruby
h4mz1d has quit [Ping timeout: 248 seconds]
lateau` has quit [Read error: Connection reset by peer]
havenn has joined #ruby
AlbireoX has quit [Remote host closed the connection]
guns has quit [Quit: guns]
lolcathost has joined #ruby
AlbireoX has joined #ruby
Takehiro has joined #ruby
Guest59052 has quit [Quit: This computer has gone to sleep]
lateau has joined #ruby
browndawg has quit [Ping timeout: 248 seconds]
lateau has quit [Read error: Connection reset by peer]
browndawg has joined #ruby
lateau has joined #ruby
methoddk has joined #ruby
AlbireoX has quit [Ping timeout: 240 seconds]
krz has quit [Quit: krz]
ehlu has quit [Quit: WeeChat 0.3.8]
ehlu has joined #ruby
Solnse2 has joined #ruby
Solnse has quit [Ping timeout: 264 seconds]
mailo has joined #ruby
ehlu has quit [Client Quit]
ehlu has joined #ruby
havenn has quit [Ping timeout: 265 seconds]
pwelch has joined #ruby
pwelch has quit [Client Quit]
jlast has quit [Ping timeout: 264 seconds]
norc has joined #ruby
<norc> Are there any sleek lightweight markup languages like haml/slim but where whitespace is not relevant?
alexspeller has joined #ruby
browndawg has quit [Read error: Connection reset by peer]
Fox_candy has quit [Read error: Connection reset by peer]
<norc> Other than erb ;)
<norc> (which really isnt a markup language anyway)
tanathos has joined #ruby
tanathos has left #ruby [#ruby]
vlad_starkov has joined #ruby
peter_paule has joined #ruby
peter_paule has quit [Client Quit]
Driscoll has joined #ruby
fyolnish has quit [Remote host closed the connection]
lateau has quit [Ping timeout: 248 seconds]
jonahR_ has joined #ruby
karasawa has quit [Ping timeout: 264 seconds]
karasawa has joined #ruby
jonahR has quit [Ping timeout: 255 seconds]
jonahR_ is now known as jonahR
dennis_ has joined #ruby
hotovson has quit [Remote host closed the connection]
Solnse2 has quit [Ping timeout: 248 seconds]
<Paradox> norc, markdown
<apeiros_> markdown is whitespace sensitive
lkba has joined #ruby
<Paradox> doh yeah it is
xandy is now known as xAndy
Kuifje has joined #ruby
cha1tanya has quit [Read error: Connection reset by peer]
jlast has joined #ruby
cha1tanya has joined #ruby
joeycarmello has quit [Ping timeout: 248 seconds]
browndawg has joined #ruby
ryez1 has joined #ruby
Takehiro has quit [Remote host closed the connection]
Spami has joined #ruby
Spami has quit [Changing host]
Spami has joined #ruby
emergion has joined #ruby
blaxter has joined #ruby
io_syl has quit [Quit: Computer has gone to sleep.]
Driscoll has quit [Ping timeout: 276 seconds]
wermel has joined #ruby
Astral_ has joined #ruby
jlast has quit [Ping timeout: 248 seconds]
Astralum has quit [Ping timeout: 264 seconds]
Virunga has joined #ruby
Xeago has joined #ruby
vlad_starkov has quit [Remote host closed the connection]
includex has joined #ruby
berserkr has quit [Ping timeout: 248 seconds]
koshii has joined #ruby
jds has quit [Remote host closed the connection]
subbyyy has joined #ruby
wallerdev has quit [Quit: wallerdev]
horofox has joined #ruby
kerozene has joined #ruby
jonahR has quit [Quit: jonahR]
joeycarmello has joined #ruby
wreckimnaked has quit [Read error: Operation timed out]
horofox has quit [Quit: horofox]
Takehiro has joined #ruby
dawkirst has quit [Read error: Connection reset by peer]
<kerozene> not sure if this problem is specific to compass so let me know if it's the wrong channel. basically, a gem I just installed can't be found: http://pastie.org/private/xlzfp99zv4btnswdsb8adq (compass-normalize)
<kerozene> any ideas?
dawkirst has joined #ruby
kn330 has joined #ruby
lateau has joined #ruby
Takehiro has quit [Ping timeout: 240 seconds]
sepp2k has joined #ruby
Yaku has quit []
jlast has joined #ruby
cha1tanya has quit [Ping timeout: 248 seconds]
hack has quit [Ping timeout: 248 seconds]
pen has joined #ruby
fyolnish has joined #ruby
larssmit has joined #ruby
pavilionXP has quit [Quit: Forget progress by proxy. Land on your own moon.]
pavilionXP has joined #ruby
matip_ has joined #ruby
<matip_> Hello guys
fyolnish has quit [Read error: Connection reset by peer]
fyolnish has joined #ruby
dpg has joined #ruby
larissa has joined #ruby
<dpg> how do I interpolate on multiline ruby blocks on a gsub? example: https://gist.github.com/4452052
<dpg> m just returns 'v'
ryanh has joined #ruby
mikecmpbll has joined #ruby
<clocKwize> anyone use prawn?
<clocKwize> I'm having massive amounts of trouble moving the table to the left!
<clocKwize> to the right*
<ccooke> dpg: your regex is broken
<clocKwize> i want 2 tables next to each other
<dpg> ccooke: thanks for pointing that out!
Squarepy has joined #ruby
<dpg> ccooke: It's 4am here, mind showing me where? :\
Squarepy has quit [Changing host]
Squarepy has joined #ruby
jds has joined #ruby
<ccooke> dpg: the square brackets. Your regex actually says "match any one character in the set '\~video src="(.+)"\~'
<dpg> oh god. you're right. hahahaah
<ccooke> dpg: hence t only returning a v
Takehiro has joined #ruby
<dpg> but now m is passing in the entire string, and not just the interpolate
<dpg> from the (.+)
<dpg> how do I use the interpolate \1 inside the block? am I missing something obvious?
<dpg> or how do I just pass the first interpolate into the block?
Squarepy has quit [Read error: Connection reset by peer]
<dpg> or do I have to perform another regexp on it?
<dpg> ccooke: thanks for your help. I'll figure this out I guess. :)
jlast has quit [Ping timeout: 260 seconds]
hack has joined #ruby
josemota has joined #ruby
berserkr has joined #ruby
mjolk has joined #ruby
mjolk is now known as Guest90672
eka has joined #ruby
josemota has quit [Client Quit]
statarb3 has joined #ruby
statarb3 has quit [Changing host]
statarb3 has joined #ruby
<ccooke> dpg:no problem :-)
jonahR has joined #ruby
Goles has joined #ruby
Squarepy has joined #ruby
<Hanmac> dpg you need $1 ?
<dpg> oh god. you're awesome.
<dpg> Hanmac: you win.
qb has joined #ruby
<dpg> ccooke: you win too!
<dpg> thanks a ton. :)
Squarepy has quit [Changing host]
Squarepy has joined #ruby
<dpg> Is there a particular reason ruby just doesn't use \1 again?
whitedawg has joined #ruby
<apeiros_> \1 is not a variable
<matip_> I have a few auto generated regexps like /a(.)c/ and /b(.)/ and a string like "abc". I want to get "b" but also "c". do you know any way to achieve that?
<apeiros_> would need new syntax for no good reason
<matip_> right now I'm doing (?:a(.)c|b(.)). but it don't work as I expect in some cases as the one mentioned above ^
<matip_> it doesn't work *
jwang has quit [Ping timeout: 248 seconds]
* apeiros_ really wants to setup a bot which smacks everybody who says "doesn't work"
jwang has joined #ruby
<bnagy> or regexp
<dpg> mtfk: /a[bc]/
<dpg> matip_: /a[bc]/
Guest90672 has quit [Ping timeout: 255 seconds]
<dpg> the brackets say "grab anything in here"
<matip_> dpg, it's autogenerated, I can't fusion it that easily
<matip_> apeiros_, it doesn't, try it ;)
jonahR has quit [Quit: jonahR]
<Squarepy> matip_, you don't try ;)
<apeiros_> bnagy: well, since rubys class is named Regexp, that's excusable IMO
<matip_> think about it like that: a = 'a(.)c'; b = 'b(.)'; str = 'abc'; ...
<apeiros_> matip_: "it doesn't work" is a horribly bad problem description and you should really do better than that.
billy_ran_away has quit [Ping timeout: 248 seconds]
<apeiros_> srsly
beneggett has quit [Ping timeout: 248 seconds]
SiegeX has quit [Ping timeout: 248 seconds]
segv- has joined #ruby
<matip_> doesn't work means, it doesn't match what I want to retrieve
<apeiros_> "it doesn't work" can mean about everything from "my computer explodes when I do it" to "I go blind by the output"
<bnagy> apeiros_: oh I just mean that about 95% of the people asking for regexp help are just doing it completely wrong in the first place
<apeiros_> matip_: no, "doesn't work" does NOT mean "it doesn't match"
dpg has left #ruby [#ruby]
<apeiros_> 1+"hi" doesn't work - oh you mean it doesn't match?
<apeiros_> bnagy: ah
<matip_> it's obvious what it means provided I put the regexp and the string being used
<apeiros_> matip_: NO it's not
beneggett has joined #ruby
<apeiros_> but hey, I can give you obvious help: you're doing it wrong
SiegeX has joined #ruby
yoshie902a has joined #ruby
<matip_> nice, I reached the same conclusion :P
<apeiros_> or: you should do it right
<apeiros_> of course it's obvious what "do it right" means in this context
<bnagy> matip_: requests for help should go I am doing X and I want to to do Y but it's doing Z instead
<apeiros_> so there's no need for me to elaborate.
Gooder has joined #ruby
billy_ran_away has joined #ruby
<matip_> bnagy, well, I already said I'm doing X, want to get Y but it's not working like that
mjolk2 has joined #ruby
Elhu has quit [Quit: Computer has gone to sleep.]
<bnagy> also, simplified regexp questions are almost always useless
<matip_> a = 'a(.)c'; b= 'b(.)'; str = 'abc'
<bnagy> but anyway, what's your input and what output do you want?
<matip_> I want "b" and "c" back
<matip_> my first try was to combine both regexps like that: /(?:a(.)c|b(.))/
<bnagy> those two expressions _will_ match 'b' and 'c'
<matip_> (I have more than two regexps and they don't always intersect)
<matip_> > "abc".scan /(?:a(.)c|b(.))/
<matip_> => [["b", nil]]
<bnagy> run them in sequence
<bnagy> signs your regexp is stupid - ? and |
Virunga has quit [Remote host closed the connection]
<matip_> sure, but if you run them in sequence you have another problem...
<bnagy> that it will work? I hate that problem
<bnagy> also that as it gets complex it is 95% likely to be faster? Sucks too.
stevechiagozie has joined #ruby
<matip_> /(.)bc/ /(.)b/ "abc"
<matip_> you don't want "a" twice
<apeiros_> s/you/I/
<bnagy> run uniq on the array then
<bnagy> Not. That. Hard.
fermion has joined #ruby
<bnagy> anyway I need to go do something useful like make dinner o/
<apeiros_> bnagy: bon apps
<banisterfiend> Mon_Ouie: what happens when the french attempt science fiction http://www.youtube.com/watch?v=dkYvYGR7Ys4
<matip_> ...it just won't work in the real case. I can show you more cases in which your solution sucks
<matip_> never mind..
jlast has joined #ruby
<apeiros_> don't worry, I stopped minding when I realized that your problem description won't go beyond "no work! y?!"
norc has quit [Read error: Connection reset by peer]
rasmusth_ has quit [Quit: leaving]
wreckimnaked has joined #ruby
hack is now known as harsh
harsh is now known as hack
joeycarmello has quit [Ping timeout: 255 seconds]
mikecmpbll has quit [Quit: Computer has gone to sleep.]
Takehiro has quit [Remote host closed the connection]
hack has quit [Quit: WeeChat 0.3.9.2]
nomenkun has joined #ruby
JonnieCache has joined #ruby
lolcathost has quit [Quit: brb gaize]
lolcathost has joined #ruby
eykosioux_ has joined #ruby
ryanh has quit [Quit: Computer has gone to sleep.]
jlast has quit [Ping timeout: 248 seconds]
Takehiro has joined #ruby
landho has quit [Read error: Connection reset by peer]
assurbanipal has quit [Read error: Connection reset by peer]
nomenkun has quit [Ping timeout: 260 seconds]
landho has joined #ruby
postmodern has quit [Quit: Leaving]
pavilionXP has quit [Ping timeout: 240 seconds]
dennis_ is now known as koderde
jslowe has joined #ruby
pavilionXP has joined #ruby
Xeago has quit [Remote host closed the connection]
Zai00 has joined #ruby
<kerozene> not sure if this problem is specific to compass so let me know if it's the wrong channel. basically, a gem I just installed can't be found: http://pastie.org/private/xlzfp99zv4btnswdsb8adq (compass-normalize) any ideas?
v0n has joined #ruby
Xeago has joined #ruby
<Hanmac> kerozene do you use bundler or something like that?
Virunga has joined #ruby
<kerozene> nope
samuel02 has joined #ruby
mmitchell has joined #ruby
felipe has joined #ruby
<kerozene> $ bundle / rbenv: bundle: command not found / The `bundle' command exists in these Ruby versions: / 1.9.2-p290
wereHams1er is now known as wereHamster
wereHamster has quit [Changing host]
wereHamster has joined #ruby
<Hanmac> keroszene you could try to ask in the sass channel #sass
<kerozene> good idea. thanks
ryez1 has left #ruby [#ruby]
mikecmpbll has joined #ruby
cha1tanya has joined #ruby
<waxjar> kerozene, are you using rubinius perhaps?
<kerozene> nope
joeycarmello has joined #ruby
alexander___ has joined #ruby
<waxjar> ah ok. i ran into the exact same error last night with rubinius, sadly i haven't been able to fix it
<kerozene> rats
<alexander___> Is there a specific data structure for storing ip addresses + ports (sth like InetSocketAddress in Java)?
whitedawg has quit [Quit: Leaving.]
Neomex has joined #ruby
Neomex has quit [Client Quit]
<alexander___> Well, I need to store the port number, too...
Neomex has joined #ruby
willob has joined #ruby
Neomex has quit [Client Quit]
Neomex has joined #ruby
Neomex has quit [Client Quit]
jlast has joined #ruby
<Hanmac> use an array [addr,port]
<waxjar> Struct.new :ip, :port
<samuel02> I'm constructing a graph and need two simple object to represent a vertex and an edge, I did this: https://gist.github.com/4452424 , but it turns out to not be a very smart structure due to cross referencing
<samuel02> what's a smarter way of doing it?
stevechiagozie has quit [Quit: Computer has gone to sleep.]
<alexander___> Ok, well that's not as elegant as in Java, but ok :(
yoshie902a has quit [Quit: yoshie902a]
Kuifje has quit [Read error: Connection reset by peer]
Kuifje has joined #ruby
<alexander___> good idea, I'll try it. Thanks
<JonnieCache> also the elegance of having a new class for every possible concept is debatable :)
<JonnieCache> STRUCTS ARE GREAT!
<JonnieCache> hashes and arrays are also great
Myconix has joined #ruby
<alexander___> Not as great as classes ;)
<waxjar> uri is really more for parsing URIs
otherj has joined #ruby
ffranz has joined #ruby
<waxjar> Structs are classes: IPAddress = Struct.new :ip, :port; x = IPAddress.new '1.1.1.1', 80; x.ip # => "1.1.1.1"
alinpandichi has joined #ruby
<alexander___> Yes, but arrays aren't...
<apeiros_> interestingly, structs aren't structs
<JonnieCache> classes have too much baggage
<JonnieCache> both literally and figuratively
DrCode has quit [Ping timeout: 276 seconds]
<JonnieCache> ie. they suck up more ram and theyre conceptually more complex
<waxjar> sssh. we're rubyists, that's not really something we care about :P
<alexander___> Well, from a Java developers point of view: class are GREAT!
cha1tanya has quit [Ping timeout: 248 seconds]
Gooder has quit [Remote host closed the connection]
hotovson has joined #ruby
<Hanmac> in ruby you could hide code in the singleton class of a singleton class of a regular object :P
Gooder has joined #ruby
<alexander___> Anyway, I think the concept of classes is overused, but it's still the most elgant way of writing code!
otherj has quit [Quit: otherj]
v0n has quit [Ping timeout: 246 seconds]
<cajone> guys why does irb> `date | cut -c 1-11` work but if I put it in an file it returns an empty string?
<Hanmac> overused in a sense that true, false and nil each gets its very own class? :D
x0F has quit [Disconnected by services]
x0F_ has joined #ruby
DrCode has joined #ruby
x0F_ is now known as x0F
<apeiros_> I don't think classes are overused in ruby. rather underused IMO.
<apeiros_> in java however… there's like 50 classes to deal with strings alone
browndawg has quit [Quit: Leaving.]
<csmrfx> javascript doesn't even have classes!
<apeiros_> it does
<apeiros_> well, it has prototypes
<csmrfx> no, javascript core does not have classes.
<alexander___> Which is in NO way elegant.
<apeiros_> as said, it has prototypes
<csmrfx> You can implement class-based-inheritance in javascript, though.
<apeiros_> and those are semantically very close to classes
jlast has quit [Ping timeout: 260 seconds]
<apeiros_> it already has inheritance
<csmrfx> Anyway, I was going to say, programming with literals instead of inheritance or protoypal makes javascript really enjoyable IMHO
<csmrfx> sometimes I try the same with ruby
<alexander___> That's true, but I think you can't comapre Ruby and Javascript....
<Hanmac> >> 100.times.inject(Object.new){|o,i| o.singleton_class}
<eval-in> Hanmac: Output: "" (http://eval.in/5940)
<Hanmac> >> p 100.times.inject(Object.new){|o,i| o.singleton_class}
<eval-in> Hanmac: Output: "#<Class:#<Class:#<Class:#<Class:#<Class:#<Class:#<Class:#<Class:#<Class:#<Class:#<Class:#<Class:#<Class:#<Class:#<Class:#<Class:#<Class:#<Class:#<Class:#<Class:#<Class:#<Class:#<Class:#<Class:#<Class:# ..." (http://eval.in/5941)
<csmrfx> but have yet to find the ruby-literal-mixin-pureness
<Hanmac> its Class: all the way down :D
billy_ran_away has quit [Ping timeout: 264 seconds]
<csmrfx> alexander___: you can compare, but basically I wanted to bring up literal style programming and mix-ins
<csmrfx> which is what JonnieCache perhaps would like to work with
<apeiros_> csmrfx: you can do {foo: ->{ …code… }, bar: "value"} in ruby too
<csmrfx> (not sure if it can be called "literal style programming", actually)
<apeiros_> but it suffers from the same deficiencies as in js too
<apeiros_> monkey-patch Hash and you can then even do: o.foo.()
alexander___ has quit [Quit: Page closed]
<csmrfx> apeiros_: you can't actually quite do that in javascript
Jackneill has joined #ruby
Jackneill has quit [Changing host]
Jackneill has joined #ruby
<apeiros_> o0
billy_ran_away has joined #ruby
<apeiros_> of course you can…
<csmrfx> although you can place function references as values in a hash
<apeiros_> o = {foo: function() { …code… }}; o.foo()
<csmrfx> same way as you could place a block as a value in ruby, yes
SeySayux has quit [Read error: Connection reset by peer]
Villadelfia has quit [Read error: Connection reset by peer]
<apeiros_> ruby equiv: o = {foo: ->{ …code… }}; o.foo.()
niklasb has joined #ruby
<apeiros_> that's the core principle of js…
<csmrfx> apeiros_: except you cant put ...code... there, only a function definition or reference in js
<apeiros_> not sure what you mean by that…
<csmrfx> anyway, I am nitpicking
<apeiros_> that's how it works everywhere…
<apeiros_> it's no different in ruby either…
<csmrfx> I mean code is arbitrary code sequence. Not same as being forced to have a function definition.
Zai00 has quit [Quit: Zai00]
<csmrfx> semantics schmemantics, I know
<apeiros_> you mean, like: {foo: (1+1)} ? that works fine
<csmrfx> umm, well if it can be evaled on the spot
pen has quit [Remote host closed the connection]
Villadelfia has joined #ruby
<apeiros_> ok, I've no idea what you're talking about
<csmrfx> Essentially I am saying that you can only have one type of "code" as a object property in js
lewis1711 has joined #ruby
<csmrfx> and same goes (a little less) for ruby
<apeiros_> as opposed to?
<lewis1711> so using the "method", one can do something like "f = method :method_name; f.call". however, how would I do it for a method that's a member of some module? say, Math.sqrt
<apeiros_> and what's "a type of code"?
<apeiros_> lewis1711: the same way
SeySayux has joined #ruby
krawchyk has joined #ruby
<csmrfx> apeiros_: as opposed to your example with "... code ..."
<apeiros_> Math.method(:sqrt).call(100)
<waxjar> lewis1711: Math.method :sqrt
pen has joined #ruby
<apeiros_> csmrfx: I still have no idea what you're talking about
<csmrfx> apeiros_: type of code is a function definition or reference for js, and a block or ref for ruby (I think)
<lewis1711> oh, I was doing "method :Math.sqrt"
<lewis1711> thanks
jaygen has joined #ruby
Astral_ has quit [Ping timeout: 255 seconds]
<apeiros_> csmrfx: you're aware that a function definition in javascript returns a reference to the defined function? it's always a reference in the object.
<csmrfx> apeiros_: Ok, let me put it in simpler way: "No, you cant, apeiros, your examples are incorrect and will cause Syntac Error"
<apeiros_> the concept of variables vs. objects is the same in ruby & js
tommyvyo has joined #ruby
<apeiros_> csmrfx: BS
<csmrfx> apeiros_: I am aware, that is why you can use *either* definition or ref in js
jaygen has quit [Read error: Operation timed out]
<apeiros_> my examples work just fine here. no idea what you do wrong.
<csmrfx> apeiros_: ok, show me an js *or* ruby example where a object or hash value (respectively) is arbitrary code instead of function def/ref or block (respectively)
<csmrfx> apeiros_: if you have no idea, you need to do more homework
<apeiros_> again, wtf are you talking about?
<apeiros_> what should that arbitrary code be?
<csmrfx> saying, what you are saying is incorrect
<csmrfx> stop saying that
<apeiros_> as said, x = {foo: 1+1} # works, arbitrary code, no function ref
<csmrfx> ie:
lateau has quit [Ping timeout: 255 seconds]
<apeiros_> also, x = {foo: function() {}} # works, references a function
<csmrfx> >> { foo: { p "bar" } }
<eval-in> csmrfx: Output: "/tmp/execpad-c4cb9c8de628/source-c4cb9c8de628:1: syntax error, unexpected tSTRING_BEG, expecting keyword_do or '{' or '('\n{ foo: { p \"bar\" } }\n ^\n/tmp/execpad-c4cb9c8de628/source-c4cb9c8de628:1: syntax error, unexpected '}', expecting $end\n{ foo: { p \"bar\" } }\n ^\n" (http://eval.in/5946)
willob has quit [Quit: Leaving.]
<csmrfx> whoops
<apeiros_> csmrfx: maybe you do your homework and give a proper explanation?
kn330 has quit [Remote host closed the connection]
<csmrfx> same with js: >> oo = { foo: { alert("bar") }} => SyntaxError: missing : after property id
invisime has joined #ruby
lewis1711 has left #ruby [#ruby]
pskosinski has joined #ruby
<apeiros_> ok, you obviously have no clue about syntax
<csmrfx> apeiros_: Well I was just pointing an incorrectness in your example, thats all.
<apeiros_> oo = {foo: alert} # works
<banisterfiend> csmrfx: are you really making an argument based on syntax?
akl_ has quit [Ping timeout: 248 seconds]
<csmrfx> sure
<apeiros_> oo = {foo: function() { alert("bar") } # works
<csmrfx> like I said
<apeiros_> oo = {foo: alert("bar")} # works
<csmrfx> you can use a function def or ref
<apeiros_> of course, if you use broken syntax, it can't work…
<csmrfx> but you cant just slap in a object with some code, like in your pseudocode
enroxorz-work has joined #ruby
<apeiros_> {alert()} is not valid, no matter what, since {} starts an object literal and requires key:value, but you don't provide key/value
<apeiros_> csmrfx: yes, you can. if you don't fail at syntax 101
<csmrfx> sure, alert would put the ref to alert -function as value, alert() the return value
<csmrfx> like I said
<waxjar> { foo: { p "bar" } } fails because { p "bar" } isn't a valid Hash.
<csmrfx> but not some "... code ..."
<apeiros_> csmrfx: I think you're confused.
<csmrfx> *only* functions
<csmrfx> now, I said all I need to say
<csmrfx> back to rubyland.
<chiel> thank god
yoshie902a has joined #ruby
<csmrfx> waxjar: yes, it fails, even if apeiros claimed it would work earlier
akl_ has joined #ruby
<waxjar> he didn't
<waxjar> >> >> { foo: ->{ p "bar" } }
<eval-in> waxjar: Output: "/tmp/execpad-5a8c5e5f23dc/source-5a8c5e5f23dc:1: syntax error, unexpected tRSHFT\n>> { foo: ->{ p \"bar\" } }\n ^\n" (http://eval.in/5947)
<apeiros_> csmrfx: learn to read.
geekbri has joined #ruby
<waxjar> >> { foo: ->{ p "bar" } }
<eval-in> waxjar: Output: "" (http://eval.in/5948)
<waxjar> i mean
<waxjar> there's a -> before the { }
<csmrfx> In fact what he said:
<csmrfx> you can do {foo: ->{ …code… }, bar: "value"}
<csmrfx> in ruby too
<csmrfx> (when you cant do that in either, not even with the corrected syntax)
<waxjar> yes. notice the ->, which means a lambda is being created
<apeiros_> mhm, and that works. *obviously* you have to replace "…code…" with actual code.
<csmrfx> apeiros_: no
<waxjar> lmao. start up irb and try for yourself
<apeiros_> "no" as in "no, I know better what you meant to say than you yourself"?
<csmrfx> you need to replace that with a function def/ref or a blockm any other kind of code wont work.
<apeiros_> or "no" as in "no, even then not"?
<apeiros_> no, you don't
Xeago has quit [Remote host closed the connection]
<apeiros_> >> p({foo: ->{ 1+1 }})
<eval-in> apeiros_: Output: "{:foo=>#<Proc:0x8962244@/tmp/execpad-461792a0ceb1/source-461792a0ceb1:1 (lambda)>}\n" (http://eval.in/5949)
benlieb has joined #ruby
<csmrfx> Well, the typo and mistake has been handled enough now afaics
<apeiros_> no function def.
<chiel> this conversation kinda reminds of this: http://xkcd.com/386/
<apeiros_> >> oo = {foo: ->{ 1+1 }}; p oo.foo.()
<eval-in> apeiros_: Output: "/tmp/execpad-dfc74b0c9351/source-dfc74b0c9351:1:in `<main>': undefined method `foo' for #<Hash:0x9c70160> (NoMethodError)\n" (http://eval.in/5950)
ThaDick has joined #ruby
<apeiros_> >> oo = {foo: ->{ 1+1 }}; p oo[:foo].()
<eval-in> apeiros_: Output: "2\n" (http://eval.in/5951)
<apeiros_> (right, that one was the thing about "monkey patch Hash")
<csmrfx> ok, fair enough, block *or* lambda
Pip has joined #ruby
<csmrfx> (wont work in js, though)
<Pip> What does puts 20 means?
alinpandichi has left #ruby [#ruby]
<apeiros_> csmrfx: learn js. works perfectly there.
<csmrfx> Pip: output "20"
chimkan__ has joined #ruby
yshh has joined #ruby
<csmrfx> apeiros_: now I am wondering if you are trolling. Output from ff console: >>> {foo: ->{ …code… }, bar: "value"}
<Pip> cschneid, So it converts 20 into "20" before it gets printed out?
<csmrfx> apeiros_: X SyntaxError: syntax error
<apeiros_> csmrfx: are you stupid or something?
<waxjar> lol
<apeiros_> *of course* you have to replace …code… with actual code…
<apeiros_> sorry dude, but…
<apeiros_> oh, you inserted the ruby code in js?
<csmrfx> apeiros_: which one of us keeps making claims about some snipepts that would supposedly work in js and ruby when you can easily tell they do not.
<apeiros_> lmao even more so…
<ThaDick> Pip: puts outputs whatever value to stdout
xemu has joined #ruby
<apeiros_> csmrfx: dude, LEARN. TO. READ.
<csmrfx> Just going by what you wrote, man.
<csmrfx> No need to shout.
<ThaDick> Pip: puts "foo" outputs foo, puts "bar" outputs bar
<Pip> ThaDick, That's not what I asked
<waxjar> pip, it calls to_s on any object it's passed
<apeiros_> 14:25 apeiros_: o = {foo: function() { …code… }}; o.foo()
<apeiros_> 14:26 apeiros_: ruby equiv: o = {foo: ->{ …code… }}; o.foo.()
<apeiros_> csmrfx: that's what I wrote. now read. closely.
chimkan_ has quit [Ping timeout: 256 seconds]
<apeiros_> and again, for the really really slow dudes like you, "…code…" is placeholder for actual code, like "1+1" in ruby or "return 1+1" in js
* Hanmac sings: "and for the best advice, you shoudl read it twice"
<apeiros_> Hanmac: I think csmrfx should read it even thrice
iamjarvo has joined #ruby
samphippen has joined #ruby
<csmrfx> apeiros_: calling me slow, after you claimed javascript has classes and whatnot?
<waxjar> you might want to repeat your the Hash monkey-patch thing, too :P
<csmrfx> lol
<waxjar> *no your
<apeiros_> csmrfx: again, learn to read, I claimed js has prototypes, which are semantically close to classes
<csmrfx> want me to copypaste??
<apeiros_> I have a backlog myself just fine…
dhruvasagar has quit [Ping timeout: 252 seconds]
jlast has joined #ruby
<apeiros_> 14:20 apeiros_: it does
<apeiros_> 14:20 apeiros_: well, it has prototypes
<csmrfx> prototypes are really not close to classes, imho
<csmrfx> 15:23 <@apeiros_> csmrfx: you can do {foo: ->{ …code… }, bar: "value"} in ruby too
<csmrfx> oops
<Hanmac> haha you fooled yourself
<csmrfx> ok, this has been a real treat, I will now go elsewhere to try to regain the 5 IQ points I've lost during ths discussion.
<apeiros_> csmrfx: they provide similar mechanics for both inheritance and method lookup chains as classes do. but yes, they work in a different manner.
<Pip> Does "" work for string ?
<apeiros_> Pip: yes
<apeiros_> "".class # => String
ananthakumaran has quit [Quit: Leaving.]
<csmrfx> apeiros_: you are going to be really disappointed if you expect similarity between prototypal and class based inheritance
Xeago has joined #ruby
<apeiros_> csmrfx: you mean, after claiming nothing but BS, you're finally giving up? :-p
<yoshie902a> For anyone able to help, please offer some advice on how to deal with nesting. or getting my yaml to convert to a clean hash. thanks! http://stackoverflow.com/questions/14157534/meta-programming-to-convert-to-hash
<apeiros_> csmrfx: oh, don't worry, I use js extensively
<Hanmac> Pip "" is used when you have special chars inside like "\r\n", '' is used when you have no special chars
hack has joined #ruby
<apeiros_> and while I have my quarries with the way js works, I'm fine with its prototypal OO.
<csmrfx> I do too, and I hate prototypal, thats why I use literal style.
<yoshie902a> apeiros_: thanks for the help yesterday. still struggling, but much farther because of your help!
<Pip> Hanmac, Is that a rule or convention?
<apeiros_> yoshie902a: ah, yeah, I've seen your follow up question today… gimme a minute (scrollback)
aquaranto has quit [Ping timeout: 260 seconds]
Xeago has quit [Remote host closed the connection]
<apeiros_> yoshie902a: ah right, in your raw data, the newlines are somehow missing…
<Hanmac> Pip hm yes, because '' strings are a little bit faster than "" strings
a_a_g has quit [Quit: Leaving.]
<banisterfiend> Hanmac: i read somewhere that that wasn't true
<Pip> Hanmac, How do you know that?
<apeiros_> Hanmac: only at interpretation time, and only academically there too
<yoshie902a> apeiros_: oops, I have a version with newlines. let me fix that. sorry
<Pip> Since when "" started to work for sting also?
<Hanmac> banisterfiend: it depends on the string size ... '' strings under 23 chars are different than "" strings with 24 chars
nwertman has quit [Read error: Operation timed out]
<Hanmac> apeiros_ yes i currently only mean interpret time
pavilionXP has quit [Ping timeout: 260 seconds]
<banisterfiend> Hanmac: do u have benchmarks
nwertman has joined #ruby
<Pip> How does gets.chomp work?
<yoshie902a> apeiros_: good catch on the post. thanks. However, when I ran my actual code it was based on the line breaks
willob has joined #ruby
<Hanmac> banisterfiend currnetly not there
<csmrfx> Pip do you know how to use "ri"?
<csmrfx> Pip: for example: $ ri chomp
aquaranto has joined #ruby
<csmrfx> ;)
<Pip> pip@XPS-Pip ~ % ri chomp
<Pip> Nothing known about .chomp
cdt has quit [Quit: Ex-Chat]
<yoshie902a> apeiros_: post updated
cdt has joined #ruby
<apeiros_> relink please
<csmrfx> Pip: try $ ri Kernel.chomp
<csmrfx> Pip: or ri String.chomp
Vert has quit [Ping timeout: 252 seconds]
jds has quit [Remote host closed the connection]
lolcathost has quit [Quit: When I come back, please tell me in what new ways you have decided to be completely wrong.]
<waxjar> you can find the full documentation here pip: http://www.ruby-doc.org/core-1.9.3/
Playground has joined #ruby
<Pip> csmrfx, Maybe I haven't installed the ruby doc yet
Playground is now known as lolcathost
<Pip> But I'm not gonna install it which is too big
benlieb has quit [Quit: benlieb]
<csmrfx> ya
yfeldblum has quit [Ping timeout: 248 seconds]
jds has joined #ruby
chimkan__ has quit [Quit: chimkan__]
joofsh has joined #ruby
<apeiros_> yoshie902a: that loads fine for me
subbyyy has quit [Read error: Connection reset by peer]
<apeiros_> yoshie902a: http://pastie.org/5621166
lkba has quit [Ping timeout: 264 seconds]
jlast has quit [Ping timeout: 248 seconds]
<apeiros_> you don't want to interface with psych directly. you want YAML.load
<yoshie902a> apeiros_: got it thanks for all the help!
<yoshie902a> YAML.load(d.gsub(/^\t+/) { |m| ' '*m.length }) saved the day!
Zai00 has joined #ruby
<Hanmac> its interesting that the YAML.load method is not documented
joeycarmello has quit [Ping timeout: 246 seconds]
<apeiros_> wth? it seems YAML is barely documented…
<apeiros_> that has been different
subbyyy has joined #ruby
jerius has joined #ruby
<Hanmac> YAML itself yes, but not the yaml module in ruby
<apeiros_> probably some issue with the way it works now (Syck/Psych), so rdoc has difficulties picking up the docs
arturaz has quit [Ping timeout: 240 seconds]
ExxKA has joined #ruby
<apeiros_> Hanmac: `ri YAML`, YAML::load and ::load_file all are empty or almost empty
sayan has quit [Read error: Connection reset by peer]
<apeiros_> aha, you're supposed to use Psych::load etc. on doc-lookup
charliesome has quit [Quit: Textual IRC Client: www.textualapp.com]
chimkan_ has joined #ruby
Banistergalaxy has quit [Ping timeout: 255 seconds]
jjbohn has joined #ruby
<Pip> Do you guys use irb usually?
<yoshie902a> Pip: I used irb all the time for testing
mpereira has joined #ruby
yoshie902a has left #ruby [#ruby]
<csmrfx> a lot of irb
<Pip> yosafbridge, Do you use it with coloring representation?
Banistergalaxy has joined #ruby
lusory has joined #ruby
BRMatt has joined #ruby
dawkirst_ has joined #ruby
djdb has quit [Quit: Ухожу я от вас (xchat 2.4.5 или старше)]
maxmanders has quit [Remote host closed the connection]
Elhu has joined #ruby
kalusn has joined #ruby
kalusn has quit [Client Quit]
kalusn has joined #ruby
xcvd`` has joined #ruby
dawkirst_ has quit [Client Quit]
maxmanders has joined #ruby
<Pip> :S
SeanLazer has joined #ruby
ananthakumaran has joined #ruby
jaywastaken has joined #ruby
jaywastaken has quit [Changing host]
jaywastaken has joined #ruby
fyolnish has quit [Remote host closed the connection]
jslowe has quit [Ping timeout: 252 seconds]
yfeldblum has joined #ruby
elico has quit [Ping timeout: 260 seconds]
phantasm66 has joined #ruby
sailias has joined #ruby
elico has joined #ruby
jeffreybaird has joined #ruby
elsifaka has joined #ruby
mikecmpbll has quit [Quit: Computer has gone to sleep.]
yshh has quit [Remote host closed the connection]
<nmeum> Pip: I prefer pry :p
Gooder has quit [Ping timeout: 256 seconds]
<tommyvyo> I'm writing a gem which is an API client, I'd like the object model methods to be similiar to ActiveRecord… I'm doing good I think, so far, but a problem I'm running into is the each object needs to know about the API client object
<Pip> nmeum, which package has it?
<tommyvyo> Does anyone have any ideas or patterns I might look into so that I don't have to pass a client object each time i initialize an object?
deadlytoah has joined #ruby
koshii_ has joined #ruby
ExxKA has quit [Quit: This computer has gone to sleep]
akl_ has quit [Read error: Connection reset by peer]
skaczor has joined #ruby
akl_ has joined #ruby
straind has quit [Read error: Connection reset by peer]
<Squarepy> tommyvyo, make it a class attribute?
straind` has joined #ruby
jtharris has joined #ruby
<tommyvyo> hmmmmm
x0F has quit [Disconnected by services]
x0F_ has joined #ruby
x0F_ is now known as x0F
marr has quit [Ping timeout: 252 seconds]
ortuna has joined #ruby
<tommyvyo> so make like a global variable, API_KEY and API_URL, and then have the class attribute always just initialize a new client with those variables?
<Pip> nmeum, with color support?
jds has quit [Remote host closed the connection]
ortuna has quit [Client Quit]
koshii has quit [Ping timeout: 256 seconds]
jds has joined #ruby
<banisterfiend> tommyvyo: those aren't global variables, those are constants :)
pavilionXP has joined #ruby
jlast has joined #ruby
whowantstolivefo has quit [Ping timeout: 248 seconds]
<tommyvyo> dawww
* tommyvyo newb
<Pip> WARNING: You don't have /home/pip/.gem/ruby/1.9.1/bin in your PATH,
<Pip> gem executables will not run.
jjbohn has quit [Read error: Connection reset by peer]
jjbohn_ has joined #ruby
alexspeller has quit [Remote host closed the connection]
joeycarmello has joined #ruby
fyolnish has joined #ruby
infinitiguy has joined #ruby
pavilionXP has quit [Ping timeout: 255 seconds]
alexspeller has joined #ruby
<shevy> Pip odd path
<shevy> you manage all your gems in your home dir?
<Pip> shevy, I don't know
<Pip> shevy, it's the first time I install a gem
<shevy> I myself install all gems into ruby's sitedir
eykosioux_ has quit [Quit: eykosioux_]
<shevy> for instance, /usr/lib/ruby/gems/1.9.1/
matip__ has joined #ruby
<Pip> shevy, How did you install your ruby ?
<Pip> I see
mikecmpbll has joined #ruby
<Pip> the gemrc must say something about it
<shevy> I compile from source into /usr prefix usually (though, actually, I compile into standalone versioned directories, then either symlink to /usr or copy it, but for all technical reasons, the prefix I prefer is /usr)
wreckimnaked has quit [Read error: Operation timed out]
<Pip> shevy, What does your gemrc say?
dweeb has joined #ruby
matip__ has left #ruby [#ruby]
<shevy> admittedly I dont have one as I dont need one :\
<Pip> shevy, You do
<shevy> do you have a variable like GEM_HOME or GEM_PATH ?
spleeze has joined #ruby
<Pip> no
<shevy> nope, I dont, there is no gemrc nor .gemrc on my computer
<shevy> hmm let's see for GEM_HOME
<shevy> ah yes
<shevy> "GEM_HOME is an environment variable that tells RubyGems where to find or install gems from."
<shevy> what does "gem env" give you?
atmosx has joined #ruby
<shevy> "GEM_PATH provides the locations (there may be several) where gems can be found."
<shevy> "GEM_HOME is where gems will be installed (by default)."
matip_ has quit [Ping timeout: 252 seconds]
<shevy> hmm you could try to set these variables, they might make a difference
<atmosx> and when these two are different
<atmosx> weird things happen!
<shevy> and for $PATH variable, you could simply append /home/pip/.gem/ruby/1.9.1/bin to it
<shevy> atmosx hehe
<Pip> Why 1.9.1?
solidoodlesuppor has joined #ruby
Hanmac has quit [Quit: Page closed]
<Pip> We are using 1.9.3 ruby now
<shevy> Pip no, that is the C API version, not ruby version
ortuna has joined #ruby
<Pip> oh
emocakes has joined #ruby
<shevy> ruby 1.9.3 will have 1.9.1 as site dir
<shevy> I do not know how you installed your ruby
<shevy> I myself will never need a ~/.gem directory
<atmosx> yeah I never understood that
<atmosx> why 1.9.1 is used in x.x.3
<shevy> hehe
<shevy> yeah
<shevy> why 1.9.1 for instance
<shevy> why not 1.9
<Pip> shevy, I installed it from my package manager
amaya_the has joined #ruby
<shevy> debian package manager usually delivers a crippled ruby
<shevy> mkmf for example is not in it by default
<nmeum> Pip: just run sudo gem install <gem>
ryannielson has joined #ruby
<Pip> nmeum, that will install to /root/.gem
<Pip> I have --user-install in gemrc file
<nmeum> no, It shouldn't install gems to /root/.gem
ltsstar has joined #ruby
<Pip> nmeum, read what I said
<nmeum> well run sudo gem install --no-user-install <gem> :p
<Pip> okay
<csmrfx> shevy: it is not the ruby that is crippled
landho has quit [Read error: Connection reset by peer]
<shevy> csmrfx, why not? a from source compilation of ruby provides you with mkmf
<csmrfx> Debian relies on apt-get 100%. With that philosophy, even ruby gems should be installed from apt-get. This is an ongoing conflict. Solution: if all the gems you need are in debian repos and can be apt-getted, use debian ruby.
landho has joined #ruby
v0n has joined #ruby
jlast has quit [Ping timeout: 260 seconds]
<csmrfx> Otherwise, compile your own ruby even on debian.
<chiel> debian's ruby is horrible
<csmrfx> again, there is nothing wrong with the debian version of ruby
<csmrfx> The problem is with *rubygems*
<shevy> mkmf is not part of rubygems
<csmrfx> mmkay
<csmrfx> shevy: tell me, do you need mkmf with plain ruby?
<shevy> csmrfx yes
<JonnieCache> god state machines are the best thing ever
<csmrfx> shevy: with plain vanilla ruby without rubygems?
<JonnieCache> if you are a programmer and you arent using state machines all the damn time then stop what youre doing and go and look them up
<shevy> csmrfx yes
jrist-afk is now known as jrist
wreckimnaked has joined #ruby
<JonnieCache> all the shitty old projects i have to fix are shit because they arent state machines
<apeiros_> apt's ruby was at times ~3y behind
<JonnieCache> (or rather because theyre crappy half implemented state machines made by people who are doing it without realising it)
<apeiros_> so yes, there was something wrong with apt's ruby. maybe they're now more up to date.
<csmrfx> shevy: really? what do you need mkmf for if you only use vanilla ruby?
<shevy> csmrfx every time I install a ruby addon that I want to, if it requires mkmf
jlast has joined #ruby
<csmrfx> apeiros_: well debian squeeze comes with 1.9.3
can0n has joined #ruby
<csmrfx> shevy: duh, "plain vanilla ruby" !== ruby + addon or gems
<chiel> JonnieCache: there's too much written about state machines to know what to look at :p
jslowe has joined #ruby
<Pip> I don't have gempath or GEM_HOME set, is that normal?
iamjarvo has quit [Quit: Leaving.]
<shevy> csmrfx no wonder debian hates gems ;)
tommyvyo has quit [Quit: Textual IRC Client: http://www.textualapp.com/]
dmerrick has joined #ruby
<csmrfx> No.
<shevy> people could... I don't know... want to install things on their own
<csmrfx> Debian does not "hate gems" or "suck".
noodlefu has left #ruby [#ruby]
<chiel> i sure as hell compiled my own ruby on debian xD
<csmrfx> Debian simply uses apt-get for packaging *everything*
solidoodlesuppor has quit [Quit: ChatZilla 0.9.89 [Firefox 17.0.1/20121128204232]]
<csmrfx> If you want to install sources from debian repos, that is quite possible with apt, too.
<shevy> csmrfx multiple versions?
<csmrfx> Understand that rubygems and apt-get *do the same thing*
<atmosx> there must like 15 web frameworks for ruby
<csmrfx> shevy: even multiple versions
<banisterfiend> JonnieCache: you mean via the state_machine gem?
<shevy> atmosx, yeah but I think there is a big gap between their qualities
<atmosx> shevy: well, sometimes it's hard to see
<atmosx> I mean, I don't think that everyone can really evaluate all of them
<shevy> there is rails, then there is a big gap... then probably comes sinatra, ramaze... camping being somewhere lower on that list
<atmosx> I'm playing with sinatra but I could have done my app using camping.io easily
<csmrfx> Who knows, maybe in near future debian apt-gotten rubygems can actually mix and match apt-getted gems and gem installed gems without explosions
can0n has quit [Quit: Leaving]
<atmosx> and the code would not be considerably smaller
<atmosx> anyway
tommyvyo has joined #ruby
<shevy> atmosx, yeah, one would have to cherry pick the useful things
<atmosx> Any ideas on the *easiest way* to a very BASIC auth method for script clients that connect to http server?
<csmrfx> Finally, I use rvm for ruby on debian dev machines.
<atmosx> actually to thin (rack) server
<csmrfx> does it support .htaccess?
<atmosx> csmrfx: I use rvm everywhere can't imagine life without it
<atmosx> rvm + vim = Ruby (love)
doodlehaus has joined #ruby
daniel_- has joined #ruby
Jackneill has quit [Read error: Connection reset by peer]
<csmrfx> I do the apt-get ruby+rubygems on machines thatjust need to support the simple things that are already in the debian repos (it *is* much faster after all)
<shevy> csmrfx why do you use RVM?
Jackneill has joined #ruby
Jackneill has joined #ruby
Jackneill has quit [Changing host]
<csmrfx> shevy: I use it when I need in-developement gems or need to do stuff that hasn't hit the debian repos yet
xcvd`` has quit [Quit: Leaving]
can0n has joined #ruby
Liothen has quit [Remote host closed the connection]
subbyyy has quit [Quit: none 0.3.9.2]
subbyyy has joined #ruby
dbck has joined #ruby
breakingthings has joined #ruby
solidoodlesuppor has joined #ruby
kpshek has joined #ruby
haxrbyte has quit [Ping timeout: 265 seconds]
browndawg has joined #ruby
wreckimnaked has quit [Read error: Operation timed out]
vital101 has joined #ruby
ExxKA has joined #ruby
maxmanders has quit [Remote host closed the connection]
bguery has joined #ruby
<bguery> hi
adambeynon has joined #ruby
jonahR has joined #ruby
<bguery> I'm trying to change the port of unicorn in unicorn.rb, the file seems to be read correctly, but I still get the same error (adding listener failed addr=0.0.0.0:8080 (in use)) when I set listen 3001 in my config
<bguery> any ideas?
asteve has joined #ruby
philcrissman has joined #ruby
<apeiros_> bguery: lsof -i :3001
<apeiros_> tells you what already uses port 3001
sepp2k has quit [Quit: Leaving.]
<bguery> apeiros_, well, the problem is not the fact that the port 3001 is used or not (it is not) but why does my config is not used?
thatRD has joined #ruby
sepp2k has joined #ruby
<apeiros_> in that case, you didn't properly change the config
jgarvey has joined #ruby
<bguery> apeiros_, well maybe, but I don't see what could be wrong http://pastie.org/private/fts3dt4a8e2tslsw9g
<bguery> I just moved from listen 8080 to listen 3001
karasawa has quit [Ping timeout: 248 seconds]
wreckimnaked has joined #ruby
thone has joined #ruby
<apeiros_> looks fine. so the obvious things: a) did you save the changes? b) did you edit the correct file? c) do you really start a unicorn which uses that config?
<Pip> What's the difference between ri and rdoc?
bean has joined #ruby
<apeiros_> Pip: rdoc generates docs, ri reads docs
vital101 has left #ruby [#ruby]
stopbit has joined #ruby
joofsh has quit [Remote host closed the connection]
rondale_sc has joined #ruby
_nitti has joined #ruby
daniel_- has quit [Ping timeout: 255 seconds]
<Pip> apeiros_, what is ri documentation?
joofsh has joined #ruby
thone_ has quit [Ping timeout: 252 seconds]
<banisterfiend> anyone here used 0mq?
<apeiros_> Pip: ?
<Pip> --[no-]ri Generate RI documentation for the gem on
<Pip> install
jamescarr has joined #ruby
<apeiros_> ah, on gem install? --ri vs. --rdoc? good question, don't know.
<Pip> :D
<Pip> thanks
<apeiros_> you could ask drbrain over in #ruby-lang
kalusn has quit [Quit: kalusn]
<apeiros_> he maintains rubygems
maxmanders has joined #ruby
<csmrfx> Pip are you on debian?
<Pip> NobbZ, Arch
<csmrfx> ok, nm
benlieb has joined #ruby
lolcathost has quit [Quit: When I come back, please tell me in what new ways you have decided to be completely wrong.]
alexspeller has quit [Ping timeout: 252 seconds]
lolcathost has joined #ruby
atmosx has quit [Quit: And so the story goes…]
alexspeller has joined #ruby
horofox_ has joined #ruby
theRoUS has joined #ruby
xcvd`` has joined #ruby
m4n has quit [Ping timeout: 240 seconds]
jekotia has joined #ruby
jslowe has quit [Ping timeout: 246 seconds]
karl________ has joined #ruby
thatRD has quit [Quit: thatRD]
thatRD has joined #ruby
miskander has joined #ruby
<karl________> what is '~=' called?
haxrbyte has joined #ruby
tagrudev has quit [Remote host closed the connection]
haxrbyte has quit [Remote host closed the connection]
pavilionXP has joined #ruby
nwertman has quit [Ping timeout: 248 seconds]
haxrbyte has joined #ruby
<Mon_Ouie> A typo for =~ :p
pavilionXP has quit [Max SendQ exceeded]
elico has quit [Ping timeout: 240 seconds]
<karl________> Mon_Ouie: erps yup
<karl________> =~
yale has joined #ruby
<Mon_Ouie> I think I'd call it the pattern matching operator most of the time
yshh has joined #ruby
<Myconix> Yeah
pavilionXP has joined #ruby
joeycarmello has quit [Read error: Operation timed out]
reinaldob has joined #ruby
clocKwize has quit [Quit: clocKwize]
<Myconix> like "string" =~ /pattern/ would check to see if string had the word pattern in it
<karl________> know off the top of your head how to make it do any case?
<Myconix> .downcase
<karl________> ie foo, Foo, FoO
<karl________> ah
<Myconix> on the string
adrock has joined #ruby
<Myconix> like "sTrInG".downcase =~ /pattern/
solidresolve has quit [Remote host closed the connection]
<karl________> thx Myconix :)
<Myconix> Though, I don't think that =~ is case sensitive anyway
<Myconix> no problem
<adrock> When using RVM, why does one version of Ruby show up as [ruby-]1.9.3-p194
<adrock> and another version show up as [ruby-]1.9.3-[p327]
solidresolve has joined #ruby
<adrock> what the significance of the brackets?
<Myconix> dunno
kerozene has quit [Ping timeout: 245 seconds]
<Myconix> never worked with RVM so I can't say
<Mon_Ouie> /foo/i
yshh has quit [Ping timeout: 260 seconds]
<Mon_Ouie> It's not related to the method, it's related to regular expressions in general
<karl________> thx Mon_Ouie just found that myself
iamjarvo has joined #ruby
joshman_ has joined #ruby
emergion has quit [Quit: ["Textual IRC Client: www.textualapp.com"]]
elico has joined #ruby
cpruitt has joined #ruby
ffranz has quit [Ping timeout: 276 seconds]
swex has joined #ruby
swex_ has quit [Ping timeout: 255 seconds]
spleeze has quit [Quit: leaving]
jjbohn_ has quit [Quit: Leaving...]
r3x has joined #ruby
<TheEmpty_> Myconix, karl________ also "/pattern/i" is insensitive :)
r3x has left #ruby [#ruby]
<TheEmpty_> Oh, that was already mentioned :(
andrewhl has joined #ruby
<karl________> thanks TheEmpty_ :)
<Myconix> Thouyght so
<Myconix> *thought
<TheEmpty_> >> puts(("strING" =~ /ring/i))
<eval-in> TheEmpty_: Output: "2\n" (http://eval.in/5969)
elsifaka has quit [Quit: Veloma e!]
pavilionXP has quit [Ping timeout: 260 seconds]
yshh has joined #ruby
F1skr has joined #ruby
<Pip> the latest version of minitest is 4.x while the old version is 2.5 here, and rake-10.0.3 depends on [minitest (~> 2.1)], can I remove minitest ?
PragCypher has joined #ruby
marr has joined #ruby
ananthakumaran has quit [Read error: No route to host]
ewnd9 has quit [Ping timeout: 260 seconds]
Gooder has joined #ruby
bruticus has joined #ruby
ananthakumaran has joined #ruby
adrock has quit [Remote host closed the connection]
tk__ has joined #ruby
AndChat| has joined #ruby
cha1tanya has joined #ruby
cha1tanya has quit [Changing host]
cha1tanya has joined #ruby
larissa has quit [Quit: Leaving]
alex__c2022 has joined #ruby
eykosioux_ has joined #ruby
llaskin has joined #ruby
<llaskin> can I have an initialize method inside of a module?
<csmrfx> kinda
larssmit has quit [Quit: Leaving.]
<apeiros_> yes, question is whether it does what you expect it to
<apeiros_> @ llaskin
Banistergalaxy has quit [Ping timeout: 248 seconds]
<llaskin> note my comment on line 11/12
<llaskin> would want similar initialize in each module....
stevechiagozie has joined #ruby
<apeiros_> llaskin: an included module ends up in the class' ancestry
<reactormonk> TheEmpty_, so it doesn't care about my feelings? How harsh.
<apeiros_> so you'd have to call super in Navigation#initialize to reach e.g. Overview#initialize
rismoney has joined #ruby
joeycarmello has joined #ruby
<apeiros_> llaskin: IMO you're better off with an explicit initialization, e.g. Overview#initialize_overview, and call that from Navigation#initialize
Pip has quit [Remote host closed the connection]
<apeiros_> llaskin: also, $browser? globals? srsly?
<llaskin> apeiros_: for selenium, when using one browser to drive a huge test....its the only way to make sense of it.
benlieb has quit [Ping timeout: 248 seconds]
<llaskin> without passing the driver instance into each method.
<apeiros_> llaskin: no, it's not
fourq has joined #ruby
<apeiros_> k, your code, you have to deal with it
<apeiros_> in order to not having to pass stuff around is why we have objects
<TheEmpty_> reactormonk: what?
<apeiros_> they store state…
<reactormonk> any fucking reason ruby guys tend to choose cute names like 'homebrew'? Doesn't make it simpler to google -.-
nga4 has quit [Ping timeout: 248 seconds]
<csmrfx> reactormonk: yes, to piss you off
<banisterfiend> reactormonk: just add 'osx' to your search
<llaskin> so given a slightly modified gist of here: https://gist.github.com/4453659, my ideal goal is that if I call Navigation.new.bpool it would run the Manage#Initialize and if I called Navigation.new.analysis it would run Overview.initialize
<chiel> i think last time i googled for homebrew it was the first result... but google does mess with results i guess
<TheEmpty_> mongrel, thin, unicorn, etc.
yaroslav has joined #ruby
<llaskin> also add in gem
<apeiros_> chiel: yupp, it personalizes
<llaskin> homebrew ruby gem
<csmrfx> thin sometimes does give troubles
<reactormonk> banisterfiend, are there git packages for homebrew?
eldariof has joined #ruby
joeycarmello has quit [Ping timeout: 248 seconds]
<apeiros_> that'd be kinda funny
<csmrfx> nowadays *everything* should be named uniquely so you can find it on google, really. Maybe thin could be called ruthin
theRoUS has quit [Ping timeout: 276 seconds]
<apeiros_> since homebrew depends on git :)
<llaskin> apeiros_: any thoughts on my dilemma?
<apeiros_> llaskin: I don't see what your problem is
<llaskin> calling different initialize methods based on which module the method being called belongs to
<llaskin> "my ideal goal is that if I call Navigation.new.bpool it would run the Manage#Initialize and if I called Navigation.new.analysis it would run Overview.initialize"
<apeiros_> llaskin: you described what you want - just code it?
<reactormonk> apeiros_, oh, reasonable.
<TheEmpty_> I like giving my libraries bland names like, "Just Another Crappy Game Engine"
<llaskin> apeiros_: can you give a suggestion how to code that? I'm unsure.
<apeiros_> llaskin: why did you create those modules? do you really use them elsewhere?
x82_nicole has quit [Quit: Computer has gone to sleep.]
<llaskin> perhaps my organization is bad. how would you organize this? as I am pretty sure I've made clear before, I'm not the most skilled developer(though I hope I am learning)
x82_nicole has joined #ruby
<apeiros_> llaskin: that's not really an answer to my question…
Gooder has quit [Ping timeout: 240 seconds]
<llaskin> I do call them from test scripts(or at least plan to)
clocKwize has joined #ruby
clocKwize has quit [Client Quit]
<llaskin> figured it would be best to split Navigation into classes based on which "subtab" was being utilized....hence the different module names
<apeiros_> ok, I'll rephrase: do you include or extend those modules into anything else besides Navigation?
<llaskin> i include the Navigation class, but no, I don't include the modules themselves elsewhere.
<apeiros_> then drop the modules.
<apeiros_> put the code directly into Navigation
mrdtt has joined #ruby
<apeiros_> when you're done, show again and we can help you to refactor/improve the code
dsabanin has joined #ruby
<apeiros_> also, if I were you, I'd avoid abbreviations like 'bpool'
<llaskin> apeiros_: I do. this was more for just hiding exactly what a bpool is....
<apeiros_> to what avail? hide it from whom?
<llaskin> you.
<llaskin> and/or the rest of this chatroom/public.
<apeiros_> oh, you want help with your code but don't want to show your code - forget it.
miskander has quit [Quit: miskander]
<apeiros_> either you're prepared to show it all or I'm out by default.
landho has quit [Read error: Connection reset by peer]
joeycarmello has joined #ruby
<llaskin> ok the difference between saying "budget_pool" or "bpool" was the difference here
Pip has joined #ruby
<Squarepy> barf_pool
landho has joined #ruby
aganov has quit [Remote host closed the connection]
ThaDick has quit [Quit: zzzZZZ ...]
hack has quit [Quit: WeeChat 0.3.9.2]
pskosinski has quit [Quit: Learn Life's Little Lessons]
cirwin has joined #ruby
jjbohn has joined #ruby
<TheEmpty_> Don't lie, it's a Bachelor Pool
jaywastaken_ has joined #ruby
cha1tanya has quit [Quit: Leaving]
pskosinski has joined #ruby
miskander has joined #ruby
baroquebobcat has joined #ruby
jaywastaken has quit [Ping timeout: 240 seconds]
<apeiros_> TheEmpty_: bachelorette pool you mean?
<shevy> benis_pool
peregrine81 has joined #ruby
woolite64 has joined #ruby
dweeb has quit [Quit: Computer has gone to sleep.]
<TheEmpty_> No, see he's make a website called datearubiest
<TheEmpty_> There are no bachelorettes stored in a pool because there aren't that many there.
d2dchat has joined #ruby
sayan has joined #ruby
sayan has quit [Changing host]
sayan has joined #ruby
kalusn has joined #ruby
kalusn has quit [Client Quit]
bruticus has quit [Quit: bruticus]
io_syl has joined #ruby
<TheEmpty_> I thought it would be cool to see if that was a thing, http://imgur.com/I4KPa
Squarepy has quit [Quit: Leaving]
amaya_the has quit [Quit: ChatZilla 0.9.89 [Firefox 17.0.1/20121128204232]]
<breakingthings> TheEmpty_brb registering domain.
alex__c2022_ has joined #ruby
Jackneill has quit [Quit: Leaving]
alex__c2022 has quit [Ping timeout: 248 seconds]
alex__c2022_ is now known as alex__c2022
elaptics is now known as elaptics`away
main_ has joined #ruby
pavilionXP has joined #ruby
Jackneill has joined #ruby
Jackneill has quit [Changing host]
Jackneill has joined #ruby
<TheEmpty_> Haha, maybe I should do that and do something like http://t.co/xwixsGRf
<TheEmpty_> "If you want to be my girlfriend, please do not hesitate to get in touch."
<rismoney> i want a method that takes a hash of say 'name', and 'type' without defaults, but must use those key names of name,type
ericwood has quit [Quit: leaving]
ltsstar has quit [Quit: ltsstar]
ThaDick has joined #ruby
<TheEmpty_> name = options[:name] or raise "name parameter needed"
generalissimo has joined #ruby
<TheEmpty_> name = options.delete(:name) or raise "name parameter needed"
anykey__ has joined #ruby
fbernier has joined #ruby
xAndy is now known as xandy
anykey__ is now known as ericwood
jds has quit [Remote host closed the connection]
ffranz has joined #ruby
elaptics`away is now known as elaptics
<apeiros_> options.fetch(:foo) # raises on its own
<hoelzro> but the exception it raises won't likely explain the problem
theRoUS has joined #ruby
theRoUS has quit [Changing host]
theRoUS has joined #ruby
<apeiros_> options.delete(:foo) { raise … } # only raises if the key is really missing
<TheEmpty_> fetch will allow a nil or false value, mine won't
<TheEmpty_> so depends on use
<apeiros_> options.delete(:foo) or raise # raises if :foo is present but has a value of nil/false to
<apeiros_> *too
mikecmpbll has quit [Quit: ["Textual IRC Client: www.textualapp.com"]]
<apeiros_> yes, use case matters
horse has left #ruby [#ruby]
<apeiros_> maybe I misunderstood rismoney, though
iamjarvo has quit [Quit: Leaving.]
<TheEmpty_> I didn't know about fetch, would have responded with that otherwise
ChampS666 has joined #ruby
<apeiros_> it all depends on what precisely he wants
<apeiros_> allow nil/false?
<apeiros_> raise a custom exception?
<apeiros_> defaultize nil? defaultize nil/false? defaultize when not present?
a_a_g has joined #ruby
Dreamer3 has quit [Quit: Computer has gone to sleep.]
<TheEmpty_> he said no defaults, probably doesn't want nil or false, so yeah maybe my method
<apeiros_> "probably" :-p
<TheEmpty_> If you're requiring a name and type, I don't think nil or false are wanted
pskosinski has quit [Quit: Learn Life's Little Lessons]
* apeiros_ prefers on people elaborating their needs
<TheEmpty_> rismoney: WE DEMAND ANSWERS
<apeiros_> WE DO!
samphippen has quit [Quit: Computer has gone to sleep.]
alvaro_o has joined #ruby
ericjhedberg has joined #ruby
Spaceghostc2c has quit [Excess Flood]
<JonnieCache> TheEmpty_: that link is amazing
<JonnieCache> TheEmpty_: i imagine hes married by now
Spaceghostc2c has joined #ruby
miskander has quit [Quit: miskander]
<shevy> wtf
skryking has left #ruby ["Konversation terminated!"]
Takehiro has quit [Read error: Connection reset by peer]
Takehiro_ has joined #ruby
bruticus has joined #ruby
blazes816 has joined #ruby
hoelzro is now known as hoelzro|away
miskander has joined #ruby
nga4 has joined #ruby
lolcathost has quit [Ping timeout: 276 seconds]
nga4_ has joined #ruby
stkowski has joined #ruby
<TheEmpty_> OMG, I didn't know it had background music too XD
adeponte has joined #ruby
<JonnieCache> fortunately it didnt play for me
<JonnieCache> i think im muted. maybe i didnt wait long enough for it to download
<TheEmpty_> First time was on my macbook air where I have that stuff disabled. It's quicktime so you might need to authorize it too
jjbohn has quit [Quit: Leaving...]
infinitiguy has quit [Read error: Connection reset by peer]
infinitiguy has joined #ruby
JohnBat26 has joined #ruby
<TheEmpty_> My Facebook feed tells me Valentines is around the corner. Guess I'll have to take my GF to a nice resturant and dress up :( Well at least she doesn't eat much. And doesn't demand too much. That and she's my hand (or should I have gone with "she's built in ruby"?)
koshii_ has quit [Ping timeout: 248 seconds]
daniel_- has joined #ruby
lolcathost has joined #ruby
jjbohn has joined #ruby
peregrine81 has quit [Quit: Computer sleeping.]
cousine has joined #ruby
includex has quit [Quit: Leaving...]
ltsstar has joined #ruby
jaywastaken has joined #ruby
jaywastaken has joined #ruby
jaywastaken has quit [Changing host]
alexspeller has quit [Ping timeout: 252 seconds]
blaxter has quit [Quit: foo]
jaimef has joined #ruby
daniel_-_ has joined #ruby
alexspeller has joined #ruby
Neomex has joined #ruby
a_a_g1 has joined #ruby
Neomex has quit [Client Quit]
jaimef has quit [Client Quit]
jaywastaken_ has quit [Ping timeout: 276 seconds]
daniel_- has quit [Ping timeout: 246 seconds]
a_a_g has quit [Ping timeout: 256 seconds]
mpfundstein has quit [Ping timeout: 255 seconds]
SeanLazer has quit [Quit: SeanLazer]
geekbri has quit [Remote host closed the connection]
pskosinski has joined #ruby
jds has joined #ruby
polymar has quit [Remote host closed the connection]
joofsh has quit [Remote host closed the connection]
xandy is now known as xAndy
cirwin has quit [Quit: commut...ting!]
rakl has joined #ruby
koderde has quit [Quit: Leaving]
haxrbyte has quit [Read error: Connection reset by peer]
koderde has joined #ruby
alexander___ has joined #ruby
jaimef has joined #ruby
nwertman has joined #ruby
vikhyat has quit [Remote host closed the connection]
jaimef has quit [Client Quit]
banisterfiend has quit [Remote host closed the connection]
jaimef has joined #ruby
otters has joined #ruby
zeade has joined #ruby
gyre007 has quit [Read error: Connection reset by peer]
gyre007 has joined #ruby
yale has quit [Ping timeout: 260 seconds]
jaimef has quit [Client Quit]
t0rc has joined #ruby
gyre007 has quit [Read error: Connection reset by peer]
jaimef has joined #ruby
gyre007 has joined #ruby
ober has quit [Remote host closed the connection]
jaimef has quit [Client Quit]
ananthakumaran has quit [Quit: Leaving.]
gyre007 has quit [Read error: Connection reset by peer]
jaimef has joined #ruby
mailo has quit [Quit: Linkinus - http://linkinus.com]
jds has quit [Ping timeout: 255 seconds]
gyre007 has joined #ruby
mafolz has quit [Quit: mafolz]
vikhyat has joined #ruby
DrCode has quit [Write error: Connection reset by peer]
mrdtt has quit [Quit: mrdtt]
xAndy is now known as xAndy_
mattsgarrison has quit [Remote host closed the connection]
vikhyat has quit [Remote host closed the connection]
sailias has quit [Quit: Leaving.]
sterNiX has joined #ruby
sterNiX has quit [Changing host]
sterNiX has joined #ruby
jthomp has joined #ruby
xAndy_ is now known as xAndy
xAndy is now known as xAndy_
Spaceghostc2c has quit [Excess Flood]
atno is now known as Kindari
Kindari is now known as atno
jblack has joined #ruby
mockra has joined #ruby
sterNiX has quit [Max SendQ exceeded]
sterNiX has joined #ruby
Spaceghostc2c has joined #ruby
cousine has quit [Remote host closed the connection]
jaimef has quit [Quit: Emacs must have died]
jaimef has joined #ruby
sn0wb1rd has quit [Quit: sn0wb1rd]
asteve has quit [Quit: Computer has gone to sleep.]
jduan1981 has joined #ruby
jjbohn has quit [Quit: Leaving...]
mengu has quit [Quit: Konversation terminated!]
moos3 has joined #ruby
graft has joined #ruby
<graft> hey anyone know how to get tab-completion for files in irb?
<jaimef> use pry :P
<graft> sigh... yeah, i guess
gyre007 has quit [Read error: Connection reset by peer]
gyre007 has joined #ruby
timmow has quit [Quit: has left the building]
kn330 has joined #ruby
<graft> ah, gem install bond
jduan1981 has quit [Quit: jduan1981]
rdark has quit [Quit: leaving]
jaimef has quit [Quit: Emacs must have died]
jaimef has joined #ruby
benlieb has joined #ruby
sayan has quit [Read error: Connection reset by peer]
jerius has quit []
Hanmac1 is now known as Hanmac
jaygen has joined #ruby
sayan has joined #ruby
banisterfiend has joined #ruby
Gues_____ has joined #ruby
jaygen has quit [Read error: Operation timed out]
Gues_____ is now known as Guest123
jjbohn has joined #ruby
<Guest123> hello - does anyone know how to parse a file starting at a line that contains specific text?
<Guest123> i.e. do a grep within the file for a particular string, and then start parsing line by line from there?
<banisterfiend> Guest123: first read the whole file using File.readlines(file_name)
zxc has joined #ruby
<banisterfiend> Guest123: then just search through the resulting array using find_index
<JonnieCache> STATE MACHINE!
kenneth has quit [Quit: kenneth]
<banisterfiend> JonnieCache: lols
akl_ has quit [Ping timeout: 252 seconds]
alex__c2022 has quit [Ping timeout: 260 seconds]
<JonnieCache> parsers. the classic application for a FSM
benlieb has quit [Ping timeout: 272 seconds]
<banisterfiend> JonnieCache: r u state machine crazy!
alexander___ has quit [Quit: Page closed]
<banisterfiend> JonnieCache: u cling to FSMs like a mad man clutches a dead geranium
sailias has joined #ruby
<Guest123> @banisterfiend I was trying to avoid reading the entire file - I wanted to start reading lines at a specific line that contained the regex match
jjbohn has quit [Client Quit]
DrCode has joined #ruby
<JonnieCache> i have a FSM to track my geraniums too
<Gate> banisterfiend: techically, so do you. All modern processors map to finite state machines.
<banisterfiend> Guest123: how long is the file?
<Guest123> ~100k
<Guest123> but I need to read it several times in a row for different inputs
<banisterfiend> Guest123: why not memoize it?
<banisterfiend> so you only need to read it once
<JonnieCache> Guest123: how do you expect to find the line to start at without reading all the lines before it?
<banisterfiend> Guest123: reading a file into memory is pretty fast
<JonnieCache> i suppose you could use some kind of divide and conquer thing
jaywastaken_ has joined #ruby
<Guest123> oh ok - so first pass I'll try the readlines, thanks all
<JonnieCache> it depends on the nature of the data
zxc has quit [Client Quit]
madhadron has joined #ruby
havenn has joined #ruby
nwertman has quit [Quit: leaving]
artnez has quit [Quit: artnez]
jaywastaken has quit [Ping timeout: 255 seconds]
art_man1 has joined #ruby
<TheEmpty_> Isn't there a seek() method?
sterNiX has quit [Quit: Lagging Off]
radic has joined #ruby
otters has quit [Ping timeout: 252 seconds]
radic_ has quit [Ping timeout: 276 seconds]
<banisterfiend> TheEmpty_: sure but he'd have to know where to seek() to
jerius has joined #ruby
maletor has joined #ruby
<TheEmpty_> Seek and test that data, if you pass it, jump up and read from there. Depends on filesize (I suck with 100k, I work in "big" and "not big" :P)
miskander has quit [Quit: miskander]
slainer68 has quit [Remote host closed the connection]
atmosx has joined #ruby
JMcAfreak has joined #ruby
yshh has quit [Remote host closed the connection]
otters has joined #ruby
daniel_-_ has quit [Quit: WeeChat 0.3.9.2]
<banisterfiend> TheEmpty_: seek(n) + check, followed by seek(n+100) + check
peregrine81 has joined #ruby
pskosinski has quit [Ping timeout: 272 seconds]
<banisterfiend> TheEmpty_: sounds messy and maybe even slower than File.readlines() right from the get-go
wreckimnaked has quit [Read error: Operation timed out]
kinginky has joined #ruby
yshh has joined #ruby
<asuka> /win 28
sn0wb1rd has joined #ruby
nwertman has joined #ruby
kurioscreative has joined #ruby
love_color_text has joined #ruby
cpruitt has quit [Quit: cpruitt]
zigomir has quit [Quit: zigomir]
brendan_ has quit [Read error: Connection reset by peer]
bruticus has quit [Quit: bruticus]
froy has quit [Quit: kablam!]
brendan_ has joined #ruby
yshh has quit [Ping timeout: 255 seconds]
breakingthings has quit []
punkrawkR has quit [Ping timeout: 245 seconds]
jamescarr has quit [Quit: jamescarr]
punkrawkR has joined #ruby
assurbanipal has joined #ruby
filipe has quit [Remote host closed the connection]
jduan1981 has joined #ruby
kenneth has joined #ruby
francisfish has quit [Remote host closed the connection]
kevinfagan has quit [Quit: Linkinus - http://linkinus.com]
JMcAfreak has quit [Quit: They're coming to take me away, ha-haa!]
<rismoney> sorry- theempty-apeiros
dweeb has joined #ruby
robbyoconnor has quit [Ping timeout: 240 seconds]
nateberkopec has joined #ruby
nomenkun has joined #ruby
a_a_g1 has quit [Quit: Leaving.]
nomenkun has quit [Read error: Connection reset by peer]
nomenkun has joined #ruby
jrajav has joined #ruby
alexspeller has quit [Ping timeout: 252 seconds]
tenmilestereo has joined #ruby
pskosinski has joined #ruby
<rismoney> I think this is what i am after - name = options[:name] or raise "name parameter needed
mpereira has quit [Ping timeout: 255 seconds]
tommyvyo has quit [Quit: Computer has gone to sleep.]
mjolk2 has quit [Quit: This computer has gone to sleep]
whowantstolivef1 has joined #ruby
kurioscreative has left #ruby [#ruby]
Elhu has quit [Quit: Computer has gone to sleep.]
wallerdev has joined #ruby
sailias has quit [Quit: Leaving.]
hukl has joined #ruby
miskander has joined #ruby
macmartine has joined #ruby
ThaDick has quit [Quit: I'm outta here!]
banisterfiend has quit [Ping timeout: 248 seconds]
banisterfiend has joined #ruby
<reactormonk> rismoney, you sure you don't want to make it a named argument?
alvaro_o has quit [Quit: Ex-Chat]
MarcWeber has left #ruby [#ruby]
yonahw has joined #ruby
joofsh has joined #ruby
adambeynon has quit [Quit: ["Textual IRC Client: www.textualapp.com"]]
yshh has joined #ruby
jaywastaken has joined #ruby
jaywastaken has quit [Changing host]
jaywastaken has joined #ruby
<rismoney> reactormonk - example ?
<reactormonk> rismoney, err, normal argument.
rayn has joined #ruby
alvaro_o has joined #ruby
jjbohn has joined #ruby
cdt has quit [Quit: Ex-Chat]
rayn has left #ruby [#ruby]
tommyvyo has joined #ruby
jaywastaken_ has quit [Ping timeout: 265 seconds]
<rismoney> the story is I previously had 5 string arguments, and now i want them to be a hash to manage them better. but they are all req'd, and i want to use its keyname, so its kind of ideal to be a symbol
jds has joined #ruby
a_a_g has joined #ruby
<reactormonk> 5 string arguments? whut?
<reactormonk> What's this method for?
alex__c2022 has joined #ruby
<rismoney> lol - it looked like this before def ip_props (res_name, res_grp, ip_addr, ip_subnetmask, ip_network)
panpainter has joined #ruby
nomenkun_ has joined #ruby
nomenkun has quit [Read error: Connection reset by peer]
<reactormonk> rismoney, well, you could group the ip_* stuff into a struct if you require the same kind of arguments somewhere else.
the_jeebster has joined #ruby
<rismoney> so now i think i want it def ip_props (hash_ip_props={})
wermel has quit [Remote host closed the connection]
mensvaga has joined #ruby
<reactormonk> well, either you go with a struct or with a hash - depends which design philosophy you follow
<rismoney> ip=hash_ip_props[:ip] or raise "ip needed"
<rismoney> this is a singleton method, and nothing else requires ip crap
<reactormonk> ok, fine
infinitiguy has quit [Read error: Connection reset by peer]
infinitiguy has joined #ruby
ExxKA has quit [Quit: This computer has gone to sleep]
a_a_g has quit [Quit: Leaving.]
<mensvaga> Is there a way to catch all methods called on an object?
jjbohn has quit [Quit: Leaving...]
<mensvaga> like object.this_method_doesnt_exist
<banisterfiend> mensvaga: method_missing
yshh has quit [Ping timeout: 264 seconds]
<mensvaga> BUT have a way to get the name of the method that's called, and potentially dispatch it to another method?
<mensvaga> I'll read up on method_missing
griffindy has joined #ruby
jstirnaman has joined #ruby
PragCypher has quit [Ping timeout: 248 seconds]
<reactormonk> mensvaga, everything's there.
<reactormonk> mensvaga, and don't forget to redefine respond_to? as well
Neomex has joined #ruby
<banisterfiend> mensvaga: def method_missing(name, *args, &block)
<mensvaga> Yeap. I see that.
<mensvaga> Thanks.
workmad3 has joined #ruby
PragCypher has joined #ruby
PragCypher has quit [Remote host closed the connection]
PragCypher has joined #ruby
bluOxigen has joined #ruby
banisterfiend has quit [Ping timeout: 272 seconds]
JohnBat26 has quit [Quit: KVIrc 4.3.1 Aria http://www.kvirc.net/]
jjbohn has joined #ruby
Spaceghostc2c has quit [Excess Flood]
mpfundstein has joined #ruby
samphippen has joined #ruby
Spaceghostc2c has joined #ruby
MattRb has joined #ruby
jkarayusuf has joined #ruby
geekbri has joined #ruby
griffindy has quit [Quit: leaving]
atmosx has quit [Quit: And so the story goes…]
laurent_ has joined #ruby
banisterfiend has joined #ruby
sepp2k has quit [Ping timeout: 265 seconds]
JMcAfreak has joined #ruby
deadlytoah has quit [Ping timeout: 252 seconds]
agarie has joined #ruby
griffindy has joined #ruby
griffindy has quit [Quit: leaving]
griffindy has joined #ruby
pcarrier has quit []
chriskk has joined #ruby
jamescarr has joined #ruby
kpshek has quit []
daniel_- has joined #ruby
laurent_ has quit [Quit: laurent_]
doug has joined #ruby
yshh has joined #ruby
jkarayusuf has quit []
<doug> what's the Right Way to pass through additional args? this isn't it: https://gist.github.com/4454971
jaygen has joined #ruby
eykosioux_ has quit [Quit: eykosioux_]
<graft> what does another_method take?
jaywastaken_ has joined #ruby
<doug> actually, i meant: https://gist.github.com/4455014
<graft> what does another_method take?
kpshek has joined #ruby
<graft> also you can't pass hash args like that unless they're the last argument
<doug> ah
<graft> otherwise you should put them in a paren
<doug> yeah, in this case, it's mock model: def mock_model(model_class, options_and_stubs = {})
jrist is now known as jrist-afk
<graft> okay, so *args is more hash parameters?
_alejandro has joined #ruby
<doug> oughta be
sepp2k has joined #ruby
<doug> what's the right way to pass those through?
<graft> then do def intermediary hash; another_method hash.merge( :time_zone => '' ); end
jaywastaken has quit [Ping timeout: 276 seconds]
love_color_text has quit [Remote host closed the connection]
<doug> bitchin
<doug> graft++
<mensvaga> If I have variables in a class, say, Logger::DEBUG, Logger::ERROR, Logger::FATAL , but I want to refer to them by the value stored in a variable, how do I do that?
<mensvaga> i.e. level = "FATAL", Logger::{level}
<reactormonk> mensvaga, const_get
love_color_text has joined #ruby
<banisterfiend> mensvaga: Logger.const_get(level)
ddd has quit [Quit: Leaving.]
<mensvaga> OK. Thanks. reading up on const_get
<mensvaga> ah.
xemu has quit [Ping timeout: 248 seconds]
<mensvaga> Will that barf with an exception if it doesn't have one of those?
<banisterfiend> mensvaga: of course :)
<mensvaga> sweeeeet.
panpainter_ has joined #ruby
panpainter has quit [Read error: Connection reset by peer]
panpainter_ is now known as panpainter
love_color_text has quit [Read error: Connection reset by peer]
<reactormonk> mensvaga, iirc a NameError
reinaldob has quit [Remote host closed the connection]
love_color_text has joined #ruby
mjolk has joined #ruby
wf2f has quit []
mjolk is now known as Guest81145
asteve has joined #ruby
fyolnish has quit [Remote host closed the connection]
zigomir has joined #ruby
blueOxigen has joined #ruby
graft has quit [Ping timeout: 264 seconds]
joeycarmello has quit [Remote host closed the connection]
froy has joined #ruby
fourq has quit [Quit: Lost terminal]
browndawg has quit [Quit: Leaving.]
bluOxigen has quit [Ping timeout: 248 seconds]
xcvd`` has quit [Ping timeout: 248 seconds]
yshh has quit [Ping timeout: 240 seconds]
kennyvb has quit [Ping timeout: 260 seconds]
jjbohn has quit [Quit: Leaving...]
rezzack has joined #ruby
jjbohn has joined #ruby
kennyvb has joined #ruby
nomenkun_ has quit [Read error: Connection reset by peer]
nomenkun has joined #ruby
marxarelli has joined #ruby
jjbohn has quit [Client Quit]
xargoon has quit [Ping timeout: 246 seconds]
havenn has quit [Remote host closed the connection]
doug has left #ruby [#ruby]
Xeago has joined #ruby
havenn has joined #ruby
havenn has quit [Read error: Connection reset by peer]
havenn has joined #ruby
xyzodiac has joined #ruby
havenn has quit [Read error: Connection reset by peer]
havenn has joined #ruby
kidoz has joined #ruby
sailias has joined #ruby
marr has quit [Ping timeout: 252 seconds]
fms has joined #ruby
graft has joined #ruby
graft has quit [Changing host]
graft has joined #ruby
lolcathost has quit [Ping timeout: 265 seconds]
gyre007 has quit [Remote host closed the connection]
luckyruby has joined #ruby
miskander has quit [Quit: miskander]
workmad3 has quit [Ping timeout: 255 seconds]
Xeago has quit [Ping timeout: 248 seconds]
xargoon has joined #ruby
infinitiguy1 has joined #ruby
infinitiguy has quit [Read error: Connection reset by peer]
fms is now known as ebobby
miskander has joined #ruby
kaen has quit [Read error: Connection reset by peer]
froy has quit [Remote host closed the connection]
Neomex has quit [Quit: Neomex]
Zai00 has quit [Quit: Zai00]
kaen has joined #ruby
diegoviola has joined #ruby
<shevy> oh
<shevy> apeiros_, you like to use "if condition then", if I remember correctly. can you explain briefly why you use the "then"?
love_color_text has quit [Remote host closed the connection]
meeko has joined #ruby
<shevy> I am asking because right now, this is the first time I do something like this myself:
<shevy> if condition # then enter main loop
<shevy> it surprised me that I put a then as the first word in a comment, strangely enough
love_color_text has joined #ruby
ebouchut has joined #ruby
zigomir has quit [Quit: zigomir]
xnm has quit [Ping timeout: 248 seconds]
xargoon has quit [Ping timeout: 245 seconds]
xargoon has joined #ruby
<apeiros_> shevy: read-flow is better for me
<apeiros_> I don't use it anymore, though. we voted on it in the company and decided to use `if condition`. so I'm going with that now, even though I prefer if/then
<Kuifje> then is required if you put the action on the same line as the if statement as far as I know
<shevy> aha ok, interesting
<Kuifje> otherwise ruby doesnt know where the if statement ends
froy has joined #ruby
meeko has quit [Ping timeout: 272 seconds]
kaen has quit [Read error: Connection reset by peer]
yshh has joined #ruby
jds has quit [Remote host closed the connection]
jds has joined #ruby
philcrissman has quit [Remote host closed the connection]
jaywastaken has joined #ruby
jaywastaken has quit [Changing host]
jaywastaken has joined #ruby
meeko has joined #ruby
<Mon_Ouie> You can use semicolons too, so it's not really "required"
koshii has joined #ruby
marxarelli has left #ruby [#ruby]
<apeiros_> I don't use one-line if/then/end
<apeiros_> ugly IMO
<apeiros_> if it's if/else/end, -> ?: instead
nricciar has joined #ruby
<apeiros_> if it's if/end -> action if cond instead
Dreamer3 has joined #ruby
superguenter has joined #ruby
jaywastaken_ has quit [Ping timeout: 255 seconds]
skaczor has quit [Remote host closed the connection]
jds has quit [Ping timeout: 240 seconds]
daniel_- has quit [Ping timeout: 276 seconds]
v0n has quit [Read error: Connection reset by peer]
<graft> argh. so, inject goes { |memo,element| } but each_with_object goes { |element,memo| } ? wtf
<graft> that's not confusing or hard to remember at all
v0n has joined #ruby
<Mon_Ouie> It's not a memo in the case of each_with_object
kn330 has quit [Remote host closed the connection]
<Mon_Ouie> And easy to remember: each + *with_object* : the other object comes last
xyzodiac has quit [Quit: Computer has gone to sleep.]
_alejandro has quit [Remote host closed the connection]
<graft> ruby-doc.org says it's a memo, and it acts exactly the same way as a memo, so why is it not a memo?
<banisterfiend> graft: what is a memo to u
t0rc has quit [Read error: Operation timed out]
<Mon_Ouie> It's always the same object, that's why I don't think of it as a memo
koshii has quit [Ping timeout: 240 seconds]
<banisterfiend> if u define memo maybe u can answr the Q. yourself
<swarley> I'm looking for something like rbcurse, except without using the ncurses library
panpainter has quit [Ping timeout: 265 seconds]
<apeiros_> swarley: io/console + ansi escape sequences - have fun!
<graft> by memo i would mean something that stores a previously computed value
koshii has joined #ruby
kyrylo has joined #ruby
<swarley> apeiros_; I was hoping for something i didn't have to reinvent to get some widgets
<apeiros_> swarley: oh, +trap("SIGWINCH") { …called when windowsize changes… }
philcrissman has joined #ruby
<kenneth> hey there
<kenneth> is there a way to get all object of a certain class?
<shevy> graft when I read memo, I think of a way how the brain memorizes something in a hopefully simple way
<kenneth> and what would the performance of that be?
<shevy> kenneth hmm perhaps by traversing through ObjectSpace and returning all that respond to the specific .is_a? query
<bean> that sounds disgusting
<banisterfiend> kenneth: alternatively you can overload YourClass.new to keep track
yshh has quit [Ping timeout: 252 seconds]
<banisterfiend> kenneth: or YourClass#initialize
<Mon_Ouie> shevy: There's a more convenient way of doing that: ObjectSpace.each_object(YourClass)
<shevy> ah
<shevy> that is neat
<shevy> bean lol
<banisterfiend> not jruby friendly though
koshii has quit [Ping timeout: 272 seconds]
<apeiros_> swarley: I think there's an ncurses clone in pure ruby
koshii has joined #ruby
<shevy> awww poor heroic swarley... in the midths of curses hell...
<reactormonk> apeiros_, whut? Isn't that slow as hell?
<apeiros_> reactormonk: sure, but when did you need a 60fps in a terminal?
<swarley> Lol
breakingthings has joined #ruby
<apeiros_> ie, it doesn't matter whether it takes 50ms instead of 0.5ms to render
<reactormonk> apeiros_, for watching my pr0n with libaa when my X broke down and no time to fix it
yaroslav has quit [Quit: yaroslav]
<apeiros_> lol
workmad3 has joined #ruby
<apeiros_> reactormonk: my rpg used pure ruby and map scrolling was smooth on my mbp
<apeiros_> @120x40
<reactormonk> apeiros_, as smooth as it can get :-)
<apeiros_> and I didn't even optimize
<banisterfiend> reactormonk: i bet you're into some exotic, barely-legal pr0n genres
<apeiros_> yeah, he's into teen asciis!
<Mon_Ouie> You'd know about those, I guess
<swarley> Oh snap
meeko has quit [Quit: meeko]
<shevy> apeiros_ you wrote a rpg?
<apeiros_> shevy: working on one
<apeiros_> currently porting what I have to html5
<reactormonk> banisterfiend, got me some more?
<banisterfiend> reactormonk: no, i cant handle your stuff
koshii has quit [Ping timeout: 240 seconds]
miskander has quit [Quit: miskander]
<Hanmac> shevy i think its spelled "n-curses"
<reactormonk> banisterfiend, why the fuck did you propose it to me then?
Hanmac has quit [Quit: Leaving.]
<banisterfiend> reactormonk: to protect the public
Hanmac has joined #ruby
<shevy> Hanmac as long as we can curse about both. I think there are two kinds though, I have libcurses.so and also libncurses.so
<banisterfiend> otherwise you'd be out there on the streets abusing young women
koshii has joined #ruby
tommyvyo_ has joined #ruby
<apeiros_> genius apple… with number type fields, arrow keys can no longer be used to select previously used values, instead the inc/dec the value…
<apeiros_> sometimes…
panpainter has joined #ruby
<swarley> k. How do I specify that I want x86_64 version of a package with apt-get?
tommyvyo has quit [Read error: Connection reset by peer]
tommyvyo_ is now known as tommyvyo
<Hanmac> shevy did you hear that Obamas Plan B for the Fiscal Cliff was an One-Billion-Dollar-Coin ? (like the Dollar note in the Simpsons episode)
<shevy> Hanmac dunno, no idea. I also don't follow any news really related to virtual currencies in general
<Hanmac> swarley: first: what is your architecture, and what other architectures have you anabled?
workmad3 has quit [Ping timeout: 272 seconds]
<swarley> Linux OctaviasViolin 3.2.0-34-generic #53-Ubuntu SMP Thu Nov 15 10:48:16 UTC 2012 x86_64 x86_64 x86_64 GNU/Linux
maletor has quit [Quit: Computer has gone to sleep.]
kyrylo has left #ruby ["Recharging eyes…"]
gesman has joined #ruby
<gesman> Hello
<gesman> Q: How can i emit array suing 123.times ... ?
<swarley> amd64/generic
<gesman> \using\
skcin7 has joined #ruby
atyz has joined #ruby
<swarley> Emit an array of what?
<Mon_Ouie> The results of the block you pass to times?
<gesman> swarley, of 1 ... 123
<gesman> say integers
<Mon_Ouie> (1..123).to_a
<swarley> gesman; 1..123 is easier than using each
Kuifje has quit [Ping timeout: 248 seconds]
<reactormonk> banisterfiend, sorry to hear your story bro
<swarley> err times
<Mon_Ouie> Drop the to_a if you don't really need it to be an array
<reactormonk> swarley, interesting name generator you use there
<Hanmac> swarley: apt-get should use x86_64 as default ... you only need to add the arch when you want to install others like i386 ...
<swarley> name generator?
<reactormonk> gesman, [*1..123]
<swarley> yeah, it says I have the amd64 package installed
<swarley> but
<gesman> Mon_Ouie, Thanks... I actually wanted to see if I can pass a block of code to emit each element for array
<Mon_Ouie> You can use other methods from Enumerable like map, inject, etc. on the range object (1..123) and it doesn't need to create the whole array
<reactormonk> swarley, hostname :-)
koshii has quit [Read error: Connection reset by peer]
<swarley> the library is in /lib32
<banisterfiend> Mon_Ouie: which feature excites you most from ruby 2.0
<Mon_Ouie> Array.new(123) { |i| i * 2 }
koshii has joined #ruby
<kenneth> hmm. i think i'll do it a different way then
<gesman> sort of: 123.times {|n| blah(n) }
<swarley> I'm hoping for refinements c:
<gesman> But it does not emit array: --> 123.times {|n| blah(n) }
<Mon_Ouie> banisterfiend: Well I haven't really paid attention to the development of 2.0
<kenneth> other question: i want to make my own .inspect so i can get rid of a couple noisy ivars that show up, but i'd like the rest of the object's inspect to be formatted the same nice way.
nemesit has quit [Ping timeout: 248 seconds]
<kenneth> is there an easy way to just remove an ivar from the inspect string?
<swarley> kenneth; I think it's obj.__id__ << 8
<Hanmac> swarley what package do you want to install exaclty? some like fglrx are not ported to multiarch yet (and install both archs at the same time)
<Mon_Ouie> I don't think so. You could easily write once the method that returns an inspect-like string for the variables specified as argruments, and just use that whenever you need.
<swarley> Hanmac; libncursesw5-dev
<banisterfiend> Mon_Ouie: does ruby-dev.el not use pry-doc ?
<Mon_Ouie> It uses YARD
jds has joined #ruby
xyzodiac has joined #ruby
<Mon_Ouie> And Pry::Method, Pry::WrappedModule, etc.
<banisterfiend> Mon_Ouie: ah
Guest81145 has quit [Read error: Connection reset by peer]
dougireton has joined #ruby
<Hanmac> swarley: ncurses packages are only semi-multiarch ... that means you could co-install the lib packages but not the dev packages ...
mjolk has joined #ruby
Takehiro_ has quit [Remote host closed the connection]
<gesman> Here's what i wanted: [*1..4].map {|n| n+5}
mjolk is now known as Guest86486
t0rc has joined #ruby
<gesman> Thanks reactormonk and Mon_Ouie
darthdeus has joined #ruby
darthdeus has left #ruby [#ruby]
<reactormonk> gesman, (1..4).map {|n| n+5}
llaskin has left #ruby [#ruby]
<swarley> '%x' % (obj.__id__ << 1)
<Mon_Ouie> Also see the Array.new line
koshii has quit [Ping timeout: 255 seconds]
<gesman> reactormonk, yeah even better :)
<Mon_Ouie> swarley: That's just the object id, the rest is the more important part
<Mon_Ouie> (the way it shows the ivars)
macmartine has quit [Quit: ["Textual IRC Client: www.textualapp.com"]]
<swarley> oh, he want's to be picky with them
<swarley> I misunderstood
koshii has joined #ruby
tk__ has quit [Quit: ばいばい]
berserkr has quit [Quit: Leaving.]
jds has quit [Ping timeout: 260 seconds]
jjbohn has joined #ruby
nemesit has joined #ruby
cyclops3590 has joined #ruby
headius has joined #ruby
<Eiam> whats the opposite of an array intersection called?
kurioscreative has joined #ruby
<Eiam> elements that don't exist in both the arrays provided
<Eiam> i can think of how to write it.. (ar1+ar2) - (ar1 & ar2)
<Mon_Ouie> You'd still need a way to know what the set of all possible elements is to do that
<Eiam> but is there actually a thing?
workmad3 has joined #ruby
<Mon_Ouie> Oh, that don't exist in both, not either
<Eiam> right
nomenkun has quit [Remote host closed the connection]
<banisterfiend> Mon_Ouie: can i correct your english pls
<Mon_Ouie> Sure, that was confusing me anyway
<Eiam> i want the unique elements from these two arrays, or whats not in both. i was just wondering if there was an actual name for the "opposite of array intersection"
kaen has joined #ruby
<apeiros_> Eiam: xor
<apeiros_> exclusive or
BRMatt has quit [Ping timeout: 264 seconds]
jrendell has joined #ruby
<Eiam> ah ha. THATS what an xor is =)
<Eiam> and looks like ruby doesn't have it
<apeiros_> Eiam: indeed. I usually add Array#^ for that
<apeiros_> no idea why it isn't there already, given that union and intersection are both around
<Mon_Ouie> It does have it for sets
<Mon_Ouie> (in the actual Set class)
<apeiros_> I wonder whether (a + b) - (a & b) is faster or slower than (a | b) - (a & b)
yshh has joined #ruby
yacks has quit [Ping timeout: 260 seconds]
<Eiam> or (a-b) | (b-a) =p
miskander has joined #ruby
<kenneth> when an object is extended with a module
<kenneth> is there a method on the module that gets called that i can use to do some stuff?
<reactormonk> >> puts Set.new([*1..3]) ^ Set.new([*2..4])
<Eiam> im doing it on 30,000 objects
<eval-in> reactormonk: Output: "/tmp/execpad-bb8a29ef7901/source-bb8a29ef7901:1:in `<main>': uninitialized constant Set (NameError)\n" (http://eval.in/5979)
<apeiros_> I also wonder how (a.to_set ^ b.to_set).to_a compares to the former two
<Eiam> i guess i could test it =)
elaptics is now known as elaptics`away
<reactormonk> >> require 'set'; puts Set.new([*1..3]) ^ Set.new([*2..4])
<eval-in> reactormonk: Output: "#<Set:0x87a6e28>\n" (http://eval.in/5980)
<reactormonk> -.-
<reactormonk> >> require 'set'; p Set.new([*1..3]) ^ Set.new([*2..4])
<eval-in> reactormonk: Output: "#<Set: {4, 1}>\n" (http://eval.in/5981)
<reactormonk> eval-in, ^
jaywastaken_ has joined #ruby
<reactormonk> ..... Eiam ^
<Eiam> convert my arrays to sets, perform the xor, then convert back? =)
<reactormonk> Eiam, why convert back?
<Mon_Ouie> kenneth: Module#extended(by)
<Eiam> i don't need a set?
<kenneth> Mon_Ouie: awesomet hanks
panpainter has quit [Ping timeout: 264 seconds]
Morkel_ has joined #ruby
<reactormonk> Eiam, why do you care if it's a set or an array?
<apeiros_> banisterfiend: in pry, how can I do a multiline-codepiece?
workmad3 has quit [Ping timeout: 276 seconds]
<reactormonk> Welcome do duck typing, buddy.
<Eiam> i don't know, I've never used a set. I'm reading the docs on it now
<apeiros_> i.e. that it doesn't increase the number to the left
<banisterfiend> apeiros_: ???
jaywastaken has quit [Ping timeout: 256 seconds]
<banisterfiend> apeiros_: that should be the default
<Mon_Ouie> Sets are enumerable too, so many things can be done using both
<Eiam> reactormonk: well, you can't say [1,2] ^ [2,3], you have to [1,2].to_set ^ [2,3].to_set
<apeiros_> banisterfiend: no, the default is that upon every enter, the number increases. only if I have e.g. begin/end wrapped around, it does not
<kenneth> Mon_Ouie: that's something i would def self.extended(by) on the module, right?
<kenneth> Mon_Ouie: there's no doc on that method :/
Morkel has quit [Ping timeout: 240 seconds]
Morkel_ is now known as Morkel
<Mon_Ouie> Yeah, and it gets called with object on YourModule in object.extend YourModule
<banisterfiend> apeiros_: it only doesn't increase the number for true multiline (according to ruby) expressions. You want to not increment the expression number even after you'e typed in a complete ruby expression? so you want to embed multiple expressions into the same 'expressin number' ?
<banisterfiend> sorry, that's a bit awkwardly phrased
<banisterfiend> but u probably know what i mean
arturaz has joined #ruby
meeko has joined #ruby
<banisterfiend> apeiros_: if you type 'edit' you'll go to an editor, you can type in as much ruby there as you want, and it'll be evaluated as a 'single expression' when u save/exit
<Eiam> reactormonk: weird. undefined method to_set on Array. yet.. ruby-doc shows [1,2].to_set
zmo_ has quit [Read error: Connection reset by peer]
<Mon_Ouie> You probably forgot to require 'set'
<apeiros_> Eiam: require 'set'
<Eiam> well christ i didn't require 'string' or require 'array' =0
joeycarmello has joined #ruby
jrist-afk is now known as jrist
<Eiam> anyway yes that solved it
t0rc has quit [Ping timeout: 255 seconds]
<apeiros_> that's the difference between core & stdlib
<apeiros_> string/array are core
<apeiros_> set is stdlib
Goles has quit [Quit: Computer has gone to sleep.]
<banisterfiend> apeiros_: can u explain what u mean, it coudl be a k00 idea
<apeiros_> interesting, (a+b)-(a&b) is the fastest, by quite a margin
hukl has quit [Quit: Leaving...]
<Eiam> ha
* Eiam monkey patches
<apeiros_> banisterfiend: like in a couple of messengers, where the default is to send the message upon hitting enter, but you can edit multiple lines by using option-enter
<Mon_Ouie> Probably because a | b needs to build yet another set
<apeiros_> Mon_Ouie: yes
<apeiros_> + only concats two arrays, that's basically just memcpy
<Eiam> so exicted my first monkey patch =)
<banisterfiend> apeiros_: ah, well the way you do that in pry is just typing 'edit' to enter arbitrary code in an editor
<apeiros_> if Set was written in C, I'd expect Set#^ to be the fastest. sadly, it's in ruby :(
<apeiros_> banisterfiend: ah
jblack_ has joined #ruby
jblack has quit [Read error: Connection reset by peer]
<apeiros_> banisterfiend: and how do I copy multiple expressions in an editor? `edit -i 2..8` ?
<Mon_Ouie> Eiam: Oh, btw, even though you use array & other_array, as it is implemented, it does create a throw-away set (all in C that time, though)
hotovson has quit [Remote host closed the connection]
<banisterfiend> ephemerian: exactly
<banisterfiend> apeiros_: exactly*
<apeiros_> Mon_Ouie: Hash actually…
<apeiros_> banisterfiend: opened an empty editor window :(
<Mon_Ouie> Well, a set can be implemented as a hash; they just don't bother to wrap it in another API
xAndy_ is now known as xandy
<banisterfiend> apeiros_: which editor?
xandy is now known as xAndy
<apeiros_> sublime
<banisterfiend> apeiros_: weird it works for me, perhaps we dont support subtlime in the current gem version (but we do on head)
marr has joined #ruby
dbck has quit [Quit: Be back later]
<Eiam> thanks
panpainter has joined #ruby
dsabanin has quit [Quit: Leaving...]
<apeiros_> Eiam, Mon_Ouie: http://pastie.org/5623163
kirun has joined #ruby
<reactormonk> banisterfiend, well, do you do anything besides calling the editor with the path to the tmpfile?
miskander has quit [Quit: miskander]
<banisterfiend> reactormonk: a few cute things
<reactormonk> banisterfiend, like?
<banisterfiend> reactormonk: not telling, it's my secret
dougireton has quit [Quit: Leaving.]
doug has joined #ruby
yshh has quit [Ping timeout: 248 seconds]
<doug> what's the difference between !current_user.nil? and !!current_user ?
<Pip> doug, I don't know
<Pip> doug, Is Matz here?
miskander has joined #ruby
Takehiro has joined #ruby
<Mon_Ouie> Except when current_user can also be false, just style
ryanjh has joined #ruby
sayan has quit [Remote host closed the connection]
ebouchut has quit [Quit: This computer has gone to sleep]
<Mon_Ouie> (when it can be false, then current_user.nil? is false while !current_user is true)
dustint has joined #ruby
dougireton has joined #ruby
dsabanin has joined #ruby
<apeiros_> also when current_user.! is defined
mpfundstein has quit [Quit: leaving]
ebouchut has joined #ruby
panpainter has quit [Ping timeout: 240 seconds]
meeko is now known as meeko_
mpfundstein has joined #ruby
Driscoll has joined #ruby
jds has joined #ruby
t0rc has joined #ruby
xemu has joined #ruby
mpfundstein has quit [Client Quit]
<doug> !!current_user works when current_user is undefined?
<pasties> doug: it does
<pasties> doug: try this in irb - !!nil
<Mon_Ouie> nil is defined
<karl________> I have an array of objects (w% a b c), each object has a "addr" attribute and an array "names" (w% sue bob) attribute. How do I go about printing the "addr" attribute and the first element of the "names" array, if the "names" array contains a particular name ("sue")?
zastern has joined #ruby
<Mon_Ouie> !!something_undefined won't work. The point was that !foo actually calls the #! method on foo.
t0rc has quit [Quit: WeeChat 0.3.9.2]
<Mon_Ouie> Therefore, you can define foo.! to do something other than negation, in which case you can get different results from the two versions
<Hanmac> doug: "current_user &= true" works :P
alex__c2022 has quit [Read error: Connection reset by peer]
h4mz1d has joined #ruby
panpainter has joined #ruby
hamfz__ has joined #ruby
alex__c2022 has joined #ruby
Neomex has joined #ruby
<karl________> I'm doing:
<karl________> a.names do |name|
<karl________> if name =~ "sue"
_bart has quit [Ping timeout: 248 seconds]
<karl________> puts a.addr, name
<pasties> Mon_Ouie: While not the best solution, something like the following can be used safely (!!something rescue false)
alex__c2022 has quit [Remote host closed the connection]
<moos3> is there away to display system command in realtime to console
<mensvaga> Does anybody in here have experience with Logger? Can you tell me why something would get messed up if I had 2 logger objects?
<karl________> but have problems when there are multiple names matching within the same object (multiple "sues" results in multiple prints of the same object)
jds has quit [Ping timeout: 248 seconds]
alex__c2022 has joined #ruby
<karl________> moos3: you need to disable buffering
<Mon_Ouie> !!something can be used safely. You should know whether or not `something` is defined.
Myconix has quit [Quit: Leaving]
<karl________> moos3: is my guess
Takehiro has quit [Remote host closed the connection]
<moos3> basically I wrote a wrapper for a shell command and I want to flush the ouput to the console so user can see it
<pasties> Mon_Ouie: I agree :) was just putting forward a solution to the problem you presented
<karl________> moos3: try putting STDOUT.sync = true at the top of your script
<moos3> k
lkba has joined #ruby
akemrir has quit [Quit: WeeChat 0.3.9.2]
<mensvaga> never mind on the logging thing; there was a bad file name.
emocakes has quit [Quit: emocakes]
kirun has quit [Read error: Operation timed out]
pyr0commie has joined #ruby
geekbri has quit [Remote host closed the connection]
miskander has quit [Quit: miskander]
koshii has quit [Ping timeout: 252 seconds]
koshii has joined #ruby
mpfundstein has joined #ruby
flyinprogramer has joined #ruby
miskander has joined #ruby
horofox_ has quit [Quit: horofox_]
jerius has quit [Ping timeout: 272 seconds]
MattRb has quit [Quit: MattRb]
havenn has quit [Remote host closed the connection]
havenn has joined #ruby
workmad3 has joined #ruby
<flyinprogramer> so i'm running osx 10.8.2, using rvm and ruby 1.9.3; and i can't seem to get ruby to see my self-signed ssl certs in my keychain; i've added them to Login and System, and i've clicked on them after adding and made sure they are "Trust Always" - and google chrome seems to confirm that they're truly there, and yet still ruby throws up certificate verify failed (OpenSSL::SSL::SSLError);; if i do this: export SSL_CERT_FILE=[path to downloade
<flyinprogramer> self-signed cert] it works, but that really isn't feasible -- any idea what i can try? i've tried restarting my terminal and restarting my machine after installing the certs, nothing seems to work :(
koshii has quit [Read error: Connection reset by peer]
froy has quit [Quit: kablam!]
koshii has joined #ruby
jjbohn has quit [Ping timeout: 272 seconds]
cyclops3590 has quit [Quit: ChatZilla 0.9.89 [Firefox 17.0.1/20121128204232]]
horofox_ has joined #ruby
jaywastaken has joined #ruby
Jackneill has quit [Quit: Leaving]
superguenter has quit [Read error: Operation timed out]
yshh has joined #ruby
superguenter has joined #ruby
koshii has quit [Ping timeout: 240 seconds]
havenn has quit [Ping timeout: 276 seconds]
jaywastaken_ has quit [Ping timeout: 252 seconds]
ebouchut has quit [Quit: This computer has gone to sleep]
kstephens has quit [Ping timeout: 248 seconds]
koshii has joined #ruby
ryannielson has quit [Quit: ryannielson]
Goles has joined #ruby
superguenter has quit [Client Quit]
kstephens has joined #ruby
miskander has quit [Quit: miskander]
daniel_- has joined #ruby
StaBle has joined #ruby
jerius has joined #ruby
Squarepy has joined #ruby
rakl has quit [Quit: sleeping]
miskander has joined #ruby
Squarepy has quit [Changing host]
Squarepy has joined #ruby
<doug> huh, maybe current_user is always defined within rails/devise...
<workmad3> doug: #rubyonrails
<workmad3> doug: and current_user isn't 'always defined'
kirun has joined #ruby
<workmad3> doug: it's defined as a controller method and view helper method
<workmad3> doug: it isn't available generally in models, or in your own library files etc
dougireton has quit [Quit: Leaving.]
atyz has quit [Quit: Leaving...]
chimkan_ has quit [Quit: chimkan_]
krawchyk has quit [Remote host closed the connection]
havenn has joined #ruby
horofox_ has quit [Quit: horofox_]
<doug> yeah yeah
frogstarr78 has quit [Remote host closed the connection]
rasbonics has joined #ruby
rasbonics has quit [Client Quit]
rakl has joined #ruby
methoddk is now known as coasterd
flyinprogramer has quit [Quit: flyinprogramer]
meeko_ has quit [Quit: meeko_]
flyinprogramer has joined #ruby
koshii_ has joined #ruby
zigomir has joined #ruby
jamescarr has quit [Quit: jamescarr]
koshii has quit [Ping timeout: 240 seconds]
yshh has quit [Ping timeout: 265 seconds]
cdabba_ has quit [Quit: Leaving]
Takehiro has joined #ruby
Goles_ has joined #ruby
Coeus has joined #ruby
blueOxigen has quit [Ping timeout: 246 seconds]
benlieb has joined #ruby
koshii_ has quit [Ping timeout: 260 seconds]
frogstarr78 has joined #ruby
<flyinprogramer> yfeldblum: i saw that, the issue is i should be able to place the cert somewhere and have ruby see it
doug has left #ruby [#ruby]
Goles has quit [Ping timeout: 252 seconds]
koshii has joined #ruby
<flyinprogramer> yfeldblum: sudo find / -iname *.crt doesn't show certs anywhere on my machine either :(
<flyinprogramer> i wish i knew where ruby was looking on my machine for the vert to be
<yfeldblum> flyinprogramer, also try *.cer and *.pem
<flyinprogramer> [i should have thought of that]
Takehiro has quit [Ping timeout: 272 seconds]
<flyinprogramer> once upon a time rvm had a folder, but that appears to be gone now
<Hanmac> i have an extra package named "ca-certificates"
daniel_hinojosa has joined #ruby
<Hanmac> the crts are in /usr/share/ca-certificates
<flyinprogramer> yfeldblum: mac os x 10.8.2
<karl________> is there an elegant way to feed multiple inputs to a =~ comparison, such as an array of strings?
<yfeldblum> flyinprogramer, http://wiki.cacert.org/FAQ/ImportRootCert
<karl________> ie, if foo =~ w%(bar hello bye)
<yfeldblum> karl________, %w(str1 str2 str3).any?{|s| s =~ regexp}
koshii has quit [Ping timeout: 248 seconds]
koshii has joined #ruby
elico has quit [Ping timeout: 276 seconds]
<karl________> yfeldblum: completed that would look like "foo =~ %w(str1 str2).any?{|s| s =~ regexp}" ?
<yfeldblum> karl________, no
s0ber has quit [Read error: Connection reset by peer]
sailias has quit [Quit: Leaving.]
<karl________> by regexp you mean regex expression
<yfeldblum> karl________, it's a local variable name, standing in for a regular expression
dsabanin has quit [Quit: Leaving...]
Goles_ has quit [Quit: Computer has gone to sleep.]
meeko has joined #ruby
s0ber has joined #ruby
headius has quit [Quit: headius]
Morkel has quit [Quit: Morkel]
meeko has quit [Client Quit]
dsabanin has joined #ruby
jaywastaken_ has joined #ruby
<karl________> Could you help me do a complete example? I have an array of strings, stringArray. I want to determine if any of the elements of stringArray are equal to str1, str2, or str3. I do something like, stringArray.each do |teststring|, and then what?
Guest86486 has quit [Quit: Leaving]
<flyinprogramer> yfeldblum: installed the cert everywhere :( no dice
mjolk has joined #ruby
<flyinprogramer> yfeldblum: maybe if i mock out a cert directory and throw it in there it will work
mjolk is now known as Guest87271
Goles has joined #ruby
Guest87271 has quit [Client Quit]
jerius has quit []
pcarrier has joined #ruby
mjolk2 has joined #ruby
jaywastaken has quit [Ping timeout: 255 seconds]
<apeiros_> karl________: !(string_array & [str1, str2, str3]).empty?
<apeiros_> karl________: also, what's with that nick? so annoying… :-S
digifiv5e has quit [Quit: quit]
atyz has joined #ruby
yshh has joined #ruby
threeseven has joined #ruby
<karl________> apeiros_: lol sorry about that; using webchat and it ensures my nick isn't taken immediately
<Eiam> apeiros_: why do you have ; 0 in that pastie?
<Eiam> ; ends the statement, then you have 0/false as a second statement after the assignment?
<apeiros_> Eiam: a = Array.new(10_000) { |i| i } in irb will lead to a huge output
<Eiam> ohhh oh its to supress that
<apeiros_> with the ;0, the output is just 0
atyz has quit [Client Quit]
<Eiam> i have some irb to disable that cause it plagues me
<apeiros_> 0 is not false in ruby, it's trueish
<Eiam> irb setting
<threeseven> Hey, say i have {a => 1, b => 2, c => 3} what's the best way for me to iterate over this hash in place to get {a => 2, b => 3, c => 4}?
<Norrin> lol
<Norrin> where is this strange definition of false & true that ruby has?
jthomp has quit [Quit: jthomp]
<apeiros_> Norrin: only strange if you're biased
<apeiros_> Norrin: only nil/false are false
<apeiros_> everything else is true
eykosioux_ has joined #ruby
<apeiros_> means you don't have to make a backflip for things like positions, which can be 0
<Norrin> can't see how its biased. what else works in a similar fashion?
<swarley> true and false/nil are much more reliable than using 0 as a null value
<apeiros_> Norrin: the 0 = false is a C-family thing
<Norrin> i know. kind of popular.....
jrendell has quit [Quit: jrendell]
<swarley> But also inconvenient
<apeiros_> didn't say it wasn't popuplar
<apeiros_> I said it was biased
<apeiros_> if you'd known *no* language at all
whowantstolivef1 has quit [Ping timeout: 272 seconds]
atyz has joined #ruby
<apeiros_> both, 0 being true and 0 being false would probably seem similarly odd
atyz has quit [Client Quit]
<Norrin> naw
<Norrin> ever notice the ink on electronic switches
<Norrin> they use 0 and |
olrrai has joined #ruby
<Norrin> | is on. 0 is off
maletor has joined #ruby
olrrai has quit [Client Quit]
<swarley> Uh. I'm pretty sure a person looking at something that says "false" would get the message faster than something that says 0
<Norrin> same for binary arithmetic
<threeseven> yeah I'm going to have to agree ith norrin here, I also think this is a specious discussion
<swarley> Yet again, someone who has had no previous experience would not likely know binary arithmetic
<apeiros_> Norrin: so? you're confusing a two-state system with numbers :-p
kennyvb has quit [Ping timeout: 252 seconds]
<Norrin> two state system with true and false
<Norrin> where off correlates to false
<apeiros_> Norrin: also, tell me how many coders you know who look at electronic switches :-p
<threeseven> but understanding the concept of binary in the context of computer programming seems pretty elementary
<threeseven> and therefore it would make a lot of sense for 0 to be false
<threeseven> again
<Norrin> anyone who has ever used a power strip has seen the 0 and | ink written on it
<apeiros_> afk
jrajav has quit [Quit: I tend to be neutral about apples]
<swarley> fuck switches, I throw things until stuff turns on
<threeseven> not that i care, ruby is welcome it it's quirks
<Eiam> threeseven: map ={}; x.each_pair {|k,v| map[k] = v+=1};
<Eiam> threeseven: x being your original hash
<threeseven> ok, thanks, that's what I had
<threeseven> seemed ugly : (
<Eiam> *shrug* i can think of a fewothers
<threeseven> it's all good
rondale_sc has quit [Ping timeout: 265 seconds]
<Eiam> x.map {|k,v| {k=>v+=1}}
<Hanmac> i saw an alarmclock that jumps from the table and hides under the bed when it rings :D
<Eiam> but then you need to do some splattin to get it back into a single hash
<threeseven> yeah
kennyvb has joined #ruby
<threeseven> my notion of what's ugly and what's not is probably what's wrong here
<threeseven> not my coe
<threeseven> *code
Takehiro has joined #ruby
jerius has joined #ruby
Astral has joined #ruby
<Norrin> Hanmac, that thing came out like 6 years ago
Astral is now known as Guest65385
zigomir has quit [Quit: zigomir]
<Hanmac> Norrin yeah maybe but its still cool
<Eiam> threeseven: Hash[*x.map {|k,v| {k=>v+=1}}.map(&:to_a).flatten]
havenn has quit [Remote host closed the connection]
<threeseven> ahahaha, that almost looks like perl
workmad3 has quit [Ping timeout: 260 seconds]
<Eiam> less ugly? =p (I think its more ugly, but you don't have two data structures hanging around )
<threeseven> thank you
<threeseven> i think it's probably more ugly
havenn has joined #ruby
<threeseven> but honestly, if i wanted things to be beautiful i would be writing in LISP anyway
<Eiam> i'd probably end up using that one myself
<Eiam> because I don't like pushing data into outside structures as often
_bart has joined #ruby
_bart has left #ruby [#ruby]
<threeseven> it is a bit harder to read
<threeseven> what's that & do over there?
<swarley> &: is syntatic sugar
<Eiam> its calling .to_a on each element
<Eiam> short hand for x.map { |x| x.to_a }
<swarley> it's like doing :to_a.to_proc
<threeseven> oh nice
Takehiro has quit [Ping timeout: 252 seconds]
<Eiam> swarley: I think my explaination was easier to understand than yours =)
<threeseven> i can confirm this
<Eiam> the idea of not knowing &: but understanding to_proc seems unlikely
<swarley> Oh, yeah. I was just giving my rubyist auto reply
prz has joined #ruby
<swarley> Yours makes more sense anyway. Since you can't use &: outside of a block situation
<Eiam> threeseven: its pretty neat so you can do stuff like .reject(&:empty?)
<Eiam> to dump all the empty elements in an array
<Eiam> sometimes I find it reads better
<Hanmac> Eiam & threeseven: Hash[x.map{|k,v| [k,v+1]}]
_nitti_ has joined #ruby
tenmilestereo has quit [Quit: Leaving]
<threeseven> oh hey that makes sense
<threeseven> actually
<threeseven> i haven't been doing ruby for very long, overall i must say that i'm impressed with how it let's you do whatever the fuck you want, but I also hate how it lets you do whatever the fuck you want
eldariof has quit []
havenn has quit [Ping timeout: 272 seconds]
mockra_ has joined #ruby
mockra has quit [Ping timeout: 256 seconds]
Neomex has quit [Quit: Neomex]
atyz has joined #ruby
yshh has quit [Ping timeout: 255 seconds]
<flyinprogramer> yfeldblum: thanks for your help - that openssl wiki solved another friend's problem
_nitti has quit [Ping timeout: 240 seconds]
<Hanmac> or h.each_with_object({}){|(k,v),h|h[k]=v+1}
<breakingthings> Python: "There should be one-- and preferably only one --obvious way to do it."
<breakingthings> Ruby: "There should be a few ways to do it."
<breakingthings> Perl/LISP: "There should be lots and lots and lots of ways to do it!"
<Eiam> Hanmac: hmm. ahh you are keeping it as an array
<Eiam> yes, that makes more sense, removes the splat which people stumble over sometimes
<Eiam> Hanmac: I like yours more than both of mine ;p
<Eiam> your first one, not the second
<kenneth> so you know how pry will use awesome print / inspect to print an object and will add newlines and indentation to make it more readable
<threeseven> breakingthings: I wouldn't say that in LIPS there are "ways to do things" there's just LISP.
<Eiam> except copy/pasting those objects back in sucks =(
<Eiam> kenneth: ^
<Eiam> my one complaint about awesomeprint
<kenneth> is that supposed to kick in automatically or does that only work on certain things?
<diegoviola> does the "There should be one-- and preferably only one --obvious way to do it." in Python refers only to function calls in the stdlib or also to libraries in general?
<Eiam> threeseven: im in the process of learning scheme
<threeseven> Eiam: Little Schemer?
<diegoviola> what's with that mindset?
<Eiam> threeseven: sicp
<Eiam> diegoviola: best asked in #python probably =)
<Eiam> Structure and Interpretation of Computer Programs
<threeseven> Eiam: I'd do "The Little Schemer" first, it's like an afternoon's worth of work if you're not being too in depth about it and I love the tone of the book.
AlbireoX has joined #ruby
atyz has quit [Quit: Leaving...]
<threeseven> SICP is god-tier though.
<Eiam> threeseven: I'm not learning scheme to learn scheme, I'm learning it because sicp is taught in it. I'm more interested in re-establishing fundamentals I learned in 9th grade 15 years ago
<kenneth> Eiam: scheme is awesome. i love all lisp though i prefer to use clojure myself
flyinprogramer has quit [Quit: flyinprogramer]
<Eiam> the language I re-learn it in, as long as its not C++ again, is not too worrisome for me
asm has joined #ruby
<asm> hi #ruby
<asm> I was bored today and made this: http://ruby.dj
<Eiam> threeseven: My programming focuses more on achieving results and less on real science & organization, hence trying to go back to basics & re-learn
<asm> similar to repl.it
<threeseven> ahh yeah
<asm> but more fun
<threeseven> I'm definitely an academic programmer first.
<Eiam> I'm definitely not
<Eiam> haha
IceDragon has joined #ruby
<threeseven> And a useful programmer like, fourth of fifth, after things like "Prodigious Stoner" and "Painter"
Pip has quit [Remote host closed the connection]
<kenneth> https://gist.github.com/322394a0ac446dec3bcd <-- this is my inspect, and when i print i get this: http://cl.ly/image/0o3W2f2q1u2I
<breakingthings> diegoviola it's a pervasive, all-encompassing idiom. any thing in python should be able to be done one way that should be considered the best way.
<threeseven> ^
<kenneth> before i wrote my own custom inspect, it would throw in newlines etc. am i missing something?
<breakingthings> I believe it goes from everything from language constructs, stdlib, third party libraries.
<breakingthings> Not that they all should match, but that there should be no need to write something two different ways in two similar scenarios
atyz has joined #ruby
jlast has quit [Remote host closed the connection]
caveat- has quit [Remote host closed the connection]
dsabanin has quit [Quit: Leaving...]
tommyvyo has quit [Quit: Computer has gone to sleep.]
<diegoviola> right
<diegoviola> thanks
koshii has quit [Read error: Connection reset by peer]
<diegoviola> but people actually do no?
<diegoviola> even in python
caveat- has joined #ruby
<diegoviola> they create different ways to achieve the same things
koshii has joined #ruby
atyz has quit [Client Quit]
dustint has quit [Remote host closed the connection]
d2dchat has quit [Remote host closed the connection]
<breakingthings> diegoviola it's not that all libraries that do something should all be identical
<breakingthings> but that if there is one way to do it, that should be the way to do it.
<diegoviola> i see
<breakingthings> eg, ruby has quite a few ways to just do a for/foreach loop.
can0n has left #ruby ["Leaving"]
Spami has quit [Read error: No route to host]
<Eiam> it does?
arietis has quit [Quit: Textual IRC Client: http://www.textualapp.com/]
Guest123 has quit [Quit: Textual IRC Client: http://www.textualapp.com/]
<breakingthings> Eiam `for i in 1..100`, `(1..100).each`
<breakingthings> (technically, it is a foreach, but it reads and functions like a for)
* breakingthings shrugs
<Eiam> i thought until 1.9.2 there was no guarantee of order in .each ?
<Eiam> you had to use each_with_index
<breakingthings> well there's another way to do each
<breakingthings> :p
<Eiam> right but each & each_with_index weren't doing the same thing was my point
<arturaz> Eiam, no. each_with_index just zips your collection with index
<apeiros_> 1.upto(100)
<breakingthings> dat.
<apeiros_> IMO the clearest
<arturaz> until 1.9.x Hash had no defined order
<Eiam> ah maybe thats what i was thinking of
<arturaz> (and it shouldn't have it now)
<arturaz> but because most of ruby folks actually have no idea what Hash is
<arturaz> and how it works
<arturaz> they added ordering to it
<apeiros_> that's fine IMO
<arturaz> therefore slowing it down
<arturaz> EVERYWHERE
<apeiros_> you're mistaken
<banisterfiend> arturaz: no
koshii has quit [Ping timeout: 256 seconds]
<diegoviola> what do you guys think of rubinius/rbx?
<apeiros_> ordering only increases memory usage
<apeiros_> it's implemented via double linked list
<banisterfiend> arturaz: it superimposes a linked list on *top of* the regular hash, it doesn't affect regular ahsh lookup
<apeiros_> insert/delete is still O(1)
<apeiros_> lookup too is still O(1)
<arturaz> apeiros_, but it's a slightly bigger O(1) ;)
<apeiros_> arturaz: no
<banisterfiend> arturaz: no it's not
<apeiros_> the C increased (constant added time)
<banisterfiend> arturaz: the linked list is only used during iteration
stevechiagozie has quit [Quit: Computer has gone to sleep.]
billy_ran_away has quit [Ping timeout: 252 seconds]
<arturaz> banisterfiend, and insertion. otherwise you wouldn't know the order, would you? :)
<apeiros_> but it's irrelevant. the overhead to call a method in ruby already by far outweighs the increased overhead
<arturaz> apeiros_, that's what I meant :)
<banisterfiend> arturaz: oh gee, two pointer additions
<breakingthings> the_wizards_tell_you_you're_wrong.avi
doodlehaus has quit [Remote host closed the connection]
<arturaz> anyway, you're probably right - its not worth it
<apeiros_> arturaz: the performance difference between unordered and ordered hash in ruby most likely wouldn't differ by more than 1‰
picca has joined #ruby
TheEmpty_ has quit [Remote host closed the connection]
jaywastaken has joined #ruby
jaywastaken has quit [Changing host]
jaywastaken has joined #ruby
<apeiros_> memory consumption OTOH were increased significantly. I'd like to still be able to have an unordered hash for cases where that matters
<apeiros_> rare, but since most code could be shared…
billy_ran_away has joined #ruby
asm has left #ruby [#ruby]
alex__c2022 has quit [Quit: alex__c2022]
asteve has quit [Quit: Computer has gone to sleep.]
jaywastaken_ has quit [Ping timeout: 276 seconds]
huoxito has joined #ruby
panpainter has quit [Ping timeout: 260 seconds]
<arturaz> apeiros_, just a switch ;)
<arturaz> or something like OHash :)
<banisterfiend> apeiros_: how is it increased significantly? it's just two pointers per element, that's like 8/16 bytes per element in the hash
<apeiros_> arturaz: yeah, I'd have loved if they'd deprecated Hash (access = warning, remove in 2.0), make {}.class # => OrderedHash, and keep the old impl as UnorderedHash
atyz has joined #ruby
lepht_afk is now known as lepht
<apeiros_> banisterfiend: it's 3x the amount than the element alone needs (ok, factor is a bit smaller since the bucket contains additional info)
koshii has joined #ruby
Goles has quit [Quit: Out.]
jgarvey has quit [Quit: Leaving]
yshh has joined #ruby
<apeiros_> unless hashtables are limited to 2^32 entries, then it'd be only 2x the amount (never checked that… should read the source again one day…)
arturaz has quit [Remote host closed the connection]
<apeiros_> I wonder if it would make sense to have something like Fixnum/Bignum for hashtables - I'd say most hashes contain less than 16 elements…
jerius has quit [Ping timeout: 272 seconds]
koshii has quit [Ping timeout: 255 seconds]
<banisterfiend> apeiros_: i still dont think 16 extra bytes per element is going to hurt you unless you have truly enormous hashes
koshii has joined #ruby
<apeiros_> banisterfiend: it's not about the *sum*, it's about the *factor*
<apeiros_> and yes, it hurts in cases where you indeed do have large hashes. but as said, those are rare.
<apeiros_> it also hurts if you have many big hashes
<GlenK> so I ran "gem install factory_girl" and it tells me I need ruby 1.9.2. so I tried 'gem install factory_girl "> 3.6.2"' That didn't work either. I'm probably lost on what the "> 3.6.2" means though. any help?
ericjhedberg has quit [Remote host closed the connection]
<banisterfiend> apeiros_: yes but it's just a pointer factor, so u have 3 times the amount of pointers, and pointers are tiny, it's not like the element itself (which could be pointing to an long string or whatever) is being duplicated
<apeiros_> banisterfiend: and as said, I totally agree that the hash literal should be the ordered hash.
andrewhl has quit [Remote host closed the connection]
x0F has quit [Quit: Leaving]
<apeiros_> banisterfiend: I'm aware of that
<apeiros_> I don't know what makes you think I'm not
<apeiros_> but 1 pointer vs. 3 pointers is a factor of 3
NimeshNeema has quit []
<banisterfiend> but when the things themselves are tiny, it's more or less irrelevant, so the size of the hash grows O(n) in both cases (with or without ordering), but with a tiny constant in the case of ordering
lepht is now known as lepht_afk
centipedefarmer has joined #ruby
<apeiros_> banisterfiend: you're beating dead horses :-)
<apeiros_> *I KNOW THAT*
benlieb has quit [Quit: benlieb]
punkrawkR^Home has joined #ruby
philcrissman has quit [Remote host closed the connection]
koshii has quit [Remote host closed the connection]
koshii has joined #ruby
meeko has joined #ruby
kinginky has quit [Quit: Leaving]
ortuna has quit [Ping timeout: 255 seconds]
invisime has quit [Quit: Leaving.]
h4mz1d has quit [Ping timeout: 260 seconds]
hamfz__ has quit [Ping timeout: 272 seconds]
koshii has quit [Ping timeout: 272 seconds]
koshii has joined #ruby
yshh has quit [Ping timeout: 272 seconds]
atyz has quit [Quit: Leaving...]
yfeldblum has quit [Ping timeout: 260 seconds]
meeko has quit [Ping timeout: 272 seconds]
kennyvb has quit [Ping timeout: 248 seconds]
atyz has joined #ruby
kirun has quit [Quit: Client exiting]
atyz has quit [Client Quit]
daniel_hinojosa has quit [Ping timeout: 255 seconds]
mengu has joined #ruby
<rking> OK guys, if you can dredge this from your 1.8 memories, how does this translate from 1.9 back: foo *x, :a => 1
kennyvb has joined #ruby
Takehiro has joined #ruby
<banisterfiend> rking: *[*x, :a =>1]
<rking> Oh OK
<rking> Thankz champ
<banisterfiend> no
<banisterfiend> that wouldnt work
<banisterfiend> hehe
<rking> Well, I can just push that hash on the end of x
<rking> Then splat
<banisterfiend> yes
<apeiros_> *(x+[{:a => 1}])
<rking> Yeah, that saves me a temp actually
miskander has quit [Quit: miskander]
theRoUS has quit [Ping timeout: 264 seconds]
mmitchell has quit [Remote host closed the connection]
breakingthings has quit []
fourq has joined #ruby
fourq has quit [Client Quit]
willob has quit [Quit: Leaving.]
kennyvb has quit [Ping timeout: 245 seconds]
fourq has joined #ruby
Takehiro has quit [Ping timeout: 255 seconds]
mercwithamouth has joined #ruby
picca has quit [Remote host closed the connection]
jonahR has quit [Quit: jonahR]
alanp_ has joined #ruby
alanp has quit [Disconnected by services]
alanp_ is now known as alanp
kennyvb has joined #ruby
Russell^^ has joined #ruby
joeycarmello has quit [Read error: Connection reset by peer]
joeycarmello has joined #ruby
jstirnaman has quit [Quit: Leaving.]
moshee has quit [Ping timeout: 256 seconds]
moshee has joined #ruby
moshee has quit [Changing host]
moshee has joined #ruby
f0ster has joined #ruby
f0ster has left #ruby [#ruby]
eykosioux_ has quit [Quit: eykosioux_]
Tekhne has joined #ruby
<Tekhne> is there a way to map/cast a model's attribute into a custom class/object automatically? (I tried #rubyonrails already.)
<Tekhne> by model, I mean and activerecord model from Rails
koshii has quit [Ping timeout: 252 seconds]
<Tekhne> s/and/an/
<rking> apeiros_/banisterfiend: In the end, I'm just making a foo_extension18.rb and a foo_full_extension.rb, so I don't have to make the real one conform to 1.8 syntax when that code is actually only a bonus for 1.9. =\ Life is hard.
<blazes816> Tekhne: I know they told you to come here but there makes more sense. regardless, you probably just want to write an accessor that wraps your attr as you want it.
infinitiguy1 has quit [Read error: Connection reset by peer]
infinitiguy has joined #ruby
fourq has left #ruby [#ruby]
x0F has joined #ruby
peregrine81 has quit [Quit: Computer sleeping.]
tilthouse has joined #ruby
jrist is now known as jrist-afk
<Tekhne> blazes816: yea, that's what i'm doing now, but i thought i remembered there being some Rails-specific way of doing it. anyway, thanks.
philcrissman has joined #ruby
robbyoconnor has joined #ruby
Tekhne has left #ruby [#ruby]
yshh has joined #ruby
griffindy has quit [Quit: Computer has gone to sleep.]
madhadron has quit [Quit: Leaving.]
mengu has quit [Quit: This computer has gone to sleep]
nateberkopec has quit [Quit: Leaving...]
jtharris has quit [Quit: WeeChat 0.3.9.2]
philcrissman has quit [Remote host closed the connection]
prz has quit [Quit: prz]
jonahR has joined #ruby
tilthouse has quit [Quit: Colloquy for iPad - http://colloquy.mobi]
v0n has quit [Ping timeout: 240 seconds]
fourq has joined #ruby
jeffreybaird has quit [Quit: jeffreybaird]
yshh has quit [Ping timeout: 246 seconds]
stopbit has quit [Quit: Leaving]
ChampS666 has quit [Ping timeout: 256 seconds]
f0ster has joined #ruby
<f0ster> is there some way I can iterate over all properties/attributes on an object?
<apeiros_> define property
<apeiros_> instance variables?
<apeiros_> methods?
<apeiros_> constants?
<apeiros_> class variables?
cantonic has joined #ruby
infinitiguy has quit [Quit: Leaving.]
<f0ster> apeiros_: anything, I made a generic list of objects like.. @things = list.each do |x| { property: x.prop1, something: x.somethingelse }. Now I want to go through all the properties that are on each thing, without knowing their keys
<f0ster> I assume doing the @things = {} was making a dynamic array of hashes
<apeiros_> f0ster: {foo: "bar"} are not arbitary objects, those are Hash instances
Umren has quit [Read error: Connection reset by peer]
<apeiros_> and you iterate over a hash by Hash#each
<apeiros_> read the docs of Hash. other methods of interest: [], []=, .values, .keys, .each_value, .each_key
jonahR has quit [Remote host closed the connection]
segv- has quit [Quit: segv-]
<f0ster> apeiros_: thats what I tried, it looks like my objects in my array are the same type of class that I read them from, in this case, it is Route
<f0ster> so I get an error saying there is no "each" on Route
<f0ster> @some_routes = Routes.each do |r| { name: route.name, ... } end
reset has joined #ruby
infinitiguy has joined #ruby
<f0ster> I thought the type of object in the array would be generic from the @vars = {} behaviour in the do loop
bean has quit [Quit: Computer has gone to sleep.]
segv- has joined #ruby
segv- has quit [Client Quit]
infinitiguy1 has joined #ruby
<f0ster> apeiros_: this is how I am getting the content exactly
<f0ster> routes= Rails.application.routes.routes.map do |route| {alias: route.name, path: route.path.spec.to_s, controller: route.defaults[:controller], action: route.defaults[:action]} end
infinitiguy1 has quit [Read error: Connection reset by peer]
<f0ster> I just want to loop over and print out all the key/values dynamically
infinitiguy1 has joined #ruby
infinitiguy has quit [Ping timeout: 252 seconds]
pavilionXP has quit [Ping timeout: 252 seconds]
<reactormonk> f0ster, #rubyonrails
<f0ster> reactormonk: not a rails question
<f0ster> is it ?
<reactormonk> f0ster, looks a lot like rails though
cha1tanya has joined #ruby
cha1tanya has quit [Changing host]
cha1tanya has joined #ruby
generalissimo has quit [Remote host closed the connection]
<f0ster> yeah i am using rails, but my question has to do with ruby
infinitiguy1 has quit [Read error: Operation timed out]
infinitiguy has joined #ruby
schaerli has joined #ruby
n1x has joined #ruby
h4mz1d has joined #ruby
hamfz__ has joined #ruby
<f0ster> reactormonk: or so I think, but I know little about ruby
<f0ster> I would assume that loop is returning a generic array of hashes
jonahR has joined #ruby
<ryanf> f0ster: it is
<ryanf> you're talking about looping over the "routes" var after running the line you just pasted, right?
statarb3 has quit [Quit: Leaving]
<f0ster> ryanf: yeah
pskosinski has quit [Ping timeout: 260 seconds]
<ryanf> so if you do routes.each, the thing it's passing into the block is a hash. then if you want the keys/values from that hash, you have to call .each on it too
<ryanf> is that not working?
<f0ster> and so I try to do an each on each hash in the routes array, but it says undefined each on Route, so it is still a Route object and not a generic hash object
<f0ster> correct
<ryanf> can you just gist your actual code?
solidoodlesuppor has quit [Quit: ChatZilla 0.9.89 [Firefox 17.0.1/20121128204232]]
nateberkopec has joined #ruby
froy has joined #ruby
<f0ster> well I am new to ruby and rails, but I am trying to dynamically make links to all of my controller actions in my rails application, so in the routes array I would do something like link_to "#{r.name} #{r.path}", or so I imagine, but path just looks like an address so I wanted to loop over everything in what I thought was the hash
fourq has quit [Quit: Lost terminal]
nemesit has quit [Quit: Leaving...]
<f0ster> I could easily print out all the properties from each Route object because they look few, just trying to learn a ruby trick
<f0ster> and understand more :)
Guest9041 has quit [Ping timeout: 245 seconds]
infinitiguy has quit [Read error: Operation timed out]
Guest9041 has joined #ruby
nateberkopec has quit [Client Quit]
gesman has quit []
mengu has joined #ruby
infinitiguy has joined #ruby
tommyvyo has joined #ruby
<f0ster> ryanf: it's strange.. definitely not doing what I expect. e.g., in my routes array I can't access r.controller, but I can access r.defaults[:controller], so it's like my new hash wasnt even made, and its just an array of the original objects
infinitiguy1 has joined #ruby
yshh has joined #ruby
ltsstar has quit [Quit: ltsstar]
Vert has joined #ruby
<Eiam> wonder how big this array is.. ap array.length > 5,048,466 =0
krisfremen has quit [Ping timeout: 252 seconds]
infinitiguy has quit [Ping timeout: 252 seconds]
RagingDave has quit [Read error: Connection reset by peer]
<ryanf> f0ster: you're probably calling .each instead of .map