« Back to channel list

#ruby - 22 June 2018

« Back 1 day Forward 1 day »
[00:15:20] workmad3: has joined #ruby
[00:16:45] wontruefree: has joined #ruby
[00:28:08] cagomez: has joined #ruby
[00:37:35] karapetyan: has joined #ruby
[00:38:30] Guest82829: has joined #ruby
[00:48:44] Guest82829: has joined #ruby
[00:49:39] white_lilies: has joined #ruby
[00:57:43] bijan_: has joined #ruby
[00:58:52] Guest82829: has joined #ruby
[01:01:18] t0xik: has joined #ruby
[01:01:57] wontruefree: has joined #ruby
[01:03:06] bijan_: has joined #ruby
[01:07:28] bijan__: has joined #ruby
[01:09:10] Guest82829: has joined #ruby
[01:15:51] bijan_: has joined #ruby
[01:17:21] JamJam_kid: has joined #ruby
[01:19:23] Guest82829: has joined #ruby
[01:20:25] bijan_: has joined #ruby
[01:22:21] wontruefree: has joined #ruby
[01:25:05] bijan_: has joined #ruby
[01:26:34] herbmillerjr: has joined #ruby
[01:29:27] bijan_: has joined #ruby
[01:29:33] Guest82829: has joined #ruby
[01:33:25] bijan__: has joined #ruby
[01:34:43] r29v: has joined #ruby
[01:35:58] JamJam_kid: has joined #ruby
[01:39:49] Guest82829: has joined #ruby
[01:41:59] bijan_: has joined #ruby
[01:46:19] bijan__: has joined #ruby
[01:46:59] SeepingN: has joined #ruby
[01:47:47] gizmore|2: has joined #ruby
[01:48:35] __goodnight__: has joined #ruby
[01:49:36] wontruefree: has joined #ruby
[01:50:00] Guest82829: has joined #ruby
[01:50:42] bijan_: has joined #ruby
[01:55:02] bijan__: has joined #ruby
[01:59:18] bijan_: has joined #ruby
[02:00:12] Guest82829: has joined #ruby
[02:00:23] roamingdog: has joined #ruby
[02:03:43] bijan__: has joined #ruby
[02:06:07] cjohnson: baweaver I hate you
[02:08:08] wontruefree: has joined #ruby
[02:08:38] Azure: has joined #ruby
[02:09:02] roamingdog: has joined #ruby
[02:09:52] roamingdog: has joined #ruby
[02:10:17] konsolebox: has joined #ruby
[02:10:25] Guest82829: has joined #ruby
[02:10:37] roamingdog: has joined #ruby
[02:11:28] roamingdog: has joined #ruby
[02:12:13] roamingdog: has joined #ruby
[02:13:03] roamingdog: has joined #ruby
[02:15:33] workmad3: has joined #ruby
[02:15:50] akaiiro: has joined #ruby
[02:16:29] bijan_: has joined #ruby
[02:19:12] osp2: anyone have a ruby gem they like a lot to get info off youtube?
[02:19:39] osp2: I want to do something like: YoutubeGem.get_info_from_url('youtube.com/....')[:video_title]
[02:19:45] osp2: or :video_length etc
[02:20:38] Guest82829: has joined #ruby
[02:21:04] bijan__: has joined #ruby
[02:21:32] osp2: that looks pretty nice havenwood
[02:21:37] osp2: I was looking on rubygems for "youtube"
[02:27:07] LenPayne: has joined #ruby
[02:27:18] wontruefree: has joined #ruby
[02:30:28] osp2: oh but it requires that we register with google
[02:30:53] Guest82829: has joined #ruby
[02:33:49] bijan_: has joined #ruby
[02:34:52] jrafanie: has joined #ruby
[02:38:23] bijan_: has joined #ruby
[02:39:31] karapetyan: has joined #ruby
[02:41:06] Guest82829: has joined #ruby
[02:41:11] ciscam: has joined #ruby
[02:42:27] osp2: where do you guys put your config files for a plain ruby project?
[02:42:47] osp2: I have a project I created with "bundle gem"
[02:42:58] osp2: and I want to add yaml config files
[02:43:01] osp2: but idk where to put them
[02:43:09] bijan_: has joined #ruby
[02:47:30] SanguineAnomaly: has joined #ruby
[02:47:47] jrafanie: has joined #ruby
[02:51:20] Guest82829: has joined #ruby
[02:54:13] _whitelogger: has joined #ruby
[03:00:11] _whitelogger: has joined #ruby
[03:01:33] Guest82829: has joined #ruby
[03:04:21] bijan_: has joined #ruby
[03:06:44] _whitelogger: has joined #ruby
[03:08:53] safetypin: has joined #ruby
[03:08:58] bijan__: has joined #ruby
[03:09:12] _whitelogger: has joined #ruby
[03:09:55] braincrash: has joined #ruby
[03:10:37] jrafanie: has joined #ruby
[03:11:01] safetypin: has joined #ruby
[03:11:45] Guest82829: has joined #ruby
[03:12:10] _whitelogger: has joined #ruby
[03:13:04] bijan_: has joined #ruby
[03:13:04] nixpulvis: has joined #ruby
[03:13:29] nixpulvis: ACTION tip toes in.
[03:14:37] nixpulvis: Had the fun time of relearning how `@@` works in Ruby today.
[03:17:33] elomatreb: Class variables are best forgotten
[03:19:25] nixpulvis: It was actually nice that it was implemented with them. I was wrapping another rails plugin, which had a `Configuration` module with two methods for getting and setting `@@config`. I could extend that module in my own module, and everything worked as expected.
[03:19:46] nixpulvis: because both modules were talking to the same data.
[03:21:05] amar_: has joined #ruby
[03:21:29] bijan_: has joined #ruby
[03:21:56] Guest82829: has joined #ruby
[03:26:30] bijan_: has joined #ruby
[03:32:11] Guest82829: has joined #ruby
[03:34:30] bijan_: has joined #ruby
[03:39:29] bijan_: has joined #ruby
[03:42:25] Guest82829: has joined #ruby
[03:47:32] bijan_: has joined #ruby
[03:52:10] bijan__: has joined #ruby
[03:52:42] Guest82829: has joined #ruby
[03:56:24] bijan_: has joined #ruby
[03:56:33] gix-: has joined #ruby
[04:00:48] bijan__: has joined #ruby
[04:02:52] Guest82829: has joined #ruby
[04:05:04] bijan_: has joined #ruby
[04:09:27] bijan_: has joined #ruby
[04:09:36] grilix_: has joined #ruby
[04:13:01] Guest82829: has joined #ruby
[04:15:54] workmad3: has joined #ruby
[04:18:34] bijan_: has joined #ruby
[04:22:32] bijan__: has joined #ruby
[04:23:17] Guest82829: has joined #ruby
[04:27:16] bijan_: has joined #ruby
[04:33:30] Guest82829: has joined #ruby
[04:35:17] bijan_: has joined #ruby
[04:39:56] bijan__: has joined #ruby
[04:41:54] karapetyan: has joined #ruby
[04:43:46] Guest82829: has joined #ruby
[04:44:37] bijan_: has joined #ruby
[04:52:55] bijan_: has joined #ruby
[04:53:56] Guest82829: has joined #ruby
[04:57:10] bijan__: has joined #ruby
[05:04:11] Guest82829: has joined #ruby
[05:06:16] armyriad: has joined #ruby
[05:10:15] bijan_: has joined #ruby
[05:14:21] Guest82829: has joined #ruby
[05:14:57] bijan__: has joined #ruby
[05:19:18] bijan_: has joined #ruby
[05:19:43] karthik_: has joined #ruby
[05:21:10] moei: has joined #ruby
[05:21:34] amar: has joined #ruby
[05:23:17] bijan__: has joined #ruby
[05:24:39] Guest82829: has joined #ruby
[05:24:46] sauvin: has joined #ruby
[05:27:45] bijan_: has joined #ruby
[05:28:12] sauvin: has joined #ruby
[05:33:59] apeiros: has joined #ruby
[05:34:48] Guest82829: has joined #ruby
[05:40:37] bijan_: has joined #ruby
[05:45:04] Guest82829: has joined #ruby
[05:46:17] za1b1tsu: has joined #ruby
[05:46:46] aupadhye: has joined #ruby
[05:49:29] bijan_: has joined #ruby
[05:50:05] knight33: has joined #ruby
[05:50:12] haxx0r: has joined #ruby
[05:50:48] haxx0r: https://thepasteb.in/p/pghQJW5Rz5nfR how can i average all p1,p2,p3 ? i need iterate twice?
[05:53:48] bijan_: has joined #ruby
[05:55:14] Guest82829: has joined #ruby
[05:58:00] bijan__: has joined #ruby
[05:59:38] TomyWork: has joined #ruby
[05:59:55] haxx0r: has joined #ruby
[06:00:11] baweaver: In out, not a stayin about
[06:00:13] baweaver: they return
[06:00:14] baweaver: What do you expect it to return?
[06:00:20] baweaver: averages for each group, all of them?
[06:00:28] haxx0r: average of all p1,p2,p3
[06:00:37] haxx0r: we could array merge the arrays
[06:00:58] baweaver: Is that how you get the data in?
[06:01:25] haxx0r: https://thepasteb.in/p/vghOP5oA5v2F3
[06:02:12] baweaver: I mean yeah, but is the data originally like that?
[06:02:13] baweaver: Also avoid bang methods
[06:02:25] baweaver: what have you tried so far?
[06:03:17] haxx0r: avg = {p1:[], p2: [], p3: []}
[06:03:20] haxx0r: looping over the values
[06:03:33] haxx0r: avg[:p1] << v[:p1]
[06:03:51] haxx0r: then sum avg[:p1].average
[06:04:36] baweaver: >> {a: 1, b: 2}.merge(a: 10, b: 2) { |key, old_val, new_val| old_val + new_val }
[06:04:38] ruby[bot]: baweaver: # => {:a=>11, :b=>4} (https://eval.in/1026245)
[06:04:48] baweaver: merge takes a block
[06:05:31] Guest82829: has joined #ruby
[06:06:37] bijan_: has joined #ruby
[06:06:41] Puffball: has joined #ruby
[06:06:55] nowhereman_: has joined #ruby
[06:06:57] haxx0r: ok. i'll try that way
[06:07:10] baweaver: count = values.size; values.reduce { |a, b| a.merge(b) { |k, o, n| o + n } }.map { |k, v| [k, v.fdiv(count)] }.to_h
[06:07:16] baweaver: ish, something like that.
[06:08:12] baweaver: One loop for all values, then one small loop to transform the values of the hash
[06:08:28] baweaver: Well, that could have been: transform_values { |v| v.fdiv count }
[06:08:33] baweaver: assuming 2.4+
[06:10:54] haxx0r: .transform_values!(&:average)
[06:11:33] baweaver: Except there's no average method.
[06:11:44] baweaver: Also don't be so quick to use bang methods
[06:12:12] baweaver: mutating state can lead to some interesting issues later on when breaking things up.
[06:12:28] haxx0r: https://thepasteb.in/p/KOh8YN0x1oMcJ this is ugly but works so far.
[06:12:41] haxx0r: pulls every 5 times the data
[06:12:44] haxx0r: and averages it
[06:14:37] baweaver: Why the sleep?
[06:15:19] bijan_: has joined #ruby
[06:15:38] haxx0r: pull every 5 seconds
[06:15:42] baweaver: What's PDU?
[06:15:42] Guest82829: has joined #ruby
[06:15:53] haxx0r: then average it and save it
[06:16:11] baweaver: Ever heard of Enumerators?
[06:16:19] DTZUZO: has joined #ruby
[06:17:21] baweaver: Might be better to use arrays on it as well
[06:17:30] baweaver: Where does PDU come from?
[06:18:48] daorren: has joined #ruby
[06:19:18] conta: has joined #ruby
[06:19:45] johnny56: has joined #ruby
[06:19:57] bijan__: has joined #ruby
[06:20:23] haxx0r: PDU is the PDUs i am running
[06:20:30] haxx0r: so i need grab power consumptions
[06:20:45] haxx0r: run every minute
[06:20:49] haxx0r: and pull power consumption
[06:21:08] daorren: has left #ruby: ()
[06:21:14] haxx0r: ran over night and realized, over night i consume 2-3% less.
[06:21:27] haxx0r: because the grid of my area is simply not peaking
[06:24:13] bijan_: has joined #ruby
[06:24:16] baweaver: https://thepasteb.in/p/Anh3cYKxkyr9kHm
[06:24:27] baweaver: Something vaguely like that'd give you more flexibility
[06:25:53] Guest82829: has joined #ruby
[06:26:11] baweaver: It also gives you the ability to have an infinite sequence to pull from
[06:26:22] haxx0r: lemme try and play around with that
[06:26:29] haxx0r: looks 5 levels above my skills tho :D
[06:26:32] baweaver: You could also keep a running sum
[06:26:53] baweaver: Let me know if you want any of it explained
[06:27:08] haxx0r: i do a running sum right now
[06:27:14] haxx0r: which kinda ugly :/
[06:27:26] bijan__: has joined #ruby
[06:29:43] bove: has joined #ruby
[06:36:10] Guest82829: has joined #ruby
[06:37:59] venmx: has joined #ruby
[06:40:40] baweaver: Woo, more fun with reduce - https://twitter.com/keystonelemur/status/1010049493503315968
[06:40:51] baweaver: Ah, right, I could do Enumerators next
[06:42:19] anisha: has joined #ruby
[06:43:25] karapetyan: has joined #ruby
[06:43:54] ciscam: has joined #ruby
[06:44:11] baweaver: >> powers_of = -> n { Enumerator.new { |y| v = 0; loop { y.yield(n << v); v += 1 } } }; powers_of[2].take(10)
[06:44:12] ruby[bot]: baweaver: # => [2, 4, 8, 16, 32, 64, 128, 256, 512, 1024] (https://eval.in/1026263)
[06:45:00] baweaver: >> powers_of = -> n { Enumerator.new { |y| v = 0; loop { y.yield(n << v); v += 1 } } }; powers_of[5].take(10)
[06:45:03] ruby[bot]: baweaver: # => [5, 10, 20, 40, 80, 160, 320, 640, 1280, 2560] (https://eval.in/1026264)
[06:45:25] baweaver: Bit shift vs exponentiation
[06:46:11] baweaver: >> powers_of = -> n { Enumerator.new { |y| v = 0; loop { y.yield(n ** v); v += 1 } } }; powers_of[5].take(10)
[06:46:12] ruby[bot]: baweaver: # => [1, 5, 25, 125, 625, 3125, 15625, 78125, 390625, 1953125] (https://eval.in/1026265)
[06:46:18] baweaver: Silly me. Probably sleep time.
[06:46:21] Guest82829: has joined #ruby
[06:46:55] baweaver: I wonder though
[06:48:18] baweaver: >> powers_of = -> n { Enumerator.new { |y| (1..Float::INFINITY).each { |i| y.yield(n ** i) } } }; powers_of[5].take(10)
[06:48:19] ruby[bot]: baweaver: # => [5, 25, 125, 625, 3125, 15625, 78125, 390625, 1953125, 9765625] (https://eval.in/1026267)
[06:48:36] baweaver: Yeah, infinity is more fun. Granted that could be expressed as a lazy sequence too
[06:49:21] amar: has joined #ruby
[06:50:38] baweaver: >> powers_of = -> n { (0..Float::INFINITY).lazy.map { |i| n ** i } }; powers_of[5].first(10) # Much nicer
[06:50:39] ruby[bot]: baweaver: # => [1, 5, 25, 125, 625, 3125, 15625, 78125, 390625, 1953125] (https://eval.in/1026268)
[06:50:52] baweaver: Anyways, sleep time for me, enough Ruby rambling.
[06:51:04] dionysus69: has joined #ruby
[06:56:36] Guest82829: has joined #ruby
[06:57:32] DoubleMalt: has joined #ruby
[06:57:58] Mike11: has joined #ruby
[07:01:59] jottr: has joined #ruby
[07:03:43] apeiros: has joined #ruby
[07:06:50] Guest82829: has joined #ruby
[07:10:05] claudiuinberlin: has joined #ruby
[07:11:16] blackmesa: has joined #ruby
[07:12:13] sysvalve: has joined #ruby
[07:16:02] schleppel: has joined #ruby
[07:16:46] clemens3: has joined #ruby
[07:17:00] Guest82829: has joined #ruby
[07:27:16] Guest82829: has joined #ruby
[07:32:07] BaroMeter: has joined #ruby
[07:37:27] Guest82829: has joined #ruby
[07:41:58] yohji: has joined #ruby
[07:46:00] amelliaa: has joined #ruby
[07:47:42] Guest82829: has joined #ruby
[07:50:03] cschneid: has joined #ruby
[07:54:00] venmx: has joined #ruby
[07:55:59] pskosinski: has joined #ruby
[07:57:52] Guest82829: has joined #ruby
[07:58:22] p4p0l0: has joined #ruby
[08:00:12] dionysus69: has joined #ruby
[08:02:00] venmx_: has joined #ruby
[08:03:50] guille-moe: has joined #ruby
[08:08:07] Guest82829: has joined #ruby
[08:14:10] vondruch: has joined #ruby
[08:14:32] jottr: has joined #ruby
[08:16:39] workmad3: has joined #ruby
[08:16:45] stnly: has joined #ruby
[08:17:11] Guest82829: has joined #ruby
[08:18:32] amar: has joined #ruby
[08:19:44] KeyJoo: has joined #ruby
[08:20:35] reber: has joined #ruby
[08:24:21] Zaab1t: has joined #ruby
[08:25:12] amar: has joined #ruby
[08:31:02] Morrolan: has joined #ruby
[08:34:15] suukim: has joined #ruby
[08:42:09] venmx: has joined #ruby
[08:42:55] Bish: >> OpenSSL::PKey::RSA.new(2048).public?
[08:43:03] Bish: >> OpenSSL::PKey::RSA.new(2048).public?
[08:43:04] ruby[bot]: Bish: # => uninitialized constant OpenSSL (NameError) ...check link for more (https://eval.in/1026383)
[08:43:13] Bish: >> require 'openssl';OpenSSL::PKey::RSA.new(2048).public?
[08:43:15] ruby[bot]: Bish: # => true (https://eval.in/1026384)
[08:43:17] Bish: can somebody explain?
[08:44:02] nowhereman_: has joined #ruby
[08:44:46] jottr: has joined #ruby
[08:45:07] karapetyan: has joined #ruby
[08:45:20] motstgo: has joined #ruby
[08:47:36] cdunklau: Bish: "The return value is always true since every private key is also a public key."
[08:47:47] cdunklau: http://ruby-doc.org/stdlib-2.0.0/libdoc/openssl/rdoc/OpenSSL/PKey/RSA.html#method-i-public-3F
[08:48:10] Bish: thanks openssl.
[08:48:14] Bish: that is really helpful
[08:48:49] blackmesa: has joined #ruby
[08:50:20] stnly: has joined #ruby
[08:51:09] Bish: that's like havinga cleartext method on a hash
[08:51:16] Bish: raising an error "nope"
[08:51:28] TheBrayn: has joined #ruby
[08:51:38] cdunklau: Bish: this might explain it https://stackoverflow.com/questions/43057945/why-is-an-opensslpkeyrsa-key-both-private-and-public
[08:51:50] Bish: i understnad why
[08:52:06] pskosinski: has joined #ruby
[08:52:25] Bish: but i figured, ruby gives the object a bit, which says " yes/no" on private-status
[08:54:21] tvw: has joined #ruby
[08:58:12] Nicmavr: has joined #ruby
[08:59:16] pskosinski: has joined #ruby
[09:00:21] Beams: has joined #ruby
[09:02:17] konsolebox: has joined #ruby
[09:06:03] blackmesa: has joined #ruby
[09:06:37] ur5us: has joined #ruby
[09:08:32] amar: has joined #ruby
[09:19:04] deathwishdave: has joined #ruby
[09:24:22] workmad3: has joined #ruby
[09:27:27] vonfry: has joined #ruby
[09:28:20] quobo: has joined #ruby
[09:30:08] ur5us: has joined #ruby
[09:35:34] vonfry: has joined #ruby
[09:38:58] jottr: has joined #ruby
[09:49:53] NL3limin4t0r: has joined #ruby
[09:54:20] Sylario: has joined #ruby
[09:59:21] roamingdog: has joined #ruby
[10:05:31] amar: has joined #ruby
[10:05:59] bijan_: has joined #ruby
[10:11:36] gregf_: has joined #ruby
[10:11:52] amar: has joined #ruby
[10:13:12] yohji: has joined #ruby
[10:16:45] tty: has joined #ruby
[10:17:02] karapetyan: has joined #ruby
[10:22:29] amar: has joined #ruby
[10:23:59] amar: has joined #ruby
[10:25:11] amar: has joined #ruby
[10:30:15] apeiros: has joined #ruby
[10:30:46] jamesaxl: has joined #ruby
[10:30:54] Morrolan: has joined #ruby
[10:53:24] DarkUnicorn: @Bish why not use .private? and negate it?
[10:56:21] _pastel: has joined #ruby
[10:57:34] ciscam: has joined #ruby
[10:58:07] apeiros: has joined #ruby
[10:58:50] conta: has joined #ruby
[10:58:57] amar: has joined #ruby
[11:01:23] amar_: has joined #ruby
[11:03:40] amar: has joined #ruby
[11:06:11] rubyist: has joined #ruby
[11:06:22] amar: has joined #ruby
[11:06:40] rubyist: Hey Everyone, how can I compile Ruby 2.5 from source without having ruby installed?
[11:09:53] ski7777: has joined #ruby
[11:10:44] za1b1tsu: has joined #ruby
[11:22:02] feelx: has joined #ruby
[11:28:35] jrafanie: has joined #ruby
[11:31:07] desperek: has joined #ruby
[11:31:19] ldnunes: has joined #ruby
[11:38:06] soniya29: has joined #ruby
[11:40:49] jrafanie: has joined #ruby
[11:42:10] bijan_: has joined #ruby
[11:45:27] bijan__: has joined #ruby
[11:46:09] karapetyan: has joined #ruby
[11:48:45] cyberg: has joined #ruby
[11:53:03] ferr: has joined #ruby
[11:54:07] synthroid: has joined #ruby
[11:55:18] gr33n7007h: has joined #ruby
[11:56:35] bijan_: has joined #ruby
[12:00:13] jcalla: has joined #ruby
[12:06:22] biberu: has joined #ruby
[12:07:14] Guest82829: has joined #ruby
[12:08:13] bijan_: has joined #ruby
[12:17:24] Guest82829: has joined #ruby
[12:19:43] bijan_: has joined #ruby
[12:23:01] saTchymoto: has joined #ruby
[12:23:28] clemens3: you need gcc not ruby to compile it
[12:25:49] atmosx: has joined #ruby
[12:26:25] atmosx: has joined #ruby
[12:27:21] beefjoe: has joined #ruby
[12:27:23] za1b1tsu: has joined #ruby
[12:27:41] Guest82829: has joined #ruby
[12:29:38] apparition: has joined #ruby
[12:30:35] bijan_: has joined #ruby
[12:31:03] conta: has joined #ruby
[12:31:16] rajpratik71: has joined #ruby
[12:32:49] soniya29: has joined #ruby
[12:37:44] Inline: has joined #ruby
[12:38:10] fmcgeough: has joined #ruby
[12:38:14] blackmesa: has joined #ruby
[12:39:10] bmurt: has joined #ruby
[12:40:52] zer0s: has joined #ruby
[12:41:36] bijan_: has joined #ruby
[12:44:14] conta: has joined #ruby
[12:55:08] bijan_: has joined #ruby
[12:57:13] bmurt: has joined #ruby
[12:57:42] conta: has joined #ruby
[12:59:22] chris349: has joined #ruby
[13:02:43] nowhereman_: has joined #ruby
[13:06:36] bijan_: has joined #ruby
[13:10:44] bga57: has joined #ruby
[13:11:10] amar_: has joined #ruby
[13:14:06] psychicist__: has joined #ruby
[13:14:35] codymj: has joined #ruby
[13:18:02] bijan_: has joined #ruby
[13:19:48] fmcgeough: has joined #ruby
[13:27:24] amar: has joined #ruby
[13:28:15] blackmesa: has joined #ruby
[13:28:34] amar: has joined #ruby
[13:28:44] bijan_: has joined #ruby
[13:30:00] Mrgoose2: has joined #ruby
[13:33:08] wald0: has joined #ruby
[13:34:39] Rapture: has joined #ruby
[13:40:27] bijan_: has joined #ruby
[13:43:57] roamingdog: has joined #ruby
[13:43:59] gizmore: has joined #ruby
[13:45:38] gizmore|2: has joined #ruby
[13:46:39] lanky_leguan: has joined #ruby
[13:47:10] mjolnird: has joined #ruby
[13:47:34] karapetyan: has joined #ruby
[13:48:49] lanky_leguan: I was looking at code in uri stdlib and saw v.gsub!(/(?!%\h\h|[!$-&(-;=?-_a-~])./n.freeze){'%%%02X' % $&.ord} why is regex frozen? what does it do?
[13:49:56] gizmore: has joined #ruby
[13:50:09] lanky_leguan: like Pattern.compile in java? and always the same regex will be used in that gsub? and I as programmer don't have to store it?
[13:50:16] mjolnird: has joined #ruby
[13:50:18] tvw: has joined #ruby
[13:51:05] lanky_leguan: or is it just mystical incantation, cargo cult programming?
[13:51:06] apeiros: lanky_leguan: no idea, given that regexen are immutable anyway…
[13:51:42] bijan_: has joined #ruby
[13:52:10] mjolnird: has joined #ruby
[13:53:49] gizmore|3: has joined #ruby
[14:00:28] Asher: has joined #ruby
[14:01:18] gizmore: has joined #ruby
[14:02:59] bijan_: has joined #ruby
[14:06:13] szulak: has joined #ruby
[14:08:28] plujon: has joined #ruby
[14:08:41] anjen: has joined #ruby
[14:08:49] samosaphile: has joined #ruby
[14:08:56] samosaphile: has left #ruby: ()
[14:09:03] samosaphile: has joined #ruby
[14:09:17] plujon: I'm on linux, somewhere near gem hell. How do I get out?
[14:13:26] grilix_: has joined #ruby
[14:13:54] bijan_: has joined #ruby
[14:14:52] p4p0l0: has joined #ruby
[14:15:31] DTZUZO: has joined #ruby
[14:16:30] blackmesa: has joined #ruby
[14:18:37] icy`: has joined #ruby
[14:18:38] _pastel: has joined #ruby
[14:20:18] Xiti`: has joined #ruby
[14:25:11] bijan_: has joined #ruby
[14:25:12] plujon: sudo apt-get uninstall ruby libapache2-mod-passenger; rm -rf ~/.gem; find /var/lib/gems/2.3.0 /usr/share/rubygems-integration/all/specifications -type f -print0 | xargs rm # clean slate..?
[14:25:46] soniya29: has joined #ruby
[14:29:40] gizmore: has joined #ruby
[14:32:28] gigetoo: has joined #ruby
[14:34:18] szulak: has joined #ruby
[14:34:47] karapetyan: has joined #ruby
[14:35:10] amar: has joined #ruby
[14:35:16] Beams: has joined #ruby
[14:35:27] plujon: rackup # fails
[14:36:09] havenwood: plujon: How does it fail? command not found: rackup
[14:36:15] bijan_: has joined #ruby
[14:36:19] plujon: Because rackup fails on a simple roda app, I blew away all gems on my machine, uninstall ruby, and decided to start from scratch.
[14:36:27] havenwood: Or is it?: #!> fails
[14:36:33] gizmore|2: has joined #ruby
[14:37:05] havenwood: plujon: You're bundling then after the above setup?
[14:37:07] plujon: Ugh, I wish I saved the output.
[14:37:15] plujon: No bundling, no Gemfile.
[14:37:26] plujon: sudo apt-get install ruby # fresh start
[14:37:29] havenwood: How does Roda get installed?
[14:37:42] plujon: I have yet to install it again. I'm unsure whether to do:
[14:37:42] havenwood: The `rackup` command is provided by the Rack gem, which is a dep of Roda.
[14:38:06] plujon: sudo apt-get install bundler || sudo gem install bundler || gem install bundler # ??
[14:38:53] havenwood: Create a Gemfile, put `gem 'roda'` in it, then either install and run bundler, or use: gem i -g
[14:38:54] Asher: has joined #ruby
[14:39:15] plujon: bundler is an example in this case, for every ruby thing I am about to install.
[14:40:07] gizmore|3: has joined #ruby
[14:40:35] bijan__: has joined #ruby
[14:41:31] havenwood: plujon: Without bundler and making a fresh Gemfile, for example: echo "gem 'roda'" >> Gemfile && gem i -g
[14:41:47] havenwood: or in your case, due to RubyGems location: sudo gem i -g
[14:43:35] havenwood: plujon: sudo gem install bundler
[14:43:35] tdy1: has joined #ruby
[14:43:56] havenwood: plujon: If your RubyGems was setup for a local install, you could just: gem install bundler
[14:44:16] havenwood: It's the location that results in requiring sudo.
[14:44:45] plujon: sudo gem install bundler # worked, I now have bundler 1.15.1. It prints a warning athat I should run `gem install bundler` when I run it.
[14:44:58] bijan_: has joined #ruby
[14:44:59] havenwood: plujon: Run: bundle
[14:45:04] havenwood: plujon: What's the result?
[14:45:25] havenwood: plujon: If it can't find the gem you just installed, then you'll need to add the RubyGems bin/ dir to your PATH.
[14:45:36] plujon: echo "gem 'roda'" >Gemfile && gem i -g # cool, no bundler, installed roda and rack to system gems location
[14:45:44] plujon: echo "gem 'roda'" >Gemfile && sudo gem i -g # cool, no bundler, installed roda and rack to system gems location
[14:45:56] plujon: rackup now works
[14:46:30] havenwood: plujon: Yeah, most folk don't realize that you can turn a Gemfile into a Gemfile.lock with just RubyGems.
[14:46:34] plujon: $ rackup # works without `bundler exec` in front
[14:47:01] plujon: rm Gemfile* # rackup still works
[14:47:24] havenwood: plujon: If you install gems newer than your Gemfile.lock, you'll need to: RUBYGEMS_GEMDEPS=-
[14:47:25] havenwood: export RUBYGEMS_GEMDEPS=-
[14:47:30] havenwood: or: RUBYGEMS_GEMDEPS=Gemfile rackup
[14:47:42] havenwood: plujon: Don't delete your Gemfile, commit it and your Gemfile.lock.
[14:47:55] havenwood: The Gemfile says what deps the Gemfile.lock should resolve for.
[14:48:03] havenwood: The Gemfile.lock is the exact gems your app will use.
[14:48:22] plujon: I understand for a production app I'd commit Gemfile and Gemfile.lock. But I simply want to write a 10 line roda app without relying on a friggin' Gemfile.
[14:48:30] safetypin: has joined #ruby
[14:48:34] havenwood: `RUBYGEMS_GEMDEPS=-` means that RubyGems should detect the Gemfile.lock location then use those exact gems.
[14:49:00] havenwood: plujon: Sure, if you don't have newer gems installed, there's absolutely no difference.
[14:49:25] havenwood: plujon: You can just: sudo gem install roda
[14:49:27] cschneid: has joined #ruby
[14:49:33] plujon: # apt-get install bundler # seems pointless since it immediately tells me to use `gem install bundler`
[14:49:33] havenwood: plujon: sudo gem install roda && rackup
[14:49:46] plujon: # sudo gem install bundler # methinks I'll do this too
[14:49:56] havenwood: plujon: You don't need Bundler for any reason if you're not using a Gemfile.lock.
[14:50:10] havenwood: plujon: Even if you are using a Gemfile.lock, Bundler is optional.
[14:50:28] havenwood: plujon: It's a hard Rails dep unless you modify a few files. It's not a Roda dep in any way.
[14:50:34] maxyz_: has joined #ruby
[14:50:56] plujon: I think the lesson I'm learning is:
[14:51:38] plujon: prefer `sudo gem install <thing>` over `sudo apt-get install <ruby-thing>`
[14:51:58] amar_: has joined #ruby
[14:52:28] plujon: I guessed that my former rackup woes were some sort of rack version conflict.
[14:53:46] plujon: But that's a guess. I didn't understand why 'rackup' on a near empty project should fail.
[14:54:10] StarSeed0000: has joined #ruby
[14:54:23] plujon: The error included: ... rackup uninitialized constant Rack::Session::Abstract::Persisted::RACK_SESSION ...
[14:54:45] synthroid: has joined #ruby
[14:56:12] plujon: ACTION eyes /usr/lib/ruby/vendor_ruby suspiciously
[14:57:26] jottr: has joined #ruby
[15:05:09] plujon: havenwood: Thanks for the sans-bundler `gem i -g` tip.
[15:05:17] Beams: has joined #ruby
[15:08:53] plujon: Does rackup (or other ruby code) pay attention to Gemfile.lock? Or does it only have an effect for `bundler exec ...` or 'require "bundler"' code?
[15:08:53] tdy1: has joined #ruby
[15:10:08] havenwood: plujon: It isn't automatically detected unless you set the env var `export RUBYGEMS_GEMDEPS=-`.
[15:10:46] havenwood: plujon: If you put that ^ in a dotfile that gets sourced, then RubyGems will automatically do the equivalent of prefixing `bundle exec`, but without Bundler.
[15:11:09] havenwood: plujon: Or prefix it to your command: RUBYGEMS_GEMDEPS=- rackup # the `rackup` from the Gemfile.lock
[15:12:08] soniya29: has joined #ruby
[15:12:11] havenwood: export RUBYGEMS_GEMDEPS="-"
[15:13:55] havenwood: plujon: The long form of `gem i -g` is `gem install --file`
[15:14:24] havenwood: plujon: If you want to be fancy, you can also rename `Gemfile` to `gem.deps.rb`.
[15:15:26] havenwood: plujon: echo "gem 'roda'" > gem.deps.rb && gem i -g && RUBYGEMS_GEMDEPS=- rackup
[15:16:04] havenwood: plujon: That'd ^ create the `gem.deps.rb`, resolve deps to create the `gem.deps.rb.lock` and then use the `rackup` from the `gem.deps.rb.lock` file.
[15:17:01] havenwood: plujon: (It's not the conventional way of doing things, for historical reasons. Rubyists often don't read RubyGems release notes. >.>)
[15:17:59] blackmesa: has joined #ruby
[15:20:36] Guest82829: has joined #ruby
[15:22:45] Beams: has joined #ruby
[15:22:49] anisha: has joined #ruby
[15:29:00] GodFather_: has joined #ruby
[15:29:13] akaiiro: has joined #ruby
[15:30:50] Guest82829: has joined #ruby
[15:33:12] amar: has joined #ruby
[15:36:58] Beams: has joined #ruby
[15:39:04] wontruefree: has joined #ruby
[15:41:05] Guest82829: has joined #ruby
[15:41:14] Beams: has joined #ruby
[15:42:41] anisha: has joined #ruby
[15:45:27] akaiiro: has joined #ruby
[15:47:29] GodFather: has joined #ruby
[15:47:47] cagomez: has joined #ruby
[15:51:16] Guest82829: has joined #ruby
[15:56:07] apeiros: has joined #ruby
[15:56:29] akaiiro: has joined #ruby
[15:57:22] jcarl43: has joined #ruby
[15:57:37] armyriad: has joined #ruby
[15:59:14] cthulchu: has joined #ruby
[16:01:05] donofrio: has joined #ruby
[16:01:35] Guest82829: has joined #ruby
[16:01:46] apeiros: has joined #ruby
[16:04:08] dionysus69: has joined #ruby
[16:05:19] cagomez: has joined #ruby
[16:09:25] AJA4350: has joined #ruby
[16:11:42] Guest82829: has joined #ruby
[16:12:52] _pastel: has joined #ruby
[16:21:57] Guest82829: has joined #ruby
[16:28:09] hph^: has joined #ruby
[16:28:39] hph^: has joined #ruby
[16:29:54] akaiiro: has joined #ruby
[16:32:06] cthulchu: has joined #ruby
[16:32:08] Guest82829: has joined #ruby
[16:32:09] hph^: has joined #ruby
[16:35:41] Dbugger: has joined #ruby
[16:36:06] blackmesa1: has joined #ruby
[16:42:24] Guest82829: has joined #ruby
[16:45:18] StarSeed0000: has joined #ruby
[16:46:51] Eiam: has joined #ruby
[16:51:07] anjen: has joined #ruby
[16:52:39] Guest82829: has joined #ruby
[16:58:44] Asher: has joined #ruby
[17:02:51] Guest82829: has joined #ruby
[17:08:01] workmad3: has joined #ruby
[17:10:28] ldepandis: has joined #ruby
[17:12:37] clemens3: has joined #ruby
[17:13:02] Guest82829: has joined #ruby
[17:20:22] deathwishdave: has joined #ruby
[17:22:31] whathappens: has joined #ruby
[17:23:18] Guest82829: has joined #ruby
[17:25:03] akkad: has joined #ruby
[17:25:29] Lytol: has joined #ruby
[17:26:23] _pastel: has joined #ruby
[17:27:33] Eiam: has joined #ruby
[17:27:35] eckhardt_: has joined #ruby
[17:33:27] Guest82829: has joined #ruby
[17:35:59] chris349: has joined #ruby
[17:38:22] k0mpa: has joined #ruby
[17:41:29] icarus_: has joined #ruby
[17:43:40] Guest82829: has joined #ruby
[17:45:37] soniya29: has joined #ruby
[17:48:07] plujon: http://ix.io/1eo2 # RUBYGEMS_GEMDEPS=- rackup # permissions error messages
[17:50:40] plujon: I guess I'll go back to `bundle exec rackup`
[17:53:55] Guest82829: has joined #ruby
[18:04:08] Guest82829: has joined #ruby
[18:04:27] suukim: has joined #ruby
[18:06:12] grilix_: has joined #ruby
[18:07:28] schleppel: has joined #ruby
[18:09:08] roamingdog: has joined #ruby
[18:09:58] roamingdog: has joined #ruby
[18:10:48] roamingdog: has joined #ruby
[18:10:55] icarus: has joined #ruby
[18:11:34] roamingdog: has joined #ruby
[18:12:24] roamingdog: has joined #ruby
[18:13:10] roamingdog: has joined #ruby
[18:14:22] Guest82829: has joined #ruby
[18:17:34] jenrzzz: has joined #ruby
[18:17:34] jenrzzz: has joined #ruby
[18:18:30] _pastel: has joined #ruby
[18:20:31] duderonomy: has joined #ruby
[18:24:35] Guest82829: has joined #ruby
[18:34:49] Guest82829: has joined #ruby
[18:43:08] Hanmac: has joined #ruby
[18:43:41] tvw: has joined #ruby
[18:45:02] Guest82829: has joined #ruby
[18:52:18] cthulchu: guys, when I call a method, I can't list args on new lines?
[18:52:27] cthulchu: I guess I can't
[18:52:42] cschneid: has joined #ruby
[18:52:57] cthulchu: vecause of this weird politics about parenthesis
[18:53:19] cthulchu: what do you do when the method call is too long?
[18:53:37] cthulchu: how do you split the arg list to new lines?
[18:55:14] Guest82829: has joined #ruby
[18:55:31] baweaver_away: You use parens to denote the start and end of arguments in that case.
[18:55:49] baweaver: That said, I just tend to always use parens except in some rarer cases
[18:56:03] cthulchu: yeah, me too, but I didn't know they help with it
[18:56:11] cthulchu: I guess my bug is somewhere else
[18:56:21] baweaver: Namely puts, gets, and other single arity methods primarily used for side-effects
[18:56:35] baweaver: well, double arity in the case of block methods
[18:56:36] za1b1tsu: has joined #ruby
[18:57:37] baweaver: Though you get some real fun if you forget parens on a block method using brackets
[18:58:19] cthulchu: if we want to use keyword arguments, we need to list args in def using colons?
[18:58:35] cthulchu: like def a(a:,b:,c:) end
[18:58:44] baweaver: >> def it(text, &fn) p text and yield text end; it 'does not work' { |v| 'because reasons' + v }
[18:58:45] ruby[bot]: baweaver: # => /tmp/execpad-a0ba722bd226/source-a0ba722bd226:2: syntax error, unexpected '{', expecting keyword_end ...check link for more (https://eval.in/1026726)
[18:58:54] baweaver: >> def it(text, &fn) p text and yield text end; it 'does not work' do |v| 'because reasons' + v end
[18:58:55] ruby[bot]: baweaver: # => "does not work" ...check link for more (https://eval.in/1026727)
[18:59:21] baweaver: because no parens there confuses the parser, it thinks that might be a hash argument instead.
[18:59:33] cthulchu: yeha I got it
[19:01:03] cthulchu: so if I have a normal function like def f1(a,b,c=0), can I call it like f1(b:"qwe", a:4)?
[19:02:15] cthulchu: also the spaces... I should have spaces after commas/colons?
[19:03:13] cthulchu: this is difficult to debug. Does it look wrong to you? .analytics(dl_var_val:"memberNavigation",dl_var_name:"Close",t_type:"dl",file:__FILE__,comment:"",debug_f:true)
[19:03:25] blackmesa1: has joined #ruby
[19:05:27] Guest82829: has joined #ruby
[19:06:15] cthulchu: all is good
[19:06:56] cthulchu: the error was in a different place. And yes, I suspect it doesn't understand new lines and indentations even with parenthesis.
[19:13:21] roamingdog: has joined #ruby
[19:13:26] cthulchu: gonna check
[19:14:40] cthulchu: nope. it understands all very well
[19:15:12] stairmast0r: has joined #ruby
[19:15:41] Guest82829: has joined #ruby
[19:19:11] SCHAPiE: has joined #ruby
[19:20:07] cthulchu: can we do .each from the end?
[19:20:21] cthulchu: starting from the length-1 index and going down to 0?
[19:20:44] cthulchu: or maybe better find
[19:23:12] jyaworski: has joined #ruby
[19:25:10] whathappens: has joined #ruby
[19:25:13] fmcgeough: has joined #ruby
[19:25:54] Guest82829: has joined #ruby
[19:27:38] StarSeed0000: has joined #ruby
[19:35:21] Nicmavr: has joined #ruby
[19:35:25] behemot: has joined #ruby
[19:36:07] Guest82829: has joined #ruby
[19:37:13] ur5us: has joined #ruby
[19:37:23] ur5us: has joined #ruby
[19:41:47] konsolebox: cthulchu: this is more readable: .analytics(dl_var_val: "memberNavigation", dl_var_name: "Close", t_type: "dl", file: __FILE__, comment: "", debug_f: true)
[19:43:04] cthulchu: yeah, I was looking for a regex to fix it all, but gave up
[19:44:17] thoolihan: has joined #ruby
[19:44:45] thoolihan: has left #ruby: ("Leaving")
[19:45:29] weird_error: has joined #ruby
[19:46:17] Guest82829: has joined #ruby
[19:49:54] Dbugger: has joined #ruby
[19:54:51] jyaworski: has joined #ruby
[19:55:35] zenspider: those variable names... is that hungarian notation?!? this is NOT C
[19:56:09] karapetyan: has joined #ruby
[19:56:35] Guest82829: has joined #ruby
[19:57:14] jenrzzz: has joined #ruby
[19:57:14] jenrzzz: has joined #ruby
[19:57:27] ZangPoo: has joined #ruby
[19:58:16] konsolebox: zenspider: most Ruby code have always been like that. why surprised?
[19:59:53] zenspider: konsolebox: says who?
[19:59:56] whathappens: has joined #ruby
[20:00:44] zenspider: hungarian notation is NOT idiomatic naming in ruby. "most Ruby code" is simply false.
[20:00:45] konsolebox: zenspider: nobody said, but look at the MRI library
[20:00:52] ZangPoo: has left #ruby: ()
[20:01:44] zenspider: MRI library is FAR from "most ruby code", is written primarily by Japanese folk (who code much different from the rest of us for mostly cultural reasons), and is 15+ years old ond relatively unmaintained.
[20:03:21] zenspider: and still, your statement is false. I see expr, headers, opt, port, row_count, etc... I'd be hard pressed to find something that looked like hungarian notation in there and it'd be in the minority
[20:04:15] zenspider: (hrm... I have a bundler vendor dir in here... does ag have an exclude ...ah --ignore)
[20:05:43] konsolebox: zenspider: my point is that an official implementation like the MRI library showing such notation or whatever appropriate term you can call it is enough to show that your surprise about it doesn't make sense. you sound like someone trying to start a crusade to make the style look alien.
[20:06:16] konsolebox: it has been there. what are you trying to imply?
[20:06:49] Guest82829: has joined #ruby
[20:07:58] zenspider: I'm not trying to imply anything. I'm stating that you're wrong.
[20:12:27] konsolebox: zenspider: ok, but why do you show surprise?
[20:16:21] zachk: has joined #ruby
[20:16:58] Guest82829: has joined #ruby
[20:17:05] zachk: has joined #ruby
[20:17:10] dionysus69: has joined #ruby
[20:18:12] jyaworski: has joined #ruby
[20:21:10] workmad3: has joined #ruby
[20:23:02] _whitelogger: has joined #ruby
[20:24:34] baweaver: konsolebox: What Ruby code have you been reading? I don't find that to be the case in most projects I've seen, notably OSS ones.
[20:25:18] baweaver: That, and I believe that was unnecessarily rude to the Japanese developers
[20:26:00] baweaver: They put in substantial work to the Ruby language, and calling it unmaintained is quite frankly untrue.
[20:26:20] baweaver: I would ask that you rescind that statement
[20:26:33] zenspider: baweaver: to be clear, that was on me.
[20:27:06] baweaver: Things blend together too much, need to grab coffee
[20:27:12] Guest82829: has joined #ruby
[20:28:29] baweaver: that said, I'd still hold to that statement. It comes off poorly on first read.
[20:29:02] zenspider: and I stand by that. A good portion of stdlib is really old, often non-idiomatic, and recently untouched. I'm looking at abbrev.rb right now and ignoring rdoc + shebang + frozen_string_literal changes that happened across everything, it hasn't been actually modified in 5 years.
[20:32:34] zenspider: looking at something like akr's open-uri, which is obviously a really useful tool, < 1kloc, and documented... and yet everytime I have to dig into it to figure something out it always takes me a good long while. It's such a short file (for what it does) but damn... ~50 extra blank lines would actually make it so much more readable
[20:33:27] wontruefree: has joined #ruby
[20:33:31] dviola: has joined #ruby
[20:33:43] zenspider: (I'm not trying to imply that open-uri is unmaintained--hardly. it's relatively actively developed... it IS hard to read tho and I think a lot of that has to do with those culturally different ways of coding)
[20:33:55] konsolebox: baweaver: so which one did you say was for me?
[20:37:26] Guest82829: has joined #ruby
[20:37:47] amar: has joined #ruby
[20:42:26] tdy1: has joined #ruby
[20:44:00] ur5us: has joined #ruby
[20:45:58] ur5us: has joined #ruby
[20:47:37] Guest82829: has joined #ruby
[20:48:45] jyaworski: has joined #ruby
[20:52:03] icarus: has joined #ruby
[20:57:44] karapetyan: has joined #ruby
[20:57:53] Guest82829: has joined #ruby
[21:06:07] gizmore: has joined #ruby
[21:06:10] Mike11: has joined #ruby
[21:08:08] Guest82829: has joined #ruby
[21:08:37] fishybap: has joined #ruby
[21:13:28] fishybap: has left #ruby: ("WeeChat 2.1")
[21:14:30] gizmore: havenwood: thank you for your feedback lately.... would you run my rspec with byebug?
[21:17:55] jmaister: has joined #ruby
[21:18:17] Guest82829: has joined #ruby
[21:18:21] jmaister: Hi! Any ideas why this https://paste.ofcode.org/HBtuMMfxurYzppnMh38NuS gives me undefined method `nick'?
[21:19:13] gizmore: hi jmaister
[21:20:15] gizmore: jmaister: the m object does not have a nick
[21:20:27] gizmore: jmaister: try to add byebug to your project
[21:20:48] gizmore: jmaister: then run the byebug debugger
[21:20:50] jmaister: you're right and I'm drunk
[21:20:59] gizmore: i am right and we are drunk
[21:21:17] jmaister: even better
[21:21:29] jmaister: sometimes it takes one more person than me to think
[21:21:39] gizmore: >> m = {}; m.foo;
[21:21:40] ruby[bot]: gizmore: # => undefined method `foo' for {}:Hash (NoMethodError) ...check link for more (https://eval.in/1026767)
[21:21:51] gizmore: >> m = {}; m['foo']
[21:21:52] ruby[bot]: gizmore: # => nil (https://eval.in/1026768)
[21:22:16] gizmore: ruby is the best language ever
[21:22:38] gizmore: >> [1.2.3].select{|item| item==2}
[21:22:39] ruby[bot]: gizmore: # => /tmp/execpad-3517692fabfe/source-3517692fabfe:2: unexpected fraction part after numeric literal ...check link for more (https://eval.in/1026769)
[21:23:51] jmaister: I hardly ever write ruby, so I forget these things
[21:24:35] gizmore: do you know php?
[21:25:08] jmaister: unfortunately, yes
[21:25:33] gizmore: i made the best php framework ever
[21:25:45] Azure: has joined #ruby
[21:25:50] gizmore: i am porting it to ruby atm
[21:26:05] gizmore: do you know laravel?
[21:26:09] jmaister: https://github.com/gizmore/gdo6 ?
[21:26:16] jmaister: yes, I know laravel
[21:26:31] jmaister: I don't code in php anymore though
[21:26:31] gizmore: laravel has like 50% code completion in eclipse
[21:26:41] gizmore: GDO6 has like 95%
[21:26:54] jmaister: Actually, I'm transcending to become an "architect"
[21:27:20] jmaister: Making other people write the code at a better salary
[21:27:57] gizmore: i am trying to avoid sever brain damage from drinking with friends
[21:28:19] gizmore: and code the best framework in my freetime
[21:28:40] Guest82829: has joined #ruby
[21:30:47] jmaister: Wife's away and the kids are asleep, so I waste time on irc bots
[21:31:20] gizmore: jmaister: the best irc bot is mine.... check #shadowlamb
[21:31:33] jmaister: I have no doubt. Mine is shitty
[21:31:47] jmaister: https://github.com/jurgemaister/turid
[21:31:49] gizmore: it is free source and PHP
[21:32:20] gizmore: i also made a ruby chatbot "ricer2"
[21:33:00] gizmore: jmaister: watching you now :=
[21:33:54] gizmore: jmaister: https:/github.com/gizmore/gdo (GDO(Ruby))
[21:34:01] gizmore: jmaister: https/:/github.com/gizmore/gdo (GDO(Ruby))
[21:34:09] gizmore: jmaister: https://github.com/gizmore/gdo (GDO(Ruby))
[21:35:18] jmaister: No dependencies? What is this? 1990?
[21:35:30] jmaister: Don't you know node is the way of the future?
[21:35:37] jmaister: Download the internets!
[21:35:55] gizmore: jmaister: most stuff you rely on is either bloated or shice
[21:36:06] gizmore: like rubyonrails and active record
[21:36:10] gizmore: its bloatware
[21:36:22] gizmore: GDO is more slim
[21:36:40] jmaister: no one ever chose ruby for speed :P
[21:36:57] gizmore: we are going to get a JIT soon :)
[21:37:15] JamJam_kid: has joined #ruby
[21:37:35] jmaister: PHP7 is fast, but still a shitty language
[21:37:47] gizmore: jmaister: if you compare GDO6(PHP) and GDO(Ruby) you will notice that it's a completely
[21:37:57] gizmore: in PHP you get a new process on every request
[21:38:11] gizmore: in RubyPassenger your process lives forever
[21:38:46] Guest82829: has joined #ruby
[21:39:43] beanish: has joined #ruby
[21:41:31] gizmore: https://www.youtube.com/watch?v=10kE9OcRc0w (sry=
[21:47:24] bmurt: has joined #ruby
[21:48:27] anisha: has joined #ruby
[21:48:59] Guest82829: has joined #ruby
[21:50:36] cyberg: has joined #ruby
[21:51:33] JamJam_kid: has joined #ruby
[21:58:35] banisterfiend: has joined #ruby
[21:59:14] Guest82829: has joined #ruby
[21:59:26] karapetyan: has joined #ruby
[22:00:05] ur5us: has joined #ruby
[22:01:32] postmodern: has joined #ruby
[22:01:55] t0xik: has joined #ruby
[22:02:17] safetypin: has joined #ruby
[22:04:05] jyaworski: has joined #ruby
[22:06:55] mkroman: is there a backend-agnostic http client library for ruby?
[22:06:55] jottr: has joined #ruby
[22:07:07] mkroman: faradays API does not seem very good
[22:08:04] Paraxial: has joined #ruby
[22:09:17] gizmore: mkroman: look for http2 clients
[22:09:28] gizmore: if there is none, maybe write one
[22:09:29] Guest82829: has joined #ruby
[22:10:09] mkroman: I'd consider making one, but I don't like maintaining stuff I'm not at all interested in :p
[22:15:31] wontruefree: has joined #ruby
[22:18:04] cthulchu_: has joined #ruby
[22:19:40] Guest82829: has joined #ruby
[22:19:43] gizmore: mkroman: when in doubt use `curl`
[22:20:09] gizmore: i heard windows can use curl too when the admin is cool
[22:21:03] gizmore: >>`curl localhost`
[22:21:04] ruby[bot]: gizmore: # => (https://eval.in/1026771)
[22:21:12] workmad3: has joined #ruby
[22:21:13] gizmore: >>`ls -asl`
[22:21:14] ruby[bot]: gizmore: # => (https://eval.in/1026772)
[22:21:47] mkroman: >>Dir['/**']
[22:21:48] ruby[bot]: mkroman: # => (https://eval.in/1026773)
[22:22:27] gizmore: >>class Object; def self.included(base); puts base; end; end
[22:22:28] ruby[bot]: gizmore: # => :included (https://eval.in/1026774)
[22:23:24] mkroman: >>`ls /proc`
[22:23:25] ruby[bot]: mkroman: # => (https://eval.in/1026775)
[22:24:27] apeiros: ?experiments
[22:24:28] ruby[bot]: Please use your local irb or pry (see ?pry) to experiment, ruby[bot]'s eval functionality is for demonstration purposes only.
[22:24:56] apeiros: also, trying to break it is considered banworthy. so reconsider what you're doing.
[22:26:23] gizmore: apeiros: as if a mortal could break it
[22:27:33] venmx: has joined #ruby
[22:29:51] Guest82829: has joined #ruby
[22:31:10] tag: has joined #ruby
[22:35:21] weird_error: has joined #ruby
[22:36:14] jyaworski: has joined #ruby
[22:39:14] Emerald: has joined #ruby
[22:39:31] Emerald: How can I compile Ruby 2.x without Ruby and no wifi?
[22:39:47] gizmore: Emerald: use GCC to compile it
[22:40:09] Guest82829: has joined #ruby
[22:40:18] Emerald: How do I use gcc with it?
[22:40:23] gizmore: usually "make" and ./configure
[22:40:29] gizmore: usually ./configure and make
[22:40:41] gizmore: for C projects
[22:40:43] Emerald: I tried those, but configure says I need ruby installed to compile ruby from source
[22:40:50] gizmore: then i am out
[22:41:02] havenwood: Emerald: You don't need Ruby to compile from source.
[22:41:31] havenwood: Emerald: Gist what you're running and the result?
[22:41:44] Emerald: I ran autoconf, and configure. It checks for /usr/bin/ruby, and when it isn't there, it stops
[22:41:51] Emerald: I am running Ubuntu 17.10
[22:41:58] havenwood: Emerald: https://github.com/postmodern/chruby/wiki/Ruby
[22:42:13] jerryskye: ruby's official website says you should just run ./configure and then make
[22:42:16] havenwood: Emerald: What's your goal? We might be able to point out a better way.
[22:42:29] Emerald: Just compile ruby from source
[22:42:35] havenwood: Emerald: But why?
[22:42:47] jerryskye: maybe skip autoconf
[22:43:30] havenwood: Emerald: On Ubuntu 17.10 you want Ruby 2.0, it's not available as a package, and that's why you're compiling from source?
[22:43:47] Emerald: Yes. I don't really want to upgrade right now
[22:44:04] havenwood: Emerald: Use the Ruby 2.0 package that Brightbox maintains for Ubuntu 17.10: https://www.brightbox.com/docs/ruby/ubuntu/
[22:44:48] havenwood: Emerald: It will also have backported security fixes.
[22:45:22] havenwood: Emerald: Ruby 2.0 is unmaintained, and does not have security fixes for known vulnerabilities if you compile from source without backported security fixes.
[22:45:25] havenwood: Emerald: You're welcome
[22:45:47] Emerald: But why does Ruby require Ruby to install Ruby from source?
[22:45:59] havenwood: Emerald: It doesn't.
[22:46:53] havenwood: Emerald: There's probably an incompatibility between Ruby 2.0 and Artful, and 2.0 is unmaintained so it doesn't receive bugfixes. Unsure.
[22:47:08] Emerald: What about 2.5?
[22:47:16] havenwood: Emerald: It should work just fine. 2.5.1 ftw.
[22:47:43] Emerald: When I downloaded a tar for 2.5, and ran configure, it checked for ruby, and when it didn't find it, it stopped
[22:47:59] havenwood: Emerald: Show what you're running?
[22:48:00] Emerald: Am I downloading the wrong files? I also tried the git repo
[22:48:12] havenwood: Emerald: Try these instructions?: https://github.com/postmodern/chruby/wiki/Ruby
[22:48:39] havenwood: Emerald: Or you can use ruby-install to build from source to arbitrary locations: https://github.com/postmodern/ruby-install
[22:49:37] havenwood: Emerald: You should be able to grab the tarball, decompress it, configure, make and make install.
[22:50:17] Guest82829: has joined #ruby
[22:50:31] eckhardt_: has joined #ruby
[22:51:12] jhack: has joined #ruby
[22:52:04] p4p0l0: has joined #ruby
[22:53:16] p4p0l0_: has joined #ruby
[22:54:13] roamingdog: has joined #ruby
[22:54:43] zwliew: has joined #ruby
[22:55:03] roamingdog: has joined #ruby
[22:55:48] roamingdog: has joined #ruby
[22:56:38] roamingdog: has joined #ruby
[22:57:28] roamingdog: has joined #ruby
[23:00:03] karapetyan: has joined #ruby
[23:00:22] venmx: has joined #ruby
[23:00:29] Guest82829: has joined #ruby
[23:02:46] TvL2386_: has joined #ruby
[23:07:53] ur5us: has joined #ruby
[23:07:53] cthulchu_: I have a quick design-related question
[23:08:06] cthulchu_: about when Ruby is used with Selenium to run tests
[23:08:07] cagomez: has joined #ruby
[23:08:45] cthulchu_: let's say we have a member signup test. it's a test consisting of, say, 15 method calls
[23:09:16] cthulchu_: and then once signed up, we have 10 variations of pages that depend on how we went through the signup process
[23:09:37] ur5us: has joined #ruby
[23:09:54] cthulchu_: I say we should capsulate the 15 signup methods in one method to simplify the code for the 10 tests we need to run
[23:10:11] cthulchu_: no need to list all the 15 methods in every instance of a test, right?
[23:10:41] cthulchu_: but it adds up a layer of complexity/abstraction to the tests, which makes them harder to understand for new team members
[23:10:51] Guest82829: has joined #ruby
[23:17:06] ciscam: has joined #ruby
[23:20:13] Ssandy: has joined #ruby
[23:20:44] gizmore: <%='erb' + 'is fun'%>
[23:21:00] Guest82829: has joined #ruby
[23:21:08] gizmore: wrote own template engine
[23:21:39] helpa: has joined #ruby
[23:22:02] gizmore: havenwood: own template engine: https://github.com/gizmore/gdo/blob/master/lib/GDO/Core/GDT_Template.rb
[23:22:02] Ssandy: ah que escriba en una sola linea?
[23:22:12] Ssandy: si total hay mucho papel
[23:22:40] Ssandy: que pais es este?
[23:23:33] Ssandy: has left #ruby: ()
[23:24:25] \void: has joined #ruby
[23:31:10] Guest82829: has joined #ruby
[23:33:26] ruby[bot]: -bbbb chouhoulis!*@*$#ruby-fix-your-connection chouhoul_!*@*$#ruby-fix-your-connection chouhou__!*@*$#ruby-fix-your-connection chouho___!*@*$#ruby-fix-your-connection
[23:33:26] ruby[bot]: -bbbb chouh____!*@*$#ruby-fix-your-connection *!*@50-207-64-46-static.hfc.comcastbusiness.net$#ruby-fix-your-connection chouhoulis!*@* chouhoul_!*@*
[23:33:28] ruby[bot]: -bbbb chouhou__!*@* chouho___!*@* chouh____!*@* *!*@50-207-64-46-static.hfc.comcastbusiness.net
[23:35:18] karapetyan: has joined #ruby
[23:39:05] regedit: has joined #ruby
[23:41:26] Guest82829: has joined #ruby
[23:45:58] konsolebox: has joined #ruby
[23:49:43] amar: has joined #ruby
[23:51:37] Guest82829: has joined #ruby