imperator changed the topic of #ruby-lang to: Ruby 1.9.3-p362: http://ruby-lang.org (ruby-2.0.0-preview2) || Paste >3 lines of text on http://gist.github.com
sush24 has joined #ruby-lang
<lianj> sorry to say, but because you didn't understood the ruby object model yet. then its not screwed up
<madhadron> lianj: I didn't realize that namespaces and classes are entirely conflated. Now that I understand it, I think it's a design error.
outoftime has quit [Quit: Leaving]
outoftime has joined #ruby-lang
outoftime has quit [Read error: Connection reset by peer]
<lianj> madhadron: there are no namespaces
davidbalbert is now known as davidbalber|away
<micaeked> madhadron: it seems like you have some expectations about how things should work. if you have some time later, consider reading "metaprogramming ruby" or something else which explains the object model
<banisterfiend> madhadron: you're thinking about things wrongly, ruby doesn't have 'functions', it's a pure object oriented language, it only has methods
<micaeked> banisterfiend: nope
<micaeked> banisterfiend: lambda
<madhadron> micaeked: That's…sort of a function.
<micaeked> yes, lambda/proc is just a function
<banisterfiend> micaeked: you can use lambdas as functions, but 1. they're anonymous 2. they're very different syntactically and often awkward to use
<madhadron> micaeked: proc is *not* a function.
<madhadron> It's a procedure call with strange redefinition of the semantics of return.
<banisterfiend> micaeked: but more importantly they haven't got any traction in the ruby community as 'functions', i've pretty much never seen someone use a lambda as one would use a 'function' in a traditional language
<micaeked> fuck the "ruby community". the language is nice
<madhadron> micaeked: Anyway, my expectations were from Smalltalk, where I can package classes into namespaces.
<banisterfiend> micaeked: so... how do you use lambdas as functions, you realize if you assign them to a local they're going to disappear outside that scope, so what do you do? assign them to constants?
andrewhl has joined #ruby-lang
<madhadron> But then, I've already been bitten by modules before, such as not being able to control the order of superclass invocation.
<micaeked> banisterfiend: no. they are anonymous functions. i use them when i need anonymous functions
<madhadron> I think the better statement is that there are no variables besides instance variables.
<banisterfiend> micaeked: yes, they're anonymous functions, they're similar to anonymous functions in other languages, they're not really a replacemtn for regular functions, as yo would have them in C and probably even python (though im not that famliar iwth python)
<micaeked> madhadron: wut? local variables
<madhadron> madhadron: No variables outside method scope that aren't instance variables.
<madhadron> Whoops, to micaeked
<micaeked> madhadron: yep, you can have local variables in class/module scope
<madhadron> micaeked: Okay, yes.
<micaeked> madhadron: again, if you want to do something interesting with the language, you're gonna have to know the object model
<banisterfiend> madhadron: smalltalk has a concept of function being distinct from methods?
<madhadron> banisterfiend: No. Smalltalk has blocks and that's it.
<banisterfiend> madhadron: cool
<madhadron> micaeked: I'm not trying to do something interesting with it. I'm trying to write a bloody SDK to join a set of five other SDKs in other languages. By design, the code is supposed to be as simple as possible.
<madhadron> This isn't even core code of the SDK
<madhadron> It's handling fallthrough for Nokogiri to REXML if Nokogiri isn't present
<madhadron> and as I inherited the first version of this code, everything's in one module, as if it were a namespace
<madhadron> I have no idea if that's good practice or bad, but I'm stuck with it.
nkr has quit [Quit: Linkinus - http://linkinus.com]
<banisterfiend> madhadron: it's standard practice
<banisterfiend> madhadron: so what problems are you having using modules as namespaces?
sj26 has quit [Quit: Rainbows!]
<madhadron> banisterfiend: Say I have a method f on the module. I need to call it during the module's instantiation (outside of method definitions), and I need to call it also from outside the module elsewhere, such as in the test suite.
itsmeduncan has quit [Quit: itsmeduncan]
<banisterfiend> madhadron: modules aren't instantiated, what do you mean?
<madhadron> Apparently I will have to call it as a method of the module from outside if I want to use it during instantiation at all, which will seriously violate principle of least surprise.
<madhadron> banisterfiend: module A def f() … end f() end
<banisterfiend> madhadron: but how are you 'instantiating' that?
<madhadron> The module is evaluated and created in the Ruby runtime as an object in its own right.
<madhadron> Actually, it's module A def self.f() … end f() end, as someone pointed out
<banisterfiend> madhadron: Yeah, basically the module body is executable code, so methods are only defined as they're encounntered (where the 'def' is read), but you're wanting to call a method before it's actually been created?
agile has joined #ruby-lang
<madhadron> Apparently, yes.
<madhadron> Oh well. The hack solution is just to duplicate the code and forget about the whole problem.
towski has quit [Remote host closed the connection]
andrewhl has quit [Remote host closed the connection]
sailias has quit [Quit: Leaving.]
karasawa has joined #ruby-lang
<lianj> madhadron: http://ideone.com/L3jK0o
<banisterfiend> madhadron: you're likely porting across patterns from ruby that dont work here, im sure there's an elegant ruby-ish solution for you
ryanf has joined #ruby-lang
<banisterfiend> from other languages*
benanne has quit [Quit: kbai]
sailias has joined #ruby-lang
<havenn> madhadron: What are you trying to do exactly? Extend a module into another module?
<madhadron> havenn: No. There's only one module. The module is acting as a namespace.
<madhadron> banisterfiend: Probably. However, I've been sufficiently underwhelmed with the language where I have no interest in learning it well or ever using it again. Almost no documentation, bizarre inconsistencies in the libraries...
pkrnj has quit [Quit: Computer has gone to sleep.]
<madhadron> havenn: I just did a hack where I duplicated code.
<madhadron> So, thanks everyone for suggestions.
<lianj> madhadron: now you entered the trollzone finally
<banisterfiend> madhadron: well if you come from a smalltalk background that's probably fair
<havenn> madhadron: Ruby has an ISO spec.
davidbalber|away is now known as davidbalbert
<madhadron> lianj: Oh, I probably entered that a long while back.
<banisterfiend> madhadron: but as far as non-smalltalk languages go it's pretty cool
<madhadron> banisterfiend: I'm primarily a Lisp and Haskell guy. Smalltalk was a sideline for me, but was my analogy for Ruby.
<madhadron> The closest model I had, since Python's rather farther off.
<banisterfiend> madhadron: the fact that module/class bodies are executable code like any other code in ruby is actually pretty cool, it allows us to call class methods in there that do metaprogramming stuff, like generate instance methods. That's how attr_accessor and pals work
karasawa has quit [Ping timeout: 265 seconds]
<banisterfiend> madhadron: if what you're asking was possible, then i guess module/class bodies wouldn't be just normal executable code, and some of the metaprogramming tricks we do in there to set up the class wouldn't work
<madhadron> banisterfiend: Yes. The PLT Racket object system's probably a better model to think about it with than any other I know.
<madhadron> and they do some delightful metaprogramming tricks using executable class bodies.
itsmeduncan has joined #ruby-lang
<madhadron> Though they don't actually have a constructor method. You would do a lot of the tricks in Ruby via metaclasses.
<madhadron> Anyway, thanks to you all. Apologies for being so acerbic.
imajes has quit [Excess Flood]
imajes has joined #ruby-lang
<charliesome> madhadron: you might be more at home like this: http://eval.in/6113
drollwit has joined #ruby-lang
srbaker has quit [Quit: Computer has gone to sleep.]
<madhadron> I'd be even more at home with generic functions, but thanks. (: I've seen openstruct, but I'm trying to get away with no external library dependencies.
drollwit has quit [Remote host closed the connection]
richardburton has joined #ruby-lang
drollwit has joined #ruby-lang
mercwithamouth has quit [Ping timeout: 255 seconds]
<lianj> madhadron: openstruct is in stdlib
<banisterfiend> madhadron: this kind of metaprogramming stuff for example, kind of cool https://gist.github.com/4479930
<madhadron> banisterfiend: Ah yes. Advice.
<madhadron> lianj: Ah, so it is. Thanks.
<madhadron> banisterfiend: Incredibly useful. Been used to fix stuff in Common Lisp for years.
<madhadron> And hooks in emacs.
<banisterfiend> madhadron: cool. But the nice thing about ruby (IMO) is that you can do all that stuff without macros, and you can do it with a really clean syntax that makes it look like they're actual language keywords
richardburton has quit [Ping timeout: 265 seconds]
<madhadron> banisterfiend: advice in CL and hooks in emacs aren't macros either.
<madhadron> advice is actually introspection into the runtime
<banisterfiend> ah ok, what is advice?
<madhadron> It modifies existing objects
<madhadron> So if I know that a particular function in a particular system has a bug on certain input values
emocakes has quit [Quit: emocakes]
<madhadron> I can define advice to the system for that case which will patch it up
<banisterfiend> madhadron: so it's like a before hook?
<madhadron> banisterfiend: It can be. You can use it as a straightforward around wrapper
<banisterfiend> madhadron: interesting, but is 'advice' built into the language or is it just pattern?
<madhadron> banisterfiend: Well, it's part of the standard library under defadvice
<madhadron> Emacs Lisp has it, too
<banisterfiend> cool
mercwithamouth has joined #ruby-lang
<madhadron> Might be easier to play with there instead of powering up a CL system. And hooks like before and after are the bread and butter of emacs modes.
<madhadron> Anyway, thanks, all. Time for me to go home.
madhadron has quit [Quit: Leaving.]
<banisterfiend> that was interesting, a guy who doesn't like ruby who wasn't a dick about it
sailias has quit [Quit: Leaving.]
sush24 has quit [Quit: This computer has gone to sleep]
bantic has quit [Quit: bantic]
<micaeked> meh. i find holier-than-thou worse than a dick. it's easier to point out a dick and ignore them
rins has quit [Ping timeout: 265 seconds]
KA_ has quit [Quit: KA_]
KA_ has joined #ruby-lang
justinram has quit [Remote host closed the connection]
ivanoats has quit [Remote host closed the connection]
__butch__ has quit [Quit: Leaving.]
banisterfiend has quit [Ping timeout: 256 seconds]
brianpWins has quit [Quit: brianpWins]
guns has joined #ruby-lang
stevechiagozie has quit [Quit: Computer has gone to sleep.]
marr has quit [Ping timeout: 260 seconds]
srbaker has joined #ruby-lang
rcvalle has quit [Quit: Leaving]
sush24 has joined #ruby-lang
davidbalbert is now known as davidbalber|away
gregmoreno has quit [Remote host closed the connection]
mpan has quit [Quit: Leaving]
drollwit has quit [Remote host closed the connection]
drollwit has joined #ruby-lang
itsmeduncan has quit [Quit: itsmeduncan]
karasawa has joined #ruby-lang
micaeked has quit [Quit: WeeChat 0.3.9.2]
alec has quit [Ping timeout: 246 seconds]
stevechiagozie has joined #ruby-lang
karasawa has quit [Ping timeout: 265 seconds]
dvorak has joined #ruby-lang
imajes has quit [Excess Flood]
imajes has joined #ruby-lang
heftig has quit [Ping timeout: 245 seconds]
heftig has joined #ruby-lang
blahwoop has quit [Ping timeout: 276 seconds]
drollwit has quit [Remote host closed the connection]
lcdhoffman has quit [Quit: lcdhoffman]
ivanoats has joined #ruby-lang
ivanoats has quit [Changing host]
ivanoats has joined #ruby-lang
rins has joined #ruby-lang
mjio has quit []
bfreeman_ has quit [Quit: bfreeman_]
imajes has quit [Excess Flood]
imajes has joined #ruby-lang
KA_ has quit [Quit: KA_]
KA_ has joined #ruby-lang
blazes816 has quit [Quit: blazes816]
cored has quit [Quit: leaving]
rins has quit [Ping timeout: 265 seconds]
sush24 has quit [Ping timeout: 252 seconds]
sn0wb1rd has quit [Quit: sn0wb1rd]
mjio has joined #ruby-lang
breakingthings has joined #ruby-lang
ivanoats has quit [Remote host closed the connection]
sailias has joined #ruby-lang
scottschecter has quit [Quit: WeeChat 0.3.9.2]
itsmeduncan has joined #ruby-lang
havenn has quit [Remote host closed the connection]
havenn has joined #ruby-lang
Rarrikins_c has quit [Ping timeout: 260 seconds]
scottschecter has joined #ruby-lang
sush24 has joined #ruby-lang
sn0wb1rd has joined #ruby-lang
havenn has quit [Read error: No route to host]
havenn has joined #ruby-lang
sn0wb1rd has quit [Remote host closed the connection]
lsegal has joined #ruby-lang
<postmodern> damn nokogiri question, how do i override the spacing to be 2 spaces, each element on a new line
<postmodern> *dumb
karasawa has joined #ruby-lang
Rarrikins has joined #ruby-lang
gregmore_ has joined #ruby-lang
<postmodern> nm, https://gist.github.com/398334 did the trick
Rarrikins_l has joined #ruby-lang
karasawa has quit [Ping timeout: 255 seconds]
gjaldon has joined #ruby-lang
gregmore_ has quit [Ping timeout: 260 seconds]
Rarrikins has quit [Ping timeout: 265 seconds]
larrylv has joined #ruby-lang
mrsolo has quit [Quit: Leaving]
ryanf has quit [Read error: Connection reset by peer]
ryanf has joined #ruby-lang
Rarrikins_l has quit [Ping timeout: 265 seconds]
Rarrikins has joined #ruby-lang
sabfer has quit [Quit: sabfer]
larrylv has quit [Remote host closed the connection]
intellitech has quit [Quit: intellitech]
mercwithamouth has quit [Ping timeout: 255 seconds]
tubbo has joined #ruby-lang
<tubbo> hey guys, i'm having a bit of an issue with Redcarpet
<tubbo> i built a custom Renderer for it, and now every time I run render(), Ruby segfaults
<imperator> what version of redcarpet, what version of ruby, what platform?
<tubbo> here's the code that segfaults: http://gist.github.com/4480564
<tubbo> sorry, ruby 1.9.3-p327, redcarpet is HEAD but it also fucked up on an earlier version
<tubbo> i think it might have something to do with my renderer
<tubbo> lemme post that
Rarrikins has quit [Ping timeout: 256 seconds]
hahuang65_ has quit [Quit: Computer has gone to sleep.]
<tubbo> imperator: updated.. https://gist.github.com/4480564
<tubbo> so the only thing i'm doing that's different is using Pygments to render code blocks
DEac- has quit [Read error: Connection reset by peer]
Rarrikins has joined #ruby-lang
<tubbo> shit, even when I do Redcarpet::Markdown.new(Redcarpet::Render::HTML), it still segfaults..
DEac- has joined #ruby-lang
<imperator> what is "pygments", don't see a gem by that name?
<tubbo> imperator: pygments.rb
glebm has joined #ruby-lang
<imperator> Redcarpet::Markdown.new(Redcarpet::Render::HTML) worked fine in irb for me
<tubbo> yeah me too
<tubbo> it just doesn't work in my module..
heftig has quit [Quit: leaving]
<tubbo> it works in rails console though
<tubbo> i have no idea what could be causing this haha
<tubbo> want me to post the rest of the module? i'll even show you the branch on github
<imperator> hm, thought they got rid of autoload
Rarrikins has quit [Ping timeout: 248 seconds]
<imperator> can you show us a snippet of code that actually causes a segfault for you?
karasawa has joined #ruby-lang
<tubbo> imperator: in https://gist.github.com/4480564, line 18 of markdown_parser.rb
<tubbo> is where the segfault happens
<tubbo> when i call markdown.render("Something")
<tubbo> it also happens in Pry when i debug
Rarrikins has joined #ruby-lang
<imperator> that's just the lib, what are you passing as markdown_source?
<tubbo> well i'm passing something like "It's **gonna** _be_ a lovely day" but i tried it on regular text with no punctuation and it still segfaults
<imperator> pastie the line you're actually calling
<imperator> ActiveCopy::MarkdwnParser.new.render(something)
Rarrikins_p has joined #ruby-lang
<tubbo> ok
karasawa has quit [Ping timeout: 248 seconds]
Rarrikins has quit [Ping timeout: 255 seconds]
<tubbo> imperator: template = ActiveCopy::MarkdownParser.new; template.render(source)
Rarrikins has joined #ruby-lang
karasawa has joined #ruby-lang
<imperator> installed pygments.rb, ran ActiveCopy::MarkdownParser.new.render("It's **gonna** _be_ a lovely day") - no problem
Rarrikins_p has quit [Ping timeout: 260 seconds]
<imperator> ruby 1.9.3p362 (2012-12-25 revision 38607) [x86_64-darwin10.8.0]
<tubbo> bam
<tubbo> ok
<tubbo> that's kind of a good thing i guess
<imperator> bam?
<tubbo> means my configuration here is just screwed up
<tubbo> oh wait
<tubbo> 362??
<tubbo> i'm on 327
<imperator> i used the redcarpet gem, not head
<tubbo> lemme upgrade
<tubbo> lol
heftig has joined #ruby-lang
<tubbo> yeah all of this was working before
<tubbo> so that's why it's so puzzling
Rarrikins has quit [Ping timeout: 248 seconds]
dhsmith has quit [Remote host closed the connection]
joshcheek has joined #ruby-lang
brianpWins has joined #ruby-lang
neocoin has quit [Read error: Connection reset by peer]
neocoin has joined #ruby-lang
Rarrikins has joined #ruby-lang
<joshcheek> Hi, I have some code that doesn't parse but seems like it should. Am I missing something, or is this a bug? https://gist.github.com/4480680
Rarrikins_x has joined #ruby-lang
<imperator> tubbo, gotta run, good luck
neocoin_ has joined #ruby-lang
<tubbo> thanks for your help man :)
Rarrikins_x_n has joined #ruby-lang
alvaro_o_ has quit [Quit: Ex-Chat]
<tubbo> joshcheek: well, and/&& aren't exactly the same thing
<tubbo> joshcheek: and implies a control flow, while && evaluates a boolean expression
Rarrikins has quit [Ping timeout: 255 seconds]
neocoin has quit [Ping timeout: 276 seconds]
<tubbo> in that case, `return` breaks you out of the boolean expression
<tubbo> but when you do `and return`, it is telling ruby to continue and return 1 if the previous expression is true
<tubbo> does that make sense?
<tubbo> (it totally didn't for me at first either lol)
<joshcheek> But `1 && (return 1)` works.
Rarrikins_x has quit [Ping timeout: 276 seconds]
<tubbo> i had to shoot myself in the foot to find out
<tubbo> joshcheek: yeah, because `1 && ()` is a boolean expression. `return 1` is an expression inside ()
<tubbo> so `return 1` returns 1. you're now doing `1 && (1)`
<tubbo> which works :)
Rarrikins_x_n_g has joined #ruby-lang
<joshcheek> You're saying that `(return 1)` evaluates to 1, as in the return statement returns from the parentheses?
dhsmith has joined #ruby-lang
Rarrikins_x_n has quit [Ping timeout: 255 seconds]
<joshcheek> tubbo: That can be shown to be untrue: http://pastie.org/5645732
<tubbo> joshcheek: well, 1 && (return 1) doesn't work for me
<tubbo> i get LocalJumpError: unexpected return
<tubbo> in irb
<joshcheek> tubbo: hmm, I'm on ruby 1.9.3p194 (2012-04-20 revision 35410) [x86_64-darwin11.3.0]
<tubbo> upgrade to p327
<tubbo> err
<tubbo> p362
<tubbo> sorry
<tubbo> whatever's the latest
<tubbo> i just did
<joshcheek> tubbo: you can't put a return in the middle of irb, it needs a context. E.g. `-> { 1 && (return 1) }.call`
<tubbo> ah
wmoxam has quit [Remote host closed the connection]
<tubbo> joshcheek: well in any case, i think when you do 1 && return, it will immediately break you out of the statement
<tubbo> which might be what is causing your problem
<joshcheek> Idk, the inconsistency causes me to think it's a bug.
Rarrikins_x_n_g has quit [Ping timeout: 255 seconds]
imajes has quit [Excess Flood]
Rarrikins_x_n_g has joined #ruby-lang
tenderlove has quit [Remote host closed the connection]
<tubbo> nah i think it's that return
<tubbo> because -> { 1 && return }.call => nil
imajes has joined #ruby-lang
jbsan has quit [Quit: jbsan]
ivanoats has joined #ruby-lang
ivanoats has quit [Changing host]
ivanoats has joined #ruby-lang
<tubbo> return is saying "break out of the boolean expression now" and it seems to stop parsing everything after it as an argument
hell_razer has quit [Ping timeout: 255 seconds]
KA_ has quit [Quit: KA_]
Rarrikins_x_n_g has quit [Ping timeout: 260 seconds]
Rarrikins has joined #ruby-lang
ivanoats has quit [Ping timeout: 256 seconds]
mistym has quit [Remote host closed the connection]
mistym has joined #ruby-lang
mistym has quit [Changing host]
mistym has joined #ruby-lang
Rarrikins_n has joined #ruby-lang
Rarrikins has quit [Ping timeout: 240 seconds]
<joshcheek> tubbo: Was thinking that since return is a keyword, it might actually parse like `1 && return (1)` and the `&&` might bind higher than the adjacency of the `(1)`. But Ripper doesn't make sense to me: http://pastie.org/5645765
<joshcheek> Really I just want to be able to identify, given a line of code, whether it will return so that I can know whether I can assign it to a variable/pass to a method http://pastie.org/5645771
Rarrikins has joined #ruby-lang
Rarrikins_n has quit [Ping timeout: 276 seconds]
mistym has quit [Remote host closed the connection]
sush24 has quit [Quit: This computer has gone to sleep]
hell_razer has joined #ruby-lang
Rarrikins_w has joined #ruby-lang
Rarrikins has quit [Ping timeout: 276 seconds]
Rarrikins has joined #ruby-lang
Rarrikins_w has quit [Ping timeout: 248 seconds]
Rarrikins_l has joined #ruby-lang
m3nd3s has joined #ruby-lang
Rarrikins has quit [Ping timeout: 252 seconds]
Rarrikins_l_e has joined #ruby-lang
Rarrikins_l has quit [Ping timeout: 252 seconds]
karasawa has quit [Ping timeout: 264 seconds]
sush24 has joined #ruby-lang
neocoin has joined #ruby-lang
neocoin_ has quit [Ping timeout: 255 seconds]
lcdhoffman has joined #ruby-lang
karasawa has joined #ruby-lang
ryanf has quit [Read error: Connection reset by peer]
ryanf has joined #ruby-lang
karasawa has quit [Ping timeout: 260 seconds]
sush24 has quit [Quit: This computer has gone to sleep]
guns has quit [Quit: guns]
m3nd3s has quit [Remote host closed the connection]
alec__ has joined #ruby-lang
srbaker has quit [Quit: Computer has gone to sleep.]
S1kx has joined #ruby-lang
S1kx has quit [Changing host]
S1kx has joined #ruby-lang
sush24 has joined #ruby-lang
bfreeman has joined #ruby-lang
rins has joined #ruby-lang
jtoy has joined #ruby-lang
srbaker has joined #ruby-lang
jtoy has quit [Client Quit]
srbaker has quit [Quit: Computer has gone to sleep.]
jonahR has quit [Quit: jonahR]
alan_sebastian has joined #ruby-lang
alan_sebastian has quit [Client Quit]
gokul has joined #ruby-lang
rins has quit [Ping timeout: 276 seconds]
ivanoats has joined #ruby-lang
rsl has quit [Quit: Computer has gone to sleep.]
breakingthings has quit []
sush24 has quit [Quit: This computer has gone to sleep]
ivanoats has quit [Remote host closed the connection]
blahwoop has joined #ruby-lang
dwu1 has joined #ruby-lang
tubbo has quit [Ping timeout: 264 seconds]
vlad_starkov has joined #ruby-lang
ivanoats has joined #ruby-lang
vlad_starkov has quit [Ping timeout: 248 seconds]
gjaldon has quit [Ping timeout: 246 seconds]
lcdhoffman has quit [Quit: lcdhoffman]
mistym has joined #ruby-lang
mistym has quit [Changing host]
mistym has joined #ruby-lang
sailias has quit [Quit: Leaving.]
Nisstyre has quit [Remote host closed the connection]
Weems has quit [Read error: Connection reset by peer]
firefux has joined #ruby-lang
wellnowwhat has joined #ruby-lang
wellnowwhat has left #ruby-lang [#ruby-lang]
spuk has quit [Quit: Human beings were created by water to transport it uphill.]
itsmeduncan has quit [Quit: itsmeduncan]
Ender___ has joined #ruby-lang
havenn has quit [Remote host closed the connection]
Ender___ has quit [Remote host closed the connection]
Ender___ has joined #ruby-lang
Ender___ has quit [Client Quit]
havenn has joined #ruby-lang
havenn has quit [Read error: No route to host]
bubonicpestilenc has joined #ruby-lang
<bubonicpestilenc> hey all
<bubonicpestilenc> is there a way to automatically install required gems?
havenn has joined #ruby-lang
<bubonicpestilenc> e.g. i have require "a"; req "b"; req "c"; inside common.rb and when i run `ruby main.rb" i wish to install a, b, c gems automatically
vlad_starkov has joined #ruby-lang
bubonicpestilenc has quit [Client Quit]
mjio has quit []
mjio has joined #ruby-lang
vlad_starkov has quit [Ping timeout: 256 seconds]
mercwithamouth has joined #ruby-lang
ryanf_ has joined #ruby-lang
Rarrikins_l_e has quit [Ping timeout: 255 seconds]
ivanoats has quit [Remote host closed the connection]
charliesome has quit [Quit: Textual IRC Client: www.textualapp.com]
blahwoop has quit [Ping timeout: 240 seconds]
ryanf has quit [Ping timeout: 248 seconds]
slyphon_ has joined #ruby-lang
havenn_ has joined #ruby-lang
brianpWins_ has joined #ruby-lang
mjio has quit []
ivanoats has joined #ruby-lang
ivanoats has quit [Remote host closed the connection]
neocoin_ has joined #ruby-lang
mistym has quit [Remote host closed the connection]
jesse is now known as opq
havenn has quit [*.net *.split]
neocoin has quit [*.net *.split]
brianpWins has quit [*.net *.split]
agile has quit [*.net *.split]
slyphon has quit [*.net *.split]
jbwiv has quit [*.net *.split]
Banistergalaxy has quit [*.net *.split]
yfeldblum has quit [*.net *.split]
slyphon_ is now known as slyphon
brianpWins_ is now known as brianpWins
mercwithamouth has quit [Ping timeout: 276 seconds]
apeiros_ has joined #ruby-lang
yfeldblum has joined #ruby-lang
agile has joined #ruby-lang
jbwiv has joined #ruby-lang
kitallis has joined #ruby-lang
Nisstyre has joined #ruby-lang
Nisstyre has quit [Changing host]
Nisstyre has joined #ruby-lang
pkrnj has joined #ruby-lang
dhsmith has quit [Remote host closed the connection]
dhsmith has joined #ruby-lang
agarie has joined #ruby-lang
KA_ has joined #ruby-lang
kitallis has quit [Ping timeout: 248 seconds]
agarie has quit [Remote host closed the connection]
TerabyteST has joined #ruby-lang
micaeked has joined #ruby-lang
vlad_starkov has joined #ruby-lang
ryanf_ has quit [Quit: broken pipes |||]
agarie has joined #ruby-lang
sspiff has joined #ruby-lang
sspiff has joined #ruby-lang
sspiff has quit [Changing host]
TerabyteST has quit [Quit: terabytest]
ryanf has joined #ruby-lang
slyphon has quit [Quit: slyphon]
vlad_starkov has quit [Ping timeout: 276 seconds]
|Vargas| has joined #ruby-lang
|Vargas| has joined #ruby-lang
|Vargas| has quit [Changing host]
KA_ has quit [Quit: KA_]
kiddorails has joined #ruby-lang
Banistergalaxy has joined #ruby-lang
xalei has joined #ruby-lang
agarie has quit [Remote host closed the connection]
apeiros_ has quit [Remote host closed the connection]
dhruvasagar has joined #ruby-lang
jsilver has joined #ruby-lang
jsilver has quit [Remote host closed the connection]
jsilver has joined #ruby-lang
jsilver has quit [Client Quit]
pkrnj has quit [Ping timeout: 265 seconds]
dwu1 has quit [Read error: Connection reset by peer]
agarie has joined #ruby-lang
ivanoats has joined #ruby-lang
ivanoats has quit [Changing host]
ivanoats has joined #ruby-lang
chendo_ has joined #ruby-lang
ivanoats has quit [Ping timeout: 260 seconds]
sinclair has joined #ruby-lang
apeiros_ has joined #ruby-lang
alec__ has quit [Ping timeout: 252 seconds]
alec has joined #ruby-lang
serhart has quit [Quit: Leaving.]
gnufied has joined #ruby-lang
<andrewvos> Now he will never know about bundler :(
chendo_ has quit [Quit: Computer has gone to sleep.]
solars has joined #ruby-lang
crazyhorse18 has joined #ruby-lang
<crazyhorse18> anyone know of a nice ruby program that can do graphical coloured terminal outputted diffs?
ryanf has quit [Ping timeout: 248 seconds]
Mon_Ouie has joined #ruby-lang
richardburton has joined #ruby-lang
richardburton has quit [Ping timeout: 264 seconds]
opq is now known as jesse
dr_bob has joined #ruby-lang
<yorickpeterse> Morning
<yorickpeterse> crazyhorse18: graphical coloured terminal outputted....what?
<crazyhorse18> worked it out :)
<crazyhorse18> ruby gem
<crazyhorse18> diffy
gnufied has quit [Quit: Leaving.]
vlad_starkov has joined #ruby-lang
jxie has quit [Quit: leaving]
gnufied has joined #ruby-lang
karasawa has joined #ruby-lang
ryanf has joined #ruby-lang
charliesome has joined #ruby-lang
jbsan has joined #ruby-lang
judofyr has joined #ruby-lang
zmack has joined #ruby-lang
robbyoconnor has quit [Read error: Connection reset by peer]
robbyoconnor has joined #ruby-lang
headius has quit [Quit: headius]
megha has joined #ruby-lang
lsegal has quit [Quit: Quit: Quit: Quit: Stack Overflow.]
postmodern has quit [Quit: Leaving]
richardburton has joined #ruby-lang
robbyoconnor has quit [Read error: Connection reset by peer]
robbyoconnor has joined #ruby-lang
blacktulip has joined #ruby-lang
voker57 has joined #ruby-lang
tomzx has joined #ruby-lang
rue|w has joined #ruby-lang
alec has quit [Ping timeout: 248 seconds]
crazyhorse18 has quit [Ping timeout: 260 seconds]
<andrewvos> `git diff`
agarcia has joined #ruby-lang
alec has joined #ruby-lang
ryanf has quit [Quit: leaving]
marr has joined #ruby-lang
wudofyr has joined #ruby-lang
<judofyr> wudofyr: \o/
<gnufied> wudofyr: ?
<charliesome> wudofyr: hi
<judofyr> hm…
<judofyr> wudofyr is stuck :(
<judofyr> anyway
<judofyr> charliesome: you're way better at open-source than I :(
<judofyr> (after looking at the new GitHub profile design)
<charliesome> omg stalker
ryez has joined #ruby-lang
<judofyr> okay. goal for 2013: moar commits
<judofyr> moar pushes
<judofyr> moar open-source
<gnufied> every celebrity has some.
<richardburton> pink freud
<charliesome> it's annoying how 4 out of 5 'contributed' to repos is a private repo for me :(
<charliesome> or anyone with a job who happens to be logged in to github
<judofyr> yeah, I have 2558 totalt contributions when I'm logged in
<judofyr> just 375 when logged out :(
retro|cz has quit [Ping timeout: 248 seconds]
<judofyr> so
<judofyr> more open-sourc
<gnufied> crap
<judofyr> crap?
<gnufied> I have only 106 when logged out
<judofyr> how many when you're logged in?
<charliesome> what counts as a 'contribution'
<judofyr> commits?
<charliesome> oh
<gnufied> judofyr: 2645 for me, when logged in
<gnufied> charliesome wins
<judofyr> totally
<judofyr> he's a bad ass
<charliesome> i had so much time to kill in year 12
<charliesome> 2012*
<judofyr> lucky you
<judofyr> year 12
<charliesome> what with being in high school
<charliesome> most of my time this year will be going towards closed source stuff
<andrewvos> Why?
<gnufied> I think it is a shame, you need to logout to see, actual Open source contributions
<judofyr> I think I need to better prioritize my time
<judofyr> focus on one project at a time
<gnufied> lets start with porting better_errors to go?
<andrewvos> gnufied: Your commas make that look like an attempt at a haiku
<gnufied> andrewvos: you mean, it didn't read like one? :(
<charliesome> gnufied: you raise an interesting point
<charliesome> i wonder how many languages better_errors is actually possible in
<andrewvos> IS everyone trolling everyone I don't know what is going on
<judofyr> is this just fantasy?
<judofyr> charliesome: well, C has gdb ;)
<gnufied> I am waging war against rails, https://github.com/rails/rails/pull/7661
<gnufied> in which world it is okay to break API in minor release?
<charliesome> in ruby
<charliesome> rails is going to be breaking the best api ever soon :(
alec has quit [Quit: back at putzis, slothrop curls in a wide crisp sheeted bed beside solange, asleep and dreaming about zwolfkinder, and bianca smiling, he and she riding on the wheel, their compartment become a room, one hes never seen, a room in a great complex of apartm]
<andrewvos> judofyr: What *is* real?
richardburton has quit [Quit: Leaving.]
alec has joined #ruby-lang
<gnufied> charliesome: I feel rails is a headless chicken.
<andrewvos> Rails is one million headles chickens.
<gnufied> with no one really having a say in, what should go and what should not. it is party for all.
<gnufied> enough ranting for a day, I think. but really sad panda here.
<andrewvos> gnufied: Why are you sad?
agnitio has joined #ruby-lang
<gnufied> that is a good question.
<andrewvos> I'm sad because I've quit smoking and my patch is falling off.
18VAANK2W has joined #ruby-lang
<andrewvos> Shit is about to get real
<rue|w> Hold it in place between your forehead and a table
<gnufied> andrewvos: sorry, I have this biggish app which uses has_many :through quite a bit. and #7661 upset quite a few things
<jammi> andrewvos: try ecigs
<andrewvos> rue|w: I may just eat it
<andrewvos> gnufied: I can't possibly imagine what :through does :/
<andrewvos> jammi: I have tried them. Thing is, I would rather just go cold turkey than look like a tool with one of those giant fake cigarettes.
<jammi> patches and gum get you either too much or too little; adminstration is difficult or impossible
jds_ has quit [Ping timeout: 255 seconds]
<jammi> nah, less that a cig smoker
retro|cz has joined #ruby-lang
<jammi> besides, it's a thing where you need to think of your priorities over what ypu think others think abput you
setmeaway has quit [Ping timeout: 240 seconds]
gianlucadv has quit [Read error: Connection reset by peer]
jacktrick has joined #ruby-lang
workmad3 has joined #ruby-lang
gianlucadv has joined #ruby-lang
crazyhorse18 has joined #ruby-lang
<crazyhorse18> hey has ruby got some built in escaping functions for strings
<crazyhorse18> e.g. lets say i have the string blabla'blabla get it to change to bla\'bla or should i just use gsub?
GarethAdams has joined #ruby-lang
jxie has joined #ruby-lang
Rarrikins_l_e has joined #ruby-lang
tbuehlmann has joined #ruby-lang
<judofyr> crazyhorse18: you can use str.inspect
<judofyr> crazyhorse18: str.inspect[1..-2] to remove the quotes
<judofyr> crazyhorse18: but it depends on *how* you want to escape it though
emocakes has joined #ruby-lang
<judofyr> crazyhorse18: e.g. shell escaping should use shellwords, SQL escaping should use Sequel/ActiveRecord.
<badeball> removing characters of semantic meaning is not the same as escaping. by removing characters, you are effectively breaking the data and it can never be shown to the user as they inputed it.
<crazyhorse18> yeah it's for shell escaping
<crazyhorse18> well.. piping commands over ssh techniqually
<crazyhorse18> technically*
<judofyr> crazyhorse18: Shellwords.escape(…) for one value. Shellwords.join(["grep", "foo", "bar"]) for multiple values
<crazyhorse18> hmm i'm not sure if those apply to this command = "echo '#{content_escaped}' #{append} #{file_path_and_name}"
<crazyhorse18> notice that i've already got content_escaped inside single quotes
<judofyr> "echo '#{content_escaped}' #{Shellwords.join([append, file_path_and_name])}"
<crazyhorse18> content_escaped is the stuff i'm looking at
<crazyhorse18> there's some context :)
<badeball> crazyhorse18: you don't need quotes when using Shellwords. command = "echo #{Shellwords.escape(content)} #{append} #{file_path_and_name}"
micaeked has quit [Quit: WeeChat 0.3.9.2]
havenn_ has quit [Remote host closed the connection]
<crazyhorse18> oh ok
<badeball> from the previously linked doc: «Note that a resulted string should be used unquoted and is not intended for use in double quotes nor in single quotes.»
havenn has joined #ruby-lang
<crazyhorse18> ok testing it out
stevechiagozie has quit [Quit: Computer has gone to sleep.]
havenn has quit [Ping timeout: 264 seconds]
jacktrick has quit [Quit: Leaving]
<crazyhorse18> judofyr, badeball: worked very nicely
<crazyhorse18> thankyou
richardburton has joined #ruby-lang
<judofyr> crazyhorse18: nice!
tomzx has quit [Quit: tomzx]
<crazyhorse18> makes for some very easy code: https://gist.github.com/c50a5760c6b9b5a0c305
megha has quit [Quit: WeeChat 0.3.9.2]
<lianj> passwordless sudo, yay
dhruvasagar has quit [Quit: Lost terminal]
dhruvasagar has joined #ruby-lang
kiddorails has quit [Ping timeout: 246 seconds]
fjfish has joined #ruby-lang
francisfish has quit [Ping timeout: 272 seconds]
<judofyr> crazyhorse18: shouldn't append_remote_file call create_remote_file with sudo=true ?
<judofyr> err
<judofyr> append=true
<crazyhorse18> good spotting watson
<crazyhorse18> yeah hadn't tested that yet
io_syl has quit [Quit: Computer has gone to sleep.]
<injekt> huzzah
cultureulterior_ has joined #ruby-lang
havenn has joined #ruby-lang
megha has joined #ruby-lang
havenn has quit [Ping timeout: 248 seconds]
vlad_starkov has quit [Remote host closed the connection]
vlad_starkov has joined #ruby-lang
zarubin has quit [Ping timeout: 252 seconds]
security has joined #ruby-lang
retro|cz has quit [Ping timeout: 248 seconds]
security is now known as fire
megha has quit [Read error: Operation timed out]
srji has joined #ruby-lang
zarubin has joined #ruby-lang
wallerdev has quit [Quit: wallerdev]
jbsan has quit [Quit: jbsan]
zarubin has quit [Ping timeout: 264 seconds]
setmeaway has joined #ruby-lang
zarubin has joined #ruby-lang
zarubin has quit [Read error: Connection reset by peer]
zarubin has joined #ruby-lang
jacktrick has joined #ruby-lang
zarubin has quit [Read error: Connection reset by peer]
leopard_me has joined #ruby-lang
zarubin has joined #ruby-lang
havenn has joined #ruby-lang
wallerdev has joined #ruby-lang
fire has quit [Quit: WeeChat 0.3.9.2]
zarubin has quit [Read error: Connection reset by peer]
zarubin has joined #ruby-lang
wallerdev has quit [Client Quit]
karasawa has quit [Ping timeout: 276 seconds]
havenn has quit [Ping timeout: 276 seconds]
karasawa has joined #ruby-lang
<gokul> How I append text at the begining of a file ? this -- > File.open("test", "r+") { |f| f.write "text" } is not working as I expected ( removes a character from the next line)
Haribhau has joined #ruby-lang
Haribhau has quit [Client Quit]
<judofyr> gokul: prepending isn't easy
<judofyr> gokul: you pretty much have to create a new file
<heftig> create a new file, copy all the contents from the old file, then rename the new file over the old file
<gokul> Yeah, I thought there might be a cleaner way.
<gokul> :(
<richardburton> I just read through this: http://stackoverflow.com/questions/8623231/prepend-a-single-line-to-file-with-ruby. it's a lot trickier than i was expecting
<injekt> richardburton: how were you expecting it?
rcvalle has joined #ruby-lang
ivanoats has joined #ruby-lang
sinclair has left #ruby-lang [#ruby-lang]
<richardburton> injekt: I guess I just assume there's a neat method for almost everything in ruby :)
mercwithamouth has joined #ruby-lang
ivanoats has quit [Ping timeout: 265 seconds]
kgrz has joined #ruby-lang
agarie has quit [Remote host closed the connection]
agarie has joined #ruby-lang
agarie has quit [Ping timeout: 240 seconds]
<injekt> heh
megha has joined #ruby-lang
vlad_starkov has quit [Remote host closed the connection]
Banistergalaxy has quit [Ping timeout: 248 seconds]
megha has quit [Quit: WeeChat 0.3.9.2]
Banistergalaxy has joined #ruby-lang
aedorn has joined #ruby-lang
gokul has quit [Quit: Leaving]
mercwithamouth has quit [Ping timeout: 248 seconds]
JohnBat26 has joined #ruby-lang
retro|cz has joined #ruby-lang
thone_ has joined #ruby-lang
skepti has joined #ruby-lang
thone has quit [Ping timeout: 265 seconds]
xalei has quit [Remote host closed the connection]
megha has joined #ruby-lang
serhart has joined #ruby-lang
goshakkk has joined #ruby-lang
sailias has joined #ruby-lang
carloslopes has joined #ruby-lang
m3nd3s has joined #ruby-lang
sepp2k has joined #ruby-lang
setmeaway has quit [Quit: Leaving]
larrylv has joined #ruby-lang
vlad_starkov has joined #ruby-lang
tubbo has joined #ruby-lang
hagabaka has quit [Quit: No Ping reply in 180 seconds.]
hagabaka has joined #ruby-lang
gnufied has quit [Quit: Leaving.]
megha has quit [Quit: WeeChat 0.3.9.2]
crazyhorse18 has quit [Remote host closed the connection]
vlad_starkov has quit [Read error: Connection reset by peer]
vlad_starkov has joined #ruby-lang
megha has joined #ruby-lang
Rarrikins_l_e_g has joined #ruby-lang
Rarrikins_l_e has quit [Ping timeout: 248 seconds]
jacktrick has quit [Quit: Leaving]
richardburton has quit [Quit: Leaving.]
tubbo has quit [Ping timeout: 264 seconds]
itsmeduncan has joined #ruby-lang
Rarrikins_l_e_g_ has joined #ruby-lang
gnufied1 has joined #ruby-lang
Rarrikins_l_e_g has quit [Ping timeout: 248 seconds]
dr_bob has quit [Quit: Leaving.]
dr_bob has joined #ruby-lang
Rarrikins_l_e_g_ has quit [Ping timeout: 276 seconds]
Rarrikins_l_e_g_ has joined #ruby-lang
mercwithamouth has joined #ruby-lang
xcombelle has joined #ruby-lang
adambeynon has joined #ruby-lang
lcdhoffman has joined #ruby-lang
serhart has quit [Quit: Leaving.]
Rarrikins_l_e_g_ has quit [Ping timeout: 265 seconds]
Rarrikins_l_e_g_ has joined #ruby-lang
Rarrikins_l_e_g_ has quit [Ping timeout: 240 seconds]
Rarrikins has joined #ruby-lang
itsmeduncan has quit [Quit: itsmeduncan]
kurko__ has joined #ruby-lang
x0F has quit [Disconnected by services]
vlad_starkov has quit [Remote host closed the connection]
x0F_ has joined #ruby-lang
x0F_ is now known as x0F
Rarrikins_h has joined #ruby-lang
dustint has joined #ruby-lang
dhruvasagar has quit [Ping timeout: 248 seconds]
goshakkk has quit [Quit: Computer has gone to sleep.]
Rarrikins has quit [Ping timeout: 276 seconds]
kgrz has quit [Quit: Computer has gone to sleep.]
Rarrikins has joined #ruby-lang
Rarrikins_h has quit [Ping timeout: 255 seconds]
goshakkk has joined #ruby-lang
megha has quit [Quit: WeeChat 0.3.9.2]
Rarrikins_z has joined #ruby-lang
Rarrikins has quit [Ping timeout: 276 seconds]
carloslopes has quit [Remote host closed the connection]
sush24 has joined #ruby-lang
Rarrikins_z_a has joined #ruby-lang
Rarrikins_z has quit [Ping timeout: 240 seconds]
itsmeduncan has joined #ruby-lang
carloslopes has joined #ruby-lang
itsmeduncan has quit [Client Quit]
ericmuyser|air has joined #ruby-lang
jxie has quit [Quit: leaving]
aedorn has quit [Quit: Leaving]
sailias has quit [Quit: Leaving.]
goshakkk has quit [Quit: ["Textual IRC Client: www.textualapp.com"]]
mistym has joined #ruby-lang
srbaker has joined #ruby-lang
vlad_starkov has joined #ruby-lang
Banistergalaxy has quit [Ping timeout: 256 seconds]
mistym has quit [Remote host closed the connection]
madish has quit [Remote host closed the connection]
andremaha has joined #ruby-lang
megha has joined #ruby-lang
rsl has joined #ruby-lang
charliesome has quit [Quit: Textual IRC Client: www.textualapp.com]
thone has joined #ruby-lang
oddmunds has quit [Read error: Connection reset by peer]
s1n4 has joined #ruby-lang
s1n4 has quit [Client Quit]
thone_ has quit [Ping timeout: 252 seconds]
megha has quit [Quit: WeeChat 0.3.9.2]
scottschecter has quit [Quit: WeeChat 0.3.9.2]
gnufied1 has quit [Quit: Leaving.]
megha has joined #ruby-lang
scottschecter has joined #ruby-lang
jtoy has joined #ruby-lang
sailias has joined #ruby-lang
slyphon has joined #ruby-lang
dr_bob has quit [Quit: Leaving.]
willdrew_ has joined #ruby-lang
thone has quit [Ping timeout: 246 seconds]
megha has quit [Quit: WeeChat 0.3.9.2]
breakingthings has joined #ruby-lang
xalei has joined #ruby-lang
kiddorails has joined #ruby-lang
mistym has joined #ruby-lang
mistym has quit [Changing host]
mistym has joined #ruby-lang
lcdhoffman has quit [Quit: lcdhoffman]
dr_bob has joined #ruby-lang
<llaskin> https://gist.github.com/4484044 can anyone help me understand why I am not getting a string here?
jtoy has quit [Quit: jtoy]
<injekt> llaskin: because it returns an array of arrays
<injekt> and doing .to_s on an array in 1.9+ is inspection
<llaskin> so how can I get the string out of that?
slyphon has quit [Ping timeout: 255 seconds]
<injekt> result.to_a.flatten.first
<injekt> you were close almost every time :)
Nisstyre-laptop has joined #ruby-lang
<llaskin> injekt: TY VM!
megha has joined #ruby-lang
<judofyr> llaskin: you don't need the flatten though: row = result.to_a[0]; value = row[0]
<injekt> sure if you want two statements
<llaskin> which would be "Better coding practice"?
<injekt> what judofyr wrote doesn't require an extra operation
<injekt> and it makes more logical sense
<injekt> so use that
<llaskin> ok ty
<judofyr> you'll have to check if row is nil though
<llaskin> ok
<judofyr> because there might be zero rows
joshcheek has quit [Quit: joshcheek]
<llaskin> yea since I'm working in a closed system, I don't reallllly have to worry about that
<injekt> also you can use .first instead of .to_a[0]
<ericwood> "this used to be an open system..."
mercwithamouth has quit [Ping timeout: 252 seconds]
<ericwood> .first will work on anything that's enumerable
<ericwood> which is nice, and it reads better
Nisstyre-laptop has quit [Quit: Leaving]
carloslopes has quit [Remote host closed the connection]
megha has quit [Quit: WeeChat 0.3.9.2]
<llaskin> so why not pp result.first[0]?
<ericwood> result.first.first
toretore has joined #ruby-lang
<llaskin> probably cleanest that way no?
<ericwood> probably
kiddorails has quit [Ping timeout: 276 seconds]
lcdhoffman has joined #ruby-lang
thone has joined #ruby-lang
andremaha has quit [Quit: Colloquy for iPhone - http://colloquy.mobi]
outoftime has joined #ruby-lang
thone has quit [Ping timeout: 240 seconds]
megha has joined #ruby-lang
vlad_starkov has quit [Remote host closed the connection]
nkr has joined #ruby-lang
joshcheek has joined #ruby-lang
lcdhoffman has quit [Quit: lcdhoffman]
joshcheek has quit [Client Quit]
<judofyr> llaskin: that will fail if there's zero results though
<judofyr> but yeah, good catch on .first
lcdhoffman has joined #ruby-lang
jtoy has joined #ruby-lang
megha has quit [Quit: WeeChat 0.3.9.2]
breakingthings has quit []
kiddorails has joined #ruby-lang
serhart has joined #ruby-lang
imajes has quit [Excess Flood]
imajes has joined #ruby-lang
kiddorails has quit [Ping timeout: 256 seconds]
slyphon has joined #ruby-lang
mistym_ has joined #ruby-lang
carloslopes has joined #ruby-lang
mistym_ has quit [Remote host closed the connection]
mistym_ has joined #ruby-lang
megha has joined #ruby-lang
faces has quit [Read error: No route to host]
mistym has quit [Remote host closed the connection]
mistym_ has left #ruby-lang [#ruby-lang]
mistym has joined #ruby-lang
sinclair has joined #ruby-lang
sinclair has left #ruby-lang [#ruby-lang]
Denommus has joined #ruby-lang
<Denommus> hi
mercwithamouth has joined #ruby-lang
melter has quit [Remote host closed the connection]
<Denommus> I was trying to install box2d gem, but when I require it, I get the following error: http://pastie.org/5648536
voker57_ has joined #ruby-lang
jtoy_ has joined #ruby-lang
reactormonk has quit [Ping timeout: 260 seconds]
<imperator> Denommus, ruby version? platform?
voker57 has quit [Ping timeout: 248 seconds]
srbaker has quit [Quit: Computer has gone to sleep.]
<Denommus> I find it strange that box2d does not build, just installs
<imperator> precompiled binary?
<Denommus> imperator: Arch Linux, ruby 1.9.3p362
<imperator> my experience with that particular error is 32v64 bit issue
srbaker has joined #ruby-lang
<Denommus> hm
<Denommus> I'm running a 64 bits system, yes
carloslopes has quit [Ping timeout: 248 seconds]
<Denommus> should I download the source code, then?
<imperator> i just did
<imperator> you can do "gem unpack box2d" to just download the source of a gem without installing it
jtoy has quit [Ping timeout: 264 seconds]
jtoy_ is now known as jtoy
<imperator> yep, precompiled binary
<imperator> pretty rare to see that for any platform other than windows
<imperator> there's a .bundle file, too
reactormonk has joined #ruby-lang
<Denommus> I tried to install it via bundler
<imperator> that won't force it to compile or anything
<imperator> this is a weird gem
<imperator> literally all there is - ext/box2d.bundle and ext/box2d.so
<Denommus> ... yeah, really strange
<Denommus> I think I'll try chipmunk instead, then
<imperator> yeah, i would avoid this one
<Denommus> thank you
scottschecter has quit [Quit: WeeChat 0.3.9.2]
oddmunds has joined #ruby-lang
kiddorails has joined #ruby-lang
<imperator> yw
carloslopes has joined #ruby-lang
megha has quit [Quit: WeeChat 0.3.9.2]
megha has joined #ruby-lang
thone has joined #ruby-lang
kiddorails has quit [Ping timeout: 255 seconds]
bfreeman has quit [Quit: bfreeman]
megha has quit [Quit: WeeChat 0.3.9.2]
jxie has joined #ruby-lang
<retro|cz> Is there any better way to achieve 'items = items - other_items' ?
xcombelle has quit [Remote host closed the connection]
<injekt> no
<injekt> well
thone_ has joined #ruby-lang
<injekt> it depends how much you care about memory and speed I guess
<retro|cz> just curious if there is something like items = items + other_items => items << other_items
<injekt> they dont do the same thing
thone has quit [Ping timeout: 252 seconds]
<judofyr> not at all actually
<judofyr> retro|cz: `items = items + other_items` is pretty similar to `items.concat other_items`
<injekt> ^
<judofyr> the first creates a new array, the other modifies it
<retro|cz> judofyr, injekt yup, I know about that.
<judofyr> ah
<retro|cz> I understand.
<judofyr> oki
<judofyr> if you want to remove, I'd use delete_if: items.delete_if { |x| other_items.include?(x) }
<injekt> so using delete_if would probably be quicker than re assigning
<injekt> hah
<injekt> good timing
srji has quit [Ping timeout: 248 seconds]
<retro|cz> :)
<andrewvos> showterm.io is unbelievably cool
<judofyr> if you're doing this on many items, I'd probably use a Set instead
<retro|cz> I was thinking about that.
Nisstyre has quit [Ping timeout: 260 seconds]
<judofyr> andrewvos: oh, another one :)
imajes has quit [Excess Flood]
<retro|cz> I'm just prototyping eshop cart service for now.
kiddorails has joined #ruby-lang
<judofyr> andrewvos: I've seen a few of those
imajes has joined #ruby-lang
<judofyr> anyway
<judofyr> gotta go
hell_razer has quit [Quit: Leaving]
<judofyr> l8r gøys
<andrewvos> judofyr: First one I've seen
blahwoop has joined #ruby-lang
judofyr has quit []
<andrewvos> judofyr: Peace bro
<andrewvos> *fistbang*
<injekt> ugh fistbang
<blahwoop> whoa whoa whoa
<blahwoop> kinda early for any type of banging
<injekt> andrewvos: c'mon bro, fist pump is way less ambiguous
bantic has joined #ruby-lang
<andrewvos> blahwoop: It's late for me
<andrewvos> injekt: That sounds more sexual
<imperator> brogrammers?
davidbalber|away is now known as davidbalbert
<injekt> andrewvos: at least it's like 2nd base, yours is like straight in for the kill
<andrewvos> hehe
francisfish has joined #ruby-lang
methods has joined #ruby-lang
fjfish has quit [Ping timeout: 255 seconds]
sailias has quit [Quit: Leaving.]
kiddorails has quit [Read error: Operation timed out]
|Vargas| has quit [Quit: ...]
lcdhoffman has quit [Quit: lcdhoffman]
sailias has joined #ruby-lang
apeiros_ has quit [Remote host closed the connection]
<andrewvos> banister?
<andrewvos> What code did he want me to try refactor?
methods has left #ruby-lang [#ruby-lang]
rue|w has quit [Read error: No route to host]
rue|w has joined #ruby-lang
* whitequark reads backlog
<whitequark> what the hell
slyphon_ has joined #ruby-lang
<andrewvos> Shit wrong channel again
<injekt> gtfo
* andrewvos goes to #ruby
thone_ has quit [Ping timeout: 248 seconds]
<injekt> :D
bradland has joined #ruby-lang
<whitequark> inkjet: why so rude
<yorickpeterse> injekt is being funny today
<injekt> just today?
<andrewvos> HILARIOUS
<whitequark> yorickpeterse: you're misspelling his nick!
<andrewvos> Ink Jet
* whitequark imagines an old HP printer each time.
<injekt> har
breakingthings has joined #ruby-lang
<injekt> you guys
<andrewvos> you guuuuuyyyyyysssss
slyphon has quit [Ping timeout: 264 seconds]
slyphon_ is now known as slyphon
rue|w has quit [Remote host closed the connection]
<yorickpeterse> gais
nkr is now known as nkr|afk
kiddorails has joined #ruby-lang
<andrewvos> I'll just leave this here: conferencequotas.com
* imperator waves to slyphon
<slyphon> ohai!
<slyphon> andrewvos: omg, the caremad
<yorickpeterse> andrewvos: great way of that author to completely miss the point
<andrewvos> DISCLAIMER: I do not associate myself in any way with that link.
<slyphon> andrewvos: nope, sorry, too ate
<slyphon> late*
lcdhoffman has joined #ruby-lang
<imperator> no backsies!
zmack has quit [Remote host closed the connection]
kiddorails1 has joined #ruby-lang
* imperator visits rubydramas.com to check for the latest
<andrewvos> imperator: _why is back, but everyone is too scared that they are hurting him by noticing that he is back.
<imperator> whatever
<andrewvos> imperator: I was telling you the latest rubydrama
<imperator> i mean, if he's back, great, but i'm not going to tip toe around people "in case it drives them away"
ssl has joined #ruby-lang
kiddorails has quit [Ping timeout: 260 seconds]
<blahwoop> _why is back
<blahwoop> zomg
havenn has joined #ruby-lang
<imperator> well, sorta it seems
<andrewvos> Hold your horses, I'm not sure he is... He did put some weird shit on hs site though.
thone has joined #ruby-lang
nkr|afk is now known as nkr
thone has quit [Ping timeout: 260 seconds]
kiddorails1 has quit [Ping timeout: 260 seconds]
lcdhoffman has quit [Quit: lcdhoffman]
rondale_sc has joined #ruby-lang
Rarrikins_z_a has quit [Ping timeout: 256 seconds]
rondale_sc has left #ruby-lang [#ruby-lang]
Rarrikins has joined #ruby-lang
roolo has joined #ruby-lang
justinram has joined #ruby-lang
madish has joined #ruby-lang
rins has joined #ruby-lang
Rarrikins has quit [Ping timeout: 246 seconds]
KA__ has joined #ruby-lang
Rarrikins_c has joined #ruby-lang
countdigi has joined #ruby-lang
stevechiagozie has joined #ruby-lang
apeiros_ has joined #ruby-lang
sush24 has quit [Ping timeout: 252 seconds]
Rarrikins_c_f has joined #ruby-lang
kiddorails has joined #ruby-lang
Rarrikins_c has quit [Ping timeout: 240 seconds]
blazes816 has joined #ruby-lang
agarcia has quit [Quit: Konversation terminated!]
dr_bob has left #ruby-lang [#ruby-lang]
Rarrikins_c_f has quit [Ping timeout: 255 seconds]
srji has joined #ruby-lang
Rarrikins_c_f has joined #ruby-lang
justinram has quit [Remote host closed the connection]
xdccMule[7619HZ] has joined #ruby-lang
<whitequark> andrewvos: why does he miss the point?
garlo has joined #ruby-lang
<whitequark> errrr
<whitequark> yorickpeterse: ^ that
<andrewvos> whitequark: I think you'll find that I didn't say that.
<andrewvos> :)
garlo has quit [Remote host closed the connection]
<yorickpeterse> whitequark: because it's not going to help anything, even if it's meant to be a funny
<yorickpeterse> If anything it's going to piss people off even more
<yorickpeterse> having said that I did chuckle on some of the questions
Rarrikins_c_f_r has joined #ruby-lang
<andrewvos> haha yeah and read below the questions
Rarrikins_c_f has quit [Ping timeout: 248 seconds]
xdccMule[7619HZ] has quit [Quit: mIRC xdccMule URL: http://www.xdccmule.altervista.org]
lcdhoffman has joined #ruby-lang
lcdhoffman has quit [Client Quit]
ssl has quit [Remote host closed the connection]
Rarrikins_c_f_r has quit [Ping timeout: 248 seconds]
Rarrikins_c_f_r has joined #ruby-lang
Nisstyre has joined #ruby-lang
<whitequark> yorickpeterse: hm. that makes sense.
<andrewvos> It's comedy. People need to get pissed off
kiddorails has quit [Ping timeout: 260 seconds]
breakingthings has quit []
zhul_mechanos has joined #ruby-lang
TerabyteST has joined #ruby-lang
Spaceghostc2c has quit [Excess Flood]
rue has quit [Remote host closed the connection]
rue has joined #ruby-lang
Rarrikins_c_f_r has quit [Ping timeout: 240 seconds]
Guest49926 has joined #ruby-lang
justinram has joined #ruby-lang
Rarrikins has joined #ruby-lang
elux has joined #ruby-lang
agnitio has quit [Quit: Leaving]
Rarrikins_x has joined #ruby-lang
carloslopes has quit [Remote host closed the connection]
gregmoreno has joined #ruby-lang
kiddorails has joined #ruby-lang
megha has joined #ruby-lang
ssl has joined #ruby-lang
Rarrikins has quit [Ping timeout: 276 seconds]
bfreeman has joined #ruby-lang
Rarrikins_x_m has joined #ruby-lang
Rarrikins_x_m_w has joined #ruby-lang
Rarrikins_x has quit [Ping timeout: 255 seconds]
bfreeman has quit [Read error: Connection reset by peer]
emocakes has quit [Quit: emocakes]
kiddorails1 has joined #ruby-lang
bfreeman has joined #ruby-lang
headius has joined #ruby-lang
Rarrikins_x_m has quit [Ping timeout: 240 seconds]
Rarrikins_x_m_w_ has joined #ruby-lang
kiddorails has quit [Ping timeout: 276 seconds]
Rarrikins_x_m_w has quit [Ping timeout: 252 seconds]
kiddorails1 has quit [Read error: Connection reset by peer]
kiddorails has joined #ruby-lang
megha has quit [Quit: WeeChat 0.3.9.2]
Rarrikins_x_m_w_ has quit [Ping timeout: 256 seconds]
Rarrikins_x_m_w_ has joined #ruby-lang
crosspath has joined #ruby-lang
Denommus has quit [Remote host closed the connection]
kiddorails has quit [Ping timeout: 276 seconds]
Guest49926 has quit [Excess Flood]
llaskin has left #ruby-lang [#ruby-lang]
adambeynon has quit [Quit: ["Textual IRC Client: www.textualapp.com"]]
m3nd3s has quit [Remote host closed the connection]
bradland has quit [Quit: bradland]
wallerdev has joined #ruby-lang
Spaceghostc2c_ has joined #ruby-lang
KA__ has quit [Quit: KA__]
Rarrikins_x_m_w_ has quit [Ping timeout: 276 seconds]
Rarrikins has joined #ruby-lang
bantic_ has joined #ruby-lang
bantic has quit [Read error: Connection reset by peer]
bantic_ is now known as bantic
Rarrikins has quit [Ping timeout: 252 seconds]
Rarrikins has joined #ruby-lang
kiddorails has joined #ruby-lang
kiddorails has quit [Read error: Connection reset by peer]
karasawa has quit [Quit: leaving]
karasawa has joined #ruby-lang
bfreeman_ has joined #ruby-lang
mrsolo has joined #ruby-lang
__butch__ has joined #ruby-lang
wyhaines has joined #ruby-lang
Rarrikins has quit [Ping timeout: 246 seconds]
Rarrikins has joined #ruby-lang
Paradox has quit [Ping timeout: 245 seconds]
bfreeman has quit [Ping timeout: 248 seconds]
TerabyteST has quit [Quit: terabytest]
emocakes has joined #ruby-lang
crosspath has quit [Quit: Konversation terminated!]
Paradox has joined #ruby-lang
Rarrikins has quit [Ping timeout: 248 seconds]
Rarrikins has joined #ruby-lang
megha has joined #ruby-lang
anachronistic has joined #ruby-lang
kiddorails has joined #ruby-lang
srji has quit [Ping timeout: 248 seconds]
__butch__ has quit [Quit: Leaving.]
__butch__ has joined #ruby-lang
Spaceghostc2c_ is now known as Spaceghostc2c
RickHull has joined #ruby-lang
gnufied1 has joined #ruby-lang
io_syl has joined #ruby-lang
mrsolo has quit [Quit: This computer has gone to sleep]
alvaro_o has joined #ruby-lang
mrsolo has joined #ruby-lang
rondale_sc has joined #ruby-lang
workmad3 has quit [Ping timeout: 248 seconds]
melter has joined #ruby-lang
kogent has joined #ruby-lang
karasawa has quit [Ping timeout: 248 seconds]
davidbalbert is now known as davidbalber|away
jtoy has quit [Quit: jtoy]
digital-ghost has joined #ruby-lang
jtoy has joined #ruby-lang
digital-ghost has left #ruby-lang [#ruby-lang]
megha has quit [Quit: WeeChat 0.3.9.2]
GarethAdams has quit [Quit: Leaving...]
ivanoats has joined #ruby-lang
srji has joined #ruby-lang
kiddorails has quit [Ping timeout: 252 seconds]
pkrnj has joined #ruby-lang
dankest has joined #ruby-lang
karasawa has joined #ruby-lang
cultureulterior_ has quit [Quit: cultureulterior_]
mercwithamouth has quit [Ping timeout: 252 seconds]
elux has quit [Quit: Bye!]
harmon has joined #ruby-lang
goshakkk has joined #ruby-lang
mercwithamouth has joined #ruby-lang
dous has quit [Ping timeout: 255 seconds]
kiddorails has joined #ruby-lang
retro|cz has quit [Ping timeout: 248 seconds]
jtoy has quit [Quit: jtoy]
harmon has quit [Client Quit]
harmon has joined #ruby-lang
<harmon> Hi Rubyists! Anyone know of a Gem to generate an Entity Relationship Diagram after running a piece of code? One that is dynamic, not like Railroad or something Rails specific.
m3nd3s has joined #ruby-lang
kiddorails has quit [Ping timeout: 248 seconds]
<apeiros_> uh, railroad is dynamic?
<apeiros_> you may want to take a look at dot (the language)
<harmon> Hmm... well, I was hoping not to have to write the ruby library myself, but if I do, I will definitely check it out! Thanks
hahuang65_ has joined #ruby-lang
brianpWins has quit [Quit: brianpWins]
mistym is now known as mistym_lunch
srji_ has joined #ruby-lang
bantic has quit [Read error: Connection timed out]
bantic has joined #ruby-lang
srji has quit [Ping timeout: 248 seconds]
jano has joined #ruby-lang
jano has left #ruby-lang [#ruby-lang]
mrsolo has quit [Quit: This computer has gone to sleep]
kiddorails has joined #ruby-lang
KA__ has joined #ruby-lang
mrsolo has joined #ruby-lang
rippa has joined #ruby-lang
kogent has quit [Quit: kogent]
davidbalber|away is now known as davidbalbert
kogent has joined #ruby-lang
jtoy has joined #ruby-lang
gnufied1 has quit [Quit: Leaving.]
alvaro_o_ has joined #ruby-lang
alvaro_o has quit [Read error: Connection reset by peer]
Rarrikins has quit [Ping timeout: 276 seconds]
kiddorails has quit [Read error: Connection reset by peer]
roolo has quit [Quit: Linkinus - http://linkinus.com]
banisterfiend has joined #ruby-lang
karasawa has quit [Ping timeout: 240 seconds]
brianpWins has joined #ruby-lang
breakingthings has joined #ruby-lang
marr has quit [Ping timeout: 255 seconds]
Nisstyre has quit [Ping timeout: 248 seconds]
justinra_ has joined #ruby-lang
sepp2k1 has joined #ruby-lang
sepp2k has quit [Read error: Connection reset by peer]
justinram has quit [Ping timeout: 248 seconds]
gregmoreno has quit [Read error: Connection reset by peer]
justinram has joined #ruby-lang
gregmoreno has joined #ruby-lang
ivanoats has quit [Remote host closed the connection]
<RickHull> question about minitest/spec -- it seems geared for somewhat general statements, but i have a specific test case written in plain ruby, no assertions even
justinra_ has quit [Ping timeout: 265 seconds]
<RickHull> so i have a static PIN value, a PAN value, and an encryption key
<RickHull> also a known PIN block value, given the PIN and PAN, and a known encrypted PIN block value given the above
<RickHull> making a pastie. i'd like to convert my paste to spec format, or maybe something else more appropriate
goshakkk has quit [Quit: Computer has gone to sleep.]
glebm has quit [Ping timeout: 252 seconds]
ebouchut has joined #ruby-lang
<canton7> RickHull, each time you do a "if foo != bar", thhat marks the last bit in a test case before the next test case starts
<canton7> each if block should be replaced by an assertion
<RickHull> yeah, no doubt
<canton7> and, where you puts "pin_fmt failed", that info goes in the name of the test
davidbalbert is now known as davidbalber|away
<canton7> that's about it :P
<RickHull> ok
<canton7> so split it up into separate test cases just after those 'if's, with the 'if's being replaced by assertions
<RickHull> i keep feeling like my should text would be something like "do the right thing"
<RickHull> i.e. it's hard to say in english, and i just want to make sure the known-good values are being calculated
<RickHull> maybe spec isn't the right approach here
<RickHull> ?
<canton7> that's pretty much what unit tests are
<canton7> points of known-good inputs and outputs in a big field of possible inputs and outputs
<RickHull> yep
<canton7> I don't know minitest at all, but I'd use rspec for doing that no problem
ssl has quit [Remote host closed the connection]
<RickHull> yeah minitest/spec is modeled on rspec "the good parts"
<andrewvos> minitest is nice
<RickHull> (as i understand)
<andrewvos> bacon looks great as an rspec replacement
sulo has joined #ruby-lang
davidbalber|away is now known as davidbalbert
Mon_Ouie has quit [Quit: WeeChat 0.3.9.2]
larrylv has quit [Remote host closed the connection]
lcdhoffman has joined #ruby-lang
<RickHull> i like minitest for not being an external dependency, light and fast, does what i need, and zenspider
havenn has quit [Remote host closed the connection]
havenn has joined #ruby-lang
sulo has quit [Remote host closed the connection]
havenn has quit [Ping timeout: 252 seconds]
KA__ has quit [Quit: KA__]
imm has joined #ruby-lang
<banisterfiend> RickHull: bacon is pretty nice too
<RickHull> i've been out of the loop for a while, i'll take a look
ssl_ has joined #ruby-lang
ssl_ has quit [Ping timeout: 255 seconds]
larrylv has joined #ruby-lang
leopard_me has quit [Quit: Computer has gone to sleep.]
larrylv has quit [Remote host closed the connection]
ssl_ has joined #ruby-lang
larrylv has joined #ruby-lang
rins has quit [Read error: Connection reset by peer]
larrylv has quit [Remote host closed the connection]
kogent has quit [Quit: kogent]
goshakkk has joined #ruby-lang
rins has joined #ruby-lang
serhart has quit [Quit: Leaving.]
rippa has quit [Ping timeout: 240 seconds]
serhart has joined #ruby-lang
ivanoats has joined #ruby-lang
ivanoats has quit [Changing host]
ivanoats has joined #ruby-lang
justinra_ has joined #ruby-lang
Skitsu`work has joined #ruby-lang
justinram has quit [Ping timeout: 260 seconds]
imm1 has joined #ruby-lang
havenn has joined #ruby-lang
tshine has quit [Ping timeout: 245 seconds]
srji_ has quit [Ping timeout: 248 seconds]
tshine has joined #ruby-lang
imm has quit [Ping timeout: 256 seconds]
m3nd3s has quit [Remote host closed the connection]
kogent has joined #ruby-lang
bantic_ has joined #ruby-lang
bantic has quit [Read error: Connection reset by peer]
bantic_ is now known as bantic
marr has joined #ruby-lang
karasawa has joined #ruby-lang
ebouchut has quit [Quit: This computer has gone to sleep]
postmodern has joined #ruby-lang
dankest is now known as dankest|away
agile has quit [Remote host closed the connection]
karasawa has quit [Ping timeout: 260 seconds]
JohnBat26 has quit [Quit: KVIrc 4.3.1 Aria http://www.kvirc.net/]
pkrnj has quit [Quit: Computer has gone to sleep.]
agile has joined #ruby-lang
<andrewvos> banisterfiend: You know after you bigging up nested contexts the other day, I found myself missing them.
<andrewvos> Not sure if it's a real thing.
mistym_lunch is now known as mistym
larrylv has joined #ruby-lang
harmon has quit [Ping timeout: 245 seconds]
dustint has quit [Remote host closed the connection]
jashank has quit [Excess Flood]
tbuehlmann has quit [Remote host closed the connection]
jashank has joined #ruby-lang
dustint has joined #ruby-lang
dustint_ has joined #ruby-lang
dustint_ has quit [Client Quit]
imm1 has left #ruby-lang [#ruby-lang]
kogent has quit [Quit: kogent]
larrylv has quit [Ping timeout: 240 seconds]
sulo has joined #ruby-lang
zmack has joined #ruby-lang
<RickHull> qq about minitest -- right now i'm running tests at the bottom of the file being tested, under if __FILE__ == $0
sulo has quit [Remote host closed the connection]
<RickHull> i know i should have it in a separate file with rake integration etc
<RickHull> but the tests don't seem to run here
bfreeman_ has quit [Read error: Connection reset by peer]
ryanf has joined #ruby-lang
cjs226 has joined #ruby-lang
bfreeman has joined #ruby-lang
kogent has joined #ruby-lang
kogent has quit [Client Quit]
anachronistic has left #ruby-lang [#ruby-lang]
kogent has joined #ruby-lang
kogent has quit [Remote host closed the connection]
tbuehlmann has joined #ruby-lang
<lianj> RickHull: require 'minitest/autorun'
<RickHull> ah ok
kogent has joined #ruby-lang
bfreeman_ has joined #ruby-lang
bfreeman has quit [Read error: Connection reset by peer]
solars has quit [Ping timeout: 240 seconds]
kogent has quit [Quit: kogent]
bzb has joined #ruby-lang
benanne has joined #ruby-lang
sepp2k1 has quit [Read error: Connection reset by peer]
<yorickpeterse> andrewvos: if this is related to bacon, it has nested contexts
<yorickpeterse> they just weren't displayed correctly until in the most recent version
<andrewvos> yorickpeterse: I know
<andrewvos> That was my point.
<andrewvos> I want them for some tests I was writing.
<andrewvos> wanted*
sepp2k has joined #ruby-lang
pbjorklund has joined #ruby-lang
<blahwoop> is httparty better or nokogiri
wmoxam has joined #ruby-lang
<andrewvos> blahwoop: They are dofferent things.
<andrewvos> different
<andrewvos> *
<yorickpeterse> what the fuck
<yorickpeterse> httpary is an HTTP library, Nokogiri is for parsing XML
srji has joined #ruby-lang
<blahwoop> o
<blahwoop> noob question
<blahwoop> dont ban me
<yorickpeterse> wat
chrismcg has joined #ruby-lang
<blahwoop> ithought they were both for scraping sites
KA_ has joined #ruby-lang
dankest|away is now known as dankest
<blahwoop> just ignore me
<blahwoop> no clue wtf im talkin about lol
carloslopes has joined #ruby-lang
<havenn> blahwoop: Nokogiri is the premier HTTP/XML parser gem while HTTParty is one good choice amongst many HTTP/REST API gems (Faraday, Rest-Client, Mechanize, etc. being other very nice gem options)
<RickHull> i can think of some non-slick ways to do this, but is there a slick way to tell if a number is a power of 2?
Axsuul has quit [Remote host closed the connection]
<RickHull> a ceiling at e.g. 2**10 is fine
<RickHull> validating key lengths. was going to do key % 8 == 0
<blahwoop> thanks
<RickHull> cool
<manveru> >> n = 2**42; n & n-1 == 0
<manveru> => true
<manveru> easy as that :)
<RickHull> slick AND fast. bonus!
<RickHull> definitely adding a comment for that one ;)
<manveru> yeah, sometimes ruby is really comfy :)
<havenn> blahwoop: If you're interested in learning about the various Ruby HTTP clients, Nakamura-san gave a great talk at RubyConf this year!: http://www.confreaks.com/videos/1271-rubyconf2012-ruby-http-clients-comparison
<manveru> havenn: thanks
<manveru> handy for someone like me who tries to stick to Net::HTTP whenever possible
Axsuul has joined #ruby-lang
<havenn> manveru: He did a google spreadsheet laying out gem features that is pretty amazing imho! http://bit.ly/RubyHTTPClients2012
<yorickpeterse> manveru: httpclient is pretty sweet
carloslopes has quit [Read error: Connection reset by peer]
<havenn> manveru: Really a nice reference, I need to put it in an easier to reach bookmark. :D
ivanoats has quit [Remote host closed the connection]
<havenn> yorickpeterse: I haven't tried httpclient yet, but I wanna!
<yorickpeterse> I'd say it's one of the few non bloated http libs that gets things right
imajes has quit [Excess Flood]
<yorickpeterse> the API is also pleasant to work with, no including/class method bullshit to deal with
<havenn> blahwoop: P.S., Err, I wrote HTTP/XML client above and I meant **HTML/XML**.
<blahwoop> thanks
<manveru> yorickpeterse: looks nice :)
<havenn> yorickpeterse: I like the idea of pure Ruby implementation, not relying on net/http.
<blahwoop> when will there be a rubyconference in nyc?
imajes has joined #ruby-lang
<havenn> blahwoop: Hrmm, I dunno about NYC. I think LA's is coming up soon, thanks for reminding me!
tbuehlmann has quit [Quit: Yaaic - Yet another Android IRC client - http://www.yaaic.org]
Gate has joined #ruby-lang
<yorickpeterse> manveru: yeah, `HTTPClient.new.get('whatever')` is so much better than `class Derp; include HTTParty; end; Derp.get('...')`
<havenn> Yup, LA RubyConf Feb 23: http://www.larubyconf.com
<manveru> yorickpeterse: i never used anything like that
<manveru> but yes, that sounds horrible :P
<yorickpeterse> that's the HTTParty API sadly
<manveru> it's bad enough that i have to do that in FFI
<yorickpeterse> Faraday is a bit better but it feels like a fat pig to me
<havenn> yorickpeterse: Hard for a jack-of-all-trades to be skinny!
<yorickpeterse> The only gripe I have with httpclient is that status verification is a pita
<yorickpeterse> from the top of my head it was something like HTTPClient.valid_status(response.status) or something along those lines
nyuszika7h has quit [Remote host closed the connection]
Nisstyre has joined #ruby-lang
<yorickpeterse> whereas all the others just have `response.success?`
<manveru> my old boss wrote the rest gem that wraps excon, net::http, rest_client, and typhoeus
bzb_ has joined #ruby-lang
<manveru> hm
ivanoats has joined #ruby-lang
ivanoats has quit [Changing host]
ivanoats has joined #ruby-lang
carloslopes has joined #ruby-lang
<yorickpeterse> manveru: did you find a new job yet?
nyuszika7h has joined #ruby-lang
<manveru> no
<havenn> manveru: Yeah, Nahi left Typhoeus off his comparison - I think cause he said they were working on a major rewright and he'd include it next time.
<yorickpeterse> hrm
srji has quit [Ping timeout: 248 seconds]
<manveru> doing a couple of interviews while working on rubyists stuff
<havenn> *write*
ivanoats has quit [Remote host closed the connection]
<manveru> no big fan of typhoeus, they change their api a lot it seems
<yorickpeterse> Ah found it: HTTP::Status.successful?(response.status)
tshine has quit [Ping timeout: 252 seconds]
<manveru> oh well, that's not too bad
<manveru> just hard to remember
<manveru> and hard to find
<manveru> but they can always make it more comfortable later if many complain :)
<manveru> in my experience not many check response status or handle them...
<yorickpeterse> sadly
rdw200169 has quit [Read error: Connection reset by peer]
GarethAdams has joined #ruby-lang
GarethAdams has quit [Changing host]
GarethAdams has joined #ruby-lang
rdw200169 has joined #ruby-lang
towski has joined #ruby-lang
<yorickpeterse> manveru: I have a Ruby meetup next week, I'll see if anybody is looking for Ruby devs that can work remote
ssl_ has quit [Remote host closed the connection]
<blahwoop> whats considered a junior ruby dev?
<blahwoop> 2 years?
<yorickpeterse> Usually juniors are people who start their first job
<havenn> ^
<yorickpeterse> it's not directly tied into age/years of experience
<yorickpeterse> though that depends a bit from job to job I think
<blahwoop> i see
<manveru> yorickpeterse: cool, thanks :)
<blahwoop> i went through a web dev course recently
<manveru> yorickpeterse: no doubt booking.com guys will be there...
<blahwoop> tryin to get an internship or something where i can learn
<havenn> blahwoop: NYC? Apply to CodeSchool?
<blahwoop> i went through GA's dev immersive
<yorickpeterse> manveru: actually I haven't seen them on any yet
<yorickpeterse> At least not on the Ruby specific ones
ivanoats has joined #ruby-lang
<blahwoop> is code school worth the 25 bucks
bantic has quit [Read error: Connection timed out]
<havenn> blahwoop: Oops, I meant HackerSchool!
<blahwoop> general assembly paid for our peepcode sub
<manveru> yorickpeterse: ok, i know they always look for perl and go devs
<havenn> blahwoop: In Brooklyn
<manveru> but no remote work :(
<blahwoop> oh yeah hackerschool
<havenn> blahwoop: https://www.hackerschool.com
<yorickpeterse> manveru: Perl yes, Go is new to me
<blahwoop> ive heard of them
<yorickpeterse> at any given time Booking.com will have at least a handful of job offers out to join the ranks of code monkeys
<havenn> blahwoop: Cool girls/guys, a friend of mine just did 3-mo there and got a job at Etsy I think.
<blahwoop> whoa nice
<blahwoop> was he a noob
<Gate> blahwoop: depending on where you live, mailing your local ruby mailing list usually will get some interest
<blahwoop> ok i will try that
<yorickpeterse> * interesting
<blahwoop> im in nyc
<ivanoats> I'll be teaching at a new school in Seattle: http://codefellows.com
<ivanoats> also comes with a job guarantee
<blahwoop> ive heard about them
<yorickpeterse> "LEARN TO CODE. GET A JOB.GUARANTEED." that's a pretty bold statement
<yorickpeterse> unless you hire the people yourself :)
<havenn> blahwoop: You should really talk to the HackerSchool folks, its free and free lunch - they get paid if you get a job.
<havenn> ivanoats: Nice!
<manveru> yorickpeterse: i have the feeling it's true for the US
<blahwoop> ill submit my late application
<blahwoop> their fizzbuzz isn't too bad
<yorickpeterse> ivanoats: small tip: teach Ruby not Rails, then teach X
<havenn> ivanoats: How much do you screen applicants?
aedorn has joined #ruby-lang
<ivanoats> yorickpeterse: I agree, but codefellows starts with Rails. The UW Certificate in Ruby, which I also teach for, starts with ruby http://abid.es/uwrubycert
<yorickpeterse> heh, certificates
<ivanoats> but that's a 30 week program
<blahwoop> damn
<manveru> wow
<blahwoop> when i search nyc ruby i only get meetups
<ggreer> I think someone's github profile is more interesting than any cert
<ivanoats> havenn: I'm not screening for codefellows so I can't really say much about it. Online profile, application, etc.
<manveru> issue with certs is that there seems to be no cert for good certs :)
<yorickpeterse> yes there is
<yorickpeterse> turktrust
<ggreer> you are talking of accreditation
sailias has quit [Quit: Leaving.]
<yorickpeterse> blahwoop: http://www.meetup.com/NYC-rb/
<havenn> "TURKTRUST Officials Say No Evidence of Malice in Certificate Incident"
<blahwoop> thanks
<ggreer> fortunately, chrome has a whitelist of CAs for many popular domains
<ivanoats> To be honest, I have seen some certifications that weren't worth much. But one from a large accredited public university (Univ. of Washington) is good!
<ggreer> so you can't MitM google.com if the client is chrome
<manveru> i think i did a ruby cert once, took 15 minutes on freelancer.com, and most questions were so awful, i wanted to quit like 4 times :P
<yorickpeterse> these days certificates come in the form of forks and stars on Github
<manveru> so i spend around 10 minutes of that time writing comments about how awful it is
<yorickpeterse> oh and shiny build status images
<manveru> yeah
zeisler has joined #ruby-lang
<manveru> do we have one?
<yorickpeterse> For Ramaze? No
<blahwoop> i thought it was stackoverflow rep
<blahwoop> lol
<yorickpeterse> cbf adding one, not very useful either
bantic has joined #ruby-lang
<havenn> blahwoop: Note, Github!
<manveru> SO is very tedious
<yorickpeterse> We get Email spammed anyway if it breaks
<havenn> s/Note/Nope
cjs226 has quit []
<manveru> yorickpeterse: just for people to know
<manveru> plus it looks neat
slyphon has quit [Ping timeout: 240 seconds]
JMcAfreak has quit [Quit: They're coming to take me away, ha-haa!]
<manveru> anw, heading home, bbl
JMcAfreak has joined #ruby-lang
bzb_ has quit [Quit: Leaving]
willdrew_ has quit [Remote host closed the connection]
rondale_sc has quit [Quit: rondale_sc]
charliesome has joined #ruby-lang
ssl has joined #ruby-lang
goshakkk has quit [Quit: Computer has gone to sleep.]
xalei has quit [Ping timeout: 252 seconds]
workmad3 has joined #ruby-lang
m3nd3s has joined #ruby-lang
imperator has quit [Quit: This computer has gone to sleep]
pkrnj has joined #ruby-lang
blahwoop has quit [Ping timeout: 245 seconds]
kogent has joined #ruby-lang
kogent has quit [Remote host closed the connection]
kogent has joined #ruby-lang
bzb has quit [Quit: Leaving]
m3nd3s has quit [Remote host closed the connection]
serhart has quit [Quit: Leaving.]
dankest is now known as dankest|away
toretore has quit [Quit: Leaving]
sush24 has joined #ruby-lang
__butch__ has quit [Quit: Leaving.]
havenn has quit [Remote host closed the connection]
havenn has joined #ruby-lang
asdfqwer has joined #ruby-lang
<freedrull> if your class has two internal collaborators(i.e. not passed in) whats a good way to test that without mocking? should i rethink my design?
agarie has joined #ruby-lang
havenn has quit [Ping timeout: 255 seconds]
davidbalbert is now known as davidbalber|away
<injekt> freedrull: test the public api which in turn should test your internals
bantic has quit [Read error: Connection reset by peer]
bantic has joined #ruby-lang
tomzx has joined #ruby-lang
thone has joined #ruby-lang
toretore has joined #ruby-lang
<freedrull> injekt: now im gonna end up with some deep stubbing....bleh...
RickHull has left #ruby-lang [#ruby-lang]
<injekt> freedrull: why?
wyhaines has quit [Remote host closed the connection]
slyphon has joined #ruby-lang
zmack has quit [Remote host closed the connection]
<freedrull> injekt: said collaborators have more dependecies
headius has quit [Quit: headius]
<injekt> freedrull: that means nothing to me
<injekt> freedrull: show some code
dankest|away is now known as dankest
<freedrull> sorry, ill try to come up with more specific questions, need to think more...
spuk has joined #ruby-lang
Nisstyre has quit [Ping timeout: 256 seconds]
m3nd3s has joined #ruby-lang
dustint has quit [Quit: Leaving]
srji has joined #ruby-lang
thone has quit [Ping timeout: 265 seconds]
thone has joined #ruby-lang
zhul_mechanos has quit [Quit: zhul_mechanos]
breakingthings has quit []
jtoy has quit [Quit: jtoy]
srji has quit [Ping timeout: 248 seconds]
blacktulip has quit [Remote host closed the connection]
carloslopes has quit [Remote host closed the connection]
JMcAfreak has quit [Quit: leaving]
mistym has quit [Remote host closed the connection]
bantic has quit [Quit: bantic]
zenspider has quit [Quit: Terminated with extreme prejudice - dircproxy 1.1.0]
davidbalber|away is now known as davidbalbert
ivanoats has quit [Remote host closed the connection]
asdfqwer has quit []
slyphon has quit [Ping timeout: 255 seconds]
pkrnj has quit [Quit: Computer has gone to sleep.]
havenn has joined #ruby-lang
francisfish has quit [Remote host closed the connection]
m3nd3s has quit [Remote host closed the connection]
spuk has quit [Ping timeout: 255 seconds]
serhart has joined #ruby-lang
spuk has joined #ruby-lang
srji has joined #ruby-lang
Nisstyre has joined #ruby-lang
benanne has quit [Quit: kbai]
dankest has quit [Quit: Leaving...]
srji has quit [Client Quit]
sailias has joined #ruby-lang
mistym has joined #ruby-lang
mistym has quit [Changing host]
mistym has joined #ruby-lang
slyphon has joined #ruby-lang
jtoy has joined #ruby-lang
workmad3 has quit [Ping timeout: 265 seconds]
emocakes has quit [Quit: emocakes]
mjio has joined #ruby-lang
xsdg has quit [Ping timeout: 276 seconds]
apeiros_ has quit [Remote host closed the connection]
KA_ has quit [Quit: KA_]
jtoy has quit [Quit: jtoy]
KA_ has joined #ruby-lang
mpan has joined #ruby-lang
xsdg has joined #ruby-lang
mercwithamouth has quit [Ping timeout: 255 seconds]
ssl has quit [Remote host closed the connection]
mercwithamouth has joined #ruby-lang
rins has quit [Ping timeout: 255 seconds]
dankest has joined #ruby-lang
dous has joined #ruby-lang
dous has joined #ruby-lang
Nisstyre has quit [Ping timeout: 260 seconds]
nkr has quit [Remote host closed the connection]
stevechiagozie has quit [Quit: Computer has gone to sleep.]
carloslopes has joined #ruby-lang
tubbo has joined #ruby-lang