apeiros_ changed the topic of #ruby to: Ruby 2.0.0-p0: http://ruby-lang.org (Ruby 1.9.3-p392) || Paste >3 lines of text on http://gist.github.com
<banisterfiend> SmoothPorcupine: sounds like you're performing some magic :)
<SmoothPorcupine> I'm just making IO#eval.
dougireton has left #ruby [#ruby]
<SmoothPorcupine> Any other fancy Bindings aside from TOPLEVEL_BINDING?
ffranz has quit [Quit: Leaving]
Astralum has quit [Ping timeout: 264 seconds]
gyre008 has joined #ruby
huoxito has joined #ruby
candlej4ck has quit [Quit: Linkinus - http://linkinus.com]
heliumsocket has joined #ruby
v0n has joined #ruby
drumsrgr8forn8 has joined #ruby
postmodern has quit [Quit: Leaving]
monkegjinni has quit [Remote host closed the connection]
h4mz1d has quit [Ping timeout: 264 seconds]
postmodern has joined #ruby
kpshek has quit []
xcv has quit [Remote host closed the connection]
ML_BMT has quit [Ping timeout: 276 seconds]
bean has quit [Quit: Computer has gone to sleep.]
banjara has quit [Quit: Leaving.]
xcv has joined #ruby
DrShoggoth has quit [Ping timeout: 245 seconds]
m8 has quit [Read error: Connection reset by peer]
<SmoothPorcupine> >>a = 5;TOPLEVEL_BINDING.eval("instance_eval('binding')").eval "local_variables"
<eval-in> SmoothPorcupine => [:a] (http://eval.in/12735)
<SmoothPorcupine> Yeah this isn't working.
xcv_ has joined #ruby
<SmoothPorcupine> How do I get a fresh context like every script has at load time?
hbpoison has quit [Ping timeout: 246 seconds]
xcv has quit [Remote host closed the connection]
thinkclay has quit [Read error: Connection reset by peer]
Xeago has quit [Remote host closed the connection]
JMcAfreak has quit [Remote host closed the connection]
hbpoison has joined #ruby
thinkclay has joined #ruby
adr has quit [Ping timeout: 264 seconds]
DrShoggoth has joined #ruby
the_jeebster has joined #ruby
<the_jeebster> hey ruby hipsters, where can I find a pretty sweet boutique all-around backpack?
xpen_ has joined #ruby
yxhuvud2 has joined #ruby
<Spooner> SmoothPorcupine, Fork/exec a new script ;)
yxhuvud has quit [Ping timeout: 276 seconds]
xpen has quit [Ping timeout: 252 seconds]
jekotia has joined #ruby
jonathanwallace has quit [Quit: WeeChat 0.3.9.2]
jwang has quit [Read error: Connection reset by peer]
jwang has joined #ruby
ofcan has joined #ruby
<ofcan> hello! I am implementing Game of Life with Gosu and am stuck on the final step! I have trouble with gosu update action, I've posted the code and question in detail here, any help is awesome > http://stackoverflow.com/questions/15422642/ruby-game-of-life-with-gosu-update-action-not-working
xardas has quit [Ping timeout: 260 seconds]
jbueza has joined #ruby
<SmoothPorcupine> >>[__FILE__,binding.eval("__FILE__"),TOPLEVEL_BINDING.eval("__FILE__"),eval("binding").eval("__FILE__")]
<eval-in> SmoothPorcupine => ["/tmp/execpad-f350b7cf951c/source-f350b7cf951c", "/tmp/execpad-f350b7cf951c/source-f350b7cf951c", "<main>", "(eval)"] (http://eval.in/12736)
<SmoothPorcupine> Isn't that interesting?
`brendan has joined #ruby
hasimo has joined #ruby
mikepack has quit [Remote host closed the connection]
luckyruby has joined #ruby
aaronmcadam has quit [Quit: Linkinus - http://linkinus.com]
<SmoothPorcupine> Where is the total state of a Binding documented?
TheFuzzball has quit [Quit: Computer has gone to sleep.]
havenwood has quit [Remote host closed the connection]
yshh has quit [Remote host closed the connection]
fschuindt has quit [Quit: Textual IRC Client: http://www.textualapp.com/]
niklasb has quit [Ping timeout: 245 seconds]
kpshek has joined #ruby
kpshek has quit [Client Quit]
<Spooner> ofcan, There is a Gosu forum (libgosu.org) and #gosu here which are probably better options than SO.
emmanuelux has quit [Quit: emmanuelux]
tomzx_mac has joined #ruby
jpfuentes2 has quit [Quit: Computer has gone to sleep.]
skattyadz has quit [Quit: skattyadz]
hogeo has joined #ruby
<dallasm> does anyone know of a way to modify how many bytes are read per iteration in IO.copy_stream ?
<dallasm> i can't seem to find a constant or anything used for the length
<SmoothPorcupine> dallasm my friend, it should be documented in the source.
jpfuentes2 has joined #ruby
veer has joined #ruby
<banisterfiend> SmoothPorcupine: what do u mean by total state
xcv has joined #ruby
hidekin has quit [Remote host closed the connection]
_veer has quit [Ping timeout: 258 seconds]
<SmoothPorcupine> I mean, Binding#self, Binding#filename, Binding#lineno, Binding#local_variables.
miso1337 has quit [Quit: afk]
jdunck has quit [Quit: Computer has gone to sleep.]
xcv_ has quit [Read error: Connection reset by peer]
realDAB has quit [Quit: realDAB]
frosks has joined #ruby
<SmoothPorcupine> Oh, and of course Binding#parent.
<SmoothPorcupine> But I can't actually implement that one in pure Ruby.
<ofcan> Spooner: thanks, I posted the question there
the_jeebster has quit [Quit: Leaving.]
nari has quit [Ping timeout: 276 seconds]
devilirium has quit [Ping timeout: 258 seconds]
dmiller2 has quit [Ping timeout: 256 seconds]
vickaita has joined #ruby
<nga4> any experts on ffi-rzmq around?
<ofcan> hello! I am implementing Game of Life with Gosu and am stuck on the final step! I have trouble with gosu update action, I've posted the code and question in detail here, any help is awesome > http://stackoverflow.com/questions/15422642/ruby-game-of-life-with-gosu-update-action-not-working
jimeh has quit [Quit: Computer has gone to sleep.]
devilirium has joined #ruby
axhlf has quit [Ping timeout: 260 seconds]
<SmoothPorcupine> Ridiculous.
<banisterfiend> SmoothPorcupine: those methods dont exist afaik
thecreators has joined #ruby
drale2k has joined #ruby
<banisterfiend> SmoothPorcupine: yeah they dont, are you on rbx or something? :)
drale2k has quit [Remote host closed the connection]
<SmoothPorcupine> >>b = eval "binding","derp",1000;b.eval "a = 5\n\n\n\n";b.eval "[a,__FILE__,__LINE__]"
<eval-in> SmoothPorcupine => /tmp/execpad-40107ae4dd0e/source-40107ae4dd0e:2:in `eval': no implicit conversion of Fixnum into String (TypeError) ... (http://eval.in/12737)
vickaita has quit [Ping timeout: 245 seconds]
<SmoothPorcupine> >>b = eval "binding",binding,"derp",1000;b.eval "a = 5\n\n\n\n";b.eval "[a,__LINE__]"
<eval-in> SmoothPorcupine => [5, 1000] (http://eval.in/12738)
<SmoothPorcupine> >>b = eval "binding",binding,"derp",1000;b.eval "a = 5\n\n\n\n";b.eval "[a,__FILE__,__LINE__]"
<eval-in> SmoothPorcupine => [5, "derp", 1000] (http://eval.in/12739)
<SmoothPorcupine> banisterfiend my friend, they should.
himsin has quit [Remote host closed the connection]
<SmoothPorcupine> Local variables persist across eval, why don't line numbers?
<banisterfiend> SmoothPorcupine: well i wrote 'Binding#parent' (if i know what u mean) https://github.com/banister/binding_of_caller
drale2k has joined #ruby
<SmoothPorcupine> You can see quite clearly the binding keeps the state.
<SmoothPorcupine> It just doesn't update anything but the local variables.
Stilo has quit [Quit: Computer has gone to sleep.]
skattyadz has joined #ruby
Axsuul has joined #ruby
<apeiros> SmoothPorcupine: eval accepts a line argument
<apeiros> i.e., it's your duty if you want something else than the default start line number of 1
<SmoothPorcupine> apeiros my friend, read the output of the code I pasted.
apok has quit [Quit: apok]
<apeiros> are you drunk or is it just a custom of your culture to call random people "your friend"? o0
<SmoothPorcupine> I just have the best Tab completion string ever.
<SmoothPorcupine> But seriously.
<SmoothPorcupine> Why is only "half" the state of the Binding updated?
ahammond has quit [Quit: ahammond]
predator217 has joined #ruby
<SmoothPorcupine> I don't care about that I have to do it myself, I want to know the reasoning behind this implementation decision/
<SmoothPorcupine> .*
Spooner has quit [Quit: runs and hides under a duvet.]
bigmac has joined #ruby
_nitti has joined #ruby
fire__ has joined #ruby
fire has quit [Ping timeout: 264 seconds]
luckyruby has quit [Remote host closed the connection]
heliumsocket has quit [Quit: heliumsocket]
himsin has joined #ruby
backjlack_ has joined #ruby
<SmoothPorcupine> >>" banisterfiend ".split("e").each{|v|s = v};s rescue "Binding of the block has a parent scope."
<eval-in> SmoothPorcupine => "Binding of the block has a parent scope." (http://eval.in/12740)
MehLaptop has joined #ruby
predator117 has quit [Ping timeout: 276 seconds]
<banisterfiend> SmoothPorcupine: the binding is a snapshot of a stackframe, if you updated __LINE__ you'd be confused about where exactly the snapshot was taken
joshman_ has quit [Quit: Computer has gone to sleep.]
<SmoothPorcupine> If you updated the local variables you'd be confused about the binding you're looking at.
_nitti has quit [Ping timeout: 240 seconds]
<banisterfiend> SmoothPorcupine: also it would just be a lie. say u had this code in hello.rb: a = 5; b= binding; b.eval("1"); b.eval("2")
<banisterfiend> SmoothPorcupine: the line number was snapshotted at line 2 of hello.rb
<SmoothPorcupine> You mean like this:
<SmoothPorcupine> >>1;2
<eval-in> SmoothPorcupine => 2 (http://eval.in/12741)
<banisterfiend> according to your reasoning b.eval("__FILE__, __LINE__") would return hello.rb, line 4
nga4 has quit []
<SmoothPorcupine> banisterfiend my friend, then why doesn't Binding#eval return [script_result,new_binding]?
IrishGringo has joined #ruby
<SmoothPorcupine> Why is is okay to change the local variables but not the line number?
<SmoothPorcupine> And if I want a snapshot, isn't that what Binding#freeze and Binding#dup are for?
<banisterfiend> SmoothPorcupine: a binding is like a closure, it carries locals along with it, and if you deifne new locals in its context they only exist inside that binding (same as with a closure)
backjlack has quit [Ping timeout: 246 seconds]
maletor has quit [Quit: Computer has gone to sleep.]
<SmoothPorcupine> Why should you be able to alter the local variables of the binding instead of causing a new scope to be made from the result of the evaluation?
DrCode has quit [Remote host closed the connection]
<banisterfiend> SmoothPorcupine: because it's very useful behaviour
<banisterfiend> SmoothPorcupine: consider debugging situations
<SmoothPorcupine> r,b = b.eval "blah blah blah \n\n\n ... \n\n\n [result,binding]
<SmoothPorcupine> banisterfiend my friend, and updating __LINE__ isn't useful behavior?
<SmoothPorcupine> And providing no way to update it manually is useful behavior?
<banisterfiend> SmoothPorcupine: stop saying "my friend" please :)
Ohga has left #ruby [#ruby]
DrCode has joined #ruby
<banisterfiend> SmoothPorcupine: it's not useful behaviour, a debugger needs to know where the stackframe was snapshotted
<banisterfiend> SmoothPorcupine: basically "Binding" is a feature for debugging, IMO, and it should have qualities that make it useful for that
<SmoothPorcupine> Then the debugger shouldn't alter the stackframe after the Binding is created.
<banisterfiend> what?
<SmoothPorcupine> You're saying modification shouldn't be allowed because it would put responsibility on the caller.
jblack has quit [Ping timeout: 264 seconds]
otters has quit [Quit: WeeChat 0.4.0]
ofcan has quit [Quit: leaving]
otters has joined #ruby
<banisterfiend> SmoothPorcupine: it's just not in the slightest bit useful, and it gives confusing information, let me give u an example
<SmoothPorcupine> It's confusing that it updates the local variables but not __LINE__.
<banisterfiend> SmoothPorcupine: say we have hello.rb, and on line 1 we have b= binding on line 2 we have a = 10 and on line 3 we have c = 20
<SmoothPorcupine> It just doesn't fit your single specific use case.
<banisterfiend> b.eval("5")
<SmoothPorcupine> Which can be solved by l = b.eval "__LINE__"
jblack has joined #ruby
<banisterfiend> SmoothPorcupine: tell me why it's useful to update __LINE__ ?
mockra has quit [Remote host closed the connection]
<banisterfiend> apart from being confusing to you (it's not confusing to me), i dont see why it's useful
<SmoothPorcupine> I don't know, maybe for the same reason __LINE__ exists at all?
<banisterfiend> no
<banisterfiend> listen
<banisterfiend> a binding is a *snapshot* of a stack frame
aleph-null has quit [Quit: Leaving...]
<banisterfiend> in so far as it's a snapshot it has to maintain all information about that stack frame
Voodoofish430 has quit [Quit: Leaving.]
<SmoothPorcupine> No, it's not, because you can alter the local variables.
<SmoothPorcupine> `binding.freeze` is a snapshot.
<banisterfiend> no your'e wrong
greenarrow has quit [Quit: IRC is just multiplayer notepad]
<banisterfiend> those modifications percolate back
<banisterfiend> it's just like any closure behaviour
wallerdev has quit [Quit: wallerdev]
wallerdev has joined #ruby
<banisterfiend> if you modify the locals you modify the locals in the original stack frame (assumign the stack frame still exists)
<SmoothPorcupine> Well it's not maintaining the local variables across #evals.
<banisterfiend> this isn't confusing if oyu understand closures
<banisterfiend> it's normal clsoure behaviour
<SmoothPorcupine> So the snapshot is being ruined.
<banisterfiend> what are you talking about?
<banisterfiend> it maintains everything that was *closed over*
<banisterfiend> new ones that are introduced are local just to that particular binding
<banisterfiend> that's how closures work
<banisterfiend> it works the same way
greenarrow has joined #ruby
<SmoothPorcupine> >>a = 5;b = binding;c = 3;b.eval "local_variables"
<eval-in> SmoothPorcupine => [:a, :b, :c] (http://eval.in/12742)
<SmoothPorcupine> That would have explained what you meant much better.
<banisterfiend> one second
v0n has quit [Read error: Connection reset by peer]
<SmoothPorcupine> I see your point, but I don't see why it shouldn't update __LINE__ after an #eval.
<banisterfiend> >> RUBY_VERSION
<eval-in> banisterfiend => "2.0.0" (http://eval.in/12743)
<SmoothPorcupine> Just because /you/ don't want the value changed, just because /you/ want it recorded for /your/ use case doesn't mean it's not useful to have it updated.
vickaita has joined #ruby
<banisterfiend> SmoothPorcupine: that looks like a bug
yshh has joined #ruby
<SmoothPorcupine> It's not.
v0n has joined #ruby
<SmoothPorcupine> It's a bug for #eval to alter only "half" the state.
<banisterfiend> SmoothPorcupine: https://gist.github.com/4fce190c3b5c116666c0
<SmoothPorcupine> Bug in pry.
<banisterfiend> SmoothPorcupine: no
<banisterfiend> it's definitely not
<SmoothPorcupine> Why does you specific use case trump all others?
<banisterfiend> if anything, it's a quirk in TOPLEVEL_BINDING
<banisterfiend> one sec
banjara has joined #ruby
<SmoothPorcupine> Not at all.
<SmoothPorcupine> It's /always/ been this way.
<banisterfiend> weird
<SmoothPorcupine> Pry is likely doing something strange with the bindings to make the added variables to the "snapshot" stay how they are.
<banisterfiend> i wrote pry
markisonfire has quit [Quit: markisonfire]
marr has quit []
<SmoothPorcupine> I wrote art.
nari has joined #ruby
carlyle has joined #ruby
<banisterfiend> weird..
<banisterfiend> ah i guess it makes sense yes
<SmoothPorcupine> Does pry do line numbers?
<SmoothPorcupine> I made an Binding#eval! function specifically to get updated __LINE__ numbers.
<SmoothPorcupine> a*
<SmoothPorcupine> I literally have needed it every time I used Binding#eval.
mrsolo has left #ruby ["Leaving"]
mrsolo has joined #ruby
<banisterfiend> do line numbers?
etcetera has quit []
NiteRain has quit [Ping timeout: 246 seconds]
<SmoothPorcupine> IRB's default prompt has a line number field.
yxhuvud has joined #ruby
backjlack_ has quit [Remote host closed the connection]
<banisterfiend> yeah we start the line number at 1
<SmoothPorcupine> __LINE__ evaluates as you expect in it.
<SmoothPorcupine> Last time I checked I think.
<banisterfiend> and a file of "(pry)"
<banisterfiend> binding.eval code, "(pry)", line_counter
Stilo has joined #ruby
tubbo has joined #ruby
<banisterfiend> yeah, seems i was wrong about the a = 1; b = binding; c = 2; thing, it's something i never tested before, but it makes sense now i think about it
bonhoeffer has joined #ruby
<SmoothPorcupine> :I
hbpoison has quit [Ping timeout: 260 seconds]
pkrnj has joined #ruby
<SmoothPorcupine> Can updated line numbers with any of an infinite number of programmable ways to store the state of a Binding make sense too, now that you think about it?
<SmoothPorcupine> Mostly Binding#dup.
lewix has joined #ruby
<SmoothPorcupine> >>a = binding;b = binding.dup;a.eval "a = 5";b.eval "a"
<eval-in> SmoothPorcupine => 5 (http://eval.in/12744)
<SmoothPorcupine> DAMMIT.
hbpoison has joined #ruby
yxhuvud2 has quit [Ping timeout: 276 seconds]
tspike has quit [Ping timeout: 276 seconds]
<banisterfiend> SmoothPorcupine: Binding#dup is not a deep copy, it's the same underlying VM::Environment object in each case i think
<SmoothPorcupine> No wonder I was confused. <_<
bonhoeffer has quit [Client Quit]
<banisterfiend> >> RubyVM::Env
<eval-in> banisterfiend => RubyVM::Env (http://eval.in/12745)
<SmoothPorcupine> >>a = binding;b = binding.clone;a.eval "a = 5";b.eval "a"
<eval-in> SmoothPorcupine => 5 (http://eval.in/12746)
<SmoothPorcupine> WELL.
icole has quit [Remote host closed the connection]
<SirFunk> With Active Record: is there a way to have ids that are unique to an item that an object belongs_to. For example Job #1 has Issues #1,#2,#3 and Job #2 has other issues numbered #1,#2,#3
br4ndon has joined #ruby
<SmoothPorcupine> Now I have no idea how for make a fresh binding like you get from Kernel#load without making a file /specifically/ for that purpose.
miso1337 has joined #ruby
etcetera has joined #ruby
mrsolo has quit [Read error: Connection reset by peer]
mrsolo has joined #ruby
dhruvasagar has joined #ruby
jonahR has joined #ruby
stkowski has quit [Quit: stkowski]
mockra has joined #ruby
marcdel has quit [Quit: Leaving.]
samphippen has quit [Quit: Computer has gone to sleep.]
eka has quit [Quit: Computer has gone to sleep.]
codezombie has joined #ruby
elaptics is now known as elaptics`away
MrZYX is now known as MrZYX|off
<ryanf> >> a = 10; def self.__temp__; binding; end; fresh_binding = __temp__; class << self; undef __temp__; end; fresh_binding.eval("a")
<eval-in> ryanf => /tmp/execpad-85eb329f79fc/source-85eb329f79fc:2:in `__temp__': undefined local variable or method `a' for main:Object (NameError) ... (http://eval.in/12747)
<banisterfiend> SmoothPorcupine: the difficult part is setting default definee
<ryanf> SmoothPorcupine: unless I'm misunderstanding what you want?
<ryanf> what I just said is how pry gets a fresh toplevel binding
<ryanf> i.e., one where self is main and there are no locals
<ryanf> oh, except you have to eval "private" after that to get the default behavior for top-level method defs
h8R has quit [Quit: Leaving]
headius has joined #ruby
Domon has joined #ruby
FullTiltProspect has joined #ruby
FullTiltProspect has left #ruby [#ruby]
h8R_home has joined #ruby
<ryanf> then if you do fresh_binding.eval(File.read("foo.rb"), "foo.rb", 1) I think you're in business
ML_BMT has joined #ruby
<ryanf> I guess I don't know what you're actually doing though since I have no idea why you don't want to just use Kernel#load
twoism has quit [Remote host closed the connection]
ckrailo has joined #ruby
xpen_ has quit [Remote host closed the connection]
kofno has joined #ruby
FullTilt1 has joined #ruby
chrishough has quit [Quit: chrishough]
c0rn has quit [Quit: Computer has gone to sleep.]
Mattix has joined #ruby
deepinskin has joined #ruby
banisterfiend is now known as banister`sleep
<SmoothPorcupine> binding.eval DATA.read,DATA.path,DATA.lineno
<SmoothPorcupine> :D
<SmoothPorcupine> if $0 == DATA.path
slainer68 has joined #ruby
wchun has joined #ruby
<SmoothPorcupine> This is what I did instead of wrapping the process part of the code in an if block.
FullTilt1 has quit [Client Quit]
<SmoothPorcupine> I like to think it saves parsing time.
FullTiltProspect has joined #ruby
pcarrier has joined #ruby
wargasm1 has joined #ruby
FullTiltProspect has quit [Client Quit]
quazimodo has quit [Ping timeout: 240 seconds]
wargasm has quit [Ping timeout: 260 seconds]
FullTiltProspect has joined #ruby
Vert has joined #ruby
notVert has quit [Ping timeout: 252 seconds]
quazimodo has joined #ruby
FullTiltProspect has quit [Client Quit]
skattyadz has quit [Quit: skattyadz]
d2dchat has quit [Remote host closed the connection]
mahmoudimus has quit [Quit: Computer has gone to sleep.]
codezombie has quit [Quit: Leaving...]
apalmblad has quit [Ping timeout: 264 seconds]
FullTiltProspect has joined #ruby
FullTiltProspect has quit [Client Quit]
kofno has quit [Remote host closed the connection]
FullTiltProspect has joined #ruby
jpcamara has joined #ruby
ukd1 has joined #ruby
rupee has quit [Ping timeout: 245 seconds]
FullTiltProspect has quit [Client Quit]
eAlchem__ has quit [Remote host closed the connection]
etcetera has quit [Ping timeout: 264 seconds]
eAlchemist has joined #ruby
KellyLSB is now known as KellyLSB_missing
jrajav has joined #ruby
<SmoothPorcupine> Oh.
<SmoothPorcupine> And can anybody tell me what all state a Binding has?
carlyle has quit [Remote host closed the connection]
adkron has joined #ruby
chrishough has joined #ruby
astrostl has joined #ruby
_nitti has joined #ruby
deric_skibotn has quit [Ping timeout: 240 seconds]
dhruvasagar has quit [Ping timeout: 246 seconds]
phantasm66 has joined #ruby
phantasm66 has quit [Client Quit]
kofno has joined #ruby
chrishough has quit [Client Quit]
otters has quit [Ping timeout: 258 seconds]
Virunga has quit [Remote host closed the connection]
_nitti has quit [Ping timeout: 256 seconds]
jpcamara_ has joined #ruby
bricker is now known as bricker`work
eAlchemist has quit [Ping timeout: 255 seconds]
jpcamara has quit [Ping timeout: 264 seconds]
wmoxam has quit [Ping timeout: 256 seconds]
ephemerian has quit [Quit: Leaving.]
drumsrgr8forn8 has quit [Ping timeout: 245 seconds]
bitgod has joined #ruby
jeremywrowe has quit [Quit: Lost terminal]
nfk has quit [Quit: yawn]
v0n has quit [Ping timeout: 258 seconds]
<shevy> SmoothPorcupine ewwwwww eval
gyre008 has quit [Remote host closed the connection]
bradleyprice has joined #ruby
<shevy> my holy rule in ruby is - if something must use eval, it sucks
daniel_-_ has quit [Ping timeout: 252 seconds]
dorei has joined #ruby
<shevy> that professor then used another way to think about the same problem and came up with another solution, it's like having two brains to think about one problem
otters has joined #ruby
passbe has joined #ruby
yankeefan04 has left #ruby [#ruby]
<passbe> id like to create a getter method for some class instance variables, but i dont want to use the def var=(value) method, whats the best way to achieve this
drumsrgr8forn8 has joined #ruby
ddd has joined #ruby
ttt has joined #ruby
<passbe> oh you can use attr_reader on a class, cool
<SmoothPorcupine> shevy my friend, ruby(1) uses eval.
jonathanwallace has joined #ruby
pcarrier has quit []
cpruitt_ has joined #ruby
<SmoothPorcupine> Kernel#load uses eval.
<SmoothPorcupine> Kernel#require uses eval.
<shevy> SmoothPorcupine LIES!
<SmoothPorcupine> You're saying Ruby code shouldn't be parsed or executed.
<SmoothPorcupine> Do you hate Ruby?
mockra has quit [Remote host closed the connection]
cpruitt has quit [Ping timeout: 260 seconds]
cpruitt_ is now known as cpruitt
<SmoothPorcupine> You're literally parsing and executing Ruby code that comes from the same exact source as the currently executing code.
<SmoothPorcupine> And you consider this gross.
<SmoothPorcupine> Or "bad from."
KellyLSB_missing is now known as KellyLSB
<SmoothPorcupine> You're saying Ruby code should not cross lines.
<SmoothPorcupine> Source files shouldn't be included.
vickaita has quit [Ping timeout: 258 seconds]
yxhuvud2 has joined #ruby
<SmoothPorcupine> Can you /honestly/ say that your reaction is reasonable?
jonahR has quit [Quit: jonahR]
<shevy> SmoothPorcupine yeah, looking at eval.c right now
<shevy> that thing is a mess ...
<SmoothPorcupine> Can you say that you hate Kernel#eval /exactly/ as much as it should be hated, and no more?
<shevy> SmoothPorcupine I think there are two instances in my projects so far where I had a need to use any form of eval
yxhuvud has quit [Ping timeout: 276 seconds]
<shevy> SmoothPorcupine do you have any public projects with eval?
<SmoothPorcupine> I don't have any public projects.
<dorei> ppl are ashamed of eval code :p
<shevy> :(
<SmoothPorcupine> I have insane standards.
<shevy> dorei hmm let me look at the irb source, I think it uses quite a lot of eval
<SmoothPorcupine> To let other people use my imperfect and undocumented code would be morally wrong.
xcv has quit [Remote host closed the connection]
devilirium has quit [Ping timeout: 256 seconds]
<shevy> eval("self", TOPLEVEL_BINDING).extend(Module.new {eval(src, nil, path)})
<shevy> there we go, code that SmoothPorcupine loves
<shevy> SmoothPorcupine I write awful code but I try to document it
<dorei> that looks like perl :p
<shevy> I found that there is some balance though, between code, and documentation
<shevy> I tend to use common methods across some ruby code, for instance: def reset usually
jekotia has quit [Quit: ChatZilla 0.9.90-rdmsoft [XULRunner 18.0.2/20130201065344]]
<shevy> which restores an object to its initial state
<shevy> to document this method all the time, when it does only set up some @ivars, became tedious and did not give a lot of important information
devilirium has joined #ruby
<shevy> so I started to omit documenting those methods :(
<SmoothPorcupine> Isn't that supposed to me #clear?
<SmoothPorcupine> #clear ?*
<shevy> well, perhaps too, don't think the name is that important as what it does in the end
<shevy> but I mean, how would you document it
<SmoothPorcupine> Oh I don't document code at all.
<shevy> "the method clear clears our instance variables"
<SmoothPorcupine> I'd document something the user actually sees.
<SmoothPorcupine> Programmers that want to use my code have to actually read my code if they don't understand from def line itself what it does.
<shevy> "the method total_sum() calculates the total sum of our entries"
Hanmac1 has joined #ruby
<SmoothPorcupine> I just mean it's immoral to let a user use something that might cause them to suffer even the slightest misfortune.
<shevy> I usually start by trying to find the shortest way to describe the intent behind the code, if it is not instantly very obvious
<shevy> like design decisions for a project
<SmoothPorcupine> I'll write English descriptions of my code when NLP can run the English.
Myconix_ has joined #ruby
<shevy> SmoothPorcupine right now I try the approach to keep the end user in mind, but to also assume that he is a curious, clever person
a_a_g has joined #ruby
<shevy> dorei, irb code is quite funny
<shevy> gv = eval("global_variables", bind)
<shevy> lv = eval("local_variables", bind)
ML_BMT has quit [Ping timeout: 246 seconds]
Hanmac2 has quit [Ping timeout: 276 seconds]
<shevy> haha this one is awesome
<shevy> alias __evaluate__ evaluate
<dorei> i think choosing clever/meaningful class/method/variable names is better than extensive documentation
<shevy> __evaluate__(context, statements, file || __FILE__, line || __LINE__)
slainer68 has quit [Remote host closed the connection]
sam113101 has quit [Quit: WeeChat 0.3.8]
Myconix has quit [Ping timeout: 260 seconds]
aajjbb has joined #ruby
<shevy> yea dorei
<shevy> though I often also wonder whether an author was just too lazy... like Hanmac here :P
jpcamara has joined #ruby
jpcamara_ has quit [Ping timeout: 252 seconds]
drumsrgr8forn8 has quit [Ping timeout: 260 seconds]
cyberarm has quit [Remote host closed the connection]
KellyLSB is now known as KellyLSB_missing
icole has joined #ruby
mrsolo has quit [Quit: Leaving]
cdambrosio has joined #ruby
jetblack_ has quit [Quit: leaving]
NiteRain has joined #ruby
__Big0__ has joined #ruby
icole has quit [Ping timeout: 256 seconds]
tewlz has joined #ruby
iambic has joined #ruby
iambic has quit [Client Quit]
astrostl has quit []
iambic has joined #ruby
marcdel has joined #ruby
bricker`LA has joined #ruby
_maes_ has joined #ruby
joshman_ has joined #ruby
dhruvasagar has joined #ruby
tvw has quit [Ping timeout: 258 seconds]
marcdel1 has joined #ruby
justsee has quit [Quit: Leaving...]
marcdel1 has quit [Client Quit]
marcdel1 has joined #ruby
marcdel1 has quit [Client Quit]
marcdel has quit [Ping timeout: 252 seconds]
justsee has joined #ruby
aces1up has joined #ruby
<aces1up> how would i delete a range on an array?
<aces1up> like arr.delete[3..6] etc
<aces1up> can't seem to find correct method in docs.
Tricon has joined #ruby
pepper_chico has quit [Quit: I'm Quitting.]
generalissimo has joined #ruby
<SmoothPorcupine> arr.slice! range
<SmoothPorcupine> arr[range] = []
Domon has quit [Remote host closed the connection]
_nitti has joined #ruby
xpen has joined #ruby
cyberflux has quit []
drumsrgr8forn8 has joined #ruby
_nitti has quit [Ping timeout: 240 seconds]
xpen has quit [Ping timeout: 252 seconds]
MehLaptop has quit [Remote host closed the connection]
hasimo has quit [Remote host closed the connection]
<shevy> aces1up, try array[3..6] = nil
headius has quit [Quit: headius]
<shevy> array = [0,1,2,3,4,5,6,7,8,9,10]
Emplitz has joined #ruby
<shevy> array[3..6] = nil
<shevy> array # => [0, 1, 2, 7, 8, 9, 10]
setient has joined #ruby
<setient> god. i hate parsing logs
jpfuentes2 has quit [Quit: Computer has gone to sleep.]
<setient> OH i got an idea.
iambic has quit [Quit: leaving]
* SmoothPorcupine has been and will be putting off log parsing for a looooong time
bricker`LA is now known as bricker
<drago777> you can do a gsub
averiso has joined #ruby
<drago777> and regex match the range and replace with nothing
drumsrgr8forn8 has quit [Ping timeout: 264 seconds]
rismoney has quit [Read error: Connection reset by peer]
mnb has joined #ruby
devilirium has quit [Ping timeout: 240 seconds]
devilirium has joined #ruby
enviable has joined #ruby
thinkclay has quit [Quit: Leaving.]
<enviable> Hey, does anyone have experience with xhtml2rtf?
hasimo has joined #ruby
<enviable> Or any other means to convert html to rtf?
hasimo has quit [Read error: Connection reset by peer]
<enviable> Nokogiri is failing to apply the xsl
hasimo has joined #ruby
hasimo has quit [Remote host closed the connection]
marcdel has joined #ruby
kornnflake_zzz is now known as kornnflake
hasimo has joined #ruby
mnb has quit []
mockra has joined #ruby
hasimo has quit [Read error: Connection reset by peer]
jtmengel has joined #ruby
dhruvasagar has quit [Ping timeout: 260 seconds]
br4ndon has quit [Quit: Lorem ipsum dolor sit amet]
yxhuvud has joined #ruby
<SmoothPorcupine> >XSL
<SmoothPorcupine> Well there's your problem.
<SmoothPorcupine> You're trying to use a "markup language" as a "styling language."
kofno has quit [Remote host closed the connection]
<SmoothPorcupine> You are not representative of your name if you are forced to deal with XSL.
Stilo has quit [Quit: Textual IRC Client: www.textualapp.com]
<SmoothPorcupine> nickname*
Kemist has joined #ruby
<enviable> Yeah, not a fun time
cburyta has quit [Remote host closed the connection]
miso1337 has quit [Quit: afk]
yxhuvud2 has quit [Ping timeout: 255 seconds]
cburyta has joined #ruby
ckrailo has quit [Ping timeout: 276 seconds]
<enviable> xhtml2rtf is supposed to do it..somehow
<enviable> but the examples are for windows and running on asp
whitedawg has joined #ruby
<enviable> fortunately/unfortunately the server is iis...
<enviable> Running rails on that isn't a blast
hasimo has joined #ruby
justsee has quit [Quit: Leaving...]
girija has joined #ruby
marcdel has quit [Quit: marcdel]
jtmengel has quit [Ping timeout: 245 seconds]
hasimo has quit [Remote host closed the connection]
kofno has joined #ruby
hbpoison has quit [Ping timeout: 264 seconds]
hbpoison has joined #ruby
cburyta has quit [Ping timeout: 252 seconds]
banjara has quit [Quit: Leaving.]
lewix has quit [Remote host closed the connection]
lewix has joined #ruby
yacks has joined #ruby
dmiller2 has joined #ruby
Davey has joined #ruby
Domon has joined #ruby
Myconix has joined #ruby
hbpoison has quit [Ping timeout: 264 seconds]
hbpoison has joined #ruby
kdebrain has joined #ruby
ckrailo has joined #ruby
Myconix_ has quit [Ping timeout: 258 seconds]
<SmoothPorcupine> >>def binding!;binding;end;r = [binding,binding!].each{|b|b.eval "local_variables"}
<eval-in> SmoothPorcupine => [#<Binding:0x420c93a0>, #<Binding:0x420c9378>] (http://eval.in/12748)
vickaita has joined #ruby
<SmoothPorcupine> >>def binding!;binding;end;r = [binding,binding!].map{|b|b.eval "local_variables"}
<eval-in> SmoothPorcupine => [[:r], []] (http://eval.in/12749)
<SmoothPorcupine> :3
<SmoothPorcupine> Similar, yet distinct.
kdebrain has left #ruby [#ruby]
__Big0__ has quit [Remote host closed the connection]
<aces1up> if i have arr.find{|ele| get_content(ele) } how can i get the result of get_content method NOT ele?
cupakromer has joined #ruby
Myconix has quit [Ping timeout: 258 seconds]
lewix has quit [Remote host closed the connection]
marcdel has joined #ruby
<SmoothPorcupine> arr.each{|ele|break $_ if $_ = get_content ele}
lewix has joined #ruby
<aces1up> yeh have something like that now.
<aces1up> just thougt there was a cleaner way.
<aces1up> don't like using breaks.
<SmoothPorcupine> Enumerable#find isn't the method.
<SmoothPorcupine> It serves and entirely different purpose.
<SmoothPorcupine> Much as I've been in the moment you're in before. :V
<SmoothPorcupine> an*
vickaita has quit [Ping timeout: 258 seconds]
marcdel has quit []
classix has quit [Ping timeout: 245 seconds]
jetblack has joined #ruby
classix has joined #ruby
miso1337 has joined #ruby
drumsrgr8forn8 has joined #ruby
ukd1 has quit [Quit: leaving]
marcdel has joined #ruby
sayan has joined #ruby
Ontolog has quit [Remote host closed the connection]
ML_BMT has joined #ruby
cburyta has joined #ruby
SilverKey has quit [Quit: "Sleep now."]
Beoran_ has joined #ruby
cyong has joined #ruby
otters has quit [Quit: WeeChat 0.4.0]
davetherat has quit [Remote host closed the connection]
davetherat has joined #ruby
hasimo has joined #ruby
_nitti has joined #ruby
otters has joined #ruby
thecreators has quit [Quit: thecreators]
Beoran__ has quit [Ping timeout: 258 seconds]
jpcamara has quit [Quit: jpcamara]
<shevy> aces1up can you specify the input you have and what your method does? right now you could have any array, and get_content() can do anything... it is much easier to work with a specific example at hand
hasimo has quit [Ping timeout: 260 seconds]
_nitti has quit [Ping timeout: 264 seconds]
cburyta has quit [Ping timeout: 258 seconds]
otters has quit [Quit: WeeChat 0.4.0]
ner0x has quit [Quit: Leaving]
<SmoothPorcupine> aces1up my friend, don't fall for it, shevy is trying to optimize out the need for your question.
otters has joined #ruby
beneggett has joined #ruby
sambao21 has joined #ruby
enviable has quit [Quit: enviable]
divout has joined #ruby
kornnflake is now known as kornnflake_zzz
icy`` has quit [Quit: .: adios :.]
icy` has joined #ruby
dorei has quit []
fire__ has quit [Ping timeout: 256 seconds]
huoxito has quit [Ping timeout: 258 seconds]
Will has joined #ruby
Will is now known as Guest42982
jrajav has quit [Quit: I tend to be neutral about apples]
miso1337 has quit [Quit: afk]
drumsrgr8forn8 has quit [Ping timeout: 276 seconds]
hasimo has joined #ruby
sambao21 has quit [Ping timeout: 252 seconds]
dayepa has quit [Quit: dayepa]
yashshah has joined #ruby
<shevy> he seems a very inactive IRC user :<
<SmoothPorcupine> I'm sure they have this window visible in the background, but are too busy coding to bother responding.
<SmoothPorcupine> Though they may have been amused slightly.
<shevy> hehe
<icy`> he/she > they
dayepa has joined #ruby
<shevy> the 1% female ruby programmers!
__Big0__ has joined #ruby
<icy`> male or not, but not plural ;P
toekutr has joined #ruby
<SmoothPorcupine> Well yeah, but my gender it turtle, pronouns te and tur.
<SmoothPorcupine> So...
whitedawg has quit [Quit: Leaving.]
jeffreybaird has quit [Quit: jeffreybaird]
<shevy> le turt
yxhuvud2 has joined #ruby
yxhuvud has quit [Ping timeout: 240 seconds]
<hemanth> le mari
marcdel has quit []
marcdel has joined #ruby
pskosinski has quit [Quit: Red Eclipse, game of racist admins/devs: http://pawelk.pl/racist-red-eclipse-quin-zeroknight-gingerbear/]
miso1337 has joined #ruby
huoxito has joined #ruby
oinkon_ has joined #ruby
<oinkon_> do ruby libraries tend to be fully implemented in ruby? (in contrast to say python which leans on a lot of c libraries)
<SmoothPorcupine> Yeah.
<SmoothPorcupine> All mine are.
<oinkon_> i noticed there have been a lot of ruby implementation that achieved widespread adoption.
<oinkon_> i figured that meant people's favorite libraries just worked on alternative implementations
`brendan has quit [Ping timeout: 245 seconds]
yankeefan04 has joined #ruby
uris has quit [Quit: Leaving]
fixl has joined #ruby
a_a_g has quit [Quit: Leaving.]
wmoxam has joined #ruby
markalanevans has quit [Ping timeout: 252 seconds]
havenwood has joined #ruby
v0n has joined #ruby
NiteRain has quit [Quit: KVIrc 4.1.3 Equilibrium http://www.kvirc.net/]
ML_BMT has quit [Ping timeout: 245 seconds]
love_color_text has quit [Ping timeout: 245 seconds]
<passbe> how can i get match to work without whitespace or case, ie "This is a string".match(/Thisisa/ix)
wmoxam has quit [Quit: leaving]
<SmoothPorcupine> There's no flag to ignore whitespace.
<SmoothPorcupine> Just s/\s+//g first.
justsee has joined #ruby
justsee has joined #ruby
v0n has quit [Read error: Operation timed out]
s00pcan has joined #ruby
<SmoothPorcupine> Hmm...
mahmoudimus has joined #ruby
vlad_starkov has joined #ruby
<SmoothPorcupine> Is there any way to inject something into the caller/backtrace from, say, a rescue or ensure block?
V8Energy has quit [Ping timeout: 264 seconds]
linoge has quit [Read error: Connection reset by peer]
linoge has joined #ruby
lewix has quit [Remote host closed the connection]
drale2k has quit [Quit: Leaving...]
<SmoothPorcupine> begin;raise;caller => stk;stk[0] = [stk[0],binding];end
<SmoothPorcupine> That would be amazing.
hbpoison has quit [Read error: Connection reset by peer]
hbpoison has joined #ruby
vlad_starkov has quit [Remote host closed the connection]
Domon has quit [Remote host closed the connection]
Davey has quit [Quit: Computer has gone to sleep.]
oinkon_ has quit [Ping timeout: 276 seconds]
kofno has quit [Remote host closed the connection]
s00pcan is now known as s00pcan|test
s00pcan|test is now known as s00pcan
dhruvasagar has joined #ruby
miso1337 has quit [Quit: afk]
sayan has quit [Read error: Connection reset by peer]
aajjbb has quit [Ping timeout: 245 seconds]
robbyoconnor has joined #ruby
aajjbb has joined #ruby
Takehiro has joined #ruby
lewix has joined #ruby
himsin has quit [Remote host closed the connection]
himsin has joined #ruby
icy`` has joined #ruby
kofno has joined #ruby
kofno has quit [Read error: Connection reset by peer]
SmoothPorcupine has left #ruby ["Aaaaaannnnnd :wq"]
mockra has quit [Remote host closed the connection]
__Big0__ has quit [Remote host closed the connection]
himsin has quit [Remote host closed the connection]
aajjbb has quit [Ping timeout: 246 seconds]
himsin has joined #ruby
icy` has quit [Ping timeout: 264 seconds]
sidestepism has joined #ruby
Domon has joined #ruby
lewix has quit [Remote host closed the connection]
bradleyprice has quit [Ping timeout: 245 seconds]
Myconix has joined #ruby
lewix has joined #ruby
nanothief has joined #ruby
yxhuvud has joined #ruby
<aedornm> I get to have a meeting tomorrow with a non technical manager who just discovered the wonders of virtualization using VirtualBox! His idea is to run 4 VMs running Windows XP to test 4 devices at once!
drale2k has joined #ruby
yxhuvud2 has quit [Ping timeout: 264 seconds]
pkrnj has quit [Quit: Textual IRC Client: www.textualapp.com]
eAlchemi_ has joined #ruby
kofno has joined #ruby
natd has joined #ruby
kofno has quit [Read error: Connection reset by peer]
eAlchemi_ has quit [Remote host closed the connection]
eAlchemi_ has joined #ruby
miso1337 has joined #ruby
drale2k has quit [Ping timeout: 260 seconds]
__Big0__ has joined #ruby
eAlchemi_ has quit [Ping timeout: 260 seconds]
Guest42982 has quit [Ping timeout: 256 seconds]
chendo has quit [Ping timeout: 245 seconds]
__Big0__ has quit [Remote host closed the connection]
tcstar has joined #ruby
chendo_ has joined #ruby
a_a_g has joined #ruby
<Hanmac> aedorm did you tell him that he need enough Power to do that?
araujo has quit [Read error: Connection reset by peer]
marcdel has quit []
a_a_g has quit [Read error: Connection reset by peer]
araujo has joined #ruby
araujo has joined #ruby
araujo has quit [Changing host]
a_a_g has joined #ruby
a_a_g1 has joined #ruby
divout has quit [Quit: Leaving.]
divout has joined #ruby
a_a_g has quit [Read error: Connection reset by peer]
a_a_g1 has quit [Read error: Connection reset by peer]
jamesfung14 has quit [Quit: Leaving]
a_a_g has joined #ruby
marcdel has joined #ruby
yankeefan04 has quit [Remote host closed the connection]
natd has quit [Quit: Leaving]
h8R_home has quit [Read error: Connection reset by peer]
s00pcan has quit [Quit: Changing server]
h8R_home has joined #ruby
marcdel has quit [Client Quit]
xbayrockx has joined #ruby
xbayrockx is now known as wf2f
headius has joined #ruby
snearch has joined #ruby
sandGorgon has joined #ruby
<hemanth> Hanmac, VM inception :D
<hemanth> how about that?
<aedornm> Hanmac: If that was the only thing holding this plan back, I would. Bit more than that in this case!
snearch has quit [Max SendQ exceeded]
<hemanth> aedorn, we are already doing that here, with Vsphere :)
<Hanmac> for sample if he only has a dual core its a bit dump to run 4 VMs
shock_one has joined #ruby
Takehiro has quit [Remote host closed the connection]
snearch has joined #ruby
s00pcan has joined #ruby
hemanth_ has joined #ruby
hemanth has quit [Read error: Connection reset by peer]
hemanth_ has quit [Read error: Connection reset by peer]
<aedornm> hemanth: This is for testing network routers, though. And the machines they have now are dual core Xeons with 4GB of RAM. You're lucky if you can get a single device tested reliably just due to PPS limitations, let alone the hardware for the VMs.
hemanth_ has joined #ruby
ananthakumaran has joined #ruby
deepinskin has quit [Read error: Connection reset by peer]
<aedornm> Better idea right now is to move all testing into a cheap secondary embedded device, like a bunch of raspberry pis, and just communicate with those.
scorix has joined #ruby
robustus has joined #ruby
ahammond has joined #ruby
sambio has quit []
Takehiro has joined #ruby
kofno has joined #ruby
robustus|Off has quit [Ping timeout: 255 seconds]
_nitti has joined #ruby
cburyta has joined #ruby
lethjakman has joined #ruby
kofno has quit [Ping timeout: 258 seconds]
_nitti has quit [Ping timeout: 276 seconds]
danslo has joined #ruby
ksinkar has joined #ruby
cburyta has quit [Ping timeout: 256 seconds]
ksinkar has quit [Client Quit]
vlad_starkov has joined #ruby
sayan has joined #ruby
s00pcan has quit [Quit: Lost terminal]
s00pcan has joined #ruby
<aces1up> string =~ /%%(.+?)%%/ how can i get all matches in an array?
girija has quit [Ping timeout: 245 seconds]
headius has quit [Quit: headius]
<hemanth_> [ /%%(.+?)%%/ ]
danslo has quit [Ping timeout: 252 seconds]
danslo has joined #ruby
Pochacco has joined #ruby
himsin has quit [Remote host closed the connection]
hbpoison has quit [Ping timeout: 246 seconds]
vlad_starkov has quit [Ping timeout: 276 seconds]
generalissimo has quit [Remote host closed the connection]
himsin has joined #ruby
etcetera has joined #ruby
dyeske has quit [Remote host closed the connection]
aganov has joined #ruby
yashshah has quit [Read error: Connection reset by peer]
artofraw has joined #ruby
yashshah_ has joined #ruby
<aces1up> hemanth_ is there also a way to
<aces1up> hemanth_ only match =~ /%%(.+?)%%/ that are not in an external array?
etcetera has quit [Client Quit]
<aces1up> for instance if the exclude array = ['this', 'or', 'that']
<aces1up> i don't want the regex to match those.
cantonic has joined #ruby
etcetera has joined #ruby
bpfh has quit [Quit: Saindo]
artofraw has quit [Remote host closed the connection]
_hemanth has joined #ruby
codecop has joined #ruby
yxhuvud2 has joined #ruby
<_hemanth> aces1up, read the docs?
mockra has joined #ruby
susrivas` has joined #ruby
drale2k has joined #ruby
hemanth_ has quit [Ping timeout: 245 seconds]
noop has joined #ruby
yxhuvud has quit [Ping timeout: 258 seconds]
mikepack has joined #ruby
susrivas has quit [Ping timeout: 264 seconds]
girija has joined #ruby
mockra has quit [Ping timeout: 264 seconds]
eAlchemist has joined #ruby
kofno has joined #ruby
codezombie has joined #ruby
earthquake has joined #ruby
carraroj has joined #ruby
drale2k has quit [Read error: Connection reset by peer]
carraroj has quit [Client Quit]
averiso has quit [Read error: Connection reset by peer]
mahmoudimus has quit [Quit: Computer has gone to sleep.]
psyprus has quit [Ping timeout: 258 seconds]
psyprus has joined #ruby
kofno has quit [Ping timeout: 264 seconds]
braoru has joined #ruby
averiso has joined #ruby
tylersmith has quit [Quit: tylersmith]
earthquake has quit [Quit: earthquake]
Dreamer3 has quit [Ping timeout: 252 seconds]
pyrac has joined #ruby
tomzx_mac has quit [Ping timeout: 264 seconds]
zigomir has joined #ruby
Dreamer3 has joined #ruby
freeayu__ has joined #ruby
wallerdev has quit [Quit: wallerdev]
Hanmac has quit [Quit: Leaving.]
cyong has quit [Quit: Leaving.]
hbpoison has joined #ruby
huoxito has quit [Quit: Leaving]
zodiak has quit [Ping timeout: 258 seconds]
freeayu has quit [Ping timeout: 264 seconds]
helvete has joined #ruby
mikeg has joined #ruby
swex has quit [Quit: No Ping reply in 180 seconds.]
swex has joined #ruby
mikeg has quit [Client Quit]
toekutr has left #ruby ["ERC Version 5.3 (IRC client for Emacs)"]
mikeg has joined #ruby
piotr has joined #ruby
vipulnsward has joined #ruby
danslo has quit [Quit: danslo]
Axsuul has quit [Ping timeout: 258 seconds]
zodiak has joined #ruby
mahmoudimus has joined #ruby
codezombie has quit [Quit: Leaving...]
lemonsparrow has joined #ruby
tcstar has quit [Ping timeout: 246 seconds]
veer has quit [Ping timeout: 258 seconds]
_nitti has joined #ruby
freeayu__ has quit [Ping timeout: 260 seconds]
vlad_starkov has joined #ruby
hbpoison has quit [Ping timeout: 245 seconds]
fumbe has quit [Ping timeout: 272 seconds]
sidestepism has quit [Ping timeout: 256 seconds]
helvete has quit [Quit: Leaving...]
Mon_Ouie has joined #ruby
_nitti has quit [Ping timeout: 260 seconds]
marcdel has joined #ruby
eAlchemist has quit [Remote host closed the connection]
marcdel has quit [Client Quit]
angusiguess has quit [Ping timeout: 245 seconds]
hbpoison has joined #ruby
codezombie has joined #ruby
xpen has joined #ruby
workmad3 has joined #ruby
tcstar has joined #ruby
shock_one has quit [Ping timeout: 256 seconds]
staafl has quit [Read error: Connection reset by peer]
aapzak has quit [Ping timeout: 272 seconds]
_hemanth has quit [Quit: Leaving]
Emplitz has quit [Quit: Leaving]
mikepack has quit [Remote host closed the connection]
aapzak has joined #ruby
etcetera has quit []
nari has quit [Ping timeout: 264 seconds]
Mon_Ouie has quit [Ping timeout: 255 seconds]
andikr has joined #ruby
Hanmac has joined #ruby
sayan has quit [Ping timeout: 256 seconds]
fumbe has joined #ruby
greenarrow has quit [Quit: IRC is just multiplayer notepad]
Myconix has quit [Read error: Connection reset by peer]
hashmal has joined #ruby
freeayu has joined #ruby
aapzak has quit [Read error: Connection reset by peer]
greenarrow has joined #ruby
davejacobs has joined #ruby
ckrailo has quit [Quit: Computer has gone to sleep.]
yxhuvud has joined #ruby
davejaco1s has joined #ruby
aapzak has joined #ruby
yxhuvud2 has quit [Ping timeout: 260 seconds]
epitron has quit [Read error: Connection reset by peer]
hithere has left #ruby [#ruby]
arturaz has joined #ruby
pehlert has joined #ruby
Yakko has quit [Remote host closed the connection]
sayan has joined #ruby
freeayu has quit [Read error: Connection reset by peer]
Takehiro has quit [Read error: Connection reset by peer]
davejacobs has left #ruby [#ruby]
adr has joined #ruby
freeayu has joined #ruby
davejacobs has joined #ruby
drale2k has joined #ruby
fixl has quit [Quit: KVIrc 4.3.1 Aria http://www.kvirc.net/]
atmosx has joined #ruby
Takehiro has joined #ruby
davejacobs has quit [Client Quit]
nari has joined #ruby
<Hanmac> shevy: http://xkcd.com/1186/
drale2k has quit [Ping timeout: 240 seconds]
adr has quit [Ping timeout: 245 seconds]
helvete has joined #ruby
pyrac has quit [Quit: pyrac]
adr has joined #ruby
mattb has quit [Ping timeout: 272 seconds]
sayan has quit [Ping timeout: 258 seconds]
tommyvyo has quit [Quit:]
KellyLSB_missing is now known as KellyLSB
mattb has joined #ruby
artofraw has joined #ruby
wf2f has quit []
bigkevmcd has quit [Quit: Ex-Chat]
hemanth has joined #ruby
hemanth has quit [Read error: Connection reset by peer]
bigkevmcd has joined #ruby
hemanth has joined #ruby
jgrevich has quit [Remote host closed the connection]
Morkel has joined #ruby
ahammond has quit [Quit: ahammond]
workmad3 has quit [Ping timeout: 256 seconds]
cavel has joined #ruby
KellyLSB is now known as KellyLSB_missing
Pochacco has left #ruby [#ruby]
mahmoudimus has quit [Quit: Computer has gone to sleep.]
cavel has quit [Remote host closed the connection]
hemanth_ has joined #ruby
hemanth has quit [Read error: Connection reset by peer]
hemanth_ has quit [Read error: Connection reset by peer]
hemanth_ has joined #ruby
bluOxigen has joined #ruby
pen has joined #ruby
sayan has joined #ruby
<pen> hey
cantonic has quit [Quit: cantonic]
<pen> I use variable = method || method2 || method3, but when method returns [] variable will be []
<pen> it seems like empty array is not evaluated false in ruby
<Hanmac> pen ruby is more consequent ... it only returns false for nil and false all other stuff is true
<pen> so how do I do this? since [] is still true, but I want non-empty array values :\
<Hanmac> pen what about php? >> '0', 0, and 0.0 are false, but '0.0' is true
pencilcheck has joined #ruby
_nitti has joined #ruby
<pencilcheck> :(
<Hanmac> pen about method || method2 || method3 , what does this three methods return? all of them returning arrays?
<pencilcheck> yea
<pencilcheck> all arrays
<pencilcheck> basically I use array.select to filter array, and I don't want empty array
<marwinis1> I am trying to figure out a way to send a JSON-object to a method I wrote in sinatra. just a simple JSON.parse(request.body.read) and another class sending the json object to that /url/, it only gives me back the html-code. Anyone done something similar? json data will be sent from a java/android application, just doing all the testing in ruby for now.
Guest42982 has joined #ruby
<bnagy> empty?
<pencilcheck> yea
<pencilcheck> they all return arrays
<pencilcheck> some are empty
<pencilcheck> and I want the first non empty array
cavel has joined #ruby
<Hanmac> you can do: method + method2 + method3
cburyta has joined #ruby
<Hanmac> or [method,method2,method3].first{|a|!a.empty?}
<Hanmac> ups
<pencilcheck> hmm
<Hanmac> [method,method2,method3].find{|a|!a.empty?}
<bnagy> >> [ [1], [2], [], [3] ].reject(&:empty?)
<eval-in> bnagy => [[1], [2], [3]] (http://eval.in/12766)
pen has quit [Ping timeout: 258 seconds]
angusiguess has joined #ruby
<bnagy> oh, you're chaining methods? lol
jprovazn has joined #ruby
<pencilcheck> I just want the first non empty array from the methods, I don't want to mix their results
<Hanmac> pick this one: [method,method2,method3].find{|a|!a.empty?}
_nitti has quit [Ping timeout: 276 seconds]
<pencilcheck> find? so that returns the element?
<bnagy> use a.any?, not !a.empty?, but yeaj
<pencilcheck> cool
<pencilcheck> thanks
Ontolog has joined #ruby
<bnagy> that is really kind of gross code though
<bnagy> I'd probably just make it longer, irl
<bnagy> oh maybe just medium-gross
<bnagy> meh
marwinis1 is now known as marwinism
angusiguess has quit [Ping timeout: 256 seconds]
AxonetBE has joined #ruby
lemonsparrow has quit [Ping timeout: 245 seconds]
frosks has quit [Remote host closed the connection]
El_loco has joined #ruby
RubyHunter has joined #ruby
yashshah_ has quit [Read error: Connection reset by peer]
yashshah- has joined #ruby
browndawg has joined #ruby
h8R_home has quit [Ping timeout: 255 seconds]
kornnflake_zzz is now known as kornnflake
Ontolog has quit [Remote host closed the connection]
eAlchemist has joined #ruby
gokul has joined #ruby
carraroj has joined #ruby
browndawg has quit [Client Quit]
razibog has joined #ruby
mockra has joined #ruby
Guest42982 has quit []
francisfish has joined #ruby
apod has joined #ruby
rdark has joined #ruby
julio has joined #ruby
razibog has quit [Ping timeout: 246 seconds]
eAlchemist has quit [Ping timeout: 256 seconds]
yxhuvud2 has joined #ruby
mafolz has joined #ruby
polo_ has joined #ruby
<polo_> ls
julio has quit [Client Quit]
braoru has quit [Remote host closed the connection]
lkba has quit [Ping timeout: 240 seconds]
dhruvasagar has quit [Read error: Connection reset by peer]
yxhuvud has quit [Ping timeout: 256 seconds]
atmosx has quit [Quit: And so the story goes…]
emergion has joined #ruby
<hemanth_> polo_, . ./
beiter has joined #ruby
<icy``> what are the words for the deer tehre
<icy``> there*
icy`` has quit [Quit: .: adios :.]
pyrac has joined #ruby
ozgura has quit [Remote host closed the connection]
skattyadz has joined #ruby
drale2k has joined #ruby
braoru has joined #ruby
Fuzai has joined #ruby
bluOxigen has quit [Ping timeout: 256 seconds]
bluOxigen has joined #ruby
lethjakman has quit [Ping timeout: 264 seconds]
polo_ is now known as polito
cburyta has quit [Ping timeout: 245 seconds]
drale2k has quit [Ping timeout: 252 seconds]
El_loco has quit [Ping timeout: 256 seconds]
monkegjinni has joined #ruby
mpfundstein has joined #ruby
polito_ has joined #ruby
polito is now known as someothernick
polito_ is now known as polito
TheFuzzball has joined #ruby
pi3r has joined #ruby
xpen has quit [Ping timeout: 255 seconds]
browndawg has joined #ruby
jimeh has joined #ruby
someothernick has quit [Remote host closed the connection]
maxmanders has joined #ruby
havenwood has quit [Remote host closed the connection]
helvete has quit [Quit: Leaving...]
browndawg has quit [Client Quit]
havenwood has joined #ruby
joebew has joined #ruby
emergion has quit [Quit: Computer has gone to sleep.]
divout has quit [Quit: Leaving.]
Matip has joined #ruby
apeiros_ has joined #ruby
marcdel has joined #ruby
helvete has joined #ruby
polito has quit [Quit: Page closed]
zigomir has quit [Quit: zigomir]
havenwood has quit [Ping timeout: 245 seconds]
dhruvasagar has joined #ruby
linoge has quit [Read error: Connection reset by peer]
linoge has joined #ruby
apeiros has quit [Ping timeout: 252 seconds]
Mattix has quit [Ping timeout: 264 seconds]
divout has joined #ruby
kornnflake is now known as kornnflake_zzz
gyre008 has joined #ruby
averiso has quit [Quit: Quit.]
ferdev has quit [Quit: ferdev]
Takehiro has quit [Read error: Connection reset by peer]
Takehiro_ has joined #ruby
zigomir has joined #ruby
gyre008 has quit [Remote host closed the connection]
kornnflake_zzz is now known as kornnflake
mockra has quit [Remote host closed the connection]
lewix has quit [Remote host closed the connection]
haxrbyte has joined #ruby
_nitti has joined #ruby
wreckimn1 has joined #ruby
carraroj has quit [Read error: Operation timed out]
helvete has quit [Quit: Leaving...]
sandGorgon has quit [Ping timeout: 245 seconds]
chichou_ has joined #ruby
helvete has joined #ruby
haxrbyte_ has joined #ruby
pencilcheck has quit [Remote host closed the connection]
chichou_ has quit [Client Quit]
hoelzro|away is now known as hoelzro
marcdel has quit []
ozgura has joined #ruby
carraroj has joined #ruby
_nitti has quit [Ping timeout: 245 seconds]
daniel_-_ has joined #ruby
adkron___ has quit [Ping timeout: 246 seconds]
haxrbyte has quit [Ping timeout: 245 seconds]
threesome has quit [Quit: Leaving]
adkron_ has quit [Ping timeout: 264 seconds]
threesome has joined #ruby
_hemanth has joined #ruby
haxrbyte_ has quit [Remote host closed the connection]
haxrbyte has joined #ruby
hemanth_ has quit [Ping timeout: 256 seconds]
ferdev has joined #ruby
ephemerian has joined #ruby
sandGorgon has joined #ruby
skattyadz has quit [Quit: skattyadz]
sandGorgon has quit [Max SendQ exceeded]
sandGorgon has joined #ruby
blaxter has joined #ruby
ThePicard has quit [Ping timeout: 245 seconds]
blacktulip has joined #ruby
sk87 has joined #ruby
ThePicard has joined #ruby
nomenkun has joined #ruby
helvete has quit [Quit: Leaving...]
yxhuvud has joined #ruby
jlebrech has joined #ruby
helvete has joined #ruby
nomenkun_ has joined #ruby
<jlebrech> is there a shorthand for: if a.has_key?(:b) then c = a[:b]
rezzack has quit [Ping timeout: 258 seconds]
cavel has quit [Remote host closed the connection]
yxhuvud2 has quit [Ping timeout: 264 seconds]
<joebew> c = a[:b] if a.has_key?(:b)
<Hanmac> joebew: was c set before to something?
<joebew> no
<Hanmac> then this is enough: c = a[:b]
<joebew> yep
nomenkun has quit [Ping timeout: 256 seconds]
Vainoharhainen has joined #ruby
apod has quit []
<Hanmac> you dont need to check for the key, because c is set to nil, even the c= line is not evaluated
<joebew> sure
<joebew> my fault :P
<jlebrech> i'm pulling this array from a serialize column in rails and the key may or may not be then and might not actually be a hash
HecAtic has joined #ruby
_hemanth is now known as realase
realase is now known as hemanth
razibog has joined #ruby
<joebew> Hanmac: I was confusing with .fetch() method :P
blaxter has quit [Ping timeout: 246 seconds]
<Hanmac> fetch is when you want your own default value, and ignore the default_value that Hash has
a_a_g has quit [Quit: Leaving.]
tvw has joined #ruby
daniel_-_ has quit [Ping timeout: 245 seconds]
<joebew> Hanmac: Yes, It rais an exception too, if the default value were not set and the key not exists.
<joebew> *raise
<jlebrech> yeah i think i'm using fetch for the wrong reason
yacks has quit [Ping timeout: 260 seconds]
<jlebrech> i get this: undefined method `has_key?' for #<String:0x7cea9e0>
<jlebrech> because the column is sometimes a string without the hash i'm trying to use
<jlebrech> just want it to overlook that
a_a_g has joined #ruby
devoper has joined #ruby
hemanth has quit [Read error: Connection reset by peer]
hemanth has joined #ruby
mark9 has joined #ruby
nari has quit [Ping timeout: 245 seconds]
<jlebrech> this works but i don't like it. c = a[:b] rescue nil
<jlebrech> that way if a isn't a hash it produces a nil value
a_a_g has quit [Client Quit]
<shevy> jlebrech you can also check for type
<shevy> if x.is_a? String
<shevy> elsif x.is_a? Hash
<jlebrech> in my case i just need to do one thing if it responds to a key and nil otherwise, so i think it makes sense
shock_one has joined #ruby
fire has joined #ruby
yacks has joined #ruby
AxonetBE has quit [Quit: Leaving.]
xbayrockx has joined #ruby
xbayrockx is now known as wf2f
blaxter has joined #ruby
bubblehead has quit [Remote host closed the connection]
ExxKA has joined #ruby
poikon has joined #ruby
carraroj has quit [Ping timeout: 246 seconds]
AxonetBE has joined #ruby
<apeiros_> jlebrech: that sounds like poorly normalized data
scorix has quit [Quit: Leaving]
<jlebrech> apeiros_, i'd rather not have it in a cache column
<apeiros_> ?
mikecmpbll has joined #ruby
<apeiros_> what's caching got to do with normalization
decoponio has joined #ruby
pen has joined #ruby
[eDu] has joined #ruby
Tricon has quit [Quit: Leaving...]
becom33 has joined #ruby
<becom33> http://pastebin.com/FJdqKQwy is this a ok way to use language module and config module ?
danslo has joined #ruby
pen_ has joined #ruby
<jlebrech> i'm reading from a serialized column, and trying to read it back out with struct, but i'm getting "needs to be a constant"
daniel_-_ has joined #ruby
pen has quit [Ping timeout: 258 seconds]
statix_ has joined #ruby
vlad_starkov has quit [Remote host closed the connection]
adambeynon has joined #ruby
mark9 has left #ruby [#ruby]
stat1x has quit [Ping timeout: 256 seconds]
miso1337 has quit [Quit: afk]
sayan has quit [Read error: Connection reset by peer]
hasimo has quit [Remote host closed the connection]
sepp2k has joined #ruby
slainer68 has joined #ruby
Harlin has quit [Remote host closed the connection]
monkegjinni has quit [Remote host closed the connection]
<becom33> anyone ?
eAlchemi_ has joined #ruby
xpen has joined #ruby
_nitti has joined #ruby
<Hanmac> becom33 use something like r18n for language
<becom33> and the config ?
hasimo-t has joined #ruby
elaptics`away is now known as elaptics
<kornnflake> Can i use God to monitor a binary?
<Zelest> God does not exist. Please discuss. ;-)
_nitti has quit [Ping timeout: 264 seconds]
chichou has quit [Ping timeout: 252 seconds]
<kornnflake> godrb luckily does exist :p
mockra has joined #ruby
yashshah- has quit [Read error: Connection reset by peer]
niklasb has joined #ruby
yashshah- has joined #ruby
Squarepy has joined #ruby
Squarepy has quit [Changing host]
Squarepy has joined #ruby
eka has joined #ruby
<pen_> godrb?? wtf?
mockra has quit [Ping timeout: 252 seconds]
<kornnflake> http://godrb.com/ ...
hemanth_ has joined #ruby
himsin has quit [Remote host closed the connection]
himsin has joined #ruby
hbpoison has quit [Ping timeout: 255 seconds]
hemanth_ has quit [Read error: Connection reset by peer]
hemanth has quit [Ping timeout: 252 seconds]
hemanth_ has joined #ruby
chichou has joined #ruby
sayan has joined #ruby
Banistergalaxy has quit [Ping timeout: 258 seconds]
monkegjinni has joined #ruby
yxhuvud2 has joined #ruby
pen_ has quit [Remote host closed the connection]
Banistergalaxy has joined #ruby
yxhuvud has quit [Ping timeout: 256 seconds]
decoponio has quit [Quit: Take to stop a load on my PC]
pehlert has quit [Quit: Leaving.]
<marwinism> I get the WARN Could not determine content-length of response body. Set content-length of the response or
<marwinism> "Hello World" │ set Response#chunked = true
pehlert has joined #ruby
<apeiros_> marwinism: known bug in webrick
<apeiros_> either patch it, or use a different webserver than webrick
<apeiros_> or just live with the warning
<marwinism> apeiros_: does it affect anything?
<apeiros_> it's just a warning, no effects other than that
Xeago has joined #ruby
<apeiros_> ah, seems it doesn't set the keep-alive header. but since webrick isn't for production anyway, that's nothing to worry about
haxrbyte has quit [Read error: Connection reset by peer]
<marwinism> yeah, my thoughts exactly. But thanks for the input!
<Xeago> wow, 17k updates for windows...
<Xeago> on boot, there were another 20k on shutdown
<marwinism> you running 3.1?
<marwinism> 17.000 updates?
<Xeago> nah 7HP
<Xeago> gf's laptop
<marwinism> 1.700 i could belive.
<Xeago> 16968 to be exact
<joebew> ahahahaha
<Xeago> last night when I shut it down it was 19726
<joebew> WTF
<Xeago> they go rather quickly tho, about a second each
drale2k has joined #ruby
cburyta has joined #ruby
<joebew> Windows..k :D
eAlchemi_ has quit [Remote host closed the connection]
pen has joined #ruby
hackeron has quit [Ping timeout: 245 seconds]
<apeiros_> how's that possible? I thought they only patch tuesdays (patch tuesday?) that'd be like 340 years of updates…
monkegjinni has quit [Remote host closed the connection]
<apeiros_> and 1up for apple's combo updates…
hbpoison has joined #ruby
cibs has quit [Ping timeout: 256 seconds]
drale2k has quit [Ping timeout: 264 seconds]
<Hanmac> maybe windows does uses the same update cycle as oracle ... like > 1 patch per product and per week? :P
sandGorgon has quit [Ping timeout: 260 seconds]
<Hanmac> what i very hate about windows updates: "okay i installed some Ups ... now i need to restart before i can continue ... and then repeat"
<joebew> I can't understand why there a are a lot of people that continue to use windows nowadays
monkegjinni has joined #ruby
shock_one has quit [Ping timeout: 245 seconds]
pencilcheck has joined #ruby
cburyta has quit [Ping timeout: 245 seconds]
pen has quit [Ping timeout: 260 seconds]
kendhia has joined #ruby
<Xeago> finally, it finished
<Hanmac> Xeago: how often does it want to reboot? :P
Astral_ has quit [Ping timeout: 276 seconds]
<Xeago> about weekly
<Xeago> it checks weekly for updates
<Xeago> don't know if it wants another erstart now ho
<Xeago> only got to login screen and it is tkaing ages again
Domon has quit [Remote host closed the connection]
mengu_ has quit [Quit: Konversation terminated!]
sandGorgon has joined #ruby
mengu_ has joined #ruby
vipulnsward has quit [Ping timeout: 240 seconds]
<Hanmac> on linux you can update daily without reboot
sandGorgon has quit [Max SendQ exceeded]
kornnflake is now known as kornnflake_zzz
BizarreCake has joined #ruby
sandGorgon has joined #ruby
aqabiz has joined #ruby
jamesaxl has joined #ruby
<joebew> Hanmac: Linux is the answer :D
maxmanders has quit [Quit: Computer has gone to sleep.]
chichou has quit [Read error: Connection reset by peer]
maxmanders has joined #ruby
Astralum has joined #ruby
[eDu] has quit [Quit: [eDu]]
chichou has joined #ruby
mulinux has joined #ruby
jclarke has joined #ruby
justsee has quit [Ping timeout: 258 seconds]
bitgod has quit [Remote host closed the connection]
<hemanth_> (0..Float::INFINITY).lazy.with_index intresting Hanmac ?
cibs has joined #ruby
* hemanth_ says GNU/Linux
davetherat has quit [Remote host closed the connection]
davetherat has joined #ruby
jmeeuwen has quit [Read error: Connection reset by peer]
_nitti has joined #ruby
rohith has joined #ruby
h8R has joined #ruby
linoge has quit [Ping timeout: 252 seconds]
Zai00 has joined #ruby
hbpoison has quit [Ping timeout: 260 seconds]
statarb3 has joined #ruby
<rohith> Hi I want to install rvm with ruby 1.8.7 rails 2.3.5 rubygems 1.3.7 on my freshly installed ubuntu 12.10 server.. please guide me !
emergion has joined #ruby
carraroj has joined #ruby
vlad_starkov has joined #ruby
_nitti has quit [Ping timeout: 246 seconds]
<Hanmac> rohith why do you want ruby1.8?
<rohith> I need to install fedena
<rohith> with apache and passenger
<Hanmac> rohith the rails ones are #rubyonrails
<rohith> thank Hanmac
<rohith> i will try there
io_syl has quit [Ping timeout: 256 seconds]
sonda has joined #ruby
Virunga has joined #ruby
vlad_starkov has quit [Ping timeout: 245 seconds]
BizarreCake has quit [Read error: Connection reset by peer]
niklasb has quit [Ping timeout: 256 seconds]
io_syl has joined #ruby
ozgura has quit [Read error: Connection reset by peer]
emergion has quit [Quit: Computer has gone to sleep.]
ozgura has joined #ruby
skattyadz has joined #ruby
MrZYX|off is now known as MrZYX
yshh has quit [Remote host closed the connection]
maxmanders has quit [Quit: Computer has gone to sleep.]
Spooner has joined #ruby
maxmanders has joined #ruby
jpfuentes2 has joined #ruby
rohith has quit [Ping timeout: 245 seconds]
pi3r has quit [Ping timeout: 252 seconds]
niklasb has joined #ruby
hbpoison has joined #ruby
yxhuvud has joined #ruby
daniel_-_ has quit [Quit: WeeChat 0.4.0]
ebbflowgo has joined #ruby
dhruvasagar has quit [Ping timeout: 252 seconds]
kristofers has joined #ruby
thebastl has joined #ruby
xpen has quit [Remote host closed the connection]
kofno has joined #ruby
yxhuvud2 has quit [Ping timeout: 245 seconds]
<ebbflowgo> what does $1 stand for in ruby? https://gist.github.com/ebbflowgo/dffd9faf7014c386bc03
monkegjinni has quit [Remote host closed the connection]
<hoelzro> ebbflowgo: it's the first capture
dhruvasagar has joined #ruby
<hoelzro> >> 'fooooooo' =~ /f(o*)/ ; puts $1
<eval-in> hoelzro => ooooooo ... (http://eval.in/12774)
linoge has joined #ruby
hbpoison has quit [Read error: Connection reset by peer]
gommo has joined #ruby
ML_BMT has joined #ruby
skattyadz has quit [Quit: skattyadz]
hmarr has joined #ruby
chipotle_ has joined #ruby
kofno_ has joined #ruby
HecAtic has quit [Quit: Àá¼ö]
<sepp2k> ebbflowgo: Note that the code in your gist uses $2, which will be nil because there is no second capturing group in the regex.
kofno has quit [Ping timeout: 255 seconds]
<ebbflowgo> sepp2k: yeah I must have mispasted somehow
drale2k has joined #ruby
<ebbflowgo> sepp2k, hoelzro: so this dollar sign convention is for regex only?
<hoelzro> dollar sign variables are global
<hoelzro> that's how Ruby marks its global variables
<Hanmac> but this ones are not global ... they are thread local so "beware!"
<sepp2k> ebbflowgo: All global variables start with $. But the regex variables aren't actually global - they're more like magic.
apod has joined #ruby
Takehiro_ has quit [Read error: Connection reset by peer]
<ebbflowgo> ok
<ebbflowgo> weird.. I'll read, and it seems like they are called capture groups
v0yager_ has joined #ruby
ML_BMT has quit [Ping timeout: 252 seconds]
<sepp2k> Hanmac: They're not even thread-local. They're local local.
<hoelzro> captures, groups, submatches
Takehiro has joined #ruby
<hoelzro> all the same thing, pretty much
pi3r has joined #ruby
drumsrgr8forn8 has joined #ruby
dhruvasagar has quit [Ping timeout: 260 seconds]
drale2k has quit [Ping timeout: 245 seconds]
mulinux has quit [Quit: mulinux]
sailias has joined #ruby
grayson has joined #ruby
v0yager has quit [Ping timeout: 252 seconds]
<sepp2k> hoelzro: Well a group can be non-capturing, so it isn't really the same.
<sepp2k> More like a super-term.
<hoelzro> ok, good point
monkegjinni has joined #ruby
casheew has quit [Read error: Connection reset by peer]
casheew has joined #ruby
io_syl has quit [Quit: Computer has gone to sleep.]
<ebbflowgo> sepp2k: quick question, still regarding this dollar bill... I don't understand how a value is being set for the Price key.. https://gist.github.com/ebbflowgo/dffd9faf7014c386bc03
helvete has quit [Quit: Leaving...]
eAlchemi_ has joined #ruby
kendhia has quit [Quit: Ex-Chat]
<sepp2k> ebbflowgo: An assignment returns the value being assigned.
<sepp2k> So empty_hash[:my_key] = 42 returns 42.
<ebbflowgo> oh of course
<sepp2k> Wait... you don't understand why a value is being returned or why a value is being set?
wobblini has quit [Ping timeout: 264 seconds]
geekbri has joined #ruby
<Hanmac> because of this you can do a[1] = b[2] = c[3] = d[4]
freeayu has quit [Read error: Connection reset by peer]
<ebbflowgo> sepp2k: dono how I didn't read that as assignment.. however, I'm still not sure which regex that $1 is using
freeayu has joined #ruby
<sepp2k> ebbflowgo: The last one that has been matched.
casheew has quit [Read error: Connection reset by peer]
<sepp2k> Or more specifcally the last one that has been matched in the current scope.
<ebbflowgo> sepp2k: so it is global then too
mikecmpbll has quit [Quit: ["Textual IRC Client: www.textualapp.com"]]
casheew has joined #ruby
<ebbflowgo> sepp2k: i see
<ebbflowgo> sepp2k: thanks
<sepp2k> He, that's why I corrected myself right away: it's local.
<ebbflowgo> sepp2k: ignore my global comment
<ebbflowgo> sepp2k: lol yeah
hasimo-t has quit [Remote host closed the connection]
mikecmpbll has joined #ruby
eAlchemi_ has quit [Ping timeout: 276 seconds]
h8R has quit [Ping timeout: 258 seconds]
aqabiz has left #ruby [#ruby]
beiter has left #ruby [#ruby]
h8R has joined #ruby
<sepp2k> PS: I would recommend using String#match and/or String#[] rather than =~ and the magic variables for readability purposes.
aganov has quit [Quit: aganov]
aganov has joined #ruby
helvete has joined #ruby
hemanth_ has quit [Read error: Connection reset by peer]
_hemanth has joined #ruby
_hemanth has quit [Read error: Connection reset by peer]
_hemanth has joined #ruby
casheew has quit [Read error: Connection reset by peer]
Mohan has quit [Ping timeout: 245 seconds]
casheew has joined #ruby
vlad_starkov has joined #ruby
dhruvasagar has joined #ruby
skattyadz has joined #ruby
wreckimn1 has quit [Ping timeout: 252 seconds]
sailias has quit [Quit: Leaving.]
hbpoison has joined #ruby
divout has quit [Quit: Leaving.]
ckt1g3r has joined #ruby
_nitti has joined #ruby
yashshah- has quit [Read error: Connection reset by peer]
yashshah__ has joined #ruby
slainer68 has quit [Remote host closed the connection]
cibs has quit [Quit: leaving]
chipotle_ has quit [Quit: cya]
_nitti has quit [Ping timeout: 264 seconds]
monkegjinni has quit [Ping timeout: 258 seconds]
slainer68 has joined #ruby
slainer68 has quit [Remote host closed the connection]
slainer68 has joined #ruby
mark_locklear has joined #ruby
monkegjinni has joined #ruby
angusiguess has joined #ruby
jprovazn has quit [Quit: Leaving]
thecreators has joined #ruby
thebastl has quit [Remote host closed the connection]
s1n4 has joined #ruby
carloslopes has joined #ruby
vickaita has joined #ruby
casheew has quit [Read error: Connection reset by peer]
hogeo has quit [Remote host closed the connection]
casheew has joined #ruby
pi3r has quit [Ping timeout: 252 seconds]
jamesaxl has quit [Remote host closed the connection]
jclarke has quit [Quit: Leaving...]
casheew has quit [Read error: Connection reset by peer]
justsee has joined #ruby
justsee has joined #ruby
danslo has quit [Quit: danslo]
AxonetBE has left #ruby [#ruby]
mmitchell has joined #ruby
Al____ has joined #ruby
ozgura has quit [Read error: Connection reset by peer]
br4ndon has joined #ruby
ozgura has joined #ruby
hybris has joined #ruby
mulinux has joined #ruby
jlebrech has quit [Quit: Leaving]
casheew has joined #ruby
gommo has quit [Remote host closed the connection]
yxhuvud2 has joined #ruby
cantonic has joined #ruby
pencilcheck has quit [Read error: No route to host]
pen has joined #ruby
yxhuvud has quit [Ping timeout: 256 seconds]
thecreators has quit [Remote host closed the connection]
angusiguess has quit [Ping timeout: 264 seconds]
binaryplease has joined #ruby
jeffreybaird has joined #ruby
justsee has quit [Quit: Leaving...]
mrbrdo has quit [Read error: Connection reset by peer]
pi3r has joined #ruby
Al____ has quit [Quit: Al____]
Al____ has joined #ruby
drale2k has joined #ruby
slainer68 has quit [Remote host closed the connection]
<Xeago> apeiros_: The sun is hots this morning
Clownz has joined #ruby
* Xeago wonders why you are signed in, up for a game or two?
<banister`sleep> Xeago: it's snowing here in leiden
ozgura has quit [Read error: Connection reset by peer]
<banister`sleep> Xeago: what's the weather like where u r
<Xeago> like what you had 2 weeks ago I 'spose
<Xeago> sunny
<Xeago> cloudless'ish
ozgura has joined #ruby
<Xeago> but it's still dammn cold
<Xeago> around the beginning of this month, I had breakfast outside, a t-shirt was too hot
Flex has joined #ruby
<Xeago> it's -1 in the shade, +2 in the sun
<banister`sleep> Xeago: you're still in that little city near maastrict right?
maxmanders has quit [Quit: Computer has gone to sleep.]
<Xeago> no, in sweden now
<Xeago> Simborgarvägen 32, 184 37 Åkersberga, Sweden l/l: 59.476882,18.308399
<Xeago> :)
<Xeago> had it in c/p still xD
<Flex> could anybody tell me what is wrong with this? HTTParty.post("http://devflume1:80", body: {"user": {"email": "user1@example.com", "password": "secret"}}).body
drale2k has quit [Ping timeout: 264 seconds]
tessi has quit [Ping timeout: 248 seconds]
maxmanders has joined #ruby
<tobiasvl> wrong how?
Astralum has quit [Read error: Connection reset by peer]
Astralum has joined #ruby
chichouw has joined #ruby
chichou has quit [Ping timeout: 264 seconds]
vickaita has quit [Ping timeout: 252 seconds]
haxrbyte has joined #ruby
cburyta has joined #ruby
samphippen has joined #ruby
danslo has joined #ruby
chichou has joined #ruby
karthikselva has joined #ruby
chichouw has quit [Ping timeout: 258 seconds]
<Xeago> I rofl'ed
tessi has joined #ruby
davetherat has quit [Remote host closed the connection]
davetherat has joined #ruby
davetherat has quit [Remote host closed the connection]
davetherat has joined #ruby
haxrbyte has quit [Remote host closed the connection]
baba has joined #ruby
adkron has quit [Ping timeout: 264 seconds]
fire has quit [Ping timeout: 264 seconds]
Harlin has joined #ruby
yxhuvud2 has quit [Ping timeout: 260 seconds]
haxrbyte has joined #ruby
chichouw has joined #ruby
<Clownz> ROFL
<Clownz> nice pic xeago
davetherat has quit [Remote host closed the connection]
chichou has quit [Ping timeout: 260 seconds]
davetherat has joined #ruby
tessi has quit [Ping timeout: 258 seconds]
karthikselva has left #ruby [#ruby]
<Fuzai> Xeago: nice photo
karthikselva has joined #ruby
karthikselva has left #ruby [#ruby]
ML_BMT has joined #ruby
jpcamara has joined #ruby
staafl has joined #ruby
tessi has joined #ruby
chichou has joined #ruby
noop has quit [Remote host closed the connection]
hbpoison has quit [Ping timeout: 240 seconds]
karthikselva has joined #ruby
chichouw has quit [Ping timeout: 260 seconds]
sailias1 has joined #ruby
trautwein has joined #ruby
s1n4 has quit [Quit: leaving]
tommyvyo has joined #ruby
xpen has joined #ruby
codenapper has quit [Ping timeout: 252 seconds]
chichouw has joined #ruby
johnnygoodmancpa has joined #ruby
chichou has quit [Ping timeout: 260 seconds]
lkba has joined #ruby
johnnygoodmancpa has left #ruby [#ruby]
apod has quit []
nkr has joined #ruby
jpcamara has quit [Ping timeout: 264 seconds]
whoopzie has joined #ruby
AzizLight has joined #ruby
jpcamara has joined #ruby
khismetix has joined #ruby
<AzizLight> Hi everybody
apod has joined #ruby
yacks has quit [Ping timeout: 260 seconds]
<whoopzie> Attention all humans
<whoopzie> I have entered the channel
wreckimn1 has joined #ruby
gokul has quit [Read error: Connection reset by peer]
<tobiasvl> finally
_nitti has joined #ruby
slainer68 has joined #ruby
<karthikselva> is there anyone using ruby2 with rails on prod ?
cburyta has quit [Ping timeout: 246 seconds]
Astralum has quit [Read error: Connection timed out]
jeffreybaird has quit [Quit: jeffreybaird]
slainer68 has quit [Remote host closed the connection]
slainer68 has joined #ruby
_nitti has quit [Ping timeout: 256 seconds]
sambao21 has joined #ruby
<tobiasvl> maybe on #rubyonrails
douglarek__ has joined #ruby
douglarek__ has joined #ruby
AzizLight has quit [Read error: Connection reset by peer]
browndawg has joined #ruby
maxmanders has quit [Quit: Computer has gone to sleep.]
sambio has joined #ruby
becom33 has quit [Ping timeout: 246 seconds]
dmiller2 has quit [Ping timeout: 252 seconds]
Harlin2 has joined #ruby
ArchBeOS has joined #ruby
ArchBeOS has joined #ruby
ArchBeOS has quit [Changing host]
maxmanders has joined #ruby
ExxKA has quit [Quit: This computer has gone to sleep]
mikurubeam has joined #ruby
casheew has quit [Read error: Connection reset by peer]
casheew has joined #ruby
<karthikselva> thanks
dustint has joined #ruby
Harlin has quit [Ping timeout: 258 seconds]
Mohan has joined #ruby
Mohan has quit [Changing host]
Mohan has joined #ruby
Harlin2 has quit [Ping timeout: 246 seconds]
mikurubeam has quit [Client Quit]
cmarques has joined #ruby
casheew has quit [Read error: Connection reset by peer]
casheew has joined #ruby
Al____ has quit [Quit: Al____]
br4ndon has quit [Ping timeout: 260 seconds]
ofcan has joined #ruby
casheew has quit [Read error: Connection reset by peer]
breakingthings has joined #ruby
pavilionXP has quit [Remote host closed the connection]
becom33 has joined #ruby
becom33 has joined #ruby
becom33 has quit [Changing host]
Asher has quit [Quit: Leaving.]
chichouw has quit [Ping timeout: 260 seconds]
miso1337 has joined #ruby
casheew has joined #ruby
cr3 has joined #ruby
<ofcan> Hello! I have implemented Game of Life in Ruby, but the thing is kinda slow... Can someone help me optimise it? Code is here > https://github.com/ofcan/game-of-life-ruby#gosu . What was suggested was to basically 'not to have a loop in live_cells but to directly index the @cell_board array. That way your whole algorithm runs in O(n) complexity and should be real-time.' I am sure that is correct suggestion but I don't know what the guy meant... Can you clar
hbpoison has joined #ruby
sambao21 has quit [Ping timeout: 252 seconds]
khismetix has quit [Quit: Computer has gone to sleep.]
dmiller2 has joined #ruby
theRoUS has joined #ruby
theRoUS has quit [Changing host]
theRoUS has joined #ruby
Takehiro has quit [Remote host closed the connection]
chichou has joined #ruby
mavcunha has joined #ruby
cilquirm has joined #ruby
backjlack has joined #ruby
ner0x has joined #ruby
Takehiro has joined #ruby
swex has quit [Ping timeout: 258 seconds]
casheew has quit [Read error: Connection reset by peer]
casheew has joined #ruby
workmad3 has joined #ruby
postmodern has quit [Quit: Leaving]
casheew has quit [Read error: Connection reset by peer]
drale2k has joined #ruby
shevy2 has joined #ruby
chichou has quit [Ping timeout: 258 seconds]
psyprus has quit [Ping timeout: 258 seconds]
sailias1 has quit [Quit: Leaving.]
sailias has joined #ruby
psyprus has joined #ruby
sk87_ has joined #ruby
drumsrgr8forn8 has quit [Ping timeout: 258 seconds]
casheew has joined #ruby
sk87 has quit [Read error: Connection reset by peer]
sk87_ is now known as sk87
browndawg has quit [Ping timeout: 258 seconds]
philcrissman has joined #ruby
yacks has joined #ruby
drale2k has quit [Ping timeout: 240 seconds]
workmad3 has quit [Ping timeout: 258 seconds]
dEPy has joined #ruby
browndawg has joined #ruby
shevy has quit [Ping timeout: 260 seconds]
ArchBeOS has quit [Ping timeout: 252 seconds]
adkron has joined #ruby
mikurubeam has joined #ruby
chichou has joined #ruby
sk87 has quit [Read error: Connection reset by peer]
browndawg has left #ruby [#ruby]
jerius has joined #ruby
uris has joined #ruby
hbpoison has quit [Read error: Connection reset by peer]
hbpoison has joined #ruby
vlad_starkov has quit [Remote host closed the connection]
sk87 has joined #ruby
mikurubeam has quit [Client Quit]
mavcunha has quit [Quit: Textual IRC Client: www.textualapp.com]
mavcunha has joined #ruby
statarb3 has quit [Read error: Connection reset by peer]
tvw has quit []
statarb3 has joined #ruby
chichou has quit [Ping timeout: 256 seconds]
philcrissman has quit [Remote host closed the connection]
ArchBeOS has joined #ruby
failshell has joined #ruby
hmarr has quit []
invisime has joined #ruby
v0n has joined #ruby
hmarr has joined #ruby
vickaita has joined #ruby
casheew has quit [Read error: Connection reset by peer]
casheew has joined #ruby
RubyHunter has quit [Quit: Verlassend]
browndawg has joined #ruby
mikecmpbll has quit [Quit: ["Textual IRC Client: www.textualapp.com"]]
mikecmpbll has joined #ruby
jrajav has joined #ruby
vickaita has quit [Ping timeout: 264 seconds]
chichou has joined #ruby
wallerdev has joined #ruby
jeffreybaird has joined #ruby
whitedawg has joined #ruby
Uranio has joined #ruby
jeffreybaird has left #ruby [#ruby]
Astralum has joined #ruby
solidoodlesuppor has joined #ruby
ffranz has joined #ruby
grn has quit [Ping timeout: 264 seconds]
Stilo has joined #ruby
miso1337 has quit [Read error: Connection reset by peer]
chichouw has joined #ruby
miso1337 has joined #ruby
wallerdev has quit [Quit: wallerdev]
chichou has quit [Ping timeout: 256 seconds]
miso1337 has quit [Client Quit]
<ofcan> Hello! I have implemented Game of Life in Ruby, but the thing is kinda slow... Can someone help me optimise it? Code is here > https://github.com/ofcan/game-of-life-ruby#gosu . What was suggested was to basically 'not to have a loop in live_cells but to directly index the @cell_board array. That way your whole algorithm runs in O(n) complexity and should be real-time.' I am sure that is correct suggestion but I don't know what the guy meant... Can you clar
bean has joined #ruby
yashshah__ has quit [Read error: Connection reset by peer]
yashshah__ has joined #ruby
ananthakumaran has quit [Quit: Leaving.]
alanp_ is now known as alanp
miso1337 has joined #ruby
<Spooner> ofcan, You go through all live cells to find which ones are adjacent to the cell you are checking. You should instead check all adjacent cells to see if they are alive.
chichou has joined #ruby
ArchBeOS has quit [Ping timeout: 252 seconds]
ckt1g3r has quit [Quit: Leaving]
ArchBeOS has joined #ruby
wmoxam has joined #ruby
chichouw has quit [Ping timeout: 245 seconds]
gestahlt has joined #ruby
<gestahlt> Hi guys
chichou has quit [Read error: Connection reset by peer]
grn has joined #ruby
v0yager_ has quit [Read error: Connection reset by peer]
hmarr has quit [Ping timeout: 276 seconds]
rismoney has joined #ruby
<gestahlt> Simple question: Im calling a method that is to determine if the program should keep running or exiting.. How do i exit the programm from a method?
<gestahlt> is it "exit"?
hbpoison_ has joined #ruby
v0yager has joined #ruby
blacktulip has quit [Remote host closed the connection]
<gestahlt> basically its an abortion if criteria are not met
<Spooner> ofcan, You also have a lot of repetition of logic (for example having lots of if blocks, when you should have nested ifs and elsifs.
miso1337 has quit [Client Quit]
codecop has quit [Read error: Connection reset by peer]
<ofcan> Spooner: aha! is that the thing that was also suggested?
<Squarepy> gestahlt, raise an error
hbpoison has quit [Read error: Connection reset by peer]
<ofcan> Spooner: I know, I was coding it just to make it work and pass specs, now I need to refactor
<gestahlt> Squarepy: How?
kristofers has quit [Read error: Connection reset by peer]
_maes_ has quit [Quit: Miranda IM! Smaller, Faster, Easier. http://miranda-im.org]
kristofers has joined #ruby
drumsrgr8forn8 has joined #ruby
<Squarepy> gestahlt, read about it, you can create your own informative errors and catch them
<gestahlt> okay and how do i exit my program until i understood errors and exceptions?
<Spooner> ofcan, "neighbour_count == (2 || 3)" doesn't do what you think it does.
<Spooner> ofcan, You want [2, 3].include? neighbour_count (though really you should be using a case for that).
hmarr has joined #ruby
tomzx_mac has joined #ruby
chichou has joined #ruby
<Squarepy> gestahlt, oh yes I meant exceptions :) >> raise Exception
pen has quit [Remote host closed the connection]
Astralum has quit [Ping timeout: 264 seconds]
<Spooner> ofcan, Lots of other inefficiencies in the code, but I'll leave you to deal with those ;)
danslo has quit [Read error: Connection reset by peer]
V8Energy has joined #ruby
mikurubeam has joined #ruby
danslo has joined #ruby
Flex has quit [Remote host closed the connection]
JonnieCache has quit [Ping timeout: 255 seconds]
JonnieCache has joined #ruby
<ofcan> Spooner: thx :)
apod has quit []
adr has quit [Ping timeout: 246 seconds]
joebew_ has joined #ruby
generalissimo has joined #ruby
<ofcan> Spooner: is there some methodology to measure and improve on those inefficiences? Like TDD is for developing for example... Can I measure times the program runs/monitor some logs/ something?
interactionjaxsn has joined #ruby
hbpoison_ has quit [Ping timeout: 256 seconds]
chichouw has joined #ruby
theRoUS has quit [Ping timeout: 246 seconds]
apod has joined #ruby
ArchBeOS has quit [Remote host closed the connection]
<Spooner> ofcan, What I do with games is measure the time of each draw/update and work out how much of each second it is actually processing and how much it is not. However, if your simulation is slower than 60fps, you can just use Gosu's #fps measurement.
chichou has quit [Ping timeout: 260 seconds]
mikurubeam has quit [Client Quit]
joebew has quit [Ping timeout: 256 seconds]
<Squarepy> ofcan, you can use a profiler
yankeefan04 has joined #ruby
himsin has quit [Remote host closed the connection]
generalissimo is now known as god_of_all_texas
wreckimn1 has quit [Ping timeout: 252 seconds]
seejohnrun has joined #ruby
<Spooner> Yes, you can use profile, but that is largely useless for Games. ruby-prof can be OK if you only turn it on during the processing you are doing.
<Spooner> Seeing FPS getting lower is good for proving the code is getting faster, not for finding the bottlenecks themselves (which is what you need profiling for).
<Spooner> You have very little code and it should be "very obvious" where the problems are (but I guess you need to learn more to spot that immediately, of course).
nfk has joined #ruby
v0yager has quit [Remote host closed the connection]
dmerrick has joined #ruby
v0yager has joined #ruby
wyhaines has joined #ruby
himsin has joined #ruby
miso1337 has joined #ruby
cantonic has quit [Quit: cantonic]
axl_ has joined #ruby
razibog1 has joined #ruby
razibog has quit [Quit: Leaving.]
csmrfx has joined #ruby
kn330 has quit [Ping timeout: 245 seconds]
glafrance has joined #ruby
Asher has joined #ruby
hogeo has joined #ruby
vickaita has joined #ruby
angusiguess has joined #ruby
_nitti has joined #ruby
haxrbyte has quit [Ping timeout: 255 seconds]
<Hanmac> last time i checked FPS i get >60 and sometimes more than 300 FPS with one of my ruby gems :P
wf2f has quit []
ArchBeOS has joined #ruby
ArchBeOS has quit [Changing host]
ArchBeOS has joined #ruby
pehlert has quit [Quit: Leaving.]
drale2k has joined #ruby
Davey has joined #ruby
vlad_starkov has joined #ruby
huoxito has joined #ruby
cantonic has joined #ruby
nateberkopec has joined #ruby
geekbri has quit [Remote host closed the connection]
danslo has quit [Read error: Connection reset by peer]
pehlert has joined #ruby
danslo has joined #ruby
sayan has quit [Read error: Connection reset by peer]
enviable has joined #ruby
joebew_ is now known as joebew
xcv has joined #ruby
Appineer has joined #ruby
helvete has quit [Quit: Leaving...]
FuzaiDesktop has joined #ruby
Fuzai has quit [Disconnected by services]
FuzaiDesktop is now known as Fuzai
kfkf has joined #ruby
theRoUS has joined #ruby
theRoUS has joined #ruby
theRoUS has quit [Changing host]
freeayu has quit [Ping timeout: 264 seconds]
chichou has joined #ruby
freeayu has joined #ruby
chichouw has quit [Ping timeout: 264 seconds]
biff_tannen has joined #ruby
Neomex has joined #ruby
Nimsical has joined #ruby
nfk has quit [Read error: Connection timed out]
kfkf has quit [Ping timeout: 258 seconds]
geekbri has joined #ruby
glafrance has quit [Quit: I love my HydraIRC -> http://www.hydrairc.com <-]
ninjanoise has joined #ruby
wreckimn1 has joined #ruby
glafrance has joined #ruby
chichouw has joined #ruby
vlad_starkov has quit [Remote host closed the connection]
Takehiro has quit [Remote host closed the connection]
pen has joined #ruby
Asher has quit [Quit: Leaving.]
glafrance has left #ruby [#ruby]
chichou has quit [Ping timeout: 260 seconds]
dhruvasagar has quit [Ping timeout: 264 seconds]
jbueza has quit [Quit: Leaving.]
kn330 has joined #ruby
joshman_ has quit [Quit: Computer has gone to sleep.]
<lectrick> Spooner: Funny this conversation comes up, I'm actually needing to profile some of our test running. I'm actually using a minitest reporter which hooks into test begin/ends. For example I wanted to track outbound HTTP requests (very bad in tests) and I was able to hook into a callback the VCR gem provides to get this. But now I need to measure other things,
<lectrick> like DB accesses
<lectrick> Does something like newrelic or some other tool let me basically track certain method calls and log them?
jlast has joined #ruby
<Squarepy> isn't that the idea?
`p has quit [Remote host closed the connection]
enviable has quit [Quit: enviable]
_maes_ has joined #ruby
sandGorgon has quit [Ping timeout: 256 seconds]
chichou has joined #ruby
Hanmac has quit [Ping timeout: 256 seconds]
chichouw has quit [Ping timeout: 258 seconds]
beneggett has quit [Ping timeout: 276 seconds]
Xeago has quit [Remote host closed the connection]
bigmac has quit [Quit: Leaving]
vlad_starkov has joined #ruby
dhruvasagar has joined #ruby
ttt has quit [Remote host closed the connection]
Al____ has joined #ruby
yshh has joined #ruby
chichouw has joined #ruby
slainer68 has quit [Remote host closed the connection]
br4ndon has joined #ruby
sayan has joined #ruby
mulinux has quit [Quit: mulinux]
chichou has quit [Ping timeout: 258 seconds]
slainer68 has joined #ruby
ttt has joined #ruby
<lectrick> If I self.extend a module, do my instance methods still take priority over the module's methods?
Neomex has quit [Quit: Neomex]
karthikselva has left #ruby [#ruby]
pencilcheck has joined #ruby
chichou has joined #ruby
<lectrick> apparently not. so it's not the same as an include at the class level, sigh
jlebrech has joined #ruby
ttt has quit [Remote host closed the connection]
Stilo has quit [Quit: Textual IRC Client: www.textualapp.com]
IrishGringo has quit [Ping timeout: 252 seconds]
<jlebrech> when i'm doing YAML::load, I get: undefined class/module ... to I have to include the module the object is of into the loading class?
chichouw has quit [Ping timeout: 258 seconds]
Stilo has joined #ruby
pen has quit [Ping timeout: 264 seconds]
binaryplease has quit [Quit: WeeChat 0.4.0]
cr3 has quit [Quit: leaving]
mafolz has quit [Ping timeout: 258 seconds]
<lectrick> jlebrech: The class or module that you're deserializing has to already be in scope (required, loaded, whatever)
Clownz has quit [Remote host closed the connection]
<lectrick> jlebrech: Like if you're YAML.loading an instance of MyCustomClass, then you must have already "require 'my_custom_class'" before that point
<jlebrech> it's in rails, it's another model
<banister`sleep> jlebrech: of course, YAML builds an instance of the class then fills in the ivars
<jlebrech> so I must include the other model.
chichouw has joined #ruby
<lectrick> jlebrech: well, apparently it's not yet loaded at whatever point you're YAML.loading
<banister`sleep> if the lass doesnt exist then it can't build an instance ;)
<banister`sleep> class*
iambic has joined #ruby
<lectrick> jlebrech: yes, you can require the other class first, before you YAML.load
tcstar has quit [Ping timeout: 264 seconds]
<lectrick> banister`sleep: do you ever actually sleep? you are hardcore. very impressed. Do you like coffee or tea?
chichou has quit [Ping timeout: 260 seconds]
<banister`sleep> lectrick: i dont live in usa
<banister`sleep> my timezone is different to yours :)
<lectrick> banister`sleep: it's 11AM EST here, so I didn't know :)
<lectrick> banister`sleep: where in our pale blue dot are you?
<banister`sleep> lectrick: im in europe :)
<lectrick> i'm german, firstborn american.
<lectrick> and that reminds me, I am overduedue to visit relatives (I speak pretty fluently)
<lectrick> yes. overduedue. (wtf was that? sigh)
sonda has quit [Ping timeout: 264 seconds]
heliumsocket has joined #ruby
chichou has joined #ruby
sambao21 has joined #ruby
theRoUS has quit [Ping timeout: 256 seconds]
apeiros_ has quit [Remote host closed the connection]
aLeSD_ has quit [Ping timeout: 272 seconds]
<Squarepy> autocorrect?
sayan has quit [Ping timeout: 258 seconds]
chichouw has quit [Ping timeout: 260 seconds]
apeiros_ has joined #ruby
pehlert has left #ruby [#ruby]
danneu has joined #ruby
JMcAfreak has joined #ruby
sonda has joined #ruby
<Squarepy> speaking of coffee
rh1n0 has joined #ruby
aLeSD_ has joined #ruby
sayan has joined #ruby
god_of_all_texas has quit [Remote host closed the connection]
chichouw has joined #ruby
ninjanoise has quit [Remote host closed the connection]
sambao21 has quit [Ping timeout: 252 seconds]
chichou has quit [Ping timeout: 264 seconds]
kpshek has joined #ruby
rh1n0 has quit [Client Quit]
joshman_ has joined #ruby
bashdy has joined #ruby
F1skr has joined #ruby
sambao21 has joined #ruby
veer has joined #ruby
danneu has quit [Quit: WeeChat 0.3.8]
lethjakman has joined #ruby
NiteRain has joined #ruby
bashdy has quit [Client Quit]
kn330 has quit [Quit: Ex-Chat]
sambao21_ has joined #ruby
alex__c2022 has joined #ruby
Goles has joined #ruby
chichou has joined #ruby
dallasm has quit [Remote host closed the connection]
_maes_ has quit [Ping timeout: 258 seconds]
entr0py_ has joined #ruby
vlad_starkov has quit [Remote host closed the connection]
sambao21 has quit [Ping timeout: 252 seconds]
markalanevans has joined #ruby
chichouw has quit [Ping timeout: 252 seconds]
pyrac has quit [Ping timeout: 258 seconds]
jpcamara has quit [Quit: jpcamara]
biff_tannen has quit [Read error: Connection reset by peer]
veer has quit [Ping timeout: 260 seconds]
`brendan has joined #ruby
<lectrick> Squarepy: heh, no, probably just tired here
<lectrick> slept 2 hrs due to... issues
samphippen has quit [Quit: Computer has gone to sleep.]
veer has joined #ruby
Fuzai has quit [Ping timeout: 255 seconds]
sambao21_ has quit [Ping timeout: 260 seconds]
<Squarepy> so sleep is overdue ;)
hbpoison has joined #ruby
hbpoison has quit [Read error: Connection reset by peer]
rh1n0 has joined #ruby
monkegjinni has quit [Remote host closed the connection]
chichouw has joined #ruby
hbpoison has joined #ruby
jpcamara has joined #ruby
whoopzie has quit [Quit: Page closed]
ckrailo has joined #ruby
sambao21 has joined #ruby
chichou has quit [Ping timeout: 260 seconds]
Asher has joined #ruby
cupakromer has left #ruby [#ruby]
v0yager has quit [Remote host closed the connection]
cantonic has quit [Quit: cantonic]
vlad_starkov has joined #ruby
<ArchBeOS> does win32ole Excel calls work for Libre Office?
wmoxam_ has joined #ruby
pi3r has quit [Ping timeout: 258 seconds]
dhruvasagar has quit [Remote host closed the connection]
wmoxam_ has quit [Client Quit]
dhruvasagar has joined #ruby
ozgura has quit [Remote host closed the connection]
Mon_Ouie has joined #ruby
theRoUS has joined #ruby
pi3r has joined #ruby
wreckimn1 has quit [Ping timeout: 252 seconds]
rbennacer has joined #ruby
<rbennacer> hello
zigomir has quit [Quit: zigomir]
aaronmcadam has joined #ruby
<rbennacer> is there a gem that can sanitize a filename, ex: "dd_____Fede.jpg" =>"dd_fede.jpg"
<rbennacer> ?
ozgura has joined #ruby
chrishough has joined #ruby
<hoelzro> that sounds very specific
banister`sleep has quit [Read error: Connection reset by peer]
<lectrick> rbennacer: that doesn't really sound like a generic "sanitize"
<ArchBeOS> rbennacer: loop through the string, if first _ pass, then concat the rest without _
banister`sleep has joined #ruby
Davey has quit [Quit: Textual IRC Client: http://www.textualapp.com/]
tspike has joined #ruby
<ArchBeOS> loop through the characters of the string * rbennacer
<rbennacer> lectrick, what would be a generic sanitize?
j^2 has joined #ruby
Takehiro has joined #ruby
<lectrick> rbennacer: well, you tell me. It really depends on what you need
<ArchBeOS> rbennacer: "dd_____Fede.jpg".split("").each do |x|
<Spooner> rbennacer, filename.gsub(/_+/, "_")
kennyvb has quit [Ping timeout: 260 seconds]
<ArchBeOS> or what Spooner said
aganov has quit [Quit: aganov]
wreckimn1 has joined #ruby
mikurubeam has joined #ruby
<lectrick> rbennacer: An example of one would be "strip out all non-alphanumeric characters, change all runs of underscore to 1 underscore," etc. But that's like, a llne of Ruby. No gem necessary
<rbennacer> ok ok sounds good
chichou has joined #ruby
<rbennacer> i jsut wanted to know if there is a conventional way to format filenames
<rbennacer> thank you for your help guys
<lectrick> rbennacer: there probably is, but "reducing runs of underscore to 1 underscore" would not be part of that. it would be more about changing things like 'ü' to 'u'
<rbennacer> like getting rid of unicode characters
<rbennacer> ?
vickaita has quit [Ping timeout: 240 seconds]
<lectrick> yeah
<rbennacer> ok
chichouw has quit [Ping timeout: 264 seconds]
sambao21 has quit [Ping timeout: 252 seconds]
<lectrick> or at least changing them to an OS-agnostic encoding
<hoelzro> hehe
<hoelzro> that's fun
<lectrick> for example, I have a mysql database called "test-metrics" and I noticed that it names the corresponding directory "test@002dmetrics"
<hoelzro> even if th encoding is the same, you also have to consider the underlying filesystem's normalization rules
<lectrick> rbennacer: like many things in programming, lots of simple questions without simple answers lol
ZeiP has joined #ruby
<lectrick> SPECIFIC questions have simple answers tho
csmrfx has left #ruby ["Ciaocific!"]
<ZeiP> Hi. I need to get everything except the first character of a string
<rbennacer> :)
<ZeiP> In PHP that is substring('something', 1), but in Ruby 'something'[1] doesn't do the same thing
<ZeiP> How can I achieve that?
chichouw has joined #ruby
<lectrick> ZeiP: 'abc'[1..-1]
<lectrick> #=> 'bc'
<ZeiP> lectrick, that's it, thank you very much1
<ZeiP> s/1/!/
<lectrick> ZeiP: np. you're indexing by a range object, and negative numbers count backwards from the end of the string
<wmoxam> "abc"[1] #=> "b"
<wmoxam> :p
<ZeiP> Yep. I tried 'something'[1, -1] per some documentation, but that didn't work
heliumsocket has quit [Quit: heliumsocket]
<lectrick> yeah wmoxam that's what he was confused about
<ZeiP> I'm still quite a noob with Ruby :)
<lectrick> ZeiP: If you're still comparing things to php, then yes u are haha
chichou has quit [Ping timeout: 260 seconds]
<ZeiP> lectrick, yep, I know... That's what I've got to work with, unfortunately
<lectrick> it's ok
<wmoxam> lectrick: oh, the php method doesn't do that?
<wmoxam> oh right, php
<ZeiP> (I'm currently doing a migration script from Drupal to Wordpress, which are both PHP... Still decided to do the migration script with Ruby :D )
<lectrick> sarcasm? :)
<wmoxam> "principle of maximum surprise"
vlad_starkov has quit [Remote host closed the connection]
<lectrick> ZeiP: ugh, i hate drupal
Davey has joined #ruby
<lectrick> wmoxam: lol
<ZeiP> I don't. I do hate PHP and Wordpress, though.
DrShoggoth has quit [Ping timeout: 252 seconds]
Ontolog has joined #ruby
nomenkun_ has quit [Ping timeout: 264 seconds]
<lectrick> drupal: pray you don't have to do something really custom, or you're fucked. Oh also, pray you don't need to back up the database, or even look at its schema
<ZeiP> :D
<JonnieCache> lectrick: haha
xcv has quit [Remote host closed the connection]
<JonnieCache> what stops you from backing up the db?
<ZeiP> It's not that bad, once you get the hang of it
<ZeiP> Of course, that takes quite a bit of time...
dhruvasagar has quit [Ping timeout: 252 seconds]
<lectrick> ZeiP: Spent a year in it rebuilding out bostonpublicschools.org. I don't miss that year one bit.
<JonnieCache> drupal seemed ok when i had to use it a few years ago. for a php cms that is
<ZeiP> JonnieCache, exactly. You can't expect much, and for that I think Drupal does a good-enough job
_emptymag00 has quit [Ping timeout: 260 seconds]
<ZeiP> I've had to work with much worse PHP thingies
<lectrick> JonnieCache: For someone who is used to things like: code management. talking directly to databases. being able to customize anything. it is pain
chichou has joined #ruby
baroquebobcat has joined #ruby
rbennacer has left #ruby ["Leaving"]
banister`sleep has quit [Remote host closed the connection]
<lectrick> ZeiP: I'm sorry to hear that lol
<ZeiP> Oh yeah, you don't want to touch the database directly. That's rule number one :D
<lectrick> ZeiP: Ruby web frameworks are fuckin' sweet. (There's more than just Rails.)
maletor has joined #ruby
dhruvasagar has joined #ruby
<ZeiP> I've tried Rails a few years ago, and it did seem fun
Davey has quit [Client Quit]
<lectrick> But you gotta grasp the OO, and the MVC, and a few other concepts first, that PHP pretty much butchers
<ZeiP> Currently I'm leaning more towards Django (mainly because of the nice admin UI)
onerope has joined #ruby
chichouw has quit [Ping timeout: 252 seconds]
pepper_chico has joined #ruby
<lectrick> Meh, I can bang out an admin UI in a couple hours
dustint has quit [Quit: Leaving]
<lectrick> There's also gems for that
<ZeiP> Hmh
<ZeiP> I should perhaps check it out a bit, Django isn't so wonderful either so I might as well explore a bit more
<lectrick> But I'm not a CMS guy. I'm a testing nazi and a generic back-end developer
onerope has left #ruby [#ruby]
<JonnieCache> rails aint all that these days
DrShoggoth has joined #ruby
<lectrick> JonnieCache: There's others now, to play with
pr0t has joined #ruby
<pr0t> morning, I am looking to learn Ruby, could anyone recommend any GREAT books?
<lectrick> Rails is still a reasonable start, but it has a learning curve (with ruby). The view from the top of that mountain is great tho
<lectrick> pr0t: pickaxe
<lectrick> (is pickaxe still The Thing™?)
vlad_starkov has joined #ruby
vlad_starkov has quit [Remote host closed the connection]
iron_dude has joined #ruby
<JonnieCache> lectrick: the view from the top is an excellent way of describing it
hbpoison has quit [Ping timeout: 256 seconds]
Xeago has joined #ruby
<JonnieCache> rails will give you a pretty deep understanding of all the issues in modern webdev
hbpoison has joined #ruby
<JonnieCache> its just not necessarily the best way to practice it, once you do know how to do it
chichouw has joined #ruby
<lectrick> JonnieCache: It seems like overkill for a lot of things, and it sometimes abstracts out too much, but I don't regret lessons learned
mikepack has joined #ruby
<lectrick> I have things I'd tell brand new rails developers for example
braoru has quit [Quit: Leaving]
kennyvb has joined #ruby
<JonnieCache> yeah i agree
<JonnieCache> i learned so much through rails
<lectrick> like "write many unit tests. learn to write them so they run instantly. if you think you have 'no time' to write tests, you're not grokking it."
<JonnieCache> modern testing, proper use of git, proper use of library management etc
<lectrick> i wish i knew then what I know now
<lectrick> but that goes for everything
chichou has quit [Ping timeout: 260 seconds]
mikecmpbll has quit [Quit: ["Textual IRC Client: www.textualapp.com"]]
arturaz has quit [Remote host closed the connection]
w400z has joined #ruby
pr0t has quit [Client Quit]
jgrevich has joined #ruby
generalissimo has joined #ruby
<lectrick> I am on a team in charge of refactoring our test code... fun stuff (no, really. for some reason.)
<lectrick> of course, refactoring test code often means refactoring the objects under test, so i'm basically on a team doing a slow-rewrite of the app lol
<JonnieCache> you lucky bastard
<lectrick> i don't mind it. there are far, far less interesting jobs
<JonnieCache> i wasnt joking
<lectrick> :)
<JonnieCache> thats what every programmer wants to do
<JonnieCache> surely
<lectrick> :)
<lectrick> oh i had to work to get here, believe me
chichou has joined #ruby
<JonnieCache> what, work to convince people it was a good idea
philcrissman has joined #ruby
DrShoggoth has quit [Ping timeout: 264 seconds]
<lectrick> no, they picked a crack alpha team of coders to do this task and initially I was not picked
mulinux has joined #ruby
<lectrick> I proved myself and kept asking :) (also a certain key drunken conversation with the boss' boss probably helped, and someone on the team "demanding" that I join it)
hbpoison has quit [Ping timeout: 246 seconds]
chichouw has quit [Ping timeout: 245 seconds]
d2dchat has joined #ruby
mmitchell has quit [Ping timeout: 260 seconds]
mmitchel_ has joined #ruby
marr has joined #ruby
<lectrick> i'm not complaining. i work at a fairly small company owned by a very large company and there's a combination of startup-type interesting problems and overly-adequate pay. the large company is extremely hands-off. it's great. not gonna lie. but it wasn't always like this
<lectrick> The way I proved myself is, I solved a bug that was literally 2 years old and was Bug #1 in their bug tracker
Morkel has quit [Quit: Morkel]
sandGorgon has joined #ruby
<lectrick> I spent 2 months on the bug and was only able to add tools to mitigate and track it. Then i stepped away. A couple months later, that fucking bug was staring me right in the face, it was the funniest thing
mikecmpbll has joined #ruby
vlad_starkov has joined #ruby
<lectrick> it pissed off a lot of customers because it resulted in random lost sessions
vlad_starkov has quit [Remote host closed the connection]
s1n4 has joined #ruby
ananthakumaran has joined #ruby
_emptymag00 has joined #ruby
yashshah__ has quit [Read error: Connection reset by peer]
yashshah has joined #ruby
<lectrick> it's just funny that one day when not even looking for the bug, in fact i was on something completely unrelated, it was like "O HAI! I IZ IN YOUR CODEZ, FUCKIN UP YOUR HASHES"
hbpoison has joined #ruby
Ontolog has quit [Remote host closed the connection]
havenwood has joined #ruby
<lectrick> It was a Rack middleware issue, for the record
philcrissman has quit [Remote host closed the connection]
vlad_starkov has joined #ruby
<lectrick> I'm sure you guys have had that moment when a bug you have been stuck on for a long time suddenly drop-kicks you in the face
ozgura has quit [Read error: Connection reset by peer]
ozgura has joined #ruby
<lectrick> and you jump up and go "HOLY SH**!" Well, I do, anyway. Glorious moments of insight, those.
Maniacal has joined #ruby
<breakingthings> lectrick: i'm pretty sure I would indeed jump up and go "HOLY SH**!" if a giant bug tried to drop-kick me in the face, yes.
dhruvasagar has quit [Ping timeout: 240 seconds]
vlad_starkov has quit [Remote host closed the connection]
chichou has quit [Remote host closed the connection]
dhruvasagar has joined #ruby
mikeg has quit [Ping timeout: 256 seconds]
cantonic has joined #ruby
wmoxam has quit [Ping timeout: 264 seconds]
mmitchel_ has quit [Ping timeout: 264 seconds]
vlad_starkov has joined #ruby
bean__ has joined #ruby
DrShoggoth has joined #ruby
wreckimn1 has quit [Read error: Operation timed out]
banister`sleep has joined #ruby
v0yager has joined #ruby
maletor has quit [Quit: Computer has gone to sleep.]
tylersmith has joined #ruby
endzyme has joined #ruby
apoch632 has joined #ruby
Maniacal has quit [Quit: Leaving]
Virunga has quit [Remote host closed the connection]
Davey has joined #ruby
binaryplease has joined #ruby
swingha has joined #ruby
predator217 has quit [Ping timeout: 252 seconds]
Takehiro has quit [Read error: Connection reset by peer]
wreckimn1 has joined #ruby
predator117 has joined #ruby
serhart has joined #ruby
Voodoofish430 has joined #ruby
etcetera has joined #ruby
etcetera has quit [Client Quit]
vlad_starkov has quit [Remote host closed the connection]
vlad_starkov has joined #ruby
ozgura has quit [Read error: Connection reset by peer]
vlad_starkov has quit [Remote host closed the connection]
veer has quit [Ping timeout: 260 seconds]
ozgura has joined #ruby
spider-mario has joined #ruby
maletor has joined #ruby
axhlf has joined #ruby
danneu has joined #ruby
Xeago has quit [Remote host closed the connection]
axl__ has joined #ruby
jpcamara has quit [Quit: jpcamara]
_nitti has quit [Remote host closed the connection]
cantonic has quit [Quit: cantonic]
_nitti has joined #ruby
vlad_starkov has joined #ruby
vlad_starkov has quit [Remote host closed the connection]
axl_ has quit [Ping timeout: 264 seconds]
axl__ is now known as axl_
khismetix has joined #ruby
rippa has joined #ruby
chichou has joined #ruby
vlad_starkov has joined #ruby
psyprus has quit [Changing host]
psyprus has joined #ruby
ferdev has quit [Ping timeout: 258 seconds]
Wardje has joined #ruby
KellyLSB_missing is now known as KellyLSB
<Wardje> Does Digest::SHA2.hexdigest have an equivalent in PHP?
pi3r has quit [Quit: Leaving]
dmiller2 has quit [Ping timeout: 258 seconds]
mockra has joined #ruby
<banister`sleep> Wardje: ask in #php
linoge has quit [Ping timeout: 252 seconds]
ryannielson has joined #ruby
yacks has quit [Quit: Leaving]
<Wardje> oki
zeade has joined #ruby
danman has joined #ruby
j^2 has quit [Quit: for i in `/names` ; do adios $i; done]
j^2 has joined #ruby
pyrac has joined #ruby
danneu has quit [Quit: WeeChat 0.3.8]
drale2k has quit [Quit: Leaving...]
mpfundstein has quit [Remote host closed the connection]
ecarey has joined #ruby
ecarey has left #ruby [#ruby]
pepper_chico has quit [Quit: Computer has gone to sleep.]
yacks has joined #ruby
cilquirm has quit [Quit: cilquirm]
s00pcan_ has joined #ruby
ferdev has joined #ruby
Davey has quit [Quit: Computer has gone to sleep.]
bigoldrock has joined #ruby
<lectrick> Is there any cost to including a module twice in the same class?
zehrizzatti has joined #ruby
<banister`sleep> lectrick: it gets ignored the second time
<banister`sleep> well, not completely ignored, if the module included any other modules subsequently they get included :)
Wardje has left #ruby [#ruby]
<lectrick> banister`sleep: so I don't have to bother checking for self.class.includes?(module) ?
<banister`sleep> no
<banister`sleep> it's just ignored the second time
<lectrick> ok
gestahlt has quit [Read error: Connection reset by peer]
tylersmith has quit [Quit: tylersmith]
jonathanwallace has quit [Quit: WeeChat 0.3.9.2]
mmitchell has joined #ruby
gestahlt has joined #ruby
pepper_chico has joined #ruby
carlyle has joined #ruby
chichou has quit [Remote host closed the connection]
arturaz has joined #ruby
linoge has joined #ruby
deric_skibotn has joined #ruby
mikecmpbll has quit [Quit: ["Textual IRC Client: www.textualapp.com"]]
dawkirst has quit [Ping timeout: 245 seconds]
deric_skibotn has quit [Client Quit]
kornnflake_zzz is now known as kornnflake
twoism has joined #ruby
markalanevans has quit [Quit: markalanevans]
gestahlt has quit [Client Quit]
KellyLSB is now known as KellyLSB_missing
Davey has joined #ruby
binaryplease has quit [Quit: WeeChat 0.4.0]
<lectrick> banister`sleep: So extending an object instance with a module basically lets you monkeypatch it with the module's methods? Would this assist with testing since you could overwrite other instance's methods with fakes for the sake of testing?
<Spooner> lectrick, Use a mocking framework for that.
dustint has joined #ruby
vickaita has joined #ruby
<lectrick> Spooner: I know, mocha etc. Just wondering.
<Spooner> lectrick, #include puts the module's method below the existing ones. You need #prepend to do what you are saying (from Ruby 2.0).
artofraw has quit [Remote host closed the connection]
cantonic has joined #ruby
<lectrick> Spooner: Well, I just tried extending an object instance with a module, and I believe the module's version of the methods get called instead after that
piotr has quit [Ping timeout: 258 seconds]
<Spooner> They do, but not if the object already implements that method. The included module methods would be called via super() in the original methods.
BizarreCake has joined #ruby
<banister`sleep> Spooner: he's talking about extend
<lectrick> Simplest test case: module B; def a; 'a from b'; end; end; class C; def a; 'a from c'; end; end; c = C.new; c.extend(B); c.a #=> "a from b"
<banister`sleep> class Hello; def hi; puts "hi"; end; module Pig; def hi; puts "baby"; end; end; h = Hello.new; h.hi #=> "hi"; h.extend Pig; h.hi #=> "baby"
bricker is now known as bricker`LA
binaryplease has joined #ruby
<lectrick> yep same
<banister`sleep> unless by 'object implementing it' u mean a singleton method on the object
yankeefan04 has quit [Remote host closed the connection]
<banister`sleep> in which case yeah the singleon method gets precedence
Appineer has quit [Remote host closed the connection]
bean__ has quit [Quit: Computer has gone to sleep.]
<banister`sleep> but the extended module methods will get precedence over methods from the class of the object
<Spooner> Oh right, I very rarely use extend like that. Sorry.
<lectrick> yeah, so i was thinking, on-the-fly ephemeral monkeypatch. for tests, etc
<Spooner> However, it doesn't work for tests, since you can't remove them again ;)
_maes_ has joined #ruby
<lectrick> Spooner: You recreate the instance.
<lectrick> The instance just lives for the one test.
<Spooner> Depends on the test, but mostly yes.
<Spooner> If creating the instance was expensive, you might re-use it.
<lectrick> Yeah, that depends.
dawkirst has joined #ruby
_nitti has quit [Remote host closed the connection]
davetherat has quit [Remote host closed the connection]
davetherat has joined #ruby
<Spooner> You would just replace the methods in a mocking test and put them back again after. Less intrusive than permanently altering the object.
apod has quit []
eAlchemist has joined #ruby
jrajav has quit [Quit: phunq, sandwich store loop, WHAT NO UNIVERSE]
sambao21_ has joined #ruby
xbob has joined #ruby
deadalus has quit [Ping timeout: 245 seconds]
Stilo has quit [Quit: Textual IRC Client: www.textualapp.com]
razibog1 has quit [Ping timeout: 245 seconds]
_nitti has joined #ruby
binaryplease has quit [Quit: WeeChat 0.4.0]
banister`sleep has quit [Ping timeout: 245 seconds]
stkowski has joined #ruby
wreckimn1 has quit [Quit: WeeChat 0.3.9]
carloslopes has quit [Remote host closed the connection]
eAlchemist has quit [Remote host closed the connection]
douglarek__ has quit [Ping timeout: 255 seconds]
18WAC24XW has joined #ruby
theRoUS has quit [Quit: Leaving]
Matip has quit [Ping timeout: 258 seconds]
ML_BMT has quit [Ping timeout: 256 seconds]
tomzx_mac has quit [Ping timeout: 258 seconds]
vlad_starkov has quit [Remote host closed the connection]
banister`sleep has joined #ruby
<banister`sleep> lectrick: u like metaprogramming stuff dont u
sambao21_ has quit [Ping timeout: 252 seconds]
linoge has quit [Read error: Connection reset by peer]
KellyLSB_missing is now known as KellyLSB
drale2k has joined #ruby
linoge has joined #ruby
jbueza has joined #ruby
wmoxam has joined #ruby
carloslopes has joined #ruby
Ontolog has joined #ruby
markalanevans has joined #ruby
breakingthings has quit []
nga4 has joined #ruby
markalanevans has quit [Remote host closed the connection]
deadalus has joined #ruby
w400z has quit []
AndChat| has joined #ruby
joebew has quit [Ping timeout: 260 seconds]
hoelzro is now known as hoelzro|away
Banistergalaxy has quit [Ping timeout: 255 seconds]
markalanevans has joined #ruby
chrishough has quit [Quit: chrishough]
slainer68 has quit [Read error: Connection reset by peer]
mulinux has quit [Quit: mulinux]
slainer68 has joined #ruby
jrajav has joined #ruby
arturaz has quit [Ping timeout: 245 seconds]
ozgura has quit [Remote host closed the connection]
ofcan has quit [Quit: Lost terminal]
beneggett has joined #ruby
grayson has quit [Quit: Computer has gone to sleep.]
rupee has joined #ruby
the_jeebster has joined #ruby
sepp2k1 has joined #ruby
IrishGringo has joined #ruby
stef_204 has joined #ruby
carlyle has quit [Remote host closed the connection]
wmoxam has joined #ruby
dawkirst has quit [Ping timeout: 245 seconds]
sepp2k has quit [Ping timeout: 258 seconds]
j^2 has quit [Quit: for i in `/names` ; do adios $i; done]
dhruvasagar has quit [Ping timeout: 264 seconds]
devoper has quit [Remote host closed the connection]
j^2 has joined #ruby
floyd has joined #ruby
Ontolog_ has joined #ruby
devoper has joined #ruby
Turkishviking has joined #ruby
mpfundstein has joined #ruby
eladgariany has joined #ruby
<Turkishviking> hi all
devdazed has quit [Quit: Bye]
jmeeuwen__ has left #ruby ["Leaving"]
chrishough has joined #ruby
mrsolo has joined #ruby
mg^ has quit [Quit: Leaving]
jmeeuwen has joined #ruby
drale2k has quit [Ping timeout: 256 seconds]
sandGorgon has quit [Ping timeout: 260 seconds]
hashmal has quit [Quit: Computer has gone to sleep.]
bricker`LA has quit [Ping timeout: 276 seconds]
drumsrgr1 has joined #ruby
Ontolog has quit [Ping timeout: 252 seconds]
banister`sleep has quit [Remote host closed the connection]
skattyadz has quit [Quit: skattyadz]
eladgariany has left #ruby [#ruby]
Vainoharhainen has quit [Quit: Leaving...]
<Turkishviking> I wana code in ruby, I come from python, what is for you the best IDE ?? (for linux)
banjara has joined #ruby
<marwinism> Ruby for web?
drumsrgr8forn8 has quit [Read error: Operation timed out]
mikurubeam has quit [Ping timeout: 260 seconds]
<marwinism> Aptana or Eclipse is what I use. Or just Vim ^^
whitedawg has quit [Quit: Leaving.]
bradleyprice has joined #ruby
mikurubeam has joined #ruby
b26 has joined #ruby
devdazed has joined #ruby
`brendan has quit [Ping timeout: 240 seconds]
<Turkishviking> I don't know what I want to do for now, I just want to try it, but i code for calculus, web crawler , servers in python, just wana do the same
joofsh has joined #ruby
<Turkishviking> aptana, ok, fine, i like it
monban_ is now known as monban
Tricon has joined #ruby
pyrac has quit [Quit: pyrac]
<marwinism> Aptana is more for web, but I guess it will do the trick
<Turkishviking> is there framework for web crawlers?
ahammond has joined #ruby
<Turkishviking> ok, thanks
beiter has joined #ruby
<Turkishviking> is there any IDE with auto-completion?
veer has joined #ruby
<Turkishviking> easier t learn ;)
ryanf has quit [Quit: leaving]
<marwinism> No, it's not.
<Turkishviking> ok thanks man
karthikselva has joined #ruby
drale2k has joined #ruby
kornnflake is now known as kornnflake_zzz
aaronmcadam has quit [Quit: Leaving...]
dawkirst has joined #ruby
sayan has quit [Ping timeout: 252 seconds]
Vainoharhainen has joined #ruby
Vainoharhainen has quit [Client Quit]
swex has joined #ruby
_nitti has quit [Remote host closed the connection]
tish has joined #ruby
slainer68 has quit [Remote host closed the connection]
entr0py_ has quit [Remote host closed the connection]
veer has quit [Ping timeout: 264 seconds]
drale2k has quit [Quit: Leaving...]
_bart has joined #ruby
banister`sleep has joined #ruby
dhruvasagar has joined #ruby
<lectrick> banister`sleep: yep, I do re: metaprogramming (sorry, was eating lunch)
sk87 has quit [Quit: sk87]
_bart has quit [Client Quit]
hbpoison has quit [Remote host closed the connection]
hbpoison has joined #ruby
Atrophius has joined #ruby
<floyd> anyone some experience with dnsruby? DNSruby is doing my query just fine, but the server will answer in two DNS packets. DNSruby's reply.answer only has the values of the first one. I have a 20 lines example if someone wants to try
swex has quit [Remote host closed the connection]
aleph-null has joined #ruby
pyrac has joined #ruby
linoge has quit [Read error: Connection reset by peer]
linoge has joined #ruby
sayan has joined #ruby
18WAC24XW has quit [Remote host closed the connection]
eAlchemi_ has joined #ruby
eAlchemi_ has quit [Read error: Connection reset by peer]
whowantstolivef1 has joined #ruby
eAlchem__ has joined #ruby
joebew has joined #ruby
stef_204 has quit [Quit: quitting]
s00pcan_ has joined #ruby
s00pcan_ has quit [Client Quit]
dmiller2 has joined #ruby
<floyd> I mean this: https://pastee.org/868dr
markisonfire has joined #ruby
rupee has quit [Read error: Connection reset by peer]
rh1n0 has quit [Quit: -- I'm out --]
s00pcan_ has joined #ruby
s00pcan_ has quit [Client Quit]
eAlchem__ has quit [Ping timeout: 264 seconds]
s00pcan_ has joined #ruby
marcdel has joined #ruby
sandGorgon has joined #ruby
haxrbyte has joined #ruby
dawkirst has quit [Ping timeout: 276 seconds]
swex has joined #ruby
banister`sleep has quit [Read error: Connection reset by peer]
s00pcan_ has quit [Client Quit]
banister`sleep has joined #ruby
anonymuse has joined #ruby
axhlf has quit [Remote host closed the connection]
niklasb has quit [Ping timeout: 246 seconds]
<becom33> whats the best way to save a file
<becom33> ?
<_br_> becom33: File.open( "blah", "w" ) { |f| f.write( content ) } ?
<oz> :w
forrest has joined #ruby
<_br_> oz: E123: Not an IRC command ^^
<oz> oh, you meant in Ruby :)
sayan has quit [Read error: Connection reset by peer]
philcrissman has joined #ruby
thinkclay has joined #ruby
bigkevmcd has quit [Quit: outta here]
araujo has quit [Read error: Connection reset by peer]
banjara has quit [Quit: Leaving.]
Virunga has joined #ruby
banjara has joined #ruby
araujo has joined #ruby
avelldiroll has quit [Quit: server maintenance]
banjara has quit [Client Quit]
F1skr has quit [Quit: WeeChat 0.4.0]
<_br_> floyd: Did you look into the documentation regarding this? Maybe there is another field which has the other values?
banjara has joined #ruby
girija has quit [Ping timeout: 246 seconds]
jlebrech has quit [Quit: Leaving]
marr has quit []
bradhe has joined #ruby
cilquirm has joined #ruby
<floyd> _br_: I'm searching. But couldn't find anything yet, that's why I'm asking
Catbuntu has joined #ruby
tish has quit [Quit: Leaving.]
yashshah has quit [Read error: Connection reset by peer]
matchaw has quit [Read error: Connection reset by peer]
eldariof has joined #ruby
kornnflake_zzz is now known as kornnflake
yashshah has joined #ruby
avelldiroll has joined #ruby
<floyd> _br_: the response is of the type Message, and I'm printing the answer variable: http://dnsruby.rubyforge.org/classes/Dnsruby/Message.html
endzyme has quit [Remote host closed the connection]
three18ti has quit [Ping timeout: 272 seconds]
hackeron has joined #ruby
<Spooner> floyd, You can use File.write("blah", content) # Ruby 1.9+
dawkirst has joined #ruby
c0rn has joined #ruby
matchaw has joined #ruby
iambic has quit [Quit: leaving]
skattyadz has joined #ruby
three18ti has joined #ruby
philcrissman has quit [Remote host closed the connection]
<Spooner> Oops, that to becom33, not floyd
<floyd> Spooner: ;)
geekbri has quit [Remote host closed the connection]
atyz has joined #ruby
_nitti_ has joined #ruby
Liquid-- has joined #ruby
hybris has quit [Quit: Leaving]
j^2 has quit [Quit: for i in `/names` ; do adios $i; done]
alvaro_o has joined #ruby
rdark has quit [Quit: leaving]
j^2 has joined #ruby
Catbuntu has quit [Quit: Leaving]
agjacome has joined #ruby
maxmanders has quit [Quit: Computer has gone to sleep.]
xardas has joined #ruby
haxrbyte has quit [Ping timeout: 246 seconds]
browndawg has quit [Read error: Connection reset by peer]
rdk has joined #ruby
geekbri has joined #ruby
carlyle has joined #ruby
marcdel has quit []
theRoUS has joined #ruby
theRoUS has quit [Changing host]
theRoUS has joined #ruby
c0rn has quit [Ping timeout: 240 seconds]
<Spooner> floyd, Not helpful for your problem, but it is usual to use the implicit hash in a method, not explicit, for options: Resolver.new(:nameserver => [nameserver])
Uranio has quit [Quit: while you reading this, a kitty dies]
axhlf has joined #ruby
Mon_Ouie has quit [Ping timeout: 256 seconds]
dawkirst has quit [Ping timeout: 255 seconds]
c0rn has joined #ruby
tenmilestereo has joined #ruby
Catbuntu has joined #ruby
<floyd> Spooner: Thx. It's my first ruby programm, oh-oh, no, don't ask what I'm usually programming ;) . And it was like that in the examples :)
Eldariof-ru has joined #ruby
<Spooner> floyd, Everyone has to move past PHP one day ;)
apok has joined #ruby
woolite64__ has quit [Read error: Connection reset by peer]
<floyd> Spooner: you mean python ;)
sayan has joined #ruby
tspike has quit [Ping timeout: 252 seconds]
woolite64__ has joined #ruby
_nitti_ has quit [Ping timeout: 276 seconds]
<Spooner> You could try send_message or using EventMachine and see if they are giving you the proper response.
<Spooner> floyd, Oh, fair enough. I actually moved to Python from Ruby recently, but that was for work, not choice :D
etcetera has joined #ruby
<floyd> Spooner: it was more like I wanted to try something new
<Spooner> I'll also point out that Resolver.new(nameserver: [nameserver]) is both a more modern way to write that.
<Spooner> -both
eldariof has quit [Ping timeout: 256 seconds]
woolite64_ has joined #ruby
carraroj has quit [Quit: Konversation terminated!]
<joebew> hi guys
<Spooner> floyd, I get 1481 characters in the #answer. Presumably just one packet?
<joebew> I'm trying to install rspec via gem, in archlinu
<joebew> *archlinux
<joebew> anyone knows if I have to set a particular environment variable?
<Spooner> Nope.
<Spooner> What makes you think that?
poikon has quit [Remote host closed the connection]
karthikselva has quit [Ping timeout: 245 seconds]
<joebew> I get an error when use rspec
s00pcan_ has joined #ruby
<Spooner> Would you like to be a little more specific?
<joebew> ... cannot load such file -- /home/joe/spec ...
<Spooner> Are you using Ruby 1.8.7?
brianpWins has joined #ruby
<joebew> when I execute the command "rspec"
<joebew> no
<joebew> the 1.9.3
<joebew> rspec 2.11
woolite64__ has quit [Ping timeout: 256 seconds]
<floyd> Spooner: yes, that's exactly the first packet. But on the other hand it's strange, I mean there is no DNS header field for "another packet coming" in the first packet…. but if you try "dig axfr . @192.228.79.201" on the console, you get everything
carloslopes has quit [Remote host closed the connection]
ferdev_ has joined #ruby
<Spooner> You should use require_relative in 1.9 rather than require, when you are loading files. In 1.8 you can get away with it (it assumes a prefix of ./ )
ferdev has quit [Ping timeout: 245 seconds]
ferdev_ is now known as ferdev
Guest43410 has joined #ruby
<Guest43410> Hi there
<Spooner> floyd, *shrugs*
<nga4> any use rvm and rbx to do memory profiling on a rails application?
<nga4> *anyone
<Spooner> nga4, try #rubyonrails
<nga4> will no
<nga4> will *do
<nga4> not my day
s00pcan_ has quit [Client Quit]
<Guest43410> anyone have experience with the book "practical ruby projects"?
<rdk> How protected works in ruby? Can somebody explain me this simple code why it will not work and what needs to be done to execute that? https://gist.github.com/rohitkadam19/5171855
<Guest43410> i've run into a version conflict with the code and i can't sort it out (I'm new)
adambeynon has quit [Quit: ["Textual IRC Client: www.textualapp.com"]]
c0rn has quit [Quit: Computer has gone to sleep.]
<Spooner> rdk, protected means the method can only be called from inside the instance or from another instance of that same class.
niklasb has joined #ruby
<Spooner> rdk, Needs to be public (which is the default) to do what you want to do.
gyre008 has joined #ruby
dawkirst has joined #ruby
<Spooner> Guest43354, You need to give us something to go on!
skattyadz has quit [Ping timeout: 255 seconds]
aedorn has quit [Quit: Leaving]
karthikselva has joined #ruby
ferdev has quit [Read error: Operation timed out]
<Spooner> Guest43354, Maybe post some code or error message (if more than a couple of lines, paste it to gist.github.com)
markalanevans has quit [Quit: markalanevans]
ferdev has joined #ruby
<Guest43410> working on it, sorry i figured i'd ask broadly in case anyone knew right away
<Spooner> I'm guessing there is lots of code in that book...
<Guest43410> a bit :)
Neomex has joined #ruby
Neomex has quit [Client Quit]
senayar has joined #ruby
alvaro_o has quit [Quit: Ex-Chat]
skattyadz has joined #ruby
gyre008 has quit [Remote host closed the connection]
iambic has joined #ruby
mikurubeam has quit [Ping timeout: 264 seconds]
<Spooner> And you might consider giving yourself a "/nick newname" so that I can autocomplete your name without hitting all the other guests :O
aedorn has joined #ruby
ML_BMT has joined #ruby
Jortuny has joined #ruby
<rdk> Spooner: so you mean this gist will work for me https://gist.github.com/rohitkadam19/5171855 , I have updated the same
marcdel has joined #ruby
<Spooner> rdk, Yes, that is correct.
Zolo has joined #ruby
Zolo has quit [Remote host closed the connection]
<rdk> thanks
razibog has joined #ruby
akashj87 has joined #ruby
<Guest43410> let me know if you need more info, never made one before...
Guest43410 is now known as willw00
<Spooner> Should have named it .rb so it shows it highlighted.
elaptics is now known as elaptics`away
beiter has quit [Quit: beiter]
helvete has joined #ruby
atyz has quit [Read error: Connection reset by peer]
<Spooner> willw00, http://www.ruby-doc.org/stdlib-2.0/libdoc/dl/rdoc/DL.html shows that dl has changed.
himsin has quit [Quit: Ex-Chat]
<shevy2> is dl often used?
shevy2 is now known as shevy
<willw00> yeah, my real issue is the sizeof function
<willw00> i can change DL:Importable to DL:Importer to fix that error
<Spooner> Not really, shevy, I think people use ffi mostly.
m8 has joined #ruby
breakingthings has joined #ruby
<willw00> The new sizeof function takes a @type_alias parameter that I'm not sure how to access (or what it is)
_nitti has joined #ruby
<Spooner> You could try using DL::SIZEOF_INT
ryanf has joined #ruby
jonathanwallace has joined #ruby
workmad3 has joined #ruby
bean__ has joined #ruby
c0rn has joined #ruby
Zolo has joined #ruby
mikurubeam has joined #ruby
Zolo has quit [Remote host closed the connection]
<willw00> okay, it liked usng SIZEOF_INT
<Spooner> As I say, people usually do this via the FFI gem, not the stdlib.
atmosx has joined #ruby
<Spooner> But, of course, that would require a rewrite.
<willw00> what is FFI? I'm just going by what the book says
tspike has joined #ruby
rockymadden has joined #ruby
<Spooner> Yeah, well, if the book is written for 1.8.5 it is very old ;)
<willw00> haha yeah, there's no updated version (from what I can tell) and I wanted some good tutorials on using Ruby for something other than Rails
<Spooner> It does the same thing, just a bit nicer API and a bit more supported in this day and age ;)
andikr has quit [Read error: Connection reset by peer]
Hanmac1 is now known as Hanmac
<willw00> Hey, sounds good to me
<Spooner> willw00, https://github.com/ffi/ffi
<willw00> just found it, thanks!
* Hanmac prefers still selfwritten gems ... so i have the memory control :P
<Spooner> Yeah, they are better, unless you either don't have endless time or the dll doesn't need persistent memory ;)
sayan has quit [Ping timeout: 245 seconds]
_nitti_ has joined #ruby
end_guy has quit [Ping timeout: 276 seconds]
<Spooner> willw00, But anyway, FFI deals with mallocing for you transparently, so you don't have to worry.
samphippen has joined #ruby
<willw00> Oh that is really nce
<willw00> nice*
hogeo_ has joined #ruby
<Hanmac> but FFI does not work "so good" for C++ libs ..
<Hanmac> or what i have done: for sample window.get_child(name) always return the same ruby object
<willw00> This is literally the first time I've tried to use a different library
icole has joined #ruby
fugetsu has joined #ruby
mityaz has joined #ruby
<Spooner> Actually, I lied, it doesn't magically malloc for you. While since I've used it. Still, nicer than raw DL crud ;)
workmad3 has quit [Read error: Operation timed out]
banjara has quit [Quit: Leaving.]
banjara has joined #ruby
_nitti has quit [Ping timeout: 276 seconds]
banjara has quit [Client Quit]
hogeo has quit [Ping timeout: 260 seconds]
banjara has joined #ruby
banjara has quit [Client Quit]
banjara has joined #ruby
c0rn has quit [Quit: Computer has gone to sleep.]
tspike has quit [Ping timeout: 260 seconds]
banjara has quit [Client Quit]
khismetix has quit [Quit: Textual IRC Client: http://www.textualapp.com/]
<willw00> Well looks like I have some rewriting to do (or just run in 1.8 for a while). Thanks for pointing me in the right directions Spooner
banjara has joined #ruby
banjara has quit [Client Quit]
arturaz has joined #ruby
banjara has joined #ruby
banjara has quit [Client Quit]
banjara has joined #ruby
Al____ has quit [Ping timeout: 252 seconds]
<Spooner> willw00, I'm just avoiding doing any proper work. Good luck!
buibex has joined #ruby
sambio has quit [Ping timeout: 256 seconds]
Demux has quit [Quit: Bye]
<willw00> Ha! Me too, thanks
skattyadz has quit [Ping timeout: 252 seconds]
endzyme has joined #ruby
io_syl has joined #ruby
mpfundstein has quit [Remote host closed the connection]
Demux has joined #ruby
kornnflake is now known as kornnflake_zzz
br4ndon has quit [Ping timeout: 264 seconds]
HelenCrowley has joined #ruby
interactionjaxsn has quit [Remote host closed the connection]
interactionjaxsn has joined #ruby
Liquid-- has quit [Quit: Computer has gone to sleep.]
yacks has quit [Quit: Leaving]
blaxter has quit [Ping timeout: 246 seconds]
theRoUS has quit [Read error: Operation timed out]
Catbuntu has quit [Ping timeout: 276 seconds]
dawkirst has quit [Ping timeout: 264 seconds]
helvete has quit [Quit: Leaving...]
ferdev has quit [Quit: ferdev]
Zolo has joined #ruby
Zolo has quit [Remote host closed the connection]
rupee has joined #ruby
kenyabob has joined #ruby
<floyd> Spooner: I know it's sad, but the DNS library in python outputs the entire response… so I switched back :(
BizarreCake has quit [Ping timeout: 276 seconds]
Axsuul has joined #ruby
<rdk> just want to do some exercises(small) to understand ruby's magic, any suggestion for me? I went through videos from ruby-kickstart.com and its very useful
Zai00 has quit [Ping timeout: 276 seconds]
HelenCrowley is now known as Catbuntu
thone has joined #ruby
<marcdel> i just liked these ones: codeacademy.com/tracks/ruby
statarb3 has quit [Ping timeout: 258 seconds]
seejohnr1n has joined #ruby
iambic has quit [Quit: leaving]
_nitti_ has quit [Remote host closed the connection]
rockymadden has quit []
bwlang has joined #ruby
_nitti has joined #ruby
<rdk> marcdel: will go through that, thanks
thone_ has quit [Ping timeout: 276 seconds]
dawkirst has joined #ruby
linoge has quit [Read error: Connection reset by peer]
luckyruby has joined #ruby
zeade has quit [Quit: Leaving.]
tenmilestereo has quit [Quit: Leaving]
linoge has joined #ruby
Mon_Ouie has joined #ruby
twoism_ has joined #ruby
twoism has quit [Read error: Connection reset by peer]
_nitti has quit [Remote host closed the connection]
Eiam has quit [Ping timeout: 248 seconds]
Goles has quit [Read error: Connection reset by peer]
sailias has quit [Ping timeout: 252 seconds]
Goles has joined #ruby
razibog has quit [Ping timeout: 260 seconds]
_nitti has joined #ruby
razibog has joined #ruby
V8Energy has quit [Ping timeout: 260 seconds]
sandGorgon has quit [Ping timeout: 245 seconds]
br4ndon has joined #ruby
elux has joined #ruby
_Extreme has left #ruby [#ruby]
tylersmith has joined #ruby
dawkirst has quit [Ping timeout: 245 seconds]
Goles has quit [Read error: Connection reset by peer]
dmerrick has quit [Ping timeout: 252 seconds]
breakingthings has quit []
Goles has joined #ruby
<e-dard> Hey, any one know any good gems for fuzzy matching dates and times? Something like "on the 25th of May Twenty Fourteen" would extract "25/05/2014"
razibog has quit [Ping timeout: 264 seconds]
<e-dard> so not your typical date time parsing but something more natural language based
ML_BMT has quit [Ping timeout: 252 seconds]
axhlf has quit [Remote host closed the connection]
sonda has quit [Remote host closed the connection]
eAlchemi_ has joined #ruby
<aedorn> e-dard: Chronic
<e-dard> aedorn: ah, that is PERFECT! Thanks
rezzack has joined #ruby
endzyme has quit [Remote host closed the connection]
huoxito has quit [Ping timeout: 260 seconds]
Eldariof-ru has quit []
zeade has joined #ruby
Astralum has joined #ruby
ananthakumaran has quit [Quit: Leaving.]
marcdel has quit []
statarb3 has joined #ruby
statarb3 has quit [Changing host]
statarb3 has joined #ruby
ferdev has joined #ruby
<Hanmac> aedorn + e-dard does "the day when the new Airport in Berlin is finish" works too? :D
mikurubeam has quit [Read error: Connection reset by peer]
pyrac has quit [Quit: pyrac]
mikurubeam has joined #ruby
theRoUS has joined #ruby
justsee has joined #ruby
justsee has joined #ruby
justsee has quit [Changing host]
<aedorn> Hanmac: as long as "nil" is an acceptable answer to that!
Nimsical has quit [Quit: Computer has gone to sleep.]
w400z has joined #ruby
<maetthew> haha
<Hanmac> i think the answer would be "never" :P
eldariof has joined #ruby
V8Energy has joined #ruby
cburyta has joined #ruby
<maetthew> I've been fiddling with Ruby for a couple of months now and starting to get the hang of it. I'm inclined to write my first gem, but I have no idea what I should be doing. Anyone have any ideas on a project or perhaps know of a "simplish" gem that already exists that isn't maintained anymore
Zolo has joined #ruby
dawkirst has joined #ruby
Zolo has quit [Read error: Connection reset by peer]
br4ndon has quit [Quit: Lorem ipsum dolor sit amet]
eldariof has quit [Client Quit]
br4ndon has joined #ruby
pyrac has joined #ruby
<aedorn> hmm .. there's a lot of abandoned gems out there, not sure what would be considered simple though.
m8 has quit [Read error: Connection reset by peer]
m8 has joined #ruby
s00pcan_ has joined #ruby
eldariof has joined #ruby
cburyta has quit [Ping timeout: 245 seconds]
banjara has quit [Quit: Leaving.]
s00pcan_ has quit [Client Quit]
banjara has joined #ruby
mikurubeam has quit [Ping timeout: 256 seconds]
s00pcan_ has joined #ruby
tspike has joined #ruby
s00pcan_ has quit [Client Quit]
breakingthings has joined #ruby
eAlchemi_ has quit [Remote host closed the connection]
huoxito has joined #ruby
eAlchemi_ has joined #ruby
ML_BMT has joined #ruby
billiam has joined #ruby
atmosx has quit [Quit: And so the story goes…]
mengu_ has quit [Read error: No route to host]
mengu__ has joined #ruby
cantonic has quit [Quit: cantonic]
linoge has quit [Quit: WeeChat 0.4.0]
Zolo has joined #ruby
jgrevich_ has joined #ruby
Zolo has quit [Read error: Connection reset by peer]
jgrevich has quit [Ping timeout: 245 seconds]
jgrevich_ is now known as jgrevich
Zolo has joined #ruby
Zolo has quit [Read error: Connection reset by peer]
hmarr has quit []
s1n4 has quit [Quit: leaving]
seejohnr1n has quit [Quit: Lost terminal]
dawkirst has quit [Ping timeout: 260 seconds]
eAlchemi_ has quit [Ping timeout: 240 seconds]
<Spooner> maetthew, And if they are small and abandoned, just as likely that they aren't good examples of gems.
eldariof has quit []
<Spooner> maetthew, You could use bundler to generate a gem skeleton for you.
nomenkun has joined #ruby
_hemanth has quit [Read error: Connection reset by peer]
_hemanth has joined #ruby
yashshah has quit [Read error: Connection reset by peer]
chessguy has joined #ruby
yashshah has joined #ruby
Zolo has joined #ruby
Zolo has quit [Read error: Connection reset by peer]
w400z has quit []
entr0py_ has joined #ruby
rdk has left #ruby [#ruby]
the_jeebster has quit [Quit: Leaving.]
binaryplease has joined #ruby
<aedorn> huh, that's funny.. I was thinking of picking up chronic duration since it hasn't had updates since 2011... but then I go look and it was updated just a few weeks ago. Sometimes you just have to go back and look I guess
tomzx_mac has joined #ruby
devoper has quit [Quit: Leaving]
law_ has joined #ruby
mark_locklear has quit [Quit: Leaving]
eAlchemist has joined #ruby
<law_> Hi. I got a GEM which does not install. I know how to fix the compile error by editing the Makefile left in /var/lib/... How do I build the gem with the modified Makefile? The Makefile seems to be created during 'gem install ...'
dmiller2 has quit [Ping timeout: 264 seconds]
markisonfire has left #ruby [#ruby]
qwebirc33131 has joined #ruby
tenmilestereo has joined #ruby
arturaz has quit [Quit: Leaving]
<maetthew> Spooner: Valid point. And I know how to create a skeleton, just lacking ideas on what to do with it :)
frem has joined #ruby
dawkirst has joined #ruby
philcrissman has joined #ruby
Zolo has joined #ruby
Zolo has quit [Read error: Connection reset by peer]
pyreal has quit [Quit: pyreal]
ebbflowgo has quit [Quit: Page closed]
Davey has quit [Quit: Computer has gone to sleep.]
Stilo has joined #ruby
Liquid-- has joined #ruby
Liquid-- has quit [Client Quit]
<axl_> I want to default to using a value for argument if the method is called with nil or empty string. is there a better way to do that than this:
kirun has joined #ruby
binaryplease has quit [Quit: WeeChat 0.4.0]
nkr has quit [Quit: Linkinus - http://linkinus.com]
<willw00> Spooner if you're still around, I've changed the code to try and use FFI instead of DL. It runs all the way through, but no sound. Here is a git gist: https://gist.github.com/willw00/f0953616ed0962ba4f1a
dmiller2 has joined #ruby
<willw00> I may be defining the pointer wrong, not sure
trh178 has joined #ruby
xbob has quit [Ping timeout: 252 seconds]
<maetthew> willw00: Tip: name gistfile1.txt to gistfile.rb for syntax highlighting
<willw00> gah! forgot again. Thanks
c0rn has joined #ruby
<Spooner> willw00, you don't need to require dl/import if you are using ffi, but no idea why there is no effect.
<axl_> bean__: does that work if the argument is an empty string?
xbob has joined #ruby
Zolo has joined #ruby
<willw00> oops, forgot to delete the dl requirement
<bean__> axl_: hmm, valid point, I dont think it does
Zolo has quit [Read error: Connection reset by peer]
spanner is now known as leeder-krenon
Zolo has joined #ruby
Zolo has quit [Read error: Connection reset by peer]
<willw00> Here's with syntax highlighting: https://gist.github.com/willw00/c0dd80b46788f7c32c18
<Spooner> willw00, You can edit it in place. You don't need to create a new gist each time/.
xbob has quit [Client Quit]
<Spooner> It maintains all previous versions for you too (revisions on the left).
<willw00> Ugh, I'll get it right one of these days
Lindrian has joined #ruby
<Spooner> willw00, The third and fourth args to midiOutOpen are pointers.
cburyta has joined #ruby
akashj87 has quit [Ping timeout: 264 seconds]
<Spooner> And the second is a uint, not an int (yeah, probably not an important difference in this case).
sailias has joined #ruby
arietis has joined #ruby
the_jeebster has joined #ruby
<Spooner> I would also guess you don't want .to_i at line #43 - why is that there?
<willw00> All that code was from the book I'm looking at, I didn't know whether to change it or not
mmitchell has quit [Remote host closed the connection]
pkrnj has joined #ruby
luckyruby has quit [Remote host closed the connection]
<Spooner> Yes, but that is for dl, not ffi
Liquid-- has joined #ruby
JMcAfreak has quit [Remote host closed the connection]
<willw00> Yeah
mmitchell has joined #ruby
eAlchem__ has joined #ruby
etcetera has quit []
eAlchemist has quit [Read error: Connection reset by peer]
<willw00> I have to figure out what pointer to put into midiOutOpen, I was just passing 0's before
<Spooner> Just pass the @pointer directly, I'd guess.
<Spooner> And for the other pointers, just nil or 0 would be fine.
FPSDavid has joined #ruby
<FPSDavid> Quick and easy question
<FPSDavid> say I have age=20
<FPSDavid> then want to make age=21
naquad has quit [Quit: ZNC - http://znc.in]
<FPSDavid> I do age+1
BigFatFatty has joined #ruby
<willw00> age+=1
<FPSDavid> how do I make it actually change age
Nimsical has joined #ruby
asobrasil has left #ruby [#ruby]
* A124 facepalms
nazty has joined #ruby
<law_> got it. Very ugly hack but works for me: add working Makefile to gem and disable makefile generation in extconf.rb :)
hbpoison has quit [Ping timeout: 264 seconds]
<FPSDavid> thx willw00
<willw00> that do it?
naquad has joined #ruby
hbpoison has joined #ruby
<A124> Maybe reading syntax before the actual programming would be good
husimon___ has quit [Read error: Connection reset by peer]
ozgura has joined #ruby
husimon___ has joined #ruby
Liquid-- has quit [Ping timeout: 256 seconds]
eAlchem__ has quit [Remote host closed the connection]
<FPSDavid> A124, not really programming
<FPSDavid> just wanted to prove a point to someone really quick
daniel_- has joined #ruby
kornnflake_zzz is now known as kornnflake
zeade has quit [Quit: Leaving.]
iambic has joined #ruby
qwebirc33131 has quit [Ping timeout: 245 seconds]
FPSDavid has left #ruby [#ruby]
thinkclay has quit [Quit: Leaving.]
imphasing has joined #ruby
etcetera has joined #ruby
leh has joined #ruby
imphasing has left #ruby [#ruby]
uris has quit [Ping timeout: 252 seconds]
huoxito has quit [Quit: Leaving]
chrishough has quit [Quit: chrishough]
kpshek has quit []
cilquirm_ has joined #ruby
<willw00> IDK, it doesn't like passing 0 or nil as pointers
Zolo has joined #ruby
cilquirm has quit [Read error: Connection reset by peer]
cilquirm_ is now known as cilquirm
Zolo has quit [Read error: Connection reset by peer]
chessguy has quit [Remote host closed the connection]
brianpWins has quit [Quit: brianpWins]
carloslopes has joined #ruby
marcdel has joined #ruby
wmoxam has quit [Ping timeout: 260 seconds]
Zolo has joined #ruby
Squarepy has quit [Quit: Leaving]
Zolo has quit [Read error: Connection reset by peer]
Nisstyre has quit [Quit: Leaving]
cupakromer has joined #ruby
markisonfire has joined #ruby
ctrinh has joined #ruby
zehrizzatti has quit [Quit: Leaving...]
Zolo has joined #ruby
philcrissman has quit [Remote host closed the connection]
Zolo has quit [Read error: Connection reset by peer]
ryannielson has quit [Quit: ryannielson]
ninjers has quit [Read error: Operation timed out]
Zolo has joined #ruby
Zolo has quit [Read error: Connection reset by peer]
tspike has quit [Ping timeout: 240 seconds]
<Spooner> willw00, You want FFI::Pointer::NULL
emergion has joined #ruby
floyd1 has joined #ruby
floyd has quit [Read error: Connection reset by peer]
uris has joined #ruby
Demux has quit [Quit: Bye]
markisonfire has quit [Quit: Leaving]
markisonfire has joined #ruby
markisonfire has quit [Client Quit]
markisonfire has joined #ruby
markisonfire has quit [Read error: Connection reset by peer]
Demux has joined #ruby
<willw00> Great, no errors this time, but still no sound :(
kpshek has joined #ruby
markisonfire has joined #ruby
markisonfire has quit [Read error: Connection reset by peer]
iambic has quit [Read error: Connection reset by peer]
<willw00> Sorry, don't mean to be bothersome
tspike has joined #ruby
astrostl has joined #ruby
<ctrinh> Hi, I'm trying to prepend all STDOUT within a block with a label. I got it work by redefining $stdout with a custom class inherited from IO. But it fails when there is a backtick or Kernal#system. Any pointers to why that is?
_jc has joined #ruby
<Spooner> No worries. I'm not going to lose any sleep over it. FFI does work and is very widely used, but no idea why it is failing for you. I have only used it a tiny bit and then only a long time ago.
sailias has quit [Ping timeout: 248 seconds]
megha has joined #ruby
<willw00> Fair enough, I'll keep plugging away, it's bugging me that it worked in ealier versions
iambic has joined #ruby
iambic has quit [Client Quit]
<willw00> well, the DL version
iambic has joined #ruby
baba has quit [Ping timeout: 255 seconds]
banister`sleep is now known as banisterfiend
geekbri has quit [Remote host closed the connection]
backjlack has quit [Remote host closed the connection]
eAlchemist has joined #ruby
iambic has quit [Client Quit]
banjara has quit [Quit: Leaving.]
banjara has joined #ruby
Zolo_ has joined #ruby
wmoxam has joined #ruby
Zolo_ has quit [Read error: Connection reset by peer]
aknagi has joined #ruby
otters has quit [Quit: WeeChat 0.4.0]
berserkr has quit [Quit: Leaving.]
akhet has joined #ruby
banisterfiend is now known as banister`movie
otters has joined #ruby
otters has quit [Read error: Connection reset by peer]
marcdel has quit [Ping timeout: 264 seconds]
otters has joined #ruby
JMcAfreak has joined #ruby
ndboost has joined #ruby
rippa has quit [Ping timeout: 240 seconds]
Xeago has joined #ruby
ML_BMT has quit [Ping timeout: 252 seconds]
dawkirst has quit [Ping timeout: 256 seconds]
ninjers has joined #ruby
Goles has quit [Quit: Computer has gone to sleep.]
w400z has joined #ruby
Mekkis has quit [Excess Flood]
binaryplease has joined #ruby
eAlchemist has quit [Remote host closed the connection]
dmiller2 has quit [Ping timeout: 264 seconds]
Mekkis has joined #ruby
Zolo has joined #ruby
Zolo has quit [Read error: Connection reset by peer]
Xeago has quit [Remote host closed the connection]
becom33 has quit [Quit: Leaving]
havenwood has quit [Remote host closed the connection]
Zolo has joined #ruby
Zolo has quit [Read error: Connection reset by peer]
havenwood has joined #ruby
_nitti has quit [Remote host closed the connection]
marcdel has joined #ruby
ner0x has quit [Quit: Leaving]
carlyle has quit [Remote host closed the connection]
mengu__ has quit [Ping timeout: 245 seconds]
drumsrgr1 has quit [Ping timeout: 245 seconds]
zehrizzatti has joined #ruby
tommyvyo has quit [Quit:]
havenwood has quit [Ping timeout: 252 seconds]
dawkirst has joined #ruby
slyv has joined #ruby
wmoxam has quit [Read error: No route to host]
law_ has quit [Ping timeout: 245 seconds]
d2dchat has quit [Remote host closed the connection]
ArchBeOS has quit [Quit: Leaving]
carloslopes has quit [Remote host closed the connection]
fugetsu has quit [Ping timeout: 256 seconds]
Zolo has joined #ruby
DarkAceZ has quit [Changing host]
DarkAceZ has joined #ruby
Zolo has quit [Read error: Connection reset by peer]
gommo has joined #ruby
serhart has quit [Quit: Leaving.]
v0n has quit [Ping timeout: 252 seconds]
Catbuntu has quit [Quit: Leaving]
binaryplease has quit [Quit: WeeChat 0.4.0]
Morkel has joined #ruby
binaryplease has joined #ruby
elux has quit [Quit: Leaving...]
<TTilus> ctrinh: they exec a separate process, you need to use popen3 (or whatwasit) to capture the output from external process
Nimsical has quit [Quit: Computer has gone to sleep.]
bwlang has left #ruby [#ruby]
Zolo has joined #ruby
etcetera has quit []
Zolo has quit [Read error: Connection reset by peer]
etcetera has joined #ruby
<ctrinh> TTilus: doh! thanks!
iron_dude has quit [Read error: Connection reset by peer]
Brainix has joined #ruby
kofno_ has quit [Remote host closed the connection]
veer has joined #ruby
mityaz has quit [Quit: See ya!]
chrishough has joined #ruby
chrishough has quit [Client Quit]
b26 has quit [Quit: - nbs-irc 2.39 - www.nbs-irc.net -]
ML_BMT has joined #ruby
Rix has quit [Quit: No One Lives Forever]
Zolo has joined #ruby
chrishough has joined #ruby
Zolo has quit [Read error: Connection reset by peer]
mityaz has joined #ruby
cilquirm has quit [Quit: cilquirm]
binaryplease has quit [Quit: WeeChat 0.4.0]
w400z has quit []
danman has quit [Quit: danman]
Zolo has joined #ruby
Zolo has quit [Read error: Connection reset by peer]
binaryplease has joined #ruby
Rix has joined #ruby
brianpWins has joined #ruby
Zolo has joined #ruby
Zolo has quit [Read error: Connection reset by peer]
jrajav has quit [Quit: phunq, sandwich store loop, WHAT NO UNIVERSE]
randomor has joined #ruby
gommo has quit [Remote host closed the connection]
gommo has joined #ruby
chrishough has quit [Quit: chrishough]
vickaita has quit [Ping timeout: 240 seconds]
danslo has quit [Quit: danslo]
elux has joined #ruby
anonymuse has quit [Quit: Leaving...]
dawkirst has quit [Ping timeout: 245 seconds]
gommo has quit [Ping timeout: 256 seconds]
elux has quit [Client Quit]
tommyvyo has joined #ruby
yashshah has quit [Read error: Connection reset by peer]
randomor has quit [Quit: randomor]
yashshah has joined #ruby
phinfonet has joined #ruby
buibex has quit [Remote host closed the connection]
artofraw has joined #ruby
randomor has joined #ruby
_maes_ has quit [Quit: Miranda IM! Smaller, Faster, Easier. http://miranda-im.org]
buibex has joined #ruby
karthikselva has quit [Quit: karthikselva]
BigFatFatty has quit [Quit: leaving]
chrishough has joined #ruby
Zai00 has joined #ruby
gommo has joined #ruby
pyrac has quit [Quit: pyrac]
joshman_ has quit [Ping timeout: 256 seconds]
theRoUS has quit [Remote host closed the connection]
failshell has quit [Remote host closed the connection]
Tarential has quit [Excess Flood]
joshman_ has joined #ruby
tewlz has quit [Quit: Lost terminal]
Tarential has joined #ruby
j^2 has quit [Quit: for i in `/names` ; do adios $i; done]
Zai00 has quit [Client Quit]
breakingthings has quit []
pyrac has joined #ruby
pyrac has quit [Client Quit]
forrest has quit [Quit: Leaving]
banister`movie has quit [Ping timeout: 243 seconds]
dawkirst has joined #ruby
seejohnrun has quit [Ping timeout: 276 seconds]
zeade has joined #ruby
binaryplease has quit [Quit: WeeChat 0.4.0]
adkron has quit [Ping timeout: 240 seconds]
binaryplease has joined #ruby
c0rn has quit [Ping timeout: 252 seconds]
interactionjaxsn has quit [Remote host closed the connection]
jerius has quit [Ping timeout: 245 seconds]
Zolo has joined #ruby
DrShoggoth has quit [Ping timeout: 246 seconds]
Zolo has quit [Read error: Connection reset by peer]
randomor has quit [Remote host closed the connection]
c0rn has joined #ruby
Stilo has quit [Quit: Textual IRC Client: www.textualapp.com]
joofsh has quit [Remote host closed the connection]
mityaz has quit [Quit: See ya!]
sfoobar has joined #ruby
<sfoobar> hi, i'm trying to get an attribute from a html element and i am using nokogiri... so far i got this http://pastebin.com/mWdxbVyy
etcetera has quit []
dawkirst has quit [Ping timeout: 252 seconds]
Zolo has joined #ruby
schone has joined #ruby
<sfoobar> but it doesn't work, i want to get the value of the attribute "href" from every element with the class "description"
<schone> hello
<schone> does anyone have a good idea how to use rack-cache in a rails app but ignore GET parameters?
joofsh has joined #ruby
Zolo has quit [Read error: Connection reset by peer]
elux has joined #ruby
c0rn has quit [Ping timeout: 252 seconds]
Zolo has joined #ruby
Quebert has joined #ruby
solidoodlesuppor has quit [Remote host closed the connection]
Zolo has quit [Read error: Connection reset by peer]
chessguy has joined #ruby
invisime has quit [Quit: Leaving.]
<sfoobar> nevermind, i figured it out
sepp2k1 has quit [Remote host closed the connection]
sfoobar has left #ruby [#ruby]
sfoobar has joined #ruby
banisterfiend has joined #ruby
elux has quit [Client Quit]
c0rn has joined #ruby
Zolo has joined #ruby
Zolo has quit [Read error: Connection reset by peer]
chrishough has quit [Quit: chrishough]
ozgura has quit [Remote host closed the connection]
icole has quit [Remote host closed the connection]
Zolo has joined #ruby
Zolo has quit [Read error: Connection reset by peer]
icole has joined #ruby
jrajav has joined #ruby
joofsh has quit [Remote host closed the connection]
<Spooner> schone, Try #rubyonrails
Stilo has joined #ruby
danneu has joined #ruby
_nitti has joined #ruby
Zolo has joined #ruby
Zolo has quit [Read error: Connection reset by peer]
dawkirst has joined #ruby
Zolo has joined #ruby
Zolo has quit [Read error: Connection reset by peer]
Zolo has joined #ruby
Zolo has quit [Read error: Connection reset by peer]
Zolo has joined #ruby
Zolo has quit [Read error: Connection reset by peer]
end_guy has joined #ruby
<schone> will do
<schone> thanks
AndChat| has quit [Remote host closed the connection]
<e-dard> What are peoples thoughts on the use of class methods when writing a function that does not depend on class instance state? It seems natural to me but I'm new to Ruby.
schone has left #ruby [#ruby]
Zolo has joined #ruby
Zolo has quit [Remote host closed the connection]
mmitchell has quit [Remote host closed the connection]
mmitchell has joined #ruby
_nitti has quit [Ping timeout: 264 seconds]
billiam has quit [Quit: Leaving]
<Spooner> e-dard It is fine.
<e-dard> but is it idiomatic?
DrShoggoth has joined #ruby
binaryplease has quit [Quit: WeeChat 0.4.0]
<Brainix> e-dard: I think so. I've seen it a lot, and I do it a lot too.
ner0x has joined #ruby
<e-dard> Cool. Good to know.
Morkel has quit [Quit: Morkel]
Zolo has joined #ruby
Zolo has quit [Read error: Connection reset by peer]
<e-dard> I prefer avoiding state where possible, and I also find it makes testing cleaner. But wasn't sure if in Ruby it was normally to tie functionality to instances.
zul has joined #ruby
Zolo has joined #ruby
Zolo has quit [Read error: Connection reset by peer]
nateberkopec has quit [Quit: Leaving...]
<Spooner> e-dard you can have class state too (though use "class instance variables", not the old-fashioned "@@class_vars").
chrishough has joined #ruby
<zul> hi all, I would like to study a tutorial of rails that use redis as db, could you pass me any link please?
<Spooner> zul ask in #rubyonrails - this is #ruby
mmitchell has quit [Ping timeout: 248 seconds]
<zul> ok spooner :)..
mahmoudimus has joined #ruby
workmad3 has joined #ruby
aajjbb has joined #ruby
gommo has quit [Remote host closed the connection]
<Hanmac> the only rails tutorial i can give: "dont use it" :P
gommo has joined #ruby
jlast has quit [Remote host closed the connection]
jbueza has quit [Quit: Leaving.]
davidcelis is now known as goodbrewbot
goodbrewbot is now known as davidcelis
jeremywrowe has joined #ruby
jeremywrowe has joined #ruby
jeremywrowe has quit [Changing host]
Zolo has joined #ruby
Zolo has quit [Read error: Connection reset by peer]
arietis has quit [Quit: Textual IRC Client: http://www.textualapp.com/]
zul has quit [Quit: Ex-Chat]
bean__ has quit [Quit: Computer has gone to sleep.]
gommo has quit [Ping timeout: 256 seconds]
baroquebobcat has quit [Quit: baroquebobcat]
jpfuentes2 has quit [Quit: Computer has gone to sleep.]
gaspar|work has joined #ruby
<gaspar|work> How to get IP address in sinatra / ruby?
<Brainix> gaspar|work: In Sinatra, it's request.ip. But I think we should move this to #sinatra. :-)
kofno has joined #ruby
<gaspar|work> Brainix: Is it possible to test this using webrick? I get nil when trying to access request this way.
floyd1 has quit [Ping timeout: 264 seconds]
sfoobar has quit [Quit: Leaving.]
ML_BMT has quit [Ping timeout: 240 seconds]
<Brainix> gaspar|work: If it's possible with your project, try Thin instead of WEBrick.
aleph-null has quit [Ping timeout: 245 seconds]
Zolo has joined #ruby
Zolo has quit [Read error: Connection reset by peer]
jbueza has joined #ruby
`p has joined #ruby
bradleyprice has quit [Remote host closed the connection]
markisonfire has joined #ruby
axl_ has quit [Quit: axl_]
eAlchemi_ has joined #ruby
wyhaines has quit [Read error: No route to host]
eAlchemi_ has quit [Remote host closed the connection]
dustint has quit [Ping timeout: 246 seconds]
Zolo_ has joined #ruby
Zolo_ has quit [Read error: Connection reset by peer]
ndboost has quit [Remote host closed the connection]
Zolo_ has joined #ruby
Zolo_ has quit [Read error: Connection reset by peer]
soukihei has joined #ruby
bluOxigen has quit [Ping timeout: 245 seconds]
gommo has joined #ruby
kofno has quit [Ping timeout: 245 seconds]
gommo has quit [Remote host closed the connection]
mahmoudimus has quit [Quit: Computer has gone to sleep.]
gommo has joined #ruby
<soukihei> using net/ssh how can I specify a variable as the host? I have this right now Net::SSH.start(i.dns_name, 'root') do |ssh| and it isn't working. I verified the i.dns_name variable has accurate information right before I make the ssh call.
_jc has quit [Quit: Computer has gone to sleep.]
Zolo has joined #ruby
Zolo has quit [Read error: Connection reset by peer]
Zolo has joined #ruby
Zolo has quit [Read error: Connection reset by peer]
Zolo has joined #ruby
Zolo has quit [Read error: Connection reset by peer]
<soukihei> I'm _very_ new to ruby
bigoldrock has quit [Ping timeout: 264 seconds]
d34th4ck3r has joined #ruby
chrishough has quit [Ping timeout: 264 seconds]
WhereIsMySpoon_ has quit [Remote host closed the connection]
workmad3 has quit [Ping timeout: 245 seconds]
c0rn has quit [Ping timeout: 252 seconds]
buibex has quit [Remote host closed the connection]
Zolo has joined #ruby
gommo has quit [Ping timeout: 256 seconds]
chrishough has joined #ruby
Zolo has quit [Read error: Connection reset by peer]
Zolo has joined #ruby
Zolo has quit [Read error: Connection reset by peer]
c0rn has joined #ruby
bean__ has joined #ruby
eAlchemi_ has joined #ruby
moha has joined #ruby
ffranz has quit [Quit: Leaving]
kpshek has quit []
Zolo has joined #ruby
mahmoudimus has joined #ruby
Zolo has quit [Remote host closed the connection]
<moha> هاي
<moha> حد عربي هنا
spider-mario has quit [Read error: Connection reset by peer]
bean__ has quit [Client Quit]
Zolo has joined #ruby
Zolo has quit [Remote host closed the connection]
eAlchemi_ has quit [Remote host closed the connection]
Zolo has joined #ruby
Zolo has quit [Remote host closed the connection]
mahmoudimus has quit [Client Quit]
<soukihei> I think I've figured it out.
Zolo has joined #ruby
Zolo has quit [Remote host closed the connection]
Zolo has joined #ruby
Zolo has quit [Remote host closed the connection]
markisonfire has quit [Quit: Leaving]
joshman_ has quit [Ping timeout: 256 seconds]
nga4 has quit [Ping timeout: 240 seconds]
moha has left #ruby [#ruby]
swingha has quit [Quit: WeeChat 0.4.0]
postmodern has joined #ruby
Lindrian has left #ruby [#ruby]
Zolo_ has joined #ruby
Zolo_ has quit [Read error: Connection reset by peer]
Zolo has joined #ruby
Zolo has quit [Read error: Connection reset by peer]
alanp_ has joined #ruby
gommo has joined #ruby
alanp_ has joined #ruby
hogeo_ has quit [Remote host closed the connection]
cmarques has quit [Ping timeout: 240 seconds]
etcetera has joined #ruby
Zolo_ has joined #ruby
Zolo_ has quit [Read error: Connection reset by peer]
alanp has quit [Ping timeout: 258 seconds]
Xeago has joined #ruby
whowantstolivef1 has quit [Ping timeout: 245 seconds]
luckyruby has joined #ruby
V8Energy has quit []
Rix has quit [Quit: No One Lives Forever]
<cmyers> so...I just got a seg fault in ruby-1.9.3-p395 monitor.rb:185: in `lock`. What is the best way to figure out if this is a known issue or not?
mahmoudimus has joined #ruby
<cmyers> seems to be synchronize code called via log4r
ecarey has joined #ruby
ML_BMT has joined #ruby
<cmyers> hmm, alternatively, should I just bump to -p392 and wait to see if it happens again?
Zolo has joined #ruby
Zolo has quit [Read error: Connection reset by peer]
Xeago has quit [Remote host closed the connection]
markisonfire has joined #ruby
ozgura has joined #ruby
Zolo_ has joined #ruby
Zolo_ has quit [Read error: Connection reset by peer]
Zolo_ has joined #ruby
Zolo_ has quit [Read error: Connection reset by peer]
serhart has joined #ruby
awarner has quit [Remote host closed the connection]
artofraw has quit [Remote host closed the connection]
mahmoudimus has quit [Quit: Computer has gone to sleep.]
ozgura has quit [Remote host closed the connection]
timonv has quit [Remote host closed the connection]
Zolo has joined #ruby
Zolo has quit [Read error: Connection reset by peer]
jbueza has quit [Quit: Leaving.]
serhart has quit [Ping timeout: 264 seconds]
kristofers has quit []
jbueza has joined #ruby
chussenot has joined #ruby
chussenot has quit [Client Quit]
Zolo has joined #ruby
zeade has quit [Quit: Leaving.]
Zolo has quit [Read error: No route to host]
Zolo has joined #ruby
Zolo has quit [Read error: Connection reset by peer]
Zolo has joined #ruby
workmad3 has joined #ruby
tommyvyo has quit [Quit:]
Zolo has quit [Read error: Connection reset by peer]
Assurbanipal has joined #ruby
Zolo has joined #ruby
Zolo has quit [Read error: Connection reset by peer]
banghous_ has joined #ruby
Zolo has joined #ruby
Zolo has quit [Read error: Connection reset by peer]
freeayu has quit [Remote host closed the connection]
sambao21 has joined #ruby
Zolo_ has joined #ruby
nga4 has joined #ruby
Zolo_ has quit [Read error: Connection reset by peer]
jeffreybaird has joined #ruby
frem has quit [Ping timeout: 252 seconds]
banghouse2 has quit [Ping timeout: 246 seconds]
ckrailo has quit [Quit: Computer has gone to sleep.]
entr0py_ has quit [Remote host closed the connection]
Zolo has joined #ruby
Zolo has quit [Read error: Connection reset by peer]
emmanuelux has joined #ruby
joebew has quit [Read error: Connection reset by peer]
Zolo has joined #ruby
joebew has joined #ruby
Zolo has quit [Read error: Connection reset by peer]
sambao21 has quit [Ping timeout: 264 seconds]
rupee has quit [Quit: Leaving]
julian-delphiki has joined #ruby
Zolo has joined #ruby
Zolo has quit [Read error: Connection reset by peer]
TheFuzzball has quit [Quit: Computer has gone to sleep.]
Zolo has joined #ruby
Zolo has quit [Read error: Connection reset by peer]
bean has quit [Ping timeout: 258 seconds]
banghous_ has quit [Remote host closed the connection]
banghouse2 has joined #ruby
Zolo has joined #ruby
Zolo has quit [Read error: Connection reset by peer]
jimeh has quit [Quit: Computer has gone to sleep.]
Zolo has joined #ruby
Zolo has quit [Read error: Connection reset by peer]
Zolo has joined #ruby
Zolo has quit [Read error: Connection reset by peer]
yashshah has quit [Read error: Connection reset by peer]
tommyvyo has joined #ruby
yashshah has joined #ruby
Zolo has joined #ruby
Zolo has quit [Read error: Connection reset by peer]
randomor has joined #ruby
sambao21 has joined #ruby
Mon_Ouie has quit [Ping timeout: 252 seconds]
Zolo_ has joined #ruby
Zolo_ has quit [Read error: Connection reset by peer]
Zolo_ has joined #ruby
Zolo_ has quit [Read error: Connection reset by peer]
willw00 has quit [Ping timeout: 248 seconds]
ML_BMT has quit [Quit: Leaving]
pskosinski has joined #ruby
Zolo has joined #ruby
sambao21 has quit [Client Quit]
ecarey has quit [Quit: Leaving.]
Zolo has quit [Read error: No route to host]
huoxito has joined #ruby
Zolo has joined #ruby
Zolo has quit [Read error: Connection reset by peer]
icole has quit [Remote host closed the connection]
Zolo has joined #ruby
jimeh has joined #ruby
Zolo has quit [Read error: Connection reset by peer]
NiteRain has quit [Ping timeout: 246 seconds]
ddd_ has joined #ruby
danneu has quit [Ping timeout: 252 seconds]
willw00 has joined #ruby
danslo has joined #ruby
ddd has quit [Ping timeout: 245 seconds]
Zolo_ has joined #ruby
Zolo_ has quit [Read error: Connection reset by peer]
Zolo_ has joined #ruby
Zolo_ has quit [Read error: Connection reset by peer]
Zolo has joined #ruby