apeiros_ changed the topic of #ruby to: Ruby 2.0.0-p0: http://ruby-lang.org (Ruby 1.9.3-p392) || Paste >3 lines of text on http://gist.github.com
<realDAB> gogiel: i'm stumped. if you use define_method it works as you'd expect, but i don't know why the nested def's don't work and why that weird result happens.
piotr_ has quit [Ping timeout: 245 seconds]
<shevy> Hanmac lol
realDAB has quit [Read error: Operation timed out]
tcstar has quit [Quit: Leaving]
anonymuse has quit [Quit: Leaving...]
daniel_- has quit [Quit: WeeChat 0.3.9.2]
<lewix> realDAB: ok. I think i need to find myself a proper definition of protected methods.
dmiller1 has joined #ruby
Dreamer3 has quit [Quit: Leaving...]
arya__ has quit [Ping timeout: 255 seconds]
predator217 has joined #ruby
tjbiddle has joined #ruby
<banister`sleep> lewix: no they cant
MehLaptop has quit [Remote host closed the connection]
Pandaen has joined #ruby
<lewix> banister`sleep: oh wait a minute I think I know where my issue lie
<banister`sleep> lewix: and if you think so, you hva to provide example code illustrating why you think so
<banister`sleep> :)
<lewix> banister`sleep: when you say "objects of the same class" you don't mean instances but objects used in the same class?
enebo has quit [Quit: enebo]
dmiller has quit [Ping timeout: 276 seconds]
<banister`sleep> lewix: no...i mean instances of the same class
<lewix> lol
aedornm has joined #ruby
tjbiddle has quit [Client Quit]
mercwithamouth has joined #ruby
predator117 has quit [Ping timeout: 260 seconds]
poikon has joined #ruby
arya__ has joined #ruby
_nitti has joined #ruby
gabrielrotbart has quit [Read error: Connection reset by peer]
Rioji has quit [Remote host closed the connection]
gabrielrotbart has joined #ruby
<banister`sleep> lewix: are you experienced in any other programming language?
gtuckerkellogg has quit [Quit: ["Textual IRC Client: www.textualapp.com"]]
Dreamer3 has joined #ruby
NiteRain has quit [Ping timeout: 246 seconds]
<lewix> banister`sleep: yes and no. c,c++,java but it's been years. and I wouldn't say experience
bradleyprice has quit [Remote host closed the connection]
<banister`sleep> lewix: ok, basically you need to re-learn OOP i think
<lewix> banister`sleep: ok within the class
<banister`sleep> lewix: and learning OOP is a hard slog, and quite different to just 'learning ruby' :)
<banister`sleep> you need to read books, etc
<lewix> banister`sleep: i mean you meant the method call within the class*
wyhaines has quit [Remote host closed the connection]
<lewix> banister`sleep: im reading d.black book. so far so good until i reach protected method, it's been confusing me a lil bit
<lewix> reached*
slyv has quit [Quit: Computer has gone to sleep.]
hashmal_ has joined #ruby
Dreamer3 has quit [Client Quit]
poikon has quit [Remote host closed the connection]
v0n has joined #ruby
justinmcp has quit [Ping timeout: 245 seconds]
kpshek has quit []
Dreamer3 has joined #ruby
poikon has joined #ruby
Dreamer3 has quit [Remote host closed the connection]
<lewix> banister`sleep: you can't have C= example_protected_methods.new ; c.protected_methods. however if it's made within the class C it's ok. correct?
<lewix> class example...*
hashmal has quit [Ping timeout: 256 seconds]
<lewix> lol my brain is burning
<aedornm> boats!
dEPy has quit []
<banister`sleep> lewix: not sure what you're asking me sory
<lewix> banister`sleep: ok let me rephrase it
Stilo has quit [Quit: Textual IRC Client: www.textualapp.com]
<aedornm> boats and rolls of meat!
<banister`sleep> lewix: in ruby there is't that much differnce between private/protected
<banister`sleep> you're reading too much into it ;) in other languages, like c++ there is way more of a difference
<lewix> banister`sleep: class Person; attr_accessor :age; protected :age; def older_than(other); self.age <=> other.age; end; end
krz has quit [Quit: krz]
<lewix> banister`sleep: how come we can use other.age here? is it because it's within the class
j^2 has joined #ruby
banjara has joined #ruby
poikon has quit [Ping timeout: 240 seconds]
<yebyen> in c++ protected means you can access as long as you are the class or a subclass
<yebyen> or have i got the java semantics?
<lewix> banister`sleep: ok I'll take a break. I haven't left my computer the whole day. will be back later. thanks It doesn't sound complicated I'll put it together later I guess
adkron has joined #ruby
Vert has quit [Read error: Connection reset by peer]
<banister`sleep> lewix: it's because it's protected
yshh has quit [Remote host closed the connection]
Dreamer3 has joined #ruby
<lewix> banister`sleep: right. but you can't do other = Person.new ; other.age. I understand that protected works like private but instances of the class have access to it. I was asking if they mean access to it within the class
_nitti_ has joined #ruby
<banister`sleep> lewix: yes, just within the class
<banister`sleep> well within the 'scope' of the instance :)
<banister`sleep> whever 'self' is an instance of the class, u should be able to access protected methods on other objects of the same class
<banister`sleep> lewix: but in practice not many people use protected methods afaict so you're perhaps wasting time trying to grok them :)
ner0x has joined #ruby
<lewix> banister`sleep: ok perfect it makes more sense now. I was starting to believe that when you said the objects of the same class have access to it. you meant indirectly, and this is why i persisted on saying that the same goes for private methods
_nitti has quit [Ping timeout: 248 seconds]
huoxito has joined #ruby
mlr has joined #ruby
<lewix> banister`sleep: this is why i asked you to give me an example of an instance of a class that call a private method
arya__ has quit [Ping timeout: 255 seconds]
Ontolog_ has quit [Remote host closed the connection]
karupanerura has quit [Excess Flood]
idkazuma has quit [Remote host closed the connection]
Ontolog has joined #ruby
<lewix> banister`sleep: thanks.
karupanerura has joined #ruby
alanp_ has joined #ruby
<yebyen> ooh that makes sense
alanp has quit [Disconnected by services]
alanp_ is now known as alanp
<yebyen> so you trust members of your same class, but not subclasses, to do the right thing with your protected instance variables
markalanevans has quit [Ping timeout: 252 seconds]
<havenn> gogiel: I don't know if this helps with understanding at all, but here is 'self' swapped out for explicit class: https://gist.github.com/havenwood/5087024
<yebyen> but they can touch their 'friends' protected parts in the exact same class
dougireton has left #ruby [#ruby]
<lewix> yebyen: I believe same class and subclasses since they inherit
nari has quit [Ping timeout: 252 seconds]
<yebyen> lewix: i haven't tested this (is this a new feature in 2.0.0?) but what I got out of what they just exchanged was that no, subclasses can't, but they get their own protected variables (inherited into their own class)
<yebyen> lewix: i agree that what you said would make more sense to me
justsee has joined #ruby
justsee has joined #ruby
joshman_ has quit [Ping timeout: 252 seconds]
<yebyen> and i guess its possible they weren't even talking about subclasses
<yebyen> lewix: stackoverflow agrees with you
<banister`sleep> yebyen: instance variables are not inherited in ruby
<yebyen> but methods are (?)
<banister`sleep> yeah
<yebyen> so if you decorate with attr_accessor, those are not inherited either...
<havenn> yebyen: attrs are methods
chrishough has quit [Quit: chrishough]
<yebyen> ok
<lewix> instances variables are made on the fly , they come into existence when they're called. magic
<yebyen> d'oh
<yebyen> @local variables
<yebyen> is what i've meant to say all along
maletor has joined #ruby
tomzx_mac has joined #ruby
scruple has joined #ruby
<yebyen> fields... what are they called in ruby?
luckyruby has joined #ruby
<yebyen> same thing?
* lewix is convinced that english is the hardest barrier to comprehension
Domon has joined #ruby
angusiguess has joined #ruby
<yebyen> yeah
<yebyen> so @at vars are inherited
MrZYX is now known as MrZYX|off
<yebyen> and they're called something else
<yebyen> i would like to believe i'll know better and more permanently if I just test it
<yebyen> but so lazy
_nitti_ has quit [Remote host closed the connection]
<yebyen> i am usually programming in go, which has no inheritance
_nitti has joined #ruby
cyong has joined #ruby
cyong has quit [Client Quit]
ferdev has quit [Read error: Connection reset by peer]
Dreamer3 has quit [Quit: Leaving...]
Stilo has joined #ruby
poikon has joined #ruby
krawchyk has joined #ruby
Xeago has quit [Remote host closed the connection]
goldenwest has joined #ruby
<goldenwest> is there a way to create a custom infix function
Ontolog_ has joined #ruby
arya_ has joined #ruby
Dreamer3 has joined #ruby
_nitti has quit [Read error: Operation timed out]
drale2k has quit [Quit: Leaving...]
drale2k has joined #ruby
jdunck has quit [Quit: Computer has gone to sleep.]
Davey has quit [Quit: Computer has gone to sleep.]
Ontolog_ has quit [Remote host closed the connection]
Ontolog has quit [Ping timeout: 255 seconds]
Ontolog_ has joined #ruby
TheFuzzball has quit [Quit: Computer has gone to sleep.]
yshh has joined #ruby
sailias has joined #ruby
eindoofus has joined #ruby
justinmcp has joined #ruby
newUser1234 has joined #ruby
baroquebobcat has quit [Ping timeout: 252 seconds]
freeayu has joined #ruby
pdamer has joined #ruby
moos3 has quit [Quit: Computer has gone to sleep.]
poikon has quit [Ping timeout: 276 seconds]
moos3 has joined #ruby
<eindoofus> hi, this line from the ruby book I'm reading is confusing me: "Methods usually return the value of the last expression evaluated during execution. But = method calls behave like assignments: the value of the express ticket.price = 63.00 is 63.00, even if the ticket= method returns the string "Ha ha!" So that does that mean a ticket= method returns 63.00, and if so why, how would it know? I would think on
<eindoofus> the instance variable that is being set, but what about if you set two different instance variables?
pen has quit [Remote host closed the connection]
<eindoofus> So does* that mean
horofox_ has quit [Quit: horofox_]
cephalopod has quit [Ping timeout: 255 seconds]
SCommette has joined #ruby
<lewix> banister`sleep: how long have you been programming in ruby
chipotle_ has quit [Quit: cya]
<banister`sleep> lewix: a bit less than 4 years ;)
<banister`sleep> lewix: the part that confused me the most was modules and singleton classes
<banister`sleep> parts*
<banister`sleep> were*
<lewix> eindoofus: the well grounded rubyist
s__dana has quit [Quit: s__dana]
lethjakman_lapto has quit [Ping timeout: 248 seconds]
<eindoofus> lewix: yup :)
jtharris has quit [Quit: WeeChat 0.4.0]
Banistergalaxy has quit [Ping timeout: 245 seconds]
<lewix> banister`sleep: haha people are so different. but I'm glad you're here to help. you're useful
<banister`sleep> lewix: well, modules are actually quite fucked up when u learn a bit more about them
<banister`sleep> they're not as simple as they appear at first
Banistergalaxy has joined #ruby
<eindoofus> So does a method_name= basically return whatever is assigned to it? For example does method_name = "a string" 'return
<eindoofus> "a string" ?
<havenn> eindoofus: Here is an example of what I *think* you're talking about?: https://gist.github.com/havenwood/5087197
Targen has joined #ruby
hashmal_ has quit [Quit: Computer has gone to sleep.]
<havenn> eindoofus: Setter returns argument, not the instance variable value that was set.
<lewix> eindoofus: I think in the example you just gave it's talking about syntactic sugar, and just stating that if in the definition of your = method call you don't actually have an assignment ruby does not care about the semantics, it will still return the last expression evaluated
Domon has quit [Remote host closed the connection]
<lewix> banister`sleep: for example =)?
<eindoofus> cool, I understand now. thanks :)
philcrissman has joined #ruby
<lewix> banister`sleep: what did you do before Ruby
<banister`sleep> lewix: 1. they have no superclass (they dont even inherit from Object) 2. the 'module itself' is never mixed into a chain, but an exotic 'proxy' object 3. the 'double include problem' (i.e subsequent module includes to M aren't reflected in classes that already included M) 4. module singleton classes are not added to the class method lookup chain, unlike with inheritance
taoru has joined #ruby
taoru has quit [Read error: Connection reset by peer]
taoru has joined #ruby
marr has quit [Ping timeout: 248 seconds]
taoru has quit [Remote host closed the connection]
thinkclay has quit [Quit: Leaving.]
<banister`sleep> module singleton methods*
bubblehead has quit [Remote host closed the connection]
bubblehead has joined #ruby
<banister`sleep> lewix: any questions? (re modules)
thone has quit [Ping timeout: 252 seconds]
moos3 has quit [Quit: Computer has gone to sleep.]
havenn has quit [Remote host closed the connection]
thone has joined #ruby
woolite64 has quit [Read error: Connection reset by peer]
<banister`sleep> lewix: oh, also the strangest of all, top-level constnats can be looked up in modules
<banister`sleep> this breaks all rules of constant lookup :)
araujo has joined #ruby
woolite64 has joined #ruby
<banister`sleep> an "exception" is made for modules, cos otherwise it would be too weird
Radnor has quit [Quit: leaving]
mrsolo has quit [Quit: Leaving]
<lewix> banister`sleep: 1.2. A class can only have one superclass, and it made sense to me that module are an exotic proxy,3. i didn't know that 4.it makes sense to me
ephemerian has quit [Quit: Leaving.]
<lewix> 4.I take back what I said
<lewix> what do you mean by unlike inheritance
<banister`sleep> lewix: modules are not an exotic proxy, the 'mixed in' module is :) And i dont think it's obvious at all, there's no analog to it in the ruby OO system, or any OO system that i know of. Cos it's like a proxy, but not a proxy at the same time, i.e some properties it has in common such as method tables, but other things it does not, such as superclass pointers..
<banister`sleep> but whatevs
nari has joined #ruby
<banister`sleep> lewix: when you inherit from a superclass you also inherit class methods, but when you include a module you don't get class methods defined on the module
mneorr has joined #ruby
ckrailo has quit [Quit: Computer has gone to sleep.]
<lewix> banister`sleep: I didn't know that
<lewix> things you learn
pen has joined #ruby
<banister`sleep> lewix: class A; def self.hi; "hi" ;end; end class B < A; end; B.hi #=> "hi"
<banister`sleep> lewix: module M; def self.hi; "hi"; end; end; class B; include M; end; B.hi #=> error
mibitzi has joined #ruby
Domon has joined #ruby
joshman_ has joined #ruby
Spooner_ has quit [Remote host closed the connection]
t-mart has joined #ruby
t-mart has quit [Changing host]
t-mart has joined #ruby
<lewix> banister`sleep: good to know. I'll keep it in mind. ruby does not have multiple inheritance, this is why it makes sense to have a mixed in module that act like an exotic proxy
Domon has quit [Remote host closed the connection]
<banister`sleep> lewix: the strangest of all though, is this: A = 10; module M; A; end #=> 10 <--- this shouldn't work
<banister`sleep> (but it does)
Domon has joined #ruby
chrisja has quit [Quit: leaving]
jetblack has quit [Quit: leaving]
pac1 has quit [Ping timeout: 248 seconds]
NiteRain has joined #ruby
<lewix> banister`sleep: singleton methods lie in a special class this is why they're not on the lookup path
sailias has quit [Quit: Leaving.]
<banister`sleep> lewix: then why are they in the lookup path when using inheritance? :) i can't really see any convincing reason for the distinction
<lewix> banister`sleep: fair enough :)
<banister`sleep> lewix: it's why i wrote this a few years ago: https://github.com/banister/include_complete
<lewix> banister`sleep: A = 10; module M; A; end #=> 10. what!
<banister`sleep> i explain the rationale in that readme
_nitti has joined #ruby
<banister`sleep> lewix: well it makes sense for classes: A = 10; class C; A; end #=> 10
nga4 has quit [Ping timeout: 252 seconds]
<banister`sleep> but not for modules since they dont subclass Object
_nitti has quit [Remote host closed the connection]
hbpoison has quit [Ping timeout: 245 seconds]
<lewix> they do
<banister`sleep> no..they dont :)
_nitti has joined #ruby
mockra has quit [Remote host closed the connection]
mikurubeam has joined #ruby
hogeo has joined #ruby
jetblack has joined #ruby
<lewix> banister`sleep: Object mix in Kernel I read and module Kernel has most fundamental methods
<aedornm> So many passwords.
pdamer has quit [Quit: pdamer]
brianpWins has quit [Quit: brianpWins]
<banister`sleep> lewix: but that's not relevant to modules subclassing Object, which is what we were talking about ;)
tjbiddle has joined #ruby
sirish has joined #ruby
<lewix> banister`sleep: what do you mean by modules subclassing Object
<banister`sleep> lewix: i mean, Object is not in the ancestor chain for modules
<banister`sleep> module M; end; M.ancestors.include?(Object) #=> false
_nitti has quit [Ping timeout: 264 seconds]
<lewix> banister`sleep: ok. I see but don't all modules have module Kernel associated to it
angusiguess has quit [Ping timeout: 276 seconds]
philcrissman has quit [Remote host closed the connection]
Ontolog has joined #ruby
mikurubeam has quit [Ping timeout: 260 seconds]
mneorr has quit [Read error: Operation timed out]
Domon has quit [Remote host closed the connection]
Ontolog has quit [Remote host closed the connection]
cheese1756 has quit [Changing host]
cheese1756 has joined #ruby
<banister`sleep> lewix: 'associated' is a vague word. "Yes" in the sense of modules being an *instance of* Module which subclasses Object which mixes in Kernel. But "no" in the sense of Kernel is not in the ancestor chain of modules as modules do not subclass from Object, which is where Kernel is mixed in
Honeycomb has joined #ruby
Ontolog has joined #ruby
frem has joined #ruby
krz has joined #ruby
<banister`sleep> lewix: the important point is that constants are looked up lexically and via the inheritance chain, and in the case of: module M; A; end; the constnat 'A' is neither lexical nor in the inheritance chain of M, so it shouldn't be looked up (but it is)
frem has quit [Client Quit]
Ontolog_ has quit [Ping timeout: 245 seconds]
<banister`sleep> lewix: same as constants cannot be looked up in BasicObject, and for the same reason
mikurubeam has joined #ruby
<banister`sleep> top-level constants
the_jeebster has quit [Quit: Leaving.]
<lewix> banister`sleep: fuuu how do you know so much
lethjakman_lapto has joined #ruby
bonhoeffer has joined #ruby
<banister`sleep> lewix: i mess with the C internals a lot
<banister`sleep> that's how i got to know about modules, etc
<lewix> banister`sleep: how does it all work that classes are objects and objects are classes. it's very circula
frem has joined #ruby
<lewix> circular*
<aedornm> What's a good obscure language?
<banister`sleep> lewix: there's a circle in there too :) at the top of teh chain there's a hidden object that is an instance of itself
plaintext has joined #ruby
plaintext has quit [Remote host closed the connection]
<banister`sleep> i think it's something like: #<Class: #<Class: >> or something, the 2nd-level singleton class of Class
mneorr has joined #ruby
<lewix> banister`sleep: i thought Class was an instance of itself
<banister`sleep> it's not, really
mikurubeam has quit [Ping timeout: 255 seconds]
<banister`sleep> it's not a direct instance of itself
<banister`sleep> it has a meta class which its a direct instance of
<banister`sleep> it's*
<banister`sleep> it's only like the meta class of that meta class that is a direct instance of itself
samphippen has quit [Quit: Computer has gone to sleep.]
rakl has quit [Quit: sleeping]
Takehiro has joined #ruby
oxbrainz has joined #ruby
sirish has quit [Ping timeout: 248 seconds]
<aytch> aedornm: http://www.muppetlabs.com/~breadbox/bf/ does this qualify?
<lewix> banister`sleep: Ok I have too many things to digest for today
<banister`sleep> lewix: i'm talking about non-lazily created singleton classes, of course you can keep building metaclasses beyond that, but im just talking about the classes that are there at boot time
<aedornm> aytch: nooo, been there, done that one.
<banister`sleep> but even if you keep building metaclasses, at the top of the chain there will always be one that is an instance of itself
<banister`sleep> lewix: here i wrote an article on it:
eindoofus has quit [Quit: Leaving]
<aytch> aedornm: http://lolcode.com/
<aytch> other than that, that's all I got
<aedornm> meh, gotta go pick up food. Figure this out later. (yup, did that one too!)
Xeago has joined #ruby
sn0wb1rd has quit [Quit: I will be right back]
mikurubeam has joined #ruby
nOStahl has quit [Quit: Going To Sleep]
tjbiddle has quit [Quit: tjbiddle]
stonevil has joined #ruby
joeycarmello has quit [Remote host closed the connection]
Xeago has quit [Read error: Operation timed out]
justinmcp has quit [Ping timeout: 245 seconds]
mikurubeam has quit [Ping timeout: 255 seconds]
mikurubeam has joined #ruby
hbpoison has joined #ruby
dmiller1 has quit [Quit: WeeChat 0.3.9.2]
maletor has quit [Quit: Computer has gone to sleep.]
dsf__ has joined #ruby
dmiller has joined #ruby
<lewix> banister`sleep: thanks
<lewix> banister`sleep: I learned lots today
dsf has quit [Ping timeout: 245 seconds]
lewix has quit [Remote host closed the connection]
verysoftoiletppr has quit []
markalanevans has joined #ruby
markalanevans has quit [Client Quit]
twoism has quit [Remote host closed the connection]
jerius has quit []
p2w has quit [Quit: ["Textual IRC Client: www.textualapp.com"]]
tish has quit [Quit: Leaving.]
SCommette has quit [Quit: SCommette]
hiroyuki has quit [Ping timeout: 245 seconds]
pen has quit [Remote host closed the connection]
pdamer has joined #ruby
flyinprogramer has joined #ruby
tish has joined #ruby
oxbrainz is now known as cephalopod
frem has quit [Quit: Computer has gone to sleep.]
Evixion` is now known as Evixion
c0rn has quit [Quit: Computer has gone to sleep.]
Ontolog_ has joined #ruby
emmanuelux has quit [Remote host closed the connection]
Ontolog has quit [Ping timeout: 240 seconds]
mneorr has quit [Read error: Connection timed out]
Honeycomb has quit [Quit: Leaving.]
banjara has quit [Quit: Leaving.]
Dreamer3 has quit [Remote host closed the connection]
takeru has joined #ruby
Dreamer3 has joined #ruby
mneorr has joined #ruby
Dreamer3 has quit [Client Quit]
newUser1234 has quit [Remote host closed the connection]
newUser1234 has joined #ruby
pskosinski has quit [Ping timeout: 255 seconds]
takeru has quit [Ping timeout: 248 seconds]
apok has quit [Quit: apok]
Dreamer3 has joined #ruby
flyinprogramer has quit [Quit: flyinprogramer]
jamesfung14 has quit [Ping timeout: 248 seconds]
terrorpup has joined #ruby
Dreamer3 has quit [Client Quit]
newUser1234 has quit [Ping timeout: 248 seconds]
reset has quit [Quit: Leaving...]
joeycarmello has joined #ruby
mlr has quit [Quit: Lost terminal]
hbpoison has quit [Ping timeout: 276 seconds]
reset has joined #ruby
Myconix has joined #ruby
mlr has joined #ruby
yacks has joined #ruby
<lethjakman_lapto> hey, I'm having some trouble understanding how I should deal with some json in ruby. It comes into my program looking like this. https://gist.github.com/anonymous/5087521
Dreamer3 has joined #ruby
Pandaen has quit [Ping timeout: 240 seconds]
<lethjakman_lapto> I've found I can get my first value with tree["0"], but I would like to be able to do a tree.first
<lethjakman_lapto> is there any way to do this?
<lethjakman_lapto> I'm wanting to use recursion on the children within this
angusiguess has joined #ruby
etcetera has quit []
Domon has joined #ruby
<aytch> lethjakman_lapto: someone else will probably have a better answer, but my instinct would be to put your JSON into an array
<lethjakman_lapto> aytch: how would you go about doing that? I don't know how without parsing each possible value from it
Voodoofish430 has quit [Quit: Leaving.]
malkomal_ has quit [Read error: Connection reset by peer]
<aytch> That's why I said someone else would probably have a better answer.
malkomalko has joined #ruby
<lethjakman_lapto> I appreciate the help anyways :)
chrishough has joined #ruby
kofno has quit [Remote host closed the connection]
angusiguess has quit [Ping timeout: 256 seconds]
Dreamer3 has quit [Remote host closed the connection]
dhruvasagar has joined #ruby
nga4 has joined #ruby
ngoldman has joined #ruby
Dreamer3 has joined #ruby
<aytch> do you know the values that will be returned?
lusory has quit [Quit: leaving]
<aedornm> lethjakman_lapto: you can cheat a bit and do tree[tree.keys.first]. Or you can convert it to an Array if you want.
justinmcp has joined #ruby
ckrailo has joined #ruby
Dreamer3 has quit [Remote host closed the connection]
subbyyy has joined #ruby
Dreamer3 has joined #ruby
<lethjakman_lapto> ooo that tree.keys.first
<lethjakman_lapto> how does this converting it into an array work?
<lethjakman_lapto> is there a function?
Dreamer3 has quit [Remote host closed the connection]
pen has joined #ruby
etcetera has joined #ruby
Dreamer3 has joined #ruby
<aytch> are you using the json gem?
Dreamer3 has quit [Client Quit]
<aytch> this discussion looks like the json gem returns a hash, which would make iteration easy: http://stackoverflow.com/questions/5410682/parsing-a-json-string-in-ruby
Hanmac1 has joined #ruby
dhruvasagar has quit [Ping timeout: 252 seconds]
jef_abraham has joined #ruby
<felixjet> do you need external libraries to parse json?
havenwood has joined #ruby
jamesfung14 has joined #ruby
<aytch> You could build methods to parse json, but I don't know if Ruby does that natively
adkron has quit [Ping timeout: 245 seconds]
Dreamer3 has joined #ruby
<aytch> you could parse a json file as a string, I think, but that's kind of ugly and would seem to defeat the purpose
splud has quit [Quit: splud]
Hanmac has quit [Ping timeout: 255 seconds]
gabrielrotbart has quit [Read error: Connection reset by peer]
dsf__ has quit [Quit: This computer has gone to sleep]
geggam_ is now known as geggam
gabrielrotbart has joined #ruby
sn0wb1rd has joined #ruby
havenwood has quit [Remote host closed the connection]
chipotle_ has joined #ruby
chipotle_ has joined #ruby
chipotle_ has quit [Changing host]
Honeycomb has joined #ruby
hbpoison has joined #ruby
pdamer has quit [Quit: pdamer]
rupee has quit [Quit: Leaving]
banjara has joined #ruby
<lethjakman_lapto> I think I am using the json gem, I'm not 100% sure.
<lethjakman_lapto> I'm basically just returnin gthis to rails, and it seems to automatically parse it...
havenwood has joined #ruby
imitkit has quit [Quit: imitkit]
krawchyk has quit [Remote host closed the connection]
mattbl has joined #ruby
mneorr has quit [Read error: Connection timed out]
rakl has joined #ruby
Emplitz has joined #ruby
Dreamer3 has quit [Ping timeout: 252 seconds]
etcetera has quit []
pdamer has joined #ruby
mneorr has joined #ruby
Stilo has quit [Quit: Textual IRC Client: www.textualapp.com]
Virunga has quit [Remote host closed the connection]
Dreamer3 has joined #ruby
mmitchell has joined #ruby
splud has joined #ruby
mmitchell has quit [Remote host closed the connection]
toekutr has quit [Remote host closed the connection]
lewix has joined #ruby
nOStahl has joined #ruby
etcetera has joined #ruby
gabrielrotbart has quit [Remote host closed the connection]
<aedornm> My fortune cookie says I'll be successful in entertainment. I have thus decided to quit programming in Ruby and become a mime.
etcetera has quit [Client Quit]
<aedornm> A mime magician
<aedornm> with a puppy.
<felixjet> come on, how come ruby doesnt have a native method to parse json :S
<felixjet> thats lame xD
<zaltekk> ..only javascript natively parses json
<felixjet> really?
<felixjet> well, in php i never installed any "gem" (lib or pear) for json
<felixjet> and it works
<zaltekk> it's still a library
<zaltekk> php call it an extension
<zaltekk> that on some distros must be installed by itself
<zaltekk> others it must just be enabled
<zaltekk> it's not a built-in part of the language
Dreamer3 has quit [Ping timeout: 276 seconds]
<felixjet> i see
j^2 has quit [Ping timeout: 240 seconds]
<felixjet> and gem is the best way to install?
<zaltekk> yes
mk03 has quit [Remote host closed the connection]
<andynu> felixjet: json has been a standard lib since 1.9.2, you shouldn't need to install it.
<bean> yeah, json is a standard lib.
<andynu> just require 'json'
<felixjet> ah kk
<felixjet> thats better, json this days looks like a must not a plugin
<bean> >> string = '{"desc":{"someKey":"someValue","anotherKey":"value"},"main_item":{"stats":{"a":8,"b":12,"c":10}}}'
<bean> ;parsed = JSON.parse(string);puts parsed
<eval-in_> bean: Output: "" (http://eval.in/11657)
chipotle_ has quit [Quit: cya]
<bean> bah
<felixjet> no 1.9.2 ? xD
<andynu> >> print RUBY_VERSION
<eval-in_> andynu: Output: "1.9.3" (http://eval.in/11658)
<andynu> Where does that thing run. That seems destined to be messed with.
gabrielrotbart has joined #ruby
dhruvasagar has joined #ruby
ichilton has quit [Ping timeout: 248 seconds]
mattbl has quit [Quit: This computer has gone to sleep]
mneorr has quit [Read error: Connection timed out]
generalissimo has joined #ruby
mneorr has joined #ruby
aedornm has quit [Quit: Leaving]
banjara has quit [Quit: Leaving.]
pen has quit [Read error: Connection reset by peer]
mneorr has quit [Remote host closed the connection]
pen has joined #ruby
mattbl has joined #ruby
arya_ has quit [Ping timeout: 248 seconds]
forced_request has joined #ruby
brianpWins has joined #ruby
nomenkun has joined #ruby
pdamer has quit [Quit: pdamer]
arya_ has joined #ruby
nfk has quit [Quit: yawn]
newUser1234 has joined #ruby
arya_ has quit [Ping timeout: 248 seconds]
wallerdev has joined #ruby
SCommette has joined #ruby
fedza_ has joined #ruby
inao has joined #ruby
inao has quit [Client Quit]
ttt has joined #ruby
vagmi has joined #ruby
hadees has joined #ruby
etcetera has joined #ruby
arya_ has joined #ruby
alvaro_o has quit [Quit: Ex-Chat]
etcetera has quit [Client Quit]
angusiguess has joined #ruby
fedza has quit [Ping timeout: 264 seconds]
Takehiro has quit [Remote host closed the connection]
jef_abraham has quit [Quit: jef_abraham]
kofno has joined #ruby
angusiguess has quit [Ping timeout: 255 seconds]
dmiller has quit [Read error: Connection reset by peer]
pdamer has joined #ruby
dmiller has joined #ruby
mockra has joined #ruby
mneorr has joined #ruby
ngoldman has quit [Remote host closed the connection]
renanoronfle has quit [Quit: Leaving]
arya_ has quit [Ping timeout: 248 seconds]
Ontolog_ has quit [Remote host closed the connection]
Ontolog has joined #ruby
newUser1234 has quit [Remote host closed the connection]
hiroyuki has joined #ruby
newUser1234 has joined #ruby
Dreamer3 has joined #ruby
adamjleonard has quit [Quit: Leaving...]
brum has joined #ruby
arya has joined #ruby
tish has quit [Quit: Leaving.]
tjbiddle has joined #ruby
newUser1234 has quit [Ping timeout: 245 seconds]
chrishough has quit [Quit: chrishough]
Edward__ has quit [Quit: Leaving]
tjbiddle has quit [Client Quit]
Ontolog_ has joined #ruby
d2dchat has joined #ruby
mattbl has quit [Quit: This computer has gone to sleep]
drale2k has quit [Quit: Leaving...]
fedza_ has quit []
jef_abraham has joined #ruby
mahmoudi_ has quit [Quit: Computer has gone to sleep.]
threesome has quit [Ping timeout: 255 seconds]
Ontolog has quit [Ping timeout: 256 seconds]
wmoxam has joined #ruby
jamesfung14 has quit [Ping timeout: 256 seconds]
etcetera has joined #ruby
ryanf has quit [Quit: leaving]
banister`sleep has quit [Read error: Connection reset by peer]
banister`sleep has joined #ruby
Ontolog_ has quit [Remote host closed the connection]
Ontolog has joined #ruby
Ontolog_ has joined #ruby
Ontolog_ has quit [Remote host closed the connection]
ry4nn has joined #ruby
joofsh has joined #ruby
Takehiro has joined #ruby
Dreamer3 has quit [Remote host closed the connection]
Ontolog_ has joined #ruby
Dreamer3 has joined #ruby
nomenkun has quit [Remote host closed the connection]
hbpoison has quit [Ping timeout: 256 seconds]
Weazy has quit [Ping timeout: 246 seconds]
[diecast] has quit [Read error: Operation timed out]
strax has quit [Read error: Operation timed out]
thejefflarson_ has quit [Read error: Operation timed out]
srid has quit [Read error: Operation timed out]
fcoury has quit [Write error: Broken pipe]
NimeshNeema has quit [Read error: Operation timed out]
pkondzior__ has quit [Read error: Operation timed out]
prime has quit [Read error: Operation timed out]
chiel has quit [Ping timeout: 252 seconds]
SeanTAllen has quit [Read error: Operation timed out]
RJ3_ has quit [Read error: Operation timed out]
rcsheets has quit [Read error: Operation timed out]
swarley has quit [Ping timeout: 276 seconds]
Ontolog has quit [Ping timeout: 240 seconds]
dekz__ has quit [Ping timeout: 245 seconds]
im0b has quit [Ping timeout: 245 seconds]
karnowski has quit [Ping timeout: 245 seconds]
yeban has quit [Ping timeout: 252 seconds]
guilleiguaran has quit [Ping timeout: 255 seconds]
xerxas has quit [Ping timeout: 245 seconds]
randym has quit [Ping timeout: 264 seconds]
Guest85414 has quit [Ping timeout: 264 seconds]
cool has quit [Ping timeout: 245 seconds]
blooberr has quit [Ping timeout: 245 seconds]
kapowaz has quit [Ping timeout: 252 seconds]
bluehavana has quit [Read error: Operation timed out]
bonhoeffer has quit [Quit: bonhoeffer]
kaichanvong has quit [Ping timeout: 276 seconds]
spanx has quit [Ping timeout: 264 seconds]
lectrick has quit [Ping timeout: 264 seconds]
davidboy has quit [Ping timeout: 264 seconds]
TheDeadSerious_ has quit [Ping timeout: 272 seconds]
z has quit [Ping timeout: 252 seconds]
cam` has quit [Ping timeout: 245 seconds]
rwz has quit [Ping timeout: 245 seconds]
akam-it has quit [Remote host closed the connection]
Spaceghost|cloud has quit [Ping timeout: 245 seconds]
dnyy has quit [Ping timeout: 256 seconds]
[Neurotic] has quit [Ping timeout: 264 seconds]
notbrent has quit [Ping timeout: 264 seconds]
wereHamster has quit [Ping timeout: 260 seconds]
[0x1a] has quit [Ping timeout: 260 seconds]
octarine has quit [Ping timeout: 245 seconds]
joshwines has quit [Ping timeout: 276 seconds]
moeSeth_ has quit [Ping timeout: 260 seconds]
avalarion has quit [Ping timeout: 245 seconds]
aedornm has joined #ruby
scrr has quit [Ping timeout: 264 seconds]
threesome has joined #ruby
akam_ has joined #ruby
guyz has quit [Ping timeout: 272 seconds]
himsin has quit [Remote host closed the connection]
mahmoudimus has joined #ruby
mikurubeam has quit [Quit: +1 (Yes). -1 (No). i (WTF?).]
jef_abraham_ has joined #ruby
Skofo has joined #ruby
jef_abraham_ has quit [Client Quit]
justinmcp has quit [Remote host closed the connection]
chiel has joined #ruby
Weazy has joined #ruby
shirokuro11 has joined #ruby
mikurubeam has joined #ruby
Myconix has quit [Quit: leaving]
mockra has quit [Remote host closed the connection]
prime has joined #ruby
avalarion has joined #ruby
jef_abraham has quit [Read error: Operation timed out]
jef_abraham has joined #ruby
radic has quit [Disconnected by services]
radic_ has joined #ruby
z has joined #ruby
himsin has joined #ruby
z is now known as Guest40384
wereHamster has joined #ruby
rafacv has quit [Remote host closed the connection]
SCommette has quit [Quit: SCommette]
cyberflux has quit []
scrr has joined #ruby
gogiel has quit [Ping timeout: 252 seconds]
mlr has quit [Quit: leaving]
sonne has quit [Ping timeout: 276 seconds]
ssvo has quit [Remote host closed the connection]
mercwithamouth has quit [Quit: leaving]
Takehiro has quit [Remote host closed the connection]
mercwithamouth has joined #ruby
Takehiro has joined #ruby
dawkirst has joined #ruby
djwonk has quit []
yankov has joined #ruby
<yankov> anyone knows the fast analog of Chronic gem? for time parsing
sirish has joined #ruby
justinmcp has joined #ruby
tetsuseu1 is now known as tetsu
chendo_ has quit [Ping timeout: 256 seconds]
a_a_g has joined #ruby
shirokuro11 has quit [Remote host closed the connection]
chendo_ has joined #ruby
thinkclay has joined #ruby
octarine has joined #ruby
nga4 has quit []
jpcamara has joined #ruby
etcetera has quit []
Takehiro has quit [Remote host closed the connection]
jpcamara_ has joined #ruby
Takehiro has joined #ruby
hemanth has quit [Quit: Leaving]
Ontolog_ has quit [Remote host closed the connection]
jpcamara has quit [Ping timeout: 256 seconds]
jpcamara_ is now known as jpcamara
hemanth has joined #ruby
philcrissman has joined #ruby
Ontolog has joined #ruby
pdamer has quit [Quit: pdamer]
angusiguess has joined #ruby
jlast has quit [Remote host closed the connection]
notbrent_ has joined #ruby
teamon has quit [Read error: Operation timed out]
swarley-freenode has joined #ruby
angusiguess has quit [Ping timeout: 256 seconds]
nkts has quit [Ping timeout: 246 seconds]
wedgeV has quit [Ping timeout: 252 seconds]
arya has quit [Ping timeout: 248 seconds]
tish has joined #ruby
Artheist has joined #ruby
iaj has quit [Ping timeout: 276 seconds]
Ontolog_ has joined #ruby
arya has joined #ruby
sepp2k has joined #ruby
flip_digits has joined #ruby
joofsh has quit [Remote host closed the connection]
Ontolog has quit [Ping timeout: 252 seconds]
froy has quit [Quit: kablam!]
justinmcp has quit [Remote host closed the connection]
mockra has joined #ruby
swarley-freenode has quit [Ping timeout: 245 seconds]
yacks has quit [Read error: Operation timed out]
arya has quit [Ping timeout: 245 seconds]
mahmoudimus has quit [Quit: Computer has gone to sleep.]
teamon has joined #ruby
terrorpup has quit [Remote host closed the connection]
wedgeV has joined #ruby
iaj has joined #ruby
ssvo has joined #ruby
ssvo_ has joined #ruby
sirish has quit [Ping timeout: 248 seconds]
nkts has joined #ruby
ryanf has joined #ruby
nkts is now known as Guest43815
ssvo_ has left #ruby [#ruby]
sonne has joined #ruby
daniel_hinojosa has joined #ruby
arya has joined #ruby
etcetera has joined #ruby
Skofo has quit [Ping timeout: 248 seconds]
gogiel has joined #ruby
mneorr has quit [Remote host closed the connection]
rakl has quit [Quit: sleeping]
swarley-freenode has joined #ruby
dpn` has quit [Excess Flood]
johnnygoodmancpa has joined #ruby
justinmcp has joined #ruby
malkomalko has quit [Remote host closed the connection]
philcrissman has quit [Remote host closed the connection]
<johnnygoodmancpa> if I rescue => e, is there a way to pull the file and line number of the error or a trace out of the e?
mikurubeam has quit [Quit: When I come back, please tell me in what new ways you have decided to be completely wrong.]
mikurubeam has joined #ruby
mlr has joined #ruby
dpn` has joined #ruby
Artheist has quit [Remote host closed the connection]
sandGorgon has joined #ruby
sandGorgon has quit [Client Quit]
freakazoid0223 has quit [Ping timeout: 248 seconds]
<hemanth> johnnygoodmancpa, p e.backtrace[0].split(":").last
sandGorgon has joined #ruby
Hanmac has joined #ruby
<hemanth> that shall give u the line number
DrShoggoth has joined #ruby
generalissimo has quit [Ping timeout: 248 seconds]
<johnnygoodmancpa> hemanth: thanks, testing now
<hemanth> kool
sayan has joined #ruby
sayan has quit [Changing host]
sayan has joined #ruby
Hanmac has quit [Client Quit]
Hanmac has joined #ruby
jlast has joined #ruby
yacks has joined #ruby
etcetera has quit []
yacks has quit [Max SendQ exceeded]
jpfuentes2 has joined #ruby
yacks has joined #ruby
ner0x has quit [Quit: Leaving]
jwang has quit [Read error: Connection reset by peer]
jwang has joined #ruby
yacks has quit [Max SendQ exceeded]
yacks has joined #ruby
rcsheets has joined #ruby
yacks has quit [Max SendQ exceeded]
lewix has quit [Remote host closed the connection]
yacks has joined #ruby
lewix has joined #ruby
lewix has quit [Changing host]
lewix has joined #ruby
yacks has quit [Max SendQ exceeded]
yacks has joined #ruby
robbyoconnor has joined #ruby
jlast has quit [Ping timeout: 256 seconds]
nOStahl has quit [Quit: Going To Sleep]
a_a_g has quit [Ping timeout: 252 seconds]
wmoxam has quit [Quit: leaving]
Artheist has joined #ruby
daniel_hinojosa has quit [Quit: Leaving.]
a_a_g has joined #ruby
nomenkun has joined #ruby
rakl has joined #ruby
a_a_g1 has joined #ruby
fivetwentysix has joined #ruby
baroquebobcat has joined #ruby
girija has joined #ruby
maycon__ has quit [Ping timeout: 252 seconds]
justinmcp has quit [Remote host closed the connection]
a_a_g has quit [Ping timeout: 252 seconds]
huoxito has quit [Quit: Leaving]
nomenkun has quit [Ping timeout: 245 seconds]
drumond19 has joined #ruby
lkba has quit [Ping timeout: 250 seconds]
djwonk has joined #ruby
mneorr has joined #ruby
reset has quit [Ping timeout: 248 seconds]
lkba has joined #ruby
<johnnygoodmancpa> hemanth: tested, working. Thanks again.
flip_digits has quit [Quit: Textual IRC Client: www.textualapp.com]
mercwithamouth has quit [Ping timeout: 248 seconds]
mercwithamouth has joined #ruby
zubov has quit [Quit: Leaving]
mlr has quit [Quit: Lost terminal]
Honeycomb has quit [Quit: Leaving.]
divout has joined #ruby
sambio has quit []
tcstar has joined #ruby
girija_ has joined #ruby
maycon__ has joined #ruby
herbnerder has quit [Quit: ZNC - http://znc.sourceforge.net]
Hanmac has quit [Ping timeout: 245 seconds]
mneorr has quit [Ping timeout: 264 seconds]
Hanmac has joined #ruby
browndawg has joined #ruby
girija has quit [Read error: Connection reset by peer]
dsf has joined #ruby
Domon has quit [Remote host closed the connection]
yankov has quit [Quit: yankov]
noop has joined #ruby
dhruvasagar has quit [Ping timeout: 255 seconds]
tish has quit [Quit: Leaving.]
mockra has quit [Remote host closed the connection]
ocnam has joined #ruby
Matip has joined #ruby
jpfuentes2 has quit [Quit: Computer has gone to sleep.]
araujo has quit [Ping timeout: 240 seconds]
uris has quit [Quit: Leaving]
Mattix has quit [Ping timeout: 255 seconds]
XVirus has joined #ruby
nachtwandler has joined #ruby
banjara has joined #ruby
XVirus has left #ruby ["I was somebody who, is no business of yours ..."]
XVirus has joined #ruby
[diecast] has joined #ruby
ssvo has quit [Read error: Operation timed out]
gabrielrotbart has quit [Remote host closed the connection]
Guest85414 has joined #ruby
kapowaz has joined #ruby
Evixion has quit []
pkondzior__ has joined #ruby
herb_ has joined #ruby
girija_ has quit [Ping timeout: 256 seconds]
dekz__ has joined #ruby
guilleiguaran has joined #ruby
moeSeth_ has joined #ruby
<hemanth> johnnygoodmancpa, np
spanx has joined #ruby
ssvo has joined #ruby
iamjarvo has quit [Quit: Leaving.]
one` has joined #ruby
dnyy has joined #ruby
TheDeadSerious_ has joined #ruby
<shevy> anyone knows how to disconnect from ruby ftp again?
vlad_starkov has joined #ruby
<shevy> ah found it
<shevy> quit() Exits the FTP session.
johnnygoodmancpa has left #ruby [#ruby]
fcoury has joined #ruby
kaichanvong has joined #ruby
jef_abraham has quit [Quit: jef_abraham]
rwz has joined #ruby
cool has joined #ruby
etcetera has joined #ruby
ananthakumaran has joined #ruby
srid has joined #ruby
davidboy has joined #ruby
NimeshNeema has joined #ruby
ssvo has quit [Ping timeout: 245 seconds]
xerxas has joined #ruby
herb_ has quit [Quit: ZNC - http://znc.sourceforge.net]
strax_ has joined #ruby
lectrick has joined #ruby
brum has quit [Remote host closed the connection]
joeycarmello has quit [Remote host closed the connection]
etcetera has quit [Client Quit]
vagmi has quit [Quit: vagmi]
joeycarmello has joined #ruby
drumond19 has quit [Read error: Connection reset by peer]
SeanTAllen has joined #ruby
herbnerder has joined #ruby
Spaceghost|cloud has joined #ruby
blooberr has joined #ruby
vagmi has joined #ruby
jpcamara has quit [Quit: jpcamara]
im0b has joined #ruby
randym has joined #ruby
* hemanth paws at shevy
joeycarmello has quit [Remote host closed the connection]
cam` has joined #ruby
ssvo_ has joined #ruby
karnowski has joined #ruby
girija_ has joined #ruby
vlad_starkov has quit [Remote host closed the connection]
yeban has joined #ruby
[Neurotic]_ has joined #ruby
joshwines has joined #ruby
Domon has joined #ruby
[0x1a] has joined #ruby
RJ3__ has joined #ruby
io_syl has quit [Ping timeout: 245 seconds]
<shevy> hey hemanth
JohnBat26 has joined #ruby
rippa has joined #ruby
<shevy> aedornm make youtube videos of your mime mastery ;)
codecop has joined #ruby
spychalski has joined #ruby
<hemanth> shevy, what's new? pawing at ruby2.0?
<aedornm> There will be many youtube postings!
ocnam has quit [Quit: Tan Tan!]
jgrevich has joined #ruby
pencilcheck has joined #ruby
<shevy> hemanth oh well I am still not sure ... I think they all want me to use utf-8 ... and probably another editor than bluefish 1.0.7
pen has quit [Read error: Connection reset by peer]
<hemanth> shevy, http://h3manth.com/content/to_h-ruby-2.0 my fav part
<shevy> ok
`p has joined #ruby
<shevy> .to_h is new?
ssvo_ has quit [Ping timeout: 264 seconds]
<hemanth> for class yes
bluehavana_ has joined #ruby
<shevy> ruby has so many things one can learn
tomzx_mac has quit [Ping timeout: 248 seconds]
<Hanmac> to_h and to_hash are very funny in combination with ** :P
Mon_Ouie has joined #ruby
pen has joined #ruby
<Hanmac> hm ok its only to_hash ... but its still funny
imitkit has joined #ruby
drKreso has joined #ruby
drKreso has quit [Client Quit]
thejefflarson_ has joined #ruby
ocnam has joined #ruby
spychalski has quit [Remote host closed the connection]
krz has quit [Ping timeout: 248 seconds]
v0n has quit [Ping timeout: 245 seconds]
Domon has quit [Remote host closed the connection]
pencilcheck has quit [Ping timeout: 248 seconds]
etcetera has joined #ruby
goldenwest has quit [Quit: leaving]
takeru has joined #ruby
arya has quit [Ping timeout: 256 seconds]
jgrevich has quit [Remote host closed the connection]
ssvo has joined #ruby
krz has joined #ruby
mduvall has joined #ruby
feedbackloop has joined #ruby
takeru has quit [Ping timeout: 245 seconds]
lethjakman has joined #ruby
hbpoison has joined #ruby
charliesome has joined #ruby
lethjakman_lapto has quit [Ping timeout: 250 seconds]
arya has joined #ruby
jef_abraham has joined #ruby
tommyvyo has quit [Quit:]
Honeycomb has joined #ruby
mahmoudimus has joined #ruby
cyong has joined #ruby
nomenkun has joined #ruby
<hemanth> Hanmac, why so funny?
<hemanth> shevy, the include pattern seems to be neat as well
neurotech has joined #ruby
neurotech has quit [Client Quit]
noop has quit [Read error: Connection reset by peer]
carraroj has joined #ruby
feedbackloop has quit [Quit: Leaving]
<Hanmac> hemanth: http://eval.in/11694
imitkit has quit [Quit: imitkit]
<hemanth> heh heh I get the point now, need to update the blog
earthquake has joined #ruby
justinmcp has joined #ruby
xbayrockx has joined #ruby
xbayrockx is now known as wf2f
fivetwentysix has quit [Ping timeout: 252 seconds]
noop has joined #ruby
wallerdev has quit [Quit: wallerdev]
charliesome_ has joined #ruby
<hemanth> Hanmac, check update0 http://h3manth.com/content/to_h-ruby-2.0 :)
charliesome has quit [Disconnected by services]
charliesome_ is now known as charliesome
chendo_ has quit [Ping timeout: 252 seconds]
pyrac has joined #ruby
justinmcp has quit [Ping timeout: 245 seconds]
angusiguess has joined #ruby
<Hanmac> hemanth some older similar funfact http://eval.in/11696
chendo_ has joined #ruby
mikurubeam has quit [Ping timeout: 264 seconds]
<hemanth> Hanmac, nice :)
<hemanth> Hanmac, intrested in collecting something better than http://www.rubyinside.com/21-ruby-tricks-902.html ?
a_a_g1 has quit [Quit: Leaving.]
* hemanth knows that the tricks in that link are very trival to most of them here :D
sandGorgon has quit [Ping timeout: 252 seconds]
<Hanmac> >> p "abc"["b"]
<eval-in_> Hanmac: Output: "\"b\"\n" (http://eval.in/11702)
mikurubeam has joined #ruby
<charliesome> that output is fucked
nachtwandler has quit [Remote host closed the connection]
musl has quit [Ping timeout: 255 seconds]
xiphiasx_ has quit [Ping timeout: 276 seconds]
<Hanmac> about self[/d/] ? true : false !!self[/d/] is shorter :P
uxp_ has quit [Ping timeout: 248 seconds]
Hanmac has quit [Quit: Leaving.]
girija_ has quit [Ping timeout: 256 seconds]
araujo has joined #ruby
araujo has quit [Changing host]
araujo has joined #ruby
pen has quit [Remote host closed the connection]
brum has joined #ruby
noop has quit [Ping timeout: 264 seconds]
pigoz has quit [Ping timeout: 260 seconds]
braoru has joined #ruby
noop has joined #ruby
jayne has quit [Ping timeout: 612 seconds]
cyong has quit [Quit: Leaving.]
a_a_g has joined #ruby
sandGorgon has joined #ruby
eval-in_ has quit [Remote host closed the connection]
dhruvasagar has joined #ruby
<hemanth> Hanmac1, was aware of [//] and ""[//] :)
eval-in has joined #ruby
brum has quit [Ping timeout: 264 seconds]
musl has joined #ruby
<charliesome> >> "abc"[1]
<eval-in> charliesome => "b" (http://eval.in/11703)
<hemanth> :)
<charliesome> excellent
poikon has joined #ruby
uxp has joined #ruby
xiphiasx_ has joined #ruby
rippa has quit [Ping timeout: 240 seconds]
<hemanth> >> "a".each # was true for ruby <=1.8
<eval-in> hemanth => /tmp/execpad-d02aa7aa6964/source-d02aa7aa6964:2:in `<main>': undefined method `each' for "a":String (NoMethodError) (http://eval.in/11704)
<hemanth> >> "a".each_line #must be true
<eval-in> hemanth => #<Enumerator: "a":each_line> (http://eval.in/11705)
<hemanth> ;)
<lewix> the method split does not yield to a code block, correct?
etcetera has quit []
andikr has joined #ruby
<lewix> String#split
jayne has joined #ruby
rh1n0 has joined #ruby
girija_ has joined #ruby
poikon has quit [Ping timeout: 260 seconds]
thinkclay has quit [Quit: Leaving.]
ngoldman has joined #ruby
tish has joined #ruby
arya has quit [Ping timeout: 250 seconds]
rezzack has quit [Quit: Leaving.]
Myconix has joined #ruby
<whitequark> >> "foo"
<eval-in> whitequark => "foo" (http://eval.in/11706)
MrZYX|off is now known as MrZYX
arya has joined #ruby
timonv has joined #ruby
pepper_chico has quit [Quit: Computer has gone to sleep.]
tagrudev has joined #ruby
casheew has quit [Read error: Connection reset by peer]
rh1n0 has quit [Quit: Linkinus - http://linkinus.com]
Mon_Ouie has quit [Ping timeout: 276 seconds]
casheew has joined #ruby
<lewix> >> exit
<eval-in> lewix => (http://eval.in/11708)
justsee has quit [Quit: Leaving...]
atrocitas has joined #ruby
Hanmac has joined #ruby
casheew has quit [Read error: Connection reset by peer]
lethjakman has quit [Ping timeout: 248 seconds]
cha1tanya has joined #ruby
cha1tanya has quit [Changing host]
cha1tanya has joined #ruby
justsee has joined #ruby
justsee has joined #ruby
justsee has quit [Changing host]
joeycarmello has joined #ruby
jef_abraham has quit [Quit: jef_abraham]
casheew has joined #ruby
justsee has quit [Client Quit]
jef_abraham has joined #ruby
scruple has quit [Quit: Leaving]
aganov has joined #ruby
Quebert has joined #ruby
vlad_starkov has joined #ruby
fuzai has joined #ruby
joeycarmello has quit [Ping timeout: 245 seconds]
ttt has quit [Remote host closed the connection]
DrShoggoth has quit [Ping timeout: 255 seconds]
nomenkun has quit [Remote host closed the connection]
DrShoggoth has joined #ruby
vlad_starkov has quit [Ping timeout: 256 seconds]
keepguessing has joined #ruby
<keepguessing> Hi I am trying to installing the ruby debugger using gem install debugger
subbyyy has quit [Quit: none 0.3.9.2]
<keepguessing> Its stuck for about 5 mins
<keepguessing> i ended up CTRL+C it
Villadelfia has quit [Ping timeout: 264 seconds]
SeySayux has quit [Ping timeout: 276 seconds]
dsf has quit [Quit: This computer has gone to sleep]
Villadelfia has joined #ruby
<keepguessing> I am new to to ruby coming form the python world
<keepguessing> I used to use pdb there
<havenwood> keepguessing: What version of gem are you using?: gem -v
SeySayux has joined #ruby
<havenwood> keepguessing: What version of Ruby?
<keepguessing> ruby is 1.9.3
<keepguessing> gem is 1.8.25
drale2k has joined #ruby
<keepguessing> i used rvm to install ruby
<havenwood> keepguessing: Try updating gem: gem update --system
<havenwood> keepguessing: No errors, just hangs with?: gem install debugger
<keepguessing> is there a way to print a trace of the operations
<keepguessing> -v switch kinda thing
ananthakumaran has left #ruby [#ruby]
<lewix> hmm the Integer class does not allow the new constructor
one` has quit [Ping timeout: 264 seconds]
<havenwood> keepguessing: gem install debugger -V
justinmcp has joined #ruby
<havenwood> keepguessing: Prolly should update gem to 2.0.0 as well.
Myconix has quit [Quit: Server Error 482: The server has been shot by a 12-gauge, please contact an administrator]
<keepguessing> ok the gem update is erroing out with "gem update --system --verbose --debug Exception `NameError' at /usr/local/rvm/rubies/ruby-1.9.3-p392/lib/ruby/site_ruby/1.9.1/rubygems/command_manager.rb:177 - uninitialized constant Gem::Commands::UpdateCommand"
<Hanmac> lewix:
<Hanmac> >> p ObjectSpace.each_object(Class).select {|c| !c.respond_to?(:new) }
<eval-in> Hanmac => [Complex, Rational, RubyVM::Env, RubyVM, Binding, UnboundMethod, Method, Process::Status, MatchData, Bignum, Float, Fixnum, Integer, Symbol, Encoding, FalseClass, TrueClass, NilClass]
<eval-in> [Complex, Rationa ... (http://eval.in/11726)
<havenwood> keepguessing: Did you update RubyGems?: gem update --sytem
<havenwood> --system**
<Hanmac> what? eval-in has changed?? lol
<keepguessing> havenwood: thats the command which gave the error
<havenwood> keepguessing: oooh
<keepguessing> havenwood: look at the full snip i have posted
<keepguessing> :-)
timonv has quit [Remote host closed the connection]
<havenwood> keepguessing: Double-check that you have all the dependencies installed listed under: rvm requirements
<keepguessing> verifying requirements
<keepguessing> is there a way to set proxy settings?
<keepguessing> for gem update?
<havenwood> looks like people with zlib issues get a similar error
<lewix> havenwood: thank you
<havenwood> lewix: wrong 'h' :P
<lewix> Hanmac: thank you
mafolz has joined #ruby
quazimodo has quit [Ping timeout: 240 seconds]
<havenwood> keepguessing: Might try: rvm pkg install zlib
quazimodo has joined #ruby
<keepguessing> havenwood: http://pastebin.ca/2328321
<keepguessing> this is the output
<havenwood> keepguessing: But would need to recompile Ruby after. I'd recommend Ruby 2.0.0-p0, latest stable: rvm install ruby
<havenwood> keepguessing: Oh, btw, to update to latest rvm: rvm get latest
<havenwood> keepguessing: I use chruby, so my rvm is getting rusty!
pyrac has quit [Quit: pyrac]
<keepguessing> chruby is?
<keepguessing> is rusty good
<keepguessing> :P
<havenwood> keepguessing: https://github.com/postmodern/chruby
stkowski has quit [Quit: stkowski]
<postmodern> keepguessing, might want to ask in #rvm
<postmodern> keepguessing, also you can do install ruby manually if all else fails: https://github.com/postmodern/chruby/wiki/MRI
apeiros_ has joined #ruby
aqabiz has joined #ruby
ferdev has joined #ruby
arya has quit [Ping timeout: 245 seconds]
drale2k has quit [Quit: Leaving...]
drale2k has joined #ruby
Morkel has joined #ruby
brum has joined #ruby
arya has joined #ruby
chendo_ has quit [Ping timeout: 252 seconds]
tish has quit [Quit: Leaving.]
statarb3 has quit [Ping timeout: 248 seconds]
justinmcp has quit [Remote host closed the connection]
brum has quit [Ping timeout: 256 seconds]
arya has quit [Ping timeout: 256 seconds]
justinmcp has joined #ruby
ferdev has quit [Quit: ferdev]
chendo_ has joined #ruby
filipe_ has joined #ruby
arya has joined #ruby
seoaqua has joined #ruby
arietis has joined #ruby
<Hanmac> shevy what do you think about "rake-compiler" ?
mpfundstein has quit [Remote host closed the connection]
mengu has joined #ruby
<seoaqua> i've installed ruby2.0 and gem2.0 , but it keep warning ** Notice: The native BSON extension was not loaded. **
tvw has joined #ruby
<seoaqua> and i've installed bson_ext
keepguessing has quit [Ping timeout: 245 seconds]
yacks has quit [Ping timeout: 256 seconds]
razibog has joined #ruby
bluOxigen has joined #ruby
zigomir has joined #ruby
baroquebobcat has quit [Quit: baroquebobcat]
arietis has quit [Quit: Textual IRC Client: http://www.textualapp.com/]
spychalski has joined #ruby
quazimodo has quit [Ping timeout: 245 seconds]
becom33 has joined #ruby
timonv has joined #ruby
havenwood has quit [Remote host closed the connection]
ttt has joined #ruby
predator217 has quit [Ping timeout: 256 seconds]
<shevy> Hanmac I never really used rake
predator117 has joined #ruby
cha1tanya has quit [Ping timeout: 248 seconds]
ferdev has joined #ruby
spychalski has quit [Quit: Changing server]
ryanf has quit [Quit: leaving]
spychalski has joined #ruby
spychalski has quit [Client Quit]
yacks has joined #ruby
sayan has quit [Read error: Connection reset by peer]
TheFuzzball has joined #ruby
mduvall has quit []
<apeiros_> eval-in: >> "I hear you're fixed now"
predator117 has quit [Ping timeout: 245 seconds]
<apeiros_> >> "I hear you're fixed now"
<eval-in> apeiros_ => "I hear you're fixed now" (http://eval.in/11735)
<apeiros_> oy! much better
yacks has quit [Max SendQ exceeded]
djwonk has quit [Ping timeout: 248 seconds]
yacks has joined #ruby
cha1tanya has joined #ruby
spychalski has joined #ruby
yacks has quit [Max SendQ exceeded]
spychalski has quit [Changing host]
spychalski has joined #ruby
rdark has joined #ruby
yacks has joined #ruby
postmodern has quit [Quit: Leaving]
palyboy has quit []
a_a_g has quit [Quit: Leaving.]
maxmanders has joined #ruby
djwonk has joined #ruby
jprovazn has joined #ruby
takeru has joined #ruby
imami|afk is now known as banseljaj
dEPy has joined #ruby
soc42 has joined #ruby
ttt_ has joined #ruby
djwonk has quit [Ping timeout: 245 seconds]
lkba has quit [Ping timeout: 245 seconds]
apoch632 has joined #ruby
Ontolog_ has quit [Remote host closed the connection]
takeru has quit [Ping timeout: 260 seconds]
<apeiros_> thanks @ charliesome
rocket has joined #ruby
apoch632 has quit [Remote host closed the connection]
ttt has quit [Ping timeout: 276 seconds]
justinmcp has quit [Ping timeout: 245 seconds]
atyz has joined #ruby
djwonk has joined #ruby
pyrac has joined #ruby
wereHamster has quit [Changing host]
wereHamster has joined #ruby
Domon has joined #ruby
<charliesome> np
<charliesome> @ apeiros_
Quebert has quit [Ping timeout: 252 seconds]
drale2k has quit [Quit: Leaving...]
<becom33> I wondering if I can use tab to get a guess fill in a script like this http://pastebin.com/hk215MNy
<becom33> I was *
apod has joined #ruby
DrShoggoth has quit [Ping timeout: 248 seconds]
eval-in has quit [Remote host closed the connection]
eval-in has joined #ruby
adambeynon has joined #ruby
eval-in has quit [Remote host closed the connection]
imitkit has joined #ruby
kevinfagan has joined #ruby
kevinfagan has quit [Client Quit]
carraroj has quit [Quit: Konversation terminated!]
<apeiros_> becom33: you mean autocompletion?
<apeiros_> you can use Readline for that
eval-in has joined #ruby
noop_ has joined #ruby
becom33 has quit [Ping timeout: 256 seconds]
<ohcibi> is there a library/gem for directly manipulating values of nodes in xml files? like for editing version information before deploying
spychalski has quit [Quit: leaving]
spychalski has joined #ruby
spychalski has quit [Changing host]
spychalski has joined #ruby
<apeiros_> ohcibi: nokogiri
dsf has joined #ruby
<apeiros_> there are others, but don't really know those.
keepguessing has joined #ruby
becom33 has joined #ruby
noop has quit [Ping timeout: 245 seconds]
DrShoggoth has joined #ruby
<becom33> sorry I got disconnected did anyone replyed to my question ?
<ohcibi> apeiros_: is there a method to directly manipulate files in nokogiri? or do you mean, i should parse the file, modify the data and then write the to_s into the file?
<becom33> I was wondering if I can use tab to get a guess fill in a script like this http://pastebin.com/hk215MNy
noop_ has quit [Ping timeout: 264 seconds]
jacobw has joined #ruby
jimeh has joined #ruby
<marwinism> < apeiros_> becom33: you mean autocompletion?
<marwinism> < apeiros_> you can use Readline for that
cha1tanya has quit [Ping timeout: 248 seconds]
<becom33> marcgg_, yes
<apeiros_> ocnam: yes, those ~10 lines of boilerplate to read/write the file you'll have to add yourself
carraroj has joined #ruby
predator117 has joined #ruby
<becom33> apeiros_, I'm not sure how to use readline in thor
arturaz has joined #ruby
<apeiros_> becom33: the same way you'd use it outside of thor. but it's really not clear from your pastie, what you want to do.
yacks has quit [Quit: Leaving]
<apeiros_> you're not accepting any user-input, except ARGV
<apeiros_> and ARGV happens *before* ruby
<apeiros_> i.e., you'd need bash/zsh/whatevershell completions
yacks has joined #ruby
<becom33> apeiros_, well its just simple methods and argivement passing the problem is there will be huge list of commands
mpfundstein has joined #ruby
marr has joined #ruby
yacks has quit [Max SendQ exceeded]
yacks has joined #ruby
<becom33> apeiros_, yes I am . well when I do script.rb name Pino . it returns the out which is in name method with the Pino Argv
blueOxigen has joined #ruby
eval-in has quit [Remote host closed the connection]
eval-in has joined #ruby
yacks has quit [Max SendQ exceeded]
<apeiros_> becom33: as said, ARGV happens before ruby. you can't solve that in ruby.
yacks has joined #ruby
<becom33> oh
<becom33> true
ozgura has quit [Remote host closed the connection]
<becom33> can u point me to a way how I can use readline with thor ?
bluOxigen has quit [Ping timeout: 255 seconds]
<apeiros_> as said, the same way as without thor
<becom33> or could u give me a suggestion to do this without readline ?
arietis has joined #ruby
brum has joined #ruby
nomenkun has joined #ruby
mootpointer has joined #ruby
<apeiros_> "do this" = shell argv expansion? again, you can NOT do that in ruby.
utf1000 has quit [Ping timeout: 255 seconds]
<apeiros_> not because ruby was incapable to, but simply because this happens before ruby even starts.
banjara has quit [Ping timeout: 276 seconds]
peteyg has quit [Ping timeout: 252 seconds]
obs has joined #ruby
brum has quit [Ping timeout: 252 seconds]
banjara has joined #ruby
tish has joined #ruby
sonda has joined #ruby
ocnam has quit [Quit: Tan Tan!]
utf1000 has joined #ruby
kristofers has quit []
hoelzro|away is now known as hoelzro
kevinfagan has joined #ruby
mneorr has joined #ruby
peteyg has joined #ruby
wreckimnaked has joined #ruby
hashmal has joined #ruby
browndawg has left #ruby [#ruby]
elaptics`away is now known as elaptics
arya has quit [Ping timeout: 260 seconds]
beiter has joined #ruby
buscon has joined #ruby
ttt has joined #ruby
Domon has quit [Remote host closed the connection]
mneorr has quit [Remote host closed the connection]
ttt_ has quit [Ping timeout: 256 seconds]
spychalski has quit [Quit: leaving]
lkba has joined #ruby
arya has joined #ruby
spychalski has joined #ruby
endzyme has quit [Remote host closed the connection]
monkegjinni has joined #ruby
babinho_ has quit [Quit: leaving]
casheew has quit [Read error: Connection reset by peer]
casheew has joined #ruby
babinho has joined #ruby
Apes has joined #ruby
yewton has quit [Ping timeout: 276 seconds]
spychalski has quit [Client Quit]
spychalski has joined #ruby
EMPZ has joined #ruby
Emplitz has quit [Read error: Connection reset by peer]
endzyme has joined #ruby
Emplitz has joined #ruby
endzyme has quit [Remote host closed the connection]
Artheist has quit [Remote host closed the connection]
EMPZ has quit [Ping timeout: 252 seconds]
dsf has quit [Quit: This computer has gone to sleep]
mafolz has quit [Quit: mafolz]
mafolz has joined #ruby
66MAAA92Q has joined #ruby
jef_abraham has quit [Quit: jef_abraham]
ozgura has joined #ruby
jef_abraham has joined #ruby
jef_abraham has quit [Client Quit]
fire has joined #ruby
<becom33> apeiros_, help http://pastebin.com/sJRpD0cs
sonda has quit [Remote host closed the connection]
Reemo has joined #ruby
Vainoharhainen has joined #ruby
tish has quit [Quit: Leaving.]
noop has joined #ruby
<Reemo> Hey guys, i'm having troubles ending the program flow in a 'load'-ed ruby script without quitting the main script. I want to put some specific seeds for my ror application in other files so i can swap/require them more easily.
banister`sleep has quit [Remote host closed the connection]
ttt has quit [Ping timeout: 276 seconds]
cha1tanya has joined #ruby
sonda has joined #ruby
banister`sleep has joined #ruby
jef_abraham has joined #ruby
undert has quit [Ping timeout: 264 seconds]
kaen has quit [Ping timeout: 248 seconds]
noop has quit [Read error: Connection reset by peer]
chussenot has joined #ruby
* becom33 anyone ?
undert has joined #ruby
anderse has joined #ruby
tish has joined #ruby
slainer68 has joined #ruby
mafolz has quit [Quit: mafolz]
mafolz has joined #ruby
thebastl has joined #ruby
zorbyte has joined #ruby
mneorr has joined #ruby
t-mart has quit [Remote host closed the connection]
ttt has joined #ruby
<hoelzro> Reemo: what sort of troubles?
<Reemo> hoelzro: thanks for answering. I've tried to outline my problem here: https://gist.github.com/anonymous/d62b2e4cbe1074dabfc2
Beoran__ has joined #ruby
<Reemo> basically, i'd like to stop the exeuction of test2.rb without aborting the program test1.rb
<Reemo> return doesnt work (of course), exit terminates the whole script (also reasonable)
Skofo has joined #ruby
joshwines has quit [Ping timeout: 252 seconds]
<hoelzro> Reemo: ok, so you're loading them like this?
<hoelzro> require 'test1' ; require 'test2' ; require 'test3'
<hoelzro> ?
<Reemo> no, i'm running test1.rb
Beoran_ has quit [Ping timeout: 260 seconds]
mneorr has quit [Ping timeout: 276 seconds]
arietis has quit [Read error: Connection reset by peer]
arietis has joined #ruby
fabrice31 has joined #ruby
amcsi_work has quit [Read error: Operation timed out]
duosrx has joined #ruby
<Reemo> hoelzro: lets say i do. how can i exit the program in test2.rb without exiting the whole script?
mootpointer has quit [Quit: Computer has gone to sleep.]
<hoelzro> Reemo: well, first I must ask: why do you want/need to?
<Reemo> hoelzro: like i said, i have a huge db/seeds.rb file for my RoR project and i want to have the seeded models separated so i can swap/require them as i need to
mercwithamouth has quit [Ping timeout: 245 seconds]
carraroj has quit [Quit: Konversation terminated!]
Domon has joined #ruby
<hoelzro> right, and that's good, but why do you need to relinquish control from within a file like that?
yacks has quit [Read error: Connection reset by peer]
idkazuma has joined #ruby
rakl has quit [Quit: sleeping]
<Reemo> lets say a specific model A already exists, in that case i dont want to execute the rest of the script
<Reemo> right now its a huge if block and i'm curious about how to negate the if and just break before executing the model creation
<hoelzro> it's interesting that return doesn't work
yacks has joined #ruby
timmow has joined #ruby
<hoelzro> but one thing you *could* do is throw a symbol, and catch it in the file require'ing the other
<Reemo> hoelzro: i think its reasonable, given that load already has a return value.
<hoelzro> but you may want to ask on #rubyonrails, as they may have a better way of doing this
<MrZYX> you probably could just use require & return but I think I'd do something (never tried) main.rb: Callbacks = [], require 'foo',..., Callbacks.each {|cb| cb.call }, foo.rb: Callbacks << lambda do _code_goes_here_ end. Still a hack but at least the return makes a bit more sense inside a block
<MrZYX> and +1 for #rubyonrails
brum has joined #ruby
mark9 has joined #ruby
noop has joined #ruby
<Reemo> I see that it requires more effort to stick to the imperative style on top scope, but that gives me the option to just merge all seeds back into one file, because the 'way' the scripts work doesn't change
clooth has joined #ruby
ttt has quit [Ping timeout: 256 seconds]
<Reemo> And yeah, i'll ask in #rubyonrails, but i thought this was more a language issue, though i encountered it while using RoR...
arya_ has joined #ruby
rdark has quit [Quit: leaving]
rdark has joined #ruby
<Reemo> thanks for your help anyway :)
<becom33> apeiros_, help http://pastebin.com/sJRpD0cs
nari has quit [Ping timeout: 245 seconds]
* becom33 anyone ?
<XVirus> I'm new to Ruby ... In the docs; what does the "#" before some methods indicate ?
ttt has joined #ruby
Reemo has quit [Quit: Leaving]
arya has quit [Ping timeout: 260 seconds]
kaen has joined #ruby
brum has quit [Ping timeout: 248 seconds]
<lewix> XVirus: comments
gyre007 has joined #ruby
beiter has quit [Quit: beiter]
noop has quit [Ping timeout: 252 seconds]
<apeiros_> lewix, XVirus - in documentation, #foo denotes "instance method foo"
<tobiasvl> no
<tobiasvl> yes
<tobiasvl> :)
<XVirus> tobiasvl: Thanks :-)
<XVirus> very neat
<apeiros_> so you can differentiate between Time::at (class method), and Time#to_s (instance method)
<tobiasvl> thank apeiros_, he was quicker than me
<apeiros_> all methods are called by ., though
qhartman has quit [Ping timeout: 248 seconds]
<apeiros_> (i.e., Time.at(0) and Time.now.to_s)
matrixise has quit [Remote host closed the connection]
<XVirus> I see
<tobiasvl> yeah, it's just a convention. however, :: is syntax
lewix has quit [Remote host closed the connection]
<XVirus> but both :: and , can be used to access Class methods .. right ?
<apeiros_> XVirus: yes, but should not. it's antiquated and there are talks to remove it.
<XVirus> I see
chussenot has quit [Quit: chussenot]
* Hanmac wispers "class methods can be called with :: too"
sayan has joined #ruby
sayan has quit [Changing host]
sayan has joined #ruby
Rioji has joined #ruby
<becom33> help http://pastebin.com/sJRpD0cs thor with readline
<apeiros_> Hanmac: you're late to the party :-p
<apeiros_> Hanmac: also, *every* method can be called with ::
<apeiros_> >> "foo"::upcase
<eval-in> apeiros_ => "FOO" (http://eval.in/11753)
chussenot has joined #ruby
<Hanmac> if obj is a Module than obj::ABC can be used to access constants ...
<apeiros_> but again, just to be clear - don't use :: to invoke methods. it's antiquated.
amcsi_work has joined #ruby
<Hanmac> that is still true for singleton_class'es
qhartman has joined #ruby
ttt has quit [Ping timeout: 276 seconds]
quazimodo has joined #ruby
mikecmpbll has joined #ruby
<tobiasvl> :: resolves scope, no matter what that scope is
<Hanmac> "singleton_classes - now with more constants inside" :P
emergion has joined #ruby
<Hanmac> >> class << obj = Object.new; class Abc; end;end; obj.singleton_class::Abc
<eval-in> Hanmac => #<Class:0x40929470>::Abc (http://eval.in/11754)
ttt has joined #ruby
chichou has joined #ruby
pyrac has quit [Read error: Connection reset by peer]
pyrac_ has joined #ruby
AndChat| has joined #ruby
mneorr has joined #ruby
chichou has quit [Remote host closed the connection]
banjara has quit [Remote host closed the connection]
sayan has quit [Read error: Connection reset by peer]
ExxKA has joined #ruby
unflores has joined #ruby
banjara has joined #ruby
hoelzro has quit [Ping timeout: 245 seconds]
Banistergalaxy has quit [Ping timeout: 248 seconds]
nonotza has quit [Quit: nonotza]
noop has joined #ruby
banjara has quit [Client Quit]
DrForr_ is now known as DrForr
monkegjinni has quit [Remote host closed the connection]
<Hanmac> shevy it looks that oracle switched to "weekly" build with java :P
mneorr has quit [Ping timeout: 256 seconds]
Xeago has joined #ruby
sayan has joined #ruby
lkba has quit [Ping timeout: 248 seconds]
e-dard has left #ruby [#ruby]
banseljaj is now known as imami|afk
hoelzro has joined #ruby
arya_ has quit [Ping timeout: 250 seconds]
stonevil has quit [Quit: stonevil]
chichou has joined #ruby
lmx has joined #ruby
nomenkun_ has joined #ruby
swoosh has joined #ruby
swoosh has quit [Max SendQ exceeded]
atrocitas has quit [Remote host closed the connection]
swoosh has joined #ruby
quazimodo has quit [Ping timeout: 255 seconds]
vlad_starkov has joined #ruby
nomenkun has quit [Read error: Connection reset by peer]
Barbaren has joined #ruby
<Barbaren> Hello, I have an algo question: I have an array of integers, "A", I need to find a combination of K elements such that each element is at least N positions away from any other chosen element, while maximizing the sum of the K elements... any idea what kind of algorithm to use for this?
crackedmind has joined #ruby
arya has joined #ruby
<hemanth> TIL : Rescue blocks don't need to be tied to a 'begin' :\
uxp has quit [Ping timeout: 256 seconds]
quazimodo has joined #ruby
hbpoison has quit [Ping timeout: 264 seconds]
xiphiasx_ has quit [Ping timeout: 276 seconds]
musl has quit [Ping timeout: 255 seconds]
<apeiros_> hemanth: well, they must. but `def` is an implicit begin
franks2_ is now known as franks2
franks2 has quit [Changing host]
franks2 has joined #ruby
<Hanmac> or did he mean the rescue modifier?
<hemanth> "no blocks" resuse apeiros_
<hemanth> :)
<apeiros_> that wouldn't be a block
<apeiros_> yeah, inline rescue is heavily disadvised
JonnieCache has quit [Quit: leaving]
<hemanth> heh heh
<apeiros_> for the sole reason that you can't specify the exception to rescue.
matrixise has joined #ruby
<hemanth> rescuing the rescue
vlad_starkov has quit [Remote host closed the connection]
<apeiros_> sad, actually
bluehavana_ is now known as bluehavana
ttt has quit [Ping timeout: 276 seconds]
<hemanth> rescue => e # still sad!
<apeiros_> yes
nomenkun_ has quit [Read error: Connection reset by peer]
emergion has quit [Quit: Computer has gone to sleep.]
nomenkun has joined #ruby
luckyruby has quit [Remote host closed the connection]
Matip has quit [Quit: Leaving]
Vert has joined #ruby
jeremywrowe has quit [Ping timeout: 248 seconds]
jayne has quit [Ping timeout: 612 seconds]
jeremywrowe has joined #ruby
jeremywrowe has quit [Changing host]
jeremywrowe has joined #ruby
<hemanth> Hanmac, rescue modifier?
arya has quit [Ping timeout: 255 seconds]
<Hanmac> >> blablabla rescue "ups"
<eval-in> Hanmac => "ups" (http://eval.in/11764)
elico has joined #ruby
xiphiasx_ has joined #ruby
arya has joined #ruby
uxp has joined #ruby
<hemanth> same as inline Hanmac
ananthakumaran has joined #ruby
Spooner_ has joined #ruby
musl has joined #ruby
Spaceghost|cloud has quit [Ping timeout: 255 seconds]
nari has joined #ruby
tiktaz has joined #ruby
reset has joined #ruby
elico has quit [Quit: elico]
kaichanvong has quit [Ping timeout: 255 seconds]
<charliesome> the rescue modifier is really convenient
browndawg has joined #ruby
uxp has quit [Ping timeout: 245 seconds]
musl has quit [Ping timeout: 255 seconds]
xiphiasx_ has quit [Ping timeout: 276 seconds]
arya has quit [Ping timeout: 252 seconds]
brianpWins has quit [Quit: brianpWins]
karnowski has quit [Ping timeout: 255 seconds]
Takehiro has quit [Remote host closed the connection]
slainer68 has quit [Ping timeout: 248 seconds]
lolmaus has joined #ruby
Spaceghost|cloud has joined #ruby
slainer68 has joined #ruby
Es0teric has quit [Quit: Computer has gone to sleep.]
wobblini has joined #ruby
brum has joined #ruby
blaxter has joined #ruby
hbpoison has joined #ruby
greenarrow has quit [Quit: IRC is just multiplayer notepad]
greenarrow has joined #ruby
brum has quit [Ping timeout: 248 seconds]
wobblini has quit [Quit: Leaving.]
hbpoison has quit [Ping timeout: 264 seconds]
bubblehead has quit [Read error: Connection reset by peer]
Guest40384 has quit [Changing host]
Guest40384 has joined #ruby
Guest40384 is now known as z
bubblehead has joined #ruby
Guest43815 is now known as nkts
nkts has quit [Changing host]
nkts has joined #ruby
nkts is now known as marius
Rioji has quit [Remote host closed the connection]
uxp has joined #ruby
xiphiasx_ has joined #ruby
yewton has joined #ruby
musl has joined #ruby
AlSquirrel has left #ruby ["Quitte"]
fermion has joined #ruby
yewton has quit [Client Quit]
ozgura has quit [Read error: Connection reset by peer]
ozgura has joined #ruby
ozgura has quit [Read error: Connection reset by peer]
ozgura has joined #ruby
khismetix has joined #ruby
yewton has joined #ruby
pac1 has joined #ruby
joshwines has joined #ruby
gofs has joined #ruby
lmx has quit [Quit: WeeChat 0.3.9.2]
Domon has quit [Remote host closed the connection]
mneorr has joined #ruby
pavilionXP has quit [Read error: Connection reset by peer]
<gofs> New hack tools Cryptography, Encryption,Hack,windows,linux,games,cs,psybnc,mirc,scan,ssh , etc.. feel free to visit www.team3d.3xforum.ro
gofs has quit [Killed (idoru (Spam is off topic on freenode.))]
<dEPy> sems legit
<dEPy> seems*
xkx has quit [Ping timeout: 260 seconds]
<unflores> They better have candy in there
grn has quit [Ping timeout: 276 seconds]
pavilionXP has joined #ruby
mneorr has quit [Ping timeout: 250 seconds]
quazimodo has quit [Remote host closed the connection]
quazimodo has joined #ruby
lkba has joined #ruby
malkomalko has joined #ruby
khismetix has quit [Quit: Textual IRC Client: http://www.textualapp.com/]
khismetix has joined #ruby
TomJ has quit [Quit: TomJ]
realDAB has joined #ruby
hbpoison has joined #ruby
MrZYX is now known as MrZYX|off
emergion has joined #ruby
idkazuma has quit [Remote host closed the connection]
stonevil has joined #ruby
carraroj has joined #ruby
Mon_Ouie has joined #ruby
chussenot has quit [Quit: chussenot]
robbyoconnor has quit [Read error: Connection reset by peer]
stonevil has quit [Quit: stonevil]
robbyoconnor has joined #ruby
justsee has joined #ruby
justsee has quit [Changing host]
justsee has joined #ruby
nkr has joined #ruby
ttt has joined #ruby
kristofers has joined #ruby
robbyoconnor has quit [Ping timeout: 264 seconds]
drale2k has joined #ruby
66MAAA92Q has quit [Quit: This computer has gone to sleep]
JonnieCache has joined #ruby
a_a_g has joined #ruby
apeiros_ has quit [Remote host closed the connection]
lushious_ has joined #ruby
<dEPy> Is there a way I can open a class, and replace some methods body with my stuff and insert a call to an old method in between?
tiktaz has quit [Ping timeout: 256 seconds]
zigomir has quit [Quit: zigomir]
<dEPy> like in javascript: var old_method = Array.slice; Array.slice = function() { somestuff(); old_method(); morestuff(); }
kofno has quit [Read error: Connection reset by peer]
kofno has joined #ruby
lushious has quit [Ping timeout: 252 seconds]
<Hanmac> depy: look for alias
robbyoconnor has joined #ruby
Barbaren has quit [Ping timeout: 256 seconds]
Es0teric has joined #ruby
wf2f has quit []
wreckimnaked has quit [Ping timeout: 252 seconds]
Es0teric has quit [Client Quit]
slainer68 has quit [Remote host closed the connection]
sn0wb1rd has quit [Quit: sn0wb1rd]
AlSquire has joined #ruby
kofno_ has joined #ruby
kofno has quit [Ping timeout: 250 seconds]
khismetix has quit [Quit: Computer has gone to sleep.]
pyrac_ has quit [Read error: Connection reset by peer]
pyrac has joined #ruby
charliesome has quit [Quit: Textual IRC Client: www.textualapp.com]
JohnBat26 has quit [Ping timeout: 276 seconds]
monkegjinni has joined #ruby
Emplitz has quit [Quit: Leaving]
Mo0O has quit [Ping timeout: 264 seconds]
zos has joined #ruby
divout has quit [Remote host closed the connection]
Skylab has joined #ruby
jef_abraham has quit [Quit: jef_abraham]
keepguessing has quit [Ping timeout: 245 seconds]
a_a_g has quit [Quit: Leaving.]
jef_abraham has joined #ruby
nari has quit [Ping timeout: 240 seconds]
yshh has quit [Remote host closed the connection]
chussenot has joined #ruby
stnly has joined #ruby
mikecmpbll has quit [Quit: ["Textual IRC Client: www.textualapp.com"]]
arya has joined #ruby
emergion has quit [Quit: Computer has gone to sleep.]
justsee has quit [Quit: Linkinus - http://linkinus.com]
poikon has joined #ruby
mootpointer has joined #ruby
chichou has quit [Remote host closed the connection]
realDAB has quit [Ping timeout: 256 seconds]
Rioji has joined #ruby
krz has quit [Quit: krz]
whitedawg has joined #ruby
verysoftoiletppr has joined #ruby
malkomalko has quit [Remote host closed the connection]
monkegjinni has quit [Remote host closed the connection]
robbyoconnor has quit [Ping timeout: 245 seconds]
Rioji has quit [Ping timeout: 248 seconds]
prime has quit [Changing host]
prime has joined #ruby
arya has quit [Ping timeout: 255 seconds]
monkegjinni has joined #ruby
rdark has quit [Ping timeout: 250 seconds]
theRoUS has joined #ruby
theRoUS has quit [Changing host]
theRoUS has joined #ruby
rdark has joined #ruby
hamed_r has joined #ruby
arya has joined #ruby
zos has quit [Quit: leaving]
chrisramon has joined #ruby
workmad3 has joined #ruby
ozgura has quit [Read error: Connection reset by peer]
hogeo has quit [Remote host closed the connection]
MehLaptop has joined #ruby
carloslopes has joined #ruby
atyz has quit [Quit: Leaving...]
ozgura has joined #ruby
<Hanmac> shevy: good code does not need documentation ... hanmac code is only half that big, but does need twice that size again for documentation :P
arietis has quit [Quit: Computer has gone to sleep.]
monkegjinni has quit [Read error: Connection reset by peer]
mercwithamouth has joined #ruby
monkegjinni has joined #ruby
_bart has joined #ruby
arietis has joined #ruby
pskosinski has joined #ruby
yshh has joined #ruby
vlad_starkov has joined #ruby
samphippen has joined #ruby
soc42 has quit [Read error: Operation timed out]
Evixion has joined #ruby
Mon_Ouie has quit [Ping timeout: 276 seconds]
soc42 has joined #ruby
yshh has quit [Read error: Connection reset by peer]
NiteRain has quit [Ping timeout: 246 seconds]
yshh has joined #ruby
marius is now known as nkts
atyz has joined #ruby
nari has joined #ruby
grohne has joined #ruby
v0n has joined #ruby
pigoz has joined #ruby
<grohne> hi. can you point me to a technique for creating "cached properties" in a class? the desired result would be that the first and only the first access actually computes the desired value.
kaichanvong has joined #ruby
Dreamer3 has quit [Remote host closed the connection]
<grohne> my googling on that only turned up rails stuff
blueOxigen has quit [Ping timeout: 245 seconds]
slainer68 has joined #ruby
mneorr has joined #ruby
grayson has joined #ruby
becom33 has quit [Ping timeout: 255 seconds]
<dEPy> Any1 can help me with sidekiq? I'm getting duplicated jobs for sidekiq to execute ...
MehLaptop has quit [Remote host closed the connection]
swoosh has quit [Quit: Computer has gone to sleep.]
<hoelzro> grohne: you mean a lazy value?
<hoelzro> def value ; unless defined? @value ; @value = calculate_value ; end ; @value ; end
anderse has quit [Ping timeout: 252 seconds]
<grohne> hoelzro: yes. I think I meant precisely that. thanks.
adkron has joined #ruby
karnowski has joined #ruby
nomenkun has quit [Read error: Operation timed out]
dhruvasagar has quit [Ping timeout: 255 seconds]
arietis has quit [Quit: Computer has gone to sleep.]
dhruvasagar has joined #ruby
mercwithamouth has quit [Ping timeout: 256 seconds]
mneorr has quit [Ping timeout: 256 seconds]
nomenkun has joined #ruby
dustint has joined #ruby
<grohne> hoelzro: now searching for "lazy value" gives much better results. thanks!
<grohne> I guess "cached property" is a very pythonic term.
<Hanmac> grohne holezro what about: def value; @value ||= calculate_value;end
<grohne> Hanmac: yes, I just figured that on stackoverflow. :)
anderse has joined #ruby
<hoelzro> Hanmac: nice
<Hanmac> but it may not work on boolean values ...
MrZYX|off is now known as MrZYX
nonotza has joined #ruby
a_a_g has joined #ruby
wreckimnaked has joined #ruby
moos3 has joined #ruby
cephalopod has quit [Ping timeout: 240 seconds]
arya has quit [Ping timeout: 256 seconds]
adkron has quit [Ping timeout: 252 seconds]
BizarreCake has joined #ruby
slainer6_ has joined #ruby
justinmcp has joined #ruby
zigomir has joined #ruby
obs has quit [Quit: Konversation terminated!]
Pandaen has joined #ruby
slainer68 has quit [Ping timeout: 248 seconds]
arya has joined #ruby
khismetix has joined #ruby
seoaqua has quit [Quit: 离开]
khismetix has quit [Client Quit]
dhruvasagar has quit [Ping timeout: 264 seconds]
vlad_starkov has quit [Remote host closed the connection]
Targen has quit [Ping timeout: 240 seconds]
statarb3 has joined #ruby
statarb3 has quit [Changing host]
statarb3 has joined #ruby
carraroj has quit [Ping timeout: 245 seconds]
gregorg has joined #ruby
gregorg has quit [Changing host]
gregorg has joined #ruby
vlad_starkov has joined #ruby
v0n has quit [Read error: Operation timed out]
ExxKA has quit [Quit: This computer has gone to sleep]
aqabiz has quit [Quit: aqabiz]
vagmi has quit [Quit: vagmi]
chrisramon has quit [Quit: chrisramon]
chichou has joined #ruby
vlad_starkov has quit [Remote host closed the connection]
vlad_starkov has joined #ruby
tk_ has joined #ruby
krz has joined #ruby
brum has joined #ruby
anderse has quit [Ping timeout: 264 seconds]
arietis has joined #ruby
<mantovani> hi good morning
Davey has joined #ruby
dblack__ has joined #ruby
gyre008 has joined #ruby
<hoelzro> ahoy
dblack__ is now known as realDAB
<realDAB> hi
anderse has joined #ruby
Barbaren has joined #ruby
<hoelzro> ahoy
gyre007 has quit [Ping timeout: 264 seconds]
idkazuma has joined #ruby
robustus has quit [Ping timeout: 248 seconds]
gyre008 has quit [Remote host closed the connection]
cousine has joined #ruby
robustus has joined #ruby
Rioji has joined #ruby
Barbaren has quit [Ping timeout: 252 seconds]
apeiros_ has joined #ruby
cousine has quit [Remote host closed the connection]
brum has quit [Remote host closed the connection]
nfk has joined #ruby
monkegjinni has quit [Remote host closed the connection]
jef_abraham has quit [Quit: jef_abraham]
jef_abraham has joined #ruby
jef_abraham has quit [Client Quit]
mootpointer has quit [Quit: Computer has gone to sleep.]
rdark has quit [Ping timeout: 260 seconds]
sandGorgon has quit [Read error: Connection reset by peer]
sandGorgon has joined #ruby
rdark has joined #ruby
clocKwize has joined #ruby
S1kx has joined #ruby
S1kx has joined #ruby
m4rtijn has joined #ruby
<m4rtijn> hi
mark_locklear has joined #ruby
<hoelzro> ahoy
<hoelzro> I'm seeing a pattern here =)
imitkit has quit [Quit: imitkit]
rippa has joined #ruby
invisime has joined #ruby
poikon has quit [Remote host closed the connection]
soc42 has quit [Remote host closed the connection]
geekbri has joined #ruby
agjacome has joined #ruby
<Hanmac> someday oracle will publish an update that fixes all known errors in java ... and does not leave something open ... (with purpose!)
pyrac has quit [Read error: Connection reset by peer]
pyrac_ has joined #ruby
timmow has quit [Remote host closed the connection]
timmow has joined #ruby
crodas has joined #ruby
djwonk has quit []
Asher has quit [Quit: Leaving.]
Asher has joined #ruby
chipotle_ has joined #ruby
Skylab has quit [Quit: Skylab]
idkazuma has quit [Remote host closed the connection]
clooth has quit [Quit: clooth]
arietis has quit [Quit: Textual IRC Client: http://www.textualapp.com/]
mikecmpbll has joined #ruby
aqabiz has joined #ruby
arya has quit [Ping timeout: 264 seconds]
clooth has joined #ruby
dsf has joined #ruby
dsf has quit [Client Quit]
m4rtijn has quit [Quit: Verlassend]
mneorr has joined #ruby
arya has joined #ruby
<apeiros_> Hanmac: you mean the update is a "pull java" update?
<Hanmac> apeiros_ the last times, everytime oracle does an new java updates it shows that they "forgot" some bugs to fix that they allready know ... and one week later they does an java update again ...
girija_ has quit [Ping timeout: 248 seconds]
mneorr has quit [Ping timeout: 276 seconds]
vlad_starkov has quit [Ping timeout: 264 seconds]
lele has quit [Quit: Coyote finally caught me]
kevinfagan has quit [Quit: Leaving...]
jerius has joined #ruby
thebastl has quit [Read error: Operation timed out]
jgarvey has joined #ruby
enroxorz has joined #ruby
atyz has quit [Quit: Leaving...]
monkegjinni has joined #ruby
monkegjinni has quit [Remote host closed the connection]
horrror has joined #ruby
<horrror> Hi, is there an option to check if Object contains a certain value without knowing the exact property? e.g. Object.include? 'blahblah'
<apeiros_> only to a limited extent
tommyvyo has joined #ruby
<horrror> what do u mean?
<apeiros_> you can use Object#instance_variables and #instance_variable_get to search the ivars of an object
tommyvyo has quit [Client Quit]
<apeiros_> but if it's a native object, that won't do (things like Array, or Hash)
johnnygoodmancpa has joined #ruby
<MrZYX> I guess the bigger question is why you need to do that
<apeiros_> indeed
monkegjinni has joined #ruby
rippa has quit [Ping timeout: 240 seconds]
chipotle_ has quit [Quit: cya]
<horrror> I have a hash of Objects. Then I want to check if an Object is inside a hash but because the object is being re-created by another method I guess comparing the object (even if values are equal) will return false anyway because of the object_id
<apeiros_> "I guess"
<apeiros_> stop guessing.
<apeiros_> test it.
<horrror> lol
kofno_ has quit [Remote host closed the connection]
sailias has joined #ruby
<horrror> I guess == I tested it and it doesn't work
<MrZYX> also you have no control over the objects and they have mixed subtypes?
<apeiros_> then why on earth would you say "I guess it will return false" when you *know* it does?
<apeiros_> it's not nice to mislead…
steeve has joined #ruby
<horrror> stop overreacting
<apeiros_> I guess I'll just stop caring.
<dcope> Iss there a way to negate a ruby regex? don't see it.
chrishough has joined #ruby
<horrror> MrZYX: no i don't
justinmcp has quit [Remote host closed the connection]
<apeiros_> dcope: Regexp#!~
johnnygoodmancpa has left #ruby [#ruby]
vlad_starkov has joined #ruby
clocKwize has quit [Quit: clocKwize]
monkegjinni has quit [Remote host closed the connection]
<MrZYX> where do you get these objects then?
<horrror> other app
iamjarvo has joined #ruby
lolmaus has quit []
<horrror> *i guess* i can rewrite the hash and save a unique ID of an object and then compare it with my other Objects.
ananthakumaran has quit [Quit: Leaving.]
<MrZYX> hm if you really care about the internal state and don't want to code a hack with instance_variables and instance_variable_get I'd ask the maintainers of "other app" to implement == to those "objects"
<MrZYX> which would be the proper solution
hoelzro is now known as hoelzro|away
<horrror> how would u implement that?
<MrZYX> where you define the class, just overwrite Object#==
adkron has joined #ruby
adkron_ has joined #ruby
solidoodlesuppor has joined #ruby
<horrror> k
<horrror> thanks MrZYX
generalissimo has joined #ruby
<MrZYX> just guard the method with return false unless other.is_a? self.class and then compare the state of other with the one of self
tommyvyo has joined #ruby
reset has quit [Ping timeout: 252 seconds]
atyz has joined #ruby
NiteRain has joined #ruby
<horrror> also another question. i have hash[object] = [other_value] , is there a way to access the object that is placed in the key through the hash?
interactionjaxsn has joined #ruby
<tobiasvl> through the hash?
uris has joined #ruby
<tobiasvl> do you mean through the value (other_value)?
<horrror> the object that is in the key store
Skofo has quit [Quit: Leaving]
<MrZYX> you can get all keys with Hash#keys if that's what you want
<andynu> hash.keys is an array of those objects. you could use hash.each_pair to iterate to find the particular key that matched a value.
<tobiasvl> or you can use Enumerable#select to iterate and match on values/keys
whitedawg has quit [Quit: Leaving.]
<tobiasvl> or hash.index?
<tobiasvl> or hash.invert?
hamed_r has quit [Quit: Leaving]
quazimodo has quit [Ping timeout: 252 seconds]
<Hanmac> tobiasvl hash.index is deprecated ... use hash.key
<horrror> thanks hash.keys was what i was looking for
ExxKA has joined #ruby
chrishough has quit [Quit: chrishough]
idkazuma has joined #ruby
kevinfagan has joined #ruby
<Hanmac> horrror please use each_key.select or something like that, ... it prevents you from generating a big array
tomzx_mac has joined #ruby
sukima has joined #ruby
<horrror> k
<sukima> I heard that when you augment an object in ruby you actually create a duplicate (internally) err. if you add a method to an object already defined internally your making a new object. is this correct?
tcstar has quit [Read error: Connection reset by peer]
Goles has joined #ruby
rdo has joined #ruby
<rdo> hi all, is it possible to call kinit from within ruby?
quazimodo has joined #ruby
jlast has joined #ruby
jprovazn has quit [Quit: Leaving]
browndawg has left #ruby [#ruby]
Mattix has joined #ruby
ffranz has joined #ruby
<AndChat|> Sukima no, where did you hear all that?
<Hanmac> sukima ... i dont think its allways true ... some internal objects are maybe referred ... but its not true for all objects
mark9 has left #ruby [#ruby]
adkron__ has joined #ruby
jef_abraham has joined #ruby
quazimodo has quit [Ping timeout: 256 seconds]
<Hanmac> for sample RArray and RString does have a "shared" attribute ... but i dont find where its used
takeru has joined #ruby
jlast has quit [Ping timeout: 252 seconds]
ttt has quit [Remote host closed the connection]
<apeiros_> Hanmac: you mean copy-on-write?
<apeiros_> should be used on stuff like slicing and dup
vlad_starkov has quit [Ping timeout: 264 seconds]
<whitequark> Hanmac: err
EPIK has quit [Ping timeout: 240 seconds]
<whitequark> each_key.select doesn't create a big array indeed
Pandaen has quit [Remote host closed the connection]
<whitequark> but it does create an Enumerator, which includes a Fiber context, which is kinda huge
<whitequark> 4K stack at least
<apeiros_> ah, Enumerators use Fibers now?
LBRapid has joined #ruby
<whitequark> apeiros_: they always did?
<apeiros_> where "now" == "since 1.9"
<apeiros_> not really, no :) 1.8 didn't have fibers
<whitequark> that's a backport
<whitequark> but ok
* Hanmac looks if he has a book "one million little Fiber objects" :P
anonymuse has joined #ruby
<apeiros_> um, yeah, the backport likely didn't exist before 1.9 existed, and ruby had enumerators before 1.9 :-p
<apeiros_> but the "now" was rather a stretch, since 1.9 is old already
DaltonUS has joined #ruby
<whitequark> apeiros_: iirc the main reason for making 1.8.7 was backporting enumerators from 1.9
DaltonUS has quit [Client Quit]
<apeiros_> o0
<whitequark> the changelogs will tell
<apeiros_> I don't think 1.8 Enumerator was that bad…
dorei has joined #ruby
<apeiros_> I used it quite a bit, mostly through enum_for
<whitequark> apeiros_: I guess there wasn't an Enumerator in 1.8.6 ?
mgates_ has joined #ruby
<apeiros_> yes, there was
kofno has joined #ruby
<apeiros_> I think it was located differently. iirc it was Enumerable::Enumerator
<apeiros_> now it's toplevel, no? ::Enumerator in 1.9?
jtharris has joined #ruby
wmoxam has joined #ruby
mgates_ has quit [Client Quit]
takeru has quit [Ping timeout: 276 seconds]
<sukima> AndChat|: I heard it on an episode of JavascriptJabber. They were comparing JS and ruby
<whitequark> I don't see anything
<apeiros_> haha, don't rely on docs for 1.8 anything :D
<whitequark> also no enum_for http://ruby-doc.org/core-1.8.6/Kernel.html
<apeiros_> lets see whether rvm has 1.8.6
adamjleonard has joined #ruby
<apeiros_> god, 5KB/s, when are we? 1995?
<Hanmac> ruby1.8.6 was ugly and has a dump C-API ... the C-API of 1.8.7 was WAY better
freeayu has quit [Remote host closed the connection]
huoxito has joined #ruby
<whitequark> ah it was in stdlib
<apeiros_> ah, yes
<apeiros_> you had to require it
<whitequark> not sure if I really want to know how did it work or not
<whitequark> probably no
<Hanmac> .... why do we need to talk about 1.8.6? that makes matz sad
<apeiros_> callcc! :D
timonv has quit [Read error: Connection reset by peer]
<whitequark> who needs callcc
<apeiros_> I think at one point in time, Enumerator did indeed use callcc
<whitequark> even Scheme devs want to abandon it
<apeiros_> but I think not in 1.8 anymore
<whitequark> the ones who basically introduced it. they say it isn't structured enough (duh)
<apeiros_> lol rvm: "Please be aware that you just installed a ruby that requires 4 patches just to be compiled on up to date linux system."
timonv has joined #ruby
<workmad3> apeiros_: installing 1.8.6? :)
codecop has quit [Remote host closed the connection]
<apeiros_> just done that, yes
<apeiros_> oh the nostalgia :D
<apeiros_> 1.8.6 :003 > [1,2,3].each
<apeiros_> LocalJumpError: no block given
<apeiros_> but, behold! The powers of enum_for!
<apeiros_> 1.8.6 :002 > [1,2,3].enum_for(:each)
<apeiros_> => #<Enumerable::Enumerator:0x10a49c630>
<whitequark> I wonder...
<whitequark> [].enum_for(:enum_for)
<whitequark> >> [].enum_for(:enum_for)
<eval-in> whitequark => #<Enumerator: []:enum_for> (http://eval.in/11791)
<whitequark> >> [].enum_for(:enum_for).first
<eval-in> whitequark => nil (http://eval.in/11792)
jef_abraham has quit [Quit: jef_abraham]
<JonnieCache> lame
<JonnieCache> i was hoping the universe would collapse or something
* whitequark glances at the channel name
<apeiros_> JonnieCache: the universe has collapsed long ago
puppeh has quit [Read error: Connection reset by peer]
joofsh has joined #ruby
<apeiros_> you're just living in an ever shrinking warp bubble
<JonnieCache> did you hear that they recently confirmed the vacuum is metastable
alup_ has quit [Read error: Connection reset by peer]
<JonnieCache> meaning the universe could actually collapse at any moment
alup_ has joined #ruby
alup_ has quit [Read error: Connection reset by peer]
puppeh has joined #ruby
alup_ has joined #ruby
<Hanmac> apeiros_ i recent found a method in ruby2 that returns NOT an enumerator for an each method ...
<horrror> how to can i run a script through pry and when it finishes it won't exit the session? means i'll be able to code through pry
Squarepy has joined #ruby
<whitequark> >> RUBY_VERSION
<eval-in> whitequark => "2.0.0" (http://eval.in/11793)
nomenkun has quit [Read error: Connection reset by peer]
<whitequark> >> [].each
<eval-in> whitequark => #<Enumerator: []:each> (http://eval.in/11794)
<whitequark> Hanmac: ^ ?
<JonnieCache> horrror: `pry -r scriptname.rb` i think
<JonnieCache> something like that
nomenkun has joined #ruby
mark_locklear has quit [Quit: Leaving]
nOStahl has joined #ruby
puppeh has quit [Read error: Connection reset by peer]
<Hanmac> >> Gem::Specification::each_default
<eval-in> Hanmac => /execpad/interpreters/ruby-2.0.0-p0/lib/ruby/2.0.0/rubygems/specification.rb:631:in `block (2 levels) in each_spec': no block given (yield) (LocalJumpError)
<eval-in> from /execpad/interpreters/ruby-2.0.0-p0/li ... (http://eval.in/11795)
puppeh has joined #ruby
<Hanmac> >> Gem::Specification::each_normal
<eval-in> Hanmac => (http://eval.in/11796)
<whitequark> Hanmac: that's just Gem::Specification being quirky
<whitequark> for a ruby method to be like that, it should invoke enum_for manually
joofsh has quit [Remote host closed the connection]
<whitequark> >> def each; yield; end; each
<eval-in> whitequark => /tmp/execpad-33ae8feea99a/source-33ae8feea99a:2:in `each': no block given (yield) (LocalJumpError)
<eval-in> from /tmp/execpad-33ae8feea99a/source-33ae8feea99a:2:in `<main>' (http://eval.in/11797)
_nitti has joined #ruby
<whitequark> >> def each(&block); return enum_for(:each) unless block; yield 1; end; each.first
<eval-in> whitequark => 1 (http://eval.in/11798)
<Hanmac> hm i prefer "to_enum"
ph^ has quit [Remote host closed the connection]
<dEPy> What's Module.send ?
<dEPy> particulary this: 10 The Big Bang Theory - Invite Them In
<dEPy> ups
adam12 has quit [Ping timeout: 240 seconds]
<dEPy> this: Module.send(:include, Sidekiq::Extensions::Klass)
joshman_ has quit [Quit: Computer has gone to sleep.]
<whitequark> dEPy: same as class Module; include Sidekiq::Extensions::Klass; end
sukima has left #ruby [#ruby]
<JonnieCache> dEPy: send just calls a method on an object
mmitchell has joined #ruby
<Hanmac> dEPy because include is private method you need send to do the dirty job :P
<JonnieCache> its probably being used there to call a private method
adam12 has joined #ruby
chichou has quit [Remote host closed the connection]
<dEPy> oh, I thought so but wasn't sure :)
elico has joined #ruby
<dEPy> so basically everything that's private you can just call with send?
chichou has joined #ruby
mneorr has joined #ruby
<apeiros_> yes. which means private/protected is more or less just informal
jonahR has joined #ruby
undert has quit [Quit: ZNC - http://znc.in]
<whitequark> apeiros_: I wish there was send and private_send instead of send and public_send :/
_maes_ has quit [Quit: Miranda IM! Smaller, Faster, Easier. http://miranda-im.org]
<dEPy> btw what would be "Module" in this case? cant find definition anywhere
<whitequark> this is really against the spirit of OO
<apeiros_> whitequark: same
<Hanmac> dEPy with enough evil energy you could change EVERYTHING in ruby :P ... even the internal C structs :P
<apeiros_> or send & send!, which was originally discussed
<dEPy> I always had love/hate relationship with ruby, this just confirms it :)
chichouw has joined #ruby
fire has quit [Quit: WeeChat 0.4.0]
<whitequark> apeiros_: yeah, send! is nice
chichou has quit [Read error: Connection reset by peer]
<apeiros_> yeah, but __send!__ or __send__! isn't :D
tdelam has joined #ruby
<whitequark> __send__! is fine
<apeiros_> I still want a module "Introspection"
<whitequark> apeiros_: that's in the works AFAIK
<apeiros_> which is immutable and provides things like ivar_get/set/send etc.
<whitequark> FSVO "in the works"
<apeiros_> and can also work on BasicObject
<Hanmac> i wish there where a __class__ method too
<apeiros_> FSVO?
<whitequark> for some value of
<apeiros_> ah
<apeiros_> thx
<apeiros_> if only I'd finally resolve my issues with the syntax of my language… then I could finally move back to implementing again :-/
interactionjaxsn has quit [Remote host closed the connection]
DasIch has joined #ruby
<dEPy> am
mneorr has quit [Ping timeout: 276 seconds]
<dEPy> what's the difference between simply making a class and inheriting from BasicObject?
<DasIch> what would be the best approach to install ruby 1.9 on os x at the moment?
<Hanmac> DasIch format and install a linux?
<DasIch> Hanmac: not happening
<JonnieCache> DasIch: rbenv and ruby-build imo
<dEPy> DasIch +1
<apeiros_> DasIch: I enjoy rvm
bubblehead has quit [Remote host closed the connection]
<apeiros_> never tried others, though
<DasIch> so there is no community consensus?
<dEPy> rbenv is cool
Takehiro has joined #ruby
<dEPy> and easy to install
<apeiros_> DasIch: community consensus is, that those tools are all relatively good
adkron_ has quit [Ping timeout: 260 seconds]
adkron has quit [Ping timeout: 260 seconds]
quazimodo has joined #ruby
<JonnieCache> the ruby community has a fraught relationship with the notion of consensus
v0n has joined #ruby
Spooner_ has quit [Remote host closed the connection]
<realDAB> gogiel: that thing you pasted last night was indeed very odd. have you had any responses about it?
<wmoxam> DasIch: RVM is basically the same as Rbenv + some plugins
tish has quit [Quit: Leaving.]
<wmoxam> DasIch: either approach works
<wmoxam> DasIch: basically RVM is monolithic while Rbenv is modular
jean-louis has joined #ruby
predator117 has quit [Ping timeout: 276 seconds]
predator117 has joined #ruby
pepper_chico has joined #ruby
pepper_chico has quit [Max SendQ exceeded]
<JonnieCache> DasIch: rbenv and ruby build are part of the same thing (ruby-build is a plugin for rbenv) so its basically a choice between rvm and rbenv
Adys has quit [Ping timeout: 245 seconds]
cha1tanya has quit [Quit: Leaving]
<JonnieCache> i advise rbenv but everyone has their own opinion
pepper_chico has joined #ruby
<apeiros_> ze realDAB!
<dEPy> If you define a new class doesn't that class inherit from BasicObject? If yes when this code: class Proxy < BasicObject ?
<apeiros_> haha JonnieCache, nice (fraught relationship)
<apeiros_> dEPy: no, it inherits from Object
skattyadz has joined #ruby
<apeiros_> and that's why `class Proxy < BasicObject`, to explicitly inherit from BasicObject instead of the default, which is Object
NiteRain has quit [Ping timeout: 246 seconds]
<dEPy> oh, so Proxy.new then inheritsfrom BasicObject because it's an instance
pigoz has quit [Ping timeout: 252 seconds]
<apeiros_> o0
neurone-1337 has quit [Ping timeout: 252 seconds]
<dEPy> but, what are the pros of this?
a_a_g has quit [Quit: Leaving.]
<dEPy> not including kernel crap?
end_guy_ is now known as end_guy
<apeiros_> BasicObject has less methods, making collisions less likely
<DasIch> so from what I have read so far rvm seems to be somewhat more "invasive" than rbenv does that seem like a fair statement?
<JonnieCache> DasIch: yeah pretty much
<dEPy> hm, seems logical yes
hoelzro|away is now known as hoelzro
beiter has joined #ruby
<DasIch> hm, seems like I'd prefer rbenv then
breakingthings has joined #ruby
qubit has quit [Ping timeout: 250 seconds]
op84 has joined #ruby
phantasm66 has joined #ruby
phantasm66 has joined #ruby
phantasm66 has quit [Changing host]
enroxorz is now known as enroxorz-work
pigoz has joined #ruby
vlad_starkov has joined #ruby
krawchyk has joined #ruby
tubbo has joined #ruby
<op84> hi - how do i catch an error of an exectued shell command like `mount blabla` lets say already mounted?
stopbit has joined #ruby
stnly has quit [Ping timeout: 240 seconds]
mattbl has joined #ruby
oposomme has joined #ruby
stnly has joined #ruby
<whitequark> op84: try $?
<whitequark> $?.success?
dsf_ has joined #ruby
tcstar has joined #ruby
<shevy> Hanmac well, when I look at code from other people, I often have no idea what they want to do and why
apod has quit []
<shevy> Hanmac so helpful documentation is useful
<Hanmac> shevy yeah sometimes the "other people" are yourselfs from the past :D
<shevy> Hanmac about size, yeah, it makes files bigger and larger and thus comes at a cost. I think the best way to document is to be as terse and as minimal as possible, while still being as useful as possible
<shevy> Hanmac yeah that too, years later when you wonder what you did back then
puppeh has quit [Remote host closed the connection]
<shevy> Hanmac that's why working examples are important!
<tobiasvl> op84: if you just need to know if it worked or not, system returns true/false. but yeah, the exact return value is found in $?
<shevy> I could not get the shoes examples to work at all :\
<op84> thanks whitequark tobiasvl
puppeh has joined #ruby
mikepack has joined #ruby
volume has joined #ruby
vlad_starkov has quit [Remote host closed the connection]
segv- has joined #ruby
<Hanmac> shevy i still dont know how many different shoes gems exist and why :P
<shevy> I dont want to abandon bluefish 1.0.7 :(
joshman_ has joined #ruby
newUser1234 has joined #ruby
nari has quit [Ping timeout: 255 seconds]
pdamer has joined #ruby
<shevy> I guess they wanted to restructure the project Hanmac
<dEPy> What's a good read on ruby's class/object system?
tomzx_mac has quit [Ping timeout: 276 seconds]
tish has joined #ruby
Squarepy has quit [Changing host]
Squarepy has joined #ruby
<Hanmac> dEPy: http://ruby-doc.org/core-2.0/Class.html there is a diagramm on this page ... try to understand it
astegman has joined #ruby
tylersmith has joined #ruby
tish1 has joined #ruby
__Big0__ has joined #ruby
segv- has left #ruby [#ruby]
puppeh has quit [Ping timeout: 276 seconds]
tiktaz has joined #ruby
tiktaz has quit [Client Quit]
pyrac_ has quit [Read error: Connection reset by peer]
pyrac has joined #ruby
aqabiz has quit [Read error: Connection reset by peer]
<Hanmac> shevy i made commits: https://github.com/Hanmac/rwx/commits/master
tish has quit [Ping timeout: 255 seconds]
aqabiz has joined #ruby
kofno has quit [Read error: Connection reset by peer]
kofno has joined #ruby
mattbl has quit [Quit: This computer has gone to sleep]
neurone-1337 has joined #ruby
tk_ has quit [Quit: ばいばい]
noop has quit [Remote host closed the connection]
carloslopes has quit [Remote host closed the connection]
Adys has joined #ruby
splud has quit [Quit: splud]
Neomex has joined #ruby
Neomex has quit [Client Quit]
whitenoise has joined #ruby
<whitequark> why the hell pry munges all backtrace lines except one.
SolidResolve has quit [Ping timeout: 250 seconds]
apod has joined #ruby
<whitequark> annoying
d2dchat has quit [Remote host closed the connection]
SCommette has joined #ruby
<Hanmac> shevy for you the tests dir may be interesting (okay when its finish it will be merged with the samples dir)
jamesfung14 has joined #ruby
interactionjaxsn has joined #ruby
pdamer has quit [Quit: pdamer]
akashj87 has joined #ruby
brianstorti has joined #ruby
enebo has joined #ruby
tcstar has quit [Ping timeout: 264 seconds]
io_syl has joined #ruby
aqabiz has quit [Quit: aqabiz]
<banister`sleep> whitequark: what do u mean?
mibitzi has quit [Ping timeout: 245 seconds]
nomenkun has quit [Read error: Connection reset by peer]
rippa has joined #ruby
<banister`sleep> whitequark: let me show you something
ckrailo has quit [Quit: Computer has gone to sleep.]
nomenkun has joined #ruby
sandGorgon has quit [Ping timeout: 252 seconds]
RonScagz has joined #ruby
theRoUS has quit [Read error: Operation timed out]
pen has joined #ruby
io_syl has quit [Client Quit]
<banister`sleep> whitequark: http://showterm.io/e40725f5d25a82d0ee1de
monkegjinni has joined #ruby
<banister`sleep> whitequark: i'll show u something even cooler with pry-rescue, one sec
mattbl has joined #ruby
Virunga has joined #ruby
fire has joined #ruby
b0oh has joined #ruby
nonotza has quit [Quit: nonotza]
<banister`sleep> whitequark: http://showterm.io/b53054625bdd5cd9c2bdd
Kuifje has joined #ruby
Kuifje has quit [Changing host]
Kuifje has joined #ruby
tcstar has joined #ruby
pepper_chico has quit [Quit: Computer has gone to sleep.]
ttt has joined #ruby
DasIch has quit [Remote host closed the connection]
splud has joined #ruby
jlast has joined #ruby
bean__ has joined #ruby
ttt has quit [Ping timeout: 256 seconds]
_maes_ has joined #ruby
pdamer has joined #ruby
mikecmpbll has quit [Quit: ["Textual IRC Client: www.textualapp.com"]]
angusiguess has quit [Remote host closed the connection]
angusiguess has joined #ruby
braoru has quit [Remote host closed the connection]
mneorr has joined #ruby
ExxKA has quit [Quit: This computer has gone to sleep]
fire is now known as nerd
drumond19 has joined #ruby
Hanmac has quit [Ping timeout: 240 seconds]
<banister`sleep> whitequark: the reason we only display one line by deafult is because in 90% of cases (in my experience anyway) most exceptions are just simple/stupid things you can identify right away, and showing additional lines just creates noise. We also make it easier enough to show more (via wtf? and cat --ex) if you need more
browndawg has joined #ruby
<banister`sleep> but if you want to display more by default, you can change your exception handler with: Pry.config.exception_handler = proc { |ex| ... }
atyz has quit [Quit: Linkinus - http://linkinus.com]
girija_ has joined #ruby
mneorr has quit [Ping timeout: 245 seconds]
Neomex has joined #ruby
Neomex has quit [Client Quit]
ephemerian has joined #ruby
d2dchat has joined #ruby
shadowshell has joined #ruby
skum has joined #ruby
brianstorti has quit [Quit: Textual IRC Client: http://www.textualapp.com/]
chrishunt has quit [Quit: ZzZzZz...]
generalissimo has quit [Remote host closed the connection]
chrishunt has joined #ruby
pen has quit [Remote host closed the connection]
Jrz has joined #ruby
tagrudev has quit [Quit: Me = Awesome]
pen has joined #ruby
adamjleonard has quit [Read error: Connection reset by peer]
Vainoharhainen has quit [Ping timeout: 245 seconds]
alex__c2022 has joined #ruby
pyrac has quit [Ping timeout: 264 seconds]
wyhaines has joined #ruby
b0oh has left #ruby [#ruby]
aganov has quit [Remote host closed the connection]
joofsh has joined #ruby
a_a_g has joined #ruby
sie has quit [Read error: Connection reset by peer]
sie has joined #ruby
geggam_wk has joined #ruby
aqabiz has joined #ruby
Skylab has joined #ruby
bluOxigen has joined #ruby
nateberkopec has joined #ruby
sambio has joined #ruby
<horrror> i have hash of hashes and i want to find duplicates in the inner hash's keys and change their value accordingly
<bean__> okay, so loop over your hash
<horrror> yea but how will i change every key that appear ? save every match inside an array and change their value?
idkazuma has quit [Remote host closed the connection]
etcetera has joined #ruby
ananthakumaran has joined #ruby
Spooner_ has joined #ruby
yekta has joined #ruby
<bean__> i don't know, by using code.
<bean__> :)
Illusioneer has joined #ruby
brandon|_ is now known as brandon|work
apeiros_ has quit [Remote host closed the connection]
<bean__> this is not a write your code for you channel.
swoosh has joined #ruby
swoosh has quit [Max SendQ exceeded]
<Illusioneer> forget simple, is there ANY way to gsub a backslash quote into just a quote?
zmike123 has joined #ruby
<bean__> >> "\'".gsub("\\\'","'")
<eval-in> bean__ => "'" (http://eval.in/11801)
<Illusioneer> I can replace any letters/numbers but anything with backslashes is ignored
<bean__> Illusioneer: ^
<Illusioneer> doesn't work
<bean__> it just did though
<Illusioneer> not on my workstation, not on my server
<Illusioneer> just tried it
<bean__> what version of ruby
<Illusioneer> 193 385
<Illusioneer> I can gsub anything else
<Illusioneer> but not slashes
<Illusioneer> no error, it just returns nothing
<bean__> okay, gist some code then
horrror has quit [Quit: horrror]
dhruvasagar has joined #ruby
Mon_Ouie has joined #ruby
ngoldman has quit [Remote host closed the connection]
Mattix has quit [Quit: Leaving]
fmcgeough has joined #ruby
Es0teric has joined #ruby
axl_ has joined #ruby
<Spooner_> Illusioneer, Are you sure that the string actually has backslashes in it and it isn't just Ruby displaying backslashes before escaped characters?
<Illusioneer> Spooner: how would I know one way or the other?
jef_abraham has joined #ruby
<Spooner_> Well, where are the strings coming from and how are you displaying them to know they are not right?
chichouw has quit [Remote host closed the connection]
ezkl has joined #ruby
maycon__ has quit [Quit: Saindo]
<Illusioneer> well i'm pulling the string from the DB (which is supposed to be an hstore hash)
chichou has joined #ruby
generalissimo has joined #ruby
<Spooner_> But you should know based on the characters after the slashes.
<Illusioneer> both rails and irb report it's a string, not a hash
<Spooner_> >> p %{"}
<eval-in> Spooner_ => "\""
<eval-in> "\"" (http://eval.in/11802)
chichou has quit [Read error: Connection reset by peer]
<Spooner_> Illusioneer, Are you sure it isn't JSON then?
chichou has joined #ruby
<Spooner_> I've never used hstore though, so I'm just guessing.
<Illusioneer> can't be, it fails JSON.parse
arya has quit [Ping timeout: 252 seconds]
<Spooner_> As bean__ suggests, pasting and example (of code or data) is a good idea.
chichou has quit [Remote host closed the connection]
<Illusioneer> the hstore puts out: "\"host_name\"=>\"titlekey\", \"check_type\"=>\"0\",...
<whitequark> Illusioneer: puts it
<Spooner_> No backslashes in that. Those are just "
arya has joined #ruby
<Illusioneer> ok
jasond has joined #ruby
chichou has joined #ruby
lethjakman has joined #ruby
<Illusioneer> that would explain why gsub never converts anything
vlad_starkov has joined #ruby
monkegjinni has quit [Remote host closed the connection]
<Spooner_> Definitely has key/value pairs in it though.
m8 has joined #ruby
<Illusioneer> tried eval but that didn't work
<bean__> oh god.
<bean__> dont eval
chichou has quit [Read error: Operation timed out]
<bean__> ever
<bean__> strike that word from your vocabulary
<Spooner_> Try JSON.parse("{#{data}}") instead.
<Spooner_> bean__, eval has its uses. Just absolutely not for any external data coming into your app ;)
<Illusioneer> it does, never in production of course
<bean__> eh, it's "uses" can often be done other ways.
<Spooner_> Looks like it should parse as JSON though, so easy enough.
<Spooner_> bean__ do you use attr_reader? That is just eval.
<bean__> no
<Illusioneer> the part that makes no sense, the ruby that saves this does it as a hash, hstore format is a hash, so why does it come back as a mangled string?
<bean__> well, sometimes
jaygen has quit [Read error: Connection reset by peer]
<bean__> but rarely.
fire has joined #ruby
nerd has quit [Ping timeout: 256 seconds]
<Spooner_> Illusioneer, Well, databases are crazy.
<Spooner_> Does it parse now, at least?
vlad_starkov has quit [Ping timeout: 255 seconds]
<Illusioneer> nope
pepper_chico has joined #ruby
<Illusioneer> fails about halfway through
pepper_chico has quit [Max SendQ exceeded]
<Illusioneer> in the middle of a key no less
jef_abraham has quit [Quit: jef_abraham]
pepper_chico has joined #ruby
pepper_chico has quit [Max SendQ exceeded]
<Spooner_> Oh crap, silly me. If nothing else, JSON is {"key":"value"}, not {"key"=>"value"}
apok has joined #ruby
<Spooner_> Does seem odd that it clips the {} off when it saves the Ruby data. I'd expect it to marshal it though, not just write it into a string.
<Illusioneer> hehe yeah i was thinking that was a bit off
dhruvasagar has quit [Ping timeout: 276 seconds]
pepper_chico has joined #ruby
pepper_chico has quit [Max SendQ exceeded]
<Illusioneer> this is what i get for playing with halfbaked plugins :)
<Spooner_> You can gsub that easily. Still, better parsing it as JSON than evalling it as Ruby.
alfakini has joined #ruby
<grohne> :w
pepper_chico has joined #ruby
<grohne> (wrong window)
pepper_chico has quit [Max SendQ exceeded]
arturaz has quit [Ping timeout: 255 seconds]
dsf_ has quit [Quit: This computer has gone to sleep]
pdamer has quit [Quit: pdamer]
pepper_chico has joined #ruby
pepper_chico has quit [Max SendQ exceeded]
joofsh has quit [Remote host closed the connection]
Hanmac1 has quit [Quit: Leaving.]
monkegjinni has joined #ruby
pepper_chico has joined #ruby
pepper_chico has quit [Max SendQ exceeded]
<XVirus> In Array#each the doc says Array#each {|item| block} while Enumerable#all? the doc says [{|obj| block}] ... What's the difference between [{}] and {} ?
Hanmac has joined #ruby
Sou|cutter has quit [Quit: bbiab]
<Spooner_> It doesn't mean that. It means that bit is optional (in the [])
brianstorti has joined #ruby
carloslopes has joined #ruby
pepper_chico has joined #ruby
<Spooner_> In fact, the block is optional in both cases, in which case you get an enumerator returned.
<XVirus> Spooner_: I see
<XVirus> so if it's optional in both cases .. why do they look different ?
<Spooner_> Because people writing docs aren't infallible.
digifiv5e has joined #ruby
<XVirus> Spooner_: LOL .. I'm new to Ruby and I thought this had a significant meaning or something
digifiv5e is now known as Guest76637
<bean__> nope
<bean__> no real meaning
jean-lou` has joined #ruby
dekroning has joined #ruby
jean-louis has quit [Read error: No route to host]
<dekroning> is there a way outside of using Rails, to constantize a string? so I can use it in my Factory classes?
ad_AA has joined #ruby
jekotia has joined #ruby
<hoelzro> dekroning: sorry, constantize?
wallerdev has joined #ruby
* hoelzro thinks about constants and symbols
carloslopes has quit [Remote host closed the connection]
Stilo has joined #ruby
<dekroning> hoelzro: ah, in Rails (or better said ActiveSupport, afaik) you can do someting like def to_class(type); type.to_s.constantize; end
<bean__> theres the def for constantize
<bean__> it's just rub
<bean__> y
<bean__> im sure you could pull that out
frem has joined #ruby
<shevy> dekroning you can turn a string into a constant, outside of using rails, yes
<dekroning> hoelzro: bean__ hmm indeed, that's a bit stupid I didn't think of that, thanks
Ontolog has joined #ruby
<shevy> _ = Object.const_get "Foobar"
idkazuma has joined #ruby
<dekroning> shevy: aha
<shevy> probably with Module.const_get too.. but I somehow started with Object.const_get and sticked to that
pyrac has joined #ruby
apeiros_ has joined #ruby
<shevy> like this weird thing here:
<shevy> include Module.const_get(modulname_here)
<dekroning> shevy: great
Hanmac1 has joined #ruby
lewis has joined #ruby
lewis has quit [Changing host]
lewis has joined #ruby
<shevy> :)
ezkl has quit [Quit: Textual IRC Client: www.textualapp.com]
adkron has joined #ruby
adkron_ has joined #ruby
aqabiz has quit [Quit: aqabiz]
pseudonymous has joined #ruby
chichou has joined #ruby
razibog has quit [Ping timeout: 240 seconds]
<lewis> hi
<bean__> lewis: hi
<pseudonymous> I seem to hit a nomethoderror when trying Net::SMTP.enable_starttls -- which I don't get since it's here http://ruby-doc.org/stdlib-2.0/libdoc/net/smtp/rdoc/Net/SMTP.html (I'm using ruby-2.0.0-p0 from rvm via rubymine where the project uses a 2.0 gemset)
s__dana has joined #ruby
hydrozen has joined #ruby
NiteRain has joined #ruby
j^2 has joined #ruby
<shevy> pseudonymous perhaps it's buggy
Sou|cutter has joined #ruby
mafolz has quit [Ping timeout: 250 seconds]
<shevy> hmm
<shevy> but
<MrZYX> I see #enable_starttls but ::enable_starttls
backjlack has joined #ruby
<shevy> pseudonymous why do you use Net::SMTP.enable_starttls where is the .new ?
pskosinski has quit [Ping timeout: 256 seconds]
joofsh has joined #ruby
Bry8Star has quit [Remote host closed the connection]
clooth has quit [Quit: clooth]
oposomme has quit [Quit: Linkinus - http://linkinus.com]
mlr has joined #ruby
dsf has joined #ruby
rickmasta has joined #ruby
buscon has quit [Remote host closed the connection]
atno__ has quit [Read error: Connection reset by peer]
atno has quit [Read error: Connection reset by peer]
adkron_ has quit [Ping timeout: 256 seconds]
ixx has quit [Ping timeout: 260 seconds]
adkron has quit [Ping timeout: 256 seconds]
apod has quit []
<pseudonymous> Yea I'm a bit rusty in that, what I'm guessing atm is that enable_starttls is an instance method..?
<shevy> unless specified otherwise, I would always assume that these methods on the official ruby docu are instance methods
<shevy> I am not sure how class methods are denoted or marked on the docu
daniel_hinojosa has joined #ruby
Illusioneer has quit [Quit: Leaving.]
atno has joined #ruby
mneorr has joined #ruby
baroquebobcat has joined #ruby
Blaze_Boy has joined #ruby
ssvoo has joined #ruby
ssvoo has left #ruby [#ruby]
dsf has quit [Quit: This computer has gone to sleep]
zekriad has joined #ruby
adamjleonard has joined #ruby
mneorr has quit [Ping timeout: 240 seconds]
<Spooner_> shevy, class methods are marked with :: and instance with
maletor has joined #ruby
<shevy> oh I see
hoelzro is now known as hoelzro|away
<Spooner_> They also are in sections with a clear title :)
<shevy> ::zero?
<shevy> #atime
Bry8Star has joined #ruby
pothibo has joined #ruby
elux has joined #ruby
pskosinski has joined #ruby
becom33 has joined #ruby
nachtwandler has joined #ruby
F1skr has joined #ruby
soc42 has joined #ruby
philcrissman has joined #ruby
chichou has quit [Remote host closed the connection]
chichou has joined #ruby
brianstorti has quit [Quit: Textual IRC Client: http://www.textualapp.com/]
mduvall has joined #ruby
shiningblue has joined #ruby
axl_ has quit [Quit: axl_]
pepper_chico has quit [Quit: Computer has gone to sleep.]
shiningblue has left #ruby [#ruby]
m8 has quit [Read error: Connection reset by peer]
m8 has joined #ruby
sailias has quit [Ping timeout: 255 seconds]
techhelp has joined #ruby
chichou has quit [Ping timeout: 240 seconds]
endzyme has joined #ruby
mneorr has joined #ruby
<pseudonymous> Wow, the smtp API is really confusing - I have the option of sending straight data - and that doesn't work if I follow the example given on the API page. I can also just call send_message -- which works, but cannot accept a subject line (making it ridiculously hopeless)... Then there's the funny stuff such as Net::SMTP.start() cannot be used w starttls, no you have to v= Net::SMTP.new(addr, port) then v.start(....) (instead of supplying all
<pseudonymous> options at once).. Man..
Guest76637 has quit [Ping timeout: 264 seconds]
agjacome has quit [Quit: leaving]
whitenoise has quit [Quit: This computer has gone to sleep]
fabrice31 has quit [Read error: Connection reset by peer]
wreckimnaked has quit [Ping timeout: 252 seconds]
elico has quit [Quit: elico]
mr-rich has quit [Quit: KVIrc 4.1.3 Equilibrium http://www.kvirc.net/]
<dekroning> shevy: I indeed need to instantiate a object which is wrapped in namespace, I noticed i'm getting 'wrong constant name' when using Object.const_get so I should combined it with Module.const_get ?
<dekroning> shevy: in my case I did: class_name = "Bar"; Object.const_get("Foo::" + class_name)
yekta has quit [Quit: yekta]
<apeiros_> dekroning: "wrong constant name" means you're using a name that's not a valid constant
Jrz has quit [Ping timeout: 252 seconds]
<apeiros_> and while Foo::Bar resolves to a valid constant, it's not a valid constant name itself.
<apeiros_> Object.const_get('Foo').const_get(class_name)
<dekroning> apeiros_: right, I kind of get it, but also a bit confused :-)
pepper_chico has joined #ruby
philcrissman has quit [Remote host closed the connection]
pepper_chico has quit [Max SendQ exceeded]
idkazuma has quit [Remote host closed the connection]
_br_ has quit [Excess Flood]
Mon_Ouie has quit [Quit: WeeChat 0.4.0]
mengu has quit [Ping timeout: 248 seconds]
pepper_chico has joined #ruby
_br_ has joined #ruby
<realDAB> and then there's the always popular:
<realDAB> def deep_const_get(const_name); const_name.split('::').inject(Object) {|a,b| a.const_get(b) }; end
backjlack has quit [Remote host closed the connection]
<Hanmac1> or shorter: "Foo::Bar".split("::").inject(Object,:const_get)
mityaz has joined #ruby
mduvall has quit []
Jrz has joined #ruby
jlast has quit [Ping timeout: 245 seconds]
jlast has joined #ruby
whitenoise has joined #ruby
andikr has quit [Remote host closed the connection]
tommyvyo has quit [Quit:]
rickmasta has quit [Ping timeout: 252 seconds]
mockra has joined #ruby
jpcamara has joined #ruby
zigomir has quit [Quit: zigomir]
sepp2k1 has joined #ruby
agjacome has joined #ruby
astegman has quit [Ping timeout: 240 seconds]
sepp2k has quit [Ping timeout: 248 seconds]
axl_ has joined #ruby
_br_ has quit [Excess Flood]
maletor has quit [Read error: Connection reset by peer]
Jrz has quit [Read error: Connection reset by peer]
_br_ has joined #ruby
backjlack has joined #ruby
jpcamara_ has joined #ruby
woolite64_ has joined #ruby
browndawg has quit [Quit: Leaving.]
woolite64__ has joined #ruby
jdunck has joined #ruby
nga4 has joined #ruby
jpcamara has quit [Read error: Operation timed out]
jpcamara_ is now known as jpcamara
woolite64 has quit [Ping timeout: 250 seconds]
woolite64_ has quit [Ping timeout: 240 seconds]
Jrz has joined #ruby
Voodoofish430 has joined #ruby
monkegjinni has quit [Remote host closed the connection]
rheoli has joined #ruby
qubit has joined #ruby
hiroyuki has quit [Ping timeout: 240 seconds]
nfk has quit [Quit: yawn]
rakl has joined #ruby
neku has quit [Quit: Leaving...]
mneorr has quit [Read error: Connection timed out]
backjlack has quit [Remote host closed the connection]
Quirrell has joined #ruby
pepper_chico has quit [Quit: Computer has gone to sleep.]
mneorr has joined #ruby
sailias has joined #ruby
maletor has joined #ruby
rafacv has joined #ruby
Ontolog has quit [Remote host closed the connection]
mattbl has quit [Quit: This computer has gone to sleep]
Ontolog has joined #ruby
ngoldman_ has joined #ruby
jonahR has quit [Quit: jonahR]
<Hanmac1> shevy do you like xpm files? :P
adkron has joined #ruby
_bart has quit [Ping timeout: 252 seconds]
wargasm has quit [Ping timeout: 252 seconds]
nomenkun has quit [Remote host closed the connection]
jeremywrowe_ has joined #ruby
eldariof has joined #ruby
qubit has quit [Ping timeout: 252 seconds]
freakazoid0223 has joined #ruby
adkron_ has joined #ruby
motto has joined #ruby
mpfundstein has quit [Remote host closed the connection]
ad_AA has quit [Ping timeout: 252 seconds]
<shevy> Hanmac1 actually yes
<shevy> I used them in ruby-gtk, it was not bad
hbpoison has quit [Ping timeout: 260 seconds]
<shevy> I mean, they look like crap, but you can put them after __END__
clooth has joined #ruby
banjara has joined #ruby
<shevy> was easier to embed it all into one .rb then have several small .gif files
<shevy> *than
m8 has quit [Read error: Operation timed out]
menace has joined #ruby
ffranz has quit [Quit: Leaving]
aedorn has joined #ruby
ffranz has joined #ruby
Mon_Ouie has joined #ruby
hydrozen has quit [Quit: Computer has gone to sleep.]
<Hanmac1> shevy rwx can use external xpm , i didnt test internal
<shevy> nice
joeycarmello has joined #ruby
<shevy> hmm I am thinking of a commandline tool to query youtube videos
<shevy> but in the most simple way
<shevy> and actually, for like 500 different webpages
filipe_ has quit [Read error: Connection reset by peer]
beaky has joined #ruby
<beaky> hello
<beaky> when should I use the visitor pattern over the strategy pattern?
<apeiros_> you should use the pattern pattern!
<beaky> ah whjat
<beaky> what'sthat*
* Hanmac1 pefers the pattern pattern pattern
skum has quit [Ping timeout: 245 seconds]
<apeiros_> it's the meta pattern of all patterns
<aedorn> I only like anti-patterns =(
<beaky> I like pattern matching
<apeiros_> the grand unified theory of patterns, if you will
<beaky> heh
<Hanmac1> if you find patterns in my code i would be proud
etcetera has quit []
* apeiros_ is full of shit, but the question was still relatively pointless
<shevy> apeiros_ lol you are an evil swiss man
<beaky> aren't they ubiquitous in ruby? you have the ActiveRecord pattern in rails, for example
rheoli has quit [Quit: Colloquy for iPad - http://colloquy.mobi]
<shevy> beaky right, that is rails
<beaky> oh
<shevy> beaky rails is almost its own programming language
<shevy> just look at all the factoryfactoryfactoryworkergirls
<shevy> beaky they will reason that using pattern x, y, z will make your life easier
asobrasil has left #ruby [#ruby]
<apeiros_> beaky: ruby is full with the factory pattern too - Array.new # <-- there
Kudos has quit [Ping timeout: 264 seconds]
<Hanmac1> shevy about rwx and bitmaps ... each method that uses a bitmap like for sample the StaticBitmap control you dont need to load it, nor do you need to specify the type while loading ... so WX::StaticBitmap.new(self,:bitmap => "red.xpm" ) is fine too
<beaky> activerecord seems to make life easier... but that's rpboably ebcause I don't know anything else :(
<Hanmac1> java is full of factory objects :P
Zolo has joined #ruby
<shevy> Hanmac1 does your code actually work? I mean, when you use ruby, you will popup real widgets with it?
Kudos has joined #ruby
<Hanmac1> shevy, yeah it works
<shevy> beaky it probably makes life easier for its respective problem domain
qubit has joined #ruby
jacktrick has joined #ruby
<aedorn> Bah... need less wx, more Qt!
<beaky> I guess rails's domain is writing restful webapps, so activerecord is good for htat kind of thing
jacktrick has quit [Client Quit]
mattbl has joined #ruby
whitedawg has joined #ruby
<shevy> aedorn I cant get qt to compile right now :(
banjara has quit [Quit: Leaving.]
<shevy> beaky yeah but you are forced into the rails way of building that too
<csmrfx> I wonder if ruby could be used to access solar insolation data someplace
wargasm has joined #ruby
Spooner_ has quit [Remote host closed the connection]
grohne has quit [Quit: leaving]
<shevy> what is solar insolation data? does that have to do anything with solar cells?
<csmrfx> it tells how much solar energy "falls" in given place
<aedorn> csmrfx: Like an actual reader, or more like interpreting premade maps like from NREL?
reto__ has joined #ruby
reto__ has left #ruby [#ruby]
mneorr has quit [Read error: Operation timed out]
<csmrfx> aedorn: for simulating energy input @ Lat, Long
jef_abraham has joined #ruby
<csmrfx> uh, solar cell energy input, that is
Jrz has quit [Quit: Textual IRC Client: http://www.textualapp.com/]
caveat- has quit [Ping timeout: 252 seconds]
mneorr has joined #ruby
<Hanmac1> aedorn i heard that Canonial will use QT5 for there X11 replacement :P
<csmrfx> perhaps on a given hour of an day, even
interactionjaxsn has quit [Remote host closed the connection]
<shevy> Hanmac1 I thought they use their own stuff
<shevy> they become like apple
<shevy> not even using wayland anymore
<csmrfx> aedorn: your question is a good one, but I guess real time or even historical data from all around the world isn
<csmrfx> 't realistic scenario
<beaky> it's yet another case of NIH syndrome :D
testingb0t has joined #ruby
<csmrfx> so, in fact it has to be a model
<shevy> NIH?
<beaky> not-invented-here
unflores has quit [Quit: unflores]
<aedorn> csmrfx: models are best left to R and Julia, in my opinion. However, you could use Ruby as a driver. Like Sinatra app, load R/Julia with the data and let it calculate.
realDAB has quit [Quit: realDAB]
<csmrfx> NArray is pretty quick
<aedorn> I was trying to find some place to get real time data.. but I guess there really isn't one.
<aedorn> Hanmac1: Yup, QT5 is the future! Of everything!
<csmrfx> how many million data points does one need...
sn0wb1rd has joined #ruby
tylersmith has quit [Quit: tylersmith]
<csmrfx> hm, global elevation data could be used to modulate the number from the model I have
Sou|cutter has quit [Remote host closed the connection]
dblack__ has joined #ruby
qubit has quit [Ping timeout: 276 seconds]
pkrnj has joined #ruby
zodiak has quit [Ping timeout: 248 seconds]
tylersmith has joined #ruby
caveat- has joined #ruby
<Hanmac1> aedorn i still like wx more than QT ...
<tubbo> beaky: incorrect. X is an abomination.
techhelp has quit [Quit: Leaving]
jamesfung14 has quit [Ping timeout: 264 seconds]
sepp2k1 has quit [Remote host closed the connection]
<beaky> ah
maxmanders has quit [Quit: Computer has gone to sleep.]
mneorr has quit [Remote host closed the connection]
mrsolo has joined #ruby
ner0x has joined #ruby
<Hanmac1> tubbo it cames from the Xth dimension :P
<aedorn> Hanmac1: I guess Qt5 isn't for everyone =p
<ner0x> value =~ /^\d{3}-\d{3}-\d{3}( x\d+)?$/ should be 123-123-123 or 123-123-123 x123123 correct?
jamesfung14 has joined #ruby
banjara has joined #ruby
<tubbo> beaky: i know it's a bad argument too but X is *old* and things are kinda different now
chussenot has quit [Quit: chussenot]
alvaro_o has joined #ruby
jpcamara has quit [Quit: jpcamara]
whitedawg has quit [Quit: Leaving.]
zodiak has joined #ruby
huoxito has quit [Quit: Leaving]
adkron___ has joined #ruby
testingb0t has quit [Read error: Connection reset by peer]
adkron__1 has joined #ruby
testingb0t has joined #ruby
io_syl has joined #ruby
ixx has joined #ruby
sayan has quit [Ping timeout: 256 seconds]
<csmrfx> what can I use to sample svg images to bitmap?
ixx is now known as Guest6054
beiter has quit [Quit: beiter]
rupee has joined #ruby
jpcamara has joined #ruby
sn0wb1rd has quit [Quit: sn0wb1rd]
adkron_ has quit [Ping timeout: 252 seconds]
adkron has quit [Ping timeout: 264 seconds]
makerbreakr has joined #ruby
<makerbreakr> hi, is there an easy way to access the URI in this array? https://gist.github.com/makerbreaker/5092467
<makerbreakr> or do i have to do regex
soc42 has quit [Remote host closed the connection]
maycon has joined #ruby
slainer6_ has quit [Remote host closed the connection]
sn0wb1rd has joined #ruby
cousine has joined #ruby
Sou|cutter has joined #ruby
<dblack__> makerbreakr: that gist is blank
hbpoison has joined #ruby
jpcamara_ has joined #ruby
<csmrfx> can you get that as a string?
<makerbreakr> hrm weird, not for me
<beaky>
<makerbreakr> csmrfx, i can to a to_s id assume
<csmrfx> split by 'uri=' and '>]' and you're done
pepper_chico has joined #ruby
pepper_chico has quit [Max SendQ exceeded]
<makerbreakr> why would they return it like that though, i think im missing something
<csmrfx> but then again, see if it has method
lele has joined #ruby
jlast has quit [Remote host closed the connection]
Mon_Ouie has quit [Read error: Connection reset by peer]
techhelp has joined #ruby
pepper_chico has joined #ruby
kevinfagan has quit [Quit: Leaving...]
pepper_chico has quit [Max SendQ exceeded]
jpcamara has quit [Ping timeout: 245 seconds]
techhelp has quit [Remote host closed the connection]
pepper_chico has joined #ruby
pepper_chico has quit [Max SendQ exceeded]
testingb0t has quit [Quit: Leaving.]
pepper_chico has joined #ruby
<makerbreakr> https://gist.github.com/makerbreaker/5092541 that is how im calling it
<csmrfx> makerbreakr is that JSON
<makerbreakr> it is hitting the twilion API
<csmrfx> well see the api docs
ayyeterartik has joined #ruby
<makerbreakr> it looks like its returning XML
arietis has joined #ruby
tommyvyo has joined #ruby
hbpoison has quit [Ping timeout: 276 seconds]
rdark has quit [Quit: leaving]
breakingthings has quit []
<csmrfx> no, it doesnt
rickmasta has joined #ruby
<shevy> hehe
Mon_Ouie has joined #ruby
jamesfung14 has quit [Ping timeout: 245 seconds]
<shevy> one sees a black cat, one sees a white cat, until both figure out that the cat is white on one side and black on the other side!
<makerbreakr> ya, you are right, iw as looking at the wrong thing
pseudonymous has quit [Ping timeout: 245 seconds]
adkron__1 has quit [Ping timeout: 245 seconds]
adkron___ has quit [Ping timeout: 256 seconds]
danman has joined #ruby
nOStahl has quit [Quit: nOStahl]
workmad3 has quit [Ping timeout: 252 seconds]
jef_abraham has quit [Quit: jef_abraham]
axl_ has quit [Quit: axl_]
twoism has joined #ruby
nga4 has quit []
adkron has joined #ruby
adkron_ has joined #ruby
dhruvasagar has joined #ruby
makerbreakr has left #ruby ["Leaving"]
havenwood has joined #ruby
pdamer has joined #ruby
danman has quit [Quit: danman]
danman has joined #ruby
spider-mario has joined #ruby
girija_ has quit [Ping timeout: 252 seconds]
pdamer has quit [Client Quit]
mahmoudimus has quit [Quit: Computer has gone to sleep.]
imitkit has joined #ruby
whitenoise has quit [Ping timeout: 260 seconds]
ferdev has quit [Quit: ferdev]
jef_abraham has joined #ruby
cantonic has quit [Quit: cantonic]
c0rn has joined #ruby
thone_ has joined #ruby
Takehiro has quit [Remote host closed the connection]
ozgura has quit [Remote host closed the connection]
pothibo has left #ruby [#ruby]
Takehiro has joined #ruby
LBRapid has quit [Quit: Farewell.]
pskosinski has quit [Remote host closed the connection]
g0tcha has joined #ruby
jonahR has joined #ruby
jef_abraham has quit [Read error: Connection reset by peer]
jef_abraham has joined #ruby
mneorr has joined #ruby
takeru has joined #ruby
Takehiro has quit [Read error: No route to host]
<g0tcha> hey guys, im not sure im asking this in the right place, but im trying to run "rake db:migrate" to install redmine and its giving me this error: http://paste.ubuntu.com/5588412/
jef_abraham has quit [Client Quit]
<g0tcha> can someone help me out with it maybe?
thone has quit [Ping timeout: 264 seconds]
hiroyuki has joined #ruby
<havenwood> g0tcha: I'd suggest trying: #RubyOnRails
<g0tcha> thanks dude, ill ask there
pepper_chico has quit [Quit: Computer has gone to sleep.]
cantonic has joined #ruby
nga4 has joined #ruby
etcetera has joined #ruby
duosrx has quit [Remote host closed the connection]
zaltekk has quit [Read error: Connection reset by peer]
LBRapid_ has joined #ruby
atyz has joined #ruby
adkron_ has quit [Ping timeout: 256 seconds]
adkron has quit [Ping timeout: 256 seconds]
m8 has joined #ruby
whitedawg has joined #ruby
fire has quit [Quit: WeeChat 0.4.0]
takeru has quit [Ping timeout: 276 seconds]
Skylab has quit [Quit: Skylab]
DrShoggoth has quit [Quit: Leaving]
lewis has quit [Remote host closed the connection]
tux91 has joined #ruby
Ontolog has quit [Ping timeout: 264 seconds]
Stilo has quit [Quit: Textual IRC Client: www.textualapp.com]
Goles_ has joined #ruby
zaltekk has joined #ruby
io_syl has quit [Quit: Computer has gone to sleep.]
freakazoid0223 has quit [Read error: Connection reset by peer]
imami|afk is now known as banseljaj
<tux91> How is Rspec able to implement stuff like 'obj.should == whatever'? 'should' is a method on object, but what is '=='? It can't be an argument
<tux91> and its not a block
Ontolog has joined #ruby
menace has quit [Quit: Leaving.]
motto has quit [Ping timeout: 252 seconds]
zmike123 has quit [Quit: Выходжу]
<JoeHazzers> i want to conduct http requests using cookies i receive after submitting a form, but i want to do it myself, and for it to not be *too* difficult.
<JoeHazzers> any suggestions?
kpshek has joined #ruby
Goles has quit [Ping timeout: 252 seconds]
alvaro_o_ has joined #ruby
<tux91> JoeHazzers: you should not set cookies after submitting a form, you should pass parameters in a post request
jamesfung14 has joined #ruby
<JoeHazzers> no no
<tux91> JoeHazzers: but go to #rubyonrails
Dreamer3 has joined #ruby
<JoeHazzers> this is a *client*
mark_locklear has joined #ruby
<JoeHazzers> i want to post a form, receive cookies, persist the cookies
kaen has quit [Quit: Leaving]
<tux91> JoeHazzers: your app is a client?
<havenwood> tux91: == is a method, it is just syntactic sugar for 'obj.should.==(whatever)
kevinfagan has joined #ruby
turkAlurk has joined #ruby
<JoeHazzers> yes, i'm writing something for me to use client-side.
<tux91> havenwood: oh yeah, totally didn't think of that, thanks
<havenwood> JoeHazzers: I'd suggest mechanize gem or httpclient gem.
arya has quit [Ping timeout: 248 seconds]
nfk has joined #ruby
<havenwood> JoeHazzers: Both handle cookies well.
ayyeterartik has quit [Quit: I bid you, adieu!]
<JoeHazzers> yeah, i want to do it myself. for educational purposes, mechanize feels like cheating.
turkAlurk is now known as ayyeterartik
tcstar has quit [Read error: Connection reset by peer]
<havenwood> JoeHazzers: Maybe take a look at how httpclient does it. Pure Ruby implementation.
<JoeHazzers> will do
alvaro_o has quit [Ping timeout: 255 seconds]
mattbl has quit [Quit: This computer has gone to sleep]
<tux91> wait, clients can read cookies that were set from other domains?
Goles has joined #ruby
Goles_ has quit [Read error: Connection reset by peer]
c0rn has quit [Ping timeout: 245 seconds]
madhatter has quit [Read error: Operation timed out]
chrishough has joined #ruby
timmow has quit [Ping timeout: 252 seconds]
lewis has joined #ruby
lewis has quit [Changing host]
lewis has joined #ruby
madhatter has joined #ruby
hbpoison has joined #ruby
arya has joined #ruby
c0rn has joined #ruby
znode has joined #ruby
<havenwood> tux91: Yup. Third party cookies, often from advertisers.
alvaro_o_ has quit [Read error: Operation timed out]
freakazoid0223 has joined #ruby
<tux91> havenwood: so can't your app just grab user's cookies from some other domain, say a user id cookie that that other app is is using for identification? And then you could pose as that user?
ny11 has joined #ruby
Takehiro has joined #ruby
sambio has quit [Ping timeout: 245 seconds]
<ny11> do most ruby developers know rails?
mneorr has quit [Read error: Connection timed out]
jlast has joined #ruby
<havenwood> ny11: Sometimes I wonder if most Rails developers know Ruby! :P
mneorr has joined #ruby
Davey has quit [Quit: Computer has gone to sleep.]
Stilo has joined #ruby
fire has joined #ruby
<havenwood> ny11: I'd imagine pretty much every Ruby developer is at least familiar with Rails, since it is the elephant in the room. There are plenty of Ruby devs who never work in Rails though.
fire has quit [Client Quit]
kevinfagan has quit [Quit: Leaving...]
Inoperable has quit [Quit: ZNC - http://znc.in]
<ny11> oh ok
<ny11> can ruby be used for desktop applications as well?
<havenwood> ny11: Yes.
<ny11> oh ok cool
io_syl has joined #ruby
<ny11> ive been learning ruby for about a week now. its pretty cool although im still stumped about few things
spider-mario has quit [Remote host closed the connection]
carloslopes has joined #ruby
yacks has quit [Quit: Leaving]
<Hanmac1> ny11 ruby has GUI toolkits too ... (for sample i write at one)
<ny11> oh cool. any links?
rickmasta has quit [Quit: Leaving...]
_br_ has quit [Excess Flood]
Takehiro has quit [Read error: No route to host]
<Hanmac1> ny11 https://github.com/Hanmac/rwx it used wxWigdets as background
tcstar has joined #ruby
<Hanmac1> but its not finish yet
Takehiro has joined #ruby
codelitt has joined #ruby
<havenwood> ny11: In various ways. There are cross-platform GUI toolkits, like tk, wx, shoes, etc. Then there is Ocra for targeting Windows, and MacRuby is awesome for OS X.
chichou has joined #ruby
<havenwood> ny11: There are also good 2D and 3D games libs.
pdamer has joined #ruby
<lethjakman> rails is really fun btw, if you're enjoying ruby programming you should give it a shot
<lethjakman> it has a pretty big learning curve though so be patient
<havenwood> ny11: And for IOS, MobiRuby or RubyMotion.
<ny11> oh nice.
mneorr has quit [Remote host closed the connection]
Goles_ has joined #ruby
<ny11> yeah to be honeset im learning ruby to learn rails
jhowarth has joined #ruby
* Hanmac1 has an binding for GPU accellated 3d gaming too
Goles has quit [Ping timeout: 240 seconds]
_br_ has joined #ruby
chichou has quit [Remote host closed the connection]
<ny11> for desktop im learning c# and i know bit of python and c++. but i was just curious about ruby for desktop
<havenwood> ny11: Take a look at Sinatra as well! Really fun to work with and much, much simpler than Rails for a trivial webapp.
mahmoudimus has joined #ruby
<havenwood> ny11: http://www.sinatrarb.com
<ny11> yeah i heard about sinatra. i went to a rails meetup for beginners
chichou has joined #ruby
<ny11> and they were talking about sinatra for basic things
cantonic has quit [Quit: cantonic]
<Hanmac1> ny11 ... i would not recommend c# :( ... for 3d did you see Ogre3d?
chichou has quit [Read error: Connection reset by peer]
LBRapid_ has quit [Quit: Farewell.]
io_syl has quit [Quit: Computer has gone to sleep.]
chichou has joined #ruby
brianpWins has joined #ruby
<ny11> no i havent. whats wrong with c#?
cantonic has joined #ruby
<ny11> for 3d games i was learning unity3d and they use c#
Spooner has joined #ruby
spider-mario has joined #ruby
<ny11> i built some basic 3d games
_br_ has quit [Excess Flood]
<ny11> thing is there are so many damn things i want to do and im confused as to how to go about it
adambeynon has quit [Quit: ["Textual IRC Client: www.textualapp.com"]]
<ny11> so i started learning bunch of things at once. so i know basics of few things but not well enough in one thing
Neomex has joined #ruby
<angelixd> hey, i'm proxying class calls to a singleton instance and I'd like to DRY up that pattern into a mixin, but I'm not having any luck with using self.included and class_eval. is there something I'm missing here?
<lewis> ny11: you can spend years mastering each topic. I think the jump to rails is the right thing to do
<Hanmac1> look at ogre3d ... they also have some stuff for free where you need to pay for with unity3d
codelitt has quit [Remote host closed the connection]
codelitt has joined #ruby
<ny11> yeah i feel like a loser cause i started learning programming when iwas 12.. im 26 now
<lewis> and getting your bearings as you go
<ny11> i am not master at anything
<lewis> ny11: lol you sound like me
<ny11> cause i went through maybe a dozen different languages, frameworks,etc
<lewis> ny11: /nick info my nick
maxmanders has joined #ruby
<lewis> ny11: and I started learning C I was 11
RonScagz has quit [Quit: Linkinus - http://linkinus.com]
<lewis> ny11: that's so me lol
<ny11> yeah
alvaro_o_ has joined #ruby
LBRapid has joined #ruby
tux91 has quit [Quit: tux91]
pepper_chico has joined #ruby
<lewis> ny11: well at least it took us ten years something to decide to stick with one thing
LBRapid has quit [Client Quit]
<ny11> i started learning c, c++, vb, php, html, css, js, ruby, c#, actionscript, python, etc.
LBRapid has joined #ruby
elaptics is now known as elaptics`away
LBRapid is now known as Guest85214
<ny11> most advanced was probably c++ and php where i actually build something somewhat complex.
squidBits has joined #ruby
ayyeterartik is now known as ayyeterartik_
gyre007 has joined #ruby
Ontolog has quit [Remote host closed the connection]
ayyeterartik_ is now known as turkalurk_
<aedorn> I wish I started with C... I still have nightmares of Z80 machine code.
<ny11> oh yeah and java and objective-c
<Hanmac1> ny11 your C & C++ skills can help you when you play with ruby because you can build external bindings
<ny11> forgot to add those
_br_ has joined #ruby
Ontolog has joined #ruby
_br_ has quit [Excess Flood]
<Hanmac1> java ... the language with the weekly fixes :P
khismetix has joined #ruby
<ny11> i wanted to do mobile stuff
<ny11> so i started learning android and ios at the same time
<ny11> but objective-c is the worst language ive ever seen
_nitti has quit [Remote host closed the connection]
codelitt has quit [Ping timeout: 245 seconds]
turkalurk_ is now known as ayyeterartik
tvw has quit []
<khismetix> ;) I am an ObJC programmer (ex Java) learning Ruby :)
adkron has joined #ruby
Radnor has joined #ruby
<lewis> ny11: lol wait are you like my other me
Neomex has quit [Quit: Neomex]
<ny11> heh
codelitt has joined #ruby
<lewis> ny11: same languages..except php i learned Java
_br_ has joined #ruby
blaxter has quit [Quit: foo]
<ny11> so i figured im going to stick with ruby/rails for web apps for now. cause i really want to do some start up and im more business minded but hard to find partners so i figured ill build a prototype myself
pskosinski has joined #ruby
<lewis> ny11: and the irony is because you switch so much you forget..i barely remember stuff
<ny11> yeah exactly
Gue______ has joined #ruby
mneorr has joined #ruby
ayyeterartik is now known as turkalurk
<ny11> im comfortable enough in php to build any kind of application though but it just takes so long and rails is the trend now
mneorr has quit [Remote host closed the connection]
anderse_ has joined #ruby
<lewis> ny11: go for it! I started a week ago or so
husimon___ is now known as nate_h
<ny11> how do you like it so far? i did some basic rails things but i want to learn ruby a bit better first
Gue______ is now known as flip_digits
<DDark> damnit sorry guys wrong chan
jsonperl has joined #ruby
<DDark> some melodeath metal if you click it is all.
vlad_starkov has joined #ruby
Guest85214 has quit [Quit: ZNC - http://znc.sourceforge.net]
anderse has quit [Ping timeout: 255 seconds]
anderse_ is now known as anderse
<lewis> ny11: awesome, beautiful ,elegantly engineered
codelitt has quit [Ping timeout: 252 seconds]
<lewis> ny11: I haven't touched rails yet
adkron_ has joined #ruby
znode has quit [Remote host closed the connection]
<lewis> ny11: but I'll take a deep dive soon
<jsonperl> ive written some pretty hefty c extensions… and I swear there is a leak in some code that I use nothing but rb_ary_new2 and rb_ary_store
<jsonperl> anyone wanna chat with me a lil? :)
<ny11> okay im going to ask a realy dumb/newbie question
codelitt has joined #ruby
<ny11> waht is the difference between class and Class ?
ben___ has joined #ruby
ibash has joined #ruby
ozgura has joined #ruby
piotr_ has joined #ruby
<ny11> is it class NameOfClass or NameOfClass = Class.new
<ny11> is that the difference?
<Quadlex> ny11: class is a keyword you use to define a class
Quirrell has quit [Quit: Quirrell]
<Quadlex> Class is the , uh, Class class
ibash has left #ruby [#ruby]
pdamer has quit [Quit: pdamer]
<Quadlex> (Class is the Object type which is of class Class)
<jsonperl> anyone well versed with the ruby c api?
<Quadlex> So the class f (say) the Rectangle class is Class
<jsonperl> (thats online)
joshman_ has quit [Ping timeout: 252 seconds]
<ny11> oh ok
Yakko has joined #ruby
<Spooner> jsonperl, I've made some C extensions, but I wouldn't say I was an expert.
<jsonperl> gotcha
<Hanmac1> ny11 class keyword does an new scope
whitedawg has quit [Quit: Leaving.]
<jsonperl> me either!
Proshot has joined #ruby
<ny11> btw anyone here does NLP?
sie has quit [Read error: Connection reset by peer]
statarb3 has quit [Read error: Connection reset by peer]
threesome has quit [Read error: Connection reset by peer]
sie has joined #ruby
nate_h has quit [Read error: Connection reset by peer]
nate_h has joined #ruby
Zolo has quit [Remote host closed the connection]
<Hanmac1> jsonperl i think i am used rubyCapi very well :P
<jsonperl> hmm whats that
heftig has quit [Ping timeout: 245 seconds]
<jsonperl> oh oh ruby c api
<jsonperl> :)
kpshek has quit []
<jsonperl> i'll drop some code in a link… maybe have a look
<jsonperl> i need to find a leak!
<ny11> shit my laptop is out of charge. wtf. brb
codelitt has quit [Ping timeout: 245 seconds]
cousine_ has joined #ruby
sonda has quit [Remote host closed the connection]
hashmal has quit [Quit: Computer has gone to sleep.]
joshman_ has joined #ruby
codelitt has joined #ruby
lewis is now known as lewix
turkalurk is now known as ayyeterartik
BizarreCake has quit [Ping timeout: 276 seconds]
ckrailo has joined #ruby
<jsonperl> this is what I think may be the offending code… a call to get_chunks_wrapper which in turn loads up an array with get_chunk_wrapper
<csmrfx> Use jruby for apps
<csmrfx> gain all java ui/windowing libs
<csmrfx> for the bad and the good
<jsonperl> not an option
cousine has quit [Ping timeout: 272 seconds]
<Hanmac1> jsonperl: for sample ary_push may be faster than ary_store inb your sample
<csmrfx> (was referring to the desktop apps)
<jsonperl> ah...
<jsonperl> hanmac1: you think?
Takehiro has quit [Remote host closed the connection]
clooth has quit [Quit: clooth]
ny11 has quit [Ping timeout: 264 seconds]
himsin has quit [Ping timeout: 245 seconds]
elkclone has joined #ruby
codelitt has quit [Ping timeout: 272 seconds]
chichou has quit [Remote host closed the connection]
himsin has joined #ruby
<Hanmac1> jsonperl ... or maybe not .. you does know how big the array will be "rb_ary_new2" so i think your sample is okay
a_a_g has quit [Quit: Leaving.]
<jsonperl> hanmac1: seems like reallocating might suck more
chichou has joined #ruby
codelitt has joined #ruby
<jsonperl> but im def not malloc ing anything
chussenot has joined #ruby
<jsonperl> so unless theres a problem with cores libs...
pdamer has joined #ruby
interactionjaxsn has joined #ruby
<JoeHazzers> is there honestly nothing that will take a proper set-cookie header and turn it into something i can use? bah!
tcstar has quit [Remote host closed the connection]
farnearer has joined #ruby
digifiv5e has joined #ruby
DrShoggoth has joined #ruby
digifiv5e is now known as Guest8105
<Hanmac1> jsonperl ... in this code sample you dont need to malloc anything ... ruby does everything for you (the ruby arrays)
<jsonperl> right
<jsonperl> thats my issue… because it seems that this is the culprit for a memory leak
Mo0O has joined #ruby
kpshek has joined #ruby
Nisstyre-laptop has joined #ruby
nachtwandler has quit [Quit: leaving]
adamjleonard has quit [Read error: Connection reset by peer]
adamjleonard has joined #ruby
beaky has quit [Quit: leaving]
codelitt has quit [Ping timeout: 245 seconds]
chichou has quit [Ping timeout: 260 seconds]
tenmilestereo has joined #ruby
adamjleonard has quit [Read error: Connection reset by peer]
farnearer has quit [Quit: Leaving.]
<Hanmac1> jsonperl ... about the "NUM" ... are you sure about?
adamjleonard has joined #ruby
LBRapid_ has joined #ruby
<jsonperl> yep its just a macro: #define NUM(num) INT2NUM((int)num)
<aedorn> I should start blogging about things I don't know about so I can get people to read it, comment with the right information, and then I can compile that information into a knowledge base of ... things I don't know about.
<aedorn> I imagine I'll get plenty of hate mail though.
codelitt has joined #ruby
khismetix has quit [Quit: Computer has gone to sleep.]
<lectrick> How do I hook into whenever a new object is created?
bricker_ is now known as bricker
stkowski has joined #ruby
<Hanmac1> jsonperl ... my i dont know why ... but your code looks okay for me ..
<jsonperl> lectrick: not sure you can… you can monitor ObjectSpace for new objects
clooth has joined #ruby
<jsonperl> hanmac1: k thanks for lookin… looks ok to me too :#
verysoftoiletppr is now known as prometeus
Goles_ has quit [Quit: Out.]
hbpoison_ has joined #ruby
Mo0O has quit [Quit: WeeChat 0.4.0]
Hanmac has quit [Ping timeout: 250 seconds]
khismetix has joined #ruby
ayyeterartik has quit [Quit: Leaving]
chichou has joined #ruby
lewix has quit [Remote host closed the connection]
<csmrfx> lectrick: is there "instantiated"
fermion has quit [Ping timeout: 250 seconds]
jpcamara_ has quit [Quit: jpcamara_]
chichou has quit [Remote host closed the connection]
Goles has joined #ruby
codelitt has quit [Ping timeout: 260 seconds]
hbpoison has quit [Ping timeout: 245 seconds]
chichou has joined #ruby
LBRapid_ has quit [Quit: Farewell.]
LBRapid has joined #ruby
chussenot has quit [Quit: chussenot]
codelitt has joined #ruby
volume has quit [Quit: Textual IRC Client: www.textualapp.com]
brimil01 has joined #ruby
Guest8105 has quit [Ping timeout: 245 seconds]
pepper_chico has quit [Quit: Computer has gone to sleep.]
lewis has joined #ruby
lewis has quit [Changing host]
lewis has joined #ruby
mengu has joined #ruby
LBRapid has quit [Client Quit]
<csmrfx> lectrick: you want to "foo" when ever an object of class X is instantiated?
LBRapid has joined #ruby
LBRapid is now known as Guest51209
chussenot has joined #ruby
Guest51209 has quit [Client Quit]
LBRapid_ has joined #ruby
codelitt has quit [Ping timeout: 250 seconds]
Zolo has joined #ruby
mattbl has joined #ruby
chichou has quit [Ping timeout: 276 seconds]
toekutr has joined #ruby
kpshek has quit []
LBRapid_ has quit [Client Quit]
workmad3 has joined #ruby
pepper_chico has joined #ruby
codelitt has joined #ruby
pepper_chico has quit [Max SendQ exceeded]
LBRapid has joined #ruby
zigomir has joined #ruby
LBRapid has quit [Client Quit]
LBRapid has joined #ruby
pepper_chico has joined #ruby
razibog has joined #ruby
hbpoison_ has quit [Ping timeout: 245 seconds]
LBRapid has quit [Client Quit]
axl_ has joined #ruby
znode has joined #ruby
LBRapid has joined #ruby
dankest has joined #ruby
akashj87 has quit [Ping timeout: 240 seconds]
nomenkun has joined #ruby
IrishGringo has joined #ruby
adamjleonard has quit [Read error: Connection timed out]
kpshek has joined #ruby
becom33 has quit [Quit: Leaving]
xardas has joined #ruby
spychalski has quit [Read error: Connection reset by peer]
adamjleonard has joined #ruby
codelitt has quit [Ping timeout: 255 seconds]
codelitt has joined #ruby
mneorr has joined #ruby
spychalski has joined #ruby
spychalski has joined #ruby
spychalski has quit [Changing host]
kondi has joined #ruby
jean-lou` has quit [Remote host closed the connection]
<lectrick> csmrfx: yes. of any class though. My first attempt was broken, if kind of funny: http://hastebin.com/junavovetu.irb << jsonperl cc
chussenot has quit [Quit: chussenot]
mikurubeam has quit [Quit: +1 (Yes.) -1 (No.) i (WTF?)]
motto has joined #ruby
joofsh has quit [Ping timeout: 276 seconds]
<lectrick> I may just need to skip if the object generation is part of my monkeypatch itself lol
<apeiros_> lectrick: Class#new, not Object::new
<lectrick> apeiros_: oh. duh. thank you
<kondi> hey folks, where does classifier store training data?
<apeiros_> kondi: yay for context!
Cicloid has quit [Remote host closed the connection]
philcrissman has joined #ruby
<csmrfx> where the classifier needs to
codelitt has quit [Ping timeout: 240 seconds]
<kondi> :\
m8 has quit [Ping timeout: 240 seconds]
<Hanmac1> lectrick ... you should be very carefull ... there are some classes that does NOT respond to new ... i dont know if your script brokes it
codelitt has joined #ruby
chichou has joined #ruby
<Xeago> apeiros_: Ping!
<kondi> I meant to ask is there a way to persist data on disk?
jani has joined #ruby
<apeiros_> pong
<lectrick> apeiros_: sigh, it still segfaults lol
<lectrick> Hanmac1: Trust me, this is not for production code, this is for some metric collection around our test running
joofsh has joined #ruby
<Xeago> kondi: marshalling is one way to persist data on disk
<Xeago> you probably don't want that tho
znode has quit [Ping timeout: 252 seconds]
joeycarmello has quit [Remote host closed the connection]
<Xeago> maybe you do
Takehiro has joined #ruby
digifiv5e_ has joined #ruby
lushious_ has quit [Quit: hlve Greed TheMoonMaster hobnob grimman kingatomic Theowning shadyKhan Ratty feyd Classhole Mellett68]
mercwithamouth has joined #ruby
workmad3 has quit [Read error: Operation timed out]
e-dard has joined #ruby
duosrx has joined #ruby
spychalski has quit [Quit: leaving]
codelitt has quit [Ping timeout: 252 seconds]
spychalski has joined #ruby
cantonic has quit [Quit: cantonic]
pepper_chico has quit [Quit: Computer has gone to sleep.]
clooth has quit [Read error: Connection reset by peer]
codelitt has joined #ruby
<e-dard> Hi, what' the right way to escape a string that contains a single quote in ActiveRecord?
bean__ is now known as bean|work
shevy has quit [Ping timeout: 248 seconds]
clooth has joined #ruby
<onewheelskyward> Double quote it?
<e-dard> onewheelskyward: I mean the right function. I've tried ActiveRecord::Base.connection.quote_string(input) but doesn't seem to be going job
<e-dard> doing*
<onewheelskyward> Ah, sorry. I'm more of a datamapper guy.
<e-dard> (before anyone asks there is a reason why not using ORM and using native string queries, yes I'm aware of risks etc)
pepper_chico has joined #ruby
pepper_chico has quit [Max SendQ exceeded]
pepper_chico has joined #ruby
cantonic has joined #ruby
pepper_chico has quit [Max SendQ exceeded]
<MrZYX> that's a #rubyonrails question but you want to interpolate it into the query by specifying a ? in the query where the value should be placed and then passing it as additional arguments to whatever function you're calling
pepper_chico has joined #ruby
codelitt has quit [Ping timeout: 252 seconds]
<MrZYX> like .where("foo = ? AND bar = ?", "I'm evil", "I'm too")
<jani> trying to learn mixins with ruby, could someone check this example and point me to right direction on how to archive this ? or even if its possible: http://pastebin.com/gM9QzQS0
jamesfung14 has quit [Quit: Leaving]
yekta has joined #ruby
Takehiro has quit [Ping timeout: 276 seconds]
codelitt has joined #ruby
<jani> basicly, i have a module that i've extended into a class but i would like to expose String's methods so that they would be apply to internal variable - possible ?
<kondi> apparently madeleine does the job. Anyways thanks.
kondi has left #ruby [#ruby]
<bean|work> jani: of course it's possible, you really havent shown much code though
kpshek has quit []
<jsonperl> jani: look into the forwardable module
kpshek has joined #ruby
motto has quit [Changing host]
motto has joined #ruby
motto is now known as m8
chussenot has joined #ruby
tcstar has joined #ruby
_nitti has joined #ruby
<jani> jsonperl: thanks!
banjara has quit [Quit: Leaving.]
mattbl has quit [Quit: This computer has gone to sleep]
codelitt has quit [Ping timeout: 256 seconds]
banjara has joined #ruby
codelitt has joined #ruby
razibog has quit [Ping timeout: 260 seconds]
eldariof has quit []
banjara has quit [Client Quit]
banjara has joined #ruby
neku has joined #ruby
banjara has quit [Client Quit]
banjara has joined #ruby
Morkel has quit [Read error: Connection reset by peer]
banjara has quit [Client Quit]
mityaz has quit [Quit: See ya!]
Squarepy has quit [Read error: Connection reset by peer]
banjara has joined #ruby
kirun has joined #ruby
Blaze_Boy_ has joined #ruby
shevy has joined #ruby
banjara has quit [Client Quit]
ananthakumaran has quit [Quit: Leaving.]
Blaze_Boy has quit [Ping timeout: 264 seconds]
Blaze_Boy_ is now known as Blaze_Boy
banjara has joined #ruby
pepper_chico has quit [Quit: Computer has gone to sleep.]
Morkel has joined #ruby
banjara has quit [Client Quit]
khismetix has quit [Quit: Computer has gone to sleep.]
banjara has joined #ruby
banjara has quit [Client Quit]
joofsh_ has joined #ruby
codelitt has quit [Ping timeout: 272 seconds]
banjara has joined #ruby
havenwood has quit [Ping timeout: 245 seconds]
codelitt has joined #ruby
banjara has quit [Client Quit]
banjara has joined #ruby
banjara has quit [Client Quit]
banjara has joined #ruby
neurone-1337 has quit [Read error: Operation timed out]
alex__c2022 has quit [Quit: alex__c2022]
banjara has quit [Client Quit]
banjara has joined #ruby
joofsh has quit [Ping timeout: 255 seconds]
banjara has quit [Client Quit]
Goles has quit [Quit: Out.]
banjara has joined #ruby
op84 has quit [Quit: op84]
banjara has quit [Client Quit]
banjara has joined #ruby
banjara has quit [Client Quit]
codelitt has quit [Ping timeout: 245 seconds]
banjara has joined #ruby
neurone-1337 has joined #ruby
banjara has quit [Client Quit]
banjara has joined #ruby
codelitt has joined #ruby
banjara has quit [Client Quit]
banjara has joined #ruby
Proshot has quit [Read error: Connection reset by peer]
banjara has quit [Client Quit]
<aedorn> So much quit spam
banjara has joined #ruby
<shevy> aedorn I always toggle to not see that kind of spam
Proshot has joined #ruby
banjara has quit [Client Quit]
Blaze_Boy has quit [Ping timeout: 245 seconds]
banjara has joined #ruby
banjara has quit [Client Quit]
banjara has joined #ruby
<aedorn> I should probably do the same at this rate
dhruvasagar has quit [Ping timeout: 276 seconds]
swex_ has quit [Read error: Operation timed out]
lushious has joined #ruby
Virunga is now known as [_nina_]
workmad3 has joined #ruby
kristofers has quit [Read error: Connection reset by peer]
codelitt has quit [Ping timeout: 260 seconds]
[_nina_] is now known as Virunga
codelitt has joined #ruby
swex has joined #ruby
kristofers has joined #ruby
carraroj has joined #ruby
<jani> jsonperl: thanks once more ... that was alot easier than i expected..
dustint has quit [Remote host closed the connection]
Proshot is now known as statarb3
statarb3 has quit [Changing host]
statarb3 has joined #ruby
philcrissman has quit [Remote host closed the connection]
Bry8Star has quit [Remote host closed the connection]
dmerrick has joined #ruby
Takehiro has joined #ruby
codelitt has quit [Read error: Connection reset by peer]
hadees has quit [Quit: hadees]
Nisstyre-laptop has quit [Quit: Leaving]
carbncl has joined #ruby
rickmasta has joined #ruby
chussenot has quit [Quit: chussenot]
jsonperl has left #ruby [#ruby]
jean-louis has joined #ruby
philcrissman has joined #ruby
etcetera has quit []
Takehiro has quit [Ping timeout: 250 seconds]
ryanf has joined #ruby
dustint has joined #ruby
mneorr_ has joined #ruby
mneorr has quit [Read error: Connection reset by peer]
etcetera has joined #ruby
duosrx has quit [Remote host closed the connection]
mulinux has joined #ruby
rickmasta has quit [Read error: Connection reset by peer]
rickmasta has joined #ruby
jamesfung14 has joined #ruby
carbncl has quit [Quit: carbncl]
etcetera has quit [Client Quit]
pdamer has quit [Quit: pdamer]
Nisstyre-laptop has joined #ruby
hbpoison has joined #ruby
thinkclay has joined #ruby
khismetix has joined #ruby
atyz has quit [Ping timeout: 245 seconds]
mfletcher has joined #ruby
spychalski has quit [Quit: leaving]
Hanmac1 has quit [Ping timeout: 252 seconds]
dmiller has quit [Read error: Connection reset by peer]
dmiller1 has joined #ruby
SolidResolve has joined #ruby
SolidResolve has quit [Max SendQ exceeded]
reset has joined #ruby
Hanmac has joined #ruby
SolidResolve has joined #ruby
SolidResolve has quit [Max SendQ exceeded]
SolidResolve has joined #ruby
SolidResolve has quit [Max SendQ exceeded]
khismetix has quit [Ping timeout: 245 seconds]
SolidResolve has joined #ruby
SolidResolve has quit [Max SendQ exceeded]
amacleod has joined #ruby
SolidResolve has joined #ruby
SolidResolve has quit [Max SendQ exceeded]
SolidResolve has joined #ruby
SolidResolve has quit [Max SendQ exceeded]
sambio has joined #ruby
SolidResolve has joined #ruby
SolidResolve has quit [Max SendQ exceeded]
khismetix has joined #ruby
SolidResolve has joined #ruby
SolidResolve has quit [Max SendQ exceeded]
fermion has joined #ruby
moted has quit [Remote host closed the connection]
SolidResolve has joined #ruby
SolidResolve has quit [Max SendQ exceeded]
SolidResolve has joined #ruby
SolidResolve has quit [Max SendQ exceeded]
kpshek has quit []
SolidResolve has joined #ruby
SolidResolve has quit [Max SendQ exceeded]
SolidResolve has joined #ruby
SolidResolve has quit [Max SendQ exceeded]
El_loco has joined #ruby
cantonic_ has joined #ruby
znode has joined #ruby
SolidResolve has joined #ruby
SolidResolve has quit [Max SendQ exceeded]
moted has joined #ruby
SolidResolve has joined #ruby
SolidResolve has quit [Max SendQ exceeded]
joofsh_ has quit [Read error: Connection reset by peer]
ad_AA has joined #ruby
SolidResolve has joined #ruby
SolidResolve has quit [Max SendQ exceeded]
frem has quit [Quit: Farewell!]
etcetera has joined #ruby
Gwyxx has joined #ruby
SolidResolve has joined #ruby
joofsh has joined #ruby
horofox has joined #ruby
cantonic has quit [Ping timeout: 272 seconds]
cantonic_ is now known as cantonic
drumond19 has quit [Remote host closed the connection]
Stilo has quit [Quit: Textual IRC Client: www.textualapp.com]
frem has joined #ruby
heftig has joined #ruby
digifiv5e_ has quit [Ping timeout: 245 seconds]
frem has quit [Max SendQ exceeded]
znode has quit [Ping timeout: 276 seconds]
spychalski has joined #ruby
toekutr has quit [Remote host closed the connection]
workmad3 has quit [Ping timeout: 245 seconds]
kpshek has joined #ruby
lewis has quit [Remote host closed the connection]
ny11 has joined #ruby
_jc has joined #ruby
adkron_ has quit [Ping timeout: 245 seconds]
adkron has quit [Ping timeout: 250 seconds]
ny11 has quit [Read error: Connection reset by peer]
Hanmac1 has joined #ruby
ny11 has joined #ruby
elaptics`away is now known as elaptics
ny11 has quit [Read error: Connection reset by peer]
ny11 has joined #ruby
drumond1_ has joined #ruby
jonahR has quit [Quit: jonahR]
s122 has joined #ruby
drumond1_ has quit [Remote host closed the connection]
s122 has quit [Read error: Connection reset by peer]
digifiv5e has joined #ruby
Spooner has quit [Remote host closed the connection]
Mo0O has joined #ruby
s122 has joined #ruby
digifiv5e is now known as Guest90376
rippa has quit [Ping timeout: 240 seconds]
s122 has quit [Read error: Connection reset by peer]
s122 has joined #ruby
fermion has quit [Quit: Textual IRC Client: www.textualapp.com]
pepper_chico has joined #ruby
pepper_chico has quit [Max SendQ exceeded]
aqabiz has joined #ruby
flip_digits has quit [Quit: Textual IRC Client: www.textualapp.com]
pepper_chico has joined #ruby
ny11 has quit [Ping timeout: 256 seconds]
Zolo has quit [Remote host closed the connection]
chichou has quit [Remote host closed the connection]
mercwithamouth has quit [Ping timeout: 245 seconds]
lewis has joined #ruby
lewis has quit [Changing host]
lewis has joined #ruby
chichou has joined #ruby
El_loco has quit [Remote host closed the connection]
crackedmind has quit [Quit: Leaving]
Mon_Ouie has quit [Remote host closed the connection]
joeycarmello has joined #ruby
Mon_Ouie has joined #ruby
carraroj has quit [Quit: Konversation terminated!]
abdulqabiz has joined #ruby
jackjackdrpr has joined #ruby
chichou has quit [Ping timeout: 252 seconds]
prometeus has quit [Read error: Connection reset by peer]
mengu has quit [Quit: This computer has gone to sleep]
aqabiz has quit [Ping timeout: 255 seconds]
abdulqabiz is now known as aqabiz
joshman_ has quit [Quit: Textual IRC Client: http://www.textualapp.com/]
verysoftoiletppr has joined #ruby
philcrissman has quit [Remote host closed the connection]
otherj has joined #ruby
mengu has joined #ruby
axl_ has quit [Quit: axl_]
krz has quit [Quit: krz]
jonahR has joined #ruby
joshman_ has joined #ruby
ner0x has quit [Quit: Leaving]
mpfundstein has joined #ruby
philcrissman has joined #ruby
nomenkun has quit [Remote host closed the connection]
axl_ has joined #ruby
apeiros_ has quit [Remote host closed the connection]
apeiros_ has joined #ruby
frem has joined #ruby
khismetix has quit [Quit: Computer has gone to sleep.]
arya has quit [Ping timeout: 248 seconds]
testingb0t has joined #ruby
dankest has quit [Quit: Linkinus - http://linkinus.com]
kevinfagan has joined #ruby
gaahrdner has joined #ruby
verto is now known as verto|off
khismetix has joined #ruby
mneorr_ has quit [Remote host closed the connection]
arya has joined #ruby
enroxorz-work is now known as enroxorz-quit
havenwood has joined #ruby
philcrissman has quit [Remote host closed the connection]
apok has quit [Quit: apok]
mneorr has joined #ruby
Mon_Ouie has quit [Ping timeout: 276 seconds]
rezzack has joined #ruby
jackjackdrpr has left #ruby [#ruby]
ngoldman_ has quit [Read error: Connection reset by peer]
agjacome has quit [Ping timeout: 264 seconds]
ngoldman has joined #ruby
jonathanwallace has quit [Quit: WeeChat 0.3.9.2]
joeycarm_ has joined #ruby
joeycarmello has quit [Read error: Connection reset by peer]
jonathanwallace has joined #ruby
Nisstyre-laptop has quit [Ping timeout: 250 seconds]
otherj has quit []
dblack__ has quit [Quit: dblack__]
Mon_Ouie has joined #ruby
Davey has joined #ruby
otherj has joined #ruby
yekta has quit [Quit: yekta]
arya has quit [Ping timeout: 248 seconds]
_whitelogger has joined #ruby
arietis has quit [Quit: Textual IRC Client: http://www.textualapp.com/]
Astralum has quit [Ping timeout: 245 seconds]
Honeycomb has quit [Quit: Leaving.]
khismetix has joined #ruby
Honeycomb has joined #ruby
sambao21 has joined #ruby
<jani> more about mixins questions: i have a string & module .. i do mystring.extend(mymodule), in modules extended method, i try to store the value of mystring to modules instance variable, but on the next call to mystring.methodfrommodule, instance variable is nil. What am i missing ?
<csmrfx> dude
<csmrfx> gist or pastie
alfakini has quit [Quit: Computer has gone to sleep.]
<csmrfx> paste code, output, desired output
pavilionXP has quit [Ping timeout: 248 seconds]
<csmrfx> ei voi ruveta arvailee mitä teit
<jani> csmrfx: i'll make a small example. rest of the code is so quite unreadable.
swoosh has joined #ruby
horofox has quit [Quit: horofox]
whitequark has joined #ruby
znode has joined #ruby
invisime has quit [Quit: Leaving.]
khismetix has quit [Ping timeout: 256 seconds]
rickmasta has quit [Quit: Leaving...]
jacobw has quit [Quit: WeeChat 0.4.0]
pepper_chico has quit [Quit: Computer has gone to sleep.]
mercwithamouth has joined #ruby
jpcamara has joined #ruby
Bry8Star has joined #ruby
m3pow has quit [Read error: Operation timed out]
znode has quit [Ping timeout: 255 seconds]
khismetix has joined #ruby
axl__ has joined #ruby
axl_ has quit [Ping timeout: 256 seconds]
axl__ is now known as axl_
hiroyuki has quit [Ping timeout: 252 seconds]
pdamer has joined #ruby
biofobico has joined #ruby
ferdev has joined #ruby
biofobico has left #ruby [#ruby]
zigomir has quit [Quit: zigomir]
<jani> http://pastebin.com/gLNr1Pmm <- there .. i do understand that im not quite familiar with this sort of pattern yet so im sure this is noob question.
mercwithamouth has quit [Ping timeout: 272 seconds]
emergion has joined #ruby
hiroyuki has joined #ruby
mulinux has left #ruby [#ruby]
biofobico has joined #ruby
<apeiros_> jani: self.extended is a class method of Foo. @orig therefore belongs to Foo, not the object being extended
kpshek has quit []
<apeiros_> it's not making much sense anyway, since `base` in self.extended is what `self` is in bar. and that doesn't change.
tvw has joined #ruby
<lewis> I'm playing around with code blocks. http://pastie.org/private/lkaxirej4dkijsbqmjifq , why is that the "def my_times2" returns an error
aib has quit [Quit: So long and thanks for all the fish.]
biofobico has quit [Quit: biofobico]
fmcgeough has quit [Quit: fmcgeough]
<sam113101> you miss an "end", don't you?
<lewis> oh shit
<lewis> fuuu end
piotr_ has quit [Remote host closed the connection]
<lewis> It just took 30min of my life
otherj has quit []
<lewis> sam113101: thanks
<sam113101> np
lewis is now known as lewix
Clownz has joined #ruby
yalue has quit [Quit: Leaving]
joeycarm_ has quit [Read error: Connection reset by peer]
pdamer has quit [Quit: pdamer]
joeycarmello has joined #ruby
Zolo has joined #ruby
<jani> apeiros_: got that, atleast partially. so if extended would be changed to instance method, @orig's context would switch to instance too ? this is the part i dont quite get yet.
mneorr has quit [Ping timeout: 250 seconds]
Zolo has quit [Remote host closed the connection]
krawchyk has quit [Ping timeout: 276 seconds]
slainer68 has joined #ruby
m8 has quit [Quit: Sto andando via]
mneorr has joined #ruby
<jani> but then again, result is exactly the same - which quite clearly says to me that i don't quite get the big picture ;)
vandemar has joined #ruby
enroxorz-quit has quit [Remote host closed the connection]
clarkf has joined #ruby
sailias has quit [Ping timeout: 264 seconds]
<MrZYX> hm, how unexpected, I found something I can't overwrite. Looks like you can't trick case statements
bluOxigen has quit [Ping timeout: 276 seconds]
mark_locklear has quit [Ping timeout: 245 seconds]
pavilionXP has joined #ruby
<clarkf> Okay, this is driving me nuts. I can't seem to get nokogiri to install under OS X 10.7 with rbenv and libxml2/libxslt via homebrew. mkmf.log: https://gist.github.com/clarkf/ea413b4f2dac4fe9ff87
<onewheelskyward> oh, libiconv.
<onewheelskyward> clarkf You can try installing libiconv via homebrew for the compilation.
<onewheelskyward> wait, why is it looking for things in /opt/local/include?
<clarkf> That's exactly my question
<onewheelskyward> Any chance you have old macports stuff lingering?
<clarkf> It provides a `--with-opt-dir` option
geekbri has quit [Remote host closed the connection]
<clarkf> macports was never installed on this system
Rioji has quit [Remote host closed the connection]
<onewheelskyward> Do you have an /opt folder?
Axsuul has joined #ruby
<clarkf> Yeah
geggam__wk has joined #ruby
<onewheelskyward> weird. Something went and pooped there.
razibog has joined #ruby
geggam_wk has quit [Ping timeout: 245 seconds]
<onewheelskyward> Anything in your env, clarkf? set | grep /opt
<clarkf> _=/opt/local/include
<clarkf> No clue where that's coming from. The only stuff in /opt/local/include is SDL stuff
s__dana has quit [Quit: s__dana]
apeiros_ has quit [Remote host closed the connection]
<clarkf> It's not being set by ~/.bash_profile
horofox_ has joined #ruby
freakazoid0223 has quit [Read error: Connection reset by peer]
<onewheelskyward> the underscore has a specific purpose, "The underscore variable is set at shell startup and contains the absolute file name of the shell or script being executed as passed in the argument list. "
spider-mario has quit [Read error: Connection reset by peer]
<clarkf> Wait, upon running it again, _ is no longer set
<onewheelskyward> It gets rewritten a lot.
apeiros_ has joined #ruby
Mon_Ouie has quit [Ping timeout: 260 seconds]
<onewheelskyward> So. I'm running nokogiri within my bundle on 10.8 so I know it's possible. Which ruby are you running?
Azrial has joined #ruby
<clarkf> So, it's probably getting rewritten during the gem i process?
<clarkf> 1.9.3-p392
Myconix has joined #ruby
`p has quit [Ping timeout: 252 seconds]
<onewheelskyward> Me too.
emergion has quit [Quit: Computer has gone to sleep.]
<onewheelskyward> What happens if you gem i nokogiri without the extra args?
aqabiz has quit [Quit: aqabiz]
<clarkf> cc1: error: /opt/local/include/libxml2: Permission denied
neku has quit [Quit: Linkinus - http://linkinus.com]
<onewheelskyward> That's goofball.
kofno has quit [Remote host closed the connection]
backjlack has joined #ruby
<onewheelskyward> Just a sanity check- if you which gem, it's the shim?
wobblini has joined #ruby
<clarkf> Correct
Morkel has quit [Quit: Morkel]
<clarkf> Also `which ruby` returns the shim
<onewheelskyward> So where is that drawing it's environment from? Clearly something's telling it to use /opt/local.
<onewheelskyward> and ruby --version is 1.9.3?
<clarkf> `ruby --version` => ruby 1.9.3p392 (2013-02-22 revision 39386) [x86_64-darwin11.4.2]
interactionjaxsn has quit [Remote host closed the connection]
<onewheelskyward> good.
<onewheelskyward> Yeah, it's there in the log, too.
breakingthings has joined #ruby
<onewheelskyward> mkmf.log line 12 has, among other things, -I/opt/local/include
tommyvyo has quit [Quit:]
<onewheelskyward> We need to get rid of that
<clarkf> Maybe try with `--without-opt-dir`?
etcetera has quit []
hiroyuki has quit [Ping timeout: 260 seconds]
k776 has joined #ruby
fuzai_ has joined #ruby
<k776> Hello. GC.start or ObjectSpace.garbage_collect ?
dsf has joined #ruby
fuzai has quit [Read error: Connection reset by peer]
fuzai_ is now known as fuzai
<k776> (or are they the same thing?)
<onewheelskyward> Couldn't hurt clarkf. :)
freakazoid0223 has joined #ruby
cnrk has joined #ruby
gabrielrotbart has joined #ruby
<onewheelskyward> Interesting… when I compile nokogiri -V I see this: ld: warning: directory not found for option '-L/opt/local/lib'
<onewheelskyward> so it seems I have it in there too, but since I don't have a /opt it doesn't bite me.
adkron__ has quit [Ping timeout: 276 seconds]
<clarkf> Doesn't seem to do much
etcetera has joined #ruby
elux has quit [Ping timeout: 264 seconds]
<clarkf> That's bizarre
mikurubeam has joined #ruby
<onewheelskyward> Indeed.
<Quadlex> OK
<Quadlex> I can't brain today
<Quadlex> If I wanted to add a method to a class
<Quadlex> To create a custom attr_accessor like thing
<Quadlex> That should just be def self.custom_thing
<Quadlex> right?
<Quadlex> NO!
<Quadlex> I think
<clarkf> `def self.custom_thing` is a class level method
<clarkf> `def custom_thing` is an instance level method
takeru has joined #ruby
<Quadlex> I know that
<havenwood> Quadlex: What are you trying to do?
dmerrick has quit [Quit: dmerrick]
<Quadlex> I can't remember how the instantiation process works is all:P
<jani> seems to be repeating pattern ;)
<Quadlex> havenwood: I want to create a thingo_attr_accessor
<Quadlex> that does custom logic
kristofers has quit []
<Quadlex> Each symbol passed to thingo_attr_accessor is used a the argument to self.define_method
<Quadlex> Giving instances of that class access to the method
<wobblini> Quadlex: it sounds like you're on the right track
<Quadlex> AFAIA
<clarkf> `def thingo_attr_accessor(*args)`?
Radnor has quit [Quit: w]
<Quadlex> The problem I'm having is the invocation of the custom_attr_accessor
<Quadlex> It's not being found by the class itself
<Quadlex> so it never gets called
<havenwood> Quadlex: Can you Gist what you have so far?
Blaze_Boy has joined #ruby
<Quadlex> Sure
<wobblini> Quadlex: yeah, what havenwood said :-)
jcrawford has quit [Ping timeout: 276 seconds]
hiroyuki has joined #ruby
tommyvyo has joined #ruby
nateberkopec has quit [Quit: Leaving...]
wobblini is now known as realDAB
takeru has quit [Ping timeout: 255 seconds]
<realDAB> i'm having such a nick identity crisis in the post-dblack days
emergion has joined #ruby
idkazuma has joined #ruby
<clarkf> onewheelskyward: It looks like you were completely right, it was the existence of `/opt` that was making things funky
musl has quit [Ping timeout: 255 seconds]
uxp has quit [Ping timeout: 252 seconds]
<onewheelskyward> removed it and it worked?
<clarkf> sudo mv /opt /opt2; ./install_nokogiri.sh; sudo mv /opt2 /opt
<clarkf> Worked
<onewheelskyward> lol
<onewheelskyward> now we know.
xiphiasx_ has quit [Ping timeout: 276 seconds]
<clarkf> No clue why or how, but at least I can use capybara now
sambao21 has quit [Quit: sambao21]
jcrawford has joined #ruby
<k776> Hello. GC.start or ObjectSpace.garbage_collect ? (or are they the same thing?)
<realDAB> Quadlex: well the first thing i notice is that you're calling the method before you define it
<Quadlex> realDAB: Doesn't the interpreter just deal with that?
musl has joined #ruby
cousine has joined #ruby
<realDAB> Quadlex: no. it will deal with a reference from one method to another, but not a top-level reference to an undefined method
<realDAB> Quadlex: also it does indeed seem to be a top-level method, whereas you almost certainly would want to have it as a class method of some class (or module) (or an instance method of Module)
ngoldman_ has joined #ruby
<Quadlex> DEEERP
<Quadlex> TIL
alvaro_o_ has quit [Read error: Connection reset by peer]
<Quadlex> That was all it was
<Quadlex> *sigh*
<Quadlex> TY realDAB, you are a Gentleperson and a Scholar
alvaro_o has joined #ruby
<realDAB> Quadlex: glad to 'elp :-)
<Quadlex> I think there's levels of skill with a language
grayson has quit [Quit: Computer has gone to sleep.]
uxp has joined #ruby
<Quadlex> And you pick up the syntax and the idiom
<realDAB> Quadlex: is this all actually inside a class definition?
<Quadlex> And then the next stage is coming to terms with HOW shit actually happens
alvaro_o has quit [Remote host closed the connection]
<Quadlex> And I'm there
k776 has left #ruby [#ruby]
<Quadlex> realDAB: Yes
xiphiasx_ has joined #ruby
<havenwood> Quadlex: I thought at first you meant you were trying to do something like this: https://gist.github.com/havenwood/5094934
<Quadlex> So def.self
sambao21 has joined #ruby
clarkf has quit [Remote host closed the connection]
<realDAB> Quadlex: the class def part didn't come through in the gist so i wasn't sure
<realDAB> Quadlex: you can always do def self.... whether self is a class or not. in this case it just wouldn't make much sense :-)
cousine_ has quit [Ping timeout: 255 seconds]
alvaro_o has joined #ruby
_nitti has quit [Remote host closed the connection]
<Quadlex> realDAB: I was trying to cut out extraneous details
<realDAB> Quadlex: mind you, i haven't really looked at what the method *does*, but that's another story :-)
pyrac has quit [Quit: pyrac]
newUser1234 has quit [Remote host closed the connection]
<Quadlex> Well naturally:P
ngoldman has quit [Ping timeout: 245 seconds]
carloslopes has quit [Remote host closed the connection]
shadowshell has quit [Remote host closed the connection]
mengu has quit [Quit: Leaving]
d2dchat has quit [Remote host closed the connection]
<realDAB> Quadlex: where does updated_fields come from?
<realDAB> (just curious what the rest of it consists of)
xardas has quit [Quit: ChatZilla 0.9.90 [Firefox 19.0.1/20130226172142]]
mpfundstein has quit [Read error: Connection reset by peer]
<Quadlex> realDAB: It's an instance method/variable
mpfundstein has joined #ruby
ozgura has quit [Remote host closed the connection]
solidoodlesuppor has quit [Remote host closed the connection]
cousine has quit [Remote host closed the connection]
atmosx has joined #ruby
sailias has joined #ruby
<realDAB> gogiel: ping
nkr has quit [Quit: Linkinus - http://linkinus.com]
`p has joined #ruby
mneorr_ has joined #ruby
mneorr has quit [Read error: Connection reset by peer]
phantasm66 has quit [Quit: *sleeeep….]
_jc has quit [Quit: Textual IRC Client: www.textualapp.com]
PragCypher has joined #ruby
adkron has joined #ruby
adkron_ has joined #ruby
sambao21 has quit [Quit: sambao21]
junidu has joined #ruby
iamjarvo has quit [Ping timeout: 252 seconds]
emmanuelux has joined #ruby
<junidu> Hi everyone. object_id - unique for every object, but how does that work when there are 2^31 Fixnum object instances, around 2^64 Float instances, plus all the other objects, and only 2^31 possible object ids
v0n has quit [Read error: Operation timed out]
mfletcher has quit []
uxp has quit [Read error: Operation timed out]
xiphiasx_ has quit [Ping timeout: 276 seconds]
musl has quit [Ping timeout: 255 seconds]
adkron has quit [Ping timeout: 256 seconds]
uxp has joined #ruby
razibog has quit [Ping timeout: 255 seconds]
Kuifje has quit [Ping timeout: 245 seconds]
<whitequark> it's wider on 64bit but the idea is the same
<lewix> what exactly does puts and p do to an array . supposedly it puts call .to_s and p calls .inspect but it seems to work a little bit differently for arrays
adkron_ has quit [Ping timeout: 256 seconds]
musl has joined #ruby
sambao21 has joined #ruby
<havenwood> If called with an array argument, writes each element on a new line.
<lewix> havenwood: so it does not call .to_s
<junidu> aah, it can return a Bignum, that makes sense then
<whitequark> junidu: the idea is that all distinct objects addressable by ruby are distinct VALUEs, so if we can map VALUE to object_id 1:1 in a some way we're good
<whitequark> yea
<havenwood> lewix: Just a quirk of #puts. It actually does call #to_s, on each element.
dustint has quit [Quit: Leaving]
wmoxam has quit [Ping timeout: 240 seconds]
<havenwood> lewix: i.e.: puts [1, 2, 3] == puts 1, 2, 3 == puts 1; puts 2; puts 3
<havenwood> **same output i mean ^
<lewix> havenwood: right it just doesnt actually do what [1,2,3].to_s
<havenwood> lewix: [1,2,3].each(&:to_s)
tommyvyo has quit [Quit:]
<lewix> havenwood: why is that the output you get from IRB when you use p is different from the one with ruby
jonathanwallace has quit [Ping timeout: 256 seconds]
xiphiasx_ has joined #ruby
<havenwood> lewix: It doesn't?
qhartman has quit [Ping timeout: 245 seconds]
musl has quit [Read error: Connection reset by peer]
Guest90376 has quit [Ping timeout: 245 seconds]
<havenwood> lewix: Have an example?
musl has joined #ruby
dougireton has joined #ruby
d2dchat has joined #ruby
<lewix> my irb crashes a lot ah
<lewix> havenwood: hold on
<havenwood> lewix: Only thing I can think of is if you're running 1.9+ on one and 1.8 on the other, maybe?
<havenwood> Don't. Use. 1.8. :P
kevinfagan has quit [Quit: Leaving...]
<lectrick> How do I redirect where "puts" goes temporarily?
adamjleonard has quit [Quit: Leaving...]
<lectrick> basically send stdout to /dev/null within a block
<havenwood> lectrick: change $stdout
PragCypher has quit [Quit: Leaving]
`p- has joined #ruby
`p has quit [Ping timeout: 245 seconds]
<lewix> havenwood: ok. how about p, it does call inspect right?
sambao21 has quit [Quit: sambao21]
generalissimo has quit [Remote host closed the connection]
tricon_ has joined #ruby
pdamer has joined #ruby
khismetix has quit [Quit: Computer has gone to sleep.]
kaen has joined #ruby
<havenwood> lectrick: StringIO
ffranz has quit [Quit: Leaving]
sambao21 has joined #ruby
<lewix> havenwood: it doesn't look like it
<havenwood> lectrick: Avdi did a great example of doing something just like that in a RubyTapas episode, sec.
sailias has quit [Quit: Leaving.]
sambao21 has quit [Client Quit]
pdamer has quit [Client Quit]
breakingthings has quit []
zekriad has quit [Quit: Computer has gone to sleep.]
bnjamin has joined #ruby
junidu has quit [Quit: Page closed]
qhartman has joined #ruby
alanp_ has joined #ruby
alanp has quit [Disconnected by services]
alanp_ is now known as alanp
etcetera has quit []
<felixjet> im doing tryruby.org tutorial but.... there is a lesson at the start that say use "poem.lines.to_a.reverse" and it just doesnt work! http://ideone.com/jGnzgT
Blaze_Boy has quit [Ping timeout: 272 seconds]
joeycarmello has quit [Read error: Connection reset by peer]
`p- has quit [Ping timeout: 272 seconds]
joeycarmello has joined #ruby
s122 has quit [Ping timeout: 252 seconds]
pdamer has joined #ruby
shevy has quit [Ping timeout: 252 seconds]
<felixjet> i think tryruby.org is just f*cked
<felixjet> it doesnt work as expected, what a way to learn..
<lewix> felixjet: idon't think you need to_a
JaTochNietDan has quit [Ping timeout: 256 seconds]
<felixjet> the tutorial say it
<felixjet> plus in the tutorial interpreter it works
brimil01 has left #ruby ["Linkinus - http://linkinus.com"]
mneorr_ has quit [Remote host closed the connection]
<felixjet> > poem.lines­.reverse
<felixjet> => #<NoMethodError: undefined method `reverse' for #<Enumerator:0x4244afa4>>
<felixjet> wtf why appears a "-"
JaTochNietDan has joined #ruby
<lewix> felixjet: oh sorry. what was the error message you got before
<felixjet> nothing
<felixjet> it just doesnt work
<havenwood> lectrick: What I was thinking: https://gist.github.com/havenwood/5095222
khismetix has joined #ruby
pdamer has quit [Quit: pdamer]
<havenwood> lectrick: Avdi gives a bunch of examples. Could actually send it to /dev/null if you wanted, ^ i just send it here to a StringIO object and do nothing with it
kirun has quit [Quit: Client exiting]
atmosx has quit [Quit: And so the story goes…]
<havenwood> lectrick: If that is even what you meant?
sambao21 has joined #ruby
<MrZYX> felixjet: you're not catching the return value, all those methods operate on copies and return those modified copies. it "works" in the tutorial interpreter because it prints the return value
Radnor has joined #ruby
etcetera has joined #ruby
<lewix> MrZYX: use reverse!
backjlack has quit [Remote host closed the connection]
mmitchell has quit [Ping timeout: 264 seconds]
<MrZYX> lewix: well you can't chain that then
ozgura has joined #ruby
<lewix> MrZYX: you can't?
wmdom25_ has joined #ruby
[Neurotic]_ is now known as [Neurotic]
<vandemar> would it be considered bad coding style if there's a hash with a bunch of keys, and values to validate, to have another hash mapping keys to anonymous blocks that validate the values in the first hash?
<felixjet> well, the tutorial is broken..
<MrZYX> lewix: nope, usually bang methods only return something when they change something, so you quickyl run into a nil
<felixjet> even if i dont modify vars, they do
<felixjet> :/
imitkit has quit [Quit: imitkit]
jtharris has quit [Quit: WeeChat 0.4.0]
bean|work has quit [Quit: Computer has gone to sleep.]
ad_AA has quit [Ping timeout: 276 seconds]
horofox_ has quit [Quit: horofox_]
swex has quit [Remote host closed the connection]
hackeron_ is now known as hackeron
hackeron has quit [Changing host]
hackeron has joined #ruby
swex has joined #ruby
poikon has joined #ruby
dmiller1 has quit [Ping timeout: 272 seconds]
shevy has joined #ruby
`p- has joined #ruby
<shevy> test
<sam113101> tset
tvw has quit []
<havenwood> lectrick: Updated Gist to properly send output to null.
Radnor has quit [Quit: leaving]
kofno has joined #ruby
<shevy> sam113101 my internet connection was down :(
khismetix has quit [Quit: Computer has gone to sleep.]
anonymuse has quit [Read error: Connection reset by peer]
poikon has quit [Ping timeout: 240 seconds]
markalanevans has joined #ruby
wmdom25_ has left #ruby [#ruby]
<havenwood> Hrmm, am I leaving IO::NULL open there? ^^
enroxorz has joined #ruby
enroxorz has quit [Changing host]
enroxorz has joined #ruby
banseljaj is now known as imami|afk
ad_AA has joined #ruby
d2dchat has quit [Remote host closed the connection]
apeiros_ has quit [Remote host closed the connection]
j^2 has quit [Ping timeout: 255 seconds]
tricon_ has quit [Quit: Leaving...]
pdamer has joined #ruby
<havenwood> lectrick: Oops, yeah i had left the file open, fixed in gist.
adkron has joined #ruby
Triconium has joined #ruby
jpcamara has quit [Quit: jpcamara]
dougireton has quit [Quit: Leaving.]
locriani has quit [Remote host closed the connection]
adkron_ has joined #ruby
joeycarmello has quit [Read error: Connection reset by peer]
kofno has quit [Ping timeout: 245 seconds]
joeycarmello has joined #ruby
pdamer has quit [Client Quit]
Stilo has quit [Quit: Textual IRC Client: www.textualapp.com]
drale2k has quit [Quit: Leaving...]
dougireton has joined #ruby
drale2k has joined #ruby
enroxorz has quit [Ping timeout: 245 seconds]
Scriptonaut has joined #ruby
<lewix> felixjet: sorry i was eating. http://pastie.org/private/n3sb7lgbvncjwkarkv9ng
moshee has quit [Quit: ZNC - http://znc.in]
moshee has joined #ruby
<lewix> MrZYX: I thought lines returned an array..and we didn't need to_a
jpcamara has joined #ruby
tenmilestereo has quit [Quit: Leaving]
<Scriptonaut> Hey guys, when using ruby regex's, how do I make match = /<textarea/ =~ line; return the position at the end of the match
jpcamara has quit [Remote host closed the connection]
<MrZYX> lewix: in 2.0 it does, not in 1.9
<havenwood> Yup, works in latest stable Ruby release. :)
SCommette has quit [Quit: SCommette]
rickmasta has joined #ruby
libryder has quit [Ping timeout: 245 seconds]
<_br_> Scriptonaut: Are you using Regular expressions to match against HTML/XML ?
amacleod has quit [Quit: Leaving]
mercwithamouth has joined #ruby
<Scriptonaut> _br_ yep :)
<dsf> Scriptonaut, can you please specify your problem more clear?
ngoldman has joined #ruby
<Scriptonaut> dsf, so, when you use the operator =~ in ruby, it returns an index of the match
<Scriptonaut> for a patter in a regular expression
<_br_> Scriptonaut: Never ever parse HTML/XML with regular expressions, that nonsense. For that there are plenty of parsers.
<Scriptonaut> I want it to return the end of the patter
<Scriptonaut> _br_ why?
jonahR has quit [Quit: jonahR]
<Scriptonaut> I'm just making a quick script that I'm going to use once
<havenwood> Scriptonaut: Nokogiri is very nice.
Gues_____ has joined #ruby
jrajav has joined #ruby
<Scriptonaut> I have about 500 electronic forms, and the guy who wrote them used style="width:655" without the px at the end
<havenwood> (For parsing (X)HTML)
<Scriptonaut> havenwood, I've actually used Nokogirl when I was writing rails apps
tommyvyo has joined #ruby
Gues_____ is now known as flip_digits
<MrZYX> so you want to just add the px?
<onewheelskyward> nokogiri++
<Scriptonaut> yes
<Scriptonaut> because we're moving to html5 doctypes
<Scriptonaut> and if you don't specify px, it relies on cols
<_br_> Scriptonaut: a.) every time you parse a HTML/XML document with regex'es a kitten dies. b.) Use Nokogiri it has nice selector syntax and can probably easily give you what you want.
<MrZYX> .gsub(/width:(\d+)/, "width:\1px")
Whatyousay has joined #ruby
<Scriptonaut> MrZYX, thanks :)
<Scriptonaut> _br_, I gotta be quick and dirty here
<lewix> MrZYX: lewix: nope, usually bang methods only return something when they change something, so you quickyl run into a nil. ==> I thought the bang method changed the copied array
Stilo has joined #ruby
ngoldman_ has quit [Ping timeout: 260 seconds]
<_br_> Scriptonaut: the poor kittens ;)
<Scriptonaut> if what they say about masturbating is true I've already commited genocide, 500 more won't hurt
<Scriptonaut> thanks again guys
znode has joined #ruby
joeycarmello has quit [Read error: Connection reset by peer]
<_br_> ^^
<MrZYX> lewix: well true in this case, still the variable would go unaffected so not what he wanted in this case anyway
joeycarmello has joined #ruby
arya has quit [Ping timeout: 255 seconds]
emergion has quit [Quit: Computer has gone to sleep.]
Whatyousay has quit [Client Quit]
Whatyousay has joined #ruby
tjbiddle has joined #ruby
joeycarmello has quit [Read error: Connection reset by peer]
Whatyousay has left #ruby [#ruby]
arya has joined #ruby
<realDAB> Scriptonaut: if you ever need the offset where a particular match begins and ends, look into MatchData objects and their begin, end, and offset methods
<dsf> MrZYX, Scriptonaut: I guess you need "\\1"
joeycarmello has joined #ruby
<MrZYX> yeah I always mess that up :P
<dsf> MrZYX, it happened to me to. ;-)
znode has quit [Ping timeout: 245 seconds]
<Scriptonaut> realDAB, today I learned, thanks
geggam__wk has quit [Read error: Connection reset by peer]
<Scriptonaut> dsf, Hmm, i replaced \1 with \\1, not working as planned
joeycarmello has quit [Remote host closed the connection]
<MrZYX> you might want to be tolerant about whitespace: .gsub(/width:\s*(\d+)/, "width: \\1px")
marcux has joined #ruby
anderse has quit [Quit: anderse]
tjbiddle has quit [Quit: tjbiddle]
<_br_> Interesting Vim Git Gutter... https://github.com/airblade/vim-gitgutter
<vandemar> is there a better/more idiomatic/cleaner way of doing this? (assuming foo_data is externally provided) http://pastebin.com/UbBwhhT6
<dsf> Scriptonaut, "123".gsub(/^\d(\d{2})$/, "hello\\1hello")
marcux has quit [Client Quit]
<dsf> Scriptonaut, try it in IRB
marcux has joined #ruby
<dsf> Scriptonaut, you're problem maybe the complexity of the string.
<dsf> Scriptonaut, You need to guarantee the match.
maxmanders has quit [Quit: Computer has gone to sleep.]
poikon has joined #ruby
Y_Ichiro has quit [Quit: http://quassel-irc.org - Chat comfortably. Anywhere.]
marcux has quit [Client Quit]
stopbit has quit [Quit: Leaving]
marcux has joined #ruby
gaahrdner has quit [Remote host closed the connection]
emergion has joined #ruby
gyre007 has quit [Ping timeout: 276 seconds]
slyv has joined #ruby
marcux has quit [Client Quit]
marcux has joined #ruby
marcux has quit [Client Quit]
enroxorz has joined #ruby
marcux has joined #ruby
Y_Ichiro has joined #ruby
Y_Ichiro has quit [Changing host]
Y_Ichiro has joined #ruby
marcux has quit [Client Quit]
Yakko has quit [Remote host closed the connection]
marcux has joined #ruby
<Scriptonaut> dsf, I'm playing around with it. Now it's detecting an exact match, but replacing the entire thing with just 'px'
<dsf> Scriptonaut, it's because you are missing the parenthesis. So if you don't have parenthesis you have an empty match. "\\1" will be nil.
philcrissman has joined #ruby
jgarvey has quit [Quit: Leaving]
<dsf> Scriptonaut, It works like this: 123.gsub(/^\d(\d)(\d)$)/, "\\1") => 2
<Clownz> /exit
<dsf> Scriptonaut, It works like this: 123.gsub(/^\d(\d)(\d)$)/, "\\2") => 3
Clownz has quit [Quit: leaving]
EPIK has joined #ruby
poikon has quit [Ping timeout: 245 seconds]
philcrissman has quit [Remote host closed the connection]
<dsf> Scriptonaut, The first matches the number within the first parenthesis pair and the former the number in the second parenthesis.
jonathanwallace has joined #ruby
F1skr has quit [Quit: WeeChat 0.4.0]
<Scriptonaut> dsf, thanks that was it