fflush changed the topic of #ruby to: Ruby 1.9.3-p194: http://ruby-lang.org || Paste > 3 lines of text on pastebin.com
phinfonet has joined #ruby
g_rotbart has joined #ruby
katherinem13 has quit [Quit: Might IS right.]
katherinem13 has joined #ruby
lkahtz has joined #ruby
<lkahtz> Hello there~ Any one can help me out with this question?
tomzx_ has quit [Ping timeout: 246 seconds]
Gab0 has joined #ruby
vvgomes has quit [Read error: Connection reset by peer]
vvgomes has joined #ruby
th3g33k has joined #ruby
tommyvyo has joined #ruby
`brendan has quit [Quit: - nbs-irc 2.39 - www.nbs-irc.net -]
iamjarvo has quit [Read error: Connection reset by peer]
vvgomes has quit [Read error: Operation timed out]
<ryanf> lkahtz: you could use flat_map
johnjohnson has joined #ruby
linoj has joined #ruby
dibgreg has joined #ruby
<lkahtz> Thanks~ That's something I didn't realize before
<dibgreg> join #rails
<lkahtz> ryanf: Thanks~ That's something I didn't realize before
axl_ has joined #ruby
r1chelt has joined #ruby
dibgreg has quit [Client Quit]
r1chelt has quit [Quit: r1chelt]
fflush has joined #ruby
r1chelt has joined #ruby
<Spooner> lkahtz : the answer you already have does a good job.
<lkahtz> Spooner: Thanks, it takes a couple of hours of meditation :)
<Spooner> For your code, you would be better with: str.each_char.with_index.map do |s,i|
<lkahtz> right~ Spooner. That's cleaner
<lkahtz> :-)
<Spooner> Well, not really important, but avoids creating an array of chars, but rather iterates them directly. I love pointless optimisations like that :)
Gab0 has quit [Remote host closed the connection]
<Spooner> lkahtz: I'm not sure why you want to re-write permutation though. Maybe look at the C code if you are keen?
<lkahtz> Haven't check the code of each_char_with_index, but it removes the temp chars created indeed :)
<lkahtz> Just want to hone my ruby-fu... nothin' much~
<Spooner> each_char.with_index (except for each_with_index, you have to use #with_index)
<lkahtz> maybe I should read C code since it is more earth grounded
<lkahtz> cool
fridim_ has quit [Ping timeout: 246 seconds]
Synthead has joined #ruby
khakimov has quit [Quit: Computer has gone to sleep.]
<Spooner> lkahtz : You know how to get the C from pry?
<lkahtz> dunno man...
<lkahtz> but that sounds very cool
<Spooner> gem install pry pry-doc
<lkahtz> will check out :)
baroquebobcat has joined #ruby
<Spooner> open a pry session with "pry" then "show-source Array#permutation"
<lkahtz> Awesome~~~ Let me do this :-)
<banisterfiend> Spooner: did u know that we share the same girlfriend
<Spooner> What, you don't have a girlfriend either? :P
<Spooner> Oh nil, how could you two-time me?
<banisterfiend> Yeah
<lkahtz> hahaha :-D
Stalkr_ has quit [Quit: Leaving...]
deryl has quit [Quit: deryl]
deryl has joined #ruby
<Spooner> Oh, while I'm here, C question. I'm using float x = NUM2DBL(value) on Float::INFINITY and it is ending up NaN. What am I missing?
<banisterfiend> Spooner: double x
<banisterfiend> hmm
tompsony has quit [Quit: CyberScript - if you don't try it, you can't tell me it sucks. (www.cyberscript.org)]
<Spooner> Surely floats have infinity too?
<banisterfiend> naw it'll downgrade it anyway
<banisterfiend> Yeah
<Spooner> Actually, I should try it and see if it is a double issue. One minute.
moshee has quit [Ping timeout: 272 seconds]
moshee has joined #ruby
moshee has quit [Changing host]
moshee has joined #ruby
<GeekOnCoffee> Spooner: how can it be more than issue at once? :P
<Spooner> What?
<Spooner> Oh dear.
r1chelt_ has joined #ruby
alphabitcity has joined #ruby
<alphabitcity> What's the best way to write tests for a gem that wraps an authenticated API? I was thinking of using fixtures, but the tests become useless if the api changes
<GeekOnCoffee> alphabitcity: I think the idea is you should be testing your interaction, not their API
chimkan has quit [Quit: chimkan]
williamherry has joined #ruby
<alphabitcity> GeekOnCoffee: can you please clarify what you mean by interaction?
ryanf has quit [Quit: leaving]
r1chelt_ has quit [Quit: r1chelt_]
jonathanwallace has quit [Remote host closed the connection]
Foxandxss has quit [Quit: KVIrc 4.2.0 Equilibrium http://www.kvirc.net/]
krz has joined #ruby
<GeekOnCoffee> you want to test your wrapper code quickly, you almost have to assume that the API won't change
<alphabitcity> ok, so fixtures are the best bet here?
bluenemo has quit [Remote host closed the connection]
ryanf has joined #ruby
<banisterfiend> ryanf: wb
Speed has quit [Quit: When two people dream the same dream, it ceases to be an illusion.]
th3g33k has quit [Quit: Leaving.]
justsee is now known as justsee|away
ZachBeta has quit [Read error: Connection reset by peer]
ZachBeta has joined #ruby
khakimov has joined #ruby
justsee|away is now known as justsee
<Spooner> banisterfiend : Oops, I was breaking infinity myself! How careless :D
jhunter has quit [Ping timeout: 246 seconds]
<banisterfiend> Spooner: how
<Spooner> It was based on how I set values in particles. Usually I do stuff to pick a value between min and max when creating a new particle, but if both were INFINITY, it broke my naive code.
<Spooner> banisterfiend So it appeared to be creating NaN from infinity, but I was thinking it was happening earlier than it was.
<banisterfiend> oh ok
<Spooner> Coder error all the way :D
johnjohnson has quit []
lkahtz has quit [Remote host closed the connection]
jarred has joined #ruby
<Spooner> banisterfiend: And yay for printf from C. Debuggers are for the weak :D
axl_ has quit [Quit: axl_]
cantonic has quit [Read error: Connection reset by peer]
rizzy has quit [Ping timeout: 255 seconds]
ringotwo has joined #ruby
cantonic has joined #ruby
axl_ has joined #ruby
<GeekOnCoffee> alphabitcity: I'd say in general, fixtures will be your best bet
<deryl> i'm such a puts lover for debugging :) Along with well placed Binding.pry lines :)
<Spooner> deryl : p [x, y, z] for debugging, surely :D
<deryl> p puts and Binding.pry better? ;)
<alphabitcity> GeekOnCoffee: ok, thanks for the help
iori has joined #ruby
zodiak has quit [Remote host closed the connection]
luckyruby has joined #ruby
linoj has quit [Quit: linoj]
ianbrandt has quit [Quit: ianbrandt]
iori has quit [Remote host closed the connection]
vvgomes has joined #ruby
phinfonet has quit [Quit: phinfonet]
paradoja has quit [Remote host closed the connection]
Tulak has quit [Quit: Leaving.]
jsnwtsn has joined #ruby
preller has quit [Read error: Operation timed out]
fflush has quit [Ping timeout: 244 seconds]
preller has joined #ruby
liluo has joined #ruby
jonathanwallace has joined #ruby
jdiez has joined #ruby
<jdiez> hello, I come from a python background and I want to learn ruby, what are some good tutorials?
niklasb has quit [Ping timeout: 264 seconds]
techsurvivor has left #ruby ["WeeChat 0.3.8"]
<banisterfiend> jdiez: why do you want to learn ruby if you already know python?
baroquebobcat has quit [Quit: baroquebobcat]
jonnn has joined #ruby
<jdiez> why not?
<jdiez> I enjoy learning new languages
<banisterfiend> jdiez: i'm just curious
<jdiez> oh
<jdiez> I'm curious too :P
<jdiez> I don't know, some of the ruby stuff intrigues me
<banisterfiend> jdiez: cool, which ruby stuff?
<jdiez> like the method? and method!
<banisterfiend> hehe
<jdiez> I have no idea what that does
<banisterfiend> :P
<banisterfiend> jdiez: method? is just for predicates, so say i have an array
<banisterfiend> jdiez: to find out if the array is empty i go: array.empty?
<banisterfiend> and it returns true or false
<jdiez> so how is it different from saying "if array.empty()" ?
<banisterfiend> jdiez: it's not, it's just potentially more readable as it's clear the method returns a boolean value
<fowl> empty is a verb, so it should be clearing the array
<banisterfiend> that it's a method strictly for querying an object
<banisterfiend> exactly
<jdiez> okay, I get it, fair point
<jdiez> and the method! stuff?
<ryanf> in a language without ? you'd probably say like is_empty
Abbas| has quit [Quit: BadingaDongDongDong-TwitchVeryStrongStrongStrong]
<ryanf> because otherwise empty() could mean "empty this array"
<jdiez> also, I have seen some function calls without () around the arguments
<ryanf> so it's just a nicer way of doing the same thing
<banisterfiend> jdiez: yeah, we dont need () in ruby ;)
<jdiez> hmm
<jdiez> interdasting
<heftig> jdiez: "dangerous" variants, mostly because they modify the receiver instead of returning a copy
vvgomes has quit [Ping timeout: 272 seconds]
<heftig> e.g. Array#shuffle and Array#shuffle!
<jdiez> also, doing "def method?" is equal to doing "def method", right?
<heftig> jdiez: no, it's not
<heftig> the former creates the method named "method?", the latter the method named "method"
<banisterfiend> jdiez: just that ? and ! are valid characters to be used in a method name (if they're the last character)
<jdiez> hmm
<jdiez> okay
<jdiez> so ? and ! are just conventions?
<banisterfiend> Yeah
<heftig> yes. language-wise they have no special function
<jdiez> hmm
<jdiez> interesting
<jdiez> okay
<jdiez> also, what is an attr_reader and why do I need those?
<banisterfiend> jdiez: but really, those things are the least interesting aprt of ruby, 'blocks' are the coolest part, also executable class bodies
<heftig> attr_reader :foo, :bar is a quick way of doing def foo; @foo; end; def bar; @bar; end
<jdiez> yeah, those were the things that intrigued me the most :P what are blocks?
<banisterfiend> jdiez: a full explanation of what attr_reader is, and how it works will probably impress u
<banisterfiend> hopefully heftig will explain, i have 1 min of battery left :)
<jdiez> haha
<jdiez> I'm all ears
<jdiez> and I'm also intrigued about blocks
<heftig> blocks are closures attached to a method call
<heftig> if that means anything to you
<jdiez> hmm
<jdiez> do a local function
<jdiez> ?
<jdiez> so*
<fowl> blocks are the building experience of Happy Ruby ^^;
<heftig> >> def foo; yield 3; end; foo { |x| puts 3 }
<al2o3cr> heftig: (String) "NoMethodError: undefined method `foo' for main:Object"
<heftig> bah
<heftig> anyway
<heftig> er
<heftig> def foo; yield 3; end; foo { |x| puts x }
<heftig> this is better
banisterfiend has quit [Remote host closed the connection]
<heftig> the { |x| puts x } is a closure, taking one parameter and doing something with it
Abbas5 has joined #ruby
<heftig> it's called the block
<Spaceghostc2c> It's also a proc!
<heftig> Spaceghostc2c: not unless you make it one
<jdiez> so a { |x| puts x } block would just print a list?
<heftig> when it's run, it just does puts with the parameter
<heftig> i attach it to a call of the method "foo"
<Spaceghostc2c> heftig: No, it's always a proc.
<heftig> foo runs "yield 3" which runs the attached block with the parameter 3
bradhe has quit [Remote host closed the connection]
<jdiez> hmm
<jdiez> oh
<jdiez> the yield keyword is used very differently on python
<Spaceghostc2c> You can easily forget it is and just pass it around, but it's represented as a proc whether you like it or not.
Banistergalaxy has joined #ruby
savage- has joined #ruby
<heftig> Spaceghostc2c: it's not represented at all
cj3kim has quit [Quit: Leaving]
<jdiez> okay, next topic
r1chelt has quit [Remote host closed the connection]
TorpedoSkyline has joined #ruby
<jdiez> how does attr_reader work?
dpk has quit [Quit: Ceci n'est pas une broken pipe.]
bradhe has joined #ruby
vvgomes has joined #ruby
BrianJ has quit [Quit: Computer has gone to sleep.]
Abbas5 is now known as Abbas|
<Spaceghostc2c> heftig: You really believe that?
jhunter has joined #ruby
<heftig> Spaceghostc2c: in the above example there is no Object representing the block
<Spaceghostc2c> heftig: def foo &blk ; puts blk.class; end
rizzy has joined #ruby
<heftig> Spaceghostc2c: that wraps it into a Proc for you to use
nari has joined #ruby
<heftig> jdiez: it's a piece of metaprogramming that creates methods for you
<Banistergalaxy> Jdiez it's a class method that builds instance methods
<Spaceghostc2c> And behinds the scene, it's still a proc, even if you aren't asking for one.
dpk has joined #ruby
<Banistergalaxy> Jdiez it works because class bodies are executable
<ryanf> my understanding was that it doesn't actually create a proc object unless you make it
<ryanf> which is why yield is faster
<heftig> indeed
<Spaceghostc2c> You know, that might be true. Let me look.
<ryanf> yes, I do know it might be true
<Banistergalaxy> Hehe
bglusma__ has quit [Remote host closed the connection]
bglusman has joined #ruby
bglusman has quit [Remote host closed the connection]
katherinem13 has quit [Ping timeout: 246 seconds]
<Banistergalaxy> Jdiez are you excited
<jdiez> hmmm
<jdiez> not much really
<jdiez> :P
<jdiez> what is ruby's answer to decorators?
<jdiez> because oh my god are they useful
Spooner has quit [Ping timeout: 246 seconds]
mockra has quit [Remote host closed the connection]
<Spaceghostc2c> heftig: Thank you for correcting me. I was pretty damn sure. :)
<Banistergalaxy> We can build them when we need them, we don't need special syntax
<Spaceghostc2c> ryanf: And you, for giving me the heads up on the down low.
<Spaceghostc2c> jdiez: Are you asking for a pattern?
mockra has joined #ruby
<Spaceghostc2c> I think avdi grimm had one.
<jdiez> I'm asking for a way to do function = decorator(function)
<heftig> Spaceghostc2c: method decorators, i think, not the Decorator pattern
<ryanf> oh
<Spaceghostc2c> heftig: A pattern, not the decorator pattern.
<jdiez> like I would do in python like @decorator / def function: / blabla
<ryanf> jdiez it depends a bit on the use case. you can get a reference to a method using the method method
<ryanf> or do various things with alias
<ryanf> but I guess the most relevant info is that class bodies are just normal code executing in the context of the class
<Banistergalaxy> Jdiez yeah, we can get syntax similar to that just using class methods or whatever
<ryanf> so you can do whatever you want in the form of a class method
<ryanf> (except you have to call the method after defining the method instead of before)
ringotwo has quit [Remote host closed the connection]
<ryanf> haha yeah you can do that too
<ryanf> and actually there is at least one lib that does: https://github.com/egonSchiele/contracts.ruby
<jdiez> wow that's pretty cool heftig
cantonic has quit [Quit: cantonic]
vitor-br has joined #ruby
Hanmac has quit [Ping timeout: 244 seconds]
mockra has quit [Ping timeout: 272 seconds]
banisterfiend has joined #ruby
<banisterfiend> >> def foo; yield 3; end || foo { |x| 3 }
<al2o3cr> banisterfiend: (String) "SyntaxError: sandrbox:1: syntax error, unexpected keyword_end, expecting $end\nyield 3;end || foo { |x| 3 };\n ^"
<banisterfiend> >> def foo() yield(3) end || foo { |x| 3 }
<al2o3cr> banisterfiend: The Ruby interpreter exited with nonzero status. Hanmac is probably to blame.
<banisterfiend> lulz
Banistergalaxy has quit [Ping timeout: 250 seconds]
<heftig> >> define_method
<al2o3cr> heftig: (NilClass) nil
w0lverine has joined #ruby
<heftig> >> method(:define_method)
<al2o3cr> heftig: (NilClass) nil
TorpedoSkyline has quit [Quit: Computer has gone to sleep.]
<heftig> what.
<heftig> whoops
<banisterfiend> >> Kernel.instance_method(:puts)
<al2o3cr> banisterfiend: (UnboundMethod) #<UnboundMethod: Kernel#puts>
<heftig> >> method(:define_singleton_method)
<al2o3cr> heftig: (NilClass) nil
<heftig> >> RUBY_VERSION
<al2o3cr> heftig: (String) "1.9.3"
<heftig> >>self
<al2o3cr> heftig: (Object) main
<heftig> >>methods
<al2o3cr> heftig: Output too long, I PMed it to you
<heftig> >>methods(false)
<al2o3cr> heftig: (Array) [:to_s, :public, :private, :include]
<banisterfiend> >> methods.grep(/^p/)
<al2o3cr> banisterfiend: (Array) [:public, :private, :protected_methods, :private_methods, :public_methods, :public_send, :public_method]
TorpedoSkyline has joined #ruby
<banisterfiend> >> method(:private).owner
<al2o3cr> banisterfiend: (Class) #<Class:#<Object:0x000000012637b0>>
<heftig> >>methods.grep /^d/
<al2o3cr> heftig: (Array) [:dup, :display, :define_singleton_method]
<banisterfiend> >> self
<al2o3cr> banisterfiend: (Object) main
<heftig> define_singleton_method(:foo) { yield(3) }; foo { |x| puts x }
<heftig> >>define_singleton_method(:foo) { yield(3) }; foo { |x| puts x }
<al2o3cr> heftig: (NilClass) nil
cakehero has quit [Quit: Computer has gone to sleep.]
<heftig> >>define_singleton_method(:foo) { 4 }; foo
<al2o3cr> heftig: (NilClass) nil
<banisterfiend> >> define_singleton_method(:foo) { yield(3) } || foo { |x| puts x }
<al2o3cr> banisterfiend: (NilClass) nil
<heftig> >>foo
<al2o3cr> heftig: (String) "NameError: undefined local variable or method `foo' for main:Object"
ryanf has quit [Quit: leaving]
<heftig> Class.define_singleton_method(:foo) { 4 }; Class.foo
<heftig> >>Class.define_singleton_method(:foo) { 4 }; Class.foo
<al2o3cr> heftig: (NilClass) nil
<heftig> blah
<heftig> >> Dir.glob "/*"
<al2o3cr> heftig: (String) "NameError: uninitialized constant Dir"
<banisterfiend> heftig: lulz
<banisterfiend> >> define_singleton_method(:foo) { |&block| block.call(3) } && foo { |x| puts x }
<al2o3cr> banisterfiend: (NilClass) nil
<banisterfiend> >> define_singleton_method(:foo) { |&block| block.call(3) } && foo { |x| x }
<al2o3cr> banisterfiend: (NilClass) nil
<heftig> >> puts 3
<al2o3cr> heftig: (NilClass) nil
mockra has joined #ruby
ringotwo has joined #ruby
<heftig> >> class Fixnum; alias_method :oldp, :+; def +(other) oldp(other).oldp(1); end; end; 3 + 4
<al2o3cr> heftig: (Fixnum) 7
<heftig> lies!
Hanmac has joined #ruby
<banisterfiend> heftig: ';' doesnt do what u think it does, the stupid processor breaks up expressions by ; and processes them separately in different ruby instances
<banisterfiend> i think
<heftig> >> foo = 3; foo
<al2o3cr> heftig: (Fixnum) 3
AwayLex is now known as Quadlex
<banisterfiend> hmm
<heftig> >> foo = 3; foo + 1
<al2o3cr> heftig: (Fixnum) 4
<heftig> nope
<banisterfiend> maybe not anymore then
<banisterfiend> it used to be the cas
<banisterfiend> >> "hello; baby"
<al2o3cr> banisterfiend: (String) "SyntaxError: sandrbox:1: unterminated string meets end of file"
<banisterfiend> >> "hello baby"
<al2o3cr> banisterfiend: (String) "hello baby"
<banisterfiend> heftig: ^
<heftig> hm
<heftig> >> class Fixnum \n alias_method :oldp, :+ \n def +(other) oldp(other).oldp(1) \n end \n end \n 3 + 4
<al2o3cr> heftig: The Ruby interpreter exited with nonzero status. Hanmac is probably to blame.
<heftig> wow
<heftig> that seriously broke things
<heftig> >> 2
<al2o3cr> heftig: (Fixnum) 2
<heftig> banisterfiend: try running my line there
<banisterfiend> >> class Fixnum \n alias_method :oldp, :+ \n def +(other) oldp(other).oldp(1) \n end \n end \n 3 + 4
<al2o3cr> banisterfiend: The Ruby interpreter exited with nonzero status. Hanmac is probably to blame.
w0lverine has quit [Quit: w0lverine]
otters has quit [Quit: WeeChat 0.3.8]
seanstickle has quit [Quit: seanstickle]
vvgomes has quit [Ping timeout: 272 seconds]
otters has joined #ruby
bothra has quit [Ping timeout: 245 seconds]
rizzy has quit [Quit: Leaving]
Asphyxiated|Dk has quit [Ping timeout: 246 seconds]
jrajav has quit [Quit: The best darkness is strange and surprising]
jhunter has quit [Read error: Connection reset by peer]
v0n has joined #ruby
jhunter has joined #ruby
chimkan_ has joined #ruby
w400z has joined #ruby
dhaivatpandya has joined #ruby
TorpedoSkyline has left #ruby ["["Textual IRC Client: www.textualapp.com"]"]
cakehero has joined #ruby
syamajala has joined #ruby
iori has joined #ruby
ZachBeta has quit [Quit: Computer has gone to sleep.]
Asphyxiated|Dk has joined #ruby
alindeman has quit [Read error: Connection reset by peer]
vertroa has quit [Ping timeout: 246 seconds]
dhaivatpandya has quit [Quit: dhaivatpandya]
alindeman has joined #ruby
savage- has quit [Remote host closed the connection]
tjbarber09 has joined #ruby
iamjarvo has joined #ruby
bradhe has quit [Remote host closed the connection]
ngoldman has joined #ruby
vvgomes has joined #ruby
jhunter has quit [Read error: Connection reset by peer]
jsnwtsn has quit [Quit: Leaving]
jhunter has joined #ruby
chimkan_ has quit [Quit: chimkan_]
savage- has joined #ruby
dhruvasagar has joined #ruby
Asphyxiated|Dk has quit [Ping timeout: 244 seconds]
stopbit has quit [Quit: Leaving]
jhunter has quit [Read error: Connection reset by peer]
cakehero has quit [Quit: Leaving...]
tjbarber09 has quit [Quit: ["Textual IRC Client: www.textualapp.com"]]
rodj has joined #ruby
centipedefarmer has joined #ruby
berserkr has quit [Quit: Leaving.]
zodiak has joined #ruby
jhunter has joined #ruby
Asphyxiated|Dk has joined #ruby
centipedefarmer has quit [Remote host closed the connection]
mockra has quit [Remote host closed the connection]
mockra has joined #ruby
zeromodulus has joined #ruby
jxf has quit [Ping timeout: 264 seconds]
ryanf has joined #ruby
banisterfiend has quit [Remote host closed the connection]
mockra has quit [Ping timeout: 264 seconds]
hemanth has quit [Read error: Connection reset by peer]
banisterfiend has joined #ruby
adeponte has joined #ruby
sevvie has quit [Quit: sevvie]
jhunter has quit [Ping timeout: 246 seconds]
jhunter has joined #ruby
nateberkopec has quit [Quit: Leaving...]
mark06 has joined #ruby
mac_br has joined #ruby
tommyvyo has quit [Quit: Computer has gone to sleep.]
rburton- has quit [Ping timeout: 244 seconds]
savage- has quit [Remote host closed the connection]
vvgomes has quit [Remote host closed the connection]
w0lverine has joined #ruby
yoklov has quit [Quit: computer sleeping]
mockra has joined #ruby
ringotwo has quit [Remote host closed the connection]
Asher has quit [Quit: Leaving.]
axl_ has quit [Quit: axl_]
mark06 has left #ruby [#ruby]
dpk has quit [Quit: Asleep at the keyboard.]
vvgomes has joined #ruby
rodj has quit [Quit: rodj]
dpk has joined #ruby
dpk has quit [Client Quit]
ringotwo has joined #ruby
dpk has joined #ruby
dpk has quit [Client Quit]
ngoldman has quit [Remote host closed the connection]
minzy1407 has joined #ruby
<minzy1407> hi
<minzy1407> i got a question
<minzy1407> Can I convert a string into an object?
burgestrand has joined #ruby
otters has quit [Ping timeout: 246 seconds]
<minzy1407> is anyone here?
mac_br has left #ruby [#ruby]
<heftig> a string is an object
nari has quit [Ping timeout: 248 seconds]
w0lverine has quit [Quit: w0lverine]
* burgestrand moos
ananthakumaran has joined #ruby
syamajala has quit [Remote host closed the connection]
ringotwo has quit [Remote host closed the connection]
dhruvasagar has quit [Quit: leaving]
dhruvasagar has joined #ruby
otters has joined #ruby
<minzy1407> but something like this
<minzy1407> if a got a variable with the name of a class can I call the class from that name on the string?
hemanth has joined #ruby
<fowl> calling a class?
<minzy1407> yes
<minzy1407> like (name).new
vvgomes has quit [Ping timeout: 244 seconds]
<burgestrand> minzy1407: yes, but you need to find the class from that name first
Guest89851 has joined #ruby
<burgestrand> minzy1407: you could do eval(name).new, or Object.const_get(name).new
<minzy1407> how would u do that
vvgomes has joined #ruby
<minzy1407> which way is better?
skryking has joined #ruby
defendguin has joined #ruby
<burgestrand> For the general case const_get, since it’s less dangerous.
Abbas| has quit [Read error: Connection reset by peer]
<burgestrand> However, const_get approach requries some modification to work fully with namespaces in the names, e.g. MyModue::MyClass
<minzy1407> I'm gonna take a look at it
<felipecvo> what can I do with fibers?
bradhe has joined #ruby
<minzy1407> thanks a lot
<minzy1407> bye bye
minzy1407 has quit [Quit: Page closed]
<burgestrand> felipecvo: pretty much all use cases for fibers are clever things, and they often involve some kind of concurrency
deryldoucette has joined #ruby
<burgestrand> felipecvo: em-synchrony uses fibers to make evented code look like synchronous code, more or less wrapping the entire event loop in a fiber
luckyrub_ has joined #ruby
<burgestrand> felipecvo: celluloid uses fibers to allow pausing and resuming tasks in actors
w0lverine has joined #ruby
<burgestrand> felipecvo: you could use fibers to implement enumerators as well
subbyyy1 has joined #ruby
kpshek has joined #ruby
<burgestrand> most people don’t need to get familiar with fibers, however
subbyyy has quit [Ping timeout: 250 seconds]
r0bby has joined #ruby
luckyruby has quit [Ping timeout: 250 seconds]
deryl has quit [Ping timeout: 244 seconds]
deryldoucette is now known as deryl
robbyoconnor has quit [Ping timeout: 244 seconds]
luckyrub_ is now known as luckyruby
alphabitcity has quit [Quit: Leaving.]
hadees has quit [Ping timeout: 244 seconds]
yasushi has joined #ruby
vitor-br has quit [Ping timeout: 246 seconds]
yasushi has quit [Read error: Connection reset by peer]
yasushi_ has joined #ruby
kpshek has quit [Ping timeout: 264 seconds]
mfcabrera has joined #ruby
reuf has joined #ruby
ringotwo has joined #ruby
w400z has quit []
Dreamer3 has quit [Quit: Leaving...]
Dreamer3 has joined #ruby
defendguin has quit [Quit: Leaving.]
burgestrand has quit [Quit: Leaving.]
PapaSierra has quit [Read error: Connection reset by peer]
wallerdev has joined #ruby
savage- has joined #ruby
eph3meral has quit [Quit: Leaving]
v0n has quit [Ping timeout: 240 seconds]
sebastorama has joined #ruby
nari has joined #ruby
daniel_hinojosa has quit [Ping timeout: 246 seconds]
vitor-br has joined #ruby
vvgomes has quit [Ping timeout: 240 seconds]
yxhuvud has joined #ruby
deryl has quit [Quit: deryl]
wargasm has quit [Read error: Connection reset by peer]
wargasm has joined #ruby
ringotwo has quit [Remote host closed the connection]
havenn has joined #ruby
bradhe has quit [Remote host closed the connection]
uris has quit [Quit: leaving]
gokul has joined #ruby
gokul has quit [Client Quit]
gokul has joined #ruby
Guest89851 has quit [Quit: Guest89851]
PapaSierra has joined #ruby
banisterfiend has quit [Remote host closed the connection]
iamjarvo has quit [Quit: Leaving...]
banisterfiend has joined #ruby
td123 has joined #ruby
yasushi_ has quit [Remote host closed the connection]
yasushi has joined #ruby
vitor-br has quit [Quit: Saindo]
yasushi has quit [Read error: Connection reset by peer]
yasushi has joined #ruby
td123 has quit [Quit: WeeChat 0.3.8]
yasushi has quit [Remote host closed the connection]
jameshyde has joined #ruby
reuf has quit [Quit: Leaving]
yasushi has joined #ruby
mockra has quit [Remote host closed the connection]
burgestrand has joined #ruby
wallerdev has quit [Quit: wallerdev]
yasushi has quit [Ping timeout: 240 seconds]
kpshek has joined #ruby
mascool has joined #ruby
kpshek has quit [Read error: Operation timed out]
a_a_g has joined #ruby
brg has joined #ruby
s1n4 has joined #ruby
a_a_g has quit [Client Quit]
a_a_g has joined #ruby
Chryson has quit [Quit: Leaving]
libryder has joined #ruby
jorge has quit [Remote host closed the connection]
<libryder> can someone please explain this? https://gist.github.com/3875cb1bfebc3cf3c1ea
<libryder> why is the parent being called?
<samuelkadolph> I just did in #rubyonrails
<libryder> ok, just saw that… i'm going to continue it here if that's ok
ananthakumaran has quit [Quit: Leaving.]
<libryder> samuelkadolph said: Because those are all instance methods. And by including the module into Object, it becomes available as a class method to all classes/modules
<samuelkadolph> There's nothing to continue. Those are instance methods you cannot call them as class methods
sailias has joined #ruby
kpshek has joined #ruby
tonini has joined #ruby
sdwrage has joined #ruby
sailias has quit [Client Quit]
<banisterfiend> libryder: what dont you understand
<banisterfiend> libryder: you only included MyShinyModule into Object, so it's method will be invoked. The 'nested' modules were not included so their methods cannot be invoked
<libryder> MyShinyModule::FirstModule.my_method worked, but it called the method from its parent class
<banisterfiend> its*
mohits has joined #ruby
<banisterfiend> libryder: yes, because FirstModule#my_method is an instance method, it can't be invoked on FirstModule
<libryder> if i do include FirstModule, then FirstModule.my_method, it works as expected
<samuelkadolph> libryder: You included MyShinyModule
<samuelkadolph> Not MyShinyModule::FirstModule
<banisterfiend> libryder: you need to read about difference between instance methods and class methods
Godslastering has quit [Read error: Connection reset by peer]
<libryder> banisterfiend: i understand that
<banisterfiend> in order to invoked FirstModule#my_module on FirstModule you have to (in this case) include FirstModule into Object, which you didnt do
<banisterfiend> my_method
mascool has quit [Ping timeout: 240 seconds]
<samuelkadolph> libryder: You included the module that returns "the parent method", what don't you understand?
<libryder> samuelkadolph: by that logic, could i do MyShinyModlue::DoesNotExist.my_method and expect it to work?
<samuelkadolph> If DoesNotExist was a class or module, yes
<libryder> but before including it, it would call its parent method?
<samuelkadolph> You've included a module into Object, it will be available to any class/module as class methods
<banisterfiend> libryder: it has nothing to do with 'parent'
justsee has quit [Ping timeout: 246 seconds]
dhaivatpandya has joined #ruby
<samuelkadolph> Just forget about your silly FirstModule SecondModule example
<samuelkadolph> module M; def abc; "abc"; end; end; include M; Fixnum.abc
<samuelkadolph> There
r1chelt has joined #ruby
savage- has quit [Remote host closed the connection]
<libryder> light bulb
<samuelkadolph> There ya go
dhaivatpandya has quit [Client Quit]
hadees has joined #ruby
vectorshelve has joined #ruby
dhruvasagar has quit [Ping timeout: 272 seconds]
<libryder> samuelkadolph: if you don't specify a class to extend in a module, it just overrides Object, regardless of how the module is namespaced?
<samuelkadolph> No
<samuelkadolph> It's because irb runs inside of main which is special instance of Object
hunglin has left #ruby [#ruby]
pseudonymous has quit [Quit: leaving]
lolmaus has joined #ruby
<libryder> sorry, forgot to update https://gist.github.com/3875cb1bfebc3cf3c1ea
r1chelt has quit [Remote host closed the connection]
apeiros_ has quit [Remote host closed the connection]
TPFC-SYSTEM has joined #ruby
ananthakumaran has joined #ruby
chussenot has joined #ruby
twinturbo has joined #ruby
<burgestrand> libryder: do you have a question to go with that?
gmci has quit [Read error: Connection reset by peer]
<libryder> burgestrand: i think i finally figured it out
khakimov has quit [Quit: Computer has gone to sleep.]
<libryder> i was showing that the module namespace wasn't being respected, but i actually understand it now
aces1up has quit [Ping timeout: 246 seconds]
aces1up has joined #ruby
Jonghwan has left #ruby [#ruby]
<libryder> thanks for the help guys
<libryder> :)
<libryder> MINSWAN
mahmoudimus has joined #ruby
<vectorshelve> getting this error while trying to reindex the models http://pastie.org/4398222 help appreciated thanks.
ananthakumaran1 has joined #ruby
gmci has joined #ruby
mahmoudimus has quit [Client Quit]
Eldariof-ru has joined #ruby
kpshek has quit [Ping timeout: 246 seconds]
cj3kim has joined #ruby
ananthakumaran has quit [Ping timeout: 246 seconds]
darren has joined #ruby
havenn has quit [Remote host closed the connection]
mockra has joined #ruby
gmci has quit [Read error: Connection reset by peer]
mockra has quit [Ping timeout: 272 seconds]
mfcabrera_ has joined #ruby
mfcabrera has quit [Read error: Connection reset by peer]
maesbn has joined #ruby
gmci has joined #ruby
graspee has joined #ruby
Ste11a has quit [Ping timeout: 244 seconds]
Ste11a has joined #ruby
luckyruby has quit [Remote host closed the connection]
andrewhl has quit [Remote host closed the connection]
andrewhl has joined #ruby
lldong has joined #ruby
andrewhl has quit [Read error: Connection reset by peer]
darren has quit [Remote host closed the connection]
jarred has quit [Quit: jarred]
noesis82 has quit [Quit: leaving]
jorge has joined #ruby
<shevy> vectorshelve, that is such a highly framework specific problem
<shevy> #<Ferret::Store::FSDirectory:0xb59d4bd4>
<shevy> how many know Ferret here... 2... 3? ;)
krz has quit [Quit: krz]
<vectorshelve> shevy: Yeah that is the prolem and I need to fix it soon :( HEeeeeelllllloppppppppppppppppp
<shevy> how can people help you if they dont know that framework
<shevy> if the framework stinks, like here where you dont have enough examples to use it properly, dont use it :P
lldong has quit [Ping timeout: 246 seconds]
jorge has quit [Ping timeout: 246 seconds]
JohnBat26 has joined #ruby
williamherry has quit [Ping timeout: 264 seconds]
bigkevmcd has joined #ruby
williamherry has joined #ruby
Eldariof-ru has quit []
gmci has quit [Read error: Connection reset by peer]
Morkel has joined #ruby
ttilley has quit [Ping timeout: 246 seconds]
ppawel has joined #ruby
digitalcakestudi has quit [Read error: Operation timed out]
andrewh has joined #ruby
williamherry has quit [Ping timeout: 246 seconds]
williamherry has joined #ruby
gmci has joined #ruby
workmad3 has joined #ruby
chichou has quit [Remote host closed the connection]
aganov has joined #ruby
guns has quit [Read error: Operation timed out]
answer_42 has joined #ruby
pskosinski has joined #ruby
havenn has joined #ruby
cj3kim has quit [Quit: This computer has gone to sleep]
jeff_sebring has quit [Quit: Leaving]
fastred has joined #ruby
Monofu has joined #ruby
rutkla has joined #ruby
<shevy> I'd wish linux would be as beautiful as ruby
ryanf has quit [Quit: leaving]
mahmoudimus has joined #ruby
Bosox20051 has joined #ruby
gilead has joined #ruby
u_u has quit [Ping timeout: 240 seconds]
libryder has left #ruby [#ruby]
elhu has joined #ruby
shadoi1 has joined #ruby
chussenot has quit [Quit: chussenot]
zemanel has joined #ruby
shadoi has quit [Ping timeout: 246 seconds]
dr_bob has joined #ruby
mascool has joined #ruby
Rochefort has joined #ruby
locriani has quit [Remote host closed the connection]
bluOxigen has joined #ruby
twinturbo has quit [Read error: Connection reset by peer]
chussenot has joined #ruby
<s1n4> shevy: it is
brg1 has joined #ruby
<shevy> how so?
<shevy> most of the time folks use shell scripts
kjellski has joined #ruby
<shevy> then there is a mess of distributions putting their files pretty much everywhere they want them to have
brg has quit [Ping timeout: 246 seconds]
<s1n4> shevy: I just like linux more than the goddamn microsoft windows
jeff_sebring has joined #ruby
mockra has joined #ruby
<shevy> ms windows isn't beautiful either
<shevy> perhaps osx would be more so than both, never tried it
<jeff_sebring> Arch Linux
voodoofish has quit [Read error: Operation timed out]
<shevy> arch linux is quite ok
<shevy> better than debian
maesbn has quit [Ping timeout: 272 seconds]
burgestrand has quit [Quit: Leaving.]
burgestrand has joined #ruby
<Hanmac> debian is not so bad ... when you use nightly packages ...
maesbn has joined #ruby
und3f has joined #ruby
Markvilla has joined #ruby
mockra has quit [Ping timeout: 244 seconds]
* s1n4 uses ubuntu
workmad3 has quit [Ping timeout: 246 seconds]
dangerousdave has joined #ruby
u_u has joined #ruby
<Hanmac> in the next ubuntu version its packing the newest ruby version and the ruby-full meta package is pointing to them
<shevy> hmm
<shevy> good!
<banisterfiend> Hanmac: UNd.
guns has joined #ruby
guns is now known as Guest29788
Guest29788 has quit [Client Quit]
<s1n4> Hanmac: wat ? will be installed by default ?
<Hanmac> s1n4 i yes and no ... the default ruby package is installed ... but i think the dev package is not ...
<Hanmac> and this is not a bad point! not all users need the dev package
noyb has joined #ruby
tomb_ has quit [Quit: Computer has gone to sleep.]
Banistergalaxy has joined #ruby
<s1n4> Hanmac: it seems good
<s1n4> AWE FUCKIN SOME
<s1n4> :D
tomb_ has joined #ruby
Bosox20051 has quit [Quit: Leaving]
arietis has joined #ruby
<shevy> Hanmac, I hate this reasoning
<shevy> the newcomers always come here and ask "why cant I compile"
<shevy> users are assumed to be too dumb to use debian
iori has quit [Remote host closed the connection]
<Hanmac> shevy so you think for all possible libs, all dev packages should be installed by default?
<shevy> Hanmac, Yes. In AppDirs. When a user does not need the .h files, he does "rm -rf include/" in that directory.
mahmoudimus has quit [Quit: Computer has gone to sleep.]
Dreamer3 has quit [Ping timeout: 246 seconds]
<Hanmac> :'D
<shevy> :)
<banisterfiend> Hanmac: how many times do you guess you say 'Und' in a day?
<shevy> AppDirs are beautiful
<shevy> banisterfiend, you need a context for 'Und'
<shevy> Und alone without context doesn't make a lot of sense
noyb has quit [Client Quit]
Banistergalaxy has quit [Ping timeout: 246 seconds]
chichou has joined #ruby
noyb has joined #ruby
chussenot has quit [Quit: chussenot]
subbyyy1 has quit [Quit: Leaving.]
mog has joined #ruby
mascool has quit [Ping timeout: 244 seconds]
Boffers has joined #ruby
kstephens has quit [Ping timeout: 246 seconds]
dhruvasagar has joined #ruby
Dreamer3 has joined #ruby
mascool has joined #ruby
xorigin has joined #ruby
kstephens has joined #ruby
Bofu has quit [Ping timeout: 250 seconds]
shevy has quit [Quit: ""]
shevy2 has joined #ruby
shevy2 is now known as shevy
havenn has quit [Remote host closed the connection]
sgupta is now known as Shrink
TheDeadSerious has joined #ruby
arturaz has joined #ruby
igotnolegs has quit [Quit: Computer has gone to sleep.]
mascool has quit [Ping timeout: 244 seconds]
laen_ has quit [Ping timeout: 255 seconds]
laen_ has joined #ruby
ph^ has joined #ruby
TPFC-SYSTEM has quit [Quit: TPFC-SYSTEM]
dhruvasagar has quit [Ping timeout: 246 seconds]
dhruvasagar has joined #ruby
mk03 has quit [Remote host closed the connection]
Monofu has quit [Quit: quit]
laen_ has quit [Ping timeout: 250 seconds]
<shevy> hey Hanmac
laen_ has joined #ruby
<shevy> which of these two hashes would you recommend using: http://pastie.org/4398532
<Hanmac> hm i would recoment "That"
noyb has quit [Quit: Leaving.]
voodoofish has joined #ruby
<Hanmac> hm can :foo and :bar has more childs ?
<Hanmac> or only this two fields?
ephemerian has joined #ruby
<shevy> only this
<shevy> one main name, two entries
<Hanmac> then i think "This" is fine too
Nanuq has quit [Quit: leaving]
<shevy> ok
d3vic3 has joined #ruby
macer1 has joined #ruby
<macer1> hi
<macer1> how can I make
<macer1> [1,2,3] to "\x01\x02\x03"
laen_ has quit [Read error: Connection reset by peer]
laen__ has joined #ruby
<_br_> macer1: [1,2,3].pack("C*") See #pack for more details on this.
<macer1> thank you _br_ :)
<_br_> welcome
Nanuq has joined #ruby
Eldariof-ru has joined #ruby
CodeVision has quit [Quit: WeeChat 0.3.8]
tatsuya_o has joined #ruby
tatsuya_o has quit [Remote host closed the connection]
tatsuya_o has joined #ruby
Banistergalaxy has joined #ruby
shadoi1 has quit [Quit: Leaving.]
<shevy> macer1 what are you writing right now?
mmokrysz has joined #ruby
mmokrysz has left #ruby [#ruby]
<macer1> shevy: byte array => ASN1
<shevy> ah
<macer1> looks like that part works :P
<macer1> now even more encryption
<macer1> I need an random RC4 key
<macer1> OpenSSL::Cipher::RC4.new does that create a random one?
hoelzro|away is now known as hoelzro
Shrink has quit [Changing host]
Shrink has joined #ruby
tayy has joined #ruby
dhruvasagar has quit [Ping timeout: 246 seconds]
crhan has joined #ruby
dhruvasagar has joined #ruby
g_rotbart has quit [Remote host closed the connection]
imami|afk is now known as banseljaj
Hama has joined #ruby
mockra has joined #ruby
mneorr has joined #ruby
crhan has left #ruby ["Leaving"]
jameshyde has quit [Quit: Leaving]
sdwrage has quit [Quit: geekli.st/programmer]
Banistergalaxy has quit [Ping timeout: 246 seconds]
mockra has quit [Ping timeout: 245 seconds]
Banistergalaxy has joined #ruby
baphled has joined #ruby
arturaz has quit [Remote host closed the connection]
SegFaultAX has joined #ruby
<kjellski> how can I escape % when using strings % method to format?
brg has joined #ruby
Shahor has joined #ruby
Shahor has quit [Client Quit]
Banistergalaxy has quit [Ping timeout: 264 seconds]
workmad3 has joined #ruby
<Hanmac> %%
<mog> is there a way i can set a documentroot in webrick but have a function there to limit what files can be accessed
brg1 has quit [Ping timeout: 246 seconds]
<Hanmac> kjellski:
<Hanmac> >> "2 %d %% %s" % [1,"e"]
<al2o3cr> Hanmac: (String) "2 1 % e"
<macer1> >> "Hello " + "bot"
<al2o3cr> macer1: (String) "Hello bot"
<macer1> oh cool
jimeh has joined #ruby
<Hanmac> macer1 but when you broke the bot, its owner is not there to restart them :P
dominikh has quit [Remote host closed the connection]
poppiez has joined #ruby
<macer1> :D
TPFC-SYSTEM has joined #ruby
* Hanmac has managed to broke the bot multible times :P
onto has joined #ruby
Banistergalaxy has joined #ruby
dominikh has joined #ruby
<s1n4> :D
<onto> Hi! I am trying to create a simple http (over ssl) server using webrick and sinatra. I have the following http://pastebin.com/RRQE42J4 but when I hit Ctrl+C to quit the webrick server, it throws the following: ERROR Interrupt: ~/.rvm/rubies/ruby-1.9.3-p125/lib/ruby/1.9.1/webrick/server.rb:98:in `select'
<onto> and does not shutdown the server
<Hanmac> onto you could ask in #sinatra
<onto> Hanmac: but it's not a sinatra issue ... it's a webrick issue, isn't it?
<Hanmac> hm i dont think this is an error ...
<Hanmac> ctrl-c is for interrupting ... to the error is okay
<onto> but I am not sure how to implement that in my solution (I am new to ruby)
flype has joined #ruby
<banisterfiend> >> proc { |&block| block.call { |&block| block.call } }.call { |&block| block.call { :Hanmac } }
<al2o3cr> banisterfiend: (Symbol) :Hanmac
heftig has quit [Ping timeout: 248 seconds]
macer1 has quit [Ping timeout: 264 seconds]
<onto> I tried adding Signal.trap at the end of the script file (assuming Rack::Handler::Webrick returns a webrick server instance) and sending the "shutdown" message to that object but it didn't seem to work :(
<Hanmac> i cant help with webrick questions ... maybe the guys in #rubyonrails are more helpful
<onto> Hanmac: ok, will go there
Poapfel has quit [Quit: WeeChat 0.3.7]
cezar has joined #ruby
r0bby is now known as robbyoconnor
cezar has quit [Client Quit]
PapaSierra2 has joined #ruby
Agis__ has joined #ruby
Rizzle has quit [Read error: Connection reset by peer]
PapaSierra has quit [Ping timeout: 246 seconds]
Rizzle has joined #ruby
elhu has quit [Ping timeout: 272 seconds]
Rizzle has quit [Read error: Connection reset by peer]
Rizzle has joined #ruby
elhu has joined #ruby
ik6 has joined #ruby
Guest89851 has joined #ruby
Poapfel has joined #ruby
mucker has joined #ruby
mucker has quit [Client Quit]
Rizzle has quit [Read error: Connection reset by peer]
mucker has joined #ruby
mog has left #ruby ["Leaving"]
kn330 has quit [Ping timeout: 272 seconds]
Rizzle has joined #ruby
Rizzle has quit [Read error: Connection reset by peer]
<ik6> can someone help me with this code? https://gist.github.com/3272326 It's copied from the bastard's guide to ruby...
onto has quit [Quit: Leaving.]
<ik6> It's returning: :7:in `<main>': undefined method `[]' for nil:NilClass (NoMethodError)
Rizzle has joined #ruby
<Hanmac> ik6 try nokogiri for xml parsing
Rizzle has quit [Read error: Connection reset by peer]
arietis has quit [Quit: Computer has gone to sleep.]
<ik6> Hanmac, thanks for the response. Nokogiri is the next lesson :-) Kind of annoying that this copied code isn't working. Thought I could learn something from the error...
gmci has quit [Quit: Computer has gone to sleep.]
Rizzle has joined #ruby
Rizzle has quit [Read error: Connection reset by peer]
Araxia has quit [Quit: Araxia]
<ik6> I just noticed that some of the data rows are 'territory' instead of 'state', I wonder if that could be the problem..
JonghwanHyeon has quit [Remote host closed the connection]
<kjellski> Hanmac: thanks for the reply… was out for a walk =)
Rizzle has joined #ruby
<nw> ik6: i haven't really used the crack gem, but it looks like if you replace line 7 with this, it works: Crack::XML.parse(open(URL).read)['map']['view']['totals']['state'].each do |state|
tomb_ has left #ruby ["["Textual IRC Client: www.textualapp.com"]"]
Rizzle has quit [Read error: Connection reset by peer]
<Hanmac> ik6 i think thats why you could need nokogiri it could map state and territory in the same row of code
Rizzle has joined #ruby
dhruvasagar has quit [Ping timeout: 244 seconds]
Rizzle has quit [Read error: Connection reset by peer]
Tulak has joined #ruby
dhruvasagar has joined #ruby
<ik6> Cool, thanks for your help nw and Hanmac :-)
iori has joined #ruby
Rizzle has joined #ruby
nateberkopec has joined #ruby
Rizzle has quit [Read error: Connection reset by peer]
bullicon has joined #ruby
gokul has quit [Ping timeout: 240 seconds]
nateberkope has joined #ruby
Rizzle has joined #ruby
Rizzle has quit [Read error: Connection reset by peer]
Rizzle has joined #ruby
Rizzle has quit [Client Quit]
Vert has joined #ruby
mockra has joined #ruby
heftig has joined #ruby
nateberkopec has quit [Ping timeout: 249 seconds]
virunga has joined #ruby
charliesome has joined #ruby
dhruvasagar has quit [Ping timeout: 240 seconds]
ananthakumaran1 has quit [Read error: Connection timed out]
dhruvasagar has joined #ruby
ananthakumaran has joined #ruby
tatsuya_o has quit [Read error: Connection reset by peer]
Solnse has joined #ruby
mockra has quit [Ping timeout: 264 seconds]
tatsuya_o has joined #ruby
macer1 has joined #ruby
<macer1> I found way to crash ruby on line of code xD
<macer1> in*
<macer1> (require 'openssl'); OpenSSL::PKey::RSA.new.public_encrypt('a')
<macer1> segfault
williamherry has quit [Ping timeout: 240 seconds]
ik6 has quit [Ping timeout: 250 seconds]
<bnagy> no, you found a way to crash an external lib in one version of (I assume) MRI
mjbamford has joined #ruby
tonini has quit [Remote host closed the connection]
Kabaka has joined #ruby
gokul has joined #ruby
elhu has quit [Quit: Computer has gone to sleep.]
gokul is now known as Guest46343
g_rotbart has joined #ruby
<macer1> isn't openssl in stdlib?
<macer1> it segfaults all ruby
<bnagy> not jruby
<bnagy> which is the only one I checked, cause it's what I run :)
<Hanmac> macer1 ... what ruby do you have?
<macer1> Hanmac: OSX 1.9.3-p194
<Hanmac> do you compiled your ruby self?
<macer1> yes
<macer1> rvm
<Hanmac> ... did you install openssl dev packages before you install rvm?
<macer1> yes
<macer1> openssl works :P
<vandemar> also segfaults in linux gentoo 1.9.3-p194 w/ openssl 1.0.1c
<bnagy> it's definitely a bug, just not in 'ruby'
<macer1> I need to file a bug, I think
<Hanmac> ok segfault there too
qwerxy has joined #ruby
mjbamford has quit [Ping timeout: 245 seconds]
<vandemar> the stacktrace shows the codepath goes through RSA_Size() and BN_num_bits() in libcrypto.so, before triggering a segfault and bouncing back to ruby's signal handler
<vandemar> macer1: I assume it's caused by not having a private key to encrypt with?
tvw has joined #ruby
lkba has quit [Quit: Bye]
macer1 has quit [Ping timeout: 244 seconds]
fugit has quit [Ping timeout: 265 seconds]
fugit has joined #ruby
ij has joined #ruby
berserkr has joined #ruby
eddie_ has joined #ruby
elhu has joined #ruby
niklasb has joined #ruby
heftig has quit [Ping timeout: 248 seconds]
just4dos has joined #ruby
emmanuelux has joined #ruby
macer1 has joined #ruby
<macer1> maybe the problem is with public key generating?
<macer1> when encrypting using external public key it don't segfaults
<banisterfiend> macer1: can u step through it in gdb
<vandemar> there's no public key generation in that snippet. Do you think it's supposed to autogenerate one as part of public_encrypt if it doesn't have a key yet?
<macer1> OpenSSL::PKey::RSA.new
<macer1> return public key
<macer1> --begin public key--- blabla --end public key --
<macer1> is it normal that encrypting 16 bytes gives...a lot of bytes?
Synthead has quit [Ping timeout: 244 seconds]
Rochefort has quit [Remote host closed the connection]
<hoelzro> macer1: depending on the algorithm, the input may be padded
<macer1> oh yes, I need to pad that :P
<hoelzro> some algorithms require blocks of certain sizes for encryption
<macer1> where are padding functions? I have no idea about that
Bofu has joined #ruby
<bnagy> macer1: you didn't give it a keysize
<vandemar> macer1: oh, at least on my system, it's generating some trivial size rsa key by default. try saving the rsa key to a var then printing it before calling var.public_encrypt
<bnagy> (require 'openssl'); OpenSSL::PKey::RSA.new(1024).public_encrypt 'a' try that
<macer1> no segfautl
<macer1> good progress
<vandemar> macer1: if I manually do a 128 bit key, I get a different error about the key being not long enough to encrypt the data. Only at 256 and above does public_encrypt actually succeed
<macer1> hoelzro: how to pad it? server says something about unpackV15
fearoffish has joined #ruby
<bnagy> it's still a bug imho, but it's misuse of the API
williamherry has joined #ruby
Boffers has quit [Ping timeout: 272 seconds]
gmci has joined #ruby
<macer1> javax.crypto.BadPaddingException: Blocktype mismatch: 0
<macer1> I am padding it wrong :/
<bnagy> it should pad it for you
<bnagy> with pkcs1
<macer1> "On receipt of a 0xFD from the server, the client will generate a 16-byte shared secret, to be used with the AES/CFB8 stream cipher. It then encrypts it with the server's public key (PKCS#1 padded), and sends it to the server along the token recieved in 0xFD encrypted with server's public key with a 0xFC."
<macer1> this is what I am doing...I think
fourlastor has joined #ruby
<bnagy> public_encrypt is correct, and it will use PKCS1 by default
<vandemar> I think ruby is doing something wrong when RSA.new is called without a keysize.
<fourlastor> hello everyone :)
<bnagy> vandemar: yeah they should arg check. You can get the C code from http://ruby-doc.org/stdlib-1.9.3/libdoc/openssl/rdoc/OpenSSL/PKey/RSA.html#method-i-public_encrypt
Hien has quit [Quit: leaving]
<vandemar> any keysize I specify up to 2048 works or generates an error without segfaulting
<bnagy> sorry not that method, the new method, but that page
Hien has joined #ruby
piotr_ has joined #ruby
<bnagy> arg = ossl_to_der_if_possible(arg); that's my guess
<fourlastor> let's say i want to implement a "clickable" behaviour, as in many different objects have 2 methods: click and clicked, the first takes a block of code as a parameter and saves it for later execution, the seconds fires it. would be better to use a mixin or inheritance? i'd say mixin but since i have to store the block somewhere it sounds more as a super class
<fourlastor> many different classes*
<macer1> the problem with padding is somewhere there... public_key.public_encrypt(@key).unpack("C*")
<ij> Why can't I define Foo#bar<<?
<bnagy> macer1: as I said, public_encrypt will correctly pad
sspiff has quit [Ping timeout: 240 seconds]
<shevy> ij, depends how you do it
<shevy> ij, can you show the code you tried on pastie.org ?
<macer1> bnagy: server says something diffrent :<
<bnagy> macer1: although I don't know why you're unpacking it
<ij> shevy, Well it wants to call bar and then ask << to it, right?
<macer1> bnagy: to bytes
vectorshelve has quit [Ping timeout: 245 seconds]
<bnagy> it already is bytes :) that unpack will give you an array of ints
<macer1> no, it's a byte string
<bnagy> I don't know what you think a 'byte string' is
<workmad3> ij: some_foo.bar << "whatever" get's parsed as 'some_foo.bar().<<("whatever")', not as 'some_foo.bar<<("whatever")'
<macer1> it is "\x00\x11" etc.
<macer1> In protocol I need to send this as array of ints :)
<bnagy> yeah that's just a string :)
sspiff has joined #ruby
<macer1> bytes*
dhruvasagar has quit [Ping timeout: 246 seconds]
<workmad3> ij: which is in contrast to 'some_foo.bar = "whatever"', which get's interpreted as 'some_foo.bar=("whatever")'
<ij> workmad3, Myeah, I somewhy thought I can make it work like I want it. Ha.
<workmad3> ij: well, it just means you need to override the << method on the object returned by bar, not some non-existant bar<< method ;)
<bnagy> macer1: how can you send a ruby array full of ints in a packet?
<shevy> ij ahhh now I understand
dhruvasagar has joined #ruby
<shevy> you meant a "bar<<" method
<macer1> bnagy: bindata
<ij> workmad3, Unfortunately that object's array, which I won't define methods on. :]
<bnagy> let me guess... you're going to pack them. And end up with exactly the same as before you started :)
<shevy> wasn't bindata written by bnagy?
<macer1> I can delete the unpack there, it is converted in other class anyway
<bnagy> no I have my own version
<shevy> or what was the name again... hmm
<workmad3> ij: wrap it in a proxy that provides your method override when you return it from bar
<shevy> ah yes
<bnagy> binstruct
<workmad3> ij: or extend the specific instance with a module that provides your specialised method
<bnagy> macer1: a ruby string is just a collection of raw bytes
<workmad3> ij: there are a lot of ways within ruby that are great for specialising specific instances of a class, without monkey-patching the entirety of a core class :)
mneorr has quit [Quit: Leaving.]
<ij> workmad3, How do I do the proxying? Is there some standard way to do it?
ZachBeta has joined #ruby
<bnagy> macer1: so basically that string should be 128 bytes, and appear in the final packet
<ij> Object#class is douchebaggery. I can call it only through obj.class, but not class.
<workmad3> ij: with 1.9, a fairly standard way would be to subclass BasicObject, give it an initializer that takes the object to proxy to, a simple method_missing that forwards on all methods, and the overridden methods you want
<macer1> this is how it works
afd__ has joined #ruby
Stalkr_ has joined #ruby
<bnagy> def to_s; self.data.to_a.pack("C*"); end
<bnagy> told you :)
<macer1> emm
<macer1> I told too
<macer1> it is unpacking in other part of code anyway :S
Speed has joined #ruby
Speed has quit [Changing host]
Speed has joined #ruby
<bnagy> the unpack is useless, basically
<bnagy> but whatever, that shouldn't be what makes it not work
<macer1> array :data, :type => :mc_byte
<bnagy> as long as the string you're getting is 128 bytes then it's sorrectly padded
<macer1> I need to make that bytes somehow :)
<bnagy> a ... string... IS ... BYTES
<macer1> but ARRAY :S
Spooner has joined #ruby
<macer1> ARRAY OF BYTES
<bnagy> you're converting a string to an array or ints, storing that, and then converting the array of ints back into exactly the same string to drop it onto the wire
williamherry has quit [Ping timeout: 264 seconds]
<bnagy> ie you're unpacking and packing for 0 reason
<macer1> to_s is uselss here
<macer1> deleted that
<macer1> also deleted unpack at .shared_secret
AlbireoX has quit [Remote host closed the connection]
dhruvasagar has quit [Ping timeout: 264 seconds]
dhruvasagar has joined #ruby
<workmad3> ij: https://gist.github.com/3273137 <-- example for you
Stalkr_ has quit [Ping timeout: 250 seconds]
Hama has quit [Remote host closed the connection]
<macer1> => ["woo"]
<macer1> fail
<macer1> I expected
<macer1> => [119, 111, 111]
<macer1> :)
<ij> workmad3, Cool. Also, didn't delegators do the same thing?
sepp2k has joined #ruby
ananthakumaran has quit [Read error: Connection timed out]
<workmad3> ij: delegators do something similar... but I've never bothered to get my head around how they work because I find the BasicObject approach nice and easy :)
Tulak1 has joined #ruby
zxc__ has joined #ruby
r1chelt has joined #ruby
ananthakumaran has joined #ruby
x0F has quit [Disconnected by services]
x0F_ has joined #ruby
<ij> workmad3, They're doing the method_missing magic for you. And something more.
x0F_ is now known as x0F
Tulak has quit [Ping timeout: 244 seconds]
<ij> They delegate themselves, so you wouldn't have to, hence Delegate(-ors).
<workmad3> ij: if I was being a good citizen, I'd also override respond_to_missing
<workmad3> ij: and iirc, with delegators you tend to have to say what you want to delegate
<macer1> bnagy: the encrypted shared secret is 128 bytes as you said
<Spooner> All they do is create wrapper methods, like the attr_ methods. What they don't do is proxy everything though.
<workmad3> Spooner: thanks :)
mockra has joined #ruby
<Spooner> So you'd def_delegators :@proxy_array, :size, :[], etc
<ij> Hmm. I've to re-read up on that.
<macer1> bnagy: it starts with byte 32 and server wants it to start with 0
<bnagy> what is 'it' here?
<macer1> oh, it's the encrypted shared secret
ik6 has joined #ruby
<macer1> look the message up
<bnagy> well that encrypted shared secret will start with a random byte
<macer1> yes
<macer1> 32 was an example
dhruvasagar has quit [Ping timeout: 246 seconds]
<macer1> also giving array longer than 128 gives error about; can't be longer than 128
<macer1> so it's something with byte order/padding
<bnagy> it is not padding or byte order
dhruvasagar has joined #ruby
<macer1> hm?
mockra has quit [Ping timeout: 272 seconds]
<bnagy> it's more likely that your kooky packet format wants a nullbyte
<bnagy> and then the ciphertext
<macer1> hmm...
<bnagy> but what comes out of public_encrypt will be correctly padded, and there is nowhere for any kind of byte order to get involved
<bnagy> it's not an integer of any kind
<bnagy> I would check that the final packet is the correct length according to your spec, first and foremost
chitradeep has joined #ruby
<macer1> hmm ok
iori has quit [Remote host closed the connection]
iori has joined #ruby
jjang has quit [Remote host closed the connection]
w0lverine has quit [Quit: w0lverine]
<macer1> that java exception is when ..."decrypted data is not bounded by the appropriate padding bytes"
flint has quit [Ping timeout: 240 seconds]
<macer1> also it says something about; at sun.security.rsa.RSAPadding.unpadV15(RSAPadding.java:308)
Iszak has joined #ruby
flint has joined #ruby
<Iszak> So I need to implement an algorithm that'll find common substring amongst infinite number of strings.
<Iszak> Anyone know how to do this? or can point me in the right direction?
afd__ has quit [Read error: Connection reset by peer]
iori has quit [Ping timeout: 246 seconds]
<bnagy> LCS ?
dhaivatpandya has joined #ruby
bj0ern has joined #ruby
anildigital_work has joined #ruby
vectorshelve has joined #ruby
nari has quit [Ping timeout: 245 seconds]
elhu has quit [Quit: Computer has gone to sleep.]
dhruvasagar has quit [Ping timeout: 244 seconds]
<bnagy> I think if you google MLCS you'll find lots of lit
<bnagy> this is basically a pure compsci question
Morkel has quit [Quit: Morkel]
dhruvasagar has joined #ruby
<Iszak> yeah, I've looked into LCS but seem a bit over my head.
<bnagy> ok, well there's your first issue :)
<Iszak> yeah, certainly is.
mmokrysz has joined #ruby
jjp has quit [Ping timeout: 250 seconds]
<Iszak> Basically, I want to analyse multiple strings, find patterns within them, and output a regular expression.
mfridh has joined #ruby
flype has quit [Quit: ["Textual IRC Client: www.textualapp.com"]]
tonini has joined #ruby
<bnagy> why a regular expression?
fowl is now known as fowlzzzzzzzzzzzz
<Iszak> bnagy: so I can in the future match them.
<bnagy> but the 'patterns' will just be strings, right?
bj0ern is now known as strg
<Iszak> well, the length should be somewhat common as well.
<Iszak> so maybe it'll output AA[0-9A-Z]{9}
jjp has joined #ruby
nateberkope has quit [Quit: Linkinus - http://linkinus.com]
<bnagy> ok I have no idea what you're talking about now :)
SphericalCow has joined #ruby
zxc__ has quit [Quit: Page closed]
heftig has joined #ruby
<Iszak> On it's simplest level it'll take multiple strings and find common substrings, from there, it will then proceed to calculate a common range, then from that it'll generate a regex.
s1n4 has quit [Quit: leaving]
<bnagy> ok well those sound like three different phases
<bnagy> phase 1 is NP hard
<Spooner> Iszak : It was infinite strings a minute ago, not just multiple strings. Good to see you are becoming more realistic :)
<bnagy> but there's a lot of lit
<bnagy> basically, look at algorithms from any language, or just general papers, don't limit yourself to looking at ruby implementations
<bnagy> I bet there's a java lib for this :P
charliesome has quit [Ping timeout: 244 seconds]
<workmad3> Iszak: so, basically, it's a way to generate a pattern that matches a set of strings?
<Iszak> yep
s1n4 has joined #ruby
<bnagy> /.*/
<bnagy> done
<burgestrand> //
<Iszak> why not just true.
<workmad3> Iszak: "(#{*args.map{|a| Regexp.escape(a)}.join("|")})"
<bnagy> hhaha
<burgestrand> Regexp.union(*args)
<Iszak> not quite like that.
<Iszak> All the data is in the database, maybe PostgreSQL has something like this.
<workmad3> Iszak: well, to go beyond that, you are going to need to describe how it should be parameterised... how close a match do you want to allow?
<workmad3> Iszak: is another fuzzy match algorithm maybe more appropriate?
<Iszak> workmad3: parameterised, the regex?
<workmad3> Iszak: as I'm guessing that's your goal... to generate a regex that will determine if string X is somehow 'close' to strings A,B,C
<workmad3> Iszak: the closeness needs to be parameterised...
r1chelt has quit [Remote host closed the connection]
<Iszak> it must match the length (variable) and the common substring, the other characters will definitively be alpha numerical.
<Iszak> so something like [A-Z0-9
<workmad3> Iszak: so you can describe what is close and what isn't (e.g. more than 10% difference, less than 5 characters difference, no more than 2 adjacent characters different...)
<Iszak> [A-Z0-9]{3}ABC[A-Z0-9]{6}
future_chimp has joined #ruby
<Iszak> well, I can't really put a percentage on it because it can be more if it's longer.
Rochefort has joined #ruby
<workmad3> Iszak: that sounds very like a percentage then...
<Iszak> Not necessarily.
<Iszak> it could be the same length, but different percentage depending on the common substring.
<workmad3> Iszak: ok... it actually sounds like you don't know exactly what you need I'm afraid
<workmad3> Iszak: which makes coming up with a concrete algorithm pretty much impossible
<workmad3> Iszak: I'd personally suggest doing a few worked examples on paper, going from source string(s) to regex
<workmad3> Iszak: and then try to extract some sort of pattern from that
<Iszak> I know exactly the regular expression I'm looking for, but like I said, it all depends.
<bnagy> I still think regexp probably doesn't belong here
<bnagy> but without a concrete problem statement it's all handwaving
<workmad3> Iszak: if 'it all depends' is code for 'there isn't a pattern', then what you have is a set of special cases that you'll need to code explicitly
Lachryma` has joined #ruby
<workmad3> Iszak: if that set of special cases is infinite in size... sucks to be you, you'll be coding them for a long time ;)
<workmad3> Iszak: if there is a pattern though... you need to work out what it is
<Iszak> well it's really calculating two different things, first is the common substring problem, then it's calculating the length range (easy).
Progster has joined #ruby
<workmad3> Iszak: and in all fairness... this is your job...
<Iszak> but I can't do it and hence is why I'm here for guidance.
<workmad3> Iszak: which is what I'm trying to give... guidance to how to tackle the problem
<workmad3> Iszak: guidance != doing your job for you
<bnagy> what are you going to do with these magic regexps once you have them?
<Iszak> match input.
<bnagy> to what end?
<Iszak> to better provide a result to the users input.
<workmad3> ah, wishy washy requirements too, great fun
jarr0dsz has joined #ruby
<bnagy> ...
<bnagy> not trying to be rude, but dude you can't communicate
jarr0dsz has left #ruby [#ruby]
<bnagy> if you can't state your problem nobody can help you
<Iszak> I think all these questions has confused what I really want.
<bnagy> and if you don't know why you want something then who knows if you actually need it, or if there's a better approach
<Iszak> I know why I want it.
rutkla_ has joined #ruby
Rochefortes has joined #ruby
rutkla has quit [Ping timeout: 264 seconds]
<bnagy> based on experience, this sounds like putting the cart before the horse - you want help in doing XYZ because you've decided that is how goal Q should be approached
bullicon has quit [Quit: Computer has gone to sleep.]
<bnagy> but given that you're unable to express goal Q, pff. I dunno.
<Iszak> Here's the full problem, so basically the user inputs a string, we then make multiple requires to multiple APIs, they will return whether it's a match or not. Now instead of having to call every API, it would be nice to match the user string first against a common pattern which each API has. This common pattern can change at any time so I can't hard code it unfortunately.
<Iszak> s/requires/requests/
felipecvo has quit [Ping timeout: 246 seconds]
Stalkr_ has joined #ruby
Rochefort has quit [Ping timeout: 246 seconds]
dhruvasagar has quit [Ping timeout: 264 seconds]
<bnagy> uh
dhruvasagar has joined #ruby
SeanTAllen has joined #ruby
busybox42 has quit [Read error: Connection reset by peer]
<bnagy> no, sorry, unable to parse that
<Iszak> well.. not sure I can convey it any better.
<workmad3> Iszak: wait... each API has a particular pattern... but it can change at any point, meaning it isn't actually a particular pattern, just noise that you're trying to assign meaning to
zemanel has quit [Quit: Remote hottie closed the connection]
<Iszak> well, there is a pattern, just for a certain period of time, then it changes.
elhu has joined #ruby
<Iszak> there's still a probability that the users input will still match multiple API's and that's fine, but instead of calling 100 APIs I only have to call 10.
berserkr has quit [Quit: Leaving.]
Stalkr_ has quit [Ping timeout: 272 seconds]
r1chelt has joined #ruby
jjp has quit [Quit: Lost terminal]
r1chelt has quit [Changing host]
r1chelt has joined #ruby
mockra has joined #ruby
cloud|droid has joined #ruby
dhaivatpandya has quit [Quit: dhaivatpandya]
<dr_bob> Iszak: maybe a two step approach works: each API publishes a pattern, you collect these in a Hash which uses the pattern as key and an Array of APIs as value. Of course your APIs would need to write the patterns in a uniform way so enough of them have the same pattern. Then you only match against keys in the Hash and for a match you match against all APIs (or until you find a match).
nilg has joined #ruby
mockra has quit [Ping timeout: 240 seconds]
TheDeadSerious has quit [Quit: Leaving.]
dhruvasagar has quit [Ping timeout: 246 seconds]
<Iszak> dr_bob: that would certainly work, but I want the code base to automatically determine these patterns.
Foxandxss has joined #ruby
<shevy> oh
<shevy> array of symbols can not be sorted?
cascalheira has joined #ruby
<shevy> oh no wait
<shevy> I had a mixed array with both symbols and strings
dhruvasagar has joined #ruby
Morkel has joined #ruby
<shevy> [:a, :b, :c, "d"].sort ArgumentError: comparison of Symbol with String failed
Morkel has quit [Client Quit]
Morkel has joined #ruby
Morkel has quit [Client Quit]
<workmad3> shevy: heh
<dr_bob> Iszak: another approch is to use a Trie for storage. Then you can step through the user input until you find the single matching API.
Morkel has joined #ruby
<Iszak> Never heard of a Trie, will have to look into it - thanks!
<dr_bob> shevy: [:a, :b, :c, "d"].sort_by &:to_s
TheShadowFog has quit [Read error: Connection reset by peer]
<shevy> ohhhh
<shevy> that is cool
<shevy> thanks. I was about to change all my hash keys to strings, just so I can sort alphabetically already
<dr_bob> Basically it is a tree like structure with a key element (char in your case) at each node
<dr_bob> Iszak: a simplistic implementation in Ruby could use nested Hashes for internal storage of the trie data.
bullicon has joined #ruby
Stalkr_ has joined #ruby
charliesome has joined #ruby
dhruvasagar has quit [Ping timeout: 244 seconds]
dhruvasagar has joined #ruby
Rochefort has joined #ruby
<Iszak> I think I'm going to have to leave this for now! but thanks for all your help.
Rochefortes has quit [Ping timeout: 246 seconds]
dhruvasagar has quit [Ping timeout: 249 seconds]
<Hanmac> shevy i still like something like this:P .any?(&:=~)
<shevy> that applies ... what kind of regex to that?
<shevy> I dont like the & character much
dhruvasagar has joined #ruby
<workmad3> shevy: there seems to be a hell of a lot that you don't like much at times :P
<Hanmac> i used it with with_object(/reg/)
<shevy> workmad3 yeah but it depends
<shevy> workmad3 & is ugly, () is ok, (((())))) is ugly
<shevy> blocks are awesome
<shevy> -> stinks
<workmad3> shevy: how about ary.map(&:-@) ;)
Markvilla has quit [Quit: Computer has gone to sleep.]
<shevy> { a: "foo"} is semi-ok
<shevy> argh
<shevy> that looks like a smiley with some kind of wild hair on the head
mneorr has joined #ruby
<shevy> what is -@ doing?
Markvilla has joined #ruby
<workmad3> shevy: unary -
<workmad3> shevy: [1,2,3].map(&:-@) #=> [-1, -2, -3]
<Hanmac> +,!,~ have unary forms too
r1chelt_ has joined #ruby
<shevy> that smiley scares me
<workmad3> map(&:+@)
<ij> :-@ is fun, yeah
<shevy> lol
<shevy> desperate smiley
<shevy> I still dont entirely get it... why is the @ needed there?
<workmad3> Hanmac: do you need the @ suffix for ! and ~ ?
<shevy> isn't that an instance variable usually
<workmad3> shevy: because :- and :-@ are different methods
<ij> workmad3, For ~, yeah
<shevy> stop those smileys!
<shevy> I can't concentrate on non-smiley meaning
<workmad3> shevy: :- is the binary -, so 1 - 2 is 1.-(2)
Guest46343 has quit [Quit: Leaving]
ananthakumaran has quit [Read error: Connection timed out]
<workmad3> shevy: while :-@ is the unary -, so - 1 is 1.-@()
<shevy> :~@
<shevy> 1.-@() <--- smiley as well
<shevy> :(
<workmad3> shevy: 1.-@() is actually valid ruby code btw ;)
chitradeep has quit [Quit: chitradeep]
<workmad3> shevy: as is -1.+@()
<shevy> hmm
<Hanmac> meth?(&:=~) is valid ruby too :P
<workmad3> shevy: the @ suffix is an unfortunate consequence of ruby not allowing polymorphic method calls btw
<shevy> aha
<workmad3> shevy: as it needed a way to distinguish operator overloads of 1 - 2 from - 1
dhruvasagar has quit [Ping timeout: 246 seconds]
<workmad3> shevy: so the unary operator overloads got an @ suffix
<workmad3> shevy: rather than being able to determine them just from having a - overload with 1 argument from a - overload with 0 arguments
ppawel has quit [Ping timeout: 264 seconds]
chitradeep has joined #ruby
dhruvasagar has joined #ruby
Markvilla has quit [Quit: Computer has gone to sleep.]
<Hanmac> >> defined?(-1)
<al2o3cr> Hanmac: (NilClass) nil
<workmad3> >>defined?(- 1)
<al2o3cr> workmad3: (NilClass) nil
<workmad3> heh
<Hanmac> :'(
<workmad3> Hanmac: note I'm using - 1, not -1, to avoid you pointing out that -1 is a literal expression ;)
clocKwize has joined #ruby
<Spooner> >> "are you broken?"
<al2o3cr> Spooner: (String) "are you broken?"
* workmad3 is aware of the level of pedantry here
<workmad3> >> 1 + 1
<al2o3cr> workmad3: (Fixnum) 2
<shevy> >> 1.-@()
<workmad3> >> _
<al2o3cr> shevy: (Fixnum) -1
<al2o3cr> workmad3: (String) "NameError: undefined local variable or method `_' for main:Object"
<shevy> hehe
<workmad3> >> ----1.-@()
<al2o3cr> workmad3: (Fixnum) -1
<workmad3> >> ---1.-@()
<al2o3cr> workmad3: (Fixnum) 1
<workmad3> -1**4
<workmad3> >>-1**4
<al2o3cr> workmad3: (Fixnum) -1
<workmad3> oops
<workmad3> >>-1**5
<al2o3cr> workmad3: (Fixnum) -1
ik6 has quit [Ping timeout: 240 seconds]
<workmad3> >>Complex(0,1)**2
<al2o3cr> workmad3: (Complex) (-1+0i)
<workmad3> >>Complex(0,1)**3
<al2o3cr> workmad3: (Complex) (0-1i)
<workmad3> >>Complex(0,1)**4
<al2o3cr> workmad3: (Complex) (1+0i)
liluo has quit [Remote host closed the connection]
* workmad3 loves roots of unity
r1chelt_ has quit [Quit: r1chelt_]
bothra has joined #ruby
<workmad3> shevy: are complex numbers too complex for you? :)
geekbri has joined #ruby
arturaz has joined #ruby
dhruvasagar has quit [Ping timeout: 246 seconds]
dhruvasagar has joined #ruby
Hanmac has quit [Ping timeout: 272 seconds]
<ij> >> fork while fork
<al2o3cr> ij: (String) "NameError: undefined local variable or method `fork' for Kernel:Module"
<clocKwize> guys, I have a has_many where all the children have a expiry date - would it be wrong to run a cron job every hour to set expired = true on the model if all of its children have expired? I'm trying to index my data with Thinking Sphinx and its just getting a bit of a nightmare
kn330 has joined #ruby
<shevy> workmad3 yeah
<shevy> I prefer numbers like 1,2,3,4
<workmad3> shevy: but complex numbers are so simple in reality! :P
<workmad3> shevy: they add less complexity than real numbers do
* workmad3 taunts shevy about his dislike of anything that even mentions the word 'complex' :P
<shevy> I dont like complexity
`brendan has joined #ruby
macer1 has quit [Remote host closed the connection]
<workmad3> shevy: complexity is where things get interesting though... otherwise all you ever really deal with are trivialities
bothra has quit [Ping timeout: 245 seconds]
<workmad3> shevy: needless complication, I'm right behind you... that stuff sucks
<workmad3> shevy: to paraphrase - 'things should be as complex as they need to be, and no more'
<shevy> well that sounds better
emsilva has quit [Ping timeout: 246 seconds]
ZachBeta has quit [Quit: Textual IRC Client: http://www.textualapp.com/]
<Muz> >> RubyVM::InstructionSequence.compile('a = 1; p 1 + a').disassemble
<al2o3cr> Muz: (String) "SyntaxError: sandrbox:1: syntax error, unexpected tSTRING_BEG, expecting keyword_do or '{' or '('\np 1 + a').disassemble\n ^\nsandrbox:1: unterminated string meets end of file"
<Muz> Whee, that's a new bug with the bot, right?
<shevy> hmm interesting
<fowlzzzzzzzzzzzz> Muz: that bot sux
<shevy> >> RubyVM.class
<al2o3cr> shevy: (NilClass) nil
<Muz> fowlzzzzzzzzzzzz: that nick sux.
<fowlzzzzzzzzzzzz> ;_;
<workmad3> >> RubyVM
<al2o3cr> workmad3: (Class) RubyVM
iamjarvo has joined #ruby
<shevy> Muz, I think he disabled RubyVM too
<workmad3> shevy: you asked for the class of a class
<workmad3> shevy: and he's hidden Class ;)
<shevy> aha
<workmad3> >> Class
<shevy> >> Class
<al2o3cr> workmad3: (Class) Class
<al2o3cr> shevy: (Class) Class
<workmad3> hmm, odd
<shevy> this bot is a pseudo-ruby bot
<workmad3> oh, did he just disable things that asked for class
<workmad3> >> class Foo; end;
<al2o3cr> workmad3: (NilClass) nil
<shevy> nice find Muz
<workmad3> send('cl' 'ass')
<workmad3> >> send('cl' 'ass')
<al2o3cr> workmad3: (Class) Object
<workmad3> bah
<shevy> >> RubyVM::InstructionSequence.compile('xyz = 5)
<al2o3cr> shevy: Output too long, I PMed it to you
<shevy> oops
<workmad3> >> send('cl' 'ass').ancestors
<al2o3cr> workmad3: (Array) [Object, Kernel, BasicObject]
<shevy> >> send('class').ancestors
<al2o3cr> shevy: The Ruby interpreter exited with nonzero status. Hanmac is probably to blame.
<shevy> lol
<shevy> >> send('cl''ass').ancestors
<al2o3cr> shevy: (Array) [Object, Kernel, BasicObject]
<workmad3> >> singleton_class
<shevy> <al2o3cr> stderr: /home/jrajav/.gem/ruby/1.9.1/gems/sandrbox-0.1.0/lib/sandrbox/response.rb:48:in `block in compress': undefined method `<<' for nil:NilClass (NoMethodError)
<al2o3cr> workmad3: (NilClass) nil
<workmad3> >> send('singleton_cl''ass')
<al2o3cr> workmad3: (Class) #<Class:#<Object:0x00000001e0c7b0>>
<workmad3> wee :D
<workmad3> >> STDIN
<al2o3cr> workmad3: (IO) #<IO:<STDIN>>
<workmad3> >> STDIN.send('cl''ass')
<al2o3cr> workmad3: (Class) IO
krusty_ar has joined #ruby
<shevy> this reminds me of hacking into the computer in the old fallout game
TheShadowFog has joined #ruby
moshee has quit [Ping timeout: 272 seconds]
moshee has joined #ruby
moshee has quit [Changing host]
moshee has joined #ruby
Hanmac has joined #ruby
paolooo has joined #ruby
mattfield has joined #ruby
mattfield has left #ruby [#ruby]
al2o3cr has quit [Excess Flood]
ephemerian has quit [Quit: Leaving.]
<ij> too bad
al2o3cr has joined #ruby
al2o3cr has quit [Excess Flood]
<Hanmac> :D
<ij> ha!
al2o3cr has joined #ruby
al2o3cr has quit [Excess Flood]
<ij> It just keeps PMing me the n-word. :/ haha
al2o3cr has joined #ruby
<Muz> Lol
<shevy> it has become a spam bot
<ij> Like that.
mockra has joined #ruby
<ij> It's a pretty secure bot, it seems.
<shevy> Hanmac said that too
<shevy> one day we will have artificial intelligence able to detect any vulnerability in 0.000001 seconds
<ij> Right. : ]
yeggeps has joined #ruby
charliesome has quit [Quit: Textual IRC Client: www.textualapp.com]
mockra has quit [Ping timeout: 245 seconds]
Markvilla has joined #ruby
wereHamster has quit [Ping timeout: 246 seconds]
<Iszak> what would be awesome is if it not only detected it but also patched the vulnerability.
<shevy> hehe
<shevy> yeah
al2o3cr has quit [Excess Flood]
al2o3cr has joined #ruby
al2o3cr has quit [Excess Flood]
<shevy> but I suppose this will take many more decades before there is a really, truly intelligent AI, that can also learn new things on its own
<Hanmac> :P
<ij> Who made it?
<ij> Hanmac, You?
Axsuul has quit [Ping timeout: 272 seconds]
ik6 has joined #ruby
carloslopes has joined #ruby
wereHamster has joined #ruby
johnjohnson has joined #ruby
<Hanmac> noo :P when i would write a bot, it would be diferent
<ij> It didn't come back, hurray!
<ij> Although that wasn' the desired effect.
virunga is now known as papagno
papagno is now known as saette
saette is now known as saetta
<Hanmac> ij i think the other users may be bad at you because you take our toy away :P
saetta is now known as papagno
wereHamster has quit [Remote host closed the connection]
<ij> Wasn't my intention,
<ij> I was just testing it.
cloud|droid has quit [Remote host closed the connection]
<ij> :P
[Neurotic] has quit [Remote host closed the connection]
papagno is now known as virunga
<Hanmac> so ... what did you done?
* hemanth drove my shevy to the levy, but the levy was dry;
<ij> Hanmac, Sleep and inspect.
<ij> Also, []#*
<ij> Okay, nothing fancy just a DoS.
<ij> But that's testing too!
jrajav has joined #ruby
<GeekOnCoffee> hemanth: you mean a Chevy?
<jrajav> ?
tayy has quit [Remote host closed the connection]
<jrajav> Why is my bot not in here :/
<jrajav> It seems like it's still running
<hemanth> GeekOnCoffee, ya, was just pulling legs ;)
<ij> jrajav, Magic.
<jrajav> ij: I do see all your garbage.
rutkla has joined #ruby
<hemanth> GeekOnCoffee, I have a Chevy beat ;)
al2o3cr has joined #ruby
<jrajav> ij: Let's not be an idiot and flood it, mmkay?
<jrajav> al2o3cr: ping
<al2o3cr> jrajav: pong
fbernier has joined #ruby
s1n4 has quit [Quit: peace out]
<ij> jrajav, I was just testing man.
rutkla_ has quit [Ping timeout: 240 seconds]
<jrajav> Fair enough I guess
<ij> Not gonna do it again, though.
<jrajav> It's weird
<jrajav> Cause the bot doesn't show that it was kicked or anything
<jrajav> Just the last couple lines of "garbage"
wereHamster has joined #ruby
a_a_g has quit [Quit: Leaving.]
<jrajav> And you'd think if Freenode kicked for flooding that the client would disconnect
peterhellberg has joined #ruby
Markvilla has left #ruby ["["Textual IRC Client: www.textualapp.com"]"]
Markvilla has joined #ruby
<ohcibi> hm it seems like the examples for String#[rl]strip(!) are wrong... the example for rstrip should be the example for lstrip ("asdf ".rstrip ==> "asdf", the doc says " asdf".rstrip ==> "asdf")
<ohcibi> talking about ruby-doc.org
felipecvo has joined #ruby
<burgestrand> ohcibi: which version?
<burgestrand> ohcibi: http://ruby-doc.org/core-1.9.3/String.html#method-i-rstrip => " hello ".rstrip #=> " hello"
<ohcibi> burgestrand: core-1.9.3
<ohcibi> burgestrand: there are examples with only whitespaces on one side of the string
<burgestrand> ohcibi: where?
<ohcibi> burgestrand: forget it i cant read 8-)
<burgestrand> :)
<jrajav> The examples here?
<jrajav> Because they look right to me
<ohcibi> jrajav: they are... as i said: i cant read today...
sevvie has joined #ruby
mengu has joined #ruby
mmokrysz has quit [Quit: Leaving.]
bothra has joined #ruby
tk_ has joined #ruby
busybox42 has joined #ruby
vlad_starkov has joined #ruby
havenn has joined #ruby
yasushi has joined #ruby
yasushi has quit [Read error: Connection reset by peer]
yasushi has joined #ruby
tommyvyo has joined #ruby
dhruvasagar has quit [Read error: Connection reset by peer]
gmci has quit [Quit: Computer has gone to sleep.]
ananthakumaran has joined #ruby
cloud|droid has joined #ruby
dhruvasagar has joined #ruby
lorandi has joined #ruby
yeggeps has quit [Read error: Connection reset by peer]
wereHamster has quit [Ping timeout: 246 seconds]
dhaivatpandya has joined #ruby
yeggeps has joined #ruby
<ik6> is there a simple way to skip an iteration during an 'each' statement?
<virunga> next
<ik6> if(a == 2) next else print 'not a 3' ?
<ik6> 'not a 2'
<virunga> let's try
<ik6> :)
<Muz> (1..4).each { |i| next if i == 2; puts i }
<virunga> >> [1, 2].map { |x| next if x == 2 }
<al2o3cr> virunga: (Array) [nil, nil]
<Muz> >> (1..4).each { |i| next if i == 2; puts i }
<al2o3cr> Muz: (String) "SyntaxError: sandrbox: syntax error, unexpected tIDENTIFIER, expecting '}'\n(1..4).each { |i| next if i == 2puts i }\n ^"
<jrajav> No stdout, sorry
aganov has quit [Ping timeout: 240 seconds]
<virunga> >> [1, 2].map { |x| next if x == 2 else x }
<al2o3cr> virunga: (String) "SyntaxError: sandrbox: syntax error, unexpected keyword_else, expecting '}'\n[1, 2].map { |x| next if x == 2 else x };\n ^"
<hoelzro> wouldn't that map to [1, nil]?
<virunga> maybe
<virunga> :P
<virunga> i'm a noob
Rochefortes has joined #ruby
<Hanmac> >> [1, 2].map { |x| x == 2 ? next : x }
<al2o3cr> Hanmac: (Array) [1, nil]
<hoelzro> >> [1, 2].map { |x| next if x == 2 x }
<al2o3cr> hoelzro: (String) "SyntaxError: sandrbox: syntax error, unexpected tIDENTIFIER, expecting '}'\n[1, 2].map { |x| next if x == 2 x };\n ^"
<hoelzro> >> [1, 2].map { |x| next if x == 2 ; x }
<al2o3cr> hoelzro: (String) "SyntaxError: sandrbox: syntax error, unexpected tIDENTIFIER, expecting '}'\n[1, 2].map { |x| next if x == 2x }\n ^"
<jrajav> Hanmac: LXC on the way
* hoelzro doesn't know how to do Ruby one-liners
cezar has joined #ruby
ppawel has joined #ruby
cezar has quit [Client Quit]
xorigin has quit [Quit: leaving]
iamjarvo has quit [Quit: Leaving...]
johnjohnson has quit []
Rochefort has quit [Ping timeout: 246 seconds]
yoklov has joined #ruby
<ij> >> [3.superclass, 3.class] # <-- noooo! :[
<al2o3cr> ij: (NilClass) nil
dhruvasagar has quit [Ping timeout: 246 seconds]
<ik6> ok, that worked. thanks!
<Mon_Ouie> hoelzro: Your first version *was* correct; it's just a bug in the Sandbox used by the bot (or something I would consider a bug anyway)
dhruvasagar has joined #ruby
<ik6> how about: next if(x.text == "1" or x.text == "2"); puts...
yeggeps has quit [Read error: Connection reset by peer]
<hoelzro> haha
<hoelzro> *ahah
<hoelzro> thanks for letting me know =)
yeggeps has joined #ruby
<Mon_Ouie> And I wouldn't use next in that case anyway
<Mon_Ouie> Just if condition then puts … end
nari has joined #ruby
mucker has quit [Remote host closed the connection]
<ik6> if(x != 2 or x != 1); puts ... end ?
<bnagy> puts x unless x < 3
arietis has joined #ruby
Rochefort has joined #ruby
<peterhellberg> [1,2,3,4].each { |n| puts n unless [2,3].include?(n) } :)
<ik6> it's a string
<ik6> parsing html
lorn_ has joined #ruby
<bnagy> puts x unless %w(1 2).include? x
caveat- has quit [Quit: leaving]
mucker has joined #ruby
cezar has joined #ruby
aganov has joined #ruby
Tulak has joined #ruby
lorn has quit [Ping timeout: 276 seconds]
lorn_ is now known as lorn
cezar has quit [Client Quit]
caveat- has joined #ruby
cousine has joined #ruby
g_rotbart has quit [Remote host closed the connection]
flype has joined #ruby
tatsuya_o has quit [Remote host closed the connection]
Rochefortes has quit [Ping timeout: 264 seconds]
Tulak1 has quit [Ping timeout: 272 seconds]
yeggeps has quit [Read error: Connection reset by peer]
yeggeps has joined #ruby
GoGoGarrett has joined #ruby
<Muz> jrajav: had an idea for long (and terminated) output, why not post it to pastie/pastebin/whatever and have the bot return a link to that?
<Muz> s/it/STDOUT/
<jrajav> That's an okay idea
<jrajav> Might be a little unwieldy
<jrajav> I'm more inclined to avoid automatically pastebinning anything as long as there's not an actual problem with sending tons of output through IRC PM
<jrajav> And I haven't seen one
<workmad3> jrajav: there is a limit on message length
<jrajav> workmad3: Do you know what it is?
<Muz> And a flood limit as demonstrated earlier.
<workmad3> jrajav: I think it's something like 400 chars on freenode
<workmad3> ^^
<jrajav> It's DEFINITELY longer than that
<jrajav> haha
<workmad3> jrajav: it might be longer in PM :)
<jrajav> Muz: Demonstrated earlier? Something happen while I was gone?
<workmad3> jrajav: what would be nice actually is if you could 'save' a bot command
aces23up has joined #ruby
<workmad3> jrajav: maybe with a different token
aces1up has quit [Ping timeout: 240 seconds]
<Muz> 13:19 -!- al2o3cr [~js-irc@167.68.114.6] has quit [Excess Flood]
<Muz> About an hour ago.
<workmad3> jrajav: so... dunno... !gist >> "whatever" will save the command and the output in a gist and give a link
<jrajav> Muz: :O
<jrajav> workmad3: Yeah that would be great
<workmad3> jrajav: get on it then ;)
mockra has joined #ruby
<jrajav> Muz: I still don't understand why my bot didn't just quit. It's supposed to quit upon disconnecting, whichever party cut the connection
<jrajav> Muz: And when it quits, forever brings it back up, so it would rejoin
<jrajav> So it's annoying that it didn't quit :P
* Muz shrugs.
yasushi has quit [Remote host closed the connection]
yasushi has joined #ruby
Solnse2 has joined #ruby
chico_chicote has joined #ruby
yasushi has quit [Read error: Connection reset by peer]
yasushi has joined #ruby
ananthakumaran has quit [Quit: Leaving.]
jgarvey has joined #ruby
Solnse has quit [Ping timeout: 264 seconds]
johnjohnson has joined #ruby
mockra has quit [Ping timeout: 248 seconds]
Stalkr_ has quit [Quit: Leaving...]
Speed has quit [Quit: When two people dream the same dream, it ceases to be an illusion.]
mfrost503 has left #ruby [#ruby]
v0n has joined #ruby
bluenemo has joined #ruby
bananastalktome has joined #ruby
Michagogo has joined #ruby
Vert has quit [Ping timeout: 252 seconds]
emsilva has joined #ruby
emsilva has quit [Changing host]
emsilva has joined #ruby
dhruvasagar has quit [Ping timeout: 264 seconds]
dhruvasagar has joined #ruby
chrisja has joined #ruby
johnjohnson has quit []
arkiver has joined #ruby
yoklov has quit [Quit: computer sleeping]
kpshek has joined #ruby
ksk has quit [Ping timeout: 246 seconds]
<ik6> thanks bnagy! just got it :-)
dv310p3r has joined #ruby
uris has joined #ruby
cantbecool has joined #ruby
nateberkopec has joined #ruby
hynkle has joined #ruby
cousine has quit [Ping timeout: 246 seconds]
iamjarvo has joined #ruby
wereHamster has joined #ruby
verto|off is now known as verto
dekroning has joined #ruby
<dekroning> hi
<hoelzro> greetings!
<emsilva> curiosity landed!
fowlzzzzzzzzzzzz is now known as fowl
<Michagogo> Why is there a #ruby and a #ruby-lang?
vectorshelve has quit [Quit: Page closed]
<virunga> so you can ask the same question in two different channel
<virunga> i'm kidding
<virunga> #ruby-lang should be the official channel of ruby i think
<virunga> but i dunno why there are two channels
jimeh has quit [Quit: bye]
r1chelt has quit [Remote host closed the connection]
vlad_starkov has quit [Remote host closed the connection]
<Hanmac> Michagogo: ruby-lang is offical, but you need to be registered ...
adambeynon has joined #ruby
<Michagogo> Hanmac: what?
<Michagogo> Neither channel is +r
linoj has joined #ruby
cantbecool has quit [Quit: Textual IRC Client: www.textualapp.com]
<Mon_Ouie> Somehow it doesn't appear in the channel modes but it *is* required on #ruby-lang
<Hanmac> oO the last time i looked at ruby-lang was that users need to be registerd to NameServ ...
<Michagogo> NickServ*
<Michagogo> Oh
<Michagogo> I know why.
<Michagogo> #ruby-lang q $~a
<Hanmac> thats why they all come to us, because they are banned in #ruby-lang :P
<Michagogo> Not banned
<Michagogo> Just quieted
<Hanmac> i have seen someone that was REALY banned from #ruby-lang
asobrasil has joined #ruby
<Michagogo> x-user!*@* is quieted there
<Michagogo> And there's a long ban list
<Michagogo> Just type /mode #ruby-lang b
pu22l3r has joined #ruby
yasushi has quit [Remote host closed the connection]
Michagogo has quit [Remote host closed the connection]
yasushi has joined #ruby
Michagogo has joined #ruby
<ik6> is cgi.rb a standard gem for writing to an html document?
infinitiguy has joined #ruby
stopbit has joined #ruby
<workmad3> ik6: I think cgi is part of the stdlib, not a gem
joshman_ has quit [Quit: Computer has gone to sleep.]
axl_ has joined #ruby
clocKwize has quit [Quit: clocKwize]
<ik6> i have no idea where to begin.. i'd just like to write some stuff from ruby to an html document. i saw cgi.rb and cgialt.rb...
yasushi has quit [Ping timeout: 244 seconds]
nricciar has joined #ruby
Solnse2 has quit []
macer1 has joined #ruby
digitalcakestudi has joined #ruby
vlad_starkov has joined #ruby
<workmad3> ik6: if all you want to do is generate some plain HTML, you could look at nokogiri or hpricot
<peterhellberg> ik6: So you want to output a file that contains html?
jonathanwallace has quit [Remote host closed the connection]
<ik6> i'm using nokogiri to grab data, didn't know i could output html as well
<ik6> peterhellber: yep, pretty much
<peterhellberg> ik6: So you are not looking for a web framework then?
bananastalktome has quit [Quit: bananastalktome]
jjbohn has joined #ruby
<ik6> well, i've got a really simple script that scrapes from x website. and i'd like to put it on another website.
theRoUS has joined #ruby
<peterhellberg> Ok
ppawel has quit [Ping timeout: 246 seconds]
yasushi has joined #ruby
conor_ireland has quit [Quit: conor_ireland]
<peterhellberg> ik6: I’d probably start with generating a JSON (or XML) document containing the data.
conor_ireland has joined #ruby
<ik6> yep
<peterhellberg> ik6: Do you have something like that already?
paolooo_ has joined #ruby
tayy has joined #ruby
v0n has quit [Ping timeout: 246 seconds]
paolooo_ has quit [Client Quit]
Michagogo has left #ruby [#ruby]
<ik6> i think my script could do that pretty easily... with nokogiri, right?
<peterhellberg> ik6: If you go the Nokogiri route, then there is a Nokogiri::HTML::Builder
<ik6> ok
verto is now known as verto|off
dhruvasagar has quit [Ping timeout: 246 seconds]
<peterhellberg> ik6: You can read up on how it works on http://nokogiri.org/Nokogiri/HTML/Builder.html
<ik6> ok, cool.
<ik6> so one more question
<peterhellberg> Sure
<ik6> when i upload this to my server
nari has quit [Ping timeout: 264 seconds]
<ik6> will i be using Ruby on Rails?
<Hanmac> only if you want it :P
<peterhellberg> You don’t need to
verto|off is now known as verto
<peterhellberg> But you sure can do that
<ik6> what runs the .rb file then?
<Hanmac> you are not forced to use rails, you can walk too :P
<peterhellberg> Didn’t you just say that you do that before uploading the output?
jonnn_ has joined #ruby
lkba has joined #ruby
<ik6> yeah, i guess what I meant was that it should dynamic... does that make sense?
`vitoravelino is now known as vitoravelino
<peterhellberg> ik6: Do you want the scraping to be done in real time or does it take a lot of time?
<ik6> it could happen in real time, i think
<peterhellberg> If you want to do the scraping in real time then I would suggest using the Sinatra framework and then deploy it to Heroku (free for small apps)
andrewh has quit [Ping timeout: 272 seconds]
<ik6> oh, I saw Sinatra earlier today
ananthakumaran has joined #ruby
<ik6> ok, i'll have a look into that
d3vic3 has quit [Quit: leaving]
<ik6> thanks heaps :-)
<peterhellberg> Heroku is just a suggestion though, there are a few different hosting companies where you can deploy your Ruby-apps for free/cheaply
syamajala has joined #ruby
cloud|droid has quit [Remote host closed the connection]
tayy has quit [Remote host closed the connection]
<ik6> If I used Heroku
Speed has joined #ruby
Speed has quit [Changing host]
Speed has joined #ruby
<ik6> That would be with Sinatra?
<peterhellberg> It could be, but that is just a combination that I prefer :)
Speed has quit [Client Quit]
<peterhellberg> Sinatra is a web framework, just like Ruby on Rails.
Araxia has joined #ruby
<ik6> but simpler? or what?
JonghwanHyeon has joined #ruby
<peterhellberg> Yes, much simpler
bbttxu has joined #ruby
<peterhellberg> (In some regards)
<ik6> Excellent.
<peterhellberg> http://www.sinatrarb.com/ <- You can read more about it here
internet_user has joined #ruby
<ik6> Thanks :)
<peterhellberg> You are welcome
jonnn_ has left #ruby ["Textual IRC Client: http://www.textualapp.com/"]
JonghwanHyeon has quit [Remote host closed the connection]
cakehero has joined #ruby
Hanmac has quit [Ping timeout: 246 seconds]
poppiez has quit [Quit: Linkinus - http://linkinus.com]
Spooner has quit [Ping timeout: 245 seconds]
jrajav has quit [Quit: The best darkness is strange and surprising]
v0n has joined #ruby
gmci has joined #ruby
elhu has quit [Quit: Computer has gone to sleep.]
bullicon has quit [Quit: Computer has gone to sleep.]
xaq has joined #ruby
elhu has joined #ruby
Araxia has quit [Quit: Araxia]
nwest has joined #ruby
ik6 has quit [Quit: Leaving]
havenn has quit [Remote host closed the connection]
caveat- has quit [Quit: leaving]
JonghwanHyeon has joined #ruby
ramblex has joined #ruby
caveat- has joined #ruby
Hanmac has joined #ruby
sailias has joined #ruby
lolmaus has quit []
asteve has joined #ruby
johnlcox has joined #ruby
andrewhl has joined #ruby
daniel_hinojosa has joined #ruby
JohnBat26 has quit [Ping timeout: 244 seconds]
abra has joined #ruby
jprovazn has quit [Quit: Leaving]
jonathanwallace has joined #ruby
jprovazn has joined #ruby
jprovazn is now known as jprovazn_away
clocKwize has joined #ruby
katherinem13 has joined #ruby
wmoxam_ has joined #ruby
JonghwanHyeon has quit [Remote host closed the connection]
tonini has quit [Remote host closed the connection]
JonghwanHyeon has joined #ruby
ramblex has quit [Quit: ramblex]
sebastorama has quit [Quit: Computer has gone to sleep.]
MasterIdler has joined #ruby
ayia has joined #ruby
ramblex has joined #ruby
brg has left #ruby [#ruby]
eddie_ has quit [Quit: Ex-Chat]
<ayia> Hi guys, what happens when i put "variable" in irb and press enter? Which function is called on "variable"?
eddie_ has joined #ruby
asteve has left #ruby [#ruby]
eddie_ has quit [Client Quit]
eddie__ has joined #ruby
<workmad3> ayia: inspect
liluo has joined #ruby
eddie__ has quit [Client Quit]
eddie__ has joined #ruby
andrewh has joined #ruby
eddie__ has quit [Client Quit]
eddie__ has joined #ruby
<ayia> workmad3: thanks!
eddie__ has quit [Client Quit]
eddie___ has joined #ruby
eddie___ has quit [Client Quit]
eddie__ has joined #ruby
duder has joined #ruby
<fowl> ayia: use pry and you can do ls variable
xaq has quit [Remote host closed the connection]
eddie__ has quit [Client Quit]
eddie__ has joined #ruby
syamajala has quit [Remote host closed the connection]
eddie__ has quit [Client Quit]
eddie___ has joined #ruby
eddie___ has quit [Client Quit]
eddie___ has joined #ruby
jimeh has joined #ruby
eddie___ has quit [Client Quit]
eddie__ has joined #ruby
axl_ has quit [Read error: Connection reset by peer]
dhaivatpandya has quit [Quit: dhaivatpandya]
eddie__ has quit [Client Quit]
eddie__ has joined #ruby
sailias has quit [Quit: Leaving.]
axl_ has joined #ruby
duder has quit [Client Quit]
PapaSierra2 has quit [Read error: Connection reset by peer]
eddie__ has quit [Client Quit]
eddie__ has joined #ruby
erichmenge has joined #ruby
<ayia> fowl: thanks) Actually I need this to write a proper title for my question on SO (http://stackoverflow.com/questions/11830513/why-the-comments-each-comment-comment-title-produces-not-a-comme)
eddie__ has quit [Client Quit]
eddie__ has joined #ruby
eddie__ has quit [Client Quit]
dhaivatpandya has joined #ruby
eddie__ has joined #ruby
PapaSierra has joined #ruby
eddie__ has quit [Client Quit]
eddie___ has joined #ruby
eddie___ has quit [Client Quit]
eddie___ has joined #ruby
eddie___ has quit [Client Quit]
eddie__ has joined #ruby
TPFC-SYSTEM has quit [Quit: TPFC-SYSTEM]
<fowl> ayia: if you check the docs for array#each http://ruby-doc.org/core-1.9.3/Array.html#method-i-each it returns the object it was called on (the array)
yasushi has quit [Remote host closed the connection]
<fowl> what you want is a function that will take your block and map the outcome to a new array, array#map comes to mind
yasushi has joined #ruby
ken_barber has joined #ruby
chitradeep has quit [Quit: chitradeep]
greenysan has joined #ruby
<fowl> ayia: oh to answer why they are different, erb is like php where if you break out of ruby with %> it starts outputting for you
ace has joined #ruby
<ace> hi
<ace> is it possible to do a case switch depending of if the string is found
Mchl has quit [Quit: ZNC - http://znc.sourceforge.net]
andrewhl has quit [Remote host closed the connection]
<fowl> use a regex
<fowl> case str; when /rgx/
Mchl has joined #ruby
<ace> fowl : of course :)
<ace> thx
andrewhl has joined #ruby
eddie__ has quit [Ping timeout: 244 seconds]
burgestrand has quit [Quit: Leaving.]
yasushi has quit [Ping timeout: 250 seconds]
xaq has joined #ruby
yasushi has joined #ruby
wmoxam_ has quit [*.net *.split]
ananthakumaran has quit [*.net *.split]
macer1 has quit [*.net *.split]
aces23up has quit [*.net *.split]
linoj has quit [*.net *.split]
tk_ has quit [*.net *.split]
x0F has quit [*.net *.split]
Bofu has quit [*.net *.split]
just4dos has quit [*.net *.split]
virunga has quit [*.net *.split]
Poapfel has quit [*.net *.split]
Guest89851 has quit [*.net *.split]
SegFaultAX has quit [*.net *.split]
voodoofish has quit [*.net *.split]
jeff_sebring has quit [*.net *.split]
pskosinski has quit [*.net *.split]
bigkevmcd has quit [*.net *.split]
adeponte has quit [*.net *.split]
Zespre has quit [*.net *.split]
RichieEvan has quit [*.net *.split]
vertroa_ has quit [*.net *.split]
korczis has quit [*.net *.split]
naquad has quit [*.net *.split]
RichGuk has quit [*.net *.split]
akem has quit [*.net *.split]
Veejay has quit [*.net *.split]
MoMo has quit [*.net *.split]
TheNumb has quit [*.net *.split]
ladder4 has quit [*.net *.split]
asuka has quit [*.net *.split]
telling has quit [*.net *.split]
rachet has quit [*.net *.split]
Schmidt has quit [*.net *.split]
JoeTheGuest has quit [*.net *.split]
thorncp has quit [*.net *.split]
idoru has quit [*.net *.split]
RubyPanther has quit [*.net *.split]
mahlon has quit [*.net *.split]
ged has quit [*.net *.split]
faulkner has quit [*.net *.split]
Urthwhyte has quit [*.net *.split]
jord has quit [*.net *.split]
ahuman has quit [*.net *.split]
andrewhl has quit [Ping timeout: 246 seconds]
Poapfel has joined #ruby
verto is now known as verto|off
joshman_ has joined #ruby
aces1up has joined #ruby
ged has joined #ruby
idoru has joined #ruby
wmoxam_ has joined #ruby
ananthakumaran has joined #ruby
macer1 has joined #ruby
linoj has joined #ruby
aces23up has joined #ruby
tk_ has joined #ruby
x0F has joined #ruby
Bofu has joined #ruby
just4dos has joined #ruby
virunga has joined #ruby
Guest89851 has joined #ruby
SegFaultAX has joined #ruby
voodoofish has joined #ruby
jeff_sebring has joined #ruby
pskosinski has joined #ruby
adeponte has joined #ruby
bigkevmcd has joined #ruby
Zespre has joined #ruby
RichieEvan has joined #ruby
vertroa_ has joined #ruby
korczis has joined #ruby
naquad has joined #ruby
akem has joined #ruby
Veejay has joined #ruby
RichGuk has joined #ruby
TheNumb has joined #ruby
MoMo has joined #ruby
Urthwhyte has joined #ruby
asuka has joined #ruby
rachet has joined #ruby
telling has joined #ruby
Schmidt has joined #ruby
thorncp has joined #ruby
JoeTheGuest has joined #ruby
RubyPanther has joined #ruby
mahlon has joined #ruby
faulkner has joined #ruby
jord has joined #ruby
ahuman has joined #ruby
rutkla has quit [Excess Flood]
aces23up has quit [Ping timeout: 240 seconds]
syamajala has joined #ruby
ged is now known as Guest42577
<dr_bob> fowl, ace: you can also use strings instead of regexps as criteria
<ace> dr_bob: thx
v0n has quit [Ping timeout: 246 seconds]
syamajala has quit [Remote host closed the connection]
<dr_bob> basically anything with a reasonable implementation of ===
wmoxam_ has quit [Read error: Connection reset by peer]
aganov has quit [Quit: aganov]
dpk has joined #ruby
mohits has quit [Read error: Connection reset by peer]
flype has quit [Quit: ["Textual IRC Client: www.textualapp.com"]]
nilg has quit [Remote host closed the connection]
deryl has joined #ruby
NimeshNeema has quit [Excess Flood]
jonathanwallace has quit [Remote host closed the connection]
jonathanwallace has joined #ruby
NimeshNeema has joined #ruby
maesbn has quit [Remote host closed the connection]
Spooner has joined #ruby
maesbn has joined #ruby
v0n has joined #ruby
Tulak has quit [Quit: Leaving.]
dv310p3r has quit [Ping timeout: 272 seconds]
<Sou|cutter> is there a non-commercial tool for profiling memory usage in 1.9.x?
maesbn has quit [Ping timeout: 244 seconds]
gilead has quit [Quit: This computer has gone to sleep]
deryl has quit [Quit: deryl]
alanp has quit [Remote host closed the connection]
balki_ has quit [Remote host closed the connection]
Iszak has quit [Ping timeout: 245 seconds]
<Sou|cutter> ruby-prof seems to have a memory reporting mode, but I'm a bit confused by docs stating it requires a patched interpretter
jasonLaster has joined #ruby
Tulak has joined #ruby
andrewhl has joined #ruby
ckrailo has joined #ruby
balki has joined #ruby
alanp has joined #ruby
KillerFox has quit [Ping timeout: 265 seconds]
davidcelis has quit [Quit: K-Lined.]
ppawel has joined #ruby
berserkr has joined #ruby
deryl has joined #ruby
KillerFox has joined #ruby
Godslastering has joined #ruby
Godslastering has quit [Client Quit]
ladder4 has joined #ruby
Bacalli has joined #ruby
shevy has quit [Ping timeout: 246 seconds]
slux_ has joined #ruby
<Sou|cutter> I am tempted to see if I can get this code running on jruby and use java's profiling tools...
Urthwhyte has left #ruby [#ruby]
tk_ has quit [Quit: ばいばい]
yasushi has quit [Remote host closed the connection]
yasushi has joined #ruby
yasushi_ has joined #ruby
yasushi has quit [Read error: Connection reset by peer]
MasterIdler has quit [Quit: MasterIdler]
Godslastering has joined #ruby
Godslastering has quit [Client Quit]
jrbing has left #ruby [#ruby]
Bauer has left #ruby [#ruby]
yasushi_ has quit [Ping timeout: 264 seconds]
apeiros_ has joined #ruby
Godslastering has joined #ruby
locriani has joined #ruby
locriani has quit [Changing host]
locriani has joined #ruby
conor_ireland has quit [Quit: conor_ireland]
conor_ireland has joined #ruby
Iszak has joined #ruby
<Iszak> Sou|cutter: did you find one?
<Sou|cutter> no..
<Iszak> Sou|cutter: do you know of a commercial one?
<Sou|cutter> nope
shevy has joined #ruby
cassianoleal has joined #ruby
<cassianoleal> anyone has any experience with webmock+vcr?
peterhellberg has quit [Remote host closed the connection]
conor_ireland has quit [Client Quit]
arkiver has quit [Quit: Leaving]
dpk has quit [Quit: Asleep at the keyboard.]
<Sou|cutter> cassianoleal: I've used them, sure
mneorr has quit [Quit: Leaving.]
bradhe has joined #ruby
mengu has quit [Remote host closed the connection]
<cassianoleal> Sou|cutter: I have a problem with verifying a post call with basic_auth
<Sou|cutter> howso?
<cassianoleal> Sou|cutter: it receives user@pass on the request's URL, but I don't set them on the URL itself
<Sou|cutter> sounds like a basic_auth problem?
<cassianoleal> so the verification fails, as it expects http://some-url/, but receives http://user@pass:some-url/
<cassianoleal> not entirely sure
<apeiros_> cassianoleal: it's disadvised (stronlgy so) to use user@pass in the url
<apeiros_> cassianoleal: and not just because it's non-standard
<cassianoleal> apeiros_: yeah, but it's not I doing it…
carloslopes has quit [Quit: Leaving.]
<cassianoleal> it seems like it's httparty who appends them to the url
<apeiros_> o0
Ethan has quit [Read error: Connection reset by peer]
<apeiros_> I'd check the docs, and if that reveals nothing, contact the author
<apeiros_> that's rather improper basic auth. proper one uses headers.
conor_ireland has joined #ruby
<nateberkopec> is it kosher for a "?" method to return a value that isn't 'true' or 'false'? like if Order.subscribed? returns nil?
<nateberkopec> speaking idiomatically
cantonic has joined #ruby
<apeiros_> it's uncommon
<Sou|cutter> nateberkopec: idiomatically, it only needs to be "truthy"
<apeiros_> and I'd not do it
<apeiros_> but there are examples of non true/false returns in core/stdlib
<apeiros_> (File.size? iirc being one)
<nateberkopec> k, that's what I thought.
<dr_bob> Sou|cutter: a primitive size monitoring would count instances via ObjectSpace. I once did a bit of coding around that with delta output which helped finding memory leaks.
<nateberkopec> thanks!
<Sou|cutter> dr_bob: that sounds like I'd have to get my hands pretty dirty
<dr_bob> Why that?
dhaivatpandya has quit [Quit: dhaivatpandya]
niklasb has quit [Ping timeout: 244 seconds]
gmci has quit [Quit: Textual IRC Client: http://www.textualapp.com/]
<dr_bob> You can start with a one liner, Sou|cutter : ObjectSpace.each_object(Object).inject(Hash.new 0) {|ha,o| ha[o.class]+=1; ha}
<Sou|cutter> dr_bob: I'm not sure I understand that api.. how did you arrive at deltas? Did you know which objects you were counting?
Eldariof-ru has quit [Read error: Operation timed out]
<dr_bob> regularly do the above and calculate diffs between two versions
adeponte has quit [Remote host closed the connection]
<Sou|cutter> dr_bob: ah, that makes sense. Not as bad as I thought (didn't consider using Object for some reason)
<dr_bob> As easy as that
adeponte has joined #ruby
hadees has quit [Quit: hadees]
verto|off is now known as verto
<Sou|cutter> dr_bob: thanks, that may work here...
<apeiros_> dr_bob: why each_object(Object) and not just each_object ?
<dr_bob> Needs an argument
<dr_bob> its the api
<Sou|cutter> I thought it needed it also...
<apeiros_> um, no
<apeiros_> it doesn't
<dr_bob> $ ri ObjectSpace.each_object
<dr_bob> Did they change that?
<apeiros_> no
dhaivatpandya has joined #ruby
<apeiros_> first time I used each_object (and that was 1.8.1 or so) I didn't even know it took an arg
<dr_bob> Oh, then it must have been 1.8.6. or something.
<dr_bob> Oh
<apeiros_> yeah, ObjectSpace.each_object([module]) <-- [] means optional
<dr_bob> embarrassing
<dr_bob> don't tell anyone, will ya? ;-)
hoelzro has quit [Quit: Lost terminal]
<apeiros_> I'll take it to the grave…
hoelzro has joined #ruby
<otters> >> ObjectSpace.each_object
<dr_bob> thanks, you're a real friend!
<al2o3cr> otters: (String) "NameError: uninitialized constant ObjectSpace"
chimkan_ has joined #ruby
<otters> for fuck's sake
<otters> doesn't this bot have ANY vulnerabilities
<apeiros_> lol
<Spooner> ObjectSpace.each_object.with_object(Hash.new 0) {|o,ha| ha[o.class]+=1} # Most uses of inject are cleaner with with_object
hoelzro is now known as hoelzro|away
<apeiros_> the problem of using that is that ObjectSpace.each_object mutates ObjectSpace
<apeiros_> so it's only of limited use
bullicon has joined #ruby
savage- has joined #ruby
adeponte has quit [Ping timeout: 244 seconds]
ayia has quit [Remote host closed the connection]
conor_ireland has quit [Quit: conor_ireland]
<dr_bob> apeiros_: we add a Hash. What else?
<apeiros_> dr_bob: don't remember
<dr_bob> hrmpf
<apeiros_> the bleakhouse guy documented it once
<apeiros_> maybe google remembers it
<Spooner> Lots of Fixnums?
<apeiros_> no
<dr_bob> not counted
<apeiros_> fixnums don't count towards objectspace
<apeiros_> I'm not sure if even symbols do
<dr_bob> there is no spoon - err - object for a Fixnum
<apeiros_> (immediates)
syamajala has joined #ruby
bluOxigen has quit [Ping timeout: 264 seconds]
<apeiros_> Spooner: are you using 1.9?
<apeiros_> 1.9.3 even I think…
<Spooner> I am. Who wouldn't?
<apeiros_> there's always people late to the party…
<apeiros_> iirc, 1.9.3 added facilities to poke at gc's internals
<Spooner> There are. Seen 1.8.5 people in here recently.
<apeiros_> which should make memleak detection from pure ruby simpler
luwei has joined #ruby
kava has joined #ruby
chimkan___ has joined #ruby
<apeiros_> ri GC
<apeiros_> hm, though…
kava has quit [Client Quit]
<apeiros_> I thought there was more than what I currently see :-/
<Sou|cutter> I have half 1.8.6 and half 1.9.3 (trying to get everything over to 1.9.3)
<Spooner> Nope. Nothing new on that (pry "ls GC" is what I did)
clocKwize has quit [Quit: clocKwize]
<Sou|cutter> supporting legacy code is a pain
<apeiros_> sure there's new things. GC.stat was not in 1.8
dhruvasagar has joined #ruby
<apeiros_> neither was malloc_allocated_size or malloc_allocations
quest88 has quit [Quit: quest88]
<apeiros_> but still, not what I thought was there :-/
Hanmac has quit [Ping timeout: 244 seconds]
TorpedoSkyline has joined #ruby
davidcelis has joined #ruby
chimkan_ has quit [Ping timeout: 250 seconds]
clocKwize has joined #ruby
<Spooner> I get the feeling that the extra extra stuff was a patch on the interpreter so we won't have it by default?
<Spooner> If you mean stuff to control the GC.
clocKwize has quit [Client Quit]
kava has joined #ruby
chimkan___ has quit [Client Quit]
gmci has joined #ruby
mahmoudimus has joined #ruby
Ethan has joined #ruby
kava has quit [Client Quit]
<Spooner> (I can only see count disable enable start stat stress stress= on GC, by the wway, not the malloc*, but I'm on Windows).
SCommette has joined #ruby
* dr_bob calls it a day.
<dr_bob> CU
johnlcox_ has joined #ruby
dr_bob has quit []
* Sou|cutter is always surprised to hear about ruby on windows
johnlcox_ has quit [Remote host closed the connection]
mahmoudimus has quit [Client Quit]
<shevy> Sou|cutter, well it kinda works
<shevy> it makes windows a less annoying platform too
<shevy> :)
<Spooner> CRuby works fine. Rubinius et al are what you should be surprised by :D
mahmoudimus has joined #ruby
johnlcox has quit [Ping timeout: 244 seconds]
emsilva has quit [Quit: ["Textual IRC Client: www.textualapp.com"]]
johnlcox has joined #ruby
<Spooner> Actually, no, several key gems fail on CRuby for Windows, which is a real pain, but I don't think that is Ruby's fault (e.g. eventmachine).
chimkan has joined #ruby
emmanuelux has quit [Ping timeout: 272 seconds]
chimkan has quit [Client Quit]
mneorr has joined #ruby
jgrevich has joined #ruby
<Sou|cutter> I know a lot of people who use jruby.. but none (directly) that use rubinius
Foxandxss has quit [Quit: KVIrc 4.2.0 Equilibrium http://www.kvirc.net/]
atmosx has joined #ruby
chimkan has joined #ruby
hadees has joined #ruby
randomautomator has joined #ruby
plynch has joined #ruby
cassianoleal has quit [Quit: Leaving.]
bbttxu has quit [Ping timeout: 246 seconds]
Rochefort has quit [Remote host closed the connection]
Beoran has quit [Read error: Connection reset by peer]
busybox42 has quit [Quit: Leaving.]
jonathanwallace has quit [Remote host closed the connection]
busybox42 has joined #ruby
<infinitiguy> Hi All, I'm very new to ruby and I'm trying to figure out how to pull out certain key/value pairs. For example - here is a snippet of code and the response.
Tulak has quit [Quit: Leaving.]
Beoran has joined #ruby
chitradeep has joined #ruby
<infinitiguy> How would I pull out say the InstanceIds?
<infinitiguy> do I need to go down the chain to be able to find it?
<davidcelis> that looks like XML; maybe you should be using an XML parser like Nokogiri
<Muz> It's not XML.
<Muz> It's JSON. It looks like a JSON representation of data that was originally stored in XML for some reason.
<davidcelis> Looks like XML converted to a hash to me
<infinitiguy> it might be - I'm using a rubygem for amazon ec2. I think it may use nokogiri under the covers
* otters waits very patiently for pastebin to load
chimkan___ has joined #ruby
erichmenge has quit [Quit: Be back later]
baphled has quit [Ping timeout: 246 seconds]
erichmenge has joined #ruby
maletor has joined #ruby
chimkan has quit [Ping timeout: 246 seconds]
chimkan___ is now known as chimkan
Araxia has joined #ruby
erichmenge has quit [Client Quit]
jillsmitt has quit [Remote host closed the connection]
jillsmitt has joined #ruby
arturaz has quit [Ping timeout: 246 seconds]
<shevy> cuddly otters!!!
<apeiros_> there's people who confuse XML and JSON? o0
<Guest83725> ugly codgers!
SQLStud has joined #ruby
fforbeck has joined #ruby
<apeiros_> and all the while it is neither…
Abbas| has joined #ruby
Hanmac has joined #ruby
<otters> Hi shevy
<apeiros_> sorry guys, but infinitiguy clearly wrote that he *pp*ed the data. this is an ordinary ruby structure…
<davidcelis> apeiros_: the casing and structure made it look like a nokogiri XML object being represented as a hash
verto is now known as verto|off
<apeiros_> davidcelis: it probably *was* but it clearly is no longer
<apeiros_> infinitiguy: mylb.class returns what?
<infinitiguy> I was very excited when I was able to actually get the data - now I just don't know what to do with it :(
<infinitiguy> lets see..
<apeiros_> err, rather, mylb.Listeners.class
chimkan has quit [Quit: chimkan]
<infinitiguy> both have no results
<infinitiguy> puts "Classing LB"
<infinitiguy> mylb.class
<infinitiguy> puts "2Classing LB"
<infinitiguy> mylb.Listeners.class
<davidcelis> no, puts the .class lines
<davidcelis> we need to see what those output
cantonic has quit [Quit: cantonic]
<apeiros_> but the answer is probably mylb.Listeners["DescribeLoadBalancersResult"]["LoadBalancerDescriptions"]["member"].flat_map { |instance| instance["member"].map { |member| member["InstanceId"] } }
<apeiros_> depends a bit on the actual data. but maybe you get the idea.
<infinitiguy> ah - mylb.class = hash
<infinitiguy> mylb.listeners.class = NilClass
<apeiros_> yepp. so it's *not* xml, it's *not* json. it's plain old ruby. the conversion has already happened.
<davidcelis> most unfortunate
<apeiros_> (and yes, it probably was xml once, xmlns tells us as much)
<infinitiguy> so all the output I see is a big hash?
<davidcelis> yep, just a big ol' Hash
<infinitiguy> I see - In ruby how can you chop up a Hash? (if that's even the right way to phrase it)
apok has quit [Quit: apok]
<infinitiguy> In this case - I don't care about most of it - only a couple values
<apeiros_> infinitiguy: use `ri Hash` in your console (bash…)
<apeiros_> and I gave you an approach above
<RubyPanther> with #delete
<davidcelis> you probably don't want to "chop it up", just pull out what you want like apeiros_ showed you
<infinitiguy> what is ri? I don't have that command
<apeiros_> infinitiguy: look at Hash#[], #values_at, #each, #each_key and #each_value
<apeiros_> infinitiguy: ri is the documentation tool. your ruby installation is rather incomplete if you don't have it.
<RubyPanther> ri is a long wait for a weak search
<apeiros_> you can use rdoc.info or ruby-doc.org instead
<apeiros_> RubyPanther: BS
<infinitiguy> hrm - I have ruby-rdoc installed (rpm -qa)
<infinitiguy> assuming it's not included with that?
<apeiros_> maybe if you're still on a 486…
<apeiros_> ugh, rpm
<RubyPanther> apeiros_: lots and lots of people don't use it, pointing out two weaknesses doesn't improve it. And, capital letters doesn't take my opinion away, or make it like yours.
greenysan has quit [Ping timeout: 272 seconds]
<apeiros_> RubyPanther: keep babbling. it's still BS.
zz_chrismcg is now known as chrismcg
chrismcg has quit [Changing host]
chrismcg has joined #ruby
ephemerian has joined #ruby
<apeiros_> infinitiguy: probably ruby-ri
<apeiros_> no idea. I don't use rpm.
<infinitiguy> yep - ruby-ri
<infinitiguy> ruby-ri.x86_64 : Ruby interactive reference
syamajala has quit [Remote host closed the connection]
<RubyPanther> _fact_ It is a poor tool according to me and lots of people. Even just ruby-doc.org is a better reference
<apeiros_> RubyPanther: blablabla
<infinitiguy> ok - i'll do some reading up - I think I have enough to go on. Appreciate the pointers :)
<davidcelis> now now, kids
<RubyPanther> No sense complaining that other people's opinions are "BS" that is just being rude, not improving the tool... or really even defending it, since there is no content.
<apeiros_> hm, that's getting repetitive - RubyPanther, blablabla
<workmad3> pick a word, any word... now go and start an argument about it on the internet :)
<RubyPanther> Matz Is Nice And So We Are Really Rude Balance It
<davidcelis> workmad3: word
<workmad3> davidcelis: no!
<workmad3> davidcelis: wrong word!
<davidcelis> workmad3: SO META.
<apeiros_> workmad3: any
artOfWar has joined #ruby
<RubyPanther> apeiros_: you already played
<apeiros_> yeah, but beating the game twice is twice the fun
<workmad3> ok... hung by my own petard :)
fridim_ has joined #ruby
Tomasso has joined #ruby
ianbrandt has joined #ruby
mikepack has joined #ruby
Synthead has joined #ruby
eph3meral has joined #ruby
graft has joined #ruby
graft has quit [Changing host]
graft has joined #ruby
conor_ireland has joined #ruby
<davidcelis> how can you hang by a BOMB
* apeiros_ gets popcorn
jillsmitt_ has joined #ruby
cakehero has quit [Quit: Leaving...]
chclto has joined #ruby
<Synthead> is there a way I can check if a string has the "contents" of an integer other than .match(/\A[0-9]+\z/) ?
<davidcelis> workmad3: THIS IDIOM MAKES NO SENSE http://www.phrases.org.uk/meanings/hoist%20by%20your%20own%20petard.html
<workmad3> davidcelis: ok, I got the phrase a bit wrong... it was originally 'hoisted by their own petar'
whoev has joined #ruby
<apeiros_> Synthead: I assume replacing .match with =~ and [0-9] with \d don't count?
<whoev> can i use unicode in variable names?
adeponte has joined #ruby
<apeiros_> whoev: sadly yes, you can. but srsly, don't do it.
<whoev> why not ?
<Synthead> apeiros_: no internal method to check?
<apeiros_> Synthead: afaik no
<davidcelis> whoev: ಠ_ಠ = "don't do it"
<apeiros_> whoev: because you make life more difficult for anybody using or working with your code.
<whoev> def myFunction(Ꞇ)
<whoev> :D
<Hanmac> Synthhead: /[[:digit:]]+/ may be interesting for you
<apeiros_> whoev: copy & pasting method/variable names stinks
<whoev> so does using ASCII variable names
<whoev> with namespace overlap
<whoev> ;o
jillsmitt has quit [Ping timeout: 272 seconds]
<davidcelis> whoev: did you just camelCase a method definition
erichmenge has joined #ruby
<whoev> i'm out of control over here
<davidcelis> THIS ISN'T JAVA, BOY
<whoev> ;)
<apeiros_> whoev: *shrug* it's your code. shoot yourself in the foot all you want.
bluenemo_ has joined #ruby
bluenemo_ has quit [Changing host]
bluenemo_ has joined #ruby
bluenemo_ has quit [Remote host closed the connection]
<davidcelis> maybe he's trying to protect his secret sauce
<whoev> does textmate support unicode?
<Muz> To a degree, yes.
<whoev> the only ppl working on this are using vim and textmate
<Mon_Ouie> shοοτ_in(fοοτ)
jonathanwallace has joined #ruby
<Muz> To the same degree as other text editors? Debatable.
Iszak has quit [Quit: Page closed]
<apeiros_> you have coworkers for that? I feel sorry for them…
stkowski has joined #ruby
<Synthead> is there a way I can enumerate through a hash kind of like Array's .each_with_key ?
<apeiros_> I'd insta-defenstrate a coworker for that :-p
<whoev> for what
jorge has joined #ruby
<apeiros_> Synthead: Hash#each, #each_key, #each_value - whatever you need…
<whoev> maybe i'll just write all my code in haskell from now on
<whoev> lol
<apeiros_> and I don't think there's an Array#each_with_key…
shadoi has joined #ruby
<whoev> def ꝤꞆ(ꝖꝊꝉꝖꝊꝉꝖꝊꝉꝖꝊꝉꝖꝊꝉ)
blazes816 has joined #ruby
<whoev> logger.info ꝖꝊꝉꝖꝊꝉꝖꝊꝉꝖꝊꝉꝖꝊꝉ
<whoev> end
<apeiros_> yes, defenstration seems adequate.
<Muz> How is it this channel has edged closer towards going full-retard in little under 15 minutes.
<Muz> It was all so nice and sensical before!
<Synthead> apeiros_: I'm looking to have it "count" the hash keys. So { 'a' => 1, 'b' => 2, 'c' => 3 }.each_with_key { |key, value, i| puts "\##{i}: #{key}: #{value}" }, if it existed
<apeiros_> Muz: you went silent. speak up and make it non-retard again.
<whoev> throw a "map" in there while you're at it
<whoev> actually, alias "map" to ꝎꝏꝎꝏ
<Muz> apeiros_: the cycling on the McLympics is far too fascinating right now.
<apeiros_> Synthead: again, there is no Array#each_with_key. I don't know what you're fantasizing there…
<apeiros_> Synthead: you can do each_with_index, but that makes so little sense with a hash.
<Synthead> apeiros_: ok, thanks
<whoev> but there is each_with_index, no?
<apeiros_> ^
<Hanmac> Synthead: hash.each_with_index{|(k,v),i| }
<Hanmac> the () around the values is !important!
<Synthead> yeah! that works! thanks!
<apeiros_> ¡muy importante!
ringotwo has joined #ruby
Rajesh_ has joined #ruby
sinned has left #ruby [#ruby]
Rajesh_ has quit [Max SendQ exceeded]
yeggeps has quit [Read error: Connection reset by peer]
yeggeps has joined #ruby
kiri has quit [Quit: Leaving]
emmanuelux has joined #ruby
w0lverine has joined #ruby
elhu has quit [Quit: Computer has gone to sleep.]
eam has joined #ruby
<eam> does Tempfile use O_EXCL?
TorpedoSkyline has quit [Quit: Computer has gone to sleep.]
elhu has joined #ruby
<eam> its docs say nothing about whether it's securely implemented
paolooo has quit [Ping timeout: 245 seconds]
chico_chicote has quit [Ping timeout: 245 seconds]
Rajesh_ has joined #ruby
bier_ has joined #ruby
bluenemo_ has joined #ruby
bluenemo_ has quit [Changing host]
bluenemo_ has joined #ruby
apok has joined #ruby
jrist is now known as jrist-mtg
kenichi has joined #ruby
bier has quit [Ping timeout: 250 seconds]
bluenemo_ has quit [Client Quit]
carloslopes has joined #ruby
carloslopes has quit [Client Quit]
carloslopes has joined #ruby
headius has joined #ruby
bullicon has quit [Quit: Computer has gone to sleep.]
<eam> strace appears to indicate it uses mkstmp
Rajesh_ has quit [Max SendQ exceeded]
andrewh has quit [Ping timeout: 272 seconds]
bluOxigen has joined #ruby
cascalheira has quit [Remote host closed the connection]
jpreyer has joined #ruby
bier_ has quit [Ping timeout: 264 seconds]
bier_ has joined #ruby
atmosx has quit [Quit: ["Textual IRC Client: www.textualapp.com"]]
workmad3 has quit [Ping timeout: 246 seconds]
cascalheira has joined #ruby
fennec has joined #ruby
Agis__ has quit [Read error: No route to host]
Rajesh_ has joined #ruby
cassianoleal has joined #ruby
mk03 has joined #ruby
nadirvardar has joined #ruby
Agis__ has joined #ruby
elhu has quit [Quit: Computer has gone to sleep.]
<fennec> so according to http://www.ruby-doc.org/core-1.9.3/IO.html#method-c-popen, "If a block is given, Ruby will run the command as a child connected to Ruby with a pipe. Ruby’s end of the pipe will be passed as a parameter to the block. At the end of block, Ruby close the pipe and sets $?."
<fennec> buuuuut I've been seeing $? of nil right after a popen block.
adamkittelson has joined #ruby
solussd has joined #ruby
chrismcg is now known as zz_chrismcg
<fennec> does that sound legit? am I supposed to be waitpid()ing or anything if I actually want $?
apok has quit [Remote host closed the connection]
apok has joined #ruby
havenn has joined #ruby
future_chimp has quit [Quit: Leaving]
flip_digits has joined #ruby
conor_ireland has quit [Quit: conor_ireland]
geekbri has quit [Remote host closed the connection]
dv310p3r has joined #ruby
bluOxigen has quit []
Rajesh_ has quit [Max SendQ exceeded]
kenichi has quit [Remote host closed the connection]
TPFC-SYSTEM has joined #ruby
luwei has quit [Quit: 暂离]
kenichi has joined #ruby
Stalkr_ has joined #ruby
Markvilla has quit [Quit: Computer has gone to sleep.]
echobravo has quit [Quit: Beware of programmers who carry screwdrivers.]
SegFaultAX|work2 has joined #ruby
macer1 has quit [Quit: No Ping reply in 180 seconds.]
jillsmitt_ has quit [Remote host closed the connection]
macer1 has joined #ruby
jorge has quit [Remote host closed the connection]
jorge has joined #ruby
<cassianoleal> Sou|cutter: remember the problem I described earlier with webmock+vcr and basic_auth?
jillsmitt has joined #ruby
Ethan has quit [Ping timeout: 250 seconds]
dv310p3r has quit [Ping timeout: 264 seconds]
Eldariof-ru has joined #ruby
jillsmitt has quit [Remote host closed the connection]
qwerxy has quit [Read error: Operation timed out]
khakimov has joined #ruby
strg has quit [Ping timeout: 250 seconds]
JonghwanHyeon has quit [Remote host closed the connection]
jillsmitt has joined #ruby
JonghwanHyeon has joined #ruby
arturaz has joined #ruby
rakunHo has joined #ruby
JonghwanHyeon has quit [Remote host closed the connection]
dhaivatpandya has quit [Quit: dhaivatpandya]
fridim_ has quit [Ping timeout: 246 seconds]
andrewh has joined #ruby
JonghwanHyeon has joined #ruby
JonghwanHyeon has quit [Remote host closed the connection]
burgestrand has joined #ruby
havenn has quit [Remote host closed the connection]
ppawel has quit [Ping timeout: 246 seconds]
khakimov has quit [Quit: Computer has gone to sleep.]
yeggeps has quit [Read error: Connection reset by peer]
dhaivatpandya has joined #ruby
Morkel has quit [Quit: Morkel]
yeggeps has joined #ruby
rcassidy has quit [Quit: leaving]
TorpedoSkyline has joined #ruby
geekbri has joined #ruby
burgestrand has quit [Ping timeout: 244 seconds]
JonghwanHyeon has joined #ruby
JonghwanHyeon has quit [Remote host closed the connection]
Gab0 has joined #ruby
yeggeps has quit [Read error: Connection reset by peer]
yeggeps_ has joined #ruby
<cassianoleal> so, I'm using VCR to record HTTP calls with basic_auth and then using a_request matcher from webmock to validate the requests
<cassianoleal> I'm having a problem with that because apparently VCR records the basic_auth credentials in the URL (http://user:pass@some-url) instead of in the headers
Nowaker has quit [Ping timeout: 244 seconds]
<cassianoleal> I captured the HTTP packets on the network interface to make sure that it wasn't something to do with httparty or Net::HTTP, but it's fine there
mneorr has quit [Quit: Leaving.]
36DABVV2S is now known as ForSpareParts
<cassianoleal> is there anything I could do to either have VCR record the credentials as headers, or to have webmock ignore that and use the fqdn only?
jbw has quit [Ping timeout: 264 seconds]
<apeiros_> sounds like a bug in VCR to me
ppawel has joined #ruby
Nowaker has joined #ruby
jarred has joined #ruby
<cassianoleal> apeiros_: yeah, I have the same feeling
<cassianoleal> might as well e-mail the author
mneorr has joined #ruby
<apeiros_> I'd check the issues section on github first
<apeiros_> and/or readme & api docs (maybe it's configurable)
Agis__ has quit [Ping timeout: 246 seconds]
<cassianoleal> yeah, I checked those… couldn't find anything
<apeiros_> then contact the author it is :)
kidoz has joined #ruby
maletor has quit [Ping timeout: 246 seconds]
lkba has quit [Ping timeout: 246 seconds]
yeggeps_ has quit [Read error: Connection reset by peer]
fbernier has quit [Ping timeout: 246 seconds]
kidoz has quit [Client Quit]
maletor has joined #ruby
ppawel has quit [Ping timeout: 244 seconds]
naz has joined #ruby
yeggeps has joined #ruby
slux_ has quit [Remote host closed the connection]
rutkla has joined #ruby
jrajav has joined #ruby
<jrajav> al2o3cr is going down for a bit
al2o3cr has quit [Remote host closed the connection]
blazes816 has quit [Quit: Leaving]
fourlastor has quit [Quit: Sto andando via]
bluenemo_ has joined #ruby
Agis__ has joined #ruby
bluenemo_ has quit [Read error: Connection reset by peer]
w0lverine has quit [Quit: w0lverine]
TorpedoSkyline has quit [Quit: Computer has gone to sleep.]
macer1 has quit [Quit: http://quassel-irc.org - Chat comfortably. Anywhere.]
macer1 has joined #ruby
Markvilla has joined #ruby
baphled has joined #ruby
havenn has joined #ruby
jbw has joined #ruby
mascool has joined #ruby
mneorr has quit [Quit: Leaving.]
voodoofish430 has joined #ruby
fantazo has joined #ruby
whitedawg has joined #ruby
andrewh has quit [Quit: leaving]
Markvilla has quit [Client Quit]
r1chelt has joined #ruby
saschagehlich has joined #ruby
r1chelt has quit [Changing host]
r1chelt has joined #ruby
Markvilla has joined #ruby
dv310p3r has joined #ruby
slux has joined #ruby
Markvilla has quit [Client Quit]
yeggeps_ has joined #ruby
mrsolo has joined #ruby
yeggeps has quit [Read error: Connection reset by peer]
dhaivatpandya has quit [Quit: dhaivatpandya]
Markvilla has joined #ruby
tewecske has joined #ruby
slux has quit [Remote host closed the connection]
tewecske has quit [Max SendQ exceeded]
sepp2k has quit [Read error: Connection reset by peer]
slux has joined #ruby
asteve has joined #ruby
sepp2k has joined #ruby
<asteve> I would like to set the working directory for all file operations in a script
<asteve> how would I do this?
manizzle has quit [Read error: No route to host]
solussd has left #ruby [#ruby]
mascool has quit [Ping timeout: 244 seconds]
jrist-mtg is now known as jrist-afk
<banisterfiend> asteve: Dir.chdir
sevvie has quit [Quit: sevvie]
sevvie has joined #ruby
darren has joined #ruby
ramblex has quit [Ping timeout: 244 seconds]
<shevy> asteve not sure there is an easy way
<shevy> asteve one idea would be to keep track of a base directory that should always exist. and then cd into that directory
elhu has joined #ruby
<shevy> you can however use FileUtils.mv() without having to cd into a directory
<shevy> if your file operations also includes deleting a directory, this can be a problem when you remove the base directory of where ruby was started
chichou has quit [Ping timeout: 250 seconds]
<shevy> for instance
<shevy> Dir.chdir "/Depot/jjj/foo/"; FileUtils.rm_rf "/Depot/jjj/foo/"
<shevy> then doing something there leads to:
<shevy> Errno::ENOENT: No such file or directory - getcwd
<shevy> s/started/where ruby's current working directory is
plynch has left #ruby ["Leaving"]
<Hanmac> removing the current dir is bad in bashshell too
phinfonet has joined #ruby
<shevy> hmm
<shevy> let's test
<Hanmac> its like cuting the branch where are you sittning on
<shevy> well
<shevy> the errors are different
<shevy> :(
<shevy> mkdir oh
<shevy> mkdir: cannot create directory `oh': No such file or directory
mascool has joined #ruby
lkba has joined #ruby
<davidcelis> worx 4 me
<shevy> you removed the directory bash is in?
<shevy> I mean the current working directory
<shevy> not /bin :D
<shevy> hmm what happens if /bin is removed ...
lorn has quit [Changing host]
lorn has joined #ruby
sevvie has quit [Quit: sevvie]
rakunHo has quit [Remote host closed the connection]
<shevy> undefined method `<<' for #<Errno::ENOENT: No such file or directory - getcwd>
Ethan has joined #ruby
w400z has joined #ruby
flype has joined #ruby
jaylevitt has joined #ruby
w0lverine has joined #ruby
s0ber_ has joined #ruby
tdubz has joined #ruby
tdubz is now known as Guest64051
bluenemo_ has joined #ruby
bluenemo_ has quit [Read error: Connection reset by peer]
lupine_85 has quit [Excess Flood]
samsonjs has joined #ruby
elhu has quit [Quit: Computer has gone to sleep.]
chichou has joined #ruby
My_Hearing has joined #ruby
s0ber has quit [Write error: Broken pipe]
Yuu-chan has joined #ruby
lupine_86 has joined #ruby
s0ber_ is now known as s0ber
elspeth_ has joined #ruby
pavelz has joined #ruby
Illiux has joined #ruby
d-best has joined #ruby
cout_ has joined #ruby
alexhanh has joined #ruby
Emmanuel_Chanel_ has joined #ruby
vaicine has joined #ruby
maletor has quit [Ping timeout: 264 seconds]
ekaleido has joined #ruby
Emmanuel_Chanel has quit [Excess Flood]
uxp_ has joined #ruby
phreax_ has joined #ruby
nobdrais1ntone has joined #ruby
chiel_ has joined #ruby
sprink_ has joined #ruby
matti_ has joined #ruby
flagg0205 has joined #ruby
davidcelis has quit [Read error: Connection reset by peer]
uris_ has joined #ruby
Yuu-chan has left #ruby [#ruby]
chriskk has joined #ruby
dhruvasa1ar has joined #ruby
Yuu-chan has joined #ruby
Aenigma has joined #ruby
Yuu-chan has left #ruby [#ruby]
deadSnow1an has joined #ruby
AwesomeG1rethMan has joined #ruby
thomas has quit [Killed (cameron.freenode.net (Nickname regained by services))]
Guest64051 is now known as thomas
iamtakin1iteasy has joined #ruby
davidcelis has joined #ruby
lupine_86 has quit [Changing host]
lupine_86 has joined #ruby
lupine_86 is now known as lupine_85
kevincolyar has left #ruby ["WeeChat 0.3.7"]
maletor has joined #ruby
havenn has quit [Remote host closed the connection]
dangerousdave has quit [Excess Flood]
Jay_Levitt has quit [Excess Flood]
jjbohn has quit [Excess Flood]
jprovazn_away has quit [Excess Flood]
klaas has quit [Excess Flood]
dangerousdave has joined #ruby
Jay_Levitt has joined #ruby
jjbohn has joined #ruby
jprovazn_away has joined #ruby
ppawel has joined #ruby
elspeth_ is now known as epseth
klaas has joined #ruby
faitswulff has joined #ruby
<faitswulff> crap
sinful_ has joined #ruby
maletor has quit [Ping timeout: 246 seconds]
dekroning has quit [Quit: leaving]
dv_ has quit [Excess Flood]
Hien has quit [Remote host closed the connection]
vaicine_ has quit [Write error: Broken pipe]
ekaleido_ has quit [Write error: Broken pipe]
phreax has quit [Write error: Broken pipe]
pavelz_ has quit [Write error: Broken pipe]
Aenigma_ has quit [Write error: Broken pipe]
elspeth has quit [Write error: Broken pipe]
Illiux_ has quit [Write error: Broken pipe]
alexhanh_ has quit [Write error: Broken pipe]
flagg0204 has quit [Write error: Broken pipe]
iamtakingiteasy has quit [Write error: Broken pipe]
cout has quit [Write error: Broken pipe]
dhruvasagar has quit [Write error: Broken pipe]
nobdraisentone has quit [Write error: Broken pipe]
d-snp has quit [Write error: Broken pipe]
AwesomeGarethMan has quit [Write error: Broken pipe]
Mon_Ouie has quit [Write error: Broken pipe]
sinful has quit [Excess Flood]
sprink has quit [Remote host closed the connection]
FlyingFoX has quit [Excess Flood]
deadSnowman has quit [Remote host closed the connection]
ggreer has quit [Excess Flood]
dv__ has joined #ruby
eighty4 has quit [Ping timeout: 646 seconds]
zigidias has quit [Ping timeout: 646 seconds]
thomasfedb has quit [Ping timeout: 646 seconds]
gry has quit [Ping timeout: 826 seconds]
gianlucadv has quit [Ping timeout: 646 seconds]
vjt has quit [Remote host closed the connection]
Drakevr has quit [Remote host closed the connection]
uxp has quit [Remote host closed the connection]
chiel has quit [Remote host closed the connection]
matti has quit [Remote host closed the connection]
uris has quit [Remote host closed the connection]
matti_ is now known as matti
samsonjs has quit [Quit: lemur]
zigidias_ has joined #ruby
thomasfedb has joined #ruby
samsonjs has joined #ruby
epseth is now known as elspeth
locriani has quit [Remote host closed the connection]
rakunHo has joined #ruby
AngryParsley has joined #ruby
AngryParsley is now known as ggreer
ggreer has quit [Changing host]
ggreer has joined #ruby
FlyingFoX has joined #ruby
blazes816 has joined #ruby
maletor has joined #ruby
gianlucadv has joined #ruby
samsonjs has quit [Read error: Connection reset by peer]
Araxia has quit [Ping timeout: 257 seconds]
eighty4_ has joined #ruby
r1chelt has quit [Remote host closed the connection]
faitswulff has quit [Ping timeout: 245 seconds]
Drakevr has joined #ruby
Drakevr has quit [Changing host]
Drakevr has joined #ruby
jjbohn is now known as jjbohn|afk
jasonLaster has quit [Remote host closed the connection]
jasonLaster has joined #ruby
aces1up has quit [Read error: Connection reset by peer]
aces23up has joined #ruby
tvw has quit [Remote host closed the connection]
Hien has joined #ruby
r1chelt has joined #ruby
r1chelt has quit [Changing host]
r1chelt has joined #ruby
aces23up has quit [Client Quit]
daniel_hinojosa has quit [Ping timeout: 246 seconds]
jasonLaster has quit [Read error: Operation timed out]
ph^_ has joined #ruby
Agis__ has quit [Quit: Agis__]
Araxia has joined #ruby
bgupta has quit [Quit: bgupta]
jjbohn|afk is now known as jjbohn
ph^ has quit [Ping timeout: 246 seconds]
berserkr has quit [Quit: Leaving.]
moted has quit [Remote host closed the connection]
davidcelis has quit [Quit: K-Lined.]
Eldariof59-ru has joined #ruby
r1chelt has quit [Remote host closed the connection]
Eldariof-ru has quit [Read error: Operation timed out]
wargasm has quit [Read error: Connection reset by peer]
bontaq has joined #ruby
wargasm has joined #ruby
bluenemo has quit [Quit: Verlassend]
jasonLaster has joined #ruby
sinned has joined #ruby
moted has joined #ruby
<sinned> hello! anybody used the em-http-server gem lately?
<sinned> i am trying to get the sample code running, but something is wrong with the gem loading. i receive "uninitialized constant EventMachine::Http"
<sinned> gems "eventmachine" and "event-http-server" are installed as rvm gem and bundler version. none of both ways seem to work correctly.
daniel_hinojosa has joined #ruby
gry has joined #ruby
Speed has joined #ruby
w400z has quit [Quit: Computer has gone to sleep.]
havenn has joined #ruby
havenn has quit [Remote host closed the connection]
emmanuelux has quit [Ping timeout: 264 seconds]
maletor has quit [Quit: Computer has gone to sleep.]
<jrajav> Welp. I think al2o3cr will be gone for a bit, guys
<jrajav> I'm reimplementing him but I can't work out all the quirks just yet
Gab0 has quit [Remote host closed the connection]
<jrajav> And I'm out for the day
axl_ has quit [Read error: Connection reset by peer]
Gab0 has joined #ruby
axl_ has joined #ruby
cout_ is now known as cout
GoGoGarrett has quit [Remote host closed the connection]
jasonLaster has quit [Read error: Connection reset by peer]
adamkittelson has quit [Remote host closed the connection]
abra has quit [Ping timeout: 276 seconds]
Lachryma` has quit [Remote host closed the connection]
abra has joined #ruby
GoGoGarrett has joined #ruby
jasonLaster has joined #ruby
TPFC-SYSTEM has quit [Quit: TPFC-SYSTEM]
fearoffish has quit [Quit: ["Textual IRC Client: www.textualapp.com"]]
elhu has joined #ruby
ananthakumaran has quit [Quit: Leaving.]
<crazed> how do you get Open3.popen3 to block while it reads stderr/stdout from the process you're running?
<shevy> jrajav!!!
chrisja has quit [Quit: leaving]
manizzle has joined #ruby
jasonLas_ has joined #ruby
deryl has quit [Quit: deryl]
jasonLaster has quit [Read error: Connection reset by peer]
<scriabin_> how do I fix this, ruby genii? https://gist.github.com/3277599
workmad3 has joined #ruby
<jrajav> shevy!!!
pfaff is now known as notpfaff
chichou has quit [Remote host closed the connection]
<eam> crazed: read() blocks. select() blocks as well
maletor has joined #ruby
erichmenge has quit [Quit: Be back later]
<eam> popen itself shouldn't ever block
Guest89851 has quit [Quit: Guest89851]
erichmenge has joined #ruby
notpfaff has quit [Changing host]
notpfaff has joined #ruby
wargasm has quit [Read error: Connection reset by peer]
macmartine has joined #ruby
erichmenge has quit [Client Quit]
notpfaff has quit [Quit: Leaving.]
Vert has joined #ruby
urbann has joined #ruby
erichmenge has joined #ruby
mmokrysz has joined #ruby
mrdodo has joined #ruby
mmokrysz has quit [Client Quit]
erichmenge has quit [Client Quit]
mmokrysz has joined #ruby
mmokrysz has quit [Changing host]
mmokrysz has joined #ruby
flype has quit [Quit: Computer has gone to sleep.]
bbttxu has joined #ruby
bothra2 has joined #ruby
chiel_ is now known as chiel
jimeh has quit [Ping timeout: 272 seconds]
havenn has joined #ruby
banisterfiend has quit [Read error: Connection reset by peer]
bothra has quit [Ping timeout: 245 seconds]
stephenjudkins has joined #ruby
ctwiz has joined #ruby
ctwiz has quit [Client Quit]
jimeh has joined #ruby
banisterfiend has joined #ruby
w400z has joined #ruby
tcopp has joined #ruby
BrianJ_ has joined #ruby
elhu has quit [Quit: Computer has gone to sleep.]
axl_ has quit [Remote host closed the connection]
monkegjinni has quit [Remote host closed the connection]
w400z has quit [Ping timeout: 264 seconds]
skyjumper has joined #ruby
axl_ has joined #ruby
<skyjumper> i'm trying to find a more ruby-pure way to do this:
<skyjumper> multiple_records = params[:modelname].is_a?(Array) ? params[:modelname] : [params[:modelname]]
cascalheira has quit [Quit: Leaving...]
<skyjumper> spoke too soon. seems [params[:modelname]].flatten will work
BrianJ_ has quit [Ping timeout: 250 seconds]
Axsuul has joined #ruby
elhu has joined #ruby
monkegjinni has joined #ruby
vandemar has quit [Ping timeout: 245 seconds]
minijupe has joined #ruby
ij has quit [Ping timeout: 246 seconds]
atrika has joined #ruby
<atrika> hey guys, in which situation should I use ruby over python ?
jrist-afk is now known as jrist
Eldariof59-ru has quit [Remote host closed the connection]
mwilson_ has quit [Excess Flood]
<Hanmac> atrika in every :P
davidcelis has joined #ruby
mwilson_ has joined #ruby
havenn has quit [Remote host closed the connection]
mmokrysz has quit [Quit: Leaving.]
<arturaz> atrika, depends on your preferences
<arturaz> python has some math libs that ruby does not
<arturaz> ruby probably has some libs that python does not
<arturaz> one way or another, it's personal preference
<arturaz> however jruby is fairly mature and has real threads, if you need those
<atrika> is ruby better than python at anything or are they pretty much the same ?
chimkan_ has joined #ruby
<arturaz> atrika, I'd say they're very comparable
Eldariof-ru has joined #ruby
<arturaz> python doesn't have anonymous functions except lambda expressions
vandemar has joined #ruby
<arturaz> but the difference mostly lies in stle
<arturaz> style*
<atrika> does ruby have good libraries for SDL and gui programming ?
deryl has joined #ruby
SegFaultAX has quit [Ping timeout: 240 seconds]
<asteve> i read that as "python has some meth labs"
<asteve> too much breaking bad
My_Hearing is now known as Mon_Ouie
vlad_starkov has quit [Remote host closed the connection]
TorpedoSkyline has joined #ruby
<workmad3> asteve: python is good for meth now? :)
<Mon_Ouie> atrika: I've been using Qt in Ruby lately and it works fine (well, some people seem to have troubles installing it)
SegFaultAX has joined #ruby
mneorr has joined #ruby
laen__ is now known as laen_
headius_ has joined #ruby
headius has quit [Disconnected by services]
headius_ is now known as headius
ij has joined #ruby
<Mon_Ouie> As for SDL-related stuff, there's a direct binding for it, but I'd rather recommend Gosu (or my own library — Ray — but I haven't touched it in a while)
adamkittelson has joined #ruby
jrajav has quit [Quit: The best darkness is strange and surprising]
croz has quit [Read error: Operation timed out]
SegFaultAX has quit [Read error: Operation timed out]
TomRone has quit [Ping timeout: 245 seconds]
monkegjinni has quit [Remote host closed the connection]
slux has quit [Ping timeout: 250 seconds]
axl_ has quit [Read error: Connection reset by peer]
nyuszika7h is now known as \n
<atrika> is gosu better than pygame ?
axl_ has joined #ruby
<atrika> it looks less mature
Guest42577 is now known as ged
SegFaultAX has joined #ruby
workmad3 has quit [Ping timeout: 246 seconds]
chitradeep has quit [Quit: chitradeep]
<ged> atrika: I'm curious: what metric are you using to determine relative maturity?
<atrika> honestly, the apparence of the website
strg has joined #ruby
cascalheira has joined #ruby
<blazes816> that sounds fair
<Mon_Ouie> I don't think so, but anyway what's wrong with it?
<ged> Interesting.
davidcelis has quit [Ping timeout: 246 seconds]
<Mon_Ouie> (On a sidenote, I really don't like those shades of green all over pygame's website)
<atrika> anyone here worked with both ?
<atrika> the pygame website is ugly, but there seems to be tons of project, documentation and tutorials
<Mon_Ouie> #gosu does have an IRC channel where you could ask your question
pxjorge has joined #ruby
wargasm has joined #ruby
<atrika> okay, ill ask em
stephenjudkins has quit [Quit: stephenjudkins]
davidcelis has joined #ruby
wargasm has quit [Read error: Connection reset by peer]
wargasm has joined #ruby
johnlcox has quit [Ping timeout: 246 seconds]
Hanmac has quit [Ping timeout: 272 seconds]
wallerdev has joined #ruby
bontaq has quit [Read error: Connection reset by peer]
johnlcox has joined #ruby
kirun has joined #ruby
Vert has quit [Ping timeout: 252 seconds]
ringotwo has quit [Read error: Connection reset by peer]
voodoofish4301 has joined #ruby
ringotwo has joined #ruby
r1chelt has joined #ruby
r1chelt has quit [Changing host]
r1chelt has joined #ruby
voodoofish430 has quit [Ping timeout: 250 seconds]
ken_barber has quit [Ping timeout: 246 seconds]
r1chelt has quit [Remote host closed the connection]
<arturaz> atrika, I'd advise you against using an intepreted language in game development
<arturaz> Take Java/Scala/Mono instead
jjbohn is now known as jjbohn|lunch
<atrika> isnt java interpreted ?
whitedawg1 has joined #ruby
<arturaz> not really, its JIT compiled
<atrika> and isn't python also compiled ?
<arturaz> python is sort of compiled into intermediary representation
<arturaz> the problem is that java virtual machine is far superior and faster than one in python
<Mon_Ouie> Called bytecode. But that's like any recent programming language.
paolooo has joined #ruby
<Mon_Ouie> Some like Java also generate native code at runtime; There are implementations of booth Python and Ruby that use the same technique (respectively Pypy and Rubinius)
Gab0 has quit [Remote host closed the connection]
<Spooner> arturaz : I am not sure that interpreted matters. Certainly, the CRuby garbage collection is not game-friendly, but there is no problem at all with writing games in it other than that.
Gab0 has joined #ruby
<arturaz> Spooner, well, as long as you don't hit cpu bottleneck :)
whitedawg has quit [Ping timeout: 244 seconds]
<arturaz> or need threads for that matter
ken_barber has joined #ruby
<Spooner> Yes, but that is an issue of requirements, not a real limit. If you want to write a AAA 3D game, you have to do it in C++ with probably some dropping into assembler for your bottlenecks. If you want to make a simple 2D game, then there isn't an issue with Ruby.
macer1 has quit [Changing host]
macer1 has joined #ruby
<arturaz> true
<arturaz> However I was truly amazed how smooth Bastion was :)
<Spooner> e.g. Unity of Command is 100% Python.
<Spooner> Isn't that XNA?
<Spooner> with C#?
<arturaz> indeed
<arturaz> and ported to mono and monoxna
<Spooner> You could write that in Ruby :D
SegFaultAX has quit [Ping timeout: 240 seconds]
Eldariof-ru has quit []
Hanmac has joined #ruby
<arturaz> You could. I wouldn't bet on performance though :)
fennec has quit [Quit: Leaving]
<Spooner> I don't know. You could drop to C where it mattered. After all, most Ruby is just calling C stuff (like Gosu or Chipmunk or whatever else). Just depends how much of your engine you could write in C (or rather was already written/wrapped) and how much in Ruby.
lurch007 has joined #ruby
<arturaz> Spooner, what's exactly the point of writing ruby then? :) And why not take, erm, lets say, scala?
adambeynon has quit [Quit: ["Textual IRC Client: www.textualapp.com"]]
<Spooner> You write in C++ without using libraries?
<Spooner> So why is there a difference between using C/C++ libraries from Ruby?
<codora> arturaz: would you write scale as a replacement for C?
<codora> *scala
<codora> i'm confused.
greenysan has joined #ruby
<arturaz> Spooner, I write Ruby using Ruby libraries. I don't write Ruby and then write C libraries myself.
<arturaz> codora, scala is statically typed and runs on jvm. Pretty fast.
<codora> jvm? so a java technology?
<Spooner> Sorry, I didn't mean writing your own C libraries (though I did mention that, it was not the point I was trying to make).
<codora> interesting.
davidcelis has quit [Ping timeout: 265 seconds]
u_u has quit [Ping timeout: 246 seconds]
SegFaultAX has joined #ruby
<Hanmac> codora did you heard about wxwidgets or CEGUI or OGRE? all of them could be ported to ruby
<codora> Spooner: you know what would be cool? a full ruby desktop, with C for the low level stuff, like kernel and hardware acceleration, but otherwise pure ruby for all application and gui layer stuff.
<codora> Hanmac: i have.
<codora> wxruby exists.
<codora> cegui and ogre i have only heard about
<codora> googling.
davidcelis has joined #ruby
<Hanmac> wxruby is rubbish
<Spooner> arturaz : What I was meaning is that a significant number of Ruby libraries, not just games, are written in C (or are wrappers around C/C++ code). Sometimes people seem to get into the idea that using C to do the work for you isn't the Ruby way.
<arturaz> codora, there's still one big problem. Duck typing is slow :)
<arturaz> especially in ruby way
<arturaz> a + b needs a lot more operations than it would on java/scala
<codora> arturaz: that may be, but hardware is getting faster and faster, and the need to babysit the metal is less and less the more cores and more hardware acceleration we throw in there.
dv310p3r has quit [Quit: Leaving]
<codora> just how bad is duck typing? why is scala/java so much better to code in?
<arturaz> codora, yeah, thats all nice and everything, but I've cut parsing time in one app from 3 days into 1 hour by rewriting the code from jruby into scala.
<codora> wait, isnt java nonfree?
<arturaz> codora, check out openjdk :)
<arturaz> and duck typing, well...
<arturaz> a + b. What is a? What is b? What + in this context means?
<bperry> you could use C# and mono :)
<codora> i was told that the vast majority of tools in java are not covered in icedtea and openjdk. i was also told that java7 does not exist in open source.
<codora> bperry: yes, because C# and mono is so great :P
<arturaz> codora, openjdk7 and oracle jvm 7 is basically the same thing :)
<bperry> totally is
<Spooner> arturaz : But if you had 3 days with nothing better to do, then that optimisation was pointless. Same if you want a 2D game with a dozen sprites moving around. Why write that in C (6000fps) when you can do it in Ruby (60fps). Human eye can't tell the difference.
<arturaz> just with different branding
<arturaz> Spooner, I do not object :)
TomRone has joined #ruby
<Spooner> In fact, the great thing about coding in faster languages is that they allow you to be crap and get away with it :D In Ruby, you have to know what you are doing to get a workable FPS :P
<arturaz> Although I find I can write scala code as fast as ruby.
xaq has quit [Read error: Connection reset by peer]
tatsuya_o has joined #ruby
<codora> hey Spooner, can ruby compile ahead of time, or do options only exist for just in time compilation? yes i know ruby is an interpreted language, but is it possible to compile it ahead of time?
xaq has joined #ruby
<Hanmac> arturaz & Spooner: thats why i write bindings ... the power of C combined with the flexable of Ruby
<codora> Hanmac: bindings are nice.
<codora> it means i dont have to write any damned C code.
<Hanmac> only swig is shit
<arturaz> codora, AFAIK ruby cannot do that.
<Spooner> codora : Nope, we can't do that (Ruby 2.0 hopefully allows that though).
phinfonet has quit [Quit: phinfonet]
<codora> ruby 2.0? we're already evolving that fast?
<codora> it would be nice to have rbc like in python
yoklov has joined #ruby
<Spooner> codora : However, I am talking only about CRuby. JRuby and Rubinius both offer pre-compilation (At least to byte code).
mockra has joined #ruby
qwerxy has joined #ruby
<Mon_Ouie> "already" is kind of funny nearly 5 years after 1.9.0 came out
<Spooner> Ruby 2.0 is being worked on. Anyone know how well that is going on?
vjt has joined #ruby
<Spooner> Yeah, but barely anyone used 1.9.1 and even now with 1.9.3 there is a lot of resistance to moving from something that "works" (1.8.6/7).
mockra has quit [Remote host closed the connection]
<eam> Spooner: it's been "being worked on" for about a decade now
<Spooner> eam Oh, fair enough.
Ethan has quit [Ping timeout: 240 seconds]
<Spooner> Still mark and sweep though, I hear, so not very game friendly, regardless of pre-compilation to bytecode. Oh well.
<codora> Spooner: it would be a massive performance gain to precompile ruby to *.rbc assembly after running ruby code once. subsequent executions would be a lot faster without having to write C.
<codora> what's mark and sweep?
khakimov has joined #ruby
<Mon_Ouie> eam: Not quite. Before, the next release was never marked as being 2.0.
<codora> i used sbcl for a bit, and it ran really fast, comparable to C++ equivalent code, after running it twice.
chriskk has quit [Quit: chriskk]
<Spooner> It is the type of garbage collection. It halts everything every few seconds, which is fine for anything except real-time apps :)
<codora> D:
<headius> the move to 1.9.x has accelerated a lot…I'd be surprised if a majority of users weren't on 1.9.x by now
jan0232 has joined #ruby
<codora> would it be possible to switch garbage collection types this late in development?
<codora> to where maybe garbage collection could run in seperate threads?
<Mon_Ouie> codora: Notice there are tons of variants of mark and sweep algorithms
<eam> headius: no way, 1.9 isn't a default system ruby in nearly any distro
<codora> Mon_Ouie: i know nothing about garbage collection.
apok_ has joined #ruby
<headius> the limitation is not as much getting a new GC in but making it compatible with MRI's over-invasive C API
<arturaz> codora, jruby can switch gc's (due to jvm)
<jan0232> does anybody know a library that can fetch websites? i mean entirely…all needed images, stylesheets, referenced resources within stylesheets etc.?
<codora> arturaz: yeah, but if you are using jruby, why not just write scala? like you want?
emmanuelux has joined #ruby
<headius> MRI will never be able to do compacting GC, which rules out almost all the best systems
Goles has joined #ruby
<arturaz> codora, ruby libs? Perhaps you don't like static typing :)
<codora> headius: there is still rubinius.
<codora> arturaz: i am NOT a fan of static typing.
<jan0232> or what could help me implement that?? could probably be done with nokogiri??
<arturaz> well, i wasn't either, until scla :)
SegFaultAX has quit [Ping timeout: 248 seconds]
<codora> i learned java. i hated every second of it.
<eam> how can you dislike static typing?
bricker88 has joined #ruby
<codora> having to declare every variable.
<headius> rubinius definitely brings a better GC to the table, but it's still nowhere near the JVM and arguably still pretty immature
<codora> headius: maybe rubinious or a similar alternative vm would make it better?
<arturaz> codora, scala is rather a different beast :)
<eam> codora: static typing has nothing to do with variable declaration
<headius> not to slam rubinius or anything…it's just hard to shake out real-world user issues when you haven't had a release in over a year
u_u has joined #ruby
<codora> eam: fair enough.
<codora> brb.
apok has quit [Ping timeout: 246 seconds]
apok_ is now known as apok
<headius> "just use master" is a pretty poor way to stabilize a project
SegFaultAX has joined #ruby
powerplay has joined #ruby
<bricker88> When comparing two arrays with &, does it always go in the order of the first array? I hope that makes sense.
stephenjudkins has joined #ruby
<bricker88> [1, 2, 3] & [3, 1, 2] will *always* return [1,2,3], or is that not reliable?
<powerplay> hey everyone, im looking for a gem that simply makes basic http requests (GET and POST) with the best performance. Any suggestions? I did research and ppl are suggesting curl or patron..
SneakySeal has joined #ruby
<SneakySeal> hi
tomeo has joined #ruby
<tomeo> hi
<SneakySeal> why wud some1 store rss feeds in db
<SneakySeal> this is for a new site im working on
<SneakySeal> that some idiot built
dv__ has quit [Quit: No Ping reply in 180 seconds.]
dv_ has joined #ruby
cassianoleal has quit [Quit: Leaving.]
<tomeo> Could someone please help me with how to grab certain fields from a list and return them as a new array? It'd be like this in python [(h.email, h.id) for h in Handler.all]
khakimov has quit [Quit: Computer has gone to sleep.]
fn0rd has joined #ruby
<arturaz> list.map { |i| [i.email, i.id] }
<Mon_Ouie> bricker88: It's not documented so it's not reliable. In MRI 1.9, where it is implemented by generating a hash and where hashes respect insertion order, I guess it will work
johnlcox has quit [Remote host closed the connection]
PerfM has joined #ruby
zeen has quit [Ping timeout: 250 seconds]
<PerfM> YEAH
<PerfM> Hi frendz
<PerfM> where dem hoes @
<Spooner> bricker88: ([1, 2, 3] & [3, 1, 2]).sort will *always* return [1,2,3], if you are paranoid.
<SneakySeal> lol
<SneakySeal> dun sai dat
<tomeo> arturaz: thanks!
havenn has joined #ruby
<eam> Mon_Ouie: it hashes the right hand side enumerable though, right?
<arturaz> tomeo, np :)
elhu has quit [Quit: Computer has gone to sleep.]
<PerfM> SneakySeal, let's be bfffs k
<PerfM> bffs for everyone
arturaz has quit [Remote host closed the connection]
<eam> and iterate the LHS -- though if it's undocumented the implementation doesn't matter much
pu22l3r has quit [Ping timeout: 272 seconds]
answer_42 has quit [Quit: WeeChat 0.3.8]
<bricker88> Spooner: Mon_Ouie Thanks!
Ethan has joined #ruby
jjbohn|lunch is now known as back
<PerfM> I have the blues clues song stuck in my head
back is now known as jjbohn
<PerfM> da fuk, rite
<Mon_Ouie> Ah, well it seems to push new elements in a third array as it iterates over the first one
apok has quit [Remote host closed the connection]
apok has joined #ruby
<fn0rd> Does Zed Shaw come here?
<PerfM> YEAH
<SneakySeal> omg get outa hear gaize
johnlcox has joined #ruby
<PerfM> me 2
PerfM has quit []
<SneakySeal> this is a no LOL zone
<SneakySeal> srs
<Mon_Ouie> Oh, he actually left.
indstry has joined #ruby
<davidcelis> Well, one of them, anyway
workmad3 has joined #ruby
<Mon_Ouie> That one didn't seem to be here just to troll at least
macer1 has quit [Ping timeout: 250 seconds]
<davidcelis> SneakySeal: When you say store RSS feeds... Do you mean URLs to the feeds, or they're storing entire XML documents from those feeds?
jrist is now known as jrist-mtg
<SneakySeal> the data
<SneakySeal> also saving the images in the rss feeds
<davidcelis> sounds dum
<SneakySeal> and its creating a giant, already 6gb images folder
<SneakySeal> ive never seen any1 do this bolney
<SneakySeal> baloney
<davidcelis> balogna
<SneakySeal> and also thinking that it kindof defeats teh purpose of rss
<SneakySeal> wat u think?
elhu has joined #ruby
<Spooner> Maybe the original dev was trying to back up the Internet, knowing that Skynet will soon take over and delete all the good bits?
<TorpedoSkyline> davidcelis, I never understood the spelling of "balogna". It's proof that English is a terrible language.
<davidcelis> TorpedoSkyline: Balogna is a place
<eam> and the word is italian
<davidcelis> it's not english
<workmad3> TorpedoSkyline: http://en.wikipedia.org/wiki/Balogna
<workmad3> eam: Balogna is french :P
smw_work has joined #ruby
<davidcelis> TorpedoSkyline: ENGLISH INSULT FAIL
<havenn> TorpedoSkyline: I think you're thinking 'baloney'.
<virunga> The italian word is Bologna
<eam> workmad3: yes but bologna is italian
<virunga> not Balogna
<TorpedoSkyline> XD
<eam> as is the meat
bgupta has joined #ruby
<davidcelis> GUYS.
<davidcelis> #balogna
<virunga> Bologna
<workmad3> eam: yeah, but that's bologna, not balogna ;)
<TorpedoSkyline> Maybe it was an English insult fail, but at this point with all the contention I have no idea.
<davidcelis> Take this shit to #balogna
<eam> workmad3: right, TorpedoSkyline misspelled it
<workmad3> eam: also, looks like bologna is american
workmad3 has quit [Quit: Lost terminal]
<TorpedoSkyline> eam, davidcelis misspelled it.
geekbri has quit [Remote host closed the connection]
<TorpedoSkyline> [15:55:24] <davidcelis> balogna
<smw_work> hi all, can anyone help me with this small piece of code? I am very new to ruby. http://fpaste.org/oVd0/ . The goal of this program is to run a command that returns json, parse and create an array of installed packages, then see if a certain package is installed.
workmad3 has joined #ruby
<davidcelis> I didn't misspell shit!
headius has quit [Quit: headius]
<davidcelis> Balogna is a place in France.
<eam> americans spell it "baloney"
<workmad3> d'oh, killed irssi instead of pasting linke
<davidcelis> AMERICANS ARE STUPID
<TorpedoSkyline> but davidcelis, SneakySeal was clearly speaking of the meat
<davidcelis> TorpedoSkyline: Shhhhh
w400z has joined #ruby
<smw_work> I am getting the error: juggernaut.rb:13: syntax error, unexpected $end
<davidcelis> TorpedoSkyline: Sleep....
<workmad3> eam: bologna is an italian place :)
<TorpedoSkyline> That's the phrase in "all this bologna"
<davidcelis> TorpedoSkyline: Everything's gonna be okay... Just sleep...
<TorpedoSkyline> LOL ;P
<Mon_Ouie> smw_work: That's because of your "do" after the "if"
<havenn> davidcelis: Problem is that #balogna is about the seasoned meat sausage. You have to go to #città-di-balogna.
<workmad3> eam: but the meat is american
<smw_work> Mon_Ouie, I should not do that?
<virunga> no
<virunga> The meat is Italian
<Mon_Ouie> You don't need anything there (you are allowed to use "then" if you want; most people don't)
<TorpedoSkyline> Bologna sandwiches are terrible.
ricogallo has joined #ruby
<eam> workmad3: no, the meat is the italian mortadella, read carefully :) Americans chose to call it after its city of origin
<smw_work> Mon_Ouie, cool, now it compiles, it is just not doing what I want :-)
<smw_work> thanks
<workmad3> eam: I did read
<workmad3> eam: an American sausage derived from and somewhat similar to the Italian mortadella
Goles has quit [Read error: Connection reset by peer]
fastred has quit [Quit: fastred]
<workmad3> eam: i.e. based off, not the same as
<Mon_Ouie> Btw, checking if keys.include? is significantly less efficient than checking if the hash has a certain key
<eam> if you get your entire cullinary education from a wikipedia article we won't have a meaningful discussion
<virunga> we don't use the mortadella with sauce... stinky
<Mon_Ouie> (using #has_key?)
<workmad3> eam: heh :)
<Mon_Ouie> (Well, I mean O(n) instead of O(1))
aldodelgado has joined #ruby
<workmad3> eam: you were the one who said to read carefully though
<smw_work> Mon_Ouie, but his makes more sense when reading
<workmad3> eam: and when I pointed out that I had, you backtracked :P
uris_ has quit [Quit: leaving]
<eam> workmad3: I'm assuming the article has references
<TorpedoSkyline> "and this is why i love irc".upcase
dju has quit [Write error: Broken pipe]
RichieEvan has quit [Quit: RichieEvan]
wargasm has quit [Read error: Connection reset by peer]
urbann has quit [Remote host closed the connection]
<smw_work> Mon_Ouie, and speed is relative. An array include is faster in a length 1 array which this is very likely to be ;-)
<workmad3> eam: then a different reference: http://www.italyinsf.com/2009/02/19/mortadella-vs-baloney/
graspee has quit [Quit: leaving]
<workmad3> eam: which says ' let’s make one thing clear: baloney (or Bologna) and mortadella have nothing in common'
tty01 has joined #ruby
<virunga> workmad3: if you're talking about Bologna and the meat Bologna you're wrong
dju has joined #ruby
<virunga> the name isn't random
tommyvyo has quit [Quit: Textual IRC Client: http://www.textualapp.com/]
iamjarvo has quit [Quit: Leaving...]
<virunga> :D
<workmad3> virunga: no, all the references I'm seeing agree... it's based off mortadella, from bologna
<workmad3> virunga: and they chose the name deliberately
<workmad3> virunga: that doesn't make it the same thing
wargasm has joined #ruby
<davidcelis> how do i ruby
qwerxy has quit [Quit: offski]
<workmad3> davidcelis: with discussions about italian sausage and their american derivatives... obviously :)
carloslopes has quit [Quit: Leaving.]
<havenn> %w[genoa soppressata cotto-salami finocchiona napolitano].sample
johnlcox has quit [Remote host closed the connection]
<virunga> workmad3: it's common thought that the bologna is made mainly near Bologna
bothra2 has quit [Ping timeout: 245 seconds]
<virunga> maybe it's wrong
<havenn> salami > balogna
<virunga> im talking about Italians
<davidcelis> does ruby have lazy lists and lots of monads
rodj has joined #ruby
<workmad3> virunga: the references also point out that bologna (the american stuff) is finely ground and sometimes even made out of turkey and chicken
<workmad3> virunga: as opposed to to mortadella, which is always pork and contains larger lumps of lard
<davidcelis> nvm u guise r weird im just gunna go write my own lang
strg has quit [Quit: strg]
<virunga> workmad3: ah ok. To us they are the same thing
hynkle has quit [Quit: Computer has gone to sleep.]
<havenn> It is odd how a lot of people don't realize that #ruby is for EW's reality-based TV show about Ruby Gettinger's battle with weight loss. #ruby-lang is for the programming language...
<workmad3> virunga: 'us' as in americans, or 'us' as in italians?
<SneakySeal> no but srsly
<havenn> so, back to nutritional value of salami..
<SneakySeal> y was he saving the feeds
<SneakySeal> he runs a cronjob
<virunga> workmad3: italians
<SneakySeal> every 12 mins and saves the feeds
aldodelgado has quit [Quit: aldodelgado]
<SneakySeal> then the site jus displays them from db
<SneakySeal> wtf?
<workmad3> virunga: ah, could just be that what americans call mortadella you call bologna :)
<codora> back.
johnlcox has joined #ruby
<SneakySeal> there is no paging or sorting
<workmad3> havenn: http://xkcd.com/386/
<eam> workmad3: just a haughty italian
Markvilla has quit [Quit: Computer has gone to sleep.]
<SneakySeal> and even that can be done with arrays
<SneakySeal> plz help im dieing
* codora throws SneakySeal a lifesaver
<workmad3> SneakySeal: someone did something odd eh? :)
<workmad3> SneakySeal: welcome to the world of maintaining other people's crazy shit :)
<virunga> workmad3: we call it with both names. Anyway that's the worse meat we have :P
<havenn> virunga: Oh, there is worse meat. I promise.
[Neurotic] has joined #ruby
<workmad3> virunga: heh :) could be you don't have american bologna then
<virunga> lol
<workmad3> virunga: I suspect the american stuff is similar to the stuff I get here in the UK, which is a bit dire :)
<workmad3> virunga: heavily processed with absolutely no texture...
<virunga> workmad3: :)
<SneakySeal> so u gaize dun think there is a valid reason for saving the feeds
jarred has quit [Quit: jarred]
<SneakySeal> i mean rss content
<workmad3> SneakySeal: 'performance'?
<virunga> workmad3: did you go to see any match of olimpics?
<havenn> virunga: Jellied moose nose, bat paste, raw sea urchin, etc.
<virunga> i'd like so much be there
<workmad3> virunga: nope
<SneakySeal> workmad3: but the site is slow as hell
<workmad3> virunga: wrong part of the country, and I'm not fond of watching sporting events anyway
<virunga> havenn: bat paste!?!? bleah
<workmad3> SneakySeal: ah, but that's about performance, not 'performance' :P
slux has joined #ruby
korczis has quit [Ping timeout: 240 seconds]
<virunga> oh god
faen has quit [Ping timeout: 246 seconds]
ppawel has quit [Ping timeout: 264 seconds]
jorge has quit [Remote host closed the connection]
kn330 has quit [Read error: Connection reset by peer]
rodj has quit [Quit: rodj]
ckrailo has quit [Read error: Connection reset by peer]
ckrailo_ has joined #ruby
kn330 has joined #ruby
* virunga just through out
korczis has joined #ruby
macmartine has quit [Quit: ["Textual IRC Client: www.textualapp.com"]]
wargasm has quit [Read error: Connection reset by peer]
faen has joined #ruby
<davidcelis> virunga: ಠ_ಠ
<asteve> ಠ_ಠ
<asteve> reddit!
kn330 has quit [Read error: Connection reset by peer]
<havenn> (╯°□°)╯
kn330 has joined #ruby
xaq has quit [Read error: Connection reset by peer]
jonathanwallace has quit [Remote host closed the connection]
xaq has joined #ruby
techsurvivor has joined #ruby
<davidcelis> (╯ಠ_ಠ)╯
smw_work has quit [Read error: Connection reset by peer]
fforbeck has quit [Quit: Leaving]
<virunga> isn't an american here?
<virunga> isn't there an american here?
<davidcelis> Yes, I am American
<davidcelis> You want American, I am American
<virunga> hi
<davidcelis> hi
<virunga> :)
<havenn> ლ(ಠ益ಠლ) Y U NO AMERICAN?
<virunga> davidcelis: can i ask where do you live?
workmad3 has quit [Ping timeout: 244 seconds]
<davidcelis> Portland
<virunga> davidcelis: are you following the olimpics? Yesterday you kick us out of the olimpics in two sports :(
krz has joined #ruby
<davidcelis> Who is "us"
<virunga> Italy
mbriggs has joined #ruby
<virunga> beach volley and swiming volley
ilyam has joined #ruby
<davidcelis> I haven't really been watching, but lol
ppawel has joined #ruby
<virunga> :)
<virunga> davidboy: is it raining there?
<virunga> hihihi
<davidcelis> No it's summer
sent-hil has joined #ruby
jrist-mtg is now known as jrist
cantonic has joined #ruby
<sent-hil> how do I include search in a macruby app? i'm assuming some kind of basic search plugin exists
<virunga> davidboy: a serious question: what do you think about the spread of guns in America?
<davidcelis> there's a gun problem in america?
<davidcelis> shit, i should get a gun
<virunga> yep
<virunga> it's a "circolo vizioso"
<virunga> i don't know how say it in english
<davidcelis> vicious circle
<virunga> right
<virunga> thankis
<Hanmac> "another child shot itself with a gun" ... i read this news more than i could count ... and it seems allways be in america ...
<eam> it's not a vicious circle; there are plenty of countries with widespread gun ownership and little violence
<eam> America has a mental health crisis, not a gun crisis
<davidcelis> sarcasm is a thing
<eam> it's a health care problem
<infinitiguy> Guns make it easy for people with mental health issues to cause chaos
tatsuya__ has joined #ruby
<eam> davidcelis: I was addressing both of you
<Hanmac> the "gun" problem could be some evil kind of "natural selection"
alfism has joined #ruby
<davidcelis> social selection
<davidcelis> FTFY
<eam> infinitiguy: common misconception
<virunga> where there are less guns there are less crimes
<infinitiguy> if all that was available were machete's - it would be tougher to massacre a bunch of people
<virunga> and people live better
<eam> infinitiguy: not true
<eam> rampage killers with the greatest murders have not used guns
<eam> they used fire, and large buildings
<infinitiguy> tougher - both for logistical reasons (close combat) and for mental reasons - hacking someone to bits is harder on the brain than pulling a trigger from far away
sent-hil has quit [Remote host closed the connection]
<Hanmac> infinitiguy: the problem is: even if you say someone that you have "mental issues" and that you need help, you will be ignored
tatsuya_o has quit [Ping timeout: 246 seconds]
<eam> infinitiguy: pouring gasoline in a basement and lighting a match will kill more people, hands down
scriabin_ has quit [Quit: leaving]
<davidcelis> man what's up with this channel today
<eam> wikipedia has a great list detailing this information
<davidcelis> can we go back to talking about bologna?
<infinitiguy> true - but gasoline is something that is a daily need
<eam> as are guns
<infinitiguy> we need guns?
<davidcelis> plenty of people prove that guns aren't a "need"
<eam> and if you disagree, disarm your police force and see how far you get
<infinitiguy> as civilians?
baroquebobcat has joined #ruby
<infinitiguy> I don't see the british around
<havenn> I saw a dog running around a puddle of gas, round and round in a parking lot. Eventually he fell over.
<havenn> Out of gas...
<eam> police are civilians
<infinitiguy> police are government employees
<infinitiguy> I'm a civilian
<Hanmac> in my country the normal police dont have guns ...
<eam> infinitiguy: so am I, and so is any non-military personell
<virunga> state not govern
<virunga> :P
<infinitiguy> as a system engineer - I don't need a gun.
<eam> you in particular do not, we as a society do
yxhuvud has quit [Ping timeout: 264 seconds]
<Spooner> Our police have guns in airports and in armed response vans. Don't generally use anything more than batons and pepper spray though. We get by fine, thanks (UK).
<infinitiguy> why? Is it to protect against martial law?
<Hanmac> infinitiguy: you have a root console ... its more mighty than a gun :P
vandemar has quit [Ping timeout: 240 seconds]
<eam> infinitiguy: it is to protect civil rights. The premise of the Second Amendment is that the power to police and defend ought to be shared between local law enforcement and the people they govern
<Spooner> Americans started off needing guns to overthrow unlawful governments, but that is largely forgotten nowadays.
<davidcelis> What society NEEDS is bologna
ph^_ has quit [Remote host closed the connection]
<davidcelis> Fact.
<infinitiguy> @spooner - exactly
ken_barber has quit [Remote host closed the connection]
<eam> if you look at American history you will see a repeated pattern of American authorities discriminating (and failing to protect) various minority classes
<eam> this is why sharing this power with regular citizens is so important
ken_barber has joined #ruby
r1chelt has joined #ruby
<eam> add to this, in the US the police are under no obligation to protect citizens
<virunga> davidcelis: is there only the software engineer or there's also the informatic in America?
<Spooner> It is good to know that the Civil Rights movement was primarily one of armed civilians against a state.
<shevy> guns never worked against "unlawful" governments. just make laws that protect the powers to be and everything is fine :P
<davidcelis> informatic?
<eam> Spooner: I know you're joking, but you don't realize you're right
<virunga> davidcelis: in Italy they are two distinct degree
korczis has quit [Remote host closed the connection]
<eam> the riots going on as context behind King's movement were crucial
<shevy> virunga in which town do you live again btw?
<Spooner> eam I was joking and I don't realise I'm right.
<eam> Spooner: well you are, like it or not. Study up
<virunga> shevy: Milano
<davidcelis> virunga: We have Computer Science, Computer Engineering, Informatics, and a lot of other specialty degrees
<eam> infinitiguy: and you might want to read this http://www.nytimes.com/2005/06/28/politics/28scotus.html
<davidcelis> virunga: Depends on the school
<Spooner> eam and the riots were only possible because anyone has the right to own a gun? I don't think so.
<eam> Spooner: no, that isn't what I said
<virunga> davidcelis: ah, i didn't know it
<virunga> thanks
<eam> Spooner: guns were used to protect minority communities throughout the majority of US history, as recently as the 1990s
smw_work has joined #ruby
<eam> in most cases, in situations where a bigoted local police force declined to offer equitable protection
<eam> this is very common
<eam> well documented
r1chelt has quit [Remote host closed the connection]
<shevy> virunga ah the economic centre or Italy
<eam> when put together with Castle Rock v. Gonzales it paints a clear picture
<shevy> *of Italy
<virunga> shevy: yes :)
<shevy> I more like the area around Trieste/Treviso/Northeastern Italy
elhu has quit [Quit: Computer has gone to sleep.]
jaylevitt has quit [Quit: Leaving...]
<eam> Spooner: people like you and I with good jobs, good education, living in nice parts of town don't need guns
<davidcelis> someday i want to live in spain for about a year
r1chelt has joined #ruby
<virunga> shevy: the regions that were part of Austria
<Spooner> eam that is a big assumption about me.
<shevy> virunga hehe
<virunga> :D
<eam> Spooner: is it?
<shevy> virunga kinda. but towns like treviso are really lovely
ken_barber has quit [Ping timeout: 265 seconds]
<virunga> shevy: ah, i've never been there
thone has joined #ruby
ken_barber has joined #ruby
<virunga> nice
<shevy> kk, "enhanced" image... :P
sent-hil has joined #ruby
<virunga> eheheh
<Spooner> I haven't worked in 10 years and have never earned > $12/hour. The education bit is true and the area largely is, but that is mainly because I live in the UK outside the center of a major city (which isn't 100% about wealth).
Tulak has joined #ruby
<shevy> virunga, towns with mini "rivers"... canals... are awesome. germany has one such town, Nürnberg... http://www.franken-infos.de/Fotos/nuernberg/nuernberg-heilig-geist-spital-600.jpg reminds me of Treviso too. sadly vienna does not have anything like this :(
<Spooner> I can't imagine I'd choose to own a gun, wherever I lived though. This world-view is just as ingrained into me just as yours in in you, I'm sure.
thone_ has quit [Ping timeout: 246 seconds]
<virunga> shevy: i was thinking the same thing today. Towns and cities with rivers are more beautiful
<shevy> the USA is gun nut
<codora> Spooner: i was raised in texas. disarming the population is enslaving them.
Resure has joined #ruby
<eam> that's more or less my point. You and I have more effective means at our disposal
sent-hil has left #ruby [#ruby]
<havenn> Ruby, you'll shoot your eye out...
<shevy> would be nice
<shevy> I'd duel ... all of you
<TorpedoSkyline> +1 codora
wargasm has joined #ruby
<codora> eam: i wish they law allowed the general public to own modern military-grade automatic rifles. i'd buy those in a hot second.
<eam> just keep in mind, you might have a different opinion if you were a black gay muslim living in Alabama. The 2nd Amendment exists to give those people equal access to the same power local police leverage to protect us all
<virunga> think that there are place where policemen have not guns :O
<codora> *the law
joshman_ has quit [Read error: Operation timed out]
skrewler has joined #ruby
<shevy> once they all have nukes they will feel super secure
<eam> Spooner: you may also want to keep an eye on the direction your country is going after having banned guns
<eam> Spooner: I do know your violent crime hasn't really changed
<shevy> social tension leads to more crime
vandemar has joined #ruby
<eam> Spooner: and I've seen some scary things on film re: your recent student protests
<virunga> like Totenam riots
baroquebobcat has quit [Ping timeout: 245 seconds]
Ethan has quit [Ping timeout: 246 seconds]
<eam> your country no longer has a check and balance against the abuse of police power
<eam> the problem of police violence against minorities is a thousand times larger than shootings by mentally ill people
<virunga> eam: what country?
GoGoGarrett has quit [Remote host closed the connection]
<eam> virunga: UK
<eam> the difference is a crazy person gets on TV for a week -- but police violence against minorities is covered up
mwilson_ has quit [Excess Flood]
Foxandxss has joined #ruby
ylluminate has joined #ruby
<Spooner> Er, we didn't "ban guns". All we did was ban handguns, which we never had a ingrained belief in owning,which is a bit different. The Issue is that if we hadn't would the crime be more or less than now. If more, then it was good. If the same, then no problem with removing guns that had no effect other than being a possibility of accident. If we are worse off now, _because we banned handguns_, then I'd like to hear proof.
linoj_ has joined #ruby
mwilson_ has joined #ruby
und3f has quit [Quit: Leaving.]
<Hanmac> eam or there is a gang that kills minorities, and the covernment deletes all documents about the gang ...
<havenn> Hanmac: That gang is called 'police'. Hate that gang!
banisterfiend has quit [Read error: Connection reset by peer]
havenn has quit [Remote host closed the connection]
tty01 has left #ruby [#ruby]
SCommette has quit [Quit: SCommette]
<Spooner> eam _we never had this check in the first place_. Barely anyone owned handguns before. People who owned rifles and shotguns were very rare (farmers and toffs really).
<eam> Hanmac: well, the majority of gun homicide in america is suicide (about 51%) After that, it's almost entirely drug related gang violence
mwilson_ has quit [Excess Flood]
<codora> the check and balance against police is having bigger guns than the police.
<eam> the number of people killed in rampage shootings is statistically insignificant
SCommette has joined #ruby
hunglin has joined #ruby
<Hanmac> eam google "NSU germany" that what i meaned
mwilson_ has joined #ruby
locriani has joined #ruby
locriani has quit [Changing host]
locriani has joined #ruby
havenn has joined #ruby
<eam> but then you get these knee-jerk crazies who want to ban guns because they're terrible at math
jan0232 has left #ruby [#ruby]
<eam> and they have the gall to call everyone else crazy :)
linoj has quit [Ping timeout: 240 seconds]
<eam> Hanmac: oh, I agree
w400z has quit [Quit: Computer has gone to sleep.]
sailias has joined #ruby
dpk has joined #ruby
baphled has quit [Ping timeout: 246 seconds]
linoj_ has quit [Ping timeout: 252 seconds]
w400z has joined #ruby
<codora> eam: yeah, that really bothers me.
banisterfiend has joined #ruby
asteve has quit []
<Hanmac> eam an gang that kills minorities is bad enougth, but when they get "protected" by the police then it gets worse
kn330 has quit [Ping timeout: 255 seconds]
<codora> Hanmac: so in germany, the gangs that kill minorities are protected by police?
jonathanwallace has joined #ruby
<Hanmac> codora not by the police direcly but on higher goverment groups
r1chelt has quit []
<codora> Hanmac: i see.
<havenn> Hanmac: We just call those gangs 'police' to legitimize the endeavor.
dhruvasa1ar has quit [Ping timeout: 250 seconds]
havenn has quit [Remote host closed the connection]
<codora> htHanmac: that's pretty bad.
<codora> *Hanmac
`brendan has quit [Quit: - nbs-irc 2.39 - www.nbs-irc.net -]
chichou has joined #ruby
<Hanmac> havenn: the NSU group killed itself "by accident" after arounded by police ... and in the same moment the documents about the group get shredderd
luckyruby has joined #ruby
jonathanwallace has quit [Remote host closed the connection]
<codora> Hanmac: wow, that's... really obviously suspicious. do they really think no one would notice?
maletor has quit [Ping timeout: 250 seconds]
<virunga> Is there any Spanish here? We're kicking your asses ahahahah
maletor has joined #ruby
<virunga> WON!!
nwest has quit [Quit: Computer has gone to sleep.]
specialGuest has joined #ruby
Ethan has joined #ruby
atrika has quit [Disconnected by services]
kn330 has joined #ruby
kenichi has quit [Remote host closed the connection]
wereHamster has quit [Quit: Lost terminal]
yoklov has quit [Quit: computer sleeping]
asobrasil has left #ruby [#ruby]
jonathanwallace has joined #ruby
internet_user has quit [Remote host closed the connection]
hadees has quit [Quit: hadees]
alfism has quit [Quit: alfism]
balki_ has joined #ruby
alanp_ has joined #ruby
<Hanmac> codora we have something called "Verfassungsschutz" that should protected our "Basic law" ... but it seems that this org is infected by conservative-radical forces ...
balki has quit [Ping timeout: 240 seconds]
alanp has quit [Ping timeout: 240 seconds]
<codora> Hanmac: someone needs to shoot them.
krusty_ar has quit [Remote host closed the connection]
kn330 has quit [Ping timeout: 265 seconds]
<Hanmac> another sample: one of our radical "parties" couldnt be banned because of to much agents inside the party
<blazes816> Hanmac: on what grounds should they have been banned?
kn330 has joined #ruby
kenichi has joined #ruby
kn330 has quit [Read error: Connection reset by peer]
whitedawg1 has quit [Ping timeout: 248 seconds]
lurch_ has joined #ruby
<Hanmac> its a party similar to nazis ... (and we germans have a problem with nazis)
<shevy> pffft
<blazes816> lol, I understand that
theRoUS has quit [Ping timeout: 246 seconds]
<shevy> british nazis are worse, they can really slug
apok_ has joined #ruby
SCommette has quit [Quit: SCommette]
<blazes816> i'm glad i live in the US away from crazy fascists
<Hanmac> yeah something similar to them and we try to get rib of them but we cant because there are to much agents inside the party :/ (we cant ban the party without sacrefice them)
SCommette has joined #ruby
<shevy> (at least those guys who recieved the taxpayer money)
kn330 has joined #ruby
<TorpedoSkyline> Hanmac, Germany still has Nazis?
<TorpedoSkyline> blazes816 lol
ricogallo has quit [Remote host closed the connection]
<TorpedoSkyline> That was sarcasm, right?
mfcabrera_ has quit [Quit: This computer has gone to sleep]
mengu has joined #ruby
<shevy> blazes816, they used taxpayer money to infiltrate that political party, then tried to get it banned, but they were also involved in criminal activities on their own all the time, so the reason for banishment was tainted
<blazes816> that's fucked up
u_u has quit [Ping timeout: 252 seconds]
bbttxu has quit [Quit: bbttxu]
lurch007 has quit [Ping timeout: 268 seconds]
<blazes816> definitely
<TorpedoSkyline> Then I take off my hat and bow to you, good sir.
<blazes816> they're commies!
infinitiguy has quit [Ping timeout: 246 seconds]
<shevy> hehe commies
<shevy> there is always this time of [insert fear-topic here]
<shevy> commies... terrorists... war on drugs, war on terror... something always has to happen
<shevy> liberals!
baroquebobcat has joined #ruby
<blazes816> the only thing humans agree on is fear
specialGuest has quit [Changing host]
specialGuest has joined #ruby
<TorpedoSkyline> and food.
<shevy> yeah and excitement
apok has quit [Ping timeout: 240 seconds]
apok_ is now known as apok
<shevy> dunno. there is lots of food
<TorpedoSkyline> Unless you're Jewish or Muslim, because if that's the case you don't like bacon.
<shevy> what about vegetarian
<blazes816> cursed with the bacon hating gene
<Muz> TorpedoSkyline: that's bullshit.
<Muz> I'm Jewish and I love the taste of bacon.
abra has quit [Remote host closed the connection]
<Hanmac> the usa not want to win the fight against drugs and terror ... because they get much money from it
<shevy> well perhaps they would like it
greenysan has quit [Ping timeout: 268 seconds]
<blazes816> :0
<shevy> I mean, you could be a vegetarian, love steak, but don't eat it
<TorpedoSkyline> LOL Muz, then you don't practice Judaism.
<TorpedoSkyline> MEH
lurch_ has quit [Quit: lurch_]
<Muz> shevy: tell me about it :(
abra has joined #ruby
<shevy> Hanmac, yeah. capitalism lesson one. the more money you throw into it, the greedier it gets
<Muz> Not eaten meat for the last few weeks, really miss a good steak, or lobster.
<shevy> hehe
<TorpedoSkyline> I want a taco.
<blazes816> shevy: agriculture lesson one. stalk pile resources, and you've created a system to control
stopbit has quit [Quit: Leaving]
<blazes816> stock*
<shevy> blazes816 yeah. it's sad
<Hanmac> >3000Years B.C. that thing was called moloch ...
<Muz> TorpedoSkyline: technically, there's kosher bacon salt and baconnaise, and even if one doesn't eat bacon /now/ doesn't mean that they haven't tried it. :)
<shevy> or patent genetical information to "design" food, and sue people who "steal" the technology
<blazes816> got to run been it's been great gettin deep with you all
<TorpedoSkyline> Muz, true. I wasn't talking about the physicality of being Jewish though, I was talking about the religion. ;P
<Muz> One can be culturally Jewish too.
<Hanmac> shevy did you see the movie "thank you for smoking"?
ppawel has quit [Quit: Leaving]
<TorpedoSkyline> Jewish folk love bacon as much as everyone else, they're just not allowed to eat it.
mbriggs has quit [Remote host closed the connection]
<shevy> Hanmac, yeah. I like the main actor, he was funny. the movie was ok too... 6 or 7 points out of 10 maximum from me
<shevy> it was a little bit too overdramatized though
yoklov has joined #ruby
<Hanmac> the group was funny, the "mercants of death" ;P
headius has joined #ruby
<shevy> yeah, a bit cliched... but the weapons dealer guy was funny... trying to give the kid a gun to defend himself... clichee :P
dpk has quit [Quit: Asleep at the keyboard.]
<Hanmac> yeah and this guy in a metal detection control: "this could take a while"
indstry has quit [Remote host closed the connection]
Progster has quit [Ping timeout: 248 seconds]
TorpedoSkyline has quit [Quit: Computer has gone to sleep.]
strg has joined #ruby
mwilson_ has quit [Excess Flood]
mwilson_ has joined #ruby
mwilson_ has quit [Excess Flood]
mwilson_ has joined #ruby
<shevy> hehe
<shevy> this is what I sometimes don't like about movies... when things seem to go into a rush
sailias has quit [Quit: Leaving.]
mwilson_ has quit [Client Quit]
<shevy> and they don't explain things much in a plausible way... just because they have a script and want to finish a movie in this or that time
<shevy> is why movies like Blade Runner should only have been distributed in the longest director cut version
<Hanmac> shevy: do you know that scene i hate and like at most? when they say: "this is real life" :P
mrdodo has quit [Ping timeout: 240 seconds]
lorandi has quit [Quit: Leaving]
axl__ has joined #ruby
jjbohn has quit [Quit: Leaving...]
<shevy> where?
<shevy> I mean, in what movie
<Hanmac> it was not in this movie i mean in general
<shevy> aha
jgarvey has quit [Quit: Leaving]
<shevy> dunno... movies are much more action packed than real life hehehe
<shevy> I liked inception a lot
tatsuya__ has quit [Remote host closed the connection]
axl_ has quit [Ping timeout: 244 seconds]
axl__ is now known as axl_
tatsuya_o has joined #ruby
u_u has joined #ruby
<Hanmac> shevy and like "last action hero"? xD
<shevy> nah, that one was bad... the idea behind it wasn't total crap, but the realization of it sucked
<shevy> omg
<shevy> 20 years old already :(
acemtp has joined #ruby
chichou has quit [Remote host closed the connection]
graft has quit [Quit: leaving]
andremaha has joined #ruby
sgronblom has quit [Ping timeout: 246 seconds]
ace has quit [Ping timeout: 246 seconds]
tatsuya_o has quit [Ping timeout: 246 seconds]
sailias has joined #ruby
mengu has quit [Read error: Connection reset by peer]
mengu has joined #ruby
mengu has quit [Changing host]
mengu has joined #ruby
headius has quit [Quit: headius]
devdazed has quit [Quit: Bye]
dangerousdave has quit [Quit: Leaving...]
hunglin has quit [Ping timeout: 252 seconds]
nazty has joined #ruby
nohonor has quit [Read error: Connection reset by peer]
nohonor has joined #ruby
strnx has joined #ruby
r0bby has joined #ruby
jorge_ has joined #ruby
naz has quit [Ping timeout: 244 seconds]
andremaha has quit [Quit: Colloquy for iPhone - http://colloquy.mobi]
w400z has quit [Quit: Computer has gone to sleep.]
rutkla has quit [Ping timeout: 240 seconds]
robbyoconnor has quit [Ping timeout: 246 seconds]
arietis has quit [Quit: Textual IRC Client: http://www.textualapp.com/]
powerplay has quit [Ping timeout: 246 seconds]
deryl-android has joined #ruby
powerplay has joined #ruby
<Hanmac> shevy: the curruption in greece is going down ... because they havnt enough money to pay the bureaucrats
<shevy> Hanmac, but they get extra money, used for new bribes, paid by the rest of the EU ;P
gry is now known as Gryllida
mengu has quit [Remote host closed the connection]
<Hanmac> i think greece is buying more tanks with that money
<davidcelis> how bout that ruby
tommyvyo has joined #ruby
nateberkopec has quit [Quit: Linkinus - http://linkinus.com]
mbriggs has joined #ruby
SegFaultAX has quit [Ping timeout: 252 seconds]
nari has joined #ruby
<bricker88> What do you think, is Python smarter for allowing trailing commas, or is Ruby smarter for *not* allowing them?
krzkrzkrz has joined #ruby
sailias has quit [Read error: Connection reset by peer]
sailias1 has joined #ruby
<davidcelis> why would you code trailing commas
Maniacal has joined #ruby
<davidcelis> that's messy
mrdodo has joined #ruby
krz has quit [Ping timeout: 252 seconds]
krzkrzkrz is now known as krz
akem has quit [Ping timeout: 240 seconds]
deryl-android is now known as deryldoucette
<Resure> Is there any good manual for creating Ruby C extensions?
<Spooner> bricker88 : Not sure what you mean by trailing commas. I do have confusion sometimes that it allows [1, 2,], but not frog(1, 2, ) :D Not because I want one or the other, but because it isn't terribly consistent.
<Spooner> resure : Otherwise just look at other people's extension code on Github.
strg has quit [Quit: strg]
jasonLas_ has quit [Remote host closed the connection]
jasonLaster has joined #ruby
saschagehlich has quit [Ping timeout: 246 seconds]
<davidcelis> Spooner: What?
<Spooner> resure : Be warey, however, since a lot of stuff is out of date and doesn't necessarily tell you how to do it properly in 1.9
<davidcelis> Spooner: [1] pry(main)> [1, 2], # => SyntaxError: unexpected ',', expecting $end
<davidcelis> Spooner: He probably means trailing commas in hashes and arrays
<Spooner> davidcelis : That comma was punctuation. I did write [1, 2,]
<Spooner> davidcelis : Sorry, in-line code is always confusing :)
<davidcelis> Oh woops
<davidcelis> Ah so it does allow trailing commas
tomeo has quit [Remote host closed the connection]
<davidcelis> sad
eywu has joined #ruby
<Resure> Spooner: thanks
eywu has quit [Client Quit]
<Spooner> I use them all the time, but only if I am using a multi-line hash/array. That way, if I add another line, I don't get the line I had to add a comma to being marked as changed by git.
<shevy> bricker88 what is a trailing comma again?
_whitelogger has joined #ruby
SCommette has quit [Quit: SCommette]
<jezebel> well one of my friends worked as a staffer at an employment agency
akem has joined #ruby
akem has quit [Changing host]
akem has joined #ruby
<jezebel> he told me alot of the jobs were looking for people skilled in ruby, so i figured id come ask you guys
jjang has joined #ruby
subbyyy has joined #ruby
<deryldoucette> Well if he is a staffer then he has the ability to connect you to the jobs if you have the ruby skills.
apok has quit [Remote host closed the connection]
apok has joined #ruby
andrewhl has quit [Ping timeout: 245 seconds]
smw_work has quit [Remote host closed the connection]
seanstickle has joined #ruby
brdude has quit [Quit: brdude]
mbriggs has joined #ruby
HRabbit has quit [Ping timeout: 244 seconds]
<jezebel> yeah
pskosinski has quit [Ping timeout: 240 seconds]
<jezebel> but i guess i didnt realy want the ruby skills
<jezebel> if you guys are the ones in demand
ephemerian has left #ruby [#ruby]
<jezebel> and you tell me php and java is worth more
<jezebel> then either a) you guys are lying to me
<jezebel> or b) you guys know better than my staffer
<jezebel> so i have to take your opinion into consideration too
<seanstickle> Worth is a tricky thing
<seanstickle> Depends on the buyer
<deryldoucette> Exactly
<davidcelis> for instance, i may be a ruby developer, but i'm utterly worthless!
<davidcelis> just don't tell my employers
sgronblom has joined #ruby
<seanstickle> Ha
<davidcelis> they haven't figured that out yet
<deryldoucette> Hehe
codora has quit [Quit: Heaven is not a place, it's being with people who love you.]
bozhidar has joined #ruby
cascalheira has quit [Quit: Linkinus - http://linkinus.com]
<fowl> this is #RUBY. there will be at least 20 minutes of philosophizing before anything gets done
bozhidar has quit [Remote host closed the connection]
<deryldoucette> Woot
<fowl> get back to meditating!
mikepack has quit [Remote host closed the connection]
<zaargy> that doesn't sound like ruby
<deryldoucette> The koans, the koans!
<zaargy> ruby is hack it til it works
<jezebel> i feel like i expected chat in this room to be alot more active
Maniacal has quit [Remote host closed the connection]
<jezebel> considering how there are 500+ people in here
<seanstickle> jezebel: judge not from numbers, for they will lead you astray
<jezebel> thats a good point
<deryldoucette> This and #RUBY-lang tend to keep the channel focused. And the channel has people from all over the world. Most are either working ir sleeping probably
jezebel has left #ruby [#ruby]
mbriggs has quit [Remote host closed the connection]
opus has joined #ruby
jrist is now known as jrist-afk
HRabbit has joined #ruby
SneakySeal has quit [Ping timeout: 245 seconds]
chclto has quit [Read error: Connection reset by peer]
baroquebobcat has quit [Quit: baroquebobcat]
<Spooner> davidcelis : And I thought I was the only one (worthless dev) :D
thecreators has quit [Quit: thecreators]
shadda has joined #ruby
banisterfiend has quit [Remote host closed the connection]
piotr_ has quit [Ping timeout: 246 seconds]
SCommette has joined #ruby
SCommette has quit [Client Quit]
brdude has joined #ruby
mneorr1 has quit [Quit: Leaving.]
chussenot has quit [Quit: chussenot]
w400z has quit [Quit: Computer has gone to sleep.]
specialGuest has quit [Remote host closed the connection]
mucker has quit [Read error: Connection reset by peer]
faen has quit [Ping timeout: 246 seconds]
kuzushi has joined #ruby
S1kx has joined #ruby
justsee has joined #ruby