« Back to channel list

#ruby - 19 June 2015

« Back 1 day Forward 1 day »
[00:00:27] Senjai: bougyman: https://gist.github.com/Senjai/7fbe5f9b7181a1574513 is what we use to manage unicorn
[00:00:50] nofxx: has joined #ruby
[00:00:51] nofxx: has joined #ruby
[00:01:05] Senjai: I mean yeah, I get that unicorn requires a little leg work to use nicely, but I still stand by the fact that it's super powerful at what it can do
[00:01:31] Igorshp: has joined #ruby
[00:01:51] bougyman: Senjai: http://sprunge.us/MWWb?sh
[00:01:53] bougyman: there's mine
[00:02:47] Senjai: Ah, we needed a script that can be passed to systemd.
[00:02:56] bougyman: oh, and http://sprunge.us/cEHB?ruby
[00:02:59] bougyman: yeah, runit, here.
[00:03:18] Senjai: bougyman: What do you use to host your stack?
[00:03:24] charliesome: has joined #ruby
[00:03:49] bougyman: Senjai: runit-ed ubuntu
[00:03:51] sevenseacat: has joined #ruby
[00:04:01] Senjai: bougyman: I mean like, EC2? Opsworks?
[00:04:15] bougyman: we're going to move to either void snapshots or alpine, before ubuntu's next release.
[00:04:20] bougyman: Senjai: a variety.
[00:04:31] elektronaut: i like passenger well enough. i've got a ton of mostly low traffic apps running on dozens of servers, i love that it's pretty much set and forget.
[00:04:38] bougyman: we have quite a bit of our our own bare metal which we virtualize with lxc.
[00:04:59] bougyman: then leverage VPSie, OVH, Vultr, Rackspace, AWS, and DigitalOcean
[00:05:01] Senjai: That sounds pretty involved
[00:05:07] bougyman: as well as some local providers in other joint.
[00:05:10] bougyman: not at all.
[00:05:18] bougyman: it's all just knife <some shit>
[00:05:35] Senjai: Aye, we got rid of our chef stack largely by swapping over to Opsworks
[00:05:37] Senjai: should check it out :)
[00:05:44] Senjai: except for those cookbooks I linked
[00:05:52] bougyman: it doesn't really matter which cfgmanager you use.
[00:05:59] bougyman: just do it intelligently.
[00:06:05] eggoez: has joined #ruby
[00:06:12] Senjai: Opsworks isn't a cfgmanager
[00:06:15] bougyman: i could make arguments for ansible, salt, juju, name it.
[00:06:33] bougyman: AWS OpsWorks is an application management service
[00:06:35] bougyman: from page 1
[00:06:47] bougyman: cfgmanagement, application management, plz let's not go semantic.
[00:07:10] NeverDie_: has joined #ruby
[00:07:15] Senjai: Sure, I just haven't heard it be called that before
[00:07:32] bougyman: well I started with home-baked automation, of course.
[00:07:39] bougyman: then cfgengine showed up and it was like wow.
[00:07:45] bougyman: this was over a decade ago
[00:07:48] Senjai: I'm a big opsworks fan. Deployments are DEAD simple https://github.com/freerunningtech/oops
[00:07:59] bougyman: deployments are done by ci, here.
[00:08:06] bougyman: we haven't touched a deployment in over a year.
[00:08:14] Senjai: Ours our too
[00:08:17] Senjai: Done with jenkins
[00:08:21] bougyman: buildbot, here
[00:08:22] Senjai: under the hood, jenkins uses oops though
[00:08:30] Senjai: I'll have to checkout buildbot
[00:08:33] jackjackdripper: has joined #ruby
[00:08:41] bougyman: in any case... there's no one perfect tool. do it right and any of them will get you the right results.
[00:09:09] Senjai: I can't argue with that
[00:09:19] bougyman: build.voidlinux.eu
[00:09:27] bougyman: use it in my open source distro, too :)
[00:09:37] fabrice31: has joined #ruby
[00:09:40] bougyman: actually I started using it at $dayjob after I was introduced to it by the void fellas
[00:09:53] bougyman: we used Gerrit/Jenkins before and everybody hated it.
[00:09:54] Senjai: You're a void contributor?
[00:09:58] bougyman: everyone loves buildbot
[00:10:13] Senjai: Going to add you to my list of peoplr worth talking to :)
[00:11:41] Senjai: I've considered trying out Fedora
[00:11:57] Senjai: I run Ubuntu Gnome atm, with what will be Awesome
[00:12:06] simplyianm: has joined #ruby
[00:14:44] ramfjord: has joined #ruby
[00:14:44] bougyman: we just got gnome working again.
[00:14:54] bougyman: it's quite the pita, without systemd
[00:15:00] bougyman: but it's finally running smooth again.
[00:15:10] bougyman: archlinux, which has systemd, has a crappy gnome atm.
[00:15:22] uptownhr: has joined #ruby
[00:15:36] bougyman: Senjai: if musl interests you, we recently added full musl images/repos
[00:15:43] bougyman: well, not as many packages build on musl.
[00:15:50] bougyman: musl doesn't like bad C, and we can only patch so fast.
[00:16:00] bougyman: having access to alpine's patches help.
[00:16:03] Yiota: has joined #ruby
[00:16:45] Casty: has joined #ruby
[00:16:47] jfarmer: has joined #ruby
[00:17:12] Pupeno: has joined #ruby
[00:17:16] j4cknewt: has joined #ruby
[00:17:47] bougyman: we also keep daily snapshots (though we had a big gap :( ): http://archive.voidlinux.com/ and to round this back to ruby: https://github.com/voidlinux/documentation/wiki/RVM-Ruby-installation
[00:17:49] shevy: <bougyman> archlinux, which has systemd, has a crappy gnome atm.
[00:17:51] shevy: no wonder
[00:17:57] shevy: it has systemd!!!!!!!!!
[00:17:57] dgutierrez1287: has joined #ruby
[00:18:03] jfarmer: has joined #ruby
[00:18:51] Senjai: bougyman: I'll check it out
[00:19:01] Senjai: bougyman: But I dont need gnome
[00:19:09] Senjai: I just want to boot into awesome
[00:19:17] Senjai: I use gnome for certain other things but yeah
[00:19:23] fgo: has joined #ruby
[00:19:28] bougyman: hit me up on #xbps for a non-DE way to do that.
[00:20:27] Senjai: Sure, I might poke at it over the weekend for like my laptop or something to start
[00:21:03] bougyman: careful: void is known to cause excessive idle processor and underutilize ram.
[00:21:05] arcanez: am I the only one that uses xfce?
[00:21:20] bougyman: you may suffer from a quiet computer that gets extra long battery life.
[00:21:21] wallerdev: has joined #ruby
[00:21:30] Senjai: arcanez: Most in our office that dont use tiled window manager, uses xfce
[00:21:37] Senjai: I think I'm the only gnome one left
[00:21:44] arcanez: I can't tile :(
[00:21:46] sevenseacat: hello from unity-land
[00:22:04] bougyman: I guarantee i'm the only on in here using stumpwm
[00:22:13] bougyman: there's only 15 of us in the world, and none use ruby other than me.
[00:22:24] Senjai: sevenseacat: TEARS :( My subjective opinion that unity is terrible is totally more meritous than yours.
[00:22:43] Senjai: One guy uses i3 here, another uses dwm
[00:22:43] elektronaut: i swore off linux on the desktop 10 years ago, but i should probably give it a chance again
[00:22:48] Senjai: a few xmonad users
[00:23:11] uptownhr: has joined #ruby
[00:23:12] sevenseacat: that being said, i'm typing this from OSX because my work machine is a mbp
[00:23:22] bougyman: why people can't appreciate the elegance of a lisp machine as one's desktop is beyond me.
[00:23:36] bougyman: i've used stump since it replaced ratpoison.
[00:23:38] Senjai: bougyman: not beyond me
[00:23:56] elektronaut: i use emacs, totally get it :)
[00:24:11] bougyman: I don't have a media player or xdgblahblah or an image viewer or most of the std apps people have to have.
[00:24:15] bougyman: it's all just part of the lisp machine
[00:24:26] bougyman: elektronaut: imagine that but as your desktop.
[00:24:34] shevy: hey sevenseacat you have become an OSX-cat now
[00:25:10] elektronaut: at this pace, emacs is going to end up as my desktop
[00:25:11] shevy: (I(imagine(a(lisp(machine(here
[00:25:12] sevenseacat: shevy: unfotunately.
[00:25:34] bougyman: elektronaut: the funny thing is, i'm one of the few lispers who uses vim as an editor.
[00:25:42] bougyman: I can't use emacs.... stumpwm takes all the keybindings :)
[00:26:32] Xeago: has joined #ruby
[00:27:04] bougyman: slime.vim finally got usable enough that I don't miss anything from emacs integration.
[00:27:25] krisquigley: has joined #ruby
[00:29:42] jtdoncas: has joined #ruby
[00:30:08] Rubie: has joined #ruby
[00:31:38] elektronaut: currently on my lisp pilgrimage, which i suppose happens to all programmers at one point in life
[00:31:47] bougyman: scheme or c-l?
[00:32:01] elektronaut: scheme (sicp) and clojur
[00:32:02] robustus|Off: has joined #ruby
[00:32:14] bougyman: clojure is lispish.
[00:32:18] Yiota: has joined #ruby
[00:32:31] bougyman: i dunno any schemer or common lisper who would acknowledge clojure as "a lisp"
[00:33:02] elektronaut: true. it's an interesting language, though.
[00:33:17] bougyman: clojurescript is quite nice.
[00:33:31] bougyman: we're so far off-topic I don't know how to get back.
[00:33:33] bougyman: ACTION cigarette
[00:33:43] slash_nick: has joined #ruby
[00:34:45] daveg_: has joined #ruby
[00:35:36] zenspider: I would acknowledge clojure as a lisp. So would phil hagelberg... I suspect a lot of ppl would.
[00:35:47] zenspider: I don't _like_ it, necessarily... but it's definitely a lisp
[00:35:49] daveg_: has joined #ruby
[00:35:59] zenspider: I'm much more of a fan of racket, personally
[00:36:30] zenspider: elektronaut: welcome to your pilgrimage. :)
[00:37:07] acsigusz: ruby isn't considered a lisp?
[00:37:39] bgmarx_: has joined #ruby
[00:38:33] Oog: has joined #ruby
[00:38:56] acsigusz: not even lispy?
[00:39:19] Marsupermammal: has joined #ruby
[00:40:08] swgillespie: has joined #ruby
[00:40:24] Pupeno: has joined #ruby
[00:40:41] acsigusz: when writing nested do end blocks it sure reminds me of something quasi lisp, at least
[00:41:03] blaines: has joined #ruby
[00:41:56] centrx: acsigusz, Ruby has functional parts, such as enumerable blocks, and can be written in a very functional way, but is not technically a functional programming language
[00:41:56] commondream: has joined #ruby
[00:42:29] noethics: technically any language that supports functional programming is a functional language
[00:42:33] noethics: ~technically~
[00:42:38] zenguy_pc: has joined #ruby
[00:42:41] bkxd: has joined #ruby
[00:42:54] centrx: Yeah I tend to think of it as supporting functional programming
[00:43:03] centrx: I guess I mean "not popularly considered a functional language"
[00:43:15] noethics: maybe you mean it's a functional declarative language
[00:43:51] MyMind: has joined #ruby
[00:44:20] centrx: interesting
[00:44:46] noethics: centrx, lol oops
[00:44:49] noethics: i meant imperative
[00:44:54] ProLoser: has joined #ruby
[00:44:54] noethics: i get them mixed up on the daily
[00:45:03] ProLoser: can someone please suggest a better way to do this? http://hastebin.com/vihogivevo
[00:45:05] centrx: it's more object-oriented
[00:45:24] bougyman: no, that is horrible and I can't read it
[00:45:25] centrx: ProLoser, I assume that stuff on the right is just a mistake duplication?
[00:45:28] noethics: yeah that's not mutually exclusive though
[00:45:48] Akagi201: has joined #ruby
[00:45:59] ProLoser: centrx: the stuff on the right is shitty engineering
[00:46:23] sevenseacat: ow, wtf is with that code
[00:46:28] ProLoser: like i said
[00:46:31] ProLoser: what's the "proper" way
[00:46:37] elektronaut: i'd argue the stuff on the left is shitty engineering as well :p
[00:46:38] ProLoser: in js i'd use some sort of Object.assign or extend()
[00:46:41] ProLoser: i don't know ruby
[00:46:48] ProLoser: additionally, i need to whitelist the hash
[00:46:57] elektronaut: is this rails?
[00:47:04] ProLoser: i just realized, yes the doubling is accidental
[00:47:09] ProLoser: i copied a huge diff
[00:47:46] sevenseacat: use strong params to select the params you want
[00:47:55] msnyon: has joined #ruby
[00:48:27] ProLoser: i may want more (i figure) but they may not be used for this part of the code
[00:48:34] noethics: i think that the whole user_params array isnt necessary at all
[00:48:55] zenspider: that's just awful.
[00:49:03] Kyle__: has joined #ruby
[00:49:33] jackjackdripper: has joined #ruby
[00:49:40] Kyle__: How do you test a return code in mechanize? I found some examples, but they don't appear to work anymore. I know I can do it with Net::HTTP, but was hoping to use just one library to keep things simple.
[00:49:42] ProLoser: noethics: so would you just add the uuid to params?
[00:49:50] ProLoser: is it normal to add to params?
[00:49:52] Kyle__: well, they don't work, if there's a 404.
[00:49:55] noethics: ProLoser, yeah probably
[00:50:06] noethics: or make a copy
[00:51:15] elektronaut: user_params = { uuid: @user.uuid }.merge(params.reject_if { |k, v| v.nil? })
[00:51:34] elektronaut: should be equivalent, but you probably want to look into strong parameters if you're using rails
[00:51:48] dudo: has joined #ruby
[00:51:59] auzty: has joined #ruby
[00:52:45] blaines: has joined #ruby
[00:53:05] Evidlo: has left #ruby: ("WeeChat 1.0.1")
[00:53:07] workmad3: has joined #ruby
[00:54:11] jtdoncas: has joined #ruby
[00:56:42] danman: has joined #ruby
[00:58:06] charliesome: has joined #ruby
[00:58:51] elektronaut: proloser: sorry, that doesn't whitelist at all. here: https://gist.github.com/elektronaut/98a745c68f77267a573c
[00:59:14] casadei: has joined #ruby
[01:00:05] bruno-: has joined #ruby
[01:00:20] Marsupermammal: has joined #ruby
[01:00:24] FernandoBasso: has joined #ruby
[01:00:25] nahtnam: has joined #ruby
[01:00:30] dgutierrez1287: has joined #ruby
[01:00:32] jtdoncas: has joined #ruby
[01:01:01] Rubie: has joined #ruby
[01:03:55] astrobunny: has joined #ruby
[01:04:09] elektronaut: argh, keep_if mutates the hash in place
[01:05:09] axl_: has left #ruby: ()
[01:05:13] jaycee: has joined #ruby
[01:05:58] nb_bez___: has joined #ruby
[01:07:23] centrx: elektronaut, Use #select for immutable
[01:09:19] elektronaut: correct. i've been writing too much 1.8 compatible code, where #select returns an array.
[01:09:37] heftig: i'm kinda missing Hash#map! as a shortcut for hash.each { |k, v| hash.store k, foo(v) }
[01:09:38] zenspider: reject returns a copy
[01:10:20] wookiehangover: has joined #ruby
[01:13:17] amclain: has joined #ruby
[01:14:59] j4cknewt: has joined #ruby
[01:16:40] Yiota: has joined #ruby
[01:20:43] nofxx: has joined #ruby
[01:21:03] rbowlby: has joined #ruby
[01:21:24] lele: has joined #ruby
[01:24:10] jgpawletko: has joined #ruby
[01:24:59] tkuchiki: has joined #ruby
[01:25:30] tkuchiki_: has joined #ruby
[01:25:36] fujimura: has joined #ruby
[01:26:08] torpig: has joined #ruby
[01:26:17] blazes816: has joined #ruby
[01:26:43] toretore: has joined #ruby
[01:26:58] francois_: has joined #ruby
[01:31:39] BanzaiJoe: has joined #ruby
[01:32:31] RegulationD: has joined #ruby
[01:35:04] et09: has joined #ruby
[01:38:10] Leef_: has joined #ruby
[01:40:04] drewo: has joined #ruby
[01:40:59] freerobby: has joined #ruby
[01:42:01] andywojo: has joined #ruby
[01:42:29] dfockler: has joined #ruby
[01:42:54] freerobby: has joined #ruby
[01:43:43] claptor: has joined #ruby
[01:44:19] andywojo: has joined #ruby
[01:44:37] commondream: has joined #ruby
[01:47:39] jpfuentes2: has joined #ruby
[01:50:17] Marsupermammal: has joined #ruby
[01:54:51] guardianx: has joined #ruby
[01:55:59] mdih: has joined #ruby
[01:58:27] fabrice31: has joined #ruby
[01:59:19] slash_nick: has joined #ruby
[02:01:08] mrmargolis: has joined #ruby
[02:01:18] haraoka: has joined #ruby
[02:02:14] AlexAltea: has joined #ruby
[02:02:39] havenwood: has joined #ruby
[02:03:21] bkxd: has joined #ruby
[02:04:00] casadei: has joined #ruby
[02:04:39] j4cknewt: has joined #ruby
[02:06:51] Oog: has joined #ruby
[02:07:26] dseitz: has joined #ruby
[02:07:56] mdih: has joined #ruby
[02:09:38] lessless: has joined #ruby
[02:09:49] dopie: has joined #ruby
[02:13:03] datanoise: has joined #ruby
[02:13:24] CloCkWeRX: has joined #ruby
[02:14:38] bayed: has joined #ruby
[02:16:34] Al3ks_: has joined #ruby
[02:16:34] krisquigley: has joined #ruby
[02:18:11] krz: has joined #ruby
[02:18:50] bkxd: has joined #ruby
[02:19:24] davedev24_: has joined #ruby
[02:19:56] fgo: has joined #ruby
[02:20:28] tkuchiki: has joined #ruby
[02:21:18] millerti: has joined #ruby
[02:22:36] dented42: has joined #ruby
[02:24:48] imperator: has joined #ruby
[02:25:06] insaneinside: has joined #ruby
[02:25:24] mrmargolis`: has joined #ruby
[02:26:01] insaneinside: I don't suppose anyone here has experience wrapping C/C++ APIs for Ruby using SWIG...?
[02:26:08] veinofstars: has joined #ruby
[02:27:15] ruboto: Just ask your question, if anyone has or can, they will respond.
[02:28:43] ralphTrinton: has joined #ruby
[02:28:46] dopie: has joined #ruby
[02:30:13] mrmargolis`: has left #ruby: ()
[02:30:19] bgmarx: has joined #ruby
[02:31:41] Xeago: has joined #ruby
[02:33:19] CloCkWeRX: has joined #ruby
[02:33:41] ruby-lang766: has joined #ruby
[02:33:45] Soda: has joined #ruby
[02:34:32] davidimoore: has joined #ruby
[02:35:02] dudo: has joined #ruby
[02:35:10] davidimoore: Can anyone explain this bug to me? http://eclipse-honey.codio.io:3000/contacts/new
[02:35:29] mary5030: has joined #ruby
[02:36:02] Marsupermammal: has joined #ruby
[02:36:51] Yiota: has joined #ruby
[02:37:47] davidimoore: NoMethodError: undefined method `name' for #<Contact id: nil>
[02:38:02] sevenseacat: seems straightforward
[02:38:13] sevenseacat: there's no `name` method
[02:39:09] ferr: has joined #ruby
[02:40:23] sevenseacat: where do you expect it to be defined?
[02:40:45] Rubie: has joined #ruby
[02:41:12] nateberkopec: has joined #ruby
[02:41:14] RegulationD: has joined #ruby
[02:41:15] davidimoore: I'm kinda following a video tutorial so I'm not really sure how the methods are supposed to work, but :name works fine in the line before it.
[02:41:30] fujimura: has joined #ruby
[02:41:55] darkf: has joined #ruby
[02:41:56] workmad3: has joined #ruby
[02:42:12] ledestin: has joined #ruby
[02:42:40] davidimoore: Here's the code from the file: http://repl.it/tNl
[02:42:59] _djbkd: has joined #ruby
[02:43:22] davidimoore: ignore the fact that I put it in a JS repl :l
[02:43:57] davidimoore: And you can view the full error message here: http://eclipse-honey.codio.io:3000/contacts/new
[02:44:39] sevenseacat: I sure can ignore the fact that people ignore the channel rules
[02:44:39] uptownhr: has joined #ruby
[02:44:53] davidimoore: Ok I'll try again.
[02:44:53] commondream: has joined #ruby
[02:45:31] davidimoore: https://gist.github.com/webdevdave/15638dfec59e1202ed4a
[02:46:27] davidimoore: I'm not used to using irc chat, I've just been trying to fix this all day and I can't find the answer.
[02:47:35] havenwood: ?rails David______
[02:47:36] ruboto: David______, Please join #RubyOnRails for Rails questions. You need to be identified with NickServ, see /msg NickServ HELP
[02:49:47] insaneinside: has left #ruby: ("bye")
[02:49:51] yfeldblum: has joined #ruby
[02:52:26] Channel6: has joined #ruby
[02:53:24] tkuchiki: has joined #ruby
[02:55:13] GPrime: has joined #ruby
[02:57:20] pwnz0r_: has joined #ruby
[02:58:25] northfurr: has joined #ruby
[03:00:14] uptownhr: has joined #ruby
[03:00:54] scx_: has joined #ruby
[03:01:02] bootstrappm: has left #ruby: ()
[03:01:27] avahey: has joined #ruby
[03:01:53] Yiota: has joined #ruby
[03:03:12] ivancp: has joined #ruby
[03:03:30] ivancp: has left #ruby: ()
[03:05:36] pyon: has joined #ruby
[03:05:38] Igorshp: has joined #ruby
[03:07:10] lkba: has joined #ruby
[03:07:29] _blizzy_: has joined #ruby
[03:07:46] krz: has joined #ruby
[03:13:53] houhoulis: has joined #ruby
[03:13:54] braincrash: has joined #ruby
[03:17:39] Ikares: has joined #ruby
[03:18:11] j_mcnally: has joined #ruby
[03:18:17] Ikares: Hey everyone!
[03:18:23] rbowlby: has joined #ruby
[03:19:49] zenguy_pc: has joined #ruby
[03:19:54] duderonomy: has joined #ruby
[03:21:29] francois_: has joined #ruby
[03:21:30] bkxd: has joined #ruby
[03:22:16] bkxd: has joined #ruby
[03:23:09] athos_diddy: has joined #ruby
[03:23:49] balazs: has joined #ruby
[03:25:35] bmalum: has joined #ruby
[03:26:03] Casty: has joined #ruby
[03:26:52] AndroidLoverInSF: has joined #ruby
[03:27:32] wookiehangover: has joined #ruby
[03:29:38] chinmay_dd: has joined #ruby
[03:30:30] theery: has joined #ruby
[03:31:37] Pisuke: has joined #ruby
[03:32:18] j4cknewt: has joined #ruby
[03:32:22] nofxx: has joined #ruby
[03:34:19] chinmay_dd: has joined #ruby
[03:34:27] fgo: has joined #ruby
[03:34:31] Oog: has joined #ruby
[03:34:45] havenwood: Ikares: hi!
[03:35:16] akkad: has joined #ruby
[03:35:27] Hongo: has joined #ruby
[03:35:33] aphprentice_: has joined #ruby
[03:35:43] Hongo: has left #ruby: ()
[03:35:59] jpfuentes2: has joined #ruby
[03:40:43] hahuang65: has joined #ruby
[03:41:50] stryek: has joined #ruby
[03:44:08] gix: has joined #ruby
[03:45:05] ruby-lang517: has joined #ruby
[03:45:54] ruby-lang517: Hi all, quick question. I'm trying to do this: a=Hash.new(Hash.new(Hash.new([]))); a[1][2][3] = 4
[03:46:02] ruby-lang517: however, a.keys is empty
[03:46:14] fabrice31: has joined #ruby
[03:46:15] ruby-lang517: but a[1][2][3] will give me 4
[03:47:31] ruby-lang517: ACTION really wants to a[1][2][3] << '4' but ... that's beside the point
[03:48:56] bnagy: >> a=Hash.new("Go fish"); [a[:blah], a.keys]
[03:48:57] ruboto: bnagy # => ["Go fish", []] (https://eval.in/384130)
[03:49:10] bnagy: that's how default values work
[03:49:15] bronson: has joined #ruby
[03:50:18] bnagy: >> a=Hash.new {|h,k| h[k] = "Go fish"}; [a[:blah], a.keys]
[03:50:19] ruboto: bnagy # => ["Go fish", [:blah]] (https://eval.in/384134)
[03:51:00] michaeldeol: has joined #ruby
[03:51:03] pabs: you might want something like this: Hash.new { |h, k| h[k] = Hash.new { |h, k| h[k] = Hash.new { |h, k| h[k] = [] } } }
[03:51:06] pabs: >> a = Hash.new { |h, k| h[k] = Hash.new { |h, k| h[k] = Hash.new { |h, k| h[k] = [] } } }
[03:51:07] ruboto: pabs # => {} (https://eval.in/384136)
[03:51:10] pabs: >> a[1][2][3] << 4
[03:51:11] ruboto: pabs # => undefined local variable or method `a' for main:Object (NameError) ...check link for more (https://eval.in/384137)
[03:51:41] pabs: >> a = Hash.new { |h, k| h[k] = Hash.new { |h, k| h[k] = Hash.new { |h, k| h[k] = [] } } }; a[1][2][3] << 4; a[1][2][3]
[03:51:42] ruboto: pabs # => [4] (https://eval.in/384139)
[03:51:44] nobitanobi: has joined #ruby
[03:51:54] pabs: make sense?
[03:52:17] ruby-lang517: Yes, it does. Thanks :)
[03:52:25] pabs: sure, no problem
[03:52:57] hakunin: has joined #ruby
[03:54:28] starfox_sf: has joined #ruby
[03:59:08] towski_: has joined #ruby
[03:59:32] tvw: has joined #ruby
[03:59:49] celly: has joined #ruby
[04:02:13] Musashi007: has joined #ruby
[04:02:50] celly: good evening all
[04:05:25] krisquigley: has joined #ruby
[04:07:15] swgillespie: has joined #ruby
[04:08:20] j4cknewt: has joined #ruby
[04:09:00] swgillespie: has joined #ruby
[04:12:04] Exuma: has joined #ruby
[04:12:04] swgillespie: has joined #ruby
[04:12:08] fedexo: has joined #ruby
[04:12:39] theery: has joined #ruby
[04:15:52] psyprus: has joined #ruby
[04:19:27] gkra: has joined #ruby
[04:20:25] chinmay_dd: has joined #ruby
[04:22:30] northfurr: has joined #ruby
[04:23:11] rbowlby: has joined #ruby
[04:25:29] balazs: has joined #ruby
[04:26:55] LMity: has joined #ruby
[04:28:32] ralphTrinton: has joined #ruby
[04:30:16] fujimura: has joined #ruby
[04:30:16] iamninja: has joined #ruby
[04:30:40] workmad3: has joined #ruby
[04:31:01] dudo: has joined #ruby
[04:33:20] skade: has joined #ruby
[04:37:00] GGMethos: has joined #ruby
[04:37:48] bruno-: has joined #ruby
[04:38:50] Prawnzy: has joined #ruby
[04:41:50] GitGud: has joined #ruby
[04:44:17] shevy: test worked
[04:44:28] renier: has joined #ruby
[04:44:29] simplyianm: has joined #ruby
[04:44:58] celly: thank you shevy. wasn't sure how to properly post to the room
[04:45:36] nobitanobi: has joined #ruby
[04:46:50] Makorak: has joined #ruby
[04:49:02] darithorn: has joined #ruby
[04:49:16] simplyianm: has joined #ruby
[04:50:47] mengu: has joined #ruby
[04:53:52] shevy: wow... I started to compile webkitgtk 8 hours before, then went to bed
[04:53:54] sepp2k: has joined #ruby
[04:53:58] shevy: I woke up not too long ago and it is still compiling
[04:56:02] Radar: Get a faster computer
[04:56:17] Radar: A Tianhe-2 should compile it under an hour.
[04:56:20] renderful: has joined #ruby
[04:56:44] Makorak: has joined #ruby
[04:58:54] Hanmac: has joined #ruby
[04:59:49] penzur: has joined #ruby
[05:00:48] valeri_uF0: has joined #ruby
[05:00:59] monsieur1: has joined #ruby
[05:01:20] yeticry: has joined #ruby
[05:02:51] i8igmac: how do i block threw xpath resaults
[05:02:58] i8igmac: xpath("//tr[contains(@class, 'even')]").size=>13
[05:03:13] i8igmac: xpath("//tr[contains(@class, 'even')]").each => no block given
[05:03:26] i8igmac: there are 13 blocks,
[05:04:16] i8igmac: oh im dumb
[05:04:48] icebourg: has joined #ruby
[05:05:02] diegok: has joined #ruby
[05:05:56] pontiki: has joined #ruby
[05:07:09] theery_: has joined #ruby
[05:07:30] shevy: you have come to do stuff
[05:07:41] pontiki: not particularly
[05:08:52] datanoise: has joined #ruby
[05:10:05] penzur: has joined #ruby
[05:11:44] francois_: has joined #ruby
[05:12:35] yeticry: has joined #ruby
[05:16:34] revath: has joined #ruby
[05:17:31] Makorak: has joined #ruby
[05:20:52] tkuchiki: has joined #ruby
[05:21:41] Xeago: has joined #ruby
[05:23:23] AndroidLoverInSF: has joined #ruby
[05:25:00] alphaatom|pc: has joined #ruby
[05:25:01] alphaatom: has joined #ruby
[05:25:56] balazs: has joined #ruby
[05:25:56] A205B064: has joined #ruby
[05:26:26] tagrudev: has joined #ruby
[05:30:19] Palmer11: has joined #ruby
[05:31:58] balazs: has joined #ruby
[05:33:23] tkuchiki: has joined #ruby
[05:33:44] fabrice31: has joined #ruby
[05:35:51] haraoka: has joined #ruby
[05:35:54] dhjondoh: has joined #ruby
[05:39:11] StephenOTT: has joined #ruby
[05:41:11] sigurding: has joined #ruby
[05:41:30] towski__: has joined #ruby
[05:41:42] sevenseacat: has joined #ruby
[05:44:21] snockerton: has joined #ruby
[05:44:25] uptownhr: has joined #ruby
[05:45:14] swgillespie: has joined #ruby
[05:46:10] konsolebox: has joined #ruby
[05:46:48] balazs: has joined #ruby
[05:47:12] snockerton: how do i make "Building native extensions. This could take a while???" not take a while?
[05:48:00] _djbkd: has joined #ruby
[05:48:35] mengu: has joined #ruby
[05:48:43] mengu: has joined #ruby
[05:51:15] Makorak: has joined #ruby
[05:52:21] ramfjord: has joined #ruby
[05:53:15] towski_: has joined #ruby
[05:54:16] peter_paule: has joined #ruby
[05:54:24] krisquigley: has joined #ruby
[05:54:58] Pupeno: has joined #ruby
[05:55:45] michael_mbp: has joined #ruby
[05:56:13] Pupeno: has joined #ruby
[05:57:46] ndrei: has joined #ruby
[05:58:50] Radar: snockerton: get a faster computer
[05:59:48] shevy: snockerton it will compile things without showing you the results; you can make it show you the results e. g. if you are in the same directory
[06:00:02] shevy: so it's just like compiling stuff anyway
[06:00:03] Ox0dea: shevy: You sound like a Gentoo user.
[06:00:04] langlands: has joined #ruby
[06:00:21] jtdoncas: has joined #ruby
[06:00:22] shevy: don't insult me man
[06:00:23] shevy: I don't use python to manage my system
[06:00:37] Ox0dea: To be fair, you don't use Ruby either. :)
[06:00:39] chinmay_dd: has joined #ruby
[06:00:47] Dopagod: has joined #ruby
[06:00:51] shevy: yeah I guess you are right https://rubygems.org/profiles/58718
[06:01:34] Ox0dea: That is very impressive, but in which language is your package manager written?
[06:01:40] Pupeno: has joined #ruby
[06:01:41] snockerton: Radar: I suppose I can use a bigger EC2 instance
[06:01:46] jpfuentes2: has joined #ruby
[06:01:52] Radar: snockerton: What are you using now?
[06:02:12] snockerton: i'm doing an automated deployment and this part takes 10+ minutes on a c3.large
[06:02:50] Radar: which gem?
[06:02:51] shevy: Ox0dea https://rubygems.org/gems/easycompile https://rubygems.org/gems/rbt https://rubygems.org/gems/cookbooks - don't use any of these though, I am rewriting again :\
[06:03:33] theery: has joined #ruby
[06:04:01] snockerton: it's when i run rvm install 2.1.5
[06:04:03] snockerton: Successfully installed mini_portile-0.6.2
[06:04:03] snockerton: Building native extensions. This could take a while...
[06:04:36] snockerton: wait, what am i talking about, it's rails 4.2.1
[06:04:52] charliesome: has joined #ruby
[06:05:24] snockerton: i was hoping someone would say their's an rvm for gem extension binaries or something
[06:05:28] shevy: 10 minutes sounds quite a long time
[06:05:55] Iskarlar: has joined #ruby
[06:05:55] shevy: I think there is some repository where things can be downloaded too
[06:06:14] snockerton: of pre-compiled binaries?
[06:06:15] shevy: or at least I seem to remember that from ... perhaps 10 weeks ago here on #ruby?
[06:06:31] shevy: didn't jhass say something like that? hmm
[06:07:02] shevy: snockerton what gem takes +10 minutes btw?
[06:07:06] AndroidLoverInSF: has joined #ruby
[06:07:14] snockerton: luislavena/gem-compiler
[06:07:29] shevy: gem install gem-compiler
[06:07:30] shevy: Fetching: gem-compiler-0.3.0.gem (100%)
[06:07:30] shevy: Successfully installed gem-compiler-0.3.0
[06:07:32] shevy: are you sure?
[06:07:46] snockerton: no, i was saying that looks promising for the pre-compiled binaries deal
[06:08:19] revath: has joined #ruby
[06:08:47] snockerton: ah, it's this little basterd
[06:08:48] snockerton: nokogiri-1.6.6.2
[06:08:50] skade: has joined #ruby
[06:10:16] shevy: ok let's see
[06:10:23] shevy: "Building native extensions. This could take a while..."
[06:11:59] tejasmanohar: has joined #ruby
[06:12:04] shevy: finished, in 140 seconds
[06:12:06] tejasmanohar: anyone know what ruby version is to be used with this project?
[06:12:08] tejasmanohar: https://github.com/eahanson/imageproxy
[06:12:22] shevy: my machine has 8 gig ram, Intel(R) Celeron(R) CPU G1630 @ 2.80GHz
[06:12:27] tejasmanohar: doesnt seem to be working w/ 2.2
[06:12:40] tejasmanohar: /Users/tejas/.rvm/gems/ruby-2.2.2/gems/rake-0.8.7/lib/rake/alt_system.rb:32:in `<module:AltSystem>': uninitialized constant Rake::AltSystem::Config (NameError)
[06:12:51] tejasmanohar: (`rackup` after `bundle install`)
[06:13:09] tejasmanohar: guide in this section- https://github.com/eahanson/imageproxy#if-you-want-to-modify-the-code
[06:13:12] shevy: tejasmanohar no idea but file an issue request? :)
[06:13:43] shevy: https://github.com/eahanson/imageproxy/blob/master/imageproxy.gemspec does not list a minimum ruby version
[06:13:44] tejasmanohar: ehhhh i could probably make a new version by the time a response comes :P
[06:13:46] tejasmanohar: looks inactive
[06:14:00] tejasmanohar: i.e. no response https://github.com/eahanson/imageproxy/issues/20
[06:14:05] tejasmanohar: anyone know a better alternative to this?
[06:15:32] shevy: yeah no change in more than a year
[06:15:49] tejasmanohar: trying to find a nicer alternative
[06:15:56] tejasmanohar: thats in a language i can work with
[06:16:00] shevy: rmagick could do the same perhaps?
[06:16:08] tejasmanohar: could rewrite my own as i said :P
[06:16:12] tejasmanohar: but more trying to go fast here
[06:16:19] andikr: has joined #ruby
[06:16:40] tejasmanohar: just trying to deploy a quick service i can proxy s3 thru and do image resizes on the fly
[06:16:40] Radar: issue is probably very simple
[06:16:43] Radar: clone repo, try to fix
[06:17:54] tejasmanohar: going to try to force a rack version
[06:17:57] tejasmanohar: i think that might be the issue
[06:18:55] Rubie: has joined #ruby
[06:19:00] fujimura: has joined #ruby
[06:19:29] workmad3: has joined #ruby
[06:20:03] djellemah: has joined #ruby
[06:20:23] tkuchiki: has joined #ruby
[06:20:44] kohgpat: has joined #ruby
[06:21:00] fujimura_: has joined #ruby
[06:21:33] Radar: there might've been no response to issue #20 because it's a shit issue
[06:21:42] Radar: No steps to reproduce or any info at all
[06:22:53] keen___________: has joined #ruby
[06:22:55] dg-ratiodata: has joined #ruby
[06:23:29] Rarikon: has joined #ruby
[06:25:51] jas02: has joined #ruby
[06:26:57] chussenot: has joined #ruby
[06:28:37] khebbie: has joined #ruby
[06:29:50] Radar: tejasmanohar: From what I can tell, it's because Rake 0.8.7 is trying to access Config, which is not a constant in Ruby any more.
[06:29:57] Radar: The right constant is RbConfig
[06:30:31] khebbie_: has joined #ruby
[06:30:39] Radar: Bumping the Rake version allows `bundle exec rackup` to wor
[06:38:26] dg-ratiodata: has joined #ruby
[06:38:28] flughafen: +26 to that!
[06:39:10] lupine: has joined #ruby
[06:39:31] ndrei: has joined #ruby
[06:41:10] Spami: has joined #ruby
[06:42:01] msgodf: has joined #ruby
[06:42:24] railsraider: has joined #ruby
[06:42:53] pyon: has joined #ruby
[06:43:10] railsraider: has joined #ruby
[06:46:01] luckyme: has joined #ruby
[06:46:11] roolo: has joined #ruby
[06:46:27] fabrice31: has joined #ruby
[06:46:37] Stan: has joined #ruby
[06:47:53] Makorak: has joined #ruby
[06:48:22] x0F: has joined #ruby
[06:48:25] fabrice31: has joined #ruby
[06:52:08] torpig: has joined #ruby
[06:52:27] hubcaps: has joined #ruby
[06:52:29] troulouliou_dev: has joined #ruby
[06:52:59] mengu: has joined #ruby
[06:55:13] fgo: has joined #ruby
[06:56:15] fujimura: has joined #ruby
[06:56:16] Palmer11: has joined #ruby
[06:57:04] SOLDIERz: has joined #ruby
[06:57:07] dmolina: has joined #ruby
[06:58:08] fantazo: has joined #ruby
[06:58:17] Oog: has joined #ruby
[06:58:29] vondruch: has joined #ruby
[06:58:32] dg-ratiodata: has joined #ruby
[07:00:02] datanoise: has joined #ruby
[07:00:35] rht: has joined #ruby
[07:03:20] francoi__: has joined #ruby
[07:10:11] yfeldblum: has joined #ruby
[07:13:37] wpp: has joined #ruby
[07:16:23] djellemah_: has joined #ruby
[07:20:22] C1V0: has joined #ruby
[07:20:26] Ox0dea: https://bugs.ruby-lang.org/issues/11286
[07:20:34] Ox0dea: What're the chances this makes it in?
[07:20:50] k3asd`: has joined #ruby
[07:21:03] psye: has joined #ruby
[07:22:00] Cust0sLim3n: has joined #ruby
[07:23:14] shevy: just call Nobu by phone
[07:24:13] Ox0dea: He doesn't even lurk in #ruby-core. :(
[07:25:22] sevenseacat: Ox0dea: i know nothing about ruby core but it seems good to me. i didnt even know grep could do that.
[07:26:46] Ox0dea: sevenseacat: It's sort of its raison d'??tre.
[07:28:05] Ox0dea: It's basically #include? on steroids.
[07:28:14] Ox0dea: Where the steroids are case equalities.
[07:28:27] sevenseacat: ACTION is not very good rubyist sometimes.
[07:28:37] Ox0dea: Case equality is a really great idea, and I find it odd that Hash and Set don't define their own #===.
[07:28:50] monsieurp: has joined #ruby
[07:29:07] khebbie: has joined #ruby
[07:29:37] Ox0dea: s/#include?/#select/
[07:29:50] Ox0dea: ACTION is not a very good Rubyist sometimes.
[07:30:16] khebbie_: has joined #ruby
[07:30:24] casadei: has joined #ruby
[07:31:58] skade: has joined #ruby
[07:32:21] rdark: has joined #ruby
[07:33:35] quimrstorres: has joined #ruby
[07:34:11] francoi__: has joined #ruby
[07:34:45] allomov: has joined #ruby
[07:35:30] shevy: sevenseacat you make up for it with a superior accent
[07:36:11] monsieur1: has joined #ruby
[07:36:39] anisha: has joined #ruby
[07:36:47] psye: has joined #ruby
[07:36:51] mdih: hi guys,may i ask what good book to read bout ruby? :D
[07:37:44] mdih: i'd prefer something that touches the core :)
[07:37:47] Iskarlar: has joined #ruby
[07:38:06] sinkensabe: has joined #ruby
[07:38:28] shevy: the pickaxe is ok mdih
[07:38:47] shevy: https://pragprog.com/book/ruby4/programming-ruby-1-9-2-0
[07:38:56] codecop: has joined #ruby
[07:39:54] j4cknewt: has joined #ruby
[07:41:15] t88m33s: has joined #ruby
[07:41:20] mdih: thanx @shevy, ill take a look
[07:42:20] bruno-: has joined #ruby
[07:43:15] micmus: has joined #ruby
[07:43:18] krisquigley: has joined #ruby
[07:44:07] khebbie: has joined #ruby
[07:44:07] t88m33s: How do you mock a class, as opposed to an instance of it? I mean, when your class-under-test initializes some object inside of itself, as opposed to having it passed to it (DI).
[07:44:22] c0m0: has joined #ruby
[07:45:57] dumdedum: has joined #ruby
[07:46:04] fabrice31_: has joined #ruby
[07:46:44] fabrice31_: has joined #ruby
[07:46:50] sandstrom: has joined #ruby
[07:47:27] veleno: has joined #ruby
[07:47:45] sigurding: has joined #ruby
[07:50:10] shevy: Does anyone of you have an example for readline completion support, when you do something like "command foo<PRESS TAB HERE>"? In other words, I need to show a list of tab-completions not solely alone on foo<TAB> but on the command prior to foo; I want to complete on different subcommands, for a main command
[07:51:04] Iskarlar: has joined #ruby
[07:51:18] mattarse: has joined #ruby
[07:54:04] senayar: has joined #ruby
[07:54:05] senayar: has joined #ruby
[07:55:56] dmolina: has joined #ruby
[07:56:21] quentin: has joined #ruby
[08:00:26] Forgetful_Lion: has joined #ruby
[08:04:21] mikecmpbll: has joined #ruby
[08:04:26] last_staff: has joined #ruby
[08:05:22] quentin: hi everyone, I am modifying a native C extension and I experience a crash when I pass more than 14 arguments to rb_struct_define(...).
[08:05:22] quentin: any idea ?
[08:08:15] workmad3: has joined #ruby
[08:08:21] psye: has joined #ruby
[08:09:35] Musashi007: has joined #ruby
[08:10:07] Ox0dea: quentin: https://github.com/ruby/ruby/blob/trunk/vm_insnhelper.c#L1514-L1518
[08:10:12] Ox0dea: I suspect that has something to do with it.
[08:10:37] fgo: has joined #ruby
[08:10:44] quentin: yes probably!
[08:11:08] Oog: has joined #ruby
[08:12:38] quentin: or is it a limitation from ruby side, not able to call C function with more than 15 arguments
[08:13:26] DEA7TH: has joined #ruby
[08:13:31] Ox0dea: quentin: As long as you're using a compiler from this century, that seems less likely.
[08:14:03] shevy: quentin I think the limit is higher, 15 is too low
[08:14:04] quentin: i means the code that you point out looks like it is made to call C function from ruby
[08:14:35] ljarvis: 127 is the C limit iirc
[08:14:42] ljarvis: (arguments to one function call)
[08:16:33] lee-jon: has joined #ruby
[08:16:52] zudochkin: has joined #ruby
[08:18:12] krz: has joined #ruby
[08:19:13] ddv: anyknow how I can call unpack on a binary literal?
[08:19:23] ddv: anyone*
[08:21:14] naftilos76: has joined #ruby
[08:22:02] t88m33s: has joined #ruby
[08:22:07] zenspider: binary literal? that doesn't make sense
[08:22:24] Zai00: has joined #ruby
[08:22:40] djbkd_: has joined #ruby
[08:22:41] MatthewsFace: has joined #ruby
[08:22:49] quentin: so, I found the problem, as you know the last argument for rb_struct_create is supposed to be "NULL" (many people commenting about that online), but it only works with less than 15 arguments (I guess it is related to the number of registers available in x86-64). With more than 14 arguments, I have to pass (void*)0.
[08:23:21] ddv: ah found it
[08:23:47] zenspider: quentin: do you mean NULL or "NULL"?
[08:23:59] zenspider: because NULL _is_ (void*)0
[08:24:14] quentin: well, gcc disagrees with you zenspider
[08:24:37] quentin: probably a way varargs are read and 0 is put onto the stack or registers
[08:25:46] Ox0dea: ~ $ echo -e "#include <stdio.h>\nNULL" | gcc -E - | tail -1
[08:25:48] Ox0dea: ((void *)0)
[08:25:51] quentin: in fact when i use NULL, the segfault is on 0x007fff0000000
[08:26:25] Ox0dea: quentin: gcc is not (and will likely never be) the cause of your troubles.
[08:26:43] zenspider: quentin: don't think so
[08:26:53] zenspider: running this through cc -E: void * x = NULL;
[08:27:00] zenspider: results in: void * x = ((void *)0);
[08:27:09] quentin: no of course but the way varargs are put on the stack and red by the ruby api fucked something
[08:27:39] zenspider: of course, Ox0dea beat me to it. tho, my output was from clang's cc. :)
[08:27:47] zenspider: I'm a bit slow. Sorry Ox0dea
[08:27:52] Ox0dea: zenspider: No worries.
[08:28:15] zenspider: I've only ever found one bug in gcc (or any C compiler for that matter)
[08:28:19] zenspider: but boy was it a doozy
[08:28:40] et09: has joined #ruby
[08:30:21] zenspider: caused one tiny c file to take ~20-30 minutes to compile because of a static initialization
[08:30:49] zenspider: incredibly hard to hunt down and slowed us down for a very long time
[08:31:09] tesuji: has joined #ruby
[08:31:21] Ox0dea: What ended up being the overarching issue?
[08:31:25] mattarse: has joined #ruby
[08:31:46] Ox0dea: That is, how did the initialization's being static so thoroughly confuse the compiler?
[08:32:40] zenspider: something about the code it had to generate in order for the static initialization to occur. it was calling functions IN the initialization and something about load sequences meant that it had to be more complicated than normal function calls
[08:33:10] zenspider: but... it was STATIC data, so I replaced it with a simple comment of what it was, and the perl code to generate the static data we needed (ctimes, iirc)
[08:33:16] zenspider: boom, millisecond compile time again
[08:33:32] zenspider: that was a long time ago. sure it's been fixed by now
[08:33:37] Ox0dea: Kudos to that compiler for (eventually) figuring out how to do it, though.
[08:33:37] krisquigley: has joined #ruby
[08:34:16] zenspider: honestly, I'd rather it bomb out after 5 seconds so the build would fail and we would have caught it weeks earlier instead of wasting man hours on it
[08:34:26] zenspider: exit 1 "nope... this is dumb"
[08:34:51] Ox0dea: ACTION would insert a joke about strength reduction if he knew anything about how compilers do their magic.
[08:35:02] axl__: has joined #ruby
[08:35:17] Xeago: has joined #ruby
[08:36:20] edwinvdgraaf: has joined #ruby
[08:36:29] Squarepy: has joined #ruby
[08:36:45] ringarin: has joined #ruby
[08:36:53] marr: has joined #ruby
[08:36:57] veinofstars: has joined #ruby
[08:37:50] zenspider: quentin: I think I'm gonna have to disagree with your assessment.
[08:38:54] Ox0dea: zenspider: If you've got the time to take a look, does this seem good? https://bugs.ruby-lang.org/issues/11286
[08:39:15] sinkensabe: has joined #ruby
[08:39:40] zenspider: holy shit. there's a #one? now ?
[08:40:24] quentin: i guess that in fact ruby is taking my 0 pointer and try to access somewhere in a negative offset leading to that 0x0077ff... address where the segfault happens
[08:41:13] DEA7TH: has joined #ruby
[08:41:55] zenspider: and it doesn't have anything to do with the number of x86 registers either. stop blaming your tools before totally proving your code is 100% correct.
[08:42:04] zenspider: Ox0dea: I like the idea. a lot.
[08:42:09] Ox0dea: Awesome. :)
[08:42:29] Ox0dea: I'm not sure my implementation is ideal, but it's the least "invasive".
[08:42:31] zenspider: studying the patch
[08:43:00] chussenot: has joined #ruby
[08:43:51] dg-ratiodata: has joined #ruby
[08:44:03] quentin: zenspider: i'm blaming no tool, only the code using the tool, and i'm looking for the problem, if you don't want to be constructive fine but i don't need your sad mood.
[08:44:08] kohgpat: has joined #ruby
[08:44:16] zenspider: Ox0dea: you can use refute(x) instead of assert(!x)
[08:44:20] zenspider: style, really...
[08:44:23] tkuchiki: has joined #ruby
[08:44:40] zenspider: quentin: sad mood? you might be projecting.
[08:45:14] Ox0dea: zenspider: I tried to mimic the style of the surrounding code.
[08:45:32] zenspider: Ox0dea: absolutely... but some of that code is crufty :)
[08:45:37] withnale_: has joined #ruby
[08:45:51] Ox0dea: It is, but I didn't want to clutter what is already a big-ish patch.
[08:45:54] zenspider: Ox0dea: I'm not entirely sure about the enum_* changes... but since you have tests... *shrug* seems good
[08:46:32] zenspider: ok. I _don't_ like ENUMFUNC... but that might be unavoidable
[08:47:03] Ox0dea: Yep, that's the really questionable part of the patch.
[08:47:06] mandarinkin: has joined #ruby
[08:47:07] zenspider: meh. they were already doing a double-hash macro... so whatever
[08:47:21] Ox0dea: Ah, I thought you meant my modifying it to take a second argument.
[08:47:49] Ox0dea: I didn't see how else to different the one-argument case without making significant changes.
[08:47:53] Ox0dea: *differentiate
[08:48:11] dg-ratiodata: has joined #ruby
[08:48:12] zenspider: tada. commented on the issue
[08:48:12] Ox0dea: That word does not like me right now.
[08:48:35] lessless: has joined #ruby
[08:48:54] Ox0dea: Huzzah! Thanks for your vote. ^_^
[08:49:14] zenspider: good luck with that patch! I hope they accept it
[08:49:39] zenspider: course, prolly won't be released for a while even if it does... but hey... if you get a patch in, that's all that matters
[08:50:21] Ox0dea: Yeah, it doesn't seem the kind of thing worth backporting, but it would be nice to have it in trunk.
[08:50:44] Ox0dea: And, of course, 3.0.
[08:51:53] senayar: has joined #ruby
[08:51:53] senayar: has joined #ruby
[08:51:58] Ox0dea: I heard that's gonna have hygienic macros.
[08:52:27] yaw: has joined #ruby
[08:52:30] iamninja: has joined #ruby
[08:54:18] lala: has joined #ruby
[08:54:24] Tempesta: has joined #ruby
[08:54:31] ahmetkapikiran: has joined #ruby
[08:55:24] lee-jon_: has joined #ruby
[08:56:11] nofxx: has joined #ruby
[08:56:11] nofxx: has joined #ruby
[08:57:21] x44x45x41x4E: has joined #ruby
[08:57:54] quentin: has left #ruby: ()
[08:58:17] zenspider: ok. one more shot of bourbon and then bed. 'ta
[09:00:14] Ox0dea: [Enjoy] * 2, and thanks again.
[09:00:21] Oog: has joined #ruby
[09:00:45] sinkensabe: has joined #ruby
[09:01:12] Oog: def foo; yield; end def bar; foo{yield}; end bar{puts 'hi') - anything wrong/odd with the foo {yield} ?
[09:02:35] scx_: How to add new line to string? I don't want to use 'str += "\n"' or Document here. I am looking for variable which is "\n" on UNIX and "\r\n" on Windows.
[09:02:51] workmad3: has joined #ruby
[09:03:14] Ox0dea: scx: The $/ contains the system's default record separator.
[09:03:20] Ox0dea: $/ variable
[09:03:59] Ox0dea: >> foo = 'line'; foo << $/; foo
[09:04:00] ruboto: Ox0dea # => "line\n" (https://eval.in/384222)
[09:04:13] Oog: https://gist.github.com/anonymous/031e21f64682c0893a1b - this lok ok?
[09:04:51] Ox0dea: scx: You can require 'English' and use $INPUT_RECORD_SEPARATOR if you're opposed to cryptic global variables.
[09:04:53] tomphp: has joined #ruby
[09:04:57] ljarvis: Oog: in terms of what?
[09:05:28] denver: has joined #ruby
[09:06:01] scx: Ox0dea: thanks
[09:06:02] Oog: im conerned about the {yield}
[09:06:10] Ox0dea: scx: Sure thing.
[09:06:23] quimrstorres: has joined #ruby
[09:06:36] tkuchiki: has joined #ruby
[09:07:02] Ox0dea: Oog: You can "double yield" just fine, if that's the crux of your question.
[09:07:37] Cust0sLim3n: has joined #ruby
[09:08:06] ljarvis: Oog: yes the yield is fine
[09:08:20] MatthewsFace: has joined #ruby
[09:10:21] airy: has joined #ruby
[09:10:30] Oog: i guess i was worried about the yield in the other block making sure it calls the right yield (ie the one passed to with_lock_save
[09:10:53] airy: how do i get .so file while creating ffi wrapper via ruby https://github.com/ffi/ffi/wiki/Examples
[09:11:19] Oog: also makes me question why this post exists http://mudge.name/2011/01/26/passing-blocks-in-ruby-without-block.html seems problem is solved via the {yield} trick
[09:11:25] Oog: as the firs tcomment seems to point out
[09:11:40] senayar: has joined #ruby
[09:11:41] senayar: has joined #ruby
[09:11:48] nofxx: has joined #ruby
[09:12:30] undeadaedra: hi yorickpeterse
[09:14:18] workmad3: has joined #ruby
[09:15:42] revath: has joined #ruby
[09:16:00] fgo: has joined #ruby
[09:18:09] dg-ratiodata: has joined #ruby
[09:18:15] GPrime: has joined #ruby
[09:19:08] darkf_: has joined #ruby
[09:19:21] casadei: has joined #ruby
[09:22:14] incomplete: has joined #ruby
[09:23:47] al2o3-cr: has joined #ruby
[09:25:19] bruno-: has joined #ruby
[09:25:40] lkba: has joined #ruby
[09:26:34] mandarinkin: has joined #ruby
[09:26:52] multi_io: has joined #ruby
[09:27:14] Ilyas: has joined #ruby
[09:27:28] allomov: has joined #ruby
[09:27:40] mdih: has joined #ruby
[09:28:26] Iskarlar: has joined #ruby
[09:28:54] keernel: has joined #ruby
[09:29:14] woollyams: has joined #ruby
[09:29:35] fgo: has joined #ruby
[09:31:48] Igorshp: has joined #ruby
[09:32:44] edwinvdgraaf: has joined #ruby
[09:33:16] incomplete: has left #ruby: ()
[09:35:56] ndrei: has joined #ruby
[09:36:44] edwinvdg_: has joined #ruby
[09:36:55] zudochkin: has joined #ruby
[09:37:49] railsraider: has joined #ruby
[09:38:32] DEA7TH: has joined #ruby
[09:38:58] camilasan: has joined #ruby
[09:40:22] sandstrom: has joined #ruby
[09:41:09] skade: has joined #ruby
[09:41:25] hectortrope: has joined #ruby
[09:43:05] djellemah__: has joined #ruby
[09:43:17] sgambino: has joined #ruby
[09:44:34] ahmetkapikiran: has joined #ruby
[09:49:23] startupality: has joined #ruby
[09:53:03] jamespeach: has joined #ruby
[09:54:42] jamespeach: Has anyone here completed one of those coding bootcamps?
[09:55:42] ruboto: Just ask your question, if anyone has or can, they will respond.
[09:55:52] krisquigley: has joined #ruby
[09:56:09] yoongkang: has joined #ruby
[09:56:13] Rubie: has joined #ruby
[09:58:54] railsraider: has joined #ruby
[10:00:40] Makorak_: has joined #ruby
[10:01:07] dhjondoh: has joined #ruby
[10:02:08] abyss: apeiros: hey;) Regarding to the yesterday's script;) something like this: if ( line !~ /INSERT INTO.*)|UPDATE.*)|DELETE.*)/ ) should pass? I mean then it will check each line between INSERT INTO and ) or it doesn't work this way?
[10:02:12] khebbie: has joined #ruby
[10:02:49] abyss: sorry if ( line =~ should be ofcourse
[10:03:02] Cust0sLim3n: has joined #ruby
[10:06:42] zudochkin: has joined #ruby
[10:07:40] sdothum: has joined #ruby
[10:12:38] khebbie: has joined #ruby
[10:13:20] bluish: has joined #ruby
[10:13:29] Oog: has joined #ruby
[10:15:27] dionysus69: has joined #ruby
[10:16:12] airy: has joined #ruby
[10:16:27] sinkensabe: has joined #ruby
[10:16:40] airy: how path are given in ruby?
[10:17:42] airy: suppose i want to give path(ffi) to particular folder
[10:18:43] dg-ratiodata: has joined #ruby
[10:18:55] railsraider: has joined #ruby
[10:20:55] nofxx: has joined #ruby
[10:21:31] strixd: has joined #ruby
[10:22:12] Siyfion: has joined #ruby
[10:22:22] strixd: has joined #ruby
[10:22:55] renderful: has joined #ruby
[10:23:24] mengu: has joined #ruby
[10:25:52] sheeny: has joined #ruby
[10:26:33] sheeny: Hi, would anybody be able to explain to my why inject gives me this? https://gist.github.com/anonymous/43b4dc8780b61253b7d9
[10:27:48] Ox0dea: >> 0.1 + 0.2
[10:27:49] ruboto: Ox0dea # => 0.30000000000000004 (https://eval.in/384263)
[10:27:51] Ox0dea: sheeny: ^
[10:28:09] zudochkin: has left #ruby: ()
[10:28:18] undeadaedra: >> 3.50 + 3.03
[10:28:19] ruboto: undeadaedra # => 6.529999999999999 (https://eval.in/384264)
[10:28:30] undeadaedra: It's not inject the problem
[10:28:57] Ox0dea: sheeny: http://floating-point-gui.de/
[10:29:13] ccooke: sheeny: For what it's worth, you could also try:
[10:29:24] ccooke: >> [3.50,3.03].inject(:+)
[10:29:25] ruboto: ccooke # => 6.529999999999999 (https://eval.in/384265)
[10:29:55] ccooke: (in terms of nice code. It won't make any difference to the answer)
[10:29:56] sheeny: ccooke: ah yes thank you :)
[10:30:31] sigurding: has joined #ruby
[10:31:10] sheeny: thanks everyone that website makes more sense.. guess I just wasnt expecting that haha! much appreciated :)
[10:31:40] Ox0dea: sheeny: Ruby has rational number support via the Rational class, if you really need it.
[10:31:46] chussenot: has joined #ruby
[10:31:50] Iskarlar: has joined #ruby
[10:32:03] undeadaedra: Floats are often a (bad) surprise
[10:32:13] sheeny: Ox0dea: Thanks ill take a look
[10:32:23] Darkwater: 2 is really 2.0000000000019
[10:32:34] Darkwater: but don't tell anyone
[10:33:02] sheeny: yeah It's for a project which I inherited, i would have prefered everything stored in pence/cents but hey ho
[10:33:30] ccooke: sheeny: If perfect accuracy is needed, you could use the bigdecimal module
[10:33:32] undeadaedra: Darkwater: not enough arguments
[10:33:43] khebbie: has joined #ruby
[10:33:52] ccooke: >> require 'bigdecimal'; [BigDecimal.new("3.50"),3.03].inject(:+)
[10:33:53] ruboto: ccooke # => #<BigDecimal:41d3a144,'0.653E1',18(27)> (https://eval.in/384266)
[10:33:58] Darkwater: undeadaedra: what if I want the usage help text
[10:34:20] workmad3: Darkwater: thankfully, all integers are properly representable in floats :P
[10:34:21] undeadaedra: Darkwater: too long for IRC :)
[10:34:37] Darkwater: workmad3: yeah
[10:34:43] sheeny: thanks :)
[10:34:47] workmad3: shame about things like 0.1 though :D
[10:34:53] Darkwater: sidenote, for anyone having trouble understanding why floats are shit: imagine 0.3333333333
[10:35:00] Darkwater: that's perfectly writable in base 3 as 0.1
[10:35:15] Darkwater: 0.5 is perfectly writable in base 2 as 0.1
[10:35:35] commondream: has joined #ruby
[10:35:43] Darkwater: 0.25 in base 2 is 0.01
[10:35:53] workmad3: Darkwater: I always prefer to show the rational compared to the float/decimal notation personally... e.g. 1/3 rather than 0.33333...
[10:36:00] workmad3: Darkwater: less confusion IMO
[10:36:11] undeadaedra: yes, because 1/3 ??? 0.33333
[10:36:12] Darkwater: 0.24 in base 2 is 0.0011110101110000101000111101etc
[10:36:36] rodfersou: has joined #ruby
[10:36:52] LMity: has joined #ruby
[10:37:02] Darkwater: workmad3: yeah, but it's harder to work with 1/3 than with 0.33333 as a computer
[10:37:09] Darkwater: also in my personal opinion
[10:37:36] workmad3: Darkwater: yeah... but you're not dealing with a computer... you're explaining number representability to people :P
[10:38:26] Darkwater: and also why computers can't handle numbers like 0.24 as floats usually
[10:38:29] workmad3: Darkwater: and saying '0.5 is 0.1 in base 2' gets people going 'wuh, why are you showing me two different decimals and saying they're the same?' as you forgot to specify that 0.5 was in base10 decimal notation ;)
[10:38:39] towski_: has joined #ruby
[10:38:46] Darkwater: meh whatever
[10:38:49] Darkwater: still asleep
[10:39:40] Iskarlar: has joined #ruby
[10:40:49] phutchins: has joined #ruby
[10:41:59] tkuchiki: has joined #ruby
[10:42:15] krisquigley: has joined #ruby
[10:42:44] mengu: has joined #ruby
[10:42:45] mengu: has joined #ruby
[10:44:35] lordkryss: has joined #ruby
[10:45:22] lee-jon: has joined #ruby
[10:45:47] commondream: has joined #ruby
[10:49:30] Al3ks: has joined #ruby
[10:50:24] jud: has joined #ruby
[10:50:46] scx: What i best way to use getters and setters in ruby?
[10:51:42] scx: should i use attr_reader, attr_writer if it is possible?
[10:52:41] scx: (or attr_accessor)
[10:52:48] GarethAdams: if the alternative is writing methods which do exactly the same thing, I don't see why you wouldn't use the shorthand
[10:53:57] bnagy: I don't tend to use attr_writer / accessor much because often you want to sanity check
[10:54:10] krisquig_: has joined #ruby
[10:54:24] bnagy: attr_reader yes, especially if you're writing def foo @foo end
[10:55:14] sandstrom: has joined #ruby
[10:56:16] senayar: has joined #ruby
[10:56:16] senayar: has joined #ruby
[10:57:36] lee-jon: has left #ruby: ()
[10:59:27] Iskarlar_: has joined #ruby
[10:59:42] camonz: has joined #ruby
[10:59:42] yoongkang: has joined #ruby
[11:02:25] fujimura: has joined #ruby
[11:02:56] ton31337: has joined #ruby
[11:03:10] tkuchiki: has joined #ruby
[11:03:18] ton31337: what's the best way to convert a = '1.1.1.1' to a = ['1.1.1.1'] ?
[11:04:55] Papierkorb: has joined #ruby
[11:05:02] allomov: has joined #ruby
[11:05:14] al2o3-cr: >> a = '1.1.1.1'; a = [a]
[11:05:15] ruboto: al2o3-cr # => ["1.1.1.1"] (https://eval.in/384280)
[11:06:38] Takumo: what's the best way to load a Logger level from a configuration file?
[11:06:55] Darkwater: use this: b
[11:07:58] casadei: has joined #ruby
[11:09:51] [k-: has joined #ruby
[11:11:08] havenwood: has joined #ruby
[11:14:51] patricknegri: has joined #ruby
[11:15:50] k3asd`: has joined #ruby
[11:16:42] _blizzy_: has joined #ruby
[11:16:48] Billias: has joined #ruby
[11:17:15] dgutierrez1287: has joined #ruby
[11:17:58] Igorshp: has joined #ruby
[11:21:38] zudochkin: has joined #ruby
[11:23:48] nikhgupta: has joined #ruby
[11:23:50] stardiviner: has joined #ruby
[11:24:32] Oog: has joined #ruby
[11:24:55] Igorshp: has joined #ruby
[11:25:06] strixd: has joined #ruby
[11:25:25] bruno-_: has joined #ruby
[11:25:34] dg-ratiodata: has joined #ruby
[11:26:03] Iskarlar: has joined #ruby
[11:26:05] strixd: has joined #ruby
[11:27:04] x0F: has joined #ruby
[11:28:09] dzejrou: has joined #ruby
[11:33:45] dede: has joined #ruby
[11:33:51] fgo: has joined #ruby
[11:35:35] diegoviola: has joined #ruby
[11:36:06] NeverDie: has joined #ruby
[11:36:09] millerti: has joined #ruby
[11:36:58] shevy: scx if you have minimal requirements to the getters and setters then sure use the attr* methods, they were added precisely because of that
[11:43:16] ndrei: has joined #ruby
[11:44:13] Zai00: has joined #ruby
[11:44:21] commondream: has joined #ruby
[11:44:46] jenrzzz: has joined #ruby
[11:46:40] ahmetkapikiran: has joined #ruby
[11:47:34] sigurding: has joined #ruby
[11:48:09] codex: has joined #ruby
[11:48:13] chthon: has joined #ruby
[11:49:24] nofxx: has joined #ruby
[11:50:06] chussenot: has joined #ruby
[11:51:27] User458764: has joined #ruby
[11:52:19] arturhoo: has joined #ruby
[11:53:51] lee-jon: has joined #ruby
[11:54:03] lee-jon: has left #ruby: ()
[11:56:39] francoi__: has joined #ruby
[11:57:33] Oog: has joined #ruby
[12:00:23] edwinvdgraaf: has joined #ruby
[12:00:55] sigurding: has joined #ruby
[12:01:36] blackmesa: has joined #ruby
[12:01:38] mattarse: has joined #ruby
[12:02:00] blue_deref: has joined #ruby
[12:02:21] freerobby: has joined #ruby
[12:02:34] yorickpeterse: https://pbs.twimg.com/media/CH3JBYwW8AAuGxA.png:orig oops
[12:05:00] Iskarlar: has joined #ruby
[12:05:09] mcclurmc: has joined #ruby
[12:06:09] serivich: has joined #ruby
[12:09:56] GitGud: has joined #ruby
[12:11:08] carlosoliveira: has joined #ruby
[12:11:30] thelastinuit: has joined #ruby
[12:11:48] Igorshp: has joined #ruby
[12:12:53] senayar: has joined #ruby
[12:12:54] senayar: has joined #ruby
[12:13:47] mrgrieves: has joined #ruby
[12:13:50] railsraider: has joined #ruby
[12:14:01] francoi__: has joined #ruby
[12:14:24] fantazo: has joined #ruby
[12:15:27] s2013: has joined #ruby
[12:16:42] shevy: anyone has a ruby script with ascii fun? like xmas ascii and such
[12:17:06] migbar: has joined #ruby
[12:17:22] mrgrieves: hi, I have an array as follows ["packageA-version_1.blah", "packageA-version_2.blah", "packageB-version_3-blah", "packageB-version_7.blah"] , what can I do to remove entries from the array and only leave the entries for the latest version of each package?
[12:18:46] ljarvis: mrgrieves: are the numbers only single digits?
[12:18:50] chussenot: has joined #ruby
[12:19:02] houhoulis: has joined #ruby
[12:19:39] flughafen: ACTION wonders how long I have to be in this chat before shevy acknowledges me
[12:19:45] havenwood: >> ["packageA-version_1.blah", "packageA-version_2.blah", "packageB-version_3-blah", "packageB-version_7.blah"].max
[12:19:46] mrgrieves: ljarvis: no it can be combinations of multiple digits and letters i.e. 1.8.0-1.el6.ngx.x86_64.rpm
[12:19:47] ruboto: havenwood # => "packageB-version_7.blah" (https://eval.in/384333)
[12:19:57] ljarvis: havenwood: grouped by package
[12:20:08] ljarvis: nice try though
[12:20:10] havenwood: oh, max for each pacakage?
[12:20:15] ljarvis: that's how I read it
[12:20:20] havenwood: mrgrieves: ^
[12:20:37] havenwood: ljarvis: I haven't had coffee. I'm lucky I'm even ballpark. ;)
[12:20:39] ljarvis: mrgrieves: that version is *very* different to your example
[12:20:57] havenwood: mrgrieves: Show some real examples of input and the desired output for each.
[12:21:45] ljarvis: I basically wreckon something like group by gsub(/\d+/, "") -> sort -> max would work. But who knows
[12:22:13] edwinvdg_: has joined #ruby
[12:22:33] ddv: how do you call all getter/accessor dynamically (via send(string)) of an instance?
[12:22:39] ddv: +methods
[12:23:02] ljarvis: ddv: call all methods?
[12:23:03] shevy: flughafen I didn't know you were there, aren't you idling all the time which is why you aren't finished!
[12:23:45] millerti: has joined #ruby
[12:23:47] flughafen: yes! very good
[12:23:53] ddv: ljarvis: for example some_instance.methods(false) {|method_name| r.send(method_name)} problem is I want to call only getters
[12:23:57] ton31337: has left #ruby: ()
[12:24:00] ddv: +.each etc
[12:24:02] ljarvis: ddv: just.. don't do that
[12:24:05] ljarvis: why would you do that?
[12:24:20] mrgrieves: ["nginx-1.7.4-1.el6.ngx.x86_64.rpm", "nginx-1.8.0-1.el6.ngx.x86_64.rpm", "nginx-debuginfo-1.7.4-1.el6.ngx.x86_64.rpm", "nginx-debuginfo-1.8.0-1.el6.ngx.x86_64.rpm", "hieradata_prod_6322.jax.rpm", "puppet_6322.jax.rpm"]
[12:24:42] ddv: ljarvis: because those methods return data I want to log and I don't want to write a lot of logger.info statements
[12:25:01] ljarvis: ddv: that's what a delegator is for
[12:25:20] ddv: ljarvis: cool do you have an example?
[12:25:20] mrgrieves: and I would like to get ["nginx-1.8.0-1.el6.ngx.x86_64.rpm", "nginx-debuginfo-1.8.0-1.el6.ngx.x86_64.rpm", "hieradata_prod_6322.jax.rpm", "puppet_6322.jax.rpm"]
[12:25:22] yorickpeterse: instance_variables.each { |ivar| send(ivar.to_s[1..-1]) if respond_to?(ivar.to_s[1..-1]) }
[12:25:38] ddv: yorickpeterse: thanks
[12:25:46] yorickpeterse: ddv: you really shouldn't use that though
[12:25:52] ddv: probably yeah
[12:26:05] ljarvis: mrgrieves: group_by { |i| i.gsub(/\d+/, "") }.map { |_, v| v.max }
[12:26:46] ljarvis: that assumes you can sort them
[12:26:52] ljarvis: but with the data you've given us, that's possible
[12:26:57] ljarvis: maybe you should be careful though
[12:27:11] mrgrieves: ljarvis: yes, we can sort them
[12:27:37] ljarvis: also you probably want [^a-z] rather than \d+
[12:27:38] mrgrieves: the order is not important at the end, I'm planning to iterate over the whole array
[12:28:52] Rubie: has joined #ruby
[12:28:54] ljarvis: >> ["nginx-1.7.4-1.el6.ngx.x86_64.rpm", "nginx-1.8.0-1.el6.ngx.x86_64.rpm", "nginx-debuginfo-1.7.4-1.el6.ngx.x86_64.rpm", "nginx-debuginfo-1.8.0-1.el6.ngx.x86_64.rpm", "hieradata_prod_6322.jax.rpm", "puppet_6322.jax.rpm"].group_by { |n| n.gsub(/[^a-z]/, "") }.map { |_, v| v.max }
[12:28:55] ruboto: ljarvis # => ["nginx-1.8.0-1.el6.ngx.x86_64.rpm", "nginx-debuginfo-1.8.0-1.el6.ngx.x86_64.rpm", "hieradata_prod_6 ...check link for more (https://eval.in/384335)
[12:29:18] chussenot: has joined #ruby
[12:29:26] havenwood: >> ["nginx-1.7.4-1.el6.ngx.x86_64.rpm", "nginx-1.8.0-1.el6.ngx.x86_64.rpm", "nginx-debuginfo-1.7.4-1.el6.ngx.x86_64.rpm", "nginx-debuginfo-1.8.0-1.el6.ngx.x86_64.rpm", "hieradata_prod_6322.jax.rpm", "puppet_6322.jax.rpm"].group_by { |package| package.partition(/\d/).first }.map(&:last).map &:max
[12:29:27] ruboto: havenwood # => ["nginx-1.8.0-1.el6.ngx.x86_64.rpm", "nginx-debuginfo-1.8.0-1.el6.ngx.x86_64.rpm", "hieradata_prod_6 ...check link for more (https://eval.in/384336)
[12:29:41] Igorshp: has joined #ruby
[12:29:59] havenwood: ljarvis: pre2, rc1
[12:30:10] ljarvis: why use partition if you're going to ignore the second result
[12:30:19] ljarvis: havenwood: im using the example im given :D
[12:31:22] havenwood: ljarvis: my defense remains lack of coffee
[12:31:34] apeiros: ACTION says: use a class for the packages
[12:31:34] havenwood: i'm invincible!
[12:31:38] mrgrieves: thanks you both !!!
[12:31:44] ljarvis: havenwood: I've had 3 cups and I've used the same execuse 4 times in the past hour :(
[12:31:45] mrgrieves: both invincible
[12:31:49] havenwood: ljarvis: hehe
[12:32:03] mrgrieves: gonna give this a try with a bigger sample
[12:32:09] ljarvis: apeiros: aye I'd probably do that too
[12:32:56] athos_diddy: has joined #ruby
[12:33:07] apeiros: packages.group_by(&:name).values.map { |pkgs| pkgs.max }
[12:33:10] yeticry: has joined #ruby
[12:33:26] ljarvis: psh, dont use to_proc once and then reject it
[12:33:32] apeiros: means Package needs #name and #<=>
[12:33:40] havenwood: apeiros: i can't count how many times i've done `map(&:last)` instead of `values`, i never learn
[12:34:25] apeiros: packages.group_by(&:name).values.map(&:max)
[12:34:47] apeiros: tiping with one arm still sucks
[12:35:06] sevenseacat: has joined #ruby
[12:35:07] apeiros: ACTION tips ljarvis
[12:35:07] fgo: has joined #ruby
[12:35:13] ljarvis: ACTION tips fedora
[12:35:13] havenwood: a vestige of a bygone era
[12:35:43] Rapier-: has joined #ruby
[12:35:49] shevy: oh! we are talking about windows again!
[12:35:49] ljarvis: going to the gym during lunch break is almost always an awful idea
[12:35:54] ljarvis: shevy: no we're not
[12:36:00] havenwood: vestige, bygone and era... which are gems?
[12:36:57] havenwood: aww, no fun - just era and it's my gem ;(
[12:37:03] wasamasa: I found the sources of matz' self-made mail client
[12:37:17] havenwood: wasamasa: ya?
[12:37:25] wasamasa: havenwood: yes, cmail
[12:37:39] shevy: cool where?
[12:37:46] wasamasa: sourceforge.jp :P
[12:37:51] ahmetkapikiran: has joined #ruby
[12:37:54] wasamasa: it hasn't been touched in over a decade
[12:37:59] ljarvis: that's the emacs one?
[12:38:03] shevy: http://cmail.osdn.jp/ 2003/01/27 00:08:05 $
[12:38:19] wasamasa: and I'm a fan of antique japanese elisp :P
[12:38:29] shevy: http://osdn.jp/projects/cmail/downloads/2191/cmail-2.62.tar.gz/
[12:39:07] shevy: (defvar *cmail-simap4-noremote-p nil)
[12:39:18] linduxed: pop quiz: what would you guys put after a percent literal like %w ?
[12:39:20] shevy: (setq res (cons (car dirlist) res))
[12:39:24] shevy: so beautiful
[12:39:34] shevy: linduxed ()
[12:39:46] havenwood: shevy: Matz mentioned merging Streem's concurrency into Ruby 3 as a possible third alternative to Actors or a more Rust-like transferring ownership.
[12:39:47] shevy: just like in lisp
[12:39:52] canton7: linduxed, {}, most of the time. maybe | if necessary
[12:39:58] wasamasa: gobble-crash-box, aha
[12:40:03] havenwood: shevy: https://github.com/matz/streem
[12:40:15] shevy: syntax of streem is weird, it's not ruby or?
[12:40:20] wasamasa: I wonder what he's using these days
[12:40:32] havenwood: shevy: It's not Ruby, Matz mentioned `|` is already taken in Ruby
[12:40:59] havenwood: shevy: Maybe something like Elixir's `|>` but he rejected that for Streem, so who knows?
[12:41:39] wasamasa: lol, the password scrambling
[12:41:52] wasamasa: almost as good as thunderbirds password "protection"
[12:41:54] sigurding: has joined #ruby
[12:42:29] MatthewsFace: has joined #ruby
[12:42:31] sgambino: has joined #ruby
[12:43:22] zudochkin: has joined #ruby
[12:43:48] stamina: has joined #ruby
[12:46:02] bollullera: has joined #ruby
[12:46:04] bollullera: has left #ruby: ()
[12:46:59] sgambino: has joined #ruby
[12:47:01] dg-ratiodata: has joined #ruby
[12:48:01] ljarvis: linduxed: I use ()
[12:48:13] ljarvis: linduxed: but the best part is that it doesn't matter
[12:48:30] linduxed: just curious what other people use
[12:48:35] bougyman: i use () because it's what rubocop wants.
[12:48:36] havenwood: linduxed: []
[12:48:45] bougyman: if you ever want to wonder which is 'standard', run rubocop on it.
[12:48:50] ljarvis: eff the po po
[12:48:53] ljarvis: but yeah I use () too
[12:48:57] ljarvis: it's much nicer
[12:48:59] havenwood: rubocop can go back to the 80s where he belongs!
[12:49:04] shevy: even lisp knew what to pick!
[12:49:07] Darkwater: I use () or sometimes {}
[12:49:09] Darkwater: if this is about literals
[12:49:10] BTRE: has joined #ruby
[12:49:15] bougyman: I used to use {}
[12:49:19] linduxed: hard time deciding [] or ()
[12:49:20] bougyman: til I started using rubocop
[12:49:22] havenwood: () but [] if it's an Array sometimes
[12:49:24] bougyman: then I moved to ()
[12:49:33] linduxed: i think i like [] more, but () is what most people use
[12:49:53] havenwood: linduxed: the sheeple fear cyborg police
[12:49:55] Darkwater: from now on I'll use space
[12:50:03] linduxed: ljarvis: we have a winner
[12:50:22] shevy: >> %w( abc def )
[12:50:23] ruboto: shevy # => ["abc", "def"] (https://eval.in/384354)
[12:50:26] shevy: >> %w@ abc def @
[12:50:26] livathinos: has joined #ruby
[12:50:27] ruboto: shevy # => ["abc", "def"] (https://eval.in/384355)
[12:50:35] ruboto: Darkwater # => /tmp/execpad-b1b2edbde08b/source-b1b2edbde08b:2: unterminated string meets end of file ...check link for more (https://eval.in/384356)
[12:50:49] Darkwater: >> %w abc ;
[12:50:49] havenwood: >> %w*splats splats!*
[12:50:50] ruboto: Darkwater # => /tmp/execpad-9666161b7fcd/source-9666161b7fcd:2: unterminated string meets end of file ...check link for more (https://eval.in/384358)
[12:50:50] ruboto: havenwood # => ["splats", "splats!"] (https://eval.in/384358)
[12:51:12] ljarvis: just use %
[12:51:19] Darkwater: I guess it doesn't work with w
[12:51:22] Darkwater: it works with x
[12:51:27] shevy: linduxed so what will you choose?
[12:51:42] dg-ratio1: has joined #ruby
[12:51:46] linduxed: i think i'll go with (), but with spaces after the ( and befor the )
[12:51:46] ruboto: ljarvis # => (https://eval.in/384359)
[12:51:48] s2013: has joined #ruby
[12:51:49] Darkwater: >> puts %x uname
[12:51:50] ruboto: Darkwater # => /tmp/execpad-b63382930e21/source-b63382930e21:3: syntax error, unexpected tCONSTANT, expecting keywo ...check link for more (https://eval.in/384360)
[12:51:53] Darkwater: >> puts %x uname ;
[12:51:54] ruboto: Darkwater # => (https://eval.in/384361)
[12:52:04] shevy: linduxed my brother! \o/
[12:52:06] havenwood: ruboto doesn't do trailing whitespace
[12:52:28] havenwood: every time you use an extra space a fairy dies
[12:52:35] havenwood: just saying, be humane
[12:52:51] droidburgundy: has joined #ruby
[12:52:53] ruboto: workmad3 # => nil (https://eval.in/384362)
[12:52:54] Darkwater: but what about whitespace (programming language)
[12:53:01] ldnunes: has joined #ruby
[12:53:04] ljarvis: BUT, you should *always* add a trailing comma to the last line of a multiple line hash literal
[12:53:08] ljarvis: unless you're a monster
[12:53:11] havenwood: Darkwater: not a fairy friendly lang
[12:53:31] havenwood: Darkwater: though those whitespaces are necessary
[12:53:40] Darkwater: yeah but they're trailing
[12:53:44] bougyman: lj: i hate the trailing comma
[12:53:48] shevy: "<ljarvis> unless you're a monster"
[12:53:52] Darkwater: the trailing whitespace in %x uname is also necessaryt
[12:53:57] bougyman: people get used to that and leave it all over their json, too.
[12:53:57] ljarvis: bougyman: y u say this :(
[12:54:02] casadei: has joined #ruby
[12:54:02] undeadaedra: >> % hello # why the ;
[12:54:03] ruboto: undeadaedra # => "hello" (https://eval.in/384363)
[12:54:05] bougyman: and other lingos don't like, either.
[12:54:13] ljarvis: bougyman: think of the git log
[12:54:13] bougyman: we use more than just ruby at the office.
[12:54:17] bougyman: it's just a bad habit.
[12:54:31] bougyman: lisp doesn't need commas, heh
[12:54:33] Darkwater: it's too bad you can't use alphanumerics or unicode characters as delimiters
[12:54:59] Darkwater: %xaunamea or %x???uname???
[12:55:13] workmad3: >> puts %x|uname|
[12:55:14] ruboto: workmad3 # => (https://eval.in/384364)
[12:55:15] Darkwater: s/aunamea/xunamex/
[12:56:38] bmalum: has joined #ruby
[12:59:27] chussenot: has joined #ruby
[12:59:30] dblessing: has joined #ruby
[12:59:45] edwinvdgraaf: has joined #ruby
[13:00:33] symm-: has joined #ruby
[13:00:47] langlands: has joined #ruby
[13:02:16] jlast: has joined #ruby
[13:02:29] chinmay_dd: has joined #ruby
[13:03:21] InternetFriend: has joined #ruby
[13:03:27] dstarh: has joined #ruby
[13:03:50] serivich: has joined #ruby
[13:04:24] uptownhr: has joined #ruby
[13:05:06] rbennacer: has joined #ruby
[13:05:46] shevy: I'd love to have a powerful pipe in ruby
[13:06:02] JakFrist: has joined #ruby
[13:06:09] acsigusz: shevy: a powerful pipe?
[13:06:17] rippa: has joined #ruby
[13:06:19] shevy: yeah! one where you can pipe objects
[13:06:52] griffindy: has joined #ruby
[13:07:00] jhass: Pipe = Queue
[13:07:32] endash: has joined #ruby
[13:08:02] rbennacer: has joined #ruby
[13:08:27] bmalum: has joined #ruby
[13:08:41] mister_solo: has joined #ruby
[13:08:49] chinmay_dd: has joined #ruby
[13:09:22] User458764: has joined #ruby
[13:09:54] CloCkWeRX: has joined #ruby
[13:14:34] lee-jon: has joined #ruby
[13:14:40] lee-jon: has left #ruby: ()
[13:15:19] shevy: I see that jhass has never tried to pipe a cat
[13:15:21] Xeago: has joined #ruby
[13:15:46] chinmay_dd: has joined #ruby
[13:17:11] fmcgeough: has joined #ruby
[13:18:45] bmalum: has joined #ruby
[13:18:50] jphenow: has joined #ruby
[13:20:36] zudochkin: has joined #ruby
[13:21:02] undeadaedra: cat /dev/cat | pet
[13:22:24] shevy: I have no /dev/cat here
[13:22:51] mary5030: has joined #ruby
[13:23:46] mary5030: has joined #ruby
[13:24:11] sonOfRa: has joined #ruby
[13:24:37] JoshL: has joined #ruby
[13:24:46] zudochkin: has joined #ruby
[13:25:27] coderhs: has joined #ruby
[13:25:38] patteh: has joined #ruby
[13:26:21] zudochkin: has joined #ruby
[13:26:34] tkuchiki: has joined #ruby
[13:27:22] senayar: has joined #ruby
[13:27:22] senayar: has joined #ruby
[13:28:21] zipace: has joined #ruby
[13:32:21] x44x45x41x4E_: has joined #ruby
[13:32:21] nateberkopec: has joined #ruby
[13:32:39] edwinvdg_: has joined #ruby
[13:32:45] ziprar: has joined #ruby
[13:33:18] x44x45x41x4E_: has joined #ruby
[13:33:36] krisquigley: has joined #ruby
[13:34:18] RegulationD: has joined #ruby
[13:35:12] psye: has joined #ruby
[13:36:12] whippythellama: has joined #ruby
[13:36:17] psye: has joined #ruby
[13:37:18] jordanm: has joined #ruby
[13:37:48] techsethi: has joined #ruby
[13:38:19] blue_deref: has joined #ruby
[13:38:50] devdazed: has joined #ruby
[13:39:21] chussenot: has joined #ruby
[13:39:34] quimrstorres: has joined #ruby
[13:39:56] skade: has joined #ruby
[13:41:11] malconis: has joined #ruby
[13:42:06] chinmay_dd: has joined #ruby
[13:42:14] doerteDev: has joined #ruby
[13:42:34] qwertme: has joined #ruby
[13:43:16] GitGud: has joined #ruby
[13:43:48] ghostpl: has joined #ruby
[13:44:03] nateberkopec: has joined #ruby
[13:44:19] serivich: has joined #ruby
[13:44:45] segfalt: has joined #ruby
[13:45:27] ndrei: has joined #ruby
[13:46:09] enebo: has joined #ruby
[13:46:26] alex88: has joined #ruby
[13:50:29] revath: has joined #ruby
[13:50:34] arturhoo: has joined #ruby
[13:50:55] krisquigley: has joined #ruby
[13:51:45] hinbody: has joined #ruby
[13:52:19] quazimodo: has joined #ruby
[13:52:33] fabrice31: has joined #ruby
[13:54:46] rafaelsales: has joined #ruby
[13:56:16] msnyon: has joined #ruby
[13:56:34] NeverDie: has joined #ruby
[13:57:20] JoshL: has joined #ruby
[13:59:20] haxrbyte: has joined #ruby
[14:00:12] chussenot: has joined #ruby
[14:00:50] et09: has joined #ruby
[14:01:15] white_bear: has joined #ruby
[14:02:08] unshadow: has joined #ruby
[14:02:30] white_bear: hi. is there a way to use string concatenation's alias using the ternary operator only? i.e., 'foo' (<< 'bar' if <cond>)
[14:03:37] undeadaedra: >> 'foo'.tap do |s| s << bar if true end
[14:03:38] ruboto: undeadaedra # => undefined local variable or method `bar' for main:Object (NameError) ...check link for more (https://eval.in/384384)
[14:03:45] undeadaedra: >> 'foo'.tap do |s| s << 'bar' if true end
[14:03:46] ruboto: undeadaedra # => "foobar" (https://eval.in/384385)
[14:03:49] undeadaedra: >> 'foo'.tap do |s| s << 'bar' if false end
[14:03:50] ruboto: undeadaedra # => "foo" (https://eval.in/384386)
[14:04:18] undeadaedra: white_bear: there's this way ^
[14:04:21] mahtennek: has joined #ruby
[14:04:39] tkuchiki: has joined #ruby
[14:05:01] zudochkin: has joined #ruby
[14:05:14] k3asd`: has joined #ruby
[14:05:27] rafaelsales: has joined #ruby
[14:06:06] rafaelsales: has joined #ruby
[14:06:29] haxrbyte_: has joined #ruby
[14:06:40] white_bear: undeadaedra: cool, thanks!
[14:06:45] peter_paule: has joined #ruby
[14:06:53] newnews: has joined #ruby
[14:06:54] newnews: www.VALBOT.com provides domain valuations. Reporting globally on Site Traffic, Pagerank, Malware, WHOIS data, SEO & even Social Media presence.
[14:07:01] ruboto: fflush, apeiros, zzak, Mon_Ouie, seanstickle, banisterfiend, jhass, Havenn, Radar, sevenseacat, miah, Coraline, workmad3, drbrain, zenspider, slyphon, rubyhacker1, Aria, ljarvis
[14:07:10] wookiehangover: has joined #ruby
[14:07:11] havenwood: !mute newnews
[14:07:12] ruboto: +q newnews!*@*
[14:07:12] ruboto: -o ruboto
[14:07:23] apeiros: ACTION too slow with only one arm :<
[14:07:30] momomomomo: has joined #ruby
[14:07:31] sevenseacat: apeiros: what happened to the other one?
[14:07:37] undeadaedra: It's not a race, apeiros, it's all good
[14:07:46] apeiros: eaten by a grue :-o
[14:07:54] sevenseacat: I hate when that happens.
[14:07:56] apeiros: shouldn't have forgotten to bring a candle
[14:07:57] newnews: has left #ruby: ()
[14:08:33] blackmesa: has joined #ruby
[14:09:18] apeiros: sevenseacat: bursa inflammation
[14:09:50] ferr: has joined #ruby
[14:11:23] ponga: has joined #ruby
[14:11:50] yorickpeterse: clearly we need a machine learning approach to have the bot auto ban people
[14:11:58] yorickpeterse: or just hook it up to spamassassin
[14:12:16] Soda: has joined #ruby
[14:12:28] apeiros: contributions welcome :)
[14:12:39] InternetFriend: has joined #ruby
[14:12:40] ljarvis: did you release the source?
[14:12:45] mallu: has joined #ruby
[14:12:48] RegulationD: has joined #ruby
[14:12:52] ahmetkapikiran: has joined #ruby
[14:13:05] apeiros: no. you can contribute by writing a cinch plugin
[14:13:07] aryaching: has joined #ruby
[14:13:18] slash_nick: has joined #ruby
[14:13:48] yorickpeterse: apeiros: source or gtfo
[14:14:15] yorickpeterse: also meh I cbf anyway, too much effort to train it
[14:14:16] ponga: i guess that would require some nlp
[14:14:22] yorickpeterse: spam doesn't appear very often in here either
[14:15:05] granthatcher: has joined #ruby
[14:15:21] casadei: has joined #ruby
[14:15:52] quazimodo: do we have any refactoring tools like the auto refactoring tools in java?
[14:16:51] umgrosscol: has joined #ruby
[14:16:53] penzur: has joined #ruby
[14:18:33] dopie: has joined #ruby
[14:18:42] yorickpeterse: I think RubyMine has some
[14:18:46] Sirrr: has joined #ruby
[14:18:49] yorickpeterse: But there are no real standalone tools IIRC
[14:24:32] dfockler: has joined #ruby
[14:24:36] white_bear: undeadaedra: how would you do the same with a frozen string?
[14:24:58] banister: has joined #ruby
[14:25:03] undeadaedra: a frozen string can't be modified, you'll have to use +
[14:25:10] white_bear: undeadaedra: that's what i thought :p
[14:25:11] undeadaedra: and so, tap is not suitable
[14:25:18] white_bear: undeadaedra: alright
[14:26:15] Igorshp: has joined #ruby
[14:26:40] serivich: has joined #ruby
[14:28:16] Igorshp: has joined #ruby
[14:28:26] sarkyniin: has joined #ruby
[14:28:30] dgutierrez1287: has joined #ruby
[14:28:41] gambl0re: has joined #ruby
[14:30:43] krz: has joined #ruby
[14:30:54] yqt: has joined #ruby
[14:30:56] juanpaucar: has joined #ruby
[14:31:08] hahuang65: has joined #ruby
[14:31:26] peter_paule: has joined #ruby
[14:32:07] white_bear: is it better to do x: "#{y}.#{z}" or x: y << z or x: y + z # ? i guess it's the right order, the former being the fastest
[14:32:31] Ox0dea: >> require 'fiddle'; s = 'foo'.freeze; Fiddle::Pointer.new(s.object_id << 1)[1] ^= 8; s << 'bar'
[14:32:32] ruboto: Ox0dea # => "foobar" (https://eval.in/384419)
[14:32:36] apeiros: they are not doing the same
[14:33:27] undeadaedra: y << z will modify the y variable, not y + z
[14:33:41] apeiros: also the first adds a dot
[14:33:53] white_bear: oh sorry i forgot the dot
[14:34:42] EagleDelta: has joined #ruby
[14:34:51] white_bear: the + operator makes a copy
[14:35:00] guillaume-rb: has joined #ruby
[14:35:05] blackmesa: has joined #ruby
[14:35:05] Ox0dea: It creates a new string from its operands.
[14:35:45] chinmay_dd: has joined #ruby
[14:36:23] undeadaedra: "#{y}.#{z}" is better than y + "." + z, as the latter will create an intermediate string (y + ".")
[14:36:25] white_bear: right, so "#{x}.#{y}" is faster than x << '.' << y since there's no call to concat, right?
[14:36:35] undeadaedra: they're not the same
[14:36:38] revath: has joined #ruby
[14:36:41] undeadaedra: << modifies left operand
[14:36:42] Ox0dea: Those are the same.
[14:36:52] Ox0dea: Ah, sorry, I meant that the result is the same.
[14:36:56] arooni-mobile: has joined #ruby
[14:36:56] fgo: has joined #ruby
[14:37:01] shevy: << won't create a new object
[14:37:09] haxrbyte: has joined #ruby
[14:37:10] ljarvis: also, this shouldn't really be about speed
[14:37:14] aryaching_: has joined #ruby
[14:37:16] undeadaedra: well, not exactly, if you use y afterwards, Ox0dea
[14:37:23] ljarvis: if you're concerned about << vs creating a new string Object wrt speed, you're doing it wrong
[14:37:27] white_bear: yes the result is the same, but << modifies x, alright
[14:37:39] shevy: it is perfectly fine to care about the difference in speed between << and +
[14:37:45] yorickpeterse: ljarvis: actually there are cases where that makes sense
[14:37:52] yorickpeterse: I've dealt with them, they're annoying
[14:38:16] ljarvis: I respectfully disagree in the real world, there are things I would care more about than speed in this situation
[14:38:16] undeadaedra: white_bear: don't use << just becuase it looks cooler than +, do it if you want to modify an existing string.
[14:38:31] langlands: has joined #ruby
[14:38:42] shevy: you can also use << for Arrays :)
[14:38:52] linduxed: can someone elaborate on this style guide rule? https://github.com/bbatsov/ruby-style-guide#no-extend-struct-new
[14:39:19] JoshL: has joined #ruby
[14:39:21] shevy: linduxed hmm jhass wrote about this yesterday I think
[14:39:29] micmus: has joined #ruby
[14:39:33] bronson: has joined #ruby
[14:39:55] ljarvis: linduxed: it's because Struct.new is special, so instead of creating 1 class and assigning it to Person it creates some superfluous class and inherits from it instead
[14:39:56] linduxed: i don't have a log that goes that far back
[14:40:23] senayar: has joined #ruby
[14:40:24] senayar: has joined #ruby
[14:40:25] havenwood: linduxed: Look at `Person.ancestors` for both cases.
[14:40:48] shevy: that styleguide is weird
[14:40:49] shevy: https://github.com/bbatsov/ruby-style-guide#duck-typing
[14:40:50] undeadaedra: linduxed: see the channel topic
[14:41:09] shredding: has joined #ruby
[14:41:18] yorickpeterse: https://github.com/YorickPeterse/oga/commit/a5cd75cb7e31e7c3bdbd9f417cd590e29855a629 <- e.g. stuff like this can make difference
[14:41:45] white_bear: undeadaedra: got it
[14:41:46] tfitts: has joined #ruby
[14:41:52] ljarvis: yorickpeterse: really? you're comparing general to writing a damned xml parser? :D
[14:42:02] linduxed: havenwood: oooh, that makes sense
[14:42:10] mrgrieves: how can I make this better? http://pastebin.com/VnU33GLZ the idea is that I have many packages with names that start with "hieradata_" i.e. "hieradata_integration_12.rpm", "hieradata_uat_15.rpm" & "hieradata_prod_15.rpm"
[14:42:11] ruboto: mrgrieves, we in #ruby do not like pastebin.com, I reposted your paste to gist for you: https://gist.github.com/21c3ff8507fcbcd1b933
[14:42:11] ruboto: pastebin.com loads slowly for most, has ads which are distracting and has terrible formatting.
[14:42:11] linduxed: undeadaedra: thx
[14:42:50] mrgrieves: I'm only interested in hieradata_prod_xxx packages
[14:42:51] shevy: mrgrieves what is the intent
[14:42:55] shevy: you seem to only output stuff
[14:43:03] shevy: you could apply a .select, then output based on that result
[14:43:07] mrgrieves: just output
[14:43:16] Rubie: has joined #ruby
[14:43:18] shevy: and unify both conditions
[14:43:22] shevy: if name.start_with?("hieradata_") if name.include? "prod_"
[14:43:45] shevy: dataset.select {|entry| entry.start_with?('hieradata_') && entry.include?('prod_') }
[14:43:46] shevy: should work
[14:43:49] j_mcnally: has joined #ruby
[14:43:58] allomov: has joined #ruby
[14:44:00] ljarvis: yorickpeterse: I would concede that in the case of doing insane things, it is ok to be insane
[14:44:19] bahar: has joined #ruby
[14:44:26] white_bear: also, still about concatenation, is there a way to make something like: "#{x}.#{y}" with .#{y} appended on condition? e.g., "#{x}#{.#{y} if <cond>}"
[14:44:35] mrgrieves: shevy: cheers
[14:44:46] Ox0dea: white_bear: "#{x}.#{y if cond}"
[14:44:56] Ox0dea: You can interpolate any valid Ruby expression.
[14:45:03] undeadaedra: Ox0dea: you have the point at any case here
[14:45:05] ljarvis: ACTION passes Ox0dea the period
[14:45:05] durham: has joined #ruby
[14:45:24] shevy: it is beginning to look really ugly
[14:45:25] undeadaedra: white_bear: cond ? "#{x}.#{y}" : x
[14:45:39] yorickpeterse: You need a StringBuilder for this
[14:45:51] undeadaedra: StringFactory
[14:45:55] ljarvis: it's Ruby, every string is a stringbuilder
[14:46:05] ljarvis: herp derp mutable state
[14:46:18] tkuchiki: has joined #ruby
[14:46:21] undeadaedra: ljarvis: apparently white_bear has frozen strings
[14:46:34] yorickpeterse: they must be cold
[14:46:38] shevy: well, where do white bears live?
[14:46:41] Ox0dea: Frozen strings can be thawed. :)
[14:46:41] yorickpeterse: (get it, white bear?)
[14:46:44] shevy: surely not in McDonalds
[14:46:49] yorickpeterse: I'll see myself out
[14:46:53] undeadaedra: yorickpeterse: HOHOHOHO
[14:46:55] piet_: has joined #ruby
[14:47:03] shevy: explaining a joke is a risky thing to do yorickpeterse!
[14:47:04] davedev24_: has joined #ruby
[14:47:15] shevy: they may end up laughing more about you rather than the joke
[14:47:19] yorickpeterse: They do anyway
[14:47:20] shevy: but you still get a laugh :P
[14:47:27] ljarvis: he's right
[14:47:29] diegoviola: how do I stay sane when I have to write php code? laravel?
[14:47:41] havenwood: hmm, we should be able to #steam a String and have it become *really* mutable
[14:47:45] havenwood: maybe mutate randomly
[14:47:46] RandyT: has joined #ruby
[14:47:49] undeadaedra: diegoviola: you don't.
[14:47:51] ljarvis: diegoviola: you stop writing php code
[14:47:56] white_bear: yorickpeterse: nice one :D
[14:48:00] aryaching: has joined #ruby
[14:48:05] yorickpeterse: oh shit, there's actually somebody called white_bear here?
[14:48:09] yorickpeterse: haha, I didn't even see that
[14:48:10] havenwood: yorickpeterse: when you heat water instead of cool it
[14:48:20] shevy: diegoviola does the php syntax make you happy?
[14:48:20] undeadaedra: ACTION gives yorickpeterse glasses
[14:48:20] ljarvis: lol havenwood
[14:48:21] diegoviola: ljarvis: I'm not sure how I would do that, provided they only write php and JS code at this company
[14:48:27] ljarvis: it's a bit hilarious that you explained that
[14:48:37] ljarvis: diegoviola: seems like that's easily solved
[14:48:38] yorickpeterse: diegoviola: write a Ruby-to-PHP compiler
[14:48:39] diegoviola: undeadaedra: good luck with that, everyone is doing PHP and JS here
[14:48:42] diegoviola: ljarvis: how?
[14:48:48] shevy: yorickpeterse you really did not see the white bear?
[14:48:48] ljarvis: diegoviola: by... leaving?
[14:48:54] yorickpeterse: http://php.rubyforge.org/ lel
[14:48:58] diegoviola: ljarvis: they have a server here where they push code with SFTP, and their server only serves php and js
[14:49:01] diegoviola: ljarvis: no ruby
[14:49:07] undeadaedra: diegoviola: I succeeded at doing ruby in a company that does only PHP \o/
[14:49:09] diegoviola: ljarvis: I need the job
[14:49:10] fabrice31_: has joined #ruby
[14:49:10] ljarvis: diegoviola: my answer is still valid
[14:49:13] shevy: that goes to show that a white bear can hide in ice areas
[14:49:14] ljarvis: get a different job
[14:49:21] diegoviola: undeadaedra: how?
[14:49:24] ljarvis: or, embrace php
[14:49:32] shevy: this is even better:
[14:49:33] shevy: https://github.com/tenderlove/phuby
[14:49:40] durham: Hi all is there a way to force clear all instances of an object? I have this: https://gist.github.com/anonymous/e544abbc34c6a57aaa72 which shows how i have it working using a class variable to store the objects but using ObjectSpace seems like a better alternative but im not sure how to clear these as they are getting built multiple times so my tests are failing
[14:49:43] datanoise: has joined #ruby
[14:49:44] shevy: "INSTALL:"
[14:49:59] diegoviola: guys help... I don't want to go back to PHP
[14:50:05] undeadaedra: diegoviola: making a 3rd party tool that they now use and that I continue to develop.
[14:50:16] shevy: diegoviola convince the company that ruby is better
[14:50:19] uptownhr: has joined #ruby
[14:50:19] zach_: has joined #ruby
[14:50:21] yorickpeterse: shevy: worse: tenderlove is actually submitting commits
[14:50:24] ljarvis: durham: use your first example
[14:50:24] undeadaedra: It doesn't mean I don't do PHP, but it is a nice escape
[14:50:26] shevy: yorickpeterse lol
[14:50:42] shevy: undeadaedra as long as php pays for the daily baguettes!
[14:50:55] undeadaedra: shevy: fun fact: I rarely eat bread.
[14:51:01] diegoviola: shevy: I don't think I will succeed, they like their own PHP ways
[14:51:04] ljarvis: durham: why does using ObjectSpace seem better? because it's not
[14:51:08] yorickpeterse: apparently it doesn't pay for enough baguettes then
[14:51:19] ljarvis: durham: you want to mutate the list, you can't do that, so you need a mutable object
[14:51:20] shevy: diegoviola well, that's the nature of evolution there - you need to outperform them with ruby so clearly that ruby wins
[14:51:27] shevy: and if you fail
[14:51:30] shevy: then ruby obviously sucks
[14:51:30] diegoviola: shevy: they like using composer, but I don't think their code is very nice as my Ruby code
[14:51:43] yorickpeterse: oh, that reminds me of something
[14:51:45] zach_: I'm about to launch a gem that depends on a debian package. The default error when attempting to install the gem will lead 99% of ubuntu users to waste time figuring out which package to install. I know which package to install, but I do not know the idiomatic way of either A. doing this for the user. or B. telling the user which package to install.
[14:51:48] diegoviola: shevy: they don't use any frameworks, etc
[14:51:51] durham: ljarvis: ah okay, problem solved!
[14:52:04] durham: ljarvis: thanks
[14:52:07] ljarvis: durham: I would use a class instance variable instead of a class variable though :P
[14:52:08] diegoviola: shevy: I've look at some of their code and it doesn't have any structure like most rails projects
[14:52:09] yorickpeterse: https://github.com/composer/composer/commit/ac676f47f7bbc619678a29deae097b6b0710b799
[14:52:14] diegoviola: their PHP is glued up with HTML
[14:52:18] axl_: has joined #ruby
[14:52:21] diegoviola: it makes my eyes bleed
[14:52:26] yorickpeterse: ignore all the trolls though
[14:52:27] shevy: zach_ you could display a message when someone tries to install the gem
[14:52:52] shevy: zack s.post_install_message = <<-EOF; Please keep in mind that bla bla bla; EOF
[14:52:54] diegoviola: so how do I stay sane with this PHP crap?
[14:53:15] ljarvis: diegoviola: please stop
[14:53:18] jbisnett: has joined #ruby
[14:53:19] hal_9000: ???How do I stay clean working in this stable????
[14:53:23] ljarvis: you've said it 100 times
[14:53:33] ljarvis: it's now boring and other people are trying to ask Ruby questions
[14:53:54] Ox0dea: You've been fed fit to bursting, troll, now back whence you come!
[14:53:58] white_bear: undeadaedra: foo.include? ... ? ... : ... # the two "?" looks redundant, don't they?
[14:54:06] diegoviola: ljarvis: why?
[14:54:09] zach_: thanks shevy
[14:54:13] ljarvis: diegoviola: because I asked you nicely?
[14:54:14] undeadaedra: white_bear: they're not.
[14:54:22] diegoviola: ljarvis: how about no?
[14:54:24] hal_9000: white_bear: i see your point, but it???s unavoidable
[14:54:32] zach_: has left #ruby: ()
[14:54:33] ljarvis: !kick diegoviola then please come back later
[14:54:36] ruboto: ruboto kicked diegoviola: please come back later
[14:54:36] ruboto: -o ruboto
[14:54:41] diegoviola: has joined #ruby
[14:54:48] diegoviola: ljarvis: that wasn't very nice of you
[14:54:54] ljarvis: I asked you nicely
[14:55:05] ljarvis: so, it's your choice
[14:55:08] diegoviola: ljarvis: I'm not trolling or anything
[14:55:14] havenwood: diegoviola: PHP is off-topic, but there's #ruby-offtopic so head that way and lets talk us some PHP!
[14:55:17] ljarvis: I asked you to stop. Stop, or leave
[14:55:32] diegoviola: I've started writing a rails project at this company that only uses PHP but then we have the problem of deploying my app, they only have a server that handles PHP
[14:55:49] undeadaedra: yeah, go put some activity in the ot channel
[14:55:52] Ox0dea: >> ['foo'.empty?? 0:1, ??]
[14:55:53] ruboto: Ox0dea # => [1, "?"] (https://eval.in/384446)
[14:56:01] diegoviola: havenwood: ok, he could have explained this but then he just tells me to stop
[14:56:02] Ox0dea: Ruby has not one but *two* meanings for double question marks.
[14:56:13] diegoviola: havenwood: I understand, I'll stop then
[14:56:19] Spami: has joined #ruby
[14:56:31] hal_9000: Ox0dea: it???s better to space reasonably
[14:56:42] undeadaedra: Ox0dea: wow, it took me some time to get this
[14:56:46] diegoviola: ljarvis: sorry about that
[14:56:55] [k-: It took me some time too
[14:57:09] ljarvis: diegoviola: no problem, thank you
[14:57:14] [k-: If you would add a bit more spaces
[14:57:17] diegoviola: I'll ask the company if I can write the project with Rails
[14:57:28] spyderman4g63: has joined #ruby
[14:57:38] diegoviola: because I honestly don't feel like I will be ok writing PHP code, I can't, I haven't wrote a single line of PHP code in 8 years
[14:57:40] hal_9000: [???foo???.empty? ? 0 : 1, ??]
[14:57:56] nobitanobi: has joined #ruby
[14:58:18] Ox0dea: Get out of here with your syntactically invalid fancy quotes.
[14:58:23] [k-: [(???foo???.empty? ? 0 : 1), ??]
[14:58:34] njs126: has joined #ruby
[14:58:47] [k-: I just... noticed that
[14:58:56] white_bear: i've got a warning about string literal in condition (used ternary operator), why that? i.e., foo = x.include? '.' ? x : "#{x}.#{y}"
[14:59:05] havenwood: diegoviola: There really is a #ruby-offtopic and PHP really is on-topic there: /join #ruby-offtopic
[14:59:12] hal_9000: ha, i did not intentionally use those ??? must be an annoying feature of Colloquy
[15:00:20] hal_9000: white_bear: precedence issue?
[15:00:33] [k-: It seems so
[15:00:49] j_mcnally: has joined #ruby
[15:01:05] [k-: This is one case where Ruby does what you might not expect
[15:01:16] Ox0dea: Parentheses are optional until they're not.
[15:01:24] fabrice31: has joined #ruby
[15:01:29] momomomomo: has joined #ruby
[15:01:35] hal_9000: no, they???re optional ;) you???re still required to say what you mean
[15:01:37] [k-: It probably evaluated '.' ? ... first
[15:02:19] Obfuscate: That isn't a very intuitive binding order.
[15:02:33] ogpastaling: has joined #ruby
[15:02:35] hal_9000: this always bothered me a little: puts var unless (var = my_func()).nil?
[15:02:57] [k-: Nim may solve this issue
[15:03:09] hal_9000: Obfuscate: agreed, but precedence is always a tradeff, and i think ruby does better than most languages
[15:03:09] [k-: With space sensitive binding
[15:03:41] [k-: Haskell does better in this respect imo
[15:04:14] white_bear: fixed: foo = x.include?('.') ? x : "#{x}.#{y}"
[15:04:24] aryaching: has joined #ruby
[15:04:40] Obfuscate: hal_9000: Well, it might be hard to change now. I can't think of many situations in which I'd prefer that particular behavior though.
[15:04:50] Obfuscate: hal_9000: What happens with 'unless' there?
[15:05:05] hal_9000: Obfuscate: true, i???m ust saying if you fix that, you will probably break something else
[15:05:45] hal_9000: even though the Boolean is (would be) evaluated first, you get an error because var is undefined
[15:06:00] tkuchiki: has joined #ruby
[15:06:09] rafaelsales: has joined #ruby
[15:06:34] hal_9000: the nil? is not really relvant there, it could be any expr
[15:06:47] AvidChronos: has joined #ruby
[15:07:43] AlexRussia: has joined #ruby
[15:07:46] yaw: has joined #ruby
[15:08:21] [k-: I prefer if ! to unless
[15:08:27] tkuchiki: has joined #ruby
[15:08:28] Obfuscate: hal_9000: Ah, okay. I've become rather used to the requirement to forward declare. That's rather common across languages.
[15:08:28] shinnya: has joined #ruby
[15:08:33] Ox0dea: [k-: Vile heathen.
[15:08:36] [k-: unless always screws me up
[15:08:59] eedham: has joined #ruby
[15:09:05] ongolk: has joined #ruby
[15:09:07] [k-: if not nil reads better than unless nil
[15:09:38] Ox0dea: Try again with a real example.
[15:10:00] tkuchiki: has joined #ruby
[15:10:12] phat4life: rubocop tells me to use unless sometimes, i musst obey
[15:10:17] hal_9000: well, if/unles is not relevant to the example ??? change it to if ! and it???s the same issue
[15:10:21] nobitano_: has joined #ruby
[15:10:40] phat4life: i don't like using unless
[15:10:52] [k-: (New issue) I feel that if ! is clearer tho
[15:10:59] eedham: what would be a good way to hack into a linux game server
[15:11:00] hal_9000: unless is confusing, true, esp. with an else
[15:11:11] bougyman: i use unless only in suffix mode.
[15:11:25] hal_9000: bougyman: i tend to do taht as well
[15:11:30] bougyman: return :boo unless something
[15:11:42] bougyman: that's my usual usage of it.
[15:11:49] eedham: Is there any way to use the ruby scripting language to hack into routers and packet capture
[15:12:05] [k-: I think I'll avoid unless totally
[15:12:08] bougyman: eedham: yes.
[15:12:15] hal_9000: the point i was making is that a variable appearing first in a suffixed clause is not valid
[15:12:27] phat4life: [k- do you use rubocop
[15:12:31] bougyman: i'd recommend leveraging metasploit rather than writing it all yourself, though.
[15:12:40] eedham: like if I have the username and password to say a Cisco gateway, Ubiquoss, Huawei, or other router, can you use ruby to be lik ethe ruby katana and view traffic there
[15:13:00] [k-: That thing impedes my work!
[15:13:12] bougyman: it shouldn't
[15:13:16] eedham: Runna ma nae, I'm GAY!
[15:13:18] bougyman: you can tune it to your style.
[15:13:26] bougyman: then it just enforces your own style on you.
[15:13:28] snockerton: has joined #ruby
[15:13:33] bougyman: if that slows you down ....
[15:13:44] hal_9000: i like to rebel against myself
[15:14:23] [k-: I declare that I have read the style guide as of 2013 and have followed convention for the most part
[15:14:34] phat4life: i can't see whitespace
[15:14:50] Ox0dea: phat4life: Get a better editor.
[15:15:10] phat4life: i mean from a philisophical standpoint
[15:15:18] mister_solo: has joined #ruby
[15:15:25] eedham: i've noticed some japanese people coming here
[15:15:27] phat4life: if i need like 10 extra spaces or returns imma use them
[15:15:47] AndroidLoverInSF: has joined #ruby
[15:15:47] bougyman: trailing whitespace is asstastic
[15:15:54] eedham: what's a good way to break into japanese servers
[15:15:54] bougyman: might as well use tabs, too.
[15:15:57] havenwood: !mute eedham
[15:15:57] ruboto: +q eedham!*@*
[15:15:57] ruboto: -o ruboto
[15:16:02] eedham: has left #ruby: ()
[15:16:07] eedhem: has joined #ruby
[15:16:40] phat4life: i just let rubocop yell at me
[15:16:50] _blizzy_: has joined #ruby
[15:16:57] phat4life: what i really need is one of those pavlok shock bracelets
[15:16:59] undeadaedra: you can tweak it, you know
[15:17:06] eedhem: could someone help me out with css and making a ruby script to format pages to provide optimal room
[15:17:08] bougyman: it will learn from any current codebase.
[15:17:11] eedhem: I'm making a ruby HTML generator
[15:17:14] bougyman: and make a ruleset based on it.
[15:17:23] eedhem: We I'm lest come.
[15:17:24] eedhem: We chisisis of ling. Incream. Wit down execs. Vands fres. Squad. Withe chin' th Kortin't dream. Frease dos tos of Diviny! I'm liver. It's Fream, viol. Wit Korth goes. Destin life! Dee the of Son affly execs. Squad Sonic execs. I'm lis industriesting. Wortionic execs. Divater. Vandelayin' th gets frea! Man. It's Fresh, Playin th andelay, Mening getwork! Vandelay egs, Call over! Incream. It's of
[15:17:26] eedhem: Neshnesh goes. We'reaver! Mentos over! Nord!
[15:17:27] eedhem: MandelayState drease doo dow we'll over, Call of Dee cook dreshneshmandelay. Vand Stayindelay bets fork! Mentos of living fre jets the jets oning jetterthis ony ing th Mentos baby, Mandelay. Vandelay bably me.
[15:17:28] eedhem: Thild full overting ching ter withim affliving probay it dow we'rease better! Wortin lindelaying the bette Lizard of Stay bets th goesh Meniesh goesh Mand of livatioling coo dow we'll over. Vand wit's oniesh Koread Stat moliat dos Fre andelay, bayStatiolisis. Sonie Lizard Squad withe doo doo! Increstries. Menie execs. It's th goesh goesh andelay eggs, ing jets of Diver ing. Freasy hackindelay
[15:17:31] jhass: !mute eedhem
[15:17:32] ruboto: -o ruboto
[15:17:34] eedhem: RIUNNA MA NAE
[15:17:34] eedhem: Nothe Lizard!
[15:17:34] eedhem: ing jetworehe the It cre bayStaying. We cooleggs. It's fres.
[15:17:35] eedhem: Nesh goes th goes. With goess.
[15:17:35] eedhem: Thisies th a nown life! Mand Stay execs. Stay bets bably baby, is the a mestationy! As in't dress. WortindelayStay, Lizard we'reheas ing th goes th air, ving fres, bette on air, in life! Divertin't doo dithe him andelay hacking tentos of Des. Sony bably hattentos Fream, ing priestriesn't doo Nothe doest doo frehe egs, asy moleam. VandelayStento dithe dresh Mento your ind fream, Vionic lin andelay
[15:17:36] ljarvis: ljarvis kicked eedhem:
[15:17:47] eedhem: has joined #ruby
[15:17:48] eedhem: We bion air, andustin andelay bette hacking. Yo-ho-ho-ho-ho-hoh-ho-hoh-hoh! Diving fly baby, Call of liny ing. I'm affly industea's fres in the a molife! Squad Squad molesh as thild baby, thisis fres, Play mol. Wore Lizard Stattentos Fife! DDoS th Mentos the bay, a mesn' to Northe the th Man. Word me.
[15:17:50] eedhem: Hand fortind with Mandelay. Withease hackin life!
[15:17:51] eedhem: Nothe Lizard Sony moliatento drestriesh Mentos of Duty, Mandelay bay, Vandustento Northe It's full of Sony! Withe dool. I'm legs, besh, fres. Van. Dee afflin't coo you! Mandelay iny in the andelayin you! Mand mol. As on no doo freheasy bably in Diver.
[15:17:53] eedhem: We'resh asies it's Fre easie eggs. Incress. Dee and moleggs, vion no does. Freasie hatioliver! MandelaySta
[15:18:04] edwinvdgraaf: has joined #ruby
[15:18:14] bougyman: ACTION mumbles about this never happened in -lang
[15:18:30] eedhem: has left #ruby: ()
[15:18:37] deeham: has joined #ruby
[15:18:41] jbisnett: Im linking in a different memory allocator. Ruby is created but it is failing some tests... does anyone else have experience with this?
[15:18:42] deeham: that's cuz erlng sucks
[15:18:48] wookiehangover: has joined #ruby
[15:19:49] jhass: -bbbb *!*@*178.209.52.122 *!*@host81-151-34-9.range81-151.btcentralplus.com *!*@gateway/web/cgi-irc/kiwiirc.com/ip.70.26.88.75 GayBoner!*@*
[15:19:51] jhass: -b exile-bot-2!*@*$#ruby-fix-your-connection
[15:20:11] shevy: bougyman they get a kick out of annoying jhass here :)
[15:21:10] ljarvis: -o ljarvis
[15:21:44] aryaching: has joined #ruby
[15:22:09] ZOMGITSABEAR: has joined #ruby
[15:22:50] icebourg: has joined #ruby
[15:22:54] edwinvdg_: has joined #ruby
[15:23:11] jhass: -qqqq newnews!*@* patsourakos!*@* fnsefgj!*@* rooty!*@*
[15:23:12] jhass: -qqqq GeRMaN0000!*@* sadfaaa!*@* YaNakilon!*@* ass-groper!*@*
[15:23:14] jhass: -qqqq ctOSconnected!*@* Merdam!*@* gayfag!*@* jlbhshluekg!*@*
[15:23:16] jhass: -qqqq KKKGROIDKILLER88!*@* AirStar!*@* *KLINE*!*@gateway/web/freenode/* ChiggerZ!*@*
[15:23:18] jhass: -qqqq ARYAN1488!*@* NuckFiggers!*@* KKKLANSMAN!*@* ssquare!*@*
[15:23:20] jhass: -qqqq shkuare!*@* Reichswehreid!*@* Kemdo!*@* lalops!*@*
[15:23:22] jhass: -qqqq ImperialWizard!*@* *!*@dab-*.dab.02.net kLooaa!*@* newnews!*@*
[15:23:24] jhass: -q eedham!*@*
[15:23:40] icebourg: has joined #ruby
[15:24:06] ramfjord: has joined #ruby
[15:24:20] Oog: has joined #ruby
[15:24:59] dorei: has joined #ruby
[15:26:09] capncrunch4me: has joined #ruby
[15:26:24] capncrunch4me: how difficult is it to fork a gem and change the ruby namespace in it?
[15:26:26] volty: has joined #ruby
[15:26:33] quimrstorres: has joined #ruby
[15:26:41] undeadaedra: depend on the gem
[15:27:05] capncrunch4me: anyone interested in a bounty to fork one?
[15:27:30] ljarvis: 400 rupies
[15:27:40] capncrunch4me: pm if interested
[15:27:59] ljarvis: capncrunch4me: why do you want to do this?
[15:28:12] capncrunch4me: haha, funny you ask that
[15:28:14] zudochkin: has joined #ruby
[15:28:18] shevy: capncrunch4me it is trivial, just grep through the source, then rebuild it
[15:28:24] undeadaedra: ljarvis: 400 ZWL
[15:28:27] shevy: if the main name is: module Foo, then replace Foo with Bar
[15:28:37] capncrunch4me: so the Cassandra native gem and the legacy thrift gem share the same namespace
[15:28:41] shevy: for most gems, the name should reflect the top namespace
[15:28:43] capncrunch4me: hence you cant use them collectively in a project
[15:28:47] shevy: that sucks
[15:28:51] jhass: -bbbb hmmmm!*@* ihatenigg3rs!*@* uncleBob!*@* MetaTroll!*@*
[15:28:53] ponga: shevy can you give me short advice when to use module instead of class
[15:28:54] jhass: -bbbb DeathCode!*@* Adolf_Eichmann!*@* *!~comodo@unaffiliated/ethicalhacker KKKLANSMAN!*@*
[15:28:54] undeadaedra: I already read this, but where?
[15:28:55] jhass: -bbbb der_fuhrer!*@* KommandoFreisler!*@* *!*@gateway/web/freenode/ip.104.131.215.129 NIGhtGERald!*@*
[15:28:56] shevy: who of them is the one that is not well-behaving
[15:28:57] jhass: -b EbonyDarkness!*@*
[15:29:10] capncrunch4me: the one sponsored by Datastax
[15:29:21] shevy: ponga well, it depends. I think a module is great for the topnamespace
[15:29:29] shevy: and whenever you need "include" and "extend"
[15:29:38] capncrunch4me: in their infinite wisdon they decided to create the driver with the same namespace as a legacy driver (just bad practice)
[15:29:42] shevy: inside that main module I usually have smaller classes
[15:29:59] shevy: you can also fake your module :)
[15:30:05] shevy: module Foo; def self.new
[15:30:24] shevy: and inside of that, instantiate your main class that resides as part of module Foo
[15:30:38] ponga: i often tend to forget that module exists and only use class
[15:30:43] shevy: capncrunch4me yes, you must rebuild the gem after you change it
[15:30:46] ponga: i'd want to use module smartly
[15:30:57] shevy: I also once suggested to the ruby core team to allow ad-hoc reshuffling of all namespaces freely
[15:31:05] capncrunch4me: I wasnt kidding about the bounty ;)
[15:31:37] capncrunch4me: bountry, bribe, whatever
[15:31:43] volty: what could be ??reshuffling of all namespaces?? ?
[15:31:45] Ox0dea: capncrunch4me: Are the codebases so convoluted that a few standard Unix utilities won't cut it?
[15:31:52] undeadaedra: *woop* *woop*
[15:31:55] undeadaedra: it's the polis
[15:32:02] capncrunch4me: see, i just needed to speak the proper language
[15:32:03] shevy: volty for instance: module Foo; class Bar <--- say I want Bar to reside only in module Yippie instead
[15:32:10] et09: has joined #ruby
[15:32:17] capncrunch4me: Ox0dea: it should be easy
[15:32:33] shevy: it would also solve capncrunch4me problem btw; you first require one namespace, assign it to another one, load the other gem, then re-assign to another top namespace
[15:32:52] shevy: even though that is hackish... but better than having to rebuild the gem
[15:33:00] undeadaedra: shevy: not if the gem refers to the namespace name directly
[15:33:07] volty: ah, you meant moving definitions from one space to another, @shevy
[15:33:08] shevy: undeadaedra how?
[15:33:23] shevy: ah you mean hardcoded stuff, rather than def self.bla ?
[15:33:35] shevy: I dunno, I always use def self
[15:33:52] brettnem: has joined #ruby
[15:33:53] undeadaedra: module Foo; class A < ::Foo::B; ...
[15:34:16] michael_mbp: has joined #ruby
[15:34:18] shevy: well that is an example of suckage
[15:34:27] undeadaedra: (I know, this one is stupid, I don't have short and not stupid examples)
[15:35:01] shevy: I also don't like that you need to know the name or the type
[15:35:01] undeadaedra: module Foo; A = 1; module Bar; A = 2; Foo::A # to not take Foo::Bar::A; end; end
[15:35:13] shevy: like "is it a module or is it a class" when I wish to extend it. I should not need to depend on that information
[15:35:27] Igorshp: has joined #ruby
[15:35:32] shevy: your example can be rewritten or?
[15:35:39] shevy: the Foo::A part
[15:35:41] jhass: -bbbb Freetekton!*@* i0n!*@* Xnfu!*@* armpitsmell!*@*
[15:35:43] jhass: -bbbb amasna!*@* *!~asdd@* *!~tuuuu@* *!~kikati@*
[15:35:45] jhass: -bbbb Eboroma!*@* *!~fluuflu@* fiodoo!*@* mandee!*@*
[15:35:47] jhass: -bbbb tustex!*@* tutus!*@* raaamina!*@* ramers11!*@*
[15:35:48] undeadaedra: how would you write it?
[15:35:49] shevy: we can refer to the top-namespace here right?
[15:35:50] jhass: -bbbb adhdhero!*@* Bilge!*@* felipec!*@* *!~goldginfe@*
[15:35:51] jhass: -bbbb AffiliateOwnz!*@* Whoop!*@* chord!*@* erikwb!*@*
[15:35:53] jhass: -bbbb chare!*@* Quix0te!*@* icooba!*@* philipd!*@*
[15:35:54] undeadaedra: jhass, you're so noisy.
[15:35:55] jhass: -bbbb Lanser!*@* maniacal!*@* troii!*@* kracekumar!*@*
[15:35:57] jhass: -bbbb perplexa!*@* xyloprexam!*@* Tijuanense!*@* nOgAnOo!*@*
[15:36:04] heftig: has joined #ruby
[15:36:05] jhass: I'll stop now
[15:36:08] shevy: he wants to invite them back in the channel :)
[15:36:11] Darkwater: jhass' birthday?
[15:36:12] undeadaedra: shevy: you mean ::A ?
[15:36:22] undeadaedra: Don't stop jhass now ???
[15:36:28] shevy: undeadaedra nono... isn't there a way to refer to the topnamespace, in a module, without using the name?
[15:36:34] undeadaedra: 'cause he's having such a good time ???
[15:36:44] shevy: something similar to def self.foo
[15:36:50] shevy: but for constants and such
[15:37:27] undeadaedra: shevy: I don't know one.
[15:37:43] shevy: I don't know one either
[15:37:50] shevy: that surprises me
[15:37:57] brettnem: seems like modules should refer to themselves with ???self??? instead of their own name, right?
[15:38:10] mikecmpbll: has joined #ruby
[15:38:13] brettnem: is that a common rubyism?
[15:38:18] shevy: will it work brettnem?
[15:38:19] shevy: undeadaedra> module Foo; A = 1; module Bar; A = 2; Foo::A
[15:38:25] shevy: undeadaedra> module Foo; A = 1; module Bar; A = 2; ::self::A
[15:38:32] shevy: ok that one won't
[15:38:34] undeadaedra: self is Foo::Bar
[15:38:51] shevy: that's strange
[15:39:04] ponga: shevy: what's your main project these days ser
[15:39:13] shevy: perhaps I should suggest a way to obtain the namespaces, without having to depend on the given name
[15:39:17] shevy: but I can't think of a good syntax
[15:39:35] ndrei: has joined #ruby
[15:39:55] undeadaedra: getting the class name, splitting on '::'
[15:40:17] aryaching: has joined #ruby
[15:40:21] shevy: ponga right now I rewrite my pipe-handling stuff from scratch. One day it shall allow me to be usable like virtualdub + avisynth but for objects of all kind, not only audio/video: here is syntax example from old avisynth, it was lovely: http://avisynth.nl/index.php/Script_examples
[15:40:45] yaw: has joined #ruby
[15:40:50] shevy: add a logo: clip.Layer(logo, "add", 255, 582, 36, use_chroma=true)
[15:41:28] charliesome: has joined #ruby
[15:41:28] shevy: I remember I captured video, and there was the logo from the TV channel. Then I used virtualdub + avisynth to blur out that logo; it was almost perfect, though the area was a bit blurry
[15:41:35] shevy: (the logo part only, not the rest of the video)
[15:41:36] ponga: what language is it written in? ruby?
[15:41:42] flughafen_: has joined #ruby
[15:41:52] shevy: undeadaedra ok but in that example, it is still hardcoded right? you still have the reference Foo as the top namespace
[15:42:07] Ox0dea: shevy: Ruby does not have actual namespaces.
[15:42:08] shevy: ponga that's the only language I know! I wish I could instantly know C so I don't have to learn it
[15:43:07] shevy: undeadaedra that one:
[15:43:09] shevy: module Foo; A = 1; module Bar; A = 2; Foo::A
[15:43:11] shevy: the Foo::A part
[15:43:18] undeadaedra: yes, it's hardcoded
[15:43:40] ponga: shevy: is ruby only language u know?
[15:44:03] mister_solo: has joined #ruby
[15:44:12] ponga: i'd take that as metaphor
[15:44:25] rcvalle: has joined #ruby
[15:44:52] s2013: has joined #ruby
[15:45:02] Ox0dea: http://www.paulgraham.com/avg.html
[15:45:11] Ox0dea: shevy is a Blub programmer, but his Blub is Ruby so it's okay.
[15:45:14] nikhgupta: has joined #ruby
[15:45:42] shevy: ponga I used to write in perl and php but I forgot everything
[15:45:46] AndroidLoverInSF: has joined #ruby
[15:45:58] Thr3d: has joined #ruby
[15:46:00] ponga: shevy: nice i also forgot everything about java
[15:46:16] veleno: has joined #ruby
[15:46:25] dfockler: has joined #ruby
[15:47:06] RTG`: has joined #ruby
[15:47:43] wildroman2: has joined #ruby
[15:48:30] ariutk: has joined #ruby
[15:48:59] kallisti5: has joined #ruby
[15:49:10] kallisti5: anyone know how to turn an array into a series of arguments?
[15:49:19] michaeldeol: has joined #ruby
[15:49:23] renderful: has joined #ruby
[15:49:26] j416: kallisti5: *array
[15:49:32] x1337807x: has joined #ruby
[15:49:35] havenwood: kallisti5: prefix a splat ^
[15:49:41] kallisti5: aka, gem's takes "sfsd", "dsewt", "rewtew"
[15:49:45] kallisti5: havenwood: neat! /me tries
[15:49:46] shevy: undeadaedra so with self, I can point at the current namespace right?
[15:50:03] undeadaedra: there's no namespace
[15:50:14] undeadaedra: >> class A; p self; end
[15:50:15] ruboto: undeadaedra # => A ...check link for more (https://eval.in/384524)
[15:50:16] michael_mbp: has joined #ruby
[15:50:21] kallisti5: havenwood: nope. syntax error, unexpected '^'
[15:50:29] havenwood: kallisti5: show the code?
[15:50:30] ljarvis: kallisti5: j416 showed you
[15:50:35] ariutk: Hello! I need help. There is [{ user_ids: [1,2,3] }, { user_ids: [4,5,6] }]. How return [{ user_ids: [1,2,3,4,5,6] }]?
[15:50:36] ljarvis: havenwood: they took your ^ literally
[15:50:41] BanzaiJoe: has joined #ruby
[15:50:45] havenwood: ljarvis: oh!
[15:50:54] ljarvis: ariutk: map + merge
[15:50:55] kallisti5: http://pastebin.com/4vzfzjGw
[15:50:56] ruboto: kallisti5, we in #ruby do not like pastebin.com, I reposted your paste to gist for you: https://gist.github.com/5bc2322d35a50ef36ef9
[15:50:56] ruboto: pastebin.com loads slowly for most, has ads which are distracting and has terrible formatting.
[15:50:57] kallisti5: ACTION tries
[15:51:06] havenwood: kallisti5: by ^ i meant to refer to j416's comment above mine
[15:51:17] havenwood: kallisti5: splat is a term for *
[15:51:36] kallisti5: that seems to be working... thanks! I didn't know that trick :-D
[15:51:45] havenwood: ljarvis: i'm drinking coffee, my excuse elludes me
[15:52:00] ljarvis: havenwood: :D
[15:52:06] kallisti5: moving our performance data out of PG into a series of rrd files :-D
[15:52:16] apeiros: ljarvis: merge? not concat/+?
[15:52:29] ariutk: ljarvis: example? I tried, but not succeed :-(
[15:52:41] apeiros: ariutk: please show what you tried but failed
[15:52:47] momomomomo_: has joined #ruby
[15:52:58] atmosx: kallisti5: rrd files? what for graphs?
[15:53:00] bungoman: has joined #ruby
[15:53:21] kallisti5: atmosx: yeah. right now i'm loading performance metrics into a pg table and drawing them with chartkick
[15:53:28] ariutk: [{ user_ids: [1,2,3] }, { user_ids: [4,5,6] }].inject(&:merge) return {:user_ids=>[4, 5, 6]}
[15:53:34] kallisti5: however... each machine has a bunch of metrics... 60second collection times
[15:53:43] kallisti5: the javascript gets overloaded quickly
[15:53:49] ariutk: but me need { user_ids: [1,2,3,4,5,6] }
[15:53:50] kallisti5: so going rrd + rrdgraph
[15:54:02] kallisti5: the data is coming from rest api's
[15:54:11] kallisti5: yay DevOps + ruby :-D
[15:54:20] apeiros: ariutk: merge will override existing keys
[15:54:25] atmosx: kallisti5: col
[15:54:36] apeiros: ariutk: but you can provide a block to tell it what to do instead of overriding
[15:54:49] apeiros: and you could + the two arrays in that block
[15:55:16] michael_mbp: has joined #ruby
[15:55:44] j416: ariutk: a = [{ user_ids: [1,2,3] }, { user_ids: [4,5,6] }]
[15:55:50] Xeago: has joined #ruby
[15:56:01] jbisnett: if ruby is sequencial why does it use more than one thread
[15:56:04] j416: ariutk: { user_ids: a.map { |h| h[:user_ids] }.flatten } # => {:user_ids=>[1, 2, 3, 4, 5, 6]}
[15:56:07] sharpmachine: has joined #ruby
[15:56:08] jbisnett: sequential*
[15:56:19] j4cknewt: has joined #ruby
[15:56:50] ReK2: has joined #ruby
[15:57:06] ariutk: j416: Thanks! It works
[15:57:12] j416: if course.
[15:57:16] iamninja: has joined #ruby
[15:57:17] j416: if? I mean of.
[15:57:20] seitensei: has joined #ruby
[15:58:37] j416: jbisnett: why do you run more programs than the number of cores your cpu has?
[15:58:59] apeiros: j416: flat_map
[15:59:22] j416: apeiros: that's the second time you've told me that, I think. :D
[15:59:38] j416: ariutk: { user_ids: a.flat_map { |h| h[:user_ids] } }
[15:59:56] j416: ty apeiros
[16:00:07] flughafen_: has joined #ruby
[16:00:15] apeiros: btw, almost always when you use flatten, you want flatten(1)
[16:00:31] apeiros: and IME, almost always you use flatten(1), there's a nicer way without it :)
[16:00:52] j416: good to know! thanks
[16:00:57] havenwood: and often when you use flatten(1), you want flat_map. :P
[16:00:58] rbennacer: has joined #ruby
[16:01:01] kallisti5: sometimes I solve a problem in ruby and it brings a tear to my eye
[16:01:15] ljarvis: % ag 'flatten\(1\)' | wc -l
[16:01:16] kallisti5: one-liner to change a hash map into rrd data
[16:01:17] kallisti5: values = "#{time}:#{items.values.join(":")}"
[16:01:36] kallisti5: where items is a Hash
[16:02:26] rbennacer: has joined #ruby
[16:02:57] RobertBirnie: has joined #ruby
[16:03:07] ariutk: j416: If [{ user_ids: [1,2,3], urls: ['one','two','three'] }, { user_ids: [4,5,6], urls: ['four'] }] I need use map before?
[16:03:12] davedev24_: has joined #ruby
[16:03:20] cndiv: has joined #ruby
[16:03:23] j416: depends on what you want to achieve
[16:03:26] j416: I must dash.
[16:03:33] edwinvdgraaf: has joined #ruby
[16:03:44] cndiv: has joined #ruby
[16:04:04] ariutk: j416: Thanks :-)
[16:04:33] freerobby: has joined #ruby
[16:05:19] dopie: has joined #ruby
[16:05:21] mister_solo: has joined #ruby
[16:05:22] Ox0dea: > not using ag -c
[16:06:10] qwertme: has joined #ruby
[16:06:28] j_mcnally: has joined #ruby
[16:06:29] Ox0dea: Disregard.
[16:06:35] piet: has joined #ruby
[16:06:53] wookiehangover: has joined #ruby
[16:07:45] celly: has joined #ruby
[16:08:12] luckyme: has joined #ruby
[16:08:40] vikaton: has joined #ruby
[16:09:04] nobitanobi: has joined #ruby
[16:10:22] edwinvdg_: has joined #ruby
[16:11:55] diegoviola: has joined #ruby
[16:12:02] edwinvdg_: has joined #ruby
[16:12:33] peter_paule: has joined #ruby
[16:12:40] white_bear: what's the best way to retrieve a filename without its multiple extensions, e.g., foo.bar.baz => foo
[16:12:55] white_bear: File.basename('foo.bar.baz', '.*') returns 'foo.bar'
[16:13:05] shevy: white_bear well, how do you determine that foo is the filename there?
[16:13:16] shevy: because you need to apply some rules right
[16:13:22] diegoviola: has joined #ruby
[16:13:45] white_bear: that's what i'm doing for the moment: File.basename(f).split('.').first
[16:13:52] shevy: for my class Extracter, I simply have the archives like .tar.xz hardcoded
[16:14:03] shevy: yeah that may work
[16:14:04] white_bear: well the first token, tokens being delimited by "."
[16:14:18] shevy: yeah, seems ok as long as the assumption will hold true
[16:15:14] nikhgupta: has joined #ruby
[16:15:15] white_bear: i find .* misleading, you'd think it'd match everyting after the first dot (including the dot), but nope
[16:15:25] sarmiena_: has joined #ruby
[16:15:28] dostoyevsky: was something like: def f; ensure; b; end ever possible in ruby? without extra begin and end?
[16:16:12] ljarvis: white_bear: why would you expect that? in the file "foo.jpg.png" the extension is "png" not "jpg.png"
[16:16:18] commondream: has joined #ruby
[16:16:31] Dopagod: has joined #ruby
[16:16:31] dfockler: dostoyevsky: you can do that if you have a rescue in the method
[16:16:36] ljarvis: dostoyevsky: in a method with rescue
[16:17:09] white_bear: ljarvis: well it depends on the naming convention but yeah
[16:17:12] ccooke: No, it works without a rescue
[16:17:18] ljarvis: white_bear: no it doesn't
[16:17:23] shevy: ljarvis but what is the extension for foobar-1.0.tar.xz
[16:17:24] dostoyevsky: ah yeah... that seems to work, rescue without being and end in a method's body
[16:17:40] ljarvis: shevy: it's .xz :D
[16:17:55] shevy: yeah I guess so too
[16:18:03] ccooke: Note, however, that the method will not return whatever is in the ensure block
[16:18:16] shevy: captain cooke is back!
[16:18:23] ccooke: >>> def x; 1; ensure; puts "foo"; 2; end; x
[16:18:24] ruboto: ccooke # => /tmp/execpad-5d6ec43ab3f7/source-5d6ec43ab3f7:2: syntax error, unexpected '>' ...check link for more (https://eval.in/384541)
[16:18:27] _blizzy_: for some reason, my script keeps crashing at line 8, and I don't know why. it should be saving it into the hash. https://gist.github.com/NotBlizzard/a99c87c3d2194178e37e
[16:18:34] ccooke: oops. one too many :-)
[16:18:37] ccooke: >> def x; 1; ensure; puts "foo"; 2; end; x
[16:18:38] ruboto: ccooke # => foo ...check link for more (https://eval.in/384542)
[16:18:51] shevy: _blizzy_ so much repetition you have there
[16:18:54] ccooke: (that method would return 1, not 2)
[16:18:55] ljarvis: good point
[16:19:13] _blizzy_: shevy, yeah, it's just to get it working atm
[16:19:14] white_bear: ljarvis: in the shell you can do "${f%.*}" to get "foo.bar" and "${f%%.*}" to get "foo"
[16:19:18] _blizzy_: I'll refactor later
[16:19:22] white_bear: ljarvis: maybe there's an equivalent in ruby
[16:19:23] ljarvis: _blizzy_: keeps crashing isn't all that informative
[16:19:31] shevy: you should include the error message
[16:19:38] ccooke: shevy: Technically I never left
[16:19:45] _blizzy_: "undefined method `[]=' for nil:NilClass (NoMethodError)"
[16:19:50] blackmesa: has joined #ruby
[16:19:53] shevy: ok you have a nil value there
[16:19:56] ljarvis: white_bear: I think what you're doing is fine, as long as you can assume periods in the filename are only for extension delmiters
[16:20:03] shevy: p1_pkmn[@battleroom[/(\d+)/]]['name']
[16:20:12] ljarvis: _blizzy_: well, @battleroom[x] is nil
[16:20:14] shevy: I bet that p1_pkmn[@battleroom[/(\d+)/]] yields nil already
[16:20:20] white_bear: ljarvis: i see your point
[16:20:21] shevy: so you try to call [] on that
[16:20:23] kahuna_: has joined #ruby
[16:20:24] hahuang65: has joined #ruby
[16:20:45] simplyianm: has joined #ruby
[16:20:47] _blizzy_: hmm, ok, thank you everyone.
[16:20:49] ljarvis: i meant [x][..] rather
[16:20:54] bgmarx: has joined #ruby
[16:21:15] _blizzy_: so foo[@battleroom][:name] returns nil?
[16:21:20] _blizzy_: even though I'm declaring :name ?
[16:21:35] ljarvis: you don't have anything you've just said in that gist
[16:22:29] kahuna_: I have a table that's iterating over an array and I was wondering what would the best solution to outbut the index value starting at 1
[16:22:32] ariutk: ljarvis: res.flat_map(&:keys).uniq.map { |key| [key, res.flat_map { |e| e[key] }] }.to_h
[16:22:33] kahuna_: something like: m.each_index { |m| puts m }
[16:22:45] dudo: has joined #ruby
[16:22:51] _blizzy_: nvm, I figured it out. thanks, ljarvis and shevy.
[16:22:53] ariutk: ljarvis: what I wanted :-)
[16:23:06] towski_: has joined #ruby
[16:23:12] soulcake: has joined #ruby
[16:23:23] ljarvis: kahuna_: m.each_index { |x, i| puts i+1 }
[16:23:47] ccooke: (do you mean #each_with_index ?)
[16:24:08] kahuna_: no actually I just wanted to output the index but not the value
[16:24:10] ljarvis: I need coffee
[16:24:14] ljarvis: dammit havenwood
[16:24:25] ljarvis: kahuna_: so?
[16:24:40] ljarvis: kahuna_: m.each_with_index { |_, i| puts i + 1 }
[16:24:41] kahuna_: so for instance I have table and the first column is just a number column to reflect the rows in the table
[16:24:57] ljarvis: m.size.times { |i| puts i+1 }
[16:25:01] _blizzy_: I don't get how "battle-randombattle-242017373[/\d+/]" is returning nil
[16:25:06] _blizzy_: when the regex matches the numbers
[16:25:13] csmb_: has joined #ruby
[16:25:15] kahuna_: ljarvis: so each_index shouldnt be used here?
[16:25:21] Ox0dea: kahuna_: Yes.
[16:25:24] ljarvis: kahuna_: both work
[16:25:27] Ox0dea: Or, rather, it should be used.
[16:25:30] crdpink: has joined #ruby
[16:25:35] nofxxx: has joined #ruby
[16:25:40] ljarvis: use whatever you want. I would use each_with_index
[16:25:49] Ox0dea: ljarvis: He only needs the indices.
[16:26:08] ljarvis: I don't see how that changes anything
[16:26:11] kahuna_: ahh yes that looks nice!
[16:26:16] kahuna_: thanks ljarvis
[16:26:27] nofxx: has joined #ruby
[16:26:27] Spami: has joined #ruby
[16:26:39] Ox0dea: Using #each_with_index and ignoring the object is the same as just using #each_index.
[16:26:47] Ox0dea: One of these options is retarded.
[16:27:16] phat4life: white_bear: there is an equivalent in ruby
[16:27:16] phat4life: File.basename
[16:27:16] phat4life: er, that is just the base, not sure if that is what you need
[16:27:33] ixti: has joined #ruby
[16:27:34] ljarvis: oh, right. Yes I did mean each_index
[16:27:43] Channel6: has joined #ruby
[16:27:44] ljarvis: ccooke confused me when they corrected me
[16:27:48] CorySimmons: has joined #ruby
[16:28:00] ogpastaling: has joined #ruby
[16:28:06] ljarvis: and then i tumbled into a giant hole of confusion
[16:28:07] shevy: you need coffee
[16:28:45] nofxxx: short shot for me, ty
[16:29:16] ljarvis: nofxxx: you'll get what you're given! *mochaccino*
[16:31:09] ccooke: ljarvis: you confused me - you used two parameters in the block :-)
[16:31:22] jphenow: has joined #ruby
[16:31:23] ljarvis: ccooke: yeah :(
[16:31:34] nofxxx: ljarvis, I'll need a coffee after that
[16:31:45] nietzschette: has joined #ruby
[16:31:55] baweaver: has joined #ruby
[16:32:50] fedexo: has joined #ruby
[16:33:55] nietzschette: I'm trying to upgrade my ruby/sdl library. But not all the classes have all the methods they should
[16:34:56] ogpastaling: has joined #ruby
[16:35:03] starfox_sf: has joined #ruby
[16:36:28] ljarvis: jhass: playing with crystal chans, wish Ruby had this
[16:36:32] yoongkang: has joined #ruby
[16:37:24] jhass: might want to drop by in #crystal-lang ;)
[16:37:46] undeadaedra: jhass: you should merge with #crystal
[16:38:05] jhass: undeadaedra: working on it
[16:38:21] ljarvis: i was a bit sad when they bootstrapped
[16:39:04] sharpmachine: has joined #ruby
[16:40:28] Exuma: has joined #ruby
[16:40:36] MonkehParade: has joined #ruby
[16:41:42] et09: hi MonkehParade
[16:41:43] Ropeney: has joined #ruby
[16:41:48] peter_paule: has joined #ruby
[16:41:51] nietzschette: do you guys have a crystal wrapper for sdl
[16:41:58] tejasmanohar: has joined #ruby
[16:42:28] jhass: nietzschette: not a full binding, but a quite complete one for sfml
[16:42:29] jpfuentes2: has joined #ruby
[16:42:58] undeadaedra: this is not my terminal
[16:43:24] jhass: nietzschette: http://crystalshards.herokuapp.com/ just search SDL
[16:43:36] ljarvis: i pipe it straight into my head like the matrix
[16:44:10] nietzschette: there is indeed!
[16:45:32] rbennacer: has joined #ruby
[16:45:47] davedev24: has joined #ruby
[16:46:09] senayar: has joined #ruby
[16:46:09] senayar: has joined #ruby
[16:46:44] MonkehParade: Hello, I'm rather new to Ruby, and I'm trying to set everything up, but..
[16:46:57] LMity: has joined #ruby
[16:47:05] uptownhr: has joined #ruby
[16:47:05] MonkehParade: when I install sass locally, I can't execute it. When I install it using sudo, I get an error.
[16:47:15] MonkehParade: This happens to every other gem I install.
[16:47:34] MonkehParade: My os is Ubuntu 12.04.
[16:47:44] MonkehParade: Sorry If I sound like a total noob :/
[16:47:54] jhass: it would be good to describe your error
[16:48:08] jhass: that you get one is nice and all, but doesn't say much
[16:49:05] decoponio: has joined #ruby
[16:49:31] jhass: MonkehParade: ^
[16:50:18] fantazo: has joined #ruby
[16:51:31] carlosgoce: has joined #ruby
[16:51:38] fabrice31: has joined #ruby
[16:51:39] jhass: MonkehParade: are you going to detail your setup & the error you get?
[16:51:52] umgrosscol: MonkehParade: what is the error returned by 'gem install sass' ?
[16:52:14] kahuna_: has joined #ruby
[16:52:39] umgrosscol: MonkehParade: Use gist if it's an error longer than a couple of lines.
[16:54:32] mikecmpbll: has joined #ruby
[16:56:11] TechTonics: has joined #ruby
[16:57:48] nietzschette: anyway, I know not many people use ruby sdl. I don't know why I still do. I have many tools for stenography and photomanipulation I wrote long ago, but when I attempt to move from ruby 1.9 to 2.1 and also upgrade the sdl library, everything loads and requires fine, I can create windows and surfaces, but when I start calling methods I get undefined errors. I look and the classes have SOME but not all of their usual methods. would thi
[16:57:48] nietzschette: s be because the newer sdl library is incomplete or is there possibly something I overlooked when building ruby?
[16:58:13] NeverDie: has joined #ruby
[16:58:27] TechTonics: is there a way in Ruby to determine if a block of code completed successfully or not?
[16:58:54] jhass: TechTonics: add code after it
[16:58:57] spaceghostc2c: TechTonics: Check the truthiness of the return?
[16:58:58] kristoph: has joined #ruby
[16:59:05] jhass: if it's reached then yes, if not then not
[16:59:17] spaceghostc2c: You'll get an exception, something truthy, or something falsy.
[16:59:29] spaceghostc2c: exceptions are truthy too though.
[16:59:30] TechTonics: is there an "errorlevel" equilant ?
[16:59:58] Casty: has joined #ruby
[17:01:02] jhass: TechTonics: like PHPs?
[17:01:04] MEATCHICKEN: any idea how to generate a tournament/league schedule?
[17:01:06] Xeago: has joined #ruby
[17:01:13] MEATCHICKEN: given an array of 16 team objects
[17:01:19] MEATCHICKEN: I have no idea how to start
[17:01:40] jhass: meatchicken: .shuffle.each_slice(2) ?
[17:02:05] snockerton: has joined #ruby
[17:02:24] MEATCHICKEN: jhass, I guess I need to read up more about how schedules work
[17:02:26] kp666_: has joined #ruby
[17:02:32] zudochkin: has joined #ruby
[17:02:36] jhass: well or I do
[17:02:37] TechTonics: jhass : like a batch file ..
[17:02:39] MEATCHICKEN: that would just generate the first week wouldn't it..lol
[17:02:58] NeverDie: has joined #ruby
[17:03:17] jhass: TechTonics: there's some stuff to turn up warnings but nothing really widely used, Ruby complains about the stuff you shouldn't do by default or simply doesn't provide them
[17:03:27] revath: has joined #ruby
[17:03:45] jhass: meatchicken: what result would you expect for the second one?
[17:04:04] snockerton: has joined #ruby
[17:04:36] Ox0dea: jhass: Teams tend not to play each other more than a handful of times in a given season.
[17:04:45] sharpmachine: has joined #ruby
[17:04:53] nietzschette: Hmmm . . . . I used to be able to use the arrow keys in IRB, now I get ^[[* characters. what changed?
[17:04:57] havenwood: >> [:parrots, :slugs, :anteaters, :chickens, :llamas, :squirrels].shuffle.each_slice(2).map { |a, b| "#{a} vs #{b}" }
[17:04:58] ruboto: havenwood # => ["parrots vs squirrels", "chickens vs llamas", "anteaters vs slugs"] (https://eval.in/384546)
[17:05:06] spaceghostc2c: nietzschette: Readline
[17:05:07] havenwood: Who will win?!
[17:05:13] jhass: nietzschette: terminal messed up? open a new one/call reset
[17:05:31] havenwood: llamas are a strong favorite against chickens
[17:05:42] spaceghostc2c: havenwood: I'm much more llama-friendly.
[17:06:01] Notte: has joined #ruby
[17:06:04] neanderslob: has joined #ruby
[17:06:04] spaceghostc2c: havenwood: Would you ever spend some time being a nomad or being a part of a technical commune?
[17:06:16] RobertBirnie: has joined #ruby
[17:06:30] havenwood: A nomadic technical commune, maybe.
[17:06:36] spaceghostc2c: havenwood: ohlawdy.
[17:06:42] spaceghostc2c: I was thinking of going one way or the other.
[17:06:51] Thr3d: has joined #ruby
[17:06:54] spaceghostc2c: "Why not both?" is a valid answer, I guess.
[17:07:14] havenwood: Spaceghostc2c: Granted I don't know of any nomadic technical communes...
[17:07:28] spaceghostc2c: havenwood: Would you do either one?
[17:07:39] havenwood: Sure, I'd consider either.
[17:08:06] simplyianm: has joined #ruby
[17:08:36] eggoez: has joined #ruby
[17:09:19] wallerdev: has joined #ruby
[17:09:22] dopie: has joined #ruby
[17:10:02] miah: tech communes, aka 'hacker spaces'
[17:10:11] Vardan: has joined #ruby
[17:10:21] Exuma: has joined #ruby
[17:10:42] ponga: has joined #ruby
[17:10:57] ponga: havenwood: hi
[17:11:03] ponga: can i ask a favour please
[17:11:14] havenwood: ponga: sure
[17:11:35] spaceghostc2c: ACTION asks havenwood a flavor
[17:11:40] ponga: havenwood: im having issue with my irccloud functionality, can you call my nick again in 10 seconds please
[17:11:40] spaceghostc2c: miah: Whale, ones where you live on site.
[17:11:47] codecop: has joined #ruby
[17:11:52] Vardan: people one question related with inheritance. I have class A where I have implemented initialize method, then I have created B class which extends A class. B class does not have any methods. When I do b = B.new it not call A initialize method. Is it ok?
[17:12:20] havenwood: ponga: roger that
[17:12:21] spaceghostc2c: codecop: Are you like the thought police for code?
[17:12:41] ponga: havenwood: ok please do so i will go background now
[17:12:51] Senjai: Good morining ruby
[17:12:57] havenwood: Senjai: g'mornin
[17:12:58] RobertBi_: has joined #ruby
[17:13:10] havenwood: ponga: is that ten seconds?
[17:13:18] piet: has joined #ruby
[17:13:22] bgmarx: has joined #ruby
[17:13:30] ruby-lang126: has joined #ruby
[17:13:39] ponga: damn it my connection is so fucked up
[17:13:56] Vardan: any answer for my questoin?
[17:14:03] haxrbyte: has joined #ruby
[17:14:03] ponga: havenwood: im on background but it thinks ive read it
[17:14:34] jhass: ponga: use a sane client :P
[17:14:34] last_staff: has joined #ruby
[17:15:08] havenwood: Vardan: When you extend one class from another you don't get a?: TypeError: wrong argument type Class (expected Module)
[17:15:09] jhass: Vardan: it should, could you gist an example?
[17:15:19] havenwood: Vardan: Show the code! :)
[17:15:30] ponga: jhass: there is no sane client on ios
[17:15:37] ponga: perhaps you could recommend me one
[17:15:49] jhass: I try to stay away from apple products
[17:15:59] havenwood: ponga: How about LimeChat?
[17:16:00] ponga: gud you are clever
[17:16:04] ponga: sadly im not clever
[17:16:28] lala: ponga: IRC client for iOS?
[17:16:28] ponga: havenwood: thing is i can't stay connected more than 10mins on that, irccloud kinda cheats and allows me to stay upto 2hrs on free account
[17:16:33] ponga: that's why im on irccloud
[17:16:36] phat4life: lala: i use weechat
[17:16:46] nietzschette: B and A should have the same initialize method
[17:16:48] Senjai: phat4life: WEECHAT FO LIFE
[17:16:50] phat4life: i even compiled weechat on os x
[17:16:53] phat4life: that was fun
[17:16:59] jhass: anyway, this makes an excellent topic for #ruby-offtopic!
[17:17:03] Senjai: ponga: Just get weechat running on a digital ocean box in a tmux session
[17:17:09] Senjai: ponga: You can ssh in and reattach the screen whenever
[17:17:14] nietzschette: anything put in A's initialization method will be in B's as well
[17:17:15] Senjai: You're... ALWAYS CONNECTED
[17:17:25] quimrstorres: has joined #ruby
[17:17:34] Senjai: I dont even have weechat installed locally
[17:17:37] lala: ponga: You can try Colloquy.
[17:17:38] Senjai: I just keep it on DO
[17:17:48] jhass: seriously, you're burrying an active Ruby question currently
[17:18:05] ponga: lala: does it allow me to stay connected for a while?
[17:18:07] Vardan: https://gist.github.com/vgevorgyan/40167989e2eca899bb65
[17:18:14] jhass: lala: ponga please join #ruby-offtopic
[17:18:55] ponga: thank you
[17:19:05] ponga: jhass: i didn't know that channel existed
[17:19:55] jhass: ponga: it's new :)
[17:20:32] rjno: has joined #ruby
[17:20:38] jhass: Vardan: if you take out the < ApplicationController, add MainController.new.index and save that to file you'll see that your example does not reproduce the issue you describe
[17:21:02] jhass: Vardan: I guess you're inside Rails and face a code reloading issue, make sure to restart your app (including spring)
[17:21:33] Vardan: jhass: I'm stopping and starting server
[17:21:42] baweaver: Also, you might consider #RubyOnRails
[17:22:32] baweaver: Most of the same people are on here, yeah, but there are some uniques there that may be able to help more accurately with your issues.
[17:22:59] dfockler: If you know some files/gems get required in your app loadpoint should you require them throughout the rest of your app?
[17:23:01] rbowlby: has joined #ruby
[17:23:21] Vardan: restarting spring not helped
[17:24:01] baweaver: dfockler: Normally it won't hurt to just frontload all of them
[17:24:04] _djbkd: has joined #ruby
[17:24:20] baweaver: Then again this only works for smaller libraries / gems
[17:24:21] jhass: Vardan: as said your example does not show the behavior you describe, guessing what the issue might be in your real code is very hard :/
[17:24:46] nietzschette: yeah, it works when It's saved in a file and run in terminal
[17:24:48] baweaver: larger apps can become a pain on that after a certain point, but one must consider Rails also frontloads.
[17:24:58] baweaver: They get a nasty startup time from it as well, mind.
[17:25:16] dfockler: baweaver: something to think about, thanks
[17:25:26] Vardan: by the way Test module and Document class are in gem
[17:25:28] lkba_: has joined #ruby
[17:25:29] baweaver: Once it starts it won't matter much
[17:26:08] dfockler: it's a sinatra server so I'm not started it all the time
[17:26:17] dfockler: s/started/starting
[17:26:41] baweaver: Probably fine, but also remember that getting gem happy will cost you in blood as well
[17:26:59] dfockler: hehe, it's mostly just local requires
[17:27:18] jhass: Vardan: so you modified the gem to add `p "Hello"` ?
[17:27:23] chussenot: has joined #ruby
[17:27:27] baweaver: The larger the app, the more skeptical you should be about including dependencies. I've seen cases with the phantomjs gem that has some spooky stuff behind the scenes
[17:27:57] Vardan: ok, I think I got what you mean :)
[17:28:16] jhass: Vardan: are you sure you modified it at the right file/version that's actually loaded?
[17:28:18] dfockler: baweaver: that's understandable especially if you are only using a tiny amount of the code in the gem
[17:28:18] baweaver: I am lazy as hell, and wanted to be able to install PhantomJS via Rubygems/Bundler when using poltergeist.
[17:28:27] baweaver: that's from that gem
[17:28:31] rbennacer: has joined #ruby
[17:28:34] baweaver: https://github.com/colszowka/phantomjs-gem
[17:28:42] dgutierrez1287: has joined #ruby
[17:28:52] baweaver: ....which is included in Teaspoon and a bunch of other testing frameworks
[17:28:55] Vardan: how to check that?
[17:29:29] jhass: Vardan: mmh, print/log Test::Document.instance_method(:initialize).source_location
[17:29:30] Vardan: I wrote wrong code, but it's not crashes
[17:29:37] ramfjord: has joined #ruby
[17:29:38] jhass: ?pry Vardan
[17:29:38] ruboto: Vardan, Pry, the better IRB. Includes easy object inspection via `ls`, `history`, docs view with `?`, source view with `$` and syntax highlighting, among other features (see `help` for more). It can also be used for easy debugging by putting ???binding.pry??? directy in your source code. Visit https://pryrepl.org/ or get it now with gem install pry pry-doc
[17:29:49] jhass: ^ can also help verifying such stuff
[17:29:55] baweaver: Without looking into dependencies, one would never realize that that thing is included and does some odd junk. The proper solution is to brew install it or apt-get phantomjs
[17:30:05] Agoldfish: has joined #ruby
[17:30:19] User458764: has joined #ruby
[17:30:35] Vardan: Test::Document.instance_method(:initialize).source_location return nil
[17:31:08] Vardan: that means it is not take my local gem changes?
[17:31:10] jhass: that usually means it's written in C, no?
[17:31:23] jhass: get pry and do $ Test::Document
[17:31:40] Vardan: ok, thanks
[17:31:41] jhass: in a pry loaded inside your app with binding.pry
[17:32:13] dfockler: baweaver: haha I looked in the Gemfile for it and was like 'wahhhh'
[17:32:40] baweaver: People just assume it's a good thing
[17:32:54] bhorn1: has joined #ruby
[17:33:00] baweaver: and include it without looking into it
[17:33:04] bhorn1: Is there a way to call the $USER variable in a ruby file?
[17:33:17] Xeago: has joined #ruby
[17:33:40] baweaver: http://ruby-doc.org/core-2.2.0/ENV.html
[17:34:23] bhorn1: Thank you!
[17:34:47] TvL2386: has joined #ruby
[17:34:50] freerobby: has joined #ruby
[17:35:00] blaines: has joined #ruby
[17:35:58] jmhmccr: has joined #ruby
[17:37:06] blaines_: has joined #ruby
[17:38:25] RobertBirnie: has joined #ruby
[17:38:43] commondream: has joined #ruby
[17:38:43] s2013: has joined #ruby
[17:39:26] Vardan: ok, so the problem is that my Document class include Base module, when I'm trying to require my gem in pry it give me this: TypeError: wrong argument type Class (expected Module)
[17:39:34] Vardan: but Base is module
[17:40:07] tfitts: has joined #ruby
[17:40:34] ruboto: We can't help you without your code, please post it to https://gist.github.com
[17:42:06] tcrypt: has joined #ruby
[17:42:15] Vardan: now works :) thank you jhass
[17:42:30] jhass: yw, whatever I did :P
[17:42:48] allomov: has joined #ruby
[17:42:51] sarkyniin: has joined #ruby
[17:42:57] RegulationD: has joined #ruby
[17:43:22] jphenow: has joined #ruby
[17:43:54] Rubie: has joined #ruby
[17:44:01] RobertBirnie: has joined #ruby
[17:44:19] quimrstorres: has joined #ruby
[17:46:12] [H]unt3r: has joined #ruby
[17:46:31] allomov_: has joined #ruby
[17:48:43] Yiota: has joined #ruby
[17:49:50] peter_paule: has joined #ruby
[17:50:52] whoami: has joined #ruby
[17:52:06] TvL2386: is a ruby Hash thread safe?
[17:52:23] AndroidLoverInSF: has joined #ruby
[17:52:24] jaycee: has joined #ruby
[17:52:52] s2013: has joined #ruby
[17:54:00] d5sx43: has joined #ruby
[17:54:27] DroidBur_: has joined #ruby
[17:54:56] DroidBur_: has joined #ruby
[17:55:03] TvL2386: my guess would be not
[17:55:07] nietzschette: I believe it is
[17:55:23] nietzschette: as long as the hash is within scope
[17:55:26] simplyianm: has joined #ruby
[17:55:59] jhass: TvL2386: there are many aspects to thread safety, though in MRI you won't be able to corrupt the actual datastructure with concurrent access without locking
[17:56:17] kirun: has joined #ruby
[17:56:20] jhass: that doesn't mean all your uses of Hash are thread safe, just that you won't crash MRI
[17:56:37] jhass: or get corrupted values
[17:56:59] phat4life: you might be alble to make Hash thread safe is you used a mutex
[17:57:10] nietzschette: would that be only for hashes or arrays or any object as well?
[17:57:29] jhass: any datastructure provided with Ruby in MRI
[17:57:31] Rubie: has joined #ruby
[17:57:52] Thr3d: has joined #ruby
[17:57:56] jhass: note that on jruby and rubinius that's already a different story
[17:59:08] TvL2386: hmmmmmmmmmmmmmm
[17:59:09] jhass: what I mean by corrupting the datastructure is that things like that size says there are 5 items while only 4 are actually available yet
[17:59:24] mrsolo: has joined #ruby
[17:59:46] RobertBirnie: has joined #ruby
[18:00:25] jhass: however it still can change between you asking its size and then doing something based on the result of that
[18:00:49] bgmarx_: has joined #ruby
[18:01:51] havenwood: TvL2386: Here's an example of taking advantage of MRI's GVL for thread-safe Hash but falling back on a locking version for other implementations: https://github.com/jeremyevans/roda/blob/master/lib/roda.rb#L12-L39
[18:01:53] awer: has joined #ruby
[18:02:35] jhass: yes, ^ highlights where corruption could occur in other implementations and what level of thread safety MRI provides you
[18:03:19] jhass: the concurrent setting of values in the hash or even concurrent access and setting of the same key can not corrupt the hash in MRI, while it can in other implementations
[18:03:24] TvL2386: here's my gist guys: https://gist.github.com/TvL2386/6c94504b4890dc502a1c
[18:03:43] jhass: TvL2386: could you edit it and turn on syntax highlighting?
[18:03:46] TvL2386: sometimes it prints errors, sometimes it goes well
[18:03:49] TvL2386: jhass, will do
[18:03:51] RobertBi_: has joined #ruby
[18:04:04] TvL2386: done! excuse me
[18:04:27] momomomomo: has joined #ruby
[18:04:29] mcclurmc: has joined #ruby
[18:05:27] jhass: "errors"?
[18:05:28] jphenow: has joined #ruby
[18:05:54] TvL2386: it prints the rescued exception
[18:06:02] jhass: ah, okay I see a potential issue
[18:06:06] shadeslayer: has joined #ruby
[18:06:07] TvL2386: Exception Waited 30 sec occurred in q.timed_pop() thread
[18:06:09] awer: Hi, I have access to an ftp server of whcih has a set of files i want to pull back to my pc. #I woudl like to organise the files into their respective directories. Each file looks like this.. 2015-06-09-16.08-1006-1012-1433862516.6868.WAV i would like to mv each file to the correct directory based on the 6th column. in this case "1006" but only the "6th" column. I have tried to with .include? and with the foll
[18:06:15] awer: owing example but havent quite managed to get it to work. Can anyone suggest any thing?
[18:06:18] awer: http://paste.ee/p/9esqe
[18:07:01] TvL2386: jhass, I ran this a lot of times with more threads and iterations with only using a TimedQueue, but when I put it in the Hash, sometimes the timed_pop() will raise a Timeout::Error
[18:07:24] jhass: TvL2386: one thing I could imagine is the lazy initialization of the hash, like the pusher initiating the initialization, then it gets interrupted after creating the TimedQueue but before the assignment
[18:08:07] chussenot: has joined #ruby
[18:08:12] jhass: TvL2386: the poller triggers it again, gets interrupted at the same point, the pusher sets it value, then pushes, then the pollers initialization continues and overwrites the value
[18:08:22] Mon_Ouie: has joined #ruby
[18:08:57] tfitts: has joined #ruby
[18:09:04] TvL2386: jhass, yeah that's kinda what I think as well
[18:09:06] RobertBirnie: has joined #ruby
[18:09:36] andikr: has joined #ruby
[18:09:38] jhass: TvL2386: simple to try out, don't make it lazy
[18:10:14] sharpmachine: has joined #ruby
[18:10:32] lkba: has joined #ruby
[18:10:35] jhass: TvL2386: fully initialize the hash prior starting the first thread
[18:10:46] droidburgundy: has joined #ruby
[18:10:54] TvL2386: jhass, I would like that, but I don't have control over the keys of the hash in my design
[18:11:02] TvL2386: jhass, of course the design can be changed ;-)
[18:11:04] RobertBi_: has joined #ruby
[18:11:07] jphenow: has joined #ruby
[18:11:12] hahuang65: has joined #ruby
[18:11:23] x44x45x41x4E: has joined #ruby
[18:11:41] jhass: well, or you put a common lock over access & initialization
[18:12:23] jhass: queue = mutex.synchronize { results[x.to_s] }.pop/push
[18:12:27] TvL2386: i'm now testing by running `iterations.times { |x| results[x] }` just after the Hash declaration
[18:12:52] TvL2386: jhass, yeah but if I lock it, the other thread can't push right
[18:13:00] TvL2386: so it's in a deadlock :-)
[18:13:19] jhass: look, I only put the lock over fetching it from the hash (which also includes initialization in your example)
[18:13:31] symm-: has joined #ruby
[18:13:47] jhass: calling push/pop on the fetched value is outside the lock
[18:14:10] TvL2386: jhass, ah I see!
[18:14:13] phat4life: TvL2386: do you know about monitors?
[18:14:17] jhass: and since neither fetching nor initializing it will ever block you can't deadlock
[18:15:01] jhass: TvL2386: keep in mind that the lock version will be a lot slower than initializing the hash upfront
[18:15:09] nobitanobi: has joined #ruby
[18:16:02] JoshL: has joined #ruby
[18:16:05] jackjackdripper: has joined #ruby
[18:16:24] qwertme: has joined #ruby
[18:16:27] TvL2386: yeah thx jhass, I'm thinking of letting go of this. Having a queue per key was an interesting feature, but not a requirement
[18:16:48] TvL2386: and I'm thinking of simply letting go of the hash completely using a single queue
[18:16:49] dcarmich: has joined #ruby
[18:17:06] slawrence00: has joined #ruby
[18:17:18] TvL2386: no responsibility for deleting the hash key either to prevent memory leaks
[18:18:46] yfeldblum: has joined #ruby
[18:19:31] zudochkin: has joined #ruby
[18:21:00] thiagovsk: has joined #ruby
[18:21:12] rjno: has joined #ruby
[18:21:49] thiagovsk: hey guys how can i ident to dont exceed 80 columns
[18:21:54] capncrunch4me: has left #ruby: ()
[18:21:59] thiagovsk: like expect(test_app('foo', 'example.com', '/foo/bar').instance_id).to eq("example_com_at_foo_bar")
[18:22:23] undeadaedra: It's up to you to know where to cut
[18:22:36] undeadaedra: I usually try to cut before the .to personally
[18:22:41] beneggett: has joined #ruby
[18:23:03] thiagovsk: like this ?
[18:23:07] thiagovsk: expect(test_app( 'foo', 'example.com', '').instance_id).to
[18:23:07] thiagovsk: eq("example_com")
[18:23:09] segfalt_: has joined #ruby
[18:23:35] paulcsmith: has joined #ruby
[18:23:57] undeadaedra: try if it works
[18:24:03] undeadaedra: I'd have put the .to below
[18:24:09] undeadaedra: so you have two nicely parts
[18:24:10] dionysus69: has joined #ruby
[18:24:22] undeadaedra: line 1: value tu test, line2: expectation
[18:24:35] havenwood: awer: Ruby has Net::FTP in it's standard library: http://ruby-doc.org/stdlib/libdoc/net/ftp/rdoc/Net/FTP.html
[18:25:08] phat4life: thiagovsk: https://gist.github.com/ajbeach2/b95ef922925ef90bcbff
[18:26:49] simplyianm: has joined #ruby
[18:27:01] mallu: has joined #ruby
[18:27:32] mallu: Anyone using AWS ruby sdk? I am trying to figure out how to get instance ID attached to an ELB
[18:27:50] phat4life: mallu: which version?
[18:28:10] phat4life: (i have used both)
[18:28:27] crdpink2: has joined #ruby
[18:28:30] phat4life: they changed some stuff, some of the sdk is less obvious
[18:28:36] wildroman2: has joined #ruby
[18:29:07] kenichi: has joined #ruby
[18:29:31] mallu: phat4life: I can't for my life figure out how to get just then instance is
[18:29:32] slackbotgz: has joined #ruby
[18:29:45] phat4life: it was easy in the old version of the sdk
[18:31:24] Yiota: has joined #ruby
[18:31:45] TvL2386: jhass, thank you very much for helping me out!
[18:31:54] toretore: has joined #ruby
[18:31:57] baweaver: mallu: You can also ask on their gitter channel
[18:31:58] Senjai: mallu: Cjecl pit pp[s
[18:31:59] freerobby: has joined #ruby
[18:32:04] Senjai: mallu: ... check out oops
[18:32:11] zudochkin: has joined #ruby
[18:32:16] phat4life: the new version of the sdk is terrible
[18:32:30] Senjai: mallu: https://github.com/freerunningtech/oops should have everything you need.
[18:32:33] baweaver: https://gitter.im/aws/aws-sdk-ruby - Trevor Rowe tends to be fairly active
[18:32:36] Senjai: In terms of finding things out about AWS
[18:33:02] baweaver: phat4life: It does distinctly smell like they let a Java programmer have too much fun there.
[18:33:05] Senjai: wrong one
[18:33:14] Senjai: mallu: https://github.com/freerunningtech/omc
[18:33:18] Senjai: ^^ That's the one
[18:33:49] baweaver: I'm actually working with them to get more documentation up
[18:33:59] RegulationD: has joined #ruby
[18:34:00] baweaver: mainly because I'm a tinge sick of waiting for it, I just decided to write it.
[18:34:15] Musashi007: has joined #ruby
[18:34:33] BanzaiJoe: baweaver I was talking to a googler and he said you can tell the ones that come from JAVA because of the "constant premature abstraction", I tried to keep a straight face
[18:34:46] Senjai: BanzaiJoe: lolol
[18:34:55] Senjai: BanzaiJoe: TBH, I really want an abstract class thing in ruby
[18:34:59] Senjai: That forces methods to be templates.
[18:35:08] atomical: has joined #ruby
[18:35:08] baweaver: raise exceptions
[18:35:15] Senjai: But I still want an abstract class
[18:35:25] Senjai: To define a clear and easy interface, and yes I know you can use modules
[18:35:28] revath: has joined #ruby
[18:35:36] baweaver: Then there's no problem
[18:35:47] phat4life: mallu: http://docs.aws.amazon.com/sdkforruby/api/Aws/ElasticLoadBalancing/Client.html#register_instances_with_load_balancer-instance_method
[18:35:49] Senjai: I still like inheriting from an AbstractClass
[18:35:57] Senjai: But thats the only thing I want
[18:36:05] fredsir: has joined #ruby
[18:36:08] baweaver: don't make ruby something it's not
[18:36:13] quimrstorres: has joined #ruby
[18:36:22] Senjai: lol, that's a loaded statement. That's like saying don't add any feature ever
[18:36:37] phat4life: Senjai: its better to define your abstract methods and raise "method no implemented" in the parent class
[18:36:37] mallu: Senjai: what is https://github.com/freerunningtech/omc
[18:36:38] chinmay_dd: has joined #ruby
[18:36:55] phat4life: Senjai: to force your subclasses to implementat the parent classes methods
[18:36:56] Senjai: phat4life: I know.. but abstract classes cannot be initialized.
[18:37:18] Senjai: phat4life: We're not arguing this, both baweaver and I know both understand that
[18:40:11] Channel6: has joined #ruby
[18:40:22] fabrice31: has joined #ruby
[18:40:38] pragmatism: has joined #ruby
[18:41:37] snockerton: has joined #ruby
[18:42:22] commondream: has joined #ruby
[18:42:37] commondream: has joined #ruby
[18:45:01] bronson: has joined #ruby
[18:48:41] gkra_: has joined #ruby
[18:48:44] gkra_: has joined #ruby
[18:49:03] kies: has joined #ruby
[18:49:27] j4cknewt: has joined #ruby
[18:49:43] konieczkow: has joined #ruby
[18:49:51] bgmarx_: has joined #ruby
[18:51:20] lala: has joined #ruby
[18:52:29] blackmesa: has joined #ruby
[18:52:55] Oog: has joined #ruby
[18:53:13] Oog: is there a way to spread regexes /.../ across multiple lines? like with strings a = "a" \ "b"
[18:53:20] Oog: ive got a really long regex i want to split up
[18:54:11] slawrence00: has joined #ruby
[18:56:06] jhass: press enter
[18:56:50] hakunin: has joined #ruby
[18:57:04] jhass: Oog: and add /x
[18:57:24] zotherstupidguy: has joined #ruby
[18:57:38] Oog: hmm i dont want to ignore all space though just new lines
[18:58:25] blackmesa: has joined #ruby
[18:58:40] hal_9000: well, /x only ignores extraneous whitespace
[18:58:54] jhass: the other approach is to use /#{interpolation}/
[18:59:08] Blizzy: has joined #ruby
[18:59:20] elektronaut: you can also pass it as a string to Regexp.new, although that's not really pretty
[18:59:25] ndhamecom: has joined #ruby
[18:59:37] Oog: hal_9000: what is extraneous
[19:00:06] hal_9000: for exampl, a space preceding an asterisk on??? tbe ignored
[19:00:11] lkba_: has joined #ruby
[19:00:18] hal_9000: *won???t be
[19:01:09] piet: has joined #ruby
[19:01:22] davedev24_: has joined #ruby
[19:02:03] ogpastal_: has joined #ruby
[19:02:37] nobitanobi: has joined #ruby
[19:02:50] bosma_: has joined #ruby
[19:03:08] wildroman2: has joined #ruby
[19:03:19] shafox: has joined #ruby
[19:03:37] Oog: a =~ 'a hi hello' no match
[19:03:43] quimrstorres: has joined #ruby
[19:03:44] Oog: a=~'ahihello' matches
[19:03:51] jphenow: has joined #ruby
[19:04:33] momomomomo: has joined #ruby
[19:05:07] n008f4g_: has joined #ruby
[19:05:19] commondream: has joined #ruby
[19:08:08] A124: has joined #ruby
[19:08:54] tejasmanohar: has joined #ruby
[19:09:31] shadoi: has joined #ruby
[19:09:56] DexterLB: has joined #ruby
[19:10:23] bmalum: has joined #ruby
[19:11:00] simplyianm: has joined #ruby
[19:11:27] tfitts: has joined #ruby
[19:16:26] davedev24_: has joined #ruby
[19:17:42] diegoviola: what editor do you guys use?
[19:17:55] spider-mario: has joined #ruby
[19:18:16] lkba: has joined #ruby
[19:18:56] commondream: has joined #ruby
[19:19:13] diegoviola: wow I'm surprised to find more vim users here
[19:19:22] diegoviola: I find most people are using sublime text these days
[19:19:51] shevy: jhass for instance
[19:20:00] diegoviola: I feel like an old fart using vim at work, everyone here uses sublime
[19:20:00] shevy: I forgot what apeiros uses
[19:20:07] shevy: yeah you are an old fart
[19:20:12] shevy: you can't find another editor for instance
[19:20:35] shevy: havenwood uses some strange editor too
[19:20:35] al2o3-cr: i've been trying out atom which is pretty cool
[19:20:43] elektronaut: nothing wrong with being an old fart
[19:20:45] shevy: what is much more surprising is that there are not many textmate users here
[19:20:50] shevy: I thought everyone uses it on OSX
[19:21:26] bougyman: atom is a beast.
[19:21:33] bougyman: i couldn't believe how big that package was.
[19:21:35] shevy: there you go diegok
[19:21:40] shevy: diegoviola
[19:21:51] elektronaut: textmate 2 was vaporware for so long, i guess most people moved on to sublime
[19:21:58] shevy: https://atom.io/
[19:22:00] al2o3-cr: bougyman: it is isn't it
[19:22:19] bougyman: packaging it was a pita, too.
[19:22:47] shevy: bougyman what editor do you use actually?
[19:23:03] bougyman: -rw-r--r-- 1 reposync reposync 52M Jun 18 09:29 atom-0.210.0_1.i686.xbps
[19:23:12] shevy: that is even bigger than emacs
[19:23:24] wnd: that must be a mistake
[19:23:31] shevy: emacs-24.5.tar.xz 38M
[19:23:35] bougyman: -rw-r--r-- 1 reposync reposync 1004K Jun 17 13:03 vim-huge-python3-7.4.738_1.x86_64.xbps
[19:23:41] bougyman: that's as big as we could bloat a vim
[19:23:47] bougyman: it's got Everything
[19:23:57] shevy: lacks a good text editor
[19:24:01] bluOxigen: has joined #ruby
[19:24:10] shevy: the vim keybindings are ok
[19:24:20] nobitanobi: has joined #ruby
[19:24:22] shevy: the extension syntax is awful
[19:24:48] postmodern: has joined #ruby
[19:24:53] shevy: endfunction
[19:24:54] bougyman: neovim gives you weak-kneed folk easy extension syntax.
[19:25:14] bougyman: vimscript is not pretty, that's for certain.
[19:25:25] kies: has joined #ruby
[19:25:39] bougyman: but once you get used to it, it's not any better.
[19:25:54] crankharder: how is this possible: stupid_string.to_s.force_encoding("UTF-8").split('\n') -> ArgumentError: invalid byte sequence in UTF-8
[19:26:19] miah: my coworker wrote this; http://learnvimscriptthehardway.stevelosh.com/
[19:26:26] elektronaut: what encoding is stupid_string to begin with?
[19:26:33] Ruinside: has joined #ruby
[19:26:46] shevy: crankharder I know that it hates german umlauts when you begin with non-UTF encodings
[19:26:49] Ruinside: Hello room:)
[19:28:54] crankharder: shevy: ya, but it shouldn't matter at that point :/
[19:29:04] stamina: has joined #ruby
[19:29:14] s2013: what are some use cases for linked lists in ruby
[19:29:29] shevy: what is a linked list
[19:29:31] shevy: is that a Hash?
[19:29:55] s2013: its basically a list of items where one points to the next
[19:30:06] s2013: kinda like 1 -> 2 -> 5 -> nil
[19:30:36] s2013: but i dont think ruby supports them but you can build them.. im just trying to go back to my cs roots for a bit.. a lot of these i forgot :\
[19:30:38] havenwood: shevy: Read about how Ruby's Hash is a doubly-circular linked list: https://www.igvita.com/2009/02/04/ruby-19-internals-ordered-hash/
[19:31:15] troulouliou_dev: has joined #ruby
[19:31:25] havenwood: s2013: Linked list came up recently in RubyGems: https://github.com/rubygems/rubygems/pull/1188
[19:31:27] Senjai: >> a = [1,2,3].each; puts a.next; puts a.next;
[19:31:28] ruboto: Senjai # => 1 ...check link for more (https://eval.in/384581)
[19:31:36] shevy: like aliases in bash that can point to other aliases?
[19:31:55] Senjai: Essentially any time you need to get an element in a list, and then get the next element..
[19:31:57] Senjai: Which is very rare
[19:32:05] Senjai: because you usually have a reference to the original list
[19:32:14] Senjai: And either have an enumerator, or the index of that element originally
[19:32:16] crankharder: this seems like it should not be true: s = "\xE6" ; s.force_encoding('UTF-8') == s => true
[19:33:00] Senjai: crankharder: yes it does
[19:33:07] elektronaut: linked lists are beneficial when you need constant time inserts anywhere
[19:33:07] Senjai: >> "\xE6".encoding
[19:33:08] ruboto: Senjai # => #<Encoding:UTF-8> (https://eval.in/384582)
[19:33:11] Senjai: crankharder: ^
[19:33:23] crankharder: why won't it split then?
[19:33:31] elektronaut: and don't need random access
[19:33:39] crankharder: irb(main):039:0> "\xE6".split("\n")
[19:33:39] crankharder: ArgumentError: invalid byte sequence in UTF-8
[19:33:55] Senjai: \xE6 is treated as \xE6
[19:33:55] crankharder: some stupid character in a CSV, so the doc can't be loaded
[19:33:57] Senjai: as a string
[19:34:05] Senjai: parse them out
[19:34:34] Senjai: "\xE6".split("\xE6")
[19:34:37] ramfjord_: has joined #ruby
[19:34:38] Senjai: >> "\xE6".split("\xE6")
[19:34:39] ruboto: Senjai # => invalid multibyte character: /\xE6/ (RegexpError) ...check link for more (https://eval.in/384584)
[19:34:40] kahuna_: has joined #ruby
[19:34:46] m8: has joined #ruby
[19:35:02] Senjai: when in doubt, just substitute thme all for \n. Someone else might have a better solution
[19:35:17] Senjai: I dont pretend to be good at encodings
[19:35:20] crankharder: that works if it's not some character in the middle of a word
[19:35:22] Senjai: I would just use sed
[19:35:23] crankharder: neither do i :)
[19:38:01] neanderslob_: has joined #ruby
[19:39:03] shevy: let's be all honest
[19:39:08] shevy: encodings are boring and suck!
[19:39:56] Senjai: I know a guy who does mailserver related things. He's in encoding land all day
[19:39:57] cabreraM516: has joined #ruby
[19:40:47] Senjai: He doesnt mind it
[19:40:54] shevy: a year ago I had a coworker who was using some perl client to read his email, in ncurses
[19:40:56] Senjai: Encodings are crappy until you understand everything perfectly
[19:40:58] shevy: he was like lightning fast
[19:41:11] baweaver: has joined #ruby
[19:41:26] shevy: is he writing in an exotic language like cyrilic
[19:41:27] momomomomo: has joined #ruby
[19:41:47] balazs: has joined #ruby
[19:43:12] T3: has joined #ruby
[19:44:24] cabreraM516: has joined #ruby
[19:46:39] Frem: has joined #ruby
[19:46:41] nietzschette: has joined #ruby
[19:49:32] haxrbyte_: has joined #ruby
[19:50:00] yqt: has joined #ruby
[19:50:41] hcnewsom: has joined #ruby
[19:51:02] Me1k0r: has joined #ruby
[19:52:58] AndroidLoverInSF: has joined #ruby
[19:53:53] casadei: has joined #ruby
[19:54:16] avalon: has joined #ruby
[19:55:46] dgutierrez1287: has joined #ruby
[19:55:53] MatthewsFace: has joined #ruby
[19:56:05] workmad3: has joined #ruby
[19:58:41] vdamewood: has joined #ruby
[20:00:59] last_staff: has joined #ruby
[20:02:15] dopie: has joined #ruby
[20:02:37] k3asd`: has joined #ruby
[20:02:57] kadoppe: has joined #ruby
[20:03:45] AndroidLoverInSF: has joined #ruby
[20:03:47] rbennacer: has joined #ruby
[20:03:48] icarus: has joined #ruby
[20:04:51] hashpuppy: has joined #ruby
[20:05:41] peter_paule: has joined #ruby
[20:05:49] hashpuppy: has left #ruby: ()
[20:06:43] jphenow: has joined #ruby
[20:07:57] rbennacer: has joined #ruby
[20:08:08] ebalsumgo: has joined #ruby
[20:08:09] yaw: has joined #ruby
[20:08:55] ebalsumgo: i have an array, each element is a string "somename:somedata" i am trying to iterate over all the elemts, then split the string into two variables
[20:09:01] ebalsumgo: all of this in an ERB template
[20:09:04] Igorshp: has joined #ruby
[20:09:07] yaw: has left #ruby: ()
[20:09:27] blackmesa: has joined #ruby
[20:09:57] ebalsumgo: and i keep going in circles it seems??? this is the code i have now http://pastebin.com/UXA6iYcC and it ends up producing : instead of the actual data i thought it should
[20:09:57] ruboto: ebalsumgo, we in #ruby do not like pastebin.com, I reposted your paste to gist for you: https://gist.github.com/d646fbde0740a263ca32
[20:09:58] ruboto: pastebin.com loads slowly for most, has ads which are distracting and has terrible formatting.
[20:11:08] Mon_Ouie: >> "foo:bar".rpartition(":")
[20:11:10] ruboto: Mon_Ouie # => ["foo", ":", "bar"] (https://eval.in/384587)
[20:11:22] tejasmanohar: has joined #ruby
[20:11:36] Mon_Ouie: ebalsumgo: ^ see how the second element is the ':', the first one is what was before it and the second one is what is after that
[20:11:50] wildroman2: has joined #ruby
[20:12:04] pietr0: has joined #ruby
[20:12:13] simplyianm: dalli needs to stop dilly dalli-ing
[20:12:20] simplyianm: high performance my ass
[20:12:23] ebalsumgo: well that seems??? weird
[20:12:40] ebalsumgo: i am sure it has a reasoning, but ok, let me fix up my code
[20:12:50] Mon_Ouie: What did you think it did?
[20:13:16] Mon_Ouie: By the way your condition is wrong too
[20:13:36] ebalsumgo: oh i am sure it is all sorts of wrong???
[20:13:41] ebalsumgo: i am google writing these 6 lines
[20:13:46] Mon_Ouie: 'if @foo = bar' < assigns the the value of bar to @foo
[20:14:18] ebalsumgo: one less = than needed
[20:14:52] elektronaut: you might want .split(":") instead if you don't care about the :
[20:14:54] ebalsumgo: how do i go about not having the : be stored somehwere?
[20:14:57] s2013: has joined #ruby
[20:15:00] ebalsumgo: yeah i dont want the :
[20:15:08] ebalsumgo: i just want the values assigned to the varibales
[20:15:34] kb3ien: has joined #ruby
[20:15:34] kb3ien: has left #ruby: ()
[20:15:34] kb3ien: has joined #ruby
[20:15:45] volty: has joined #ruby
[20:16:05] ebalsumgo: can i just do name,guid,district = gear_to_idle.split(':')?
[20:16:14] ogpastaling: has joined #ruby
[20:16:15] ebalsumgo: seems like everything i keep reading is saying not so much
[20:16:26] bgmarx: has joined #ruby
[20:16:42] phat4life: ebalsumgo: yes!
[20:16:47] rbennacer: has joined #ruby
[20:16:51] Mon_Ouie: What's gear_to_idle? You were saying that it was something like "name:data"
[20:17:03] phat4life: >> a,b = ["foo","bar"]; puts a; puts b
[20:17:04] ruboto: phat4life # => foo ...check link for more (https://eval.in/384594)
[20:17:44] ebalsumgo: so gear_to_idle should contain the current item of the array
[20:17:50] Mon_Ouie: Anyway split(':') returns an array. When you assign an array to a list of comma separated values, it extracts the contents of the array and puts each element in the corresponding variable, as shown above ^
[20:18:34] Contigi: has joined #ruby
[20:18:52] ebalsumgo: https://gist.github.com/anonymous/8bc3e776b622edc8a3cd so presumably this at the end should print out guid value
[20:19:06] ebalsumgo: as split out of the array item (which is what gear_to_idle should contain)
[20:19:48] ebalsumgo: the input array looks something like this: ['boris1:53ed267142d9f5d88c000017:small','boris2:543d70aad5c665103000002a:small','boris2:53f2c919d5c665d14b00005c:small','boris4:546f866cd5c665f621000428:small']
[20:21:01] ebalsumgo: guess gonna test it and see
[20:21:04] k3asd`: has joined #ruby
[20:21:13] jbisnett: does the ruby interpreter use parallel execution?
[20:22:41] bohallor: has joined #ruby
[20:23:01] duderonomy: has joined #ruby
[20:23:21] ebalsumgo: well that almost worked
[20:23:27] ebalsumgo: just didnt end up with a \N
[20:23:42] ebalsumgo: ah derp??? i am no longer joining
[20:24:39] dopie: has joined #ruby
[20:24:51] dfockler: has joined #ruby
[20:25:10] baweaver: has joined #ruby
[20:26:49] ebalsumgo: well??? ok how do i add just a newline in erb lol
[20:26:50] havenwood: jbisnett: The reference implementation has a GVL that prevents parallel execution of some things. You can run multiple Ruby processes for parallel execution or use an implementation like JRuby or Rubinius that has no GVL.
[20:27:24] Notte: has joined #ruby
[20:27:43] atmosx: havenwood: what does GVL stand for?
[20:27:49] pkrnj: has joined #ruby
[20:27:50] havenwood: atmosx: global vm lock
[20:27:56] phat4life: i thought it was GIL, global interpreter lock
[20:28:01] atmosx: thanks havenwood
[20:28:13] phat4life: what is the difference between GIL and GVL
[20:28:15] havenwood: phat4life: it's actually a vm now, so vm lock
[20:28:23] havenwood: phat4life: whether it's an interpreter or a vm
[20:28:27] atmosx: phat4life: GIL is old, GVL is new
[20:28:45] havenwood: phat4life: koichi-san wrote the vm
[20:28:48] lthomas: has joined #ruby
[20:29:16] fabrice31: has joined #ruby
[20:29:41] davedev24: has joined #ruby
[20:29:53] icebourg: has joined #ruby
[20:30:44] atmosx: https://engineering.heroku.com/blogs/2015-02-04-incremental-gc
[20:30:54] atmosx: he also wrote that blogpost
[20:31:16] dseitz: has joined #ruby
[20:31:23] ebalsumgo: has left #ruby: ()
[20:32:31] momomomomo: has joined #ruby
[20:33:40] shevy: everything must be faster
[20:33:49] casadei: has joined #ruby
[20:33:50] shevy: faster tea, faster movie, faster life, faster death
[20:33:59] Xoro: has joined #ruby
[20:34:00] jgpawletko: has joined #ruby
[20:35:10] momomomomo_: has joined #ruby
[20:35:37] atmosx: also relevant to the conversation: Incremental GC algorithm splits a GC execution process into several fine-grained processes and interleaves GC processes and Ruby processes.
[20:35:53] rbennacer: has joined #ruby
[20:37:14] atmosx: shevy: no, fasting is said to decreease the release of IGF-I hormone, which induces aging.. so you age slower :-P
[20:37:18] atmosx: shevy: http://news.usc.edu/82959/diet-that-mimics-fasting-appears-to-slow-aging/
[20:37:44] commondream: has joined #ruby
[20:37:50] startupality: has joined #ruby
[20:38:54] dopie: has joined #ruby
[20:40:37] felixjet: has joined #ruby
[20:42:06] Yiota: has joined #ruby
[20:42:25] phutchins: has joined #ruby
[20:44:15] zendrix: has joined #ruby
[20:44:55] eggoez: has joined #ruby
[20:45:39] k3asd`: has joined #ruby
[20:45:52] Beoran: has joined #ruby
[20:46:55] bruno-: has joined #ruby
[20:47:09] benlieb: has joined #ruby
[20:47:12] kb3ien: trying to copy an rb file from /usr/local/lib/ruby/gems/2.0.0/gems/ebsco-discovery-service-api-1.0.4/lib/ebsco-discovery-service-api.rb to a local copy, using path in my Gemfile, but its not working, advice ?
[20:48:16] sharpmachine: has joined #ruby
[20:48:48] __butch__: has joined #ruby
[20:49:59] rodfersou: has joined #ruby
[20:50:26] rjno: has joined #ruby
[20:50:26] swgillespie: has joined #ruby
[20:50:34] atmosx: kb3ien: show the code on github
[20:50:44] yfeldblum: has joined #ruby
[20:50:47] shum: has joined #ruby
[20:50:48] Exuma: has joined #ruby
[20:50:56] edwinvdgraaf: has joined #ruby
[20:51:11] atmosx: kb3ien: also show he error... might be the path or permissions, maybe both. Why would you wanna do that is beyond me too but anyway.
[20:51:43] kb3ien: The default code is unwilling to abide by HTTP_PROXY ?
[20:52:01] mdih: has joined #ruby
[20:52:18] beneggett: has joined #ruby
[20:52:45] atmosx: that's your error?!
[20:52:47] weszlem: has joined #ruby
[20:53:25] Xoro: has joined #ruby
[20:53:28] sdothum: has joined #ruby
[20:53:52] davedev24_: has joined #ruby
[20:53:54] kb3ien: The error is "uninitialized constant Blacklight::ArticlesHelperBehavior::EDSApi" in <% eds_connect %> in line 20 of https://github.com/ebsco/blacklight_with_eds/blob/master/app/views/articles/index.html.erb
[20:54:03] aryaching: has joined #ruby
[20:54:10] kb3ien: Which is exactly what's defined in the file I copied.
[20:54:23] atmosx: shouldn't that suppose to be <%= eds_connect %>
[20:54:47] workmad3: has joined #ruby
[20:55:32] mdw: has joined #ruby
[20:55:47] kb3ien: My copy is world readable all the way out to / .
[20:56:01] kb3ien: It doesn't output it just starts some API handshaking.
[20:56:30] hakunin_: has joined #ruby
[20:56:42] kb3ien: clearly moving the file was what broke it.
[20:57:21] noethics: is there some type of instrumentation library that's not for rails that would let me hook a method
[21:00:00] atmosx: kb3ien: your error is here: https://github.com/ebsco/blacklight_with_eds/blob/master/app/helpers/blacklight/articles_helper_behavior.rb#L73
[21:00:12] volty: is there a ruby parser that preserves formatting information ?
[21:00:22] atmosx: kb3ien: you sur eyou're requiring the correct set of libraries in that file?
[21:00:49] atmosx: I don't see something like 'ruby_eds'
[21:01:06] volty: s/information//
[21:01:16] kb3ien: Well it works FINE until I copy the file into a local dir, and make a some change. How should I try to do that?
[21:02:03] atmosx: kb3ien: what file? what are you trying to do? Ruby is an interpreted language, if your code doesn't test EDSApi somehow it will fail when it's called...
[21:02:25] Tamae: has joined #ruby
[21:03:03] kb3ien: Well I just trying to make changes in the file "/usr/local/lib/ruby/gems/2.0.0/gems/ebsco-discovery-service-api-1.0.4/lib/ebsco-discovery-service-api.rb" for one app only.
[21:03:08] chussenot: has joined #ruby
[21:03:11] simplyianm: has joined #ruby
[21:03:18] kb3ien: I don't want to make changes that affect other apps.
[21:03:58] micmus: has joined #ruby
[21:04:00] adac: has joined #ruby
[21:04:00] atmosx: kb3ien: I don't know the design of this gem/app... You're trying to make a change in the gem library that will affect only one application but not others?
[21:04:03] granthatcher: has joined #ruby
[21:04:16] bungoman: has joined #ruby
[21:04:18] adac: Is it possible to run an each 'loop' in parallel?
[21:04:39] granthatcher: has joined #ruby
[21:04:51] Stany: has joined #ruby
[21:05:24] razrunelord: has joined #ruby
[21:05:28] tejasmanohar: has left #ruby: ("WeeChat 1.1.1")
[21:05:31] eggoez: has joined #ruby
[21:05:35] volty: of course ??? with threads
[21:05:51] FernandoBasso: has joined #ruby
[21:05:53] atmosx: adac: threads? file.each {|f| r = Thread.new do; {whatever};end;end
[21:05:54] lkba_: has joined #ruby
[21:06:11] kb3ien: atmosx that sounds about right.
[21:06:12] adac: volty, atmosx thanks!
[21:06:43] atmosx: kb3ien: I see.
[21:07:13] volty: adac: but, sorry, what are you expected to gain doing parallel loops on distinct sources ?
[21:07:27] volty: s/expected/expecting/
[21:07:33] _blizzy_: has joined #ruby
[21:07:52] kb3ien: Net::HTTP won't honour http_proxy i'm trying recode that file.
[21:08:18] adac: volty, not so sure, just playing around a bit. Want to fetch things in parallel from the web
[21:08:19] kb3ien: well, won't honour it RELIABLY. sometimes it did, sometimes it didn't.
[21:08:47] atmosx: kb3ien: then write an exception and log the errors?
[21:09:05] podman: has joined #ruby
[21:09:07] kb3ien: not sure what you are saying.
[21:09:11] atmosx: adac: fiber = concurrent, threads = parallel
[21:09:54] icebourg_: has joined #ruby
[21:10:05] atmosx: kb3ien: I think it would be a good idea to find out the reasons Net:HTTP sometimes fails. Then you can write some code to handle the failure.
[21:10:07] adac: atmosx, thanks I will have a lokk at both!
[21:11:21] Igorshp: has joined #ruby
[21:11:24] kb3ien: it works, it just bypasses the proxy.
[21:11:28] j4cknewt: has joined #ruby
[21:12:04] kb3ien: so i'm getting cache misses that cause misguided anti-ddos issues.
[21:12:28] volty: atmosx: fiber = concurrent? in which sense?
[21:13:08] atmosx: volty: what is the difference between concurrency and parallelism?
[21:14:17] Tamae: has joined #ruby
[21:15:00] kb3ien: Also I want to do a read-ahead cache on queries that I expect to be run in the next few seconds, etc.
[21:15:02] atmosx: Here http://java.dzone.com/articles/ruby-concurrency-and and http://concur.rspace.googlecode.com/hg/talk/concur.html#title-slide (rob pike's analysis)
[21:15:33] volty: ah, I see, it's all about the time-shift and pausing, thx
[21:16:20] Patchou: has joined #ruby
[21:17:03] droidburgundy: has joined #ruby
[21:17:09] kb3ien: Do i need to copy the /cache/*gem file too ?
[21:17:13] dfockler: has joined #ruby
[21:17:26] reset: has joined #ruby
[21:18:10] Stany: has joined #ruby
[21:18:22] volty: and passing. sorry
[21:18:23] olistik: has joined #ruby
[21:18:50] RobertBirnie: has joined #ruby
[21:18:55] wookiehangover: has joined #ruby
[21:19:05] olistik: has left #ruby: ()
[21:20:33] Tamae: has joined #ruby
[21:20:48] rjno: has joined #ruby
[21:20:58] volty: I like the last commento on this page http://stackoverflow.com/questions/1050222/concurrency-vs-parallelism-what-is-the-difference
[21:21:25] volty: ops, not the last, num. 27
[21:21:48] Rashad: has joined #ruby
[21:22:05] kb3ien: How would I generally get a working local copy ? gem "ebsco-discovery-service-api", "1.0.4" , :path => '/var/www/local_gems/ebsco-discovery-service-api-1.0.4/lib/' fails, but when the path is ommited it works fine.
[21:22:12] piet: has joined #ruby
[21:22:20] hinbody: has joined #ruby
[21:22:28] kb3ien: The OS can hijack TCP on a per uid basis, but I'd rather not.
[21:22:34] Rashad: Hello. Does Ruby support heterogeneous lists?
[21:23:00] Rashad: Did it support it back in 2006?
[21:23:11] volty: my question about a ruby parser preserving formatting was very very stupid. Ripper (for example) does it since it registers the position of the found tokens. (so everything between is the original whitespace)
[21:23:36] volty: (just forgot, I use ripper for syntax highlighting)
[21:24:34] Aria: Rashad: Yes.
[21:24:41] Rashad: Thanks Aria.
[21:24:51] Aria: Rashad: It's dynamically typed -- variables and containers have never cared what is in them.
[21:24:55] workmad3: has joined #ruby
[21:25:40] Yiota: has joined #ruby
[21:27:41] momomomomo: everything is an object
[21:27:59] yaw: has joined #ruby
[21:28:26] cabreraM516: has joined #ruby
[21:29:28] micmus: has joined #ruby
[21:29:40] veduardo: has joined #ruby
[21:29:49] volty: >> a=[]; p a.push *[1,a,:sym, "hi"
[21:29:50] ruboto: volty # => /tmp/execpad-b01a8af34a69/source-b01a8af34a69:3: syntax error, unexpected keyword_rescue, expecting ...check link for more (https://eval.in/384603)
[21:29:58] volty: >> a=[]; p a.push *[1,a,:sym, "hi"]
[21:29:59] ruboto: volty # => [1, [...], :sym, "hi"] ...check link for more (https://eval.in/384604)
[21:30:45] j4cknewt: has joined #ruby
[21:31:15] s2013: has joined #ruby
[21:31:30] ogpastal_: has joined #ruby
[21:37:02] baweaver: has joined #ruby
[21:39:20] jenrzzz: has joined #ruby
[21:39:44] iamninja: has joined #ruby
[21:42:22] daveg_: has joined #ruby
[21:42:57] segfalt: has joined #ruby
[21:43:08] Rashad: has left #ruby: ()
[21:45:21] MatthewsFace: has joined #ruby
[21:46:54] bgmarx: has joined #ruby
[21:47:21] razrunelord: has joined #ruby
[21:47:30] blaines: has joined #ruby
[21:47:40] beneggett: has joined #ruby
[21:48:51] Exuma: has joined #ruby
[21:49:27] aryaching: has joined #ruby
[21:50:59] qwertme: has joined #ruby
[21:54:16] micmus: has joined #ruby
[21:55:34] yardenbar: has joined #ruby
[21:56:14] AndroidLoverInSF: has joined #ruby
[22:01:20] decoponio: has joined #ruby
[22:04:24] jlast: has joined #ruby
[22:05:36] chinmay_dd: has joined #ruby
[22:05:45] xelkarin: has joined #ruby
[22:06:24] lampd1: has joined #ruby
[22:06:30] kristoph_: has joined #ruby
[22:09:25] icebourg: has joined #ruby
[22:11:52] unsymbol: has joined #ruby
[22:12:02] zendrix: has joined #ruby
[22:12:42] RobertBirnie: has joined #ruby
[22:12:57] Rapier-: has joined #ruby
[22:13:26] mary5030_: has joined #ruby
[22:17:42] bgmarx: has joined #ruby
[22:17:59] fabrice31: has joined #ruby
[22:18:34] wookiehangover: has joined #ruby
[22:18:52] Musashi007: has joined #ruby
[22:22:00] AndroidLoverInSF: has joined #ruby
[22:22:43] dgutierrez1287: has joined #ruby
[22:23:40] allomov: has joined #ruby
[22:25:54] cabreraM516: has joined #ruby
[22:26:15] aryaching: has joined #ruby
[22:29:47] Igorshp: has joined #ruby
[22:30:11] A205B064: has joined #ruby
[22:31:06] j4cknewt: has joined #ruby
[22:34:52] arturhoo: has joined #ruby
[22:35:49] starfox_sf: has joined #ruby
[22:36:58] lampd1: has joined #ruby
[22:37:08] jenrzzz: has joined #ruby
[22:38:32] yaw: has joined #ruby
[22:38:35] Ikares: has joined #ruby
[22:39:21] swgillespie: has joined #ruby
[22:41:47] yoongkang: has joined #ruby
[22:45:02] centrx: has joined #ruby
[22:45:08] vdamewood: has joined #ruby
[22:45:13] al2o3-cr: has joined #ruby
[22:47:54] nambiz: has joined #ruby
[22:48:42] senayar: has joined #ruby
[22:48:44] senayar: has joined #ruby
[22:49:44] Exuma: has joined #ruby
[22:51:19] rbennacer: has joined #ruby
[22:52:37] robbyoconnor: has joined #ruby
[22:53:32] yfeldblum: has joined #ruby
[22:53:41] bungoman: has joined #ruby
[22:54:30] bungoman: has joined #ruby
[22:54:59] bgmarx: has joined #ruby
[22:55:54] woodruffw: has joined #ruby
[22:55:54] jfarmer: has joined #ruby
[22:56:31] bgmarx_: has joined #ruby
[22:56:59] aryaching: has joined #ruby
[22:57:03] woodruffw: has joined #ruby
[22:59:01] datanoise: has joined #ruby
[22:59:29] User458764: has joined #ruby
[23:00:28] swgillespie: has joined #ruby
[23:01:02] arescorpio: has joined #ruby
[23:02:09] gusrub: has joined #ruby
[23:03:12] Rubie: has joined #ruby
[23:03:21] sypheren: has joined #ruby
[23:03:52] Casty: has joined #ruby
[23:04:03] tcrypt: has joined #ruby
[23:04:09] baweaver: has joined #ruby
[23:04:47] renderful: has joined #ruby
[23:06:37] tvw: has joined #ruby
[23:06:51] ged: has joined #ruby
[23:06:59] stonith: has joined #ruby
[23:08:03] paulcsmith: has joined #ruby
[23:08:54] RegulationD: has joined #ruby
[23:09:24] pragmati_: has joined #ruby
[23:09:28] Rubie: has joined #ruby
[23:10:31] Oka: has joined #ruby
[23:10:54] Rubie: has joined #ruby
[23:12:13] swgillespie: has joined #ruby
[23:13:42] workmad3: has joined #ruby
[23:13:53] Rapier-: has joined #ruby
[23:14:29] eam: has joined #ruby
[23:15:41] LMity: has joined #ruby
[23:17:42] dling: has joined #ruby
[23:17:45] jesterfraud: has joined #ruby
[23:17:56] tvw: has joined #ruby
[23:18:34] _blizzy_: has joined #ruby
[23:18:49] cabreraM516: has joined #ruby
[23:18:58] JoshL: has joined #ruby
[23:19:44] jlast: has joined #ruby
[23:20:34] drewo: has joined #ruby
[23:20:45] qwertme: has joined #ruby
[23:20:46] chris2: has joined #ruby
[23:21:33] jtdowney: has joined #ruby
[23:21:35] Cache_Money: has joined #ruby
[23:22:00] waxjar: has joined #ruby
[23:22:36] nwhirschfeld: has joined #ruby
[23:22:49] voodoologic: has joined #ruby
[23:23:05] sharpmachine: has joined #ruby
[23:23:11] hahuang65: has joined #ruby
[23:23:14] jokester: has joined #ruby
[23:23:15] spacemud: has joined #ruby
[23:23:44] workmad3: has joined #ruby
[23:24:24] jesterfraud: has joined #ruby
[23:25:31] voodoologic: has left #ruby: ("WeeChat 1.2")
[23:25:54] C0deMaver1ck: has joined #ruby
[23:28:21] Gadgetoid: has joined #ruby
[23:29:04] devdazed: has joined #ruby
[23:30:34] Igorshp: has joined #ruby
[23:30:54] terrellt: has joined #ruby
[23:32:00] jtdoncas: has joined #ruby
[23:32:23] cabreraM516: has left #ruby: ("Textual IRC Client: www.textualapp.com")
[23:32:31] fedexo: has joined #ruby
[23:33:11] icarus: has joined #ruby
[23:33:11] unclouded: has joined #ruby
[23:33:11] three18ti: has joined #ruby
[23:34:00] workmad3: has joined #ruby
[23:34:13] jalcine: has joined #ruby
[23:34:19] larissa: has joined #ruby
[23:34:22] auraka: has joined #ruby
[23:34:46] skarn: has joined #ruby
[23:34:51] cj: has joined #ruby
[23:35:03] omegahm: has joined #ruby
[23:36:03] Musashi007: has joined #ruby
[23:38:02] Channel6: has joined #ruby
[23:38:27] NeverDie: has joined #ruby
[23:39:03] sphex: has joined #ruby
[23:39:04] CBke: has joined #ruby
[23:44:48] mcclurmc: has joined #ruby
[23:47:29] Casty: has joined #ruby
[23:48:16] michael_mbp: has joined #ruby
[23:48:37] aryaching: has joined #ruby
[23:49:03] joe2: has joined #ruby
[23:49:25] Makorak: has joined #ruby
[23:53:44] fgo: has joined #ruby
[23:53:53] workmad3: has joined #ruby
[23:56:46] malconis: has joined #ruby
[23:57:12] acovrig: has joined #ruby
[23:57:30] robbyoconnor: has joined #ruby
[23:58:06] choke: has joined #ruby
[23:58:14] bkxd: has joined #ruby
[23:58:16] acovrig: I???m having issues with :String.strip! it doesn???t seem to do anything??? shouldn???t ???coyote ?????.strip! return ???coyote????
[23:58:50] AustinLMayes: has joined #ruby
[23:58:57] postmodern: has joined #ruby
[23:59:53] al2o3-cr: >> "coyote ".strip
[23:59:54] ruboto: al2o3-cr # => "coyote" (https://eval.in/384620)