fflush changed the topic of #ruby to: Ruby 1.9.3-p194: http://ruby-lang.org || Paste > 3 lines of text on pastebin.com
eignerchris has quit [Remote host closed the connection]
headius has quit [Quit: headius]
SiliconDon has joined #ruby
fyolnish_ has quit [Remote host closed the connection]
csquared has quit [Quit: Leaving.]
davidcelis has joined #ruby
fyolnish has joined #ruby
dinkytoy has quit []
kkimlabs has joined #ruby
headius has joined #ruby
axl_ has joined #ruby
punkrawkR has quit [Read error: Connection reset by peer]
ngoldman has quit [Remote host closed the connection]
mrdodo has quit [Remote host closed the connection]
fyolnish has quit [Ping timeout: 256 seconds]
wpaulson has quit [Quit: Colloquy for iPhone - http://colloquy.mobi]
jlogsdon_ has joined #ruby
t95341 has quit [Remote host closed the connection]
t42369 has joined #ruby
jlogsdon has quit [Ping timeout: 268 seconds]
T0m209847 has joined #ruby
T0m209847 has quit []
johnjohnson has quit []
melvinram has joined #ruby
nateberkopec has quit [Quit: Leaving...]
manizzle has quit [Ping timeout: 268 seconds]
Vert has quit [Read error: Connection reset by peer]
wmoxam has joined #ruby
csquared has joined #ruby
LouisGB has joined #ruby
jarek has quit [Quit: jarek]
heftig has quit [Ping timeout: 245 seconds]
heftig has joined #ruby
csquared has quit [Ping timeout: 244 seconds]
axl_ has quit [Quit: axl_]
jjang has quit [Remote host closed the connection]
adamkittelson has quit [Ping timeout: 248 seconds]
pdelgallego has quit [Quit: pdelgallego]
RegEchse has quit [Quit: <3 WeeChat (v0.3.9-dev)]
specialGuest has quit [Quit: WeeChat 0.3.8]
__class__ has quit [Ping timeout: 264 seconds]
justsee has quit [Quit: Leaving...]
thunderstrike has quit [Remote host closed the connection]
axl_ has joined #ruby
chrisja has quit [Quit: leaving]
x77686d_ has joined #ruby
x77686d_ has quit [Read error: Connection reset by peer]
x77686d_ has joined #ruby
Z_Mass has quit [Ping timeout: 248 seconds]
<shevy> man
<shevy> I just had oddity in old code I wrote once
<shevy> case user_input
<shevy> when 'convert'
<shevy> # here, about 15 lines of special handling, then:
<shevy> convert(arguments)
LouisGB has quit []
x77686d has quit [Ping timeout: 244 seconds]
x77686d_ is now known as x77686d
<shevy> it killed me mentally to sanitize the arguments twice
<shevy> once outside the convert() method, and additionaly once inside the convert method
csquared has joined #ruby
<shevy> and I ended up asking myself "why did I do this back then ... why..."
<shevy> it kept me busy for 20 minutes
niklasb has quit [Ping timeout: 248 seconds]
<shevy> until I simply rewrote the convert() method from scratched and discarded the crap 15 lines too
linoj has quit [Quit: linoj]
<shevy> *from scratch
savage- has quit [Ping timeout: 244 seconds]
<Sou|cutter> I like subtracting lines
justsee has joined #ruby
justsee has quit [Changing host]
justsee has joined #ruby
linoj has joined #ruby
<shevy> yeah
statarb3 has quit [Read error: Operation timed out]
<shevy> but I also wondered why it is outside the method
rudyl313 has quit [Quit: Page closed]
<shevy> methods really tidy up things
x77686d has quit [Ping timeout: 265 seconds]
SQLStud has quit [Read error: Connection reset by peer]
pu22l3r has quit [Remote host closed the connection]
pu22l3r has joined #ruby
artOfWar has quit [Remote host closed the connection]
dmiller has quit [Remote host closed the connection]
iamjarvo has joined #ruby
wallerdev has quit [Quit: wallerdev]
infinitiguy has quit [Quit: Leaving.]
t42369 has quit [Remote host closed the connection]
t1977 has joined #ruby
wallerdev has joined #ruby
jjang has joined #ruby
jjang has quit [Remote host closed the connection]
tiripamwe has joined #ruby
c0rn_ has quit [Ping timeout: 244 seconds]
fyolnish_ has joined #ruby
wmoxam has quit [Ping timeout: 244 seconds]
luist has joined #ruby
nateberkopec has joined #ruby
macmartine has joined #ruby
kenneth has quit [Quit: kenneth]
wmoxam has joined #ruby
nateberkopec has quit [Client Quit]
SiliconDon has quit [Quit: SiliconDon]
sirish has joined #ruby
randomau_ has quit [Remote host closed the connection]
csquared has left #ruby [#ruby]
g_rotbart has joined #ruby
dmiller has joined #ruby
brianpWins has quit [Quit: brianpWins]
wpaulson has joined #ruby
reset has quit [Read error: Connection reset by peer]
<staunch> i am playing with mechanize, i do agent.get('login url'), then i login correctly with forms, then i do agent.get'different url') and i loose the login session
<staunch> any advise
<staunch> for changing pages and keeping persistence
reset has joined #ruby
awarner has joined #ruby
macmartine has quit [Quit: Computer has gone to sleep.]
blazes816 has quit [Quit: This computer has gone to sleep]
dmiller has quit [Ping timeout: 268 seconds]
freeayu has joined #ruby
alvaro_o has quit [Quit: Ex-Chat]
axl_ has quit [Quit: axl_]
<seanstickle> staunch: code examples, pleez
c0rn_ has joined #ruby
M- has joined #ruby
chendo has quit [Ping timeout: 252 seconds]
wpaulson has quit [Quit: Colloquy for iPhone - http://colloquy.mobi]
Guedes has joined #ruby
Guedes has quit [Changing host]
Guedes has joined #ruby
iori has joined #ruby
quest88 has joined #ruby
kiyoura has joined #ruby
<Sou|cutter> staunch: looks like you need to get the return value login_form.submit
<staunch> i fixed it
<staunch> i made a dumb mistake...
<Sou|cutter> and oh wait actually
<staunch> i actually just had the wrong password in
<staunch> so sumb
<staunch> sorry
<Sou|cutter> LOL
araujo has joined #ruby
araujo has quit [Changing host]
araujo has joined #ruby
<seanstickle> staunch: :)
<seanstickle> staunch: rubber duck debugging
<Sou|cutter> seanstickle: you talk to ducks too? :)
<staunch> jeje
<staunch> one thing thats weird is if include these init variables, it doesn't work...
<staunch> @a.user_agent = 'Individueller User-Agent'
<staunch> @a.user_agent_alias = 'Linux Mozilla'
<staunch> @a.open_timeout = 3
<staunch> @a.read_timeout = 4
<staunch> @a.keep_alive = false
<staunch> @a.max_history = 0 # reduce memory if you make lots of requests
<staunch> sorry shouldn't have done that
<staunch> with the pste
Know1edge has quit []
linoj has quit [Quit: linoj]
melvinram has quit [Quit: melvinram]
machty has quit [Ping timeout: 264 seconds]
brianpWins has joined #ruby
ringotwo has joined #ruby
<shevy> hey guys
<shevy> let's say I have data like this:
<shevy> 63 Celsius are 145.400 Fahrenheit.
<shevy> 64 Celsius are 147.200 Fahrenheit.
<shevy> 65 Celsius are 149.000 Fahrenheit.
<shevy> Now I was thinking
<shevy> I could turn this into a bunch of arrays like
<shevy> [63, 145.400]
w400z has quit []
<shevy> does anyone know if, given a bunch of data like that, a computer program could find out the algorithm in use?
<shevy> the formula at hand would be
tommyvyo has joined #ruby
tommyvyo has joined #ruby
tommyvyo has quit [Changing host]
<shevy> (63.to_f * 9 / 5) + 32 # => 145.4
Brainix has quit [Quit: Brainix]
<shevy> I'd like the computer to tell me that formula though
ringotwo has quit [Remote host closed the connection]
<davidcelis> yes
<davidcelis> treat them like coordinates, graph the line
<davidcelis> the formula is the line
<seanstickle> shevy: or use some of that neat genetic algorithm stuff
daidoji has joined #ruby
<seanstickle> shevy: or, you know, statistical regression
dmiller has joined #ruby
Hanmac1 has joined #ruby
manizzle has joined #ruby
luxurymode has joined #ruby
<shevy> oh
<shevy> treating them like coordinates, that is actually a nice idea
<daidoji> hello Ruby
<daidoji> I'm in here once again with the same question from the other night
Hanmac has quit [Ping timeout: 252 seconds]
<shevy> seanstickle: I know what coordinates are, but when it comes to "statistical regression", I am big big noob :)
<daidoji> is there a gem or some kind of markdown tool that I can feed ruby code into in order to get markup like on ruby-lang.org?
erichmenge has joined #ruby
<shevy> daidoji are you from japan?
<seanstickle> shevy: you have Excel or some other number crunchy thing?
<daidoji> shevy, I'm afraid not
<shevy> seanstickle hmm... on my laptop downstairs... yeah
tiripamwe has quit [Ping timeout: 244 seconds]
<seanstickle> shevy: You plunk in the data, and it'll give you the linear equation.
sirish has quit [Ping timeout: 256 seconds]
<seanstickle> shevy: easy peasy
<shevy> daidoji, I dont know much about markup... for .md files I use Kramdown ... Kramdown::Document.new(File.read("this_file.md")).to_html other than that hmm... I use coderay when I need to parse code formatted something via colours
ryanf has joined #ruby
enyo has quit [Read error: Connection reset by peer]
<shevy> seanstickle cool, did not know that. will test that tomorrow then
<daidoji> shevy, wait what?
enyo has joined #ruby
Anonyneko has left #ruby ["Once you know what it is you want to be true, instinct is a very useful device for enabling you to know that it is"]
Guedes has quit [Quit: Saindo]
shadoi has quit [Quit: Leaving.]
jhchabran has quit [Read error: Connection reset by peer]
shadoi has joined #ruby
shadoi has quit [Remote host closed the connection]
gfontenot has quit []
jhchabran has joined #ruby
chrstphrhrt has joined #ruby
apok has quit [Ping timeout: 244 seconds]
minijupe has joined #ruby
jjbohn has joined #ruby
chrstphrhrt has left #ruby [#ruby]
chrstphrhrt has joined #ruby
naz has joined #ruby
t1977 has quit [Remote host closed the connection]
t41092 has joined #ruby
chrstphrhrt has quit [Quit: chrstphrhrt]
pskosinski has quit [Remote host closed the connection]
khakimov has joined #ruby
mrsolo has quit [Quit: This computer has gone to sleep]
ckrailo has quit [Quit: Computer has gone to sleep.]
mascool has quit [Ping timeout: 240 seconds]
dpk has quit [Quit: Asleep at the keyboard.]
cj3kim has joined #ruby
cj3kim has quit [Changing host]
cj3kim has joined #ruby
<daidoji> :-( ruby-lang webmaster says its all edited by hand
<daidoji> thats lame
justsee has quit [Quit: Leaving...]
<daidoji> guess I have a new project although i feel like someone should have written this before now
ScottNYC has quit [Quit: ScottNYC]
seanwash has joined #ruby
nari has joined #ruby
pipopopo has quit [Ping timeout: 240 seconds]
pipopopo has joined #ruby
jjbohn has quit [Quit: Leaving...]
<koshii> When I type hash = Hash.new([]) and then hash[:one] << "uno", why can't I see "uno" when I type hash into irb?
<koshii> I just see []
Chryson has joined #ruby
dmiller has quit [Remote host closed the connection]
darren has quit [Remote host closed the connection]
ilyam has joined #ruby
shadoi has joined #ruby
dmiller has joined #ruby
<koshii> And why does hash[:three] show ["uno", "dos"] even though I did not ever put a third value into the hash?
krz has quit [Quit: krz]
<koshii> Because it's the same object ID?
pipopopo has quit [Ping timeout: 264 seconds]
<fowl> >> hash = Hash.new([]); hash[:one] << "uno"
<al2o3cr> (Array) ["uno"]
<fowl> koshii: array#<< returns the array so you can chain them
<fowl> >> x = [1,2]; x << 3 << 4 << 5; x
pipopopo has joined #ruby
<al2o3cr> (Array) [1, 2, 3, 4, 5]
<koshii> fowl: OK, so why does hash[:two] also return "uno" though?
<fowl> >> hash = Hash.new([]); hash[:one] << "uno"; hash[:two] << "foo"; p hash
<al2o3cr> (Hash) {}, Console: {}
<koshii> or hash[:three] etc
<koshii> Oh holy shit I just realized that you're typing ruby code into IRC and it's executing :)
dmiller has quit [Ping timeout: 246 seconds]
<koshii> fowl: I see that behavior but I don't understand it.
<fowl> >> h = Hash.new({}); h[:herro][:there] = 43; h[:default][:values] = :will_screw_you; h.inspect
<al2o3cr> (String) "{}"
<fowl> i dont get why that doesnt work
<koshii> What SHOULD happen?
<fowl> ah i see
<fowl> koshii: the arg is default value, in this case every time you add to the hash without the key existing its adding to the default array
<fowl> >> h = Hash.new({}); h[:herro][:there] = 43; h[:default][:values] = :will_screw_you; h.default
<al2o3cr> (Hash) {:there=>43, :values=>:will_screw_you}
<koshii> fowl: Wait, so a hash CONTAINS arrays?
CarlB_the_great has joined #ruby
wo66le has joined #ruby
<koshii> fowl: Is that its primary function? I thought it was a container with kind-of pointers.
<fowl> koshii: no, when you do Hash.new([]) you're setting that empty array as the default value
<koshii> Yes
<koshii> Oh I see. And then I'm popping values into the ARRAY inside the hash?
<koshii> That's why they didn't appear when I wrote hash into irb
<koshii> (Which only slightly makes sense)
<fowl> koshii: instead of saying the default value should be an empty array, you're saying the default value should be this array
t41092 has quit [Remote host closed the connection]
CarlB_the_great has quit [Remote host closed the connection]
<koshii> Oh.
t23010 has joined #ruby
<koshii> fowl: So that still doesn't explain for me why "hash" doesn't return something, unless the array that I'm defaulting to is not contained within the hash?
macer1 has joined #ruby
<koshii> fowl: "hash" only returns something if I add hash[:one] etc
<fowl> ^^
<koshii> fowl: Sorry man, if I'm too dense!
<fowl> you can get to it by calling hash#default
<koshii> But actually that too just returns {}
voodoofish430 has quit [Quit: Leaving.]
<koshii> >> hash = Hash.new([]) ; hash[:one] << "uno" ; hash[:two] << "dos"
<al2o3cr> (Array) ["uno", "dos"]
<examancer> I have a class and I would like to dynamically mixin methods from a list of possible modules based on configuration options passed to #initialize. Is there any way to do this?
<koshii> >> hash
<al2o3cr> (Fixnum) -612620884310714677
<koshii> Oh, strange. In my irb it returns {}
<koshii> >> hash = Hash.new([]) ; hash[:one] << "uno" ; hash[:two] << "dos" ; hash
<al2o3cr> (Hash) {}
<koshii> There we go.
<fowl> >> h = Hash.new do |h, k| h[k] = [] end; h[:a] << 20; h[:b] << 30; h
<al2o3cr> (Hash) {:a=>[20], :b=>[30]}
<examancer> I can't use `include` in instance scope, class_eval would permanently modify the class, so not sure how to do it
<koshii> fowl: Does my situation/question make sense? I still don't think I have it.
<koshii> >> hash = Hash.new([]) ; hash[:one] << "uno" ; hash[:two] << "dos" ; hash
<al2o3cr> (Hash) {}
<koshii> ^ why does this return {}
ryan0x2 has quit [Remote host closed the connection]
<koshii> That's the only question really. For now. :-)
<fowl> koshii: because you havent put them in the hash
<fowl> koshii: see the block form of Hash.new
<koshii> fowl: But isn't the array in the hash?
Banistergalaxy has quit [Ping timeout: 260 seconds]
<koshii> Heh. Let me read this doc and see if it makes more sense. I don't want to bug you.
<examancer> koshii: you modified the default object, which is an array, so you've added them to the default array but not the hash itself
<fowl> koshii: no, you're setting a default object that will be returned when the key is missng, thats all Hash.new(x) does
<examancer> what does hash.default give you?
<examancer> probably an array with your missing values
<koshii> >> hash = Hash.new([]) ; hash[:one] << "uno" ; hash[:two] << "dos" ; hash ; hash.default
<al2o3cr> (Array) ["uno", "dos"]
<koshii> Aha
<fowl> koshii: read that it will clear everything up
Banistergalaxy has joined #ruby
<fowl> >> h = Hash.new do |h, k| h[k] = [] end; h[:koshii] << 329; h[:oh_my_koshii] << :"<3"; h
<al2o3cr> (Hash) {:koshii=>[329], :oh_my_koshii=>[:"<3"]}
<examancer> you should use something like (hash[:one] ||= []) << "uno" and not even bother with the default
<koshii> :D
radic has quit [Disconnected by services]
radic_ has joined #ruby
infinitiguy has joined #ruby
radic_ is now known as radic
baroquebobcat has joined #ruby
<koshii> examancer: Much appreciated. I'm just learning ruby though, doing the Koans. I have to kind of follow the guide for now.
jasonkuhrt has joined #ruby
<davidcelis> >> users = Hash.new { |h, k| h[k] = "sux" }; users[:davidcelis]
<al2o3cr> (String) "sux"
uris has joined #ruby
<davidcelis> al2o3cr: fuck you
<koshii> ;-)
<koshii> That al2o3cr thing is really neat. Who wrote that?
chimkan_ has left #ruby [#ruby]
<fowl> someone who sucks at thinking up robot names
andrewstewart has quit [Quit: Linkinus - http://linkinus.com]
<koshii> :-)
baroquebobcat has quit [Client Quit]
<koshii> Hey I was reading this book by a guy called "Why" and read a bit about him on Wikipedia. Does anyone know why he wanted to be anonymous in the first place? Was he working for some big company that wouldn't let him do that kind of work or something?
maletor has quit [Quit: Computer has gone to sleep.]
<seanwash> Oh, you mean Why the lucky stiff?
<koshii> seanwash: Yeah.
<daidoji> why not?
Agis__ has joined #ruby
Taichouchou2 has joined #ruby
<seanwash> koshil: yeah, I don't know.
<koshii> Heh
<fowl> koshii: the internet is full of crazies, anonymity is sensible
<koshii> I mean, it's neat. I don't have some issue with it, I'm just wondering.
<fowl> plus it made him mythical, like batman
<koshii> Exactly what I was about to say.
<seanwash> I concur.
<examancer> Nobody really knows why _why wanted so much privacy, but its not difficult to come up with plausible explanations
<rking> I think _why was just odd. I wouldn't try to rationalize it in any standard way.
<koshii> fowl: Hey thanks for that ruby-doc link; I think I've got it now.
<koshii> examancer: What's the leading theory? :-)
<examancer> i just find it sad that he decided he no longer wanted to participate in the Ruby community
<rking> Yes, sad.
pdtpatrick has quit [Quit: pdtpatrick]
maletor has joined #ruby
<koshii> Maybe he did what he came to do. :-)
<rking> Like E.T.
<examancer> koshii: I've read some stuff that has tracked him down and contacted him. He just wants to be left alone. that's explanation enough for me.
<koshii> Yeah, it makes sense. It's a lot of work maintaining a public personality, too.
<examancer> he will be missed. he was a good developer, and a great educator
<koshii> I can understand why he might not want to.
<koshii> examancer: For all we know he might be educating and developing under yet another alias. :-)
<examancer> he's clearly still a developer from what I've read... just not a very public one unless he is using a very distinct persona
<koshii> examancer: I guess it's not too hard to do.
bapa has joined #ruby
<fowl> you guys dont think he went back to his home planet?
<koshii> :-)
<examancer> we can all only hope to have the impact on a community that _why had on Ruby
<koshii> Please launch your funny educational books this way. :-)
<koshii> I'm happy to beta-test
<examancer> heh
<koshii> Hey is there anything like Squeak-Smalltalk's cool method browser for Ruby?
<koshii> Morphic
<koshii> Actually I'm sorry, that's not what it's called. But do you guys know what I'm talking about?
<fowl> koshii: there is pry
<koshii> fowl: I installed that!
<koshii> fowl: I didn't get it. :(
<fowl> koshii: install the pry-doc gem and you have access show-doc and show-source commands
<fowl> show-doc "Hello".chomp
<fowl> koshii: its irb improved with more introspection magic. you can cd into an object and explore it with ls
<koshii> fowl: Yeah I played around with it. By "I didn't get it" I guess I just mean that I didn't find it very intuitive.
bapa has quit [Quit: http://quassel-irc.org - Chat comfortably. Anywhere.]
savage- has joined #ruby
<rking> koshii: It's definitely the method-browser equivalent you're looking for.
bapa has joined #ruby
<rking> cd Class then ls then ? a_method then $ a_method
<fowl> koshii: well it really becomes useful when you're debugging. you have a problem line that throws exceptions you can put a binding.pry in your code before it hits that expression and when ruby hits it, pry will open at that spot, you can see all local variables and walk around in your program like neo in the matrix
<rking> (? == show-doc, $ == show-source)
<koshii> rking: I mean something like this... http://4.bp.blogspot.com/_vRf06BYw_gg/S9SXv2La7UI/AAAAAAAAADE/5mxhHgi6U2o/s1600/Squeak3-9.png ("System Browser")
<koshii> Ideally with a gui :-)
<rking> koshii: Yeah, I know Squeak. pry gives you that, but without the GUI (currently)
<koshii> fowl: Oh that's cool.
IrishGringo has quit [Quit: ChatZilla 0.9.88.2 [Firefox 15.0/20120824154833]]
<koshii> fowl: Kind of like gdb breakpoints for Ruby?
<examancer> I love how flexible ruby is. Finally figured out how to do the meta-programming trick i needed.
<koshii> rking: I'll play with it some more then.
<rking> koshii: If you install pry-debugger, it'll have breakpoints, yes.
<examancer> I don't love how more the docs are around some of the most important meta-programming features though
<rking> koshii: Ask us (here or in #pry) whenever you get stuck trying a particular task.
darren has joined #ruby
<koshii> Will do.
<examancer> i mean how POOR the docs are
<koshii> Did one of you guys author pry?
<rking> examancer: Metaprogramming Ruby ( http://pragprog.com/book/ppmetr/metaprogramming-ruby ) is a great read. Not as wizardish as the title sounds.
<davidcelis> koshii: some people in here work on it
<rking> koshii: About 3 lines of it. Does that count? =D
<examancer> that would be awesome if one of the pry authors was in here. hats off to you if you are!
<davidcelis> koshii: Banistergalaxy is the main author, Mon_Ouie also helps write it as far as i can tell
<rking> fowl posts Youtube links to #pry. Does that count?
<koshii> rking: Sure!
etank has quit [Ping timeout: 276 seconds]
<fowl> rking: i have a commit under my belt thank you
IrishGringo has joined #ruby
<rking> Haha
<examancer> crucial method I needed for my library: http://www.ruby-doc.org/core-1.9.3/Module.html#method-i-extended ... "not documented"
jerrett has quit [Quit: jerrett]
<davidcelis> examancer: well dude all it does is return Qnil
<davidcelis> what do you want them to do, document that it returns Qnil? ;)
<koshii> Pry feels vaguely emacs-ish to me, in the sense that it's this monolithic do-everything tool. I wonder how far this is going to go. :-)
<fowl> davidcelis: thats because it's supposed to be overwritten
<examancer> it would be nice if the document clearly spelled out that the method is triggered with a module has been extended into a something
<examancer> and that the object which extended it is passed as the only argument
jrajav has joined #ruby
<examancer> and that you should overwrite it if you want to trigger further action when your module is extended
etank has joined #ruby
wo66le has quit [Quit: Computer has gone to sleep.]
<rking> koshii: Good intuition. Banister is an emacs-head. IMO the balance between "small tools that do their job well" and "monolithic beasts" is an ebb and flow. Solutions from one inform the other.
AnarchoTroll has joined #ruby
<koshii> rking: Heh. No doubt.
<examancer> davidcelis: what is Qnil anyways? is that different than regular nil?
<davidcelis> examancer: some C construct
<davidcelis> I haven't done much source diving into Ruby aside from finding out how Symbols are implemented
<rking> Qnil is the C token to mean Ruby's nil.
<examancer> ah. cool
<Banistergalaxy> Qnil == nil, yeah
<koshii> So who here has done something with RubyMotion already?
<examancer> i wanted it so when an instance of class A extends module B, that module B would then also mixin/extend module C into instance A
<davidcelis> Banistergalaxy: oh hey looks like you have some fanboys in here banister
<bnagy> examancer: I guess they want you to use extend_object, not extended
<bnagy> which _is_ documented
<examancer> bnagy: would that allow me to do the same thing? looking at it now
<examancer> my library will need to work with 1.8, so looking there as well...
jasonkuhrt has quit [Quit: Leaving...]
<examancer> looks like it works in both. thanks. i'll use that instead
stillEPIK has joined #ruby
EPIK has quit [Ping timeout: 264 seconds]
<rking> Hehe, 2 things to note: http://www.ruby-doc.org/core-1.9.3/Class.html 1) Whoa, you can override "new" itself, and simply. 2) That's a funny diagram.
stillEPIK has quit [Client Quit]
shadoi1 has joined #ruby
EPIK has joined #ruby
areil has joined #ruby
<examancer> kind of odd that initialize isn't documented there... nor is it documented anywhere else in the core docs
<examancer> or at least not where i could find
diegoviola has quit [Ping timeout: 245 seconds]
daidoji has quit []
shadoi has quit [Ping timeout: 244 seconds]
<examancer> guess there is a reference to it in Class#new
SegFaultAX has joined #ruby
joshw701 has joined #ruby
adamkittelson has joined #ruby
<bnagy> the rdocs are admittedly not a great place for understanding core 'how things work' concepts
<bnagy> they're tactical, method by method docs
jeff_sebring has joined #ruby
dr_diamond has joined #ruby
dr_diamond has quit [Changing host]
dr_diamond has joined #ruby
phanousit has joined #ruby
phanousit is now known as siameseguy
<examancer> yeah. for better or worse PHP docs do both. about the only thing i still like about PHP over Ruby
eignerchris has joined #ruby
<siameseguy> hello, I'm getting a "nil is not a method error for my code: http://pastie.org/4614105. can someone help me?
wmoxam has quit [Ping timeout: 268 seconds]
awarner has quit [Remote host closed the connection]
<examancer> not sure where to find that kind of "how things work" info about Ruby without searching google and SO
<siameseguy> whoops i meant "nil is not a symbol" error
<rking> siameseguy: After the first time the .call() runs, the return value is assigned to next_room.
dr_diamond has quit [Client Quit]
<rking> Which in this case is the nil coming back from the puts 'This is the main hallway.'
<examancer> siameseguy: on the first loop it will find the method #main_hallway, but that method returns nil
<examancer> so on the next loop it will call method(nil) which doesn't make sense
jrajav has quit [Quit: The best darkness is strange and surprising]
<siameseguy> examancer: so its because the method is empty?
<rking> Add :main_hallway (on a line by itself) after line 17 and you'll forever be stuck in the main hallway, but it won't error.
jenrzzz has quit [Ping timeout: 246 seconds]
<examancer> siameseguy: the problem is you are assigning the return value of main_hallway to next_room, and main_hallway doesn't return anything but nil
stanzgy has joined #ruby
<siameseguy> ok i think i ge tit
eignerchris has quit [Remote host closed the connection]
<bnagy> try next_room = room.call || :lost_in_void
adamkittelson has quit [Remote host closed the connection]
<examancer> rking's solution would work. seems inevitable that you are going to either get an error or an infinite loop with the direction you are going
<siameseguy> it was an infinite loop
<bnagy> def def lost_in_void; "You are lost in the void because my programmer screwed up. You die."; exit; end
<examancer> i like bnagy's solution :-)
<siameseguy> i plan to add more rooms, so hopefully it will be ok
<bnagy> also please get rid of all the ()
<siameseguy> ok will do
<bnagy> this is not python
<siameseguy> haha
<siameseguy> this is just my engine to move me from room to room
wmoxam has joined #ruby
n_blownapart has joined #ruby
brianpWins has quit [Quit: brianpWins]
cakehero has joined #ruby
koshii has quit [Ping timeout: 244 seconds]
savage- has quit [Remote host closed the connection]
<rking> bnagy: Heck yes. I already played all my superfluous-()-hate cards for today, but I'm right there with you.
Agis__ has quit [Quit: Agis__]
jorge has joined #ruby
sirish has joined #ruby
<n_blownapart> hi I looked at Logger methods, but cannot find a "logfile method which returns a writable file handle on a log file." what would this method look like? thanks.
<fowl> i figured out how to divide by 2!!
<fowl> >> (->(a){->(b){a[b]}}[->(c){c/2}])[40]
<al2o3cr> (Fixnum) 20
Schmidt has quit [Ping timeout: 264 seconds]
koshii has joined #ruby
<examancer> >> 1+1
<al2o3cr> (Fixnum) 2
<examancer> i didn't know that was there!
infinitiguy has quit [Quit: Leaving.]
<fowl> >> ->(a)do->(b){a[b]}end.(->(c){c/2}).(420)
<al2o3cr> (Fixnum) 210
<dekz> is there something else like sprinkle that is actually functional?
pdtpatrick has joined #ruby
<fowl> look at it, its beautiful (*´▽`*)
savage- has joined #ruby
pu22l3r has quit [Ping timeout: 268 seconds]
pingfloyd has joined #ruby
himsin has quit [Ping timeout: 256 seconds]
luxurymode has quit [Quit: Computer has gone to sleep.]
pdtpatrick has quit [Client Quit]
<examancer> >> ENV["RUBY_VERSION"]
<al2o3cr> (NilClass) nil
bradhe has quit [Remote host closed the connection]
<examancer> >> `ruby -v`
<al2o3cr> (String) "ruby 1.9.3p194 (2012-04-20 revision 35410) [x86_64-linux]\n"
<examancer> :-)
ilyam has quit [Quit: ilyam]
<n_blownapart> kindly inform me about " a logfile method that returns a writeable file handle on a log file means, if you have time. thanks
<n_blownapart> strike: means ^^
skyjumper has left #ruby [#ruby]
maletor has quit [Quit: Computer has gone to sleep.]
jlogsdon_ has quit [Remote host closed the connection]
<examancer> n_blownapart: sounds like you just want to open a file in a writable way, it just so happens that the file is a log file. see File#new
mwilson_ has quit [Excess Flood]
reset has quit [Ping timeout: 256 seconds]
mwilson_ has joined #ruby
<n_blownapart> thanks examancer but how would it write a file "handle" . that is not an assignment, ie "fh" ?
zhutingting has joined #ruby
<examancer> File#new returns a file object, which internally has a handle on the file. you can then use methods like #write, #rewind, #read on that object
kiyoura has quit [Quit: Leaving]
<n_blownapart> oh so its internal, just assign say fh = File.new ? the method would be for lines 7 and 8 here: http://pastie.org/4614217 examancer
<bnagy> ugh
<bnagy> n_blownapart: never write code like that
erichmenge has quit [Quit: Linkinus - http://linkinus.com]
<bnagy> either use the block form to File.open or wrap your code with begin ... ensure; fh.close; end
zhutingting has quit [Read error: Connection reset by peer]
<n_blownapart> ugh. I'm just following the book. bnagy ensure is the next chapter topic examancer
<bnagy> which book has code like that?
<n_blownapart> the well-grounded rubyist david black bnagy pax
jrist is now known as jrist-afk
<deryl> love that book
<bnagy> the well grounded rubyist opens a filehandle and doesn't use the block form or ensure close?
<bnagy> which page?
<n_blownapart> god deryl bnagy it got great reviews just trying to learn this shit. ensure comes on the following page to this code.
x77686d has joined #ruby
ananthakumaran has joined #ruby
<bnagy> ok well if you want to learn page by page from the book, then don't ask here, it will mess up your careful learning checdule
<bnagy> *schedule
<deryl> hehe, you might want to read through the entire chapter (or at least the complete section) before you ask
uris has quit [Quit: leaving]
<deryl> the way david breaks it down, waiting the whole chapter is probably the best way. I found that a notepad next to me for the tangents i thought of really helped
banisterfiend` has joined #ruby
bbloom has joined #ruby
<n_blownapart> deryl: ok thanks , I was doing decently until now.
seanstickle has quit [Quit: seanstickle]
<seanwash> Can you guys recommend any books that don't necessarily teach syntax, but teach how to think as a programmer? Or maybe ways to go about solving problems that programmers generally come across?
Banistergalaxy has quit [Ping timeout: 245 seconds]
freeayu has quit [Quit: This computer has gone to sleep]
mwilson_ has quit [Excess Flood]
AnarchoTroll has quit [Quit: Leaving]
mwilson_ has joined #ruby
<seanwash> I feel like I'm learning syntax ok, but knowing what to do with that syntax is where I struggle!
<bnagy> 'learn to program' is often recommended
<seanwash> bnagy: hokay
<bnagy> I'll be honest, though, imo thinking like a programmer is learned through use
<banisterfiend`> n_blownapart:didnt u send me an email saying u were banned? :P
<bnagy> reading and writing code
williamherry has joined #ruby
<seanwash> bnagy: That's true
<seanwash> bnagy: good point
<n_blownapart> banisterfiend`: bnagy you guys should just crucify me and get it over with.
jenrzzz has joined #ruby
<bnagy> doesn't matter what language
<williamherry> I already installed rails use gem install rails, and I can see rails from gem list, but rails command is not available, more step should I do?
<banisterfiend`> n_blownapart: no, i thought you were saying you were actually banned --- banned means you were ip address is blocked from joining this channel and you can't send messages here
<bnagy> williamherry: you could try #rubyonrails
<bnagy> or google rails install guide or something
<rking> bnagy: Hrm. His problem sounds like a gem path one, not sure if it's necessary to deflect to rails.
<n_blownapart> banisterfiend`: why for asking questions which are too basic?
<rking> williamherry: What about this one?: gem install pry then pry
headius has quit [Quit: headius]
<n_blownapart> banisterfiend`: by the way learning pry is no cake walk either.
<banisterfiend`> n_blownapart: how come? it's just IRB with a few extra commands :)
<n_blownapart> banisterfiend`: its very cool. I got through the Josh Cheek video. it was fun. at least I enjoy it but sorry to be a nuisance.
macmartine has joined #ruby
cj3kim has quit [Quit: Leaving]
sirish has quit [Ping timeout: 245 seconds]
<n_blownapart> banisterfiend`: did the pry show-doc command get replaced recently by show-source ?
<banisterfiend`> n_blownapart: no, they're different commands. show-doc shows documentation, show-source shows source code
<banisterfiend`> y?
emmanuelux has quit [Ping timeout: 246 seconds]
<n_blownapart> banisterfiend`: I was hung up on that for like a day, then I realized it could have been josh cheek mistake in the narration.
<banisterfiend`> hung up on it for a DAY? :P dude, u can always just type 'help' in pry
<ryanf> oh, that josh cheek screencast is really old
<banisterfiend`> and it tell su what the commands too, alternatively check out the wiki
<ryanf> there's probably lots of stuff that has changed
<banisterfiend`> do*
<banisterfiend`> that's true
<n_blownapart> banisterfiend`: exaggeration, but I was glad to figure it out I would say... :)
<banisterfiend`> cool
jerrad has quit [Quit: Leaving...]
seanwash has quit [Quit: Leaving.]
aristidesfl has quit []
<n_blownapart> banisterfiend`: others highly recommend pry as a way to learn it so thanks..
koshii has quit [Ping timeout: 252 seconds]
koshii has joined #ruby
Hanmac1 has quit [Read error: Operation timed out]
brianpWins has joined #ruby
adeponte has joined #ruby
ilyam has joined #ruby
ilyam has quit [Client Quit]
adeponte has quit [Remote host closed the connection]
mml has quit [Quit: leaving]
zodiak has joined #ruby
Hanmac has joined #ruby
c0rn_ has quit []
td123 has joined #ruby
jankly_ has quit [Quit: Leaving]
kenneth has joined #ruby
vivien__ has joined #ruby
kenneth has quit [Quit: kswizz.com]
seanyo has joined #ruby
c0rn_ has joined #ruby
c0rn_ has quit [Client Quit]
burgestrand has quit [Quit: Leaving.]
cakehero has quit [Quit: Computer has gone to sleep.]
c0rn_ has joined #ruby
Hanmac has quit [Ping timeout: 245 seconds]
quest88 has left #ruby [#ruby]
Agis__ has joined #ruby
drago757 has joined #ruby
Hanmac has joined #ruby
td123 has quit [Quit: WeeChat 0.3.8]
x77686d has quit [Quit: x77686d]
Spooner has quit [Read error: Connection reset by peer]
Agis__ has quit [Client Quit]
iamjarvo has quit [Ping timeout: 244 seconds]
drago757 has quit [Read error: Connection reset by peer]
drago757 has joined #ruby
tonini has joined #ruby
Progster has quit [Ping timeout: 245 seconds]
jenrzzz has quit [Ping timeout: 244 seconds]
aidanna has quit [Quit: Ex-Chat]
seanyo_ has joined #ruby
sailias has joined #ruby
nesoi has joined #ruby
<nesoi> what's the best way to install ruby 1.9 on osx?
anybody has joined #ruby
yasushi has joined #ruby
seanyo has quit [Ping timeout: 264 seconds]
<banisterfiend`> nesoi: rvm or rbenv
<nesoi> not rubyforge rubyosx?
yoklov has joined #ruby
<nesoi> I tried before and had all kinds of problems
larissa has quit [Quit: Leaving]
<nesoi> it was not finding various libraries
Foxhoundz has joined #ruby
<anybody> looks like a nice offer O.o http://bit.ly/OKPy9u
<Foxhoundz> Good god
<Foxhoundz> Why does Ruby have such loose syntax
c0rn_ has quit []
jorge has quit [Remote host closed the connection]
<Foxhoundz> I have to learn Ruby and RoR and create a web application with it in three months
<Foxhoundz> and it's no "hello world" app either
<nesoi> or someone will kill your relatives?
<Foxhoundz> nesoi, perhaps
<banisterfiend`> Foxhoundz: what in particular are you referring to
<nesoi> so, rubyosx, no one likes or dislikes it?
<Foxhoundz> banisterfiend`, Ruby itself doesn't seem so hard to understand
<Foxhoundz> it's RoR
<Foxhoundz> the lack of control over database
coyo has joined #ruby
coyo has quit [Changing host]
coyo has joined #ruby
<nesoi> hmm. last updated 2009
c0rn_ has joined #ruby
<banisterfiend`> Foxhoundz: that wasnt what you just said, and i quote: "Why does Ruby have such loose syntax" ;)
<Foxhoundz> And?
<Foxhoundz> You never answered it ;-)
deryl has quit [Quit: deryl]
<nesoi> so rvm or rbenv… which one? do I have to install xcode?
<anybody> xcode is so LARGE
<n_blownapart> nesoi: I think you need xcode off the install disk, first
ananthakumaran has quit [Quit: Leaving.]
kenneth has joined #ruby
<kenneth> hey there
td123 has joined #ruby
<kenneth> is there a way to read $stdin without buffering?
<kenneth> i'd like to get each character immediately as soon as it's typed
mwilson_ has quit [Excess Flood]
mwilson_ has joined #ruby
c0rn_ has quit [Ping timeout: 268 seconds]
anybody has left #ruby ["Leaving"]
<banisterfiend`> Foxhoundz: my question was what in particular were you referring to
<banisterfiend`> Foxhoundz: what loose syntax? :)
td123 has quit [Quit: WeeChat 0.3.8]
td123 has joined #ruby
drago757 has quit [Quit: drago757]
n_blownapart has quit [Remote host closed the connection]
c0rn_ has joined #ruby
<bnagy> kenneth: getc
<kenneth> bnagy: i just found out that the terminal itself buffers lines
<kenneth> unless you use ncurses
<kenneth> bnagy: so i'm gonna have to give up on that
<bnagy> well you can flush, or set sync
<bnagy> I don't advise ncurses
<ryanf> kenneth: in theory you can use stty to disable that
<bnagy> I like the answer that suggests highline, btw
<kenneth> ah neat
<bnagy> since it sounds like you're making a console app, it will help in a lot of other ways as well
<fowl> STDIN.getch
sailias has quit [Ping timeout: 264 seconds]
c0rn_ has quit [Client Quit]
<fowl> getc is laem
<bnagy> at least it exists
<fowl> >>require'io/console'
<al2o3cr> (TrueClass) true
jenrzzz has joined #ruby
banisterfiend` has quit [Remote host closed the connection]
<nesoi> hmm… when I try to get xcode from the app store, it says that I need to be on mountain lion. I'm on snow leopard and not upgrading
<nesoi> so, any other options for installing ruby?
Banistergalaxy has joined #ruby
bradhe has joined #ruby
frozenskater5432 has quit [Ping timeout: 256 seconds]
Schmidt has joined #ruby
freeayu has joined #ruby
<kenneth> fowl: getch undefined method
<fowl> >>require'io/console'; STDIN.getch
<al2o3cr> -e:1:in `eval': Invalid argument (Errno::EINVAL), from (eval):1:in `<main>', from -e:1:in `eval', from -e:1:in `<main>'
<williamherry> bnagy: rking: thanks
<kenneth> fowl: chat/client.rb:7:in `require': no such file to load -- io/console
<kenneth> fowl: is it a gem? i gem installed io
<kenneth> fwiw
<fowl> yeah i think there is a gem for older rubies
<bnagy> looks like a few options
<nesoi> I found an old version xode… downloading it now. 4.1gb
<nesoi> wtf?
<nesoi> old version of
<bnagy> you might be able to just get the commandline tools
seanyo_ has quit [Ping timeout: 240 seconds]
<nesoi> thanks bnagy
<nesoi> oh? where?
<bnagy> or use that gcc installer thingy
yasushi has quit [Remote host closed the connection]
noyb has joined #ruby
<nesoi> the mac app store contains only xcode for mountain lion. won't run on snow leopard
<nesoi> luckily I must have registered to be an apple developer ages ago, and I can get some old version from there
gloomer has joined #ruby
vectorshelve has joined #ruby
<bnagy> otherwise, if jruby has a dmg you could probably use that with no dev tools whatever
ananthakumaran has joined #ruby
<nesoi> dmg?
<bnagy> but I think your life in general will suck if you don't ever have gcc
<nesoi> last time I tried this, I was unable to install some gems because they kept not finding libraries
<nesoi> even after I installed them multiple different ways
<bnagy> yeah you might not have that with jruby
<bnagy> but in general, I really recommend having a working compile chain and ports
<bnagy> or brew, but I dislike brew
<bnagy> then use rbenv
<bnagy> or rvm, but I dislike rvm
<nesoi> what's jruby, dmg and rbenv?
<nesoi> sorry to be so dull
<bnagy> there are no dull people, only people who don't google
<bnagy> alternate ruby interpreter based on java // disk image - standard way of installing OSX software // way of managing multiple ruby environments
<nesoi> oh, this is the problem perhaps
<nesoi> xcode 4.2 is only available for 10.6 if you have a $99 a year apple dev license. otherwise you can only get 3.2.6
joshw778 has joined #ruby
<nesoi> so annoying
<vectorshelve> bnagy: Hi Man :)
<bnagy> yeah I hear that gcc and make have added some KILLER features in the last year
<bnagy> dev moves so fast on those things
cj3kim has joined #ruby
cj3kim has quit [Changing host]
cj3kim has joined #ruby
yoklov has quit [Quit: computer sleeping]
SegFaultAX has quit [Quit: Lost terminal]
yxhuvud has joined #ruby
bradhe has quit [Remote host closed the connection]
siameseguy has quit [Quit: siameseguy]
joshw778 has quit [Ping timeout: 268 seconds]
bradhe has joined #ruby
Foxhoundz has quit [Ping timeout: 265 seconds]
macmartine has quit [Quit: Computer has gone to sleep.]
Hanmac has quit [Ping timeout: 245 seconds]
<nesoi> bnagy: (or anyone else): so you suggest homebrew -> rbenv -> ruby-build ?
<nesoi> prepending xcode, I mean… and assuming that older version of xcode works
JStoker has quit [Excess Flood]
<bnagy> I prefer ports to homebrew but yeah
joshw957 has joined #ruby
<nesoi> why do you prefer ports?
Chryson has quit [Quit: Leaving]
jenrzzz has quit [Ping timeout: 245 seconds]
<bnagy> got more stuff in it, less hipster
dakine has joined #ruby
mascool has joined #ruby
<nesoi> ports lets you install stuff easily, or what is the advantage?
bapa has quit [Remote host closed the connection]
Hanmac has joined #ruby
bapa has joined #ruby
kuzushi has quit [Ping timeout: 240 seconds]
sdwrage has quit [Quit: geekli.st/programmer]
timonv has joined #ruby
<bnagy> got more stuff in it, less hipster
phrame has quit [Quit: gg]
<bnagy> it's my personal preference, feel free to research and make your own choice, lots of people like brew
* Hanmac likes his linux ... sometimes
jenrzzz has joined #ruby
mohits has joined #ruby
fearoffish has quit [Quit: Computer has gone to sleep.]
mohits has quit [Changing host]
mohits has joined #ruby
<kenneth> hmm, so io/console is supposed to be part of the std lib but isn't there. is that not in 1.9,1?
<kenneth> oh i guess not
mahmoudimus has quit [Quit: Computer has gone to sleep.]
cj3kim has quit [Quit: This computer has gone to sleep]
justsee has joined #ruby
justsee has quit [Changing host]
justsee has joined #ruby
d3vic3 has joined #ruby
cearls has joined #ruby
<cearls> how would I get a uniq set of an array of arrays
<cearls> uniq isn't doing it
<Hanmac> cearls what is your input array and what do you want as output?
charliesome has joined #ruby
jorge has joined #ruby
<cearls> actually, never mind.. i need to remove the same but reversed pairs: [["moon", "mono"], ["mono", "moon"], ["coal", "cola"], ["cola", "coal"]]
nesoi has quit [Quit: Leaving.]
mrdodo has joined #ruby
<Hanmac> cearls and do you maybe thought that uniq alone cant do that?
fyolnish_ has quit [Remote host closed the connection]
<Hanmac> >> [["moon", "mono"], ["mono", "moon"], ["coal", "cola"], ["cola", "coal"]].uniq {|e|e.sort}
<al2o3cr> (Array) [["moon", "mono"], ["coal", "cola"]]
<bnagy> wow, I was sure you would use uniq &:sort, Hanmac
becom33_ has quit [Ping timeout: 248 seconds]
<bnagy> you never miss these kinds of opportunities :)
<cearls> yeah, nothing like asking for help and looking at what i'm asking.. it's working, i'm using matches.include? to check if it already exists before adding it
<Hanmac> >> [["moon", "mono"], ["mono", "moon"], ["coal", "cola"], ["cola", "coal"]].uniq(&:sort)
<al2o3cr> (Array) [["moon", "mono"], ["coal", "cola"]]
fyolnish_ has joined #ruby
minijupe has quit [Quit: minijupe]
<bnagy> cearls: what's wrong with the solution he gave you?
jorge has quit [Ping timeout: 248 seconds]
JStoker has joined #ruby
<cearls> which would be faster, check if it exists before adding, or use what has been suggested here?
answer_42 has joined #ruby
<Hanmac> or use the power of sets
<Hanmac> >>require "set"; [["moon", "mono"], ["mono", "moon"], ["coal", "cola"], ["cola", "coal"]].map{|e|Set.new(e)}.uniq
<al2o3cr> (Array) [#<Set: {"moon", "mono"}>, #<Set: {"coal", "cola"}>]
<bnagy> without checking, about the same
<bnagy> cause you will have to check if it exists reversed anyway
djdb has joined #ruby
<bnagy> but I agree with Hanmac that if you want Set behaviour then use Set
<Banistergalaxy> Bnagy hi man
<bnagy> hm actually, no include? in an array will be way slower
<bnagy> I was just derping
<cearls> i like .uniq(&:sort)
<bnagy> morning Banistergalaxy
<bnagy> cearls: use a Set :)
<cearls> bnagy: :)
<cearls> Hanmac: thanks for the help
<bnagy> ugh no nm it won't help
<bnagy> obviously I shouldn't be talking today
sdwrage has joined #ruby
<bnagy> an array of Sets, a la Hanmac's last I think is not a great approach
sparc has quit [Ping timeout: 244 seconds]
<Hanmac> bnagy what would you prefer?
<bnagy> can you just sort the arrays before you add them, and _then_ use a set?
senny has joined #ruby
<bnagy> Hanmac: well it just seems like a waste of building a set
<bnagy> and it breaks flatten etc
djdb has quit [Remote host closed the connection]
dakine has quit [Ping timeout: 268 seconds]
fantazo has quit [Remote host closed the connection]
<Hanmac> what about this?
<Hanmac> >>Hash[[["moon", "mono"], ["mono", "moon"], ["coal", "cola"], ["cola", "coal"]]]
<al2o3cr> (Hash) {"moon"=>"mono", "mono"=>"moon", "coal"=>"cola", "cola"=>"coal"}
tekacs has quit [Quit: Disappearing... *poof*]
maesbn has joined #ruby
vlad_starkov has joined #ruby
phrame has joined #ruby
tekacs has joined #ruby
elhu has joined #ruby
<Hanmac> or both ideas combined:
<Hanmac> >>require "set"; [["moon", "mono"], ["mono", "moon"], ["coal", "cola"], ["cola", "coal"]].each_with_object({}){|(a,b),h|h[a]=h[b] ? h[b] : Set.new([a,b])}
<al2o3cr> (Hash) {"moon"=>#<Set: {"moon", "mono"}>, "mono"=>#<Set: {"moon", "mono"}>, "coal"=>#<Set: {"coal", "cola"}>, "cola"=>#<Set: {"coal", "cola"}>}
arkiver has joined #ruby
tagrudev has joined #ruby
t23010 has quit [Remote host closed the connection]
<bnagy> :/
t20669 has joined #ruby
<bnagy> I think I like a Set of sorted arrays :)
ryanf has quit [Quit: leaving]
jgrevich has quit [Quit: jgrevich]
<Hanmac> bnagy and what about this?
<Hanmac> >>require "set"; [["moon", "mono"], ["mono", "moon"],["coak","cola"], ["coal", "cola"], ["cola", "coal"],["coal","coak"]].each_with_object({}){|(a,b),h| h[a] ? h[b]=h[a] << b : h[a]=h[b] ? h[b] : Set.new([a,b])}
<al2o3cr> (Hash) {"moon"=>#<Set: {"moon", "mono"}>, "mono"=>#<Set: {"moon", "mono"}>, "coak"=>#<Set: {"coal", "cola", "coak"}>, "coal"=>#<Set: {"coal", "cola", "coak"}>, "cola"=>#<Set: {"coal", "cola", "coak"}>}
burgestrand has joined #ruby
djdb has joined #ruby
<bnagy> how is that different from your last one?
Z_Mass has joined #ruby
<bnagy> and I still like a Set of sorted arrays
<bnagy> and your coal / coak pairs have nothing to do with (what I think) the problem (is)
<Hanmac> its about how the pair elements are detected ... guess how many different Sets are inside the hash (Aswer: only 2 objects)
<Hanmac> i thought the Quest was about some kind of dictionary
<bnagy> I think it's valid anagrams
tonini has quit [Remote host closed the connection]
vlad_starkov has quit [Remote host closed the connection]
adambeynon has joined #ruby
minijupe has joined #ruby
<Hanmac> cearls what was your data for? more like dictionary or more for anagrams?
Taichouchou2 has quit [Remote host closed the connection]
<cearls> Hanmac: dictionary search, learning
Taichouchou2 has joined #ruby
<bnagy> that fast lookup is good, but I think it's data heavy
<bnagy> my gut says this is going to end up in trees
tonini has joined #ruby
<Hanmac> i dont think that my way is SO data heavy ... :( i reuse the Set objects
<bnagy> yeah...and it would work for anagrams just as well I guess
<bnagy> but you store each full word once
<bnagy> I would need to wikipedia, there's bound to be a standard approach for this, it's a DSA staple
jenrzzz has quit [Quit: leaving]
minijupe has quit [Quit: minijupe]
jenrzzz has joined #ruby
arturaz has joined #ruby
zigomir has joined #ruby
Drewch has quit [Ping timeout: 276 seconds]
statarb3 has joined #ruby
statarb3 has quit [Changing host]
statarb3 has joined #ruby
amskah has joined #ruby
elhu has quit [Quit: Computer has gone to sleep.]
zommi has joined #ruby
joshw701 has quit [Remote host closed the connection]
josh^ has quit [Remote host closed the connection]
JoshWines has quit [Remote host closed the connection]
und3f has joined #ruby
mrdodo has quit [Remote host closed the connection]
Drewch has joined #ruby
mneorr has quit [Remote host closed the connection]
mneorr has joined #ruby
joshw957 has quit [Remote host closed the connection]
ryanf has joined #ruby
techsurvivor has joined #ruby
JoshWines has joined #ruby
beneggett has quit [Read error: Connection reset by peer]
vectorshelve_ has joined #ruby
pingfloyd has quit [Quit: pingfloyd]
sgmac has joined #ruby
amskah has quit [Quit: Leaving]
beneggett has joined #ruby
sgmac has left #ruby [#ruby]
ananthakumaran1 has joined #ruby
Morkel has joined #ruby
beneggett has quit [Client Quit]
Z_Mass has quit [Quit: Leaving]
workmad3 has joined #ruby
Bonkers has quit [Quit: Leaving]
matrixise has quit [Ping timeout: 260 seconds]
<kenneth> so the verdict about fucking with io streams to make a terminal ui by hand from scratch
<kenneth> but ncurses might have been less hacky
ananthakumaran has quit [Ping timeout: 265 seconds]
bradhe has quit [Remote host closed the connection]
burgestrand1 has joined #ruby
samg_ has joined #ruby
sdwrage has quit [Quit: geekli.st/programmer]
<Mon_Ouie> Instead of doing char.ord == n # something, you might as well do char == "something"
<Mon_Ouie> (\C-c, \e, …)
banisterfiend` has joined #ruby
burgestrand has quit [Ping timeout: 245 seconds]
jprovazn_away is now known as jprovazn
<samg_> With a config.ru file, can I match every path? I want all requests not under /assets to render public/index.html. http://pastebin.com/dWf6geM4
burgestrand has joined #ruby
cantonic has quit [Quit: cantonic]
<samg_> If I hit localhost:9292/something I get a 404.
ctwiz has quit [Quit: ctwiz]
burgestrand1 has quit [Read error: Connection reset by peer]
<arkiver> From within a class method, can only other class methods be called ?
<charliesome> arkiver: well yes, since you don't have any object to call an instance method on
khakimov has quit [Quit: Computer has gone to sleep.]
neku has joined #ruby
mascool has quit [Ping timeout: 250 seconds]
<kenneth> Mon_Ouie: i did that after the newlines were giving me trouble
<kenneth> I guess "\n" is not == to the char whose ord == 13
timonv has quit [Remote host closed the connection]
resure has joined #ruby
<arkiver> charliesome, thoguht so; Thanks
<burgestrand> >> "\n" == 13.chr
<al2o3cr> (FalseClass) false
Hanmac has quit [Ping timeout: 265 seconds]
resure is now known as resure_away
<burgestrand> (
<burgestrand> (:
fastred has joined #ruby
<charliesome> >> "\n" == 10.chr
<al2o3cr> (TrueClass) true
<charliesome> >> "\r" == 13.chr
<al2o3cr> (TrueClass) true
<burgestrand> >> p "".encoding
<al2o3cr> (Encoding) #<Encoding:ASCII-8BIT>, Console: #<Encoding:ASCII-8BIT>
ph^ has joined #ruby
<burgestrand> >> "å" + "a"
<al2o3cr> (String) "\xC3\xA5a"
Hanmac has joined #ruby
<charliesome> >> ("å" + "a").encode "UTF-8"
<al2o3cr> -e:1:in `eval': "\xC3" from ASCII-8BIT to UTF-8 (Encoding::UndefinedConversionError), from (eval):1:in `<main>', from -e:1:in `eval', from -e:1:in `<main>'
<burgestrand> >> ("å" + "a").length
<al2o3cr> (Fixnum) 3
<charliesome> >> ("å" + "a").force_encoding("ISO-8859-1").encode "UTF-8"
<al2o3cr> (String) "\u00C3\u00A5a"
<burgestrand> >> ("å" + "a").force_encoding("UTF-8").length
<al2o3cr> (Fixnum) 2
vlad_starkov has joined #ruby
<charliesome> burgestrand: that force encoding is invalid
<burgestrand> charliesome: nope
<charliesome> no?
<burgestrand> charliesome: C3A5 is the two bytes for å in UTF-8
t20669 has quit [Remote host closed the connection]
mahmoudimus has joined #ruby
c0rn_ has joined #ruby
<charliesome> oh whoops, my bad
<Mon_Ouie> kenneth: Because it's \r
<burgestrand> >> "å".force_encoding("UTF-8").valid_encoding?
<al2o3cr> (TrueClass) true
t78008 has joined #ruby
<charliesome> burgestrand: misread what you were trying to do
<kenneth> oh!
<kenneth> doh
<burgestrand> (:
thunderstrike has joined #ruby
cearls has quit [Quit: cearls]
<burgestrand> >> " ".chr
<al2o3cr> (String) "\xC2"
<burgestrand> >> def  ; "Hi!"; end;  
<al2o3cr> (String) "Hi!"
Criztian has joined #ruby
doskoi has joined #ruby
doskoi has quit [Client Quit]
doskoi has joined #ruby
elhu has joined #ruby
baphled has joined #ruby
justsee has quit [Quit: Leaving...]
aganov has joined #ruby
IPGlider has joined #ruby
xorigin has joined #ruby
lolmaus has joined #ruby
workmad3 has quit [Ping timeout: 268 seconds]
dhruvasagar has joined #ruby
ghanima has quit [Ping timeout: 244 seconds]
doskoi has left #ruby [#ruby]
Speed has joined #ruby
Speed has quit [Changing host]
Speed has joined #ruby
senny has quit [Remote host closed the connection]
daniel_hinojosa has quit [Quit: Leaving.]
shadoi1 is now known as shadoi
senny has joined #ruby
<banisterfiend`> shadoi: issue file pls ;)
<shadoi> banisterfiend`: oh hey!
<banisterfiend`> y0
<shadoi> I tried to reproduce it, and it stopped happening
<shadoi> I think maybe I was stomping on STDOUT somehow, I'm still very confused by it
<banisterfiend`> shadoi: k00
<shadoi> I'll try to make a simple test-case and see if I can make it happen. Pry was basically just complaining that it couldn't open STDOUT, i've also see it complain that it can "infer basepath"
<shadoi> Probably because of the Celluloid method proxy
<banisterfiend`> oh ok
justsee has joined #ruby
justsee has quit [Changing host]
justsee has joined #ruby
stepnem has quit [Quit: ZNC - http://znc.sourceforge.net]
mneorr has quit [Remote host closed the connection]
mneorr has joined #ruby
mneorr has quit [Remote host closed the connection]
mneorr has joined #ruby
arkiver has quit [Quit: Leaving]
wobr has joined #ruby
thone has joined #ruby
saschagehlich has joined #ruby
LouisGB has joined #ruby
mneorr has quit [Remote host closed the connection]
thone_ has quit [Ping timeout: 246 seconds]
hoelzro|away is now known as hoelzro
pdelgallego has joined #ruby
banisterfiend` is now known as banisterfiend_
qwerxy has joined #ruby
haxrbyte has joined #ruby
eldariof has joined #ruby
haxrbyte has quit [Remote host closed the connection]
LouisGB has quit []
elhu has quit [Quit: Computer has gone to sleep.]
haxrbyte has joined #ruby
banisterfiend_ is now known as banisterfiend
LouisGB has joined #ruby
elhu has joined #ruby
evangelion has quit [Quit: Leaving]
nai has joined #ruby
t78008 has quit [Remote host closed the connection]
baphled has quit [Ping timeout: 265 seconds]
t92376 has joined #ruby
banisterfiend has quit [Ping timeout: 245 seconds]
dekroning has joined #ruby
Guest5516 has joined #ruby
banisterfiend has joined #ruby
vlad_starkov has quit [Remote host closed the connection]
mrdodo has joined #ruby
bradhe has joined #ruby
samg_ has quit [Quit: leaving]
vivien__ has quit [Ping timeout: 264 seconds]
elaptics`away is now known as elaptics
mrdodo has quit [Ping timeout: 264 seconds]
nai has quit [Remote host closed the connection]
matrixise has joined #ruby
jmcphers has quit [Quit: Leaving]
mneorr has joined #ruby
cezar has joined #ruby
cezar has quit [Client Quit]
ph^ has quit [Remote host closed the connection]
ph^ has joined #ruby
qwerxy has quit [Quit: offski]
gloomer has quit [Ping timeout: 248 seconds]
saschagehlich has quit [Quit: saschagehlich]
ph^ has quit [Remote host closed the connection]
dhruvasagar has quit [Ping timeout: 268 seconds]
dhruvasagar has joined #ruby
t92376 has quit [Remote host closed the connection]
bluOxigen has joined #ruby
t44656 has joined #ruby
thunderstrike has quit [Remote host closed the connection]
maasha has joined #ruby
c0rn_ has quit []
sepp2k has joined #ruby
pdelgallego has quit [Quit: pdelgallego]
<maasha> anyone good with gnuplot (rgplot). I need help to create a stacked histogram.
pdelgallego has joined #ruby
robotmay has joined #ruby
M- has quit [Quit: This computer has gone to sleep]
ryanf has quit [Quit: leaving]
answer_42 has quit [Quit: WeeChat 0.3.8]
imami|afk is now known as banseljaj
twigmorewelsh has joined #ruby
noyb has quit [Ping timeout: 268 seconds]
answer_42 has joined #ruby
staunch has quit [Quit: staunch]
shadoi has quit [Quit: Leaving.]
ph^ has joined #ruby
BiHi has joined #ruby
sent-hil has joined #ruby
<sent-hil> what's the best way to round to next hour?
<sent-hil> So far I got: t = Time.now; (Time.at(t.to_i - t.sec - t.min % 60 * 60)+60*60).utc.to_i
ringotwo has joined #ruby
<bnagy> can't you just add 3600?
<bnagy> it will be out by some microseconds I guess
<sent-hil> No I need it to be rounded, i.e. 1:26 utc => 2 utc
jeff_sebring has quit [Quit: Leaving]
workmad3 has joined #ruby
<ggreer> (t.min >= 30) ? 1 : 0
melvinram has joined #ruby
<vectorshelve> shevy: Hi
seich has quit [Ping timeout: 256 seconds]
<juha_> sent-hil: i guess one possible option could be to take current hour and just +1? :D
koshii has quit [Ping timeout: 245 seconds]
chimay has joined #ruby
<ggreer> seriously: t.hour + ((t.min >= 30) ? 1 : 0)
<sent-hil> juha_: i thought about that, but what about the end of the day?
kenneth has quit [Ping timeout: 244 seconds]
<juha_> sent-hil: well, if hour > 24 -> hour = 1 etc
<juha_> sent-hil: but it's a ugly hack
savage- has quit [Ping timeout: 246 seconds]
Sou|cutter has quit [Ping timeout: 265 seconds]
td123 has quit [Ping timeout: 240 seconds]
RichieEvan has quit [Ping timeout: 246 seconds]
jhunter has quit [Ping timeout: 252 seconds]
alienvenom has quit [Ping timeout: 244 seconds]
<ggreer> oh whoops. I thought you could do t.hour = t.hour + ((t.min >= 30) ? 1 : 0) and it would figure it out
<ggreer> but you can't
<ggreer> my bad
strzalek has joined #ruby
ringotwo has quit [Ping timeout: 240 seconds]
<ggreer> I think python's datetime lets you do silly things like that. if you add 1 hour to 23 hours, it'll increase the day correctly
banseljaj has quit [Ping timeout: 272 seconds]
<ggreer> I'm guessing there's something else I should be using in ruby that lets me munge datetimes
<shevy> vectorshelve hi rails man
wvms has quit [Read error: Connection reset by peer]
<vectorshelve> shevy: no I drive car :)
<shevy> hehe
<sent-hil> i think in rails you can add 1.hour and that takes care of things
<shevy> rich man
wvms has joined #ruby
<shevy> rails likes to extend date and time
<sent-hil> i think: (Time.at(t.to_i-t.sec-t.min % 60*60)+60*60).utc is good enough for now
<shevy> it even has a .will_there_be_werewolves_tomorrow? method
<shevy> to find out the lunar calendar
<sent-hil> crazy AS magic
<sent-hil> thanks guys
ph^ has quit [Remote host closed the connection]
<juha_> shevy: WUT :D
timonv has joined #ruby
<shevy> :D
<shevy> I am exaggerating but they really have some odd methods there
G has quit [Read error: Operation timed out]
Musfuut has quit [Read error: Operation timed out]
<vectorshelve> shevy: mechanize is soaring ;) I bored of its inconsistencies :(
chussenot has joined #ruby
koshii has joined #ruby
Hanmac has quit [Ping timeout: 245 seconds]
kiela has joined #ruby
answer_42 has quit [Ping timeout: 276 seconds]
<shevy> hmm
<shevy> time to write mini-mechanize
elhu has quit [Ping timeout: 244 seconds]
answer_42 has joined #ruby
<shevy> vectorshelve I think tendency is to make things more complicated :(
<shevy> it happens in all those projects
<vectorshelve> shevy: is this the issue with proxy? http://pastie.org/4615244
<vectorshelve> shevy: now I am working behind a proxy well.. agent = Mechanize.new do |a| a.proxy_host = 'proxy.example' a.proxy_port = 8080 end throws erro
<vectorshelve> error*
Hanmac has joined #ruby
baphled has joined #ruby
<matti> ;]
<vectorshelve> matti: Hi ;)
<vectorshelve> shevy: any luck ? I think it should work for you.. if you aint behind a proxy :)
<RubyPanther> sent-hil: Time.at t.to_i + (1800- (t.to_i + 1800) % 3600)
<shevy> which mechanize is it
elhu has joined #ruby
<shevy> the one requiring nokogiri?
<RubyPanther> presumably that can still be simplified
<vectorshelve> shevy: hmm..
<matti> Hi vectorshelve, shevy ;]
<shevy> vectorshelve nokogiri tends to hate me
<shevy> matti hi mattzi!
bluOxigen_ has joined #ruby
chimay has quit [Remote host closed the connection]
<shevy> ruby/site_ruby/1.8/hpricot_scan.so
<shevy> well my hpricot one doesnt work
<vectorshelve> shevy: solved :D
<shevy> :(
<vectorshelve> shevy: so I should then think about providing user an API for adding proxy :) good idea
bluOxigen has quit [Ping timeout: 268 seconds]
neku has quit [Read error: Connection reset by peer]
<vectorshelve> shevy: what happened ?
<shevy> ruby begins to feel like a big patchwork of failing components
<shevy> dunno
<shevy> said it installed hpricot, but it didnt
<matti> shevy: I am matz's evil twin. Didn't you know?
seich- has joined #ruby
Xeago has joined #ruby
<RubyPanther> 1.8 stopped being the current stable version like... years ago. I would expect it to have lots of bit-rot by now.
robustus has joined #ruby
elhu has quit [Client Quit]
<vectorshelve> shevy: dont be sad... ruby is beautiful and powerful too so she can always protect her virgintiy and sanctity and make way to salvation ;)
<shevy> RubyPanther it's not only that. things that are promoted like bundler, which I find awful. there is this tendency in the ruby world to make things simpler and also dumbing things down at the same time
ge0pan has joined #ruby
<shevy> vectorshelve yeah ruby is great. but why didn't matz envision something like gems in the first place
mneorr has quit [Remote host closed the connection]
<Muz> shevy: what is your problem with Nokogiri? Aside from the slightly wonky syntax, and weird return values, it's hardly unusabe or lacking of features and capabilities.
mahmoudimus has quit [Quit: Computer has gone to sleep.]
lkba has quit [Quit: Bye]
ge0pan has quit [Client Quit]
<shevy> yeah nokogiri works actually
<shevy> require 'nokogiri' # => true
<shevy> mechanize doesn't now though
<shevy> for some reason, mechanize wants to require hpricot
<RubyPanther> shevy: that is absurd, bundler doesn't dumb things down at all it is totally configurable.
qwerxy has joined #ruby
<shevy> lol
<RubyPanther> Frankly I can't see how a person could dislike bundler if they were around before it
<shevy> so according to you, bundler never does anything clever on its own?
<Muz> RubyPanther: it does add a layer of complexity and fussing to deploying code onto other machines, but once you get over that hurdle and learn how it works, it's fine.
Virunga has joined #ruby
<Muz> Then again, that's like any tool. Learn how it works. ¬_¬
workmad3 has quit [Ping timeout: 265 seconds]
<Muz> shevy: what does it do that's so objectionable?
<shevy> now I know, according to RubyPanther, banister complained about something bogus back then apparently
t44656 has quit [Remote host closed the connection]
* Muz doesn't see how else things get fixed if people just grumble about the behaviour and make no effort to get it improved or fixed.
darren has quit [Remote host closed the connection]
t46947 has joined #ruby
<shevy> Muz I actually don't remember what he complained about precisely :\ it was something that was done in addition to what he tried to do
saschagehlich has joined #ruby
saschagehlich has quit [Client Quit]
LouisGB has quit [Disconnected by services]
n8888 has joined #ruby
<shevy> I did! I filed two issues in total about bundler so far
gentz_ has joined #ruby
<RubyPanther> It doesn't add a layer of complexity, it removes a fuzzy "have a sysadmin fix the install" layer and replaces it with a standard command that has predictable results that don't change just based on which gems were _installed_
<shevy> but they were smaller and unrelated to that
<Muz> shevy: and were they fixed? :P
<shevy> Muz yeah
<Muz> Quit yer whinin' then. ;)
<shevy> I am not saying the bundler team is incompetent
FlyingFoXy has joined #ruby
bluOxigen has joined #ruby
<yxhuvud> RubyPanther: there are parts of bundler documentation and discoverability that could be a lot better though
paolooo has joined #ruby
Zespre_ has joined #ruby
flagg0205 has joined #ruby
davidcelis has quit [Ping timeout: 240 seconds]
nopper has quit [Ping timeout: 240 seconds]
Zespre has quit [Ping timeout: 240 seconds]
jkyle has quit [Ping timeout: 240 seconds]
Gate has quit [Ping timeout: 240 seconds]
jenrzzz has quit [Ping timeout: 240 seconds]
flagg0204 has quit [Ping timeout: 240 seconds]
gentz has quit [Ping timeout: 240 seconds]
notbrent has quit [Ping timeout: 240 seconds]
mohits has quit [Ping timeout: 240 seconds]
lectrick has quit [Ping timeout: 240 seconds]
manouche has quit [Ping timeout: 240 seconds]
Poapfel has quit [Ping timeout: 240 seconds]
jord_ has quit [Ping timeout: 240 seconds]
Jelco_ has quit [Ping timeout: 240 seconds]
FlyingFoX has quit [Ping timeout: 240 seconds]
Guest26352 has quit [Excess Flood]
djdb has quit [Ping timeout: 240 seconds]
resure_away has quit [Ping timeout: 240 seconds]
Derander has quit [Ping timeout: 240 seconds]
jord has joined #ruby
Guedes0 has joined #ruby
lectrick__ has joined #ruby
<shevy> github issue reporting is very cool
fyolnish_ has quit [Ping timeout: 256 seconds]
Poapfel has joined #ruby
resure_away has joined #ruby
manouche has joined #ruby
Gate has joined #ruby
Gate has quit [Changing host]
Gate has joined #ruby
Jelco_ has joined #ruby
<RubyPanther> The old way, for example you would have conflicts where a gem that relies on something like ActiveSupport but doesn't declare the version breaks things unless it is loaded after rails. Well, what if you ahve a gem that has to load first? Before you would have to do what, make changes to a third party gem and tote your own copy around in vendor and have your app blow up if somebody installed a gem with a newer number?
jenrzzz has joined #ruby
jkyle has joined #ruby
<shevy> from about 10 reports I ever did on sourceforge in like 5 years, 2 were fixed or addressed. on github, from about 20, about 15 got fixed or handled, the others still somehow addressed
djdb has joined #ruby
davidcelis has joined #ruby
und3f has quit [Ping timeout: 240 seconds]
<vectorshelve> shevy: the problem is with gem compatibility and improper version management
bluOxigen_ has quit [Ping timeout: 248 seconds]
<vectorshelve> shevy: rest is cool
mohits has joined #ruby
mohits has quit [Changing host]
mohits has joined #ruby
nopper has joined #ruby
<shevy> sounds as if you ran into your share of problems already vectorshelve :)
<RubyPanther> Ruby doesn't _have_ proper version management, bundler adds it in a way that is transparent to the gems and takes advantage of what versioning Ruby does have. And solves the whole problem. And handles the issues of version consistency between developers/deploys
und3f has joined #ruby
Derander has joined #ruby
<RubyPanther> Is it perfectly documented? No, but neither is anything these days.
Jonah11_ has joined #ruby
rohit has joined #ruby
<Jonah11_> strange behavior in my rspec tests, the "before" block does not seem to be getting run -- why not? https://gist.github.com/3524671
Taichouchou2 has quit [Remote host closed the connection]
jrist-afk has quit [Ping timeout: 260 seconds]
berserkr has joined #ruby
Vert has joined #ruby
ph^ has joined #ruby
<Muz> Jonah11_: should line 10 not be 'it "always call" do'
<Muz> ?
<Jonah11_> Muz: doh! ty
Agis__ has joined #ruby
resure_away has quit [Remote host closed the connection]
jlebrech has joined #ruby
ph^ has quit [Ping timeout: 245 seconds]
<jlebrech> are there any tutorials on writing extensions to rspec, a bit like cucumber
t46947 has quit [Remote host closed the connection]
cascalheira has joined #ruby
t55075 has joined #ruby
<vectorshelve> shevy: no I always thought if that could have been done properly.. it could have been much better
heisenmink has joined #ruby
haxrbyte has quit [Ping timeout: 264 seconds]
fyolnish has joined #ruby
<hemanth> best way to avoid deprecated warning ruby1.9 is?
<Muz> To not use deprecated methods. ;)
<vectorshelve> hemanth: hmmmmmm..... huh ..........hhhhhmmmmmmmmmmm :)
<hemanth> Muz, lol
dhruvasa1ar has joined #ruby
<hemanth> i'm using tmail gem
<hemanth> that has a depricate method for 1.9
<vectorshelve> hemanth: rvm... proper gem set.. atleast helps to reduce some issues !!
<hemanth> or else is there way to redirect them ?
mneorr has joined #ruby
<hemanth> I don't want them to be on stdout
tyrant has joined #ruby
dhruvasagar has quit [Ping timeout: 244 seconds]
notbrent has joined #ruby
<hemanth> iconv deprecation warning with ruby 1.9.3
rohit has quit [Ping timeout: 264 seconds]
<statarb3> pid newbe questions, when i create a new file with the File.new and read it later in with r (read options) and do puts book.read it spits out the content of the file, however when i do it again it does not spit out the content of the file
<hoelzro> statarb3: you're calling read twice on the same file handle?
<hoelzro> keep in mind that read maintains a sort of cursor in the file, so a single read moves it to the end of the file
<statarb3> oh, is that so, well i did not know that
<hoelzro> mhmm
<Muz> statarb3: File inherits from IO. After reading you need to rewind (http://www.ruby-doc.org/core-1.9.3/IO.html#method-i-rewind) if you want to re-read it.
<hoelzro> I think File.read(filename) will do what you want
<hoelzro> or rewind, like Muz suggests.
steven- has quit [Ping timeout: 246 seconds]
<hemanth> i need unrequire method :\
<Muz> Having a quick read through the IO and File doc pages should give you an idea of what you can do with files, and how they work.
strzalek_ has joined #ruby
ringotwo has joined #ruby
strzalek has quit [Ping timeout: 248 seconds]
strzalek_ is now known as strzalek
<statarb3> thanks guys let me try thisa
snearch has joined #ruby
<statarb3> :) thanks hoelzro and muz for your tips :)
<sent-hil> hemanth: $VERBOSE=nil?
<hemanth> sent-hil, came across that, but it had loads on down votes, wonder why
Takehiro has joined #ruby
tonini has quit [Remote host closed the connection]
<sent-hil> down votes where?
pskosinski has joined #ruby
steven has joined #ruby
fastred has quit [Quit: fastred]
fyolnish has quit [Remote host closed the connection]
fastred has joined #ruby
dhruvasa1ar has quit [Ping timeout: 244 seconds]
banseljaj has joined #ruby
S1kx has joined #ruby
S1kx has quit [Changing host]
S1kx has joined #ruby
dhruvasagar has joined #ruby
alienvenom has joined #ruby
jhunter has joined #ruby
<sent-hil> holy crap, i turend on verbose mode and i got three pages of warnings
<hemanth> stackoverflow
<hemanth> :D
wallerdev has quit [Quit: wallerdev]
<JonnieCache> >> $VERBOSE = true; puts "lol"
<al2o3cr> (NilClass) nil, Console: lol
<JonnieCache> awww :(
<hemanth> >> $VERBOSE = nil; require "lol"
<al2o3cr> -e:1:in `eval': cannot load such file -- lol (LoadError), from /usr/lib/ruby/1.9.1/rubygems/custom_require.rb:36:in `require', from (eval):1:in `<main>', from -e:1:in `eval', from -e:1:in `<main>'
Musfuut has joined #ruby
Agis__ has quit [Read error: Connection reset by peer]
<sent-hil> hemanth: not sure, i turned it off in specs when i was working with em-http-request, haven't caused any trouble yet
Musfuut is now known as Guest24624
G has joined #ruby
<hemanth> sent-hil, nice, will stick to that as of now
RichieEvan has joined #ruby
Agis__ has joined #ruby
ph^ has joined #ruby
sent-hil has quit [Remote host closed the connection]
tundrax has joined #ruby
johnnyfive has joined #ruby
freeayu has quit [Quit: 离开]
CoolCold has left #ruby [#ruby]
s1n4 has joined #ruby
s1n4 has quit [Client Quit]
Guest24624 is now known as Musfuut
strzalek has quit [Quit: strzalek]
jrist has joined #ruby
ph^ has quit [Ping timeout: 240 seconds]
lampe2 has joined #ruby
Sou|cutter has joined #ruby
Elico1 has joined #ruby
Zespre_ has quit [Ping timeout: 268 seconds]
<Elico1> is it possible to run some loop in background without forking or threading?
_bart has quit [Quit: _bart]
Foxandxss has joined #ruby
indian has joined #ruby
Huis has joined #ruby
<hoelzro> Elico1: for what purpose?
Huis has left #ruby [#ruby]
<Hanmac> "is it possible to get from A to B without moving" :P
dhruvasagar has quit [Ping timeout: 244 seconds]
jwbuurlage has joined #ruby
dhruvasagar has joined #ruby
<Elico1> well i wrote an application .. small proxy.. and it based on two incoming tcp ports. and i need a way of both serving clients and other tasks
mc0e1 has joined #ruby
<Mon_Ouie> You could use IO.select to know when the clients sent you data and process their requests then, and also do the rest of your work in the main loop
<Elico1> ok seems reasonable
<Elico1> my question is...
vlad_starkov has joined #ruby
Zespre has joined #ruby
mc0e has quit [Ping timeout: 246 seconds]
<Elico1> i do use select for recvmsg but how about accept?
<Elico1> server.accept ?
<Mon_Ouie> A TCPServer is an IO object to, and can be passed to select
melvinram has quit [Quit: melvinram]
<matti> Elico1: Look at EventMachine :)
<matti> Mon_Ouie: Doing IO.select nowadays is so '70s ;p
<Elico1> matti: i looked at it... i wrote another server with event machine
<Elico1> but now with this one i'm having trouble
x0F_ has joined #ruby
x0F_ has quit [Changing host]
x0F_ has joined #ruby
x0F has quit [Disconnected by services]
x0F_ is now known as x0F
<Hanmac> matti and what is writing an own tcpserver in C "is it so 60's"? xD
<Elico1> since it's a proxy i need for it to manage both sockets
<Elico1> Hanmac: it's so 20's...
<heisenmink> Elico1: why can't you do that with eventmachine?
<Elico1> heisenmink: i have tried but it dosnt seems to work for me.. my mind is locked up now
<matti> Hanmac: No, that is plain crazy ;p
<matti> [ I am joking of course ]
ph^ has joined #ruby
<Elico1> if you are willing to help me thing loundly about it i will be happt
Zespre has quit [Ping timeout: 245 seconds]
<Hanmac> it was part of my job education to do this
dekroning has quit [Ping timeout: 256 seconds]
<heisenmink> Elico1: you should use eventmachine and offload heavy tasks to background jobs that report back to the event machine.
<heisenmink> Elico1: fire away with the questions
<heisenmink> or code pastes
Zespre has joined #ruby
<Elico1> heisenmink: so i wrote a tcp server that works..
<matti> Hanmac: I spent some time writing in C too, select and epoll -- we've had complex relationship ;]
elhu has joined #ruby
ly_gs has joined #ruby
<Elico1> the idea is : i have two tcpservers one on each port.. this i can WITH em
<Elico1> but the complex part is that i need to take two incoming connections and transfer data between them
savage- has joined #ruby
<Elico1> this works fine for one incoming connection...
<Elico1> i need to connect to incoming connection..
pskosinski has quit [Read error: Connection reset by peer]
<Elico1> and each and one of them has ID.. stated in the connection initiation
<Elico1> and both servers has different connection sequence..
dhruvasagar has quit [Ping timeout: 240 seconds]
<heisenmink> Elico1: EventMachine.run { EventMachine.start_server "127.0.0.1", 8081, ProxyServer; EventMachine.start_server "127.0.0.1", 8080, ProxyServer }
tyrant has quit []
<heisenmink> in ProxyServer, have a class-level shared hash of id => connection
<Elico1> a sec i will open it
dhruvasagar has joined #ruby
asuka has quit [Quit: leaving]
tiripamwe has joined #ruby
luist has quit [Quit: luist]
<Elico1> thanks//
<matti> Elico1: As per what heisenmink said.
ace has joined #ruby
<Elico1> well i have seen that but my eyes and mind are not in the same page
t55075 has quit [Remote host closed the connection]
<ace> why this is not working when wieght is not defined "if defined? part.weight && part.weight > 0"
tundrax has quit [Remote host closed the connection]
<ace> usually the second part should not be called if the first return false
t85234 has joined #ruby
<ace> at least in C/C++
pskosinski has joined #ruby
<matti> ace: With AND, both have to be true.
<ace> matti: i know, the problem is it generate an error
<ace> undefined method `weight'
<matti> ace: Try if port.weight and port.weight > 0
<Hanmac> "if defined?(part.weight) && part.weight > 0"
<Elico1> matti: i am trying to understand the ProxyServer but i'm loosing it...
<ace> Hanmac: same error
<Hanmac> but this is better: "part..respond_to(:weight) && part.weight > 0"
<ace> matti: same error
<Muz> ace: you're only checking that "part.weight" is defined, not if it's non-nil.
<Hanmac> noo only .
<ace> muz: ah
<Elico1> the example shows how to connect to a remote server but nothing on this hash of connections
<matti> Muz: Would if x not do it?
<Muz> if !part.weight.nil? && part.weight > 0
berserkr has quit [Quit: Leaving.]
<Muz> Or what matti said.
<ace> Muz: indeed, it s that
lkba has joined #ruby
<matti> LOL
<matti> Muz: :)
<Muz> matti: Heh, doing several things at once, not thinking entirely straight. Thanks. :p
<matti> Muz: No, no. That's OK.
<matti> Muz: Questioning things is the root of enlightement ;]
<matti> Muz: +1
<ace> thank you guyz
<matti> I guess.
<matti> I hope.
<matti> ... where is my coffeee.
<matti> ;d
asuka has joined #ruby
fastred has quit [Quit: fastred]
<bnagy> defined? part && part.respond_to(:weight) && not part.weight.nil? && part.weight > 0
<bnagy> who says ruby is not concise and beautiful?
<matti> LOL
<Hanmac> bnagy: but isnt it more like that?: defined?(part) && part.respond_to(:weight) && not part.weight.nil? && part.weight > 0
<heisenmink> Elico1: https://gist.github.com/3525766
<bnagy> Hanmac: binding I guess, you're right. I didn't check :)
arkiver has joined #ruby
<matti> heisenmink: Not using enable_proxy?
<heisenmink> matti: I have no idea what I am doing
chimay has joined #ruby
<matti> Hahaha
dhruvasagar has quit [Ping timeout: 240 seconds]
<Elico1> thanks heisenmink
<matti> heisenmink: +1 :)
<bnagy> if (part.weight > 0 rescue false);
<matti> bnagy: Nasty.
<matti> ;d
<bnagy> explicit tests are for people with time
<arkiver> When i write foo = "bar = 'something'" and call eval(foo) and later when I do this: >>bar, I get an error message "undefined local variable" doesn't the eval method run the code and shoudn't it create the variable ??
dhruvasagar has joined #ruby
<Hanmac> arkiver maybe it does, but you cant trust eval
<Hanmac> or you used wrong
<arkiver> ahh
<arkiver> Hanmac, Does it change the environment when executing the eval method ?
edwardj has joined #ruby
<Hanmac> it may be not your fault:
<Hanmac> >> foo = "bar = 'something'";eval(foo);bar
<al2o3cr> -e:1:in `eval': undefined local variable or method `bar' for main:Object (NameError), from -e:1:in `eval', from -e:1:in `<main>'
Guedes0 has quit [Quit: Saindo]
<Elico1> heisenmink: i have a question..
<Hanmac> this is one of the reasons i dont use eval
Guedes0 has joined #ruby
<heisenmink> class CommentsController; def create; eval(params[:content]); end; end;
elhu has quit [Quit: Computer has gone to sleep.]
<heisenmink> for maximum safety
<Elico1> is this connection thing is of the reactor or per module/
<Elico1> ?
<arkiver> Hanmac, yes i've read about it being unpredictable
<Elico1> hoo sorry got it
<arkiver> Too bad. it seemed pretty convenient ;)
<Elico1> i have tried something like that
<matti> Elico1: That is all you have to do when using em-proxy gem.
<matti> Elico1: Give it a go.
<heisenmink> Elico1: I'm with matti, go with em-proxy
<matti> Elico1: Or, keep reading EM web site.
schaerli has joined #ruby
<Elico1> matti: but with emproxy i can just relay to outgoing server not?
bbloom has quit [Ping timeout: 246 seconds]
<matti> Elico1: You can do whatever you want.
<Elico1> i want to read but my head blows like hell
<matti> Elico1: em-proxy just takes a pain of builing it manually with EM.
<Elico1> hoo nice
<matti> Said that.
<matti> If you are stubborn enough / crazy enough.
<matti> You can even use socat as proxy.
<Elico1> haha
<matti> :)
<matti> It would work, and probaby not bad at all.
<matti> But whether its a solution... its questionable.
<matti> :>
BiHi has quit [Quit: Computer has gone to sleep]
<Elico1> ok i will try something now
<matti> GO team Elico1 GO
<Elico1> working with sockets for the last two days was very nice..
tiripamwe has quit [Ping timeout: 256 seconds]
wpaulson has joined #ruby
wpaulson has quit [Client Quit]
cnf has left #ruby ["Linkinus - http://linkinus.com"]
becom33_ has joined #ruby
mneorr_ has joined #ruby
Virunga has quit [Remote host closed the connection]
<Elico1> and still matti one question with em-proxy... how can run two server ? i need to hack the em-proxy a bit
JohnBat26 has joined #ruby
nilg` has joined #ruby
banseljaj is now known as imami|afk
mneorr has quit [Ping timeout: 245 seconds]
tundrax has joined #ruby
<becom33_> http://pastebin.com/PiqHfvzv can anyone explain me , why is just script.rb -x (without a parameter value) gives me a error
<matti> Elico1: I am not sure any more what are you trying to solve :)
tundrax has quit [Client Quit]
bluenemo has joined #ruby
<banisterfiend> matti: u and Mon_Ouie http://i.imgur.com/REhEV.gif
flype has joined #ruby
<Elico1> it's simple... twp tcp ports.... two servers.... two clients... initiate connection to both sides and then let them speak with each other until anyone of them end the connection...
nilg has quit [Ping timeout: 268 seconds]
<banisterfiend> matti: i assume that's what all your ";]" are secretly about
<Mon_Ouie> becom33_: Because you demand an argument after -x, a.k.a --os?
<Elico1> but the example from before was pretty nice..
<matti> becom33_: parse! twice?
<Elico1> on the event machine
<matti> banisterfiend: LOL
<becom33_> Mon_Ouie, i know . but I wanna put a grab that error and put somthing else
Guedes0 has quit [Quit: Saindo]
<becom33_> matti, yea my bad
<bnagy> becom33_: helps if you tell people the error
<matti> banisterfiend: You are just jealous :)
<bnagy> becom33_: also optparse sucks, use trollop
<becom33_> bnagy, `parse': missing argument: -x (OptionParser::MissingArgument)
tiripamwe has joined #ruby
RegEchse has joined #ruby
butblack has quit [Quit: butblack]
<becom33_> umm ?
justinmcp has joined #ruby
WellMux has joined #ruby
timoshin has joined #ruby
fermion has joined #ruby
<bnagy> becom33_: I didn't say I could help, dude, just that without the error nobody else can either :) this is why I use trollop, that syntax is uuugly
nari has quit [Ping timeout: 245 seconds]
<Mon_Ouie> Just removing the extra call to parse! should fix it
vlad_starkov has quit [Remote host closed the connection]
Progster has joined #ruby
Zolrath has joined #ruby
schaerli has quit [Remote host closed the connection]
mklappstuhl has joined #ruby
Virunga has joined #ruby
dhruvasagar has quit [Ping timeout: 248 seconds]
dhruvasagar has joined #ruby
Virunga has quit [Remote host closed the connection]
fixl has joined #ruby
Virunga has joined #ruby
deryl has joined #ruby
strzalek has joined #ruby
Schmidt has quit [Ping timeout: 264 seconds]
jenrzzz has quit [Ping timeout: 248 seconds]
snearch has quit [Quit: Verlassend]
vlad_starkov has joined #ruby
mucker has joined #ruby
mneorr_ has quit [Remote host closed the connection]
timonv has quit [Remote host closed the connection]
mneorr has joined #ruby
timonv has joined #ruby
s1n4 has joined #ruby
_pdelgallego has joined #ruby
pdelgallego has quit [Read error: Connection reset by peer]
_pdelgallego is now known as pdelgallego
cascalheir has joined #ruby
qwerxy has quit [Read error: Connection reset by peer]
qwerxy has joined #ruby
frogprince_mac has joined #ruby
maasha has quit [Quit: Page closed]
jjbohn has joined #ruby
cascalheira has quit [Ping timeout: 246 seconds]
dmiller has joined #ruby
geggam has quit [Read error: Connection reset by peer]
RudyValencia has quit [Read error: Connection reset by peer]
RudyValencia has joined #ruby
frogprince_mac has quit [Read error: Connection reset by peer]
mneorr has quit [Remote host closed the connection]
justsee has quit [Read error: Connection reset by peer]
frogprince_mac has joined #ruby
mneorr has joined #ruby
lolsuper_ has quit [Read error: Connection reset by peer]
pdelgallego has quit [Read error: Connection reset by peer]
pdelgallego has joined #ruby
lolsuper_ has joined #ruby
lolsuper_ has quit [Changing host]
lolsuper_ has joined #ruby
areil has quit [Remote host closed the connection]
Banistergalaxy has quit [Ping timeout: 264 seconds]
Banistergalaxy has joined #ruby
Zespre has quit [Ping timeout: 252 seconds]
poppiez has joined #ruby
Zespre has joined #ruby
justinmcp has quit [Remote host closed the connection]
vectorshelve has quit [Quit: Page closed]
g_rotbart has quit [Remote host closed the connection]
lampe2 has quit [Quit: Verlassend]
heftig has quit [Quit: leaving]
<bnagy> is there a slick way to get require_relative to work when a file is eval'ed?
Eplemosen has joined #ruby
<bnagy> I get can't infer basepath
M- has joined #ruby
<Mon_Ouie> AFAIK you can't, it only works with the standard methods to load a file (which I don't think is a useful restriction)
<bnagy> hm
<Mon_Ouie> You could just set the load path, even temporarily
<bnagy> k
<bnagy> well the file I am reading is the one that has require_relative
<bnagy> let's imagine I can't change that file
BiHi has joined #ruby
M- has quit [Client Quit]
<bnagy> basically the idea is to get a class from a file when we don't know the classname
cascalheir has quit [Ping timeout: 250 seconds]
<Mon_Ouie> Well, pretty much the only way would be to redefine require_relative then
<bnagy> so I make a module, read the file, eval, and then do Sandbox.constants.first
Criztian has quit [Remote host closed the connection]
<bnagy> if there's a better pattern for that, that would be fine as well
<bnagy> hmm maybe I could get get toplevel constants, require the file, then get constants again
heisenmink has quit [Remote host closed the connection]
<banisterfiend> bnagy: cant u use ripper or sth for that
geekbri has joined #ruby
<banisterfiend> bnagy: or if you are guaranteed the file contains simple code, u can just scan through it for regex for /^module (\w+)/ or sth
IPGlider has quit []
<bnagy> banisterfiend: yeah but that would be horrible :)
<bnagy> looks like diffing Object.constants works
<banisterfiend> not as horrible as evalling it in a random module just to find the name of the class ;)
<banisterfiend> unless u want to keep teh code once u've eval'd it?
<bnagy> I do
<banisterfiend> k00
heftig has joined #ruby
<bnagy> I gotta give it as a klass to another object
<Xeago> what is a klass?
relix has joined #ruby
<banisterfiend> Xeago: cooler way of saying class
<bnagy> a term people use when referring to holding a Class in a variable
<Xeago> to avoid name conflict?
<banisterfiend> yea
<Xeago> aight
<Xeago> sensemaking skills+1
dhruvasagar has quit [Ping timeout: 246 seconds]
dhruvasagar has joined #ruby
qwerxy has quit [Read error: No route to host]
Hanmac has quit [Ping timeout: 248 seconds]
qwerxy has joined #ruby
relix has quit [Client Quit]
pdelgallego has quit [Ping timeout: 245 seconds]
wmoxam_ has joined #ruby
<Mon_Ouie> If you use Ripper, the code won't detect smart things like using const_set or A = Struct.new(…)
jorge has joined #ruby
<Mon_Ouie> The latter doesn't really qualify as a clever trick, actually
<ccooke> neither does the former, really
<shevy> hehehe
tk__ has joined #ruby
strzalek has quit [Read error: Connection reset by peer]
Speed has quit [Ping timeout: 252 seconds]
Hanmac has joined #ruby
vectorshelve_ has quit [Quit: Page closed]
nanderoo has joined #ruby
Virunga has quit [Remote host closed the connection]
yoklov has joined #ruby
yoklov has quit [Client Quit]
wangr_ has quit [Read error: Connection reset by peer]
iamjarvo has joined #ruby
wangr has joined #ruby
freeayu has joined #ruby
wangr has quit [Read error: Connection reset by peer]
wangr has joined #ruby
t85234 has quit [Remote host closed the connection]
t15366 has joined #ruby
sailias has joined #ruby
nwest has joined #ruby
seanwash has joined #ruby
jrajav has joined #ruby
dpk has joined #ruby
workmad3 has joined #ruby
jasonkuhrt has joined #ruby
Takehiro has quit [Remote host closed the connection]
Eplemosen has quit [Quit: NOPE]
nateberkopec has joined #ruby
edwardj has quit [Remote host closed the connection]
Denommus has joined #ruby
vivien__ has joined #ruby
dhruvasagar has quit [Ping timeout: 246 seconds]
Zespre has quit [Ping timeout: 265 seconds]
dhruvasagar has joined #ruby
yasushi has joined #ruby
Takehiro has joined #ruby
kn330 has joined #ruby
jwbuurlage has quit [Read error: Connection reset by peer]
Huis_ has joined #ruby
jwbuurlage has joined #ruby
wangr has quit [Read error: Connection reset by peer]
erichmenge has joined #ruby
Takehiro has quit [Remote host closed the connection]
wangr has joined #ruby
Zespre has joined #ruby
<kn330> What would be the best way to perform modular arithmetic on matrices in ruby? eg: {Inverse(A) mod(26)} | reference: http://is.gd/aWRjsP , Hill Cipher
carloslopes has joined #ruby
Takehiro has joined #ruby
bwwrd has joined #ruby
Denommus has quit [Quit: rebooting]
Foxandxss has quit [Quit: KVIrc 4.2.0 Equilibrium http://www.kvirc.net/]
dotemacs has quit [Read error: Operation timed out]
<kn330> Hanmac: The Matrix#inverse computes the regular inverse of a matrix, I need a modular multiplicative inverse
dotemacs has joined #ruby
Poapfel has quit [Quit: WeeChat 0.3.7]
allanm_ has quit [Read error: Connection reset by peer]
fantazo has joined #ruby
johnjohnson has joined #ruby
Takehiro has quit [Remote host closed the connection]
Poapfel has joined #ruby
`brendan has joined #ruby
Takehiro has joined #ruby
wangr has quit [Read error: Connection reset by peer]
wangr has joined #ruby
aristidesfl has joined #ruby
darkfox83 has joined #ruby
flype has quit [Quit: ["Textual IRC Client: www.textualapp.com"]]
sailias has quit []
t15366 has quit [Remote host closed the connection]
t74575 has joined #ruby
Schmidt has joined #ruby
Zespre has quit [Ping timeout: 268 seconds]
Takehiro has quit [Remote host closed the connection]
thisirs has joined #ruby
jjbohn has quit [Quit: Leaving...]
ph^ has quit [Remote host closed the connection]
Targen has quit [Quit: No Ping reply in 180 seconds.]
Targen has joined #ruby
Takehiro has joined #ruby
bwwrd has quit [Quit: ["Textual IRC Client: www.textualapp.com"]]
bwwrd has joined #ruby
<charliesome> >> Class.allocate.tap { |klass| klass.send :initialize, klass }
tommyvyo_ has joined #ruby
tommyvyo_ has quit [Changing host]
tommyvyo_ has joined #ruby
<charliesome> oops
CarlB_the_great has joined #ruby
darkfox83 has quit [Quit: Ex-Chat]
linoj has joined #ruby
Zespre has joined #ruby
Speed has joined #ruby
Speed has quit [Changing host]
Speed has joined #ruby
wangr has quit [Read error: Connection reset by peer]
wangr has joined #ruby
timoshin has quit [Remote host closed the connection]
tiripamwe has quit [Ping timeout: 252 seconds]
cakehero has joined #ruby
bwwrd has quit [Quit: ["Textual IRC Client: www.textualapp.com"]]
Speed has quit [Ping timeout: 252 seconds]
Speed has joined #ruby
Speed has quit [Changing host]
Speed has joined #ruby
vivien__ has quit [Ping timeout: 264 seconds]
[Neurotic] has quit [Remote host closed the connection]
iamjarvo has quit [Ping timeout: 244 seconds]
ringotwo has quit [Remote host closed the connection]
timoshin has joined #ruby
ananthakumaran1 has quit [Quit: Leaving.]
Speed has quit [Remote host closed the connection]
elhu has joined #ruby
t74575 has quit [Remote host closed the connection]
t81847 has joined #ruby
ph^ has joined #ruby
devdazed has quit [Quit: Bye]
wangr has quit [Read error: Connection reset by peer]
wangr has joined #ruby
allsystemsarego has joined #ruby
devdazed has joined #ruby
tommyvyo_ has quit [Quit: Textual IRC Client: http://www.textualapp.com/]
jonathanwallace has quit [Remote host closed the connection]
allsystemsarego has quit [Client Quit]
Coad has joined #ruby
allsystemsarego has joined #ruby
allsystemsarego has quit [Changing host]
allsystemsarego has joined #ruby
gyre007 has joined #ruby
<gyre007> guys, I have a question about unicorn...i have it running on my server however it's spiking up my CPU like crazy...I've no idea why...CPU is constantly on 99% because of unicorn despite the fact that the site is not being accessed by anyone...does anyone know how to approach the investigation ?
Tomasso has joined #ruby
GenghisKen has joined #ruby
GenghisKen has quit [Changing host]
GenghisKen has joined #ruby
wangr has quit [Read error: Connection reset by peer]
Zolrath has quit [Quit: Computer has gone to sleep.]
<Coad> ?
wangr has joined #ruby
asobrasil has joined #ruby
<gyre007> Coad, it's about restarting I guess...it's constantly on 100% although the preforked processes are dying and the new ones are eating as much as the old ones...ill have a look
<Coad> Damn :/
jorge has quit [Remote host closed the connection]
<gyre007> oh and I have only 2 workers
<Coad> hmm
<gyre007> im thinking it might be related to disk space usage ?
<gyre007> it's almost 100%
<gyre007> well actually it's 100%
<Coad> wtf
<Coad> HMmm, have you tried deploying this to heroku and seeing how that goes?
JoshWines has quit [Ping timeout: 245 seconds]
<Coad> It could be something wrong with the servfer config
WellMux has quit [Ping timeout: 245 seconds]
<gyre007> its running on VM...yesterday all was ok when I set it up...I stopped the VM when I went home started it today and Unicorn is going nuts :)
<gyre007> dodgy bizzare stuff :)
elhu has quit [Ping timeout: 244 seconds]
JoshWines has joined #ruby
GoGoGarrett has joined #ruby
fmcgeough has joined #ruby
tommyvyo_ has joined #ruby
tommyvyo_ has quit [Changing host]
tommyvyo_ has joined #ruby
elhu has joined #ruby
mmitchell has joined #ruby
pu22l3r has joined #ruby
pu22l3r has quit [Remote host closed the connection]
pu22l3r has joined #ruby
<kn330> Is there any library to calculate the Modular Multiplicative Inverse of a matrix? eg: {Inverse(A) mod(26)} | reference: http://is.gd/aWRjsP , Hill Cipher
axl_ has joined #ruby
mmitchel_ has joined #ruby
mmitchell has quit [Read error: Operation timed out]
iori has quit [Remote host closed the connection]
infinitiguy has joined #ruby
jwbuurlage has quit [Read error: Connection reset by peer]
Huis_ has quit [Read error: Connection reset by peer]
freeayu has quit [Ping timeout: 256 seconds]
vitoravelino is now known as vitoravelino`afk
vitoravelino`afk is now known as vitoravelino
Agis__ has quit [Quit: Agis__]
cantbecool has joined #ruby
uris has joined #ruby
Liothen_ has quit [Remote host closed the connection]
wangr has quit [Read error: Connection reset by peer]
CarlB_the_great has quit [Ping timeout: 244 seconds]
CarlB_th_ has joined #ruby
wangr has joined #ruby
fixl has quit [Ping timeout: 264 seconds]
nochaman_ has joined #ruby
iamjarvo has joined #ruby
wmoxam_ has quit [Ping timeout: 244 seconds]
joaoh82 has joined #ruby
nyuszika7h has left #ruby [#ruby]
rh1n0 has joined #ruby
jonathanwallace has joined #ruby
Coad has quit [Ping timeout: 244 seconds]
wangr has quit [Read error: Connection reset by peer]
ananthakumaran has joined #ruby
wangr has joined #ruby
wangr has quit [Read error: Connection reset by peer]
jclem has joined #ruby
rh1n0 has quit [Client Quit]
wangr has joined #ruby
Coad has joined #ruby
Coad has quit [Client Quit]
tiripamwe has joined #ruby
johnlcox has joined #ruby
wangr has quit [Read error: Connection reset by peer]
paolooo has quit [Quit: Page closed]
wangr has joined #ruby
jclem has quit [Client Quit]
paolooo has joined #ruby
stopbit has joined #ruby
rrichards has joined #ruby
bier has quit [Read error: Connection reset by peer]
Spooner has joined #ruby
pdelgallego has joined #ruby
bier has joined #ruby
jgarvey has joined #ruby
<nochaman_> what is here this ?
seanwash has quit [Quit: Leaving.]
<Muz> You no make English sense good.
<nochaman_> ok
mmitchel_ has quit [Remote host closed the connection]
<nochaman_> i reading english good
seanyo has joined #ruby
dhruvasagar has quit [Ping timeout: 246 seconds]
CarlB_th_ has quit [Ping timeout: 265 seconds]
kiyoura has joined #ruby
nochaman_ has left #ruby [#ruby]
<Hanmac> ruby has no "this" :P it has "self" :D
joshman_ has joined #ruby
mmitchell has joined #ruby
indian has quit [Ping timeout: 240 seconds]
wangr has quit [Read error: Connection reset by peer]
LouisGB has joined #ruby
elhu has quit [Quit: ["Textual IRC Client: www.textualapp.com"]]
wangr has joined #ruby
n8888 has quit [Ping timeout: 256 seconds]
jmeeuwen has quit [Read error: Connection reset by peer]
awarner has joined #ruby
Guest91661 has quit [Ping timeout: 256 seconds]
t81847 has quit [Remote host closed the connection]
jmeeuwen has joined #ruby
fred has joined #ruby
<elico> matti: i wrote it using event machine...
t98789 has joined #ruby
fred is now known as Guest29448
<matti> elico: \o/
arkiver has quit [Quit: Leaving]
mmitchell has quit [Remote host closed the connection]
<matti> elico: There you go, you rock ;]
<elico> it wasnt that simple...
<elico> i had to rearrange my minf for that
<elico> mind*
ly_gs has quit [Remote host closed the connection]
<bnagy> when you look back it will look simple
<elico> it's moving from "socket" to nice and smooth apu
Jay_Levitt has joined #ruby
<elico> api*
<bnagy> biggest issue with EM is the brain bending when you start using it
<bnagy> that's why the python equiv is called Twisted :S
<elico> haha nice!
jonathanwallace has quit [Remote host closed the connection]
<elico> well rewriting a protocol in it seems really nice..
<bnagy> it's a fantastic pattern for some stuff
ph^ has quit [Remote host closed the connection]
<bnagy> Reactor is the OOP buzzword
<bnagy> really natural for a lot of servers
dmiller has quit [Read error: Connection reset by peer]
<elico> now i just need to add some statistics and logs to the software since the protocol is bullet proof
rippa has joined #ruby
peregrine81 has joined #ruby
jlogsdon has joined #ruby
asteve has joined #ruby
deryl has quit [Quit: Time To Go, Too Bad, So Sad!]
jrajav has quit []
JoshWines has quit [Remote host closed the connection]
seanwash has joined #ruby
pskosinski has quit [Remote host closed the connection]
macer1 has quit [Ping timeout: 264 seconds]
KarlHungus has quit [Quit: Reconnecting]
KarlHungus has joined #ruby
KarlHungus has joined #ruby
KarlHungus has quit [Changing host]
gfontenot has joined #ruby
wangr has quit [Read error: Connection reset by peer]
pdelgallego has quit [Read error: Connection reset by peer]
nochamani has joined #ruby
pdelgallego has joined #ruby
vlad_sta_ has joined #ruby
wangr has joined #ruby
mahmoudimus has joined #ruby
zeknox has quit [Ping timeout: 265 seconds]
macer1 has joined #ruby
zeknox has joined #ruby
wangr has quit [Read error: Connection reset by peer]
ace has left #ruby [#ruby]
wangr has joined #ruby
bapa has quit [Ping timeout: 260 seconds]
Virunga has joined #ruby
geekbri has quit [Read error: Connection reset by peer]
vlad_starkov has quit [Ping timeout: 245 seconds]
vivien__ has joined #ruby
bapa has joined #ruby
albel727 has quit [Ping timeout: 245 seconds]
ryk has joined #ruby
sailias has joined #ruby
DarthGandalf has quit [Ping timeout: 245 seconds]
ryk has left #ruby [#ruby]
cakehero has quit [Ping timeout: 264 seconds]
qos has joined #ruby
nochaman_ has joined #ruby
wmoxam_ has joined #ruby
DarthGandalf has joined #ruby
albel727 has joined #ruby
cakehero has joined #ruby
otters has quit [Ping timeout: 264 seconds]
ping-pong has quit [Ping timeout: 244 seconds]
deryl has joined #ruby
maddog_ has quit [Ping timeout: 276 seconds]
maddog_ has joined #ruby
wangr has quit [Read error: Connection reset by peer]
nochamani has quit [Ping timeout: 245 seconds]
wangr has joined #ruby
datapolitical has joined #ruby
pdelgallego has quit [Read error: Connection reset by peer]
charliesome has quit [Quit: Textual IRC Client: www.textualapp.com]
kvirani has joined #ruby
pdelgallego has joined #ruby
t98789 has quit [Remote host closed the connection]
t62190 has joined #ruby
noam has quit [Ping timeout: 245 seconds]
ping-pong has joined #ruby
gfontenot has quit []
mmitchell has joined #ruby
ringotwo has joined #ruby
pdelgallego has quit [Read error: Connection reset by peer]
pdelgallego has joined #ruby
vikingly has joined #ruby
djdb has quit [Quit: Ухожу я от вас (xchat 2.4.5 или старше)]
diegoviola has joined #ruby
geekbri has joined #ruby
jorge has joined #ruby
<vikingly> Hi! I have a timezone (e.g 'america/los angeles') and want to create an arbitrary time in a zone (e.g month: 1, day: 1, hour: 1, min:1, sec: 1), but I have a problem with ruby time requiring a time offset.
otters has joined #ruby
wangr has quit [Read error: Connection reset by peer]
<vikingly> the formatted offset is different in daylight savings, so it is dependent upon time. How do I get the formatted offset at a specific time in ruby?
noam has joined #ruby
tagrudev has quit [Remote host closed the connection]
jclem has joined #ruby
wangr has joined #ruby
mohits has quit [Read error: Connection timed out]
jorge has quit [Ping timeout: 245 seconds]
mohits has joined #ruby
mohits has quit [Changing host]
mohits has joined #ruby
jjbohn has joined #ruby
jprovazn is now known as jprovazn_away
the_hack has joined #ruby
jprovazn_away has quit [Quit: Leaving]
yasushi has quit [Remote host closed the connection]
bluOxigen has quit [Ping timeout: 264 seconds]
DrShoggoth has joined #ruby
wangr has quit [Read error: Connection reset by peer]
mahmoudimus has quit [Quit: Computer has gone to sleep.]
wangr has joined #ruby
seanwash has left #ruby [#ruby]
mmitchell has quit [Remote host closed the connection]
<kiyoura> you know you're a hacker when you have off-by-one's in ruby <_<
fantazo has quit [Remote host closed the connection]
Quadrant_ has quit [Quit: Leaving]
arturaz has quit [Ping timeout: 264 seconds]
<Hanmac> kiyoura what is off-by-one?
gfontenot has joined #ruby
bwwrd has joined #ruby
bwwrd has quit [Client Quit]
<kiyoura> when dealing with linear operations [typically arrays or strings] and accidentally iterate above/below boundaries
bwwrd has joined #ruby
pskosinski has joined #ruby
<pskosinski> What is wrong with this line? $to_remove.each{|el| el = el.sub('/', '\')}
quest88 has joined #ruby
<pskosinski> I get: unterminated string meets end of file
_jgr_ has joined #ruby
rubious has joined #ruby
<Hanmac> >> [].each{|el| el = el.sub('/', '\\')}
<al2o3cr> (Array) []
D4T has joined #ruby
<pskosinski> Oh :x
wangr has quit [Read error: Connection reset by peer]
<pskosinski> Thank you. :)
wangr has joined #ruby
<koshii> Jesus Ruby Koans is brilliant. Brilliant, I say!
<Hanmac> kiyoura what did you do?
tiripamwe has quit [Ping timeout: 260 seconds]
<D4T> whats the best way of doing something like: puts "something" unless myString == "foo" || myString == "bar"
<D4T> that only matches against "foo" for some reason
macer1 has quit [Read error: Connection reset by peer]
quest88 has quit [Quit: quest88]
<kiyoura> Hanmac: i kept an index variable to keep track of position in each_char (so that i could use it again later) for two encrypt/decrypt methods and forgot i essentially post-incremented
<kiyoura> so i had to index -= 1 before going through the string again to decrypt
IrishGringo has quit [Quit: ChatZilla 0.9.88.2 [Firefox 15.0/20120824154833]]
<Hanmac> what about: each_char.with_index ?
<kiyoura> haha, wasn't aware!
<kiyoura> oh that's a 1.9 method?
vikingly has quit [Read error: Connection reset by peer]
macer1 has joined #ruby
<Hanmac> yeah, isnt it a nice reason to upgrade? :P
<kiyoura> XD
atmosx has joined #ruby
<kiyoura> im still an ANSI C guy Hanmac <_<. but i'll try
<shevy> save for the Encoding addition in 1.9
<Hanmac> yeah come to the "1.9" side ... we have cooler methods :D
<kiyoura> haha well let me 'master' 1.8 first! i think using rails will force me to use 1.9 anyways
<atmosx> hello, shevy I need a hint
<shevy> I am curious how mruby will try to solve internationalization
<kiyoura> what i do like is that ruby 1.9 is much faster
<Hanmac> shevy you mean internationalized error messages?
Virunga has quit [Read error: Connection reset by peer]
<shevy> no I mean Encoding actually. if we would have only one language, internationalization would be super simple
t62190 has quit [Remote host closed the connection]
wangr has quit [Read error: Connection reset by peer]
<atmosx> I have a class method that returns tweets like -> puts "#{text}, #{id}, #{time}, #{location}" … for each tweet, now what is the best way for another method to get this info? return?
t70485 has joined #ruby
Virunga has joined #ruby
<shevy> call it
<shevy> Foo.name
wangr has joined #ruby
wangr has quit [Read error: Connection reset by peer]
<atmosx> hmm let's try
jrajav has joined #ruby
Caius has quit [Ping timeout: 252 seconds]
<matti> shevy.make_me_coffee(:kind => :latte, :sugar => :none)
<matti> ;d
<matti> Now, does it work?
chussenot has quit [Quit: chussenot]
wangr has joined #ruby
Sou|cutter has quit [Changing host]
Sou|cutter has joined #ruby
sj26 has quit [Quit: Rainbows!]
<kiyoura> matti: you should use a hash literal
<kiyoura> instead of a varadic function
<matti> OK OK Sorry
<shevy> matti, #NoMethodError
<shevy> what is a varadic function
<shevy> is that like a monadic function but valid for nil values?
chussenot has joined #ruby
<kiyoura> variadic *
<kiyoura> shevy: a function that excepts multiple (indefinite) arguments
<atmosx> I must start using hashes for these values
<atmosx> hmm
<atmosx> looks cleaner and easier, I never use them
sj26 has joined #ruby
wangr has quit [Read error: Connection reset by peer]
williamherry has quit [Ping timeout: 264 seconds]
Caius has joined #ruby
tiripamwe has joined #ruby
wangr has joined #ruby
<kiyoura> s/excepts/accepts/
burgestrand has quit [Quit: Leaving.]
<shevy> kiyoura aaaah varargs
<kiyoura> yeah
<shevy> vampiric functions
cantonic has joined #ruby
<shevy> they drain all your time
<kiyoura> lmao
<shevy> kiyoura do you have a japanese nick?
<koshii> atmosx: If my experience with Ruby Koans and the subsequent discussion of nuances on this channel are any indicator, a lot of people don't use them/understand them.
<shevy> I never looked at ruby koans
* Hanmac throws "->" at the vampiric functions
<shevy> Hanmac lol
<kiyoura> shevy: indeed i do, but coincidentally i just thought it up randomly XD
<shevy> finally I see why matz added ->
ken_barber has joined #ruby
<atmosx> koshii: well yes, but I'd like to use them… I see them in all 'code tha matters'… I was taking a deeper look at 'tweestream' github repo's code… I've seen many things I don't understand or never saw before
<shevy> or he thought ruby needs it because perl has it too
<atmosx> they also use hashes all the time
<atmosx> anyway
<kiyoura> imo dont compare ruby to perl <_<
mmitchell has joined #ruby
<kiyoura> ruby is like a full toolset, perl is just a pocket knife
sendoushi has joined #ruby
bradhe has quit [Read error: Connection reset by peer]
<shevy> matz took a few ideas from perl
erichmenge has quit [Quit: Linkinus - http://linkinus.com]
<koshii> kiyoura: Heh I'm sure they would say it's the other way around. :-)
<shevy> $0 for instance
sendoushi has quit [Remote host closed the connection]
<koshii> But Perl code is a diaster when I look at it. Just fucking ugly.
bradhe has joined #ruby
<shevy> I think the regex part too and $1 $2
<kiyoura> koshii: exactly ..
<koshii> I really don't understand how people can work with it.
<shevy> and "there is more than one way to do it"
<hoelzro> it's not that bad to work with
<hoelzro> it *is* possible to write readable Perl.
<kiyoura> i prefer it to be called 'python's sister' than perl's sister
<kiyoura> perl is lonely
<koshii> hoelzro: That's a good book title! "Readable Perl"
<shevy> koshii if you were 25 years old when perl came about, you would now be ... 45 or 50 or something like that
<fkumro> koshii: If done right its not too bad, but most people don't do it right
<shevy> and old folks hate to learn new things, despite them saying otherwise
yasushi has joined #ruby
<koshii> shevy: Well, I'm 42 and just learning Ruby.
wangr has quit [Read error: Connection reset by peer]
coderhut has joined #ruby
<shevy> ok but take git
<shevy> git was started by linus
the_hack has quit [Ping timeout: 244 seconds]
<shevy> git uses C and perl
<shevy> why perl!!!
<hoelzro> and shell
<shevy> really??
<kiyoura> shevy: but github uses ruby ;)
<shevy> hmmmm
<matti> kiyoura: (:a => 1, :b => 1) is sill parsed as one Hash? Or am I wrong?
<hoelzro> because perl is ubiquitous?
<hoelzro> (sp)
<kiyoura> so just always use github XD
wangr has joined #ruby
<koshii> I didn't know that Linus developed Git...
<kiyoura> matti: the syntax is {:a => 1, :b => 2}
<shevy> hoelzro but so is python
coderhut has quit [Client Quit]
<JonnieCache> git used to be almost all perl
mark_locklear has joined #ruby
<JonnieCache> they rewrote it in c
<hoelzro> I wouldn't say that, shevy
allyraza has joined #ruby
coderhut has joined #ruby
<hoelzro> there are plenty of Linux distros that don't include python by default
<matti> kiyoura: Well, yes but....
<atmosx> koshii: the speech at google was really entertaining
<shevy> git used to be almost pure perl??
<mark_locklear> hey
<koshii> atmosx: I'll have to check that out.
<koshii> atmosx: I didn't think he developed it because, didn't the Linux kernel team adopt it quite late?
<shevy> I am beginning to believe linus only knows C, assembler and perl
<matti> >> def t(h={}) ; p h ; end ; t(:a => 1, :b => 2)
<al2o3cr> (Hash) {:a=>1, :b=>2}, Console: {:a=>1, :b=>2}
<koshii> shevy: A real hacker :-)
<mark_locklear> hey guys...I have a small script I am writing that needs to login to a db with the username and password. I am assuming I don't want this in clear text in the script. what is the best way to handle this. An include file?
<kiyoura> shevy: liek a boss
<shevy> hehe
<koshii> It's a fact: people whose primary languages are C and Assembly are 80% more likely to have a ponytail.
bradhe has quit [Remote host closed the connection]
Synthead has joined #ruby
<matti> kiyoura: I might be slow today, but ... I don't follow ;]
aganov has quit [Read error: Connection reset by peer]
<shevy> koshii when they still have enough hair
<koshii> shevy: True. :-)
<kiyoura> koshii: <_< f u
<hoelzro> mark_locklear: a config file, maybe
<koshii> haha
<kiyoura> so what if i have a ponytail right now
t70485 has quit [Remote host closed the connection]
<atmosx> koshii: http://www.youtube.com/watch?v=4XpnKHJAok8 … a friend of mine, who is a .NET programmer - now he is learning python at a fast pace - told me that he sounds a bit becuase he's so full of himself… On the other hand he knows how to write code.
t68500 has joined #ruby
<koshii> kiyoura: Hope your C is good :)
<shevy> atmosx what!
<shevy> atmosx why do you befriend pythonista!!!
* shevy turns his head away sadly
the_hack has joined #ruby
<atmosx> shevy: I told him to switch whilst in time, hahaha
<kiyoura> koshii: i hope so too!
<atmosx> shevy: he'll be converted in time, don't worry
<shevy> atmosx, btw you should upload the code snippet to pastie.org you try to use for your class method
<koshii> Ugh, 240p :)
* matti gives kiyoura teh looks and cries
<koshii> I can't believe we used to put up with this.
<atmosx> shevy: I'll gist it wait
<shevy> koshii be thankful it was not recorded with a potato
<koshii> :D
<kiyoura> matti: wait a minute.. by good C..do you mean readable?
<kiyoura> XD
tk__ has quit [Quit: ばいばい]
<shevy> today I saw a documentation, how a spider sees objects
imami|afk is now known as banseljaj
<koshii> shevy: An 8-legged spider?
<kiyoura> shevy: she Observers :p
<shevy> the spider was not able to make out too much details, and it felt rasterized, but you could still recognize the face of a human quite easily
<koshii> (cymbal crash)
<atmosx> here https://gist.github.com/3530455 … I want to use every tweet in another method.
<shevy> yeah koshii... a jumping spider (the kind that tries to catch its prey with a jump... most spiders normally use a web)
levieraf has joined #ruby
<koshii> Oh you really DO mean a spider.
bwwrd has quit [Quit: Computer has gone to sleep.]
<shevy> yeah
<levieraf> Hi guys
<koshii> shevy: Send me that?
<shevy> they can see a human face
<levieraf> sorry for the that will do
<levieraf> Create an interface Electric that has the methods IsCharged and Charge. IsCharged should return false unless Charge has been called.
<levieraf> Create a class Prius that implements Electric. Prius should override IsCharged to return false if the car has traveled over 100 miles since the
<levieraf> last charge.
<levieraf> Extend the class Prius with the class Car.
<levieraf> Car should have a function called OdometerReading that returns the total number of miles a vehicle has traveled.
<levieraf> Car should have a method called Drive that takes a single argument, this is the number of miles that the car will drive.
<levieraf> Prius should override the method Drive so if the integer passed in is greater than 100 then the car will only drive 100 miles (the range of the
<shevy> koshii hmm will try to find it, it was not on youtube but on a channel
<shevy> levieraf
<levieraf> vehicle)
<koshii> WTF
<shevy> why do you do that
<shevy> can someone ban him
<koshii> Accidental pasting probably.
<matti> kiyoura: ? :)
<matti> kiyoura: I am still asking about Hash passing.
<levieraf> shevy, sorry again my friend
<shevy> looks like java homework assignment
<shevy> class Car
<shevy> def Drive
<atmosx> [18:12:14] <levieraf> sorry for the that will do <--- he did it on purpose. He is evil
<shevy> but why is it upcased?
<kiyoura> matti: yeah sorry wrong person
<shevy> def Drive(argument_here)
olrrai has joined #ruby
<shevy> also you cant extend a class in ruby with another class. you can only subclass. unless I am wrong
<levieraf> how i can do that?
olrrai has quit [Client Quit]
<shevy> and extend a module
<shevy> first create a .rb file
<shevy> :D
<shevy> then start with class Prius
<shevy> once that is finished and works
<shevy> class Car < Prius
jlebrech has quit [Remote host closed the connection]
<shevy> (or other way around, I have no idea what you need actually lol)
<levieraf> shevy, look that
<shevy> you simply turn reallife descriptions into ruby code
<shevy> "IsCharged should return false unless Charge has been called."
<shevy> when Charge is called, set an @instance_variable
<shevy> def IsCharged
<shevy> return @is_charged
<shevy> horrible method names you have to use btw
<shevy> in ruby idiom it is more often seen to have things like
<shevy> def is_charged?
<shevy> @is_charged
<atmosx> Failed to connect to Twitter: Rate limit exceeded. Clients may not make more than 150 requests per hour. <---- #blah
ph^ has joined #ruby
<shevy> :(
maesbn has quit [Remote host closed the connection]
<shevy> bastards
<shevy> write them a hate mail
<shevy> if they ignore it
<atmosx> yes, they killed Kenny!
mmitchell has quit [Remote host closed the connection]
<kiyoura> atmosx: lrn2cache
<shevy> drive over to their place
Hanmac has quit [Ping timeout: 245 seconds]
<atmosx> kiyoura: explain further, becuase I'm heavilly interested
<JonnieCache> did you make the mistake of doing api hits in your test stuie?
<JonnieCache> im banned from the google geolocation api because of that
<atmosx> ah learn to cache?
<atmosx> how do I learn that?
<shevy> levieraf, do not PRIVMSG
<shevy> you spam me
x77686d has joined #ruby
ionte has joined #ruby
<shevy> if you have code to show, go to pastie.org
<atmosx> JonnieCache: yes!
<shevy> paste the code there. then provide the link here on #ruby
<kiyoura> atmosx: cache the read tweets, so you dont have to pull again
<atmosx> JonnieCache: I do it all the time
<shevy> levieraf, last warning before I have to /ignore you
<atmosx> kiyoura: sounds cool, how do I do that?
<levieraf> shevy, ok sir
<shevy> man
<shevy> that were like 100 lines
<shevy> go to pastie.org
<kiyoura> atmosx: you can cough up your own method and write the tweets into maybe json or some other format and save them. or use a cache gem
<atmosx> I'm not able to write a test suite, I do it manually… so this cache thing is good.
<shevy> btw using @@foo variables is usually a bad idea
<atmosx> the cache gem is a good solution
<koshii> shevy: What is @@ exactly?
<shevy> a class variable
<atmosx> kiyoura: otherwise You mean, I can write a tweet-2-yaml and use that right?
<kiyoura> class variable
<atmosx> shevy: I see it as 'balls'
<kiyoura> atmosx: yeah
<shevy> it's valid for a class
<shevy> class Foo
<koshii> How would you use it?
<shevy> @@bla = 5
<koshii> Ah
<atmosx> kiyoura: this is annoygly easy to grasp concept
BSaboia has joined #ruby
<shevy> and all subclasses will be able to make use of this class variable too
<atmosx> but seems okay
<kiyoura> shevy: that's gross
<shevy> haha yeah
nochaman_ has quit [Remote host closed the connection]
<shevy> it confuses newcomers too
<kiyoura> that breaks encapsulation, inheritance in most cases should be avoided anyways
wmoxam_ has quit [Quit: leaving]
<shevy> it also leads to subtle bugs eventually
<kiyoura> unless you're overloading ;p
timoshin has quit [Remote host closed the connection]
bluOxigen has joined #ruby
chussenot has quit [Quit: chussenot]
<shevy> @@foo should be treated as potentially dangerous like global variables
<kiyoura> singleton is probably a better solution
ionte_ has quit [Ping timeout: 246 seconds]
<shevy> just that they reside in a class
<kiyoura> if something requires a @@var
<shevy> whereas a real global variable is really global
<shevy> :)
<kiyoura> shevy: or maybe global in Kernel ;p
<shevy> user_input = $stdin.gets.chomp
<shevy> hmm
kn330 has quit [Ping timeout: 260 seconds]
<shevy> I wonder if standard ruby makes use of @@foo variables
zommi has quit [Quit: Leaving.]
_jgr_ has quit [Ping timeout: 248 seconds]
<shevy> mechanize/test_case/refresh_without_url.rb: @@count = 0
<shevy> hahaha
davidcelis has quit [Quit: K-Lined.]
<shevy> that's exactly the only use case I can give for class variables
chussenot has joined #ruby
<shevy> a COUNTER
<shevy> :)
<shevy> bio-1.4.2/lib/bio/db/embl/sptr.rb: @@entry_regrexp = /[A-Z0-9]{1,4}_[A-Z0-9]{1,5}/
kn330 has joined #ruby
<shevy> :(
diegoviola has quit [Ping timeout: 260 seconds]
<shevy> they could use ENTRY_REGREXP instead
<shevy> bio-1.4.2/lib/bio/db/embl/sptr.rb: @@dr_database_identifier = ['EMBL','CARBBANK','DICTYDB']
__zfn__ has joined #ruby
x77686d has quit [Ping timeout: 252 seconds]
<shevy> tempfile.rb: @@cleanlist = []
macmartine has joined #ruby
__zfn__ has quit [Client Quit]
berserkr has joined #ruby
adeponte has joined #ruby
jjbohn has quit [Ping timeout: 244 seconds]
wangr has quit [Read error: Connection reset by peer]
cj3kim has joined #ruby
the_hack has quit [Quit: Leaving...]
cj3kim has quit [Changing host]
cj3kim has joined #ruby
wangr has joined #ruby
himsin has joined #ruby
x77686d has joined #ruby
cj3kim has quit [Client Quit]
mikepack has joined #ruby
GoGoGarrett has quit [Read error: Connection reset by peer]
Hanmac has joined #ruby
GoGoGarrett has joined #ruby
Asher1 has joined #ruby
Spooner has quit [Read error: Connection reset by peer]
wangr has quit [Read error: Connection reset by peer]
cascalheira has joined #ruby
darren__ has joined #ruby
atmosx has quit [Quit: ["Textual IRC Client: www.textualapp.com"]]
froy has quit [Remote host closed the connection]
wangr has joined #ruby
kn330 has quit [Ping timeout: 265 seconds]
flip_digits has joined #ruby
adeponte has quit [Remote host closed the connection]
jasonkuhrt has quit [Quit: Leaving...]
mtkd has joined #ruby
coderhut has quit [Quit: Page closed]
<levieraf> shevy, thanks man
<Synthead> Any idea what libs I need to resolve these dependency issues? http://pastie.org/4616934
<levieraf> shevy, thanks man
naz has quit [Read error: Connection reset by peer]
<shevy> hello echo
ph^ has quit [Remote host closed the connection]
<Synthead> this is when trying to compile ruby-shadow
naz has joined #ruby
<shevy> -lshadow
eldariof has quit [Read error: Operation timed out]
<mark_locklear> ok...what am I missing here...should this work? http://pastie.org/4617011 I just want to include a variable from another file.
<Synthead> shevy: this is on centos
kn330 has joined #ruby
jasonkuhrt has joined #ruby
alta189 has joined #ruby
<shevy> -lshadow is usually for a file called shadow.so
wobr has quit [Ping timeout: 246 seconds]
<shevy> mark_locklear and why does it not work
<shevy> Synthead hmm must be another .so file
wangr has quit [Read error: Connection reset by peer]
<shevy> shadow there does not install anything into lib/
Caius has quit [*.net *.split]
awarner has quit [*.net *.split]
timonv has quit [*.net *.split]
mucker has quit [*.net *.split]
statarb3 has quit [*.net *.split]
radic has quit [*.net *.split]
kaleido has quit [*.net *.split]
Adran has quit [*.net *.split]
Asher has quit [*.net *.split]
aspiers has quit [*.net *.split]
_marvin_ has quit [*.net *.split]
ickmund has quit [*.net *.split]
oz has quit [*.net *.split]
xargoon has quit [*.net *.split]
alta has quit [*.net *.split]
TomRone has quit [*.net *.split]
ewag has quit [*.net *.split]
rotor` has quit [*.net *.split]
nacengineer has quit [*.net *.split]
Rious has quit [*.net *.split]
patronus has quit [*.net *.split]
omry has quit [*.net *.split]
psino has quit [*.net *.split]
matti has quit [*.net *.split]
eml has quit [*.net *.split]
Shamgar has quit [*.net *.split]
nricciar has quit [*.net *.split]
WhereIsMySpoon has quit [*.net *.split]
mtkd_ has quit [*.net *.split]
jeedey has quit [*.net *.split]
examancer has quit [*.net *.split]
AndrzejKrzywda has quit [*.net *.split]
yeltzooo7 has quit [*.net *.split]
alta189 is now known as alta
t68500 has quit [Write error: Broken pipe]
<Synthead> shevy: looks like ruby-shadow is the only package that provides shadow.so, but that's what I'm compiling :p
t3327 has joined #ruby
wangr has joined #ruby
<lectrick__> A little idea I had around super easy object initialization with a params hash: https://gist.github.com/3531135
diegoviola has joined #ruby
Morkel has quit [Quit: Morkel]
<hoelzro> lectrick__: I wrote something like that a few days ago
<hoelzro> I haven't published it yet, though
<lectrick__> :)
fearoffish has joined #ruby
Caius has joined #ruby
awarner has joined #ruby
kaleido has joined #ruby
timonv has joined #ruby
_marvin_ has joined #ruby
patronus has joined #ruby
ickmund has joined #ruby
ewag has joined #ruby
Rious has joined #ruby
oz has joined #ruby
rotor` has joined #ruby
nacengineer has joined #ruby
omry has joined #ruby
radic has joined #ruby
aspiers has joined #ruby
Adran has joined #ruby
statarb3 has joined #ruby
mucker has joined #ruby
psino has joined #ruby
eml has joined #ruby
xargoon has joined #ruby
Shamgar has joined #ruby
TomRone has joined #ruby
nricciar has joined #ruby
matti has joined #ruby
jeedey has joined #ruby
yeltzooo7 has joined #ruby
AndrzejKrzywda has joined #ruby
examancer has joined #ruby
WhereIsMySpoon has joined #ruby
<lectrick__> great minds think alike? :)
mklappstuhl has quit [Ping timeout: 264 seconds]
SQLStud has joined #ruby
alvaro_o has joined #ruby
<mark_locklear> shevy, $db_user is nil
<hoelzro> haha
headius has joined #ruby
hoelzro is now known as hoelzro|away
<lectrick__> hoelzro: Should be modularized of course, dangerous to put that in the global namespace but yeah
bradhe has joined #ruby
mohits has quit [Read error: Connection reset by peer]
ckrailo has joined #ruby
Vert has quit [Read error: Connection reset by peer]
<gyre007> anyone has an idea why would unicorn be constantly on 100% CPU ?
wangr has quit [Read error: Connection reset by peer]
mmitchell has joined #ruby
wangr has joined #ruby
savage- has quit [Remote host closed the connection]
matrixise has quit [Ping timeout: 245 seconds]
<xorigin> leap second bug?
t3327 has quit [Remote host closed the connection]
t36824 has joined #ruby
yasushi has quit [Remote host closed the connection]
<xorigin> (a bit unlikely after 2 months, but you never know)
jgrevich has joined #ruby
cearls has joined #ruby
<cearls> what is the fastest way to read lines of a file into an array?
<Hanmac> cearls File.readlines("abc")
pdtpatrick has joined #ruby
joaoh82 has quit [Remote host closed the connection]
wangr has quit [Read error: Connection reset by peer]
ickmund has quit [Remote host closed the connection]
wangr has joined #ruby
cantbecool has quit [Quit: Textual IRC Client: www.textualapp.com]
<cearls> Hanmac: thanks, that's what i'm using, wanted to make sure there wasn't a faster way
Vert has joined #ruby
mmitchell has quit [Remote host closed the connection]
andrewstewart has joined #ruby
mmitchell has joined #ruby
berserkr has quit [Quit: Leaving.]
mahmoudimus has joined #ruby
datapolitical has quit [Quit: This computer has gone to sleep]
dmiller has joined #ruby
macmartine has quit [Quit: ["Textual IRC Client: www.textualapp.com"]]
hoelzro|away is now known as hoelzro
<hoelzro> lectrick__: I did it in a module you could mix into a base class
<hoelzro> so you could do class Foo ; include Antlers; attribute :foo, properties end
<Hanmac> cearls when you want an array, then there is no faster way
baroquebobcat has joined #ruby
thisirs has quit [Remote host closed the connection]
<cearls> Hanmac: would it slow it down if i do File.open and then readlines?
robotmay has quit [Remote host closed the connection]
<cearls> Hanmac: the file is over 100K lines
<Hanmac> cearls i think it would
baroquebobcat has quit [Read error: Connection reset by peer]
specialGuest has joined #ruby
specialGuest has joined #ruby
specialGuest has quit [Changing host]
baroquebobcat has joined #ruby
mneorr has quit [Remote host closed the connection]
davidcelis has joined #ruby
mneorr has joined #ruby
mneorr has quit [Remote host closed the connection]
davidcelis has quit [Read error: Connection reset by peer]
x77686d has quit [Ping timeout: 244 seconds]
mneorr has joined #ruby
baroquebobcat has quit [Read error: Connection reset by peer]
davidcelis has joined #ruby
baroquebobcat has joined #ruby
wangr has quit [Read error: Connection reset by peer]
wangr has joined #ruby
<cearls> Hanmac: last question, readlines gives me the \n at the end of each line, any built in way to strip it?
Virunga has quit [Quit: Sto andando via]
timonv has quit [Remote host closed the connection]
mmitchell has quit [Remote host closed the connection]
SCommette has joined #ruby
kn330 has quit [Ping timeout: 244 seconds]
savage- has joined #ruby
t36824 has quit [Remote host closed the connection]
hiroyuki has joined #ruby
t93507 has joined #ruby
<Hanmac> File.readlines("abc").map(&:strip), or better: File.foreach("abc").map(&:strip)
GoGoGarrett has quit [Remote host closed the connection]
ckrailo has quit [Quit: Computer has gone to sleep.]
mc0e has joined #ruby
kn330 has joined #ruby
mc0e1 has quit [Ping timeout: 240 seconds]
D4T has quit [Quit: ["Textual IRC Client: www.textualapp.com"]]
artOfWar has joined #ruby
<geekbri> Hanmac: .chomp ?
burgestrand has joined #ruby
mark_locklear has quit [Remote host closed the connection]
<Hanmac> chomp is fine too
wangr has quit [Read error: Connection reset by peer]
carloslopes has quit [Quit: Leaving.]
philips_ has quit [Excess Flood]
philips_ has joined #ruby
wangr has joined #ruby
aaroncm has joined #ruby
dmiller has quit [Ping timeout: 240 seconds]
<cearls> File.foreach faster than deadlines?
<cearls> readlines
<hoelzro> they're probably synonyms
adeponte has joined #ruby
rrichards has quit [Quit: Leaving...]
maletor has joined #ruby
yonggu has joined #ruby
<Hanmac> cearls the difference isthat foreach dont create an array first ... when you map it readlines create an array twice
c0rn_ has joined #ruby
khakimov has joined #ruby
levieraf has quit [Quit: Saliendo]
jorge has joined #ruby
flip_digits has quit [Quit: Computer has gone to sleep.]
kvirani has quit [Remote host closed the connection]
recycle has joined #ruby
havenn has joined #ruby
wangr has quit [Read error: Connection reset by peer]
wangr has joined #ruby
aibo has joined #ruby
mohits has joined #ruby
mohits has quit [Changing host]
mohits has joined #ruby
crowea has joined #ruby
wangr has quit [Read error: Connection reset by peer]
crowea has left #ruby [#ruby]
wangr has joined #ruby
ttilley has joined #ruby
<aibo> Hello, can't delete XML Node from XML tree using nokogiri gem, here is my code `page.search('//td[@class="Right"]').each { |node| node.remove }` it does nothing
shevy2 has joined #ruby
<cearls> Hanmac: what about getting lines that are more than 2 characters? does that need to be separate?
jorge has quit [Remote host closed the connection]
shevy has quit [Read error: Operation timed out]
jorge has joined #ruby
Eplemosen has joined #ruby
recycle has quit [Remote host closed the connection]
sepp2k1 has joined #ruby
timoshin has joined #ruby
sepp2k has quit [Ping timeout: 264 seconds]
cj3kim has joined #ruby
cj3kim has quit [Changing host]
cj3kim has joined #ruby
jasonkuhrt has quit [Quit: Leaving...]
wangr has quit [Read error: Connection reset by peer]
wangr has joined #ruby
jorge has quit [Remote host closed the connection]
Zolrath has joined #ruby
brianpWins has quit [Quit: brianpWins]
Xeago_ has joined #ruby
Xeago has quit [Ping timeout: 268 seconds]
mklappstuhl has joined #ruby
pricees has joined #ruby
recycle has joined #ruby
Xeago_ has quit [Remote host closed the connection]
t93507 has quit [Remote host closed the connection]
t9829 has joined #ruby
cj3kim has quit [Quit: This computer has gone to sleep]
rrichards has joined #ruby
benq has joined #ruby
rubious has quit [Quit: Leaving...]
cearls_ has joined #ruby
cearls has quit [Ping timeout: 245 seconds]
cearls_ is now known as cearls
ph^ has joined #ruby
willb has quit [Ping timeout: 244 seconds]
jorge has joined #ruby
LBRapid has joined #ruby
timonv has joined #ruby
cj3kim has joined #ruby
cj3kim has quit [Changing host]
cj3kim has joined #ruby
ph^ has quit [Ping timeout: 264 seconds]
xorigin has quit [Quit: leaving]
pricees has quit [Quit: leaving]
pricees has joined #ruby
c0rn_ has quit []
havenn has quit [Remote host closed the connection]
Vert has quit [Read error: Connection reset by peer]
wangr has quit [Read error: Connection reset by peer]
x77686d has joined #ruby
WellMux has joined #ruby
bradhe has quit [Remote host closed the connection]
wangr has joined #ruby
eignerchris has joined #ruby
jrist is now known as jrist-doc
cbuxton has joined #ruby
wangr has quit [Read error: Connection reset by peer]
wangr has joined #ruby
s1n4 has quit [Quit: leaving]
willb has joined #ruby
jrajav has quit []
<lectrick__> hoelzro: Yeah that was the idea. where's your code? :)
wangr has quit [Read error: Connection reset by peer]
luist_ has joined #ruby
wangr has joined #ruby
luist_ is now known as luist
yonggu has quit [Remote host closed the connection]
rrichards has quit [Quit: Linkinus - http://linkinus.com]
yonggu has joined #ruby
eighty4 has left #ruby ["Textual IRC Client: http://www.textualapp.com/"]
knightblader has joined #ruby
Eplemosen has quit [Ping timeout: 252 seconds]
Eplemosen has joined #ruby
<hoelzro> lectrick__: it's private atm
<hoelzro> but I can publish it
<hoelzro> it's nowhere near complete
<lectrick__> hoelzro: ok. well glad my idea had credence elsewhere. that usually means it was good :)
SCommette has quit [Quit: SCommette]
apok has joined #ruby
brianpWins has joined #ruby
hadees has quit [Quit: hadees]
<hoelzro> lectrick__: well, I've ended up implementing it a few times over in Ruby already =)
<hoelzro> maybe I'll gemify it
kn330 has quit [Ping timeout: 268 seconds]
timonv has quit [Remote host closed the connection]
SCommette has joined #ruby
recycle has quit [Remote host closed the connection]
Monie has joined #ruby
Monie has quit [Changing host]
Monie has joined #ruby
kn330 has joined #ruby
williamherry has joined #ruby
cnf has joined #ruby
qwerxy has quit [Read error: No route to host]
kenneth has joined #ruby
JohnBat26 has quit [Quit: KVIrc 4.1.3 Equilibrium http://www.kvirc.net/]
qwerxy has joined #ruby
recycle has joined #ruby
<lectrick__> i have yet to gemify something. i need to get on that, I have a few candidates by now
recycle has quit [Remote host closed the connection]
carloslopes has joined #ruby
macmartine has joined #ruby
t9829 has quit [Remote host closed the connection]
GoGoGarrett has joined #ruby
diegoviola has quit [Quit: Reconnecting]
t58753 has joined #ruby
diegoviola has joined #ruby
<hoelzro> lectrick__: https://gist.github.com/3533581
<hoelzro> that's what I've got so far
sneakyness_wk has joined #ruby
<hoelzro> no guarantees that it works ;)
rudyl313 has joined #ruby
bwlang has joined #ruby
linguini has joined #ruby
brianpWins has quit [Quit: brianpWins]
elux has joined #ruby
mmitchell has joined #ruby
<hoelzro> so you do something like this:
recycle has joined #ruby
<hoelzro> class Test; include MooseyFate; has :foo,
wangr has quit [Read error: Connection reset by peer]
wangr has joined #ruby
adamkittelson has joined #ruby
Guest77283 has joined #ruby
pskosinski has quit [Remote host closed the connection]
Guest77283 has quit [Read error: Connection reset by peer]
caveat- has quit [Ping timeout: 245 seconds]
Guedes0 has joined #ruby
mmitchell has quit [Ping timeout: 244 seconds]
shadoi has joined #ruby
pskosinski has joined #ruby
wangr has quit [Read error: Connection reset by peer]
jasonkuhrt has joined #ruby
wangr has joined #ruby
mascool has joined #ruby
zigomir has quit [Ping timeout: 265 seconds]
jasonkuhrt has quit [Client Quit]
jwbuurlage has joined #ruby
Huis has joined #ruby
WellMux has quit [Ping timeout: 252 seconds]
specialGuest has quit [Quit: WeeChat 0.3.8]
recycle has quit [Remote host closed the connection]
xclite has quit [Quit: Leaving]
hadees has joined #ruby
Virunga has joined #ruby
<lectrick__> hoelzro: Where's your inline test suite? :)
<hoelzro> this was for a one-off, so there is none yet ;)
deryldoucette has joined #ruby
<lectrick__> For my libs I usually have something like this at the bottom so that "running" the class definition directly actually runs the test suite for it:
<lectrick__> if __FILE__==$PROGRAM_NAME; require_relative '../../test/unit/lib/array_utils_test'; end
<lectrick__> yes, yes, i know require_relative sucks, sigh
Takehiro has quit [Remote host closed the connection]
levieraf has joined #ruby
JustinCampbell has joined #ruby
recycle has joined #ruby
deryl has quit [Ping timeout: 245 seconds]
deryldoucette is now known as deryl
v0n has joined #ruby
<levieraf> hi guys
vivien__ has quit [Ping timeout: 246 seconds]
hadees has quit [Ping timeout: 246 seconds]
<levieraf> I have got a question about the use of variable that used @ and @@ in a class
<levieraf> ??
lurksia has joined #ruby
lurksia has quit [Changing host]
lurksia has joined #ruby
<levieraf> thanks
<matti> @@ - class, @ - instance.
<lectrick__> levieraf: Just ask the question.
<matti> Lol
<lectrick__> @@variable is accessible by both the class itself and its instances, AND its subclasses (which refer to the SAME OBJECT it points to, note!!!)
machty has joined #ruby
* matti notes
<lectrick__> @variable is only accessible by the context where it is defined. If at the class level, only by the class definition. If in an instance method, every instance gets its own copy of that variable.
recycle has quit [Remote host closed the connection]
* matti notes
<matti> ;-)
<lectrick__> That's @@ vs. @ in a nutshell.
Zolrath has quit [Quit: Computer has gone to sleep.]
BiHi has quit [Quit: Computer has gone to sleep]
* matti notes
wangr has quit [Read error: Connection reset by peer]
<lectrick__> Also, @@ will raise an error if you try to access it without setting it first. @variable just returns nil.
<matti> :)
<levieraf> ok
<levieraf> thanks lectrick__
wangr has joined #ruby
specialGuest has joined #ruby
specialGuest has quit [Changing host]
specialGuest has joined #ruby
<lectrick__> I can't tell you how many things I had to read before I understood the 3 sentences I just typed lol
<matti> Haha
<matti> lectrick__: +1
statarb3 has quit [Ping timeout: 252 seconds]
pdelgallego has quit [Quit: pdelgallego]
t58753 has quit [Remote host closed the connection]
t83945 has joined #ruby
jorge has quit [Remote host closed the connection]
apok has quit [Remote host closed the connection]
apok has joined #ruby
bluenemo has quit [Remote host closed the connection]
jrist-doc is now known as jrist
cj3kim has quit [Quit: This computer has gone to sleep]
_bart has joined #ruby
<levieraf> lectrick__, jajajajajjajajajajajaja, hermano ahora si me hiciste reir jajajajajajaj - jajajajajjajajajajajaja brother made ​​me laugh now if jajajajajajaj
<levieraf> lol
<lectrick__> ??
alvaro_o_ has joined #ruby
recycle has joined #ruby
recycle has quit [Remote host closed the connection]
hadees has joined #ruby
mohits has quit [Ping timeout: 264 seconds]
kvirani has joined #ruby
berserkr has joined #ruby
<burgestrand> I always enjoy seeing ha-ha in other languages. :3
alvaro_o has quit [Ping timeout: 260 seconds]
willb has quit [Ping timeout: 245 seconds]
<burgestrand> Japanese has the best one. w.
Eldariof-ru has joined #ruby
statarb3 has joined #ruby
Russell^^ has joined #ruby
hadees has quit [Ping timeout: 246 seconds]
vlad_sta_ has quit [Remote host closed the connection]
Bosma has joined #ruby
wangr has quit [Read error: Connection reset by peer]
ph^ has joined #ruby
frogstarr78 has joined #ruby
wangr has joined #ruby
joaoh82 has joined #ruby
mrdodo has joined #ruby
cj3kim has joined #ruby
cj3kim has quit [Changing host]
cj3kim has joined #ruby
benq has quit [Quit: Leaving]
benq has joined #ruby
enyo has quit [Read error: Connection reset by peer]
<rippa> wwww
workmad3 has quit [Ping timeout: 264 seconds]
WellMux has joined #ruby
willb has joined #ruby
JustinCampbell has quit [Remote host closed the connection]
seanyo has quit [Read error: Connection reset by peer]
c0rn_ has joined #ruby
JustinCampbell has joined #ruby
enyo has joined #ruby
kn330 has quit [Ping timeout: 246 seconds]
cj3kim has quit [Ping timeout: 276 seconds]
JustinCampbell has quit [Remote host closed the connection]
mmitchell has joined #ruby
s1n4 has joined #ruby
x77686d has quit [Quit: x77686d]
voodoofish430 has joined #ruby
wangr has quit [Read error: Connection reset by peer]
wangr has joined #ruby
dhruvasagar has joined #ruby
Spooner has joined #ruby
recycle has joined #ruby
kn330 has joined #ruby
daniel_hinojosa has joined #ruby
SCommette has quit [Quit: SCommette]
erichmenge has joined #ruby
Takehiro has joined #ruby
SCommette has joined #ruby
wedgeV has joined #ruby
SCommette has quit [Client Quit]
i0n has joined #ruby
i0n has quit [Changing host]
i0n has joined #ruby
jerrad has joined #ruby
havenn has joined #ruby
johnlcox has quit [Ping timeout: 265 seconds]
zii has joined #ruby
johnlcox has joined #ruby
SCommette has joined #ruby
SeoxyS has joined #ruby
kenneth has quit [Read error: Connection reset by peer]
SeoxyS is now known as kenneth
mmitchell has quit [Remote host closed the connection]
recycle has quit [Remote host closed the connection]
havenn has quit [Ping timeout: 246 seconds]
froy has joined #ruby
ph^ has quit [Remote host closed the connection]
chrisja has joined #ruby
GenghisKen has quit [Ping timeout: 244 seconds]
kn330 has quit [Ping timeout: 260 seconds]
schaerli has joined #ruby
mmitchell has joined #ruby
hadees has joined #ruby
t83945 has quit [Remote host closed the connection]
recycle has joined #ruby
t87451 has joined #ruby
johnlcox has quit [Ping timeout: 246 seconds]
Huis_ has joined #ruby
jwbuurlage_ has joined #ruby
jwbuurlage has quit [Read error: Connection reset by peer]
jwbuurlage_ is now known as jwbuurlage
Huis_ has quit [Client Quit]
jwbuurlage has quit [Client Quit]
kn330 has joined #ruby
Huis has quit [Read error: Connection reset by peer]
recycle has quit [Remote host closed the connection]
mklappstuhl has quit [Ping timeout: 252 seconds]
johnlcox has joined #ruby
manizzle has quit [Read error: No route to host]
qwerxy has quit [Ping timeout: 244 seconds]
poppiez has quit [Quit: Linkinus - http://linkinus.com]
Goles has quit [Quit: Computer has gone to sleep.]
x77686d has joined #ruby
pdelgallego has joined #ruby
naz has quit [Read error: Connection reset by peer]
kn330 has quit [Ping timeout: 260 seconds]
rippa has quit [Ping timeout: 244 seconds]
caveat- has joined #ruby
Xeago has joined #ruby
GenghisKen has joined #ruby
GenghisKen has quit [Changing host]
GenghisKen has joined #ruby
joephelius has quit [Ping timeout: 244 seconds]
kn330 has joined #ruby
DrShoggoth has quit [Ping timeout: 245 seconds]
rippa has joined #ruby
levieraf has quit [Quit: Saliendo]
timoshin has quit [Remote host closed the connection]
ry4nn has joined #ruby
t87451 has quit [Remote host closed the connection]
t45342 has joined #ruby
recycle has joined #ruby
<ry4nn> how would i get the name of the class from a static method, like class A; def self.a;end; end .. wanting to get 'A' from self.a
<libryder> what's the point of mixing in a module that contains a class rather than requiring the class sans module?
<libryder> namespacing?
recycle has quit [Remote host closed the connection]
ben_alman has quit [Excess Flood]
benq has quit [Remote host closed the connection]
<libryder> module Foo; class Bar; end; end; vs class Bar; end;
<Hanmac> ry4nn there are no satic methods, but what about "self"?
mohits has joined #ruby
mohits has quit [Changing host]
mohits has joined #ruby
nwest_ has joined #ruby
nwest has quit [Ping timeout: 244 seconds]
peregrine81 has quit [Ping timeout: 265 seconds]
SCommette_ has joined #ruby
<heftig> ry4nn: self is A, self.name is "A"
ringotwo has quit [Remote host closed the connection]
<matti> OT: BBC in London in looking for Ruby dude.
jtdowney has joined #ruby
ben_alman has joined #ruby
cascalheira has quit [Quit: Leaving...]
SCommette has quit [Ping timeout: 244 seconds]
SCommette_ is now known as SCommette
wunz has quit [Quit: leaving]
<Hanmac> matti so the BBC itself is hireing?
mmitchell has quit [Remote host closed the connection]
<ry4nn> cheers, thanks
<ry4nn> what do you call self.a then if its not static
wedgeV has quit [Quit: wedgeV]
wedgeV has joined #ruby
<yxhuvud> a method call.
CoverSlide has joined #ruby
joephelius has joined #ruby
peregrine81 has joined #ruby
JohnBat26 has joined #ruby
<Hanmac> ry4nn in ruby there is no static ... only singleton methods on the class object ... class methods
kryptek_ has quit [Remote host closed the connection]
robbyoconnor has quit [Max SendQ exceeded]
robbyoconnor has joined #ruby
paul_andrew has joined #ruby
recycle has joined #ruby
recycle has quit [Remote host closed the connection]
tiripamwe has quit [Ping timeout: 252 seconds]
jamiltron has joined #ruby
fkumro has quit [Ping timeout: 268 seconds]
havenn has joined #ruby
erichmenge has quit [Quit: Linkinus - http://linkinus.com]
stkowski has joined #ruby
xyon has quit [Quit: WeeChat 0.3.8]
zommi has joined #ruby
DrShoggoth has joined #ruby
kn330 has quit [Ping timeout: 260 seconds]
xyon has joined #ruby
Xeago has quit [Remote host closed the connection]
Dreamer3 has quit [Ping timeout: 245 seconds]
kn330 has joined #ruby
jorge has joined #ruby
wedgeV has quit [Remote host closed the connection]
nilg` has quit [Ping timeout: 245 seconds]
wedgeV has joined #ruby
t45342 has quit [Remote host closed the connection]
t899 has joined #ruby
wedgeV has quit [Client Quit]
wedgeV has joined #ruby
fkumro has joined #ruby
ckrailo has joined #ruby
c0rn_ has quit [Quit: Computer has gone to sleep.]
kuzushi has joined #ruby
Essobi has joined #ruby
recycle has joined #ruby
rrichards has joined #ruby
rrichards has quit [Remote host closed the connection]
seich- is now known as seich
Dreamer3__ has joined #ruby
xyon has quit [Quit: WeeChat 0.3.8]
jgrevich has quit [Ping timeout: 244 seconds]
xyon has joined #ruby
DrShoggoth has quit [Ping timeout: 252 seconds]
diegoviola has quit [Quit: leaving]
CodeVision has quit [Ping timeout: 272 seconds]
<burgestrand> ry4nn: what you call static methods we call class methods
recycle has quit [Remote host closed the connection]
<burgestrand> but they are just regular methods, just placed on a different object
CoverSlide has quit [Read error: Operation timed out]
naz has joined #ruby
stepnem has joined #ruby
johnjohnson has quit [Read error: Connection reset by peer]
ph^ has joined #ruby
jamesaa has quit [Read error: Connection reset by peer]
mascool_ has joined #ruby
wedgeV has quit [Quit: wedgeV]
mascool has quit [Quit: Changing server]
jamesaa has joined #ruby
paul_andrew has quit [Quit: leaving]
wedgeV has joined #ruby
bluOxigen_ has joined #ruby
bluOxigen has quit [Ping timeout: 256 seconds]
Dreamer3__ has quit [Ping timeout: 268 seconds]
GenghisKen has quit [Ping timeout: 268 seconds]
CodeVision has joined #ruby
jgrevich has joined #ruby
wobr has joined #ruby
kn330 has quit [Ping timeout: 260 seconds]
diegoviola has joined #ruby
frogstarr78 has quit [Remote host closed the connection]
headius has quit [Quit: headius]
burgestrand has quit [Quit: Leaving.]
kn330 has joined #ruby
Guest5516 has quit [Ping timeout: 244 seconds]
gfontenot has quit []
recycle has joined #ruby
recycle has quit [Remote host closed the connection]
ph^ has quit [Remote host closed the connection]
Russell^^ has quit [Quit: Russell^^]
gfontenot has joined #ruby
jamiltron has quit [Quit: Leaving.]
Xeago has joined #ruby
ananthakumaran has quit [Quit: Leaving.]
macmartine has quit [Quit: ["Textual IRC Client: www.textualapp.com"]]
maletor has quit [Quit: Computer has gone to sleep.]
Dreamer3 has joined #ruby
frogstarr78 has joined #ruby
jamiltron has joined #ruby
davidcelis has quit [Ping timeout: 244 seconds]
DrShoggoth has joined #ruby
t899 has quit [Remote host closed the connection]
t29088 has joined #ruby
GenghisKen has joined #ruby
GenghisKen has quit [Changing host]
GenghisKen has joined #ruby
willb has quit [Ping timeout: 252 seconds]
mohits has quit [Ping timeout: 240 seconds]
kn330 has quit [Ping timeout: 260 seconds]
niklasb has joined #ruby
kn330 has joined #ruby
chimay has quit [Quit: WeeChat 0.3.9-dev]
wchun has joined #ruby
havenn has quit [Remote host closed the connection]
jenrzzz has joined #ruby
mmitchell has joined #ruby
<cearls> Hanmac: wanted to say thanks for the tip on sets earlier.. set.include? is crazy fast compared to array.include?
krz has joined #ruby
<hoelzro> cearls: set.include? is probably O(1) or O(log n)
<hoelzro> whereas array.include? is probably O(n)
mmitchell has quit [Remote host closed the connection]
fmcgeough has quit [Ping timeout: 245 seconds]
<cearls> hoelzro: My script went from taking 10 minutes to under a second to run
maletor has joined #ruby
<Hanmac> set.include is faster because it uses hash.include for checking ... (as far as i knew)
gfontenot has quit []
<hoelzro> if you have a lot of elements, I'm not surprised
jasonkuhrt has joined #ruby
<cearls> hoelzro: yes, 110K
<hoelzro> that would do it =)
mmitchell has joined #ruby
jgarvey has quit [Quit: Leaving]
wobr has quit [Quit: Leaving.]
recycle has joined #ruby
Coolhand has quit [Ping timeout: 248 seconds]
willb has joined #ruby
manizzle has joined #ruby
jenrzzz has quit [Remote host closed the connection]
emanon_ has joined #ruby
fmcgeough has joined #ruby
Coolhand has joined #ruby
manizzle has quit [Remote host closed the connection]
Morkel has joined #ruby
tiripamwe has joined #ruby
rvmeier has joined #ruby
Dreamer3 has quit [Ping timeout: 265 seconds]
davidcelis has joined #ruby
wallerdev has joined #ruby
cj3kim has joined #ruby
cj3kim has quit [Changing host]
cj3kim has joined #ruby
froy has quit [Remote host closed the connection]
headius has joined #ruby
Chryson has joined #ruby
havenn has joined #ruby
cj3kim has quit [Quit: This computer has gone to sleep]
robustus has quit [Ping timeout: 244 seconds]
t29088 has quit [Remote host closed the connection]
CarlB_the_great has joined #ruby
t37875 has joined #ruby
ph^ has joined #ruby
sqlbyme has joined #ruby
ph^ has quit [Remote host closed the connection]
jamiltron has quit [Quit: Leaving.]
froy has joined #ruby
fermion has quit [Quit: Textual IRC Client: http://www.textualapp.com/]
jamiltron has joined #ruby
SKORdotNET has joined #ruby
Schmidt has quit [Ping timeout: 244 seconds]
ph^ has joined #ruby
kn330 has quit [Ping timeout: 268 seconds]
SKORdotNET has quit [Client Quit]
sqlbyme has quit [Quit: Leaving.]
gfontenot has joined #ruby
gfontenot has quit [Client Quit]
mklappstuhl has joined #ruby
sqlbyme has joined #ruby
havenn has quit [Remote host closed the connection]
CarlB_th_ has joined #ruby
havenn has joined #ruby
jjbohn has joined #ruby
CarlB_t__ has joined #ruby
CarlB_the_great has quit [Ping timeout: 246 seconds]
mneorr has quit [Remote host closed the connection]
Xeago_ has joined #ruby
CarlB_the_great has joined #ruby
CarlB_th_ has quit [Ping timeout: 260 seconds]
havenn has quit [Ping timeout: 245 seconds]
Xeago has quit [Ping timeout: 268 seconds]
Axsuul has quit [Ping timeout: 244 seconds]
johnlcox has quit [Quit: Computer has gone to sleep.]
Eplemosen has quit [Quit: NOPE]
Xeago_ has quit [Read error: Connection reset by peer]
Xeago has joined #ruby
CarlB_t__ has quit [Ping timeout: 252 seconds]
mmitchell has quit [Remote host closed the connection]
poop_ has left #ruby [#ruby]
zodiak has quit [Remote host closed the connection]
mneorr has joined #ruby
yxhuvud has quit [Ping timeout: 268 seconds]
JohnBat26 has quit [Remote host closed the connection]
dpk has quit [Quit: Asleep at the keyboard.]
Dreamer3 has joined #ruby
wedgeV has quit [Quit: wedgeV]
joaoh82 has quit [Remote host closed the connection]
wedgeV has joined #ruby
johnlcox has joined #ruby
manizzle has joined #ruby
jorge has quit [Remote host closed the connection]
lindenle has joined #ruby
<lindenle> Can i include a file in my ruby code (one that has viaraibles defined)
mklappstuhl has quit [Ping timeout: 252 seconds]
schaerli has quit [Remote host closed the connection]
schaerli has joined #ruby
jorge has joined #ruby
<matti> lindenle: Try: load
<matti> lindenle: Try eval() -- be warned, performance hit.
<Hanmac> eval is a bitch :P
<matti> What he said -> Hanmac
<matti> ;d
pdelgallego has quit [Quit: pdelgallego]
icambridge has quit [Ping timeout: 246 seconds]
mmitchell has joined #ruby
<lindenle> matti: I tried load and it did not seem to work
i0n is now known as evilsushi
senny has quit [Remote host closed the connection]
<shevy2> guys
<shevy2> oops
Takehiro has quit [Remote host closed the connection]
shevy2 is now known as shevy
<shevy> guys, I have a file like this: http://pastie.org/4618467
<shevy> it is delimited by -
icambridge has joined #ruby
Beoran__ has joined #ruby
<shevy> what would be an easy way to build an array from that? i.e. split at every - section
<matti> shevy: That is _almost_ a YAML ;d
<shevy> yeah
<shevy> it is a yaml file, but I broke it :(
<matti> lindenle: Works for me ;d
kiyoura has quit [Ping timeout: 245 seconds]
<shevy> but I dont have time to fix it right now ...
<lindenle> matti can you paste it?
<lindenle> er pastebin
<matti> Please wait... generating code snippet in progress...
aibo has quit [Quit: Leaving]
<matti> Meanwhile, we ask you to subject yourself to this faboulous web site: http://fc02.deviantart.net/fs70/f/2011/255/e/b/bat_cat_by_neoslashott-d49iof2.swf
ahuman has quit [Read error: Operation timed out]
krzkrzkrz has joined #ruby
ahuman has joined #ruby
sj26 has quit [Ping timeout: 245 seconds]
rcs has quit [Ping timeout: 245 seconds]
<shevy> matti how would you split such a file?
whowantstolivefo has quit [Remote host closed the connection]
paolooo has quit [Quit: Page closed]
<shevy> read in via File.readlines, then group?
krz has quit [Ping timeout: 256 seconds]
krzkrzkrz is now known as krz
davidcelis_ has joined #ruby
whowantstolivefo has joined #ruby
davidcelis has quit [Ping timeout: 240 seconds]
headius has quit [Quit: headius]
Beoran_ has quit [Ping timeout: 252 seconds]
passbe has quit [Ping timeout: 260 seconds]
examancer has quit [Ping timeout: 252 seconds]
<matti> shevy: Split?
davidcelis_ is now known as davidcelis
wobr has joined #ruby
davidcelis has quit [Changing host]
davidcelis has joined #ruby
cj3kim has joined #ruby
cj3kim has quit [Changing host]
cj3kim has joined #ruby
sj26 has joined #ruby
Z_Mass has joined #ruby
passbe has joined #ruby
<shevy> matti hmm
examancer has joined #ruby
<shevy> yeah I think that may be simplest
<shevy> is there a gem for this? :P
<shevy> god, I am so lazy...
<matti> lindenle: load seem to load only if you have a global there. Bummer.
blazed has joined #ruby
chrisja has quit [Quit: leaving]
mklappstuhl has joined #ruby
<lindenle> matti: I see, so what about eval?
wobr has quit [Read error: Connection reset by peer]
froy has quit [Remote host closed the connection]
<matti> lindenle: Well, eval aside of being a bitch... might work i.e. ruby 'x = eval(File.read(...))'
rcs has joined #ruby
<matti> shevy: Is this a configuration file?
havenn has joined #ruby
<matti> shevy: Use either a = b, easy to parse. Or ini-file, or YAML (popular).
<shevy> matti no, just a file with slogans (i.e. alan kay "best way to predict the future is to invent it")
wobr has joined #ruby
<shevy> my gripe right now with yaml is that it wants to have a valid formatting
<matti> shevy: Well then, even CSV will do in such case?
statarb3 has quit [Quit: Leaving]
<shevy> hmm
<shevy> never used CSV so far for myself
cj3kim has quit [Quit: This computer has gone to sleep]
t37875 has quit [Remote host closed the connection]
t80488 has joined #ruby
ringotwo has joined #ruby
jbw has quit [Ping timeout: 264 seconds]
qwerxy has joined #ruby
c0rn_ has joined #ruby
havenn has quit [Ping timeout: 244 seconds]
und3f has quit [Quit: Leaving.]
johnernaut has joined #ruby
Xeago has quit [Read error: Connection reset by peer]
Zolrath has joined #ruby
allsystemsarego has quit [Quit: Leaving]
Xeago has joined #ruby
aaroncm has quit [Quit: ["Textual IRC Client: www.textualapp.com"]]
Xeago has quit [Read error: Connection reset by peer]
Eldariof-ru has quit []
ringotwo has quit [Remote host closed the connection]
joaoh82 has joined #ruby
Xeago has joined #ruby
frogstarr78 has quit [Remote host closed the connection]
fmcgeough has quit [Quit: fmcgeough]
sailias has quit [Ping timeout: 260 seconds]
deryl has quit [Quit: deryl]
Chryson has quit [Quit: Leaving]
mmitchell has quit [Remote host closed the connection]
machty has quit [Ping timeout: 264 seconds]
ringotwo has joined #ruby
WellMux has quit []
jasonkuhrt has quit [Quit: Leaving...]
mc0e has quit [Ping timeout: 252 seconds]
Z_Mass has quit [Quit: Leaving]
dhruvasagar has quit [Remote host closed the connection]
Synthead has quit [Remote host closed the connection]
workmad3 has joined #ruby
nanderoo has quit [Quit: Leaving.]
wobr has quit [Quit: Leaving.]
ringotwo has quit [Remote host closed the connection]
machty has joined #ruby
Zolrath has quit [Quit: Computer has gone to sleep.]
jbw has joined #ruby
CarlB_the_great has quit [Ping timeout: 245 seconds]
Z_Mass has joined #ruby
becom33 has joined #ruby
frogstarr78 has joined #ruby
c0rn_ has quit [Quit: Computer has gone to sleep.]
CarlB_the_great has joined #ruby
becom33_ has quit [Ping timeout: 246 seconds]
Takehiro has joined #ruby
mmitchell has joined #ruby
adambeynon has quit [Quit: ["Textual IRC Client: www.textualapp.com"]]
joaoh82 has quit [Remote host closed the connection]
linoj has quit [Ping timeout: 240 seconds]
CarlB_th_ has joined #ruby
dangerousdave has joined #ruby
Guedes has joined #ruby
Guedes has quit [Changing host]
Guedes has joined #ruby
froy has joined #ruby
CarlB_the_great has quit [Ping timeout: 245 seconds]
joaoh82 has joined #ruby
Takehiro has quit [Ping timeout: 265 seconds]
ph^ has quit [Remote host closed the connection]
geekbri has quit [Remote host closed the connection]
Virunga is now known as LennyLinux
zommi has quit [Remote host closed the connection]
cczona has joined #ruby
pricees has quit [Ping timeout: 240 seconds]
jamiltron has quit [Quit: Leaving.]
jonathanwallace has joined #ruby
cczona has left #ruby [#ruby]
asteve has quit []
twigmorewelsh has quit [Ping timeout: 264 seconds]
Zolrath has joined #ruby
timonv has joined #ruby
blazes816 has joined #ruby
c0rn_ has joined #ruby
Rikkit has joined #ruby
Rikkit has quit [Remote host closed the connection]
CarlB_th_ has quit [Remote host closed the connection]
elux has quit [Quit: Bye!]
LennyLinux is now known as virunga
bradhe has joined #ruby
virunga is now known as LennyLinux
<bradhe> Is there a method I can call to tell if a given object is truthy? I have an array of booleans and I want to see if they're all true, something like [true, true, true, false].all?(&:some_method)
c0rn_ has quit [Client Quit]
tommyvyo_ has quit [Quit: Textual IRC Client: http://www.textualapp.com/]
CarlB_the_great has joined #ruby
nwest_ has quit [Quit: Textual IRC Client: http://www.textualapp.com/]
noam_ has joined #ruby
jlogsdon has quit [Remote host closed the connection]
<Boohbah> bradhe: all? method returns true or false
<bradhe> oh snap
<bradhe> that's awesome.
<bradhe> thanks, I didn't know that.
<Boohbah> [true, true, true, false].all? # => false
LennyLinux is now known as Virunga
c0rn_ has joined #ruby
johnlcox has quit [Quit: Computer has gone to sleep.]
w400z has joined #ruby
jamiltron has joined #ruby
c0rn_ has quit [Client Quit]
noam has quit [Ping timeout: 268 seconds]
qwerxy has quit [Quit: offski]
Xeago has quit [Read error: Connection reset by peer]
iamjarvo has quit [Ping timeout: 264 seconds]
luckyruby has quit [Remote host closed the connection]
rippa has quit [Ping timeout: 265 seconds]
ngoldman has joined #ruby
fantazo has joined #ruby
<shevy> all what there
<shevy> :D
johnlcox has joined #ruby
otters has quit [Ping timeout: 244 seconds]
Virunga is now known as LennyLinux
darren__ has quit [Remote host closed the connection]
darren has joined #ruby
workmad3 has quit [Ping timeout: 252 seconds]
jonatha__ has joined #ruby
johnernaut has quit []
jonatha__ has quit [Remote host closed the connection]
answer_42 has quit [Quit: WeeChat 0.3.8]
LennyLinux is now known as LesterTheMoleste
deryl has joined #ruby
pricees has joined #ruby
LesterTheMoleste is now known as LennyLinux
timonv has quit [Remote host closed the connection]
Z_Mass has quit [Quit: Leaving]
Takehiro has joined #ruby
elaptics is now known as elaptics`away
darren has quit [Ping timeout: 245 seconds]
jonathanwallace has quit [Ping timeout: 245 seconds]
pdelgallego has joined #ruby
Xeago has joined #ruby
Takehiro has quit [Ping timeout: 265 seconds]
daguar has quit [Remote host closed the connection]
joaoh82 has quit [Remote host closed the connection]
recycle has quit [Remote host closed the connection]
stepnem has quit [Ping timeout: 240 seconds]
cj3kim has joined #ruby
cj3kim has quit [Changing host]
cj3kim has joined #ruby
<blazes816> just removed ~40 of these from the codebase i'm working on: "return (a_var ? true : false)"
CarlB_the_great has quit [Read error: Connection reset by peer]
t80488 has quit [Remote host closed the connection]
CarlB_the_great has joined #ruby
t27661 has joined #ruby
<davidcelis> lolololol
recycle has joined #ruby
ph^ has joined #ruby
Zolrath has quit [Quit: Computer has gone to sleep.]
CarlB_the_great has quit [Read error: Connection reset by peer]
CarlB_the_great has joined #ruby
emanon_ has quit [Read error: Connection reset by peer]
LBRapid has quit [Quit: Farewell.]
recycle has quit [Remote host closed the connection]
emanon_ has joined #ruby
Danielpk has quit [Read error: Connection reset by peer]
CarlB_the_great has quit [Remote host closed the connection]
evilsushi has quit [Quit: Lost terminal]
Danielpk has joined #ruby
CarlB_the_great has joined #ruby
LennyLinux is now known as Virunga
mneorr has quit [Remote host closed the connection]
berserkr has quit [Read error: Connection reset by peer]
mklappstuhl has quit [Ping timeout: 264 seconds]
graspee has quit [Quit: leaving]
ph^ has quit [Read error: Connection reset by peer]
diegoviola has quit [Ping timeout: 245 seconds]
schaerli has quit [Ping timeout: 246 seconds]
DrShoggoth has quit [Ping timeout: 245 seconds]
GoGoGarrett has quit [Remote host closed the connection]
dangerousdave has quit [Quit: Leaving...]
infinitiguy has quit [Quit: Leaving.]
recycle has joined #ruby
sailias has joined #ruby
jclem has quit [Quit: Linkinus - http://linkinus.com]
recycle has quit [Remote host closed the connection]
Morkel has quit [Quit: Morkel]
fixl has joined #ruby
becom33 has quit [Ping timeout: 245 seconds]
erichmenge has joined #ruby
cdepue has joined #ruby
iamjarvo has joined #ruby
becom33 has joined #ruby
s1n4 has left #ruby ["leaving"]
cantonic has quit [Quit: cantonic]
mmitchell has quit [Remote host closed the connection]
Schmidt has joined #ruby
banseljaj is now known as imami|afk
Virunga_ has joined #ruby
Virunga has quit [Quit: Sto andando via]
recycle has joined #ruby
cantonic has joined #ruby
c0rn_ has joined #ruby
recycle has quit [Remote host closed the connection]
jamiltron has quit [Quit: Leaving.]
cakehero has quit [Quit: Computer has gone to sleep.]
sailias has quit []
mmitchell has joined #ruby
dmiller has joined #ruby
jamiltron has joined #ruby
frogstarr78 has quit [Remote host closed the connection]
darren has joined #ruby
carloslopes has quit [Quit: Leaving.]
CarlB_the_great has quit [Remote host closed the connection]
Danielpk has quit [Quit: Danielpk]
mklappstuhl has joined #ruby
`brendan has quit [Quit: - nbs-irc 2.39 - www.nbs-irc.net -]
darren_ has joined #ruby
jjbohn has quit [Quit: Leaving...]
quazimodo has joined #ruby
workmad3 has joined #ruby
DrShoggoth has joined #ruby
Xeago has quit [Remote host closed the connection]
darren has quit [Ping timeout: 245 seconds]
recycle has joined #ruby
covi has joined #ruby
recycle has quit [Remote host closed the connection]
darren_ has quit [Ping timeout: 244 seconds]
hsbt is now known as hsbt_away
jamiltron has quit [Quit: Leaving.]
hsbt_away is now known as hsbt
alanp has joined #ruby
mmitchell has quit [Remote host closed the connection]
Kudos has quit [Ping timeout: 264 seconds]
johnlcox has quit [Quit: Computer has gone to sleep.]
alanp_ has quit [Ping timeout: 264 seconds]
johnlcox has joined #ruby
CarlB_the_great has joined #ruby
wo66le has joined #ruby
frogstarr78 has joined #ruby
recycle has joined #ruby
rins has quit [Ping timeout: 268 seconds]
recycle has quit [Remote host closed the connection]
jrist is now known as jrist-afk
darren has joined #ruby
joshman_ has quit [Ping timeout: 265 seconds]
himsin has quit [Read error: Operation timed out]
Takehiro has joined #ruby
himsin has joined #ruby
otters has joined #ruby
CarlB_the_great has quit [Remote host closed the connection]
jtdowney has quit [Remote host closed the connection]
pskosinski has quit [Disconnected by services]
jasmina87SA__ has joined #ruby
just4dos has quit [Ping timeout: 245 seconds]
jasmina87SA__ has quit [Read error: Connection reset by peer]
qwerxy has joined #ruby
sirish has joined #ruby
ngoldman has quit [Remote host closed the connection]
davidcelis has quit [Quit: K-Lined.]
Kudos has joined #ruby
Takehiro has quit [Ping timeout: 265 seconds]
recycle has joined #ruby
recycle has quit [Remote host closed the connection]
i0n has joined #ruby
i0n has quit [Changing host]
i0n has joined #ruby
gyre008 has joined #ruby
iamjarvo has quit [Ping timeout: 245 seconds]
<gyre008> guys, Im trying to install the rubyracer gem?.but the install is failing with: extconf.rb:16: undefined method `include_path' for Libv8:Module (NoMethodError)?anyone has an idea how to fix this ?? Im banging my head against the table..
pskosinski has joined #ruby
emanon_ has quit [Read error: No route to host]
nateberkopec has quit [Quit: Linkinus - http://linkinus.com]
erichmenge has quit [Quit: Be back later]
erichmenge has joined #ruby
Z_Mass has joined #ruby
erichmenge has quit [Client Quit]
<blazes816> gyre008: you tried "gem uninstall libv8 && gem install therubyracer" ?
fixl has quit [Remote host closed the connection]
adamkittelson has quit [Remote host closed the connection]
asobrasil has left #ruby [#ruby]
GenghisKen has quit [Remote host closed the connection]
SCommette has quit [Quit: SCommette]
<gyre008> blazes816 nope
<gyre008> should it help ?
pskosinski has left #ruby ["http://www.redeclipse.net -- Fast paced online FPS"]
SCommette has joined #ruby
<blazes816> according to the very first link google returned for your error message. just confirming you didn't even try to find the answer
<gyre008> I DID
sdwrage has joined #ruby
<gyre008> i tried all answers i found
<gyre008> didnt see this one
recycle has joined #ruby
khakimov has quit [Quit: Computer has gone to sleep.]
<gyre008> blaze816 I did that now and the install fails with: :) -> `gem_original_require': no such file to load -- libv8 (LoadError)
scriabin has quit [Remote host closed the connection]
yasushi has joined #ruby
bier has quit [Ping timeout: 248 seconds]
stopbit has quit [Quit: Leaving]
<blazes816> try "gem install libv8 && gem install therubyracer" now
<blazes816> if that doesn't work i'd just install node, TRR kind of blows a little bit anyways
<gyre008> will try
t27661 has quit [Remote host closed the connection]
t18397 has joined #ruby
neohunter has joined #ruby
<neohunter> anyone have exp with ruby-gmail ?
<gyre008> blazes816 fails with the same error
yasushi has quit [Ping timeout: 268 seconds]
<gyre008> as before
<gyre008> undefined method `include_path' for Libv8:Module
just4dos has joined #ruby
Asher1 has quit [Quit: Leaving.]
<blazes816> gyre008: osx?
Asher has joined #ruby
wo66le has quit [Quit: Computer has gone to sleep.]
<gyre008> blaze816 Ubuntu
<blazes816> good man
sepp2k1 has quit [Remote host closed the connection]
<gyre008> :)
<blazes816> what version of libv8 you have?
<gyre008> doesnt help haha
<gyre008> you mean the OS or the gem
<blazes816> gem
<blazes816> looks like they removed that method
<gyre008> libv8 (3.11.8.3 x86_64-linux)
redgetan has joined #ruby
<neohunter> i need to retrieve emails from my email accounts, what do you recomment, using an IMAP gem or using ruby-gmail gem?
machty_ has joined #ruby
machty has quit [Read error: Connection reset by peer]
machty_ is now known as machty
hoelzro is now known as hoelzro|away
awarner has quit [Remote host closed the connection]
cearls has quit [Quit: cearls]
<blazes816> gyre008: you okay with some guerrilla debugging? try adding "alias_method :include_path, :libv8_include_path" to line 57 of libv8/lib/libv8.rb
<blazes816> then try the install. it should work. looks like a bug.
kvirani has quit [Remote host closed the connection]
<gyre008> let me see
iamjarvo has joined #ruby
bier has joined #ruby
<gyre008> blazes816 that file has only 50 lines :)
workmad3 has quit [Ping timeout: 244 seconds]
<blazes816> ha
<blazes816> after def libv8_include_path
<gyre008> 50 /var/lib/gems/1.8/gems/libv8-3.11.8.3-x86_64-linux/lib/libv8.rb
<gyre008> sec
<gyre008> lets see
CarlB_the_great has joined #ruby
ph^ has joined #ruby
dmiller has quit [Ping timeout: 248 seconds]
davidcelis has joined #ruby
Virunga_ has quit [Remote host closed the connection]
Synthead has joined #ruby
Vert has joined #ruby
ryanf has joined #ruby
<gyre008> :( `alias_method': undefined method `libv8_include_path' for module `Libv8' (NameError)
mklappstuhl has quit [Ping timeout: 264 seconds]
<gyre008> ahhh
<gyre008> wrong line
<gyre008> second :)
Foxandxss has joined #ruby
<gyre008> im still getting the same error
<gyre008> extconf.rb:16: undefined method `include_path' for Libv8:Module (NoMethodError)
jorge has quit [Remote host closed the connection]
<blazes816> wtf
ph^ has quit [Ping timeout: 264 seconds]
xnm has quit [Ping timeout: 264 seconds]
jorge has joined #ruby
infinitiguy has joined #ruby
seanstickle has joined #ruby
johnlcox has quit [Ping timeout: 265 seconds]
jorge has quit [Remote host closed the connection]
<gyre008> but that Rails app im installing needs that gem...
infinitiguy has quit [Client Quit]
<gyre008> how does installing nodejs help ?
SCommette has quit [Quit: SCommette]
berserkr has joined #ruby
<blazes816> sorry, I assumed you were just looking for the JS env
<gyre008> nope :(
CarlB_the_great has quit [Remote host closed the connection]
<arubin> If a method accepts two parameters and an optional block, can it be called with the first two arguments in parentheses and the block after them?
<arubin> I ask only because I am trying to understand some code.
eignerchris has quit [Ping timeout: 246 seconds]
emmanuelux has joined #ruby
dpk has joined #ruby
<blazes816> you mean like: foobar(a, b) { puts 'in a block' } ?
<blazes816> yes
<arubin> Yes, that is exactly what I mean.
<arubin> What exactly is happening there? Do the parentheses simply not matter at all?
GoGoGarrett has joined #ruby
adamkittelson has joined #ruby
<blazes816> it's basically syntactic sugar around creating the block, assigning it to a var, and passing it manually
t18397 has quit [Remote host closed the connection]
<blazes816> or something like: foobar(a, b, Proc.new{ puts 'in a block' })
t14787 has joined #ruby
bwlang has left #ruby [#ruby]
<arubin> Okay. Thank you.
jorge has joined #ruby
w400z has quit []
hadees has quit [Quit: hadees]
recycle has quit [Remote host closed the connection]
macmartine has joined #ruby
bluOxigen_ has quit [Ping timeout: 252 seconds]
diegoviola has joined #ruby
lkba has quit [Ping timeout: 268 seconds]
recycle has joined #ruby
Tomasso has quit [Ping timeout: 245 seconds]
iamjarvo has quit [Ping timeout: 264 seconds]
sdwrage has quit [Ping timeout: 265 seconds]
banisterfiend has quit [Remote host closed the connection]
recycle_ has joined #ruby
recycle_ has quit [Remote host closed the connection]
recycle has quit [Ping timeout: 240 seconds]
Takehiro has joined #ruby
pricees has quit [Quit: leaving]
luist has quit [Quit: luist]
sailias has joined #ruby
Takehiro has quit [Ping timeout: 244 seconds]
josh^ has joined #ruby
lkba has joined #ruby
peregrine81 has quit [Quit: Computer sleeping.]
i0n has quit [Quit: Lost terminal]
nari has joined #ruby
SQLStud has quit [Quit: Leaving]
wedgeV has quit [Quit: wedgeV]
erichmenge has joined #ruby
erichmenge has quit [Client Quit]
stkowski has quit [Quit: stkowski]
redgetan has left #ruby ["Leaving"]
sdwrage has joined #ruby
gyre008 has quit [Quit: Leaving]
BSaboia has quit [Read error: Connection reset by peer]
LouisGB has quit [Ping timeout: 244 seconds]
uris has quit [Quit: Lost terminal]
rins has joined #ruby
khakimov has joined #ruby
TandemAdam has joined #ruby
sailias has quit [Ping timeout: 264 seconds]
`damien has joined #ruby
LouisGB has joined #ruby
A124 has joined #ruby
dv_ has quit [Read error: Connection reset by peer]
ken_barber has quit [Remote host closed the connection]
dv_ has joined #ruby
nwest has joined #ruby
pdtpatrick has quit [Quit: pdtpatrick]
jorge has quit [Remote host closed the connection]
Elico1 has left #ruby [#ruby]
qwerxy has quit [Quit: offski]
sdwrage has quit [Quit: geekli.st/programmer]
nari has quit [Ping timeout: 244 seconds]
joephelius has quit [Quit: WeeChat 0.3.8]
infinitiguy has joined #ruby
tommyvyo has quit [Quit: Computer has gone to sleep.]
infinitiguy has quit [Client Quit]
Zolrath has joined #ruby
cakehero has joined #ruby
peregrine81 has joined #ruby
chriskk has left #ruby [#ruby]