fflush changed the topic of #ruby to: Ruby 1.9.3-p194: http://ruby-lang.org || Paste > 3 lines of text on pastebin.com
<Axsuul> bricker88: in rails with activesupport, i do default_options = { ... }
<Axsuul> bricker88: options.reverse_merge!(default_options)
<bricker88> Yes, I generally like to use reverse_merge, because it seems most concise
gavit has quit [Read error: Connection timed out]
bricker88 has quit [Quit: Leaving.]
shiki has quit [Remote host closed the connection]
gavit has joined #ruby
Liothen_ has joined #ruby
iamjarvo has joined #ruby
tommyvYo has joined #ruby
tommyvYo has joined #ruby
tommyvYo has quit [Changing host]
recycle has joined #ruby
Juul has joined #ruby
nari has quit [Ping timeout: 240 seconds]
Liothen has quit [Ping timeout: 260 seconds]
brianpWins has quit [Quit: brianpWins]
opus has quit [Quit:]
mssola has quit [Quit: Konversation terminated!]
bluebie has joined #ruby
kenichi has quit [Remote host closed the connection]
deo has joined #ruby
butblack has joined #ruby
<adeponte> Hey all. I have a ruby file with a bunch of top level defined classes and modules defined in a file called foo.rb. I want to encapsulate all the things defined in that file without editing that file. Is there a way I can take a require that file inside a module in another file to scope all those classes to that containing module?
<adeponte> I tried to do a straight require of foo.rb inside the containing module and that didn't seem to scope it.
banisterfiend has quit [Remote host closed the connection]
<Axsuul> encapsulate?
<Axsuul> do you just want to require that file?
<Axsuul> if so, you need require_relative
banisterfiend has joined #ruby
ryan0x2 has quit [Remote host closed the connection]
graspee has quit [Quit: leaving]
davidcelis has joined #ruby
nwest has joined #ruby
Patteh has joined #ruby
shadoi has joined #ruby
chessguy has joined #ruby
andrewhl has joined #ruby
ianbrandt has quit [Quit: ianbrandt]
banisterfiend has quit [Ping timeout: 244 seconds]
krusty_ar has quit [Read error: Connection reset by peer]
havenn has quit [Remote host closed the connection]
havenn has joined #ruby
havenn has quit [Read error: Connection reset by peer]
adamkittelson has quit [Remote host closed the connection]
havenn has joined #ruby
graspee has joined #ruby
Juul has quit [Ping timeout: 268 seconds]
robbyoconnor has quit [Read error: Connection reset by peer]
<adeponte> Axsuul: yeah, so I have a file foo.rb which has a bunch of classes defined in it Scope, Event, etc. Stuff that should be namespaced inside a module but isn't
<Axsuul> adeponte: do you have pseudo code you can show
<Axsuul> or just any code
<adeponte> Axsuul: let me get you a pastie real quick
havenn has quit [Ping timeout: 260 seconds]
Synthead has quit [Quit: p33 ba115]
gavit has quit [Read error: Connection timed out]
<adeponte> Axsuul: https://gist.github.com/3420747 that is the file that I want to include inside of a module some how. Note: It has its own requires at the top. I am not sure if that is a problem
phinfonet has quit [Quit: Linkinus - http://linkinus.com]
gavit has joined #ruby
<adeponte> Axsuul: this is basically how I want it to act but I don't want to have to change the event_types.rb file https://gist.github.com/3420782
GoldenCider has joined #ruby
Bosox20051 has joined #ruby
<fowl> o my
<Axsuul> adeponte: ah yea you can do that, i forgot what the command was
sebicas has joined #ruby
ninegrid has joined #ruby
<Axsuul> lemme try to remember
<adeponte> Axsuul: ok, thx
<adeponte> Axsuul: https://gist.github.com/3420790 is what I tried and didn't work
<bluebie> Oh my god lady is pregnant! :O
andrewhl has quit [Remote host closed the connection]
* bluebie thinks this is relevent because it was a shoes program which introduced bluebie to adventure time
Bosox20051 has quit [Remote host closed the connection]
robbyoconnor has joined #ruby
<fowl> bluebie: lady rainicorn is pregnant???
<bluebie> YEAH!
liluo has joined #ruby
<bluebie> latest AT episode!
<lectrick> Why is singleton_method not defined? Like how do I do String.singleton_method(:try_convert)
ephemerian has left #ruby [#ruby]
* fowl hopes the whole episode is about abstinence
Patteh has quit []
<bluebie> Princess Bubblegum is so awesome
<lectrick> Or is that the same as String.method(:try_convert)
<adeponte> Axsuul: is it possbily eval() or module_eval()?
<fowl> lectrick: you dont need it
<fowl> lectrick: String.send(:try_convert)
<lectrick> I want to get a handle on the method tho, as an object
Juul has joined #ruby
<fowl> oh
<lectrick> Like I can do String.method(:try_convert) but I want to make sure I get the class method and not any instance methods with the same name
<fowl> string.method(:try_convert)
<fowl> lectrick: #method gets the method bound to the object, so to get one bound to an instance you would call it on an instance
<fowl> or you could rebind it
<lectrick> ah ok.
<fowl> indeed :>
beneggett has quit [Ping timeout: 240 seconds]
<bluebie> ruby needs more psuedoanonymous blogs imo
<fowl> lectrick: also String.instance_method(:match) will get an unbound instance method
<lectrick> thanks. having some fun playing with these :)
khakimov has joined #ruby
<lectrick> I'll show my unholy baby soon
headius has quit [Quit: headius]
butblack has quit [Quit: butblack]
graft has quit [Ping timeout: 240 seconds]
butblack has joined #ruby
elaptics is now known as elaptics`away
elaptics`away is now known as elaptics
t44393 has quit [Remote host closed the connection]
t970 has joined #ruby
jwmann has quit [Read error: Connection reset by peer]
Bauer1 has quit [Ping timeout: 268 seconds]
shiki has joined #ruby
chessguy has quit [Remote host closed the connection]
jwmann has joined #ruby
Bauer1 has joined #ruby
jwmann has quit [Max SendQ exceeded]
drago757 has joined #ruby
jwmann has joined #ruby
jwmann has quit [Max SendQ exceeded]
<Axsuul> adeponte: damn it i cant find it
brianpWins has joined #ruby
<adeponte> Axsuul: I just found out there is an option to load('file', true)
<adeponte> Axsuul: which wraps it in an anonymous module. I don't see a way to get access to the anonymous module though
<adeponte> Axsuul: It seems also like there is a lib somewhere online called Script.load() which seems to do what I want
gavit has quit [Read error: Connection timed out]
<adeponte> Axsuul: Script is a horrible name
jonathanwallace has quit [Read error: Connection reset by peer]
jonathanwallace has joined #ruby
gavit has joined #ruby
<Axsuul> adeponte: haha lemme kno whow it goes
macmartine has joined #ruby
IrishGringo has quit [Quit: ChatZilla 0.9.88.2 [Firefox 14.0.1/20120713134347]]
`damien has quit [Quit: `damien]
Bosox20051 has joined #ruby
chessguy has joined #ruby
tomsthumb_ has joined #ruby
cakehero has joined #ruby
itcharlie has joined #ruby
mrsolo has quit [Quit: Leaving]
ngoldman has quit [Remote host closed the connection]
ngoldman has joined #ruby
schleppy has quit [Quit: Leaving.]
ninegrid has quit [Quit: leaving]
emmanuelux has joined #ruby
opus has joined #ruby
sterex has quit [Quit: sterex]
<Spooner> Axsuul : Eval works fine for me: https://gist.github.com/3420977
Bauer1 has quit [Ping timeout: 244 seconds]
liluo has quit [Remote host closed the connection]
<Spooner> load/require will do it at the top scope, regardless of where they are called.
ngoldman has quit [Ping timeout: 240 seconds]
sdwrage has joined #ruby
luckyruby has joined #ruby
elaptics is now known as elaptics`away
beneggett has joined #ruby
SCommette has quit [Quit: SCommette]
recycle has quit [Remote host closed the connection]
<lectrick> fowl: Any idea about this one? https://gist.github.com/6227c14e6f631e6944d7
itnomad has quit [Quit: Leaving]
<bluebie> lectrick: why not just klass.class.define_method(cm) do… end ?
andrewh has joined #ruby
<lectrick> bluebie: heh that would probably work! will try hold on
gavit has quit [Read error: Connection timed out]
Nanuq has quit [Ping timeout: 245 seconds]
<lectrick> bluebie: wait why klass.class and not just klass.define_method ?
gavit has joined #ruby
SCommette has joined #ruby
<fowl> lectrick: klass.define_singleton_method
<lectrick> klass is already a class of Class (oh dear i'm comfy with the rabbit hole)
nazty has joined #ruby
<Spooner> Because you were using define_method on the singleton class of klass
<bluebie> oh okay
<bluebie> that then
<bluebie> whatever
nazty has quit [Client Quit]
<bluebie> to the pry! do science to it!
<lectrick> lol
<lectrick> fowl: ah i like that better I think
<savage-_> omglol
niklasb has quit [Ping timeout: 252 seconds]
<fowl> lectrick: because your locals arent available when you enter a class block
deo has quit [Quit: Leaving]
<lectrick> fowl: ok
g_rotbart has quit [Remote host closed the connection]
chessguy has quit [Remote host closed the connection]
mmitchel_ has quit [Remote host closed the connection]
<bluebie> what animals are cool?
<Spooner> Fridges.
<bluebie> not animals
<Spooner> So you say.
<bluebie> cats and squirrels and bats and giraffes are all pretty cool
<bluebie> I wonder what else
SCommette has quit [Client Quit]
<bluebie> are dogs cool? I don't know
<bluebie> foxes are
<Spooner> You didn't say that I couldn't Fridge.include Animal
<oddmunds> Sloths are cool sometimes
<bluebie> ah yeah sloths!
<bluebie> thanks oddmunds!
infinitiguy has joined #ruby
<oddmunds> sure
<Axsuul> Spooner: awesome
<oddmunds> some sloths are not so cool, though http://mudfooted.com/sloth-weird-behaviour-toilet-eating/
<bluebie> mmm lots of animals eat poop tho
aantix has quit [Quit: aantix]
tomsthumb_ has quit [Quit: Leaving.]
<oddmunds> Here comes Johnny!
<bluebie> eew
<bluebie> yeah that's not nice
<fowl> haha
<bluebie> you know what's cooler than a fox? arctic foxes
<fowl> i wonder how a sloth would react to a water hose
chessguy has joined #ruby
beneggett has quit [Quit: Computer has gone to sleep.]
<oddmunds> fowl: slowly
randomautomator has quit [Remote host closed the connection]
verto is now known as verto|off
jromine has joined #ruby
aers has joined #ruby
chimkan has joined #ruby
shadoi has quit [Quit: Leaving.]
Vert has quit [Remote host closed the connection]
gavit has quit [Read error: Connection timed out]
gavit has joined #ruby
iori has joined #ruby
ringotwo has quit [Remote host closed the connection]
Banistergalaxy has quit [Ping timeout: 268 seconds]
savage-_ has quit [Ping timeout: 265 seconds]
banisterfiend has joined #ruby
infinitiguy has quit [Quit: Leaving.]
mmitchel_ has joined #ruby
adamkittelson has joined #ruby
savage- has joined #ruby
adeponte has quit [Remote host closed the connection]
pdtpatrick has quit [Quit: pdtpatrick]
Dr4g_ is now known as Dr4g|sleep
adeponte has joined #ruby
jromine` has quit [Remote host closed the connection]
jromine has quit [Remote host closed the connection]
liluo has joined #ruby
cakehero has quit [Quit: Computer has gone to sleep.]
mrdodo has quit [Remote host closed the connection]
savage- has quit [Remote host closed the connection]
jenrzzz has quit [Ping timeout: 240 seconds]
wallerdev has quit [Quit: wallerdev]
wallerdev has joined #ruby
<banisterfiend> wallerdev: sup wally
<wallerdev> not a lot
adeponte has quit [Ping timeout: 245 seconds]
flexoid has quit [Quit: Ухожу я от вас (xchat 2.4.5 или старше)]
<wallerdev> doing some laundry so im kinda in and out
<wallerdev> u?
havenn has joined #ruby
<banisterfiend> lunch
<wallerdev> cool cool
<wallerdev> what time is it there?
g_rotbart has joined #ruby
<wallerdev> u live in hawaii or somethin
<banisterfiend> nz
<banisterfiend> 120pm
<wallerdev> ah cool
Juul has quit [Ping timeout: 268 seconds]
t970 has quit [Remote host closed the connection]
t30325 has joined #ruby
Bauer1 has joined #ruby
seanstickle has joined #ruby
havenn has quit [Ping timeout: 272 seconds]
<banisterfiend> lectrick: ping
<lectrick> hey bebbe
<banisterfiend> lectrick: did you figure out how to use binding of caller
gavit has quit [Read error: Connection timed out]
<lectrick> skipped around it like red riding hood
<banisterfiend> ?
<lectrick> don't need it
gavit has joined #ruby
<banisterfiend> ok, did u try it though?
<banisterfiend> lectrick: afaik there's only one library that makes good use of boc :)
cakehero has joined #ruby
<banisterfiend> it's a shame
Matt__ has quit [Ping timeout: 260 seconds]
TandemAdam has joined #ruby
<chare> What exactly would be the purpose of Nginx in the context of Rails, when "rails server" seems to do everything you need
specialGuest has quit [Ping timeout: 244 seconds]
yaymukund has quit [Ping timeout: 245 seconds]
Hanmac1 has joined #ruby
<lectrick> How do I manually define a class inheritable attribute?
alvaro_o has quit [Quit: Ex-Chat]
<lectrick> Or is that going to be a pain
<wallerdev> chare: might want to ask in #rubyonrails
<banisterfiend> lectrick: what do u mean
<banisterfiend> lectrick: you probably want to use the inherited() hook
<wallerdev> but nginx can serve static assets and cached things like images or files much faster than going through a ruby server
pskosinski has quit [Quit: http://www.redeclipse.net -- Fast-paced online FPS]
<lectrick> banisterfiend: ah. yeah i just want an attribute at the class level that can be seen by any inheritors
apok has quit [Ping timeout: 240 seconds]
<banisterfiend> lectrick: by 'attribute' you mean just a class instance variable right?
Hanmac has quit [Ping timeout: 245 seconds]
<lectrick> banisterfiend: yes, that would be one example, but I believe those can only be seen by that class
krz has quit [Quit: krz]
Liothen_ has quit [Read error: Connection reset by peer]
sazboom has joined #ruby
<banisterfiend> lectrick: Yeah, which is why you'd use the inherited() hook to fake its inheritance to subclasses
<banisterfiend> lectrick: or are oyu thinking of @@ivars?
Cache_Money has joined #ruby
aers has quit [Quit: aers]
Liothen has joined #ruby
khakimov has quit [Quit: Computer has gone to sleep.]
alfplayer has joined #ruby
nari has joined #ruby
<banisterfiend> the word 'attribute' is so vague in ruby ;)
alfplayer has left #ruby ["WeeChat 0.3.8"]
alfplayer has joined #ruby
Bosma has joined #ruby
pdtpatrick has joined #ruby
f3ttX] has quit [Remote host closed the connection]
tectonic has quit [Quit: ZNC - http://znc.in]
locriani has quit [Remote host closed the connection]
pdtpatrick has quit [Client Quit]
Fezzler has joined #ruby
Jay_Levitt has quit [Quit: Jay_Levitt]
voodoofish430 has quit [Quit: Leaving.]
mrdodo has joined #ruby
tectonic has joined #ruby
Fezzler has quit [Client Quit]
jellosea has left #ruby [#ruby]
gavit has quit [Read error: Connection timed out]
kvirani has quit [Remote host closed the connection]
gavit has joined #ruby
meoblast001 has quit [Quit: Leaving]
Squee- has joined #ruby
gavit has quit [Read error: Connection reset by peer]
<Squee-> Hey guys, i'm learning ruby
<wallerdev> woot
gavit has joined #ruby
<Squee-> For one of my starter projects, i want to find if a file exists named xfile on my box the save the location of that file, any ideas?
<Squee-> i thought maybe using find / | grep filename
Araxia has joined #ruby
Araxia has quit [Client Quit]
<wallerdev> are you talking about doing that with ruby?
<wallerdev> or with the find command
<Squee-> wallerdev, With ruby
<Squee-> i was thinking of just using the find command and then using regex in ruby
<wallerdev> oh ok
<wallerdev> yeah thats one way to do it
<Squee-> Would this be the best way?
<Squee-> How would you do it?
<Seich> Squee-: you can use something like Dir.foreach('path') do |f| end
<Squee-> Im just writing a small file to check for certain files, update them, etc.
emmanuelux has quit [Ping timeout: 240 seconds]
<wallerdev> might want to use the find module
shadoi has joined #ruby
locriani has joined #ruby
locriani has joined #ruby
locriani has quit [Changing host]
eko has joined #ruby
<Squee-> Yea, just found find
<Squee-> How do i install modules with ruby?
shadoi1 has joined #ruby
<Seich> find comes by default
<Squee-> is there some kind of thing like easy_install? or CPAN/
shadoi has quit [Read error: Connection reset by peer]
<wallerdev> find is included in the stdlib
<wallerdev> so you would just do require 'find'
<Cache_Money> Are there any algorithms (Beyond just a 'word count') that I can run on a list of terms (1 to many words) with a corresponding weighted-value ?
<Squee-> Sorry if i sound like an idiot
<wallerdev> but rubygems is the main tool used to install libraries
<Squee-> i'm just reading perl code and learning the basics
<Seich> Squee-: take a look at ruby gems
thomas is now known as woman
<Squee-> i learn faster by example
<Cache_Money> I've heard of MapReduce but wanted to see if there was anything similar in ruby...
locriani_ has joined #ruby
locriani has quit [Read error: Connection reset by peer]
woman is now known as thomas
<Squee-> Damn, this laptop is fucked
<wallerdev> Cache_Money: not really sure what you're asking, how do you want them weighted?
<Squee-> have to pkill Chrome all the time
<Squee-> it just hangs up
abahkaiyisah has joined #ruby
<Squee-> I wish i had a cache of money..
<wallerdev> dont we all :p
mrdodo has quit [Remote host closed the connection]
circlicious has joined #ruby
<circlicious> how do i .each to get both array element and index in the block?
<banisterfiend> circlicious: each_with_index
<circlicious> thanks bai
<circlicious> banisterfiend:
headius has joined #ruby
c0rn_ has quit [Quit: Computer has gone to sleep.]
<Cache_Money> wallerdev: They are already weighted. However, the same concept might be represented in multiple ways. For example, the Thanksgiving dish 'yams' might be listed along with 'sweet potatoes' but it's the same type of dish.
<Cache_Money> Not to mention having to deal with singular/plural differences
<bluebie> his favourite thing is nyan cat
<bluebie> he can recite it from memory by tapping it out through his feet as little voltages if you sit him on top of something piezoelectric like a quartz crystal!
<wallerdev> lol
<wallerdev> interesting
<bluebie> ruby helped teach him nyan cat's song, by reading in a midi version and explaining it more simply to his little mind (which can't run ruby, sadly)
gavit has quit [Read error: Connection timed out]
gavit has joined #ruby
Matt_ has joined #ruby
Matt_ is now known as Guest93953
cousine has quit [Remote host closed the connection]
g_rotbart has quit [Read error: Connection reset by peer]
<lectrick> How do I alias a class method without using class << self ?
<wallerdev> you could use class_eval
<abahkaiyisah> hi all goodmorning
maletor has quit [Quit: Computer has gone to sleep.]
<wallerdev> morning
uris has joined #ruby
<fowl> lectrick: this is the last one you get for free: String.instance_eval do alias f try_convert end
<lectrick> wallerdev: banisterfiend: I tried this: String.respond_to?(:try_convert) #=> true. OK so String.class_eval{ alias_method :whatever, :try_convert } ... fail
<lectrick> ah shit you're right
<lectrick> fowl: beer++
coyo has joined #ruby
<banisterfiend> fowl rules
<banisterfiend> differences between instance_eval and class_eval are a bit subtle
<lectrick> fowl: banisterfiend: it's still failing
mahmoudimus has quit [Quit: Computer has gone to sleep.]
<wallerdev> String.class_eval{ alias :whatever :upcase }
<wallerdev> "apple".whatever #=> "APPLE"
g_rotbart has joined #ruby
<wallerdev> or am i missing something
<lectrick> is it possible that alias works but not alias_method ?
<fowl> lectrick: i remember it like this, class_eval will run as if you called class, if you want the metaclass you dont have to eval stuff to define methods on class, def String.myClassMethod() :WHOO end
<banisterfiend> wallerdev: he said a class method
<wallerdev> oh my bad
<banisterfiend> wallerdev: that aliases an *instance* method
<lectrick> String.instance_eval do alias_method :f, :try_convert end # definitely fails, but alias by itself works
<banisterfiend> lectrick: yes it's possible, it's the truth
<banisterfiend> lectrick: alias will work inside instance_eval to alias a class method, but alias_method will only alias instance methods
<banisterfiend> that's why i said teh differences between class_eval and instance_eval were subtle
<lectrick> interesting and subtle
g_rotbart has quit [Remote host closed the connection]
Bosox20051 has quit [Quit: Leaving]
<banisterfiend> but no issue for fowl, that's why he's up there
<banisterfiend> and you're down there
<banisterfiend> ;)
<fowl> lol
Guest93953 has quit [Ping timeout: 244 seconds]
g_rotbart has joined #ruby
<lectrick> well we have an additional problem. i'm trying to do it dynamically so alias_method "_original_#{cm}", cm
<lectrick> banisterfiend: ^
<banisterfiend> lectrick: best to use Method / UnboundMethod objects for that anyway
<lectrick> i don't think i can alias a computed value
<banisterfiend> aliasing methods to do decoration is yucky
<lectrick> well this is stab 1. I can pretty it up in stab 2
<banisterfiend> lectrick: if you open the metaclass you can do that
<banisterfiend> you have to open the metaclass because you need the 'self' to be the metaclass
<lectrick> banisterfiend: I've tried class << klass to open the metaclass but then it doesn't know what 'cm' is
sepp2k has quit [Ping timeout: 260 seconds]
<banisterfiend> instance_eval can't help with that
<banisterfiend> lectrick: then use a closure
<lectrick> explain?
<circlicious> can someone help me with https://gist.github.com/f79edecc80baabae1564 ?
<banisterfiend> lectrick: class << klass; self; end.class_eval { }
wpaulson has joined #ruby
<fowl> instance_eval should be able to
<fowl> why not banister if you're sending a block
<banisterfiend> fowl: cos the 'self' with an instance_eval is still the class
<banisterfiend> but he needs the self to be the metaclass
ringotwo has joined #ruby
cantonic has quit [Quit: cantonic]
<lectrick> (self is already a class) cm="dynamic"; (class << self; self; end).instance_eval { alias_method "_original_#{cm}", cm } ... no workie
<lectrick> undefined method `try_convert' for class `Class' (NameError)
<fowl> >> cm="dynamic"; (class << self; self; end).instance_eval { alias_method "_original_#{cm}", cm }
<al2o3cr> -e:1:in `eval': undefined method `dynamic' for class `Object' (NameError), from (eval):1:in `block in <main>', from (eval):1:in `instance_eval', from (eval):1:in `<main>', from -e:1:in `eval', from -e:1:in `<main>'
<banisterfiend> lectrick: at this point u need to gist some code
t30325 has quit [Remote host closed the connection]
t7373 has joined #ruby
<fowl> >> cm="dynamic"; (class << self; self; end).instance_eval { p self }
<al2o3cr> (Class) #<Class:#<Object:0x00000001baf7b0>>, Console: #<Class:#<Object:0x00000001baf7b0>>
<banisterfiend> lectrick: let me show u
<lectrick> fowl: ok so in this case cm was actually equal to :try_convert
Chryson has quit [Quit: Leaving]
<fowl> ok
<fowl> >> cm=:try_convert; String.instance_eval { alias_method "_original_#{cm}", cm }
<al2o3cr> -e:1:in `eval': undefined method `try_convert' for class `String' (NameError), from (eval):1:in `block in <main>', from (eval):1:in `instance_eval', from (eval):1:in `<main>', from -e:1:in `eval', from -e:1:in `<main>'
<lectrick> >> cm=:try_convert; (class << String; self; end).instance_eval { alias_method "_original_#{cm}", cm }
<al2o3cr> (Class) #<Class:String>
arvidkahl has quit [Quit: arvidkahl]
<fowl> ah
dimensiOn has joined #ruby
<banisterfiend> lectrick: fowl: https://gist.github.com/3421623
<iamjarvo> i am trying to wrap my head around the definition of a singleton class on a class itself like this http://pastie.org/private/czqgxen2jsyqiy4cgumbdw is method basically a class method?
locriani_ has quit [Quit: Leaving...]
locriani has joined #ruby
locriani has joined #ruby
locriani has quit [Changing host]
<fowl> iamjarvo: yes
<fowl> iamjarvo: same as doing class Klass; def self.method()
<iamjarvo> fowl: thanks, wanted to make sure
<banisterfiend> lectrick: ok?
<iamjarvo> is there a reason someone would do that?
<fowl> for methods at least, class << Klass puts you in the scope (similar to a matrix)
tomsthumb_ has joined #ruby
<lectrick> banisterfiend: yeah, trying to wrap head around/play with it, gimme a sec and thank you in advance
<iamjarvo> but if self.method is the same thing and much clearer
<fowl> a.) different strokes for different folks, b.) written by japs, expect crazyness :p
<iamjarvo> lol
<banisterfiend> iamjarvo: because u can do stuff inside there
<banisterfiend> iamjarvo: like alias methods, and so on. The difference is that the 'self' is the metaclass
<banisterfiend> when you do: def self.method(); end the 'self' is still just the class
wpaulson_ has joined #ruby
jasonkuhrt has joined #ruby
mrdodo has joined #ruby
wpaulson has quit [Read error: Connection reset by peer]
wpaulson_ is now known as wpaulson
<coyo> question, is ruby fast enough for major games? or should i use ruby for scripting only?
<seanstickle> coyo: yes
<coyo> seanstickle: really? o:
<coyo> cool!
<coyo> wait. that was a math answer.
<coyo> :P
<coyo> games or scripts?
<Spooner> coyo : Look at gosu (and the answer is "it depends on what you expect").
<coyo> Spooner: thank you. so "it depends"
sepp2k has joined #ruby
<seanstickle> Everything does.
<coyo> i dont mind linking to native libraries for what i want to do, especially opengl, openal, and whatno.
<coyo> *whatnot
<Spooner> coyo : The one thing is that the CRuby garbage collector is going to be a pain.
<coyo> Spooner: is rubinius stable enough to use in game development?
<Spooner> You don't need to. Gosu uses opengl/openal itself.
<coyo> looking at gosu
<Cache_Money> coyo: what kind of games are you developing?
<Spooner> coyo : No idea. JRuby is a possibility and use something like slick http://www.rubyinside.com/video-game-ruby-tutorial-5726.html
<coyo> i'm actually thinking of developing an MMORPG physics game engine/middleware
<seanstickle> Fun!
havenn has joined #ruby
andrewhl has joined #ruby
<Cache_Money> sounds interesting... what's the theme?
wpaulson has quit [Quit: Colloquy for iPhone - http://colloquy.mobi]
<headius> there's several graphics library wrappers for JVM that work in JRuby
<Spooner> coyo : I do a lot of game dev on Ruby, because I'm a mascochist. Mainly been building Ashton (Gosu extension with new shiny OpenGL stuff like shaders) recently.
gavit has quit [Read error: Connection timed out]
<coyo> Spooner: so it appears XD also, COOL!
<coyo> so it CAN be done!
brianpWins_ has joined #ruby
macmartine has quit [Quit: ["Textual IRC Client: www.textualapp.com"]]
<coyo> ruby is pretty popular, so i figure if i can build a relatively high performance game engine for rubyists, it would be a welcome addition.
gavit has joined #ruby
<banisterfiend> coyo: ruby already has a high performance game engine :)
brianpWins has quit [Ping timeout: 244 seconds]
brianpWins_ is now known as brianpWins
<coyo> banisterfiend: oh? i think you may have mentioned it before, but i forgot. what is it?
<banisterfiend> coyo: well it depends what u mean by 'engine' i guess, but 'gosu' and 'chingu' and 'gamebox' come to mind
<coyo> okay.
<coyo> looking at them.
yaymukund has joined #ruby
<Spooner> Gosu is relatively high performance, but it is limited (e.g. no thought of shaders). People just don't have that much interest in Ruby as a game-making langauge. As I say, the garbage collector will punish you :)
<banisterfiend> also check out Ray
Z_Mass has joined #ruby
zach_ has joined #ruby
mxbtty has quit [Quit: Leaving.]
zach_ is now known as Guest62986
<Spooner> coyo #gosu #gamebox are the only other channels I'm aware of that might interest you.
<coyo> thank you, Spooner
<Spooner> And screenies/videos of my Ruby (Gosu and Ray) games here: http://spooner.github.com/games/
jarred has joined #ruby
<Spooner> So you know what is within grasp :D
<coyo> ;D
Guest62986 has quit [Client Quit]
radic has quit [Disconnected by services]
radic_ has joined #ruby
radic_ is now known as radic
jasonkuhrt has quit [Quit: Linkinus - http://linkinus.com]
DarthGandalf has quit [Ping timeout: 260 seconds]
DarthGandalf has joined #ruby
insecurlex has joined #ruby
Tomasso has quit [Ping timeout: 272 seconds]
<headius> ideally most of your perf is going to be bound up in the graphics library, but if you'd doing a lot of heavy logic in ruby you'll want a fast one
t7373 has quit [Remote host closed the connection]
t82885 has joined #ruby
kpshek has joined #ruby
kpshek has quit [Client Quit]
Chryson has joined #ruby
dimensiOn has left #ruby [#ruby]
<Spooner> headius : Absolutely. Rendering 10k quads is quick. Managing 100 objects (e.g. moving things aroudn the screen and dealing with animation and such) gets slow :(
uris has quit [Quit: leaving]
BadQuanta has joined #ruby
Spooner has quit []
<BadQuanta> Hello all. :)
gavit has quit [Read error: Connection timed out]
<Cache_Money> Spooner: Sweet game! Alpha Channel is awesome
tomkersten has joined #ruby
banisterfiend has quit [Remote host closed the connection]
gavit has joined #ruby
banisterfiend has joined #ruby
banghouse has quit [Remote host closed the connection]
banisterfiend has quit [Read error: Connection reset by peer]
tomkersten has left #ruby [#ruby]
banisterfiend has joined #ruby
brianpWins has quit [Quit: brianpWins]
opus has quit [Quit:]
<coyo> headius: okay.
tomkersten has joined #ruby
banisterfiend` has joined #ruby
tomkersten has left #ruby [#ruby]
<coyo> i wish there were more OpenXL style libraries
yosafbridge has quit [Ping timeout: 240 seconds]
chimkan has quit [Quit: chimkan]
Bosma has quit [Ping timeout: 272 seconds]
mephux has quit [Quit: w0ots...]
Musfuut has quit [Ping timeout: 250 seconds]
mephux has joined #ruby
banisterfiend has quit [Ping timeout: 245 seconds]
yosafbridge has joined #ruby
Musfuut has joined #ruby
Musfuut is now known as Guest78690
wvms has quit [Read error: Connection reset by peer]
wvms has joined #ruby
adeponte has joined #ruby
nobitanobi has joined #ruby
nobitanobi has quit [Read error: Connection reset by peer]
hadees has joined #ruby
nobitanobi has joined #ruby
<nobitanobi> If I want to raise an error if some instance variables are nil, which type of error should I do?
arvidkahl has joined #ruby
nwest has quit [Quit: Textual IRC Client: http://www.textualapp.com/]
gavit has quit [Read error: Connection timed out]
gavit has joined #ruby
Aphelion has joined #ruby
ttilley has quit [Read error: Connection reset by peer]
mahmoudimus has joined #ruby
nobitanobi has quit [Read error: Connection reset by peer]
schleppy has joined #ruby
nobitanobi has joined #ruby
t82885 has quit [Remote host closed the connection]
t1053 has joined #ruby
havenn has quit [Remote host closed the connection]
nobitanobi has quit [Read error: Connection reset by peer]
butblack has quit [Quit: butblack]
nobitanobi has joined #ruby
bwlang has joined #ruby
GoGoGarrett has quit [Remote host closed the connection]
t-mart has quit [Ping timeout: 260 seconds]
beneggett has joined #ruby
Guedes has quit [Quit: Saindo]
mahmoudimus has quit [Quit: Computer has gone to sleep.]
Nanuq has joined #ruby
ryanf has joined #ruby
locriani has quit [Remote host closed the connection]
headius has quit [Quit: headius]
ananthakumaran has joined #ruby
nobitanobi has quit [Read error: Connection reset by peer]
arvidkahl has quit [Quit: arvidkahl]
nobitanobi has joined #ruby
gavit has quit [Read error: Connection timed out]
cid404 has quit [Ping timeout: 252 seconds]
gavit has joined #ruby
a_a_g has joined #ruby
sazboom has quit [Ping timeout: 246 seconds]
mahmoudimus has joined #ruby
M- has quit [Read error: Connection reset by peer]
nobitanobi has quit [Read error: Connection reset by peer]
M- has joined #ruby
nobitanobi has joined #ruby
SirFunk_ has quit [Read error: Connection timed out]
k_89 has joined #ruby
SirFunk has joined #ruby
mahmoudimus has quit [Client Quit]
maletor has joined #ruby
macmartine has joined #ruby
Matt_ has joined #ruby
headius has joined #ruby
havenn has joined #ruby
Matt_ is now known as Guest95735
ringotwo has quit [Remote host closed the connection]
headius has quit [Client Quit]
yosafbridge has quit [Ping timeout: 260 seconds]
Kichael has joined #ruby
Tref has joined #ruby
Araxia has joined #ruby
nobitanobi has quit [Read error: Connection reset by peer]
yosafbridge has joined #ruby
t1053 has quit [Remote host closed the connection]
nobitanobi has joined #ruby
t17892 has joined #ruby
<maletor> Why am I seeing GC collection take 200 seconds on some requests to my web applicaiton?
n_blownapart has joined #ruby
havenn has quit [Ping timeout: 240 seconds]
gavit has quit [Read error: Operation timed out]
eywu has quit [Read error: Operation timed out]
<bnagy> nobitanobi: if it's at initialize time maybe ArgumentError, if it's something weird that happens later then RuntimeError
<Axsuul> maletor: you dont have enough memory probably
<Axsuul> maletor: and you're using swap
gavit has joined #ruby
kn330 has quit [Remote host closed the connection]
<Axsuul> maletor: you can also tweak GC settings for ruby
reset has quit [Ping timeout: 244 seconds]
<maletor> not on heroku you can't
drago757 has quit [Quit: drago757]
<maletor> heroku will swap out memory
<maletor> is that likely the cause of slow gc execution?
<maletor> even 200 seconds?
<maletor> Axsuul:
<Axsuul> maletor: are you on the free heroku plan
<maletor> paid
mmitchel_ has quit [Remote host closed the connection]
mmitchell has joined #ruby
<maletor> Azure: why
<maletor> Axsuul: why
<Cache_Money> Spooner: Why won't my Local Scores store on ALphaChannel? All scores are erased after app is closed (which happens automatically after I die 3 times).
<Azure> Wha... oh.
<Axsuul> maletor: the paid heroku plan is slow as shit, that's why :) you gotta ask heroku why GC is taking that long, it's their system, but their support is top notch they should get back to you immediately
igotnolegs has joined #ruby
macmartine has quit [Quit: Computer has gone to sleep.]
<maletor> Axsuul: asking now
<n_blownapart> hi I have a basic question about method definition and using attr_reader : question pertains to line 6 , thanks: http://pastie.org/4565944
<n_blownapart> ^^ ps I hope banister_et.al isn't on....
seanstickle has quit [Quit: seanstickle]
<bnagy> and the question itself is...?
mmitchell has quit [Ping timeout: 272 seconds]
havenn has joined #ruby
jorge_ has quit [Remote host closed the connection]
JonnieCache|home has quit [Ping timeout: 252 seconds]
itcharlie has quit [Quit: Leaving]
<n_blownapart> bnagy: thanks the question is whether you use attr_reader or explicitly write the "method" on lines 6-8, is this technically a method? (the book refers to it as a method). Or is it more that you are ascribing a value that @number holds to c on line 11 ?
macmartine has joined #ruby
wvms has left #ruby [#ruby]
cj3kim has joined #ruby
<bnagy> attr_reader :foo is shorthand for def foo;@foo;end
<bnagy> c.number and just 'number' on line 11 are both method calls
maletor has quit [Quit: Computer has gone to sleep.]
<bnagy> the second one is actually self.number
<bnagy> but you protected that method, which conflicts with attr_reader
<n_blownapart> ok thanks bnagy but in terms of nomenclature, is that formally a method? It is very basic but crucial: I didn't know you could write a method using attr_ and friends...
c0rn_ has joined #ruby
JonnieCache|home has joined #ruby
aantix has joined #ruby
<n_blownapart> as for the protected method, banisterfiend had me do it this way: http://pastie.org/4553678 (line 14-15)
<bnagy> is what a method?
<bnagy> attr_reader is a method. both instances of number on line 11 are methods
<n_blownapart> bnagy: so attr_reader can "create" a method automatically?
<bnagy> yes except without the ""
<bnagy> go ahead and implement attr_reader yourself, it will help you understand
gavit has quit [Read error: Connection timed out]
TPFC-SYSTEM has joined #ruby
macmartine has quit [Read error: Connection reset by peer]
gavit has joined #ruby
d3vic3 has quit [Read error: Operation timed out]
<n_blownapart> bnagy: it was causing confusion. I thought you were essentially just creating a variable to ascribe values to objects...that you use the shortcut to create an assigning variable for a value.
arvidkahl has joined #ruby
chimkan_ has joined #ruby
cj3kim has left #ruby ["Leaving"]
<n_blownapart> ^^ like Person.name, for example . bnagy
<lectrick> How can I tell if my method was called from inside another method or inside a class definition?
<bnagy> lectrick: check out caller
<n_blownapart> so I guess on the right side of any dot operator must be a method...it is never considered just a value being ascribed? bnagy
locriani has joined #ruby
locriani has joined #ruby
locriani has quit [Changing host]
<iamjarvo> banisterfiend`: thanks
<bnagy> n_blownapart: more or less yes. obj.anything anything is a method
<bnagy> but also things like obj[3] .[] is a method. Etc.
d3vic3 has joined #ruby
<banisterfiend`> iamjarvo: I DIDNT DO ANYTHING
<n_blownapart> bnagy: ok thanks that fact got past the goalie. (yeah I understood the implicit dot with [] and .=== etc.) so why did you say that making it protected conflicts with attr_reader?
<iamjarvo> banisterfiend`: answered a question earlier about class << Klass
<bnagy> normally attr_reader defines standard instance methods
cj3kim has joined #ruby
<banisterfiend`> iamjarvo: 1 hour earlier?
<banisterfiend`> :)
<iamjarvo> yea haha
gmci has quit [Quit: Computer has gone to sleep.]
<n_blownapart> bnagy: but it works so it is not illegal, I guess...
nobitanobi has quit [Read error: Connection reset by peer]
nobitanobi has joined #ruby
gmci has joined #ruby
t17892 has quit [Remote host closed the connection]
t40002 has joined #ruby
cj3kim has quit [Client Quit]
meskyanichi has quit [Quit: Leaving...]
nullsign has quit [Quit: Lost terminal]
pricees has joined #ruby
nobitanobi has quit [Read error: Connection reset by peer]
nobitanobi has joined #ruby
mike4_ has quit [Remote host closed the connection]
dhruvasagar has joined #ruby
gavit has quit [Read error: Connection timed out]
gavit has joined #ruby
maletor has joined #ruby
savage- has joined #ruby
<n_blownapart> thanks very much bnagy
patient has quit [Quit: leaving]
mxbtty has joined #ruby
denstark has quit [Ping timeout: 246 seconds]
burgestrand has quit [Quit: Leaving.]
TandemAdam has quit [Quit: Leaving]
nobitanobi has quit [Read error: Connection reset by peer]
Cache_Money has quit [Ping timeout: 272 seconds]
nobitanobi has joined #ruby
bwlang has quit [Quit: bwlang]
Squee- has quit [Quit: This computer has gone to sleep]
luxurymode has joined #ruby
denstark has joined #ruby
pingfloyd has joined #ruby
pingfloyd has quit [Changing host]
pingfloyd has joined #ruby
Guest95735 has quit [Ping timeout: 260 seconds]
yasushi has joined #ruby
ringotwo has joined #ruby
Pentacles has joined #ruby
yaymukund has quit [Quit: leaving]
nobitanobi has quit [Read error: Connection reset by peer]
nobitanobi has joined #ruby
nobitanobi has quit [Client Quit]
maletor has quit [Quit: Computer has gone to sleep.]
gavit has quit [Read error: Connection timed out]
Pentacles is now known as Squee-
gavit has joined #ruby
dhruvasagar has quit [Remote host closed the connection]
k_89 has quit [Quit: Leaving]
rump has quit [Quit: rump]
sdwrage has quit [Ping timeout: 268 seconds]
havenn has quit [Remote host closed the connection]
reset has joined #ruby
n_blownapart has quit [Remote host closed the connection]
denstark has quit [Read error: Operation timed out]
reset has quit [Client Quit]
apok has joined #ruby
banisterfiend` has quit [Read error: Connection reset by peer]
Zespre_ has joined #ruby
Zespre has quit [Ping timeout: 245 seconds]
ananthakumaran has quit [Quit: Leaving.]
reset has joined #ruby
reset has quit [Client Quit]
havenn has joined #ruby
apok has quit [Quit: apok]
<quazimodo> if i have attributes foo, bar, zed and i also have a variable foo = "stuff", bar = "things", zed = "wow" is it possible to do something conceptually like attribute_name_to_variable(instance.foo) which will eval to "stuff"
banisterfiend has joined #ruby
<quazimodo> kinda using the attribute name and variable as a hash key
luxurymode has quit [Quit: Computer has gone to sleep.]
<Hanmac1> quazimodo instance.instance_variable_get("@#{name}")
Hanmac1 is now known as Hanmac
maletor has joined #ruby
<quazimodo> Hanmac: oh, how does that work?
yasushi has quit [Remote host closed the connection]
<Hanmac> OR: instance.send("foo")
chare has quit [Quit: Leaving]
eywu has joined #ruby
denstark has joined #ruby
jorge has joined #ruby
<quazimodo> variable_get("#{name}") might beit
<banisterfiend> quazimodo: u need the @
recycle has joined #ruby
<quazimodo> oh, k
jorge has quit [Ping timeout: 244 seconds]
xaxxon has joined #ruby
bricker88 has joined #ruby
<quazimodo> ok, so what If i did this in a simple scirpt
burgestrand has joined #ruby
gavit has quit [Read error: Connection timed out]
<quazimodo> mylist=['foo','bar','zed']; foo=1; bar=2; zed=3; mylist.each do |i|; some_variable_get_method("#{i}") ?
s1n4 has joined #ruby
<quazimodo> erm, with thi@
gavit has joined #ruby
<Hanmac> when you use attr_accessor or attr_reader you yould use send
<quazimodo> oh ok works :D
<quazimodo> so what do you do for non instance variables?
<quazimodo> like locally scoped ones
iamjarvo has quit [Ping timeout: 244 seconds]
arvidkahl has quit [Quit: arvidkahl]
<quazimodo> local_variables.something eh
banisterfiend has quit [Read error: Connection reset by peer]
<bnagy> the cleanest way would be to use eval
<bnagy> which is not clean
<bnagy> which means it's a bad design
burgestrand has quit [Ping timeout: 244 seconds]
<quazimodo> bnagy: oh?
<bnagy> mylist.map {|e| eval e}
denstark has quit [Ping timeout: 240 seconds]
<quazimodo> ok
<bnagy> [1,2,3]
<quazimodo> hrm ok
<quazimodo> its in my ruby seed.rb
<bnagy> hehehe eval e
<quazimodo> s/ruby/rails
ryanf has quit [Ping timeout: 240 seconds]
banisterfiend has joined #ruby
burgestrand has joined #ruby
pricees has quit [Quit: leaving]
abahkaiyisah has quit [Ping timeout: 245 seconds]
cakehero has quit [Quit: Computer has gone to sleep.]
<quazimodo> bnagy well lets just agree that it blows chunks (which I see it clearly does)
<quazimodo> and I'll steer right clear of that
gmci has quit [Quit: Computer has gone to sleep.]
<Hanmac> using a list of local variables and then use eval to get them looks like bad design
nirix has quit [Ping timeout: 260 seconds]
<quazimodo> Hanmac: yeah its just to populate the db with test data, tbh i got lazy
gmci has joined #ruby
denstark has joined #ruby
<Hanmac> "why did you not escape the user input?" - "i got lazy"
jarred has quit [Ping timeout: 268 seconds]
ibash has joined #ruby
<bluebie> o_o
brianpWins has joined #ruby
<bluebie> oh man quazimodo that's scary if you ever let anyone else maintain that code
ananthakumaran has joined #ruby
ibash has quit [Client Quit]
c0rn_ has quit [Quit: Computer has gone to sleep.]
hemanth has quit [Quit: Leaving]
macmartine has joined #ruby
ibash has joined #ruby
Tearan has quit [Quit: Sleepy Badger....]
ggreer has quit [Read error: Operation timed out]
<quazimodo> bluebie: oh no i'm still learning guys. I'll do it the way you guys suggest
AngryParsley has joined #ruby
jeff_sebring has quit [Quit: Leaving]
chimkan_ has quit [Quit: chimkan_]
<bluebie> It's okay ^_^
yxhuvud has joined #ruby
<quazimodo> is it normal to use case statements in ruby
<bluebie> you'd be surprised how bad people are about escaping user input!
<quazimodo> or is that looked at as being shitty
<bluebie> I owned my uni's security course's site with an xss vulnerability
circlicious has quit [Ping timeout: 246 seconds]
<bluebie> case are useful!
<bluebie> use them!
end3r- has quit [Ping timeout: 248 seconds]
<bluebie> case statements in ruby don't have the downsides and dangers of similar statements in other languages - they're really quite great
<quazimodo> so
andrewhl has quit [Remote host closed the connection]
<quazimodo> [myvar = ] case or myvar case ?
eywu has left #ruby [#ruby]
gavit has quit [Read error: Connection timed out]
machty has joined #ruby
<bluebie> varible = case
<quazimodo> gotcha
cid404 has joined #ruby
denstark has quit [Read error: Operation timed out]
<bluebie> if you want to assign the return value to a variable
gavit has joined #ruby
<bluebie> if you want to compare something with your when's you put the thing after 'case' to compare with (could be a variable)
<Hanmac> you could do an case without an case-statement .... case ;when ... works too but i DONT recomend that
<quazimodo> hrm
<bluebie> they're functionally pretty similar to if, elsif, else. They're just a neat syntax which lines everything up neatly if you need to do a bunch of things like that
chimkan has joined #ruby
<quazimodo> oh right, easy peasy
<banisterfiend> bluebie: not rly, case uses ===
c0rn_ has joined #ruby
<banisterfiend> so it behaves very differently in a bunch of cases
<quazimodo> hrm
<bluebie> banisterfiend: differently to what exactly?
<bluebie> ==?
<bluebie> if doesn't imply or encourage you to use any particular boolean operators
<banisterfiend> bluebie: well, if requires an expression to match again, case (in the common use) requires an object in each case that is matched against with ===
<bluebie> quazimodo: if you use case when stuff for comparisons (like case some_var; when 'foo'….) look in to the === operator - it's a bit like == but it does some extra stuff like evaluate regexes - that's what case uses instead of == when doing comparisons like that
a_a_g has quit [Quit: Leaving.]
DanielVartanov has joined #ruby
busybox42 has quit [Quit: Leaving.]
circlicious has joined #ruby
mohits has joined #ruby
mohits has joined #ruby
mohits has quit [Changing host]
<banisterfiend> quazimodo: you can do things like: x = 5; case x; when (1..10); puts "number is between 1 and 10"; end; end
<quazimodo> argh my emacs ruby mode is broken... tabbing is Mc Fucked
<quazimodo> banisterfiend, bluebie : ruby is ... ridiculous
<DanielVartanov> Guys, I have a question which has been driving me crazy for days. This famous gist: https://gist.github.com/3356675 (Haskell-like list comprehensions in Ruby). What does that "def -@" and "def +@" mean? What @ signs does? My head is at the point of blowing up, please help
<banisterfiend> quazimodo: y dat
gvz has joined #ruby
adamkittelson has quit [Remote host closed the connection]
<quazimodo> the sheer amount of syntax available for one
<bluebie> quazimodo: you don't have to use all of it o_o
<banisterfiend> quazimodo: like what
<bluebie> english has a lot of words
<bluebie> I don't use most of them!
<quazimodo> not syntax
<quazimodo> grammar
<quazimodo> the amount of grammar in ruby is scary for a humble python/lispy/c kinda guy
<Hanmac> DanielVaranov: its for the unary
<bluebie> use python if that's what makes you happy :)
<quazimodo> bluebie: rails project atm
<quazimodo> its ok ill learn ruby
<bluebie> oh company stuff?
<quazimodo> sorta
Gate has quit [Read error: Operation timed out]
<banisterfiend> quazimodo: what in particular do you find confusing
<banisterfiend> quazimodo: just that ruby has switch statemetns as well as if statemetns?
<banisterfiend> expressions*
<DanielVartanov> Hanmac: ha! so simple, and so strange I didn't know that. Thank you, dide!
gavit has quit [Read error: Connection reset by peer]
klaas has quit [Ping timeout: 246 seconds]
<Hanmac> >> defined?(-1) # is an expression
<al2o3cr> (String) "expression"
gavit has joined #ruby
<Hanmac> >> defined?(- 1) # is an method-call
<al2o3cr> (String) "method"
<banisterfiend> >> def hanmac; end; defined?(hanmac)
<quazimodo> banisterfiend: hehe well. For one I have no idea how to make this multiline bla.etc? ? thing1 : thing2
<al2o3cr> (String) "method"
denstark has joined #ruby
<quazimodo> what if thing1 and thing2 take lots of lines :/
<quazimodo> bla.etc? ? do ?
Takehiro has joined #ruby
<fowl> quazimodo: ternary arent meant to be multiline but you can continue a line if you put \ at the end
<quazimodo> i can if it
brianpWins has quit [Ping timeout: 256 seconds]
macmartine has quit [Quit: ["Textual IRC Client: www.textualapp.com"]]
<banisterfiend> quazimodo: just put them on separate lines? ruby will just look to the next line if it needs to
<bluebie> just do it
brianpWins has joined #ruby
<banisterfiend> quazimodo: also, it's stupid to make a ternary operator multiline
<banisterfiend> quazimodo: they're designed -- in any langauge -- to be for short little if/else expressions
<quazimodo> see, i didn't know that
<bluebie> yeah just use an if else statement
<banisterfiend> quazimodo: well, if you had used 'ternary' in any other langugae (like C for example) you would know that :P
* quazimodo learnt something new
<banisterfiend> it's not unique to ruby
<quazimodo> banisterfiend: genearally didnt
luckyruby has quit [Remote host closed the connection]
<bluebie> quazimodo: More often than not if you just write something which might work, it will. Ruby is designed to try and make sense of anything sensible
<bluebie> that's why it has so much grammar
<quazimodo> bluebie: yeah it seemed that way
adamkittelson has joined #ruby
<quazimodo> its a really cool language to be honest. I think I need to spend more time and read through core language methods, then look at rails' base activerecord methods
<quazimodo> that should clear it up a lot
DanielVartanov has left #ruby [#ruby]
<bluebie> but yeah, blah = if bla.etc?\n thing1\n else\n thing2\n end would work great too
<quazimodo> then ill see how enumerator works in this lang
chimkan has quit [Quit: chimkan]
<quazimodo> bluebie: lol whata mess
<bluebie> it looks nicer when you use real newlines instead of \n :P
<bluebie> and nice indentation!
<bluebie> enumerator is the bomb!
<bluebie> I was so happy when I figured out I could 10.times.map { |x| x * 5 } #=> [0, 5, 10, 15, 20, 25, 30, 35, 40, 45]
Eldariof-ru has joined #ruby
<quazimodo> oh there's another one
<quazimodo> the stuff inside { } can tat be multiline?
Gate has joined #ruby
Gate has quit [Changing host]
Gate has joined #ruby
<bluebie> sure
klaas has joined #ruby
<quazimodo> and do you *have to* leave the { } there?
<bluebie> { } is only different to do end in order of precedence I think
<quazimodo> or is an indentation lever onough
<bnagy> Enumerable is where the documentation is, not Enumerator
<bluebie> use do end if it works nicely
<bluebie> do end is designed for multiline big things
<quazimodo> 10.times.map do |x|
<banisterfiend> bluebie: Array.new(10) { |i| i * 5 }
<bluebie> indentation is never meaningful in ruby. Ruby does not see it at all
Squee- has left #ruby ["Leaving"]
<banisterfiend> bluebie: is the idiomatic way to do it
<quazimodo> bluebie: oh ok
<bluebie> banisterfiend: I feel like that's less clear
<banisterfiend> bluebie: ..ok :)
<banisterfiend> bluebie: then this: (0..10).map { |v| v * 5 }
ryanf has joined #ruby
tommyvYo has quit [Quit: ["Textual IRC Client: www.textualapp.com"]]
<bluebie> or how about this array_of_stuff.each_with_index.map { |obj, idx| yay! } that also makes me happy. Enumerators <3
<quazimodo> oh cool it worked
<bluebie> banisterfiend: very symboly. Words are nice :D
<Hanmac> >> (0..10).each_with_object(5).map(&:*)
<al2o3cr> (Array) [0, 5, 10, 15, 20, 25, 30, 35, 40, 45, 50]
<quazimodo> so i *could* do foo = 10.times.map do |x|; x; done
noyb has joined #ruby
<banisterfiend> bluebie: i find that perfectly readable
<bluebie> Hanmac: nice hack
<quazimodo> HRM
<quazimodo> i see!
Takehiro has quit [Remote host closed the connection]
<banisterfiend> quazimodo: what kind of thing would you like to do ?
<quazimodo> so |x| < thhis assignes whatever the stuff outside the { evaluates to
fantazo has quit [Remote host closed the connection]
<bluebie> quazimodo: Sure. You can even remove those semicolons pretty sure - it's clear enough what each thing does
<bluebie> |x| is your argument list
t40002 has quit [Remote host closed the connection]
<bluebie> like when you do def some_method(x)
t53083 has joined #ruby
aantix has quit [Quit: aantix]
<bluebie> when #each (or whatever) calls the block, it passes in some number of arguments or maybe none, and those are populated via the block's argument list if you specify one, otherwise you don't get them
<quazimodo> does if |x| is a list of arguments, how does the contents of the block seem to act on each element individualy?
azm has joined #ruby
azm has joined #ruby
azm has quit [Changing host]
<bluebie> the block is run repeatedly for methods like each
<bluebie> so each time it's called, like a method, x is set to a different thing
quazimodo has quit [Read error: Connection reset by peer]
<banisterfiend> quazimodo: blocks are more or less equivalent to lambdas in lisp
elhu has joined #ruby
<bluebie> they're called Proc's when you assign them to a variable tho
quazimodo has joined #ruby
<bluebie> 'block' is the syntax thing where you jsut shove one on to the end of a method call
<bluebie> and then MAGIC
<bluebie> yeild is crazy o_o
<bluebie> oh connection reset
<bluebie> yay
<quazimodo> i think 10.times.map { |x| puts x } will take each element that 10.times puts into x, prints it and at the end returns an array of whatever the last statement in the bloc returned
<quazimodo> yeah?
<bluebie> yep!
<bluebie> >> 3.times.map { |x| puts x }
<al2o3cr> (Array) [nil, nil, nil], Console: 0, 1, 2
<quazimodo> so if 10.times.map put 3 args into |x|, i guess i'd have to do|a, b, c| ?
<bluebie> turns out puts returns boring things
<bluebie> no
<bluebie> map calls the block ten times
<bluebie> each time with only one argument
<quazimodo> my.thingo { |a, b, c| do stuff } +
<quazimodo> ?
<bluebie> >> 5.times.map { |x| puts "nyan!" }
<al2o3cr> (Array) [nil, nil, nil, nil, nil], Console: nyan!, nyan!, nyan!, nyan!, nyan!
pingfloyd has quit [Quit: pingfloyd]
<bluebie> see, it calls the block five times there, and each time puts is run with 'nyan'
jenrzzz has joined #ruby
<bluebie> try it in IRB if you like
<quazimodo> what im asking is
<bluebie> if the thingo method calls the block with three arguments then they'll go in to a, b, c, in that example
<quazimodo> ok cool and the method actually calls the block
<quazimodo> its like creating a lambda function, actually
<bluebie> if you want to be weird about it, (lambda { |a, b, c| puts a, b, c }).call(*my) heh
<bluebie> yes
jeekl has quit [Ping timeout: 252 seconds]
* quazimodo falls ove
<bluebie> methods in ruby are called with an argument list and a block
<bluebie> but the block is optional
<fowl> quazimodo: that || is a regular arg list, meaning things like |*args| work
<bluebie> and the argument list might be zero long
<quazimodo> lol this is like a confusing version of a lambda that happens to return its args by default
senny has joined #ruby
* quazimodo falls over
<quazimodo> god damn im clumsy
<bluebie> >> my = ['i', 'like', 'cats']; (lambda { |a, b, c| puts a, b, c }).call(*my)
<al2o3cr> (NilClass) nil, Console: i, like, cats
<fowl> quazimodo: its called yield, google "yield ruby" and read up on it
<bluebie> everything in ruby returns it's last line if you don't use the return keyword to exit it early
gavit has quit [Read error: Connection timed out]
<bluebie> or, well, what is it, next? continue? break? there's something else aside from return for using in blocks
<quazimodo> bluebie: ... Wow
<quazimodo> so at the end of it
gavit has joined #ruby
<quazimodo> its just syntactical candy then
<fowl> bluebie: what are you talking about
<bluebie> like this...
<bluebie> >> awesome = true; if awesome; 'cats'; end
<al2o3cr> (String) "cats"
<bluebie> >> awesome = false; if awesome; 'cats'; end
<al2o3cr> (NilClass) nil
<fowl> bluebie: nvm i thought you might have been making sense
<bluebie> even if's return the last line!
dbe has quit [Remote host closed the connection]
<quazimodo> bluebie: that lambda thing you made doesnt work you jerk
<bluebie> which lambda? :)
chimkan_ has joined #ruby
<quazimodo> (lambda {|a b c| puts a, b, c}).call(*my)
<bluebie> sure it does! which al2o3cr were you watching?
<quazimodo> pry aint letting it
yoklov has quit [Quit: bye!]
<quazimodo> goes from a > to a nested *
<bluebie> did you notice where I made an array called 'my' with three things in it?
<banisterfiend> quazimodo: you aren't using pry properly, then
venkatk_ has joined #ruby
<bluebie> press control + c a few times and try again
<bluebie> you're probably nested in some weird unclosed bracket or block or something
<quazimodo> bluebie: swear i wasnt
<banisterfiend> quazimodo: well i just tried it in pry and it worked :)
<bluebie> banisterfiend: I just tried it and it didn't work
adamkittelson has quit [Remote host closed the connection]
<banisterfiend> bluebie: gist
<quazimodo> oh great. Now it works,exactly when ist moste embarassing
<banisterfiend> bluebie: ?
<bnagy> just like a penis
<bluebie> banisterfiend: https://gist.github.com/3422763
<bluebie> I don't get it
<quazimodo> bnagy: dont even get me started
<quazimodo> bluebie: i kinda love you
<quazimodo> you made ruby so, so much less confusing for me
<bluebie> just a minute ago you called me a jerk!
<bluebie> fine fine
<bluebie> all is forgiven :D
<fowl> bluebie: why did you wrap the lambda in parens
<quazimodo> yeah it was in an affectionate tone!
<bluebie> fowl: clarity for noob
jeekl has joined #ruby
<banisterfiend> bluebie: look at your parameter list you moron
<bluebie> banisterfiend: ah shit
<bluebie> thanks banisterfiend
<banisterfiend> :P
jarred has joined #ruby
<bluebie> that was weird
<bluebie> I wonder what it was waiting for
<bluebie> what could possibly make that statement make sense
<bluebie> sorry quazimodo - that lambda's arguments list needed some commas because I suck
tagrudev has joined #ruby
<jarred> Whenever I try to install a gem with MacRuby (I need this specific Ruby implementation for a project), I get an error that looks like this https://gist.github.com/ad206b304abc87f35e57. This is with MacRuby 0.12, as well as MacRuby's nightly build. How do I fix this?
<bluebie> asked the macruby channel?
<banisterfiend> bluebie: your argument list had commas
<banisterfiend> bluebie: clearly quazimodo rewrote the code from scratch but messed it up :)
<banisterfiend> it's his own fault, not yours :)
<bluebie> Oh okay!
<bluebie> my irc client cut off the log already
djdb has joined #ruby
<quazimodo> GUS i now stand and work
<quazimodo> my spine feels automatically better
t53083 has quit [Remote host closed the connection]
<bluebie> standing desker aye?
lurch_ has joined #ruby
t15675 has joined #ruby
<quazimodo> since 4 hours ago, es
<quazimodo> so better
banisterfiend has quit [Read error: Connection reset by peer]
banisterfiend has joined #ruby
Banistergalaxy has joined #ruby
<banisterfiend> bluebie: bbs
maesbn has joined #ruby
burgestrand has quit [Read error: Connection reset by peer]
burgestrand1 has joined #ruby
gavit has quit [Read error: Connection timed out]
gavit has joined #ruby
burgestrand1 has quit [Client Quit]
mengu has quit [Remote host closed the connection]
<quazimodo> bluebie: ok so what about the Class.select method
mxbtty has quit [Quit: Leaving.]
<quazimodo> is that a rails thing?
<quazimodo> i guess it must be
<bluebie> I've never heard of it so I assume so
<quazimodo> hrm
<quazimodo> can i do
<bluebie> try it!
<quazimodo> lol
mohits has quit [Quit: Leaving]
<quazimodo> ooo
gmci has quit [Quit: Computer has gone to sleep.]
<quazimodo> (Class.select { |o| o.bla == foo }).first.stuff !!!
* quazimodo starts jizzing
<JonnieCache|home> whats Class.select meant to do
maletor has quit [Quit: Computer has gone to sleep.]
<JonnieCache|home> ?
<quazimodo> JonnieCache|home: oh that returns an array of objects that are of type Class that match the rule inside select
banisterfiend has quit [Read error: Connection reset by peer]
noyb has quit [Ping timeout: 248 seconds]
c0rn_ has quit [Quit: Computer has gone to sleep.]
<bluebie> huh
<JonnieCache|home> which objects?
<JonnieCache|home> it selects accross all classes?
<bluebie> sounds like it!
<JonnieCache|home> wtf
elhu has quit [Quit: Computer has gone to sleep.]
<quazimodo> oh no no
<quazimodo> relax
<quazimodo> MyClass
banisterfiend has joined #ruby
<quazimodo> CHILL OUT GUYS!
<quazimodo> so like
gmci has joined #ruby
* bluebie chills
<quazimodo> Customer.select will return an array of all instances of type Customer
<quazimodo> well, all that match the rule in the block
<JonnieCache|home> ah ok that makes more sense. still quite nasty
<quazimodo> JonnieCache|home: ist a rails thing
coyo has quit [Quit: Heaven is not a place, it's being with people who love you.]
<JonnieCache|home> probably
<quazimodo> why's it nasty though?
<JonnieCache|home> youre magicking objects out of thin air, which could make a program very hard to understand
<bluebie> they're probably doing it in activerecord by building arrays when you inherit from AR's base class or something like that
<JonnieCache|home> yeah its probably powering the rails magic
<JonnieCache|home> and lo and behold rails is very hard to understand internally :)
<bluebie> mm rails o_o
<bluebie> I like camping
<quazimodo> JonnieCache|home: its not that hrad :/
<bluebie> it's WAY MORE CONFUSING
<quazimodo> cutomers = Customer.select {|o| some rules that make sense } ... done?
chimkan_ has quit [Quit: chimkan_]
<JonnieCache|home> its not hard in itself its what it could do to the large scale design of a program that the problem
<quazimodo> JonnieCache|home: I'm not sure what the implications are, even abstractly
<bluebie> wait
<JonnieCache|home> normally objects get where they are because either theyve been made there, or passed there through some usual way. now suddenly any object can pop up anywhere
<quazimodo> some *place* should keep track of what objects you instantise, so... i mean i dont get it?
<bluebie> does Customer.select only find objects you already loaded recently or does it find ones in your SQL server too?
<bluebie> like, are they converting a block in to an SQL query O_O
<quazimodo> bluebie: it looks through the sql afaik
<bluebie> okay I'm impressed
<quazimodo> lots of what rails does is in sql it appears
<JonnieCache|home> .select isnt one of the sql generating methods
<JonnieCache|home> well it is, but it doesnt work like that
<bluebie> quazimodo: Unlike PHP, ruby/rails is persistent - objects aren't just created, they also need to be garbage collected and removed
<JonnieCache|home> besides you said its on Class
<bluebie> how's it work?
savage- has quit [Remote host closed the connection]
<JonnieCache|home> there is a .select method in activerecord, corresponding to the SELECT statement in sql
denstark has quit [Ping timeout: 248 seconds]
<JonnieCache|home> but i dont think it takes a block like that
igotnolegs has quit [Quit: Computer has gone to sleep.]
<bluebie> I've seen attempts to make it take a block
<bluebie> but they all seem pretty dodgy
<quazimodo> JonnieCache|home: yeah that select may use :attribute => "bla"
<quazimodo> i cant remember now
<bluebie> O_o
<bluebie> NEVERMIND NOTHING INTERESTING HAPPENING
t15675 has quit [Remote host closed the connection]
<bluebie> go back to what you were doing everyone
sebicas has quit [Quit: sebicas]
<quazimodo> yeah thats right
t77679 has joined #ruby
<quazimodo> the activerecord .select i think needs :attribute => "bla"
<bluebie> It's not on Class, it's on ActiveRecord::Base or something related to that
<JonnieCache|home> ohhhhh
<JonnieCache|home> thats not what you said
<quazimodo> JonnieCache|home: forgive me, im a nooblet
<quazimodo> :(
<JonnieCache|home> :)
<JonnieCache|home> dont worry
<bluebie> nooblet
<bluebie> is a great word
td123 has joined #ruby
<JonnieCache|home> yeah that'll just be part of the sql query building, for when you actually need to give a specific SELECT statement
<quazimodo> i dont even know if it's called select in active record
<JonnieCache|home> usually you dont need to do that though
<JonnieCache|home> the key AR method is where()
<bluebie> quazimodo: When you start feeling the need to be confused some more, check out Markaby - it's the ActiveRecord of building html with only ruby code
<JonnieCache|home> wtf thats an odd description
<JonnieCache|home> its a templating language like many others
<bluebie> like ActiveRecord it makes accidental cross site scripting vulnerabilities much less frequent, and makes everything more awesome!
* quazimodo hates the rails help page
<bluebie> mm sort of
<bluebie> more of a builder really
greenysan has joined #ruby
denstark has joined #ruby
<quazimodo> bluebie: html .... can have xss vulnerabilites? are you high?
<bluebie> quazimodo: uh...
Z_Mass has quit [Quit: Leaving]
<bluebie> so can svg
<bluebie> but it's usually html which has the xss vulnerabilities
und3f has joined #ruby
<quazimodo> maybe im high
<bluebie> The ever awesome Judofyr once exploited an XSS vulnerability in twitter's site to make a tweet worm!
<bluebie> you seem a bit high
classix has quit [Ping timeout: 248 seconds]
<bluebie> they probably wouldn't have had that problem if they'd used markaby :D
<quazimodo> bluebie: ohhh right you mean filtering stuff the user inputs
<quazimodo> rith
<fowl> bluebie: lets write a worm
<quazimodo> so when you print it out
<fowl> bluebie: one that wriggles for hours before you need to wind it up again
<bluebie> quazimodo: less filtering more propper escaping
afd__ has quit [Read error: Connection reset by peer]
<bluebie> though as I understand it rails has some dirty data stuff now to help detect those problems
Morkel has joined #ruby
<Hanmac> bluebie: or using php and forgot to escape the username and pwd :P
<bluebie> or using php and forgot to disable notices
Eldariof-ru is now known as eldariof
<bluebie> Hanmac: https://bugs.php.net/bug.php?id=55139 XSS vulnerabilities are built right in to php!
<bluebie> don't even have to write any special code to have them :D
ibash has quit [Quit: ibash]
Aphelion has quit [Quit: Aphelion]
<bluebie> I have friends in the security industry - they love browsing php's issue tracker
ttilley has joined #ruby
<quazimodo> bluebie: yeah its like putting a hammer in the hands of an angry super toddler
ttilley has quit [Changing host]
ttilley has joined #ruby
jprovazn has joined #ruby
<bluebie> more like a rock, but whatever metaphor floats your boat :)
greenysan has quit [Ping timeout: 248 seconds]
clocKwize has joined #ruby
mahmoudimus has joined #ruby
<fowl> what? you mean php sucks? omg when this did this happen
<bluebie> yahoo and facebook are both written in php
cid404 has quit [Ping timeout: 260 seconds]
<bluebie> two fantastic websites
timonv has quit [Remote host closed the connection]
recycle has quit [Remote host closed the connection]
<fowl> if by fantastic you mean the mark of the beast incarnate, yes
azm has quit [Ping timeout: 268 seconds]
gavit has quit [Read error: Connection timed out]
gavit has joined #ruby
insecurlex has quit [Remote host closed the connection]
tonini has joined #ruby
daniel_hinojosa has quit [Quit: Leaving.]
n1x has joined #ruby
daniel_hinojosa has joined #ruby
<bluebie> fowl: Good to see we're on the same page
<Hanmac> bluebie php bashing is not nice ... its like kicking someone that is allready down :P
chichou has quit [Remote host closed the connection]
chichou has joined #ruby
<bluebie> if I can help make php have no friends anymore i'll be well pleased
t77679 has quit [Remote host closed the connection]
mengu has joined #ruby
t17502 has joined #ruby
jarred has quit [Quit: jarred]
Takehiro has joined #ruby
pskosinski has joined #ruby
answer_42 has joined #ruby
a_a_g has joined #ruby
<quazimodo> got it
<quazimodo> ActiveRecordClass.select { enumerable.select_style_block_contents } seems to do (ActiveRecordClass.all).select { enumerable.select_style_block_contents }
chichou has quit [Ping timeout: 260 seconds]
<quazimodo> but ActiveRecordClass.select(blabla) does the AR one
roderyk has joined #ruby
roderyk has left #ruby ["Leaving..."]
Rochefort has joined #ruby
Advocation has joined #ruby
quest88 has quit [Quit: quest88]
<fowl> quazimodo: i find activerecord/rails overuse of factory methods appalling
<wallerdev> cant be as bad as java
<ryanf> haha
<ryanf> fowl: I'm curious, which activerecord factory methods do you mean?
n1x has quit [Remote host closed the connection]
cezar has joined #ruby
<fowl> ryanf: like i know about activerecord, when i encounter it i throw some holy water at it and run the other direction
<quazimodo> fowl: you'll have to be --verbose
* quazimodo has a gimpy brain
cezar has quit [Client Quit]
gavit has quit [Read error: Connection timed out]
qwerxy has joined #ruby
bluebie has quit [Quit: Linkinus - http://linkinus.com]
<fowl> im too --baked for verbosity
gavit has joined #ruby
<fowl> and hungry
<ryanf> fowl: eat some thai food
nirix has joined #ruby
elhu has joined #ruby
<fowl> meh
lurch_ has left #ruby [#ruby]
bradhe has quit [Remote host closed the connection]
DuoSRX has joined #ruby
arvidkahl has joined #ruby
lurch_ has joined #ruby
vectorshelve has joined #ruby
hoelzro|away is now known as hoelzro
Stalkr_ has joined #ruby
aganov has joined #ruby
Eldariof59-ru has joined #ruby
maletor has joined #ruby
eldariof has quit [Ping timeout: 244 seconds]
Takehiro has quit [Remote host closed the connection]
imami|afk is now known as banseljaj
gmci has quit [Quit: Computer has gone to sleep.]
<JonnieCache|home> quazimodo: ive been a rails dev for years and ive never seen anyone do that stuff, in gem code or our own code
<JonnieCache|home> what are you trying to do?
xorigin has joined #ruby
<maletor> >> Symbol.all_symbols.size
<maletor> => 51068
<al2o3cr> (Fixnum) 1859
<maletor> is that a lot?
pskosinski has quit [Ping timeout: 260 seconds]
chussenot has joined #ruby
gavit has quit [Read error: Connection timed out]
gmci has joined #ruby
gavit has joined #ruby
Araxia has quit [Quit: Araxia]
<wallerdev> maletor: a lot for what?
MarGarina has joined #ruby
<wallerdev> ive got like 26k for a simple rails app
dangerousdave has joined #ruby
pskosinski has joined #ruby
<maletor> so no?
<maletor> it wouldn't be my source of memory leak
<maletor> what's the memory 51k uses?
machty has quit [Ping timeout: 260 seconds]
kuzushi has quit [Ping timeout: 245 seconds]
ryanf has quit [Quit: leaving]
LouisGB has joined #ruby
twinturbo has joined #ruby
chussenot has quit [Quit: chussenot]
gavit has quit [Read error: Connection reset by peer]
<Hanmac> maletor do you autogenerate the symbols? do you use many "string".to_sym?
wobr has joined #ruby
havenn has quit [Remote host closed the connection]
maletor has quit [Quit: Computer has gone to sleep.]
<Hanmac> :(
bradhe has joined #ruby
thone_ has joined #ruby
kuzushi has joined #ruby
thone has quit [Ping timeout: 252 seconds]
Takehiro has joined #ruby
chichou has joined #ruby
rakunHo has quit [Read error: Connection reset by peer]
DuoSRX has quit [Remote host closed the connection]
mneorr has joined #ruby
mssola has joined #ruby
adac has joined #ruby
robbyoconnor has quit [Ping timeout: 246 seconds]
<JonnieCache|home> rails is famous for making a bazillion symbols
<JonnieCache|home> theyre supposedly trying to reduce the amount of objects instantiated all over the place
robbyoconnor has joined #ruby
<JonnieCache|home> esp in startup
dangerousdave has quit [Quit: Leaving...]
qwerxy has quit [Quit: offski]
arvidkahl has quit [Quit: arvidkahl]
SIGILL has joined #ruby
Banistergalaxy has quit [Ping timeout: 250 seconds]
jenrzzz has quit [Ping timeout: 265 seconds]
pskosinski has quit [Read error: Connection reset by peer]
davidcelis has quit [Ping timeout: 244 seconds]
andrewh has quit [Ping timeout: 240 seconds]
kaiwren has joined #ruby
greenysan has joined #ruby
d3vic3 has quit [Ping timeout: 256 seconds]
greenysan has quit [Client Quit]
d3vic3 has joined #ruby
wobr1 has joined #ruby
BiHi has joined #ruby
td123 has quit [Quit: WeeChat 0.3.8]
mahmoudimus has quit [Quit: Computer has gone to sleep.]
wobr has quit [Ping timeout: 256 seconds]
haxrbyte has joined #ruby
Takehiro has quit [Remote host closed the connection]
Takehiro has joined #ruby
GoldenCider has quit [Quit: GoldenCider]
arkiver has joined #ruby
havenn has joined #ruby
thunderstrike has joined #ruby
chussenot has joined #ruby
kyb3r has joined #ruby
twigmorewelsh has joined #ruby
BeLucid has quit [Read error: Connection reset by peer]
allanm_ has quit [Read error: Connection reset by peer]
BeLucid has joined #ruby
allanm_ has joined #ruby
havenn has quit [Ping timeout: 240 seconds]
Takehiro has quit [Remote host closed the connection]
phrame has quit [Ping timeout: 248 seconds]
Banistergalaxy has joined #ruby
inimino has quit [Ping timeout: 248 seconds]
flexd has quit [Ping timeout: 246 seconds]
nilg has joined #ruby
phrame has joined #ruby
haxrbyte_ has joined #ruby
g_rotbart has quit [Remote host closed the connection]
dhruvasagar has joined #ruby
apeiros_ has joined #ruby
EPIK has quit [Ping timeout: 244 seconds]
jenrzzz has joined #ruby
inimino has joined #ruby
haxrbyte has quit [Ping timeout: 260 seconds]
workmad3 has joined #ruby
twigmorewelsh has quit [Quit: Linkinus - http://linkinus.com]
Takehiro has joined #ruby
fixl has joined #ruby
GoldenCider has joined #ruby
Stalkr_ has quit [Quit: Leaving...]
shadoi1 has quit [Quit: Leaving.]
khakimov has joined #ruby
Vert has joined #ruby
apok has joined #ruby
peterhellberg has joined #ruby
suraj has joined #ruby
timonv has joined #ruby
Xeago has joined #ruby
t17502 has quit [Remote host closed the connection]
cascalheira has joined #ruby
t43522 has joined #ruby
bambanx has joined #ruby
Banistergalaxy has quit [Ping timeout: 260 seconds]
jgrevich has quit [Quit: jgrevich]
justinmcp has joined #ruby
apok has quit [Quit: apok]
Takehiro has quit [Remote host closed the connection]
parus has quit [Remote host closed the connection]
elaptics`away is now known as elaptics
bradhe has quit [Remote host closed the connection]
brianpWins has quit [Quit: brianpWins]
GoldenCider has quit [Quit: GoldenCider]
kyktommy has joined #ruby
Eldariof27-ru has joined #ruby
cid404 has joined #ruby
cascalheira has quit [Ping timeout: 260 seconds]
Eldariof59-ru has quit [Read error: Operation timed out]
paolooo has joined #ruby
twinturbo has quit [Quit: twinturbo]
qwerxy has joined #ruby
zeromodulus has quit [Remote host closed the connection]
zeromodulus has joined #ruby
JonnieCache|home has left #ruby [#ruby]
JonnieCache|home has joined #ruby
bricker88 has quit [Quit: Leaving.]
sent-hil has joined #ruby
DuoSRX has joined #ruby
<sent-hil> If I open up a module in rspec spec_helper.rb, and redefine a method, when I call super in there, shouldn't it call the module's original method?
<sent-hil> Oddly its called super on RSpec example group
<hoelzro> sent-hil: super only calls the superclass' method
<hoelzro> it doesn't help you if you redefine something
<sent-hil> hoelzro: it doesn't call super in context of the current module?
pskosinski has joined #ruby
dekroning has joined #ruby
justinmcp has quit [Remote host closed the connection]
banisterfiend has quit [Read error: Connection reset by peer]
banisterfiend has joined #ruby
<hoelzro> hmm...I guess it will work if you're implementing a method that a module provides
_bart has quit [Quit: _bart]
gmci has quit [Quit: Computer has gone to sleep.]
JonnieCache|home has quit [Quit: Lost terminal]
<dekroning> I'm a bit confused about object serialization. I have a object graph about a basic Person object which has some composed relationship with ContactInformation (and some other composed object relations), would I be able to serialize the whole Person object graph into something like yaml or json ?
<sent-hil> hoelzro: yea, Goliath::TestHelper provides a with_api method, but when I redefine it in spec_helper.rb, it can't find the original with_api method or any of the Goliath::TestHelper methods
khakimov has quit [Quit: Computer has gone to sleep.]
bambanx has quit [Ping timeout: 272 seconds]
csmrfx has joined #ruby
<csmrfx> 8)
<csmrfx> If you had to crawl a tree of webpages under foo.org/bar/ for string "ybur", what would you use?
<Muz> Mechanize and Nokogiri could probably do that. Depending on your definition of "crawl".
M- has quit [Quit: This computer has gone to sleep]
havenn has joined #ruby
<csmrfx> Just follow links within the domain
Advocation_ has joined #ruby
bambanx has joined #ruby
<bnagy> following links, eh?
<bnagy> hmm sounds like the kind of thing a SPAMMER WOULD DO
Advocation has quit [Ping timeout: 260 seconds]
Advocation_ is now known as Advocation
<bnagy> burn im!
dross has quit [Ping timeout: 240 seconds]
ephemerian has joined #ruby
<bnagy> fwiw I have never done any significant webstuff, but I found capybara really easy to use for that kind of thing
* csmrfx spams bnagy with all the javascript bugs he needs to fix on a site made by people who have never heard of template logic
<bnagy> and with capybara-webkit / poltergeist it's JS capable
<csmrfx> whoa
<bnagy> and the capybara DSL is sweeet if you know 0 like me
fayimora has joined #ruby
<csmrfx> I was looking at phantom for making a javascript testing suite
<csmrfx> uh phantom.js
<csmrfx> oh, thats what poltergeist is
<bnagy> you would probably like poltergeist then
<csmrfx> mehh, pack it in a gem
havenn has quit [Ping timeout: 244 seconds]
ananthakumaran has quit [Ping timeout: 244 seconds]
<bnagy> I had to make a search engine automation thing, and burgestrand made it threadsafe for me. Want?
ananthakumaran has joined #ruby
zommi has joined #ruby
dhruvasagar has quit [Ping timeout: 240 seconds]
<csmrfx> wat
<csmrfx> is it chrismas
mohits has joined #ruby
mohits has quit [Changing host]
mohits has joined #ruby
<csmrfx> hm I gotta go lunch
<csmrfx> I'll have a peek at that bit later
<csmrfx> bnagy thanks 8)
<bnagy> maybe you can use that as a base / cut paste fodder at least
<sent-hil> what happens to the original method when you redefine a method?
<hoelzro> sent-hil: I think it depends if you're redefining a method provided by a role, or monkey patching a class
<bnagy> you break its neck, like killing a puppy
<sent-hil> hoelzro: i'm guessing when you monkey patch, the original method goes away...what does "method provided by a role" mean?
t43522 has quit [Remote host closed the connection]
t62225 has joined #ruby
<hoelzro> sorry, I meant module
* hoelzro is also talking on #perl6
<sent-hil> hoelzro: ah ok, in case of module, a new method is create below the original method?
binaryplease has joined #ruby
<hoelzro> I'm not 100% certain, but I think so
specialGuest has joined #ruby
tvw has joined #ruby
kyktommy has quit [Quit: kyktommy]
tonini has quit [Remote host closed the connection]
Advocation_ has joined #ruby
Advocation has quit [Ping timeout: 272 seconds]
Advocation_ is now known as Advocation
dhruvasagar has joined #ruby
xbayrockx has joined #ruby
Foxandxss has joined #ruby
Rochefort has quit [Remote host closed the connection]
sgmac has joined #ruby
sent-hil has left #ruby [#ruby]
nohonor has quit [Ping timeout: 250 seconds]
senny_ has joined #ruby
bambanx has quit [Read error: Connection reset by peer]
senny has quit [Ping timeout: 252 seconds]
Takehiro has joined #ruby
zxc__ has joined #ruby
cantonic has joined #ruby
Tomasso has joined #ruby
cantonic has left #ruby [#ruby]
Prajjwal has joined #ruby
fayimora has quit [Quit: Be back in a gifii]
wallerdev has quit [Quit: wallerdev]
xbayrockx1 has joined #ruby
cascalheira has joined #ruby
schleppy has quit [Quit: Leaving.]
zxc_ has joined #ruby
xbayrockx has quit [Ping timeout: 246 seconds]
zxc__ has quit [Ping timeout: 245 seconds]
Prajjwal has left #ruby [#ruby]
Eldariof-ru has joined #ruby
cantonic has joined #ruby
zxc_ has quit [Ping timeout: 245 seconds]
Eldariof27-ru has quit [Ping timeout: 252 seconds]
binaryplease has quit [Quit: WeeChat 0.3.8]
binaryplease has joined #ruby
fermion has joined #ruby
nari has quit [Ping timeout: 245 seconds]
bradhe has joined #ruby
vjt has quit [Ping timeout: 272 seconds]
Takehiro has quit [Remote host closed the connection]
<zeromodulus> how can I get a datetime object for the current month?
<zeromodulus> is there something like a floor method?
shiki has quit [Remote host closed the connection]
mrdodo has quit [Remote host closed the connection]
Foxandxss has quit [Quit: KVIrc 4.2.0 Equilibrium http://www.kvirc.net/]
Criztian has joined #ruby
mneorr has left #ruby [#ruby]
sgmac has left #ruby [#ruby]
cantonic has quit [Quit: cantonic]
bradhe has quit [Ping timeout: 240 seconds]
<bnagy> zeromodulus: DateTime.parse 'march'
specialGuest has quit [Quit: WeeChat 0.3.8]
<bnagy> dunno if it's recommended, but it works. NB it's UTC
triptec has joined #ruby
<bnagy> >> DateTime.parse Date::MONTHNAMES[Date.today.month]
<al2o3cr> -e:1:in `eval': uninitialized constant DateTime (NameError), from -e:1:in `eval', from -e:1:in `<main>'
<zeromodulus> actually found a solution within rails, they have a .beginning_of_month and .end_of_month extension.
<bnagy> ah
<banisterfiend> bnagy: naggy have u played SMG2 ?
<banisterfiend> bnagy: or still working through galaxy 1 ?
<bnagy> >> require 'date';DateTime.parse Date::MONTHNAMES[Date.today.month]
<al2o3cr> (DateTime) #<DateTime: 2012-08-01T00:00:00+00:00 ((2456141j,0s,0n),+0s,2299161j)>
<bnagy> banisterfiend: I am a little over 100 stars in
<banisterfiend> bnagy: which one? 1 or 2?
<bnagy> 2
<bnagy> btu I been too busy lately :(
tvw has quit [Remote host closed the connection]
vjt has joined #ruby
<banisterfiend> bnagy: did u already finish 1?
<banisterfiend> or just skipped it?
<bnagy> finished
<banisterfiend> k00
<banisterfiend> is SMG2 that much better?
davidcelis has joined #ruby
<bnagy> I wouldn't say so, they're both pretty great :)
<banisterfiend> bnagy: do u play mario kart too?
<bnagy> I have no friends :`(
Prajjwal has joined #ruby
vlad_starkov has joined #ruby
<csmrfx> hey mr. banner
<bnagy> I play SMK64 with mates when I go home, still the best imho, although double dash was ok
<banisterfiend> bnagy: haha i just played by myself today
<matti> Hi banisterfiend
<bnagy> loser
chessguy has quit [Remote host closed the connection]
<banisterfiend> bnagy: rainbow road is awesome on wii kart :D
<banisterfiend> bnagy: it's completely nuts
<banisterfiend> hehe
PapaSierra2 has joined #ruby
<banisterfiend> yeah, i'd love to play against friends, but 1. im only doing it on my imac and i have no pad cnotrollers
dhruvasagar has quit [Ping timeout: 260 seconds]
wvms has joined #ruby
<banisterfiend> and 2. none of my frens would be interested anyway i think
Dr4g|sleep is now known as Dr4g
<Prajjwal> I'm have a little problem with strings. I want to replace all instances of a single quote with "\'" ( a literal backslash and a quote).
<Prajjwal> eg
<Prajjwal> I want to turn it into "Hello, \'World\'"
<Prajjwal> str = "Hello, 'World'"
<Prajjwal> Any ideas?
vjt has quit [Ping timeout: 272 seconds]
<banisterfiend> csmrfx: sup carl
<banisterfiend> matti: ;]
<csmrfx> Prajjwal: start with ri String
<csmrfx> Prajjwal: then ri String.replace
<csmrfx> also ri String.gsub
<Prajjwal> csmrfx: gsub it with what
<Prajjwal> thats the problem
<Prajjwal> str.gsub "\'", "\\'" doesn't work
vjt has joined #ruby
<Prajjwal> I want literal slashes in the string
<shevy> try more \
<Prajjwal> shevy: I tried one, two, three and four slashes
<shevy> hmmm wait
<Prajjwal> Is this even possible?
<shevy> this is not even possible
<JonnieCache> banisterfiend: i dont approve of mario kart post-n64
<JonnieCache> can you still jump off the side of rainbow road and skip half the map?
<banisterfiend> JonnieCache: i dont know, i only played it once :P but it was awesome, u should look up some vids on youtube
<banisterfiend> you'll be impressed how it's evolved
<banisterfiend> rainbow road gets crazier each time
PapaSierra2 has left #ruby [#ruby]
cantonic has joined #ruby
<shevy> Prajjwal, don't think so... this is the best you could do I suppose... str = "Hello, \\'World\\'" # => "Hello, \\'World\\'"
<Prajjwal> My current solution is to replace the single quote with an html entity.
<shevy> :P
<Prajjwal> yes
<Prajjwal> shevy: I wouldn't be asking here if I hadn't tried all that already.
<Prajjwal> shevy: :'(
<shevy> yup. no chance
<Prajjwal> Oh well, thanks anyway.
<Prajjwal> :)
<bnagy> wat?
<csmrfx> Prajjwal: use concat
<bnagy> >> "Hello, 'World'".gsub(/'/) {|m| "\\#{m}"}.length
<al2o3cr> (Fixnum) 16
<bnagy> block form is the best way to avoid hilarious numbers of slashes when trying to add backslashes
<banisterfiend> JonnieCache: bnagy http://www.youtube.com/watch?v=ZFoCm7QExs8
<Prajjwal> bnagy: Still doesn't work?
<bnagy> yes it does
<csmrfx> >> "\\" + "\'huh"
<al2o3cr> (String) "\\'huh"
<bnagy> Prajjwal: you think it doesn't work because you're looking at the result in irb and being deceived
<bnagy> which is why I put in the length check
<Prajjwal> bnagy: hmmmm
<JonnieCache> banisterfiend: that is pretty crazy. the guy who did that video isnt very good at it
<banisterfiend> JonnieCache: lemme know what u think
<banisterfiend> sorry i couldnt find an HD version
<Prajjwal> bnagy: Let me try that in the real thing.
x0F has quit [Disconnected by services]
x0F_ has joined #ruby
<banisterfiend> JonnieCache: Yeah, he's not even doing any power slides
x0F_ is now known as x0F
davidcelis has quit [Ping timeout: 252 seconds]
bluenemo has joined #ruby
bluenemo has joined #ruby
bluenemo has quit [Changing host]
flexd has joined #ruby
<JonnieCache> banisterfiend: ive had a wii sitting on my shelf for about a month but i havent played it yet. i need to get one of these: http://www.ebay.co.uk/itm/1080P-720P-HD-Wii-to-HDMI-Converter-Output-Upscaling-Adapter-/320764873913#ht_2941wt_1020
t62225 has quit [Remote host closed the connection]
suraj has quit [Read error: Connection reset by peer]
adambeynon has joined #ruby
<bnagy> "Hello, 'World'".gsub("'",'\\\\\'') is the retarded nonblockform one
<JonnieCache> so i can connect it to my monitor
t6194 has joined #ruby
<bnagy> if in doubt, MOAR SLASH
<banisterfiend> JonnieCache: oh ok. Wii's are cheap as chips these days
<banisterfiend> u can get one for like $100
<Prajjwal> bnagy: Haha. Never got to five slashes.
<shevy> lol
<Prajjwal> bnagy: And thank you, that works in the script.
<bnagy> four to make \\ to make one real \ and one cause the ' was inside ''
[Neurotic] has quit [Quit: Leaving]
<bnagy> Prajjwal: please use the block form
<banisterfiend> JonnieCache: are you jonathan davies?
<Prajjwal> bnagy: Yeah, thats the one I just put in the script. Works now. Thanks.
<JonnieCache> damn why do i always forget not to type my real name into things
<bnagy> banisterfiend the trolly nick outer
mneorr has joined #ruby
pskosinski has quit [Ping timeout: 245 seconds]
davidcelis has joined #ruby
<JonnieCache> its not really a secret google knows who i am
vlad_starkov has quit [Remote host closed the connection]
<JonnieCache> but id rather not promote it
<banisterfiend> JonnieCache: i just got an issue filed by u :P
<banisterfiend> sorry
<banisterfiend> just came up in my email now
elhu has quit [Ping timeout: 244 seconds]
<banisterfiend> JonnieCache: btw, to prevent loading of plugins, use: pry --no-plugins
habib has joined #ruby
<JonnieCache> GODDAMMIT why didnt i see that in --help
<shevy> JonnieCache I shall forever remember you as Jonnie The Cache, with the slick winchester rifle and the cowboy looks
<JonnieCache> i looked at it a bunch of times how unbelivably embarrasing
<banisterfiend> JonnieCache: cos it doesnt have a short form, it's easy to miss it i guess
<bnagy> *unbelievably
* bnagy rubs salt into the wounds
<banisterfiend> JonnieCache: thanks tho, we def. need to improve that situation
vitoravelino is now known as vitoravelino`afk
<banisterfiend> (regarding out of date plugins)
<banisterfiend> JonnieCache: what is your avatar meant to be btw
<JonnieCache> just thought there should be a github issue for someone to find when they google "pry stack level too deep"
<JonnieCache> its the middle of a record
<JonnieCache> an unmarked whitelabel record, the best kind ;)
himsin has joined #ruby
<banisterfiend> k00
elhu has joined #ruby
davidcelis has quit [Ping timeout: 244 seconds]
pskosinski has joined #ruby
tiripamwe has joined #ruby
Guest37999 has joined #ruby
habib has quit [Quit: Ухожу я от вас (xchat 2.4.5 или старше)]
<banisterfiend> JonnieCache: do u have a record player
<JonnieCache> i have at least 3 i think. 1 is broken and two are in someone elses house
<JonnieCache> 1210s are getting more expensive now, i should really get mine back off this guy
<JonnieCache> before he disappears or something
kyb3r has quit []
<JonnieCache> i used to play a lot of vinyl, now i just use a laptop to dj. its a real shame because its not as fun but its more practical. also a lot of tune tunes i want dont exist on vinyl these days
<banisterfiend> JonnieCache: you're a dj?
<JonnieCache> sort of. just around the local area at my friends events
davidcelis has joined #ruby
<JonnieCache> the last gig i did was the opening of a new skatepark. i played classic hiphop to ~100 very talented kids
<JonnieCache> i think they wanted dubstep though
jjang has quit [Ping timeout: 240 seconds]
<Muz> It's all about the Skillrex.
<Muz> He's the best dubstepper ever.
yasushi has joined #ruby
nirix has quit [Quit: Computer has gone to s…zZzZz]
Takehiro has joined #ruby
Takehiro has quit [Remote host closed the connection]
dhruvasagar has joined #ruby
Banistergalaxy has joined #ruby
devopensource has joined #ruby
Rochefort has joined #ruby
Prajjwal has quit [Quit: Leaving.]
mneorr has quit [Read error: No route to host]
mneorr1 has joined #ruby
ugo has joined #ruby
BiHi has quit [Quit: Computer has gone to sleep]
<JonnieCache> you're going to have to troll harder, dubstepper is a legit term from before the US takeover :P
<JonnieCache> try "i love skrillex, he makes the best dubsteps"
paolooo has quit [Quit: Page closed]
<JonnieCache> or describe them as "dubstep songs" that will really annoy some people
paolooo has joined #ruby
arkiver has quit [Ping timeout: 260 seconds]
mneorr has joined #ruby
bluebie has joined #ruby
bluefish_ has joined #ruby
butblack has joined #ruby
mneorr1 has quit [Ping timeout: 244 seconds]
shiki has joined #ruby
ugo has left #ruby [#ruby]
timonv has quit [Remote host closed the connection]
butblack has quit [Ping timeout: 260 seconds]
tbrock has quit [Remote host closed the connection]
vectorshelve has quit [Quit: Page closed]
arkiver has joined #ruby
liluo has quit [Remote host closed the connection]
nari has joined #ruby
jenrzzz has quit [Ping timeout: 240 seconds]
mrdodo has joined #ruby
shiki has quit [Ping timeout: 268 seconds]
shiki has joined #ruby
Asher1 has joined #ruby
mrdodo has quit [Read error: Operation timed out]
Jay_Levitt has joined #ruby
Asher has quit [Ping timeout: 245 seconds]
t6194 has quit [Remote host closed the connection]
kvirani has joined #ruby
t2978 has joined #ruby
shiki_ has joined #ruby
shiki has quit [Read error: Connection reset by peer]
d3vic3 has quit [Ping timeout: 244 seconds]
virunga has joined #ruby
charliesome has joined #ruby
d3vic3 has joined #ruby
cantonic has quit [Quit: cantonic]
d3vic3 has quit [Client Quit]
berserkr has joined #ruby
fridim_ has joined #ruby
banisterfiend has quit [Read error: Connection reset by peer]
virunga has quit [Remote host closed the connection]
banisterfiend has joined #ruby
Matt_ has joined #ruby
Matt_ is now known as Guest22700
yasushi has quit [Remote host closed the connection]
vlad_starkov has joined #ruby
timonv has joined #ruby
<banisterfiend> JonnieCache: u should get one of these to help your dj-ing http://www.youtube.com/watch?v=TSwqnR327fk&feature=context-shows&list=SL
yasushi has joined #ruby
vlad_starkov has quit [Ping timeout: 245 seconds]
<peterhellberg> http://www.youtube.com/watch?v=9bZkp7q19f0 <- PSY - GANGNAM STYLE (강남스타일) *stuck on repeat*
mmitchell has joined #ruby
<JonnieCache> banisterfiend: once our friends were struggling to decide what to put in room 3 at a club event they were doing. they couldnt afford any more artists so they did "midi kareoke"
<JonnieCache> im sure you can guess what that entailed :D
<banisterfiend> hehe
classix has joined #ruby
rohit has joined #ruby
kpshek has joined #ruby
arkiver has quit [Ping timeout: 252 seconds]
<JonnieCache> peterhellberg: jesus 46 million views electro house really is popular now isnt it
<JonnieCache> the video probably has a lot to do with it
dpk has joined #ruby
meskyanichi has joined #ruby
<JonnieCache> he must be making BANK off those adverts. he has the interstitial ones
Rochefort has quit [Remote host closed the connection]
BiHi has joined #ruby
Cymew has joined #ruby
Rochefort has joined #ruby
liluo has joined #ruby
Foxandxss has joined #ruby
<peterhellberg> JonnieCache: Yeah, it is turning into a Internet sensation
nanderoo has joined #ruby
devopensource has quit [Ping timeout: 246 seconds]
specialGuest has joined #ruby
tk_ has joined #ruby
<Cymew> Can someone tell me why I just get an exception and why nothing outside the while loop ever gets executed? http://pastebin.com/S2qfTC3k
rohit has quit [Quit: Leaving]
<bnagy> HA fricking finally http://i.imgur.com/T6otK.png
<bnagy> god I hate windows / GDI
kaiwren has quit [Quit: kaiwren]
Cascador is now known as Cascador-afk
devopensource has joined #ruby
devopensource has quit [Client Quit]
emmanuelux has joined #ruby
iamjarvo has joined #ruby
justinmcp has joined #ruby
geekbri has joined #ruby
twasp has joined #ruby
arkiver has joined #ruby
chimkan has joined #ruby
theRoUS has quit [Ping timeout: 260 seconds]
ivancho has joined #ruby
m_3 has quit [Remote host closed the connection]
<ivancho> hi, could somebody help me with a find in a collection?I'm a newbye and i dont find examples like this.Thanks! (last line in this code)https://gist.github.com/3424786
quazimodo has quit [Remote host closed the connection]
mmitchell has quit [Remote host closed the connection]
<Cymew> I see many finds on google about reading files and they differ slightly and I wonder why my way throws an exception...
bluebie has quit [Quit: Linkinus - http://linkinus.com]
robustus has joined #ruby
Shrink has quit [Ping timeout: 252 seconds]
arkiver has quit [Ping timeout: 248 seconds]
workmad3 has quit [Ping timeout: 265 seconds]
adac has quit [Ping timeout: 240 seconds]
virunga has joined #ruby
virunga has quit [Remote host closed the connection]
halfie has joined #ruby
thunderstrike has quit [Read error: Connection reset by peer]
emmanuelux has quit [Ping timeout: 240 seconds]
<halfie> I am new to RoR. How do execute function foo from file bar in a controller's function?
<bnagy> Cymew: uh wat?
<Muz> halfie: #rubyonrails
thunderstrike has joined #ruby
<bnagy> Cymew: what exactly are you trying to do?
banisterfiend has quit [Read error: Connection reset by peer]
<bnagy> first of all, contents=File.read( ARGV[0] ) will hopefully get you the contents of the first file
arkiver has joined #ruby
<bnagy> secondly, if you want to dump YAML, then use YAML.dump
banisterfiend has joined #ruby
graspee has quit [Quit: leaving]
<banisterfiend> anyonehere seen the movie "super 8" ?
* hoelzro has
<hoelzro> quite good
th3xer0 has joined #ruby
<Cymew> bnagy: ll, I understand very little of yaml. It bites my ass everytime I just know this very part is syntaxtically correct...
`brendan has joined #ruby
<csmrfx> what
<csmrfx> is there to understand about yaml
<Cymew> no idea
<csmrfx> dont be a dork, try a little harder
<csmrfx> or leave it to people who actually try doing the little it takes
<banisterfiend> hoelzro: k00 thanks
<Cymew>
<Cymew> thanks for the helpful attitude
<banisterfiend> hoelzro: how do u rate it out of 10
<csmrfx> Cymew: yaml is the simples data format out there
<hoelzro> banisterfiend: hmmm....well, I never give anything a 10, so I'd say 8.5/9
Takehiro has joined #ruby
<csmrfx> Cymew: be a moron, or do your homework, simple as that, no attitude, just facts
<csmrfx> 8)
<Cymew> csmrfx: I never said anything to the contrary, just that I fail to produce the right result. I know this very procedure works. ok.
<csmrfx> which yaml parser are you using
<banisterfiend> hoelzro: would u describe it as a scifi?
t2978 has quit [Remote host closed the connection]
t95104 has joined #ruby
<Cymew> Fuck you csmrfx. I can tell that the ruby community's helpful reputation us clearly overstated.
Cymew has left #ruby ["Killed buffer"]
m_3 has joined #ruby
<bnagy> Cymew: looks like you want sooomething like File.open('out.yml','wb+') {|io| io.write( YAML.dump( {'host_packages'=>File.readlines(ARGV[0])} ) ) }
<hoelzro> banisterfiend: yes
<csmrfx> just another dorky swede
<bnagy> that's at least going to be close
mohits has quit [Quit: Leaving]
<hoelzro> it's not a conventional sci-fi film, though
Norrin has quit [Read error: Operation timed out]
* csmrfx clearly represents the ruby community as a whole
<bnagy> csmrfx: well that probably was a little harsh, dude
Norrin has joined #ruby
iamjarvo has quit [Ping timeout: 244 seconds]
<csmrfx> yep, I'm the dick
<bnagy> MINASWAN etc etc at least until they've had a few strikes
<bnagy> or a few dozen like vectorshelve :D
justinmcp has quit [Remote host closed the connection]
<bnagy> imho anyway, I'm a hacker not a cop
<csmrfx> I spewed out evil harshness such as "which yaml parser are you using"
<csmrfx> <-- guilty!
vlad_starkov has joined #ruby
nateberkopec has joined #ruby
th3xer0 has left #ruby [#ruby]
verto|off is now known as verto
<ivancho> hi, could somebody help me with a find in a collection? Is killing my head :( https://gist.github.com/3424786
Shrink has joined #ruby
chimkan has quit [Quit: chimkan]
iamjarvo has joined #ruby
<bnagy> ivancho: that's kind of nasty ruby (@@vars) in rails, in spanish - you might do better on #rubyonrails
th3xer0 has joined #ruby
<bnagy> eg I have no idea what 'in' is supposed to be
banisterfiend has quit [Read error: Connection reset by peer]
<ivancho> bnagy probably is a bad idea use @@ but im a newbye
<ivancho> and about the in this is just the problem
arkiver has quit [Quit: Leaving]
<ivancho> this is no the way to do it but i have spend all the last 3 hours find the way to do it
erichmenge has joined #ruby
banisterfiend has joined #ruby
krusty_ar has joined #ruby
jrist has joined #ruby
<Muz> It looks like you're using Rails, there's probably a nice Rails library that elegantly provides a solution.
<Muz> You'll get better help on Rails in #rubyonrails
<ivancho> oki thanks i though find was a ruby function
<Muz> Depends what the class of the object you're calling it on is.
invisime has joined #ruby
<Muz> Also, you've not given us the actual error message.
<bnagy> find is, but "in" is not
<JonnieCache> that stuff belongs in the model, not the controller
<JonnieCache> controller should be almost empty
justinmcp has joined #ruby
<ivancho> C:/Sites/ADA/app/controllers/soluciones_controller.rb:21: syntax error, unexpected tASSOC, expecting '}'
<ivancho> ...llvl=@@sols.find{:conditions => ["Soluci_n_Padre__r.Id in (?...
<ivancho> ... ^
invisime has left #ruby [#ruby]
<ivancho> Thanks JonnieCache I apreciate your comment I'll learn how to move this to the model I just learning
<bnagy> that is a completely different error in different code
<JonnieCache> ivancho: people talk about "fat models" and "thin controllers" this may help you on your googling quest
<bnagy> srsly - go over to #rubyonrails pls
<JonnieCache> yeah that too
<ivancho> ok bnagy
Strangebrew has joined #ruby
ivancho has left #ruby [#ruby]
Strangebrew has left #ruby ["Leaving"]
Axsuul has quit [Ping timeout: 252 seconds]
<bnagy> can I stand the annoyance of working out how GDI fonts work, today?
<bnagy> ... no probably not
Shrink has quit [Quit: ta]
Shrink has joined #ruby
<banisterfiend> bnagy: play wii kart instead
BRMatt has quit [Ping timeout: 265 seconds]
Seich has quit [Ping timeout: 260 seconds]
<bnagy> brain too fried
hakunin has quit [Remote host closed the connection]
<bnagy> also, no friends
MarGarina has quit [Ping timeout: 265 seconds]
BRMatt has joined #ruby
s1n4 has quit [Quit: Lost terminal]
<banisterfiend> bnagy: even without frens it's fun to play through once, just to unlock all the tracks
cantonic has joined #ruby
hmans has joined #ruby
<bnagy> can't talk, imgur
linoj has joined #ruby
<csmrfx> why is there no draw chat
<csmrfx> svg irc
Seich has joined #ruby
workmad3 has joined #ruby
MarGarina has joined #ruby
<JonnieCache> because people would just draw penises
<JonnieCache> everyone on irc is a 12 year old boy remember?
iamjarvo has quit [Ping timeout: 260 seconds]
<banisterfiend> JonnieCache: u seen 'super 8' ?
<JonnieCache> nope
t95104 has quit [Remote host closed the connection]
t81208 has joined #ruby
fantazo has joined #ruby
Eldariof59-ru has joined #ruby
MarGarina has quit [Ping timeout: 240 seconds]
Squarepy has joined #ruby
MarGarina has joined #ruby
neonlex has quit [Ping timeout: 246 seconds]
liluo has quit [Remote host closed the connection]
<JonnieCache> banisterfiend: i really want to watch this http://trailers.apple.com/trailers/independent/godblessamerica/
yasushi has quit [Remote host closed the connection]
Progster has joined #ruby
<banisterfiend> JonnieCache: Yeah!
<banisterfiend> is it meat to b good?
tommyvYo has joined #ruby
tommyvYo has joined #ruby
tommyvYo has quit [Changing host]
ph^ has joined #ruby
<JonnieCache> people i know who have seen it say it delivers on the promise of the trailer
justinmcp has quit [Remote host closed the connection]
twasp has quit [Ping timeout: 256 seconds]
Eldariof-ru has quit [Ping timeout: 268 seconds]
liluo has joined #ruby
mssola has quit [Read error: Connection reset by peer]
cascalheira has quit [Quit: Leaving...]
shiki_ has quit [Remote host closed the connection]
cascalheira has joined #ruby
bluefish_ has quit [Quit: Ex-Chat]
adac has joined #ruby
vitoravelino`afk is now known as vitoravelino
Dr4g has quit [Changing host]
Dr4g has joined #ruby
Dr4g has joined #ruby
rakunHo has joined #ruby
MarGarina has quit [Ping timeout: 240 seconds]
nilg` has joined #ruby
MarGarina has joined #ruby
stargazer has joined #ruby
stargazer has left #ruby [#ruby]
nilg has quit [Ping timeout: 240 seconds]
wereHamster has quit [Ping timeout: 240 seconds]
simao has quit [Ping timeout: 245 seconds]
ccooke has quit [Ping timeout: 245 seconds]
ohcibi has quit [Ping timeout: 246 seconds]
rohit has joined #ruby
kaiwren has joined #ruby
kaiwren has quit [Client Quit]
naquad has quit [Ping timeout: 265 seconds]
zaiste has quit [Ping timeout: 265 seconds]
gry has quit [Quit: gone]
MarGarina has quit [Ping timeout: 268 seconds]
fixl has quit [Quit: KVIrc 4.1.3 Equilibrium http://www.kvirc.net/]
MarGarina has joined #ruby
tayy has joined #ruby
tayy has quit [Remote host closed the connection]
triptec has quit [Read error: Connection reset by peer]
triptec has joined #ruby
Spooner has joined #ruby
SeanLazer has joined #ruby
t81208 has quit [Remote host closed the connection]
t62352 has joined #ruby
banisterfiend has quit [Read error: Connection reset by peer]
mssola has joined #ruby
banisterfiend has joined #ruby
quazimodo has joined #ruby
verto is now known as verto|off
naz has quit [Ping timeout: 252 seconds]
himsin has quit [Remote host closed the connection]
emmanuelux has joined #ruby
ohcibi has joined #ruby
simao has joined #ruby
ccooke has joined #ruby
wereHamster has joined #ruby
v0n has joined #ruby
GoGoGarrett has joined #ruby
naquad has joined #ruby
zaiste has joined #ruby
_keith has joined #ruby
tiripamwe has quit [Ping timeout: 244 seconds]
ccooke has quit [Read error: Connection reset by peer]
jasonLaster has joined #ruby
ccooke has joined #ruby
iamjarvo has joined #ruby
peregrine81 has joined #ruby
_JamieD_ has joined #ruby
miho has joined #ruby
theRoUS has joined #ruby
specialGuest has quit [Ping timeout: 260 seconds]
uris has joined #ruby
danielpunt has joined #ruby
infinitiguy has joined #ruby
a_a_g has quit [Quit: Leaving.]
machty has joined #ruby
robustus has quit [Quit: robustus]
ananthakumaran has quit [Quit: Leaving.]
miho has quit [Read error: Connection reset by peer]
ccooke has quit [Read error: Connection reset by peer]
ccooke_ has joined #ruby
hynkle has joined #ruby
robotmay has joined #ruby
ccooke has joined #ruby
cantbecool has joined #ruby
ccooke_ has quit [Read error: Connection reset by peer]
jjbohn has joined #ruby
vlad_starkov has quit [Remote host closed the connection]
MarGarina has quit [Read error: Operation timed out]
verto|off is now known as verto
mike4_ has joined #ruby
invisime has joined #ruby
<invisime> when creating a gem that has a c extension, how do I specify command line arguments to my extconf.rb?
<hoelzro> invisime: what kind of command line arguments? compiler options?
Rochefort has quit [Remote host closed the connection]
cantbecool has quit [Quit: Textual IRC Client: www.textualapp.com]
fastred has joined #ruby
bbttxu has joined #ruby
fastred has left #ruby [#ruby]
<invisime> hoelzro: actually, I just want to pass a --with-otherlibrary-dir type option to extconf.rb so I can link a custom c-only shared object that my ruby .so depends on.
<hoelzro> invisime: so you want to be able to say ruby extconf.rb --with-otherlibrary-dir=/path/to/dir?
jorge_ has joined #ruby
<invisime> hoelzro: yep.
naz has joined #ruby
cantonic_ has joined #ruby
<hoelzro> well, extconf.rb is just a Ruby program, so you can pass it whatever you want
erichmenge has quit [Quit: Be back later]
ph^ has quit [Ping timeout: 268 seconds]
Stalkr_ has joined #ruby
<Spooner> invisime : You don't need to pass the argument to extconf.rb, but you do need to add it to your $CFLAGS or $LFLAGS inside extconf.rb. No point passing anything to it, since rubygems, when compiling it, won't pass anything to it.
<invisime> hoelzro: right, but this is in a gem, so it's getting called during 'gem install mygem' so there's probably a gemspec option or something.
nari has quit [Ping timeout: 240 seconds]
<hoelzro> ah ha
Takehiro has quit [Remote host closed the connection]
<invisime> Spooner: so I should just manually add stuff to $LDFLAGS and $LIBS?
<Spooner> invisime : Are you including the library in the gem or expecting the user to have it externally?
<invisime> externally.
<invisime> it'll be included in part of a larger install process.
naquad has quit [Excess Flood]
<Spooner> Then it should surely be in a set place in the filesystem?
robustus has joined #ruby
<invisime> yep.
cantonic has quit [Ping timeout: 260 seconds]
cantonic_ is now known as cantonic
withnale has quit [Read error: Connection reset by peer]
<Spooner> So you shouldn't need to pass anything in to tell the gem where it is.
mneorr has quit [Quit: Leaving.]
<Spooner> The user would only need to pass in a value, at compile time, if the library was in a user-defined location that you couldn't guess.
binaryplease has quit [Ping timeout: 248 seconds]
asteve has joined #ruby
vlad_starkov has joined #ruby
<Spooner> invisime : For example, this gem expects the enet library to have been installed: https://github.com/Dahrkael/rENet/blob/master/ext/renet/extconf.rb
robustus has quit [Client Quit]
enroxorz-work has joined #ruby
enroxorz-work has joined #ruby
enroxorz-work has quit [Changing host]
ShiintoRyuu has joined #ruby
iori has quit [Remote host closed the connection]
bowlowni has joined #ruby
danielpunt has quit [Remote host closed the connection]
naquad has joined #ruby
<invisime> ok, Spooner, I went forward with just hard-coding the paths into the extconf.rb because I know where they'll be, but then it doesn't copy the other .so into the lib directory of my gem at install time.
insecurlex has joined #ruby
<invisime> Spooner: also, I'm ending up having to explicitly set the LD_LIBRARY_PATH prior to runtime for it to even find the other .so.
<Spooner> It shouldn't need to, should it? You can use the .so where it is, can't you?
mahmoudimus has joined #ruby
kvirani has quit [Remote host closed the connection]
thunderstrike has quit [Read error: Connection reset by peer]
<invisime> Spooner: not exactly, the gem's .so doesn't know where the other .so is. so I'm relying on the LD_LIBRARY_PATH environment variable to tell the C code where to look for the other .so.
thunderstrike has joined #ruby
<invisime> Spooner: that is, if I run ldd on my gem's .so, it tells me the other so is not found. unless I set the LD_LIBRARY_PATH environment variable first.
MarGarina has joined #ruby
<Spooner> Personally, I've not created a gem of that type. I've either used pure rubyfied-C or used standard libraries (like OpenGL).
<Spooner> Or included external source in my gem directly.
<invisime> Spooner: yeah, it doesn't seem like many people have done this kind of thing.
jprovazn has quit [Quit: Leaving]
mahmoudimus has quit [Client Quit]
<Spooner> It isn't the most friendly way. Have you considered just including the source in your gem?
t62352 has quit [Remote host closed the connection]
rohit has left #ruby ["Leaving"]
t56060 has joined #ruby
<banisterfiend> Spooner: Hey Bil, what's up
<Spooner> invisime : Sorry, I meant that if you are setting LD_LIBRARY_PATH, then it doesn't matter if the external .so is in its original position or if you copy it into your gem and set the path to that location (this sounds like a bad idea)
<invisime> Spooner: can't really be done. we're relying on an external tool to create this other .so because it interacts with some proprietary hardware.
mahmoudimus has joined #ruby
<Spooner> Right, so you can't build it on the average user's machine?
triptec has quit [Ping timeout: 248 seconds]
johnlcox has joined #ruby
apeiros_ has quit [Remote host closed the connection]
<Spooner> banisterfiend : Getting a bit out of my depth on C extensions right now :D
joshman_ has joined #ruby
<invisime> Spooner: our end user is a low-resource device that would take 2 weeks to build it.
jasonLaster has quit [Remote host closed the connection]
andrewpthorp has quit [Quit: Linkinus - http://linkinus.com]
tk_ has quit [Quit: ばいばい]
jasonLaster has joined #ruby
<Spooner> invisime : In that case, I'd just include it in the gem. There is no reason for the user to manually download and install a pre-compiled library, if you can easily include it in the gem itself.
_hasny has joined #ruby
<invisime> Spooner: I'll be setting up a build script later that symlinks gcc to a cross-compiling gcc.
rakunHo has quit [Remote host closed the connection]
MarGarina has quit [Ping timeout: 252 seconds]
MarGarina has joined #ruby
thatRD has joined #ruby
<banisterfiend> Spooner: wanna watch a scifi?
dpk has quit [Quit: Asleep at the keyboard.]
<invisime> Spooner: [c binary that we get from a configuration program] -> [some c code that we want to not rebuild very often] -> [the gem's c code that we can build as often as necessary] -> [the ruby code that handles the plugin portions]
v0n has quit [Ping timeout: 246 seconds]
<invisime> Spooner: so we can remove that second box, but it would still mean that we need to link to a second binary in the gem, because we can't make that first box c source.
<Spooner> invisime : Yeah, so just include the compiled .so in the gem and you don't need to mess around nearly so much (and, in particular, it saves the user an unnecessary extra stage).
areil has joined #ruby
jprovazn has joined #ruby
<invisime> Spooner: exactly. but we still need to link it to the c code that we're making.
<invisime> Spooner: I don't think it will magically just know to use the .so in the same directory. :-/
<Spooner> Right, I thought you were arguing against making it simpler, not going back to how to manage the library path. Sorry.
ph^ has joined #ruby
jasonLaster has quit [Ping timeout: 272 seconds]
SCommette has joined #ruby
mneorr has joined #ruby
<invisime> no, I have no problem with dropping the second box. our C guy insists it's a good idea though. but either way, I end up just having to link to a single .so from my gem's .so. which doesn't seem to be very easy to do.
andrewhl has joined #ruby
robustus has joined #ruby
dhruvasagar has quit [Ping timeout: 240 seconds]
<Spooner> invisime : You should just be able to do $LDFLAGS << %< -L"#{File.expand_path("../lib", __FILE__)"> in your extconf and then have_library("nameofmyso")
cantonic has quit [Quit: cantonic]
<Spooner> Assuming you have "ext/lib/nameofmyso.so"
<Spooner> "ext/mygem/lib/nameofmyso.so" even
mmitchell has joined #ruby
<invisime> yeah, it needs a header file too, but I think I see where you're going with this.
dpk has joined #ruby
<Spooner> I do it this way to load a opengl binary on Windows: https://github.com/Spooner/ashton/blob/master/ext/ashton/extconf.rb
echobravo has quit [Read error: Connection reset by peer]
monobit_ has joined #ruby
<Spooner> And a header, of course.
mssola has left #ruby ["Konversation terminated!"]
nwest has joined #ruby
Kwpolska|vacatio has quit [Quit: leaving]
havenn has joined #ruby
Kwpolska has joined #ruby
Kwpolska has joined #ruby
Kwpolska has quit [Changing host]
<invisime> Spooner: mk. adapting my extconf...
mneorr has quit [Ping timeout: 272 seconds]
<shevy> it's too damn hot today
xixo has joined #ruby
<Spooner> invisime : I'm afraid someone with more wisdom might give you a cleaner way, but I know my way works :)
robustus has quit [Quit: robustus]
internet_user has joined #ruby
ph^_ has joined #ruby
<invisime> Spooner: what does the %{} operator mean?
rippa has joined #ruby
<hoelzro> invisime: context?
<Hanmac> shevy Spooner: have some of you an answer for that? http://www.ruby-forum.com/topic/4405056
<hoelzro> ex. %Q{foo} is the same as "foo"
<Spooner> It is just quotes. I can do "\"frog\"" or %{"frog"}
<shevy> Hanmac never heard of that... a ruby executable??
t56060 has quit [Remote host closed the connection]
<invisime> ok, what does the Q do there, and what happens if you leave it out? and/or where can I find an explanation of that syntax?
joshman_ has quit [Quit: Textual IRC Client: http://www.textualapp.com/]
t34551 has joined #ruby
<invisime> (it's very hard to google for symbols.)
<Hanmac> shevy he means ruby script -> binary file
<shevy> invisime it may come from perl
otters has quit [Read error: Connection reset by peer]
<shevy> foo = %w( a bc def )
xixo has quit [Client Quit]
v0n has joined #ruby
thatRD has quit [Quit: leaving]
<shevy> foo = %w( a bc def ) # => ["a", "bc", "def"]
<invisime> right.
<shevy> foo = %Q( a bc def ) # => " a bc def "
<Spooner> Hanmac : Nope, not a chance. Ruby "executables" just include the source and run it with ruby.exe, so it wouldn't be hidden.
triptec has joined #ruby
<invisime> I know that one. but I don't know where it's documented.
<hoelzro> there's %q, %Q, %w, %s, %r, and %x, afaik
<Muz> Hanmac: not that that would serve as a security measure.
<shevy> invisime, perhaps it means ... "w for words", "Q for quotes"
otters has joined #ruby
<mikekelly> Where does #tap get its name from ?
<hoelzro> equivalent to '', "", [], :'', //, and 11
<shevy> mikekelly from Magic the Gathering
<hoelzro> respectively.
havenn has quit [Ping timeout: 245 seconds]
<mikekelly> shevy: ?
<Spooner> hanmac And the only "executables" are on Windows/OSX anyway.
joshman_ has joined #ruby
<shevy> mikekelly you have to "tap" a card for mana in magic the gathering
ph^ has quit [Ping timeout: 245 seconds]
<shevy> or to announce that a creature attacks
<Muz> s/card/land/
stopbit has joined #ruby
<invisime> also, calling turning a card sidewise "tapping" it is patented.
<Spooner> AND even if you had a C executable, it wouldn't hide the password anyway, unless you encrypted it anyway.
<invisime> so every other card game uses "exhaust".
<shevy> "to tap" is an english word
<Spooner> invisime : Some use kneel/stand.
havenn has joined #ruby
<Hanmac> Spooner ... i could make an *.c file that includes the code and run the ruby code directly with the lib features ... but i think the pwd is still readable in the binary file right?
<invisime> but the definition of "tapping" to mean turn a card sideways is patented.
<mikekelly> is that methaphor supposed to make sense to me
<mikekelly> because I still don't get it despite your explanation
<hoelzro> Hanmac: yes; you can see it with the strings command
<shevy> what metaphor?
Urtokk has joined #ruby
<hoelzro> I thought that #tap was supposed to be like an Ethernet tap
<shevy> well in ruby you tap objects :D
<hoelzro> allowing you to listen in on traffic
<shevy> and out drops self
cakehero has joined #ruby
<Spooner> Hanmac : With a hex editor, for sure. And you'd presumably pass the password out of the c (whether encrypted or not) to pass as an argument to the Ruby, so you could intercept it easily.
<shevy> so that you can chain .foo {}.bla {}.tap {whatever}
<mikekelly> ok, so basically the name is non-intuitive
andrewhl has quit [Remote host closed the connection]
<shevy> I dunno who chose that name
<shevy> matz?
<shevy> nobu?
<banisterfiend> mikekelly: it means to tap into a call chain
<banisterfiend> it makes sense
* mikekelly shrugs
<shevy> nobu seems to be the MRI guy these days :P
<banisterfiend> mikekelly: a.b.c.d.e --> a.b.c.tap { }.d.e
<peterhellberg> One of my favorite uses of tap:
<peterhellberg> >> { user: 'foo', password: 'bar' }.tap { |h| h.delete(:password) }
<al2o3cr> (Hash) {:user=>"foo"}
<shevy> and shoue... sho... shogeda... shueda... that s* japane dude, he is also here on #ruby I think
<mikekelly> banisterfiend: ok fair enough
<shevy> *japanese
zommi has quit [Quit: Leaving.]
<banisterfiend> peterhellberg: i like this
<Spooner> Hanmac : I guess you could include a .so or .exe that contained the encrypted password and call those FROM Ruby, but it would have to do everything it needed to do with it in C, rather than coming out to Ruby again. Client-side ruby is not secure :D
<banisterfiend> peterhellberg: [1,2,3,4,5].tap(&:pop)
echobravo has joined #ruby
<banisterfiend> >> [1,2,3,4,5].tap(&:pop)
<al2o3cr> (Array) [1, 2, 3, 4]
emmanuelux has quit [Ping timeout: 256 seconds]
<csmrfx> any rubyists work with caching json requests with unique wrappers but identical content?
adac has quit [Ping timeout: 265 seconds]
paolooo has quit [Ping timeout: 245 seconds]
charliesome has quit [Quit: Textual IRC Client: www.textualapp.com]
djdb has quit [Quit: Ухожу я от вас (xchat 2.4.5 или старше)]
<peterhellberg> “The primary purpose of this method is to “tap into” a method chain, in order to perform operations on intermediate results within the chain.”
<Spooner> Hanmac : I'm always amazed how many people ask me how to obfuscate their Ruby code too and complain that the executables you can make don't do so. I think they assume their code is like gold and to let others see it would make them not be able to steal it, unlike all the great open source code out there. Ironically, any of these people's code that I've seen is dreadful, so I have to assume it is more about the embarrassment of it being peer r
<peterhellberg> csmrfx: Not specifically, but what is your problem? (And how do you want to cache it?)
mahmoudimus has quit [Quit: Computer has gone to sleep.]
<invisime> Spooner: +5 for truth
<csmrfx> Problem is that theres tons of requests in format of jQuery{#long unique string here} with responses like jQuery({#long unique string here}{much longer non unique string content}), peterhellberg
<csmrfx> so, everybody gets the same content, but it is not cached, costing a zillion
geggam has quit [Quit: Leaving]
MarGarina has quit [Ping timeout: 240 seconds]
<peterhellberg> csmrfx: You are probably talking about JSONP, not JSON
<csmrfx> yes
<Hanmac> Spooner do you think my c++-ruby-ext code of my bindings are mebarressing too?
<Spooner> Still, I look forward to the day when we can ship .rbc files (like Python's .pyc) so I don't have to read their code and my stuff can start up a bit faster!
<peterhellberg> Just cache the JSON and use a fast JSON-P middleware/generator
<Spooner> Hanmac : I don't know what you mean.
MarGarina has joined #ruby
axl_ has joined #ruby
t34551 has quit [Remote host closed the connection]
<Spooner> Hanmac : You didn't ask _me_ how to obfuscate it though, so it might be OK :P
kvirani has joined #ruby
t35790 has joined #ruby
<peterhellberg> csmrfx: I’m usually doing that with Redis, but any (fast) data store will do
<csmrfx> peterhellberg: ok
beneggett has quit [Quit: Computer has gone to sleep.]
cantonic has joined #ruby
<Hanmac> i mean do i need to be shamed for my c++ruby-ext code?
<Hanmac> seeable maybe there: https://github.com/Hanmac/libogre-ruby
<Spooner> I'm by far not an expert on C extension code and since you have the source on github, it isn't hidden from the prying eyes of people who might laugh at it!
punkrawkR has joined #ruby
aganov has quit [Remote host closed the connection]
<Spooner> So I have no problem with it at all :D
ndngvr has quit [Read error: Connection reset by peer]
banisterfiend has quit [Read error: Connection reset by peer]
apeiros_ has joined #ruby
krusty_ar_ has joined #ruby
<Hanmac> i used C-Macros for a bit "obfuscating" :P
<Spooner> Hanmac : You might tempt me to try Ogre for my next game though.
thatRD has joined #ruby
<Spooner> Oh yeah, MACROS will do that nicely.
krusty_ar has quit [Ping timeout: 260 seconds]
tagrudev has quit [Read error: Connection reset by peer]
banisterfiend has joined #ruby
vlad_starkov has quit [Remote host closed the connection]
ndngvr has joined #ruby
apeiros_ has quit [Remote host closed the connection]
vlad_starkov has joined #ruby
<Spooner> Hanmac : How are you getting on with it? Any idea when it will be released (libogre-ruby, that is)?
paolooo has joined #ruby
luxurymode has joined #ruby
sazboom has joined #ruby
<Hanmac> i dont know .. when its ready :P currently its an one-man project :P but i keep forward
theRoUS has quit [Ping timeout: 260 seconds]
<Spooner> I am not so interested in real 3D though, mainly because I don't have any modelling or texturing skills and I think I'd have to invest a stupid amount of time in getting up to the same level (mostly useless) at those as I am in 2D. I may start adding 3D elements to my 2D Gosu games, but using raw OpenGL. I am interested in Ogre in abstract though and particularly on what could be achieved with it using Ruby behind it.
Cache_Money has joined #ruby
fbernier has joined #ruby
thatRD has quit [Quit: thatRD]
circlicious has left #ruby [#ruby]
thatRD has joined #ruby
adac has joined #ruby
berserkr has quit [Quit: Leaving.]
Guest22700 has quit [Ping timeout: 244 seconds]
Drakx has quit [Read error: Connection reset by peer]
<invisime> Spooner: so I've added to the $LDFLAGS and $CFLAGS, the -L and -I flags with the locations of my lib and include directories respectively, but when I subsequently call have_library, it doesn't find the lib.
<Spooner> Does have_library expect .lib rather than .so? (I don't know).
jorge_ has quit [Remote host closed the connection]
<Hanmac> invisime ... there is an mkmf.log ... post it
thatRD has quit [Client Quit]
<hoelzro> Spooner: I think it takes what it can get
<Spooner> hoelzro : OKey.
<hoelzro> it probably tries .lib and .dll on Windows, and .a and .so on Linux
mahmoudimus has joined #ruby
thatRD has joined #ruby
<Spooner> invisime : You could try without have_library and see if it works anyway (since you have the paths set up right, it _should_ just work). Another guess which probably won't work though.
bluenemo has quit [Ping timeout: 265 seconds]
<invisime> right now, it's silently failing. :-/
<Spooner> As Hanmac says, there should be a log generated
coalhada has joined #ruby
mahmoudimus has quit [Client Quit]
itnomad has joined #ruby
<invisime> Spooner: ok, found it. it's in my gem install folder. I'll post it shortly.
MarGarina has quit [Ping timeout: 265 seconds]
MarGarina has joined #ruby
<Spooner> zil_dir should be File.expand_path "../zil", __FILE__
<Spooner> That is assuming the zil folder is in the same dir as extconf.rb
fbernier has quit [Ping timeout: 240 seconds]
coalhada has left #ruby ["Leaving..."]
rump has joined #ruby
insecurlex has quit [Remote host closed the connection]
rump has left #ruby [#ruby]
TPFC-SYSTEM has quit [Quit: TPFC-SYSTEM]
tomsthumb_ has quit [Quit: Leaving.]
Matt_ has joined #ruby
Matt_ is now known as Guest64451
MarGarina has quit [Ping timeout: 240 seconds]
t35790 has quit [Remote host closed the connection]
t36845 has joined #ruby
bbttxu has quit [Quit: bbttxu]
andrewhl has joined #ruby
MarGarina has joined #ruby
Squarepy has quit [Read error: Connection reset by peer]
Squarepy has joined #ruby
krusty_ar_ is now known as krusty_ar
<Spooner> invisime : Though looks like you could get away with zil_dir = "zil" (I hate making assumptions about where cwd is though).
Takehiro has joined #ruby
ckrailo has joined #ruby
theRoUS has joined #ruby
theRoUS has quit [Changing host]
theRoUS has joined #ruby
<cool> Suppose, foo = ['x', 'y', 'z'] & do foo[2,0] which would return []. Does exactly does this syntax(foo[2,0]) does?
ShiintoRyuu has quit [Quit: Computer has gone to sleep.]
<hoelzro> cool: it returns a slice
<Spooner> cool it is 0 characters starting from index 2
<hoelzro> or a substring
<Spooner> *zero elements, not characters (in this case).
zodiak has joined #ruby
* cool checks
kyktommy has joined #ruby
<cool> Hmm...so a[3,0] returns [], but a[4,0] returns nil why?
bluenemo has joined #ruby
bluenemo has joined #ruby
bluenemo has quit [Changing host]
<Mon_Ouie> Because with a a[3, n], 3 is still within the array — 4 isn't
<banisterfiend> cool: dare u to google it :P (hint there's a tonne of answers online)
Tref has quit [Quit: Tref]
mengu has quit [Quit: Konversation terminated!]
qwerxy_ has joined #ruby
qwerxy has quit [Read error: No route to host]
<Spooner> banisterfiend : In fairness, it is hard to know what to google to get an answer (if you don't know the answer).
<cool> actually, a friend posed this question to me & I didn't know it. Maybe I am stupid :(
<banisterfiend> Spooner: "weird ruby array slice behaviour" :P
adeponte has quit [Remote host closed the connection]
<cool> regardless, I think I understand this now
<shevy> cool well you can give any number "abc"[3,1323236236236236] # => ""
<shevy> "abc"[2,1323236236236236] # => "c"
<shevy> "abc"[2,1] # => "c"
bbttxu has joined #ruby
<shevy> "abc"[-2,+51] # => "bc"
<shevy> hehe
<Hanmac> shevy:
<Hanmac> >> "abce"["c"]
<al2o3cr> (String) "c"
<matti> shevy: Show off ;p
<Hanmac> >> "abce"["d"]
<al2o3cr> (NilClass) nil
<shevy> hey
<matti> shevy: :)
<shevy> I dont think I have seen "abce"["b"] before
<Hanmac> but it exist :P
MarGarina has quit [Ping timeout: 246 seconds]
_hasny has quit [Quit: Leaving.]
venkatk_ has quit [Quit: This computer has gone to sleep]
<Hanmac> only for your entertainment XD
<Spooner> It is more commonly used with a regexp "abce"[/b|c/] => "b"
pricees has joined #ruby
<cool> shevy: ab is any empty array?
<Spooner> Otherwise, it would be cleaner to use "abce".include? "b"
<cool> oh, sorry. its a string
MarGarina has joined #ruby
sepp2k has quit [Remote host closed the connection]
<cool> and in ruby, I guess we can treat strings as arrays?
<CodeFriar> I'm trying to write a class that includes a module. That module needs to be able to call new on the including class. However, when i make that call, it tries to create a new instance of the module
<shevy> cool the [] operator will work on Array and String objects in ruby
<CodeFriar> which isn't even possible
<Spooner> No, it is just that a lot of the operations on Array are the same on String (even if they are implemented differently).
<shevy> cool and yeah, you can count in both ways pretty much [start, end]
<shevy> well actually not end
<shevy> but start+number
<shevy> [5,1] one position
kyktommy has quit [Quit: kyktommy]
<Hanmac> cool: the only difference ... Strings are not enumerable anymore
<shevy> "abcdefghi"[5,1] # => "f"
jprovazn_ has joined #ruby
<Hanmac> >> "abcdefghi"[5,1]
<al2o3cr> (String) "f"
hakanensari has joined #ruby
<Hanmac> >> "abcdefghi"[5..6]
<al2o3cr> (String) "fg"
hakanensari has left #ruby [#ruby]
<shevy> cool, for Arrays:
hynkle has quit [Ping timeout: 250 seconds]
<Hanmac> >> "abcdefghi"[5,2]
<al2o3cr> (String) "fg"
<shevy> ["a","b","c","d","e","f","g","h","i"][5,1] # => ["f"]
<shevy> al2o3cr you silly bot!
<CodeFriar> how is that happening? I can't even call self.class.new
<Spooner> Hanmac : Presumably because you need to specify if they are bytes or chars nowadays? (so you need to #chars or #bytes them (or #each_byte, #each_char), before they can enumerate?)
<shevy> CodeFriar, what error message do you get
rajmahendra has joined #ruby
<CodeFriar> shevy: wrong number of arugments (1 for 0)
jprovazn has quit [Ping timeout: 245 seconds]
<banisterfiend> cool: maybe #initialize requires a parameter
<rajmahendra> hi is this a ruby lang irc channel ?
<banisterfiend> CodeFriar: *
<csmrfx> yes
<csmrfx> > p "yes"
<rajmahendra> I am using macpro and i have some issue with rvm.
<CodeFriar> banisterfiend: *1* for *0*
<csmrfx> >> puts "yes"
<al2o3cr> (NilClass) nil, Console: yes
<rajmahendra> anyone help me ?
<CodeFriar> yet initialize is marked as initialize(options = {})
<shevy> CodeFriar well then new() expects one argument (from def initialize)
<Hanmac> rajmahendra: there is an #rvm channel too ... it may be more helpful
MarGarina has quit [Ping timeout: 252 seconds]
<csmrfx> >> p "#rvm" @ rajmahendra
<al2o3cr> -e:1:in `eval': (eval):1: syntax error, unexpected $undefined, expecting $end (SyntaxError), p "#rvm" @ rajmahendra, ^, from -e:1:in `<main>'
<banisterfiend> CodeFriar: hmm
<CodeFriar> shevy: that would be 0 for 1 arguments
<rajmahendra> Hanmac: thank you :)
<Spooner> CodeFriar : That doesn't mean it is definitely calling initialize on the module though.
<banisterfiend> CodeFriar: play with it in a debugger
<csmrfx> oh, no @ function
hynkle has joined #ruby
<Muz> rajmahendra: rather than asking for help, actually describe your problem with useful information such as what you're trying, what you get, what you expected.
<shevy> please notice that Muz properly finishes his sentences with a '.'
<Spooner> There is nothing special in that, shevy.
<CodeFriar> banisterfiend: in pry atm. it's referencing a user object only user object i know of is the module.
tomsthumb_ has joined #ruby
<shevy> Spooner hah he is the only one who does
<rajmahendra> i am unable to join #rvm channel it says you need to be identified with services
maesbn has quit [Remote host closed the connection]
himsin has joined #ruby
<shevy> Spooner, even you don't do this always :D "<Spooner> cool it is 0 characters starting from index 2" <--- no '.' !!!
<Spooner> shevy : Except me and everyone else who does (I append them in my mind, so I don't have to hit people with shovels every day).
<banisterfiend> CodeFriar: mess with show-source on it
<shevy> but you don't always!
<shevy> I scrolled up!
<shevy> now Muz on the other hand...
<Spooner> Oh, you caught me out then.
<shevy> my new mission is to see Muz not finish a sentence properly (one day...)
<Muz> Oh dear.
<shevy> :(
<rajmahendra> I am using MacBookPro and i wanted to use awestruct so i installed rvm and then ruby and gem and then installed awestruct it worked for 2 days but 3rd day when i try to run awestruct the command prompet says 'command not found' is ther any reason why suddently gem is missing ?
jprovazn_ is now known as jprovazn_away
<Spooner> You give shevy purpose. It is a reason for getting up in the morning!
<shevy> \o/
<shevy> rajmahendra, those bugs are the strangest
<Muz> Aside from the day job?
<CodeFriar> rajmahendra: your terminal session lost access to the rvm environment
<shevy> rajmahendra but perhaps some setting was changed
<Spooner> Muz: I doubt that is as important as your new goal (to give poor shevy something to do).
hynkle has quit [Ping timeout: 240 seconds]
<shevy> I had the funniest errors once when I assigned to the TZ variable in bash... only later did I find out that bash assumes TZ to be the "time zone" variable...
<rajmahendra> do i need to change anything for the setting ?
<shevy> I'll get Muz one day... when he is drunk... or tired... he'll have one sentence without '.'
machty_ has joined #ruby
<CodeFriar> rajmahendra: try restarting your terminal
v0n has quit [Ping timeout: 246 seconds]
machty has quit [Read error: Connection reset by peer]
machty_ is now known as machty
davidcelis has quit [Quit: K-Lined.]
bradhe has joined #ruby
<Spooner> I realise now that shevy's quote of me doesn't start with a capital either. I must be drunk or tired!
<shevy> Spooner Muz just has the most awesome discipline
<shevy> he needs to be dragged down to our level
Criztian has quit [Remote host closed the connection]
<Spooner> I must just imagine my perfection. My code indentation is probably dreadful too, but I see it as immaculate :P
bbttxu has quit [Quit: bbttxu]
<shevy> hehe
<shevy> you use 2 spaces?
<Spooner> I _believe_ I do.
<shevy> good!
<rajmahendra> once i install rvm is ther any sys variable it creates ?
<shevy> Muz, what indentation level do you use? 2 spaces?
<Spooner> But I believed I always used capitalisation and full stops.
<rajmahendra> if it sets any variable then i can set it manually on my .bashrc
ccooke has quit [Ping timeout: 245 seconds]
<CodeFriar> rajmahendra: read the rvm installation docs
<Muz> shevy: I do.
miho has joined #ruby
hynkle has joined #ruby
verbad has joined #ruby
havenn has quit [Remote host closed the connection]
verto is now known as verto|off
willb has quit [Ping timeout: 244 seconds]
wvms has left #ruby [#ruby]
<workmad3> Spooner: my indentation is wonderful: <esc>G=gg<cr>:wqa :)
havenn has joined #ruby
otzy007 has joined #ruby
Cache_Money has quit [Ping timeout: 252 seconds]
ccooke has joined #ruby
halfie has left #ruby ["WeeChat 0.3.5"]
timonv has quit [Remote host closed the connection]
willb has joined #ruby
<Hanmac> ruby CAN warn when the indentation is wrong ... but its not activated by default
t36845 has quit [Remote host closed the connection]
t63494 has joined #ruby
Squarepy has quit [Quit: Leaving]
robustus has joined #ruby
erichmenge has joined #ruby
hadees has quit [Quit: hadees]
cantonic has quit [Quit: cantonic]
flip_digits has joined #ruby
<cool> shevy Spooner in the docs(http://www.ruby-doc.org/core-1.9.3/Array.html#method-i-5B-5D), a[5,1] = [] & a[6,1] = nil but thing is both elements do not exist?
Vert has quit [Read error: Connection reset by peer]
quazimodo has quit [Quit: Lost terminal]
v0n has joined #ruby
apacala has joined #ruby
wobr1 has quit [Ping timeout: 252 seconds]
clocKwize has quit [Quit: clocKwize]
apacala has quit [Remote host closed the connection]
berserkr has joined #ruby
fgro has joined #ruby
banseljaj is now known as imami|afk
mneorr has joined #ruby
<fgro> with popen3, how can i get the exit status (see if the command was successful?)
<fgro> i don't want to use backticks and globals variables to remain thread safe
baroquebobcat has joined #ruby
kpshek has quit []
otzy007 has quit [Quit: Leaving]
entrenador has joined #ruby
_keith has quit [Quit: _keith]
gvz has quit [Read error: Connection reset by peer]
Foxandxss has quit [Quit: KVIrc 4.2.0 Equilibrium http://www.kvirc.net/]
entrenador has quit [Remote host closed the connection]
wpaulson has joined #ruby
gvz has joined #ruby
hoelzro is now known as hoelzro|away
peregrine81 has quit [Quit: Goodbye.]
senny_ has quit [Remote host closed the connection]
mikepack has joined #ruby
pyreal has joined #ruby
hadees has joined #ruby
csmrfx has left #ruby ["later"]
axl__ has joined #ruby
busybox42 has joined #ruby
luckyruby has joined #ruby
maletor has joined #ruby
MasterIdler_ has joined #ruby
axl_ has quit [Ping timeout: 252 seconds]
axl__ is now known as axl_
flori has quit [Remote host closed the connection]
flori has joined #ruby
dekroning has quit [Ping timeout: 256 seconds]
iori has joined #ruby
jorge_ has joined #ruby
mmitchell has quit [Read error: Connection reset by peer]
al2o3cr has quit [Read error: Connection reset by peer]
Takehiro has quit [Remote host closed the connection]
fgro has quit [Quit: Lost terminal]
recycle has joined #ruby
MarGarina has joined #ruby
mmitchell has joined #ruby
recycle has quit [Remote host closed the connection]
wpaulson has quit [Quit: Colloquy for iPhone - http://colloquy.mobi]
davidcelis has joined #ruby
peterhellberg has quit [Remote host closed the connection]
yasushi has joined #ruby
_keith has joined #ruby
jorge_ has quit [Ping timeout: 246 seconds]
recycle has joined #ruby
iflista has joined #ruby
yasushi has quit [Remote host closed the connection]
al2o3cr has joined #ruby
mahmoudimus has joined #ruby
locriani has quit [Remote host closed the connection]
verbad has quit []
gqlewis has joined #ruby
eywu has joined #ruby
MarGarina has quit [Quit: leaving]
Guest37999 has quit [Ping timeout: 240 seconds]
emmanuelux has joined #ruby
Progster has quit [Ping timeout: 272 seconds]
havenn has quit [Remote host closed the connection]
robotmay has quit [Remote host closed the connection]
chussenot_ has joined #ruby
chussenot_ has quit [Client Quit]
Guest37999 has joined #ruby
jwmann has joined #ruby
jwmann has quit [Max SendQ exceeded]
jwmann has joined #ruby
jwmann has quit [Max SendQ exceeded]
chussenot has quit [Ping timeout: 240 seconds]
jwmann has joined #ruby
jwmann has quit [Max SendQ exceeded]
kuranai has joined #ruby
jwmann has joined #ruby
jwmann has quit [Max SendQ exceeded]
Takehiro has joined #ruby
theRoUS has quit [Ping timeout: 260 seconds]
xorigin has quit [Quit: leaving]
Guest64451 has quit [Ping timeout: 272 seconds]
gvz has quit [Quit: Leaving]
apok has joined #ruby
<lectrick> shevy: or banisterfiend: Any idea how I can make an instance method of a class see variables defined in the area where that method is called? https://gist.github.com/49ff8fc0d0a84df565a7 is an example
shevy has quit [Ping timeout: 252 seconds]
<lectrick> argh this goes back to the Binding.of_caller thing, doesn't it. grrr
mmitchell has quit [Remote host closed the connection]
bigmeow has joined #ruby
<Spooner> cool : I don't really understand why; it is just how it is. You can argue that index 5 is directly after the last element, but 6 is completely separate, but frankly I think it is just a case of "because that is how it works" (and Ruby failing on its promise of least surprise for noobies, even if it makes sense for some people on some higher plane).
<Spooner> lectrick : If you need to do that, then the method is broken. That is what parameters are for...so use them.
<lectrick> Spooner: I am redefining a method whose behavior changes based on its context though
<Spooner> lectrick : Yes, but the caller should pass what it wants the instance to see. There isn't any sensible usecase (outside of tools like Pry) that really need you to see the external binding, rather than the external just passing more variables.
Synthead has joined #ruby
t63494 has quit [Remote host closed the connection]
<Hanmac> lectrick you could use binding() but i not recomend that
sdwrage has joined #ruby
t32096 has joined #ruby
kuranai has quit [Remote host closed the connection]
Tref has joined #ruby
kuranai has joined #ruby
jorge_ has joined #ruby
dross has joined #ruby
<Spooner> lectrick : The likelihood is that your design is flawed. Perhaps explain why you _need_ to access the external variables, rather than just asking the caller to pass in the vales you need to see. There is likely a much cleaner way to achieve what you want to do than hacking bindings.
savage- has joined #ruby
tayy has joined #ruby
DrShoggoth has joined #ruby
adac has quit [Ping timeout: 260 seconds]
<Hanmac> Spooner: what is better: object.section(material) {|o| o.vector(...)} or object.section(material) { vector(...) } ? (the vector method add an new vector inside an Ogre::ManualObject) ... the first one uses yield, the other instance_eval ... or should i support both?¿
jonathanwallace has quit [Remote host closed the connection]
paolooo_ has joined #ruby
<lectrick> Spooner: I'm 90% done with implementing Refinements in pure Ruby.
<lectrick> The only hard part is scoping.
<Spooner> I think you should either use yield. The problem with instance_eval is that you immediately give them the context of the object and potential to access private methods and variables. I have a magic wrapper to make instance_eval nicer though :) Keep meaning to make it a separate gem.
<Spooner> I mean you should just use yield(self).
paolooo has quit [Ping timeout: 245 seconds]
qwerxy_ has quit [Read error: Connection reset by peer]
<Spooner> hanmac Any thoughts whether this would be a useful gem (that is, it isn't jsut like another gem)? https://github.com/Spooner/releasy/blob/master/lib/releasy/dsl_wrapper.rb
qwerxy has joined #ruby
ibash has joined #ruby
brianpWins has joined #ruby
<Spooner> Reminds me I should use public_send et al in there.
shevy has joined #ruby
adeponte has joined #ruby
jorge_ has quit [Remote host closed the connection]
<Hanmac> hm ... maybe usefull ... but i think i will use yield ...
apok has quit [Quit: apok]
araujo has quit [Remote host closed the connection]
ibash has quit [Client Quit]
<Spooner> Not sure why I felt I needed to avoid putting everything in method_missing, but we won't go there :) I'll try to get around to it one day then.
<Spooner> (making dsl_wrapper gem, that is).
adamkittelson has joined #ruby
maletor has quit [Quit: Computer has gone to sleep.]
Tref has quit [Quit: Tref]
iori has quit [Ping timeout: 245 seconds]
<Spooner> lectrick : "I'm 90% done with implementing Refinements in pure Ruby." Just because it is nearly finished doesn't mean it is well-designed. What you are doing just smells fishy to me and is likely to cause no end of headaches for users in the future.
<Hanmac> Spooner: what is funny too: an def inside a def with the same name :P
<lectrick> Spooner: I have a comprehensive test suite? :)
Advocation has quit [Quit: Advocation]
<Spooner> comprehensize test suites don't prove anything either. I have things that are broken with thousands of tests :P
<Hanmac> lectrick from wich language do you port? sometime an wrapper is better than a porter *g
apeiros_ has joined #ruby
iori has joined #ruby
havenn has joined #ruby
theRoUS has joined #ruby
theRoUS has joined #ruby
theRoUS has quit [Changing host]
havenn has quit [Remote host closed the connection]
<Spooner> Mainly because it is easier to test stuff that is simple to test a million times, than to test all the stuff that really is badly designed to be able to be tested (and here, I'm talking about my own bad designs).
<Spooner> That is true; what language does it come from and what language/lib really needs to have access to the equivalent of the caller's binding?
nullsign has joined #ruby
drohan has joined #ruby
<Spooner> lectrick : Are these the refinements you are talking about? http://timelessrepo.com/refinements-in-ruby
Progster has joined #ruby
<lectrick> Spooner: You are probably right. I am mainly doing this as an exercise in my own metaprogramming skill.
xaxxon has quit [Quit: This computer has gone to sleep]
<lectrick> Spooner: Yes, that's the one. I even have class methods working, which that blog entry says won't work
headius has joined #ruby
<lectrick> But I do not have class scoped refinements working.
<lectrick> I have refinements working in a block, but that's easy
maletor has joined #ruby
t32096 has quit [Remote host closed the connection]
jorge_ has joined #ruby
randomautomator has joined #ruby
t12914 has joined #ruby
locriani has joined #ruby
locriani has quit [Changing host]
locriani has joined #ruby
<Spooner> lectrick : Well, the goal is admirable (in that I can see it being very useful to monkeypatch Fixnum in my gem, without immediately breaking other gems).
kuranai has quit [Remote host closed the connection]
olrrai has joined #ruby
<lectrick> Spooner: Yes, I've become smitten with this idea and that is where the obsession began lol.
kuranai has joined #ruby
<lectrick> I'm sorry I ever read about it.
Xeago has quit [Ping timeout: 245 seconds]
<Spooner> Interesting that the guy needed to patch the Ruby source to get it to work, even if your implementation is going to be a lot slower in pure Ruby (like that matters most of the time).
araujo has joined #ruby
araujo has quit [Changing host]
araujo has joined #ruby
<lectrick> Right. I'm going pure-Ruby and as much feature parity as I can figure out.
rajmahendra has quit [Remote host closed the connection]
Morkel has quit [Quit: Morkel]
<Mon_Ouie> How do you implement lexical scoping?
<lectrick> My implementation will only work in a single threaded scenario though. Perhaps the Ruby source patch works in a multithreaded situation, Spooner
ngoldman has joined #ruby
<lectrick> Mon_Ouie: That's the hardest part. Actually that's arguably the entire problem. I'm basically faking it for now.
<Spooner> lectrick : Fair enough, but CRuby, now we have fibers, gains a lot less from using threads than it used to.
havenn has joined #ruby
suppp has joined #ruby
schleppy has joined #ruby
TPFC-SYSTEM has joined #ruby
<lectrick> Mon_Ouie: I'm trying to take advantage of things naturally going out of scope (like instance variables) causing the refinement stack to revert to an earlier version
ringotwo has quit [Remote host closed the connection]
<Spooner> And your system is Ruby, not CRuby based, so should work on any Ruby platform. Hmm, well, I suppose this is a case where hacking (using bindings as you suggest) makes _some_ sense. I am not a great metaprogrammer, so I can't think of a better way to do it with or without bindings.
<lectrick> Spooner: yeah :/
benatkin has quit [Ping timeout: 244 seconds]
<Hanmac> my gems only work for CRuby :'(
locriani has quit [Ping timeout: 252 seconds]
<lectrick> Spooner: This is not the first time I've run into where knowing the binding of the caller would be useful, but Binding.of_caller is apparently a fugly, slow hack
havenn_ has joined #ruby
<lectrick> Spooner: Without explicitly passing it in, I mean.
benatkin has joined #ruby
kuranai has left #ruby [#ruby]
<Spooner> Hanmac: You should stop writing C extensions when you could use ffi then :P (I'm considering rewriting an ffi gem I wrote as an extension because it is more than a bit flakey :D).
<Hanmac> i dont think ffi works for C++ libs :D
<rking> Hrm, having trouble seeing whether Ruby is weak on this one or if it's just *my* Ruby: In Coffee you can do the following (forgive multiline please, it'll be a total of 3 including this one):
<rking> f
<rking> arg: val
<juha_> i'm trying to delete a row from mysql using a id (integer) coming from an user input (string), what would be the best way to escape that and to check that it is a number? id.is_a? Integer returns false because of string and if i force it to integer with id.to_i, mysql statement won't work
<juha_> "can't convert Fixnum into String "
<rking> (And you can continue on with the named params after that.) In Ruby I'd have to either put an "arg: val" on the same line as the "f", followed by a comma, or else backslash after "f", right?
mmitchell has joined #ruby
<Spooner> rking : Or use brackets
<rking> juha_: User input is always a sticky issue. I'd probably start with /^\d+$/ and go from there.
<rking> Spooner: K, so Coffee: 1, Ruby: 0 on this one. =\
paolooo_ has quit [Quit: Page closed]
<Hanmac> rking why is Coffee better?
paolooo has joined #ruby
<juha_> rking: what i was thinking was a stupid hack like this: if id.to_i === 0 return false, but i still have the sql issue..
<juha_> would id.to_i.to_s work?
recycle has quit [Remote host closed the connection]
recycle has joined #ruby
<rking> Hanmac: Because this: f
<Spooner> juha_ : The problem is that "0".to_i == 0
<rking> arg1: val1
<rking> arg2: val2
<rking> Crap, bad indentation. =( Defeats purpose of multilining entirely. =(
<juha_> Spooner: that's ok, in this case i don't have any rows with id 0
<chiel> rking: just make a gist? :P
<juha_> Spooner: ok for today, not ok next week
<Spooner> juha_ : As someone said, use a regexp to pull out the number makes more sense.
mike4_ has quit [Ping timeout: 276 seconds]
<Hanmac> >> def f(opt);end; f(arg1: "val1",arg2: "val2")
<al2o3cr> (NilClass) nil
<rking> Hanmac: So of course it's going to win on the virtue of its optional commas. That's a thing that Jashkenas did that's pretty awesome IMO, taking optional semis to the next level.
<rking> Hanmac: Yes, but I'm just micro-golfing the call at the moment, because this is such a common thing.
niklasb has joined #ruby
<rking> What I've been doing in actual code is either finding a key that is clearly the most important, and putting it on the line with the method and having a trailing comma, or else backslashing
<Hanmac> i hate languages that forces me to indent or to newline
<rking> I heart such languages.
<rking> Only ever run into trouble when doing print "foo" debugging
venkatk_ has joined #ruby
<Hanmac> in ruby you are free to do
banghouse has joined #ruby
<rking> And then it's a matter of a few << or >>'s in vim
[diecast] has joined #ruby
Takehiro has quit [Remote host closed the connection]
i0n has joined #ruby
i0n has quit [Changing host]
i0n has joined #ruby
a_a_g has joined #ruby
<Spooner> It is also the fact that CoffeeScript is significantly newer. If Ruby was designed today, rather than 20 years ago, I'm sure it would have sugar like that, but when it was made it had massive sugar compared to the alternatives. Still, doesn't excuse Ruby for not being cleaner, of course.
macer1 has quit [Changing host]
macer1 has joined #ruby
brisbin has joined #ruby
<nullsign> Ruby is 20 years old?
recycle_ has joined #ruby
hmans has quit [Quit: Leaving...]
moshee has quit [Ping timeout: 245 seconds]
t12914 has quit [Remote host closed the connection]
<elaptics> nearly
<rking> Spooner: Yes, you're right. Hash args in particular are only 1.9-sugarized.
<elaptics> 1995 I think it was created
<Spooner> Oh, no 1995 is only 17 years ago.
moshee has joined #ruby
moshee has joined #ruby
moshee has quit [Changing host]
recycle has quit [Read error: Connection reset by peer]
t34993 has joined #ruby
Liothen has quit [Remote host closed the connection]
jenrzzz has joined #ruby
<rking> Spooner: Ruby beats Coffee on optional parens in many cases, because of Coffee's (foolish?) adherence to the JS semantics that parenless, argless function members are references to the function, not function calls.
<rking> Which is especially bad, IMO, because it ever so slightly discourages breaking methods up into smaller pieces.
Liothen has joined #ruby
Liothen has joined #ruby
Liothen has quit [Changing host]
verto|off is now known as verto
Takehiro has joined #ruby
opus has joined #ruby
c0rn_ has joined #ruby
apok has joined #ruby
mrsolo has joined #ruby
<Spooner> rking : So you need to do coffee() or coffee(a, b) or coffee_method a, b ?
mucker has joined #ruby
ShiintoRyuu has joined #ruby
<rking> coffee() and coffe a, b and @coffee_method a, b
<juha_> nice, thanks guys
Criztian has joined #ruby
fantazo has quit [Remote host closed the connection]
<rking> But it's a bit better with regard to letting you leave off parens for nested calls. I haven't actually figured out what Ruby's rules are for exploding with a syntax error in those cases.
krz has joined #ruby
bier_ has joined #ruby
<rking> Coffee pretty much always has *an* interpretation, and when it's not the one you want you can add parens. (Though, to hate on the "f()" meme I usually put them outside, like "(f a, b)"
<rking> )
banisterfiend has quit [Read error: Connection reset by peer]
bier has quit [Ping timeout: 244 seconds]
mike4_ has joined #ruby
kenichi has joined #ruby
<Hanmac> rking: so it copy object-c too with this [shit: other] ? :P
<Spooner> I used to do taht in Ruby, I have to admit. It made more logical sense on some level.
tnk1 has quit [Ping timeout: 272 seconds]
gift has quit [Remote host closed the connection]
tnk1 has joined #ruby
GoldenCider has joined #ruby
banisterfiend has joined #ruby
GoldenCider has quit [Remote host closed the connection]
havenn_ has quit [Remote host closed the connection]
hynkle has quit [Ping timeout: 252 seconds]
<rking> I do it in Ruby also, to demonstrate the point. No admitting needed.
MoMo has quit [Quit: Connection closed for inactivity]
<rking> Entering optional parens are almost always either fraidycatness or clinging-to-dusty-traditionness, IMO.
<Spooner> I don't do it any more though. I omit parens as much as I can to avoid syntax fails though.
<rking> Hanmac: I don't know ObjC, can you explain that?
azm has joined #ruby
azm has quit [Changing host]
azm has joined #ruby
bluenemo has quit [Remote host closed the connection]
pricees has quit [Ping timeout: 272 seconds]
fmcgeough has joined #ruby
hynkle has joined #ruby
ringotwo has joined #ruby
haxrbyte_ has quit [Ping timeout: 260 seconds]
<Hanmac> rking its like C ... with more Shit inside :D
jenrzzz has quit [Ping timeout: 246 seconds]
sdwrage has quit [Quit: geekli.st/programmer]
<Spooner> I am still in two minds though, about the whole omit-parens thing. I do feel that noobies are going to struggle with the rules over when they need and don't need parens. I'm still convinced that I parse code marginally better with the parens, though I do like removing all clutter on another level.
emmanuelux has quit [Ping timeout: 260 seconds]
Guedes has joined #ruby
jorge_ has quit [Remote host closed the connection]
<brisbin> if there's some scenario where something always works except the few times it matters, i usually just do it the way that it always works (i.e. i use parens and i pretend and/or doesn't exist)
<brisbin> that's just me though
<fowl> >> def foo()end
<al2o3cr> (NilClass) nil
<rking> Spooner: The key for me on that one is that any subexpression that is that confusing is a code smell to be its own statement.
tayy has quit [Remote host closed the connection]
<Spooner> rking : Reasonable argument.
gmci has joined #ruby
<rking> Spooner: I'm a big fan of temp vars to explain bits, and then those graduate into methods the instant they're useful outside that method.
adac has joined #ruby
lurch_ has quit [Quit: lurch_]
<fowl> rking: do you believe that your code grows like beautiful water lily?
Niamkik has joined #ruby
<Hanmac> Spooner: some users remove to much () or they wonder that there is an difference between do...end and {...}
<rking> Spooner: I've wanted for a while to get Ruby-parenists at the same table as mathematicians and let them try to argue for f(a) as being valid, as it relates to (1/2)+3
<rking> fowl: Beautifuller, sometimes.
voodoofish430 has joined #ruby
Progster has quit [Ping timeout: 260 seconds]
<Spooner> Hanmac : Yeah, that does get people. The classic "meth frog {|x| ...}" confusion
arvidkahl has joined #ruby
ianbrandt has joined #ruby
<Hanmac> fowl more like mushrooms ... in the dark and on dirt :P
<Spooner> I moved from and/or recently, back to the &&|| because people seemed to hate on words. Not only does it force me to use a lot more parens, but &&|| just make me want to wretch when I have perfectly good and/or to use :) Think I might go back to and/or
<rking> Yeah. A fungus is probably a much more appropriate analogy for my code.
Matt__ has joined #ruby
<rking> Spooner: Yeah, both are useful.
apok has quit [Remote host closed the connection]
apok has joined #ruby
elhu has quit [Ping timeout: 244 seconds]
<Spooner> I just find: "if x.is_a? Chicken and y.is_a? Banana" easier to grok than "if x.is_a?(Chicken) && y.is_a?(Banana)"
ibash has joined #ruby
sailias has joined #ruby
gift has joined #ruby
drohan has quit [Quit: Saliendo]
<Spooner> But until recently, I hadn't done any non-ruby coding, so && just seemed alien (I've already started using // and # interchangeably in Ruby and C :/).
graft has joined #ruby
graft has joined #ruby
graft has quit [Changing host]
hynkle has quit []
hynkle has joined #ruby
alvaro_o has joined #ruby
himsin has quit [Ping timeout: 246 seconds]
hukl has joined #ruby
poga has joined #ruby
himsin has joined #ruby
xclite has quit [Remote host closed the connection]
<Hanmac> Spooner ... and cousin of me make a "mod" to gcc so you could use "wenn()" instead of "if()"
machty_ has joined #ruby
mxbtty has joined #ruby
machty has quit [Read error: Connection reset by peer]
machty_ is now known as machty
<lectrick> How do I hook into when a constant or class is defined? What's that event name/callback?
<Spooner> #define UNLESS(X) if(!(X)) :P
kaiwren has joined #ruby
kaiwren has quit [Client Quit]
urbann has joined #ruby
yxhvuud has joined #ruby
Urtokk_ has joined #ruby
stopbit_ has joined #ruby
carcajou has joined #ruby
Niamkik has quit [*.net *.split]
krz has quit [*.net *.split]
iori has quit [*.net *.split]
mahmoudimus has quit [*.net *.split]
stopbit has quit [*.net *.split]
vlad_starkov has quit [*.net *.split]
Spooner has quit [*.net *.split]
GoGoGarrett has quit [*.net *.split]
asteve has quit [*.net *.split]
thunderstrike has quit [*.net *.split]
invisime has quit [*.net *.split]
cid404 has quit [*.net *.split]
th3xer0 has quit [*.net *.split]
DarthGandalf has quit [*.net *.split]
tectonic has quit [*.net *.split]
mahlon_ has quit [*.net *.split]
ged_ has quit [*.net *.split]
cout has quit [*.net *.split]
juarlex has quit [*.net *.split]
idoru has quit [*.net *.split]
_marvin has quit [*.net *.split]
no_i_wont has quit [*.net *.split]
cespare has quit [*.net *.split]
moted has quit [*.net *.split]
rlomax has quit [*.net *.split]
Urtokk has quit [*.net *.split]
ekaleido has quit [*.net *.split]
Veejay has quit [*.net *.split]
ksk has quit [*.net *.split]
arubin has quit [*.net *.split]
telling has quit [*.net *.split]
Schmidt has quit [*.net *.split]
asuka has quit [*.net *.split]
RubyPanther has quit [*.net *.split]
JoeTheGuest has quit [*.net *.split]
jord has quit [*.net *.split]
ibash has quit [*.net *.split]
gmci has quit [*.net *.split]
sailias has quit [*.net *.split]
Takehiro has quit [*.net *.split]
brianpWins has quit [*.net *.split]
benatkin has quit [*.net *.split]
kvirani has quit [*.net *.split]
ndngvr has quit [*.net *.split]
Eldariof59-ru has quit [*.net *.split]
infinitiguy has quit [*.net *.split]
xbayrockx1 has quit [*.net *.split]
jbw has quit [*.net *.split]
ViperMaul|_ has quit [*.net *.split]
jwang has quit [*.net *.split]
joast has quit [*.net *.split]
Monie has quit [*.net *.split]
voodoofish has quit [*.net *.split]
kaneda_ has quit [*.net *.split]
bigmeow has quit [*.net *.split]
jbpros has quit [*.net *.split]
jcooley has quit [*.net *.split]
_br_ has quit [*.net *.split]
wmoxam has quit [*.net *.split]
theRoUS has quit [*.net *.split]
methoddk has quit [*.net *.split]
whowantstolivefo has quit [*.net *.split]
paolooo has quit [*.net *.split]
Taranis has quit [*.net *.split]
adac has quit [*.net *.split]
apok has quit [*.net *.split]
[diecast] has quit [*.net *.split]
Liothen has quit [*.net *.split]
mmitchell has quit [*.net *.split]
olrrai has quit [*.net *.split]
maletor has quit [*.net *.split]
adamkittelson has quit [*.net *.split]
_keith has quit [*.net *.split]
zodiak has quit [*.net *.split]
ph^_ has quit [*.net *.split]
areil has quit [*.net *.split]
monobit_ has quit [*.net *.split]
SeanLazer has quit [*.net *.split]
_JamieD_ has quit [*.net *.split]
linoj has quit [*.net *.split]
nateberkopec has quit [*.net *.split]
geekbri has quit [*.net *.split]
pskosinski has quit [*.net *.split]
nanderoo has quit [*.net *.split]
Banistergalaxy has quit [*.net *.split]
chichou has quit [*.net *.split]
phrame has quit [*.net *.split]
allanm_ has quit [*.net *.split]
inimino has quit [*.net *.split]
BeLucid has quit [*.net *.split]
robbyoconnor has quit [*.net *.split]
ttilley has quit [*.net *.split]
AngryParsley has quit [*.net *.split]
Chryson has quit [*.net *.split]
Affix has quit [*.net *.split]
alanp_ has quit [*.net *.split]
Nisstyre has quit [*.net *.split]
BadQuanta has quit [*.net *.split]
macer1 has quit [*.net *.split]
rking has quit [*.net *.split]
companion has quit [*.net *.split]
wangr has quit [*.net *.split]
saispo has quit [*.net *.split]
tris has quit [*.net *.split]
jwg2s has quit [*.net *.split]
devdazed has quit [*.net *.split]
manouche has quit [*.net *.split]
rtj has quit [*.net *.split]
r126l has quit [*.net *.split]
slycog has quit [*.net *.split]
chiel has quit [*.net *.split]
ohcibi has quit [*.net *.split]
fridim_ has quit [*.net *.split]
SirFunk has quit [*.net *.split]
Spaceghostc2c has quit [*.net *.split]
NimeshNeema has quit [*.net *.split]
dnyy_ has quit [*.net *.split]
patricksroberts has quit [*.net *.split]
sr___ has quit [*.net *.split]
octarine has quit [*.net *.split]
SeanTAllen has quit [*.net *.split]
shikamaru has quit [*.net *.split]
vDubG has quit [*.net *.split]
Gonzih has quit [*.net *.split]
cdabba has quit [*.net *.split]
alfplayer has quit [*.net *.split]
_Vile has quit [*.net *.split]
shaman42 has quit [*.net *.split]
ozzloy has quit [*.net *.split]
strcrzy_ has quit [*.net *.split]
JonnieCache has quit [*.net *.split]
vandemar has quit [*.net *.split]
altivec has quit [*.net *.split]
ddv has quit [*.net *.split]
welterde has quit [*.net *.split]
KindOne has quit [*.net *.split]
nyuszika7h has quit [*.net *.split]
darkc0met has quit [*.net *.split]
lupine_85 has quit [*.net *.split]
dju has quit [*.net *.split]
G has quit [*.net *.split]
tekacs has quit [*.net *.split]
theoros has quit [*.net *.split]
xorspark has quit [*.net *.split]
ub|k has quit [*.net *.split]
willb has quit [*.net *.split]
apeiros_ has quit [*.net *.split]
triptec has quit [*.net *.split]
x0F has quit [*.net *.split]
wereHamster has quit [*.net *.split]
Shrink has quit [*.net *.split]
QKO_ has quit [*.net *.split]
crodas has quit [*.net *.split]
socialist has quit [*.net *.split]
Guest78821 has quit [*.net *.split]
jmcphers has quit [*.net *.split]
philcrissman has quit [*.net *.split]
musl has quit [*.net *.split]
hsbt has quit [*.net *.split]
jhchabran has quit [*.net *.split]
spanner has quit [*.net *.split]
mattp_ has quit [*.net *.split]
X-Jester has quit [*.net *.split]
stepnem has quit [*.net *.split]
groupcat has quit [*.net *.split]
mlue has quit [*.net *.split]
urbann has quit [*.net *.split]
voodoofish430 has quit [*.net *.split]
niklasb has quit [*.net *.split]
ringotwo has quit [*.net *.split]
ShiintoRyuu has quit [*.net *.split]
davidcelis has quit [*.net *.split]
iflista has quit [*.net *.split]
jjbohn has quit [*.net *.split]
m_3 has quit [*.net *.split]
Seich has quit [*.net *.split]
kuzushi has quit [*.net *.split]
mXr has quit [*.net *.split]
eridani has quit [*.net *.split]
d-snp has quit [*.net *.split]
daguar has quit [*.net *.split]
MissionCritical has quit [*.net *.split]
rmc3 has quit [*.net *.split]
srnty has quit [*.net *.split]
KillerFox has quit [*.net *.split]
tfitts has quit [*.net *.split]
pavelz has quit [*.net *.split]
elspeth has quit [*.net *.split]
jeffnapp1 has quit [*.net *.split]
elliottc1ble has quit [*.net *.split]
joelio has quit [*.net *.split]
iaj_ has quit [*.net *.split]
Jb_ has quit [*.net *.split]
Boohbah has quit [*.net *.split]
Sou|cutter has quit [*.net *.split]
felipe has quit [*.net *.split]
hackeron has quit [*.net *.split]
tomaw has quit [*.net *.split]
kloeri has quit [*.net *.split]
iosctr has quit [*.net *.split]
nullsign has quit [*.net *.split]
tomsthumb_ has quit [*.net *.split]
jprovazn_away has quit [*.net *.split]
thatRD has quit [*.net *.split]
luxurymode has quit [*.net *.split]
simao has quit [*.net *.split]
Zespre_ has quit [*.net *.split]
Hanmac has quit [*.net *.split]
carrythezero has quit [*.net *.split]
JStoker has quit [*.net *.split]
nobdraisentone has quit [*.net *.split]
tchebb has quit [*.net *.split]
kristopolous has quit [*.net *.split]
rcj_ has quit [*.net *.split]
heftig has quit [*.net *.split]
Emmanuel_Chanel has quit [*.net *.split]
Y_Ichiro has quit [*.net *.split]
moeSeth has quit [*.net *.split]
randym has quit [*.net *.split]
grillo has quit [*.net *.split]
aetaric has quit [*.net *.split]
cloudpokerdb has quit [*.net *.split]
bnagy has quit [*.net *.split]
nat2610 has quit [*.net *.split]
wang has quit [*.net *.split]
banisterfiend has quit [*.net *.split]
ianbrandt has quit [*.net *.split]
graft has quit [*.net *.split]
mxbtty has quit [*.net *.split]
ngoldman has quit [*.net *.split]
Criztian has quit [*.net *.split]
venkatk_ has quit [*.net *.split]
axl_ has quit [*.net *.split]
gqlewis has quit [*.net *.split]
ccooke has quit [*.net *.split]
zaiste has quit [*.net *.split]
jrist has quit [*.net *.split]
cascalheira has quit [*.net *.split]
vjt has quit [*.net *.split]
DuoSRX has quit [*.net *.split]
flexd has quit [*.net *.split]
klaas has quit [*.net *.split]
radic has quit [*.net *.split]
mephux has quit [*.net *.split]
Mon_Ouie has quit [*.net *.split]
tcopp has quit [*.net *.split]
jhunter_ has quit [*.net *.split]
cjk101010 has quit [*.net *.split]
kapowaz has quit [*.net *.split]
Ethan has quit [*.net *.split]
Coolhand has quit [*.net *.split]
ElderFain_ has quit [*.net *.split]
ada2358 has quit [*.net *.split]
c0rn has quit [*.net *.split]
CodeVision has quit [*.net *.split]
rails has quit [*.net *.split]
blob has quit [*.net *.split]
_graham_ has quit [*.net *.split]
icy` has quit [*.net *.split]
Hien has quit [*.net *.split]
hoelzro|away has quit [*.net *.split]
gianlucadv has quit [*.net *.split]
Drakevr has quit [*.net *.split]
i0n has quit [*.net *.split]
marienz has quit [*.net *.split]
joschi has quit [*.net *.split]
mikepack has quit [*.net *.split]
banghouse has quit [*.net *.split]
al2o3cr has quit [*.net *.split]
flori has quit [*.net *.split]
TPFC-SYSTEM has quit [*.net *.split]
hadees has quit [*.net *.split]
shevy has quit [*.net *.split]
havenn has quit [*.net *.split]
miho has quit [*.net *.split]
johnlcox has quit [*.net *.split]
Asher1 has quit [*.net *.split]
jeekl has quit [*.net *.split]
thone_ has quit [*.net *.split]
SIGILL has quit [*.net *.split]
SegFaultAX|work2 has quit [*.net *.split]
imami|afk has quit [*.net *.split]
xargoon has quit [*.net *.split]
TomRone has quit [*.net *.split]
laen_ has quit [*.net *.split]
alta has quit [*.net *.split]
aspiers has quit [*.net *.split]
jimpsson has quit [*.net *.split]
ewag has quit [*.net *.split]
enyo has quit [*.net *.split]
RudyValencia has quit [*.net *.split]
Dr4g has quit [*.net *.split]
patronus has quit [*.net *.split]
nacengineer has quit [*.net *.split]
rotor` has quit [*.net *.split]
Rious has quit [*.net *.split]
omry has quit [*.net *.split]
psino has quit [*.net *.split]
matti has quit [*.net *.split]
WhereIsMySpoon has quit [*.net *.split]
jonnn has quit [*.net *.split]
Shamgar has quit [*.net *.split]
nricciar has quit [*.net *.split]
Eiam has quit [*.net *.split]
mtkd_ has quit [*.net *.split]
sj26 has quit [*.net *.split]
Caius has quit [*.net *.split]
examancer has quit [*.net *.split]
brett has quit [*.net *.split]
jeedey has quit [*.net *.split]
AndrzejKrzywda has quit [*.net *.split]
yeltzooo7 has quit [*.net *.split]
schleppy has quit [*.net *.split]
bradhe has quit [*.net *.split]
berserkr has quit [*.net *.split]
tommyvYo has quit [*.net *.split]
Tomasso has quit [*.net *.split]
classix has quit [*.net *.split]
brasten has quit [*.net *.split]
fowl has quit [*.net *.split]
chriskk has quit [*.net *.split]
AllStruck has quit [*.net *.split]
cool has quit [*.net *.split]
klip has quit [*.net *.split]
denysonique has quit [*.net *.split]
ahuman has quit [*.net *.split]
madhatter has quit [*.net *.split]
Dreamer3 has quit [*.net *.split]
ryanRT_ has quit [*.net *.split]
arvidkahl has quit [*.net *.split]
Guedes has quit [*.net *.split]
MasterIdler_ has quit [*.net *.split]
Kwpolska has quit [*.net *.split]
liluo has quit [*.net *.split]
Gate has quit [*.net *.split]
FlyingFoX has quit [*.net *.split]
Azure has quit [*.net *.split]
MetaCosm has quit [*.net *.split]
CoverSlide has quit [*.net *.split]
notbrent has quit [*.net *.split]
jankly_ has quit [*.net *.split]
jkyle has quit [*.net *.split]
flagg0204 has quit [*.net *.split]
Apocalypse has quit [*.net *.split]
fasta_ has quit [*.net *.split]
tommylommykins has quit [*.net *.split]
crazed has quit [*.net *.split]
Derander has quit [*.net *.split]
aef has quit [*.net *.split]
bier_ has quit [*.net *.split]
busybox42 has quit [*.net *.split]
baroquebobcat has quit [*.net *.split]
adeponte has quit [*.net *.split]
joshman_ has quit [*.net *.split]
`brendan has quit [*.net *.split]
dpk has quit [*.net *.split]
nwest has quit [*.net *.split]
meskyanichi has quit [*.net *.split]
s0ber has quit [*.net *.split]
froy has quit [*.net *.split]
danheberden has quit [*.net *.split]
relix has quit [*.net *.split]
anildigital_work has quit [*.net *.split]
mvangala_ has quit [*.net *.split]
alexwh has quit [*.net *.split]
caveat- has quit [*.net *.split]
eric-wood has quit [*.net *.split]
Prudhvi has quit [*.net *.split]
nopper has quit [*.net *.split]
sphera has quit [*.net *.split]
duncanm has quit [*.net *.split]
Roa has quit [*.net *.split]
deavid has quit [*.net *.split]
brian- has quit [*.net *.split]
ePirat has quit [*.net *.split]
Kiall has quit [*.net *.split]
rtl has quit [*.net *.split]
dubios has quit [*.net *.split]
barefoot has quit [*.net *.split]
xybre has quit [*.net *.split]
axiak has quit [*.net *.split]
wunz has quit [*.net *.split]
Sigma00 has quit [*.net *.split]
`heliar has quit [*.net *.split]
epitron has quit [*.net *.split]
conceal_rs_ has quit [*.net *.split]
WanderingGlitch has quit [*.net *.split]
nahhh has quit [*.net *.split]
TheMoonMaster has quit [*.net *.split]
Gm4n has quit [*.net *.split]
mksm has quit [*.net *.split]
Cork has quit [*.net *.split]
c0rn_ has quit [*.net *.split]
hynkle has quit [*.net *.split]
tnk1 has quit [*.net *.split]
Guest37999 has quit [*.net *.split]
suppp has quit [*.net *.split]
randomautomator has quit [*.net *.split]
dross has quit [*.net *.split]
Stalkr_ has quit [*.net *.split]
BRMatt has quit [*.net *.split]
denstark has quit [*.net *.split]
zeromodulus has quit [*.net *.split]
Bauer1 has quit [*.net *.split]
CodeFriar has quit [*.net *.split]
williamcotton has quit [*.net *.split]
juha_ has quit [*.net *.split]
avalarion has quit [*.net *.split]
philips_ has quit [*.net *.split]
aquaranto has quit [*.net *.split]
davidboy has quit [*.net *.split]
matled has quit [*.net *.split]
undyingrage has quit [*.net *.split]
jso has quit [*.net *.split]
mkopras has quit [*.net *.split]
vaicine has quit [*.net *.split]
ixx has quit [*.net *.split]
ichilton has quit [*.net *.split]
nuba has quit [*.net *.split]
Mchl has quit [*.net *.split]
koivula_ has quit [*.net *.split]
_fmm has quit [*.net *.split]
lantins has quit [*.net *.split]
oz has quit [*.net *.split]
regedarek has quit [*.net *.split]
rcs has quit [*.net *.split]
yellow5 has quit [*.net *.split]
pjr has quit [*.net *.split]
xea has quit [*.net *.split]
weeb1e_ has quit [*.net *.split]
nimred has quit [*.net *.split]
soulcake has quit [*.net *.split]
__main__ has quit [*.net *.split]
acies has quit [*.net *.split]
Sp4rKy has quit [*.net *.split]
poga has quit [*.net *.split]
t34993 has quit [*.net *.split]
luckyruby has quit [*.net *.split]
workmad3 has quit [*.net *.split]
adambeynon has quit [*.net *.split]
daniel_hinojosa has quit [*.net *.split]
und3f has quit [*.net *.split]
LouisGB has quit [*.net *.split]
scriabin has quit [*.net *.split]
bigkevmcd has quit [*.net *.split]
zburt has quit [*.net *.split]
gurps has quit [*.net *.split]
gregorg has quit [*.net *.split]
faulkner has quit [*.net *.split]
S1kx has quit [*.net *.split]
cnf has quit [*.net *.split]
fcoury has quit [*.net *.split]
lectrick has quit [*.net *.split]
straind has quit [*.net *.split]
im0b has quit [*.net *.split]
binw has quit [*.net *.split]
happosade has quit [*.net *.split]
schwap has quit [*.net *.split]
thomas has quit [*.net *.split]
clop has quit [*.net *.split]
Paradox has quit [*.net *.split]
LiquidInsect has quit [*.net *.split]
Jck_true has quit [*.net *.split]
drizz has quit [*.net *.split]
Elfix has quit [*.net *.split]
rakm has quit [*.net *.split]
AwesomeG1rethMan has quit [*.net *.split]
Nowaker has quit [*.net *.split]
zaargy has quit [*.net *.split]
dagobah has quit [*.net *.split]
fred has quit [*.net *.split]
zz_chrismcg has quit [*.net *.split]
Zol has quit [*.net *.split]
Scub has quit [*.net *.split]
nick_h has quit [*.net *.split]
AlbireoX has quit [*.net *.split]
verto has quit [*.net *.split]
yugui_zzz has quit [*.net *.split]
lobak has quit [*.net *.split]
sixteneighty has quit [*.net *.split]
icambridge has quit [*.net *.split]
elaptics has quit [*.net *.split]
oddraisin has quit [*.net *.split]
AnswerGuy has quit [*.net *.split]
ByteCrunch has quit [*.net *.split]
Norrin has quit [*.net *.split]
sazboom has quit [*.net *.split]
v0n has quit [*.net *.split]
thomasfedb has quit [*.net *.split]
tr4656 has quit [*.net *.split]
thorncp has quit [*.net *.split]
perryh has quit [*.net *.split]
pradeepto has quit [*.net *.split]
nw has quit [*.net *.split]
crankycoder has quit [*.net *.split]
kstephens has quit [*.net *.split]
alexhanh has quit [*.net *.split]
lorn has quit [*.net *.split]
uxp has quit [*.net *.split]
beandip has quit [*.net *.split]
cfs has quit [*.net *.split]
himsin has quit [*.net *.split]
Matt__ has quit [*.net *.split]
recycle_ has quit [*.net *.split]
headius has quit [*.net *.split]
pyreal has quit [*.net *.split]
mneorr has quit [*.net *.split]
naz has quit [*.net *.split]
SCommette has quit [*.net *.split]
punkrawkR has quit [*.net *.split]
fermion has quit [*.net *.split]
BiHi has quit [*.net *.split]
yosafbridge has quit [*.net *.split]
anekos has quit [*.net *.split]
gogiel has quit [*.net *.split]
gentz has quit [*.net *.split]
TorpedoSkyline has quit [*.net *.split]
oddmunds has quit [*.net *.split]
RichieEvan has quit [*.net *.split]
Poapfel has quit [*.net *.split]
jmeeuwen has quit [*.net *.split]
alek_b has quit [*.net *.split]
deadSnowman has quit [*.net *.split]
eregon has quit [*.net *.split]
SecretAgent has quit [*.net *.split]
passbe has quit [*.net *.split]
gift has quit [*.net *.split]
mike4_ has quit [*.net *.split]
ckrailo has quit [*.net *.split]
answer_42 has quit [*.net *.split]
reactormonk has quit [*.net *.split]
etank has quit [*.net *.split]
sspiff has quit [*.net *.split]
malcolmva has quit [*.net *.split]
tessi has quit [*.net *.split]
vitor-br has quit [*.net *.split]
jowens_ has quit [*.net *.split]
Cascador-afk has quit [*.net *.split]
katherinem13 has quit [*.net *.split]
dekz has quit [*.net *.split]
Muz has quit [*.net *.split]
kaen has quit [*.net *.split]
epochwolf has quit [*.net *.split]
Kabaka has quit [*.net *.split]
faen has quit [*.net *.split]
croz has quit [*.net *.split]
johnduhart2 has quit [*.net *.split]
msch has quit [*.net *.split]
swistak35 has quit [*.net *.split]
Bish has quit [*.net *.split]
Gadgetoid has quit [*.net *.split]
zelrik has quit [*.net *.split]
bperry has quit [*.net *.split]
TheNumb has quit [*.net *.split]
Godslastering has quit [*.net *.split]
neersighted has quit [*.net *.split]
_root_ has quit [*.net *.split]
emdub has quit [*.net *.split]
oc_ has quit [*.net *.split]
lahwran has quit [*.net *.split]
jayne has quit [*.net *.split]
t_j has quit [*.net *.split]
maddog_ has quit [*.net *.split]
elektronaut has quit [*.net *.split]
alvaro_o has quit [*.net *.split]
hukl has quit [*.net *.split]
machty has quit [*.net *.split]
a_a_g has quit [*.net *.split]
qwerxy has quit [*.net *.split]
eywu has quit [*.net *.split]
robustus has quit [*.net *.split]
flip_digits has quit [*.net *.split]
andrewhl has quit [*.net *.split]
bowlowni has quit [*.net *.split]
rippa has quit [*.net *.split]
otters has quit [*.net *.split]
cakehero has quit [*.net *.split]
uris has quit [*.net *.split]
iamjarvo has quit [*.net *.split]
ephemerian has quit [*.net *.split]
yxhuvud has quit [*.net *.split]
eko has quit [*.net *.split]
TheFuzzball has quit [*.net *.split]
eighty4 has quit [*.net *.split]
fearoffish has quit [*.net *.split]
richardcreme has quit [*.net *.split]
Majost has quit [*.net *.split]
alindeman_ has quit [*.net *.split]
babinho has quit [*.net *.split]
SegFaultAX has quit [*.net *.split]
ladder4 has quit [*.net *.split]
spathi has quit [*.net *.split]
SeySayux has quit [*.net *.split]
Jelco has quit [*.net *.split]
sirecote has quit [*.net *.split]
Fraeon has quit [*.net *.split]
stat1x has quit [*.net *.split]
mmercer has quit [*.net *.split]
niko has quit [*.net *.split]
preller_ has quit [*.net *.split]
__class__ has quit [*.net *.split]
pcboy_ has quit [*.net *.split]
EuroTrash has quit [*.net *.split]
just4dos has quit [*.net *.split]
zigidias_ has quit [*.net *.split]
mattrae_ has quit [*.net *.split]
lteo has quit [*.net *.split]
alienvenom has quit [*.net *.split]
{^_^}_ has quit [*.net *.split]
vitoravelino has quit [*.net *.split]
bfrog has quit [*.net *.split]
moshee has quit [*.net *.split]
mucker has quit [*.net *.split]
savage- has quit [*.net *.split]
erichmenge has quit [*.net *.split]
Synthead has quit [*.net *.split]
itnomad has quit [*.net *.split]
echobravo has quit [*.net *.split]
krusty_ar has quit [*.net *.split]
internet_user has quit [*.net *.split]
nilg` has quit [*.net *.split]
Jay_Levitt has quit [*.net *.split]
Guest78690 has quit [*.net *.split]
BrokenCog has quit [*.net *.split]
bgupta has quit [*.net *.split]
Adran has quit [*.net *.split]
drPoggs has quit [*.net *.split]
fish_ has quit [*.net *.split]
lae has quit [*.net *.split]
xiphiasx_ has quit [*.net *.split]
phreax_ has quit [*.net *.split]
dominikh has quit [*.net *.split]
sejo has quit [*.net *.split]
samuelkadolph has quit [*.net *.split]
dcope has quit [*.net *.split]
ereslibre has quit [*.net *.split]
DarkFoxDK has quit [*.net *.split]
_axx has quit [*.net *.split]
Quadlex has quit [*.net *.split]
mikekelly has quit [*.net *.split]
tama has quit [*.net *.split]
ben_alman has quit [*.net *.split]
UdontKnow has quit [*.net *.split]
joni has quit [*.net *.split]
mariooo has quit [*.net *.split]
zigidias has joined #ruby
jameshyde has joined #ruby
Roa has joined #ruby
barefoot has joined #ruby
rtl has joined #ruby
dubios has joined #ruby
Kiall has joined #ruby
paolooo has joined #ruby
wunz has joined #ruby
tomaw has joined #ruby
`heliar has joined #ruby
epitron has joined #ruby
conceal_rs_ has joined #ruby
xybre has joined #ruby
WanderingGlitch has joined #ruby
nopper has joined #ruby
kloeri has joined #ruby
Sigma00 has joined #ruby
t32014 has joined #ruby
iosctr has joined #ruby
marienz has joined #ruby
theoros has joined #ruby
deavid has joined #ruby
aef has joined #ruby
G has joined #ruby
gianlucadv has joined #ruby
tekacs has joined #ruby
ub|k has joined #ruby
ePirat has joined #ruby
felipe has joined #ruby
dju has joined #ruby
joschi has joined #ruby
xorspark has joined #ruby
lupine_85 has joined #ruby
mlue has joined #ruby
hackeron has joined #ruby
brian- has joined #ruby
Cork has joined #ruby
Boohbah has joined #ruby
mtkd_ has joined #ruby
TheMoonMaster has joined #ruby
Sou|cutter has joined #ruby
brett has joined #ruby
Drakevr has joined #ruby
Jb_ has joined #ruby
Caius has joined #ruby
jeedey has joined #ruby
yeltzooo7 has joined #ruby
KindOne has joined #ruby
axiak has joined #ruby
nahhh has joined #ruby
nyuszika7h has joined #ruby
Prudhvi has joined #ruby
jonnn has joined #ruby
sphera has joined #ruby
ddv has joined #ruby
Gm4n has joined #ruby
welterde has joined #ruby
Eiam has joined #ruby
examancer has joined #ruby
iaj_ has joined #ruby
Shamgar has joined #ruby
icy` has joined #ruby
hoelzro|away has joined #ruby
Hien has joined #ruby
darkc0met has joined #ruby
mksm has joined #ruby
eric-wood has joined #ruby
duncanm has joined #ruby
_graham_ has joined #ruby
groupcat has joined #ruby
sj26 has joined #ruby
matti has joined #ruby
WhereIsMySpoon has joined #ruby
nricciar has joined #ruby
stepnem has joined #ruby
Derander has joined #ruby
crazed has joined #ruby
altivec has joined #ruby
caveat- has joined #ruby
AndrzejKrzywda has joined #ruby
tommylommykins has joined #ruby
vandemar has joined #ruby
psino has joined #ruby
blob has joined #ruby
flagg0204 has joined #ruby
jeffnapp1 has joined #ruby
elliottc1ble has joined #ruby
joelio has joined #ruby
elspeth has joined #ruby
alexwh has joined #ruby
Apocalypse has joined #ruby
fasta_ has joined #ruby
Taranis has joined #ruby
strcrzy_ has joined #ruby
ozzloy has joined #ruby
wang has joined #ruby
omry has joined #ruby
rails has joined #ruby
JonnieCache has joined #ruby
Rious has joined #ruby
rotor` has joined #ruby
mvangala_ has joined #ruby
patronus has joined #ruby
nat2610 has joined #ruby
CodeVision has joined #ruby
X-Jester has joined #ruby
ada2358 has joined #ruby
c0rn has joined #ruby
jkyle has joined #ruby
nacengineer has joined #ruby
shaman42 has joined #ruby
tfitts has joined #ruby
_Vile has joined #ruby
cdabba has joined #ruby
pavelz has joined #ruby
srnty has joined #ruby
rmc3 has joined #ruby
hsbt has joined #ruby
KillerFox has joined #ruby
bnagy has joined #ruby
Gonzih has joined #ruby
spanner has joined #ruby
chiel has joined #ruby
jhchabran has joined #ruby
musl has joined #ruby
shikamaru has joined #ruby
ryanRT_ has joined #ruby
ElderFain_ has joined #ruby
Coolhand has joined #ruby
Dreamer3 has joined #ruby
MissionCritical has joined #ruby
jankly_ has joined #ruby
d-snp has joined #ruby
cloudpokerdb has joined #ruby
vDubG has joined #ruby
tchebb has joined #ruby
tris has joined #ruby
kristopolous has joined #ruby
RudyValencia has joined #ruby
rcj_ has joined #ruby
devdazed has joined #ruby
Ethan has joined #ruby
madhatter has joined #ruby
xargoon has joined #ruby
jimpsson has joined #ruby
denysonique has joined #ruby
s0ber has joined #ruby
Guest78821 has joined #ruby
manouche has joined #ruby
saispo has joined #ruby
sr___ has joined #ruby
JStoker has joined #ruby
jhunter_ has joined #ruby
wangr has joined #ruby
NimeshNeema has joined #ruby
rtj has joined #ruby
relix has joined #ruby
klip has joined #ruby
mXr has joined #ruby
SeanTAllen has joined #ruby
octarine has joined #ruby
alta has joined #ruby
MetaCosm has joined #ruby
Azure has joined #ruby
randym has joined #ruby
eridani has joined #ruby
SegFaultAX|work2 has joined #ruby
brasten has joined #ruby
patricksroberts has joined #ruby
tcopp has joined #ruby
TomRone has joined #ruby
daguar has joined #ruby
ahuman has joined #ruby
FlyingFoX has joined #ruby
crodas has joined #ruby
philcrissman has joined #ruby
Mon_Ouie has joined #ruby
slycog has joined #ruby
socialist has joined #ruby
heftig has joined #ruby
Y_Ichiro has joined #ruby
moeSeth has joined #ruby
cool has joined #ruby
fowl has joined #ruby
carrythezero has joined #ruby
jwg2s has joined #ruby
CoverSlide has joined #ruby
anildigital_work has joined #ruby
alanp_ has joined #ruby
froy has joined #ruby
notbrent has joined #ruby
AllStruck has joined #ruby
Emmanuel_Chanel has joined #ruby
BadQuanta has joined #ruby
Zespre_ has joined #ruby
mephux has joined #ruby
alfplayer has joined #ruby
enyo has joined #ruby
Nisstyre has joined #ruby
imami|afk has joined #ruby
ewag has joined #ruby
companion has joined #ruby
Chryson has joined #ruby
Hanmac has joined #ruby
SirFunk has joined #ruby
Gate has joined #ruby
Dr4g has joined #ruby
aspiers has joined #ruby
rking has joined #ruby
BeLucid has joined #ruby
cjk101010 has joined #ruby
kuzushi has joined #ruby
ttilley has joined #ruby
allanm_ has joined #ruby
radic has joined #ruby
inimino has joined #ruby
kapowaz has joined #ruby
grillo has joined #ruby
jeekl has joined #ruby
Spaceghostc2c has joined #ruby
dnyy_ has joined #ruby
r126l has joined #ruby
SIGILL has joined #ruby
Tomasso has joined #ruby
laen_ has joined #ruby
chichou has joined #ruby
phrame has joined #ruby
danheberden has joined #ruby
vjt has joined #ruby
DuoSRX has joined #ruby
thone_ has joined #ruby
x0F has joined #ruby
mattp_ has joined #ruby
QKO_ has joined #ruby
macer1 has joined #ruby
nanderoo has joined #ruby
flexd has joined #ruby
nobdraisentone has joined #ruby
m_3 has joined #ruby
robbyoconnor has joined #ruby
chriskk has joined #ruby
`brendan has joined #ruby
jmcphers has joined #ruby
Affix has joined #ruby
tommyvYo has joined #ruby
classix has joined #ruby
jrist has joined #ruby
fridim_ has joined #ruby
pskosinski has joined #ruby
klaas has joined #ruby
cascalheira has joined #ruby
AngryParsley has joined #ruby
liluo has joined #ruby
geekbri has joined #ruby
linoj has joined #ruby
wereHamster has joined #ruby
simao has joined #ruby
zaiste has joined #ruby
nateberkopec has joined #ruby
Seich has joined #ruby
_JamieD_ has joined #ruby
aetaric has joined #ruby
Asher1 has joined #ruby
ohcibi has joined #ruby
Banistergalaxy has joined #ruby
meskyanichi has joined #ruby
johnlcox has joined #ruby
monobit_ has joined #ruby
Kwpolska has joined #ruby
nwest has joined #ruby
jjbohn has joined #ruby
SeanLazer has joined #ruby
ph^_ has joined #ruby
triptec has joined #ruby
dpk has joined #ruby
Shrink has joined #ruby
areil has joined #ruby
joshman_ has joined #ruby
miho has joined #ruby
thatRD has joined #ruby
hadees has joined #ruby
ccooke has joined #ruby
willb has joined #ruby
tomsthumb_ has joined #ruby
_keith has joined #ruby
berserkr has joined #ruby
baroquebobcat has joined #ruby
jprovazn_away has joined #ruby
MasterIdler_ has joined #ruby
mikepack has joined #ruby
al2o3cr has joined #ruby
shevy has joined #ruby
axl_ has joined #ruby
gqlewis has joined #ruby
flori has joined #ruby
luxurymode has joined #ruby
busybox42 has joined #ruby
zodiak has joined #ruby
bradhe has joined #ruby
nullsign has joined #ruby
iflista has joined #ruby
maletor has joined #ruby
ngoldman has joined #ruby
schleppy has joined #ruby
niklasb has joined #ruby
venkatk_ has joined #ruby
apeiros_ has joined #ruby
TPFC-SYSTEM has joined #ruby
[diecast] has joined #ruby
Liothen has joined #ruby
adeponte has joined #ruby
havenn has joined #ruby
banghouse has joined #ruby
ShiintoRyuu has joined #ruby
bier_ has joined #ruby
adamkittelson has joined #ruby
Criztian has joined #ruby
banisterfiend has joined #ruby
ringotwo has joined #ruby
Guedes has joined #ruby
adac has joined #ruby
voodoofish430 has joined #ruby
ianbrandt has joined #ruby
arvidkahl has joined #ruby
graft has joined #ruby
apok has joined #ruby
urbann has joined #ruby
mxbtty has joined #ruby
flak has joined #ruby
weasels has joined #ruby
hukl_ has joined #ruby
_iori_ has joined #ruby
GoGoGarr_ has joined #ruby
machty has joined #ruby
bowlowni_ has joined #ruby
cout_ has joined #ruby
asuka_ has joined #ruby
davidcelis has joined #ruby
Goles has joined #ruby
jlogsdon has joined #ruby
babinho_ has joined #ruby
bfrog_ has joined #ruby
jearvondharrie has joined #ruby
Niamkik_ has joined #ruby
a_a_g1 has joined #ruby
mahmoudi_ has joined #ruby
jord_ has joined #ruby
pcboy__ has joined #ruby
Jelco_ has joined #ruby
asteve has joined #ruby
ladder4_ has joined #ruby
vitorave` has joined #ruby
thunders_ has joined #ruby
_marvin_ has joined #ruby
Freijo has joined #ruby
ekaleido_ has joined #ruby
Dominus has joined #ruby
lteo_ has joined #ruby
JoeTheGuest_ has joined #ruby
robustus|Off has joined #ruby
tectonic_ has joined #ruby
telling_ has joined #ruby
cid^ has joined #ruby
ksk_ has joined #ruby
himsin has joined #ruby
andrewhl_ has joined #ruby
statix_ has joined #ruby
Matt__ has joined #ruby
{^_^}__ has joined #ruby
headius has joined #ruby
naz has joined #ruby
SCommette has joined #ruby
mneorr has joined #ruby
fermion has joined #ruby
recycle_ has joined #ruby
punkrawkR has joined #ruby
yosafbridge has joined #ruby
pyreal has joined #ruby
anekos has joined #ruby
gogiel has joined #ruby
TorpedoSkyline has joined #ruby
gentz has joined #ruby
RichieEvan has joined #ruby
oddmunds has joined #ruby
Poapfel has joined #ruby
jmeeuwen has joined #ruby
deadSnowman has joined #ruby
alek_b has joined #ruby
eregon has joined #ruby
passbe has joined #ruby
MarioEIU has joined #ruby
SecretAgent has joined #ruby
[eko] has joined #ruby
hynkle has joined #ruby
tnk1 has joined #ruby
36DABY0WQ has joined #ruby
suppp has joined #ruby
randomautomator has joined #ruby
Guest37999 has joined #ruby
Stalkr_ has joined #ruby
BRMatt has joined #ruby
dross has joined #ruby
williamcotton has joined #ruby
zeromodulus has joined #ruby
denstark has joined #ruby
acies has joined #ruby
lantins has joined #ruby
mkopras has joined #ruby
yellow5 has joined #ruby
regedarek has joined #ruby
davidboy has joined #ruby
philips_ has joined #ruby
avalarion has joined #ruby
ixx has joined #ruby
weeb1e_ has joined #ruby
matled has joined #ruby
nuba has joined #ruby
undyingrage has joined #ruby
vaicine has joined #ruby
rcs has joined #ruby
soulcake has joined #ruby
Sp4rKy has joined #ruby
pjr has joined #ruby
oz has joined #ruby
nimred has joined #ruby
Mchl has joined #ruby
CodeFriar has joined #ruby
__main__ has joined #ruby
Bauer1 has joined #ruby
jso has joined #ruby
cespare has joined #ruby
_fmm has joined #ruby
moted has joined #ruby
juha_ has joined #ruby
ichilton has joined #ruby
koivula_ has joined #ruby
Majost has joined #ruby
xea has joined #ruby
aquaranto has joined #ruby
invisime1 has joined #ruby
mucker has joined #ruby
moshee has joined #ruby
rlomax has joined #ruby
savage- has joined #ruby
Synthead has joined #ruby
erichmenge has joined #ruby
itnomad has joined #ruby
krusty_ar has joined #ruby
echobravo has joined #ruby
internet_user has joined #ruby
nilg` has joined #ruby
Jay_Levitt has joined #ruby
Guest78690 has joined #ruby
bgupta has joined #ruby
Adran has joined #ruby
BrokenCog has joined #ruby
fish_ has joined #ruby
drPoggs has joined #ruby
xiphiasx_ has joined #ruby
mariooo has joined #ruby
lae has joined #ruby
phreax_ has joined #ruby
dominikh has joined #ruby
dcope has joined #ruby
sejo has joined #ruby
samuelkadolph has joined #ruby
DarkFoxDK has joined #ruby
ereslibre has joined #ruby
joni has joined #ruby
_axx has joined #ruby
ben_alman has joined #ruby
tama has joined #ruby
mikekelly has joined #ruby
Quadlex has joined #ruby
UdontKnow has joined #ruby
aantix has joined #ruby
Dominus is now known as 92AABFASL
mike4_ has joined #ruby
ckrailo has joined #ruby
answer_42 has joined #ruby
etank has joined #ruby
reactormonk has joined #ruby
sspiff has joined #ruby
malcolmva has joined #ruby
jowens_ has joined #ruby
tessi has joined #ruby
vitor-br has joined #ruby
Cascador-afk has joined #ruby
dekz has joined #ruby
katherinem13 has joined #ruby
Muz has joined #ruby
kaen has joined #ruby
epochwolf has joined #ruby
zelrik has joined #ruby
Kabaka has joined #ruby
msch has joined #ruby
bperry has joined #ruby
oc_ has joined #ruby
faen has joined #ruby
swistak35 has joined #ruby
neersighted has joined #ruby
jayne has joined #ruby
TheNumb has joined #ruby
johnduhart2 has joined #ruby
Godslastering has joined #ruby
Bish has joined #ruby
Gadgetoid has joined #ruby
maddog_ has joined #ruby
t_j has joined #ruby
elektronaut has joined #ruby
_root_ has joined #ruby
emdub has joined #ruby
lahwran has joined #ruby
croz has joined #ruby
just4dos_ has joined #ruby
jameshyde has left #ruby [#ruby]
lschmidt has joined #ruby
spathi_ has joined #ruby
uris_ has joined #ruby
th3xer0_ has joined #ruby
eywu1 has joined #ruby
ibash has joined #ruby
Takehiro has joined #ruby
gmci has joined #ruby
no_i_wont_ has joined #ruby
benatkin has joined #ruby
bigmeow has joined #ruby
brianpWins has joined #ruby
ndngvr has joined #ruby
kvirani has joined #ruby
Eldariof59-ru has joined #ruby
xbayrockx1 has joined #ruby
infinitiguy has joined #ruby
jbw has joined #ruby
ViperMaul|_ has joined #ruby
Monie has joined #ruby
jwang has joined #ruby
voodoofish has joined #ruby
jbpros has joined #ruby
kaneda_ has joined #ruby
jcooley has joined #ruby
joast has joined #ruby
methoddk has joined #ruby
wmoxam has joined #ruby
MissionCritical has quit [Max SendQ exceeded]
Kabaka has quit [Max SendQ exceeded]
neersighted has quit [Max SendQ exceeded]
Godslastering has quit [Max SendQ exceeded]
sailias has joined #ruby
aantix has quit [Read error: Connection reset by peer]
t32014 has quit [Remote host closed the connection]
v0n has joined #ruby
sazboom has joined #ruby
Norrin has joined #ruby
tr4656 has joined #ruby
thomasfedb has joined #ruby
thorncp has joined #ruby
cfs has joined #ruby
pradeepto has joined #ruby
perryh has joined #ruby
nw has joined #ruby
crankycoder has joined #ruby
kstephens has joined #ruby
beandip has joined #ruby
uxp has joined #ruby
alexhanh has joined #ruby
lorn has joined #ruby
arubin_ has joined #ruby
daniel_hinojosa has joined #ruby
bigkevmcd has joined #ruby
poga has joined #ruby
luckyruby has joined #ruby
rd34 has joined #ruby
LouisGB has joined #ruby
faulkner has joined #ruby
scriabin has joined #ruby
adambeynon has joined #ruby
und3f has joined #ruby
gregorg has joined #ruby
cnf has joined #ruby
gurps has joined #ruby
zburt has joined #ruby
S1kx has joined #ruby
straind has joined #ruby
im0b has joined #ruby
fcoury has joined #ruby
lectrick has joined #ruby
binw has joined #ruby
happosade has joined #ruby
thomas has joined #ruby
clop has joined #ruby
LiquidInsect has joined #ruby
Paradox has joined #ruby
drizz has joined #ruby
schwap has joined #ruby
Nowaker has joined #ruby
zaargy has joined #ruby
fred has joined #ruby
Zol has joined #ruby
Scub has joined #ruby
AnswerGuy has joined #ruby
AwesomeG1rethMan has joined #ruby
yugui_zzz has joined #ruby
lobak has joined #ruby
Elfix has joined #ruby
sixteneighty has joined #ruby
elaptics has joined #ruby
oddraisin has joined #ruby
verto has joined #ruby
zz_chrismcg has joined #ruby
icambridge has joined #ruby
Jck_true has joined #ruby
ByteCrunch has joined #ruby
rakm has joined #ruby
AlbireoX has joined #ruby
nick_h has joined #ruby
dagobah has joined #ruby
ndngvr has quit [Max SendQ exceeded]
aantix has joined #ruby
neersighted has joined #ruby
Kabaka has joined #ruby
ndngvr has joined #ruby
th3xer0_ has quit [Quit: leaving]
apeschel has joined #ruby
thomas has quit [Quit: brb]
SegFaultAX has joined #ruby
nateberkopec is now known as sjkaliski
sjkaliski is now known as wyattisimo
thomas has joined #ruby
wyattisimo is now known as nateberkopec
sailias has quit [Ping timeout: 260 seconds]
tectonic_ has quit [*.net *.split]
himsin has quit [*.net *.split]
recycle_ has quit [*.net *.split]
headius has quit [*.net *.split]
Matt__ has quit [*.net *.split]
mneorr has quit [*.net *.split]
pyreal has quit [*.net *.split]
punkrawkR has quit [*.net *.split]
SCommette has quit [*.net *.split]
naz has quit [*.net *.split]
fermion has quit [*.net *.split]
yosafbridge has quit [*.net *.split]
anekos has quit [*.net *.split]
gentz has quit [*.net *.split]
TorpedoSkyline has quit [*.net *.split]
gogiel has quit [*.net *.split]
oddmunds has quit [*.net *.split]
RichieEvan has quit [*.net *.split]
jmeeuwen has quit [*.net *.split]
Poapfel has quit [*.net *.split]
alek_b has quit [*.net *.split]
deadSnowman has quit [*.net *.split]
eregon has quit [*.net *.split]
passbe has quit [*.net *.split]
SecretAgent has quit [*.net *.split]
alvaro_o has joined #ruby
tectonic_ has joined #ruby
himsin has joined #ruby
recycle_ has joined #ruby
headius has joined #ruby
Matt__ has joined #ruby
gogiel has joined #ruby
deadSnowman has joined #ruby
SCommette has joined #ruby
TorpedoSkyline has joined #ruby
jmeeuwen has joined #ruby
gentz has joined #ruby
Poapfel has joined #ruby
alek_b has joined #ruby
fermion has joined #ruby
punkrawkR has joined #ruby
SecretAgent has joined #ruby
pyreal has joined #ruby
oddmunds has joined #ruby
passbe has joined #ruby
mneorr has joined #ruby
anekos has joined #ruby
naz has joined #ruby
RichieEvan has joined #ruby
eregon has joined #ruby
yosafbridge has joined #ruby
doherty has joined #ruby
hukl has joined #ruby
<doherty> Where can I find a good primer on testing in Ruby?
<rking> Hrm.
<rking> What are you looking for, a book? A quick'n'dirty web page intro?
<doherty> A short webpage into should do.
* doherty also searches for documentation on "ActionController::TestCase"
<rking> Here's the very short version:
<rking> Start writing assertions.
<rking> You don't even need a test framework.
hukl- has joined #ruby
hynkle has quit []
anoldhacker has joined #ruby
<rking> And in fact for some situations I don't bother, for example, say I'm writing a self-contained script, and I hit a part that really needs some unit tests, I'll probaly just write something like:
<doherty> Yes, but I'm working on a project that already uses... some framework
hynkle has joined #ruby
<rking> 'asdf' == f('fdsa') or fail
Tref has joined #ruby
<doherty> So, I should probably use the same thing :)
<rking> Yes, definitely.
<rd34> Can anyone suggest a good intro to file management with ruby? Like… just to look in a directory and read off the files there?
arubin_ has quit [Quit: leaving]
<rking> My point is more that the practice is framework-agnostic.
hukl_ has quit [Ping timeout: 272 seconds]
<rking> rd34: The Dir class API. You can do a glob like, Dir['foo/*'] and it will end up being an array of strings for all the files under foo/
Tref has quit [Client Quit]
_iori_ has quit [Remote host closed the connection]
Tref has joined #ruby
<rking> doherty: What framework is it?
<doherty> I'm not really sure :P
<rd34> rking: Thanks, I'll look into that.
<doherty> Is ActionController part of a testing framework?
<doherty> looks like this is a rails thingy
Wizywig has joined #ruby
hukl has quit [Ping timeout: 265 seconds]
venkatk_ has quit [Quit: This computer has gone to sleep]
Godslastering has joined #ruby
<anoldhacker> I'm getting a segmentation fault trying to link mini ruby on HEAD. make: *** [.rbconfig.time] Segmentation fault
<rking> doherty: ActionController, itself, is a part of the Rails classes, yes. The ActionController::TestCase part is a child of ActiveSupport::TestCase, which is a child of Test::Unit::TestCase
uris_ has quit [Ping timeout: 244 seconds]
recycle_ has quit [Remote host closed the connection]
<rking> So if you're using it then you're using basic Test::Unit. Which isn't a terrible place to start, though personally I'm liking RSpec.
foolove has joined #ruby
<rking> anoldhacker: Try strace
<rking> Always try strace.
<rking> Strace more than you ls, if possible.
shadoi has joined #ruby
<foolove> i want to do a find and replace on a variable removing spaces in perl i know this is variable =~ s/stringtoreplace//; in ruby i am still learning :)
paolooo has quit [Quit: Page closed]
<brisbin> see String#sub and String#gsub
hynkle has left #ruby [#ruby]
adac has quit [Ping timeout: 260 seconds]
<doherty> You should not use a regular expression to remove spaces, that is slow - use a transliteration instead :)
* doherty has no idea if Ruby does that
<brisbin> does String have a #reject?
<rking> doherty: "Premature optimization is the root of every all complete total meltdown of wasted time and lives and evil."
<brisbin> that'd be neat
AngryParsley is now known as ggreer
<Hanmac> >> "a long string with spaces".tr(" ","")
<al2o3cr> (String) "alongstringwithspaces"
<doherty> xD
<foolove> brisban so i have to use gsub or sub
<doherty> But how else can I have fun??!? #trolling
<rking> But the .tr in this case is more expressive… I just wouldn't do it on performance grounds is all.
<brisbin> foolove: you don't have to, someone else just gave you the command
<doherty> okay, back to reading
<Mon_Ouie> >> "a long string with spaces".delete " "
<al2o3cr> (String) "alongstringwithspaces"
<brisbin> foolove: as with most things in ruby, there's about 80 ways to doit
sdwrage has joined #ruby
<rking> doherty: The challenge with testing on Rails is that the Unit Tests are very unlike the Controller tests which are very unlike the Acceptance tests.
mrdodo has joined #ruby
<doherty> -__-
namidark has joined #ruby
<juha_> i'm trying to encode a json string, but having problems with a simple thing as objects, i'm trying to get {"item":"hello world"} and only thing i have for now is "hello world" :D could someone guide me to the right direction?
<Hanmac> okay ... delete works too
<brisbin> unit tests and acceptance tests, that's all you really need
<anoldhacker> rking: I get 652 lines.
DuoSRX has quit [Remote host closed the connection]
<foolove> so this would work myvariable2parse = replace.gsub(/ /, "") <-- to remove spaces?
<rking> doherty: If you can start with some simple Unit Testing, e.g. a Model with no Railsness in sight, you'll get a clearer picture of things. Then from there, add on some Capybara-based acceptance tests.
<namidark> I'm trying to direct $stdout to a StringIO object so I can write some tests to validate the output of a class, but when I do somethign like: require 'stringio'; $stdout = fake = StringIO.new; p "foo"; $stdout = STDOUT; p fake.readlines; fake is still an empty array
und3f1 has joined #ruby
sailias has joined #ruby
und3f has quit [Ping timeout: 246 seconds]
<rking> anoldhacker: Yep. Now look near the segfault for clues. Maybe it's trying to find a file and failing.
<brisbin> namidark: fake.string is what you want
MissionCritical has joined #ruby
<rking> anoldhacker: You might also have to "strace -f" to make sure it's following the forks fully.
<fowl> juha_: you cant expect json.generate(some_string) to generate an object. json objects are hashes in ruby so you just do json.generate({"item" => some_string}) if you want to get a json object
<namidark> brisbin: oh nice! :)
ian2 has joined #ruby
<anoldhacker> rking: Now I have 1329 lines.. and no "segfault" string..
mrsolo has quit [Quit: This computer has gone to sleep]
<juha_> fowl: yeah as i said, atm i'm having issues with objects
<rking> anoldhacker: jist that.
<juha_> fowl: i tried it the javascript way of {} and only got errors
<rking> (gem install jist; strace -f whatevercommand 2>&1 | jist -c )
<fowl> juha_: gist.github.com
<rking> Or that.
<rking> If a dork.
<rking> jist 4evr, son!
mrsolo has joined #ruby
_JamieD_ has quit [Quit: _JamieD_]
<fowl> i will come to your house and sneeze on your face rking
iori has joined #ruby
<rking> fowl: How long will it take for you to get here? It might take me some significant time to figure out how to correctly react to that.
<anoldhacker> rking: https://gist.github.com/3427989
<rking> anoldhacker: Hrm, I'm not seeing the segfault. Did you strace -f make miniruby 2>&1 ?
<anoldhacker> rking: oops...
<apeiros_> foolove: replace.delete(" ") # deletes spaces
<anoldhacker> rking: Yes.
<juha_> fowl: oh wait, not sure why i wrote Hash.new there
jonathanwallace has joined #ruby
ian2 has left #ruby [#ruby]
<fowl> juha_: ruby doesnt allow you to do hash.key = value, its hash[key] = value, you're thinking of an openstruct or lua tables or soemthing
axl_ has quit [Read error: Connection reset by peer]
<rking> anoldhacker: Ahh yes, I see the pids showing up at line 298. That's what I was expecting to see, forgot that they don't show up before an actual fork.
<juha_> fowl: or javascript :P
<juha_> fowl: thanks
<anoldhacker> If you're Hash is actually a Struct, you might....
<rking> anoldhacker: I'm not sure what's up, here. It's going about doing some stats then exiting. Perhaps make is satisified that nothing needs to be built?
<fowl> juha_: also you can do JSON(some_hash) to get the json for that hash/array or JSON(string_of_jsonness) to get a hash/array back
<rking> anoldhacker: Does "make miniruby" continue to segfault?
<anoldhacker> Yep.
<fowl> juha_: that's JSON() as a method :)
<juha_> fowl: oh cool
flip_digits has joined #ruby
opus has quit [Quit:]
<anoldhacker> generating id.h ... id.h unchanged ... [.rbconfig.time] Segmentation fault
bfrog_ is now known as bfrog
flip_digits has quit [Client Quit]
<rking> anoldhacker: Argh, I'm continuing to be dumb. At line 625 of your gist it shows the segfault. The tail end is just clean up I guess.
<anoldhacker> Would it be helpful to tell make just to run one process?
flip_digits has joined #ruby
jarred has joined #ruby
flip_digits has quit [Client Quit]
sailias has quit [Quit: Leaving.]
jarred has quit [Client Quit]
ananthakumaran has joined #ruby
fearoffish has joined #ruby
<anoldhacker> rking: Beats what I could do....
<rking> anoldhacker: And in another Argh I'm wrong again. All that is doing is setting up the sigaction. I officially don't see a segfault here.
Takehiro has quit [Remote host closed the connection]
virunga has joined #ruby
<juha_> got it working, nice
MarioEIU has quit [Quit: Leaving]
<anoldhacker> rking: lovely. make -j 1 doesn't change the segfault, and doesn't blatantly change the strace out, either.
<fowl> make -love
virunga has quit [Remote host closed the connection]
<fowl> :>
<anoldhacker> rking: I am curious about the stuff about 40 lines earlier: gettimeofday followed shortly by ioctl(1, SNDCTL_TMR_TIMEBASE or TCGETS, 0xbfc69268) = -1 ENOTTY (Inappropriate ioctl for device)
banisterfiend has quit [Read error: Connection reset by peer]
_graham_ has quit [Ping timeout: 272 seconds]
<rking> anoldhacker: That's the is_tty? check, I think.
<rking> Perhaps it's related, though, since we're seeing different behavior when redirecting (it seems).
banisterfiend has joined #ruby
<rking> anoldhacker: Are you running under tmux?
Matt__ has quit [Ping timeout: 240 seconds]
<rking> (or, perhaps, with that nick, maybe you're running under screen?)
mrdodo has quit [Remote host closed the connection]
ged has joined #ruby
alindeman has joined #ruby
idoru has joined #ruby
RubyPanther has joined #ruby
eighty4_ has joined #ruby
__class__ has joined #ruby
_marvin_ has quit [Changing host]
_marvin_ has joined #ruby
ladder4_ has quit [Changing host]
ladder4_ has joined #ruby
<anoldhacker> no, and if I were, that wouldn't do much. I'm @ home on DSL. And yes, I just heard about tmux a couple of weeks ago. :P
mrdodo has joined #ruby
verbad has joined #ruby
mmercer has joined #ruby
alienvenom has joined #ruby
sirecote has joined #ruby
t85553 has joined #ruby
preller has joined #ruby
richardcreme has joined #ruby
_br_ has joined #ruby
SeySayux has joined #ruby
Wizywig has quit [Changing host]
Wizywig has joined #ruby
ananthakumaran1 has joined #ruby
areil has quit [Remote host closed the connection]
fermion has quit [Quit: P]
t85553 has quit [Remote host closed the connection]
vitorave` is now known as vitoravelino`afk
<rking> anoldhacker: No, what I'm getting at is the idea of running the strace straight to the terminal then using the tmux/screen buffer copy to then gist that.
<anoldhacker> It's not make that is segfaulting. It is the linker.
<rking> I mean to jist that, fowl.
t66829 has joined #ruby
ananthakumaran has quit [Ping timeout: 240 seconds]
<rking> anoldhacker: But, the link being part of the "make" children, should show up under strace -f.
Cascador-afk is now known as Cascador
<anoldhacker> K. I'll copy & paste.
verbad has quit []
<rking> Yeah… I "xy problem"d you. Shoulda just said that then suggested tmux if you couldn't get enough scrollback.
Tearan has joined #ruby
Steppen has joined #ruby
chichou has quit [Remote host closed the connection]
theRoUS has joined #ruby
whowantstolivefo has joined #ruby
<anoldhacker> I can set my scroll history as long as I like...
elhu has joined #ruby
joephelius has quit [Read error: Connection reset by peer]
rippa has joined #ruby
jjbohn is now known as jjbohn|afk
<anoldhacker> Looks like you were correct about the IOCTRL stuff... :(
joephelius has joined #ruby
mrdodo has quit [Ping timeout: 276 seconds]
asuka_ is now known as asuka
<rking> I'm still not seeing the segfault in this.
<rking> anoldhacker: Does make -d miniruby -j 1 segfault or not?
adambeynon has quit [Quit: ["Textual IRC Client: www.textualapp.com"]]
dangerousdave has joined #ruby
fearoffish has quit [Quit: ["Textual IRC Client: www.textualapp.com"]]
flak has quit [Ping timeout: 272 seconds]
DuoSRX has joined #ruby
fearoffish has joined #ruby
Jay_Levitt has quit [Read error: Operation timed out]
sterex has joined #ruby
Speed has joined #ruby
cakehero has joined #ruby
<anoldhacker> No. Actually, I was just going over --debug=j output, and it looks like miniruby works. It's the .rbconfig.time that is failing. And yes, make -d .rbconfig.time -j 1 segfaults.
<rking> Oh, umm..
<rking> So Plain "make miniruby -j 1" doesn't segfault?
Niamkik_ has quit [Quit: leaving]
<anoldhacker> No. make miniruby works fine. "Nothing to do".
<rking> Or it does, but as some sub-target that is doing "make .rbconfig.time" (‽)
<rking> OK, then all is consistent.
<rking> strace -f make -d .rbconfig.time 2>&1 | jist -c
Foxandxss has joined #ruby
weasels is now known as otters
otters has quit [Quit: WeeChat 0.3.8]
otters has joined #ruby
hmans has joined #ruby
Criztian has quit [Read error: Connection reset by peer]
ananthakumaran1 has quit [Ping timeout: 265 seconds]
havenn has quit [Ping timeout: 252 seconds]
<anoldhacker> -d? I get 38k lines...
<rking> For victory and beyond!
imami|afk is now known as banseljaj
<rking> (Actually, it's not necessary, but I'm past the point of wanting to see anything resembling terse output on this problem)
a_a_g1 has left #ruby [#ruby]
Criztian has joined #ruby
whomp has joined #ruby
wallerdev has joined #ruby
Tearan has quit [Quit: Sleepy Badger....]
Monie has quit [Read error: Connection reset by peer]
Monie has joined #ruby
<anoldhacker> Just the tail, but we do have a segfault! https://gist.github.com/3428203
iori has quit [Remote host closed the connection]
Monie has quit [Read error: Connection reset by peer]
<anoldhacker> The full thing actually failed. :P
Wizywig has quit [Quit: Page closed]
mrdodo has joined #ruby
mrsolo has quit [Quit: This computer has gone to sleep]
xclite has joined #ruby
<rking> anoldhacker: It happens after a brk(). Did you run out of RAM?
<anoldhacker> doubtful.
<rking> anoldhacker: Yeah, actually, the brk() returns successfully.
jasonLaster has joined #ruby
<anoldhacker> The fail takes <1 sec.
mrsolo has joined #ruby
<rking> anoldhacker: Are you doing anything weird that I should know about? Like did you solder a wristwatch in place of your CPU L1 Cache?
jenrzzz has joined #ruby
Bish has quit [Quit: ZNC - http://znc.sourceforge.net]
xclite has quit [Remote host closed the connection]
<rking> And what normal stuff should I know about, like does this system regularly successfully compile other things?
Bish has joined #ruby
<anoldhacker> I have successfully compiled several prior HEADs. I'm hacking a new method into Module, but I'm probably past the point of backing out my changes & trying again.
<rking> If you stash your changes and retry the compile, does it work?
<anoldhacker> We shall see...
sdwrage has left #ruby [#ruby]
kirun has joined #ruby
<whomp> i was reading a 2010 article (http://merbist.com/2010/07/29/object-allocation-why-you-should-care/) about how ruby's naive GC, combined with a disregard for memory usage in frameworks and libraries, forces each programmer to be very careful with memory and creates large issues in the enterprise. is this still true?
verto is now known as verto|off
jenrzzz has quit [Ping timeout: 260 seconds]
jenrzzz_ has joined #ruby
<Synthead> is there a ruby equivalent to the bashism ${a:-empty} ? in other words, if a variable is empty, return 'empty', otherwise, return the variable?
<Synthead> ( var ? var : 'empty' ) would do this, but it's hackish imo
<otters> var || 'empty'
<shevy> whomp that articles always sounded like hateful FUD
mmitchell has joined #ruby
<whomp> he mentions 300,000+ objects needed to run "hello, world" in rails
<rking> whomp: That wouldn't surprise me terribly. Rails doesn't try to be lean on startup.
t66829 has quit [Remote host closed the connection]
<rking> Takes about 15s for me every time.
t57089 has joined #ruby
<whomp> is that the sort of thing which might force you to a different framework, as the startup grows?
zburt_ has joined #ruby
jenrzzz_ has quit [Client Quit]
<rking> Meh. It's not a big deal.
<rking> You can get your tests running quickly with Guard/Spork.
jorge_ has joined #ruby
<anoldhacker> I hate it when that happens...
<rking> The question is one of total optimization. I think you generally faster with Rails than with a lower-level tool, but then again, if you really know Rails, you can just pull in the pieces you want.
zburt has quit [Read error: Connection reset by peer]
zburt_ is now known as zburt
<anoldhacker> make works fine on HEAD. So I've obviously failed in my attempt to cargo cult.
<shevy> whomp perhaps if your startup is so successful but at this point your startup already rocks
<rking> LOL, wait.
sailias has joined #ruby
<rking> We're talking about two different types of "startup". I mean "time rails c".
<whomp> time rails c
<whomp> ?
<shevy> he goes a fast way, from hello world, to a startup
Z_Mass has joined #ruby
<fowl> lol
<rking> For once shevy assists in communication, rather than from detracting/deflecting it. Is today opposite day?
hmans has quit [Quit: Leaving...]
<shevy> I just woke up :(
tommyvYo has quit [Quit: Textual IRC Client: http://www.textualapp.com/]
<shevy> I fell asleep, it was too hot
<rking> whomp: I mean the time the rails classes take to load.
<shevy> watched TV, suddenly SNOOOOOOOZE
<whomp> ahh i see
Monie has joined #ruby
mmitchell has quit [Ping timeout: 276 seconds]
verto|off is now known as verto
<anoldhacker> rking: Thanks for the help. Sorry for the mess.
<whomp> much to ponder... thanks for help people
* anoldhacker hangs head in shame, goes to get some food.
<shevy> hehe
<shevy> guilty eating
<rking> anoldhacker: No biggie my man. Hopefully you can pinpoint the issue though. One of the things I detest is mysteries.
<shevy> aha
<shevy> rking, do you use rails?
<rking> anoldhacker: Probably there's a good reason. linking shouldn't just up and segfault. The toolchain should guard against that the same as any other program, like a web browser, should guard against segfaults.
<rking> shevy: Yes, though I'm still a bumbling n00bface with it.
himsin has quit [Ping timeout: 240 seconds]
tommyvYo has joined #ruby
qwerxy has joined #ruby
<rking> whomp: With things like this I think "Hold, Break, Release" is appropriate. First you hold to a recommendation/convention/idea/etc., to see what it's like going with the flow. Then you break it, to find out the consequences and boundaries. At that point, you're released from the rule, free to make a wise judgment.
triptec has quit [Read error: Connection reset by peer]
jenrzzz has joined #ruby
<rking> If someone hasn't gotten the hang of Rails, I don't know if they can rightly say they're aware of the state of the art of web dev.
<whomp> yeah, that's why i'm turning to others. it's just that these sort of decisions are hard to undo
<rking> But after that I wouldn't be surprised if all if they move on to more taylored solutions. (Especially since most of Rails is just a collection of gems, that you can pull in however you want)
capsule_toy has joined #ruby
pricees has joined #ruby
jenrzzz has quit [Client Quit]
Xeago has joined #ruby
<rking> Well, switching frameworks is definitely basically a rewrite, so that's true that it's hard to undo, but with web dev you're never *really* painted into a corner. It's all just making blobs of text that go over the TCP wire, not at all rocket science.
jonathanwallace has quit [Remote host closed the connection]
<rking> "Oh no! I can't figure out how to turn that HTTP request into an HTTP response!!" ← Never been said.
<whomp> yeah, just being cautious, scrambling to learn rails for a new deployment lol
sailias has quit [Ping timeout: 246 seconds]
<Xeago> is there any logs/archives of #ruby?
jwmann has joined #ruby
<whomp> i'll probably just use rails without any tweaks, and make it leaner as i need
jwmann has quit [Max SendQ exceeded]
<rking> The risk, and a risk I'm actively in the process of getting bit by and paying down on, is that you'll see some task and invest a good chunk of time not doing it some obvious way because you're learning "the Rails way"
jwmann has joined #ruby
jwmann has quit [Max SendQ exceeded]
adac has joined #ruby
<rking> A good example of that is the asset pipeline.
cascalheira has quit [Quit: Leaving...]
beneggett has joined #ruby
jwmann has joined #ruby
jonathanwallace has joined #ruby
jwmann has quit [Max SendQ exceeded]
headius has quit [Quit: headius]
<whomp> you mean, in a misguided attempt to do things the "rails way", you end up writing bad code?
<rking> You can bypass it entirely same as you always did, just hard-coding paths to css and js and putting those files underneath the front-end web server. But learning the Sprockets stuff, with compilation from .sass and .coffee and minifying/caching everything, is more rewarding.
<rking> whomp: No, I just mean that there are a bunch of things I already know how to do, but it takes me longer to do them in Rails because there are new things to learn.
<rking> whomp: Routing is a great example of that.
sailias has joined #ruby
adac has quit [Read error: Connection reset by peer]
adaccada has joined #ruby
<apeiros_> rails does have quite a big learning overhead
phinfonet has joined #ruby
<whomp> yeah same, with any framework it's quite hard to know if you're things in the most concise, proper way
adaccada has quit [Read error: Connection reset by peer]
headius has joined #ruby
<rking> It's a fairly complex wad of idioms, but they're nudging you in the right direction, towards using REST better, towards a closer mapping between concept and characters typed into config/routes.rb. Like learning any other language or vocabulary subset, there's an up-front cost.
ninegrid has joined #ruby
Eldariof27-ru has joined #ruby
<apeiros_> na, rails is a big framework. other frameworks are smaller and have a lower overhead.
<apeiros_> it usually means that they do less to, so don't get me wrong on that.
adaccada has joined #ruby
adaccada has quit [Remote host closed the connection]
<whomp> yeah, but even zend php was a headache
<apeiros_> but the overhead is definitively there
jenrzzz has joined #ruby
suppp has quit [Quit: suppp]
<apeiros_> oh, well, php
<whomp> XD
adaccada has joined #ruby
<apeiros_> I'm refering to ruby frameworks
<apeiros_> php is its own nightmare altogether
<whomp> haha yeah
adaccada has quit [Read error: Connection reset by peer]
<whomp> any books i should read to really get the hang of rails?
<rking> A great tour.
doherty has quit [Quit: Leaving]
<apeiros_> whomp: if you're on irc, radar's rails in action maybe
TPFC-SYSTEM has quit [Quit: TPFC-SYSTEM]
* Hanmac thinks that rails is evil
sr___ has quit [Read error: Connection reset by peer]
octarine has quit [Remote host closed the connection]
fcoury has quit [Remote host closed the connection]
anildigital_work has quit [Read error: Connection reset by peer]
dnyy_ has quit [Read error: Connection reset by peer]
SeanTAllen has quit [Read error: Connection reset by peer]
[diecast] has quit [Remote host closed the connection]
davidboy has quit [Read error: Connection reset by peer]
aquaranto has quit [Remote host closed the connection]
randym has quit [Remote host closed the connection]
denysonique has quit [Read error: Connection reset by peer]
cool has quit [Remote host closed the connection]
uris has joined #ruby
sr___ has joined #ruby
octarine has joined #ruby
<whomp> awesome
<whomp> thanks so much for the help guys
<rking> whomp: Then, I'm in the middle of http://www.amazon.com/Rails-Edition-Addison-Wesley-Professional-Series/dp/0321601661 , which is much more: {detailed,errorful,inelegant}.
Eldariof59-ru has quit [Ping timeout: 244 seconds]
<rking> Hanmac: What do you prefer?
rd34 has quit [Quit: rd34]
<whomp> ah yes i was reading that one
aquaranto has joined #ruby
[diecast] has joined #ruby
<Hanmac> i dont do webserver programming currently ... but i could do it in C :P
xclite has joined #ruby
jarred has joined #ruby
schleppy has quit [Quit: Leaving.]
Steppen has quit [Quit: leaving]
jarred_ has joined #ruby
krz has joined #ruby
pabloh has joined #ruby
cool has joined #ruby
<hashpuppy> Hanmac: you work for dos equis?
<pabloh> anybody with experience modifying an excel or ods file from ruby code?
<Hanmac> no i never heard of them ... some underground organisation like Iluminati or FBI?
<hashpuppy> the most interesting man in the world
* anoldhacker KNOWS that rails is evil. Good paying, too!
<hashpuppy> i don't usually do web server pgoramming, but when i do, i do it in C
<otters> pgoramming
<hashpuppy> it's a new thing
<otters> pgo-ramming
<otters> totally rammed this little pgo last night
<hashpuppy> pgo is some hot neighbor of mine
jenrzzz has quit [Quit: crash]
kvirani has quit [Remote host closed the connection]
Jay_Levitt has joined #ruby
randym has joined #ruby
Araxia has joined #ruby
dnyy_ has joined #ruby
jarred has quit [Remote host closed the connection]
fcoury has joined #ruby
bbttxu has joined #ruby
enroxorz-work is now known as JohnRedcorn
Takehiro has joined #ruby
JohnRedcorn has left #ruby ["Leaving"]
xclite has quit [Remote host closed the connection]
carloslopes has joined #ruby
mxbtty has quit [Quit: Leaving.]
xclite has joined #ruby
Matt_ has joined #ruby
jjbohn|afk is now known as jjbohn
anildigital_work has joined #ruby
jenrzzz has joined #ruby
Takehiro has quit [Ping timeout: 272 seconds]
BrokenCog has quit [Quit: leaving]
davidboy has joined #ruby
berserkr has quit [Quit: Leaving.]
jarred_ has quit [Quit: jarred_]
mike4_ has quit [Ping timeout: 276 seconds]
<shevy> otters you naughty naughty otters you!
xclite has quit [Remote host closed the connection]
virunga has joined #ruby
dhruvasagar has joined #ruby
coyo has joined #ruby
elhu has quit [Quit: Computer has gone to sleep.]
mengu has joined #ruby
t57089 has quit [Remote host closed the connection]
t41372 has joined #ruby
jarred has joined #ruby
SeanTAllen has joined #ruby
Parhs has joined #ruby
Parhs has left #ruby [#ruby]
Tearan has joined #ruby
abahkaiyisah has joined #ruby
Yiq has joined #ruby
Tearan has quit [Client Quit]
<lectrick> I still can't believe that my object's method can't know who called it unless that thing passes it into my method.
<Yiq> so if u dont use something like appengine or heroku, u have to use your own server? isnt there somewhere you can just deploy your whole stack easily?
jarred has quit [Remote host closed the connection]
rcassidy has joined #ruby
<lectrick> "caller" is way too rudimentary
denysonique has joined #ruby
sailias has quit [Quit: Leaving.]
uris has quit [Quit: leaving]
xclite has joined #ruby
hukl- has quit [Remote host closed the connection]
hukl has joined #ruby
bricker88 has joined #ruby
mxbtty has joined #ruby
mxbtty has quit [K-Lined]
MarioEIU has joined #ruby
kvirani has joined #ruby
Jay_Levitt has quit [Ping timeout: 246 seconds]
maletor has quit [Quit: Computer has gone to sleep.]
banisterfiend has quit [Read error: Connection reset by peer]
cascalheir has joined #ruby
Yiq has quit []
linoj has quit [Quit: linoj]
qwerxy has quit [Quit: offski]
elaptics is now known as elaptics`away
elaptics`away is now known as elaptics
apucacao has joined #ruby
apucacao has left #ruby [#ruby]
uris has joined #ruby
apucacao has joined #ruby
hukl_ has joined #ruby
Proshot has joined #ruby
gqlewis has quit [Ping timeout: 272 seconds]
tiripamwe has joined #ruby
xclite has quit [Remote host closed the connection]
ShiintoRyuu has quit [Quit: Computer has gone to sleep.]
<Gadgetoid> Is there really no way to specify additional OBJS and SRCS using mkmf?
banisterfiend has joined #ruby
xclite has joined #ruby
hukl- has joined #ruby
hukl has quit [Ping timeout: 260 seconds]
hukl- has quit [Remote host closed the connection]
hukl_ has quit [Read error: Connection reset by peer]
<Gadgetoid> I had to hack my extconf.rb to hell and back
hukl has joined #ruby
nicoulaj has joined #ruby
banisterfiend has quit [Read error: Connection reset by peer]
<invisime1> Gadgetoid: it seems that way. I ended up just manually adding stuff to two or three different globals.
yoklov has joined #ruby
invisime1 is now known as invisime
<Gadgetoid> invisime: I actually loaded up the makefile and modified those lines, probably not ideal
banisterfiend has joined #ruby
<Gadgetoid> So doing something like srcs = Dir.glob('WiringPi/wiringPi/*.c') and makefile.sub!('SRCS = ','SRCS = ' + srcs + ' ')
<invisime> Gadgetoid: indeed. if you want to do that kind of thing, just add it to the globals that mkmf uses to populate those lines. it's (slightly) cleaner. still hackish, but you at least don't need to do any subbing.
ephemerian has joined #ruby
whomp has quit [Quit: Leaving]
answer_42 has quit [Quit: WeeChat 0.3.8]
ngoldman has quit [Remote host closed the connection]
pj has joined #ruby
ngoldman has joined #ruby
<Gadgetoid> invisime: You mean $OBJS and $SRCS? true
lteo_ has left #ruby [#ruby]
hukl has quit [Ping timeout: 245 seconds]
<invisime> for a list of globals that mkmf uses, type the following three lines into irb: defaults = global_variables
<invisime> puts (global_variables - defaults).join("\n")
<invisime> require 'mkmf'
<invisime> so I think it's $objs and $srcs (lowercase), but you'll want to double check your Makefile after doing hacks like this.
pj has left #ruby [#ruby]
<Gadgetoid> Blast, it is! Thanks
pricees has left #ruby [#ruby]
jasonLaster has quit [Remote host closed the connection]
jasonLaster has joined #ruby
<invisime> incidentally, Gadgetoid, do you know how to make it so a custom included .so file's path doesn't have to be included in the LD_LIBRARY_PATH environment variable in order to be linked properly when your extensions .so file is loaded, it can find the other .so?
bigfatfrock has joined #ruby
davidcelis has quit [Quit: K-Lined.]
ngoldman has quit [Ping timeout: 245 seconds]
mmitchell has joined #ruby
pricees has joined #ruby
hukl_ has joined #ruby
azm has quit [Ping timeout: 245 seconds]
<Gadgetoid> invisime: I'm just monging the two together into one library
<Gadgetoid> $srcs = Dir.glob('WiringPi/wiringPi/*.c') is far simpler! thanks
<Gadgetoid> With the source of the custom .so residing in WiringPi/wiringPi/ just using: $objs = Dir.glob('WiringPi/wiringPi/*.c').map{ |file| file.sub('.c','.o') insures it's compiled into wiringpi.so
andrewpthorp has joined #ruby
Criztian has quit [Read error: Connection reset by peer]
jasonLaster has quit [Ping timeout: 246 seconds]
dpk has quit [Quit: Asleep at the keyboard.]
Criztian_ has joined #ruby
<invisime> sweet. so my problem is this: I can't just put the source for everything in one go because some of my code is generated by a third-party tool. so I have to link to that, but it's not in the standard library. I tried using find_library and specifying the path, but it didn't find the library there. :-/
paolooo has joined #ruby
banghouse is now known as banghouseFOOD
andrewpthorp has quit [Client Quit]
<Hanmac> invisime try find_header before
andrewpthorp has joined #ruby
<invisime> I kind of found a work around by just adding the appropriate -L -I and -lotherlibrary flags, but then the extension .so doesn't know where to find the libotherlibrary.so file at runtime unless I set the LD_LIBRARY_PATH environment variable.
<Gadgetoid> Hmm, I'm new to this stuff :D
BrokenCog has joined #ruby
elaptics is now known as elaptics`away
<_keith> mmm Ruby code looks so nice
<Mon_Ouie> neither Ruby nor your OS can guess where your library is if it's not in a standard path
<Mon_Ouie> or gcc, rather than Ruby
<_keith> I need to spend more time on this stuff, I have spent too much with PHP trying to force OOP
<invisime> Mon_Ouie: right, so how do I get gcc to tell the gem object where to look at compile time instead.
pyreal has quit [Quit: pyreal]
jwg2s has quit [Quit: jwg2s]
<invisime> Hanmac: when I do that, it finds the header but not the library.
<Gadgetoid> Doing all this stuff directly on a Raspberry Pi certainly slows it down :D
<BadQuanta> invisime: From what I understood, you said it. You can either temporarily change LD_LIBRARY_PATH, permanently change it, or install the library so that it is in the LD_LIBRARY_PATH
<Mon_Ouie> Maybe you don't want dynamic linking
<invisime> BadQuanta: do you happen to know how to permanently change it?
paolooo has quit [Ping timeout: 245 seconds]
<BadQuanta> Let me find out. Which distro are you running?
<Mon_Ouie> See /etc/ld.so.conf*
<invisime> Mon_Ouie: I know I don't. I'd much rather have source right here, but unfortunately, I don't have source. this library is generated by a third-party tool.
<BadQuanta> invisime: Mind you, I'll be doing the same google searching you could have.
Speed has quit [Ping timeout: 252 seconds]
<BadQuanta> looks like Mon_Ouie said it.
<invisime> BadQuanta: nevermind then, I'll do it. that was why I prepended "do you happen to know..." :-)
bigfatfrock has left #ruby [#ruby]
hmans has joined #ruby
hmans has quit [Client Quit]
<BadQuanta> invisime: Cool beans. :)
<invisime> Mon_Ouie: so I want to do some kind of something with ldconfig then?
jwmann1 has joined #ruby
jwmann1 has quit [Max SendQ exceeded]
emmanuelux has joined #ruby
jwmann1 has joined #ruby
jwmann1 has quit [Max SendQ exceeded]
jwmann1 has joined #ruby
jwmann1 has quit [Max SendQ exceeded]
sailias has joined #ruby
und3f1 has quit [Quit: Leaving.]
SQLStud has joined #ruby
DuoSRX has quit [Remote host closed the connection]
krusty_ar is now known as minita17
banisterfiend has quit [Remote host closed the connection]
ninegrid has quit [Quit: leaving]
<Mon_Ouie> Just running it I think
apucacao has quit [Quit: apucacao]
banisterfiend has joined #ruby
banisterfiend has quit [Read error: Connection reset by peer]
tayy has joined #ruby
banisterfiend has joined #ruby
bricker881 has joined #ruby
elico has joined #ruby
Matt_ has left #ruby [#ruby]
minita17 is now known as krusty_ar
Guest37999 has quit [Ping timeout: 248 seconds]
<invisime> Mon_Ouie: thanks! btw, I think this describes what I want to do: http://serverfault.com/questions/201709/how-to-set-ld-library-path-in-ubuntu (but obviously I'll do it programatically at the end of my extconf.rb)
banisterfiend has quit [Read error: Connection reset by peer]
<elico> I need some help with Berkley DB files.
ilyam has joined #ruby
burgestrand has joined #ruby
banisterfiend has joined #ruby
stopbit_ has quit [Read error: Connection reset by peer]
bricker88 has quit [Ping timeout: 276 seconds]
<elico> working with Berkley DB files.
eywu has joined #ruby
<Muz> What's the actual problem?
stopbit has joined #ruby
mucker has quit [Quit: leaving]
mahmoudi_ is now known as mahmoudimus
<elico> I want to store\read domains in a Berkley DB file
<elico> it's a domain blacklist
malcolmva has quit [Ping timeout: 276 seconds]
<elico> so I need to read from a text file a list of domains and store them in DB
eywu1 has quit [Ping timeout: 244 seconds]
tiripamwe has quit [Ping timeout: 245 seconds]
<elico> and then check if they exist...
<Hanmac> invisime it may work to set the LD_LIBRARY_PATH inside your extconf.rb file ...
mmitchel_ has joined #ruby
voodoofish430 has quit [Quit: Leaving.]
<elico> currently i am working with mysql and storing the data in a reverse stat such as "dom.com" stored as "moc.mod" since mysql dosnt have a reverse index option.
robustus|Off has quit [Quit: ZNC - http://znc.in]
<elico> if i understood BDB storing values in a key -> value and i'm a bit confused on how squidguard stores the domains in a BDB
<invisime> Hanmac: that'll work if they install and then immediately run the app and never stop the app and restart it without reinstalling.
<invisime> Hanmac: because that environment variable has to be there at runtime, not compile time.
<invisime> unless someone can tell me how to just hardcode the location of the libotherlibrary.so into mygemexension.so
brasten has quit [Quit: brasten]
mmitchell has quit [Ping timeout: 276 seconds]
Axsuul has joined #ruby
brasten has joined #ruby
Asher1 has quit [Quit: Leaving.]
Asher has joined #ruby
Eldariof27-ru has quit []
chriskk has quit [Ping timeout: 256 seconds]
phinfonet has quit [Ping timeout: 265 seconds]
tayy has quit [Remote host closed the connection]
i0n has joined #ruby
workmad3 has joined #ruby
phinfonet has joined #ruby
Araxia has quit [Read error: Connection reset by peer]
Araxia has joined #ruby
Stalkr_ has quit [Read error: Connection reset by peer]
Stalkr_ has joined #ruby
thunders_ has quit [Read error: Connection reset by peer]
thunderstrike has joined #ruby
[diecast] is now known as midgetspy
<elico> Muz: ?
jearvondharrie has quit [Ping timeout: 260 seconds]
nanderoo has quit [Remote host closed the connection]
_graham_ has joined #ruby
tiripamwe has joined #ruby
midgetspy is now known as [diecast]
Ethan has quit [Quit: *poof*]
elux has joined #ruby
vitoravelino`afk is now known as vitoravelino
jbw has quit [Ping timeout: 244 seconds]
atmosx has joined #ruby
<atmosx> hello
<Hanmac> invisime: normaly an lib, proprietary or not should be installed under /usr/lib, /usr/<arch>/lib or /usr/local/lib ... or do you want to ship it inside the gem?
beneggett has quit [Quit: Computer has gone to sleep.]
<shevy> Hanmac the problem here is that they reference to state-of-the-art science like 200 years ago
jwmann has joined #ruby
<invisime> Hanmac: that latter would be preferable, but I'd settle for either way.
jwmann has quit [Max SendQ exceeded]
<foolove> does replace.gsub need a module
<shevy> Hanmac they do not want to "learn" modern day science because they only want to attack a very small and narrow niche
jwmann has joined #ruby
jwmann has quit [Max SendQ exceeded]
<atmosx> Hello, why in this case the instance variable doesn't act as a "global" variable? https://gist.github.com/3429024
maletor has joined #ruby
<Hanmac> foolove: you are coming from python right? ... no it does not
<atmosx> if I switch it to $current works fine
jwmann has joined #ruby
jwmann has quit [Max SendQ exceeded]
<shevy> foolove ! hi!!!
<shevy> atmosx, since when do @ivars act like global variables :P
jwmann has joined #ruby
jwmann has quit [Max SendQ exceeded]
elhu has joined #ruby
<Hanmac> atmosx the instance variable is defined in the wrong scope
<invisime> Hanmac: in fact one of the copies of my library lives at /usr/local/lib/otherlibraryname
<shevy> atmosx it is not initialized
jwmann has joined #ruby
<shevy> atmosx put it into initialize() and it will work
jwmann has quit [Max SendQ exceeded]
tewecske has joined #ruby
tewecske has quit [Max SendQ exceeded]
<atmosx> hmmm
<shevy> or
<shevy> make it a CONSTANT
<Hanmac> atmosx you defined the instance variable into the class ITSELF
<shevy> CURRENT = "version 0.2-alpha"
<atmosx> doesn't init make sense only when I have external values to pass to the class
<shevy> or better
<shevy> VERSION = "version 0.2-alpha"
<invisime> Hanmac: it's also copied in /usr/local/otherlibraryname/lib
jasonLaster has joined #ruby
<atmosx> shevy: hmm
<shevy> atmosx, initialize() is your initializer for your class
<shevy> it's the second method that is called (after allocate() I think)
<Hanmac> hm: "/usr/local/otherlibraryname/lib" seems wrong imo
<atmosx> yeah but why should I initialize anything here
t41372 has quit [Remote host closed the connection]
banisterfiend has quit [Read error: Connection reset by peer]
<shevy> atmosx, for version strings, I recommend VERSION or Version constant
mengu has quit [Remote host closed the connection]
elhu has quit [Client Quit]
<shevy> because you want to use an instance variable
t1806 has joined #ruby
<Hanmac> better: VERSION = "version 0.2-alpha".freeze
<shevy> and they do not exist unless you give them a value
flip_digits has joined #ruby
jasonLaster has quit [Remote host closed the connection]
<shevy> you should use a constant though :D
<invisime> Hanmac: it shouldn't matter, it's in both places. and have_library doesn't find it. nor does find_library when I hand it an explicit path to search. :-/ I've basically had 0 success with getting have_library to work with this thing.
banisterfiend has joined #ruby
kenichi has quit [Remote host closed the connection]
jasonLaster has joined #ruby
urbann has quit [Remote host closed the connection]
flip_digits has quit [Client Quit]
<atmosx> shevy: Yes, I'll go with the constant, thanks the hints :-) happy to clarify ruby basics hehe
MarioEIU has quit [Quit: Leaving]
<Hanmac> currently it only looks in /usr/local/lib not in the sub dirs ... so the best would be symbolic links
jwmann has joined #ruby
jwmann has quit [Max SendQ exceeded]
hashpuppy has quit [Quit: hashpuppy]
<rcassidy> >> p "ping"
<al2o3cr> (String) "ping", Console: "ping"
<shevy> atmosx, what I usually do is write a method called "def reset"
<shevy> and call this from initialize()
<shevy> at least for larger classes
<atmosx> what does it do?
ciopte7 has joined #ruby
<shevy> atmosx, I use it mostly to initialize all @ivars
hakunin has joined #ruby
<shevy> I find it cleaner to put it into a method, than initialize them directly in def initialize
<shevy> def initialize
<shevy> @foo = "bla"
<shevy> vs
<shevy> def initialize
<shevy> reset
<atmosx> shevy: I need to see an example, a gist or someting
<shevy> ^^^ :)
<shevy> it's really only that
<atmosx> ah def initialize reset
<atmosx> and then you define everything in reset
<shevy> yeah
<shevy> in the past I did this
<atmosx> it's just another abstraction layer though
<shevy> def initialize
<shevy> initialize_instance_variables
<shevy> but that was too long
<invisime> is there some way to make bundler run the extconf.rb file for a local gem?
<shevy> atmosx, yeah
<shevy> atmosx, but many things are abstraction layers
<atmosx> yes sure
<shevy> atmosx, all methods are abstraction layers ;)
<atmosx> haha true
<shevy> but I like methods, they feel as if they make things much cleaner
<atmosx> hmm Not sure if should I use FTS3 in sqlite3
jasonLas_ has joined #ruby
jasonLaster has quit [Read error: Connection reset by peer]
Proshot has quit [Quit: Leaving]
elux has quit [Quit: Bye!]
voodoofish430 has joined #ruby
chare has joined #ruby
elhu has joined #ruby
pricees has quit [Quit: leaving]
jbw has joined #ruby
capsule_toy has quit []
kpshek has joined #ruby
mmitchell has joined #ruby
artOfWar has joined #ruby
<lectrick> Can anyone explain if this is a logical fail or just my hosed IRB? https://gist.github.com/327075966af8fca06cbd
Russell^^ has joined #ruby
SeySayux has quit [Changing host]
SeySayux has joined #ruby
DarthGandalf has joined #ruby
vitoravelino is now known as Guest62190
denysonique is now known as Guest68848
SQLStud is now known as Guest46682
Godslastering is now known as Guest9125
alindeman is now known as Guest8778
ged is now known as Guest92060
dhruvasagar is now known as Guest79461
havenn has joined #ruby
<elico> anyone knows how to work with BDB?
<adeponte> Axsuul: hey this is what I ended up doing https://github.com/realpractice/wrap_in_module
t1806 has quit [Remote host closed the connection]
kenichi has joined #ruby
juarlex has joined #ruby
andrewhl_ has quit [Remote host closed the connection]
[diecast] has quit [Changing host]
[diecast] has joined #ruby
[diecast] has joined #ruby
[diecast] has quit [Changing host]
<Axsuul> adeponte: oh sick, thanks for letting me know
<Axsuul> how did you ever find that gem =p
<Axsuul> or is this yours
<adeponte> Axsuul: yep, no problem. It is some other dudes code that I found in a super old project before gems really existed. So, I figured I would turn it into a gem and make everyones lives a little easier if they need this functionality.
<Axsuul> adeponte: nice! you got a star from me
mmitchel_ has quit [Remote host closed the connection]
_keith has quit [Quit: _keith]
<adeponte> Axsuul: :-) , he uses the same technique that I eventually arrived upon which is eval() the code inside of the module.
<adeponte> Axsuul: couldn't find any other gems that do this so if you every discover any let me know
artOfWar has joined #ruby
artOfWar has quit [Changing host]
pwf has joined #ruby
<pwf> has anyone seen this on mountain lion trying to 'gem install' something: xcrun: Error: failed to exec real xcrun
<Axsuul> adeponte: will do
<pwf> i have a fresh install, with command line tools installed and 'xcode-select --switch /usr/bin' has been run
<adeponte> Axsuul: thx
zigidias has quit [Changing host]
zigidias has joined #ruby
coyo has quit [Changing host]
coyo has joined #ruby
krz has quit [Changing host]
krz has joined #ruby
Foxandxss has joined #ruby
Foxandxss has quit [Changing host]
t59678 has joined #ruby
beneggett has joined #ruby
Axsuul has quit [Remote host closed the connection]
TheFuzzball has joined #ruby
Axsuul has joined #ruby
tiripamwe has quit [Ping timeout: 240 seconds]
rippa has quit [Ping timeout: 276 seconds]
Asher1 has joined #ruby
xclite has quit [Remote host closed the connection]
jamiltron has joined #ruby
Criztian_ has quit []
Speed has joined #ruby
Speed has quit [Changing host]
Speed has joined #ruby
atmosx has quit [Ping timeout: 268 seconds]
elhu has quit [Quit: Computer has gone to sleep.]
pabloh has quit [Quit: Ex-Chat]
<elico> anyone?
Criztian has joined #ruby
Guest62190 is now known as vitoravelino
<lectrick> Can anyone explain if this is a logical fail or just my hosed IRB? https://gist.github.com/327075966af8fca06cbd << fowl, got any clue?
pabloh has joined #ruby
vitoravelino has quit [Changing host]
vitoravelino has joined #ruby
Asher has quit [Ping timeout: 252 seconds]
chriskk has joined #ruby
jjbohn is now known as jjbohn|afk
aantix_ has joined #ruby
Markvilla has joined #ruby
<elico> lectrick: what are you trying to do?
sebicas has joined #ruby
<lectrick> elico: Get method_missing to return the binding where the method was attempted to be called
<lectrick> Ultimately :)
banisterfiend has quit [Read error: Connection reset by peer]
Russell^^ has quit [Quit: Russell^^]
banisterfiend has joined #ruby
<apeiros_> lectrick: puts invokes to_ary on the argument
<apeiros_> and to_ary is missing
kratsg has joined #ruby
<apeiros_> so it goes into method_missing
opus has joined #ruby
<apeiros_> where it again tries to puts the fixnum, and puts again tries to call to_ary on it…
<lectrick> apeiros_: puts... calls to_ary?
<apeiros_> -> infinite recursion
<apeiros_> yes
<lectrick> since when the fuck does puts call to_ary on the arg?
_keith has joined #ruby
<lectrick> never heard of that in my life
aantix has quit [Ping timeout: 260 seconds]
aantix_ is now known as aantix
<Mon_Ouie> I'd think since 1.9
<lectrick> wow.
<Hanmac> elico: do this: def method_missing(sym,*args)
<kratsg> How do I compare two arrays of hashes using Hash.diff : [{..},{..},...,{..}] and [{..},{..},...,{..}] structure.
jorge_ has quit [Remote host closed the connection]
jjbohn|afk is now known as jjbohn
<Mon_Ouie> Arrays are special cased, instead of displaying array.to_s puts display every element on its own line
<lectrick> Mon_Ouie: And what was the reasoning behind that?
<apeiros_> lectrick: puts to_s # should solve the issue
<Hanmac> oh sorry i mean lectrick
<lectrick> apeiros_: or just 'p' i guess
<apeiros_> yeah, I think p just calls inspect, no matter what
tiripamwe has joined #ruby
geekbri has quit [Remote host closed the connection]
<Hanmac> hm yeah puts is evil inside method_missing
SeanLazer has quit [Quit: SeanLazer]
jorge has joined #ruby
tommyvYo has quit [Quit: Textual IRC Client: http://www.textualapp.com/]
<invisime> lectrick: you could also always monkey patch the relevant to_s method. :-P
<elico> lectrick: "method_missing" is not a Class method so this is the reason it wont work...
<lectrick> elico: yeah i thought of that too.
codeFiend has joined #ruby
atmosx has joined #ruby
mike4_ has joined #ruby
<atmosx> shitty internet, shitty energy company, no wonder we're almost there
robacarp has joined #ruby
RubyPanther has quit [Quit: self.exit(:stage=>:left)]
miho has quit [Remote host closed the connection]
chare has quit [Quit: Leaving]
RubyPanther has joined #ruby
<lectrick> is the extensions gem broken?
qwerxy has joined #ruby
virunga has left #ruby [#ruby]
banisterfiend has quit [Read error: Connection reset by peer]
jrist has quit [Ping timeout: 272 seconds]
ly_gs has joined #ruby
mmitchell has quit [Remote host closed the connection]
qwerxy has quit [Client Quit]
ggreer has quit [Changing host]
ggreer has joined #ruby
banisterfiend has joined #ruby
havenn has quit [Remote host closed the connection]
graft has quit [Ping timeout: 272 seconds]
pskosinski has quit [Quit: http://www.redeclipse.net -- Fast-paced online FPS]
Asher1 has quit [Quit: Leaving.]
recycle has joined #ruby
Asher has joined #ruby
Z_Mass has quit [Ping timeout: 260 seconds]
banseljaj is now known as imami|afk
sazboom has quit [Ping timeout: 246 seconds]
kratsg has quit [Quit: Page closed]
GoGoGarr_ has quit [Remote host closed the connection]
<shevy> rubygems/custom_require.rb:36:in `require': iconv will be deprecated in the future, use String#encode instead.
binaryplease has joined #ruby
lurch_ has joined #ruby
williamcotton has quit [Quit: williamcotton]
williamcotton has joined #ruby
mmitchell has joined #ruby
dpk has joined #ruby
<Mon_Ouie> I still have some scripts that can't be ported to String#encode without writing all the transliteration table myself as opposed to using the one buit in iconv
andrewhl has joined #ruby
nohonor has joined #ruby
<Hanmac> lectrick: what extensions gem?
brisbin has left #ruby [#ruby]
t59678 has quit [Remote host closed the connection]
t67068 has joined #ruby
shiki has joined #ruby
zaargy has quit [Quit: Lost terminal]
<Synthead> is there some way I can do something crafty like this? http://pastie.org/4570519
emmanuel__ has joined #ruby
<rcassidy> Synth, whatcha trying to do?
<nohonor> a wtf in "Programming Ruby 2nd Ed": 'a hash
<nohonor> does not support multiple keys with the same value'
<nohonor> what exactly is that supposed to mean
ibash has quit [Quit: ibash]
<Synthead> rcassidy: did you take a look at the pastie?
krusty_ar has left #ruby ["I'm not here. This isn't happening"]
<rcassidy> i did, Synth - is that a sql query in single quotes?
<rcassidy> that gets run when someone puts in the --yer-mom flag
<Synthead> rcassidy: yeah. I'm looking to have OptionParser return that if the user uses -y
<Synthead> rcassidy: don't worry that it's sql for now :)
<rcassidy> ...return it?
<rcassidy> like, immediately?
<Synthead> rcassidy: yeah. like the effect of def this; 'this'; end
emmanuelux has quit [Ping timeout: 265 seconds]
i0n has quit [Changing host]
i0n has joined #ruby
<rcassidy> Synthead: I just tried an explicit return and it didn't like that
Araxia has quit [Quit: Araxia]
<rcassidy> maybe just set it as a variable somewhere and spit it out immediately after parsing if that flag is set?
Araxia has joined #ruby
<rcassidy> what are you trying to do?
Markvilla has quit [Quit: Computer has gone to sleep.]
xbayrockx has joined #ruby
petrjanda has joined #ruby
<Synthead> rcassidy: make my code efficient :)
hukl has joined #ruby
nicoulaj has quit [Remote host closed the connection]
`brendan has quit [Quit: - nbs-irc 2.39 - www.nbs-irc.net -]
<Synthead> rcassidy: could just use an instance variable though
recycle has quit [Remote host closed the connection]
insecurlex has joined #ruby
parus has joined #ruby
chare has joined #ruby
opus has quit [Ping timeout: 245 seconds]
<rcassidy> i guess i don't understand the use case
sailias has quit [Quit: Leaving.]
<rcassidy> is this user running the script from the command line? where is what you want to return *going*?
graft has joined #ruby
graft has quit [Changing host]
graft has joined #ruby
<rcassidy> i mean it would be trivial to spit out the sql string to the command line upon finding the flag
xbayrockx1 has quit [Ping timeout: 244 seconds]
Xeago has quit [Remote host closed the connection]
opus has joined #ruby
hukl_ has quit [Ping timeout: 252 seconds]
<rcassidy> like... option parser doesn't return anywhere useful so
<Synthead> rcassidy: yeah, from the command line. it'd be nice to do puts options.parse(ARGV) and have the string returned instead of stating @query = "" a number of times, running options.parse(ARGV), then puts @query
nwest has quit [Quit: Textual IRC Client: http://www.textualapp.com/]
<rcassidy> hm
<rcassidy> why not just put the puts inside the opts.on block
<rcassidy> then upon parsing everything you want to print gets printed
Z_Mass has joined #ruby
hukl_ has joined #ruby
_keith has quit [Quit: _keith]
hukl- has joined #ruby
<Synthead> rcassidy: ooh, the puts was an example. the goal is to put it in a var so I can run it.
<atmosx> good night rubies
jlogsdon has quit [Remote host closed the connection]
atmosx has quit [Quit: ["Textual IRC Client: www.textualapp.com"]]
hukl has quit [Ping timeout: 260 seconds]
<rcassidy> Synth ah i see
kvirani has quit [Remote host closed the connection]
Guest92060 is now known as ged
Spooner has joined #ruby
<rcassidy> well, i guess the only thing i could suggest to shorten your code would be
hukl_ has quit [Ping timeout: 248 seconds]
t67068 has quit [Remote host closed the connection]
<rcassidy> you can change the 'end' of your optparse block to be 'end.parse!'
t73559 has joined #ruby
axl_ has joined #ruby
<workmad3> rcassidy: ewww
<rcassidy> lol
<Synthead> haha
axl_ has quit [Read error: Connection reset by peer]
<rcassidy> well, he's concerned about brevity
<Synthead> how would that work?
hukl has joined #ruby
<workmad3> rcassidy: I can sometimes, just about, accept a method call on a block using {}, but never on a do...end :P
zach_ has joined #ruby
<rcassidy> workmad3: fair
zach_ is now known as Guest96098
<workmad3> where's the code, anyway?
* workmad3 wants to poke
_keith has joined #ruby
<rcassidy> the code's not much workmad - it's basically 'what's the best way to immediately return a value if a particular command line flag is specified'
<rcassidy> '
<rcassidy> also be succinct'
hukl- has quit [Ping timeout: 240 seconds]
axl_ has joined #ruby
apeiros_ has quit [Remote host closed the connection]
axl_ has quit [Read error: Connection reset by peer]
<rcassidy> Synth you also don't really have to bother with setting the string to be an empty string - you can just set the variable and do something with it if it is defined
<rcassidy> >> defined? this_doesnt_exist
<al2o3cr> (NilClass) nil
axl_ has joined #ruby
Guest96098 has quit [Client Quit]
_keith has quit [Client Quit]
<invisime> >> %w(we have an interpreter?)
<al2o3cr> (Array) ["we", "have", "an", "interpreter?"]
luxurymode has quit [Quit: Computer has gone to sleep.]
<invisime> sweet.
<rcassidy> >> a=5; defined? a
<al2o3cr> (String) "local-variable"
erichmenge has quit [Quit: Linkinus - http://linkinus.com]
<workmad3> rcassidy: so, something like "return 'foo' if ARGV.include?("-r") "
erichmenge has joined #ruby
<rcassidy> workmad3: that is indeed very succinct :)
<invisime> >> self.class
<al2o3cr> (Class) Object
Ethan has joined #ruby
<workmad3> rcassidy: yeah... why are you messing around with optparse if you want succinctness? :P
<rcassidy> i dunno, ask Synthead!
Z_Mass has quit [Quit: Leaving]
<rcassidy> his code :p
<workmad3> :)
<Synthead> rcassidy: hah. I'm just going to do the aforementioned @query instance variable
hadees has quit [Quit: hadees]
<workmad3> if it's for increased verbosity... puts "I'm really chatty" if ARGV.include?("-v")... :)
axl_ has quit [Read error: Connection reset by peer]
ly_gs has quit [Remote host closed the connection]
carloslopes has quit [Quit: Leaving.]
<rcassidy> >> Dir.glob("*")
<al2o3cr> (Array) ["usr", "bot.err", "log", "bot.rb", "bot.out", "sys", "root", "proc", "node_modules", "bin", "lib", "etc", "lost+found"]
Juul has joined #ruby
<rcassidy> ooh, that's new.
gfontenot has joined #ruby
<workmad3> ooh, node :)
<workmad3> >> system("node -v")
<al2o3cr> (NilClass) nil
<workmad3> >> `node -v`
<al2o3cr> -e:1:in `eval': No such file or directory - node -v (Errno::ENOENT), from (eval):1:in `<main>', from -e:1:in `eval', from -e:1:in `<main>'
axl_ has joined #ruby
<workmad3> :(
brasten has quit [Quit: brasten]
<rcassidy> >> a=File.open("bot.err", "r"); a.gets
<al2o3cr> (String) "[2012/08/21 13:23:34.716] !! [on handler] Registering handler with pattern `#<Cinch::Pattern:0x00000000c4d128 @prefix=nil, @pattern=/^>>(.+)/, @suffix=nil>`, reacting on `message`\n"
<workmad3> >> `/usr/bin/node -v`
<al2o3cr> -e:1:in `eval': Permission denied - /usr/bin/node -v (Errno::EACCES), from (eval):1:in `<main>', from -e:1:in `eval', from -e:1:in `<main>'
drupin has joined #ruby
<drupin> rake aborted!
<rcassidy> workmad, most stuff is very well sandboxed.
<drupin> fe_sendauth: no password supplied
<rcassidy> we spent many an afternoon breaking it.
_keith has joined #ruby
<drupin> what this means which password this needs
<krz> which is a better convention: foobar(foo.id, foo.name, bar.id) or foobar(foo, bar) ?
brett has left #ruby [#ruby]
<workmad3> rcassidy: yeah, I know... I was helping :)
<workmad3> rcassidy: I know he's altered his sandboxing approach a lot now though
<rcassidy> it's cool that i can read files though, shame i can't write
havenn has joined #ruby
<rcassidy> oh wow it's nearly 6
<rcassidy> peace all!
<workmad3> bah
<workmad3> it's 11pm :P
thatRD has quit [Ping timeout: 245 seconds]
<krz> thoughts?
Seich has quit [Ping timeout: 265 seconds]
ph^_ has quit [Remote host closed the connection]
havenn_ has joined #ruby
<workmad3> krz: chocolate is nice
<workmad3> krz: coffee is also nice
brasten has joined #ruby
<Synthead> krz: I like turtles
uris has quit [Quit: leaving]
<workmad3> Synthead: it's turtles all the way down :)
recycle has joined #ruby
reactormonk has quit [Ping timeout: 276 seconds]
ibash has joined #ruby
ringotwo has quit [Read error: Connection reset by peer]
ringotwo has joined #ruby
thunderstrike has quit [Read error: Connection reset by peer]
DrShoggoth has quit [Quit: Leaving]
thunderstrike has joined #ruby
chessguy has joined #ruby
yoklov has quit [Quit: bye!]
yoklov has joined #ruby
uris has joined #ruby
jonathanwallace has quit [Remote host closed the connection]
alanp has joined #ruby
alanp_ has quit [Read error: Connection reset by peer]
randomau_ has joined #ruby
mmitchell has quit [Remote host closed the connection]
randoma__ has joined #ruby
joshman_ has quit [Quit: Computer has gone to sleep.]
<lectrick> The docs for binding say "Returns the binding associated with prc. Note that Kernel#eval accepts either a Proc or a Binding object as its second parameter.". But I tried eval 'whatever', b where b was a Proc and I got an error "wrong argument type Proc (expected Binding) (TypeError)"
itnomad has quit [Remote host closed the connection]
randomautomator has quit [Ping timeout: 248 seconds]
banisterfiend has quit [Read error: Connection reset by peer]
<shevy> I hope ruby 2.0 clears up stuff like iconv
randomau_ has quit [Ping timeout: 256 seconds]
havenn_ has quit [Remote host closed the connection]
banisterfiend has joined #ruby
recycle has quit [Remote host closed the connection]
reactormonk has joined #ruby
jorge has quit [Remote host closed the connection]
nateberkopec has quit [Quit: Linkinus - http://linkinus.com]
<workmad3> shevy: isn't iconv part of the stdlib? and isn't stdlib being gemified for ruby 2.0?
<shevy> hmm
<shevy> that would be kinda cool
insecurlex has quit [Remote host closed the connection]
<shevy> then rubygems would be a first class citizen
<workmad3> rubygems already is
<shevy> but
<shevy> rubygems/custom_require.rb:36:in `require': iconv will be deprecated in the future, use String#encode instead.
<shevy> :(
* workmad3 shrugs
<elico> workmad3: did you ever worked with BDB?
<workmad3> elico: err... no
<shevy> sounds like sado maso
<shevy> BDB driven development (whip it! whip me!!!)
<elico> workmad3: how about processing domain names?
<elico> shevy: the api of BDB is kind of a SADO MASO.
<workmad3> elico: in what sense?
stopbit has quit [Quit: Leaving]
hukl has quit [Quit: Leaving...]
<drupin> fe_sendauth: no password supplied ....what this means which password this needs
graspee has joined #ruby
<shevy> ewww
<drupin> rake aborted!
recycle has joined #ruby
<RubyPanther> strict duck typing
<shevy> RubyPanther what are you doing to that poor duck :(
<elico> I wrote some program for web blacklists
<workmad3> ??
<workmad3> RubyPanther: that pic is... disturbing
<workmad3> RubyPanther: on several levels...
<RubyPanther> shevy: I hoped the filename gave away the reference to the Madonna "Human Nature" video.
<workmad3> RubyPanther: for starters... is that meant to be a riding crop?
infinitiguy has quit [Quit: Leaving.]
<RubyPanther> Yes
<RubyPanther> In the video it is one of those purse-sized dogs
<workmad3> ok... second... what the hell is that poor man-cat thing doing with his paws to hold it? it looks like he needs to dislocate digits!
<shevy> RubyPanther, that file name was lying!
<RubyPanther> Palm-sized
<shevy> it had nothing to do with madonna but with putting something into a duck from behind
<elico> I have a TLD and i need to match it to the list.
<workmad3> elico: you're black listing TLDs? fun :)
<elico> no no TLD as an higher Domains compared to the sub..
<RubyPanther> Nothing enters or leaves the duck, the duck is simply typed based its quack when gently prodded.
<elico> means sub2.sub1.domain.com
wvms has joined #ruby
<elico> sub1.domain.com is a TLD compared to the sub2...
<workmad3> elico: right... no
<workmad3> elico: that's not what they're called
<elico> How they called?
<eam> elico: a tld is only the top level domain
Stalkr_ has quit [Quit: Leaving...]
<eam> as in com, but not foo.com
<elico> well i do know that
<workmad3> elico: TLD is the top level domain... meaning the .com, .uk, etc
<workmad3> elico: and *only* that...
<elico> so how the lower domains called?
<eam> domains, subdomains
<elico> ok
<elico> so i have a domain or a subdomain that is black listed..
<elico> and i am checking if the current request belong has an entry blacklisting the domani..
* workmad3 waits for a point or a problem
binaryplease has quit [Ping timeout: 244 seconds]
<elico> the black list acl is in a form of ".domain.com" and the domain match is "domain.com" and all subdomains
gfontenot has quit [Ping timeout: 252 seconds]
machty has quit [Quit: machty]
<krz> how do i create a hash, so i can do something like request.remote_ip. i tried request = { 'remote_ip' => 232323232 }.
<krz> actually this might be a rails thing
binaryplease has joined #ruby
yxhvuud has quit [Ping timeout: 245 seconds]
kpshek has quit []
<workmad3> krz: check out openstruct
<elico> krz: it's request['remote_ip']
<krz> thanks workmad3
<elico> to get the hash
<krz> elico: yea i know about that. I'm just wondering how rails can do it with .
evenix has joined #ruby
<krz> workmad3: has a point with openstruct
[Neurotic] has joined #ruby
<workmad3> krz: rails does it through the fact that 'request' isn't just a hash
<elico> workmad3: so what i did..
<Mon_Ouie> It can't if it's just a hash (unless it does something really terrible on the Hash class of course)
<workmad3> krz: request is, unsurprisingly, a request object :P
gfontenot has joined #ruby
<elico> I have used mysql to store the domain names in a reverse form..
<krz> workmad3: yea now that i think of it
<krz> but kudos on the openstruct suggestion ;-)
<elico> and i search for the domain from the url and the iterate on all the answers to match the rules
dangerousdave has quit [Quit: Leaving...]
<elico> I will show you the code
<workmad3> elico: I stopped caring about 10 comments ago...
<elico> workmad3: OK sorry
<shevy> you two make up with hot kisses!
<elico> but he dont like me!!
<shevy> RubyPanther " its quack when gently prodded" PERVERT!!!!!!!
<shevy> elico did you kiss him yet
<RubyPanther> huh?
techsurvivor has joined #ruby
<elico> he dont want me to kiss him. that hansom
<shevy> elico you need to try it with another strategy
<elico> help me shevy
<shevy> ack
mneorr has quit [Quit: Leaving.]
petrjanda has quit [Quit: petrjanda]
<shevy> elico can you bring your question into a ruby-format
mneorr has joined #ruby
<elico> yes
<shevy> "if I have this array, how do I exclude that entry from it"
mneorr has quit [Client Quit]
<shevy> that's too much, and only code!
<elico> ok
<shevy> you must try to isolate the problem into the simplest thing that others can solve
<RubyPanther> shevy.respond_to? :quack
<elico> I will write it down in a pastebin..
kirun has quit [Quit: Client exiting]
yasushi has joined #ruby
<shevy> pastie.org :D
<elico> nice!
Tref has quit [Quit: Tref]
t73559 has quit [Remote host closed the connection]
t37927 has joined #ruby
matty5000 has joined #ruby
mistergibson has joined #ruby
yasushi has quit [Ping timeout: 246 seconds]
ladder4_ is now known as ladder4
<elico> this is how it works now..
<elico> and i want to use BDB..instead of MYSQL
internet_user has quit [Remote host closed the connection]
MasterIdler__ has joined #ruby
MasterIdler__ has quit [Client Quit]
<elico> but I have no clue on how to store the domains in a key pair DB such as BDB
<shevy> I dont use databases much myself at all
<foolove> with ruby mechanize how do i set content of mechanize get request
<elico> data structure in file?
<shevy> elico I use yaml usually when I need to store data in a file
workmad3 has quit [Ping timeout: 265 seconds]
<elico> well it's 17mb of strings each line a string
<foolove> i need to print the content of a page i get with mechanize
<shevy> ok and the problem is specifically what with ruby
<shevy> so far I only see database-related problems :P
theRoUS has quit [Ping timeout: 260 seconds]
seich- has joined #ruby
seich- is now known as seich
MasterIdler_ has quit [Ping timeout: 240 seconds]
nilg` has quit [Read error: Connection reset by peer]
<elico> well you are right but BDB is in oracle hands.. and since a key pair is a common way to store data I assumed there is a nice men\women out there that can maybe give me a bit help to think on how to implement it..
pskosinski has joined #ruby
jamiltron has quit [Ping timeout: 276 seconds]
_keith has quit [Quit: _keith]
<elico> shevy: are you still alive?
<shevy> elico yeah but I use yaml whenever I can
drupin has left #ruby ["Leaving"]
<elico> shevy: leave the yaml\other DB in side.. and more in the ruby world..
<shevy> but where is the ruby question
<shevy> you always mention the database :D
<elico> Do you know a thing about trees?
<shevy> they like water
<elico> LoL
<shevy> and the tallest reach around 120 m
banghouseFOOD is now known as banghouse
_keith has joined #ruby
<elico> I want to store the domains in a sorted tree..
sazboom has joined #ruby
mrdodo has quit [Remote host closed the connection]
<shevy> hmm I was wrong... " It has been named Hyperion and is 115.66 metres (379.5 ft) tall" only 115 metres
<shevy> this all seems not very ruby-ish
<shevy> in ruby you have Hashes and Arrays
<shevy> so you have to fit whatever you have (your domains) into a hash or array perhaps
<elico> i do know that..
<shevy> you could make a specialized object perhaps and define <=> to sort in ways how you wish to see it sorted
<elico> the problem is that i need a persistent storage for them..
<shevy> well then make a class that loads and saves (restores) this dataset
phinfonet has quit [Quit: Linkinus - http://linkinus.com]
<elico> ok now we got into the ruby-ish part.
<elico> Just a sec i will load the file into ram..
_keith has quit [Client Quit]
<elico> i will see how it will take..
tommyvYo has joined #ruby
tommyvYo has quit [Changing host]
tommyvYo has joined #ruby
nilg has joined #ruby
ibash has quit [Quit: ibash]
zii has joined #ruby
<elico> at line 400000
<elico> 900000
<shevy> what
<shevy> so many lines
<shevy> what are you doing man, building the next killer framework in ruby?
beneggett has quit [Quit: Textual IRC Client: http://www.textualapp.com/]
<elico> told you there is a reason for DB...
<shevy> things used to be simple! beautiful! small! understandable!
SCommette has quit [Quit: SCommette]
<elico> so it takes 126MB in ruby...
<shevy> !
<elico> i need a more efficient way to hold it..
punkrawkR has quit [Read error: Connection reset by peer]
<elico> that is my main problem...
ekx has joined #ruby
<elico> in mysql it uses about 100MB with index..
randoma__ has quit [Read error: Connection reset by peer]
t37927 has quit [Remote host closed the connection]
invisime has quit [Quit: Leaving.]
t20303 has joined #ruby
randomautomator has joined #ruby
yoklov has quit [Quit: computer sleeping]
machty has joined #ruby
insecurlex has joined #ruby
workmad3 has joined #ruby
<anoldhacker> elico: I'm not sure that I understand your problem. Why do you want BDB instead of mysql? What problem would this solve?
insecurlex has quit [Remote host closed the connection]
<anoldhacker> Are you aware that some of the mysql engines support btree indices?
insecurlex has joined #ruby
<elico> anoldhacker: I have tried to search about this but never got someone to assist mw with it..
matty5000 has quit [Ping timeout: 248 seconds]
<elico> i am using BTREE index..
<elico> but the problme with mysql is that it dosnt support reverse index..
<workmad3> elico: did you consider using something like lucene or xapian?
<elico> enlight me please..
<anoldhacker> Okay. Now. Why are you not storing the tld in a separate field when you write out the record to the db?
nilg has quit [Remote host closed the connection]
havenn has quit [Remote host closed the connection]
evenix has quit [Remote host closed the connection]
lkba has quit [Ping timeout: 245 seconds]
tomsthumb_ has quit [Quit: Leaving.]
<elico> and how will i benefit from that?
insecurlex has quit [Ping timeout: 240 seconds]
<Spooner> elico If you just want key->value storage, have you considered pstore or is that too lightweight?
<anoldhacker> Could you not do a direct search on your tlds that way?
machty has quit [Quit: machty]
elico has quit [Read error: Connection reset by peer]
elico has joined #ruby
<anoldhacker> Also, the clause "dom.start_with?(domacl.chop) && dom.start_with?(domacl)" strikes me as dubious.
<elico> in what form i will store the subdomains?
davidcelis has joined #ruby
machty has joined #ruby
<elico> got disconnected so i lost you..
cantonic has joined #ruby
<anoldhacker> Most likely, you have one field with the fqdn, and one with the tld.
<anoldhacker> You search on the tld & use the fqdn as needed.
<elico> it's not really a TLD but the domain itself..
<anoldhacker> Okay. Good. I was using your notation from the file.
sinful has joined #ruby
<elico> yes i know..
<elico> i have seen couple lines from there
<anoldhacker> That's was I get for trying to avoid nitpicking...
<elico> a sec..
mmitchell has joined #ruby
ekx has left #ruby [#ruby]
_keith has joined #ruby
jjbohn has quit [Quit: Linkinus - http://linkinus.com]
<elico> anoldhacker: the line you quoted ""dom.start_with?(domacl.chop) && dom.start_with?(domacl)""
bbttxu has quit [Quit: bbttxu]
xyxxy has joined #ruby
<elico> is important and i will explain to you why..
matty5000 has joined #ruby
<xyxxy> What does the following do? session[:user]
ilyam has quit [Ping timeout: 246 seconds]
adamkittelson has quit [Read error: Connection reset by peer]
<anoldhacker> xyxxy: Pulls the user attribute from the session data. It yields nothing unless it had been previously set.
johnlcox has quit [Ping timeout: 252 seconds]
adamkittelson has joined #ruby
<anoldhacker> Of course, that is assuming that you are using a certain gem that must not be named.
<elico> the domain blacklist hold a dmoain name ".domain.com"
<elico> for the "." to match be a joker for the whole subdomains.
<elico> so a domain will never match the acl...
Ethan has quit [Quit: *poof*]
<elico> but it must meet the acl..
jorge has joined #ruby
jeff_sebring has joined #ruby
<anoldhacker> domacl.chop deletes the last charachter from a string, and returns that character. You are requiring that the last character of the domacl also be the first, or this will never work.
mmitchell has quit [Ping timeout: 276 seconds]
<elico> there are two possibilities..
orf_ has joined #ruby
<elico> for an acl.. a full match or a joker. full match checked first and then a match for a joker case
t-mart has joined #ruby
<orf_> when can an assignment return false?
<orf_> i.e under what conditions will this return: return unless a = b
<elico> orf_: is it to me?
<workmad3> orf_: when b contains either nil or false (or b is a method that returns nil or false)
andrewhl has quit [Remote host closed the connection]
<anoldhacker> orf_: whenever b evaluates false in a boolean context. Usually either nil for false.
<anoldhacker> eclio: That phrase does not accomplish this.
<xyxxy> ty
lkba has joined #ruby
mikepack has quit [Remote host closed the connection]
<elico> a sec anoldhacker i will look again in my code to think it over. when i wrote it i have some bug..
Guest79461 has quit [Ping timeout: 252 seconds]
jorge has quit [Ping timeout: 276 seconds]
mikepack has joined #ruby
baroquebobcat has quit [Quit: baroquebobcat]
t20303 has quit [Remote host closed the connection]
jjang has joined #ruby
t87022 has joined #ruby
dhruvasagar has joined #ruby
mikepack has quit [Remote host closed the connection]
hadees has joined #ruby
nari has joined #ruby
SeanLazer has joined #ruby
thunderstrike has quit [Remote host closed the connection]
cantonic has quit [Quit: cantonic]
<elico> anoldhacker: i must say i had something there that i dont remember caused this thing...
<elico> but the more i think of it it makes me wonder why i ever added this..
jrajav has joined #ruby
RubyPanther has quit [Quit: self.exit(:stage=>:left)]
locriani has joined #ruby
locriani has quit [Changing host]
locriani has joined #ruby
SeanLazer has quit [Client Quit]
<anoldhacker> I REALLY think like this is a case where denomalization is going to help a lot. If dom is mydom.com, then you store sub1.sub2.mydom.com, mydom.com. Or, you store .mydom.com, mydom.com. Either way, you match mydom.com.
<anoldhacker> Well, I've got to go.
anoldhacker has left #ruby ["No matter how dark the night, somehow the Sun rises once again"]
SeanLazer has joined #ruby
opus has quit [Quit:]
brianpWins has quit [Quit: brianpWins]
<elico> thanks
seanstickle has joined #ruby
binaryplease has quit [Ping timeout: 272 seconds]
uris has quit [Quit: leaving]
Guest9125 has quit [Ping timeout: 240 seconds]
binaryplease has joined #ruby
insecurlex has joined #ruby
Coolhand has quit [Remote host closed the connection]
cantonic has joined #ruby
Criztian has quit [Remote host closed the connection]
Criztian has joined #ruby
machty has quit [Quit: machty]
bbttxu has joined #ruby
axl_ has quit [Read error: Connection reset by peer]
mxbtty has joined #ruby
axl_ has joined #ruby
xbayrockx has quit []
workmad3 has quit [Ping timeout: 246 seconds]
machty has joined #ruby
opus has joined #ruby
fantazo has joined #ruby
machty has quit [Client Quit]
Guest46682 has quit [Read error: Connection reset by peer]
Criztian_ has joined #ruby
jorge has joined #ruby
Criztian has quit [Read error: Connection reset by peer]
niklasb has quit [Ping timeout: 265 seconds]
ttilley has quit [Quit: ttilley]
banisterfiend has quit [Read error: Connection reset by peer]
ckrailo has quit [Quit: Computer has gone to sleep.]
lurch_ has quit [Ping timeout: 245 seconds]
maletor has quit [Quit: Computer has gone to sleep.]
banisterfiend has joined #ruby
tomsthumb_ has joined #ruby
nirix has joined #ruby
<axl_> in ruby, how do i not print a new line character in a string ?
<elico> "\n"
machty has joined #ruby
machty has quit [Client Quit]
LouisGB has quit [Ping timeout: 246 seconds]
<axl_> elico: thanks. but i want to not have the \n
<axl_> i was doing a puts and what i need is a print
<elico> hoo then print..
mmitchell has joined #ruby
<elico> print "hhh"
cascalheir has quit [Quit: Linkinus - http://linkinus.com]
<elico> wil give hhh
<elico> puts "hhh" gives "hhh\n"
mmitchell has quit [Remote host closed the connection]
codeFiend has quit [Ping timeout: 246 seconds]
_keith has quit [Quit: _keith]
t87022 has quit [Remote host closed the connection]
t71526 has joined #ruby
luxurymode has joined #ruby
<shevy> elico yes one newline is assumed via puts
<shevy> puts "foo" vs puts "foo\n" vs. puts "foo\n\n"
<shevy> the first and second are the same :(
<shevy> somehow one gets more control via print()
yoklov has joined #ruby
haxrbyte has joined #ruby
<elico> thanks shevy
<shevy> elico that second thing has surprised me before
otters has quit [Quit: WeeChat 0.3.8]
<shevy> x = "bla"
<shevy> x << "\n"
<shevy> puts x
otters has joined #ruby
<shevy> "why are there not two newlines...."
<elico> yes it's really weird way of handling the idea of puts
<shevy> ruby is 90% perfect
RubyPanther has joined #ruby
<shevy> elico, you used other programming languages before ruby?
<elico> java anv some pascal
pabloh has quit [Ping timeout: 265 seconds]