havenwood changed the topic of #ruby to: Rules & more: http://ruby-community.com || Ruby 2.2.3; 2.1.7; 2.0.0-p647: https://ruby-lang.org || Paste >3 lines of text on https://gist.github.com || log @ http://irclog.whitequark.org/ruby/
<shevy> I more care about the end point than the steps towards it
<shevy> and having to debug stuff always feels like a complete waste of time
<al2o3-cr> shevy: bypass them depends., do you like coding?
uber_ has quit [Quit: bye]
<shevy> not really
jsrn has quit [Ping timeout: 246 seconds]
<al2o3-cr> shevy: Why not?
terlar has quit [Ping timeout: 255 seconds]
<al2o3-cr> shevy: No story is perfect, without...
<shevy> al2o3-cr because I feel that the end point is more important than the intermediary step. mankind in the future won't need to program the way we used to do it
<al2o3-cr> shevy: you don't feel the love do you!
jsrn has joined #ruby
<VeryBewitching> Code doesn't love.
<VeryBewitching> It executes.
<VeryBewitching> Well, hopefully it does anyway. ;)
<al2o3-cr> VeryBewitching: very observbant
<shevy> al2o3-cr yeah. I like the process of creating something that works
<al2o3-cr> shevy: Why?
mistermocha has joined #ruby
<VeryBewitching> If you look at the trend of how we're defining new languages to write code, we're moving away from an exclusive club of individuals who write all the code to languages that will allow anyone to do it.
freerobby has quit [Quit: Leaving.]
Azure has quit [Ping timeout: 255 seconds]
rbennacer has joined #ruby
<VeryBewitching> In 30 - 40 years people will learn how to do it in elementary school.
<shevy> al2o3-cr because that is the part that is creative
graffix has quit [Read error: Connection reset by peer]
devoldmx has joined #ruby
<al2o3-cr> shevy: What does it give you?
graffix has joined #ruby
<shevy> al2o3-cr which part
<al2o3-cr> shevy: the creative part
mistermocha has quit [Ping timeout: 250 seconds]
<shevy> al2o3-cr aaah. ideas! ideas build on ideas, you have to watch more Alan Kay lectures
<al2o3-cr> Why, he's only made of what is everything, isn't he?
<shevy> unless you can break the rules of the universe that's valid for everyone
devoldmx has quit [Ping timeout: 260 seconds]
markfletcher has joined #ruby
<al2o3-cr> shevy: whatever you tink, Mr.
<al2o3-cr> Ruby gives me satisfaction
freerobby has joined #ruby
<al2o3-cr> understand the concepts or behold them
last_staff has quit [Quit: last_staff]
mistermocha has joined #ruby
Brando753 has quit [Excess Flood]
to_json has quit [Quit: Leaving.]
Brando753 has joined #ruby
jsrn has quit [Ping timeout: 240 seconds]
DenSchub has quit [Ping timeout: 246 seconds]
bMalum has quit [Quit: bMalum]
karapetyan has quit [Remote host closed the connection]
mistermocha has quit [Ping timeout: 246 seconds]
bruno- has joined #ruby
jsrn has joined #ruby
DenSchub has joined #ruby
to_json has joined #ruby
to_json has joined #ruby
opensource_ninja has joined #ruby
h99h9h88 has quit [Remote host closed the connection]
trosborn has quit [Quit: trosborn]
Meeh has quit [Quit: No Ping reply in 180 seconds.]
mistermocha has joined #ruby
terlar has joined #ruby
bruno- has quit [Ping timeout: 265 seconds]
Meeh has joined #ruby
<Ox0dea> VeryBewitching: Execution can be an act of love.
opensource_ninja has quit [Client Quit]
<Ox0dea> shevy: For what other things is the destination more important than the journey for you?
<VeryBewitching> Ox0dea: That statement can lead to some interesting philosophical discussion, but what the machine does is not emotional; our investment into the code is.
symm- has quit [Ping timeout: 244 seconds]
<Ox0dea> VeryBewitching: Only meat can feel, yeah?
mag42c has quit [Quit: mag42c]
<VeryBewitching> Ox0dea: That depends on the meat.
mistermocha has quit [Ping timeout: 240 seconds]
<Ox0dea> VeryBewitching: But your position is that there are at present no non-meat feelers, yes?
<VeryBewitching> Ox0dea: My position is that I have felt for code, I've never experienced code that has felt for me.
kalusn has joined #ruby
<VeryBewitching> Ox0dea: I can't comment on other entities that I have not witnessed.
wnd has quit [Ping timeout: 260 seconds]
wnd has joined #ruby
<Ox0dea> VeryBewitching: Then you confess to having no basis on which to conclude that the transistors don't derive some altruistic satisfaction in performing the work we give them.
<VeryBewitching> Ox0dea: If I were to confess that, you would also have to confess to having no basis to determine that they do.
<VeryBewitching> Ox0dea: We can talk about ideas, the abstract lands we visit in our mind when we're deep in our creations, but neither of us know what the logic gates can or cannot feel.
<VeryBewitching> Ox0dea: Unless you've had meangingful conversations with a 64-bit processor lately :D
<al2o3-cr> VeryBewitching: go suck a dummie or summat
<VeryBewitching> al2o3-cr: I don't even know what you just said.
cashnguns has joined #ruby
markfletcher has left #ruby [#ruby]
<al2o3-cr> VeryBewitching: it's a compliment
* VeryBewitching shrugs.
<VeryBewitching> If you say so :D
Azure has joined #ruby
<al2o3-cr> tool
StevenXL has joined #ruby
<StevenXL> Hi everyone.
<StevenXL> I need to make a request to an API like so:
tlaxkit has joined #ruby
<StevenXL> In that example, they use curl and the --data-binary option.
<havenwood> al2o3-cr: Be nice.
<StevenXL> How can I do effectively the same thing in Ruby?
saddad has quit [Ping timeout: 244 seconds]
mistermocha has joined #ruby
kirun has quit [Remote host closed the connection]
c355E3B has quit [Quit: Connection closed for inactivity]
arooni has joined #ruby
mistermocha has quit [Ping timeout: 268 seconds]
l_tonz has quit [Remote host closed the connection]
saddad has joined #ruby
ElFerna has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<Ox0dea> StevenXL: Are you sure you need to emulate `--data-binary`? That just does a POST without URL-encoding anything; that can be done with Net::HTTP#post and a plain-ol' String.
<shevy> Ox0dea life, for instance
towski_ has quit [Remote host closed the connection]
skade has joined #ruby
DLSteve has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<Ox0dea> shevy: Uh... what?
<StevenXL> Ox0dea, I'm not sure. I can try it as you've suggested.
<StevenXL> :-)
<StevenXL> I'll be back.
<Ox0dea> StevenXL: Godspeed.
<StevenXL> toodles
DiCablo has joined #ruby
<al2o3-cr> StevenXL: set the Content-Type to octet-stream
taylorrf has joined #ruby
<Ox0dea> But consider not bothering.
tulak has quit [Remote host closed the connection]
markfletcher has joined #ruby
mistermocha has joined #ruby
<al2o3-cr> bothered meh
hmsimha_ has quit [Ping timeout: 265 seconds]
Dakuan has joined #ruby
markfletcher has quit [Client Quit]
skade has quit [Ping timeout: 268 seconds]
arooni has quit [Ping timeout: 240 seconds]
BlackCoyote has quit [Remote host closed the connection]
Rollabunna has joined #ruby
sankaber has joined #ruby
weemsledeux has joined #ruby
<al2o3-cr> jesus f c open links lee
DLSteve has joined #ruby
mag42c has joined #ruby
mistermocha has quit [Ping timeout: 265 seconds]
but3k4 has joined #ruby
Dakuan has quit [Ping timeout: 264 seconds]
notnoyyyyy has quit [Ping timeout: 252 seconds]
ledestin has joined #ruby
rgtk has joined #ruby
rgtk has quit [Read error: No route to host]
Rollabunna has quit [Ping timeout: 244 seconds]
rgtk has joined #ruby
gguggi has quit [Ping timeout: 255 seconds]
mistermocha has joined #ruby
bubbys has joined #ruby
rgtk has quit [Read error: No route to host]
rgtk has joined #ruby
DiCablo has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
Rickmasta has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
rgtk has quit [Read error: No route to host]
rgtk has joined #ruby
weemsledeux has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
JammyHammy has quit [Read error: Connection reset by peer]
<StevenXL> Ox0dea, Do I have to create a uri object first?
<Ox0dea> StevenXL: Shouldn't be necessary, no.
yfeldblum has quit [Ping timeout: 240 seconds]
rgtk has quit [Read error: No route to host]
to_json has quit [Quit: Leaving.]
mistermocha has quit [Ping timeout: 250 seconds]
rgtk has joined #ruby
<StevenXL> but I do have to create a new Net:HTTP object. I was wondering if you could clarify on the path argument. Is that the full API endpoint, including auth keys, or the base?
<StevenXL> I can try both.
s00pcan has quit [Ping timeout: 264 seconds]
yqt has quit [Ping timeout: 268 seconds]
<Ox0dea> StevenXL: You do need a Net::HTTP instance, yes, and you construct one with a server and an optional port.
rgtk has quit [Read error: No route to host]
rgtk has joined #ruby
s00pcan has joined #ruby
<Ox0dea> StevenXL: #post can be called several ways, but since you're supplying data (as the second argument) instead of name-value pairs, you'll have to include the query parameters in the path (the first argument).
<StevenXL> ah got it!
<StevenXL> that's what was confusing me.
rgtk has quit [Read error: No route to host]
<StevenXL> I was passing them into Net::HTTP.new.
rgtk has joined #ruby
l_tonz has joined #ruby
rgtk has quit [Read error: No route to host]
rgtk has joined #ruby
<StevenXL> I get some kind of socket error. This is what my Net::HTTP instance looks like
<StevenXL> #<Net::HTTP https://extract-beta.api.smartystreets.com:80 open=false>
<StevenXL> I called that variable res
rgtk has quit [Read error: Connection reset by peer]
<StevenXL> then I did res.post("auth-id=akcb&auth-token=abcd", data), and I've set the data variable to the string I want to pass in.
<StevenXL> Note that those are not my real auth keys / id
<al2o3-cr> StevenXL: ssl 443
<StevenXL> But I get that socket error.
<StevenXL> al2o3-cr, I need to set it in the Net::HTTP instance?
<Ox0dea> StevenXL: `res.use_ssl = true`
rgtk_ has joined #ruby
mistermocha has joined #ruby
<marahin> hello. What would be the best way to set variable to a value of conditional block, e.g. var = Array.each{ |item| item if item=="name" }?
<marahin> Is there any way to do that?
blackmesa has joined #ruby
<Ox0dea> marahin: Are you sure that's what you want to do?
TheNet has quit [Remote host closed the connection]
<marahin> Ox0dea, I want to get a one liner of all the items that match, yes.
<Ox0dea> marahin: You want #select.
rgtk_ has quit [Read error: No route to host]
rgtk has joined #ruby
<marahin> Ox0dea, thank you
<Ox0dea> marahin: Sure thing.
<Ox0dea> marahin: If you've got all Strings, you might even consider #grep.
<Ox0dea> >> %w[foo bar baz].grep(/a/)
<ruboto> Ox0dea # => ["bar", "baz"] (https://eval.in/461358)
rgtk has quit [Read error: No route to host]
rgtk has joined #ruby
blackmes1 has quit [Ping timeout: 252 seconds]
<StevenXL> Ox0dea, al2o3-cr I think I'm getting somewhere.
<StevenXL> I'm getting this resposne now
d34th4ck3r has joined #ruby
<StevenXL> #<Net::HTTPBadRequest 400 Bad Request readbody=true>
<al2o3-cr> ?code StevenXL
<ruboto> StevenXL, We can't help you without your code, please post it to https://gist.github.com
<StevenXL> I had to do this: http.verify_mode = OpenSSL::SSL::VERIFY_NONE
freerobby has quit [Quit: Leaving.]
mistermocha has quit [Ping timeout: 264 seconds]
<marahin> Ox0dea, nah, I have a complicated hash I need to look upon, what I wrote was just an example of what I though would work and would be the easiest to implement
<marahin> thank you very much for your help, I looked .select up and it works like a charm
sankaber has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<Ox0dea> marahin: Ah, all right, then. Happy to have helped.
rgtk has quit [Read error: No route to host]
rgtk has joined #ruby
<StevenXL> ruboto, sorry about that
Rickmasta has joined #ruby
taylorrf has quit [Remote host closed the connection]
juanpablo__ has joined #ruby
rgtk has quit [Read error: No route to host]
yfeldblum has joined #ruby
Channel6 has joined #ruby
rgtk has joined #ruby
<Ox0dea> StevenXL: Stick a '/' before the '?' on Line 7.
vigintas has quit [Ping timeout: 264 seconds]
rgtk has quit [Read error: No route to host]
saddad has quit [Ping timeout: 265 seconds]
rgtk has joined #ruby
<StevenXL> woot woot!!
<StevenXL> awesome
<StevenXL> thank you both
horsecowdog has quit [Remote host closed the connection]
<StevenXL> Ox0dea, thanks!
<Ox0dea> StevenXL: Sure thing.
rgtk has quit [Read error: No route to host]
juanpablo__ has quit [Ping timeout: 255 seconds]
<al2o3-cr> StevenXL: Net::HTTP.post_form(URI('https://extract-beta.api.smartystreets.com/'), { "?auth-id" => "id", "auth-token" => "id"}) # shortcut
rbennacer has quit [Remote host closed the connection]
rgtk has joined #ruby
<dorei> is there some ruby testing framework where i could provide it with a set of inputs and a set of expected outputs ?
<Ox0dea> al2o3-cr: StevenXL needs to send data along as well.
<Ox0dea> dorei: Why not just replace with $stdin and $stdout with StringIO instances and do "regular" testing?
<Ox0dea> -with
<al2o3-cr> ah, should read more carefully
rgtk has quit [Read error: No route to host]
marr has quit [Ping timeout: 252 seconds]
<StevenXL> hehe no worries. I couldn't have gotten this to work w/o both your helps
<StevenXL> very grateful.
<StevenXL> I should probably go home now.
<StevenXL> It's late and getting cold.
<Ox0dea> Pleasure meeting you.
rgtk has joined #ruby
<dorei> Ox0dea: both rspec and minitest give me the impression that their philosophy is like one assertion/expectation per case
<StevenXL> Same here Ox0dea. I will surely be back.
TheNet has joined #ruby
<Ox0dea> dorei: And your IO is crazy enough as to not fit well within that model?
<Ox0dea> StevenXL: Looking forward to it. :)
StevenXL has quit [Quit: Leaving]
<dorei> Ox0dea: it's not IO, i'm refering to input in a more generic way
<al2o3-cr> StevenXL: you'll become a Ruby ninja in no time :)
<Ox0dea> dorei: Parameters, then?
<al2o3-cr> he gone :(
rgtk has quit [Read error: Connection reset by peer]
baroquebobcat has joined #ruby
rgtk has joined #ruby
solocshaw has quit [Remote host closed the connection]
<dorei> Ox0dea: let's say it's a method that adds two numbers, i think that both rspec/minitest promote something like doing a test that 2 + 3 is 5, i want something like: i give it100 pairs of numbers to added and 100 expected results
solocshaw has joined #ruby
Vile` has quit [Remote host closed the connection]
<Ox0dea> dorei: Do you want to come up with those 100 numbers yourself?
rgtk has quit [Read error: No route to host]
<Ox0dea> *100 pairs
Rennex has quit [Ping timeout: 240 seconds]
<dorei> maybe, usually i already have that list
rgtk has joined #ruby
<Ox0dea> dorei: Then you need only realize that the test frameworks are "just Ruby".
mistermocha has joined #ruby
<dorei> of course
fedexo has quit [Remote host closed the connection]
<dorei> i could enumerate my inputs and expect to much the enumerated outputs
TheNet has quit [Ping timeout: 240 seconds]
<Ox0dea> dorei: pairs.each { |a, b| my_add(a, b).must_equal(a + b) }
mag42c has quit [Quit: mag42c]
Vile` has joined #ruby
<Ox0dea> You can just stick assertions/expectations in loops.
<dorei> so, that's the only way to do it?
<Ox0dea> What alternative would you prefer?
rgtk has quit [Read error: No route to host]
rgtk has joined #ruby
Yzguy has joined #ruby
<dorei> well, maybe something that has two directories, one input and one output and i just throw files into there, i dont know
rbennacer has joined #ruby
baroquebobcat has quit [Quit: baroquebobcat]
<al2o3-cr> nokogiri/hpricot ?
<Ox0dea> Oga.
rgtk has quit [Read error: No route to host]
<Ox0dea> dorei: That could certainly be orchestrated.
<al2o3-cr> just out of them two?
<Ox0dea> False dichotomy.
rgtk has joined #ruby
<al2o3-cr> nokogiri kills any hands down and drawn
zenguy_pc has quit [Ping timeout: 268 seconds]
mistermocha has quit [Ping timeout: 264 seconds]
rgtk has quit [Read error: No route to host]
<dorei> if u manage to install nokogiri, i think it's really good, at least when it comes to xpath queries
lipoqil has quit [Quit: Connection closed for inactivity]
rgtk has joined #ruby
<al2o3-cr> dorei: why would you not be able to install it?
<Ox0dea> libxml2.
<Ox0dea> I've never had that problem, but it's extremely common. :<
<pwnd_nsfw> If you're using windows...
<dorei> yeap
DiCablo has joined #ruby
<pwnd_nsfw> It can be a pain
<pwnd_nsfw> but lol devving on windows
<dorei> and in linux too, gem install nokogiri doesnt work for me
kalusn has quit [Remote host closed the connection]
<Ox0dea> dorei: Distro?
<al2o3-cr> it comes with libxml2
mndoci has joined #ruby
<pwnd_nsfw> I haven't had any problems with Ubuntu 15.04
<pwnd_nsfw> I was so relieved to not run into gem issues
rgtk has quit [Read error: No route to host]
<pwnd_nsfw> Because I was using Windows prior.....
<dorei> i have to use this:
<dorei> gem install nokogiri -- --use-system-libraries --with-xml2-config=/usr/bin/xml2-config --with-xslt-config=/usr/bin/xslt-config
<al2o3-cr> pwnd_nsfw: get rid of wind*z
rgtk has joined #ruby
<pwnd_nsfw> al2o3-cr, I would, but, like, games
<pwnd_nsfw> Wine/PlayOnLinux is shit
nertzy has joined #ruby
<al2o3-cr> pwnd_nsfw: true
<pwnd_nsfw> So, basically, I have laptop setup for dev work
<pwnd_nsfw> But really, what I do is SSH to Linux machine and still do the actual coding part on Windows lol
solocshaw has quit [Remote host closed the connection]
<pwnd_nsfw> I do it to pretend I have multiple monitors, tbh
rgtk has quit [Read error: No route to host]
solocshaw has joined #ruby
m3_del has quit [Remote host closed the connection]
<al2o3-cr> dorei: what OS?
rgtk has joined #ruby
<pwnd_nsfw> and would it also matter how he installed Ruby?
<al2o3-cr> pwnd_nsfw: no
<al2o3-cr> dorei: pretty self explanitory really
A124 has quit [Ping timeout: 268 seconds]
m3_del has joined #ruby
<al2o3-cr> dorei: debian by any chance?
rgtk has quit [Read error: No route to host]
rbennacer has quit [Remote host closed the connection]
rgtk has joined #ruby
A124 has joined #ruby
Channel6 has quit [Quit: Leaving]
<dorei> al2o3-cr: opensuse 11.2
tkuchiki has joined #ruby
<Ox0dea> shevy: I realize now that you must've been referring to an afterlife; I do hope you took no offense from my confusion.
<al2o3-cr> dorei: whats `gem -v` say
<dorei> Ox0dea: i think what i'm looking for is data tables feature of cucumber without using cucumber :)
rgtk has quit [Read error: No route to host]
VladGh has joined #ruby
<dorei> al2o3-cr: 2.4.8
but3k4 has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
rgtk has joined #ruby
s00pcan has quit [Ping timeout: 240 seconds]
ScoppoTutteLeFig has joined #ruby
<Ox0dea> dorei: Damn! I vaguely remember coming across something that fits that description to all 5 Ts.
<ScoppoTutteLeFig> where italian ruby channel?
DEA7TH has quit [Quit: DEA7TH]
eminencehc has quit [Remote host closed the connection]
<Ox0dea> ScoppoTutteLeFig: #ruby-it is dead.
<ScoppoTutteLeFig> what happened?
rgtk has quit [Read error: No route to host]
<Ox0dea> English.
<al2o3-cr> dorei: sudo zypper in libxml2-devel libxslt-devel
<ScoppoTutteLeFig> i remember sex hookup with girl from italian channel
<ScoppoTutteLeFig> i want to find her again
rgtk has joined #ruby
CVTJNII has quit [Ping timeout: 240 seconds]
<ScoppoTutteLeFig> she was quite very nice
s00pcan has joined #ruby
<dorei> Ox0dea: 5 Ts = ?
m3_del has quit [Ping timeout: 256 seconds]
<Ox0dea> >> 'data tables feature of cucumber without using cucumber'.count ?t # dorei
<ruboto> Ox0dea # => 5 (https://eval.in/461360)
<dorei> al2o3-cr: i already have them
Rennex has joined #ruby
<Ox0dea> dorei: It's usually "fits to a T"; I was being cute.
rgtk has quit [Read error: No route to host]
rgtk has joined #ruby
<ScoppoTutteLeFig> are you not cute Ox0dea?
zenguy_pc has joined #ruby
<al2o3-cr> ScoppoTutteLeFig: 2121 do one
<ScoppoTutteLeFig> ?
<al2o3-cr> clown
<ScoppoTutteLeFig> al2o3-cr:
<ScoppoTutteLeFig> ?
rgtk has quit [Read error: No route to host]
l_tonz has quit [Ping timeout: 268 seconds]
<ScoppoTutteLeFig> ?
<ScoppoTutteLeFig> al2o3-cr:
skade has joined #ruby
<ScoppoTutteLeFig> robot?
rgtk has joined #ruby
l_tonz has joined #ruby
CVTJNII has joined #ruby
rgtk has quit [Read error: Connection reset by peer]
<al2o3-cr> Ox0dea: how'd you get the essid of AP using Fiddle?
rgtk has joined #ruby
<Ox0dea> dorei: Gah, I've not found it yet, but I'm almost certain it was something Gary Bernhardt used in an episode of Destroy All Software.
<al2o3-cr> Ox0dea: is it possible?
Dakuan has joined #ruby
Rennex has quit [Ping timeout: 260 seconds]
<Ox0dea> al2o3-cr: Are you asking if libpcap is a thing?
kaskalu has joined #ruby
rgtk has quit [Read error: No route to host]
horsecowdog has joined #ruby
<al2o3-cr> libpcap is a thing, do you know how?
rgtk has joined #ruby
<al2o3-cr> would love to know :)
<Ox0dea> al2o3-cr: There's good reason to suspect more than one function is involved, but Fiddle can wrap pretty much any C function, so why not give it a shot?
rgtk has quit [Read error: Connection reset by peer]
rgtk has joined #ruby
<Ox0dea> As an aside, you should probably consider whether Ruby is the right tool here.
skade has quit [Ping timeout: 256 seconds]
Dakuan has quit [Read error: Connection reset by peer]
haraoka has joined #ruby
rgtk has quit [Read error: Connection reset by peer]
Dakuan has joined #ruby
<al2o3-cr> Ox0dea: well you could get it using raw sockets, but wondering how you would do it using fiddle
rgtk has joined #ruby
<al2o3-cr> depending if your NIC supported monitor mode
radgeRayden has joined #ruby
mary5030 has joined #ruby
beast has joined #ruby
rakm has joined #ruby
rgtk_ has joined #ruby
rgtk has quit [Read error: No route to host]
mary5030 has quit [Remote host closed the connection]
mary5030 has joined #ruby
rgtk_ has quit [Read error: No route to host]
rgtk has joined #ruby
Dakuan has quit [Ping timeout: 260 seconds]
blackmesa has quit [Ping timeout: 252 seconds]
<Ox0dea> al2o3-cr: I would just shell out.
Contigi has joined #ruby
<Ox0dea> "Ponies for courses", as they say.
mh_laakso has quit [Remote host closed the connection]
rgtk has quit [Read error: No route to host]
<al2o3-cr> Ox0dea: Is it possible?
rgtk has joined #ruby
devoldmx has joined #ruby
<Ox0dea> al2o3-cr: No, definitely not.
<al2o3-cr> Ox0dea: Is that a cert?
<Ox0dea> Most assuredly.
<al2o3-cr> How come?
ScoppoTutteLeFig has quit [Quit: http://www.kiwiirc.com/ - A hand crafted IRC client]
rgtk has quit [Read error: No route to host]
rgtk has joined #ruby
<Ox0dea> Because computers hate us.
<al2o3-cr> No, why?
rgtk has quit [Read error: No route to host]
<dorei> al2o3-cr: have you checked packetfu ?
rgtk has joined #ruby
leafybasil has quit [Remote host closed the connection]
<al2o3-cr> dorei: yeah, that's not question though :)
Rennex has joined #ruby
devoldmx has quit [Ping timeout: 256 seconds]
horsecowdog has quit []
rgtk has quit [Read error: No route to host]
tvon has quit [Quit: Textual IRC Client: www.textualapp.com]
rgtk has joined #ruby
tvon has joined #ruby
mag42c has joined #ruby
rgtk has quit [Read error: No route to host]
mag42c has quit [Client Quit]
arooni has joined #ruby
rgtk has joined #ruby
rgtk has quit [Read error: No route to host]
rgtk has joined #ruby
mndoci has quit [Remote host closed the connection]
TheNet has joined #ruby
musou has quit [Quit: Connection closed for inactivity]
mndoci has joined #ruby
rgtk has quit [Read error: No route to host]
colegatron has quit [Ping timeout: 240 seconds]
DLSteve has quit [Quit: Textual IRC Client: www.textualapp.com]
rgtk has joined #ruby
mary5030 has quit [Remote host closed the connection]
rgtk has quit [Read error: No route to host]
mary5030 has joined #ruby
OrbitalKitten has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
cwong_on_irc has joined #ruby
rgtk has joined #ruby
<shevy> hmm how to chop a string up into 3 characters each? so that 'ABCDEFGHI' would become ['ABC','DEF','GHI']?
<havenwood> >> 'ABCDEFGHI'.scan /.../
<ruboto> havenwood # => ["ABC", "DEF", "GHI"] (https://eval.in/461361)
mndoci has quit [Ping timeout: 244 seconds]
mistermocha has joined #ruby
rgtk has quit [Read error: No route to host]
<havenwood> >> 'ABCDEFGHI'.each_char.each_slice(3).map &:join
<ruboto> havenwood # => ["ABC", "DEF", "GHI"] (https://eval.in/461362)
<al2o3-cr> havenwood: i was gonna say that
rgtk has joined #ruby
mistermo_ has joined #ruby
<al2o3-cr> havenwood: i was gonna say that
<shevy> aaaah I was using .split and wondered why it did not work, thanks
<havenwood> np
<Ox0dea> >> 'abcdefghijk'.scan /..?.?/ # for not ignoring the tail
<ruboto> Ox0dea # => ["abc", "def", "ghi", "jk"] (https://eval.in/461363)
<havenwood> shevy: ^
<Ox0dea> We could sure use String.expand and String#expand.
mary5030_ has joined #ruby
<Ox0dea> #tr's semantics would be fine.
<havenwood> >> 'ABCDEFGHIJ'.each_char.each_slice(3).map &:join
<ruboto> havenwood # => ["ABC", "DEF", "GHI", "J"] (https://eval.in/461364)
rgtk has quit [Read error: No route to host]
vigintas has joined #ruby
mary5030 has quit [Ping timeout: 246 seconds]
<Ox0dea> That is, 'a-g' == 'abcdefg' would be nice, and not just for golf either. :P
rgtk has joined #ruby
devbug has joined #ruby
<Ox0dea> *'a-g'.expand
krz has joined #ruby
mary5030_ has quit [Remote host closed the connection]
devbug_ has quit [Ping timeout: 240 seconds]
mary5030 has joined #ruby
rgtk has quit [Read error: No route to host]
rgtk has joined #ruby
mistermocha has quit [Ping timeout: 246 seconds]
shinnya has quit [Ping timeout: 240 seconds]
mistermo_ has quit [Ping timeout: 250 seconds]
<shevy> know what I find the most interesting part here?
bruce_lee2 has joined #ruby
rgtk has quit [Read error: No route to host]
<shevy> that Ox0dea is using downcased 'abcdef' and havenwood goes all upcased!
bruce_lee has quit [Ping timeout: 260 seconds]
rgtk has joined #ruby
vigintas has quit [Ping timeout: 250 seconds]
ss_much has joined #ruby
<havenwood> shevy: I'd probably have used downcase too but was mimicking your example.
<shevy> oh right
<Ox0dea> shevy: So you get to tell us why you hate whichever pinky you shift with.
jimbeaudoin has quit [Quit: Connection closed for inactivity]
rgtk has quit [Read error: No route to host]
<al2o3-cr> is 0 even?
<Ox0dea> al2o3-cr: Are all the integers either even or odd?
rgtk has joined #ruby
<havenwood> al2o3-cr: -0.negative? #=> false
<al2o3-cr> Ox0dea: they'll are +/- bar 0
<Ox0dea> al2o3-cr: So 0 isn't an integer?
<al2o3-cr> yep
rgtk has quit [Read error: Connection reset by peer]
sgambino has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<Ox0dea> >> 0.integer?
<ruboto> Ox0dea # => true (https://eval.in/461366)
rgtk has joined #ruby
<Ox0dea> This is the String#tr implementation: https://eval.in/461365
<al2o3-cr> I asked is 0 even?
<Ox0dea> I have no idea what to extract out such that String#expand could have a nice clean implementation. :<
<havenwood> Ox0dea: hmm
<havenwood> Ox0dea: of course not the same but kinda reminds me of: https://github.com/tom-lord/regexp-examples
dorei has quit []
<havenwood> /[a-z]/.examples max_group_results: 26
colegatron has joined #ruby
rgtk_ has joined #ruby
<al2o3-cr> fuck me
rgtk has quit [Read error: No route to host]
* Ox0dea fucks al2o3-cr.
<al2o3-cr> how easy do people want it
ruby-lang070 has joined #ruby
<ruby-lang070> anyone on?
<havenwood> ruby-lang070: hi
<ruby-lang070> hi
<ruby-lang070> I have a question about methods, do you have a sec?
rgtk_ has quit [Read error: No route to host]
<havenwood> ruby-lang070: Ask away.
rgtk has joined #ruby
rbennacer has joined #ruby
rgtk has quit [Read error: No route to host]
Glenny has joined #ruby
<ruby-lang070> Ok, so I'm trying to understand why when I pass just a variable to a method and then change it inside the method and then call the variable after i've made the method call its value doesnt actually change from when before it was passed to the method, but if i pass a hash and modify it in a method and then call it after the method call then it is actually modified
<al2o3-cr> So 0 isn't an integer? phaha i need to reAD
<ruby-lang070> maybe i should make a gist haha
rgtk has joined #ruby
<havenwood> ruby-lang070: Your text probably got cut off there.
mloy has quit [Remote host closed the connection]
<ruby-lang070> ill make a gist
<havenwood> ruby-lang070: :D
mloy has joined #ruby
duckpuppy has joined #ruby
<al2o3-cr> scope baby, scope
<Ox0dea> ruby-lang070: Array and Hash are essentially "reference types", if that helps you find literature on the matter.
mloy has left #ruby [#ruby]
<al2o3-cr> Ox0dea: so are Strings, no?
<DN404> its not scope technically
<Ox0dea> It's got nothing to do with scope.
<havenwood> al2o3-cr: What's zero divided by two?
rgtk has quit [Read error: No route to host]
<al2o3-cr> I jumped the gun
rgtk has joined #ruby
<al2o3-cr> havenwood: 5?
<havenwood> al2o3-cr: (It's even.)
<al2o3-cr> havenwood: 16 then
mattwildig has quit [Remote host closed the connection]
weemsledeux has joined #ruby
atomical has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<havenwood> al2o3-cr: 0.positive? #=> false
<Ox0dea> ruby-lang070: Really, almost every value in Ruby is "mutable", and if you mutate the object passed into your method, the difference will be visible from outside.
<Ox0dea> havenwood: You must have massive stores of troll food.
<havenwood> Ox0dea: haha
<al2o3-cr> havenwood: and your point is?
<havenwood> al2o3-cr: Negative zero is not negative and zero is not positive.
<al2o3-cr> 0 is neither -/+ as i said
rgtk has quit [Read error: Connection reset by peer]
rgtk_ has joined #ruby
<havenwood> al2o3-cr: (Ruby 2.3)
<al2o3-cr> havenwood: and
<havenwood> al2o3-cr: It's divisible by two.
<ruby-lang070> yea but that isn't true for variales
<ruby-lang070> I would have to return the new value from the method and save it into the exsiting variable i want changed
<Ox0dea> ruby-lang070: Hash#[]= mutates the receiver.
<al2o3-cr> havenwood: and
rgtk_ has quit [Read error: No route to host]
<ruby-lang070> Ok so I need to look into "mutates" correct?
rgtk has joined #ruby
<havenwood> al2o3-cr: 0.abs2.zero? #=> true
<Ox0dea> ruby-lang070: There are plenty of methods which mutate Strings as well; replace `name = new_name` with `name.upcase!` and observe the results.
<al2o3-cr> havenwood: and!!!!
<ruby-lang070> yea that would be a permanent change
<Ox0dea> ruby-lang070: Right, because it mutates the receiver.
<Ox0dea> `name = new_name` only reassigns the local variable.
<havenwood> al2o3-cr: require 'mathn'; Math.sqrt(0).zero? #=> true
<ruby-lang070> ahh ok I think I get it now
<Ox0dea> ruby-lang070: If you really do want to completely replace a String in-place, there's String#replace. :P
<al2o3-cr> havenwood: what you try to prove?
<havenwood> al2o3-cr: Zero things.
<ruby-lang070> So If I just set the hash to equal another hash or whatever and didnt actually mutate it then it wouldd do nothing to the local hash correct?
<al2o3-cr> thought so
bruce_lee2 has quit [Changing host]
bruce_lee2 has joined #ruby
bruce_lee2 is now known as bruce_lee
rgtk_ has joined #ruby
rgtk has quit [Read error: No route to host]
<havenwood> al2o3-cr: Want more zero things?
<al2o3-cr> havenwood: go ahead
<Ox0dea> ruby-lang070: It would do nothing to the *external* Hash, but you've got the idea.
l_tonz has quit [Ping timeout: 255 seconds]
<havenwood> al2o3-cr: I've got zero.
<ruby-lang070> Yea I've got it now, Thank you Ox0dea and havenwood for your help
<al2o3-cr> really?
<Ox0dea> ruby-lang070: Sure thing.
rgtk_ has quit [Read error: No route to host]
m3_del has joined #ruby
rgtk has joined #ruby
<havenwood> al2o3-cr: ZeroQuestionError: questioned 0
<al2o3-cr> >> Math.log(0)
<ruboto> al2o3-cr # => -Infinity (https://eval.in/461367)
l_tonz has joined #ruby
rgtk has quit [Read error: No route to host]
rbennacer has quit [Remote host closed the connection]
<al2o3-cr> >> 0**0
<ruboto> al2o3-cr # => 1 (https://eval.in/461368)
rgtk has joined #ruby
rgtk has quit [Read error: No route to host]
mag42c has joined #ruby
rgtk has joined #ruby
towski_ has joined #ruby
mary5030 has quit [Remote host closed the connection]
rgtk has quit [Read error: No route to host]
m3_del has quit [Ping timeout: 260 seconds]
mary5030 has joined #ruby
rgtk has joined #ruby
ruby-lang070 has quit [Ping timeout: 246 seconds]
<shevy> Ox0dea ah nah, the above actually originated because it were nucleotides in DNA, so the strings I'd have had were ATACCGTCTG, hence why I used upcased chars in the question above as well
<havenwood> >> Numeric.new.zero?
<ruboto> havenwood # => false (https://eval.in/461369)
rgtk has quit [Read error: No route to host]
<Ox0dea> havenwood: https://eval.in/461370
rgtk has joined #ruby
<Ox0dea> Yes, I benchmarked `reduce(:<<)`.
machan has quit [Ping timeout: 240 seconds]
DiCablo has quit [Quit: Textual IRC Client: www.textualapp.com]
<havenwood> Ox0dea: :D
<Ox0dea> Why doesn't this already exeest?!
rgtk has quit [Read error: No route to host]
rgtk has joined #ruby
mary5030 has quit [Ping timeout: 240 seconds]
<al2o3-cr> thats why they introduced refinements isn't?
skade has joined #ruby
l_tonz has quit [Ping timeout: 250 seconds]
<Ox0dea> al2o3-cr: I think this should be in core.
<Ox0dea> Then again, that's what we all say.
rgtk has quit [Read error: No route to host]
tlaxkit has quit [Quit: ¡Hasta luego!]
<al2o3-cr> be nice
rgtk has joined #ruby
<shevy> we should have a community extension on ruby or something
<Ox0dea> al2o3-cr: I was self-deprecating, you fuckwad.
<Ox0dea> <3
<Ox0dea> shevy: Kinda like Facets?
Rollabunna has joined #ruby
<al2o3-cr> Ox0dea: parden?
rgtk has quit [Read error: No route to host]
duckpuppy has quit [Ping timeout: 240 seconds]
rgtk has joined #ruby
ibouvousaime has quit [Ping timeout: 244 seconds]
<al2o3-cr> Ox0dea: I misses 'would' jeez
<shevy> Ox0dea yeah but integrated into ruby-core and with a stronger voting process
l_tonz has joined #ruby
<al2o3-cr> Ox0dea: keyboard warrior
A124 has quit [Read error: Connection reset by peer]
rgtk has quit [Read error: No route to host]
rgtk has joined #ruby
blackmesa has joined #ruby
Dakuan has joined #ruby
mag42c has quit [Quit: mag42c]
<Ox0dea> al2o3-cr: I'm not to blame for your inability to proofread what would've been a three-word post.
rgtk has quit [Read error: No route to host]
skade has quit [Ping timeout: 246 seconds]
sp4rrow has joined #ruby
Rollabunna has quit [Ping timeout: 244 seconds]
uber has quit [Ping timeout: 240 seconds]
rgtk has joined #ruby
<al2o3-cr> Ox0dea: yeah my fault
<Ox0dea> al2o3-cr: <3
<al2o3-cr> I can see how it would come across
rgtk has quit [Read error: No route to host]
A124 has joined #ruby
arescorpio has joined #ruby
<Ox0dea> Precision matters.
favadi has joined #ruby
rgtk has joined #ruby
<al2o3-cr> It does :)
<TheNet> how do you guys order methods in your classes?
<TheNet> such as alphabetically? or organized by type?
Dakuan has quit [Ping timeout: 264 seconds]
rgtk has quit [Read error: Connection reset by peer]
<Ox0dea> TheNet: Real programmers use decent editors.
djbkd has quit [Remote host closed the connection]
rgtk has joined #ruby
blackmesa has quit [Ping timeout: 246 seconds]
djbkd has joined #ruby
<Ox0dea> To clarify, the order doesn't matter if your editor lets you jump to a given method definition with the stroke of a key.
patdohere has joined #ruby
<Ox0dea> But keeping related things close to each other makes sense and usually happens naturally.
rgtk has quit [Read error: No route to host]
patdohere has quit [Max SendQ exceeded]
rgtk has joined #ruby
patdohere has joined #ruby
cmoney has joined #ruby
rgtk has quit [Read error: Connection reset by peer]
cmoney has quit [Remote host closed the connection]
rgtk has joined #ruby
uber has joined #ruby
rgtk has quit [Read error: No route to host]
juanpablo__ has joined #ruby
rgtk has joined #ruby
aufi has joined #ruby
Feyn has joined #ruby
rgtk has quit [Read error: No route to host]
freerobby has joined #ruby
rgtk has joined #ruby
rgtk has quit [Read error: No route to host]
rgtk has joined #ruby
freerobby has quit [Client Quit]
juanpablo__ has quit [Ping timeout: 268 seconds]
rgtk has quit [Read error: Connection reset by peer]
rgtk has joined #ruby
mikeharris22 has joined #ruby
rgtk has quit [Read error: No route to host]
rgtk_ has joined #ruby
rgtk_ has quit [Read error: No route to host]
rgtk has joined #ruby
rgtk has quit [Read error: No route to host]
mikeharris22 has quit [Ping timeout: 240 seconds]
Feyn has quit [Ping timeout: 246 seconds]
rgtk has joined #ruby
mordocai has quit [Remote host closed the connection]
mordocai has joined #ruby
rgtk has quit [Read error: No route to host]
rgtk has joined #ruby
fibbel has quit [Quit: fibbel]
l_tonz has quit [Remote host closed the connection]
rgtk has quit [Read error: No route to host]
rgtk has joined #ruby
bruno- has joined #ruby
s00pcan has quit [Remote host closed the connection]
rgtk has quit [Read error: No route to host]
aufi has quit [Ping timeout: 268 seconds]
tvw has quit [Ping timeout: 256 seconds]
rgtk has joined #ruby
TheNet has quit [Remote host closed the connection]
Vile` has quit [Remote host closed the connection]
moeabdol has joined #ruby
rgtk has quit [Read error: No route to host]
lkba has quit [Remote host closed the connection]
aibot has quit [Remote host closed the connection]
aibot has joined #ruby
moeabdol has quit [Client Quit]
bruno- has quit [Ping timeout: 246 seconds]
Vile` has joined #ruby
mattwildig has joined #ruby
saddad has joined #ruby
freerobby has joined #ruby
Yzguy has quit [Quit: Zzz...]
Feyn has joined #ruby
<Ox0dea> > With which incentive ought I strive to attenuate the number of decibels I'm producing?
zenguy_pc has quit [Ping timeout: 246 seconds]
mistermocha has joined #ruby
Rickmasta has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
mclee_ has quit [Ping timeout: 265 seconds]
TheNet has joined #ruby
mclee_ has joined #ruby
diegoaguilar has joined #ruby
diegoaguilar has quit [Max SendQ exceeded]
mistermocha has quit [Ping timeout: 244 seconds]
diegoaguilar has joined #ruby
markfletcher has joined #ruby
d34th4ck3r has quit [Quit: zzz]
mistermocha has joined #ruby
htmldrum has quit [Ping timeout: 256 seconds]
solocshaw has quit [Ping timeout: 240 seconds]
rbennacer has joined #ruby
dingus has joined #ruby
mistermocha has quit [Ping timeout: 260 seconds]
zenguy_pc has joined #ruby
rbennacer has quit [Ping timeout: 244 seconds]
<dingus> Would anyone here be willing to help me figure out how to use map/reduce? I'm trying to merge an array of hashes containing identical keys, with the goal of condensing duplicate keys while keeping their values
devoldmx has joined #ruby
Oatmeal has quit [Ping timeout: 264 seconds]
weemsledeux has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
Rickmasta has joined #ruby
<Ox0dea> dingus: You won't need #reduce for this; #merge is a very powerful method.
<Ox0dea> It takes multiple arguments *and* a block for handling merge conflicts.
iateadonut has joined #ruby
krz has quit [Ping timeout: 244 seconds]
<dingus> @0xdea: I'm new to ruby and merge is way over my head. Mind taking a look at a code sample?
<Ox0dea> dingus: I could just show you how to do it?
<dingus> @0xdea: OK, that sounds good :)
TheNet has quit [Remote host closed the connection]
<dingus> Ox0dea:
<Ox0dea> dingus: Oh no! #merge *doesn't* take multiple arguments. :<
<Radar> dingus: Show us what you've got and what you expect to have at the end of it.
<Ox0dea> Radar: He's stated the requirements quite plainly?
<Radar> Ox0dea: It'd be helpful to see some example input data and output just so that we know 100% that we have the right answer.
mistermocha has joined #ruby
gener1c_ has quit [Read error: Connection reset by peer]
skade has joined #ruby
mary5030 has joined #ruby
Oatmeal has joined #ruby
justinweiss has joined #ruby
gener1c has joined #ruby
<Ox0dea> >> h1, h2 = {a: 1, b: 2}, {a: 3, b: 4}; h1.merge(h2) { |_, ours, theirs| ours + theirs } # dingus
<ruboto> Ox0dea # => {:a=>4, :b=>6} (https://eval.in/461374)
<Ox0dea> dingus: That's how to structure the conflict resolution block, but you are gonna need #reduce to apply it across an array.
mary5030 has quit [Remote host closed the connection]
ziprar has joined #ruby
mary5030 has joined #ruby
jwaldrip has joined #ruby
Dakuan has joined #ruby
blackmesa has joined #ruby
<dingus> Ox0dea: Radar: https://paste.ee/p/NO8cv
hmsimha_ has joined #ruby
mistermocha has quit [Ping timeout: 244 seconds]
saddad has quit [Read error: Connection reset by peer]
<Radar> Ox0dea: see, your answer won't work
<Radar> This is why I always ask for examples.
jhn has joined #ruby
<Ox0dea> Radar: What, because it's doing addition? It was a demonstration.
krz has joined #ruby
<Ox0dea> dingus: Here's what I hope is a clear demonstration of how #reduce works: https://eval.in/461375
braincras has quit [Quit: bye bye]
astrobun_ has joined #ruby
zipace has quit [Ping timeout: 255 seconds]
skade has quit [Ping timeout: 240 seconds]
jwaldrip has quit [Client Quit]
Dakuan has quit [Ping timeout: 244 seconds]
blackmesa has quit [Ping timeout: 240 seconds]
mistermocha has joined #ruby
hmsimha_ has quit [Ping timeout: 265 seconds]
mistermocha has quit [Remote host closed the connection]
mistermocha has joined #ruby
braincrash has joined #ruby
vigintas has joined #ruby
<Ox0dea> Radar: You were right. I apologize.
mistermocha has quit [Remote host closed the connection]
<Ox0dea> dingus: Status on your understanding of #reduce? :P
mistermocha has joined #ruby
haraoka has quit [Remote host closed the connection]
l_tonz has joined #ruby
mistermocha has quit [Remote host closed the connection]
mistermocha has joined #ruby
<dingus> Ox0dea: i tried applying your example to my data but it looks like it's just looping through the array. can't figure out how to get it to do what i want
Bloomer has joined #ruby
<Ox0dea> dingus: It does loop through the array, but it builds up a tally as it goes.
mary5030 has quit [Remote host closed the connection]
<Ox0dea> The "tally" in your case is a Hash, but the principle is the same.
markfletcher has left #ruby [#ruby]
vigintas has quit [Ping timeout: 264 seconds]
mary5030 has joined #ruby
rakm has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
kp666 has joined #ruby
m3_del has joined #ruby
<dingus> Ox0dea: How do I combine each score value by player key, though?
gix has quit [Ping timeout: 264 seconds]
Bloomer has quit [Remote host closed the connection]
Bloomer has joined #ruby
<Ox0dea> dingus: What did you replace the 0 with in applying my example to your data?
towski_ has quit [Remote host closed the connection]
mary5030 has quit [Ping timeout: 240 seconds]
<dingus> Ox0dea: I didn't replace it. I guess I don't understand how the code works...
gix has joined #ruby
<Ox0dea> dingus: Oh, sorry; I did forget to explain that part. It's the initial value for the tally.
<Ox0dea> >> [1,2,3].reduce(36) { |a, b| a + b }
<ruboto> Ox0dea # => 42 (https://eval.in/461376)
<Ox0dea> So what would be a good starting point for your case?
<dingus> Ox0dea: don't I need to be selecting keys out of the hash somewhere? When I run your example as is I get "Hash can't be coerced into Fixnum"
<Ox0dea> dingus: Yes, you'll have to do that, but you'll also want to come away from this knowing how to use #reduce, I'd imagine.
<Ox0dea> dingus: Or is that not the case? I have a fish if you want it.
<dingus> Ox0dea: Please give me the fish so I can dissect it :)
<Ox0dea> dingus: Well said.
<Ox0dea> dingus: https://eval.in/461377
cwong_on_irc has quit [Quit: Leaving.]
bruno- has joined #ruby
Rinzlit has joined #ruby
<Ox0dea> That `+=` updates the tally, but it evalues to the result of the addition, and the last expression in the block is what becomes the new tally; that's why I had to stick that ostensibly unnecessary `tally` on that line by itself.
<Ox0dea> There are #each_with_object and #with_object methods that do make it unnecessary, but then we'd've gotten into grouped block parameters and lost the thread.
<dingus> Ox0dea: so there's an invisible assignment happening on the 'tally' line?
Rinzlit_ has quit [Ping timeout: 255 seconds]
<Ox0dea> dingus: No, not in the sense you're thinking.
arescorpio has quit [Quit: Leaving.]
bruno- has quit [Ping timeout: 246 seconds]
<dingus> Ox0dea: would you mind providing a similar example using with_object or each_with_object so I can compare?
arooni has quit [Ping timeout: 246 seconds]
rippa has joined #ruby
darkf has joined #ruby
mistermocha has quit [Remote host closed the connection]
mistermocha has joined #ruby
<Ox0dea> dingus: https://eval.in/461378
<Ox0dea> In this case, it's just the block parameters getting swapped around and the extra line being unnecessaary.
htmldrum has joined #ruby
<Ox0dea> The "grouped block parameters" I mentioned aren't there; those are apparently only applicable when the collection being reduced contains Arrays, not Hashes.
al2o3-cr has quit [Ping timeout: 252 seconds]
<Ox0dea> >> [[1, 2], [3, 4], [5, 6]].each_with_object([]) { |(a, b), tally| tally << a + b }
<ruboto> Ox0dea # => [3, 7, 11] (https://eval.in/461380)
jessemcgilallen has joined #ruby
<Ox0dea> The grouping parentheses are needed there, elseways `a` gets the whole Array and `b` is nil.
davidmst has quit [Ping timeout: 246 seconds]
<dingus> Ox0dea: thank you very much! i'll go study this some more and see if i can grok it
<Ox0dea> Er, no, `b` would mistakenly take the place of `tally`, and `tally` would be nil.
<dingus> Ox0dea: the more i know about ruby the more i realize how little i know
<Ox0dea> dingus: It's a really big language.
dingus has quit [Quit: Page closed]
ss_much has quit [Quit: Connection closed for inactivity]
mh_laakso has joined #ruby
mh_laakso has quit [Client Quit]
mh_laakso has joined #ruby
kiki_lamb is now known as kiki_lamb_
kiki_lamb_ is now known as kiki_lamb
kiki_lamb has quit [Quit: leaving]
kiki_lamb has joined #ruby
TheNet has joined #ruby
krz has quit [Quit: WeeChat 1.2]
mclee_ has quit [Ping timeout: 268 seconds]
Rollabunna has joined #ruby
guest1241234 has joined #ruby
karapetyan has joined #ruby
RobertBirnie has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
d34th4ck3r has joined #ruby
juanpablo__ has joined #ruby
jwaldrip has joined #ruby
Dakuan has joined #ruby
skade has joined #ruby
m3_del has quit [Remote host closed the connection]
karapetyan has quit [Ping timeout: 250 seconds]
dheeraj_t has joined #ruby
blackmesa has joined #ruby
Rollabunna has quit [Ping timeout: 268 seconds]
<dheeraj_t> q
juanpablo__ has quit [Ping timeout: 268 seconds]
dheeraj_t has quit [Client Quit]
dheeraj_t has joined #ruby
cashnguns has quit [Read error: Connection reset by peer]
<dheeraj_t> which is the best editor for ruby?
towski_ has joined #ruby
Dakuan has quit [Ping timeout: 268 seconds]
blackmesa has quit [Ping timeout: 252 seconds]
<l_tonz> sublime :]
skade has quit [Ping timeout: 246 seconds]
dheeraj_t has left #ruby [#ruby]
favadi has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
dheeraj_t has joined #ruby
<dheeraj_t> which is the best editor for ruby?
leafybasil has joined #ruby
<Radar> dheeraj_t: Who can truly say what it means to be "the best"?
<Ox0dea> dheeraj_t: Editors are a myth.
<Radar> I just get other people to write my code for me
<Radar> (that is actually what I've kinda been doing all day today)
<Ox0dea> Project manager, then?
<Radar> So really, the editors I use are called "Sal" and "Brad"
<Radar> Ox0dea: co project manager :P Current tech lead boss now has a team of 10 and it's getting hard for him to manage alone
<Radar> (it was 4 this time last year)
<Ox0dea> Whale, that's one of them good problems, I suppose.
shinenelson has joined #ruby
raazdaan has joined #ruby
leafybasil has quit [Ping timeout: 252 seconds]
raazdaan has quit [Client Quit]
<Ox0dea> Do Brad and Sal respect .editorconfig?
benlieb has joined #ruby
ziprar has quit [Ping timeout: 265 seconds]
mndoci has joined #ruby
<Radar> yeah although there can be some idiosyncrasies.
tmtwd has quit [Remote host closed the connection]
zylogz80 has quit [Ping timeout: 240 seconds]
<Radar> Need to start up a trello board for those issues :P
tmtwd has joined #ruby
<shevy> a troll board??
bradleyprice has joined #ruby
mndoci has quit [Ping timeout: 246 seconds]
roxtrongo has joined #ruby
<Ox0dea> >> %w[trelloboard aboredtroll].map { |_| _.chars.sort }.reduce :==
<ruboto> Ox0dea # => true (https://eval.in/461399)
<Ox0dea> Radar: I hate it when software seems to have a mind of its own. :P
<Radar> :)
<Ox0dea> That's not to say I don't welcome our inevitable robot overlords, mind.
mary5030 has joined #ruby
beast has quit [Quit: Leaving]
yardenbar has quit [Ping timeout: 252 seconds]
weemsledeux has joined #ruby
rgtk has joined #ruby
dheeraj_t has left #ruby [#ruby]
Musashi007 has joined #ruby
mary5030 has quit [Ping timeout: 246 seconds]
Rickmasta has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
rgtk has quit [Ping timeout: 260 seconds]
justinweiss has quit [Remote host closed the connection]
DN404 has quit [Quit: goodbye]
justinweiss has joined #ruby
zenguy_pc has quit [Ping timeout: 250 seconds]
malcolmva has quit [Ping timeout: 260 seconds]
freerobby has quit [Quit: Leaving.]
kaskalu has quit [Quit: Leaving]
favadi has joined #ruby
jessemcgilallen has quit [Quit: jessemcgilallen]
rbennacer has joined #ruby
zenguy_pc has joined #ruby
mattwildig has quit [Remote host closed the connection]
cwong_on_irc has joined #ruby
rbennacer has quit [Ping timeout: 256 seconds]
Musashi007 has quit [Quit: Musashi007]
malcolmva has joined #ruby
cwong_on_irc has quit [Client Quit]
northband has joined #ruby
northband has quit [Remote host closed the connection]
krz has joined #ruby
lxsameer has joined #ruby
mistermocha has quit [Ping timeout: 260 seconds]
vigintas has joined #ruby
northband has joined #ruby
houhouli_ has joined #ruby
houhoulis has quit [Ping timeout: 256 seconds]
haxrbyte has joined #ruby
haxrbyte_ has joined #ruby
baroquebobcat has joined #ruby
dingus has joined #ruby
vigintas has quit [Ping timeout: 240 seconds]
Dakuan has joined #ruby
haxrbyte has quit [Ping timeout: 240 seconds]
TheNet has quit [Remote host closed the connection]
krz has quit [Ping timeout: 250 seconds]
mndoci has joined #ruby
blackmesa has joined #ruby
m3_del has joined #ruby
djbkd has quit [Remote host closed the connection]
<northband> I'm trying to port over some Python to Ruby and a certain item is confusing me. Curious if any fellow Rubyists would consider looking over a gist for me and help answer a couple questions.
roxtrongo has quit [Remote host closed the connection]
<dingus> Ox0dea: I'm back with more questions!
trosborn has joined #ruby
Dakuan has quit [Ping timeout: 256 seconds]
blackmesa has quit [Ping timeout: 240 seconds]
m3_del has quit [Ping timeout: 255 seconds]
northband has left #ruby [#ruby]
northband has joined #ruby
northband has quit [Quit: northband]
<Radar> northband: sure, fire away
Xzanron has joined #ruby
<Radar> just left :( too slow
<Ox0dea> dingus: Your turn, then. :)
minimalism has quit [Quit: leaving]
northband_ has joined #ruby
krz has joined #ruby
arup_r has joined #ruby
arup_r is now known as Guest85623
Xeago has joined #ruby
northband_ has quit [Remote host closed the connection]
baroquebobcat has quit [Quit: baroquebobcat]
dhjondoh has joined #ruby
haxrbyte_ has quit [Read error: Connection reset by peer]
haxrbyte has joined #ruby
TheNet has joined #ruby
Xeago has quit [Ping timeout: 252 seconds]
<dingus> Ox0dea: is it possible to store additional variables inside the each_with_object block? let's say I wanted to calculate an average score per player
gener1c has quit [Ping timeout: 250 seconds]
gener1c has joined #ruby
terminalrecluse has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
djbkd has joined #ruby
nitrix-or-treat is now known as nitrix
pontiki has joined #ruby
<Ox0dea> dingus: It's possible, but there's a better way.
<dingus> Ox0dea: my instinct is to use a loop and compare a precalculated hash/array of games played per player with a precalculated hash/array of scores per player but that seems clunky
<Ox0dea> dingus: Aye, that's a little clunky.
<dingus> Ox0dea: what's the better way?
l_tonz has quit [Remote host closed the connection]
<Ox0dea> dingus: Instead of tallying with addition, push each player's wins into an Array.
<dingus> Ox0dea: then what?
<Ox0dea> dingus: Then, like a good chef, you'll have all your ingredients ready.
gener1c_ has joined #ruby
gener1c has quit [Ping timeout: 252 seconds]
MVPhelp has quit [Ping timeout: 268 seconds]
mistermocha has joined #ruby
<dingus> Ox0dea: i have one each_with_object block counting total score per player, and another counting games played per player. are you saying there's a way to do this in one go?
cwong_on_irc has joined #ruby
pepperbreath has joined #ruby
pepperbreath has left #ruby [#ruby]
<Ox0dea> dingus: No, that's almost the opposite of what I was suggesting.
notnoyyyyy has joined #ruby
l_tonz has joined #ruby
<Ox0dea> dingus: Observe what happens if you replace that `0` with `[]`.
gener1c has joined #ruby
l_tonz has quit [Remote host closed the connection]
<pontiki> yesss, cooking metaphors :)
diegoviola has quit [Quit: WeeChat 1.3]
<Ox0dea> Oh, sorry; you'll have to do a little more tweaking than that: https://eval.in/461407
mistermocha has quit [Ping timeout: 240 seconds]
cwong_on_irc has quit [Client Quit]
duncannz has joined #ruby
<Ox0dea> dingus: But that's a really nice result, isn't it? You've got the number of games, the total wins, and the average falls out easily enough.
l_tonz has joined #ruby
gener1c_ has quit [Ping timeout: 246 seconds]
mployee8 has joined #ruby
Guest85623 has quit [Ping timeout: 240 seconds]
<mployee8> Hello
rapidjammer has joined #ruby
dionysus69 has joined #ruby
cwong_on_irc has joined #ruby
<pontiki> hi
<blubjr> hi
trautwein has joined #ruby
trautwein has quit [Client Quit]
haxrbyte has quit [Ping timeout: 250 seconds]
timonv has joined #ruby
mistermocha has joined #ruby
mistermocha has quit [Remote host closed the connection]
Motoservo has quit [Quit: Shhh. I'm trying to get some sleep here.]
mistermocha has joined #ruby
arup_ has joined #ruby
<dingus> Ox0dea: I changed my scores to floats and now I'm getting ``+': no implicit conversion of Float into Array (TypeError)`. Why does it stop working?
arup_ is now known as arup_r
<Ox0dea> dingus: Why did you change your scores to floats?
neanderslob has joined #ruby
<Ox0dea> >> xs = [4,8,15,16,23,42]; xs.reduce(:+) / xs.size.to_f
<ruboto> Ox0dea # => 18.0 (https://eval.in/461416)
<Ox0dea> Better to convert one value than a bunch of 'em.
tagrudev has joined #ruby
<dingus> Ox0dea: i'm playing around with various scenarios, e.g. a list of purchases and getting the average purchase price per customer
agit0 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<Ox0dea> dingus: Fair enough. That error indicates you're trying to do some operation with a Float and an Array as the operands, and that tends not to go well.
mostlybadfly has quit [Quit: Connection closed for inactivity]
<Ox0dea> You should debug-print the relevant values to determine where your assumptions have gone amiss.
juanpablo__ has joined #ruby
ohaibbq has quit [Quit: Leaving...]
devbug_ has joined #ruby
timonv has quit [Ping timeout: 265 seconds]
Motoservo has joined #ruby
dionysus69 has quit [Ping timeout: 268 seconds]
yardenbar has joined #ruby
arooni has joined #ruby
juanpablo__ has quit [Ping timeout: 252 seconds]
devbug has quit [Ping timeout: 272 seconds]
lubarch has joined #ruby
aganov has joined #ruby
jessemcgilallen has joined #ruby
mclee_ has joined #ruby
<dingus> Ox0dea: I gave up on reduce for now and tried out zip instead :)
lubarch has quit [Client Quit]
Azulinho has joined #ruby
dingus has quit [Quit: Page closed]
devoldmx has quit [Remote host closed the connection]
Rollabunna has joined #ruby
lubarch has joined #ruby
mndoci has quit [Remote host closed the connection]
rlf has quit [Remote host closed the connection]
mndoci has joined #ruby
guest1241234 has quit [Quit: Connection closed for inactivity]
DoubleMalt has joined #ruby
Rollabunna has quit [Ping timeout: 268 seconds]
blackmesa has joined #ruby
m3_del has joined #ruby
peteykun has quit [Ping timeout: 240 seconds]
pocketprotector has joined #ruby
mndoci has quit [Ping timeout: 256 seconds]
finisherr has joined #ruby
weemsledeux has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
blackmesa has quit [Ping timeout: 240 seconds]
arup_r has quit [Quit: Leaving]
pontiki has quit [Quit: ERC Version 5.3 (IRC client for Emacs)]
patdohere has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
m3_del has quit [Ping timeout: 255 seconds]
htmldrum has quit [Ping timeout: 246 seconds]
sandals has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
jessemcgilallen has quit [Ping timeout: 252 seconds]
htmldrum has joined #ruby
Mon_Ouie has quit [Ping timeout: 265 seconds]
jessemcgilallen has joined #ruby
mployee8 has quit [Quit: Leaving]
mistermocha has quit [Remote host closed the connection]
htmldrum has quit [Ping timeout: 252 seconds]
lsmola has joined #ruby
lukaszes has joined #ruby
firstdayonthejob has joined #ruby
ta has quit [Remote host closed the connection]
trosborn has quit [Quit: trosborn]
VeryBewitching has quit [Quit: Konversation terminated!]
skcin7 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
karapetyan has joined #ruby
kalusn has joined #ruby
Azulinho has quit [Ping timeout: 240 seconds]
trosborn has joined #ruby
rgtk has joined #ruby
purplexed- has quit [Ping timeout: 272 seconds]
peteykun has joined #ruby
jpfuentes2 has quit [Ping timeout: 250 seconds]
unsymbol has quit [Ping timeout: 250 seconds]
notnoyyyyy has quit [Ping timeout: 250 seconds]
<finisherr> When a module has a method that looks like this: def self.method_name what is the receiver of the method?
Ropeney has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
rgtk has quit [Ping timeout: 260 seconds]
claw has quit [Ping timeout: 250 seconds]
claw has joined #ruby
notnoyyyyy has joined #ruby
unsymbol has joined #ruby
jpfuentes2 has joined #ruby
l_tonz has quit [Remote host closed the connection]
sdothum has quit [Quit: ZNC - 1.6.0 - http://znc.in]
<karapetyan> hello, how to make regexp that get all characters before "/*" i'tried next .*\/\* but it takes all text "blahblahblah/*"
<djellemah> finisherr: the module
zenguy_pc has quit [Ping timeout: 272 seconds]
<Ox0dea> karapetyan: Are you parsing C?
<finisherr> Cool
mistermocha has joined #ruby
<Ox0dea> finisherr: Debug-printing `self` can provide great insight in times of confusion.
kalusn has quit [Remote host closed the connection]
<karapetyan> Ox0dea: well, yes
<Ox0dea> karapetyan: Really?
vondruch has quit [Quit: Ex-Chat]
<karapetyan> no, i try to solve my daily kata )
<Ox0dea> >> 'some c code /*'[/(.*)\/\*/, 1] # karapetyan
<ruboto> Ox0dea # => "some c code " (https://eval.in/461433)
<Ox0dea> The trick is to "capture" the part you're interested in.
tmtwd has quit [Ping timeout: 264 seconds]
<karapetyan> Ox0dea: well, what does mean [] ?
<djellemah> ?ri String#[]
<ruboto> String#[], I don't know anything about ri
<[spoiler]> karapetyan: its a method on string
<djellemah> &ri String#[]
<`derpy> http://www.rubydoc.info/stdlib/core/String#%5B%5D-instance_method
lsmola has quit [Ping timeout: 252 seconds]
<[spoiler]> ?mr
<ruboto> I don't know anything about mr
<[spoiler]> psh
<Ox0dea> >> 'karapetyan'[2, 4]
<ruboto> Ox0dea # => "rape" (https://eval.in/461434)
swgillespie has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<[spoiler]> f/
<Ox0dea> String#[] is a pretty fancy method.
jhn has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<Ox0dea> Given a Regexp, it's basically just String#match, but you can provide a numeric second argument to pluck out a capture group.
<finisherr> I was trying to stub out a method in a module for my tests but had some troubles.
mistermocha has quit [Ping timeout: 244 seconds]
<karapetyan> well, should i use it instead gsub?
<[spoiler]> Ox0dea: it's the most "overloaded" method I know of in Ruby
solars has joined #ruby
<Ox0dea> karapetyan: Yes.
Blaguvest has joined #ruby
erbesharat has joined #ruby
arooni has quit [Ping timeout: 240 seconds]
<djellemah> finisherr: Have you met binding.pry ?
vigintas has joined #ruby
<Ox0dea> [spoiler]: In my sickness, I tried to push it even further: https://bugs.ruby-lang.org/issues/11100
baweaver has joined #ruby
<finisherr> nope
<karapetyan> Ox0dea: what does mean [..., 1] ? the 1? in your regexp?
<Ox0dea> karapetyan: Given a Regexp, it's basically just String#match, but you can provide a numeric second argument to pluck out a capture group.
<[spoiler]> personally my advice is to use #match or #scan, if you need to extract shit from a string; i find them more readable than `#[/ohmygosh/]` even if its shorter and "clever-er"
<finisherr> I remember about binding since it’s passed as a param to some ERB method
<finisherr> but that’s all i remembered about it
<karapetyan> thanks!
<Ox0dea> It's not even about cleverness; that "English" can't also be noise is nonsense.
<[spoiler]> 11100 nice issue number, Ox0dea :D
towski_ has quit [Remote host closed the connection]
<Ox0dea> [spoiler]: Right?
shinnya has joined #ruby
<djellemah> finisherr: http://pryrepl.org/
<[spoiler]> ` realize this is essentially an outline of why not to implement this feature, but (...)` :D LOL
vigintas has quit [Ping timeout: 240 seconds]
rodfersou has quit [Ping timeout: 264 seconds]
mattwildig has joined #ruby
darkhex has joined #ruby
<[spoiler]> Interesting, I didn't ever think to use #hex and #oct actually, I used to_i(and friends) if I needed it
zenguy_pc has joined #ruby
<djellemah> spoiler
<[spoiler]> djellemah: no!
<Ox0dea> I feel like we've discussed this, but I wish Ruby had Clojure's numeric literals.
<djellemah> doh! nevermind.
<Ox0dea> >> /(?<stuff>\w+)/ =~ 'important'; stuff # karapetyan
<ruboto> Ox0dea # => "important" (https://eval.in/461436)
<Ox0dea> In case you want your Regexp to inject some locals.
<[spoiler]> djellemah: It was in contrast to "yes?" :P
<karapetyan> http://rubular.com/r/VaKiSzytDG how to get text that goes before /*
<Ox0dea> karapetyan: Are you a goldfish?
<[spoiler]> LOL
<karapetyan> no, but your example don't work
<karapetyan> +)
cwong_on_irc has quit [Quit: Leaving.]
<[spoiler]> karapetyan: what example? his example ought to work
<[spoiler]> what is your code
mattwildig has quit [Ping timeout: 240 seconds]
<[spoiler]> [side note: you shouldn't use regexp like this to parse code anyway]
<Ox0dea> karapetyan: Is your kata to write a regular expression, or to write a Ruby program?
<karapetyan> look, in understood that i can use somestring[regexp_here] and it's nice. also i read about #match / #scan. but anyway i have a problem with regexp
agit0 has joined #ruby
skade has joined #ruby
trosborn has quit [Quit: trosborn]
lsmola has joined #ruby
<Ox0dea> karapetyan: Whatever. You need to use a positive lookahead: http://rubular.com/r/aOYVc98HYu
<karapetyan> Ox0dea: a write a Ruby program. (but there no description how to write it. Use loops for parsing chars or regexp)
<Ox0dea> I hope it catches fire.
<Ox0dea> <3
<[spoiler]> His kata? Is this some kind of karate company you work at? what
ibouvousaime has joined #ruby
<Ox0dea> [spoiler]: A kata is like daily exercise for programming.
<[spoiler]> is it
<karapetyan> Ox0dea: thank you!
<Ox0dea> karapetyan: No.
<Ox0dea> [spoiler]: That's its modern definition, anyhow.
TheNet has quit [Remote host closed the connection]
<[spoiler]> Oh
<[spoiler]> I didn't know
<[spoiler]> that is nice
<[spoiler]> I should do that!
<karapetyan> Ox0dea: why not?)
TheNet has joined #ruby
mistermocha has joined #ruby
<Ox0dea> karapetyan: Because your eye(s?) is/are a plus sign, and symbols make [spoiler]'s head hurt.
lukaszes has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<karapetyan> ok, sorry then )
<Ox0dea> So now you're a disemfaced mouth?
skade has quit [Quit: Computer has gone to sleep.]
<[spoiler]> my wot now
<[spoiler]> symbols make me head 'urt?
<Ox0dea> > more readable than `#[/ohmygosh/]`
<Ox0dea> That was clearly intended to be pejorative.
<[spoiler]> LOL
bruno- has joined #ruby
vigintas has joined #ruby
<Ox0dea> I've said it before: it's okay for code to look like code.
Musashi007 has joined #ruby
blackmesa has joined #ruby
m3_del has joined #ruby
<[spoiler]> Ox0dea: the point was that [//,1] wasn't immediately obvious (to karapetyan, and I suppose that applies to other ruby new comers, too)
<[spoiler]> newcomers*
mistermocha has quit [Ping timeout: 240 seconds]
stan has joined #ruby
<Ox0dea> [spoiler]: Why should new knowledge be immediately obvious? Doesn't that undermine the foundations of exploratory learning?
ruurd has joined #ruby
ponga has joined #ruby
vigintas has quit [Ping timeout: 250 seconds]
trosborn has joined #ruby
bruno- has quit [Ping timeout: 265 seconds]
krz has quit [Ping timeout: 264 seconds]
skcin7 has joined #ruby
<[spoiler]> Ox0dea: hmm. I guess you're right
SCHAAP137 has joined #ruby
lukaszes has joined #ruby
<Ox0dea> Oops.
timonv has joined #ruby
<Ox0dea> That was not my intention.
blackmesa has quit [Ping timeout: 250 seconds]
m3_del has quit [Ping timeout: 250 seconds]
notnoyyyyy has quit [Ping timeout: 244 seconds]
krz has joined #ruby
joonty has joined #ruby
trosborn has quit [Client Quit]
l_tonz has joined #ruby
<Ox0dea> That is, I didn't mean to word it so convincingly; I had hoped you'd come back at me on it that I might solidify my ability to defend it.
notnoyyyyy has joined #ruby
diegoaguilar has quit [Ping timeout: 260 seconds]
colegatron has quit [Ping timeout: 240 seconds]
benlieb has quit [Quit: benlieb]
benlieb has joined #ruby
houhouli_ has quit [Remote host closed the connection]
dheeraj_t has joined #ruby
benlieb has quit [Client Quit]
<certainty> moin
<[spoiler]> certainty: yo \o
<certainty> o/
trosborn has joined #ruby
dheeraj_t has quit [Ping timeout: 246 seconds]
mistermocha has joined #ruby
jessemcgilallen has quit [Quit: jessemcgilallen]
<djellemah> Ox0dea: it depends how different the new knowledge is to what you already know.
darkxploit has joined #ruby
jas02 has joined #ruby
mahlon_ has quit [Read error: Connection reset by peer]
roxtrongo has joined #ruby
mistermocha has quit [Ping timeout: 240 seconds]
<Ox0dea> djellemah: That's certainly the case, but the glad suffering of fools puts an egg in neither party's beer.
htmldrum has joined #ruby
vondruch has joined #ruby
riotjone_ has quit [Remote host closed the connection]
firstdayonthejob has quit [Ping timeout: 260 seconds]
Motoservo has quit [Quit: Shhh. I'm trying to get some sleep here.]
mistermocha has joined #ruby
<Ox0dea> It's just unfathomably easy to find precisely the information one is looking for in our modern times; it's infuriating to watch people forsake that privilege.
sp4rrow has quit [Quit: Textual IRC Client: www.textualapp.com]
l_tonz has quit [Remote host closed the connection]
riotjone_ has joined #ruby
aspiers has joined #ruby
colegatron has joined #ruby
mistermocha has quit [Ping timeout: 246 seconds]
roxtrongo has quit [Ping timeout: 244 seconds]
trosborn has quit [Quit: trosborn]
riotjone_ has quit [Ping timeout: 240 seconds]
terminalrecluse has joined #ruby
baweaver has quit [Remote host closed the connection]
<[spoiler]> Ox0dea: what... why'd you put an egg in beer?
<Ox0dea> [spoiler]: It's an idiom I learned this weekend: http://www.thesaurus.com/browse/egg%20in%20one's%20beer
DEA7TH has joined #ruby
valkyrka has joined #ruby
<[spoiler]> OH
<[spoiler]> Uselessness of the expression is meta
sundhell has joined #ruby
juanpablo__ has joined #ruby
<[spoiler]> It's as useless as the very thing it describes
ibouvousaime has quit [Ping timeout: 268 seconds]
kimegede has joined #ruby
timonv has quit [Ping timeout: 268 seconds]
kalusn has joined #ruby
ibouvousaime has joined #ruby
juanpablo__ has quit [Ping timeout: 260 seconds]
shredding has joined #ruby
<Ox0dea> [spoiler]: Did you see the Sinatra app? >:)
lukaszes has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
dopieee has joined #ruby
<[spoiler]> Which sinatra app?
<[spoiler]> you mean *the* app, or something built using sinatra?
<[spoiler]> Oh yeah someone linked it the other day :D
Ulfalizer has joined #ruby
<Ox0dea> Heh.
<[spoiler]> it's beautiful
<Ox0dea> <3
finisherr has quit [Quit: finisherr]
ta has joined #ruby
dopie has quit [Ping timeout: 264 seconds]
kiddorails has joined #ruby
<adaedra> Bonjour
<`derpy> moin
ruurd has quit [Read error: Connection reset by peer]
trosborn has joined #ruby
ruurd has joined #ruby
Hounddog has joined #ruby
iateadonut has quit [Quit: Leaving.]
lipoqil has joined #ruby
cwong_on_irc has joined #ruby
kies^ has quit [Ping timeout: 250 seconds]
SCHAAP137 has quit [Ping timeout: 240 seconds]
al2o3-cr has joined #ruby
darkxploit has quit [Ping timeout: 250 seconds]
terminalrecluse has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
bruno- has joined #ruby
astrobun_ has quit [Remote host closed the connection]
astrobun_ has joined #ruby
nfk|laptop has joined #ruby
gener1c_ has joined #ruby
skade has joined #ruby
gener1c has quit [Ping timeout: 256 seconds]
blue_deref has quit [Quit: bbn]
devoldmx has joined #ruby
djbkd has quit [Remote host closed the connection]
Rollabunna has joined #ruby
bruno- has quit [Ping timeout: 240 seconds]
bruno- has joined #ruby
bruno- is now known as Guest46913
gener1c has joined #ruby
lubarch has quit [Quit: leaving]
devoldmx has quit [Ping timeout: 246 seconds]
gener1c_ has quit [Ping timeout: 255 seconds]
Rollabunna has quit [Ping timeout: 265 seconds]
SCHAAP137 has joined #ruby
ruurd has quit [Quit: ZZZzzz…]
Guest46913 has quit [Ping timeout: 252 seconds]
ta has quit [Remote host closed the connection]
blackmesa has joined #ruby
m3_del has joined #ruby
bruno-_ has joined #ruby
trosborn has quit [Quit: trosborn]
machan has joined #ruby
darkxploit has joined #ruby
skade has quit [Quit: Computer has gone to sleep.]
akem has joined #ruby
bruno-_ has quit [Ping timeout: 240 seconds]
TheNet has quit [Remote host closed the connection]
m3_del has quit [Ping timeout: 252 seconds]
matcouto has joined #ruby
machan has quit [Read error: Connection reset by peer]
blackmesa has quit [Ping timeout: 268 seconds]
ruurd has joined #ruby
bruno-_ has joined #ruby
<yorickpeterse> morning
vondruch has quit [Quit: Ex-Chat]
d34th4ck3r has quit [Quit: zzz]
kiddorails has quit [Remote host closed the connection]
bMalum has joined #ruby
bruno-_ has quit [Ping timeout: 255 seconds]
blackmesa has joined #ruby
bruno-_ has joined #ruby
peteykun has quit [Ping timeout: 250 seconds]
ta has joined #ruby
ruurd has quit [Read error: Connection reset by peer]
jwaldrip has quit [Ping timeout: 256 seconds]
bruno-_ has quit [Ping timeout: 240 seconds]
Blaguvest has quit []
bruno- has joined #ruby
Azulinho has joined #ruby
ibouvousaime has quit [Ping timeout: 252 seconds]
ruurd has joined #ruby
gener1c has quit [Read error: Connection reset by peer]
Musashi007 has quit [Quit: Musashi007]
sepp2k has joined #ruby
astrobun_ has quit [Remote host closed the connection]
gener1c has joined #ruby
bruno- has quit [Ping timeout: 265 seconds]
<djellemah> Ox0dea: It is possible to choose to not let people in-fury-ate you. Just let them run off your back like a duck typing. I have no idea where I learned that idiom :-p
l_tonz has joined #ruby
darkhex has quit [Quit: Textual IRC Client: www.textualapp.com]
yojimmbo has joined #ruby
<Ox0dea> djellemah: That's arguably a metaphysical assertion, but I do realize that offense cannot be given. The bit about the duck is lost on me, I'm afraid.
riotjones has joined #ruby
rgtk has joined #ruby
ibouvousaime has joined #ruby
jordanloky has joined #ruby
jakko has joined #ruby
mark4 has joined #ruby
l_tonz has quit [Ping timeout: 255 seconds]
ruurd has quit [Read error: Connection reset by peer]
riotjones has quit [Ping timeout: 244 seconds]
baweaver has joined #ruby
rgtk has quit [Ping timeout: 260 seconds]
skade has joined #ruby
mndoci has joined #ruby
vondruch has joined #ruby
bigkevmcd has joined #ruby
lukaszes has joined #ruby
<djellemah> Ox0dea: No worries - stoopid joke. Stopping now before I accumulate too much OT.
darkxploit has quit [Ping timeout: 256 seconds]
baweaver has quit [Ping timeout: 260 seconds]
zenguy_pc has quit [Ping timeout: 260 seconds]
ruurd has joined #ruby
htmldrum has quit [Ping timeout: 265 seconds]
tulak has joined #ruby
mndoci has quit [Ping timeout: 260 seconds]
bruno- has joined #ruby
<Ox0dea> ~ $ ruby -e 'send def ot; "#{ot}" end' || echo ok?
<Ox0dea> ok?
<Ox0dea> Well, that can't be good.
d34th4ck3r has joined #ruby
<apeiros> that looks like a creative infinite loop?
<Ox0dea> apeiros: Well, sure, but nothing bad happened?
<apeiros> I didn't run it
<apeiros> why interpolate?
<Ox0dea> No, I meant on my end.
nfk|laptop has quit [Ping timeout: 260 seconds]
<apeiros> ran it now. getting the expected stack level too deep (SystemStackError)
nfk|laptop has joined #ruby
* apeiros brb
<Ox0dea> It was in response to djellemah's "accumulate too much OT".
jwaldrip has joined #ruby
devbug_ has quit [Read error: Connection reset by peer]
User458764 has joined #ruby
ruurd has quit [Read error: Connection reset by peer]
bruno- has quit [Ping timeout: 240 seconds]
cwong_on_irc has quit [Quit: Leaving.]
rdark has joined #ruby
skade has quit [Read error: No route to host]
mistermocha has joined #ruby
bruno- has joined #ruby
Peg-leg has joined #ruby
Rollabunna has joined #ruby
matcouto has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
darkxploit has joined #ruby
Blaguvest has joined #ruby
mattwildig has joined #ruby
zenguy_pc has joined #ruby
vigintas has joined #ruby
sepp2k has quit [Quit: Leaving.]
bruno- has quit [Ping timeout: 265 seconds]
mistermocha has quit [Ping timeout: 260 seconds]
vigintas has quit [Client Quit]
beauby has joined #ruby
tulak has quit [Remote host closed the connection]
BrazenBraden has joined #ruby
mattwildig has quit [Ping timeout: 244 seconds]
tulak has joined #ruby
ruurd has joined #ruby
<djellemah> Phew, well I guess it's all ok?
akem has quit [Quit: Bye]
ruurd has quit [Client Quit]
User458764 has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
<Ox0dea> djellemah: `send def foo; foo; end` returns immediately on current HEAD; that's probably very not okay.
<Ox0dea> Maybe the core team have solved the halting problem.
machan has joined #ruby
TheHodge has joined #ruby
sepp2k has joined #ruby
skade has joined #ruby
jwaldrip has quit [Ping timeout: 246 seconds]
Guest7171 has joined #ruby
<djellemah> Hah, look at that. Someone coloured in autoconf since the last time I built ruby.
dionysus69 has joined #ruby
dionysus69 has quit [Remote host closed the connection]
<djellemah> I like it when the OS does something unexpected that's also pleasant.
dionysus69 has joined #ruby
skade has quit [Read error: Connection reset by peer]
mistermocha has joined #ruby
<Ox0dea> djellemah: Hm? How's the OS have anything to do with it?
dopieee has quit [Quit: Leaving]
User458764 has joined #ruby
dopie has joined #ruby
m3_del has joined #ruby
<djellemah> gotta go. Back later.
<Ox0dea> Damn. I thought I had a trunk buddy.
<Ox0dea> `define_method(:foo, &:bar)` for a free SIGSEGV once your compilation finishes.
Alina-malina has joined #ruby
ruurd has joined #ruby
krz has quit [Read error: Connection reset by peer]
<Ulfalizer> is the meaning of the rake pkg/, ports/, and tmp/ directories documented anywhere?
mistermocha has quit [Ping timeout: 244 seconds]
krz has joined #ruby
TheNet has joined #ruby
m3_del has quit [Ping timeout: 240 seconds]
<yorickpeterse> pkg/ is where built .gem files end up
<yorickpeterse> tmp/ is where rake-compiler does most of its packaging work (before copying things to pkg/)
<yorickpeterse> ports/ I have no idea
skade has joined #ruby
stamina has joined #ruby
Xeago has joined #ruby
<Ulfalizer> ok, thanks
ruurd has quit [Read error: Connection reset by peer]
ruurd has joined #ruby
Oog has joined #ruby
krz has quit [Quit: WeeChat 1.2]
leafybasil has joined #ruby
leafybasil has quit [Remote host closed the connection]
leafybasil has joined #ruby
lkba has joined #ruby
Silverfall has quit [Quit: bye]
timonv has joined #ruby
juanpablo__ has joined #ruby
vev_ has joined #ruby
<vev_> a scientific in neuronal network say to me see with ruby programming language
<vev_> we are voluntary on #libreidea and we re looking for a dev to help in this project >> http://www.libreidea.org/Autumn_ideas_of_tagtree
mistermocha has joined #ruby
<vev_> the goal is to represents ideas thanns to a tree
Oog has quit []
Bloomer has quit [Remote host closed the connection]
<vev_> but it will better to do it like a neuronal network or a mindmap
ruurd has quit [Read error: Connection reset by peer]
<vev_> thanks*
User458764 has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
<yorickpeterse> What is your question?
Musashi007 has joined #ruby
<vev_> is something existing to do what i want?
d34th4ck3r has quit [Quit: zzz]
<yorickpeterse> No idea, have you tried searching for anything?
<vev_> a graphic representation in 3d of a mindmap or a neuron network?
<vev_> i did not yorickpeterse
juanpablo__ has quit [Ping timeout: 264 seconds]
beauby has quit [Read error: Connection reset by peer]
skade has quit [Read error: Connection reset by peer]
<yorickpeterse> well, time to start searching then :)
krz has joined #ruby
<vev_> any idea whare?
<vev_> where?*
<yorickpeterse> Google?
<vev_> merci Ox0dea
<Ox0dea> vev_: I did not expect you to be French, but you're welcome.
mistermocha has quit [Ping timeout: 240 seconds]
<vev_> merci
<vev_> tu es?
<Ox0dea> Hey, are you trolling?
platzhirsch has joined #ruby
<vev_> i am just asking are you fr?
<Ox0dea> Oh, so you are. I thought you randomly switched to Spanish.
<vev_> je suis fr
htmldrum has joined #ruby
<vev_> you?
karapetyan has quit [Remote host closed the connection]
<Ox0dea> Not French.
<vev_> k :p
trosborn has joined #ruby
trosborn has quit [Client Quit]
baweaver has joined #ruby
<vev_> do you understand what the project i? Ox0dea
<apeiros> I don't think "tu es?" is spanish :D
<Ox0dea> vev_: Enough of it to realize that you probably want SciPy and/or NLTK, I guess.
<adaedra> Right, it's missing a ¿
beauby has joined #ruby
<vev_> ok
<Ox0dea> adaedra: It'd be "¿Eres tu?", I believe.
Silverfall has joined #ruby
fumduq has quit [Ping timeout: 255 seconds]
<vev_> my dev is also looking for someone to make the core of this project >> http://www.libreidea.org/Collaborative_keywords_mixing_project
<Ox0dea> vev_: Now you're spamming.
<adaedra> I don't know Spanish well enough for that.
neanderslob has quit [Remote host closed the connection]
<vev_> our project is innovative and it uses collaboration intelligence
<Ox0dea> I hope it catches fire.
<yorickpeterse> Ox0dea: calm down
<Ox0dea> yorickpeterse: With what incentive do you propose I ought to strive to attenuate the quantity of decibels I'm producing?
<vev_> if you want to know more about #libreidea i ll be there
<vev_> if you are a motivated dev, you ll be very welcome :p
ruurd has joined #ruby
baweaver has quit [Ping timeout: 246 seconds]
<Xeago> vev_: I am here because I feel welcome even when not motivated.
<yorickpeterse> Ox0dea: don't be a cock
<Ox0dea> yorickpeterse: Turn down for what!
<yorickpeterse> vev_: and this isn't the right place to solicit work
<yorickpeterse> errr s/work/devs
<yorickpeterse> whatever
<adaedra> Yeah, no work in this place.
<yorickpeterse> that too
htmldrum has quit [Ping timeout: 240 seconds]
<yorickpeterse> I'm just looking at a DB misbehave
<adaedra> DBs can do something else?
<vev_> and good ideas are welcome on libreidea.org
<vev_> also research questions
vigintas has joined #ruby
<yorickpeterse> vev_: you can stop advertising now
<vev_> merci pour les infos scipy
<vev_> and nltk
<adaedra> hard time switching languages, eh?
<vev_> scipy is not python?
haxrbyte has joined #ruby
TheNet has quit [Ping timeout: 252 seconds]
<vev_> or is it compatible with ruby?
skade has joined #ruby
subscope has joined #ruby
<Ox0dea> self.sides.send :orbit
karapetyan has joined #ruby
beauby has quit [Ping timeout: 272 seconds]
teclator has joined #ruby
zylogz80 has joined #ruby
trosborn has joined #ruby
krz has quit [Ping timeout: 255 seconds]
<adaedra> :')
kirun has joined #ruby
ruurd has quit [Read error: Connection reset by peer]
beauby has joined #ruby
vigintas has quit [Quit: vigintas]
favadi has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
ruurd has joined #ruby
karapetyan has quit [Remote host closed the connection]
karapetyan has joined #ruby
lipoqil has quit [Quit: Connection closed for inactivity]
eikood has quit [Ping timeout: 240 seconds]
fumduq has joined #ruby
trosborn has quit [Quit: trosborn]
mprelude has quit [Quit: WeeChat 1.3]
leafybas_ has joined #ruby
devoldmx has joined #ruby
vigintas has joined #ruby
tkuchiki has quit [Remote host closed the connection]
trosborn has joined #ruby
rapidjammer has quit []
vigintas has quit [Remote host closed the connection]
leafybasil has quit [Ping timeout: 268 seconds]
mprelude has joined #ruby
vigintas has joined #ruby
dionysus69 has quit [Quit: dionysus69]
devoldmx has quit [Ping timeout: 268 seconds]
symm- has joined #ruby
ruurd has quit [Read error: Connection reset by peer]
<djellemah> Ox0dea: for sha 840e6b630 using send def foo; foo; end I get SystemStackError: stack level too deep
Musashi007 has quit [Quit: Musashi007]
<Ox0dea> djellemah: That's interesting.
<Ox0dea> djellemah: How about `define_method(:foo, &:bar)`?
m3_del has joined #ruby
vigintas has quit [Ping timeout: 246 seconds]
favadi has joined #ruby
vigintas has joined #ruby
* djellemah waits for gcc
ruurd has joined #ruby
<Ox0dea> Yay, Gentoo. :P
<Ox0dea> I'm rebuilding from scratch in case ccache managed to bork something.
htmldrum has joined #ruby
notnoyyyyy has quit [Quit: Tis but a scratch]
JammyHammy has joined #ruby
notnoyyyyy has joined #ruby
m3_del has quit [Ping timeout: 252 seconds]
moeabdol has joined #ruby
Ropeney has joined #ruby
tulak_ has joined #ruby
<djellemah> Ox0dea: Yip, SEGV for define_method(:foo, &:bar)
<Ox0dea> djellemah: It's weird, because actually invoking #to_proc "works": https://eval.in/461527
favadi has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
beauby has quit [Ping timeout: 272 seconds]
<Ox0dea> But nobu has been doing some interesting things to optimize Symbol#to_proc (eliding bits and pieces of critical environment along the way, it seems).
<djellemah> Was just trying that.
bMalum has quit [Quit: bMalum]
tulak has quit [Ping timeout: 255 seconds]
Rickmasta has joined #ruby
Guest7171 has quit [Quit: Textual IRC Client: www.textualapp.com]
Pisuke has quit [Read error: Connection reset by peer]
ruurd has quit [Read error: Connection reset by peer]
<TheBrayn> how can I tell rubocop to check the syntax for a specific ruby-version?
<djellemah> Ox0dea: gcc (Gentoo 4.8.4 p1.8, pie-0.6.1) 4.8.4 . You?
<TheBrayn> my local machine is running the most recent version but the server where the code should be deployed is running 2.0.0
ruurd has joined #ruby
<bougyman> gah.
<bougyman> what to do when Nokogiri can't search a doc?
<bougyman> with .xpath, I can't find anything, not even cvrfdoc (the root)
<bougyman> with .css, I can find stuff in part of the document but not others.
<bougyman> xmllint says the doc is fine.
<bougyman> and nokogiri doesn't complain in parsing.
<yorickpeterse> bougyman: that's because the XML document uses a non default XML namespace
<yorickpeterse> note the xmlns
blueOxigen has joined #ruby
<bougyman> yorickpeterse: so.... shouldn't css still work?
<bougyman> doc.css('DocumentTracking InitialReleaseDate').text
<bougyman> => "2015-01-05T19:36:00Z"
<bougyman> [21] pry(main)> doc.css('Vulnerability')
<bougyman> => []
<bougyman> [22] pry(main)> doc.xpath('//cvrfdoc')
<bougyman> it works for some of the tags.
<yorickpeterse> IIRC nokogiri lets you do something like some_doc.xpath('foo:cvrfdoc/foo:DocumentTitle', nil, 'foo' => 'http://www.icasi.org/CVRF/schema/cvrf/1.1')
bluOxigen has quit [Ping timeout: 240 seconds]
<bougyman> would your xml parser handle this better?
trosborn has quit [Quit: trosborn]
startupality has joined #ruby
<yorickpeterse> No, because it's XML specified behaviour
<Ox0dea> djellemah: gcc (GCC) 5.2.0
<yorickpeterse> Though in Oga you can just use "*" as the namespace name and it will match
<yorickpeterse> but you have to use it for every node
<djellemah> Ox0dea: k, so not a gcc thing then.
<bougyman> i'm still confused as to why it can't .css the file
<bougyman> nokogiri, that is.
Glenny has quit [Quit: Konversation terminated!]
<djellemah> bougyman: Nokogiri::XML::Document#remove_namespaces! might help. Careful of unintended consequences though.
<bougyman> hrm.
<bougyman> doc.xpath('//xmlns:cvrfdoc').xpath('xmlns:DocumentTitle')
<bougyman> seems to work.
<bougyman> but not for Vulnerability
<bougyman> oh crap
<bougyman> the ns changes for each section.
<bougyman> Vulnerability xmlns="http://www.icasi.org/CVRF/schema/vuln/1.1"
lkba has quit [Ping timeout: 256 seconds]
<bougyman> different xmlns
FernandoBasso has joined #ruby
vigintas has quit [Read error: Connection reset by peer]
<yorickpeterse> You can also just strip the namespaces
bonemind has joined #ruby
ruurd has quit [Read error: Connection reset by peer]
<bougyman> it looks like remove_namespaces! works, here.
riotjones has joined #ruby
<bougyman> but it worries the crap out of me.
<yorickpeterse> How so? It shouldn't matter when just querying
<yorickpeterse> XML namespaces are bullshit anyway
<bougyman> probably right.
Gi0 has joined #ruby
rgtk has joined #ruby
vigintas has joined #ruby
codecop has joined #ruby
kedare has joined #ruby
skcin7 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
bMalum has joined #ruby
tulak_ has quit [Read error: Connection reset by peer]
l_tonz has joined #ruby
tulak has joined #ruby
riotjones has quit [Ping timeout: 256 seconds]
leafybas_ has quit []
leafybasil has joined #ruby
rgtk has quit [Ping timeout: 260 seconds]
baweaver has joined #ruby
jwaldrip has joined #ruby
akem has joined #ruby
<Ox0dea> Did nobu just go over matz?
trosborn has joined #ruby
zenguy_pc has quit [Ping timeout: 244 seconds]
<yorickpeterse> something something should've been specced out properly
ruurd has joined #ruby
vev_ has quit [Ping timeout: 264 seconds]
<adaedra> specs? Where we're going we don't need specs.
Pisuke has joined #ruby
juanpablo__ has joined #ruby
jwaldrip has quit [Ping timeout: 264 seconds]
sebstrax has joined #ruby
baweaver has quit [Ping timeout: 246 seconds]
<Ox0dea> I like how he tagged #11537 and not #11618.
TheNet has joined #ruby
vev_ has joined #ruby
ruurd has quit [Read error: Connection reset by peer]
l_tonz has quit [Ping timeout: 255 seconds]
juanpablo__ has quit [Ping timeout: 250 seconds]
Rickmasta has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
blackmesa has quit [Ping timeout: 255 seconds]
FernandoBasso has quit [Ping timeout: 252 seconds]
vigintas has quit [Quit: vigintas]
joonty has quit [Quit: joonty]
<Ox0dea> djellemah: Well, whatever that was, it's in the ether; rebuilding fixed it and I don't know how to read ccache manifests.
l_tonz has joined #ruby
vigintas has joined #ruby
zenguy_pc has joined #ruby
joonty has joined #ruby
hanmac has quit [Ping timeout: 246 seconds]
mattwildig has joined #ruby
trosborn has quit [Quit: trosborn]
lukaszes has quit [Quit: Textual IRC Client: www.textualapp.com]
lukaszes has joined #ruby
ruurd has joined #ruby
subscope has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
syath has joined #ruby
mattwildig has quit [Ping timeout: 268 seconds]
subscope has joined #ruby
skade has quit [Ping timeout: 252 seconds]
colegatron has quit [Ping timeout: 252 seconds]
subscope has quit [Client Quit]
subscope has joined #ruby
Oatmeal has quit [Ping timeout: 240 seconds]
leafybasil has quit [Remote host closed the connection]
blackmesa has joined #ruby
Xeago has quit [Remote host closed the connection]
leafybasil has joined #ruby
vev_ has quit [Quit: Leaving, see you on libreidea]
vev_ has joined #ruby
krz has joined #ruby
leafybasil has quit [Ping timeout: 240 seconds]
leafybasil has joined #ruby
m3_del has joined #ruby
skade has joined #ruby
Xeago has joined #ruby
hanmac has joined #ruby
colegatron has joined #ruby
Oatmeal has joined #ruby
skade has quit [Client Quit]
m3_del has quit [Ping timeout: 240 seconds]
shredding has quit [Ping timeout: 255 seconds]
radgeRayden_ has joined #ruby
TheNet has quit [Ping timeout: 246 seconds]
blackmesa has quit [Ping timeout: 260 seconds]
vev_ has quit [Ping timeout: 260 seconds]
kalusn has quit [Remote host closed the connection]
radgeRayden has quit [Ping timeout: 246 seconds]
trosborn has joined #ruby
trosborn has quit [Client Quit]
ruurd has quit [Read error: Connection reset by peer]
marr has joined #ruby
symm- has quit [Ping timeout: 250 seconds]
User458764 has joined #ruby
lacrymology has joined #ruby
<lacrymology> I'm using rbenv and bundle, I've got the right version of ruby activated (with rbenv): ruby 2.1.5p273 (2014-11-13 revision 48405) [x86_64-linux]
trosborn has joined #ruby
<lacrymology> but bundle install says Your Ruby version is 2.2.3, but your Gemfile specified 2.1.5
ruurd has joined #ruby
trosborn has quit [Client Quit]
vev_ has joined #ruby
zotherstupidguy has joined #ruby
hemelskonijn has joined #ruby
roxtrongo has joined #ruby
zotherstupidguy has quit [Client Quit]
kalusn has joined #ruby
segfalt__ has joined #ruby
vev_ has quit [Max SendQ exceeded]
vev_ has joined #ruby
<havenwood> lacrymology: Is Bundler installed on 2.1.5? Already rehashed?
<lacrymology> havenwood: I might be using the system executable now that you mention it
mistermocha has joined #ruby
<lacrymology> havenwood: gem install bundler died horribly
roxtrongo has quit [Ping timeout: 260 seconds]
houhoulis has joined #ruby
sgambino has joined #ruby
hemelskonijn has left #ruby ["Leaving"]
dopamean_ has quit [Ping timeout: 260 seconds]
<lacrymology> /home/lacrymology/.rbenv/versions/2.1.5/lib/ruby/2.1.0/rdoc/generator/markup.rb:135: [BUG] Segmentation fault at 0x00000000000000
<lacrymology> ruby 2.1.5p273 (2014-11-13 revision 48405) [x86_64-linux]
l_tonz has quit [Ping timeout: 255 seconds]
vigintas has quit [Quit: vigintas]
AMERICAN_PSYCHO has joined #ruby
absolutejam has quit [Ping timeout: 265 seconds]
vigintas has joined #ruby
<lacrymology> it seems to work regardless..
mistermocha has quit [Ping timeout: 272 seconds]
peteykun has joined #ruby
<lacrymology> is there a difference between "bundle install" and "bundler install"?
s00pcan has joined #ruby
<lacrymology> no, they seem to be the same
karapetyan has quit [Remote host closed the connection]
skade has joined #ruby
vigintas has quit [Client Quit]
Mon_Ouie has joined #ruby
vigintas has joined #ruby
joonty has quit [Quit: joonty]
ruurd has quit [Read error: Connection reset by peer]
mndoci has joined #ruby
vigintas has quit [Client Quit]
vigintas has joined #ruby
Rollabunna has quit [Remote host closed the connection]
vigintas has quit [Client Quit]
ruurd has joined #ruby
Icey has joined #ruby
mndoci has quit [Ping timeout: 250 seconds]
vigintas has joined #ruby
p0wn3d__ has joined #ruby
machan has quit [Ping timeout: 260 seconds]
tkuchiki has joined #ruby
tkuchiki has quit [Remote host closed the connection]
Mon_Ouie has quit [Ping timeout: 260 seconds]
tkuchiki has joined #ruby
lxsameer has quit [Quit: Leaving]
radgeRayden has joined #ruby
absolutejam has joined #ruby
skade has quit [Quit: Computer has gone to sleep.]
ruurd has quit [Read error: Connection reset by peer]
vigintas has quit [Client Quit]
vigintas has joined #ruby
radgeRayden_ has quit [Ping timeout: 246 seconds]
duckpuppy has joined #ruby
duncannz has quit [Read error: Connection reset by peer]
haxrbyte_ has joined #ruby
vigintas1 has joined #ruby
p0wn3d__ has quit [Ping timeout: 264 seconds]
vigintas1 has quit [Client Quit]
absolutejam has quit [Ping timeout: 272 seconds]
haxrbyte has quit [Ping timeout: 272 seconds]
gagrio has quit [Ping timeout: 260 seconds]
vigintas has quit [Ping timeout: 244 seconds]
vigintas has joined #ruby
vigintas has quit [Read error: Connection reset by peer]
vigintas1 has joined #ruby
vigintas1 has quit [Client Quit]
vigintas has joined #ruby
subscope has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
Guest53 has joined #ruby
ruurd has joined #ruby
CloCkWeRX has joined #ruby
atomical has joined #ruby
devoldmx has joined #ruby
slackbotgz has joined #ruby
lukaszes has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
vigintas has quit [Client Quit]
ibouvousaime has quit [Ping timeout: 240 seconds]
diegoaguilar has joined #ruby
xMopxShell has quit [Ping timeout: 255 seconds]
terlar has quit [Quit: WeeChat 1.3]
joonty has joined #ruby
Bloomer has joined #ruby
<djellemah> A few days ago, someone here was looking for a symbolic algebra library. How about http://sciruby.com/blog/2015/08/17/ruby-wrappers-for-symengine/
devoldmx has quit [Ping timeout: 246 seconds]
wprice has joined #ruby
skade has joined #ruby
blackmesa has joined #ruby
diegoaguilar has quit [Ping timeout: 260 seconds]
skade has quit [Client Quit]
tmtwd has joined #ruby
Rollabunna has joined #ruby
MuffinPimp has quit [Ping timeout: 260 seconds]
ruurd has quit [Ping timeout: 265 seconds]
mattwildig has joined #ruby
m3_del has joined #ruby
haxrbyte has joined #ruby
haxrbyte_ has quit [Read error: Connection reset by peer]
darkxploit has quit [Quit: Leaving]
yojimmbo has quit [Read error: Connection reset by peer]
TheNet has joined #ruby
gagrio has joined #ruby
m3_del has quit [Ping timeout: 246 seconds]
ruurd has joined #ruby
absolutejam has joined #ruby
minimalism has joined #ruby
claw has quit [Remote host closed the connection]
diegoaguilar has joined #ruby
cornerma1 has joined #ruby
zylogz80 has quit [Ping timeout: 256 seconds]
<vev_> we are voluntary on #libreidea and we re looking for a dev to help in this project >> http://www.libreidea.org/Autumn_ideas_of_tagtree
Randroid has joined #ruby
ruby-lang803 has joined #ruby
yfeldblum has quit [Ping timeout: 246 seconds]
<ruby-lang803> Hello
claw has joined #ruby
skade has joined #ruby
cornerman has quit [Ping timeout: 244 seconds]
cornerma1 is now known as cornerman
skade has quit [Client Quit]
ruurd has quit [Read error: Connection reset by peer]
jwaldrip has joined #ruby
gusTester has joined #ruby
djbkd has joined #ruby
nettoweb has joined #ruby
subscope has joined #ruby
<lacrymology> is there a difference in gems between different versions of ruby? I'm having trouble making a project work and I wonder if it's because I installed the rails gem for a different version of ruby
gusTester has left #ruby [#ruby]
<apeiros> lacrymology: some gems may require a specific ruby version
<apeiros> so yes, depending on your setup, a different ruby may result in a different gem version
ledestin has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<apeiros> or do you mean if you have a ruby version manager? in that case: yes, the ruby version managers I'm aware of will keep gems separate for each ruby version it manages.
jwaldrip has quit [Ping timeout: 246 seconds]
ruurd has joined #ruby
Jardayn has joined #ruby
sdothum has joined #ruby
juanpablo__ has joined #ruby
<lacrymology> apeiros: I'm using rbenv, and as far as I can tell I have the right version of ruby activated, but things won't work. I'm using 2.1.5 but gems are being installed in ~/.gem/ruby/2.2.0/, which raises a flag in my untrained eyes
djbkd has quit [Ping timeout: 240 seconds]
<apeiros> 2.2.0 seems indeed wrong for ruby 2.1.5, I'd expect 2.1.0 there.
<lacrymology> so..
<apeiros> but I'm not using rbenv, so can't help you much there.
radgeRayden_ has joined #ruby
<apeiros> you can use `gem env` to get the ruby your gem is run under
<lacrymology> should I just uninstall all gems I have and retry somehow? I don't mind, it's a new setup so there's nothing too complicated there
ibouvousaime has joined #ruby
riotjones has joined #ruby
dorei has joined #ruby
<lacrymology> apeiros: weird http://dpaste.com/2CX2D47
terlar has joined #ruby
riotjones has quit [Write error: Connection reset by peer]
rgtk has joined #ruby
taylorrf has joined #ruby
<lacrymology> ah
<lacrymology> I know the problem
riotjones has joined #ruby
<lacrymology> I've got GEM_HOME exported
radgeRayden has quit [Ping timeout: 265 seconds]
l_tonz has joined #ruby
htmldrum has quit [Ping timeout: 250 seconds]
nettoweb has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
juanpablo__ has quit [Ping timeout: 260 seconds]
synthroid has joined #ruby
mostlybadfly has joined #ruby
Randroid has quit [Quit: Randroid]
slackbotgz has quit [Remote host closed the connection]
rgtk has quit [Ping timeout: 260 seconds]
riotjones has quit [Ping timeout: 240 seconds]
ruby-lang803 has quit [Quit: Page closed]
krz has quit [Ping timeout: 268 seconds]
baweaver has joined #ruby
mwlang has joined #ruby
l_tonz has quit [Ping timeout: 255 seconds]
ruurd has quit [Read error: Connection reset by peer]
CloCkWeRX has left #ruby [#ruby]
lxsameer has joined #ruby
lxsameer has joined #ruby
zenguy_pc has quit [Ping timeout: 250 seconds]
machan has joined #ruby
DEA7TH has quit [Quit: DEA7TH]
baweaver has quit [Ping timeout: 246 seconds]
RobertBirnie has joined #ruby
TheNet has quit [Ping timeout: 246 seconds]
JDiPierro has joined #ruby
ruurd has joined #ruby
Guest53 is now known as Jerrod
mag42c has joined #ruby
<Jerrod> Is net/ldap in the standard library?
mistermocha has joined #ruby
leafybasil has quit [Remote host closed the connection]
leafybasil has joined #ruby
jwaldrip has joined #ruby
vayan has joined #ruby
MuffinPimp has joined #ruby
ibouvousaime has quit [Ping timeout: 250 seconds]
<TheBrayn> nope
<Jerrod> Ohh, I see now. It's in ruby-net-ldap.
s00pcan_ has joined #ruby
mistermocha has quit [Ping timeout: 240 seconds]
zenguy_pc has joined #ruby
ruurd has quit [Quit: ZZZzzz…]
jwaldrip has quit [Ping timeout: 255 seconds]
QualityAddict has quit []
krz has joined #ruby
ruurd has joined #ruby
Feyn has quit [Quit: Leaving]
timonv has quit [Ping timeout: 255 seconds]
CloCkWeRX has joined #ruby
bruno- has joined #ruby
s00pcan_ has quit [Ping timeout: 265 seconds]
seitensei has joined #ruby
malconis has joined #ruby
sankaber has joined #ruby
purplexed- has joined #ruby
purplexed- has quit [Changing host]
purplexed- has joined #ruby
ekinmur has joined #ruby
dionysus69 has joined #ruby
gagrio has quit [Ping timeout: 250 seconds]
queequeg1 has quit [Ping timeout: 260 seconds]
kfpratt has joined #ruby
queequeg1 has joined #ruby
treehug8_ has joined #ruby
zylogz80 has joined #ruby
arup_r has joined #ruby
InternetFriend has joined #ruby
rgtk has joined #ruby
CloCkWeRX has quit [Ping timeout: 240 seconds]
machan has quit [Ping timeout: 260 seconds]
troulouliou_div2 has joined #ruby
devoldmx has joined #ruby
m3_del has joined #ruby
machan has joined #ruby
ibouvousaime has joined #ruby
rgtk has quit [Ping timeout: 260 seconds]
lukaszes has joined #ruby
devoldmx has quit [Ping timeout: 240 seconds]
xantik has quit [Quit: Leaving]
dennis_ has left #ruby ["http://quassel-irc.org - Chat comfortably. Anywhere."]
m3_del has quit [Ping timeout: 255 seconds]
Jerrod has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
kfpratt has quit []
sandals has joined #ruby
ziprar has joined #ruby
p0wn3d__ has joined #ruby
nettoweb has joined #ruby
AMERICAN_PSYCHO has quit [Quit: Goodbye!]
colegatron has quit [Ping timeout: 240 seconds]
ruurd has quit [Read error: Connection reset by peer]
desmondhume has joined #ruby
gambl0re has quit [Ping timeout: 240 seconds]
DEA7TH has joined #ruby
gagrio has joined #ruby
Mia has joined #ruby
Mia has joined #ruby
desmondhume has quit [Client Quit]
desmondhume has joined #ruby
Axy has quit [Ping timeout: 246 seconds]
akem has quit [Read error: No route to host]
babblebre has joined #ruby
akem has joined #ruby
uber has quit [Quit: bye]
Guest53 has joined #ruby
ruurd has joined #ruby
subscope has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
desmondhume has quit [Client Quit]
desmondhume has joined #ruby
desmondhume has quit [Client Quit]
desmondhume has joined #ruby
desmondhume has quit [Client Quit]
desmondhume has joined #ruby
nettoweb has quit [Ping timeout: 268 seconds]
malconis has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
ekleog has quit [Read error: Connection reset by peer]
odigity has joined #ruby
kfpratt has joined #ruby
<odigity> One can check the gem namespace by searching on rubygems.org before naming one's gem, but how does one check the *module/class* namespace across all registered gems? How do I determine who (if anyone) is currently using a module/class named Repo?
ekleog has joined #ruby
<adaedra> You pray everyone named their namespaces correctly
<desmondhume> asd
<odigity> I'd think rubydoc.info would be an appropriate place for a feature like that, since they parse all gem code...
<apeiros> odigity: out of luck
mikeharris22 has joined #ruby
<apeiros> there's no reasonable way to do so
supergeek has joined #ruby
<apeiros> but IMO any gem which violates naming conventions deserves to be shot down.
timonv has joined #ruby
dopie has quit [Ping timeout: 250 seconds]
roxtrongo has joined #ruby
<apeiros> so as long as your gem only uses the namespace its name suggest, the other party is to blame for any namespace-conflict
alexherbo2 has joined #ruby
pathrocle has joined #ruby
herbst has joined #ruby
<odigity> apeiros, rubydoc.info parses all gem code to generate RDoc, and in the process encounters the vast majority of module and class names. It would be possible to add a search function to that if they'd be willing to accept such a contribution.
<herbst> i need to create a unique list of domains, some have www some not, i need to keep it as it is. how do i do that?
<apeiros> odigity: wrong
<apeiros> it parses *some* gems. not all.
<herbst> obviously www.example.com and example.com should be the same
<odigity> apeiros, wouldn't it be fair to say it parses most gems?
<apeiros> at least afaik it only parses gems on demand.
newdan has joined #ruby
colegatron has joined #ruby
<apeiros> odigity: doesn't matter. your approach requires to have all gems. and you don't get that.
<odigity> apeiros, yes, but if a gem is so unpopular that no one's looked at the docs on rdoc.info, than I'm less concerned about collision. the problem solves itself, as long as perfection is not the goal
<apeiros> and IMO it doesn't matter anyway.
nettoweb has joined #ruby
<desmondhume> herbst what do you mean?
bigkevmcd has quit [Ping timeout: 256 seconds]
ruurd has quit [Read error: Connection reset by peer]
<apeiros> odigity: as said: as long as your gem only uses the namespace its name suggest, the other party is to blame for any namespace-conflict
<djellemah> LOL at # If any parameters are empty, we freak out and yell at the user.
mistermocha has joined #ruby
<apeiros> herbst: but www.example.com and example.com are not the same.
<odigity> apeiros, I do generally stick to my gem's namespace. However, I'm currently building a command-line tool that, like Bundler and Vagrant, supports a ruby config file, and it'd be nice if uses only had to type Repo.config do |config| instead of DevProd::Repo.config do |config|
mistermocha has quit [Remote host closed the connection]
<herbst> like i have ["hodor.example.com", "mimi.momo.com", "www.example.com", "example.com"] and would like to .uniq that list ignoring www. that the result is ["hodor.example.com", "mimi.momo.com", "www.example.com"]
dhjondoh has quit [Quit: dhjondoh]
<apeiros> herbst: i.e. they don't need to point at the same server, and even if they point at the same IP, they might be different pages.
<desmondhume> why keeping "www.example.com" instead of "example.com"?
<odigity> apeiros, especially since the code is only loaded in the context of my tool, and I can test for collisions before deploying
andywojo has joined #ruby
<herbst> desmondhume: i dont care actually, the first is ok
mistermocha has joined #ruby
<apeiros> odigity: don't.
<apeiros> odigity: include DevProd; Repo.config
CloCkWeRX has joined #ruby
<herbst> apeiros: its a internal tool. all our www and non www behave the same
<apeiros> herbst: then use a hash where you strip the www. for the keys.
roxtrongo has quit [Ping timeout: 250 seconds]
<odigity> apeiros, not as pretty as Vagrantfile, which is "Vagrant.configure(2) do |config|". :)
<djellemah> herbst: take a look at Enumerable#uniq - it takes a block
<apeiros> and then .values
<djellemah> or what apeiros said
<desmondhume> maybe some regex
<herbst> apeiros: djellemah: thanks both of you! i am sure one of that will work
<desmondhume> ignoring the first www.
<odigity> apeiros, I suppose I can just shorten it to DevProd.config; not as pretty as Repo.config, but short, and within my namespace.
nertzy has quit [Quit: This computer has gone to sleep]
<apeiros> odigity: all better than violating namespaces :)
<odigity> thanks for the feedback
Randroid has joined #ruby
<desmondhume> apeiros answer looks good btw
CloCkWeRX has left #ruby [#ruby]
newdan has quit [Ping timeout: 268 seconds]
Randroid has quit [Client Quit]
<apeiros> odigity: it coincidentally makes exploring code easier too, since it means you can infer from where some code stems
ruurd has joined #ruby
<odigity> apeiros, true -- and I hate both inconsistency and magic
<apeiros> with a plain `Repo.config` - a reader has no idea from which gem it is, given that there probably is no "repo" gem.
mistermo_ has joined #ruby
<odigity> apeiros, thank you, that sold me. I'm now at peace.
<apeiros> convinced another one! yay!
User458764 has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
shinnya has quit [Ping timeout: 255 seconds]
cdg has joined #ruby
roxtrongo has joined #ruby
NullVoxPopuli_ has joined #ruby
<NullVoxPopuli_> hi there!
<NullVoxPopuli_> I recently found this: https://github.com/suryagaddipati/linqr
<NullVoxPopuli_> and am wondering if there are plans to eventualyl incorporate linq-esque syntax in to ruby
subscope has joined #ruby
baweaver has joined #ruby
ekleog has quit [Read error: Connection reset by peer]
umgrosscol has joined #ruby
mistermo_ has quit [Ping timeout: 240 seconds]
<Xzanron> NullVoxPopuli_, I prefer the more functional style, even in C#. I just find it easier to read. e.g. list.first(5).map()
seitensei has quit [Remote host closed the connection]
skade has joined #ruby
ekleog has joined #ruby
Ivision has joined #ruby
<NullVoxPopuli_> Xzanron, what about where clauses?
jhn has joined #ruby
Ivision has left #ruby [#ruby]
<NullVoxPopuli_> I know you can just use `select{}`
<odigity> Since there's no thor channel: Does anyone know how the template() method works?
<NullVoxPopuli_> in ruby, anyway
axl_ has joined #ruby
TheNet has joined #ruby
ruurd has quit [Read error: Connection reset by peer]
ziprar has quit [Changing host]
ziprar has joined #ruby
lubarch has joined #ruby
ziprar is now known as zipace
chouhoul_ has quit [Ping timeout: 260 seconds]
baweaver has quit [Ping timeout: 246 seconds]
synthroid has quit [Remote host closed the connection]
User458764 has joined #ruby
kp666 has quit [Quit: Leaving]
tvon has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
synthroid has joined #ruby
mattwildig has quit [Remote host closed the connection]
uri_ has joined #ruby
skade has quit [Ping timeout: 246 seconds]
uri_ has quit [Client Quit]
ta has quit [Remote host closed the connection]
skade has joined #ruby
ruurd has joined #ruby
supergeek has quit [Quit: WeeChat 1.3]
newdan has joined #ruby
seitensei has joined #ruby
Alina-malina has quit [Ping timeout: 252 seconds]
rodfersou has joined #ruby
ESpiney has joined #ruby
subscope has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
codecop has quit [Remote host closed the connection]
karapetyan has joined #ruby
mistermocha has quit [Remote host closed the connection]
xaxisx has joined #ruby
sankaber has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
musou has joined #ruby
subscope has joined #ruby
subscope has quit [Client Quit]
polishdub has joined #ruby
whippythellama has joined #ruby
tagrudev has quit [Remote host closed the connection]
gregf has quit [Quit: WeeChat 1.3]
jmonreal has joined #ruby
inate has joined #ruby
ibouvousaime has quit [Quit: Leaving]
<jmonreal> when parsing a json, how can I make that for empty arrays to interpret as a 0
<jmonreal> ?
jakko has quit [Read error: Connection reset by peer]
ruurd has quit [Read error: Connection reset by peer]
gregf_ has quit [Read error: No route to host]
freerobby has joined #ruby
Guest53 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
ibouvousaime has joined #ruby
malconis has joined #ruby
<yorickpeterse> that's not how JSON works
<yorickpeterse> An empty array is not 0
malconis has quit [Remote host closed the connection]
<NullVoxPopuli_> json.presance || 0 would do it
tvon has joined #ruby
gregf_ has joined #ruby
malconis has joined #ruby
taylorrf has quit [Remote host closed the connection]
startupality has quit [Quit: startupality]
FernandoBasso has joined #ruby
cdg_ has joined #ruby
kimegede has quit [Quit: Linkinus - http://linkinus.com]
neohunter has quit [Quit: Textual IRC Client: www.textualapp.com]
ruurd has joined #ruby
The_Phoenix has joined #ruby
cdg has quit [Ping timeout: 240 seconds]
Guest53 has joined #ruby
lukaszes has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
rbennacer has joined #ruby
<yorickpeterse> There's no "presence" method in regular Ruby
subscope has joined #ruby
Azulinho has quit [Ping timeout: 260 seconds]
ghoti has joined #ruby
Xeago has quit [Remote host closed the connection]
Rickmasta has joined #ruby
weemsledeux has joined #ruby
fibbel has joined #ruby
tkuchiki has quit [Remote host closed the connection]
<ddv> presance doesn't exist in activesupport either
m3_del has joined #ruby
ruurd has quit [Read error: Connection reset by peer]
sankaber has joined #ruby
skade has quit [Read error: No route to host]
andll has joined #ruby
bigkevmcd has joined #ruby
mattwildig has joined #ruby
Motoservo has joined #ruby
Xzanron has quit [Quit: Leaving]
xMopxShell has joined #ruby
andywojo has quit [Quit: Lost terminal]
cwong_on_irc has joined #ruby
lukaszes has joined #ruby
TheNet has quit [Ping timeout: 268 seconds]
m3_del has quit [Ping timeout: 265 seconds]
mallu has joined #ruby
juanpablo__ has joined #ruby
beauby has joined #ruby
aganov has quit [Remote host closed the connection]
<lacrymology> how safe is it to just remove ~/.gem to start anew?
Motoservo has quit [Quit: Shhh. I'm trying to get some sleep here.]
slawrence00 has joined #ruby
ruurd has joined #ruby
dravine_ has joined #ruby
dravine has quit [Read error: Connection reset by peer]
dravine_ is now known as dravine
nfk|laptop has quit [Quit: yawn]
Voker57 has joined #ruby
ekinmur has quit [Quit: Textual IRC Client: www.textualapp.com]
<shevy> lacrymology it is safe, gem will recreate the files it requires; I always keep backups of my .gems too so reinstalling is trivial
dhollinger has joined #ruby
juanpablo__ has quit [Ping timeout: 252 seconds]
ruurd_ has joined #ruby
helpa has quit [Remote host closed the connection]
helpa has joined #ruby
pathrocl_ has joined #ruby
sundhell_ has joined #ruby
kies^ has joined #ruby
segfalt has joined #ruby
im0b_ has joined #ruby
zzak_ has joined #ruby
MuffinPimp_ has joined #ruby
MuffinPimp_ has quit [Remote host closed the connection]
mwlang_ has joined #ruby
`scootaloo has joined #ruby
l_tonz has joined #ruby
prasselpikachu_ has joined #ruby
diprotic has joined #ruby
diprotic has joined #ruby
adaedra has quit [Disconnected by services]
RobertBirnie has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
`scootaloo is now known as adaedra
atomical has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
gregf has joined #ruby
akem has quit [Quit: Bye]
twistedpixels_ has joined #ruby
favadi has joined #ruby
Muz_ has joined #ruby
eregon_ has joined #ruby
charles81_ has joined #ruby
frode15243_ has joined #ruby
abra0_ has joined #ruby
jorb_ has joined #ruby
dionysus69 has quit [Ping timeout: 240 seconds]
atomical has joined #ruby
momomomomo has joined #ruby
<lacrymology> I'm a bit lost on what's the best policy to do certain things when working with rbenv or similar.
<lacrymology> There's some commands that I'll want to use globally
vondruch_ has joined #ruby
Gnubie__ has joined #ruby
<lacrymology> gem-prune, gem-path, I'm sure there's more
favadi has quit [Max SendQ exceeded]
bradleyprice has quit [Remote host closed the connection]
<lacrymology> is there an easy way to install those globally and the rest in their specific environments?
vev_ has quit [Ping timeout: 265 seconds]
valkyrka has quit [Quit: valkyrka]
umgrosscol_ has joined #ruby
<lacrymology> then again, those two work on the gems directories.. will they work with version-specific gems if I do that?
mikeharr_ has joined #ruby
Azulinho has joined #ruby
Ropeney has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
boshhead_ has joined #ruby
newdan has left #ruby [#ruby]
nettoweb has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
Radar_ has joined #ruby
yosafbridge` has joined #ruby
\13k_ has joined #ruby
abra0 has quit [Disconnected by services]
abra0_ is now known as abra0
sundhell_ has quit [Quit: WeeChat 1.3]
ruurd has quit [*.net *.split]
mattwildig has quit [*.net *.split]
bigkevmcd has quit [*.net *.split]
umgrosscol has quit [*.net *.split]
pathrocle has quit [*.net *.split]
herbst has quit [*.net *.split]
MuffinPimp has quit [*.net *.split]
mwlang has quit [*.net *.split]
diegoaguilar has quit [*.net *.split]
segfalt__ has quit [*.net *.split]
sepp2k has quit [*.net *.split]
vondruch has quit [*.net *.split]
sundhell has quit [*.net *.split]
mclee_ has quit [*.net *.split]
prasselpikachu has quit [*.net *.split]
MiracleBlue has quit [*.net *.split]
bjmllr has quit [*.net *.split]
adambeynon has quit [*.net *.split]
Caius has quit [*.net *.split]
joaomdmoura has quit [*.net *.split]
torpig has quit [*.net *.split]
im0b has quit [*.net *.split]
glowcoil has quit [*.net *.split]
frode15243 has quit [*.net *.split]
Heero has quit [*.net *.split]
deimos has quit [*.net *.split]
charles81 has quit [*.net *.split]
secret has quit [*.net *.split]
GarethAdams has quit [*.net *.split]
existensil has quit [*.net *.split]
YaknotiS has quit [*.net *.split]
Gnubie_ has quit [*.net *.split]
`derpy has quit [*.net *.split]
atom3 has quit [*.net *.split]
twistedpixels has quit [*.net *.split]
apeiros has quit [*.net *.split]
\13k has quit [*.net *.split]
Outlastsheep has quit [*.net *.split]
shevy has quit [*.net *.split]
IceDragon has quit [*.net *.split]
crayfishx has quit [*.net *.split]
jorb has quit [*.net *.split]
Guest85414______ has quit [*.net *.split]
zzak has quit [*.net *.split]
trampi has quit [*.net *.split]
majjoha has quit [*.net *.split]
kellabyte has quit [*.net *.split]
Sou|cutter has quit [*.net *.split]
avdi has quit [*.net *.split]
Lloyd has quit [*.net *.split]
moredhel has quit [*.net *.split]
Muz has quit [*.net *.split]
ekem has quit [*.net *.split]
eregon has quit [*.net *.split]
trajing has quit [*.net *.split]
levifig has quit [*.net *.split]
cek has quit [*.net *.split]
cstrahan has quit [*.net *.split]
mikolalysenko has quit [*.net *.split]
C0deMaver1ck has quit [*.net *.split]
boshhead has quit [*.net *.split]
mission712 has quit [*.net *.split]
yosafbridge has quit [*.net *.split]
dfoolz has quit [*.net *.split]
monoprotic has quit [*.net *.split]
jlyndon has quit [*.net *.split]
constantinexvi has quit [*.net *.split]
Radar has quit [*.net *.split]
omegahm has quit [*.net *.split]
tonini has quit [*.net *.split]
thesheff17 has quit [*.net *.split]
lkba has joined #ruby
mwlang_ is now known as mwlang
ruurd_ has quit [Ping timeout: 264 seconds]
sepp2k has joined #ruby
riotjones has joined #ruby
malconis has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
dfoolz has joined #ruby
frode15243_ is now known as frode15243
gregf has quit [Quit: WeeChat 1.3]
omegahm has joined #ruby
ekem has joined #ruby
mikeharris22 has quit [Ping timeout: 272 seconds]
kp666 has joined #ruby
levifig has joined #ruby
IceDragon has joined #ruby
zzak_ is now known as zzak
kp666 has quit [Max SendQ exceeded]
mic_e has quit [Ping timeout: 272 seconds]
IceDragon is now known as Guest57000
kp666 has joined #ruby
jlyndon has joined #ruby
torpig has joined #ruby
ruurd has joined #ruby
kp666 has quit [Max SendQ exceeded]
dnomyar has joined #ruby
<yorickpeterse> ddv: No, it comes with the Gem engrish
taylorrf has joined #ruby
gregf has joined #ruby
<ddv> yorickpeterse: :-)
charles81_ is now known as charles81
kp666 has joined #ruby
patdohere has joined #ruby
apeiros has joined #ruby
<yorickpeterse> pruts "hello wrold"
<ddv> yorickpeterse: prutser 'hello world'
patdohere has quit [Max SendQ exceeded]
tkuchiki has joined #ruby
_blizzy_ has joined #ruby
I has joined #ruby
im0b_ is now known as im0b
riotjones has quit [Ping timeout: 240 seconds]
I is now known as Guest84423
bjmllr has joined #ruby
skade has joined #ruby
adambeynon has joined #ruby
majjoha has joined #ruby
nettoweb has joined #ruby
YaknotiS has joined #ruby
Xeago has joined #ruby
constantinexvi has joined #ruby
l_tonz has quit [Remote host closed the connection]
User458764 has quit [Ping timeout: 268 seconds]
syath has quit [Quit: WeeChat 1.2]
diegoaguilar has joined #ruby
existensil has joined #ruby
baweaver has joined #ruby
zenguy_pc has quit [Ping timeout: 255 seconds]
Sou|cutter has joined #ruby
<yorickpeterse> heh
mclee_ has joined #ruby
dopamean_ has joined #ruby
Guest57000 is now known as IceDragon
tenderlove has joined #ruby
glowcoil has joined #ruby
tonini has joined #ruby
cek has joined #ruby
cstrahan has joined #ruby
dhollinger has quit [Ping timeout: 260 seconds]
mic_e has joined #ruby
solocshaw has joined #ruby
baweaver has quit [Ping timeout: 246 seconds]
moredhel has joined #ruby
ruurd has quit [Read error: Connection reset by peer]
avdi has joined #ruby
snick007 has joined #ruby
chouhoulis has joined #ruby
mission712 has joined #ruby
blackmesa has quit [Ping timeout: 250 seconds]
RegulationD has quit []
User458764 has joined #ruby
huddy has joined #ruby
djbkd has joined #ruby
Guest85414______ has joined #ruby
vigintas has joined #ruby
dhollinger has joined #ruby
NullVoxPopuli_ has quit [Quit: Leaving]
sankaber has quit [Remote host closed the connection]
sankaber has joined #ruby
zenguy_pc has joined #ruby
Channel6 has joined #ruby
snick007 has quit [Client Quit]
deimos has joined #ruby
Heero has joined #ruby
solocshaw has quit [Ping timeout: 240 seconds]
kellabyte has joined #ruby
MiracleBlue has joined #ruby
joaomdmoura has joined #ruby
vigintas has quit [Ping timeout: 244 seconds]
tenderlove has quit []
djbkd has quit [Ping timeout: 265 seconds]
baroquebobcat has joined #ruby
yardenbar has quit [Ping timeout: 268 seconds]
tenseiten has joined #ruby
tenseiten has joined #ruby
tenderlove has joined #ruby
Lloyd has joined #ruby
pwnd_nsfw has quit [Ping timeout: 246 seconds]
yqt has joined #ruby
ruurd has joined #ruby
rgtk has joined #ruby
`derpy has joined #ruby
jessemcgilallen has joined #ruby
seitensei has quit [Ping timeout: 268 seconds]
tjohnson has joined #ruby
djbkd has joined #ruby
thesheff17 has joined #ruby
<karapetyan> how can i convert "strin\ng" to 'strin\ng'
startupality has joined #ruby
patdohere has joined #ruby
blackmesa has joined #ruby
patdohere has quit [Max SendQ exceeded]
User458764 has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
Outlastsheep has joined #ruby
zenguy_pc has quit [Ping timeout: 265 seconds]
tenseiten has quit [Remote host closed the connection]
kaleido has joined #ruby
Alina-malina has joined #ruby
idefine has joined #ruby
diegoaguilar has quit [Ping timeout: 260 seconds]
tulak has quit [Ping timeout: 240 seconds]
umgrosscol_ has quit [Quit: End of Line]
skade has quit [Read error: Connection reset by peer]
tvon has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
GarethAdams has joined #ruby
GarethAdams has joined #ruby
skade has joined #ruby
arooni has joined #ruby
shevy has joined #ruby
agentmeerkat has quit [Ping timeout: 240 seconds]
umgrosscol has joined #ruby
karapetyan has quit [Remote host closed the connection]
freerobby has quit [Quit: Leaving.]
pwnd_nsfw has joined #ruby
ruurd has quit [Read error: Connection reset by peer]
freerobby has joined #ruby
tkuchiki has quit [Remote host closed the connection]
<adaedra> that's not clear what you want
dgarstang has joined #ruby
<adaedra> if you speak of output when inspecting, you don't.
<adaedra> >> [ 'single', "double" ]
<ruboto> adaedra # => ["single", "double"] (https://eval.in/461713)
<dgarstang> In ruby, how can I test a variable, and if it's not set have it return false?
momomomomo has quit [Quit: momomomomo]
<adaedra> &ri Object#defined?
<`derpy> No results
<adaedra> uh.
C0deMaver1ck has joined #ruby
dstarh has joined #ruby
<adaedra> dgarstang: use `defined?`.
C0deMaver1ck is now known as Guest32509
<dgarstang> adaedra: isn't false == defined?
druonysus has joined #ruby
pathrocl_ has quit []
<adaedra> what?
<dgarstang> adaedra: In python, I can just test it. if it's nil or false, the conditional returns false, if it's true, it returns true
pathrocle has joined #ruby
<adaedra> `defined? a` will return nil if a variable is not defined.
<dgarstang> adaedra: I want to put it in an if statement, so I need true/false
<adaedra> if you want to test if its truthy or falsy (nil/false), just use it as boolean expression, i.e. `if a`
mattwildig has joined #ruby
<adaedra> `if defined?(a)` works.
<dgarstang> adaedra: doesn't work. if I don't define it first, and I test it, I get an error
ruurd has joined #ruby
<adaedra> so if you want it to exist *and* be truthy, it would be `if defined?(a) && a`
m3_del has joined #ruby
<dgarstang> adaedra: thanks
zenguy_pc has joined #ruby
frozenfoxx has left #ruby [#ruby]
mikolalysenko has joined #ruby
TheNet has joined #ruby
bMalum_ has joined #ruby
bMalum has quit [Ping timeout: 272 seconds]
bMalum_ is now known as bMalum
Phil-Work has quit [Remote host closed the connection]
m3_del has quit [Ping timeout: 240 seconds]
eminencehc has joined #ruby
diegoaguilar has joined #ruby
Renich has joined #ruby
DoubleMalt has quit [Remote host closed the connection]
subscope has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
Channel6 has quit [Ping timeout: 240 seconds]
mary5030 has joined #ruby
mary5030 has quit [Remote host closed the connection]
jessemcgilallen has quit [Quit: jessemcgilallen]
mary5030 has joined #ruby
mary5030 has quit [Read error: Connection reset by peer]
mary5030 has joined #ruby
ruurd has quit [Read error: Connection reset by peer]
Guest84423 has quit [Quit: Leaving]
eminence_ has joined #ruby
dopie has joined #ruby
eminencehc has quit [Ping timeout: 260 seconds]
<mwlang> does xpath and “//section” not work for nokogiri?
ruurd has joined #ruby
Spami has joined #ruby
desmondhume has quit [Remote host closed the connection]
cdg has joined #ruby
malconis has joined #ruby
cdg_ has quit [Ping timeout: 246 seconds]
vev_ has joined #ruby
mordocai has quit [Quit: switching machines]
weemsledeux has quit [Read error: Connection reset by peer]
BrazenBraden has quit [Quit: Leaving]
mordocai has joined #ruby
RobertBirnie has joined #ruby
mikeharr_ has quit [Remote host closed the connection]
ruurd has quit [Read error: Connection reset by peer]
arooni has quit [Ping timeout: 240 seconds]
momomomomo has joined #ruby
SCHAAP137 has quit [Remote host closed the connection]
desmondhume has joined #ruby
Lucky__ has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
idefine has quit [Remote host closed the connection]
User458764 has joined #ruby
mikeharris22 has joined #ruby
mattwildig has quit [Remote host closed the connection]
mwlang has left #ruby [#ruby]
mwlang has joined #ruby
skade has quit [Ping timeout: 255 seconds]
agit0 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
agit0 has joined #ruby
agit0 has quit [Client Quit]
mattwildig has joined #ruby
machan has quit [Ping timeout: 250 seconds]
ruurd has joined #ruby
ruurd has quit [Client Quit]
solocshaw has joined #ruby
aspiers has quit [Ping timeout: 268 seconds]
mahlon has joined #ruby
mistermocha has joined #ruby
houhoulis has quit [Remote host closed the connection]
bricker has joined #ruby
pandaant has joined #ruby
solars has quit [Ping timeout: 255 seconds]
l_tonz has joined #ruby
krz has quit [Ping timeout: 250 seconds]
mattwildig has quit [Remote host closed the connection]
baweaver has joined #ruby
mndoci has joined #ruby
Rickmasta has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
denver has joined #ruby
Oatmeal has quit [Ping timeout: 246 seconds]
beauby has quit [Ping timeout: 260 seconds]
adac has joined #ruby
mistermocha has quit [Ping timeout: 265 seconds]
<adac> Guys, When I install ruby by hand, do you know which paths I need to set for the storages of the gems and the bundles so that a normal user can also use gem install and bundler? BUNDLE_PATH and GEM_HOME? is there anything else?
Azulinho has quit [Quit: Azulinho]
mistermocha has joined #ruby
mistermocha has quit [Remote host closed the connection]
ledestin has joined #ruby
TheNet has quit [Ping timeout: 246 seconds]
l_tonz has quit [Remote host closed the connection]
Lucky__ has joined #ruby
<shevy> adac what --prefix will you use?
mistermocha has joined #ruby
tno has joined #ruby
<shevy> normal users also have the option to install into their home dir btw, via 'gem install --user-install'
jas02 has quit [Quit: jas02]
skade has joined #ruby
l_tonz has joined #ruby
machan has joined #ruby
<adac> shevy, Hmm ok I see. But i wanted to solve this by setting the paths via environment variable since I want to use it within a docker image as a different user then root
DiCablo has joined #ruby
Muz_ is now known as Muz
purplexed- has quit [Read error: Connection reset by peer]
<adac> shevy, not so sure what "--prefix" is about? can you tell me more about that eventually?
<vev_> we are voluntary on #libreidea and we re looking for a dev to help in this project >> http://www.libreidea.org/Autumn_ideas_of_tagtree
purplexed- has joined #ruby
<dorei> is there a way to find out which methods were defined via attr_reader, attr_writer, etc ?
juanpablo__ has joined #ruby
purplexed- has quit [Remote host closed the connection]
joonty has quit [Quit: joonty]
axl_ has quit [Quit: axl_]
purplexed- has joined #ruby
purplexed- has quit [Changing host]
purplexed- has joined #ruby
chouhoulis has quit [Remote host closed the connection]
idefine has joined #ruby
<mwlang> given a Node, is it possible to tell nokogiri to tell me what it’s xpath is?
chouhoulis has joined #ruby
Fire-Dragon-DoL has joined #ruby
baweaver has quit [Remote host closed the connection]
<dorei> mwlang: that's a really good question
<mwlang> for example, if I parse an HTML doc and manually drill down to any one specific node, can I do something in console like “node.xpath” and see what it’s selector would be?
LLamaRider has joined #ruby
LLamaRider has quit [Client Quit]
<mwlang> my biggest hurdle with nokogiri is almost always getting the xpath selector right.
kimegede has joined #ruby
axl_ has joined #ruby
Jackneill has joined #ruby
mikeharris22 has quit [Remote host closed the connection]
DiCablo has quit [Quit: Textual IRC Client: www.textualapp.com]
tvon has joined #ruby
mikeharris22 has joined #ruby
JuanDaugherty has joined #ruby
juanpablo__ has quit [Ping timeout: 255 seconds]
FernandoBasso has quit [Quit: WeeChat 1.3]
<Ray`> mwlang: I ended up using a cheatsheet, but I've lost the URL
<Ray`> because xpath has always bugged me
<dorei> there's a nice page with useful examples, let me find it
mallu has quit [Quit: http://www.kiwiirc.com/ - A hand crafted IRC client]
idefine has quit [Remote host closed the connection]
<mwlang> Ray`: yeah, I struggle even with the most basic. I have an HTML doc with four or five table elements on it, but doc.xpath('//table').count => 0 so I have to imagine it’s me doing something rather dumb at the basic level.
Oatmeal has joined #ruby
skade has quit [Quit: Computer has gone to sleep.]
LoganG has quit [Ping timeout: 250 seconds]
idefine has joined #ruby
zack6849 has quit [Ping timeout: 264 seconds]
SCHAAP137 has joined #ruby
s2013 has joined #ruby
Liam` has quit [Ping timeout: 264 seconds]
Iota-Spencer has quit [Ping timeout: 246 seconds]
stannard has joined #ruby
druonysuse has joined #ruby
druonysus has quit [Ping timeout: 252 seconds]
<mwlang> dorei: good examples to look at.
mark4 has left #ruby ["PART #RubyOnRails :PART #jquery :PART #reactjs :PART ##javascript :PART #elixir-lang :PART #debian :PART #zsh :PART #nethunter :PONG :card.freenode.net"]
idefine has quit [Ping timeout: 268 seconds]
dionysus69 has joined #ruby
andll has quit [Ping timeout: 246 seconds]
kimegede has quit [Quit: Leaving...]
leafybasil has quit [Ping timeout: 265 seconds]
l_tonz has quit [Remote host closed the connection]
atomical has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
l_tonz has joined #ruby
aspiers has joined #ruby
atomical has joined #ruby
Alayde has joined #ruby
mistermocha has quit [Ping timeout: 240 seconds]
startupality has quit [Quit: startupality]
tulak has joined #ruby
krz has joined #ruby
qpls has quit [Ping timeout: 272 seconds]
bb010g has quit [Quit: Connection closed for inactivity]
jessemcgilallen has joined #ruby
Alayde has left #ruby [#ruby]
pathrocle has quit [Remote host closed the connection]
druonysuse has quit [Ping timeout: 240 seconds]
druonysuse has joined #ruby
seitensei has joined #ruby
karapetyan has joined #ruby
idefine has joined #ruby
roxtrongo has quit [Remote host closed the connection]
denver has quit [Killed (Sigyn (Spam is off topic on freenode.))]
kalusn has quit [Remote host closed the connection]
l_tonz has quit [Quit: Leaving...]
Motoservo has joined #ruby
sepp2k has quit [Quit: Leaving.]
m3_del has joined #ruby
qpls has joined #ruby
timonv has quit [Ping timeout: 255 seconds]
ahegyi has joined #ruby
klingeldraht has quit [Read error: Connection reset by peer]
rbennacer has quit [Remote host closed the connection]
<Ox0dea> Ray`: You lost the URL *because* XPath bugs you?
<Ox0dea> > Holding onto anger is like drinking poison and expecting the other person to die.
<Ox0dea> adaedra: How did you figure `defined?` could be a method? :P
jessemcgilallen has quit [Quit: jessemcgilallen]
<adaedra> Ox0dea: I ended on http://ruby-doc.org/docs/keywords/1.9/Object.html#method-i-defined-3F and didn't look at the address in full. Looked like a method.
arooni has joined #ruby
krz has quit [Quit: WeeChat 1.2]
<adaedra> At least, documentation-wise.
<Ox0dea> It's syntax.
lxsameer has quit [Quit: Leaving]
m3_del has quit [Ping timeout: 272 seconds]
Peg-leg has quit [Quit: Leaving.]
<Ray`> Ox0dea: haha no, I stopped needing it eventually
<Ray`> so I don't have it to hand
towski_ has joined #ruby
vev_ has quit [Ping timeout: 255 seconds]
akem has joined #ruby
bruno- has quit [Ping timeout: 268 seconds]
crdpink has quit [Excess Flood]
lsmola has quit [Ping timeout: 250 seconds]
crdpink has joined #ruby
syath has joined #ruby
desmondhume has quit [Remote host closed the connection]
yqt has quit [Ping timeout: 250 seconds]
freerobby has quit [Quit: Leaving.]
<shevy> adac you wrote "by hand", so I assume you mean that you will compile ruby from source right? so typically one uses --prefix; system installs would have --prefix=/usr, if --prefix is omitted it normally will default to --prefix=/usr/local
adac has quit [Ping timeout: 244 seconds]
Motoservo has quit [Read error: Connection reset by peer]
<shevy> adac these built-in system variables will be available in RbConfig; for instance, RbConfig::CONFIG['host'] # => 'i686-pc-linux-gnu'
sandals is now known as TomPeed
duckpuppy has quit [Ping timeout: 265 seconds]
mission712 has quit [Disconnected by services]
Pisuke has quit [Read error: Connection reset by peer]
BTRE has quit [Ping timeout: 264 seconds]
Motoservo has joined #ruby
Guest53 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
podman has joined #ruby
xMopxShell has quit [Ping timeout: 268 seconds]
mission712_ has joined #ruby
mikeharris22 has quit [Remote host closed the connection]
stan has quit [Ping timeout: 264 seconds]
xMopxShell has joined #ruby
musl has quit [Quit: WeeChat 1.1.1]
eminence_ has quit [Remote host closed the connection]
mikeharris22 has joined #ruby
musl has joined #ruby
Renich has quit [Ping timeout: 260 seconds]
aspiers has quit [Ping timeout: 240 seconds]
bkzl has joined #ruby
scottstamp has quit [Ping timeout: 265 seconds]
Renich has joined #ruby
Bloomer has quit []
Spami has quit [Quit: Leaving]
<mwlang> oh, my. I think I finally figured out why I can’t get at any of the table elements with nokogiri. In pry, if I print the parsed html (“p doc”), I can scroll down and clearly see the info’s there. But doc.xpath(“//table”) returns nothing. If I feed that doc to Nokogiri and print the resulting HTML, all the tables are missing! That is, Nokogiri::HTML.fragment(doc.to_html).to_html => an HTML output with ~90% of the content missing
rbennacer has joined #ruby
riotjones has joined #ruby
bkzl has quit [Quit: leaving]
mikeharris22 has quit [Ping timeout: 244 seconds]
* mwlang working on making a reproduceable example for gist.
<Ox0dea> mwlang: Are you sure you don't have two documents?
<dorei> mwlang: why fragment and not Nokogiri::HTML(doc) ?
benlieb has joined #ruby
<mwlang> dorei: trying to remove a bunch of badly formatted crap
pathrocle has joined #ruby
mission712_ has quit [Disconnected by services]
Motoservo has quit [Read error: Connection reset by peer]
musl has quit [Quit: WeeChat 1.1.1]
<mwlang> you’re supposed to be able to clear blank lines and indentation with fragment (if I understand the documentation correctly)
musl has joined #ruby
Rollabunna has quit [Remote host closed the connection]
scottstamp has joined #ruby
xMopxShell has quit [Ping timeout: 264 seconds]
Channel6 has joined #ruby
eminence_ has joined #ruby
SenpaiSilver has joined #ruby
riotjones has quit [Ping timeout: 244 seconds]
olblak has quit [Ping timeout: 255 seconds]
wprice has quit [Ping timeout: 264 seconds]
wprice_ has joined #ruby
olblak has joined #ruby
vev_ has joined #ruby
bonemind has quit [Quit: WeeChat 1.0]
_blizzy_ has quit [Ping timeout: 264 seconds]
Channel6 has quit [Client Quit]
eminence_ has quit [Remote host closed the connection]
TheNet has joined #ruby
BTRE has joined #ruby
PaulCape_ has quit [Quit: .]
The_Phoenix has quit [Read error: Connection reset by peer]
spew has joined #ruby
idefine has quit [Read error: Connection reset by peer]
idefine_ has joined #ruby
eminencehc has joined #ruby
seitensei has quit [Remote host closed the connection]
PaulCapestany has joined #ruby
mistermocha has joined #ruby
xMopxShell has joined #ruby
idefine_ has quit [Read error: Connection reset by peer]
idefine has joined #ruby
synthroid has quit [Remote host closed the connection]
xMopxShell has quit [Excess Flood]
arooni has quit [Ping timeout: 240 seconds]
symm- has joined #ruby
mistermocha has quit [Remote host closed the connection]
Mon_Ouie has joined #ruby
mistermocha has joined #ruby
eminencehc has quit [Ping timeout: 240 seconds]
mistermocha has quit [Remote host closed the connection]
Xeago has quit [Remote host closed the connection]
idefine_ has joined #ruby
mistermocha has joined #ruby
baweaver has joined #ruby
Xeago has joined #ruby
prettiestPony11 has joined #ruby
eminencehc has joined #ruby
idefine has quit [Read error: Connection reset by peer]
xMopxShell has joined #ruby
Guest47571 has joined #ruby
rakm has joined #ruby
freerobby has joined #ruby
diegoaguilar has quit [Ping timeout: 268 seconds]
olblak has quit [Ping timeout: 265 seconds]
baweaver has quit [Ping timeout: 246 seconds]
olblak has joined #ruby
yosafbridge` has quit [Ping timeout: 240 seconds]
Musashi007 has joined #ruby
benlieb has quit [Quit: benlieb]
_blizzy_ has joined #ruby
<mwlang> man, oh, man….all this time — it was a byte encoding issue. open-uri was returning the page as encoded US-ASCII instead of UTF-8.
<mwlang> so html = open-uri(some_url).force_encoding(‘utf-8’) first, then doc = Nokogiri::HTML(html) and then all the xpath stuff works just fine.
benlieb has joined #ruby
<mwlang> The <meta charset="UTF-8" /> appears to be ignored altogether.
zenguy_pc has quit [Ping timeout: 240 seconds]
crayfishx has joined #ruby
last_staff has joined #ruby
machan has quit [Ping timeout: 268 seconds]
bricker has quit [Quit: Lost terminal]
druonysuse has quit [Read error: Connection reset by peer]
Timba-as has joined #ruby
benlieb has quit [Read error: Connection reset by peer]
jobewan has joined #ruby
troulouliou_div2 has quit [Quit: Leaving]
benlieb has joined #ruby
idefine_ has quit [Remote host closed the connection]
<apeiros> mwlang: if the server sends a content-type header, then that has priority iirc
qpls has quit [Ping timeout: 244 seconds]
idefine has joined #ruby
shadoi has joined #ruby
<apeiros> might also be that openuri doesn't do anything about the encoding and just uses default_internal
<mwlang> apeiros: it may very well be sending an overriding header. I just didn’t think to check that setting.
qpls has joined #ruby
<apeiros> mwlang: I'm curious, though - what's your Encoding.default_internal and .default_external?
Guest53 has joined #ruby
druonysuse has joined #ruby
druonysuse has joined #ruby
idefine has quit [Client Quit]
lacrymology has quit [Ping timeout: 244 seconds]
diegoaguilar has joined #ruby
<mwlang> apeiros: surprisingly…[Encoding.default_internal, Encoding.default_external] => [nil, #<Encoding:US-ASCII>]
freerobby has quit [Quit: Leaving.]
<mwlang> shouldn’t both of those bee UTF-8?
<apeiros> ok, I think openuri doesn't do a thing
<Ox0dea> mwlang: "Overriding" isn't the right word; open-uri doesn't parse XML, and that's really what you want.
<apeiros> if internal is set, all IO will translate iirc
darkf has quit [Quit: Leaving]
<apeiros> I haven't actually experimented enough with those things
<apeiros> I always set encodings explicitly
<mwlang> I guess my question really is, what *should* these be for most Ruby environments?
ledestin has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<apeiros> mwlang: I think internal nil, external utf-8
vev_ has quit [Ping timeout: 250 seconds]
<apeiros> and then make sure you actually pass the encoding if your external source is not utf-8
druonysuse has quit [Client Quit]
<mwlang> apeiros: ok, I’ll do a little more research on these two settings before I start just setting them blindly in all projects, but I do think I’m going to have to start more actively managing the encoding setting with international projects.
druonysuse has joined #ruby
cwong_on_irc has quit [Quit: Leaving.]
<karapetyan> Ox0dea: my stupid brain + 3hrs and it's done)
dfockler has joined #ruby
itgold has joined #ruby
freerobby has joined #ruby
<itgold> hi there, friends
<mwlang> I almost never encounter encoding issues with US-based clients and projects, but with International projects, I find that even if the ecosystem is set up with intent to serve UTF-8 everywhere, it’s not always the case.
<mwlang> (as in this example!)
<shevy> hehe
<shevy> one day we will use the one true encoding to bind them all
m3_del has joined #ruby
__chris has joined #ruby
zenguy_pc has joined #ruby
adac has joined #ruby
<mwlang> shevy: UTF-16? :-o
User458764 has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
druonysus has joined #ruby
SCHAAP137 has quit [Ping timeout: 260 seconds]
<karapetyan> Ox0dea: and it's should be: code.gsub(/(\/\*.+?\*\/)|(\/\/.+)/,"") =)
druonysuse has quit [Ping timeout: 240 seconds]
<__chris> Anyone here know of any GUI or CLI tools for viewing & running Sphinx queries?
speakingcode has joined #ruby
speakingcode has quit [Client Quit]
tenderlove has quit [Ping timeout: 250 seconds]
m3_del has quit [Ping timeout: 240 seconds]
<mwlang> __chris: rails! :-D
zotherstupidguy has joined #ruby
<__chris> Hi
purplexed- has quit [Ping timeout: 240 seconds]
_djbkd has joined #ruby
<mwlang> __chris: although answered somewhat in jest — I usually code it up in rspec as well as just getting a simple search submission form working early on.
<__chris> Thanks for your ideas
karapetyan has quit [Remote host closed the connection]
kalusn has joined #ruby
<shevy> mwlang no clue, I am UTF free, but isn't UTF-8 superior to UTF-16?
desmondhume has joined #ruby
vdamewood has joined #ruby
arup_r has quit [Read error: Connection reset by peer]
bricker has joined #ruby
desmondhume has quit [Client Quit]
baweaver has joined #ruby
arooni has joined #ruby
roxtrongo has joined #ruby
<mwlang> shevy: depends on the predominent language, I think. I think UTF-8 will use single byte for characters in the ASCII range and 2 bytes only as needed. UTF-16 uses 2 bytes always — IIRC.
rgtk has quit [Remote host closed the connection]
<mwlang> (in other words, I don’t really know) :-)
solars has joined #ruby
baroquebobcat has quit [Read error: Connection reset by peer]
TheNet has quit [Quit: Leaving...]
Hounddog has quit [Ping timeout: 250 seconds]
iamvery has quit [Ping timeout: 240 seconds]
SCHAAP137 has joined #ruby
[Butch] has joined #ruby
baroquebobcat has joined #ruby
dnomyar has quit [Ping timeout: 246 seconds]
tvon has quit [Quit: Textual IRC Client: www.textualapp.com]
JuanDaugherty has quit [Remote host closed the connection]
iamvery has joined #ruby
<chris2> utf-16 uses 2 bytes if they are enough
User458764 has joined #ruby
yokel has quit [Ping timeout: 250 seconds]
jackjackdripper has joined #ruby
jschoolcraft has joined #ruby
sphex_ has joined #ruby
c_nick has joined #ruby
<mwlang> so, for nokogiri, I can ask for the text of a node via the xpath like this node.at_xpath(“td[3]/div[1]/a/text()”).to_s but how do I retrieve the “href” context of that same node with xpath?
yokel has joined #ruby
jackjackdripper has quit [Client Quit]
jackjackdripper has joined #ruby
<c_nick> while installing mysql2 i ran into bit of trouble .. i have mysql server installed (no client) for which i downloaded mysql-c- connectors-no-install i pointed to the libs and include folder of that while installing but it still failed with cannot find mysql client
JuanDaugherty has joined #ruby
sphex has quit [Ping timeout: 264 seconds]
<c_nick> ruby 2.0 32 bit and mysql 5.6
vev_ has joined #ruby
<shevy> you should put the full error on a pastie site c_nick
shinenelson has quit [Quit: Connection closed for inactivity]
dnomyar has joined #ruby
juanpablo__ has joined #ruby
mattwildig has joined #ruby
pietr0 has joined #ruby
momomomomo has quit [Quit: momomomomo]
jackjackdripper1 has joined #ruby
prettiestPony11 has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
jackjackdripper1 has quit [Client Quit]
jackjackdripper1 has joined #ruby
spider-mario has joined #ruby
<c_nick> similar to this .. i tried the solutions no luck however i m not sure if devkit is installed (will check tomorrow at work)
jackjackdripper has quit [Ping timeout: 252 seconds]
prettiestPony11 has joined #ruby
dnomyar has quit [Ping timeout: 244 seconds]
tenderlove has joined #ruby
bricker_ has joined #ruby
<c_nick> yeah there is devkit
juanpablo__ has quit [Ping timeout: 252 seconds]
synthroid has joined #ruby
<baweaver> Ox0dea: https://github.com/franzejr/ruby-tricks - why aren't you contributing here?
bricker has quit [Ping timeout: 244 seconds]
<Ox0dea> baweaver: I tried.
<Ox0dea> Most of my stuff is too crazy even for there, but the "two blocks" trick seemed suitable.
<Ox0dea> >> 0x10001.times.each_with_object({}) { |cp, h| c = '' << cp rescue next; h[c.bytesize] ||= c }
<ruboto> Ox0dea # => {1=>"\u0000", 2=>"\u0080", 3=>"ࠀ", 4=>"
lacrymology has joined #ruby
<Ox0dea> In case anybody wanted to know the first codepoint that requires four bytes.
<odigity> Is there a version of attr_accessor that creates accessors that take an option value, like foo(val=nil), that is both getter and setter at the same time? (That way you don't need to preface it with self. when using it as a setter)
baweaver has quit [Remote host closed the connection]
<Ox0dea> odigity: No, but Gandhi is relevant: "Be the change you wish to see in the world."
<odigity> Ox0dea, I've already start writing my own, just surprised it doesn't already exist
yardenbar has joined #ruby
Yzguy has joined #ruby
petricore has joined #ruby
vdamewood has quit [Quit: Life beckons.]
<c_nick> odigity: i like that idea
<c_nick> but there already something in the libraries that satisfies my laziness :D
<odigity> c_nick, thanks. reason it matters is because I'm creating a config file format (like Gemfile or Vagrantfile), and want people to be able call setters in context, but the classical ones need to be prefixed with self. to prevent ruby from thinking you're referencing a local variable, and that's ugly and likely error-prone
<djellemah> mwlang: td[3]/div[1]/a/@href I think http://www.w3.org/TR/xpath20/#abbrev
<c_nick> anyone with the mysql2 gem error like me?
ibouvousaime has quit [Ping timeout: 252 seconds]
evanjs_ has joined #ruby
radgeRayden has joined #ruby
kaldrenon has joined #ruby
rgtk has joined #ruby
tcrypt has joined #ruby
roxtrongo has quit [Remote host closed the connection]
radgeRayden_ has quit [Ping timeout: 246 seconds]
<shevy> you use windows?
karapetyan has joined #ruby
roxtrongo has joined #ruby
duckpuppy has joined #ruby
ESpiney has quit [Ping timeout: 246 seconds]
<Ox0dea> odigity: Explicit self is much less error-prone than implicit.
<kaldrenon> I'm having a strange issue that's proving hard to google for: when I do rake -T I get invalid option: -T -- and when I do rake -v I get rake: version unknown
<kaldrenon> How to I deal with that?
mattwildig has quit [Remote host closed the connection]
<odigity> Ox0dea, not for setting. it's way too easy to write "foo = 42" instead of "self.foo = 42" and then wonder why your config isn't being parsed...
<Ox0dea> odigity: Why not just do it like all the other (sane) DSLs do and #instance_eval a block, thereby giving the user the freedom to choose what to say instead of `self` and not introducing any undue magic?
baweaver has joined #ruby
User458764 has quit [Quit: Textual IRC Client: www.textualapp.com]
<Ox0dea> Or #instance_exec, as the case may be.
malconis has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<odigity> Ox0dea, I tried to determine prior art this morning. I explored the source for Bundler, Sequel, and Vagrant to see how they load Gemfile, migrations, and Vagrantfile, respectively. I couldn't figure out the last one. Bundler puts you in a DSL instance (so you're using implicit self to call methods like 'gem'). Sequel asks you to write Sequel.migration do at the top, and then hands the block to a DSL class.
baweaver has quit [Remote host closed the connection]
Guest53 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<odigity> Ox0dea, however, what I couldn't figure out was if I give them a method to call (let's day Foo.config do), then I basically have to capture the return value in order to use the result of their config, and that seems very fragile.
machan has joined #ruby
<odigity> I'm very much open to suggestions, since this is new territory for me.
<Ox0dea> odigity: I'm not sure I follow; you don't trust Ruby's return semantics?
dhollinger has quit [Remote host closed the connection]
_djbkd has quit [Remote host closed the connection]
dfockler has quit [Ping timeout: 240 seconds]
malconis has joined #ruby
<c_nick> i m off to sleep now .. i have a battle with mysql2 tomorrow morning
<c_nick> i also need to shave :(
jordanloky has quit [Ping timeout: 264 seconds]
<odigity> I don't trust the user not to put something at the end of the file after the Foo.config block which will result in the wrong thing being returned. I like building tools that don't rely on unstated assumptions that result in surprising, negative user experiences.
<Ox0dea> odigity: What does/should a config block return?
<odigity> Ox0dea, can you think of a better way of capturing the result of their action?
ibouvousaime has joined #ruby
<Ox0dea> odigity: Don't you control the definition of #config?
<odigity> Ox0dea, I was thinking it would return an initialized Foo::Repo object (it's a repoconfig file)
<odigity> Ox0dea, I do
ESpiney has joined #ruby
<Ox0dea> odigity: Then you're golden.
c_nick has left #ruby [#ruby]
firstdayonthejob has joined #ruby
<odigity> Ox0dea, can you explain to me how the plumbing should be done at each step? What would you have Foo.config do, and how would you capture the initialized Foo::Repo instance at the end?
_djbkd has joined #ruby
diegoviola has joined #ruby
<odigity> (without using global variables or the equivalent, as I'd like to be able to load multiple repoconfig files in the same process)
shinnya has joined #ruby
Guest53 has joined #ruby
mistermocha has quit [Read error: Connection reset by peer]
<Ox0dea> odigity: https://eval.in/461756
mistermocha has joined #ruby
<odigity> I thought about maybe doing: 1. Foo.config will create the object and add it to an array class variable 2. afterwards, I fetch the last object in the array -- but in theory, they could call Foo.config twice in the same file and create two objects. :) I don't like edge cases...
<Ox0dea> ...
<Ox0dea> Please see the link. :P
<odigity> going now
<odigity> was just in the middle of typing when you posted it...
<odigity> Ox0dea, not familiar with tap, lemme go look that up first
<Ox0dea> odigity: It's the most elegant Ruby method.
<odigity> then I should tap it
<Ox0dea> Aye.
<Ox0dea> Purest simplicity and utility.
machan has quit [Ping timeout: 240 seconds]
Coldblackice has quit [Ping timeout: 250 seconds]
<Ox0dea> Without the surrounding #tap, Foo.config would evaluate to the last expression in the block, but you want it to return the Foo::Repo being created.
peteykun has quit [Quit: Leaving]
platzhirsch has quit [Ping timeout: 240 seconds]
<odigity> Ox0dea, ok, I've read your snippet (very nice, btw), and I think I get it. But I would rather the user use accessors (var) rather than directly reference instance vars (@var), which brings us back to my original point. traditionally setters require self., and are thus very error prone. (I make that mistake all the time, and I'm not a complete noob)
<Ox0dea> odigity: Oh, sorry, I did forget that detail, but it's very easy to incorporate.
<odigity> Ox0dea, that is a very nice improvement over my implementation which solves that problem, and will definitely use it
<Ox0dea> <3
<odigity> Now I just need my accessors. I'm going to call the macro attr_unified, since it makes one method that's both setter and getter.
RegulationD has joined #ruby
ec is now known as pikajude^
veg has quit [Ping timeout: 246 seconds]
prettiestPony11 has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<Ox0dea> But... why?
<Ox0dea> odigity: https://eval.in/461757
<odigity> Ox0dea, I've already explained several times -- because people often forget to type self., thereby setting a local instead of an attribute, and then wonder why it's not working
<Ox0dea> odigity: Have you ever seen a gemspec?
<odigity> Ox0dea, that's better. I don't mind a prefix var (Vagrantfiles use |config| by convention), because it's clear form the opening line that you should be using it. that's an improvement over expecting them to remember self.
<odigity> Ox0dea, I have.
platzhirsch has joined #ruby
<odigity> Ox0dea, I totally forget to add gemspec to my list of prior art. :)
michaeldeol has joined #ruby
agentmeerkat has joined #ruby
<odigity> Ox0dea, ok, great. your second snippet (gemspec style with tap for object retrieval) should be all I need
<Ox0dea> odigity: Bless you. <3
<odigity> Ox0dea, but for the record... I still think attr_unified is an obviously useful general helper that should be in ActiveSupport. :)
<Ox0dea> odigity: I'm all for sexy magic, but setters should at least vaguely resemble setters.
<odigity> Ox0dea, I assume it's been a long time since you forgot to write self....
<Ox0dea> Well, sure, but see above?
<shevy> what is attr_unified doing?
<Ox0dea> odigity: Imagine if this were a picture of a Corgi: https://upload.wikimedia.org/wikipedia/commons/3/3b/Irish_setter_head.jpg
mistermocha has quit [Ping timeout: 250 seconds]
yqt has joined #ruby
<Ox0dea> Incalculable confusion and chaos would surely descend upon the talk page.
<shevy> Corgi is uglier than alot http://goo.gl/vFhLtB
<odigity> Ox0dea, I agree that traditionally setters are superior in most ways -- for example, you couldn't use ||= with my attr_unified accessors
pikajude^ is now known as ec
nertzy has joined #ruby
<Ox0dea> odigity: And you want that, yeah?
<odigity> Ox0dea, and I use traditional accessors in my own code. but in a case like this, with a config file intended to be used by possibly non-ruby programs, attr_unified isn't a *terrible* idea...
jaequery has joined #ruby
m3_del has joined #ruby
<odigity> non-ruby programmers, I mean
<shevy> grandmas hacking away on ruby code
<Ox0dea> odigity: I did all I could to put the safety back on your footgun.
mattwildig has joined #ruby
<odigity> shevy, attr_unified was a class method I proposed to Ox0dea that would create a single accessor that accepts an optional value -- foo(val=nil) instead of foo() + foo=(val)
<shevy> aha
<Ox0dea> odigity: May I see your definition of #attr_unified?
<odigity> though come to think of it, that couldn't handle setting the value to nil. :)
<odigity> Ox0dea, I didn't finish writing it because your solution was better
bruce_lee has quit [Read error: Connection reset by peer]
<odigity> But I'm sure you can imagine what it would be.
<mwlang> the neighbor’s dogs aren’t happy. they’ve been barking for 5 minutes straight…then I toggle over to here to see Irish Setters and Corgi’s…
<odigity> well, it was a fun thought experiment, anyway
BraddPit1 has joined #ruby
<Ox0dea> mwlang: Blame odigity.
BraddPit1 has left #ruby [#ruby]
<odigity> I'm used to it.
<shevy> mwlang haha
<shevy> dogs and cats - the things that secretly power the www
<Ox0dea> odigity: Jeeze, you've got me considering the notion of private Symbols now.
<odigity> Ox0dea, one more question: what exactly does &proc do in your snippet? is it some kind of shortcut to wrap a passed in block or something?
m3_del has quit [Ping timeout: 260 seconds]
<Ox0dea> odigity: `proc` is an alias for `Proc.new`, which uses the block passed into the surrounding method if you don't give it one explicitly.
sankaber has quit [Read error: Connection reset by peer]
<odigity> Ox0dea, ok, cool
tulak has quit []
sankaber has joined #ruby
rdark has quit [Quit: leaving]
druonysus has quit [Remote host closed the connection]
lubarch has quit [Ping timeout: 250 seconds]
blackmesa has quit [Ping timeout: 252 seconds]
<odigity> Ox0dea, I just realized your solution still doesn't solve the object capture problem. Because Foo.config is being called in the config file, the return value is also returned in the config file -- not to me, the guy loading and evaling the contents of the config file
purplexed- has joined #ruby
purplexed- has joined #ruby
<Ox0dea> odigity: People deserve what they get if they're using the return value of #load.
<Ox0dea> Or is that not how you meant?
timonv has joined #ruby
<odigity> Ox0dea, then how am I to capture the object being created within the config file from outside the config file?
<Ox0dea> odigity: Are you sure you need to know about the object after it's left #config?
ta has joined #ruby
bricker_ is now known as bricker
<odigity> Ox0dea, that's the whole point of loading a config file. to get back an initialized Repo object.
<odigity> so I can then operate on it
Guest97 has joined #ruby
fantazo has joined #ruby
<Ox0dea> odigity: You're just gonna be operating on it willy-nilly?
evanjs_ has quit [Remote host closed the connection]
<odigity> Ox0dea, I don't understand the question.
momomomomo has joined #ruby
<Ox0dea> odigity: At what point are you afraid you'll lose sight of the object?
h99h9h88 has joined #ruby
symm-_ has joined #ruby
<djellemah> It's a pity you can't magically (that is, from outside the block) cause @binding = binding in the config block. Then you could just assign local variables, and later pull out the ones you want.
symm- has quit [Ping timeout: 250 seconds]
<odigity> Ox0dea, in my tool, I need to load the config file and then access the resulting Repo object. When the config file is loaded, the Foo.config method will call with the block, and return an initialized Repo object, but no one is there to catch it. So I end up with nothing.
<Ox0dea> odigity: You have access to the Repo in #config, irrespective of whence it was called.
dnomyar has joined #ruby
pocketprotector is now known as Krusty
Krusty is now known as pocketprotector
<odigity> Ox0dea, sure, but that's a Foo class method that returns a Repo instance. The only way I could get access to it afterwards is if I also have the config method save it to a class attribute, and then check it after the file loads.
<Ox0dea> odigity: Does this help clarify? https://eval.in/461763
<odigity> Foo.config is called *inside* the config file.
<Ox0dea> You can do anything you please with `r` there.
Sceko has joined #ruby
<odigity> Ox0dea, nope, you're still returning the repo object from the config method, which is still running *inside* the config file, not in my tool. When you say "foo = Foo.config", you're capturing it inside the config file in a local foo that won't be available to me when load() returns
erbesharat has quit [Remote host closed the connection]
eminencehc has quit [Remote host closed the connection]
<Ox0dea> odigity: But Foo is your tool.
cpup has quit [Ping timeout: 246 seconds]
cpup has joined #ruby
<odigity> Ox0dea, yes. But that doesn't mean I magically know the correct functionality to add to make this work. That's why I'm here.
<odigity> Ox0dea, I already suggested the most naive solution, which is have Foo.config stash it in a class var and then fetch it afterwards. I'm hoping to improve on that.
synthroid has quit [Remote host closed the connection]
VeryBewitching has joined #ruby
<Ox0dea> odigity: Aye, and I'm just trying to make sure that's in line with what you actually want.
h99h9h88 has quit [Ping timeout: 272 seconds]
<Ox0dea> Why does $thing need to be able to pluck Foo::Repos out of the air?
<odigity> I want to access the repo object in my tool, the tool that is calling load() on the config file. Currently, your snippet shows the object being return within the config file and set to a local named foo. But my tool doesn't have access to foo after load finishes running.
<odigity> Ox0dea, are you seriously asking me why my tool needs access to my tool's config file?
skcin7 has joined #ruby
<Ox0dea> odigity: Yeah, that's exactly what I asked you.
<odigity> Ox0dea, because the config file contains information that will drive the tool's behavior.
<Ox0dea> odigity: Oh, wow. Tell me some more things.
<odigity> suddenly this no longer seems like a productive conversation
<Ox0dea> odigity: Disclaimer: I have no idea what the fuck I'm talking about.
teclator has quit [Quit: Lost terminal]
<odigity> Ox0dea, well, thanks for teaching me about tap, anyway. I guess I'll use the obvious naive solution and worry about it if and when I find a reason it's not good enough.
nertzy has quit [Quit: This computer has gone to sleep]
freerobby has quit [Quit: Leaving.]
freerobby has joined #ruby
cdg has quit [Remote host closed the connection]
codecop has joined #ruby
riotjones has joined #ruby
ibouvousaime has quit [Ping timeout: 240 seconds]
postmodern has joined #ruby
yeticry has quit [Read error: Connection reset by peer]
mikeharris22 has joined #ruby
yeticry has joined #ruby
Rollabunna has joined #ruby
zotherstupidguy has quit [Ping timeout: 272 seconds]
mikeharris22 has quit [Remote host closed the connection]
craysiii has joined #ruby
yardenbar has quit [Remote host closed the connection]
RegulationD has quit [Remote host closed the connection]
mikeharris22 has joined #ruby
riotjones has quit [Ping timeout: 260 seconds]
roxtrongo has quit [Remote host closed the connection]
axl_ has quit [Ping timeout: 252 seconds]
Aquish has joined #ruby
Aquish has left #ruby [#ruby]
yardenbar has joined #ruby
axl_ has joined #ruby
mndoci has quit [Remote host closed the connection]
machan has joined #ruby
Rollabunna has quit [Ping timeout: 265 seconds]
veg has joined #ruby
ibouvousaime has joined #ruby
karapetyan has quit [Remote host closed the connection]
mndoci has joined #ruby
mistermocha has joined #ruby
momomomomo has quit [Quit: momomomomo]
karapetyan has joined #ruby
vev_ has quit [Read error: No route to host]
finisherr has joined #ruby
<shevy> tap tap the lap
_djbkd has quit [Remote host closed the connection]
mistermocha has quit [Ping timeout: 255 seconds]
s2013 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
ledestin has joined #ruby
Mon_Ouie has quit [Ping timeout: 265 seconds]
arup_r has joined #ruby
blueOxigen has quit [Ping timeout: 250 seconds]
dhollinger has joined #ruby
_djbkd has joined #ruby
baweaver has joined #ruby
momomomomo has joined #ruby
bruno- has joined #ruby
benlieb has quit [Quit: benlieb]
mozzarella has quit [Quit: WeeChat 1.2]
mloy has joined #ruby
baweaver has quit [Ping timeout: 246 seconds]
rippa has quit [Quit: {#`%${%&`+'${`%&NO CARRIER]
baweaver has joined #ruby
radgeRayden has quit [Quit: Leaving]
bruno- has quit [Ping timeout: 255 seconds]
bruno- has joined #ruby
Sceko has left #ruby [#ruby]
leafybasil has joined #ruby
zenguy_pc has quit [Ping timeout: 265 seconds]
prettiestPony11 has joined #ruby
baweaver has quit [Ping timeout: 272 seconds]
freeze has quit [Ping timeout: 272 seconds]
diegoaguilar has quit [Ping timeout: 264 seconds]
<Musashi007> tap tap teh what
roxtrongo has joined #ruby
bruno- has quit [Ping timeout: 264 seconds]
<Musashi007> lol - have you guys ever considered a TS/Vent server to hang out on?
bruno- has joined #ruby
d5sx43 has joined #ruby
<mloy> Musashi007 A Mumble server would be better imo
uri_ has joined #ruby
<Musashi007> sure or something
d5sx43 has quit [Client Quit]
synthroid has joined #ruby
<eam> sounds terrible, no pun intended
lukaszes has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
juanpablo__ has joined #ruby
agentmeerkat has quit [Ping timeout: 265 seconds]
<Musashi007> Someone showed me some new app that was like slack but enabled voice chat.. discord or something like that
bruno- has quit [Ping timeout: 265 seconds]
<Musashi007> @eam what about it sounds terrible?
m3_del has joined #ruby
prettiestPony11 has quit [Remote host closed the connection]
<shevy> ewww
<eam> well, the value of irc is that it's only weakly synchronous. I'm not interested in giving you my attention all day
<shevy> the more you write, the more awful it sounds
s2013 has joined #ruby
<eam> and spoken conversations are inherently serialized
<eam> not to mention, you can never search in it, can't represent code (which is what we're here to talk about), and it's slow and just ... zero upside
yfeldblum has joined #ruby
juanpablo__ has quit [Ping timeout: 265 seconds]
m3_del has quit [Read error: No route to host]
m3_del has joined #ruby
karapetyan has quit [Remote host closed the connection]
zenguy_pc has joined #ruby
tmtwd has quit [Ping timeout: 272 seconds]
momomomomo_ has joined #ruby
karapetyan has joined #ruby
momomomomo has quit [Ping timeout: 246 seconds]
momomomomo_ is now known as momomomomo
<tubbo> yeah agreed
<tubbo> the only upside a voice-chat server would have is with clients
mozzarella has joined #ruby
<tubbo> but even then, you can just call them and do a conference call. it's a solved problem :D
<eam> "well if you're paying me"
<eam> heck, I'll even put on pants and we can do video
<hanmac> shevy did you watched gravity falls?
<itgold> def feed.items; "" end
<Ox0dea> hanmac!
<Ox0dea> itgold: That's not very many items.
diegoaguilar has joined #ruby
<itgold> how to change this declaration so it will work in feed.items.each
braincra- has joined #ruby
braincrash has quit [Ping timeout: 260 seconds]
karapetyan has quit [Ping timeout: 250 seconds]
<Ox0dea> itgold: Have it return something Enumerable?
<itgold> yes, how to do this in ruby?
<Musashi007> Eh, I guess you guys are right
moeabdol has quit [Ping timeout: 240 seconds]
<Ox0dea> > I am not able rightly to apprehend the kind of confusion of ideas that could provoke such a question.
<shevy> hanmac nope; I don't get to see a lot of new stuff lately :(
karapetyan has joined #ruby
<itgold> def feed.items; Enumerable.new end
<Ox0dea> itgold: Whence are these items coming?
<itgold> from the parsed feed
colegatron has quit [Ping timeout: 240 seconds]
<itgold> rss feed
<Ox0dea> itgold: I bet it's Enumerable.
<itgold> feed = RSS::Parser.parse(body)
<itgold> feed.items.each do |item|
<Ox0dea> itgold: And that doesn't work just fine?
karapetyan has quit [Remote host closed the connection]
<itgold> this thing is complaining about .each (no such method exception) :(
karapetyan has joined #ruby
kadoppe has quit [Ping timeout: 244 seconds]
ahegyi has quit [Ping timeout: 268 seconds]
Channel6 has joined #ruby
<Ox0dea> itgold: Debug-print `feed.items.class`.
agentmeerkat has joined #ruby
<itgold> ok
mpistone has joined #ruby
jordanloky has joined #ruby
kadoppe has joined #ruby
h99h9h88 has joined #ruby
<Ox0dea> What'dya get?
solocshaw has quit [Ping timeout: 246 seconds]
fantazo has quit [Ping timeout: 252 seconds]
<itgold> :items=>Array
DEA7TH has quit [Quit: DEA7TH]
Guest97 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<eam> what's superman's favorite ruby class?
<Ox0dea> itgold: Well, Array most definitely responds to #each, so that can't possibly actually be the class of `feed.items`.
<eam> Array (a ray)
FernandoBasso has joined #ruby
mary5030 has quit [Remote host closed the connection]
agentmeerkat has quit [Ping timeout: 240 seconds]
karapetyan has quit [Ping timeout: 250 seconds]
Alina-malina has quit [Ping timeout: 252 seconds]
<itgold> right, I'm sorry. The real problem is: Error: undefined method `items'
<itgold> I'll check feed class
h99h9h88 has quit [Ping timeout: 255 seconds]
<Ox0dea> Good idea.
northfurr has joined #ruby
stamina has quit [Ping timeout: 272 seconds]
bradland has joined #ruby
<itgold> :feed=>NilClass
<Ox0dea> >> require 'rss'; RSS::Parser.parse 'invalid rss data' # itgold
<ruboto> Ox0dea # => nil (https://eval.in/461791)
solocshaw has joined #ruby
rakm has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
tcrypt has quit [Remote host closed the connection]
cwong_on_irc has joined #ruby
Alina-malina has joined #ruby
<dorei> >> [1,2,3].tap { |o| o.instance_exec { undef :each } }
<ruboto> dorei # => [1, 2, 3] (https://eval.in/461792)
jordanloky has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
arup_r has quit [Quit: Leaving]
karapetyan has joined #ruby
diegoaguilar has quit [Remote host closed the connection]
<Ox0dea> dorei: Symbol not necessary, for what that's worth.
<Ox0dea> `undef` is like `alias`.
colegatron has joined #ruby
<dorei> i've just noticed that pry doesn't like arrays that have their #each removed
<adaedra> Bonsoir.
_stu_ has joined #ruby
<shevy> Baguette.
ElSif has quit [Ping timeout: 265 seconds]
<Ox0dea> dorei: I can't imagine why. :P
Alina-malina has quit [Read error: Connection reset by peer]
momomomomo has quit [Ping timeout: 260 seconds]
RegulationD has joined #ruby
<dorei> Ox0dea: irb seems more relaxed :p
momomomomo has joined #ruby
diegoaguilar has joined #ruby
jordanloky has joined #ruby
<adaedra> shevy: oh wow, how original.
mistermocha has joined #ruby
ruurd has joined #ruby
<Ox0dea> adaedra: Crème fraîche.
tkuchiki has joined #ruby
<adaedra> Ox0dea: well, I know you can.
<shevy> adaedra yeah, you were very original with Bonsoir :)
al2o3-cr has quit [Ping timeout: 268 seconds]
RegulationD has quit [Ping timeout: 246 seconds]
<Ox0dea> It turns out clearing all the Strings is a no-no.
Steve_Jobs has quit [Quit: WeeChat 0.4.2]
Steve_Jobs has joined #ruby
<shevy> you people are again not writing useful code
<adaedra> shevy: you're sad because I didn't »Guten Abend«?
<shevy> adaedra we must use english!
<adaedra> how original.
<Ox0dea> > inb4 i speak PIE
<eam> >> ObjectSpace.each_object(String) { |s| s.clear rescue true}
<ruboto> eam # => /tmp/execpad-9d52922cb886/source-9d52922cb886:2: [BUG] Segmentation fault at 0x4ae9c689 ...check link for more (https://eval.in/461796)
<eam> whooooa
<adaedra> ahah
<Ox0dea> eam: What'dya expect?
<eam> didn't segv on my end, I actually was left with a working irb
bender_unit has joined #ruby
<Ox0dea> eam: Same here until I entered anything else.
eminencehc has joined #ruby
<adaedra> yep, same here too.
consumerism has joined #ruby
<Ox0dea> eam: Why did you switch it to use exceptions as control flow?
jhn has quit [Quit: Textual IRC Client: www.textualapp.com]
mistermocha has quit [Ping timeout: 246 seconds]
<consumerism> in php and bash (and others), i can write "somevariable || 'fallback string'" and if somevariable is false, then 'fallback string' is assigned/echoed/whatever instead. how do i do the same in ruby?
<Ox0dea> consumerism: Just like that.
<adaedra> >> false || 'another string'
<ruboto> adaedra # => "another string" (https://eval.in/461797)
northfurr has quit [Quit: northfurr]
zenguy_pc has quit [Ping timeout: 264 seconds]
<adaedra> someone didn't test before asking.
<Ox0dea> Someone isn't really looking for answers.
<consumerism> well i did test but i'm missing something evidently... thanks for confirming
timonv has quit [Ping timeout: 268 seconds]
agentmeerkat has joined #ruby
<consumerism> ok, it's because an empty string isn't false
tkuchiki has quit [Remote host closed the connection]
<consumerism> too much php
<shevy> drugs are bad and so is php
trosborn has joined #ruby
<craysiii> but which is worse?
<adaedra> ?ot shevy
<ruboto> shevy, this seems to be off-topic. Please move your discussion to #ruby-offtopic, to keep this channel free for Ruby related topics. Thanks!
<Ox0dea> ~ $ python -c "print('' or 'i suck too')"
<Ox0dea> i suck too
<shevy> adaedra french is also offtopic
<adaedra> that's why I discuss about it there, usually.
baweaver has joined #ruby
<shevy> Bonsoir.
eminence_ has joined #ruby
eminencehc has quit [Ping timeout: 240 seconds]
<tubbo> facebook should cost a lot less to operate than it does.
<tubbo> at least, seemingly
<tubbo> it does do a lot of stuff though :D
<itgold> Ox0dea: you are right, this is most likely invalid feed data
<shevy> I don't know what it does but I find the interconnection things annoying; on twitch.tv you can only chat if you have a facebook account so I am excluded
<itgold> I just want to ignore this and keep going
<itgold> not fail
purplexed- has quit [Ping timeout: 260 seconds]
<Ox0dea> itgold: At least do it sanely; check the return value of RSS::Parser.parse and don't take the happy path if's `nil`.
baweaver has quit [Ping timeout: 246 seconds]
platzhirsch has left #ruby [#ruby]
<itgold> should I check by return class type?
sdrew has joined #ruby
stacybird has left #ruby [#ruby]
Guest53 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
mistermocha has joined #ruby
<Ox0dea> itgold: No, all `nils` are the same.
codecop has quit [Remote host closed the connection]
<Ox0dea> >> [nil, nil, nil].map(&:object_id)
<ruboto> Ox0dea # => [4, 4, 4] (https://eval.in/461799)
p0wn3d__ has quit [Ping timeout: 252 seconds]
dionysus69 has quit [Ping timeout: 250 seconds]
<Ox0dea> >> ['', '', ''].map(&:object_id) # "All nils are alike; each empty string is empty in its own way."
<ruboto> Ox0dea # => [539502400, 539502380, 539502660] (https://eval.in/461800)
adac has quit [Ping timeout: 260 seconds]
cdg has joined #ruby
blackmesa has joined #ruby
Guest53 has joined #ruby
machan has quit [Ping timeout: 246 seconds]
renier has joined #ruby
zenguy_pc has joined #ruby
malconis has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<adaedra> well, do you see the string half-full or half-empty?
<itgold> I'm not sure I understand this. what does this .map thing mean?
<adaedra> &ri Array#map
<Ox0dea> itgold: Are you learning Ruby?
<itgold> yes
<itgold> I'm nood
<itgold> noob
<shevy> noodle
<Ox0dea> itgold: Put your clothes on.
<adaedra> Ox0dea: you're gonna teach him/her your ways? :p
<itgold> :)
<Ox0dea> adaedra: It's just odd they're parsing RSS and haven't encountered #map.
<shevy> you are too sceptical!
<itgold> if I would be a woman, I would say "Yeah, teach me your way, babe!"
<shevy> when someone says he is a noodle, believe him
<Ox0dea> itgold: Wat.
danman has joined #ruby
<itgold> I'm not parsing this rss thing, I'm just trying to fix an issues with the plugin I've got
<Ox0dea> itgold: Despite the old trope, tossing a child into the deep end is not the proper way to teach them how to swim.
based_pdev_ has joined #ruby
mozzarella has quit [Quit: WeeChat 1.2]
mary5030 has joined #ruby
mary5030 has quit [Remote host closed the connection]
<itgold> I'm pretty sure I will swim! :)
<itgold> just give me your lesson
baweaver has joined #ruby
mary5030 has joined #ruby
DEA7TH has joined #ruby
<shevy> it seems one can use $stdin.gets('//').chomp to have multiline input with // as trailing sequence; but is there a way to have multiple (different) end tokens? such as: $stdin.gets('//','\\').chomp
al2o3-cr has joined #ruby
northfurr has joined #ruby
<Ox0dea> itgold: I shall give you two; lesson the first: https://youtu.be/GlKL_EpnSp8?t=29
<Ox0dea> shevy: Use a regular expression.
based_pdev has quit [Ping timeout: 260 seconds]
<itgold> good one! :)
<Ox0dea> itgold: But for real, though.
northfurr has quit [Client Quit]
<itgold> I know, just don't have time to do it right away
<Ox0dea> itgold: Then this is you: https://www.youtube.com/watch?v=TRqGmmCy8aU
Alina-malina has joined #ruby
<itgold> :)
northfurr has joined #ruby
<Ox0dea> Does that look like a particularly efficient way to get around?
Glenny has joined #ruby
<itgold> I know
<Ox0dea> Guess what happens every time there's a wall in front of him?
<Ox0dea> (He joins #ruby to ask questions he should've been able to answer himself.)
<Ox0dea> <3
<bradland> when using alternation in Regex, how does the regex engine scope the alternation characters.
mozzarella has joined #ruby
<Ox0dea> bradland: "Scope"?
northfurr has quit [Client Quit]
<bradland> for example, in this code, is the alternation between 4|5 safe? as in, will the engine expand to include additional chars?
machan has joined #ruby
Guest97 has joined #ruby
<itgold> I got your point, and I think you right
lukaszes has joined #ruby
<itgold> but now I need to fix this crazy issue
<Ox0dea> bradland: Nah, you need explicit grouping there.
<Ox0dea> itgold: But the fix is to get a better hold on your tool.
northfurr has joined #ruby
<itgold> this thing is that it is exception, not my primary tool
<Ox0dea> Then why did you say you're trying to learn Ruby?
momomomomo has quit [Quit: momomomomo]
<bradland> Ox0dea: so group around the alternation, like this? http://pastie.org/10525229
<bradland> that makes it more explicit
<pipework> Ox0dea: I'm always trying to learn ruby.
<Ox0dea> bradland: It makes it correct.
<bradland> also, would you prefer the ALTERNATION option or the CLASS syntax
<itgold> I need to learn a bit for fixing the issues
<Ox0dea> bradland: /Version : 4|5/ matches any string contaning '5'.
<bradland> i see
stamina has joined #ruby
<bradland> so /Version: 4|5/ is "Version: 4" or "5" ?
<Ox0dea> bradland: Just so.
<Ox0dea> A character class is best in this case, but don't let that put you off alternation.
<bradland> gotcha, the only reason i was looking at alternation was because i felt like it communicated intent better
_blizzy_ has quit [Ping timeout: 250 seconds]
<bradland> with the group and alternation, i create a capture group that i won't use
<bradland> not sure how horrible that is
<pipework> Ox0dea: I did a thing where I wanted to have a nice DSL at the class level where methods took blocks and then I wanted to take those blocks and change their binding to the instance as whale as yield a value to them. It was pretty fun. I had to define a temporary method on the instance's eigenclass, pass the block in as the block for define_singleton_method, grab the method object, call with the value and then delete the method from the
<pipework> eigenclass.
<Ox0dea> bradland: Well, you can create a non-capturing group.
<Ox0dea> bradland: Character classes are essentially alternation at the character level, which is precisely what you want here.
<pipework> Basically, I just wanted to change the binding of a block from the class it was defined in to the instance.
sdrew has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<Ox0dea> pipework: My kinda convolution! :P
<pipework> Ox0dea: YEAH!
<bradland> Ox0dea: I see, so that means either really communicates what I want, provided the reader understands regex.
<Ox0dea> Was binding_of_caller out of the question, then?
<pipework> I did it without adding a banister gem either.
<bradland> Thanks for the feedback!
<Ox0dea> bradland: Happy to help.
<Ox0dea> pipework: You know me too well.
<itgold> how about this thing: if item.class == nil:NilClass next end
<pipework> Ox0dea: You still have to change the binding. I had the binding of the caller, the instance, I just needed to swap the binding of the proc to the instance and not the class.
<Ox0dea> pipework: Ah, right.
<pipework> Ox0dea: Will gist example up in a bit.
last_staff has quit [Quit: last_staff]
<pipework> DSLol goodness.
<Ox0dea> DSHell.
renier has quit [Quit: Textual IRC Client: www.textualapp.com]
<pipework> DSCodeSmell?
<adaedra> itgold: you're going too far. nil is the same as false, in the eyes of if (and unless).
<itgold> ah, thank you, got it
zquad has joined #ruby
<zquad> Im using capistrano 3, I am trying to require "capistrano/rsync" but getting error: LoadError: cannot load such file -- capistrano/rsync  how do I install it
yardenbar has quit [Ping timeout: 272 seconds]
<Ox0dea> zquad: The gem is called capistrano-rsync.
Xeago has quit [Remote host closed the connection]
<Ox0dea> I don't know why they gave it such a confusing name.
kaldrenon has quit [Quit: Connection closed for inactivity]
<zquad> I already installed it via gem install capistrano-rsync though
yfeldblum has quit [Ping timeout: 246 seconds]
veg has quit [Ping timeout: 246 seconds]
<Ox0dea> zquad: Are you using a Ruby version manager?
guardian has joined #ruby
hxegon has joined #ruby
<guardian> hello
<zquad> I have it
m3_del has quit [Remote host closed the connection]
kaleido has quit [Quit: Textual IRC Client: www.textualapp.com]
<Ox0dea> zquad: Pardon?
<zquad> I have it installed, don't know if I am using it
<zquad> do I use rvm to install gems?
northfurr has quit [Quit: northfurr]
dikaio has joined #ruby
<Ox0dea> I'm going to defer to kinder souls.
skade has joined #ruby
northfurr has joined #ruby
axl_ has quit [Quit: axl_]
<havenwood> zquad: There are multiple Ruby version managers and installers. RVM is an option that does both of those tasks.
<hxegon> zquad: also rbenv
axl_ has joined #ruby
cwong_on_irc has quit [Quit: Leaving.]
<pipework> Also chruby and ruby-install
<havenwood> zquad: RubyGems ships with Ruby these days. So the `gem` command comes with Ruby.
northfurr has quit [Client Quit]
<havenwood> zquad: So you use Ruby's built-in RubyGems to install gems, like: gem install gem_name_here
<pipework> havenwood: except gem install üspec isn't supported because evidently fuck unicode.
northfurr has joined #ruby
michaeldeol has quit [Ping timeout: 250 seconds]
<zquad> thanks
Alina-malina has quit [Read error: Connection reset by peer]
bruno- has joined #ruby
northfurr has quit [Client Quit]
<itgold> def item.pubDate; "" end
<itgold> what it will do if item.pubDate already defined?
<adaedra> ?try
<ruboto> Why don't you try it and see for yourself?
northfurr has joined #ruby
eminence_ has quit [Remote host closed the connection]
<shevy> itgold did you not ask this already several times before?
neanderslob has joined #ruby
<havenwood> itgold: You can redefine methods in Ruby but your example looks funky.
northfurr has quit [Client Quit]
northfurr has joined #ruby
<pipework> Ox0dea: Yesterday I realized: `private def something;:something;end`
bruno- has quit [Ping timeout: 246 seconds]
riotjones has joined #ruby
<Ox0dea> >> defined? private # pipework
northfurr has quit [Client Quit]
<ruboto> Ox0dea # => "method" (https://eval.in/461803)
bruno- has joined #ruby
<Ox0dea> Yay, Ruby.
northfurr has joined #ruby
<pipework> >> method(:private)
<ruboto> pipework # => #<Method: main.private> (https://eval.in/461804)
bender_unit has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
momomomomo has joined #ruby
Rollabunna has joined #ruby
eminencehc has joined #ruby
freerobby has quit [Quit: Leaving.]
_blizzy_ has joined #ruby
m3_del has joined #ruby
riotjones has quit [Ping timeout: 240 seconds]
jondot has joined #ruby
bruno- has quit [Ping timeout: 240 seconds]
solocshaw has quit [Ping timeout: 244 seconds]
graydot has joined #ruby
<Ox0dea> pipework: Do you know why the NSA love Ruby?
<pipework> Ox0dea: Because it hides no secrets?
Rollabunna has quit [Ping timeout: 265 seconds]
<Ox0dea> >> public == private # Indeed.
<ruboto> Ox0dea # => true (https://eval.in/461808)
skade has quit [Read error: No route to host]
skade has joined #ruby
<pipework> >> public === private
<ruboto> pipework # => true (https://eval.in/461809)
<pipework> Threequals, so you know it's srs.
<Ox0dea> For realsies.
<itgold> ah, I think I finally got it working
<itgold> desc = item.description rescue nil if !desc def item.description; "" end end
rgtk has quit [Remote host closed the connection]
<Ox0dea> Jesus.
dstarh has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<itgold> what???
<itgold> it works
<Ox0dea> And that head baby got to the other side of the room.
<itgold> :)
<itgold> how would you do this?
baweaver has quit [Remote host closed the connection]
solocshaw has joined #ruby
<itgold> this is the only way it is not throwing that NoMethodError
<Ox0dea> itgold: I would figure out why I had an object with no #description method where I expected to have one that did.
pandaant has quit [Remote host closed the connection]
<Ox0dea> This is exactly the same runaround as we had the other day with #pubDate.
<itgold> right. I'm just adding new feeds and it is complaining about different things
<itgold> the reason why it is not there: all the sources of data are not ideal, they might miss various things
<Ox0dea> itgold: Are you sure?
benlieb has joined #ruby
<Ox0dea> Last time it was that you had an object of the wrong class.
<itgold> that is what I'm getting
<Ox0dea> Then your assertion that the data is wrong was... what, exactly?
rakm has joined #ruby
ZeeNoodleyGamer has joined #ruby
ZeeNoodleyGamer is now known as Guest12746
<itgold> some feeds has description field, some has their own proprietary name for description, for example
momomomomo has quit [Ping timeout: 250 seconds]
Ropeney has joined #ruby
<Ox0dea> DublinCore is not a proprietary format, per se.
yosafbridge has joined #ruby
<itgold> what is DublinCore?
Musashi007 has quit [Quit: Musashi007]
<Ox0dea> I have no idea.
<itgold> :)
zwdr has quit [Ping timeout: 255 seconds]
<Ox0dea> itgold: I'm a bot.
<itgold> no, you are not!
<Ox0dea> Prove it.
<itgold> you are too smart for bot :)
<itgold> you showed me a video with the head baby
RegulationD has joined #ruby
rbennacer has quit [Remote host closed the connection]
zwdr has joined #ruby
tkuchiki has joined #ruby
purplexed- has joined #ruby
<Ox0dea> We robots love humorous moving pictures as much as you fleshies.
leafybasil has quit []
umgrosscol has quit [Remote host closed the connection]
treehug8_ has quit [Quit: Textual IRC Client: www.textualapp.com]
syath has quit [Quit: WeeChat 1.2]
tcrypt has joined #ruby
synthroid has quit []
zack6849 has joined #ruby
zack6849 has joined #ruby
m3_del has quit [Remote host closed the connection]
<itgold> if you'd be a robot you would write another bots on ruby and conquer the world in an hour
<adaedra> Greetings, fleshies.
<Ox0dea> itgold: That is not how recursive self-improvement works.
northfurr has quit [Quit: northfurr]
<itgold> :)
northfurr has joined #ruby
JDiPierro has quit [Remote host closed the connection]
tkuchiki has quit [Ping timeout: 246 seconds]
<Ox0dea> itgold: What you're doing is called "exceptions as control flow", and it just shovels the problem under the rug.
bruno- has joined #ruby
_djbkd has quit [Remote host closed the connection]
<Ox0dea> itgold: This is you: http://gunshowcomic.com/comics/20130109.png
`based_pdev` has joined #ruby
<eam> I mean, exceptions *are* flow control
Liam` has joined #ruby
<itgold> :)
<itgold> yes, that is true
juanpablo__ has joined #ruby
<itgold> but I can't fix the data sources, right?
nettoweb has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<itgold> and I don't have control over the .parse method
<itgold> I have to deal with the results of those two factors working together
Timba-as has quit [Quit: Be back later ...]
pullcheezy has joined #ruby
momomomomo has joined #ruby
<Ox0dea> eam: You want "flow of control" there; it's not the flow that's being controlled, it's the control that's being flown.
Timba-as has joined #ruby
<adaedra> :')
__chris has quit [Ping timeout: 268 seconds]
Guest53 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
mary5030 has quit [Remote host closed the connection]
based_pdev_ has quit [Ping timeout: 240 seconds]
<Ox0dea> Well, it's true.
roxtrong_ has joined #ruby
northfurr has quit [Quit: northfurr]
Guest97 is now known as thisguy123
northfurr has joined #ruby
<Ox0dea> itgold: Have you considered upgrading to 2.3?
bruno- has quit [Ping timeout: 265 seconds]
mwlang has quit [Quit: mwlang]
<itgold> upgrading what?
uri_ has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
juanpablo__ has quit [Ping timeout: 255 seconds]
<Ox0dea> If you did, you could say `item.?description.to_s`.
roxtrongo has quit [Ping timeout: 260 seconds]
<itgold> is it new feature of ruby?
<havenwood> itgold: (Ruby 2.3.0 will be released on Christmas day but 2.3.0-dev is available now.)
_djbkd has joined #ruby
Timba-as has quit [Ping timeout: 250 seconds]
InternetFriend has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
xaxisx has quit [Quit: xaxisx]
<itgold> unfortunately I don't have control over this thing as well. Working with the specific framework and a plugin for it. I'm using predefined ruby version
atomical has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<Ox0dea> itgold: Do you remember the #respond_to? method that no fewer than four different people advised you to use last time?
Guest53 has joined #ruby
xaxisx has joined #ruby
<itgold> yes, what is about it?
<Ox0dea> itgold: You should use it.
<itgold> I can use it instead of recue?
<Ox0dea> Yes.
<itgold> great, thank you! Will give it a try
Eiam_ has joined #ruby
<Ox0dea> I always wanted a goldfish.
<havenwood> itgold: Exceptions should be an exceptional case not flow control.
<itgold> yes, I understand guys. This is the best I can get, I think
<Ox0dea> I wonder how the conflation of "control flow" with "flow control" came to be so widespread.
swgillespie has joined #ruby
TomPeed has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
skade has quit [Read error: No route to host]
Trynemjoel has quit [Ping timeout: 264 seconds]
Yzguy has quit [Quit: Textual IRC Client: www.textualapp.com]
duckpuppy has quit [Ping timeout: 268 seconds]
Trynemjoel has joined #ruby
<havenwood> Ox0dea: dyslexia doesn't help
<shevy> is it yin-yang time again with havenwood and Ox0dea
<Ox0dea> havenwood: I wasn't taking a shot, mind.
jessemcgilallen has joined #ruby
<Ox0dea> ~4.5k hits for "flow control graph".
<havenwood> hehe
neohunter has joined #ruby
<Ray`> wikipedia ain't helping - In computer science, control flow (or alternatively, flow of control) is the order in which individual statements, instructions or function calls of an imperative program are executed or evaluated.
pullcheezy has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
bMalum has quit [Quit: bMalum]
jackjackdripper1 has quit [Quit: Leaving.]
<Ox0dea> Ray`: "Control flow" is for branching, "flow control" for data.
jackjackdripper has joined #ruby
<Ray`> yeah
<Ox0dea> >> 'flow control' == 'flow of control'
<ruboto> Ox0dea # => false (https://eval.in/461812)
<Ray`> "flow of control" isn't helping the situation though
<Ray`> it's in the control flow entry
<itgold> woohooo
<itgold> if !item.respond_to?('description') def item.description; "" end end
<Ox0dea> Heh.
CanTonic has joined #ruby
<itgold> :)
<neohunter> Hi, I want to access HISTORY from IRB, I've readed source and it has module IRB; module HistorySavingAbility;
<Ox0dea> itgold: desc = item.respond_to?(:description) ? item.description : ""
<neohunter> that last module has a var called HISTORY
LoganG has joined #ruby
<neohunter> how to access it frmo console
<neohunter> i've tried with IRB::HistorySavingAbility.class_eval {HISTORY}
<neohunter> but didnt work
ruurd has quit [Quit: ZZZzzz…]
<itgold> even better. Thank you Ox0dea
<Ox0dea> itgold: Sure thing.
shredding has joined #ruby
bruno- has joined #ruby
<Ray`> Ox0dea is actually a refactoring library with a natural language api
<Ox0dea> neohunter: You want the Array of previously evaluated expressions, yeah?
<neohunter> 1) yes I want that, 2) I also want to learn and know how to access that HISTORY var if I should use class_eval or instance_eval
freerobby has joined #ruby
spider-mario has quit [Read error: Connection reset by peer]
<itgold> the only thing. I wanted to initialize an original object with the missing method initially. But it looks like local variable would work as well.
freerobby1 has joined #ruby
freerobby has quit [Read error: Connection reset by peer]
patchedmonkey has joined #ruby
bender_unit has joined #ruby
CanTonic has quit [Ping timeout: 264 seconds]
bruno- has quit [Ping timeout: 240 seconds]
freerobby has joined #ruby
freerobby1 has quit [Read error: Connection reset by peer]
jessemcgilallen has quit [Quit: jessemcgilallen]
freerobby has quit [Read error: Connection reset by peer]
freerobby has joined #ruby
iamvery has quit [Ping timeout: 244 seconds]
Xeago has joined #ruby
sankaber has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
iamvery has joined #ruby
bMalum has joined #ruby
spew has quit [Quit: leaving]
<neohunter> neohunter: you can use puts Readline::HISTORY.to_a to view the recent commands history, not sure about your other question
al2o3-cr has quit [Ping timeout: 250 seconds]
<neohunter> neohunter: thanks! you are awesome
<neohunter> neohunter: np
freerobby has quit [Remote host closed the connection]
freerobby has joined #ruby
yfeldblum has joined #ruby
rgrmatt has joined #ruby
bruno- has joined #ruby
skade has joined #ruby
craysiii has quit [Quit: Leaving.]
polishdub has quit [Quit: Leaving]
eminencehc has quit [Remote host closed the connection]
patdohere has joined #ruby
jessemcgilallen has joined #ruby
Xeago has quit [Ping timeout: 264 seconds]
bruno- has quit [Ping timeout: 240 seconds]
Channel6 has quit [Ping timeout: 240 seconds]
<Ox0dea> neohunter: And if irb has been invoked with the `--noreadline` flag?
ponga has quit [Quit: Connection closed for inactivity]
bruno- has joined #ruby
Limix has joined #ruby
eminencehc has joined #ruby
danman has quit [Ping timeout: 250 seconds]
skade has quit [Quit: Computer has gone to sleep.]
patdohere has quit [Read error: Connection reset by peer]
<Ox0dea> neohunter: As to your latter question, despite observing the principles of object orientation, the IRB module actively resists being used outside of irb. :/
Guest53 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
s2013 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
bruno- has quit [Ping timeout: 255 seconds]
bruno- has joined #ruby
kirun has quit [Remote host closed the connection]
zquad has quit [Quit: Leaving.]
purplexed- has quit [Ping timeout: 240 seconds]
wprice_ has quit [Quit: wprice_]
baweaver has joined #ruby
mistermo_ has joined #ruby
mattwildig has quit [Remote host closed the connection]
baweaver has quit [Remote host closed the connection]
baweaver has joined #ruby
neohunter has quit [Quit: Textual IRC Client: www.textualapp.com]
sgambino has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
shredding has quit [Ping timeout: 260 seconds]
bruno- has quit [Ping timeout: 246 seconds]
mistermocha has quit [Ping timeout: 268 seconds]
s2013 has joined #ruby
zenguy_pc has quit [Ping timeout: 244 seconds]
opensource_ninja has joined #ruby
roxtrong_ has quit [Remote host closed the connection]
mistermo_ has quit [Ping timeout: 240 seconds]
_djbkd has quit [Quit: My people need me...]
dgarstang has quit [Quit: WeeChat 1.3]
swgillespie has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
mattwildig has joined #ruby
roxtrongo has joined #ruby
lemur has joined #ruby
bMalum has quit [Quit: bMalum]
EllisTAA has joined #ruby
_djbkd has joined #ruby
jondot has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
danman has joined #ruby
rodfersou has quit [Quit: leaving]
ibouvousaime has quit [Ping timeout: 240 seconds]
lemur has quit [Ping timeout: 255 seconds]
FernandoBasso has quit [Quit: WeeChat 1.3]
Limix has quit [Quit: Limix]
dnomyar has quit [Ping timeout: 260 seconds]
blue_deref has joined #ruby
baweaver has quit [Remote host closed the connection]
ESpiney has quit [Quit: Leaving]
htmldrum has joined #ruby
kies^ has quit [Ping timeout: 265 seconds]
Ox0dea has quit [Read error: Connection reset by peer]
zenguy_pc has joined #ruby
Trynemjoel has quit [Ping timeout: 250 seconds]
Ulfalizer has quit [Ping timeout: 244 seconds]
Trynemjoel has joined #ruby
akem has quit [Quit: Bye]
Ulfalizer has joined #ruby
duckpuppy has joined #ruby
m3_del has joined #ruby
jessemcgilallen has quit [Quit: jessemcgilallen]
blackmes1 has joined #ruby
northfurr has quit [Quit: northfurr]
pullcheezy has joined #ruby
duckpuppy has quit [Ping timeout: 264 seconds]
blackmesa has quit [Ping timeout: 246 seconds]
northfurr has joined #ruby
baweaver has joined #ruby
levifig has quit [Ping timeout: 240 seconds]
jessemcgilallen has joined #ruby
_stu_ has quit [Quit: _stu_]
Glenny has quit [Ping timeout: 250 seconds]
cwong_on_irc has joined #ruby
to_json has joined #ruby
to_json has joined #ruby
levifig has joined #ruby
Zai00 has joined #ruby
Zai00 has quit [Client Quit]
solars has quit [Ping timeout: 244 seconds]
[Butch] has quit [Quit: Linkinus - http://linkinus.com]
rfi_ is now known as rfi
skweek has joined #ruby
patchedmonkey has quit [Quit: Textual IRC Client: www.textualapp.com]
m3_del has quit [Remote host closed the connection]
mikeharris22 has quit [Ping timeout: 244 seconds]
ruby-lang044 has joined #ruby
m3_del has joined #ruby
<ruby-lang044> Hi!
<havenwood> ruby-lang044: hellooo
BigDiesel007 has joined #ruby
ghoti has quit [Ping timeout: 240 seconds]
s2013 has quit [Quit: Textual IRC Client: www.textualapp.com]
<skweek> I'm wondering if I can ask for some help writing a script, I guess I'm just illiterate when it comes to writing a script, which sucks because I try a lot and I feel dumb, but I'm trying to move anything with the extension mp3 to a folder as long as there are mp3s and m4as in that folder, of a directory of folders containing mostly m4as and some mp3s and m4as, mp3 and m4a file types
northfurr has quit [Quit: northfurr]
m3_del has quit [Ping timeout: 244 seconds]
mag42c has quit [Quit: mag42c]
s00pcan has quit [Remote host closed the connection]
<hxegon> skweek: have you written anything yet?
freerobby has quit [Remote host closed the connection]
<hxegon> is there a way to load a specific file from github through bundler?
BigDiesel007 is now known as BigDiesel
<skweek> i've read a few books on ruby and written scripts that are instructed
s00pcan has joined #ruby
<hxegon> skweek: but as far as the script goes, you haven't started?
northfurr has joined #ruby
eminencehc has quit [Remote host closed the connection]
duckpuppy has joined #ruby
<hxegon> skweek: also, what OS are you using?
<dorei> hxegon: no idea about a specific file but you can tell bundler to fetch a "gem" from github
<skweek> no, linux
<hxegon> dorei: I'm not trying to fetch a gem though, its a lib file from someones project (that isn't a gem)
ViniciusBrito has joined #ruby
northfurr has quit [Client Quit]
<dorei> hxegon: check the github section
<hxegon> skweek: well I'm not going to spoon feed you (because I'm trying to break the habit), but I'll help you. You might have to give me a minute first to deal with this git/bundler thing
eminencehc has joined #ruby
<skweek> k, thanks
ViniciusBrito has quit [Client Quit]
northfurr has joined #ruby
<hxegon> dorei: I've checked that and it seems to need a .gemspec file to work, so maybe bundler isn't the right tool? I might be looking for git submodules
sandals has joined #ruby
Voker57 has quit [Read error: Connection reset by peer]
northfurr has quit [Client Quit]
Ox0dea has joined #ruby
northfurr has joined #ruby
<Ox0dea> hxegon: Do you trust GitHub?
<hxegon> skweek: first thing while I deal with this, break down you problem into component parts. e.g. list the contents of a folder, get file extensions from those, etc.
Yzguy has joined #ruby
ruby-lang044 has quit [Ping timeout: 246 seconds]
<hxegon> Ox0dea: not with anything too sensitive, but thats not specific to Github. Should I actively distrust them?
<Ox0dea> skweek: Which Ruby books have you read, if you don't mind my prying?
podman has quit [Quit: Connection closed for inactivity]
<havenwood> skweek: Want some code to get you started or trying to figure it out yourself?
<Ox0dea> hxegon: No, I don't think so, but I asked pursuant to suggesting that you could just use open-uri + eval. :P
mordocai has quit [Remote host closed the connection]
northfurr has quit [Client Quit]
mistermocha has joined #ruby
ss_much has joined #ruby
northfurr has joined #ruby
<hxegon> Ox0dea: hmm... I'll consider it if git submodules turns out to be a bad fit. Thanks for the suggestion though, not something I had thought of before
eminence_ has joined #ruby
<shevy> I want my xmas ruby
eminencehc has quit [Ping timeout: 260 seconds]
freerobby has joined #ruby
riotjones has joined #ruby
<Ox0dea> hxegon: Please ignore me on this one.
northfurr has quit [Client Quit]
karapetyan has quit [Remote host closed the connection]
<hxegon> Ox0dea: Don't suggest that kind of stuff to me, because those kinds of things are just tempting enough for me to use in production because inexperience + enthusiasm
hahuang65 has joined #ruby
<Ox0dea> skweek?
<skweek> head first ruby, ruby wizardry, and a two youtube ruby tutorial series' Ox0dea
Steve_Jobs has quit [Quit: WeeChat 0.4.2]
<Ox0dea> skweek: Hm, not the worst list, I guess. :P
<Ox0dea> skweek: http://git.io/vlK6Y
Rollabunna has joined #ruby
<Ox0dea> I think that might get you started in the right direction.
mistermocha has quit [Ping timeout: 240 seconds]
northfurr has joined #ruby
dopie has quit [Quit: This computer has gone to sleep]
<hxegon> skweek: any questions about that gist?
karapetyan has joined #ruby
to_json has quit [Quit: Leaving.]
riotjones has quit [Ping timeout: 240 seconds]
northfurr has quit [Client Quit]
<shevy> skank the weed
<shevy> skweek the wank
northfurr has joined #ruby
<skweek> so it lists mp3s and their directories, and then list m4as, and then move those listed items to a directory, and then remove m4as from the computer
Rollabunna has quit [Ping timeout: 240 seconds]
northfurr has quit [Client Quit]
<hxegon> skweek: specific folders or your entire computer?
<shevy> keep a backup!
Coldblackice has joined #ruby
<hxegon> skweek: I'm guessing that this is all taking place in a 'Music' folder or something
<shevy> as usual, the solution is to use arrays there
<havenwood> skweek: Did you want some code to give you ideas for getting started or want to figure it out from scratch?
mistermocha has joined #ruby
<weaksauce> skweek think in smaller chunks and only do the actual destructive commands when you fully know that it works
northfurr has joined #ruby
jorb_ is now known as jorb
tlaxkit has joined #ruby
<hxegon> skweek: destructive meaning actually changing something in a potential irreversible way
juanpablo__ has joined #ruby
northfurr has quit [Client Quit]
marr has quit [Ping timeout: 244 seconds]
consumerism has quit [Ping timeout: 260 seconds]
Renich has quit [Ping timeout: 264 seconds]
karapetyan has quit [Remote host closed the connection]
<hxegon> skweek: clarify 'remove m4a from computer' pls. as in it removes the file completely, or it copies it to a location and destroys the original?
rbowlby has joined #ruby
<skweek> i'm converting m4a to mp3 and deleting m4a
m3_del has joined #ruby
Renich has joined #ruby
towski__ has joined #ruby
northfurr has joined #ruby
juanpablo__ has quit [Ping timeout: 250 seconds]
<skweek> only some mp3s have been converted out of the directories
stamina has quit [Quit: WeeChat 1.3]
northfurr has quit [Client Quit]
<skweek> so list m4as from directories, list mp3s from directories, compare and list m4as, remove m4as? does that sound broken down
tkuchiki has joined #ruby
Rickmasta has joined #ruby
towski_ has quit [Ping timeout: 240 seconds]
<hxegon> skweek: so you only want to convert m4as in directories where mp3s also exist?
northfurr has joined #ruby
rgrmatt has quit [Remote host closed the connection]
<hxegon> skweek: or are you trying to prevent m4as getting converted that already have mp3 conversions?
babblebre has quit [Quit: Connection closed for inactivity]
<skweek> I have partially converted m4as into mp3s of several directories
ghoti has joined #ruby
northfurr has quit [Client Quit]
<skweek> I'm trying to remove the m4as that have already been converted to mp3s
<hxegon> skweek: alright, before we get into the meat of this, I'm just going to get something out of the way first
dfockler has joined #ruby
tkuchiki has quit [Ping timeout: 240 seconds]
<hxegon> skweek: bash/zsh is probably a better tool in this situation. that said, doing this in ruby will be a good excersize, and it's not 'bad' to do it in ruby.
<skweek> I agree