apeiros changed the topic of #ruby to: Rules & more: http://ruby-community.com || Ruby 2.2.2; 2.1.6; 2.0.0-p645: https://ruby-lang.org || Paste >3 lines of text on https://gist.github.com || log @ http://irclog.whitequark.org/ruby/
nfk has joined #ruby
charliesome has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
ruby-lang180 has joined #ruby
KnownSyntax has joined #ruby
shinnya has quit [Ping timeout: 246 seconds]
dr3w has quit [Ping timeout: 260 seconds]
RobertBirnie has quit [Ping timeout: 252 seconds]
KnownSyntax has quit [Changing host]
KnownSyntax has joined #ruby
bruno- has joined #ruby
ivanskie has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
charliesome has joined #ruby
KnownSyntax has quit [Quit: Leaving]
<ruby-lang180> Pushing an element to an array using `<<` or `Array#push` returns the array itself. How can I add a new element to an array have it return just the newly-added element?
KnownSyntax has joined #ruby
Encapsulation has quit [Read error: Connection reset by peer]
lucyinthesky has joined #ruby
robh71 has joined #ruby
Encapsulation has joined #ruby
bruno- has quit [Ping timeout: 272 seconds]
<Ropeney> ruby-lang180: Quick hackish would be array.push(1).last ?
nofxx has joined #ruby
nofxx has joined #ruby
crack_user has joined #ruby
allcentu1 has joined #ruby
christiandsg has joined #ruby
lucyinthesky has left #ruby ["Leaving"]
marius has joined #ruby
dopamean_ has joined #ruby
marius has quit [Client Quit]
<shevy> yeah well
<shevy> if you already add the element to your array
<shevy> you already have that element :)
christiandsg has quit [Ping timeout: 265 seconds]
<pipework> ruby-lang180: You have the ability to get a reference already by pushing it on the array.
axsuul has quit [Read error: Connection reset by peer]
<KensoDev> ruby-lang180: why not just arr.push(element);element
<KensoDev> If you already have the element you are passing in, you can just return it from your method.
<KensoDev> am I misunderstanding what you want to accomplish?
<pipework> Or if you want to be funny, element.tap {|el| arr << el }
oleksandriuzikov has quit [Quit: Leaving.]
<ruby-lang180> I was just wondering if there was a simpler way to do it than push(foo).last
jgt1 has quit [Ping timeout: 250 seconds]
ishahnaz has quit []
<pipework> ruby-lang180: Sure.
troulouliou_div2 has quit [Quit: Leaving]
<pipework> foo.tap {|el| arr << el } would definitely always return foo
<havenwood> ruby-lang180: array << item; item
<EllisTAA_> Can someone clarify something for me. is parallelism when you use two processors, and concurrency when you use one?
<pipework> though it might no longer be the last item in the array.
vF3hNGxc47h8 has joined #ruby
techsethi has joined #ruby
RegulationD has joined #ruby
pen-soldier has quit [Quit: Leaving]
<toretore> EllisTAA_: yes, mostly
bruno- has joined #ruby
vF3hNGxc47h8 has quit [Ping timeout: 246 seconds]
<havenwood> EllisTAA_: Imagine there's a Global VM Lock and two cores alternate which has the lock. Is that concurrent? Is that parallel?
<EllisTAA_> i dont’ know what a lock is
<EllisTAA_> :P
<havenwood> EllisTAA_: Aha! No prob.
<havenwood> EllisTAA_: Are you familiar with Ruby's Mutex?
<EllisTAA_> nope, should i look it up
binaryplease1 has quit [Ping timeout: 250 seconds]
RegulationD has quit [Ping timeout: 255 seconds]
baweaver has joined #ruby
<havenwood> EllisTAA_: Here're a series of articles that might help illuminate: http://www.jstorimer.com/blogs/workingwithcode/8085491-nobody-understands-the-gil
chuy has quit [Ping timeout: 244 seconds]
RobertBirnie has joined #ruby
Torrieri has joined #ruby
<EllisTAA_> havenwood: thanks
<toretore> EllisTAA_: concurrency is boiling rice and pasta at the "same time" by using one heating element and switching between the two; parallelism is boiling rice and pasta at the same time by using two heating elements
keen______ has joined #ruby
<havenwood> EllisTAA_: But you can run code concurrently on one or more cores, but they may or may not be running in parallel.
<toretore> s/element/cpu/; s/rice|pasta/program/
tmtwd has quit [Quit: Leaving]
<EllisTAA_> toretore: nice!
keen_____ has quit [Ping timeout: 265 seconds]
jackjackdripper has quit [Quit: Leaving.]
michaeldeol has joined #ruby
dr3w has joined #ruby
d10n-work has quit [Quit: Connection closed for inactivity]
robh71 has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
frem has quit [Quit: Connection closed for inactivity]
RobertBirnie has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
eminencehc has quit [Remote host closed the connection]
choke has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
chuy has joined #ruby
sevenseacat has joined #ruby
oo_ has joined #ruby
pengin has quit [Remote host closed the connection]
<ght> You know, it's funny, when we set out on the app building wing of our company, we were choosing between base languages: Phython, PHP, and Ruby
nettoweb has joined #ruby
<ght> and it never ceases to amaze me how the Python guys try to act elitist, despite it being, from all accounts, more simplistic than Ruby.
diegoaguilar has joined #ruby
jtdoncas has quit [Ping timeout: 265 seconds]
<diegoaguilar> Hello I want to learn, test ruby
<diegoaguilar> whats best way to install it
<diegoaguilar> download and compile binaries
<diegoaguilar> or download rvm
<diegoaguilar> ?
<havenwood> diegoaguilar: Which OS?
<diegoaguilar> ubuntu 12.04
<havenwood> diegoaguilar: The Brightbox packages are one option: https://www.brightbox.com/docs/ruby/ubuntu/
<havenwood> diegoaguilar: You can switch to non-package-manager Rubies with chruby: https://github.com/postmodern/chruby#readme
<havenwood> diegoaguilar: Or yeah, RVM.
<Nilium> chruby's probably a better idea for a server.
robh71 has joined #ruby
<Nilium> I just use rbenv on local machines
TheNet has quit [Remote host closed the connection]
<diegoaguilar> well this is not a server, but I want to use what should be better though
<diegoaguilar> not a "test environment"
<diegoaguilar> I just dont know which is best, binaries or rvm solutions
<Nilium> rbenv is probably the most convenient for local dev stuff, as far as I'm concerned.
<diegoaguilar> I didnt know about brightbox
<BraddPitt> w4
<Nilium> Well, you're on ubuntu 12.04, so you're probably a bit limited as far as package management goes
<Nilium> So, brightbox is a good option.
<Nilium> If you plan on having multiple rubies, then chruby/rbenv/rvm come into play.
<diegoaguilar> I just swtiched back to 12.04 from 14.04
<diegoaguilar> I really really really always have minor unstabilities with 14
<diegoaguilar> with distinct hardware
<diegoaguilar> I just find 12.04 so stable
<havenwood> Nilium: Why would you need to change Rubies on a server?
<Nilium> havenwood: Terrible people ಠ_ಠ
<havenwood> Nilium: Why would you use rbenv over chruby in dev?
marr has quit [Ping timeout: 244 seconds]
<Nilium> Because it's what I know.
Lucky__ has joined #ruby
<Coraline> I've never had a problem with rbenv
<Nilium> rbenv is mostly automagickal whereas chruby felt very manual to me.
<Nilium> At the same time, rbenv never felt incomprehensibly stupid the way rvm did
KensoDev has quit [Remote host closed the connection]
KensoDev has joined #ruby
EllisTAA_ has quit [Quit: EllisTAA_]
<Nilium> Is rvm still a giant mess of shell scripts? Looks like it is..
cajone has quit [Quit: Leaving.]
<sevenseacat> yep, it is
speaking1ode has joined #ruby
diegoviola has joined #ruby
j4cknewt has quit [Remote host closed the connection]
da3mian has joined #ruby
iateadonut has joined #ruby
michael_mbp has quit [Excess Flood]
phutchins1 has joined #ruby
baweaver has quit [Remote host closed the connection]
<diegoaguilar> Hey, one question
<diegoaguilar> which "big ones" are using ruby in production?
KensoDev has quit [Ping timeout: 255 seconds]
<Nilium> What's a big one?
<diegoaguilar> google, fb, amazon
<Nilium> Well, GitHub is Ruby.
<Nilium> Partly.
casadei_ has quit [Remote host closed the connection]
<Nilium> I'm not really sure why it matters, anyway.
<diegoaguilar> it's interesting, motivation for learning
<Nilium> I don't even use Ruby for web crap, so I don't keep up on who uses it for weird things.
<diegoaguilar> lol Nilium
<Nilium> It's functionally my Perl.
<diegoaguilar> what do u use Ruby for?
<Nilium> Scripting things and tools.
michael_mbp has joined #ruby
TheNet has joined #ruby
<Nilium> More and more of that's in Go now, but Ruby still works for quick one-off things.
nettoweb has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
mgorbach has quit [Quit: ZNC - http://znc.in]
nisstyre has quit [Remote host closed the connection]
rahult is now known as rahult_
cajone has joined #ruby
<diegoaguilar> yeah I somehow think that Go will be a dominant language soon
<Nilium> It more or less already is.
mgorbach has joined #ruby
<diegoaguilar> I dont know why or how it got more and more popular
<diegoaguilar> python, nodejs and node
<diegoaguilar> alongside Assembly, C/C++ :P
<Nilium> Probably whiplash from node.js and Python and co.
Mojo_Nixon has joined #ruby
rahult_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
devoldmx has joined #ruby
<Nilium> i.e., everything got so collectively stupid and hard to maintain that Go ended up being the "ok, we need to be able to read this a month later" option
ruby-lang180 has quit [Ping timeout: 246 seconds]
gilest has quit [Quit: Leaving...]
umgrosscol has joined #ruby
andywojo has joined #ruby
icarus has quit [Ping timeout: 250 seconds]
jeadr has quit [Remote host closed the connection]
devoldmx has quit [Ping timeout: 250 seconds]
pragmatism has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
andywojo has quit [Client Quit]
jtdoncas has joined #ruby
jeadr has joined #ruby
oo_ has quit [Remote host closed the connection]
Vile` has quit [Remote host closed the connection]
veduardo has quit [Ping timeout: 272 seconds]
renderful has joined #ruby
rubie has quit [Remote host closed the connection]
ramfjord has quit [Ping timeout: 244 seconds]
phutchins1 has quit [Ping timeout: 252 seconds]
Vile` has joined #ruby
TheNet has quit [Remote host closed the connection]
bricker has quit [Ping timeout: 245 seconds]
da3mian has quit [Remote host closed the connection]
renderful has quit [Ping timeout: 265 seconds]
jpfuentes2 has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
eminencehc has joined #ruby
Guest91143 has joined #ruby
oo_ has joined #ruby
uptownhr has joined #ruby
speaking1ode has quit [Ping timeout: 255 seconds]
axsuul has joined #ruby
_blizzy_ has quit [Ping timeout: 260 seconds]
maletor has quit []
veduardo has joined #ruby
rubie has joined #ruby
howdoico1 has joined #ruby
casadei_ has joined #ruby
Guest91143 has quit [Quit: leaving]
sdfgsdfg has joined #ruby
radgeRayden has joined #ruby
choppington has quit [Ping timeout: 244 seconds]
Vile` has quit [Remote host closed the connection]
dr3w has quit [Ping timeout: 255 seconds]
Vile` has joined #ruby
howdoico1 has quit [Ping timeout: 250 seconds]
bronson has joined #ruby
attamusc has quit [Quit: Connection closed for inactivity]
eminencehc has quit [Remote host closed the connection]
tkuchiki has joined #ruby
guih has joined #ruby
iwaffles has quit [Quit: iwaffles]
Vile` has quit [Remote host closed the connection]
danman has quit [Quit: danman]
<shevy> TIOBE disagrees!
Musashi007 has joined #ruby
eminencehc has joined #ruby
djbkd has quit [Quit: My people need me...]
phutchins1 has joined #ruby
dr3w has joined #ruby
Vile` has joined #ruby
<shevy> not TIOBE approved
phutchins1 has quit [Ping timeout: 250 seconds]
dr3w has quit [Ping timeout: 246 seconds]
christiandsg has joined #ruby
<Aeyrix> dude tiobe lmao
skydiver has joined #ruby
<shevy> can we do a three component graph?
<shevy> e. g. to merge this with TIOBE
<Aeyrix> >using TIOBE as an authoritative source
<shevy> Then we would have (1) Popularity Rank by Github, (2) Popularity Rank on Stack Overflow (3) Search Engines
<shevy> Aeyrix they have a great FAQ
bruno- has quit [Ping timeout: 260 seconds]
<Aeyrix> big deal
<Aeyrix> I really need to set up some sort of reaction image dump for myself.
<Aeyrix> memeci.de/lmaoingatyourlife.png
<shevy> for instance
nettoweb has joined #ruby
<shevy> "In order to compensate a bit for this, we ask a fee of 5,000 US$ for the complete data set"
diegoaguilar has quit [Read error: Connection reset by peer]
<Aeyrix> They don't do it for free.
<Aeyrix> Therefore probably garbage.
casadei_ has quit [Remote host closed the connection]
skydiver has quit [Ping timeout: 250 seconds]
christiandsg has quit [Ping timeout: 265 seconds]
dgutierrez1287 has joined #ruby
joel__ has joined #ruby
IceyEC has quit [Quit: iceyec]
blue_deref has joined #ruby
joel__ has quit [Client Quit]
blueOxigen has joined #ruby
bluOxigen has quit [Ping timeout: 244 seconds]
metamp has joined #ruby
radgeRayden has quit [Ping timeout: 265 seconds]
dgutierrez1287 has quit [Ping timeout: 272 seconds]
mistermocha has joined #ruby
<metamp> anyone knows why would bundler not run as a user
<ght> What's the exact error?
<metamp> command not found
<metamp> but when I'm logged in as root it works
radgeRayden has joined #ruby
<sevenseacat> you probably installed bundler as root
<sevenseacat> which is a Bad Thing
<metamp> aha
<ght> haha
rehat has joined #ruby
PeteRoss has joined #ruby
<metamp> should I just do rm -rf bundle*
<metamp> ?
<sevenseacat> I would *uninstall* bundler as root, not just remove random things
<ght> How did you install it?
radgeRayden_ has joined #ruby
<metamp> gem install bundler
<ght> The su - and gem uninstall bundler
<ght> Right?
<metamp> yes
<PeteRoss> did you hear about the new black Barbie? it comes with 12 kids, aids, and a welfare check
<sevenseacat> !kick PeteRoss
PeteRoss was kicked from #ruby by ruboto [PeteRoss]
<ght> Unexpected racisim from PeteRoss.
PeteRoss has joined #ruby
<metamp> no but it sounds like a cool toy
uptownhr has quit [Quit: uptownhr]
mistermocha has quit [Ping timeout: 245 seconds]
<metamp> I'll buy it to my little sister
j4cknewt has joined #ruby
radgeRayden has quit [Ping timeout: 255 seconds]
bronson has quit [Remote host closed the connection]
nettoweb has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
cajone has quit [Remote host closed the connection]
cajone has joined #ruby
n_blownapart has quit [Remote host closed the connection]
s00pcan has quit [Ping timeout: 265 seconds]
j_mcnally has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
devbug has joined #ruby
arescorpio has joined #ruby
s00pcan has joined #ruby
chipotle has joined #ruby
bootstrappm has left #ruby [#ruby]
hexadecimal has joined #ruby
<hexadecimal> hey guys im looking for a confident programmer and someone that is interested in politics
j_mcnally has joined #ruby
<shevy> I don't think you are
znz_jp has quit [Quit: kill -QUIT $$]
RobertBirnie has joined #ruby
<hexadecimal> yes its for a startup.. but i dont have the capable programming knowledge
hexadecimal has quit [Client Quit]
nfk has quit [Quit: Try memory.free_dirty_pages=true in about:config]
Ox0dea has quit [Read error: Connection reset by peer]
dr3w has joined #ruby
Ox0dea has joined #ruby
jalcine has quit [Quit: ZNC - http://znc.in]
jenrzzz has quit [Ping timeout: 246 seconds]
znz_jp has joined #ruby
davedev2_ has joined #ruby
davedev24 has quit [Ping timeout: 244 seconds]
Musashi007 has quit [Quit: Musashi007]
TheNet has joined #ruby
axsuul has quit [Ping timeout: 245 seconds]
oo_ has quit [Remote host closed the connection]
CBX has joined #ruby
allcentu1 has quit [Ping timeout: 252 seconds]
oo_ has joined #ruby
towski_ has quit [Remote host closed the connection]
TheNet has quit [Ping timeout: 246 seconds]
iooner has quit [Ping timeout: 246 seconds]
RobertBirnie has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
iwaffles has joined #ruby
skydiver has joined #ruby
iwaffles has quit [Client Quit]
RobertBirnie has joined #ruby
andywojo has joined #ruby
iooner has joined #ruby
oo_ has quit [Remote host closed the connection]
finisherr has joined #ruby
crack_user has quit [Quit: Leaving.]
axsuul has joined #ruby
RobertBirnie has quit [Client Quit]
bruno- has joined #ruby
mwlang has joined #ruby
jeadr has quit [Remote host closed the connection]
PeteRoss has quit [Remote host closed the connection]
danielpclark has joined #ruby
jeadr has joined #ruby
rahult has joined #ruby
bruno- has quit [Ping timeout: 245 seconds]
siemprefresco has joined #ruby
rahult is now known as rahult_
rahult_ is now known as rahult
devoldmx has joined #ruby
siempref_ has quit [Ping timeout: 272 seconds]
yfeldblum has quit [Ping timeout: 244 seconds]
tmtwd has joined #ruby
crack_user has joined #ruby
crack_user has quit [Client Quit]
oo_ has joined #ruby
devoldmx has quit [Ping timeout: 240 seconds]
<shevy> lol hilarious changelog for today: http://ufoai.org/wiki/News
<shevy> "./configure --help shouldn't lie to the user."
<shevy> I gotta remember that for commandline ruby scripts
psy_ has joined #ruby
chinmay_dd has joined #ruby
UtkarshRay has joined #ruby
Swappticon has joined #ruby
techsethi has quit [Quit: techsethi]
rahult is now known as rahult_
sarkyniin has quit [Ping timeout: 240 seconds]
rahult_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
howdoico1 has joined #ruby
rakm has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
rahult has joined #ruby
Yzguy has joined #ruby
swills has quit [Changing host]
swills has joined #ruby
CBX has quit [Quit: Leaving]
jeadr has quit [Remote host closed the connection]
dimasg has joined #ruby
<Ox0dea> The relevant commit: http://sourceforge.net/p/ufoai/code/ci/a5ef3
mistermocha has joined #ruby
jeadr has joined #ruby
baweaver has joined #ruby
towski_ has joined #ruby
darkf has joined #ruby
bronson has joined #ruby
oo_ has quit [Remote host closed the connection]
baroquebobcat has joined #ruby
mistermocha has quit [Ping timeout: 255 seconds]
braincra- has quit [Quit: bye bye]
dr3w has quit [Ping timeout: 260 seconds]
bronson has quit [Ping timeout: 260 seconds]
yashinbasement has joined #ruby
casadei_ has joined #ruby
howdoico1 has quit [Ping timeout: 256 seconds]
blue_deref has quit [Quit: bbn]
jtdoncas has quit [Ping timeout: 260 seconds]
nisstyre has joined #ruby
<mwlang> inefficient code has me in the blues…I’m refactoring this, but I’m curious how others would do it: https://gist.github.com/mwlang/64b49551e3d27800e479
nisstyre has quit [Changing host]
nisstyre has joined #ruby
braincrash has joined #ruby
happydad has joined #ruby
vdamewood has quit [Ping timeout: 260 seconds]
arooni-mobile has quit [Ping timeout: 246 seconds]
jhack has quit [Ping timeout: 245 seconds]
sinepreggin has joined #ruby
helpa has quit [Remote host closed the connection]
<sinepreggin> hi
<mwlang> I strongly suspect the previous developer did not intend vouchers to only be valid when an item belongs to customer_discount_group.
helpa has joined #ruby
oo_ has joined #ruby
jenrzzz has joined #ruby
happydad has quit [Client Quit]
<Ox0dea> !ops
<ruboto> fflush, banisterfiend, apeiros, seanstickle, Mon_Ouie, zzak, Havenn, jhass, Radar, sevenseacat, miah, workmad3, Coraline, drbrain, zenspider, slyphon, rubyhacker1, ljarvis, Aria
<sevenseacat> hello?
<Ox0dea> sinepreggin backwards.
<havenwood> !mute sinepreggin
<sevenseacat> ah hah ty.
<Ox0dea> Sure thing.
<mwlang> how many times does that make for today?
sinepreggin has left #ruby [#ruby]
<Ox0dea> mwlang: There are so many little idiosyntactic annoyances in this code.
reggin has joined #ruby
helpa has quit [Remote host closed the connection]
<reggin> hi
helpa has joined #ruby
<mwlang> Ox0dea: imagine 70k lines of the same thing and you get why I’m a crying internally.
<Ox0dea> Nothing rubyfmt can't fix!
<Coraline> !ban reggin !P Troll
reggin was banned on #ruby by ChanServ [reggin!*@*]
reggin was kicked from #ruby by ChanServ [Banned: Troll]
<mwlang> rubyfmt?
<Ox0dea> If only. :'(
amystephen has quit [Ping timeout: 240 seconds]
dimasg has quit [Ping timeout: 244 seconds]
ihaten|ggers has joined #ruby
ihaten|ggers was kicked from #ruby by ChanServ [Banned: Troll]
* mwlang looks at rubyfmt gem
<Ox0dea> Oh, hey, it's a real thing.
rubie has quit [Remote host closed the connection]
<shevy> lol
<mwlang> formatting’s one thing…but this thing’s so full of inefficiencies, it’s not even funny.
<shevy> sometimes madness reigns over #ruby
ReK2GnULinuX has quit [Ping timeout: 244 seconds]
<mwlang> Ox0dea: you mean so say you just found out along with me that rubyfmt isn’t a pipedream?
<mwlang> :-o
<Ox0dea> mwlang: Doubtless it trips on all sorts of edge cases, but it's nice that it's there, I suppose.
sepp2k has quit [Read error: Connection reset by peer]
<Ox0dea> mwlang: You could replace that unless nest with #try, I reckon.
<mwlang> Ox0dea: It did a so-so job on this bit of code…I’m wondering how it handles old 1.8 hashes.
<mwlang> Ox0dea: Rails 1.2, Ruby 1.8 :-o
helpa has quit [Remote host closed the connection]
chinmay_dd has quit [Quit: See ya!]
<mwlang> missing all the wonderful modern Rails syntax sugar coating.
helpa has joined #ruby
<Ox0dea> And then some!
<nofxx> Is there something like this for ruby? Serverside text preprocessor, for typography: https://github.com/davidmerfield/Typeset
<mwlang> Here’s another fun one: https://gist.github.com/mwlang/461ebad1f6445c5a2e33
<Aeyrix> nofxx: Use a client-side preprocessor.
<nofxx> Aeyrix, cool too. Suggestions?
christiandsg has joined #ruby
tmtwd has quit [Remote host closed the connection]
<mwlang> nofxx: better to do that sort of thing client side —hard to know how big the text’s rendering on user’s device and margins and all that which comes after the browser calculates the layout and flow.
<Radar> Ox0dea: that feature baweaver was talking about yesterday for bad name detection is now in helpa. It'll message the ops channel if it detects one. Your !ops calls are still welcome :)
<nofxx> mwlang, no, that one isn't text 'fitting' is acronym/abbr smallcaps, literal quotes
dopie has joined #ruby
<nofxx> those kinds of fanciness
TheNet has joined #ruby
<nofxx> hence compiling at write time isn't such bad idea
<Aeyrix> You realise you can do that client-side, right?
<Aeyrix> With this new-ish thing called cascading stylesheets.
<Ox0dea> Those are still in beta, no?
<Aeyrix> v3 beta, yeah.
JoshGlzBrk has joined #ruby
<mwlang> Ah — I saw the “soft hy­phen in­ser­tion, op­ti­cal mar­gin out­dents” part, which is sensitive to where the words fall on the page.
<mwlang> I guess I read too much into it.
<nofxx> Aeyrix, not all of that... but eitherway, know any lib?
<Ox0dea> Radar: Does it watch /nick?
jpfuentes2 has joined #ruby
<Aeyrix> Why are you using a library for something like that
<Aeyrix> why not just do it like a normal human being
<Radar> Ox0dea: it watches join events
<shevy> lol
veduardo has quit [Ping timeout: 245 seconds]
<shevy> a normal human being :)
<Ox0dea> Radar: In that case, I apologize for airing the idea.
<nofxx> Aeyrix, and reinvent the wheel? not following. What's the magical line?
<Radar> Ox0dea: :P
helpa has quit [Remote host closed the connection]
<Aeyrix> nofxx: lol
<Ox0dea> mwlang: Something about that message borked WeeChat.
helpa has joined #ruby
<Ox0dea> Your message spilled over into the nicklist.
<mwlang> nofxx: no, I try to avoid going to fanciful places like that.
yashinbasement has quit [Read error: Connection reset by peer]
<mwlang> Ox0dea: man…I copied and pasted from that typeset page…another good reason not to use it. :-D
christiandsg has quit [Ping timeout: 265 seconds]
<baweaver> just happened to have a spare 30 minutes, so I made a quick addition for it.
paulcsmith has joined #ruby
sdwrage has joined #ruby
<mwlang> sometimes I think improvements 30 minutes or an hour at a time are the best ones.
<mwlang> they add up after a while.
<nofxx> mwlang, typography isn't all that superfluous. Gave Jobs at least a helluv speech.
<mwlang> nofxx: not saying typography itself is a bad thing. I pay a lot of attention to it…but I don’t get into the kinds of details that library does.
reset has joined #ruby
umgrosscol has quit [Quit: Quit]
<mwlang> I am more like Pixar with their details…If you watch closely, they do super hi-res rendering only 10% of the time and usually only the most memorable frames…but the overall product still shines and looks finished/polished.
<shevy> yeah lot of polishing
<mwlang> that’s what I do in typography and web design overall as well. Put the extra details in where it matters most and has high impact. Everything else done quickly and effciently.
<shevy> more animated gifs!
<nofxx> hm, not so sure with that analogy. A frame goes by , a screen the user can lean the head forwards and backwards at will
<nofxx> but anyway, that wasn't meant for paragraphs of an app, but a wiki
framling has quit [Remote host closed the connection]
jenrzzz has quit [Ping timeout: 272 seconds]
<Aeyrix> wew tbh
<mwlang> nofxx: for example…if I’m going to put a big bold statement on a page that’s meant to gawk at, then I’ll do the whole curly quotes left and right hanging and fancy font and great gradient background and whatnot there.
<sevenseacat> Aeyrix: lol
<mwlang> but anywhere else, I just use straight up double quotes, etc.
<Aeyrix> Pull requests welcome.
chipotle has quit [Quit: cheerio]
yashinbasement has joined #ruby
<nofxx> Aeyrix, asks how to use RVM
<Aeyrix> >someone links Radar's chruby guides
<nofxx> mwlang, yup... but in my case is user edited text
<sevenseacat> I get pinged every time someone mentions R4IA
<Aeyrix> heh
<Radar> Aeyrix: Only 9 entries?
<Aeyrix> Radar: Pull requests welcome. ;)
<Aeyrix> Making a repo for it now on memeci.de
ponga has joined #ruby
howdoico1 has joined #ruby
<shevy> Aeyrix you could extend that chart to make a game - the labyrinth of death. find the right questions, for the proper answers to lead you out of the deadly maze!
<Ox0dea> "Memeci" looks like an Italian name.
shoutsid has quit [Remote host closed the connection]
<mwlang> sevenseacat: even in gists?
devoldmx has joined #ruby
lannonbr has quit [Quit: WeeChat 1.2]
jeadr has quit [Remote host closed the connection]
choke has joined #ruby
<baweaver> R4IA?
<Aeyrix> Okay I need four more.
<Aeyrix> All current requests are in.
<nofxx> Aeyrix, user is looking for a way to write JS with ruby
<Aeyrix> Ox0dea: meme-cide
<Aeyrix> :^)
jeadr has joined #ruby
<Radar> baweaver: Rails 4 in Action aka the best book written about Rails.
<baweaver> Oh I know
<mwlang> Aeyrix: “mwlang asks a question that goes unanswered while everybody engages the rude clueless newbie”
<mwlang> :-)
<sevenseacat> until I write another one.
<Aeyrix> mwlang: lmao
<baweaver> just tagging with R4IA because R$IA
<Aeyrix> mwlang: I'll file that under "someone is angry that their question goes unanswered" ;)
<baweaver> dangit, botched that last R4IA
fedexo has joined #ruby
<mwlang> c/angry/miffed
<mwlang> :-)
<Radar> Who's question are we talking about?
* Radar has the attention span of an oh nevermind
<Aeyrix> ONE MORE
* baweaver scrolls up in an obliged sense of slight guilt
<sevenseacat> mwlang: yeah I get that sometimes, the question-being-ignored part. kinda frustrates me, but eh.
devoldmx has quit [Ping timeout: 255 seconds]
<Aeyrix> last call for alcohol
<mwlang> baweaver: no unanswered questions by me tonight. :-p
sdothum has quit [Quit: ZNC - 1.6.0 - http://znc.in]
yfeldblum has joined #ruby
paulcsmith has quit [Quit: Be back later ...]
yfeldblum has quit [Remote host closed the connection]
<mwlang> Aeyrix: Radar busts github and can’t get work done.
<Radar> mwlang: that happened once!
<Aeyrix> loooool
<baweaver> You mean other people don't crash their corporate githubs to get out of work?
<baweaver> er...
yfeldblum has joined #ruby
<baweaver> not that I've done that before
<mwlang> I think I’ve crashed github once…many years ago.
<baweaver> It's not hard is the bad part
<baweaver> just saturate it with REST requests
<mwlang> early unicorn days.
cibs_ is now known as cibs
<mwlang> heh…was attempting to automate repo setup and was running (gasp) automated tests and accidentally put one of the specs into infinite loops. github was down for a couple hours after that.
<mwlang> oh, the power of automated testing!
gix has quit [Ping timeout: 272 seconds]
<baweaver> Someone said their remote execution for orchestration was safe once at another job
<baweaver> so I put a fork bomb in the text field and asked them if they were feeling lucky
<Psi-Jack> Trying to find a similar queuing method as EM::Connection to handle stuffing new objects into a queue to be handled by EventMachine. Anyone have any thoughts? Something like the Endpoints + RelayConnectionHandler as per https://gist.github.com/erenfro/177045fef620e2aaac6f
bustrarm has joined #ruby
gix has joined #ruby
<yayfoxes> start over
dorei has quit []
busterarm has quit [Ping timeout: 260 seconds]
howdoico1 has quit [Ping timeout: 246 seconds]
<mwlang> used it on a goliath project a few years back…no idea if it’s similar queuing method
<Psi-Jack> Hmmm, RabbitMQ might be interesting. Sensu already uses RabbitMQ as-is.
baroquebobcat has quit [Quit: baroquebobcat]
astrobun_ has joined #ruby
Asher has quit [Quit: Leaving.]
Mia has quit [Read error: Connection reset by peer]
<mwlang> alright, gots some good music on and grooving again…the blues have subsided and I’m ready to tackle this obnoxious code.
Mia has joined #ruby
Asher has joined #ruby
techsethi has joined #ruby
yashinbasement has quit [Quit: Leaving]
towski_ has quit [Remote host closed the connection]
arooni-mobile has joined #ruby
rahult has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
mistermocha has joined #ruby
n_blownapart has joined #ruby
finisherr has quit [Quit: finisherr]
finisherr has joined #ruby
metamp has quit [Ping timeout: 250 seconds]
<Psi-Jack> mwlang: Hmmm... Definitely considering this idea. Could tie it right in with the rest of things. Just wonder how I could make a sensu extension to initialize the worker as a threaded process or so, initially, and the event handler simply just push things to queue while the thread watches said queue.
mistermocha has quit [Ping timeout: 244 seconds]
rubie has joined #ruby
RegulationD has joined #ruby
RickHull has joined #ruby
<mwlang> Psi-Jack: not sure…I haven’t used EM in a while.
chouhoulis has quit [Read error: Connection reset by peer]
dimasg has joined #ruby
chouhoulis has joined #ruby
<mwlang> I just happened to remember RabbitMQ from that one project and it seemed to work well.
<Psi-Jack> Hehe. Well, it gives me ideas at the least. ;)
<Psi-Jack> Why make a queue, when one already exists? ;)
<mwlang> just fill ‘er up!
techsethi has quit [Quit: techsethi]
RegulationD has quit [Ping timeout: 240 seconds]
choke has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
rahult has joined #ruby
dimasg has quit [Ping timeout: 272 seconds]
choke has joined #ruby
<mwlang> my refactor attempt of that messy code from earlier: https://gist.github.com/mwlang/64b49551e3d27800e479
fedexo has quit [Ping timeout: 244 seconds]
j3r0 has quit [Ping timeout: 260 seconds]
oo_ has quit [Remote host closed the connection]
gilest has joined #ruby
dseitz has quit [Quit: later gator]
<Aeyrix> I just wrote JS
Swappticon has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<Aeyrix> like actual JS
<Aeyrix> no jQuery
<Aeyrix> give me an award please
radgeRayden_ has quit [Ping timeout: 265 seconds]
reset has quit [Quit: Leaving...]
kp666 has joined #ruby
* mwlang faxes Aeyrix a pizza
<Aeyrix> wew tbh
<Aeyrix> also
<Aeyrix> bingo written
<mwlang> Aeyrix: did you test it on IE6? :-)
<Aeyrix> I automatically redirect anyone using any version of IE to getfirefox.com
<Aeyrix> I literally don't even care.
howdoico1 has joined #ruby
Yzguy has quit [Quit: Zzz...]
<mwlang> man, that automatically kills more than half the bot crawlers hitting your site. how cruel!
ramfjord has joined #ruby
<mwlang> why any kiddie scripts choose to impersonate IE instead of FF or Chrome is beyond me.
rahult is now known as rahult_
rahult_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
baroquebobcat_ has joined #ruby
arescorpio has quit [Quit: Leaving.]
baroquebobcat_ has quit [Ping timeout: 245 seconds]
<Aeyrix> mwlang: I hide it behind CloudFlare anyway.
<Aeyrix> *shrugs*
<mwlang> good place to hide.
<Aeyrix> Why the hell is this taking "a few hours"
<Aeyrix> ;_;
<Aeyrix> mwlang: I love Cloudflare tbh
<Aeyrix> they've tanked some fierce DDoS
<Aeyrix> for free™
<mwlang> Aeyrix: same here. I have all my own stuff behind them, but can’t seem to convince a single customer to use ‘em too. They’re suspicious of “free security”
<Aeyrix> Heh.
opensource_ninja has quit [Remote host closed the connection]
webopsx has joined #ruby
<Aeyrix> They more than make a profit with their business / enterprise plans.
<Aeyrix> It's basically like insurance.
<Ox0dea> Aeyrix: ELI5 why tanking is still the best (only?) way to handle DDsoS.
webopsx has quit [Client Quit]
<mwlang> yeah. network ops who are too close to their own servers. :-p
<Aeyrix> oh boy
<Aeyrix> Ox0dea: Basically the way the Internet is built, there isn't much of another way.
<Ox0dea> ELI5 why that is so?
<Aeyrix> Because there's no way to stop people sending unwarranted letters to your postbox *until* it gets to your postbox.
gilest has left #ruby ["Leaving..."]
<Aeyrix> So your only option is security at the postbox.
<Aeyrix> You can't relay that decision across the globe's post services.
<Ox0dea> Because why?
mikecmpbll has quit [Quit: ciao.]
<Aeyrix> In reality: *shrugs*
<ZeeNoodleyGamer> because it just doesn't work that way, end of story
<ZeeNoodleyGamer> lol
<Aeyrix> My theory: Far too difficult to maintain a list of that sort.
<Ox0dea> ZeeNoodleyGamer: Get your fat-ass nick outta here.
<Aeyrix> You have to have a massive exemptions list.
<Aeyrix> "this IP cannot contact this IP"
<sevenseacat> thats a lot of extra burden to place on *every post service*
<Aeyrix> at every hop
<Aeyrix> at every router
<Aeyrix> for *every* IP
<ZeeNoodleyGamer> Ox0dea: what do you have against big nicks :(
<ZeeNoodleyGamer> also fine lets see
<Ox0dea> ZeeNoodleyGamer: They're jarring.
<Aeyrix> ^
<Aeyrix> tbh
opensource_ninja has joined #ruby
<Aeyrix> Ox0dea: I've written some theoretical papers on DDoS mitigation.
<ZeeNoodleyGamer> yeah well I don't own ZNG, otherwise I'd take it
<Aeyrix> But I'm no longer going for Ph.D. candidacy, so I discarded them.
<Ox0dea> Aeyrix: Could it not have been set up to require at most one additional hop to some sort of whitelisting server?
<Aeyrix> Sure, you can do that already.
mwlang has quit [Quit: mwlang]
<Aeyrix> DDoS mitigation systems outside (or on) your perimeter.
howdoico1 has quit [Ping timeout: 250 seconds]
<Aeyrix> Only problem is CPU processing power, and uplink size.
<Aeyrix> If you have 100Gbit of traffic hitting you, your 10Gbit pipe is going to be immediately saturated and it backs up the upstream.
<Aeyrix> (seriously)
<Aeyrix> If you hit Australia with around 400Gbit of traffic, you will gridlock the entire country.
<bnagy> you could do something at an AS level, but there's no real way to propagate that blocking info that wouldn't be thorny
<Aeyrix> Actually, it's less. It's about 100Gbit of strategic attacks.
<sevenseacat> fuck yeah australia.
<Aeyrix> You could gridlock Australia.
<bnagy> plus bgp updates are already kinda slow
<Aeyrix> And, by extension, really fuck up Singapore, Papua New Guinea, and parts of Texas.
ZeeNoodleyGamer is now known as ZNG
Gmi has quit [Quit: Leaving...]
<ZNG> there Ox0dea happy?
<Aeyrix> I've done a lot of research into mitigations and methods and stuff, I talk about it a lot.
<Aeyrix> I considered presenting at a security conference but imposter syndrome. :^)
casadei_ has quit [Remote host closed the connection]
<bnagy> if you're into it try one of the bsides or a single-track that's near you
<bnagy> tons of smaller cons now
<bnagy> arguably too many :/
jeadr has quit [Remote host closed the connection]
<Aeyrix> RuxMon is near me.
<Aeyrix> So's RuxCon, as I'm in Melbourne.
<bnagy> nice :) I <3 rux
<Aeyrix> The last one I went to had some demonstrable flaws in some of the talsk.
<Aeyrix> talks, as well.
<BraddPitt> is there a website that lists all upcoming ruby confs?
<bnagy> all talks have flaws.
jeadr has joined #ruby
towski_ has joined #ruby
<bnagy> imho the trick is to remember that it's very likely that there's >1 person in the room that knows more about the topic than the speaker
cornerma1 has joined #ruby
<bnagy> and also the speaker is often not dropping their very best stuff :P
<Aeyrix> That's why I refuse to talk about DDoS stuff. :^)
skydiver has quit [Ping timeout: 250 seconds]
devoldmx has joined #ruby
christiandsg has joined #ruby
skydiver has joined #ruby
araujo has quit [Quit: Leaving]
np0 has quit [Quit: leaving]
cornerman has quit [Ping timeout: 264 seconds]
cornerma1 is now known as cornerman
rahult has joined #ruby
arooni-mobile has quit [Ping timeout: 246 seconds]
Torrieri has quit [Ping timeout: 240 seconds]
Torrieri has joined #ruby
towski_ has quit [Remote host closed the connection]
pawnbox has joined #ruby
jackjackdripper has joined #ruby
jackjackdripper has quit [Client Quit]
klaas_ is now known as klaas
dseitz has joined #ruby
KensoDev has joined #ruby
pawnbox has quit [Remote host closed the connection]
arooni-mobile has joined #ruby
bronson has joined #ruby
pawnbox has joined #ruby
hydrozen has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
rubie has quit [Remote host closed the connection]
bronson has quit [Ping timeout: 252 seconds]
chrissonar has joined #ruby
riotjones has joined #ruby
astrobun_ has quit [Remote host closed the connection]
KensoDev has quit []
pawnbox has quit [Remote host closed the connection]
diegoviola has quit [Quit: WeeChat 1.2]
riotjones has quit [Ping timeout: 246 seconds]
mistermocha has joined #ruby
bronson has joined #ruby
pawnbox has joined #ruby
j4cknewt has quit [Remote host closed the connection]
Torrieri has quit [Quit: Be back later ...]
jpfuentes2 has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
mistermocha has quit [Ping timeout: 240 seconds]
pawnbox_ has joined #ruby
binaryplease1 has joined #ruby
oo_ has joined #ruby
msnyon has quit [Quit: Textual IRC Client: www.textualapp.com]
futilegames has joined #ruby
bronson has quit [Ping timeout: 260 seconds]
ICantCook has joined #ruby
dhjondoh has joined #ruby
djbkd has joined #ruby
pawnbox has quit [Ping timeout: 250 seconds]
grvgr has joined #ruby
futilegames has quit [Client Quit]
<tubbo> !guys
<tubbo> interesting
grvgr has quit [Quit: grvgr]
oo_ has quit [Remote host closed the connection]
grvgr has joined #ruby
<Ox0dea> O P S
<Ox0dea> P
<Ox0dea> S
<baweaver> Hm?
<Ox0dea> We're just being silly.
<baweaver> was looking to see if I missed a pattern.
jeadr has quit [Remote host closed the connection]
j3r0 has joined #ruby
choke has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<Ox0dea> Well, there's this:
<Ox0dea> >> ('OPS' * 2).bytes.map { |b| b - 64 }.reduce(:+)
<ruboto> Ox0dea # => 100 (https://eval.in/417956)
<baweaver> Aeyrix:
<Aeyrix> yoooo
<Aeyrix> Ox0dea: Meant to post that here - http://exploit.cat/rubybingo
<baweaver> ^^^^
<Aeyrix> You're featured. :^)
<Aeyrix> Oh you are in offtopic
<Aeyrix> lel
jeadr has joined #ruby
j3r0 has quit [Read error: Connection reset by peer]
<Ox0dea> 'lel'.gsub(/[^aeiou]/, &:pred)
oo_ has joined #ruby
<baweaver> >> 'lel'.gsub(/[^aeiou]/, &:pred)
<Aeyrix> NoMethodError: undefined method `pred' for "l":String
<ruboto> baweaver # => undefined method `pred' for "l":String (NoMethodError) ...check link for more (https://eval.in/417957)
<Aeyrix> :^)
<Ox0dea> Sad state of affairs, that.
<baweaver> previous?
dupek has joined #ruby
<dupek> hey
<baweaver> hi
<Aeyrix> ho
<Aeyrix> hi *
<Ox0dea> baweaver: Well, String has #succ...
<baweaver> lets go
<baweaver> it's off to work we go
<dupek> I already know a bit Python
<dupek> but I want to try another language
* Aeyrix [ bingoing intensifies ]
nscheurich has joined #ruby
<dupek> and cannt decide
<Ox0dea> Aeyrix: I was just gonna say.
<dupek> between Ruby or Go
christiandsg has quit [Remote host closed the connection]
<baweaver> Then go with Ruby, otherwise why ask in this channel
postmodern has quit [Quit: Leaving]
<Aeyrix> Oh man I need to add Go
<Aeyrix> to that thing
<Aeyrix> 23s
<Aeyrix> done
<baweaver> 10
<Ox0dea> 42
<tubbo> dupek: i say learn C
<baweaver> 13
<dupek> because Ruby got bad performance
<Aeyrix> Took me 17, damn.
<Aeyrix> kek
<baweaver> dupek: is that actually an issue?
astrobun_ has joined #ruby
<baweaver> or do you just think so?
<tubbo> i mean python sucks too for performance iirc
<dupek> I checked it
iliketur_ has joined #ruby
<Aeyrix> tubbo: Slightly less so than Ruby.
<baweaver> chances are you don't _need_ performance
<tubbo> meh
<Ox0dea> dupek: But does it *matter*?
<tubbo> dupek: if you're looking for the best performance, learn assembly
devoldmx has quit [Remote host closed the connection]
<Ox0dea> dupek: Are you writing code to improve science's understanding of protein folding?
<tubbo> can't get better than that
<dupek> no but if I want to write a game
<dupek> and it starts be best
<baweaver> What have you researched?
<Aeyrix> TECHNICALLY THERE
<Ox0dea> Aeyrix: "write a game" is pretty common.
<dupek> and after 3 years of adding new code
<dupek> it starts lagging
<Aeyrix> Ox0dea: heh
<dupek> for ppl with corei7
<Aeyrix> ok
<Ox0dea> dupek: Sounds like you've got your head in the clouds, bud.
<tubbo> dupek: don't write a game in ruby
<tubbo> or go
lsmola has joined #ruby
<Aeyrix> You can write a game in GO.
<Aeyrix> tbh
pawnbox has joined #ruby
<Aeyrix> But C++ is gonna be your winner.
<Aeyrix> You get nice engines (for free™)
<tubbo> if you want to write games, like actual video games, you need to use an engine of some kind
<baweaver> How about you just go out and do it.
<Aeyrix> Unity, Unreal.
<tubbo> a lot of them are in C++ or C# or JS
pawnbox_ has quit [Read error: Connection reset by peer]
<tubbo> dupek: this is a *really* fun framework to play around with if you like 2D http://phaser.io/
pawnbox_ has joined #ruby
<Ox0dea> tubbo: http://impactjs.com/
<dupek> oh I know it
<tubbo> learn javascript because all these other langs are going to shit anyway and JS is still gonna be around :)
<dupek> but I hate javascript
<Ox0dea> ^
<Ox0dea> Too bad.
<tubbo> Ox0dea: "Buy now for only $99" eff that ;)
<tubbo> dupek: why do you hate javascript?
<Ox0dea> Because somebody told him he should.
TomyLobo has joined #ruby
<dopie> tubbo, JS is a bit confusing to me at times but getting used to it with using it and rails
howdoico1 has joined #ruby
<nscheurich> I've had some good times with Impact. +1
<dupek> javascript is strange
<Ox0dea> nscheurich: How about Haxe?
<tubbo> dupek: so is Go. totally different paradigm from what you're used to.
<nscheurich> Ox0dea: Never tried it.
<dupek> go is strange too
<Ox0dea> tubbo: Could you clarify that? Go is intentionally "boring".
<dupek> personally I like C
<dupek> and C++
<tubbo> Ox0dea: that's the point, if you're used to higher-level languages you have to think about things a little differently when working with Go
manila90 has joined #ruby
Motoservo has quit [Quit: Over & out.]
<tubbo> dupek: now you're talking performance.
<Ox0dea> I think he's just mentioning the names of languages.
<tubbo> and if you want to write games? C/C++/C# is your friend
dhjondoh has quit [Quit: dhjondoh]
dhjondoh has joined #ruby
NeverDie has quit [Quit: I'm off to sleep. ZZZzzz…]
<tubbo> Ox0dea: fwiw i think Go is basically "a better C", it's the "C" for the distributed future
<ytti> i disagree
<ytti> rust is the new c and thew new c++
<tubbo> but i still find myself thinking "hmm...how the hell am i gonna model this"
pawnbox has quit [Ping timeout: 250 seconds]
<ytti> go has overhead
<ytti> it's too high level to replace c
<ytti> it has stop-the-world GC
<nscheurich> If you're looking at games, I'd highly recommend downloading Unity and having a go. Once you've gotten your head around some of the game design patterns you shouldn't have much trouble implementing them in any language.
<ytti> it has runtime
<tubbo> ytti: that's probably true, i'm talking more about the language syntax and not the semantics of how it's being run
<RickHull> any network server that you might be tempted to write in C, should probably be written in go
<dupek> Unity isn't Linux friendly
<ytti> one of my older friends is one of the orignal unity developers, recently moved to san fran from helsinki
<tubbo> ytti: tbh i haven't had a chance to look at rust much. do you like using it?
<nscheurich> Ah, yeah, this is true.
<RickHull> any system software that you might be tempted to write in C/C++ should probably be written in Rust
<tubbo> dupek: neither is game development.
<tubbo> dupek: have fun with visual studio ;)
riotjones has joined #ruby
<nscheurich> It does okay with Wine, but I wouldn't recommend it for serious work.
<Aeyrix> tubbo: Unreal fully supports Linux
<ytti> tubbo, i've not done much with it, it's much more complex than go, but not insanely like c++
<tubbo> RickHull: i'm just gonna write my own language that writes all these programs for me
<tubbo> all i have to do is get one of them fancy new intel rodent chips
<ytti> tubbo, essentially it's safe c++, which tries to move responsibilities to the compiler from the programmer
<tubbo> enough rats will create a better system than what we have now
<RickHull> languages can't write programs or melt steel beams
<ytti> tubbo, and deliver as much compile time safety guarantees at possible
<ytti> tubbo, without any runtime or GC
<Ox0dea> RickHull: See Lisp.
<ytti> i'm amazed C is still alive
<Ox0dea> Then you've not got your thinking cap on.
<tubbo> RickHull: the future is a language for design, a language that you give to AIs that write the programs for you
<Ox0dea> C is immortal, well and truly.
<ytti> it's just too demanding langauge to produce working code in
<RickHull> i agree that programs can write programs
<RickHull> languages not so much
choke has joined #ruby
<tubbo> ytti: it's still the thing everything is eventually built on
howdoico1 has quit [Ping timeout: 260 seconds]
<ytti> i see horrible bugs every day in junos, ios and ios-xr
aganov has joined #ruby
<ytti> which i feel can completely be blamed on C
<tubbo> i mean, C started out basically as a "DSL" for ASM
<Ox0dea> ytti: That's nonsense.
<tubbo> for cross-platform development
<Aeyrix> http://exploit.cat/rubybingo -- woohoo another layer added thanks to y'all
<Aeyrix> :^)
<ytti> C is still, imho, macroassembler
<tubbo> and in many ways, the best way to write C is to be true to its original spirit of being a DSL for ASM
choke has quit [Client Quit]
Musashi007 has joined #ruby
eminencehc has quit [Remote host closed the connection]
choke has joined #ruby
<Ox0dea> It's true that children should not be given katana with which to run around, but neither should adults be forced to use safety scissors.
ofdtrinity has joined #ruby
manila90 has quit [Ping timeout: 272 seconds]
ta has quit [Remote host closed the connection]
j_mcnally has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
Pupp3tm4st3r has joined #ruby
dupek has quit [Remote host closed the connection]
AlexAltea has joined #ruby
j_mcnally has joined #ruby
j_mcnally has quit [Max SendQ exceeded]
shoutsid has joined #ruby
j_mcnally has joined #ruby
grvgr has quit [Quit: grvgr]
Pupp3tm4st3r has quit [Quit: Leaving...]
nscheurich has quit [Ping timeout: 252 seconds]
arup_r has joined #ruby
codecop has joined #ruby
dopamean_ has quit [Ping timeout: 244 seconds]
<ICantCook> Ruby newbie here. I am getting 'undefined method `keys' for #<Array: > on line 12 of this: http://paste.ofcode.org/7dLZpriLhhecj6M9VAWmKD
jenrzzz has joined #ruby
<ICantCook> using ruby 1.9.3p448
<ICantCook> what am I doing wrong?
manila90 has joined #ruby
dimasg has joined #ruby
Pupp3tm4st3r has joined #ruby
kellray_ has joined #ruby
kellray_ has left #ruby [#ruby]
<Aeyrix> ICantCook: Arrays don't have keys.
pawnbox_ has quit [Ping timeout: 250 seconds]
binaryplease1 has quit [Ping timeout: 252 seconds]
<ICantCook> Aeyrix: so this stackoverflow example is wrong: http://stackoverflow.com/questions/29442523/seeding-a-dashing-list-from-an-external-json-file (the Updated Job post in the answer)?
j4cknewt has joined #ruby
pawnbox has joined #ruby
User458764 has joined #ruby
rubie has joined #ruby
<miah> no
<miah> its an array of json objects
hs366 has joined #ruby
<miah> the json objects themselves are similar to hashes which do have keys
dimasg has quit [Ping timeout: 255 seconds]
TheNet has quit [Remote host closed the connection]
ohaibbq has joined #ruby
hmsimha_ has joined #ruby
opensource_ninja has quit [Quit: opensource_ninja]
stan has joined #ruby
<ICantCook> miah: Ah, so if I don't have json objects in list.json, I'll get that error?
<Ox0dea> ?jsonobject
<ruboto> there is no such thing as a JSON object. You either have a String containing serialized JSON, or you have ruby objects (usually Hashes/Arrays/Strings). Which is it?
saddad has quit [Ping timeout: 240 seconds]
hs366 has quit [Quit: Leaving]
<ICantCook> lol conflicting information
<miah> well
<miah> kinda
BloodyHistory has joined #ruby
<miah> Ox0dea is right
shoutsid has quit [Remote host closed the connection]
hs366 has joined #ruby
arooni-mobile has quit [Ping timeout: 244 seconds]
shoutsid has joined #ruby
tkuchiki has quit [Remote host closed the connection]
<miah> >> require 'json'; {a: 1, b: 2}.to_json.class
<ruboto> miah # => String (https://eval.in/417980)
UncleDozer has joined #ruby
dhjondoh has quit [Ping timeout: 260 seconds]
AlexRussia_ has joined #ruby
UncleDozer has left #ruby ["WeeChat 1.3-rc1"]
Ropeney has quit [Quit: Textual IRC Client: www.textualapp.com]
djbkd has quit [Remote host closed the connection]
manila90 has quit [Ping timeout: 250 seconds]
manila90 has joined #ruby
<miah> when you parse existing json files using 'JSON.parse' they are represented by hashes
<Ox0dea> No, that's not quite true.
Ropeney has joined #ruby
<Ox0dea> ICantCook's issue is that he has an Array of Hashes.
RobertBirnie has joined #ruby
<miah> no?
yardenbar has joined #ruby
dhjondoh has joined #ruby
oo_ has quit [Quit: Leaving...]
RegulationD has joined #ruby
<ElSif> what do you mean `are represented as hashes`? the outer JSON object is turned into a ruby Hash but any internal data structures pointed to by keys should be preserved, or am i misunderstanding?
<Ox0dea> >> require 'json'; JSON.parse '[{"a": 1}, {"b": 2}]'
<ruboto> Ox0dea # => [{"a"=>1}, {"b"=>2}] (https://eval.in/417982)
oo_ has joined #ruby
<Ox0dea> Arrays are valid JSON objects.
<miah> ah i didnt know that
mistermocha has joined #ruby
<ElSif> and that even :D
ruby-lang375 has joined #ruby
<miah> ElSif: you're right, i didnt say anything about internal structure
<ElSif> i just got here, ignore me >.>
TheNet has joined #ruby
ruby-lang375 has quit [Client Quit]
<miah> its fine, im allowed to be wrong
<miah> =)
<Ox0dea> :+1: for humility.
TvL2386 has joined #ruby
shoutsid has quit [Ping timeout: 244 seconds]
tkuchiki has joined #ruby
oo_ has quit [Remote host closed the connection]
oo_ has joined #ruby
<ElSif> >> require 'json'; JSON.parse("''")
<ruboto> ElSif # => 757: unexpected token at '''' (JSON::ParserError) ...check link for more (https://eval.in/417984)
<ElSif> aww :(
RegulationD has quit [Ping timeout: 264 seconds]
<ICantCook> Okay. So far I've learned: 1) You're allowed to 'lol' in here, unlike #python. 2) There's no such thing as json object. 3) Arrays have no 'keys' method, so that stackoverflow post is incorrect.
<Ox0dea> ElSif: JSON strings must be double-quoted.
ruurd has joined #ruby
<ElSif> ah
<ElSif> >> require 'json'; JSON.parse("\"\"")
<ruboto> ElSif # => 757: unexpected token at '""' (JSON::ParserError) ...check link for more (https://eval.in/417985)
<ElSif> aww
<ElSif> >> require 'json'; JSON.parse('""')
<ruboto> ElSif # => 757: unexpected token at '""' (JSON::ParserError) ...check link for more (https://eval.in/417986)
<ElSif> lol ok
<ElSif> blanks string no worky?
<Ox0dea> ElSif: The outermost object must be a collection, it seems.
<ElSif> interesting
manila90 has quit [Ping timeout: 250 seconds]
mistermocha has quit [Ping timeout: 260 seconds]
Kallis has quit [Read error: Connection reset by peer]
ofdtrinity has quit [Quit: Leaving]
oo_ has quit [Ping timeout: 246 seconds]
dhjondoh has quit [Quit: dhjondoh]
dhjondoh has joined #ruby
j_mcnally has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
djbkd has joined #ruby
Encapsulation has quit [Ping timeout: 245 seconds]
<Ox0dea> ICantCook: That SO post is not incorrect. The poster's JSON gets parsed to a Hash, whereas yours is being parsed into an Array.
r0x0rZ has joined #ruby
rahult has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<jtirila> >> require 'json'; JSON.parse("{\"foo\": \"bar\"}").keys
<ruboto> jtirila # => ["foo"] (https://eval.in/417988)
charliesome has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
dhjondoh has quit [Client Quit]
<jtirila> like that... but if it's an array, well it's an array and doesn't have keys
Fen_ has joined #ruby
<ICantCook> Ox0dea: Thanks. Changed my json file and now it's working.
<Ox0dea> Yay!
hd1 has joined #ruby
<miah> awesome
Fen_ has quit [Client Quit]
hd1 has left #ruby [#ruby]
Fen_ has joined #ruby
hd1 has joined #ruby
<hd1> openbsd rvm compiled ruby-2.2.2, giving me "can't load library 'libruby.so.2.20'"
<hd1> what gives?
_ht has joined #ruby
Fen_ has quit [Client Quit]
<hd1> and it's exists
Musashi007 has quit [Quit: Musashi007]
dhjondoh has joined #ruby
Musashi007 has joined #ruby
ruby-lang759 has joined #ruby
ruurd has quit [Max SendQ exceeded]
ramfjord has quit [Ping timeout: 240 seconds]
TomyLobo has quit [Ping timeout: 245 seconds]
JoshGlzBrk has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
ruurd has joined #ruby
JoshGlzBrk has joined #ruby
<ekleog> Hi there! I seem to remember having seen some weird hack so that var_name = SomeClass.new; var_name.varname returns "var_name" in ruby. Have I dreamt?
charliesome has joined #ruby
TheNet has quit [Remote host closed the connection]
Ox0dea has quit [Read error: Connection reset by peer]
techsethi has joined #ruby
Ox0dea has joined #ruby
manila90 has joined #ruby
christiandsg has joined #ruby
<Ox0dea> >> (Foo = Class.new).name # ekleog
<ruboto> Ox0dea # => "Foo" (https://eval.in/417994)
hd1 has left #ruby [#ruby]
<Ox0dea> Is that what you had in mind?
<Ox0dea> You can't get a local variable's identifier from the variable itself.
TheNet has joined #ruby
devoldmx has joined #ruby
Pupp3tm4st3r has quit [Remote host closed the connection]
Pupp3tm4st3r has joined #ruby
baweaver has quit [Remote host closed the connection]
<Ox0dea> After `foo = 10`, `foo` is, for all intensive porpoises, synonymous with 10, and of course Fixnum doesn't have a method which returns "foo".
<ekleog> >> (Bar = (Foo = Class.new)).name
<ruboto> ekleog # => "Foo" (https://eval.in/417999)
<ekleog> Oh, fail :'(
<ekleog> Hoped for a second I could use that to return classes instead of variables and use that
ruurd has quit [Max SendQ exceeded]
_blizzy_ has joined #ruby
pawnbox has quit [Ping timeout: 272 seconds]
* ekleog back in a second, looking at how Class does it...
<Ox0dea> You're definitely not doing $thing the right way.
howdoi has joined #ruby
Pupp3tm4st3r has quit [Remote host closed the connection]
<Ox0dea> If you need a dynamic mapping from names to values, you should be using a Hash.
ruurd has joined #ruby
christiandsg has quit [Ping timeout: 265 seconds]
pawnbox has joined #ruby
devoldmx has quit [Ping timeout: 244 seconds]
solars has joined #ruby
<ekleog> Basically I'm writing a DSL, and ideally var = some_function "args" would add "var": some_other_function "args" in some Hash -- cleaner than var, stuff["var"] = some_function "args" for the end user
Pupp3tm4st3r has joined #ruby
ruurd has quit [Max SendQ exceeded]
<ekleog> Ugh, Class is a builtin :(
RobertBirnie has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<Aeyrix> The fact you expected anything else bewilders me.
_blizzy_ has quit [Read error: Connection reset by peer]
ruby-lang759 has left #ruby [#ruby]
icarus has joined #ruby
arup_r has quit []
arup_r has joined #ruby
<rehat> anyone bored and want to look over my code that I translated from python to ruby? I'm practicing ruby by converting snippets in this book Collective Intelligence and my code seems harder to read than the python snippets lol :(
<eam> why doesn't Binding have local_variables?
_blizzy_ has joined #ruby
<Ox0dea> eam: It does?
lele is now known as Guest24
TheNet has quit [Quit: Leaving...]
<eam> >> binding.methods.grep /local_/
<ruboto> eam # => [:local_variables, :local_variable_get, :local_variable_set, :local_variable_defined?] (https://eval.in/418006)
<eam> whoooa
<eam> why don't I have it
<Ox0dea> 3spooky5me
nkts has quit [Remote host closed the connection]
<eam> it's not in 2.1.5
<eam> it's super new
<eam> :(
Guest24 is now known as lele
<Ox0dea> ekleog: You'll need to use something like binding_of_caller, or else parse the call site to extract the LHS.
<eam> anyway I just wrote the thing ekleog is after
kr3ssh has joined #ruby
toretore has quit [Quit: This computer has gone to sleep]
<Ox0dea> I wanna see.
<eam> >> foobarbaz = Class.new; foobarbaz.instance_eval { def varname(b); b.local_variables.select {|x| b.eval(x.to_s).object_id == self.object_id}; end; }; foobarbaz.varname(binding)
<ruboto> eam # => [:foobarbaz] (https://eval.in/418013)
<eam> lawl
BloodyHistory has quit [Quit: Textual IRC Client: www.textualapp.com]
rubie has quit [Remote host closed the connection]
<Ox0dea> I see.
<miah> wow
<eam> I wonder if there's a way to not pass the binding - I suspect not?
<Ox0dea> Not without something like binding_of_caller.
<eam> does ruby's caller() expose bindings?
oo_ has joined #ruby
choke has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
Guest52434 has joined #ruby
Guest52434 has quit [Client Quit]
<Ox0dea> No, #caller returns an array of strings. :(
<eam> lame
<Ox0dea> There's #caller_locations, but that isn't of much help in this scenario.
ruurd has joined #ruby
yasha0x80 has joined #ruby
Guest64059 has joined #ruby
Rico has left #ruby ["Quitte"]
ta has joined #ruby
<eam> #holla_locations
rubie has joined #ruby
ta has quit [Remote host closed the connection]
nveselinov has left #ruby [#ruby]
dumdedum has joined #ruby
ta has joined #ruby
leat has joined #ruby
leat has quit [Remote host closed the connection]
<eam> >> x = methods.sample; send x, *Array.new(method(x).arity.abs) { ObjectSpace.each_object.to_a.sample }
<ruboto> eam # => undefined method `GEM_PRELUDE_SUCKAGE' for class `Object' (NameError) ...check link for more (https://eval.in/418014)
ruurd has quit [Max SendQ exceeded]
<Ox0dea> Ha.
<eam> whoooa
leat has joined #ruby
<Ox0dea> That's great.
<eam> what the hell was that
<ekleog> Whew
<Ox0dea> Well, we'll never know what `x` got there.
lxsameer has joined #ruby
ruurd has joined #ruby
Pupp3tm4st3r has quit [Remote host closed the connection]
<eam> >> x = methods.sample; send x, *Array.new(method(x).arity.abs) { ObjectSpace.each_object.to_a.sample }
<ruboto> eam # => #<Enumerator: main:10.4.2> (https://eval.in/418015)
<Ox0dea> I think you're onto something here.
<Ox0dea> ekleog: Still futzing?
chipotle has joined #ruby
<ekleog> Yeah
<Ox0dea> Are you going to use binding_of_caller?
<ekleog> The ruby source code search gave nothing, it looks like it's hacked right into the C code
oo_ has quit [Remote host closed the connection]
oo_ has joined #ruby
<Ox0dea> What're you on about?
oo_ has quit [Remote host closed the connection]
<Ox0dea> You've been advised of your options.
<ekleog> I think I'm going to use eam's Binding-based solution: it is (presumably?) more portable; and I can have the end user call a function at the end of the file sending "binding" so I could backtrack it :)
<Ox0dea> That's not very friendly.
<ekleog> (or the last one if I understand anything in it)
oo_ has joined #ruby
amclain has quit [Quit: Leaving]
dmolina has joined #ruby
renderful has joined #ruby
Macaveli has joined #ruby
Pupp3tm4st3r has joined #ruby
<eam> my solution is ridiculous and expensive; I don't recommend it
rahult has joined #ruby
<Ox0dea> My solution breaks if the user doesn't call the method on the same line as the assignment.
dionysus69 has joined #ruby
<Ox0dea> (I don't recommend it.)
<eam> File.open $0, ...
krz has joined #ruby
cfloare has joined #ruby
<eam> I found a perl script once that parsed itself. I think the author was attempting reflection
* ekleog bangs head onto wall, realizing once again ruby is interpreted
leat has quit [Remote host closed the connection]
leat has joined #ruby
<ekleog> Ox0dea: Going to have a look at your solution, and hope you don't go to hell for this :)
<eam> it opened $0 and looked for a line defining a variable, then grabbed the value ala /foo = (.*)/
TvL2386 has quit [Ping timeout: 252 seconds]
renderful has quit [Ping timeout: 245 seconds]
manila90 has quit [Ping timeout: 264 seconds]
avelldiroll has quit [Quit: WeeChat 0.3.8]
<ekleog> Oh, just thought the variable assignments could be scattered among several files... Well, guess I'll just require an explicit name to be given in each function call, and come back later to this issue -- but after some thought variable name may not be unique, when variables are defined inside functions...
jgt1 has joined #ruby
astrobun_ has quit [Remote host closed the connection]
* ekleog probably just tried to do something impossible
<ekleog> (and no, I'm not only looking for unique names, but for human-"guessable" unique names)
<Ox0dea> "Impossible" is surely too strong, but you're definitely being a little crazy.
iliketur_ has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<Ox0dea> Also, no such thing as functions in Ruby. :P
<Ox0dea> Aeyrix: ^ Bingo-worthy?
techsethi has quit [Quit: techsethi]
pawnbox has quit [Ping timeout: 272 seconds]
<Aeyrix> Which bit?
<Ox0dea> "No functions."
<Aeyrix> Does that come up often?
<Aeyrix> functions vs methods
<Ox0dea> Reasonably?
<Ox0dea> Not often enough, I suppose.
<Aeyrix> It's more common than the video games one
<Aeyrix> i'll swap 'em out
<Aeyrix> heading out from work in a sec
<Ox0dea> Mind the dropbears.
<Aeyrix> cheers fam
ruurd has quit [Quit: ZZZzzz…]
yfeldblum has quit [Ping timeout: 244 seconds]
<Ox0dea> ekleog: The "solution" I proposed would work across files.
<Ox0dea> __FILE__ != $0
<ekleog> But would require the top part to be present at the top of each file, isn't it? If so I'd rather impose a call to a method sending binding at the end of each file / function :)
Meow-J has quit [Quit: Connection closed for inactivity]
fedexo has joined #ruby
pawnbox has joined #ruby
[k- has joined #ruby
<Ox0dea> ekleog: Do you not intend for users to `require` your thing?
roolo has quit [Remote host closed the connection]
Guest64059 has quit [Quit: leaving]
<[k-> Ox0dea!
TvL2386 has joined #ruby
<Ox0dea> [k--k]!
_blizzy_ has quit [Ping timeout: 240 seconds]
<[k-> o_O
dionysus69 has quit [Quit: dionysus69]
astrobun_ has joined #ruby
<Ox0dea> Palindromes happen.
blackmesa has joined #ruby
<ekleog> Well, I think I don't understand how '__FILE__' works: if in main.rb I require my_file.rb and in both main.rb and my_file.rb I include my_gem (containing __FILE__), in main.rb calling a function from my_gem using __FILE__ will let it equal to main.rb, and in my_file.rb to my_file.rb? How would it do that?
dionysus69 has joined #ruby
<[k-> Ox0deaaed0xO
<[k-> oh well, doesnt look as nice
<Ox0dea> Not in the least.
ohaibbq has quit [Quit: Leaving...]
<[k-> reversing words is an expensive operation
<[k-> O(n)!
<Ox0dea> ekleog: __FILE__ will be whichever file is "active" when the block passed to Foo is used in the call to #instance_eval.
<apeiros> [k-: better O(n)! than O(n!) !
<[k-> true, that would be horrible
<Ox0dea> [k-: We've been here. Isn't it O(~0.5n)?
Musashi007 has quit [Quit: Musashi007]
<[k-> why would it be 0.5
<apeiros> O(0.5n) is still O(n)
<Ox0dea> Because you need only perform at most 0.5n swaps?
<Ox0dea> Not where we're going!
<apeiros> you're leaving reality? :)
<[k-> I meant for my brain, because i do O(n)
<Ox0dea> apeiros: Pedantically speaking, the coefficient musn't *necessarily* be discarded.
<ekleog> How do you count operations? Is a swap a "unitary" operation?
<apeiros> Ox0dea: um, yes, it is discarded. it's not O() otherwise.
<[k-> you swap the first and the last element
<[k-> and then the second and second last
techsethi has joined #ruby
<apeiros> you can give a precise formula, sure.
DLSteve has joined #ruby
<[k-> and so on, so you do only half the iteration
<ekleog> Swap is usually implemented in 3 operations, so...
<Ox0dea> apeiros: And which Greek letter do we use for that representation?
<ekleog> :p
<apeiros> Ox0dea: iirc none
<apeiros> the greek letters are for the limits
terlar has joined #ruby
ICantCook has quit [Quit: Leaving]
<apeiros> and/or approximations
<[k-> ;ςερτυθιοπασδφγηξκλζχψωβνμ!
avelldiroll has joined #ruby
<ekleog> Ox0dea: In France it would be T_n ~ coeff * n ; where T_n would be defined as the time necessary for the function to complete ; don't know whether it's international though
<[k-> time is small t!
<[k-> how dare you not obey convention!
<ekleog> Not in the french computer courses I had unfortunately ^^'
<apeiros> oh, s/approximation/asymptote/
Encapsulation has joined #ruby
* [k- starts listing all the greek letters he knows
<[k-> π = pi
<[k-> yay!
joel2 has joined #ruby
choke has joined #ruby
sdwrage has quit [Quit: This computer has gone to sleep]
ruurd has joined #ruby
<[k-> α,β = root θ = temperature σ = stress τ = strain η = refractive index λ = wave length ε = set(?)
<[k-> oops
<[k-> strain is ε
Iskarlar has joined #ruby
<zenspider> how surreal...
fedexo has quit [Ping timeout: 244 seconds]
devbug_ has joined #ruby
ruurd has quit [Client Quit]
<Ox0dea> Church numerals > surreals.
BTRE has quit [Quit: Leaving]
<Ox0dea> Can the rationals be Church-encoded?
shoutsid has joined #ruby
<Ox0dea> Fractions, to clarify.
livathinos has joined #ruby
BTRE has joined #ruby
ndrei has quit [Ping timeout: 250 seconds]
kr3ssh has quit [Ping timeout: 256 seconds]
duncannz has joined #ruby
devbug has quit [Ping timeout: 250 seconds]
howdoico1 has joined #ruby
Rico has joined #ruby
<Rico> hello
<Rico> I'm looking for ruby minimum version to use rails v 3.2.13
<apeiros> probably 1.8.7
<[k-> why not maximum
<apeiros> why minimal?
<Rico> because one of my clients is telling me that he's using rails 3.2.13 with ruby 1.8.7
Ropeney has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<Rico> and when I do a "gem install rails v=3.2.13" with ruby 1.8.7, I get an error
<sevenseacat> because thats not the right syntax for starters
blackmesa has quit [Ping timeout: 272 seconds]
<Rico> sevenseacat: can you tell me more ?
<sevenseacat> you want gem install rails -v 3.2.13
<Rico> yes
<[k-> so strange, i have never seen v=(...)
<Rico> ah ok
<Rico> let me try
devbug has joined #ruby
howdoico1 has quit [Ping timeout: 246 seconds]
joel2 has quit [Quit: WeeChat 1.2]
Iskarlar has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
devbug_ has quit [Ping timeout: 250 seconds]
anisha has joined #ruby
<Rico> sevenseacat, apeiros, [k- : http://pastebin.com/SmLexH4Z
<ruboto> Rico, we in #ruby do not like pastebin.com, I reposted your paste to gist for you: https://gist.github.com/1269299c0baea8376656
<ruboto> pastebin.com loads slowly for most, has ads which are distracting and has terrible formatting.
<Rico> ok ok
<Aeyrix> Heh
<sevenseacat> you're missing your ruby headers.
<sevenseacat> how did you install ruby?
<Rico> yum install
<Aeyrix> Dhaivismqnfibp
<sevenseacat> :(
<Aeyrix> HOW DID I FORGET THAT
<Aeyrix> IN BINGO
<sevenseacat> there will be a header package somewhere you need to install as well
<Rico> ok
<Ox0dea> Rico: ruby-devel.
<sevenseacat> try ruby-devel
<sevenseacat> yeah :)
<Rico> Ox0dea: of course
<Rico> :)
<Ox0dea> ~ $ gem spec rails -rv 3.2.13 | grep ruby_v -A4 | tail -1
<Ox0dea> version: 1.8.7
joel__ has joined #ruby
<Ox0dea> Might come in handy down the line.
<Rico> thanks Ox0dea
<Ox0dea> Sure thing.
<Aeyrix> Filthy golf
<Ox0dea> Note well that some gems don't specify the minimum required Ruby version, though. :/
* sevenseacat checks it off
<Rico> should I uninstall old rails version before installing new one ?
devoldmx has joined #ruby
<Rico> (using gem)
<Aeyrix> sevenseacat: I'm gonna add a progress system to it lmao
<Ox0dea> Aeyrix: Make sure it works on mobile.
<Aeyrix> It'll be JS based.
<Aeyrix> Just cookies
<Aeyrix> No db
<Ox0dea> Does the sign in my yard say "dead LocalStorage"?!
<Aeyrix> Yes.
skade has joined #ruby
krz has quit [Read error: Connection reset by peer]
christiandsg has joined #ruby
oo_ has quit [Remote host closed the connection]
<Rico> thanks all, seems to work
<Ox0dea> Famous last words.
devbug_ has joined #ruby
oo_ has joined #ruby
devoldmx has quit [Ping timeout: 250 seconds]
dopamean_ has joined #ruby
last_staff has joined #ruby
pawnbox has quit [Ping timeout: 252 seconds]
<Rico> Ox0dea: gem spec rails -v 3.2.13 | grep required_ruby_version -A 10 | grep version works for me
devbug has quit [Ping timeout: 260 seconds]
joel__ has quit [Quit: Lost terminal]
christiandsg has quit [Ping timeout: 265 seconds]
joel has joined #ruby
joel is now known as Guest67238
DLSteve has quit [Read error: Connection reset by peer]
<Ox0dea> Rico: The first part only works because you have it installed locally; you'd need the --remote flag for any other version.
<Rico> ok
<Ox0dea> >> ['required_ruby_version', 'ruby_v'].map(&:size)
<ruboto> Ox0dea # => [21, 6] (https://eval.in/418039)
oo_ has quit [Ping timeout: 244 seconds]
<Ox0dea> >> 4 < 10
<ruboto> Ox0dea # => true (https://eval.in/418040)
rubie has quit [Remote host closed the connection]
<Rico> Ox0dea: -rv returns me "ERROR: Unknown gem 'rails'"
araujo has joined #ruby
<Ox0dea> Yeah, there's no such gem by that name.
joonty has joined #ruby
Cust0sLim3n has quit [Ping timeout: 240 seconds]
<zenspider> You can specify a field straight up
<zenspider> gem spec rails required_ruby_version
<zenspider> you guys should try looking at the --help output
nifoc has quit [Ping timeout: 264 seconds]
<Ox0dea> Derp.
<adaedra> you mean READING DOCUMENTATION?
<adaedra> Who does that?
krz has joined #ruby
nifoc has joined #ruby
<zenspider> old guys like me, I guess
ishahnaz has joined #ruby
linuxboytoo has quit [Remote host closed the connection]
bumbar_ has joined #ruby
bumbar_ has quit [Changing host]
bumbar_ has joined #ruby
linuxboytoo has joined #ruby
pawnbox has joined #ruby
jeadr has quit [Remote host closed the connection]
Iskarlar has joined #ruby
<ekleog> Hmmm... Is there a way to convert a code block to a lambda? Stupid example, but let's say I'd like to make a my_lambda function that takes a code block and returns the same "function" as a lambda...?
rahult has quit [Quit: Back to the world of zombies]
jeadr has joined #ruby
ruurd has joined #ruby
<Ox0dea> ekleog: Method#to_proc is a thing.
<Ox0dea> >> f = 2.method(:+).to_proc; f.call(1)
<ruboto> Ox0dea # => 3 (https://eval.in/418047)
arta82 has joined #ruby
yasha0x80 has quit [Quit: Lost terminal]
linuxboytoo has quit [Ping timeout: 246 seconds]
sinkensabe has joined #ruby
<apeiros> ekleog: Kernel#proc does that
<apeiros> or if you actually want a lambda, Kernel#lambda
Cust0sLim3n has joined #ruby
joshmyers has joined #ruby
thermatix has joined #ruby
<apeiros> and you can convert the block argument passed to a method to a lambda using &
<apeiros> def foo(&block); p block.class; end
eGGsha has joined #ruby
pawnbox has quit [Remote host closed the connection]
michael_mbp has quit [Excess Flood]
radgeRayden_ has joined #ruby
<ekleog> Oh, just forgot to mention the block should be optional :/ (so AFAICT I have no item to call to_proc on?)
nuttermb has joined #ruby
ruurd has quit [Quit: ZZZzzz…]
djbkd has quit [Remote host closed the connection]
<ekleog> apeiros: I get a warning when doing def foo; lambda.call; end; foo{"bar"} ... ? ("tried to create a Proc object without a block")
chthon has joined #ruby
michael_mbp has joined #ruby
<apeiros> ekleog: yeah, that's not what I said
<apeiros> 10:11 apeiros: def foo(&block); p block.class; end
thermatix has quit [Ping timeout: 244 seconds]
<apeiros> and if you call lambda, you have to actually pass it a block. and that makes no sense if you already "captured the block in a variable" (read: if you *already have* a lambda)
<ekleog> Oh, with s/lambda/proc/ it does appear to work, looks good :)
[k- has quit [Ping timeout: 272 seconds]
baweaver has joined #ruby
Guest32 has joined #ruby
jeadr has quit [Remote host closed the connection]
<yorickpeterse> morning
<ekleog> apeiros: It looks like I cannot define a default value for &block using this syntax ("syntax error, unexpected '=', expecting ')'")
charliesome has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<ekleog> morning :)
joshmyers has quit [Read error: Connection reset by peer]
oo_ has joined #ruby
jeadr has joined #ruby
mutuma has joined #ruby
shoutsid has quit []
mutuma is now known as Pathfinder
krz has quit [Read error: Connection reset by peer]
<ekleog> I'm not dreaming, this works? (I don't understand why, though...)
<ekleog> >> def foo; proc.call; end; foo{"a"}
<ruboto> ekleog # => "a" (https://eval.in/418048)
<adaedra> hi yorickpeterse
<adaedra> >> def foo; yield; end; foo { 'a' }
<ruboto> adaedra # => "a" (https://eval.in/418049)
baweaver has quit [Ping timeout: 246 seconds]
<Ox0dea> ekleog: Proc.new and Kernel#proc, when not given an explicit block, use the block passed to the surrounding method.
mistermocha has joined #ruby
Musashi007 has joined #ruby
senayar has joined #ruby
<ekleog> >> def foo; proc; end; foo{"a"}.call # adaedra: More near what I'm trying to do ;)
<ruboto> ekleog # => "a" (https://eval.in/418050)
<ekleog> Ox0dea: Great :D
<Ox0dea> >> def foo; Proc.new.parameters end; foo { |a, b, c| }
<ruboto> Ox0dea # => [[:opt, :a], [:opt, :b], [:opt, :c]] (https://eval.in/418051)
<Ox0dea> It's pretty handy now and again.
<adaedra> ekleog: U see
<adaedra> s/U/I/
<adaedra> Ut;s nirning
<adaedra> grmbl
<adaedra> It's morning*
gregf has quit [Quit: WeeChat 1.1.1]
<ekleog> Coffee?
<ekleog> :p
choke has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
joshmyers has joined #ruby
maasha has joined #ruby
<adaedra> Never
<maasha> I have a method: def size; @node_id; end that rubocop doesn't like -> trivial accessor warning - should be resolved with attr_reader. Now what is the best way to do that?
<adaedra> attr_reader :node_id
Violentr has joined #ruby
<adaedra> ah no
shoutsid has joined #ruby
<maasha> something with an alias perhaps
pawnbox has joined #ruby
<Pathfinder> ekleog: Maybe, def foo; my_proc = Proc.new; end; foo{"a"}.call
<Pathfinder> returns “a”
<adaedra> ekleog: def foo(&a); a; end
<adaedra> maasha: That also may be rubocop being zealous.
<maasha> adeponte: it may, but there is likely a point
ruurd has joined #ruby
TvL2386 has quit [Ping timeout: 252 seconds]
mistermocha has quit [Ping timeout: 244 seconds]
<ekleog> Pathfinder: Thanks :)
<ekleog> adaedra: Still not, was looking for an optional block :p (solved now anyway :) )
manila90 has joined #ruby
<adaedra> ekleog: good then
Musashi007 has quit [Quit: Musashi007]
<maasha> attr_reader :size, :node_id; alias_method :size, :node_id
<maasha> works and without warnings.
Iskarlar has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
BrazenBraden has joined #ruby
jgt1 has quit [Ping timeout: 246 seconds]
Pupp3tm4st3r has quit [Remote host closed the connection]
mutuma has joined #ruby
<Ox0dea> Gross, though.
Pathfinder has quit [Ping timeout: 240 seconds]
Pupp3tm4st3r has joined #ruby
tomaz_b has joined #ruby
joshmyers has quit [Ping timeout: 244 seconds]
<apeiros> ekleog: correct. you can't define a default value for &block args. you have to test against nil.
mutuma is now known as Pathfinder
Iskarlar has joined #ruby
axsuul has quit [Read error: Connection reset by peer]
chthon has quit [Quit: Ex-Chat]
hs366 has quit [Read error: Connection reset by peer]
<ekleog> apeiros: Thanks :)
rbowlby has quit [Ping timeout: 240 seconds]
c0m0 has joined #ruby
krz has joined #ruby
ndrei has joined #ruby
<apeiros> adaedra, ekleog: `def foo(&a); a; end` makes zero sense. that's what Kernel#proc and #lambda do already.
jeadr has quit [Remote host closed the connection]
howdoico1 has joined #ruby
pengin has joined #ruby
jeadr has joined #ruby
blackmesa has joined #ruby
Iskarlar has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<Ox0dea> apeiros: It allows for the block to be optional.
<adaedra> In that case, &x has no purpose at all?
roolo has joined #ruby
<apeiros> Ox0dea: that makes even less sense.
jenrzzz has quit [Ping timeout: 244 seconds]
<apeiros> Ox0dea: if you use lambda/proc, you have a *literal* block
<apeiros> if you *don't* have a literal block, you *already have* a Proc instance.
JoshGlzBrk has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<ekleog> >> test = ->() { test }; [test, test.call] # Discovering ruby's fun facts
<ruboto> ekleog # => [#<Proc:0x41a3d374@/tmp/execpad-6bf78b5cf90e/source-6bf78b5cf90e:2 (lambda)>, #<Proc:0x41a3d374@/tmp ...check link for more (https://eval.in/418067)
<Ox0dea> Yay, assignment?
<Ox0dea> >> (a = []) << a # This is slightly more interesting.
<ruboto> Ox0dea # => [[...]] (https://eval.in/418068)
TvL2386 has joined #ruby
howdoico1 has quit [Ping timeout: 250 seconds]
AlexAltea has quit [Ping timeout: 264 seconds]
roolo has quit [Ping timeout: 246 seconds]
jgt1 has joined #ruby
<ekleog> I feel I have finally recovered the lost power of C-style pointers
blackmesa has quit [Ping timeout: 256 seconds]
charliesome has joined #ruby
Musashi007 has joined #ruby
marr has joined #ruby
pengin has quit [Remote host closed the connection]
wottam has joined #ruby
pawnbox has quit [Remote host closed the connection]
pawnbox has joined #ruby
pawnbox has quit [Remote host closed the connection]
pawnbox has joined #ruby
senayar has quit [Remote host closed the connection]
icarus has quit [Ping timeout: 245 seconds]
<shortdudey123> anyone know how to generate an openvpn tls-auth ta key in ruby? my google foo is failing
senayar has joined #ruby
icarus has joined #ruby
michaeldeol has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
wottam has quit [Client Quit]
blackmesa has joined #ruby
blackmesa has quit [Client Quit]
Iskarlar has joined #ruby
choke has joined #ruby
abdoudjanifresh has quit [Ping timeout: 265 seconds]
<ekleog> I guess system "openvpn --genkey --secret ta.key" wouldnt fit you?
abdoudjanifresh has joined #ruby
platzhirsch has joined #ruby
techsethi has quit [Quit: techsethi]
<shortdudey123> nope, that assumes you have openvpn installed on the machine that is generating the key
<certainty> moin
<apeiros> moin certainty
<certainty> o/ :)
yfeldblum has joined #ruby
gagrio has quit [Ping timeout: 240 seconds]
techsethi has joined #ruby
techsethi has quit [Client Quit]
paradoja has joined #ruby
charliesome has quit [Quit: Textual IRC Client: www.textualapp.com]
_blizzy_ has joined #ruby
charliesome has joined #ruby
senayar has quit [Remote host closed the connection]
senayar has joined #ruby
Hounddog has joined #ruby
Rickmasta has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
njs126 has quit [Ping timeout: 246 seconds]
Ox0dea has quit [Read error: No route to host]
Cust0sLim3n has quit [Ping timeout: 246 seconds]
kr3ssh has joined #ruby
Iskarlar has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
leat has quit [Remote host closed the connection]
_blizzy_ has quit [Read error: Connection reset by peer]
leat has joined #ruby
finisherr has quit [Quit: finisherr]
choke has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
manila90 has quit [Ping timeout: 240 seconds]
Iskarlar has joined #ruby
oo_ has quit [Remote host closed the connection]
_blizzy_ has joined #ruby
einarj has joined #ruby
oo_ has joined #ruby
bronson has joined #ruby
ndrei has quit [Ping timeout: 256 seconds]
frem has joined #ruby
<bweston92> how can I spawn a new process with its own working directory?
<yorickpeterse> &ri Process.spawn
<ljarvis> moin
oo_ has quit [Ping timeout: 240 seconds]
<yorickpeterse> bweston92: in particular, see the "chdir" option
techsethi has joined #ruby
<bweston92> yorickpeterse will that not change the directory the current script is being run in?
<yorickpeterse> No, it will change the working directory of the new process IIRC
bronson has quit [Ping timeout: 250 seconds]
ruurd has quit [Quit: ZZZzzz…]
DoubleMalt has joined #ruby
oo_ has joined #ruby
ruurd has joined #ruby
mistermocha has joined #ruby
Cust0sLim3n has joined #ruby
gajus has joined #ruby
<gregf_> sorry :/ wrong chat
ruurd has quit [Quit: ZZZzzz…]
<adaedra> too late
<gajus> I think I messed up my gem manager somehow
<gajus> this is what I am getting
Prawnzy has joined #ruby
gregf has joined #ruby
Macaveli has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
pawnbox has quit [Remote host closed the connection]
chipotle has quit [Quit: cheerio]
mistermocha has quit [Ping timeout: 255 seconds]
manila90 has joined #ruby
maasha has quit [Quit: Page closed]
Pathfinder has quit [Remote host closed the connection]
binaryplease1 has joined #ruby
pawnbox has joined #ruby
nofxx has quit [Ping timeout: 256 seconds]
devbug has joined #ruby
devbug_ has quit [Ping timeout: 252 seconds]
sheldonh has joined #ruby
ruurd has joined #ruby
<sheldonh> where in the ruby source are keyword arguments implemented? i'm trying to find out how ruby uses a hash as keyword arguments, so i can make my specialized dictionary play nice
<apeiros> sheldonh: foo(**args) calls to_hash on args
ruurd has quit [Client Quit]
<livcd> is there a reference somewhere for all these specific things like splat,double splat, hash: value,<=> etc ?
sevenseacat has quit [Quit: .]
christiandsg has joined #ruby
Semtex-H has quit [Ping timeout: 260 seconds]
arup_r has quit [Remote host closed the connection]
<sheldonh> apeiros: ah. and to_hash goes behind my default_proc's back. thanks
jeadr has quit [Remote host closed the connection]
<ekleog> Yet another question: I just found Hash.new{|h, k| h[k] = "..."} ; but now I wonder: is there a way to have a similar behavior with an OpenStruct? I can't find anything like this, and passing a well-prepared Hash to OpenStruct.new seems not to work :/
TheHodge has joined #ruby
_blizzy_ has quit [Ping timeout: 240 seconds]
<apeiros> ekleog: inherit from OpenStruct and add the functionality.
<ccooke> ekleog: you can pass a pre-prepared hash to OpenStruct with **
<ccooke> >> require 'ostruct'; OpenStruct.new(**{ foo: 1, bar: 2})
<ruboto> ccooke # => #<OpenStruct foo=1, bar=2> (https://eval.in/418115)
rfmind has joined #ruby
<ccooke> But apeiros' suggestion is more efficient, of course
jeadr has joined #ruby
DLSteve has joined #ruby
<apeiros> ccooke: hm? I think that's not what ekleog was looking for. they want a default_proc for OpenStruct as I understood it
tvw has joined #ruby
<ekleog> ^
<ccooke> apeiros: ah ha
<ccooke> Right
<ccooke> Why do I try to be helpful when I'm barely awake?
gajus has quit []
Musashi007 has quit [Quit: Musashi007]
devbug has quit [Read error: Connection reset by peer]
manila90 has quit [Ping timeout: 260 seconds]
christiandsg has quit [Ping timeout: 265 seconds]
<ekleog> apeiros: Thanks :)
<ekleog> (for :45:53)
<ekleog> :45:33*
<flughafen> oi oi oi
<adaedra> hallo
eminencehc has joined #ruby
<ekleog> hi
<flughafen> hej adaedra
enligh7 has joined #ruby
<livcd> is there a reference somewhere for all these specific things like splat,double splat, hash: value,<=> etc ?
<wasamasa> someone made one on heroku
devoldmx has joined #ruby
eminencehc has quit [Ping timeout: 260 seconds]
<livcd> <3
<livcd> thanks
ndrei has joined #ruby
* wasamasa doesn't understand why this couldn't be found with duckduckgo
<livcd> it is not exactly what i was looking for
<livcd> but at least something :P
<wasamasa> you could improve it
pawnbox has quit [Remote host closed the connection]
havenwood has quit [Ping timeout: 244 seconds]
rfmind has quit [Quit: WeeChat 1.2]
devoldmx has quit [Ping timeout: 260 seconds]
rfmind has joined #ruby
jgt1 has quit [Ping timeout: 250 seconds]
<livcd> true
binaryplease1 has quit [Ping timeout: 260 seconds]
<wasamasa> I assume all that's missing is links to the docs?
TvL2386 has quit [Ping timeout: 252 seconds]
sameerynho has joined #ruby
sinkensa_ has joined #ruby
<bweston92> If I have a class with attr_accessor :my_var how can I get that inside my method? @my_var fails.
sinkensabe has quit [Read error: Connection reset by peer]
manila90 has joined #ruby
lxsameer has quit [Ping timeout: 265 seconds]
Pupp3tm4st3r has quit [Remote host closed the connection]
rdark has joined #ruby
leat has quit [Quit: leat]
techsethi has quit [Quit: techsethi]
stardiviner has joined #ruby
jgt1 has joined #ruby
<ljarvis> bweston92: my_var
pawnbox has joined #ruby
nofxx has joined #ruby
sameerynho has quit [Ping timeout: 255 seconds]
<bweston92> ljarvis: https://gist.github.com/bweston92/2cf3fbb184461876f2f0 line 30 repository is undefined
arup_r has joined #ruby
<ljarvis> bweston92: that's because of the local variable
<ljarvis> bweston92: so either rename your first repository, or use self.repository for the second one
<bweston92> aha what an idiot ¬¬ , sorry
<ljarvis> or, use Git.close(repository, deploy_path).checkout(sha) and do away with the lvar
<ljarvis> it's an easy mistake
<ekleog> 'night folks :)
pawnbox has quit [Ping timeout: 265 seconds]
manila90 has quit [Ping timeout: 240 seconds]
TvL2386 has joined #ruby
<ght> Question: MySQL saves these boolean values as 1 if true and 0 if false, yet when I load them, == true or == false fails
<ght> but == 1 or == 0 works, of course.
<ght> Is there some other method I should be using for boolean values with the Mysql2 gem to confirm true or false?
<ght> besides == 1 or == 0 ?
sameerynho has joined #ruby
pawnbox has joined #ruby
ujjain has joined #ruby
ujjain has quit [Changing host]
ujjain has joined #ruby
<ljarvis> ght: probably not, that isn't really the job on the mysql gem (I'd say), it's often solved at a higher level (i.e an orm)
<ljarvis> since the mysql gem doesn't care about reverse type casting
<ljarvis> I think, anyway; I don't use mysql nor the gem
<ght> Looks like you use this: :cast_booleans => true
<ght> When executing the query.
RegulationD has joined #ruby
<ljarvis> :)
kidoz has quit [Quit: Ухожу я от вас]
thiagovsk has joined #ruby
nofxx has quit [Ping timeout: 244 seconds]
nofxx has joined #ruby
nofxx has joined #ruby
nofxx has quit [Changing host]
pawnbox has quit [Remote host closed the connection]
RegulationD has quit [Ping timeout: 244 seconds]
stnly has quit [Remote host closed the connection]
noway_ has joined #ruby
noway_ has quit [Client Quit]
terlar has quit [Ping timeout: 245 seconds]
noway_ has joined #ruby
Spami has joined #ruby
ruurd has joined #ruby
Spami has quit [Client Quit]
noway_ has quit [Client Quit]
charliesome has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
noway_ has joined #ruby
skydiver has quit [Ping timeout: 250 seconds]
AlexAltea has joined #ruby
mistermocha has joined #ruby
roolo has joined #ruby
pawnbox has joined #ruby
mutuma has joined #ruby
charliesome has joined #ruby
<ght> Question: I have an array that looks like this: [{"id" => 1, "cl_id" => 15}, {"id" => 2, "cl_id" => 22}, {"id" => 3, "cl_id" => 82}]
skade has quit [Quit: Computer has gone to sleep.]
<ght> I was wondering, without having to loop through the array until you hit a match, is there a Ruby command to simply look for the array element with the "cl_id" value 82?
roolo has quit [Ping timeout: 246 seconds]
pawnbox has quit [Ping timeout: 246 seconds]
ruurd has quit [Quit: ZZZzzz…]
mistermocha has quit [Ping timeout: 246 seconds]
ruurd has joined #ruby
mathie has quit [Quit: Quitting...]
mathie has joined #ruby
suchness has joined #ruby
joonty has quit [Quit: joonty]
dtraveler has joined #ruby
oo_ has quit [Remote host closed the connection]
pandaant has joined #ruby
joonty has joined #ruby
manila90 has joined #ruby
techsethi has joined #ruby
<dtraveler> I am trying to upload some files to a REST api using rest_client and it is giving this error: /var/lib/gems/1.9.1/gems/rest_client-1.8.2/lib/restclient/payload.rb:212:in `close': closed stream (IOError)
oo_ has joined #ruby
<dtraveler> can someone help? Thanks in advance
<apeiros> dtraveler: not with the given information. all I can say is that it seems like you're closing an already closed IO again.
TomyWork has joined #ruby
<TomyWork> arr[0].zip(arr[1..-1]) seems clumsy. is there a better way?
pawnbox has joined #ruby
conor_ has joined #ruby
ledestin has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
ruurd has quit [Ping timeout: 244 seconds]
<bweston92> `bundler exec main.rb` doesn't work, any ideas? the docs aren't too good.
stobijah has joined #ruby
Pupp3tm4st3r has joined #ruby
<dtraveler> apeiros: I have a class called Example and it has all the methods which are needed to send some info. and attach a file.. Like this: https://gist.github.com/RaviTezu/63d06c48c52332bdc1b0
BloodyHistory has joined #ruby
__BloodyHistory_ has joined #ruby
blue_deref has joined #ruby
<dtraveler> apeiros: it is failing at line 32(in gist)
<apeiros> bweston92: "doesn't work" isn't any good problem description
charliesome has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
IceyEC has joined #ruby
charliesome has joined #ruby
<bweston92> apeiros: "bundler: command not found: main.rb
<bweston92> "
<gregf_> TomyWork: arr = [0,1,2,3]; p arr[1..-1].map{|v| [arr[0],v] } *runs*
<apeiros> dtraveler: if you use .rb as gist filename, it'll have syntax highlighting, making it easier for the people who help
blue_deref has quit [Client Quit]
<apeiros> bweston92: well, then main.rb is either not executable, or not in your PATH
BloodyHistory has quit [Client Quit]
__BloodyHistory_ has quit [Client Quit]
sdothum has joined #ruby
<dtraveler> apeiros: changed.
<apeiros> dtraveler: thanks
IceyEC has quit [Client Quit]
charliesome has quit [Client Quit]
tesuji has joined #ruby
<bweston92> apeiros is certainly is executable and is in the same directory I'm called bundler from
stamina has joined #ruby
<dtraveler> apeiros: and on upload_file method, it is failing on line 6
<apeiros> bweston92: ./t.rb
<apeiros> bweston92: means . is not in your PATH, so main.rb isn't in your PATH as I said.
<bweston92> apeiros: Ok, thanks would of thought it would check working dir but hey ho
<apeiros> bweston92: it doesn't behave differently than your shell in that regard.
charliesome has joined #ruby
<dtraveler> apeiros: any help? why it is failing on e2 and not on e1?
IceyEC has joined #ruby
<apeiros> dtraveler: 2 problems with your gist: it's (at least partially) fake code, and I'm missing a full backtrace
<dtraveler> yes. it is partial code.
chthon has joined #ruby
godapol has joined #ruby
kp666 has quit [Ping timeout: 272 seconds]
rodfersou has joined #ruby
<apeiros> dtraveler: you know, you leave out about *all* relevant parts in that gist. we don't know what @rsrc[@file_rsrc] is, we don't know what file is, we know only the basics about the exception…
<apeiros> I'm not quite sure how you imagine helping works based off of those infos
<dtraveler> apeiros: sorry. I am sending whole code.
<apeiros> dtraveler: I'm afk now, but please do. anybody else trying to help would have the same problem anyway.
platzhirsch has quit [Quit: Leaving.]
platzhirsch has joined #ruby
<dtraveler> apeiros: https://gist.github.com/RaviTezu/63d06c48c52332bdc1b0 - here's the code. I execute this as, useit.rb <some-filename-here>
<dtraveler> useit.rb is a file, which uses examplerest.rb file, as you can see in the gist
ht__ has joined #ruby
lkba has joined #ruby
Prawnzy has quit [Ping timeout: 255 seconds]
astrobun_ has quit [Remote host closed the connection]
stardiviner has quit [Quit: WeeChat 1.2]
Pupp3tm4_ has joined #ruby
Pupp3tm4st3r has quit [Read error: Connection reset by peer]
Pupp3tm4st3r has joined #ruby
tkuchiki has quit [Remote host closed the connection]
Macaveli has joined #ruby
lkba has quit [Read error: Connection reset by peer]
lkba has joined #ruby
ht__ has quit [Client Quit]
ht__ has joined #ruby
qiukun has quit [Quit: qiukun]
gagrio has joined #ruby
Pupp3tm4st3r has quit [Remote host closed the connection]
Pupp3tm4_ has quit [Ping timeout: 250 seconds]
workmad3_ is now known as workmad3
<apeiros> dtraveler: you probably should not gist credentials
User458764 has quit [Ping timeout: 250 seconds]
<dtraveler> apeiros: I have changed them :)
godapol has quit [Quit: http://www.kiwiirc.com/ - A hand crafted IRC client]
<apeiros> dtraveler: I suspect the exception happens with an origin in line 140?
<dtraveler> apeiros: it is happening at line 148
<apeiros> that'd probably be because you pass twice the same File instance, and the first time you call .upload_file with it, that file instance gets closed
<dtraveler> e1.upload_file is working
<dtraveler> Oh. Yes! I passing the same file..
<apeiros> err, right. 148 is the second time you call it with the same instance.
Pupp3tm4st3r has joined #ruby
<apeiros> anyway, first call -> file instance is closed. second call -> already closed file instance is closed again
<apeiros> just a guess, though. good luck hunting.
User458764 has joined #ruby
<dtraveler> apeiros: Thanks for the replies.. I think, I got it now
skydiver has joined #ruby
oo_ has quit [Remote host closed the connection]
oo_ has joined #ruby
[k- has joined #ruby
Pupp3tm4_ has joined #ruby
iamninja has joined #ruby
_blizzy_ has joined #ruby
oo_ has quit [Remote host closed the connection]
oo_ has joined #ruby
bruno- has joined #ruby
jbw has quit [Ping timeout: 245 seconds]
skade has joined #ruby
skydiver has quit [Ping timeout: 250 seconds]
Pupp3tm4st3r has quit [Ping timeout: 244 seconds]
sheldonh has quit [Quit: Leaving]
user1138 has joined #ruby
da3mian has joined #ruby
jbw has joined #ruby
yfeldblum has quit [Ping timeout: 246 seconds]
IceyEC has quit [Quit: iceyec]
_blizzy_ has quit [Read error: Connection reset by peer]
tmtwd has joined #ruby
_blizzy_ has joined #ruby
christiandsg has joined #ruby
radgeRayden_ has quit [Ping timeout: 265 seconds]
mistermocha has joined #ruby
ldnunes has joined #ruby
but3k4 has joined #ruby
Iskarlar has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
christiandsg has quit [Ping timeout: 265 seconds]
jxf has quit [Ping timeout: 252 seconds]
bttf has quit [Ping timeout: 256 seconds]
danzilio has quit [Ping timeout: 246 seconds]
HashNuke has quit [Ping timeout: 246 seconds]
alekst_ has quit [Ping timeout: 244 seconds]
cbetta has quit [Ping timeout: 244 seconds]
jpinnix______ has quit [Ping timeout: 252 seconds]
mjc_ has quit [Ping timeout: 256 seconds]
bestie has quit [Ping timeout: 256 seconds]
frode15243 has quit [Ping timeout: 256 seconds]
daxroc has quit [Ping timeout: 245 seconds]
zipkid has quit [Ping timeout: 252 seconds]
thesheff17 has quit [Ping timeout: 246 seconds]
fgo has joined #ruby
Kharma has quit [Ping timeout: 265 seconds]
dmoe has quit [Ping timeout: 256 seconds]
jlyndon has quit [Ping timeout: 256 seconds]
autrilla has quit [Ping timeout: 245 seconds]
frankS2 has quit [Ping timeout: 246 seconds]
sylvain31 has joined #ruby
yashinbasement has joined #ruby
jevs has quit [Ping timeout: 256 seconds]
ggherdov has quit [Ping timeout: 256 seconds]
dgutierrez1287 has joined #ruby
cbednarski has quit [Ping timeout: 246 seconds]
oo_ has quit [Remote host closed the connection]
holsee_ has quit [Ping timeout: 252 seconds]
bruno- has quit [Read error: Connection reset by peer]
knowtheory has quit [Ping timeout: 246 seconds]
oo_ has joined #ruby
terlar has joined #ruby
oo_ has quit [Remote host closed the connection]
jmcc has quit [Ping timeout: 252 seconds]
glowcoil has quit [Ping timeout: 252 seconds]
oo_ has joined #ruby
roughz1 has joined #ruby
ruurd has joined #ruby
UtkarshRay has quit [Remote host closed the connection]
f0ster has quit [Ping timeout: 244 seconds]
Iskarlar has joined #ruby
<roughz1> hey.... I think I messed up some gem installation? the beef browser exploitation framework requires sqlire3 with native extensions. However I did run "bundle install" before I added the sqlire3 precomplied binary (I'm on windows here) to the ruby bin directory. bundle install now always fails with not being able to install sqlite3 ..... is there a reverse command for "bundle install"? I'm nowhere fluent with ruby :(
mistermocha has quit [Ping timeout: 265 seconds]
spacemud has quit [Ping timeout: 250 seconds]
astrobun_ has joined #ruby
<apeiros> roughz1: `bundle -h`
devyn_ has quit [Ping timeout: 250 seconds]
devyn has joined #ruby
spacemud has joined #ruby
Iskarlar has quit [Client Quit]
j4cknewt has quit [Remote host closed the connection]
shadeslayer_ is now known as shadeslayer
B5X has joined #ruby
<yashinbasement> has guys I am a startup web developer, I am interested in doing rails/ruby, but when I try to find entry level jobs, could not find things
<yashinbasement> while Django and php has many jobs comapte to ruby on rails
Iskarlar has joined #ruby
B5X has quit [Client Quit]
<yashinbasement> so should I start learning them or should I keep with ruby on rails
IceyEC has joined #ruby
<yashinbasement> any suggestions if any one that experience
UtkarshRay has joined #ruby
hs366 has joined #ruby
B5X has joined #ruby
TvL2386 has quit [Quit: Ex-Chat]
<suchness> Am I crazy or is the object.open method documented nowhere in the ruby docs? http://pastie.org/10359021
<suchness> I can't seem to find it in any version, and I have tested in 1.8 1.9.3 2.0 and 2.2
devoldmx has joined #ruby
<suchness> It exists in all those places in the actual code, but not the docs.
<suchness> *actual language
dimasg has joined #ruby
cynosures has joined #ruby
r0x0rZ has quit []
<gregf_> oh well... we've finally managed to get 'web startup developers'... :)
<suchness> yashinbasement: How are you not finding any ruby jobs? They are everywhere.
<[k-> as ruby said, it is a private method
<suchness> yashinbasement: Maybe just not near you?
manila90 has quit [Ping timeout: 265 seconds]
<suchness> [k-: Still should have some documentation to it, don't you think?
<[k-> you arent supposed to know about it
<yashinbasement> well I am in Melbourne Australia, which is good IT market
<jhass> suchness: it's Kernel#open
<jhass> >> Object.new.method(:open).owner
<suchness> jhass: Ah, thank you!
<ruboto> jhass # => Kernel (https://eval.in/418198)
<[k-> ah, thats why its private
hs366 has quit [Quit: Leaving]
devoldmx has quit [Ping timeout: 246 seconds]
<[k-> i tried calling object.puts the other day
hs366 has joined #ruby
<jhass> Kernel.puts will work, they're module_function's
joonty has quit [Quit: joonty]
<suchness> yashinbasement: http://au.indeed.com/Australia-Ruby-jobs
<[k-> didn't work for the same reason
<jhass> suchness: fyi they crossposted to #RubyOnRails
<roughz1> apeiros: I was expecting "bundle clean" to help. I have trouble figuring out where's the issue and whether ruby even knows about the precompiles sqlite library in /bin. Could you throw me a bone what to look for? i.e. I'd expect ruby to find the sqlite3 headers within the precompiled gem, right? https://paste.ee/p/RKdid
hs366 has quit [Client Quit]
rideh has joined #ruby
<suchness> jhass: Point taken haha.
tmtwd has quit [Remote host closed the connection]
<jhass> just so can reevaluating spending your time, since they don't seem to care much about transporting any info
leafybasil has quit [Remote host closed the connection]
ndrei has quit [Ping timeout: 244 seconds]
andywojo has quit [Quit: leaving]
andywojo has joined #ruby
hs366 has joined #ruby
ndrei has joined #ruby
techsethi has quit [Quit: techsethi]
Guest67238 has quit [Quit: WeeChat 1.2]
yashinbasement has quit [Quit: Leaving]
blackmesa has joined #ruby
abdoudjanifresh has quit [Ping timeout: 265 seconds]
[k-_ has joined #ruby
abdoudjanifresh has joined #ruby
blackmesa has quit [Client Quit]
dtraveler has left #ruby [#ruby]
iloverubynoob has joined #ruby
bhorn1|away is now known as bhorn1
leafybasil has joined #ruby
ht__ has quit [Quit: Konversation terminated!]
kitfox has quit []
andywojo has quit [Ping timeout: 252 seconds]
allcentu1 has joined #ruby
sdwrage has joined #ruby
thiagovsk has quit [Ping timeout: 245 seconds]
ss_much has quit [Ping timeout: 245 seconds]
Aeyrix has quit [Ping timeout: 245 seconds]
jimbeaudoin has quit [Ping timeout: 245 seconds]
jgt1 has quit [Ping timeout: 252 seconds]
dimasg has quit [Ping timeout: 264 seconds]
ruurd has quit [Quit: ZZZzzz…]
leafybasil has quit [Ping timeout: 240 seconds]
kapowaz has quit [Ping timeout: 245 seconds]
jimbeaudoin has joined #ruby
ss_much has joined #ruby
Aeyrix has joined #ruby
hinbody has joined #ruby
joonty has joined #ruby
thiagovsk has joined #ruby
rbennacer has joined #ruby
kapowaz has joined #ruby
jeadr has quit [Remote host closed the connection]
oo_ has quit [Remote host closed the connection]
RegulationD has joined #ruby
roolo has joined #ruby
joonty has quit [Client Quit]
blue_deref has joined #ruby
jeadr has joined #ruby
tvw has quit []
tvw has joined #ruby
skydiver has joined #ruby
jgt1 has joined #ruby
XoRoN has joined #ruby
<flughafen> sup shevy , no flughafen jokes today?
RegulationD has quit [Ping timeout: 244 seconds]
s00pcan has quit [Ping timeout: 246 seconds]
roolo has quit [Ping timeout: 256 seconds]
da3mian has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
_enrique has joined #ruby
<[k-_> flughafen!
<flughafen> sup [k-_ !
skydiver has quit [Ping timeout: 250 seconds]
s00pcan has joined #ruby
<_enrique> I installed bundler using gem bundler install
tvw has quit [Ping timeout: 256 seconds]
conor_ has quit [Remote host closed the connection]
linuxboytoo has joined #ruby
<[k-_> im slowly trying to get myself to do what i need to do
Kero has quit [Ping timeout: 244 seconds]
<_enrique> and when I type in bundle it gives me an error -bash: -bash:: command not found
jpinnix______ has joined #ruby
Kero has joined #ruby
glowcoil has joined #ruby
knowtheory has joined #ruby
brunoro has joined #ruby
cbetta has joined #ruby
brunoro has left #ruby [#ruby]
noway_ has quit [Remote host closed the connection]
ruurd has joined #ruby
conor_ has joined #ruby
<[k-_> "intalled" and "trying to install" is different
Alina-malina has quit [Quit: Leaving]
jlyndon has joined #ruby
linuxboytoo has quit [Remote host closed the connection]
linuxboytoo has joined #ruby
HashNuke has joined #ruby
sdothum has quit [Ping timeout: 264 seconds]
chandu has joined #ruby
chandu has quit [Quit: Leaving]
but3k4 has quit [Read error: Connection reset by peer]
but3k4 has joined #ruby
Iskarlar has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
jeremy04_ has quit [Remote host closed the connection]
roughz1 has quit [Quit: Page closed]
dmoe has joined #ruby
jeremy04 has joined #ruby
linuxboytoo has quit [Ping timeout: 250 seconds]
da3mian has joined #ruby
<_enrique> ok so what do you suggest
<_enrique> I see the bunde and bundler files in ~/rub/gems/bin directory
<_enrique> but I can't runthem
jevs has joined #ruby
arta82 has quit [Ping timeout: 264 seconds]
<[k-_> "intalled" and "trying to install" is different
mjc_ has joined #ruby
<_enrique> I see
ggherdov has joined #ruby
holsee_ has joined #ruby
<[k-_> you must clarify for us to help you
thesheff17 has joined #ruby
frankS2 has joined #ruby
<_enrique> when I think I installed it it gave me "Successfully installed bundler-1.10.6"
nisstyre has quit [Ping timeout: 244 seconds]
mistermocha has joined #ruby
<[k-_> are you using a ruby version manager?
<_enrique> I have 3 files in ~/ruby/gems/bin/
daxroc has joined #ruby
<_enrique> bundle* bundler* ruby_executable_hooks*
dimasg has joined #ruby
frode15243 has joined #ruby
<_enrique> when I do ./bundle it outputs /usr/local/lib/ruby/1.9.1/rubygems/dependency.rb:247:in `to_specs': Could not find bundler (>= 0)
bruno- has joined #ruby
Iskarlar has joined #ruby
frem has quit [Quit: Connection closed for inactivity]
dstarh has joined #ruby
Kharma has joined #ruby
Illusioneer1 has joined #ruby
joonty has joined #ruby
Ropeney has joined #ruby
DroidBurgundy has joined #ruby
astrobun_ has quit [Remote host closed the connection]
mjc_ has quit [Ping timeout: 245 seconds]
dmoe has quit [Ping timeout: 245 seconds]
mistermocha has quit [Ping timeout: 265 seconds]
jlyndon has quit [Ping timeout: 240 seconds]
bruno- has quit [Ping timeout: 264 seconds]
<[k-_> are you installing as root?
jpinnix______ has quit [Ping timeout: 246 seconds]
<jhass> _enrique: how did you install Ruby? Did you install more than one version?
momomomomo has joined #ruby
<Illusioneer1> So I am looking for the right gem for some basic command execution. Say if I want to launch a script that would require nohup, is this something in the basic ruby library or do I need something in the gem repository?
daxroc has quit [Ping timeout: 246 seconds]
<_enrique> no
cbetta has quit [Ping timeout: 256 seconds]
<_enrique> installing as user'
thesheff17 has quit [Ping timeout: 244 seconds]
frankS2 has quit [Ping timeout: 246 seconds]
glowcoil has quit [Ping timeout: 246 seconds]
momomomomo has quit [Client Quit]
<_enrique> when I installed as root it worked
<jhass> Illusioneer1: depending on your need use Kernel#system, Kernel#`, Kernel#spawn, IO::popen, or the open3 stdlib
jevs has quit [Ping timeout: 245 seconds]
christiandsg has joined #ruby
nettoweb has joined #ruby
tkuchiki has joined #ruby
ggherdov has quit [Ping timeout: 250 seconds]
<jhass> _enrique: you're not really answering the question
frode15243 has quit [Ping timeout: 246 seconds]
knowtheory has quit [Ping timeout: 250 seconds]
Kharma has quit [Ping timeout: 265 seconds]
HashNuke has quit [Ping timeout: 246 seconds]
holsee_ has quit [Ping timeout: 240 seconds]
<[k-_> im no good for things not related to scripting @.@
<_enrique> whereis ruby
<_enrique> ruby: /usr/lib/ruby /usr/local/bin/ruby /usr/local/lib/ruby
<Illusioneer1> jhass: sounds like Kernel spawn might be what I need
tkuchiki_ has joined #ruby
rdark has quit [Ping timeout: 260 seconds]
r0x0rZ has joined #ruby
christiandsg has quit [Ping timeout: 265 seconds]
NeverDie has joined #ruby
tkuchiki has quit [Ping timeout: 246 seconds]
Aria has quit [Read error: Connection reset by peer]
andywojo has joined #ruby
aredridel has joined #ruby
segy has quit [Quit: ZNC - http://znc.in]
sgambino has joined #ruby
r0x0rZ has quit [Remote host closed the connection]
devoldmx has joined #ruby
<Psi-Jack> Heh. I'm running through this codecademy for ruby, so far, borrring since I know a lot of the core basics already simply because I've already done a little ruby. But, pretty cool site non-the-less.
<gregf_> _enrique: its surely got to be related to conflicting ruby versions i'm afraid :/
<[k-_> nonetheless*
ahmetkapikiran has joined #ruby
<Psi-Jack> Is this ##english?
<[k-_> promoting good english use helps ruby programmers communicate efficiently!
<gregf_> Psi-Jack: so, whats your question? ;)
<[k-_> there is also nevertheless
binaryplease1 has joined #ruby
<[k-_> anyway, isnt it taxing to type so many extra characters, especially -
Semtex-H has joined #ruby
<shevy> go and write more scripts [k-
malconis has joined #ruby
<[k-_> dont have time for that
<shevy> go and study for university then and become a millionaire
conor_ has quit [Remote host closed the connection]
<Psi-Jack> Hmmm.. gregf_ none yet. I'm just expanding my knowledge of ruby so I can be able to finish this sensu extension, and more. ;)
bmurt has joined #ruby
devoldmx has quit [Ping timeout: 264 seconds]
conor_ has joined #ruby
pandaant has quit [Remote host closed the connection]
aredridel has quit [Remote host closed the connection]
aredridel has joined #ruby
Pupp3tm4_ has quit [Remote host closed the connection]
casadei_ has joined #ruby
Pupp3tm4st3r has joined #ruby
amystephen has joined #ruby
elepedus has joined #ruby
<shevy> if you know the basics, write advanced scripts
<shevy> Anything with Thread.new {} really.
<[k-_> oh god, that is horrible
Ropeney has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
r0x0rZ has joined #ruby
DLSteve has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<Psi-Jack> shevy: Heh, that's kinda where I'm heading, cause my extension's going to load up its own thread during run-time to consume a rabbitmq queue, while the run(event) itself of the extension module will inject queue items and mutate them into what they need to be.
<Psi-Jack> And will need to be able to stop... When told to stop. :)
BLuEGoD has joined #ruby
victortyau has joined #ruby
<[k-_> mutating and threads @.@
<[k-_> make sure you into thread safety!
<shevy> Yeah there are steps of difficulty
<shevy> once you use Thread.new, the next thing to do is to share data between the threads
<shevy> I still haven't started to use fiber and mutex myself :(
da3mian has quit [Quit: Textual IRC Client: www.textualapp.com]
<shevy> [k-_ teach me about mutex
nisstyre has joined #ruby
renderful has joined #ruby
<Psi-Jack> shevy: Heh, my extension mostly just deals with string, Hash, and json manipulation, and speaking tcp and http to relay inbound information to external servers, such as ElasticSearch, InfluxDB, Graphite, OpenTSDB, and KairosDB.
<Psi-Jack> InfluxDB has a graphite input format, but it's horrible, and would be much better done using the http-style line input method.
<[k-_> shevy: i never used them before too :O
segy has joined #ruby
radgeRayden_ has joined #ruby
<[k-_> shevy: i may never use them ever too :P
ips|malc has joined #ruby
sameerynho has quit [Quit: Leaving]
cynosures has quit []
bruno- has joined #ruby
jerius has joined #ruby
renderful has quit [Ping timeout: 244 seconds]
JoshL has joined #ruby
<shevy> oh god that sounds complicated
dblessing has joined #ruby
dstarh has quit [Quit: Textual IRC Client: www.textualapp.com]
<shevy> [k-_ yeah I need a use case myself. I started to use Thread.new only because the pickaxe mentioned parallel downloads, and they did this via Thread.new
allcentu1 has quit [Ping timeout: 255 seconds]
kedare has joined #ruby
leafybasil has joined #ruby
<[k-_> shevy: you obviously didnt make many useful things then!
mutuma has quit [Quit: mutuma]
imperator has joined #ruby
<imperator> good morning
AccordLTN has joined #ruby
<imperator> just looking at method caching solutions in ruby - anyone got a favorite lib?
OrbitalKitten has joined #ruby
sevenseacat has joined #ruby
crdpink has quit [Excess Flood]
AlexAltea has quit [Ping timeout: 250 seconds]
AccordsLTN has quit [Ping timeout: 246 seconds]
crdpink has joined #ruby
Pupp3tm4st3r has quit [Remote host closed the connection]
<shevy> [k-_ well semi-useful, I wrote a lot of smaller things that automatize stuff
Cust0sLim3n has quit [Ping timeout: 244 seconds]
<[k-_> automate*
<shevy> :)
<[k-_> wait, what? method caching?
<imperator> yes, method caching
sgambino has quit [Ping timeout: 272 seconds]
Ropeney has joined #ruby
jiada has joined #ruby
Pupp3tm4st3r has joined #ruby
<[k-_> you mean caching the result of a method?
charliesome has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
ruby-lang841 has joined #ruby
krz has quit [Ping timeout: 246 seconds]
tmtwd has joined #ruby
Iskarlar has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
ruurd has quit [Quit: ZZZzzz…]
allcentu1 has joined #ruby
pawnbox has quit [Remote host closed the connection]
dimasg has quit [Ping timeout: 264 seconds]
<shevy> perhaps memoization
<imperator> yes
pawnbox has joined #ruby
devdazed has joined #ruby
<imperator> right now i'm looking at cache_method, just wondered if you had any thoughts
Miphix has joined #ruby
Miphix has quit [Read error: Connection reset by peer]
Guest32 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
juanpaucar has joined #ruby
rodfersou has quit [Quit: Lost terminal]
rodfersou has joined #ruby
sgambino has joined #ruby
<[k-_> i think caching should be done by optting in
<[k-_> not by opting out
<[k-_> but, well, it makes methods pure!
<imperator> well, i'd need something that works at the instance level then
<[k-_> the library is fine though
dopie has quit [Ping timeout: 250 seconds]
dhjondoh has quit [Quit: dhjondoh]
<jiada> I am working on DFS graph algrithom.Does anybody would like to help me a little bit?(If yes,I can show you guys my ugly code)
<[k-_> oh, it seems like you opt in to caching
allcentu1 has quit [Ping timeout: 265 seconds]
<[k-_> i missed the cache_method :entries there
efox has joined #ruby
kies has quit [Ping timeout: 255 seconds]
<efox> How long should I expect 'gem install mysql2' to take?
<jhass> ?anyone jiada
<ruboto> jiada, Just ask your question, if anyone has or can, they will respond.
AlexAltea has joined #ruby
<jhass> efox: < 10 minutes
<jiada> class Graph
<jiada> # ve = [[obj,obj],[obj,obj,obj],[obj]]
<jiada> # adj = [obj,obj]
<jiada> # v = obj
<jiada> # g = [adj[0],adj[0]..]
<jhass> !kick jiada Please use https://gist.github.com
jiada was kicked from #ruby by ruboto [Please use https://gist.github.com]
<efox> hrm it's been running for over an hour :C
<shevy> good things take time
<jhass> efox: well that certainly sounds like it hung up
<[k-_> oh gosh the code looks horride
<[k-_> horrid*
<shevy> efox that sometimes happens to me with gem install rails, I usually interrupt it and do it again, and then it installs fine
<jhass> *horrible
<efox> well it does say 'Building native extensions. This could take a while...'
charliesome has joined #ruby
darkf has quit [Quit: Leaving]
<jhass> efox: yeah, but unless you're on a Z80 it shouldn't take an hour
<apeiros> jhass: probably need to pm that it was a kick, not a ban
dimasg has joined #ruby
<jhass> apeiros: was about to
dionysus69 has quit [Ping timeout: 265 seconds]
darkf has joined #ruby
<apeiros> kk
* apeiros prematurely overlording
jpinnix______ has joined #ruby
<efox> so i can just ctrl-c and start over? no ill effects?
d10n-work has joined #ruby
<imperator> [k-_, is it? didn't look at it
<jhass> derp, they quit
<imperator> well, uh, any other suggestions?
<jhass> efox: most likely, yeah
<[k-_> it looks like the only library that is available @.@
jhack has joined #ruby
Cust0sLim3n has joined #ruby
glowcoil has joined #ruby
knowtheory has joined #ruby
<efox> jhass, thanks I'll give it a nudge and retry.
<[k-_> the documentation is quite comprehensive
jiada has joined #ruby
<jhass> ?gist jiada
<ruboto> jiada, https://gist.github.com - Multiple files, syntax highlighting, even automatically with matching filenames, can be edited
cbetta has joined #ruby
<jiada> wait
<jhass> had to kick you to stop the flooding ;)
krz has joined #ruby
binaryplease1 has quit [Remote host closed the connection]
<jiada> In China,sometimes,It's very slow to connect to github.
Mojo_Nixon has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
whippythellama has joined #ruby
<imperator> welp, we have to use the libraries we have, not the libraries we wish we had ;)
<jhass> well, as long as you don't use pastebin.com ... ;)
Pupeno has joined #ruby
Pupeno has joined #ruby
<imperator> i've seen the terminal appear to hang, but it's actually working
ldnunes has quit [Ping timeout: 246 seconds]
<imperator> like, i hit enter and suddenly it continues
<jhass> imperator: searched under memoization? I think method caching is more often used in the compiler/interpreter building as term for caching method lookups
<shevy> jiada just use any pastie site such as http://pastie.org/
charliesome has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
jlyndon has joined #ruby
<[k-_> pastie.org is actually also bad
<[k-_> it has its downtimes
<imperator> jhass, a bit, but haven't seen one with a timer
foureight84__ has joined #ruby
HashNuke has joined #ruby
ruby-lang841 has quit [Ping timeout: 246 seconds]
gamename has joined #ruby
rbennacer has quit [Remote host closed the connection]
gamename has quit [Remote host closed the connection]
<jiada> when invoke dfs puts "start from: #{u}" didn't exec
gamename has joined #ruby
<[k-_> you cant nest methods inside methods...
mistermocha has joined #ruby
<shevy> jiada well how do you invoke the code?
Iskarlar has joined #ruby
segy has quit [Ping timeout: 246 seconds]
<apeiros> [k-_: you can. they just most likely don't work the way the person nesting them expects
<shevy> that code is very strange
<shevy> dfs_visit(u) { |v| yield(v) }
frode15243 has joined #ruby
<apeiros> (it defines the inner method on every call of the outer method)
jeadr has quit [Remote host closed the connection]
segy has joined #ruby
EagleDelta has joined #ruby
dmoe has joined #ruby
conor_ has quit [Remote host closed the connection]
<[k-_> g is the graph right
allcentu1 has joined #ruby
<jiada> I have test g
<[k-_> you dont seem to yield or anything
conor_ has joined #ruby
<[k-_> so the blocks you supply dont get run at all
<jiada> it run,but it return a itertor
jeadr has joined #ruby
The_Phoenix has joined #ruby
XoRoN has quit [Quit: Textual IRC Client: www.textualapp.com]
ggherdov has joined #ruby
<jhass> [k-_: line 68?
<apeiros> jiada: Graph#initialize: @ve = ve.map { |adj| adj.map { |v| Vertex.new(v) } }
ldnunes has joined #ruby
<apeiros> kill 7 lines, get more readable code ;-)
jevs has joined #ruby
<[k-_> no, Graph#vertex from called from L59 abd K65
allcentu1 has quit [Client Quit]
<[k-_> and L65*
umgrosscol has joined #ruby
mjc_ has joined #ruby
conor_ has quit [Remote host closed the connection]
<apeiros> Graph#vertex: @ve.map { |adj| adj[0] } # kill another 4 lines
holsee_ has joined #ruby
dgutierrez1287 has quit [Remote host closed the connection]
freerobby has joined #ruby
<apeiros> def topological_sort: there's tsort in stdlib for topological sorting
RegulationD has joined #ruby
mary5030 has joined #ruby
mary5030 has quit [Remote host closed the connection]
conor_ has joined #ruby
spcmastertim has joined #ruby
bluOxigen has joined #ruby
frankS2 has joined #ruby
jhack has quit [Ping timeout: 240 seconds]
mary5030 has joined #ruby
thesheff17 has joined #ruby
mistermocha has quit [Ping timeout: 256 seconds]
pawnbox has quit [Remote host closed the connection]
pawnbox has joined #ruby
blueOxigen has quit [Ping timeout: 240 seconds]
Torrieri has joined #ruby
foureight84___ has joined #ruby
<[k-_> jiada: solution → call yield somewhere in Graph#vertex and try again
bronson has joined #ruby
pawnbox has quit [Remote host closed the connection]
jmcc has joined #ruby
tesuji has quit [Ping timeout: 260 seconds]
daxroc has joined #ruby
marr has quit [Ping timeout: 244 seconds]
momomomomo has joined #ruby
RegulationD has quit [Ping timeout: 255 seconds]
linuxboytoo has joined #ruby
foureight84__ has quit [Ping timeout: 240 seconds]
josh4 has quit [Ping timeout: 256 seconds]
dorei has joined #ruby
valeri_ufo has quit [Quit: ...]
ruurd has joined #ruby
sylvain31 has quit [Ping timeout: 246 seconds]
gamename has quit [Remote host closed the connection]
marr has joined #ruby
gamename has joined #ruby
Kharma has joined #ruby
tomaz_b has quit [Ping timeout: 252 seconds]
conor_ has quit [Remote host closed the connection]
govg has joined #ruby
grvgr has joined #ruby
zipkid has joined #ruby
paulcsmith has joined #ruby
dopamean_ has quit [Ping timeout: 265 seconds]
arup_r has quit [Remote host closed the connection]
bruno- has quit [Ping timeout: 246 seconds]
hahuang61 has joined #ruby
hahuang65 has quit [Ping timeout: 245 seconds]
choppington has joined #ruby
bestie has joined #ruby
jhack has joined #ruby
valeri_ufo has joined #ruby
havenwood has joined #ruby
kalz has quit [Ping timeout: 246 seconds]
aibo has quit [Ping timeout: 245 seconds]
sylvain31 has joined #ruby
conor_ has joined #ruby
aredridel is now known as aria
aria is now known as Aria
jxf has joined #ruby
alekst_ has joined #ruby
NeverDie has quit [Quit: I'm off to sleep. ZZZzzz…]
roolo has joined #ruby
Macaveli has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
skydiver has joined #ruby
dimasg has quit [Ping timeout: 265 seconds]
eGGsha has quit [Quit: Textual IRC Client: www.textualapp.com]
nettoweb has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
aganov has quit [Remote host closed the connection]
tkuchiki_ has quit [Remote host closed the connection]
dmolina has quit [Quit: Leaving.]
momomomomo has quit [Ping timeout: 252 seconds]
Pupp3tm4st3r has quit [Remote host closed the connection]
rdark has joined #ruby
roolo has quit [Ping timeout: 240 seconds]
skydiver has quit [Ping timeout: 250 seconds]
jerius has quit [Quit: /quit]
Chau has joined #ruby
imperator has left #ruby ["Leaving"]
Chau has quit [Max SendQ exceeded]
saddad has joined #ruby
Pupp3tm4st3r has joined #ruby
Chau has joined #ruby
momomomomo has joined #ruby
j_mcnally has joined #ruby
JoshL has quit [Read error: No route to host]
jerius has joined #ruby
<shevy> let's dance! \o~ ~o/
JoshL has joined #ruby
DaniG2k has joined #ruby
<[k-_> ┌(・。・)┘ ♪ └(・。・)┐ ♪ ┌(・。・)┘
DaniG2k has left #ruby [#ruby]
bttf has joined #ruby
<[k-_> im having a headache :(
dopie has joined #ruby
christiandsg has joined #ruby
<livcd> [k-_: caffeine helps
christiandsg has quit [Remote host closed the connection]
ItSANgo has quit [Ping timeout: 256 seconds]
<Kalov> sleeping helps
dopamean_ has joined #ruby
kalz has joined #ruby
autrilla has joined #ruby
<shevy> eating melons helps
Marsupermammal has joined #ruby
robh71 has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
cbednarski has joined #ruby
livathinos has quit []
rfmind has quit [Quit: WeeChat 1.2]
riotjones has quit [Remote host closed the connection]
rfmind has joined #ruby
hs366 has quit [Read error: Connection reset by peer]
chrissonar has quit [Remote host closed the connection]
<[k-_> caffeine is awful!
RegulationD has joined #ruby
<[k-_> withdrawal symptoms are awful!
govg has quit [Quit: leaving]
joelataylor has joined #ruby
* havenwood slinks away in search of coffee
centrx has joined #ruby
kies has joined #ruby
Kallis has joined #ruby
Kallis has quit [Max SendQ exceeded]
conor_ has quit [Remote host closed the connection]
freerobby has quit [Quit: Leaving.]
jeadr has quit [Remote host closed the connection]
sepp2k has joined #ruby
freerobby has joined #ruby
Ropeney has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
JakFrist has joined #ruby
<[k-_> the last time i drank a cup of coffee, it didnt work
ItSANgo__ has joined #ruby
<[k-_> well, it tasted a bit bland, because i over diluted it
Timba-as has joined #ruby
jeadr has joined #ruby
<[k-_> but that was only *a bit*
millerti has joined #ruby
aceRacer has joined #ruby
<aceRacer> hi
robh71 has joined #ruby
<livcd> [k-_: coffee pills
<[k-_> eww no
danzilio has joined #ruby
diegoaguilar has joined #ruby
jeanlinux has joined #ruby
<aceRacer> http://stackoverflow.com/a/7988465 how does this work. I mean calling a class methods outside any method. normally in programming like in java I have seen that if I need to call a method I need to do that in another method, which is not the case with typesafe_accessor ? how does this work in ruby?
* [k-_ leads a caffeine free lifestyle (we'll see what happens when i start working)
aibo has joined #ruby
<jeanlinux> guys, good afternoon
<jeanlinux> i like a little help on finding the average time of an array of time object
stef204 has joined #ruby
stef204 has quit [Changing host]
stef204 has joined #ruby
<[k-_> aceRacer: Foo is actually an instance of Class
<jeanlinux> or maybe a time string.. like say array = ["9:30", "8:21", "7:43", "9:12","13:53"]
<jeanlinux> how do i get the average time from the array
rfmind has quit [Quit: WeeChat 1.2]
rfmind has joined #ruby
<aceRacer> yeah I understand that. but if it were written inside another class Method then it would be easier to understand. is it not like calling the class method typesafe_accessor inside the class ?
mjburgess has joined #ruby
<oddmunds> aceRacer: what were you linking to exactly? your question doesn't seem to have anything to do with the question you linked to. :/
<aceRacer> I mean its not something like def self.init_typeself(option); typesafe_accessor(option, Integer); end
<[k-> wait, i think im confused a little. So, actually, everything in the class body is actually evaulated as an instancr of class
UtkarshRay has quit [Ping timeout: 246 seconds]
<aceRacer> oddmunds: I am showing the example. I want to understand how the methods like attr_accessor works? I have never seen a method call outside of a method
rbennacer has joined #ruby
tkuchiki has joined #ruby
<oddmunds> oh, yeah, that stuff is just called when the class is read
<workmad3> or, more accurately, the class body is just code that gets run
<[k-> aceRacer, when you call puts, its not in a method, isnt it?
Marsupermammal has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
Pisuke has joined #ruby
conor_ has joined #ruby
jiada has quit [Remote host closed the connection]
<[k-> i mean, you dont have to call it in a method
Marsupermammal has joined #ruby
<[k-> you dont have to define a main method in ruby
<[k-> unlike in java and the like
<[k-> code just gets ran
Trieste has quit [Ping timeout: 245 seconds]
Guest14911 has quit [Ping timeout: 245 seconds]
Marsupermammal has quit [Max SendQ exceeded]
sevenseacat has quit [Quit: .]
chipotle has joined #ruby
Trieste has joined #ruby
platzhirsch has quit [Ping timeout: 265 seconds]
<saddad> yes
<[k-> method calls can exist outside a method because Ruby treats those as "main methods", Ruby runs them in sequence that it sees them
tmtwd has quit [Ping timeout: 246 seconds]
lwu has quit [Ping timeout: 245 seconds]
<jeanlinux> can anyone help or suggest a solution pls?
dbugger has joined #ruby
<dbugger> Hey guys. I have a question. Why this mess with "rvm" and "rbenv" and so on? Arent Ruby versions back comaptible?
MyMind has quit [Ping timeout: 260 seconds]
lwu has joined #ruby
<twohlix> dbugger: not all no
nerio has joined #ruby
bmurt has quit [Ping timeout: 245 seconds]
<aceRacer> ok. i see
<dbugger> twohlix, it is kinda messy, isnt it?
<twohlix> dbugger: it also lets you dev for the ruby version you plan on deploying to
siempref_ has joined #ruby
<saddad> [k- the scope that your program starts in can be thought of as 'main'
<twohlix> dbugger: while they are probably backwards compatible, you can't use syntax like symbol: value in 1.8
<havenwood> >> times = %w[9:30 8:21 7:43 9:12 13:53]; hours, minutes = times.map { |s| s.split(':').map(&:to_i) }.transpose; "#{hours.inject(:+) / times.size}:#{minutes.inject(:+) / times.size}"
<ruboto> havenwood # => "9:31" (https://eval.in/418301)
<twohlix> dbugger: its no messier than php
<[k-> jeanlinux: array.map { |timestamp| timestamp.split ?: }
<havenwood> jeanlinux: pre-coffee, but here's a stab ^
<[k-> and then whatever havenwood did
platzhirsch has joined #ruby
lotherk has quit [Ping timeout: 260 seconds]
UtkarshRay has joined #ruby
pika_pika has joined #ruby
<[k-> wow, transpose, so power
siemprefresco has quit [Ping timeout: 252 seconds]
victortyau has quit [Quit: Leaving]
<[k-> i wish sometimes we could write a fraction in programming
C0deMaver1ck has joined #ruby
lotherk has joined #ruby
C0deMaver1ck is now known as Guest28446
<[k-> actually, specs should be written with fractions
<twohlix> [k-: user rationals like Rational(24, 10) will be reduced to 12/5
Trieste has quit [Ping timeout: 245 seconds]
ddv has quit [Ping timeout: 245 seconds]
troulouliou_div2 has joined #ruby
<[k-> twohlix: i meant the graphical form
conor_ has quit [Remote host closed the connection]
<[k-> so we can see the formula and all that!
<twohlix> >> Rational(24, 10)
<ruboto> twohlix # => (12/5) (https://eval.in/418305)
<havenwood> dbugger: Ruby is semantically versioned now days. Read a bit about it here: https://www.ruby-lang.org/en/news/2013/12/21/ruby-version-policy-changes-with-2-1-0/
ddv has joined #ruby
<[k-> no, i meant when reading the code
<twohlix> yea yea
chinmay_dd has joined #ruby
<[k-> not evaluating it
freerobby has quit [Quit: Leaving.]
<twohlix> i was just putting that in cause i forgot how eval
Trieste has joined #ruby
conor_ has joined #ruby
banister has quit [Quit: Textual IRC Client: www.textualapp.com]
<jeanlinux> havenwood: Thanks so much, that'll do the trick
<gregf_> [k-: class Fraction; attr_accessor :num,:denom; def initialize num, denom; @num, @denom = num,denom;end; def to_s; print [@num, @denom].join("/");end; end;Fraction.new(1,2).to_s;
<gregf_> tada
<havenwood> jeanlinux: you're welcome
Rickmasta has joined #ruby
cschneid_ has joined #ruby
conor_ has quit [Remote host closed the connection]
Timba-as has quit [Quit: Be back later ...]
rippa has joined #ruby
<aceRacer> I had never tried class Duh; [1,2,3].map{|i| i * 2}; end , previously :D now that I do it I feel very werid .
mistermocha has joined #ruby
iloverubynoob has quit [Remote host closed the connection]
Tempesta has quit [Quit: Going offline, see ya! (( www.adiirc.com )]
<twohlix> gregf_: I think [k- meant seeing fractions ala math style in his IDE so he could write out equations all mathy
<gregf_> twohlix: ah - ok :)
<gregf_> Ha!
<havenwood> Yeah, that's how I think too but the gibberish symbols can be distracting.
<dbugger> havenwood, Does that mean that we might see soon disappear things like RVM and RBENV?
n_blowna_ has joined #ruby
jeadr has quit [Remote host closed the connection]
robh71 has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
paulcsmith_ has joined #ruby
bstrarm has joined #ruby
decoponio has joined #ruby
<[k-_> rbenv is spelt with lowercase, like xkcd, just sayin'
uxp has joined #ruby
<[k-_> does anyone have a relevant xkcd?
elton_ has joined #ruby
<havenwood> dbugger: In production you typically don't need more than one Ruby. If you're working on more than one Ruby app they may be written for different Rubies. Maybe not even the same implementation of Ruby.
<havenwood> dbugger: So you may want to switch Rubies between apps, hence the Ruby version switchers like chruby, RVM and rbenv.
jeadr has joined #ruby
DroidBurgundy has quit []
axl__ has joined #ruby
<twohlix> dbugger: semantic versioning doesnt make rbenv + rvm useless. It just is easier to tell that 3.0.0 could be hugely different than 2.0.0 or 2.9.9 even and probably not compatible
conor__ has joined #ruby
`scootaloo has joined #ruby
tmtwd has joined #ruby
AccordsLTN has joined #ruby
adaedra has quit [Disconnected by services]
fgo has quit [Ping timeout: 246 seconds]
`scootaloo is now known as adaedra
Hounddog_ has joined #ruby
Swappticon has joined #ruby
<daxroc> Does ruby have a default path that it looks for SSL certificates in ?
<tubbo> the only way we'll see ruby switchers change is if everyone agrees to use the same implementation
mistermocha has quit [Ping timeout: 244 seconds]
<adaedra> it uses openssl's one iirc daxroc
mhib has joined #ruby
<havenwood> tubbo: So which shall we use? :P
jeremy04_ has joined #ruby
<tubbo> havenwood: lol exactly
<tubbo> i really liked the rubinius thing when it was first announced
j_mcnally has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
martinbjeldbak has joined #ruby
nwhirschfeld_ has joined #ruby
<tubbo> but unfortunately it's hard to work with since like no one uses it :( everyone's all about the MRI or JRuby
_main_ has joined #ruby
<tubbo> (i know people use it just not around where i am)
<shevy> [k- is this not a thing of utter beauty: https://github.com/systemd/python-systemd/blob/master/systemd/daemon.py
Coldblackice has quit [Ping timeout: 246 seconds]
ruurd has quit [Quit: ZZZzzz…]
<[k-_> it is almost there
<[k-_> but explicit returns @.@
<shevy> tubbo well there was a new maintainer so the project identity always changes; MRI also changes quickly so there is constant work required
blueOxigen has joined #ruby
j_mcnally has joined #ruby
<tubbo> shevy: i might be totally wrong here but isn
mhenrixon_ has joined #ruby
binaryplease has joined #ruby
paulcsmith_ has quit [Quit: Be back later ...]
NuckingFuts has joined #ruby
M-mistake1 has joined #ruby
<tubbo> isn't the whole reason why we have other ruby implementations is because MRI doesn't support multi-threading?
headius_ has joined #ruby
_aeris has joined #ruby
Rutix has joined #ruby
<twohlix> tubbo: i think so
Rutix has joined #ruby
klaas_ has joined #ruby
tmtwd has quit [Ping timeout: 244 seconds]
<twohlix> tubbo: also JIT, which will be in mri too
jeremy04 has quit [Ping timeout: 246 seconds]
paulcsmith_ has joined #ruby
Trieste has quit [*.net *.split]
ddv has quit [*.net *.split]
aibo has quit [*.net *.split]
rdark has quit [*.net *.split]
marr has quit [*.net *.split]
linuxboytoo has quit [*.net *.split]
krz has quit [*.net *.split]
but3k4 has quit [*.net *.split]
skade has quit [*.net *.split]
einarj has quit [*.net *.split]
yardenbar has quit [*.net *.split]
eam has quit [*.net *.split]
M-mistake has quit [*.net *.split]
thang has quit [*.net *.split]
ivanf has quit [*.net *.split]
martinbjeldbak_ has quit [*.net *.split]
pjaspers has quit [*.net *.split]
__main__ has quit [*.net *.split]
_aeris_ has quit [*.net *.split]
nwhirschfeld has quit [*.net *.split]
yosafbridge has quit [*.net *.split]
phreakocious has quit [*.net *.split]
_5moufl has quit [*.net *.split]
justinmcp has quit [*.net *.split]
ghormoon has quit [*.net *.split]
elton has quit [*.net *.split]
headius has quit [*.net *.split]
mist has quit [*.net *.split]
mhenrixon has quit [*.net *.split]
greedo has quit [*.net *.split]
cookiez has quit [*.net *.split]
momomomomo has quit [*.net *.split]
paulcsmith has quit [*.net *.split]
AccordLTN has quit [*.net *.split]
B5X has quit [*.net *.split]
Hounddog has quit [*.net *.split]
michael_mbp has quit [*.net *.split]
araujo has quit [*.net *.split]
n_blownapart has quit [*.net *.split]
bustrarm has quit [*.net *.split]
mgorbach has quit [*.net *.split]
GnuYawk has quit [*.net *.split]
klaas has quit [*.net *.split]
axl_ has quit [*.net *.split]
slani has quit [*.net *.split]
nuck has quit [*.net *.split]
larshaugseth has quit [*.net *.split]
uxp_ has quit [*.net *.split]
guardian has quit [*.net *.split]
MVPhelp has quit [*.net *.split]
acosonic has quit [*.net *.split]
ironcamel has quit [*.net *.split]
platosha_ has quit [*.net *.split]
_aeris is now known as _aeris_
axl__ is now known as axl_
user1138 has quit [Remote host closed the connection]
elton_ is now known as elton
phreakocious_ has joined #ruby
r0x0rZ has quit [Remote host closed the connection]
_main_ is now known as __main__
thang has joined #ruby
user1138 has joined #ruby
<tubbo> oh yeah
ironcamel has joined #ruby
<tubbo> when is that coming to MRI?
ips|malc has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
northfurr has joined #ruby
<twohlix> iI'm pretty sure thats coming with the threading changes, i might be misremembering
bluOxigen has quit [Ping timeout: 272 seconds]
<Norrin> is ruby getting real threads?
<twohlix> yes.
mgorbach has joined #ruby
<twohlix> it has real threads
<Norrin> wow
<Norrin> when?
<twohlix> its just dropping the GIL
<twohlix> not sure on an actual date, i'll find the post regarding that
greedo has joined #ruby
<havenwood> Norrin: Ruby has real system Threads as of 1.9, just a GVL that's oft locked.
pjaspers has joined #ruby
justinmcp has joined #ruby
<[k-_> ruby 3.0?
linuxboytoo has joined #ruby
<Norrin> gvl? gil?
<havenwood> Norrin: Interpreter versus VM.
<havenwood> Norrin: Ruby got a VM too in 1.9.
lucyinthesky has joined #ruby
<[k-_> both are the same thing
krz has joined #ruby
<havenwood> Norrin: Here's a series of articles if you want to look into MRI details: http://www.jstorimer.com/blogs/workingwithcode/8085491-nobody-understands-the-gil
<[k-_> though GIL is more common
but3k4 has joined #ruby
<[k-_> commonly used*
<livcd> what do you guys think about RubyMotion ?
<havenwood> [k-_: It's older since Ruby was an interpreter before a VM.
<havenwood> livcd: I might be tempted if I wanted to make an iOS app.
yosafbridge has joined #ruby
michael_mbp has joined #ruby
<twohlix> but right now if you want real concurrency you need to use jurby/rbx
<[k-_> well, its still commonly referred to as a GIL inspite of that
<havenwood> livcd: But I haven't used it, paywall and all. Enjoyed its precursor, macruby.
<[k-_> Erlang BEAM!
<Norrin> and correct to say jruby pretty much from the start didn't have this 'oft locked' issue?
B5X has joined #ruby
radgeRayden_ has quit [Ping timeout: 255 seconds]
<havenwood> [k-_: Let me pedantically correct them!
<livcd> [k-_: heresy
<havenwood> Norrin: JRuby doesn't have a GVL so yup.
<livcd> havenwood: i am really tempted to learn it
ghormoon has joined #ruby
<havenwood> [k-: mmmm BEAM
lucyinthesky has left #ruby ["Leaving"]
<[k-_> the jvm is good, yes
bronson has quit [Remote host closed the connection]
GnuYawk has joined #ruby
_5moufl has joined #ruby
ruurd has joined #ruby
Pupp3tm4st3r has quit [Remote host closed the connection]
jeremy04 has joined #ruby
<[k-_> after garbage collection comes concurrency & parallelism!
<havenwood> [k-: stages of purgatory?
arup_r has joined #ruby
n008f4g_ has joined #ruby
<[k-_> (in Catholic doctrine) a place or state of suffering inhabited by the souls of sinners who are expiating their sins before going to heaven.
<[k-_> "all her sins were forgiven and she would not need to go to Purgatory"
<[k-_> mental anguish or suffering.
<[k-_> "this was purgatory, worse than anything she'd faced in her life"
hoelzro has left #ruby [#ruby]
stef_204 has joined #ruby
<[k-_> stages of suffering?
Tempesta has joined #ruby
<twohlix> and in regards to JIT for Cruby: https://twitter.com/yukihiro_matz/status/631071427517509633
B5X has quit [Quit: Leaving]
troulouliou_div2 has quit [Remote host closed the connection]
[Butch] has joined #ruby
jeremy04_ has quit [Ping timeout: 244 seconds]
marr has joined #ruby
stef204 has quit [Ping timeout: 244 seconds]
yardenbar has joined #ruby
cookiez has joined #ruby
ddv has joined #ruby
rdark has joined #ruby
ivanf has joined #ruby
eam has joined #ruby
mist has joined #ruby
yardenbar has quit [Ping timeout: 245 seconds]
slani has joined #ruby
MVPhelp has joined #ruby
platosha_ has joined #ruby
yardenbar has joined #ruby
momomomomo has joined #ruby
fibbel has joined #ruby
<[k-_> "it consumes too much memory"
Tempesta has quit [Client Quit]
<[k-_> now we know, now we know
araujo has joined #ruby
ivanskie has joined #ruby
<[k-_> now we cant name ruby XJava or something
bronson has joined #ruby
<twohlix> lolwut
<twohlix> you can rename the binaries all you want
Tempesta has joined #ruby
araujo has quit [Max SendQ exceeded]
lannonbr has joined #ruby
chinmay_dd has quit [Read error: Connection reset by peer]
larshaugseth has joined #ruby
araujo has joined #ruby
northfurr has quit [Quit: northfurr]
rbennacer has quit [Read error: Connection reset by peer]
aibo has joined #ruby
rbennacer has joined #ruby
aceRacer has quit [Quit: leaving]
Cache_Money has joined #ruby
nettoweb has joined #ruby
yardenbar has quit [Quit: Leaving]
northfurr has joined #ruby
Swappticon has quit [Quit: Textual IRC Client: www.textualapp.com]
rubie has joined #ruby
riotjones has joined #ruby
JakFrist has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
hotpancakes has joined #ruby
jeadr has quit [Remote host closed the connection]
Iskarlar has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<tubbo> havenwood: now that swift is out, i don't see much reason for rubymotion
<tubbo> used to be rubymotion was simply better than objc
darkf has quit [Quit: Leaving]
jeadr has joined #ruby
riotjones has quit [Ping timeout: 250 seconds]
jhooker has joined #ruby
Iskarlar has joined #ruby
bronson has quit [Remote host closed the connection]
<livcd> tubbo: rubymotion is stable, has less bugs and it's faster and does not force you to use Xcode :3
<tubbo> yeah i guess if you're really against using xcode it might make sense
rehat has quit [Remote host closed the connection]
<tubbo> though the CLI tools that work with rubymotion like shenzhen and stuff also work with regular Xcode project apps
<tubbo> i mean, it kinda makes sense to develop your iOS/OS X app in the IDE designed for making said apps
ta has quit [Remote host closed the connection]
dblessing has quit [Quit: Textual IRC Client: www.textualapp.com]
<shevy> long live notepad!
dfockler has joined #ruby
<tubbo> rubymotion will always be a layer above what apple provides. it makes more sense to bet on swift for long-term stability, because it's in apple's best interest to make it a better and more stable language.
<tubbo> that said, most apps rewrite themselves a bunch of times over so maybe not :)
rubie has quit [Remote host closed the connection]
<livcd> tubbo: on the other hand rubymotion has been started by ex-apple employee and it is their core business
bronson has joined #ruby
JakFrist has joined #ruby
tmtwd has joined #ruby
<tubbo> i wish i could like try it for free somehow
<tubbo> just to see how it works
<tubbo> i don't want to pay all that and then find out i don't like it
<havenwood> tubbo: yup
JakFrist has quit [Client Quit]
Mojo_Nixon has joined #ruby
<livcd> tubbo: they said they had no way to prevent users from publishing apps to app store when the rbmotion thing was "free"
northfurr has quit [Quit: northfurr]
<tubbo> yeah
BrazenBraden has quit [Read error: Connection reset by peer]
knowtheory has quit [Remote host closed the connection]
alekst_ has quit [Remote host closed the connection]
cbetta has quit [Remote host closed the connection]
dmoe has quit [Remote host closed the connection]
HashNuke has quit [Remote host closed the connection]
jxf has quit [Remote host closed the connection]
danzilio has quit [Remote host closed the connection]
Kharma has quit [Remote host closed the connection]
autrilla has quit [Remote host closed the connection]
glowcoil has quit [Remote host closed the connection]
daxroc has quit [Remote host closed the connection]
holsee_ has quit [Remote host closed the connection]
mjc_ has quit [Remote host closed the connection]
cbednarski has quit [Remote host closed the connection]
jevs has quit [Remote host closed the connection]
ggherdov has quit [Remote host closed the connection]
jpinnix______ has quit [Remote host closed the connection]
zipkid has quit [Remote host closed the connection]
bttf has quit [Remote host closed the connection]
frode15243 has quit [Remote host closed the connection]
frankS2 has quit [Remote host closed the connection]
jlyndon has quit [Remote host closed the connection]
jmcc has quit [Remote host closed the connection]
bestie has quit [Remote host closed the connection]
thesheff17 has quit [Remote host closed the connection]
maletor has joined #ruby
ruurd has quit [Quit: ZZZzzz…]
eminencehc has joined #ruby
JakFrist has joined #ruby
mary5030_ has joined #ruby
crazydiamond has quit [Remote host closed the connection]
platzhirsch has quit [Quit: Leaving.]
platzhirsch has joined #ruby
socialjackie has joined #ruby
danzilio has joined #ruby
<socialjackie> Hey, is there a better way to build up query strings than this? https://gist.github.com/jackwillis/2de03bf3527889f7135f
<Norrin> tubbo, borrow someone else's account / software maybe
ahmetkapikiran has quit [Quit: ahmetkapikiran]
Pupeno_ has joined #ruby
mary5030 has quit [Ping timeout: 265 seconds]
jeadr has quit [Remote host closed the connection]
jpinnix______ has joined #ruby
ips|malc has joined #ruby
ta has joined #ruby
Pupeno has quit [Ping timeout: 246 seconds]
chipotle has quit [Remote host closed the connection]
momomomomo has quit [Ping timeout: 240 seconds]
mandarinkin has joined #ruby
<jhass> socialjackie: for starters {"key" => "value", ...}.map {|k, v| "#{k}=#{escape(v)}" }.join("&")
sdfgsdfg has quit [Remote host closed the connection]
bronson has quit [Remote host closed the connection]
jeadr has joined #ruby
<jhass> socialjackie: but you could also consider building it with URI I guess
robh71 has joined #ruby
platzhirsch has left #ruby [#ruby]
<socialjackie> jhass, thanks
guardian has joined #ruby
r0x0rZ_ has joined #ruby
diegoviola has joined #ruby
axsuul has joined #ruby
ndrei has quit [Remote host closed the connection]
glowcoil has joined #ruby
knowtheory has joined #ruby
<gregf_> >> require "uri"; url = URI("http://test.com?foo=1"); params = URI::decode_www_form(url.query); params<<["bar", 200]; url.query = URI::encode_www_form(params); url
<gregf_> socialjackie: ^^ prolly :/
cbetta has joined #ruby
ndrei has joined #ruby
jtdoncas has joined #ruby
<socialjackie> gregf_, looks good. I'll try yto use the standard library solution
grvgr has quit [Read error: Connection reset by peer]
momomomomo has joined #ruby
grvgr has joined #ruby
ips|malc has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
ips|malc has joined #ruby
banister has joined #ruby
gamename has quit [Remote host closed the connection]
casadei_ has quit [Remote host closed the connection]
gamename has joined #ruby
jlyndon has joined #ruby
fgo has joined #ruby
dblessing has joined #ruby
Chau has quit [Quit: Leaving]
GnuYawk has quit [Ping timeout: 240 seconds]
renderful has joined #ruby
hotpancakes has quit [Remote host closed the connection]
HashNuke has joined #ruby
mistermocha has joined #ruby
ta has quit [Remote host closed the connection]
robh71 has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
hmsimha_ has quit [Ping timeout: 265 seconds]
baroquebobcat has joined #ruby
atmosx has joined #ruby
BrazenBraden has joined #ruby
roolo has joined #ruby
gamename has quit [Ping timeout: 244 seconds]
fgo has quit [Ping timeout: 250 seconds]
skydiver has joined #ruby
frode15243 has joined #ruby
pen-soldier has joined #ruby
jerius has quit [Quit: /quit]
icarus has quit [Read error: Connection reset by peer]
dmoe has joined #ruby
devoldmx has joined #ruby
jerius has joined #ruby
ggherdov has joined #ruby
jevs has joined #ruby
mjc_ has joined #ruby
mistermocha has quit [Ping timeout: 272 seconds]
rakm has joined #ruby
holsee_ has joined #ruby
elepedus has quit [Quit: elepedus]
roolo has quit [Ping timeout: 250 seconds]
frankS2 has joined #ruby
lsmola has quit [Ping timeout: 246 seconds]
skydiver has quit [Ping timeout: 250 seconds]
thesheff17 has joined #ruby
JakFrist has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
axsuul has quit [Read error: Connection reset by peer]
towski_ has joined #ruby
dgutierrez1287 has joined #ruby
axsuul has joined #ruby
Lucky__ has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
jmcc has joined #ruby
devoldmx has quit [Ping timeout: 272 seconds]
anisha has quit [Quit: Leaving]
daxroc has joined #ruby
lightstalker has joined #ruby
bluOxigen has joined #ruby
icarus has joined #ruby
iwaffles has joined #ruby
jgt1 has quit [Ping timeout: 246 seconds]
dgutierrez1287 has quit [Ping timeout: 265 seconds]
einarj has joined #ruby
Meow-J has joined #ruby
hubcaps has quit [Quit: Leaving.]
christiandsg has joined #ruby
Kharma has joined #ruby
amclain has joined #ruby
blueOxigen has quit [Ping timeout: 264 seconds]
alskdjalskjd has joined #ruby
axsuul has quit [Ping timeout: 240 seconds]
danzilio has quit [Quit: My computer has fallen asleep!]
alskdjalskjd has quit [Client Quit]
Rico has quit [Read error: Connection reset by peer]
hahuang61 has quit [Ping timeout: 244 seconds]
AlxAltea has joined #ruby
conor__ has quit [Remote host closed the connection]
sylvain31 has quit [Ping timeout: 252 seconds]
mjburgess has quit [Ping timeout: 255 seconds]
zipkid has joined #ruby
Iskarlar has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
conor_ has joined #ruby
terlar has quit [Ping timeout: 240 seconds]
AlexAltea has quit [Ping timeout: 250 seconds]
mleung has joined #ruby
leafybasil has quit [Remote host closed the connection]
rbennacer has quit [Remote host closed the connection]
robh71 has joined #ruby
TomyLobo has joined #ruby
joonty has quit [Quit: joonty]
mleung has quit [Client Quit]
danzilio has joined #ruby
bestie has joined #ruby
solars has quit [Ping timeout: 252 seconds]
kedare has quit [Quit: KVIrc 4.2.0 Equilibrium http://www.kvirc.net/]
mleung has joined #ruby
mary5030_ has quit [Remote host closed the connection]
ruurd has joined #ruby
rbennacer has joined #ruby
oo_ has joined #ruby
nisstyre has quit [Quit: WeeChat 1.2]
jxf has joined #ruby
alekst_ has joined #ruby
Lucky has joined #ruby
[k-_ has quit [Quit: Lingo: www.lingoirc.com]
axsuul has joined #ruby
cris_ has joined #ruby
troulouliou_div2 has joined #ruby
tmtwd has quit [Ping timeout: 245 seconds]
tonios57 has joined #ruby
paulcsmith_ has quit [Quit: Be back later ...]
DroidBurgundy has joined #ruby
bffff_ has joined #ruby
gamename has joined #ruby
knrz has joined #ruby
senayar has quit []
Contigi has quit [Read error: Connection reset by peer]
leafybasil has joined #ruby
bttf has joined #ruby
radgeRayden_ has joined #ruby
[k- has quit [Ping timeout: 264 seconds]
jeremy04 has quit [Remote host closed the connection]
jeremy04 has joined #ruby
nanoz has joined #ruby
hotpancakes has joined #ruby
stobijah has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
failshell has joined #ruby
axsuul has quit [Ping timeout: 252 seconds]
jtdoncas has quit [Ping timeout: 264 seconds]
leafybasil has quit [Read error: Connection reset by peer]
leafybasil has joined #ruby
hobodave has joined #ruby
rodferso1 has joined #ruby
autrilla has joined #ruby
tmtwd has joined #ruby
towski_ has quit [Remote host closed the connection]
rodfersou has quit [Ping timeout: 240 seconds]
pengin has joined #ruby
chthon has quit [Quit: Ex-Chat]
cbednarski has joined #ruby
bricker has joined #ruby
leafybasil has quit [Ping timeout: 260 seconds]
leafybas_ has joined #ruby
Rutix has quit []
wldcordeiro has quit [Ping timeout: 244 seconds]
zendrix has joined #ruby
_blizzy_ has quit [Ping timeout: 240 seconds]
skade has joined #ruby
stan has quit [Ping timeout: 246 seconds]
michaeldeol has joined #ruby
saddad has quit [Ping timeout: 250 seconds]
Averna has joined #ruby
rakm has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
Beam has joined #ruby
tmtwd has quit [Ping timeout: 260 seconds]
Beam has quit [Client Quit]
paradoja has quit [Ping timeout: 260 seconds]
j_mcnally has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
jhooker has quit [Ping timeout: 246 seconds]
programmerq has quit [Remote host closed the connection]
rakm has joined #ruby
decoponio has quit [Quit: Leaving...]
rubie has joined #ruby
programmerq has joined #ruby
iloverubynoob has joined #ruby
arup_r has quit [Ping timeout: 244 seconds]
knrz has quit [Quit: Textual IRC Client: www.textualapp.com]
jpfuentes2 has joined #ruby
mary5030 has joined #ruby
danzilio_ has joined #ruby
hobodave has quit [Quit: Computer has gone to sleep.]
<jhass> !topic version Ruby 2.2.3; 2.1.7; 2.0.0-p647
mary5030 has quit [Remote host closed the connection]
dr3w has joined #ruby
robh71 has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
tmtwd has joined #ruby
<jhass> apeiros: ^ did you ever test this? :P
<apeiros> it's a bit finicky :/
mary5030 has joined #ruby
csmb_ is now known as csmb
<apeiros> and yes, I have used it successfully at least once :D
jhass 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/
<apeiros> thx
* havenwood does the 2.2.3 dance
<apeiros> and hey! now I don't have to change the topic in a second channel anymore! :D
hobodave has joined #ruby
RobertBirnie has joined #ruby
j_mcnally has joined #ruby
demonlove has joined #ruby
j4cknewt has joined #ruby
oo_ has quit [Remote host closed the connection]
danzilio has quit [Quit: My computer has fallen asleep!]
danzilio_ is now known as danzilio
Marsupermammal has joined #ruby
Musashi007 has joined #ruby
northfurr has joined #ruby
danzilio_ has joined #ruby
jtdoncas has joined #ruby
iloverubynoob has quit [Ping timeout: 244 seconds]
momomomomo_ has joined #ruby
troulouliou_div2 has quit [Quit: Leaving]
sdwrage has quit [Quit: This computer has gone to sleep]
<Psi-Jack> Hmm? second channel? heh
momomomomo has quit [Ping timeout: 256 seconds]
momomomomo_ is now known as momomomomo
benlieb has joined #ruby
iwaffles has quit [Quit: iwaffles]
Asher has quit [Read error: Connection reset by peer]
Asher has joined #ruby
linuxboytoo has quit [Remote host closed the connection]
bronson has joined #ruby
isohexane has joined #ruby
ruurd has quit [Quit: ZZZzzz…]
danzilio_ has quit [Client Quit]
<michael_mbp> hey all
<michael_mbp> How can I use Bundler's module to figure out the path to an installed gem?
linuxboytoo has joined #ruby
bruno- has joined #ruby
<michael_mbp> Bundler.locked_gems.dependencies.select { |d| d.name == "rails" }
tmtwd has quit [Ping timeout: 245 seconds]
j4cknewt_ has joined #ruby
c0m0 has quit [Ping timeout: 240 seconds]
<michael_mbp> gives me an instance of Gem::Dependency
bronson has quit [Remote host closed the connection]
j4cknewt has quit [Ping timeout: 240 seconds]
RobertBirnie has quit [Ping timeout: 260 seconds]
bronson has joined #ruby
rbowlby has joined #ruby
rbowlby has quit [Remote host closed the connection]
pragmatism has joined #ruby
dseitz has quit [Ping timeout: 265 seconds]
ckinniburgh has joined #ruby
RobertBirnie has joined #ruby
Papierkorb has joined #ruby
j4cknewt has joined #ruby
fantazo has joined #ruby
radgeRayden__ has joined #ruby
rbennacer has quit [Remote host closed the connection]
j4cknewt_ has quit [Ping timeout: 252 seconds]
bruno- has quit [Ping timeout: 245 seconds]
<Papierkorb> Hi. I have some code with quite some where I put a string into a case statement, the when statements use regex's to match and the when bodies evaluate to something using $1, $2, .. - Now, rubocop is complaining about those perl style backrefs. What's the "proper" way to do that?
northfurr has quit [Quit: northfurr]
face has joined #ruby
robh71 has joined #ruby
<Papierkorb> having a gazillion elsif's instead to use string#match would be much less readable
<jhass> according to rubocop, Regexp.last_match
faces has quit [Ping timeout: 246 seconds]
platzhirsch has joined #ruby
solars has joined #ruby
<michael_mbp> ha got it.
<Papierkorb> jhass: thanks. What do you think though? Is #{$1} more harmful than the much longer #{Regexp.last_match 1} ?
<jhass> haven't made my mind up yet
RegulationD has quit [Remote host closed the connection]
<jhass> third variant would be $~[1]
chinmay_dd has joined #ruby
<adaedra> I usually do match = $~ just after myself and use my variable
<Papierkorb> well i won't replace a global for another one heh ..
Musashi007 has quit [Quit: Musashi007]
icarus has quit [Ping timeout: 246 seconds]
radgeRayden_ has quit [Ping timeout: 255 seconds]
fgo has joined #ruby
j4cknewt has quit [Ping timeout: 265 seconds]
dr3w has quit [Quit: WeeChat 1.2]
bb010g has quit [Quit: Connection closed for inactivity]
cornerma1 has joined #ruby
lannonbr has quit [Quit: WeeChat 1.2]
<Papierkorb> Also, a related question, those functions are quite long (text processing/conversion ..), and thus rubocop complains about almost every complexity issue it has linters for. But how should you, if at all, split them up in a sensible fashion? Especially when it comes to parsers where you have a small stack ("stack = [ ]"), passing that around is really tedious, and using instance variables for that looks like a hack too
j_mcnall_ has joined #ruby
ddv has quit [Changing host]
ddv has joined #ruby
freerobby has joined #ruby
Jackneill has joined #ruby
joelataylor has quit [Quit: Lingo: www.lingoirc.com]
j_mcnal__ has joined #ruby
j4cknewt has joined #ruby
djbkd has joined #ruby
j_mcnally has quit [Ping timeout: 264 seconds]
skydiver has joined #ruby
fgo has quit [Ping timeout: 260 seconds]
christiandsg has quit [Remote host closed the connection]
cornerman has quit [Ping timeout: 260 seconds]
cornerma1 is now known as cornerman
ahmetkapikiran has joined #ruby
dopamean1 has joined #ruby
headius_ is now known as headius
BloodyHistory has joined #ruby
j_mcnall_ has quit [Ping timeout: 252 seconds]
j_mcnal__ has quit [Read error: No route to host]
anon_ has quit [Ping timeout: 255 seconds]
j_mcnally has joined #ruby
zendrix has quit [Remote host closed the connection]
paulcsmith_ has joined #ruby
zendrix has joined #ruby
failshell has quit [Remote host closed the connection]
anon has joined #ruby
bnizzle has quit [Read error: Connection reset by peer]
ta has joined #ruby
neohunter has joined #ruby
anon is now known as Guest42431
robh71 has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
dopamean_ has quit [Ping timeout: 244 seconds]
tkuchiki has quit [Remote host closed the connection]
<neohunter> what is the best way to convert quick this {a: 1, b: 2, c: 3} into this [[:a, 1], [:b, 2], [:c, 3]]
skydiver has quit [Ping timeout: 250 seconds]
<mistym> neohunter: #to_a
axsuul has joined #ruby
tkuchiki has joined #ruby
hahuang61 has joined #ruby
sdwrage has joined #ruby
dojobo has joined #ruby
Contigi has joined #ruby
icarus has joined #ruby
zendrix has quit [Remote host closed the connection]
casadei_ has joined #ruby
Pupeno_ has quit [Quit: Leaving...]
tkuchiki has quit [Remote host closed the connection]
ruurd has joined #ruby
zendrix has joined #ruby
tkuchiki has joined #ruby
mary5030 has quit [Remote host closed the connection]
rbennacer has joined #ruby
mary5030 has joined #ruby
apofis has joined #ruby
towski_ has joined #ruby
davedev24 has joined #ruby
maletor has quit [Read error: Connection reset by peer]
davedev2_ has quit [Ping timeout: 246 seconds]
kies has quit [Ping timeout: 272 seconds]
demonlove has quit [Quit: Leaving]
j4cknewt has quit [Remote host closed the connection]
ledestin has joined #ruby
j4cknewt has joined #ruby
rcvalle has joined #ruby
platzhirsch has quit [Quit: Leaving.]
last_staff has quit [Ping timeout: 255 seconds]
mary5030 has quit [Ping timeout: 256 seconds]
platzhirsch has joined #ruby
Hounddog_ has quit [Remote host closed the connection]
pika_pika has quit [Quit: Leaving]
howdoi has quit [Quit: Connection closed for inactivity]
demonlove has joined #ruby
maletor has joined #ruby
hotpancakes has quit [Remote host closed the connection]
bap1313 has joined #ruby
einarj has quit [Ping timeout: 240 seconds]
apofis has quit [Quit: Textual IRC Client: www.textualapp.com]
christiandsg has joined #ruby
conor_ has quit [Remote host closed the connection]
BloodyHistory has quit [Quit: Textual IRC Client: www.textualapp.com]
rbowlby has joined #ruby
robh71 has joined #ruby
robh71 has quit [Client Quit]
tkuchiki has quit [Remote host closed the connection]
hahuang61 has quit [Ping timeout: 256 seconds]
Pisuke has quit [Ping timeout: 244 seconds]
rbowlby has quit [Remote host closed the connection]
einarj has joined #ruby
ruurd has quit [Quit: ZZZzzz…]
ishahnaz has quit []
rbowlby has joined #ruby
pengin has quit [Remote host closed the connection]
conor_ has joined #ruby
klaas_ is now known as klaas
mary5030 has joined #ruby
hahuang61 has joined #ruby
mary5030 has quit [Remote host closed the connection]
christiandsg has quit [Ping timeout: 265 seconds]
arup_r has joined #ruby
tkuchiki has joined #ruby
jeadr has quit [Remote host closed the connection]
<shevy> mistym \o/
mary5030 has joined #ruby
psy_ has quit [Ping timeout: 264 seconds]
pawnbox has joined #ruby
<mistym> shevy: o/
mrfoto has joined #ruby
Pisuke has joined #ruby
demonlove has quit [Quit: Leaving]
pengin_ has joined #ruby
jeadr has joined #ruby
demonlove has joined #ruby
bootstrappm has joined #ruby
nuttermb has quit [Ping timeout: 244 seconds]
dopamean1 has quit [Ping timeout: 240 seconds]
Semtex-H has quit []
einarj has quit [Ping timeout: 272 seconds]
sdwrage has quit [Quit: This computer has gone to sleep]
Hien has quit [Quit: leaving]
Hien has joined #ruby
decoponio has joined #ruby
dopamean_ has joined #ruby
einarj has joined #ruby
tkuchiki has quit [Remote host closed the connection]
demonlove has quit [Ping timeout: 246 seconds]
northfurr has joined #ruby
SuMo_D has joined #ruby
leafybas_ has quit [Remote host closed the connection]
<Psi-Jack> I'm definitely starting to see why people like ruby.
tkuchiki has joined #ruby
<shevy> yeah
<shevy> the free cookies are awesome
<jhass> ?cookie
<ruboto> here's your cookie:
chinmay_dd has quit [Ping timeout: 255 seconds]
diegoaguilar has quit [Remote host closed the connection]
<jhass> so sad shevy never gets any of these
ivanskie has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<Psi-Jack> Heh, looks like.... A blank cookie sheet.
<shevy> I only see how ruboto is being stuffed cookies
<shevy> what was the command that made ruboto munch them again?
diegoaguilar has joined #ruby
northfurr has quit [Client Quit]
<jhass> ?botsnack
<ruboto> nomnomnomnom
hotpancakes has joined #ruby
northfurr has joined #ruby
<momomomomo> I'm embarassed
<momomomomo> for this channel
demonlove has joined #ruby
demonlove has quit [Max SendQ exceeded]
<wmoxam>
<miah> im embarassed for humanity, so there.
<Psi-Jack> heh. Good one, miah
demonlove has joined #ruby
northfurr has quit [Client Quit]
<shevy> hah
<shevy> ruboto is fattening up nicely
hydrozen has joined #ruby
northfurr has joined #ruby
<havenwood> shevy: Have you compiled 2.2.3 yet?
<havenwood> shevy: Live in the now!
<shevy> if it is a tarball release!
<miah> it is
kr3ssh has quit [Ping timeout: 246 seconds]
<shevy> aha ok
<shevy> then I have to compile it
rdark has quit [Quit: leaving]
<miah> but its only a minor change for rubygems
<shevy> here for anyone to want to join: wget ftp://ftp.ruby-lang.org/pub/ruby/ruby-2.2.3.tar.xz
<miah> don't you mean 'ruby-install 2.2.3' ?
<miah> ;)
<shevy> no that installs into my home dir I think
demonlove has quit [Ping timeout: 246 seconds]
<jhass> good luck convincing shevy that sudo make install is a shitty idea for the average user
<shevy> long live global appdirs! \o/
<miah> =)
<shevy> make install is a great idea
<shevy> I do it all the time
pengin_ has quit [Remote host closed the connection]
<miah> me too
choke has joined #ruby
<havenwood> ruby-install ruby 2.2.3 --sha256 c745cb98b29127d7f19f1bf9e0a63c384736f4d303b83c4f4bda3c2ee3c5e41f
<shevy> yeah, no idea what jhass has
<havenwood> Or: rvm get master; rvm install ruby
<jhass> shevy: a package manager
<miah> pacman -Syu =)
icharlie has joined #ruby
ahmetkapikiran has quit [Quit: ahmetkapikiran]
mrfoto has quit []
<havenwood> On the cache branch of ruby-install (yay) just: ruby-install ruby
<jhass> yeah, gotta wait for anatolik
diegoaguilar has quit [Quit: Leaving]
pawnbox has quit [Remote host closed the connection]
<havenwood> Elves...
<shevy> lol
B1n4r10 has joined #ruby
<Psi-Jack> miah: Pfftt.
<shevy> I am sceptical of hobbits and elves since the lord of the rings movie... I still have nightmares when they hopped on the bed
<shevy> ruby-2.2.3 compiled \o/
diegoaguilar has joined #ruby
<shevy> now to install 200 gems...
<Psi-Jack> Whip out your Bundle file and install. :)
<jhass> huh? ABI didn't change
psy_ has joined #ruby
howdoico1 has joined #ruby
Torrieri has quit [Quit: Be back later ...]
<shevy> hmm
UtkarshRay has quit [Quit: Leaving]
ryanprior has joined #ruby
<shevy> ruby 2.2.3p173 (2015-08-18 revision 51636) [x86_64-linux] \o/
<shevy> >> RUBY_VERSION
<ruboto> shevy # => "2.2.0" (https://eval.in/418379)
<shevy> hah you lazy bot
B1n4r10 has quit [Client Quit]
<ryanprior> I'm writing a lot of "described_class.new(###)" in my rspec tests. Is there a shorthand for that? If not, is it a good idea to create one?
momomomomo has quit [Ping timeout: 265 seconds]
roolo has joined #ruby
momomomomo_ has joined #ruby
<jhass> subject { described_class.new }
platzhirsch has quit [Remote host closed the connection]
<jhass> mmh, isn't that even the default subject?
sdwrage has joined #ruby
kies has joined #ruby
einarj has quit [Ping timeout: 244 seconds]
dionysus69 has joined #ruby
baweaver has joined #ruby
einarj has joined #ruby
<michael_mbp> exit
<michael_mbp> lol
northfurr has quit [Ping timeout: 256 seconds]
demonlove has joined #ruby
<ryanprior> jhass: I'm glad I asked, subject seems like what I'm looking for.
demonlove has quit [Max SendQ exceeded]
mois3x has joined #ruby
sinkensa_ has quit [Read error: Connection reset by peer]
Exuma has joined #ruby
failshell has joined #ruby
conor_ has quit [Remote host closed the connection]
demonlove has joined #ruby
sinkensabe has joined #ruby
northfurr has joined #ruby
pengin has joined #ruby
roolo has quit [Ping timeout: 250 seconds]
<ryanprior> so given that my subject is described_class.new, how do I pass arguments to new in my test?
hobodave has quit [Quit: Computer has gone to sleep.]
<jhass> don't think you can
<shevy> upgrading ruby feels like taking a quick shower, gets off with the old dirt!
<shevy> I could swear that something has changed in regards to warnings... I seem to get new ones now
<ryanprior> jhass: yeah that's what I'm reading
crayfishx has quit [Ping timeout: 252 seconds]
casadei_ has quit []
sylvain31 has joined #ruby
<ryanprior> jhass: problem is, I want to pass something different to new for every test
RegulationD has joined #ruby
<jhass> I wonder if something like describe Foo do; let(:args) { default }; subject { described_class.new(args) }; context "bar"; let(:args) { bar }; ... works
axsuul has quit [Ping timeout: 245 seconds]
fgo has joined #ruby
<Papierkorb> https://rubygems.org is down D:
lannonbr has joined #ruby
<jhass> seems still up here
<havenwood> Papierkorb: https://status.rubygems.org
<havenwood> Papierkorb: All green.
<havenwood> Papierkorb: http://www.fastly-debug.com
<Papierkorb> gem install doesn't do anything here, hitting ^C says it's hanging in select()
<miah> maybe your network does notwork
<Papierkorb> well, for one I'm in here chatting, so that counts for something
<Papierkorb> google has a usual ping. maybe my ISP bricked one of their backbones again though
Averna has quit [Quit: Ex-Chat]
<dcope> hey all, why does CGI escape not use %20 for spaces and instead it uses +?
zendrix has quit [Remote host closed the connection]
<jhass> because it's valid
RegulationD has quit [Ping timeout: 256 seconds]
<jhass> no deeper reason
ishahnaz has joined #ruby
<dcope> :/
lkba has quit [Ping timeout: 246 seconds]
<jhass> >> require "uri"; URI.escape("http://example.org/foo bar")
<jhass> for maximum consistency!
airportyh has joined #ruby
pietr0 has joined #ruby
<airportyh> Hello, has anyone successfully done CTE with Arel? I can’t even get the example to work
OrbitalKitten has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<jhass> airportyh: I prospect better luck with arel help in #RubyOnRails
decoponyo has joined #ruby
casadei has joined #ruby
<airportyh> thanks jhass
<shevy> this is weird
<shevy> the latest ruby has a different gem version but that one is not offered here https://rubygems.org/pages/download
axsuul has joined #ruby
fgo has quit [Ping timeout: 240 seconds]
puppeh_ has joined #ruby
<puppeh_> does anybody knows why `URI.parse('http:invalid.com')` does not raise an error?
devoldmx has joined #ruby
sdwrage_ has joined #ruby
decoponyo has quit [Read error: Connection reset by peer]
<jhass> puppeh_: because it's a valid RFC3986 URI
<dfockler> BOOM!
sdwrage has quit [Ping timeout: 245 seconds]
<dcope> jhass: URI.escape doesn't escape parens
baweaver has quit [Remote host closed the connection]
<puppeh_> jhass: but then why URI.parse('http:invalid.com').host returns `nil`?
<dcope> nor does it escape quotes
dionysus69 has quit [Ping timeout: 252 seconds]
foureight84____ has joined #ruby
Hien has quit [Ping timeout: 245 seconds]
decoponio has quit [Ping timeout: 246 seconds]
BloodyHistory has joined #ruby
deol has joined #ruby
Hien has joined #ruby
BloodyHistory has quit [Client Quit]
JoshGlzBrk has joined #ruby
blackmesa has joined #ruby
<drbrain> puppeh_: it is in the opaque part
<drbrain> there's no host there because the host follows //
postmodern has joined #ruby
dbugger has left #ruby ["Leaving"]
Guest42431 has quit [Ping timeout: 264 seconds]
<puppeh_> drbrain: so is that correct behavior?
devoldmx has quit [Ping timeout: 250 seconds]
Illusioneer1 has quit [Ping timeout: 255 seconds]
<puppeh_> I mean, the user who probably calls the host on that URI means she probably wanted to write http:// instead of http:
<jhass> puppeh_: you might want to read RFC3986, something worth doing when working with the web
<drbrain> puppeh_: it's described in RFC2396
<jhass> second guessing your user input is your job, not stdlib's
michaeldeol has quit [Ping timeout: 265 seconds]
sdwrage_ has quit [Ping timeout: 246 seconds]
<puppeh_> I see, ok
linuxboy_ has joined #ruby
foureight84___ has quit [Ping timeout: 256 seconds]
<jhass> 2396 is obsoleted by 3986
Exuma has quit []
<drbrain> yeah, but URI doesn't seem to implement 3986
jeanlinux has quit [Remote host closed the connection]
banister has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<drbrain> according to the table in D.2 of 3986, opaque_part is now path-rootless, so the behavior is still correct
anon has joined #ruby
anon is now known as Guest13929
ta has quit [Remote host closed the connection]
linuxboytoo has quit [Ping timeout: 260 seconds]
JoshGlzBrk has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
jhooker has joined #ruby
ta has joined #ruby
jeanlinux has joined #ruby
crayfishx has joined #ruby
JoshGlzBrk has joined #ruby
sylvain31 has quit [Quit: Leaving]
hotpancakes has quit [Remote host closed the connection]
leafybasil has joined #ruby
hinbody has quit [Read error: Connection reset by peer]
radgeRayden__ has quit [Ping timeout: 255 seconds]
hotpancakes has joined #ruby
hobodave has joined #ruby
baweaver has joined #ruby
pdoherty has joined #ruby
_blizzy_ has joined #ruby
hinbody has joined #ruby
einarj has quit [Ping timeout: 246 seconds]
bruno- has joined #ruby
ramfjord has joined #ruby
jcdesimp has joined #ruby
ndrei has quit [Ping timeout: 255 seconds]
icarus has quit [Ping timeout: 264 seconds]
neohunter has quit [Ping timeout: 244 seconds]
christiandsg has joined #ruby
einarj has joined #ruby
tmtwd has joined #ruby
Cust0sLim3n has quit [Ping timeout: 272 seconds]
hydrozen has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
airportyh has quit [Quit: airportyh]
banister has joined #ruby
joneshf-laptop_ has quit [Ping timeout: 240 seconds]
ndrei has joined #ruby
icarus has joined #ruby
zendrix has joined #ruby
_blizzy_ has quit [Read error: Connection reset by peer]
jeadr has quit [Remote host closed the connection]
bmurt has joined #ruby
crayfishx has quit [Ping timeout: 256 seconds]
zendrix has quit [Remote host closed the connection]
finisherr has joined #ruby
jeadr has joined #ruby
christiandsg has quit [Ping timeout: 265 seconds]
einarj has quit [Ping timeout: 255 seconds]
dionysus69 has joined #ruby
_blizzy_ has joined #ruby
tmtwd has quit [Ping timeout: 240 seconds]
einarj has joined #ruby
crayfishx has joined #ruby
jenrzzz has joined #ruby
ponga has quit [Quit: Connection closed for inactivity]
RegulationD has joined #ruby
car has joined #ruby
pengin has quit [Remote host closed the connection]
baroquebobcat has quit [Quit: baroquebobcat]
OrbitalKitten has joined #ruby
polly_wog has joined #ruby
Wolland has joined #ruby
Mojo_Nixon has quit [Quit: Textual IRC Client: www.textualapp.com]
nux443 has joined #ruby
rakm has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
stamina has quit [Ping timeout: 256 seconds]
car has quit [Client Quit]
baroquebobcat has joined #ruby
ndrei has quit [Ping timeout: 255 seconds]
bronson has quit [Remote host closed the connection]
spider-mario has joined #ruby
benlieb has quit [Quit: benlieb]
Cust0sLim3n has joined #ruby
AlexRussia_ has quit [Ping timeout: 244 seconds]
ndrei has joined #ruby
suchness has quit [Remote host closed the connection]
jeadr has quit [Remote host closed the connection]
pengin has joined #ruby
chichou has joined #ruby
j_mcnally has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
decoponio has joined #ruby
jeadr has joined #ruby
hotpancakes has quit [Remote host closed the connection]
yfeldblum has joined #ruby
Voker57 has quit [Ping timeout: 264 seconds]
tmtwd has joined #ruby
hinbody_ has joined #ruby
fantazo has quit [Ping timeout: 265 seconds]
Illusioneer has joined #ruby
rubie has quit [Remote host closed the connection]
mozzarella has quit [Quit: WeeChat 1.2]
yfeldblum has quit [Remote host closed the connection]
yfeldblum has joined #ruby
The_Phoenix has quit [Read error: Connection reset by peer]
choke has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
momomomomo_ has quit [Quit: momomomomo_]
rubie has joined #ruby
hinbody has quit [Ping timeout: 252 seconds]
choke has joined #ruby
chicken_wangs has joined #ruby
hobodave has quit [Quit: Computer has gone to sleep.]
nscheurich has joined #ruby
Blue_Ice_ is now known as Blue_Ice
lwu has quit [Ping timeout: 246 seconds]
jeanlinux has quit [Remote host closed the connection]
hotpancakes has joined #ruby
tmtwd has quit [Ping timeout: 245 seconds]
yfeldblum has quit [Ping timeout: 255 seconds]
thermatix has joined #ruby
rubie has quit [Remote host closed the connection]
skydiver has joined #ruby
tkuchiki has quit [Remote host closed the connection]
baweaver has quit [Remote host closed the connection]
crayfishx has quit [Ping timeout: 256 seconds]
fantazo has joined #ruby
SolarSailor has joined #ruby
renderful has quit [Ping timeout: 264 seconds]
renderfu_ has joined #ruby
skydiver has quit [Ping timeout: 250 seconds]
rubie has joined #ruby
howdoico1 has quit [Ping timeout: 250 seconds]
hinbody has joined #ruby
rideh^ has joined #ruby
hydrozen has joined #ruby
nanoz has quit [Ping timeout: 272 seconds]
northfurr has quit [Ping timeout: 240 seconds]
hobodave has joined #ruby
jtdoncas has quit [Ping timeout: 245 seconds]
hinbody_ has quit [Ping timeout: 246 seconds]
tmtwd has joined #ruby
rideh has quit [Ping timeout: 265 seconds]
<Darkwater> using the built-in json module, how can I make to_json use to_h if an object doesn't have to_json?
zendrix has joined #ruby
<Darkwater> I could def to_json; to_h.to_json; end on relevant objects but I really don't want to do that on everything
einarj has quit [Read error: Connection reset by peer]
Violentr has quit [Ping timeout: 244 seconds]
einarj_ has joined #ruby
<Darkwater> in the end I want to convert a hash to json, but some elements deep in that hash are custom classes that should only have to_h and not to_json
dseitz has joined #ruby
fgo has joined #ruby
crayfishx has joined #ruby
nettoweb has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
chichou has quit [Remote host closed the connection]
dionysus69 has quit [Ping timeout: 245 seconds]
chichou has joined #ruby
mhib has quit [Remote host closed the connection]
shmilan has joined #ruby
juanpaucar has quit [Remote host closed the connection]
sshuff|gone is now known as sshuff
rippa has quit [Quit: {#`%${%&`+'${`%&NO CARRIER]
eminencehc has quit [Remote host closed the connection]
hinbody has quit [Ping timeout: 265 seconds]
dumdedum has quit [Quit: foo]
<centrx> Darkwater, Make a module and include it in any classes you want to have that functionality?
bweston has joined #ruby
hinbody has joined #ruby
<Darkwater> might as well put def to_json; to_h.to_json; end then
decaff has joined #ruby
bhorn1 is now known as bhorn1|away
<Darkwater> was thinking of doing some trickery to call that on objects that don't have to_json
mistermocha has joined #ruby
fgo has quit [Ping timeout: 260 seconds]
SuMo_D has quit [Quit: Off into this... Real world place...]
jtdoncas has joined #ruby
Torrieri has joined #ruby
Torrieri has joined #ruby
Violentr has joined #ruby
tmtwd has quit [Ping timeout: 246 seconds]
northfurr has joined #ruby
<jhass> Darkwater: define def as_json
Kallis has joined #ruby
<jhass> and you really should do that for everything (prolly in some baseclass / common module)
hinbody has quit [Ping timeout: 252 seconds]
hinbody has joined #ruby
centrx has quit [Quit: "You cannot fix a machine by just power-cycling it with no understanding of what is going wrong."]
<Darkwater> jhass: think I'm just going to reopen Object for this
<Darkwater> I'd expect this to be default behaviour
<jhass> >> Object.new.to_h
<ruboto> jhass # => undefined method `to_h' for #<Object:0x41b1c3bc> (NoMethodError) ...check link for more (https://eval.in/418419)
<jhass> doesn't make sense as default behavior
mistermocha has quit [Ping timeout: 255 seconds]
rideh has joined #ruby
havenwood has quit [Quit: Textual IRC Client: www.textualapp.com]
decaff has quit [Quit: Leaving...]
<Darkwater> how about a method_missing that checks if to_h exists?
einarj_ has quit [Ping timeout: 255 seconds]
<Darkwater> and to clarify, I'd expect the json module to check for both to_json and to_h
rideh^ has quit [Ping timeout: 246 seconds]
baweaver has joined #ruby
<jhass> sounds too slow for default behavior
<jhass> >> require "json"; 6.to_json
<ruboto> jhass # => "6" (https://eval.in/418422)
nux443 has quit [Ping timeout: 260 seconds]
<jhass> note that not only objects are valid for the root of a json document these days
zendrix has quit [Remote host closed the connection]
<Darkwater> well, at least in my situation they are
<Darkwater> I'll just slam a to_h in every object for now then
JoshGlzB_ has joined #ruby
einarj has joined #ruby
zendrix has joined #ruby
j_mcnally has joined #ruby
stevednd has quit [Ping timeout: 250 seconds]
devoldmx has joined #ruby
thermatix has quit [Ping timeout: 244 seconds]
nanoz has joined #ruby
stamina has joined #ruby
JoshGlzBrk has quit [Ping timeout: 260 seconds]
ledestin has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
tmtwd has joined #ruby
yfeldblum has joined #ruby
yfeldblum has quit [Remote host closed the connection]
yfeldblum has joined #ruby
<Darkwater> oh great, the proper to_json -> to_h implementation is longer than I thought
<Darkwater> muh screen space :<
<baweaver> jbuilder
JoshGlzB_ has quit [Ping timeout: 252 seconds]
nikolakn has joined #ruby
northfurr has quit [Quit: northfurr]
<Darkwater> baweaver: json is temporary anyway since I want to implement my own serializer later, so I'd rather just use the built-in json stuff
devoldmx has quit [Ping timeout: 244 seconds]
pepperbreath1 has joined #ruby
rakm has joined #ruby
<baweaver> fair
bmurt has quit [Read error: Connection reset by peer]
acovrig has joined #ruby
Musashi007 has joined #ruby
pepperbreath has quit [Ping timeout: 256 seconds]
foureight84_____ has joined #ruby
OrbitalKitten has quit [Quit: Textual IRC Client: www.textualapp.com]
bmurt has joined #ruby
hahuang61 has quit [Ping timeout: 245 seconds]
foureight84____ has quit [Remote host closed the connection]
northfurr has joined #ruby
jerius has quit [Quit: /quit]
<acovrig> I’m using active_record in ruby, which is better/more efficient: `Event.create(colum stuffs here) if not Event.find_by(unique column)` or `begin Event.create(column stuffs here) rescue <unique contrstraint thing here> end`?
yqt has joined #ruby
crazydiamond has joined #ruby
zendrix has quit [Remote host closed the connection]
einarj has quit [Ping timeout: 255 seconds]
lkba has joined #ruby
hahuang65 has joined #ruby
foureight84_____ has quit [Ping timeout: 256 seconds]
drbrain has quit [Remote host closed the connection]
foureight84_____ has joined #ruby
klingeldraht has quit [Ping timeout: 250 seconds]
<[spoiler]> ?rails acovrig
<ruboto> acovrig, Please join #RubyOnRails for Rails questions. You need to be identified with NickServ, see /msg NickServ HELP
<bricker> acovrig: You can use Event.exists?() which will perform an efficient COUNT query
einarj has joined #ruby
<jhass> acovrig: find_or_create_by,
northfurr has quit [Quit: northfurr]
fantazo has quit [Ping timeout: 256 seconds]
n_blowna_ has quit [Remote host closed the connection]
chichou has quit [Ping timeout: 260 seconds]
n_blownapart has joined #ruby
iloverubynoob has joined #ruby
j4cknewt has quit [Remote host closed the connection]
northfurr has joined #ruby
jerius has joined #ruby
stevednd has joined #ruby
xet7 has joined #ruby
Rutix has joined #ruby
Rutix has joined #ruby
klingeldraht has joined #ruby
troyready has quit [Remote host closed the connection]
momomomomo has joined #ruby
chichou has joined #ruby
andywojo has quit [Ping timeout: 272 seconds]
howdoico1 has joined #ruby
roolo has joined #ruby
casadei has quit [Remote host closed the connection]
ivanskie has joined #ruby
tmtwd has quit [Ping timeout: 245 seconds]
baweaver has quit [Remote host closed the connection]
puppeh_ has quit [Remote host closed the connection]
XF has joined #ruby
einarj has quit [Ping timeout: 272 seconds]
yeticry has quit [Ping timeout: 244 seconds]
<XF> anyone help
<XF> what to do?
joneshf-laptop has joined #ruby
<XF> anyone can help?
<pipework> XF: not take pictures of text!
<XF> pipework ok
whiteline has quit [Remote host closed the connection]
<XF> pipework i should pastebin?
shmilan has quit [Ping timeout: 255 seconds]
banister has quit [Read error: Connection reset by peer]
<XF> pipework can you help? :)
roolo has quit [Ping timeout: 240 seconds]
einarj has joined #ruby
<pipework> XF: See /topic for the pasting service to use. I'll take a look after you're done with that, but if I can't help, be patient and wait a while before repeating your request for help. :)
yeticry has joined #ruby
<Darkwater> ?gist
<ruboto> https://gist.github.com - Multiple files, syntax highlighting, even automatically with matching filenames, can be edited
<XF> ok
Musashi007 has quit [Quit: Musashi007]
<Darkwater> XF: did you install domainatrix?
kadoppe has quit [Ping timeout: 240 seconds]
lkba has quit [Read error: Connection reset by peer]
shmilan has joined #ruby
<XF> done :D
<pipework> XF: Is domainatrix a gem?
<pipework> It appears not to be in your current load path, so if it's a gem, you may need to install it, or if it is installed perhaps you might need to locate it on disk and make sure that path is in $LOAD_PATH
yfeldblum has quit [Quit: Leaving...]
kadoppe has joined #ruby
DLSteve has joined #ruby
shadoi has joined #ruby
<XF> ah i forgot to install gem
<XF> .gem
<XF> done gem
<XF> what next?
<XF> darkwater it says no package domainatrix
hinbody has quit [Quit: leaving]
<XF> pipework there?
<Darkwater> XF: if you can't install it using gem you should find another way of installing it
djbkd has quit [Remote host closed the connection]
<pipework> XF: I'm not sure what you're saying you did.
<Darkwater> maybe fetch it from github or wherever
<pipework> You'll want to edit your gist and add new data.
<XF> i did apt-get install gem
juanpaucar has joined #ruby
luksaur has joined #ruby
<XF> when i do apt-get install domainatrix it says no package
<chichou> it's on rubygems though
troyready has joined #ruby
<chichou> gem install gemname
iloverubynoob has quit [Remote host closed the connection]
yfeldblum has joined #ruby
<XF> chichou i did gem install domainatrix
<XF> but still same error
<Coraline> No apt-get
<XF> i did no apt-get now
<Coraline> There's no way that you got the same error then.
einarj has quit [Ping timeout: 255 seconds]
yeticry has quit [Ping timeout: 246 seconds]
yeticry has joined #ruby
<Coraline> Now follow the errors. gem install uuid
Averna has joined #ruby
whiteline has joined #ruby
<chichou> you said same error, actually it was not true :)
momomomomo_ has joined #ruby
gard has joined #ruby
einarj has joined #ruby
<chichou> try to read what the error output and you won't need our help
duncannz has quit [Ping timeout: 250 seconds]
<XF> worked :D
<XF> ty
momomomomo has quit [Ping timeout: 244 seconds]
momomomomo_ is now known as momomomomo
baweaver has joined #ruby
<chichou> liked the "gem install gemname" though
banister has joined #ruby
acovrig has quit [Quit: acovrig]
stef_204 has quit [Quit: KVIrc 4.2.0 Equilibrium http://www.kvirc.net/]
youch has joined #ruby
<pipework> XF: Are you trying to learn ruby, or just trying to run a script?
rbowlby has quit [Remote host closed the connection]
<pipework> You might want to go through some ruby tutorials if you're learning ruby
hotpancakes has quit [Remote host closed the connection]
ryanprior has quit [Remote host closed the connection]
bronson has joined #ruby
socialjackie has quit [Quit: Leaving]
rbowlby has joined #ruby
rubie has quit [Remote host closed the connection]
dstarh has joined #ruby
fgo has joined #ruby
einarj has quit [Ping timeout: 240 seconds]
iloverubynoob has joined #ruby
tuxero has joined #ruby
jpfuentes2 has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
solars has quit [Ping timeout: 264 seconds]
jpfuentes2 has joined #ruby
einarj has joined #ruby
toretore has joined #ruby
dojobo has quit [Quit: Leaving]
momomomomo has quit [Quit: momomomomo]
tmtwd has joined #ruby
zendrix has joined #ruby
fgo has quit [Ping timeout: 260 seconds]
rubie has joined #ruby
jerius has quit [Quit: /quit]
sinkensabe has quit [Remote host closed the connection]
codecop has quit [Remote host closed the connection]
arooni-mobile has joined #ruby
rakm has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
Cust0sLim3n has quit [Ping timeout: 272 seconds]
christiandsg has joined #ruby
joneshf-laptop has quit [Ping timeout: 250 seconds]
<chichou> sorry, but what is that partial backtrace?
mistermocha has joined #ruby
Konstruktionist has joined #ruby
nux443 has joined #ruby
<XF> what?
blackmesa has quit [Ping timeout: 260 seconds]
<pipework> XF: I'm not sure why you're only giving us a tiny bit of the text.
<pipework> .Trust me, nothing you're doing is remotely interesting enough for us to steal, so just mask or change passphrases and other credentials, but leave the rest alone.
nerio has quit [Ping timeout: 272 seconds]
skade has quit [Quit: Computer has gone to sleep.]
diegoviola has quit [Quit: WeeChat 1.2]
renderful has joined #ruby
joneshf-laptop has joined #ruby
codecop has joined #ruby
drbrain has joined #ruby
bronson has quit [Remote host closed the connection]
choke has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
radgeRayden has joined #ruby
christiandsg has quit [Ping timeout: 265 seconds]
nikolakn has quit [Quit: Leaving]
codecop has quit [Remote host closed the connection]
renderfu_ has quit [Ping timeout: 252 seconds]
Kallis has quit [Read error: Connection reset by peer]
mistermocha has quit [Ping timeout: 265 seconds]
Cust0sLim3n has joined #ruby
hotpancakes has joined #ruby
matp has quit [Remote host closed the connection]
sdwrage has joined #ruby
matp_ has joined #ruby
pengin has quit []
chipotle has joined #ruby
deol has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<chipotle> anyone here use OS X primarily? i want to try out dev environments to learn ruby and various stacks; is the best way to use vagrants or should i deploy a VM of debian or whatever?
michaeldeol has joined #ruby
PaulCape_ has joined #ruby
michaeldeol has quit [Remote host closed the connection]
axsuul has quit [Read error: Connection reset by peer]
nettoweb has joined #ruby
hotpancakes has quit [Ping timeout: 244 seconds]
<pipework> chipotle: I've take both approaches and they have their benefits. If your application can work equally whale on OSX only, then why not?
PaulCapestany has quit [Ping timeout: 252 seconds]
Violentr has quit [Ping timeout: 272 seconds]
<chipotle> i'm afraid to screw something up
<chipotle> so i ratehr have a sandbox
<pipework> chipotle: Never be afraid.
nettoweb has quit [Max SendQ exceeded]
<pipework> It's just a computer.
<pipework> You'll learn a lot more by breaking shit than you will by never screwing up.
nettoweb has joined #ruby
<chipotle> i can't afford for my main system to brick
<chipotle> it's nice to build in sandboxes
<chipotle> like when i build a drupal app, i used to build it inside a ubuntu vm
<chipotle> but it was slow
eminencehc has joined #ruby
<pipework> You won't "brick" anything
<chipotle> now that i'm learning ruby, i am afraid that a vm will slwo me down
<al2o3-cr> chipotle: then don't use vm
djbkd has joined #ruby
hotpancakes has joined #ruby
<pipework> Don't let the unknown unknowns give you paralysis. Be brave, be okay with breaking things, and know that unless you fuck up the hardware, you're probably going to fine.
rideh has quit [Read error: Connection reset by peer]
einarj has quit [Ping timeout: 250 seconds]
<al2o3-cr> chipotle: get a Pi(e)
jerius has joined #ruby
nscheurich1 has joined #ruby
rideh has joined #ruby
umgrosscol has quit [Remote host closed the connection]
crdpink has quit [Ping timeout: 244 seconds]
dfockler has quit [Remote host closed the connection]
crdpink2 has joined #ruby
failshell has quit []
frem has joined #ruby
juanpaucar has quit [Remote host closed the connection]
northfurr has quit [Quit: northfurr]
Violentr has joined #ruby
<al2o3-cr> chipotle: then the only thing yo can screw up is the crust :p
<ght> Question: I have an array that looks like this: myArr = [ {"id" => 1, "cl_id" => 12}, {"id" => 2, "cl_id" => 28}, {"id" => 3, "cl_id" => 93}]
nscheurich has quit [Ping timeout: 260 seconds]
benlieb has joined #ruby
<ght> Is there a technique for pulling the array element that contains "cl_id" => 93 without having to iterate through the array itself?
<ght> Or the array index, rather.
<jhass> .find
juanpaucar has joined #ruby
<ght> Ok, I'll read up on that, thank you.
<al2o3-cr> .detect
<jhass> that's an alias for .find
<al2o3-cr> ok
<al2o3-cr> sorry jhass
jamesaxl has joined #ruby
northfurr has joined #ruby
hotpancakes has quit [Ping timeout: 244 seconds]
jcdesimp has quit [Remote host closed the connection]
skade has joined #ruby
demonlove has quit [Remote host closed the connection]
einarj has joined #ruby
<al2o3-cr> why so many aliases?
ivanskie has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
bweston has quit [Ping timeout: 256 seconds]
jcdesimp has joined #ruby
rehat has joined #ruby
kr3ssh has joined #ruby
<pipework> al2o3-cr: because convenience
andywojo has joined #ruby
<pipework> I prefer the rhyming select, detect, reject, etc.
<al2o3-cr> convenience stores a costly though, no?
tommek has quit [Ping timeout: 264 seconds]
jeadr has quit [Remote host closed the connection]
<pipework> al2o3-cr: If that's your argument, ruby is not the language for you.
scottschecter has quit [Ping timeout: 240 seconds]
tommek has joined #ruby
<al2o3-cr> that's not an argument the sarcasm
<jhass> I do prefer select and reject too, but I find detect odd, it feels sort of like a predicate to me, the block form of include? basically
<al2o3-cr> detect/find same difference really
nscheurich has joined #ruby
jeadr has joined #ruby
hotpancakes has joined #ruby
skade has quit [Quit: Computer has gone to sleep.]
jerius_ has joined #ruby
skydiver has joined #ruby
<al2o3-cr> reduce/inject hmm, not to sure
jcdesimp has quit [Ping timeout: 250 seconds]
<jhass> I can visualize the operation better with inject, but that's probably it clicked for me while using inject
<pipework> al2o3-cr: You might avail yourself of the intent of the language designer. :)
<jhass> *because it
<dopie> anyone here ever work with the authorize.net api?
<jhass> ?anyone
<ruboto> Just ask your question, if anyone has or can, they will respond.
choke has joined #ruby
jerius has quit [Ping timeout: 240 seconds]
<dopie> ?everyone
<ruboto> I don't know anything about everyone
<dopie> haha
woobywoob has joined #ruby
<woobywoob> hello
<al2o3-cr> dopie: to re-iterate, just ask your Q
<woobywoob> anyone know how to group things by date in an index?
kefh has joined #ruby
<kefh> very good video, must see: https://www.youtube.com/watch?v=df4KB30K0UU
Violentr has quit [Ping timeout: 264 seconds]
<al2o3-cr> ?spam
<ruboto> I don't know anything about spam
<al2o3-cr> !ops
<ruboto> fflush, apeiros, banisterfiend, seanstickle, zzak, Mon_Ouie, Radar, Havenn, jhass, sevenseacat, miah, workmad3, drbrain, zenspider, slyphon, rubyhacker1, Coraline, Aria, ljarvis
<jhass> !ban kefh !P hate
kefh was banned on #ruby by ChanServ [kefh!*@*]
kefh was kicked from #ruby by ChanServ [Banned: hate]
<woobywoob> like somethings.each do |something|... and the items are laid out but grouped together y date
nscheurich1 has quit [Remote host closed the connection]
<woobywoob> by*
<drbrain> woobywoob: group_by?
<woobywoob> huh didn't know about that method
skydiver has quit [Ping timeout: 250 seconds]
<al2o3-cr> woobywoob: yeah, group_by would be you best solution
<drbrain> related to group_by is chunk
<drbrain> which gives you collections as they occur in your enumerable
<al2o3-cr> or partition
Marsupermammal has quit [Quit: Textual IRC Client: www.textualapp.com]
<drbrain> ↑ for two groups
<jhass> well while we're listing we should also mention slice_before and slice_after I guess
JoshL has quit [Read error: Connection reset by peer]
JoshL has joined #ruby
Coldblackice has joined #ruby
<jhass> which can provide cleaner implementations of some usecases of chunk
<drbrain> I think I've used chunk once
<chipotle> pipework: but isn't it hard to say run both a LEMP stack and a ruby stack at the same time? or like say you need two versions of ruby or two versions of php running?
<drbrain> but wow did I need exactly that
<jhass> I think I used all threes only in code challenges yet
hydrozen has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<jhass> chipotle: we got chruby/rvm/rbenv for running multiple Ruby versions, I can imagine the PHP community has something similar by now
<al2o3-cr> rvm my choice of choices
<Radar> what even is a lemp stack
<Radar> death to RVM.
mwlang has joined #ruby
<Radar> long live chruby+ruby-install
<al2o3-cr> noooooo
<al2o3-cr> :P
pdoherty has quit [Ping timeout: 265 seconds]
<al2o3-cr> each to their own I would guess
<al2o3-cr> whatever works for you
<jhass> yeah, nobody else does chruby+pacman :P
einarj has quit [Ping timeout: 244 seconds]
<al2o3-cr> :)
<al2o3-cr> maybe their not running arch
jeremy04_ has joined #ruby
casadei has joined #ruby
<al2o3-cr> Arch (for the elite) :p
<al2o3-cr> why you ask?
<jhass> they're afraid of exploring and breaking stuff (= will have a hard time at being a developer)
<Radar> rvm is a bloated piece of crap that will stab you in your back the moment you show it
<al2o3-cr> Radar: does it work though?
Rickmasta has quit [Ping timeout: 246 seconds]
<al2o3-cr> bad code is good code in someones eyes
centrx has joined #ruby
Rickmasta has joined #ruby
nux443 has quit [Ping timeout: 240 seconds]
jeremy04 has quit [Ping timeout: 256 seconds]
<al2o3-cr> linux basics and all that :P
dfockler has joined #ruby
nux443 has joined #ruby
User458764 has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
<baweaver> Are we back on distros again?
<al2o3-cr> yeah, arch all the way 8)
Ox0dea has joined #ruby
skade has joined #ruby
<baweaver> FreeBSD for me.
<Ox0dea> For seriously, though?
<al2o3-cr> yeah, that's cool too
einarj has joined #ruby
Konstruktionist has quit [Quit: Textual IRC Client: www.textualapp.com]
<baweaver> Servers tend to be OpenBSD, desktops FreeBSD variants.
roolo has joined #ruby
<al2o3-cr> Ox0dea: seriously what?
<baweaver> Mostly because I'm going through the kernel piece by piece at the moment.
<Ox0dea> I was asking baweaver if he uses FreeBSD as his daily driver.
choke has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<baweaver> OSX
<baweaver> Same difference
<al2o3-cr> not a chance
<al2o3-cr> osx is heavily modified
<baweaver> I was being facetious.
<al2o3-cr> i know :P
jackjackdripper has joined #ruby
krz has quit [Quit: WeeChat 1.2]
<baweaver> Darwin is a derivative of FreeBSD, that was the joke of it.
sshuff is now known as sshuff|gone
<Radar> glhf everyone. I'm going to use my time more productively.
<al2o3-cr> openbsd
<chipotle> other than the well grounded rubyist, are there some other books you can recommend to a beginner? i've used drupal for years but i want to build cool stuff and move to san francisco (i'm in nyc now), so i am trying to learn ruby, js, etc....
atomical_ has joined #ruby
<baweaver> Of course Windows is a derivative of Unix too
<chipotle> Radar: linux nginx mysql php
paulcsmith_ has quit [Quit: Be back later ...]
<chipotle> e is nginx
<al2o3-cr> of course
<baweaver> >> 'nginx'[0] == 'e'
<ruboto> baweaver # => false (https://eval.in/418457)
<baweaver> you and me both ruboto
<Coraline> chipotle: Practical Object Oriented Programming in Ruby
<baweaver> +1 ^
<al2o3-cr> POODR
<dfockler> +1 ^^
paulcsmith_ has joined #ruby
<al2o3-cr> saves a few chars :P
<baweaver> R4IA :D
<baweaver> Ah, seacat isn't on...
<al2o3-cr> rails, what is that?
<atmosx> chipotle: http://www.amazon.com/Beginning-Ruby-Novice-Professional-Experts/dp/1430223634 <-- for newbees. If you know basics then you could pick a more advanced book IMHO.
Torrieri has quit [Quit: Be back later ...]
<atmosx> but this one is pretty good to get you started
<Norrin> poopir
Jackneill has quit [Remote host closed the connection]
<al2o3-cr> I never read a book in my life :P
<Ox0dea> "Book" means what?
shmilan has quit [Ping timeout: 250 seconds]
<al2o3-cr> goosebumps
atomical has quit [Ping timeout: 255 seconds]
<Ox0dea> >> :Ruby.is_a?(Object) { |oriented| language }
<ruboto> Ox0dea # => true (https://eval.in/418458)
baweaver has quit [Remote host closed the connection]
<al2o3-cr> Ox0dea: what do you do with your day man haha
<Ox0dea> That's not mine.
shinnya has joined #ruby
<al2o3-cr> where did you find it then
<Ox0dea> It's from RubyKaigi.
<al2o3-cr> haha
blackmesa has joined #ruby
northfurr has quit [Quit: northfurr]
<Ox0dea> It's also not particularly cryptic or anything.
<al2o3-cr> Ox0dea: you mastered Ruby yet?
rideh has quit [Ping timeout: 244 seconds]
<Ox0dea> You'll have to define your term, but no.
bumbar_ has quit [Ping timeout: 244 seconds]
Ilyes512 has joined #ruby
<rehat> very new to Ruby and was wondering if there was a better way to swap a swap a hash https://gist.github.com/rehat/4878f05b45901cdda8d1
Hien has quit [Ping timeout: 252 seconds]
<al2o3-cr> what does mastered mean to you?
atomical_ has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<al2o3-cr> rehat: swap a swap?
<rehat> that was a typo
<rehat> lol
<al2o3-cr> :P
<woobywoob> i learned how here but i forgot
paulcsmith_ has quit [Quit: Be back later ...]
<woobywoob> how do i read ruby objects?
<al2o3-cr> woobywoob: rub the crystal ball :P
centrx has quit [Quit: "You cannot fix a machine by just power-cycling it with no understanding of what is going wrong."]
Hien has joined #ruby
choke has joined #ruby
paulcsmith_ has joined #ruby
uri_ has joined #ruby
fgo has joined #ruby
<woobywoob> [#<Post id: 2, title: "nice", content: "flavour"....
<woobywoob> stuff like that
<woobywoob> it wasn't like a normal array and i can't do post.title
dblessing has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<BraddPitt> you can just puts the object itself
iateadonut has quit [Quit: Leaving.]
<al2o3-cr> >> $>.instance_of? IO
<BraddPitt> which will print out a definition of the object's instance
<ruboto> al2o3-cr # => true (https://eval.in/418459)
<Ox0dea> woobywoob: You have an Array of Posts.
<woobywoob> i need just the title in the view
Pwnna has joined #ruby
<woobywoob> well i certainly can't access it like an array though
<Pwnna> under what condition does ruby call `const_missing`?
<jhass> Pwnna: if you access a constant in the module that the method is defined in that does not exist
<Pwnna> but how is that defined in the code?
<jhass> in MRI?
JoshL has quit []
michaeldeol has joined #ruby
benlieb has quit [Quit: benlieb]
<Pwnna> i suppose that would work
<Ox0dea> rehat: You might consider looking into #transpose and #to_h in this case.
<al2o3-cr> ^
dblessing has joined #ruby
<woobywoob> lol figured it out
<al2o3-cr> woobywoob: how?
<rehat> Ox0dea: nice, I will thanks
<woobywoob> i had to go two levels deep in to the array and then call it like a ruby attribute
jeadr has quit [Remote host closed the connection]
<al2o3-cr> woobywoob: really?
bmurt has quit []
<woobywoob> yes
yeticry_ has joined #ruby
fgo has quit [Ping timeout: 246 seconds]
<al2o3-cr> woobywoob: well done :)
n008f4g_ has quit [Ping timeout: 265 seconds]
djbkd has quit [Read error: Connection reset by peer]
<woobywoob> thanks
djbkd has joined #ruby
jinie has quit [Quit: ZNC - http://znc.in]
<woobywoob> there's still so much about ruby i don't know
<al2o3-cr> woobywoob: any other questions, don't hesitate to ask :)
yeticry has quit [Ping timeout: 260 seconds]
ips|malc has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
Rutix has quit []
jeadr has joined #ruby
<al2o3-cr> we're a friendly bunch here
jcdesimp has joined #ruby
bigbadbear has joined #ruby
sdothum has joined #ruby
IceyEC has quit [Quit: iceyec]
SolarSailor has quit [Quit: My Turing machine has gone to sleep. ZZZzzz…]
christiandsg has joined #ruby
<al2o3-cr> I feel like teaching today, god knows why
jinie has joined #ruby
<al2o3-cr> be a giver, not just a receiver :)
dblessing has quit [Ping timeout: 244 seconds]
<Pwnna> thanks! jhass :)
nfk has joined #ruby
choppington has quit [Ping timeout: 244 seconds]
<Ox0dea> jhass: Where do anonymous classes magically get names when you assign them to a constant?
<jhass> Pwnna: and more further down
blue_deref has quit [Quit: bbn]
<Pwnna> yeah i'll take a look
<jhass> Ox0dea: no idea, I just grepped this one :P
<Ox0dea> Oh. :(
<Ox0dea> >> foo = Class.new; [foo.name, Foo = foo, foo.name]
<ruboto> Ox0dea # => [nil, Foo, "Foo"] (https://eval.in/418461)
<Ox0dea> It must be making a call to rb_define_class_id(), but I can't find where.
<al2o3-cr> Ox0dea: the deep unknown is where they go :P
<jhass> I guess parse.y :D
SolarSailor has joined #ruby
SolarSailor has quit [Client Quit]
nfk has quit [Client Quit]
bronson has joined #ruby
mistermocha has joined #ruby
christiandsg has quit [Ping timeout: 265 seconds]
That1Guy has joined #ruby
blueOxigen has joined #ruby
bluOxigen has quit [Ping timeout: 246 seconds]
<apeiros> jhass: parse.y doesn't handle const_set, though
<apeiros> >> Object.const_set(:Fooby, x=Class.new); x.name
<ruboto> apeiros # => "Fooby" (https://eval.in/418462)
<apeiros> Ox0dea: maybe the code which handles constant assignment.
<jhass> heh, parse.y is the standard answer to "where does weird thing X happen" :P
<chipotle> atmosx: you don't recommend the well grounded rubyist?
<Norrin> any of you guys ever consider contributing to Diaspora?
rbennacer has quit [Remote host closed the connection]
Illusioneer has quit [Quit: Leaving.]
jerius_ has quit [Quit: /quit]
bronson has quit [Ping timeout: 255 seconds]
Wolland has quit [Remote host closed the connection]
<jhass> no, never
rodferso1 has quit [Quit: leaving]
<jhass> ?guys Norrin
<ruboto> Norrin, Though inclusion was probably intended, not everyone relates to being "one of the guys". Maybe consider using "folks", "all", "y'all", or "everyone" instead?
mistermocha has quit [Read error: Connection reset by peer]
hydrozen has joined #ruby
That1Guy has quit [Client Quit]
<Norrin> :-/
polly_wog has quit [Remote host closed the connection]
<Norrin> really?
devoldmx has joined #ruby
jerius has joined #ruby
sgambino has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<Norrin> i actually wondered if i recognized your nick
solars has joined #ruby
<Norrin> raven24 i remember
mistermocha has joined #ruby
jpfuentes2 has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
blueOxigen has quit [Ping timeout: 252 seconds]
skade has quit [Ping timeout: 244 seconds]
<Ox0dea> Raven24 appears to be a Polish funeral parlor.
benlieb has joined #ruby
shmilan has joined #ruby
ldnunes has quit [Quit: Leaving]
<Norrin> besides diaspora i don't know of any active ruby OSS projects that would be a good learning ground
jpfuentes2 has joined #ruby
<Norrin> back when i did diaspora even it was over my head. rails was really hard for me to grep circa rails 2/3
devoldmx has quit [Ping timeout: 255 seconds]
uri_ has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<Norrin> when I tried* disaspora. not that i was ever capable of making a commit
<jhass> discourse I guess
<mwlang> so I’m going to implement a simple “man in the middle” app. That basically takes bi-directional input over http or https and writes the request/response pairs to log files. The intent is not malicious. ;-) The intent is to capture real traffic happening in a production environment in order to build a mock test environment for exchanges happening between a current Rails server (with no test specs) and an COTS SOAP server not under our
<mwlang> control.
<miah> chef, puppet, sensu, all big ops tools written in ruby with big oss communities
<Ox0dea> Norrin: Rails is no harder to grep than any other collection of files.
hahuang65 has quit [Ping timeout: 256 seconds]
<mwlang> The question is: what should that MTM server be? My thought is Sinatra.
<BraddPitt> is there any way to mixin a module so that I can simply call foo() from within the including class? In other words, so I don't have to write Class.foo()
<pipework> mwlang: Why not just use existing software?
<Norrin> Ox0dea, opinion... looking at the docs recently... the api has gotten far better than it was
<mwlang> pipework: such as….
<Norrin> the docs included
mistermo_ has joined #ruby
<Norrin> but i was new to ruby also. still now it's hard for me to read
<pipework> mwlang: Whale, you're looking to implement a proxy, and one that terminates TLS. So I'd immediately think haproxy.
<Ox0dea> mwlang: Why not Charles?
baweaver has joined #ruby
jhooker has quit [Quit: Leaving]
mistermocha has quit [Read error: Connection reset by peer]
<Ox0dea> mitmproxy is Python, which is ?ot.
<al2o3-cr> BraddPitt: module_function or i missing the point
<Norrin> miah, i guess i'd have to find motivation in the project also. not being a web guy, i dont use those
<mwlang> pipework: one reasoning I have in mind is that this MTM server will have a dual role…as we start reimplementing the services provided by the old Rails app, we can bring the new portions up and go live and start retiring the old app route by route.
<bougyman> agreed, us a real proxy to proxy the requests to your app, and have your app forward the requests to the remote SOAP thingy.
<bougyman> *use
<miah> you're not a web person? neither are those projects.
skade has joined #ruby
<bougyman> what you use for your app could be whatever you feel comfy with.
nettoweb has quit [Read error: No route to host]
<mwlang> Ox0dea: Charles doesn’t have blue eyes, so he wouldn’t work as well as Sinatra.
<bougyman> sinatra, roda, plain rack, whatever.
gard has quit [Ping timeout: 260 seconds]
<BraddPitt> googling now al2o3-cr, thanks
ckinniburgh has quit [Quit: Leaving]
millerti has quit [Read error: Connection reset by peer]
<Norrin> miah, chef, puppet, aren't those server deployment tools?
<bougyman> they're IaaS frameworks.
<BraddPitt> al2o3-cr module_function or self.extend?
<bougyman> sensu is a monitoring suite.
<mwlang> and another extension on this MTM app is to forward incoming SOAP requests in parallel to both Rails apps for a short time and compare responses from both to ensure they’re responding identically.
jeadr has quit [Remote host closed the connection]
<bougyman> mwlang: again you'd do that with the real proxy (reverse proxy) on the inbound soap requests.
<Norrin> bougyman, sounds like web services
<bougyman> Norrin: infrastructure as a service is not 'web services'
reset has joined #ruby
<mwlang> bougyman: cool. I’ll go read up on haproxy then. If I can put it to use, then I’d definitely prefer not to write my own piece.
mistermo_ has quit [Ping timeout: 246 seconds]
<Norrin> it's useful to web people
<Norrin> the web devs i know use those tools
<bougyman> software as infrastructure is what chef, puppet, ansible, others are made for, which is used by IaaS (think AWS, Hadoop, Github) companies for continuous delivery.
jeadr has joined #ruby
<al2o3-cr> BraddPitt: module_function if I interpreting you right
<pipework> mwlang: Please avail yourself of the existing proxy servers that don't suck and won't be ungodly slow.
<bougyman> capacity management, monitoring, scaling on demand, all coordinated through the software (chef or puppet or salt or ansible or ______)
tmtwd has quit [Ping timeout: 245 seconds]
<BraddPitt> al2o3-cr don't they do the same thing? I'm just asking which is more Ruby-like
<bougyman> it's how wikimedia can run one of the busiest sites on the planet with a dozen people.
<Norrin> exactly. deploying and managing web servers
<Norrin> for example
<bougyman> not just web, but sure it can do web.
<Norrin> and often done
<mwlang> pipework: would be happy to! I didn’t realize they could proxy incoming requests to two targets yet return a selected target’s response back while logging both target’s responses in conjunction with the original incoming request.
<bougyman> behind that web is a ton of supporting services, in any case.
choke has quit [Quit: Textual IRC Client: www.textualapp.com]
paulcsmith_ has quit [Read error: Connection reset by peer]
<BraddPitt> somethign like this al2o3-cr https://gist.github.com/anonymous/397e54bb563181530b67
<bougyman> almost always a message bus, several data stores, caches, analysis and reporting engines.
paulcsmith_ has joined #ruby
DroidBurgundy has quit []
<bougyman> 'just web servers' would be a pretty useless stac k.
arup_r has quit [Quit: Leaving]
<pipework> mwlang: There's lots of awesome stuff, and some proxy servers even provide a way to programmatically control request flow.
<Norrin> but it all adds up to delivering a web service
<Norrin> in its very common use case
<bougyman> that's the storefront for most businesses, sure.
<al2o3-cr> BraddPitt: then if would be include
<pipework> There's even a nice nginx with lua built in.
mois3x has quit [Ping timeout: 244 seconds]
<BraddPitt> oh ok, thanks al2o3-cr
<al2o3-cr> >> module Foo; def boo; 42; end; extend self; end; Foo.boo
<ruboto> al2o3-cr # => 42 (https://eval.in/418464)
nscheurich has quit [Ping timeout: 260 seconds]
spcmastertim has quit [Ping timeout: 252 seconds]
<al2o3-cr> >> module Foo; def boo; 42; end; end; Foo.boo
<ruboto> al2o3-cr # => undefined method `boo' for Foo:Module (NoMethodError) ...check link for more (https://eval.in/418465)
opensource_ninja has joined #ruby
<ght> Question: I have an array formatted as myarr = [{"GroupName"=>"MyFirstGroup", "Id"=>114}, {"GroupName"=>"Interest - Email", "Id"=>101}, {"GroupName"=>"New Customer", "Id"=>102}, {"GroupName"=>"New Lead", "Id"=>135}]
<al2o3-cr> BraddPitt: extend puts the methods in a singleton class
<BraddPitt> I thought extend just makes them instance methods
<BraddPitt> for the requiring class
<ght> and I have another object with a string, mystring["notes"] = "Here are a bunch of notes. That includes Interest - Email."
<al2o3-cr> BraddPitt: the code example show not
<ght> What is the best way to see if any of the "GroupName" fields match a string within mystring["notes"]?
<BraddPitt> er did I get it backwards
shmilan has quit [Ping timeout: 246 seconds]
<jhass> ght: .any?
<ght> Normally, I would .each through myarr and see if mystring["notes"].include? the object in that iteration of the each loop.
<ght> Hmm, .any? I'll look that up.
<mwlang> pipework: what’s a direct link to the nginx + lua built-in? I’m finding lots of hits on Google, but not sure which specifically you’re thinking of.
platzhirsch has joined #ruby
platzhirsch has left #ruby [#ruby]
nfk has joined #ruby
Axy has joined #ruby
<al2o3-cr> >> module Foo; end; class A; end; class B; end; [A.ancestors, B.ancestors] # BraddPitt
<ruboto> al2o3-cr # => [[A, Object, Kernel, BasicObject], [B, Object, Kernel, BasicObject]] (https://eval.in/418466)
jcdesimp has quit [Quit: Leaving...]
einarj has quit [Ping timeout: 240 seconds]
<al2o3-cr> oops
That1Guy has joined #ruby
<al2o3-cr> >> module Foo; end; class A; include Foo; end; class B; extend Foo; end; [A.ancestors, B.ancestors] # BraddPitt
<ruboto> al2o3-cr # => [[A, Foo, Object, Kernel, BasicObject], [B, Object, Kernel, BasicObject]] (https://eval.in/418467)
emma_ has joined #ruby
rakm has joined #ruby
Torrieri has joined #ruby
Averna has quit [Ping timeout: 245 seconds]
mrtg9970 has joined #ruby
<al2o3-cr> where did Foo go missing in class B?
jeremy04_ has quit [Remote host closed the connection]
einarj has joined #ruby
TomyLobo has quit [Ping timeout: 245 seconds]
dstarh has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
choke has joined #ruby
<jhass> al2o3-cr: extend is an include into the singleton class
<al2o3-cr> jhass: yes
Averna has joined #ruby
<jhass> >> module Foo; end; class B; extend Foo; end; B.singleton_class.ancestors
<ruboto> jhass # => [#<Class:B>, Foo, #<Class:Object>, #<Class:BasicObject>, Class, Module, Object, Kernel, BasicObject] ...check link for more (https://eval.in/418468)
That1Guy has quit [Client Quit]
Mia has quit [Ping timeout: 246 seconds]
choke has quit [Client Quit]
mrtg9970 has quit [Client Quit]
finisherr has quit [Ping timeout: 245 seconds]
MVPhelp has quit [Remote host closed the connection]
jerius has quit [Quit: /quit]
Illusioneer has joined #ruby
<al2o3-cr> jhass: thanks
<al2o3-cr> little steps jhass :P
Illusioneer has quit [Client Quit]
MVPhelp has joined #ruby
Silox| has joined #ruby
gard has joined #ruby
reset has quit [Quit: Linkinus - http://linkinus.com]
EagleDelta has quit [Read error: Connection reset by peer]
finisherr has joined #ruby
dented42 has joined #ruby
axsuul has joined #ruby
choke has joined #ruby
chihhsin has quit [Ping timeout: 240 seconds]
cris_ has quit [Quit: Sto andando via]
<al2o3-cr> BraddPitt: You understand?
einarj has quit [Read error: Connection reset by peer]
chihhsin has joined #ruby
einarj has joined #ruby
nettoweb has joined #ruby
devdazed has quit [Ping timeout: 240 seconds]
podman has joined #ruby
nanoz has quit [Quit: <3]
EllisTAA has joined #ruby
<BraddPitt> yes, I think so
Papierkorb has quit [Quit: ArchLinux completes an endless loop faster than any other distro!]
nux443 has quit [Ping timeout: 250 seconds]
gard has quit [Ping timeout: 272 seconds]
nettoweb has quit [Max SendQ exceeded]
nettoweb has joined #ruby
baweaver has quit [Remote host closed the connection]
rfizzle has joined #ruby
<al2o3-cr> ok cool :)
roolo has quit [Remote host closed the connection]
lannonbr has quit [Quit: WeeChat 1.2]
DLSteve has quit [Quit: Leaving]
bap1313 has quit [Ping timeout: 250 seconds]
hahuang65 has joined #ruby
nettoweb has quit [Read error: Connection reset by peer]
malconis has quit [Ping timeout: 250 seconds]
<pipework> mwlang: http://wiki.nginx.org/HttpLuaModule is nice. But https://openresty.org/ is what I was referring to.
<pipework> Evidently there's maybe support for lua scripting within haproxy too.
<miah> in the new dev ya
Averna has quit [Quit: Ex-Chat]
<pipework> LOL, they keep calling Lua, LUA and lua.
freerobby has quit [Quit: Leaving.]
<yorickpeterse> same with GEMs for example
<mwlang> pipework: I was on openresty.org for a bit…yeah, The embedded scripting engine nobody knows about.
Ilyes512 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<mwlang> let alone how to spell it.
<dfockler> lua is weird
<pipework> Lua is fantastic and beautiful.
<shevy> mruby will wipe the floor with lua's face
<pipework> But not as easy to approach.
<dfockler> It's like Ruby syntax mixed with javascript
<al2o3-cr> Lua is the bomb!
<pipework> shevy: No it won't.
einarj has quit [Ping timeout: 255 seconds]
<pipework> dfockler: More like it's neither of those things and it's tables and functions and a small amount of primitives.
<dfockler> fine, be that way
<pipework> And there's moonscript!
<al2o3-cr> tables is the only container in Lia
<shevy> it doesn't have anything else other than tables
<Ox0dea> And 1-based indexing!
zendrix has quit [Remote host closed the connection]
<al2o3-cr> *Lua
<pipework> Ox0dea: Optional!
Ilyes512 has joined #ruby
<pipework> But defaulted to one-based.
jaycee has joined #ruby
<dfockler> Turtle on tables all the way down
<jhass> matz started mruby after seeing lua, I think that says all :P
<pipework> You can even, at runtime, use 0-based.
<al2o3-cr> you can start at index -100
dented42 has left #ruby ["Textual IRC Client: www.textualapp.com"]
<pipework> jhass: That he sees great things and then takes the great things from them and makes derivative but wholly new works?
<dfockler> ^
einarj has joined #ruby
<jhass> no, he literally said "we need something better for these usecases"
<dfockler> or he was disgusted and needed to make something better
<pipework> Ruby's class-based OO might win popularity contests.
baweaver has joined #ruby
<shevy> well lua has one huge thing going and this is that it is fast
kies has quit [Ping timeout: 246 seconds]
<pipework> jhass: Isn't that what he said about the languages he used when designing ruby int he first place?
chihhsin has quit [Ping timeout: 265 seconds]
<pipework> shevy: Hopefully lua-jit gets a great maintainer.
rakm has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<mwlang> pipework: I started getting my feet wet with Lua while running ntopng
zendrix has joined #ruby
<shevy> who wants to embed ruby for a game
<jhass> I guess, why not repeat a success story?
<dfockler> I wish I could use ruby with Love2D
<pipework> jhass: I'd welcome a better lua, but I doubt entirely that a class-based language would be it.
<dfockler> but lua is ok
_ht has quit [Quit: Konversation terminated!]
<shevy> pipework the funny thing is that the one who started gobolinux is a maintainer for luarocks
<ght> jhass: I've been researching .any? and testing it in irb, and I'm so far unable to utilize it in the manner needed.
<pipework> shevy: Is that funny? I'm not sure.
<mwlang> shevy: not just crazy fast, but small on resources — so it ran really well even on a Raspberry Pi running a full-fledged firewall setup for me.
<ght> Not sure what I'm missing.
charliesome has joined #ruby
<ght> Here's a gist of my exact issue: https://gist.github.com/anonymous/e02ba24385664eb6e340
<pipework> ght: It returns truthy if the block returns truthy for all elements in the enumerable.
chihhsin has joined #ruby
<jhass> no, any?
<jhass> you're thinking about all?
<ght> Right, I'm just not sure how to use it in my specific situation.
<shevy> pipework I find this funny - he is very active on the latter
<pipework> jhass: Lul yeah
<pipework> shevy: I'm not understanding the humor.
<shevy> pipework I find your nick funny too
<pipework> shevy: I love yours.
<pipework> If it weren't for your nick, I'd probably not love you as much.
fgo has joined #ruby
<ght> Is the way I'm searching for the match already a properly efficient way?
michaeldeol has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<ght> The .each loop in that gist?
paulcsmith_ has quit [Quit: Be back later ...]
<jhass> ght: replace your each with any? and return what you do in the if
<pipework> IRC love is shallow and fickle.
<ght> jhass: Ok, will give that a shot, thank you.
<shevy> ght usually if you use .each to find something, you may find a better variant
<ght> shevy: That's what I was thinking, yes.
<ght> I figured this wasn't the most efficient way.
<shevy> it's one of the creepy areas of ruby... Enumerable... or Enumerator... I can never remember which
<pipework> Enumerator is a class, Enumerable is a module?
<shevy> Ox0dea also showed me .lazy a while ago, I ran away at once
bigbadbear has quit [Ping timeout: 246 seconds]
<Ox0dea> Enumerator is "creepy"?
<shevy> very
decoponyo has joined #ruby
choke has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
mary5030_ has joined #ruby
<dfockler> haha
<shevy> I still haven't read all methods it has
mary5030 has quit [Read error: Connection reset by peer]
<dfockler> I think Drb is a doctor
<mwlang> shevy it’s the adjective not the noun since you usually include it to describe (extend) your own things to make them, well, Enumerable.
kr3ssh has quit [Ping timeout: 245 seconds]
jaycee has quit [Read error: Connection reset by peer]
<mwlang> at least that’s how I remember it.
<shevy> hmm wait
<shevy> I think I meant Enumerable now
<ght> Heavens, what the crap is the syntax in this situation.
<shevy> the bigger of the two, whatever that is
<shevy> oh yeah... #collect_concat
<Ox0dea> Ha.
<Ox0dea> I've actually seen it in wild code.
foureight84_____ has quit [Quit: Be back later ...]
<ght> Got it
<ght> Awesome, thanks jhass.
<shevy> well it confuses me already because I am using .map ...
rgb-one has joined #ruby
<rgb-one> Hello, is there any way to automatically generate ids for headers with haml?
<Ox0dea> Sure, but sometimes #flat_map is just the thing.
michaeldeol has joined #ruby
duoi has quit [Remote host closed the connection]
fgo has quit [Ping timeout: 246 seconds]
<Ox0dea> #collect_concat takes the aliasing a little too far, I think.
decoponio has quit [Ping timeout: 265 seconds]
<shevy> hehe
hobodave has quit [Quit: Computer has gone to sleep.]
<baweaver> there are times I want to do a compact_map
mary5030_ has quit [Ping timeout: 244 seconds]
<shevy> .map_the_dam!
<baweaver> of which I tend to implement with reduce so it's a single loop
eGGsha has joined #ruby
That1Guy has joined #ruby
That1Guy has quit [Client Quit]
sepp2k has quit [Quit: Leaving.]
kb3ien has joined #ruby
icharlie has quit [Remote host closed the connection]
bap1313 has joined #ruby
<kb3ien> How does one get kaminari to produce links to /path? rather than /?
<jhass> kb3ien: I expect more kaminari experience over at #RubyOnRails
<ght> jhass: My last question on the matter, is, I need to be able to perform operations on the individual matches from the .any? call. Is that possible?
<ght> For example, if two "GroupName" entries match, for each one I want to perform operations.
<jhass> ght: any? stops on the first match, perhaps you want .select
kb3ien has left #ruby [#ruby]
<ght> Ok.
<baweaver> >> module Enumerable; def compact_map() reduce([]) { |a,i| v = yield(i); a << v if v; a } end end; (1..10).compact_map { |v| v.even? ? v * 2 : nil } #shevy
<ruboto> baweaver # => [4, 8, 12, 16, 20] (https://eval.in/418469)
<Ox0dea> It should be called #map_compact in that case, no?
<baweaver> compact_map, select_map, could go by who knows how many names
* baweaver shrugs
<baweaver> I just tend to do something similar a lot.
<baweaver> flat_map though
nettoweb has joined #ruby
hydrozen has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<baweaver> map(&block).flatten
thermatix has joined #ruby
duoi has joined #ruby
<shevy> hmm
<shevy> map_flatten :D
skade has quit [Ping timeout: 250 seconds]
<Ox0dea> baweaver: MRI does the "reduce and ignore" thing.
<al2o3-cr> map_squash :)
[k- has joined #ruby
<ght> jhass: .select worked perfectly, thank you
choke has joined #ruby
skade has joined #ruby
<ght> Question: If you write logger.debug() statements throguhout your code, then later set your LOG_LEVEL to Info so these debug messages are not output, do those logger.debug statements simply being present in the code slow down execution in any way?
<Ox0dea> Negligibly.
rgb-one has left #ruby [#ruby]
<al2o3-cr> ght: not that any human would ever notice :P
thermatix has quit [Ping timeout: 255 seconds]
<RickHull> how can I say in a regex, capture this group, and it's either followed by \z or 5 known chars and then some junk? starting with: /\A.+ - (\{.+\})\z/
<RickHull> this matches only when followed by \z (end of string)
<jhass> (?:\z|five.+) should work
<ght> Got it, thank you.
iamninja has quit [Read error: Connection reset by peer]
<RickHull> jhass: ah thx
mwlang has quit [Quit: mwlang]
nettoweb has quit [Read error: Connection reset by peer]
<jhass> RickHull: prolly meant to [^}]+ instead of .+
iamninja has joined #ruby
<RickHull> it's capturing json, heh
<jhass> oO
<jhass> okay the nvm I guess
<RickHull> so i'm not matching braces or anything
<jhass> *then
<RickHull> just looking for the known end-of-json
zeroDivisible has joined #ruby
but3k4 has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
linduxed has quit [Ping timeout: 246 seconds]
<Ox0dea> RickHull: "the"?
<al2o3-cr> yeah the f
jayne_ is now known as jayne
<baweaver> regex is not a good idea for html or json or yaml or any other sane data format that already has a parser
skydiver has joined #ruby
<RickHull> baweaver: how about extracting json from a wildly-formatted text log?
<baweaver> sed
<baweaver> pipe them to sane formats using unix tools, then worry about it.
<RickHull> are you going to concretely recognize the json, or recognize what tends to precede and follow it?
<baweaver> well, more of an awk thing at that point
<jhass> why sed or awk if Ruby has perfectly fine tools for it
<baweaver> If you can't tell, you have a bigger problem than esoterically musing on regexing json.
einarj has quit [Ping timeout: 240 seconds]
<RickHull> baweaver: thanks for the advice bud (whoosh)
<baweaver> Not all servers generating logs have it
<baweaver> or worse, have 1.8.x
<Ox0dea> >> require 'json'; JSON.parse '[]' # RickHull
<ruboto> Ox0dea # => [] (https://eval.in/418470)
<RickHull> i can't handle all the whooshing
<Ox0dea> Something to bear in mind, as you indicated it to be your belief that all serialized JSON ends with a closing brace.
<baweaver> sed/awk are for doing things on server before ruby touches them, though preferably you make the app give back sane logs.
einarj has joined #ruby
skade has quit [Quit: Computer has gone to sleep.]
choke has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
skydiver has quit [Ping timeout: 250 seconds]
baroquebobcat has quit [Quit: baroquebobcat]
doublemalt_ has joined #ruby
<shevy> jhass yes my brother! The RubyOS! \o/
AlxAltea has quit [Ping timeout: 250 seconds]
<hfp> I feel a bit dumb asking but I have always been struggling with mocking, stubbing and testing. And it's biting me now. So I am using this framework that is not very popular and I need to run tests to make sure my controller does what it's supposed to. But to execute the controller's code properly, I have to mock a certain number of dependent objects. There is very little documentation available so I only have th
<hfp> e framework's code, its tests ...
<hfp> ... and my eyes. How should I approach the test to find out which objects should I mock, which methods should I mock and how to inject mocked objects into the framework's code when running my test?
nettoweb has joined #ruby
j_mcnally has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
Ilyes512 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<baweaver> also note there's a #RubyOnRails channel
DoubleMalt has quit [Ping timeout: 260 seconds]
sepp2k has joined #ruby
<baweaver> that book will cover everything you need to know on RSPEC in a Rails context
<hfp> I am aware of the channel, thanks. But this framework isn't rails at all
<baweaver> and can be applied to Sinatra as well fairly easily.
havenwood has joined #ruby
<hfp> It's none of these two. It's a voip framework called Adhearsion
nettoweb has quit [Max SendQ exceeded]
<baweaver> There was another RSPEC guide out there in the wild.
<al2o3-cr> hfp: /j #adhearsion
tmtwd has joined #ruby
jeadr has quit [Remote host closed the connection]
nettoweb has joined #ruby
<workmad3> hfp: first, establish if you actually need to mock things... next, remember the cardinal rule of mocking - only mock the types (things) you own, and only mock collaborators
<hfp> al2o3-cr: I asked there 2 days ago. There is nothing but echo in this chan :D
nettoweb has quit [Client Quit]
[k-_ has joined #ruby
<al2o3-cr> hfp: fair dos
<workmad3> hfp: and if you're having trouble mocking just types you own, it sounds like you need to introduce anti-corruption/wrapper layers to isolate your code from the framework so you can test your code in isolation from the framework
ishahnaz has quit [Ping timeout: 264 seconds]
solars has quit [Ping timeout: 240 seconds]
jeadr has joined #ruby
polly_wog has joined #ruby
<hfp> workmad3: Well, I do need to mock objects I don't own (i.e. the framework's objects). Because the code results in actual phone calls, there is no live call made in the test. So the methods that output audio need to be mocked so the test doesn't crash. I know that much. But I don't know how to tell for sure which objects I need to mock exactly, nor which methods. And when I do find out, I dont know what these met
<hfp> hod's stubs should return
<workmad3> hfp: that's where the wrapper comes in
neanderslob has joined #ruby
<baweaver> allow(object).to receive(:method) { (returns this) }
<workmad3> hfp: you have a layer between your business logic code and the framework that basically translates from the frameworks domain into your own domain
<workmad3> hfp: and then you mock that wrapper
<baweaver> Look into VCR to get real requests to replay
<workmad3> hfp: you then also write integration tests on your wrapper to make sure it's working correctly against actual framework code
jgt1 has joined #ruby
<workmad3> (or, if that's not possible because your framework lacks a test mode to turn off stuff that crashes, you get ultra-paranoid about all changes to the wrappers and ensure any change to them undergoes a full, manual QA cycle)
hydrozen has joined #ruby
<hfp> workmad3: This framework doesn't have a test mode so it looks like I need a wrapper... For example, my controller answers the call and says a sentence. But he test crashes because there is no audio channel to actually write the audio to. So I mocked this particular object and its method. Then it crashes again with another method, so I stubbed this method and return true. And then it crashes again but with a thir
<hfp> d method. It seems like the more I mock, the more I need to mock.
yqt has quit [Ping timeout: 245 seconds]
<hfp> How would I do this with the wrapper method you suggested?
tisp has joined #ruby
whippythellama has quit [Quit: WeeChat 1.3]
<workmad3> hfp: not sure, it depends a lot on the framework... I'd probably need to actually play around with it
TomyWork has quit [Ping timeout: 264 seconds]
jatb has quit [Remote host closed the connection]
<workmad3> hfp: but the general principle is that anything that touches the framework needs to go through your wrapper rather than touching it directly
ledestin has joined #ruby
einarj has quit [Ping timeout: 250 seconds]
rakm has joined #ruby
einarj has joined #ruby
rubie has quit [Remote host closed the connection]
elton has quit [Quit: elton]
charliesome has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
polpak has quit [Quit: leaving]
roolo has joined #ruby
blackmes1 has joined #ruby
<hfp> what does the wrapper do? do you have an example?
darwingr has joined #ruby
nfk has quit [Quit: Try memory.free_dirty_pages=true in about:config]
pragmatism has quit [Read error: Connection reset by peer]
rfizzle has quit [Ping timeout: 272 seconds]
blackmesa has quit [Ping timeout: 250 seconds]
tisp has quit [Remote host closed the connection]
[Butch] has quit [Quit: Linkinus - http://linkinus.com]
roolo has quit [Ping timeout: 264 seconds]
workmad3 has quit [Ping timeout: 244 seconds]
rubie has joined #ruby
iloverubynoob has quit [Remote host closed the connection]
metamp has joined #ruby
axsuul has quit [Read error: No route to host]
tonios57 has quit [Remote host closed the connection]
tmtwd has quit [Remote host closed the connection]
dopamean_ has quit [Ping timeout: 250 seconds]
choke has joined #ruby
ahmetkapikiran has joined #ruby
charliesome has joined #ruby
Yzguy has joined #ruby
einarj has quit [Ping timeout: 260 seconds]
christiandsg has joined #ruby
tmtwd has joined #ruby
einarj has joined #ruby
cschneid_ has quit [Remote host closed the connection]
ahmetkapikiran has quit [Client Quit]
anon_ has joined #ruby
ahmetkapikiran has joined #ruby
Torrieri has quit [Quit: Be back later ...]
ivanskie has joined #ruby
Torrieri has joined #ruby
Torrieri has quit [Changing host]
Torrieri has joined #ruby
christiandsg has quit [Ping timeout: 265 seconds]
stamina has quit [Ping timeout: 256 seconds]
Guest13929 has quit [Ping timeout: 265 seconds]
fgo has joined #ruby
einarj has quit [Ping timeout: 246 seconds]
n_blownapart has quit []
d10n-work has quit [Quit: Connection closed for inactivity]
Torrieri has quit [Client Quit]
Torrieri has joined #ruby
Torrieri has quit [Changing host]
Torrieri has joined #ruby
matp has joined #ruby
einarj has joined #ruby
linduxed has joined #ruby
Torrieri has quit [Client Quit]
fgo has quit [Ping timeout: 240 seconds]
matp_ has quit [Ping timeout: 256 seconds]
radgeRayden has quit [Ping timeout: 255 seconds]
shellie_ has quit [Remote host closed the connection]
ivanskie has quit [Ping timeout: 240 seconds]
Gribo has joined #ruby
fschuindt has joined #ruby
bronson has joined #ruby
baweaver has quit [Remote host closed the connection]
<shevy> test
juanpaucar has quit [Remote host closed the connection]
EllisTAA has quit [Quit: EllisTAA]
<jhass> shevy: ☃
matp has quit [Ping timeout: 246 seconds]
<bootstrappm> trying to make a progress bar for pg_dump in ruby and ran across this http://www.sitepoint.com/forking-ipc-ruby-part-ii/ ... gold!
RegulationD has quit [Remote host closed the connection]
baweaver has joined #ruby
sperant has joined #ruby
bronson has quit [Ping timeout: 250 seconds]
charliesome has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
matp has joined #ruby
axsuul has joined #ruby
axsuul has quit [Max SendQ exceeded]
axsuul has joined #ruby
devoldmx has joined #ruby
dopie has quit [Quit: This computer has gone to sleep]
<zenspider> rawr
NeverDie has joined #ruby
blackmes1 has quit [Quit: WeeChat 1.2]
sperant has quit [Client Quit]
bap1313 has quit [Ping timeout: 244 seconds]
<fschuindt> Guys, how can I verify the percentage of a value occurence in a given array? like w%(5 2 9 4 2 2 1) how many % the element 2 appears? is there an easy way?
<Kalov> sorry wrong chat :p
jatb has joined #ruby
<zenspider> prolly want %w, not w% :)
<zenspider> Kalov: go away
ruby-lang002 has joined #ruby
<ruby-lang002> hey
<[k-_> >> %w[5 2 9 4 2 2 1].tap { |a| a.count("2") / a.size } #fschuindt
<ruboto> [k-_ # => ["5", "2", "9", "4", "2", "2", "1"] (https://eval.in/418471)
<[k-_> lol!
tmtwd has quit [Remote host closed the connection]
devoldmx has quit [Ping timeout: 250 seconds]
<shevy> you just refuse to write useful things [k- :(
ruby-lang002 has quit [Client Quit]
dopie has joined #ruby
<zenspider> this is why I can't stand tap
<[k-_> >> a = %w[5 2 9 4 2 2 1]; a.count("2") / a.size; #fschuindt
<ruboto> [k-_ # => 0 (https://eval.in/418472)
<[k-_> :(
<pipework> zenspider: Because people use it wrong? :D
<shevy> tapdance stepdance
skydiver has joined #ruby
<[k-_> stuupid int devision
<[k-_> division
<bootstrappm> what's the stderr for a command run through rake's sh?
<pipework> I have wanted something like tap where I just get to pass a block and return the value of the last statement within the block though.
<bootstrappm> is it inherited from the ruby script?
<[k-_> i woke up too early today :( the alarm clock rang for 17 min
<zenspider> >> [".tap { |x| }", "x = "].map &:length
<ruboto> zenspider # => [12, 4] (https://eval.in/418473)
<[k-_> i wanted to use tap for once :(
<zenspider> pipework: that's called a block. :P
rehat has quit [Remote host closed the connection]
<zenspider> or... any expression for that matter
<pipework> zenspider: That works with everything? Huh.
jenrzzz has quit [Ping timeout: 244 seconds]
<pipework> zenspider: Snippy answer, but insufficient. 2/10 for humor
einarj has quit [Ping timeout: 244 seconds]
rakm has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<zenspider> oh
benlieb has quit [Quit: benlieb]
choke has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
jesterfraud has joined #ruby
benlieb has joined #ruby
<pipework> I just want something like tap but the only difference is that it returns the value
michaeldeol has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<zenspider> >> 42.instance_eval { 1 + 1; 2 + 2 }
<pipework> Not the receiver of #tap
<ruboto> zenspider # => 4 (https://eval.in/418474)
<pipework> zenspider: Ooh, that totally works and hadn't even considered it.
mistermocha has joined #ruby
<pipework> Not to hide my evil by aliasing instance_eval to something super short and innocent...
<pipework> But I think I'd like to not change self.
skydiver has quit [Ping timeout: 250 seconds]
<pipework> I'd just want the receiver as the block argument.
<zenspider> >> class Object; def run; yield self; end; end; 42.run { |x| x + 2 }
<ruboto> zenspider # => 44 (https://eval.in/418475)
<zenspider> the receiever is both the block arg and self in instance_eval
finisherr has quit [Read error: Connection reset by peer]
niko has quit [Ping timeout: 615 seconds]
<zenspider> >> 42.instance_eval { |x| x }
<pipework> But I don't want self to be the receiver in the block
<baweaver> I tend to call that pipe myself.
<ruboto> zenspider # => 42 (https://eval.in/418476)
<zenspider> >> 42.instance_eval { |x| x + x }
<ruboto> zenspider # => 84 (https://eval.in/418477)
<zenspider> >> 42.instance_eval { self + self }
<ruboto> zenspider # => 84 (https://eval.in/418478)
<pipework> zenspider: I mean, I could write one, that's not the issue. It's just that I don't want to bother every single damn time to convince people that it's worthwhite.
finisherr has joined #ruby
einarj has joined #ruby
<pipework> WTB ruby-core implemention
<zenspider> baweaver: pipe ... yeah. I'd just be a bit worried it'd be confused with the IO pipe
<baweaver> There was a bit earlier about making itself take a block.
<baweaver> fair.
<zenspider> pipework: that's because it isn't worthwhile
zendrix has quit []
<pipework> zenspider: I'm not sure I agree.
* baweaver grabs popcorn
<pipework> Tap isn't worthwhile to me, imo, but it's fun to use if you don't take yourself seriously.
<shevy> beaver time again!
<baweaver> 1.tap(&Kernel.method(:puts))
<baweaver> though I tend to make an addition to Rails logger
<shevy> what is this
<shevy> is this puts 1
<Ox0dea> Ja.
<pipework> shevy: lulz for people who don't want to change their LOC metric. :p
<shevy> oh my god
<shevy> and this is what pipework is cheering for :(
<baweaver> that returns procs so I can: Some.long.chain.tap(&Rails.logger.info_proc).do_other_stuffs
<havenwood> Any RVM user on OS X want to test precompiled binaries for 2.2.3 or any of the other new ones? Try a (re)install after: rvm get master
bmurt has joined #ruby
spider-mario has quit [Remote host closed the connection]
[k-_ has quit [Quit: Lingo: www.lingoirc.com]
xet7 has quit [Quit: Leaving]
Cache_Money has quit [Quit: Cache_Money]
<havenwood> baweaver: :P 1.tap(&Kernel.public_method(:puts))
mistermocha has quit [Ping timeout: 255 seconds]
<Ox0dea> shevy: &method is for when you want to pass something to a method rather than calling a method on something.
hydrozen has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<baweaver> nag nag nag
<havenwood> hehe
binaryplease1 has joined #ruby
<Ox0dea> >> def inc n; n + 1 end; [[1, 2, 3].map(&:succ), [1, 2, 3].map(&method(:inc))] # shevy
<ruboto> Ox0dea # => [[2, 3, 4], [2, 3, 4]] (https://eval.in/418479)
<Ox0dea> But I feel like you must've seen this before?
<pipework> havenwood: Why public_?
Wolland has joined #ruby
<pipework> If #tap is in use already, that is
<dorei> is there a way to check whether i can require something without actualy requiring it and check whether it raised or not?
<havenwood> pipework: to use the public API, still
<pipework> havenwood: when is Kernel#puts ever private?
<havenwood> >> [1, 2, 3].map &:puts
<ruboto> havenwood # => private method `puts' called for 1:Fixnum (NoMethodError) ...check link for more (https://eval.in/418480)
<havenwood> pipework: module_function
<pipework> >> 1.tap(&Kernel.method(:puts))
<ruboto> pipework # => 1 ...check link for more (https://eval.in/418481)
<pipework> >> [1, 2, 3].tap(&Kernel.method(:puts))
<ruboto> pipework # => 1 ...check link for more (https://eval.in/418482)
<pipework> If you're already using tap, I kinda figure that you already care more about length of code too much anyways.
binaryplease has quit [Ping timeout: 252 seconds]
<havenwood> pipework: Compared to: [1, 2, 3].map &method(:puts)
<pipework> havenwood: Oh, yeah.
baweaver_ has joined #ruby
ahmetkapikiran has quit [Quit: ahmetkapikiran]
<shevy> Ox0dea I dunno, my eyes become blind when I see weird code
benlieb has quit [Quit: benlieb]
<havenwood> shevy: teach your eyes to do the weird code dance
[k- has quit [Ping timeout: 240 seconds]
baweaver has quit [Ping timeout: 250 seconds]
jeadr has quit [Remote host closed the connection]
chipotle has quit [Quit: cheerio]
Yzguy has quit [Ping timeout: 260 seconds]
dented42_ has joined #ruby
dfockler has quit [Remote host closed the connection]
<baweaver_> Anyways, I tend to use tap to validate responses inline.
charliesome has joined #ruby
bmurt has quit []
sarkyniin has joined #ruby
maletor has quit []
Kallis has joined #ruby
rubie has quit [Remote host closed the connection]
nickjj has quit [Quit: Leaving]
pen-soldier has quit [Quit: Leaving]
mleung has quit [Quit: mleung]
woobywoob has quit [Quit: Page closed]
rakm has joined #ruby
<bootstrappm> what's the relationship between Kernel and Process?
<bootstrappm> they both have fork, spawn, etc.
jeadr has joined #ruby
nickjj has joined #ruby
Lucky has quit [Disconnected by services]
maletor has joined #ruby
dented42 has joined #ruby
<RickHull> when should I reach for `warn` vs. `$stderr.puts`? I like warn for terseness. i suppose the major difference is that warns can be disabled
jeadr has quit [Read error: Connection reset by peer]
axsuul has quit [Read error: No route to host]
choke has joined #ruby
rcvalle has quit [Quit: rcvalle]
<shevy> bootstrappm Process is a module, I assume that Kernel may include Process
<bootstrappm> Kernel is also a module, the docs say its included in Object but the Process docs don't say anything
bmurt has joined #ruby
dented42_ has quit [Ping timeout: 246 seconds]
pietr0 has quit [Quit: pietr0]
rakm has quit [Ping timeout: 255 seconds]
xet7 has joined #ruby
spcmastertim has joined #ruby
jeadr has joined #ruby
duoi has quit [Remote host closed the connection]
polly_wog has quit []
duoi has joined #ruby
dented42 has quit [Ping timeout: 272 seconds]
iloverubynoob has joined #ruby
amenramen has joined #ruby
iloverub_ has joined #ruby
iloverubynoob has quit [Read error: Connection reset by peer]
saddad has joined #ruby
andywojo has quit [Read error: Connection reset by peer]
casadei has quit [Remote host closed the connection]
ishahnaz has joined #ruby
Lucky___ has joined #ruby
baweaver_ is now known as baweaver
iloverub_ has quit [Ping timeout: 246 seconds]
jgt1 has quit [Ping timeout: 240 seconds]
chichou has quit [Remote host closed the connection]
chichou has joined #ruby
j_mcnally has joined #ruby
dopie has quit [Quit: This computer has gone to sleep]