« Back to channel list

#ruby - 29 May 2017

« Back 1 day Forward 1 day »
[00:04:56] LastWhisper____: has joined #ruby
[00:06:51] fantasticsid: has joined #ruby
[00:07:33] romank: has joined #ruby
[00:12:40] romank: has joined #ruby
[00:16:12] eightlimbed: has joined #ruby
[00:17:02] ResidentBiscuit: has joined #ruby
[00:17:50] romank: has joined #ruby
[00:22:57] BSaboia: has joined #ruby
[00:25:19] cschneid_: has joined #ruby
[00:25:53] bmurt: has joined #ruby
[00:26:45] Jameser: has joined #ruby
[00:29:26] kobain: has joined #ruby
[00:29:32] rohitpaulk: has joined #ruby
[00:29:48] kobain: has joined #ruby
[00:36:29] railswebdev: has joined #ruby
[00:37:37] ResidentBiscuit: has joined #ruby
[00:38:38] charliesome: has joined #ruby
[00:39:58] romank: has joined #ruby
[00:41:38] rc48: has joined #ruby
[00:44:35] erlendf: has joined #ruby
[00:47:20] apparition: has joined #ruby
[00:51:03] romank: has joined #ruby
[00:54:11] rohitpaulk: has joined #ruby
[00:54:29] uZiel: has joined #ruby
[00:58:46] brian_penguin: has joined #ruby
[01:00:24] rohitpaulk: has joined #ruby
[01:02:15] romank: has joined #ruby
[01:05:04] im0nde_: has joined #ruby
[01:07:57] kies: has joined #ruby
[01:11:06] eb0t: has joined #ruby
[01:12:04] mr_ron: has joined #ruby
[01:12:35] romank: has joined #ruby
[01:24:39] bkxd: has joined #ruby
[01:26:31] Tempesta: has joined #ruby
[01:27:34] romank: has joined #ruby
[01:30:08] jusa: has joined #ruby
[01:36:03] nicesignal: has joined #ruby
[01:38:04] charliesome: has joined #ruby
[01:41:12] nathani: has joined #ruby
[01:43:11] d^sh: has joined #ruby
[01:44:11] BSaboia: has joined #ruby
[01:50:35] ResidentBiscuit: has joined #ruby
[01:52:43] brian_penguin: has joined #ruby
[01:52:55] jrafanie: has joined #ruby
[01:53:16] roamingdog: has joined #ruby
[01:59:07] gizmore|2: has joined #ruby
[02:00:55] romank: has joined #ruby
[02:07:18] belmoussaoui: has joined #ruby
[02:07:19] tristanp: has joined #ruby
[02:07:54] nowhere_man: has joined #ruby
[02:13:40] chopin: has joined #ruby
[02:16:18] belmoussaoui: has joined #ruby
[02:18:20] kies: has joined #ruby
[02:19:39] cschneid_: has joined #ruby
[02:20:26] genpaku: has joined #ruby
[02:21:12] nathani: is there a way to put variables into a block of text surrounded by EOF?
[02:21:17] ResidentBiscuit: has joined #ruby
[02:21:48] havenwood: nathani: Say more about what you mean?
[02:22:07] elomatreb: Regular interpolation works in heredocs: https://eval.in/806682
[02:22:54] nathani: yup looks like thats what I needed, thank elomatreb
[02:23:03] enterprisey: has joined #ruby
[02:23:13] nathani: I am really new to Ruby
[02:23:19] belmoussaoui_: has joined #ruby
[02:24:17] havenwood: nathani: Here's a quickref: https://www.zenspider.com/ruby/quickref.html
[02:26:49] mim1k: has joined #ruby
[02:32:03] ResidentBiscuit: has joined #ruby
[02:32:49] Trynemjoel: has joined #ruby
[02:34:05] belmoussaoui: has joined #ruby
[02:40:18] Trynemjoel: has joined #ruby
[02:41:06] arescorpio: has joined #ruby
[02:42:26] latemus: has joined #ruby
[02:43:13] rc48: has joined #ruby
[02:44:16] jrafanie: has joined #ruby
[02:44:26] cschneid_: has joined #ruby
[02:45:01] jrafanie: has joined #ruby
[02:48:51] belmoussaoui: has joined #ruby
[03:04:18] belmoussaoui: has joined #ruby
[03:10:10] belmoussaoui: has joined #ruby
[03:11:17] konsolebox: has joined #ruby
[03:13:32] ResidentBiscuit: has joined #ruby
[03:13:44] konsolebox: has joined #ruby
[03:13:54] chopin: has joined #ruby
[03:15:02] konsolebox: hey people, is the git version of Ruby going to be 3.0?
[03:16:15] cschneid_: has joined #ruby
[03:17:27] havenwood: konsolebox: hrm?
[03:18:16] konsolebox: havenwood: i don't know what that term means
[03:18:30] havenwood: konsolebox: What are you asking? What's a git version?
[03:18:36] havenwood: konsolebox: Ask your question another way?
[03:18:44] havenwood: I'm trying to understand.
[03:18:58] konsolebox: havenwood: https://github.com/ruby/ruby
[03:19:27] havenwood: konsolebox: Ah, I see.
[03:19:35] havenwood: konsolebox: The trunk branch and nightly are 2.5.
[03:19:54] havenwood: konsolebox: Ruby 2.5 will be released this Christmas. Ruby 3.0 is planned for 2020.
[03:19:57] konsolebox: oh, and i'm getting excited about 3.0. looks it's not going to come soon.
[03:20:04] konsolebox: havenwood: oh great :)
[03:20:07] havenwood: 2020 is shockingly soon!
[03:20:20] konsolebox: yeah, it would be
[03:31:05] jusa: has joined #ruby
[03:33:01] ledestin: has joined #ruby
[03:34:54] Jameser: has joined #ruby
[03:36:34] roamingdog: has joined #ruby
[03:36:34] gix: has joined #ruby
[03:39:21] cfec0b8d: has joined #ruby
[03:44:21] rc48: has joined #ruby
[03:50:36] tens0r: has joined #ruby
[03:50:50] cam27: has joined #ruby
[03:51:15] gnufied: has joined #ruby
[03:54:50] ResidentBiscuit: has joined #ruby
[03:59:16] Jameser: has joined #ruby
[04:01:36] __Yiota: has joined #ruby
[04:02:39] Dimik: has joined #ruby
[04:03:03] enterprisey: has joined #ruby
[04:05:19] PatrikasZvaigzde: has joined #ruby
[04:09:05] eightlimbed: has joined #ruby
[04:09:12] _whitelogger: has joined #ruby
[04:10:20] romank: has joined #ruby
[04:24:12] belmoussaoui: has joined #ruby
[04:25:12] bkxd: has joined #ruby
[04:27:15] mim1k: has joined #ruby
[04:27:40] railswebdev: has joined #ruby
[04:32:31] gothicsouth: has joined #ruby
[04:33:04] cerulean: has joined #ruby
[04:33:24] cerulean: i just open sourced a LOT of work on irc bot style stuff: check it:
[04:33:25] cerulean: https://github.com/mixflame/djforestflame
[04:33:49] cerulean: (uses ruby, cinch, sinatra, rack, thin, em-twitter and a lot of other heavy hitting stuff"
[04:36:17] ResidentBiscuit: has joined #ruby
[04:36:50] belmoussaoui: has joined #ruby
[04:37:31] LastWhisper____: has joined #ruby
[04:37:58] charliesome: has joined #ruby
[04:44:52] govg: has joined #ruby
[04:45:38] belmoussaoui: has joined #ruby
[04:48:11] Pongles: has joined #ruby
[04:50:22] charliesome: has joined #ruby
[04:50:36] Pongles: Hello all! I am currently trying to make a bare-bones commandline server using ruby for a game I am creating, however I am have an issue where lines that I puts/print to the client are held until after I gets a line back from them.
[04:51:21] Pongles: Here is my code currently: https://pastebin.com/7VeCRBJi the issue mainly happens in the loop after the "authication"
[04:51:23] ruby[bot]: Pongles: we in #ruby do not like pastebin.com, I reposted your paste to gist for you: https://gist.github.com/c0536a3b9e00e2a41470b246a7c0c6c1
[04:51:23] ruby[bot]: Pongles: pastebin.com loads slowly for most, has ads which are distracting and has terrible formatting.
[04:51:43] Pongles: good to know ruby[bot] I will gist in the future
[04:52:08] Pongles: It sends the "$:>" line with the response to the command instead of before the command
[04:52:24] romank: has joined #ruby
[04:57:37] dionysus69: has joined #ruby
[05:05:41] romank: has joined #ruby
[05:10:44] romank: has joined #ruby
[05:19:13] Mia: has joined #ruby
[05:19:13] Mia: has joined #ruby
[05:20:30] belmoussaoui: has joined #ruby
[05:24:08] madhatter: has joined #ruby
[05:26:06] JoshS: has joined #ruby
[05:26:09] nofxxx: has joined #ruby
[05:30:00] biberu: has joined #ruby
[05:34:23] belmoussaoui: has joined #ruby
[05:35:23] aupadhye: has joined #ruby
[05:35:44] uZiel: has joined #ruby
[05:36:51] belmoussaoui: has joined #ruby
[05:38:26] ResidentBiscuit: has joined #ruby
[05:40:50] belmoussaoui: has joined #ruby
[05:41:53] eb0t: has joined #ruby
[05:44:46] TomyLobo: has joined #ruby
[05:45:51] rc48: has joined #ruby
[05:49:59] anisha_: has joined #ruby
[05:55:16] belmoussaoui: has joined #ruby
[05:57:18] chopin: has joined #ruby
[05:59:18] ResidentBiscuit: has joined #ruby
[06:00:58] nunchuck: has joined #ruby
[06:09:27] renchan: has joined #ruby
[06:10:05] ResidentBiscuit: has joined #ruby
[06:16:30] muelleme: has joined #ruby
[06:18:53] belmoussaoui: has joined #ruby
[06:25:21] bambanx: has joined #ruby
[06:27:41] mim1k: has joined #ruby
[06:28:12] conta: has joined #ruby
[06:28:51] mikecmpbll: has joined #ruby
[06:34:32] govg: has joined #ruby
[06:40:01] djbkd: has joined #ruby
[06:41:06] ResidentBiscuit: has joined #ruby
[06:45:54] ur5us: has joined #ruby
[06:48:13] Mia: has joined #ruby
[06:48:13] Mia: has joined #ruby
[06:48:16] dionysus69: has joined #ruby
[06:49:42] ovaltine: has joined #ruby
[06:57:00] burgestrand: has joined #ruby
[06:58:13] tenderlo_: has joined #ruby
[06:59:36] Gucciferal: has joined #ruby
[07:02:15] jgt: has joined #ruby
[07:04:06] mark_66: has joined #ruby
[07:07:28] KeyJoo: has joined #ruby
[07:08:59] n0vo: has joined #ruby
[07:09:07] SeepingN: has joined #ruby
[07:09:36] roamingdog: has joined #ruby
[07:09:43] n0vo: Hello, I've written a script which opens a list of URLs in new tabs in firefox, but I was wondering if there is a way to open the next URL without waiting for the other one to finish loading
[07:09:51] n0vo: I'm using selenium
[07:10:28] roamingdog: has joined #ruby
[07:10:50] Gucciferal: noob here listening
[07:11:11] roamingdog: has joined #ruby
[07:11:13] n0vo: I can't seem to find this information online
[07:12:01] roamingdog: has joined #ruby
[07:14:56] andikr: has joined #ruby
[07:15:27] glejeune: has joined #ruby
[07:16:44] pwnd_nsfw: n0vo, use threads
[07:19:38] djbkd: has joined #ruby
[07:20:55] antgel: has joined #ruby
[07:28:58] aufi: has joined #ruby
[07:33:05] SaschaVoid: has joined #ruby
[07:35:10] vali: has joined #ruby
[07:39:33] vondruch: has joined #ruby
[07:41:13] uZiel: has joined #ruby
[07:42:19] charliesome: has joined #ruby
[07:42:36] jaruga________: has joined #ruby
[07:43:39] Gucciferal: has joined #ruby
[07:47:27] rc48: has joined #ruby
[07:50:24] moei: has joined #ruby
[07:50:44] moei: has joined #ruby
[07:50:52] mim1k: has joined #ruby
[07:56:57] teclator: has joined #ruby
[07:58:50] chopin: has joined #ruby
[08:01:12] cschneid_: has joined #ruby
[08:12:11] normie1: has joined #ruby
[08:13:09] roamingdog: has joined #ruby
[08:14:14] ResidentBiscuit: has joined #ruby
[08:15:27] romank: has joined #ruby
[08:16:24] charliesome: has joined #ruby
[08:17:27] dminuoso: Never not use threads.
[08:17:35] dminuoso: Because bugs keep your job alive.
[08:21:57] ferr1: has joined #ruby
[08:22:49] Sammichmaker: has joined #ruby
[08:24:49] adgtl: has left #ruby: ("Textual IRC Client: www.textualapp.com")
[08:24:52] ResidentBiscuit: has joined #ruby
[08:25:09] mim1k: has joined #ruby
[08:25:24] adgtl: has joined #ruby
[08:26:07] doublemalt_: has joined #ruby
[08:26:15] bsartek: has joined #ruby
[08:29:26] tAn: has joined #ruby
[08:31:05] aupadhye: has joined #ruby
[08:32:52] latemus: has joined #ruby
[08:34:31] stoffus: has joined #ruby
[08:40:43] Tempesta: has joined #ruby
[08:40:59] Tempesta: has joined #ruby
[08:44:46] bsartek: has joined #ruby
[08:49:30] jenrzzz: has joined #ruby
[08:49:30] jenrzzz: has joined #ruby
[08:49:31] ur5us: has joined #ruby
[08:54:04] sonOfRa: has joined #ruby
[08:55:09] marr: has joined #ruby
[08:57:00] RazorX: has joined #ruby
[08:57:27] Bock: has joined #ruby
[09:00:14] lxsameer: has joined #ruby
[09:01:05] doublemalt_: has joined #ruby
[09:02:13] TomyWork: has joined #ruby
[09:06:07] ResidentBiscuit: has joined #ruby
[09:11:28] Arahael: has joined #ruby
[09:11:44] Arahael: I have a global function - how do I reference it in a class init?
[09:12:07] govg: has joined #ruby
[09:12:15] Arahael: It keeps saying "undefined method", which is probably correct as it's obviously confused about the scope.
[09:12:27] Arahael: But I can't specify $foo(blah)
[09:12:32] burgestrand: Arahael a failing code example would help a long way, paste it in e.g. eval.in
[09:14:52] Arahael: Well, that's confusing as heck. Works fine in MRI. It must be a thor issue.
[09:15:17] Arahael: Burgestrand: Thanks for the tip. :)
[09:15:31] Arahael: Btw, the code was: https://eval.in/806857
[09:16:10] romank: has joined #ruby
[09:21:04] pb122: has joined #ruby
[09:22:40] Puffball: has joined #ruby
[09:30:29] Puffball: has joined #ruby
[09:31:10] Jameser: has joined #ruby
[09:31:46] dminuoso: Arahael: http://i.imgur.com/04Mlrwp.png -> if you define a method you basically define it onto the RClass of Object.
[09:32:23] dminuoso: Arahael: And as you can see *all* inheritance chains end up with RObject (except BasicObject and classes that derive from BasicObject such as Delegator).
[09:33:00] dminuoso: Arahael: Scope is not considered during method lookup. It works soley based on the receiver and it's classes ancestory.
[09:33:04] pandaant: has joined #ruby
[09:34:12] dminuoso: Which means either the method is not defined yet, it's not defined on that class, or the receiver does not have RObject in its ancestory.
[09:35:06] johnny56: has joined #ruby
[09:38:37] bruce_lee: has joined #ruby
[09:38:37] bruce_lee: has joined #ruby
[09:45:06] yqt: has joined #ruby
[09:48:58] rc48: has joined #ruby
[09:51:55] charliesome: has joined #ruby
[09:56:56] dionysus69: has joined #ruby
[09:57:30] mim1k: has joined #ruby
[09:58:57] romank: has joined #ruby
[10:00:17] chopin: has joined #ruby
[10:00:30] nobitanobi: has joined #ruby
[10:02:38] mim1k: has joined #ruby
[10:02:49] dgs: has joined #ruby
[10:11:49] belmoussaoui: has joined #ruby
[10:12:20] arquebus: has joined #ruby
[10:15:41] banisterfiend: has joined #ruby
[10:15:42] doublemalt_: has joined #ruby
[10:17:52] last_staff: has joined #ruby
[10:18:51] belmoussaoui: has joined #ruby
[10:19:03] ResidentBiscuit: has joined #ruby
[10:32:29] mim1k: has joined #ruby
[10:39:03] jgt: has joined #ruby
[10:43:57] jrafanie: has joined #ruby
[10:45:05] romank: has joined #ruby
[10:50:31] nothingnew: has joined #ruby
[11:00:16] ResidentBiscuit: has joined #ruby
[11:15:56] bmurt: has joined #ruby
[11:16:19] TomyWork: has joined #ruby
[11:16:33] marr: has joined #ruby
[11:16:37] tomphp: has joined #ruby
[11:16:42] Fernando-Basso: has joined #ruby
[11:20:22] uZiel: any good FOSS security projects in ruby out there?
[11:20:52] ResidentBiscuit: has joined #ruby
[11:31:04] rc48: has joined #ruby
[11:31:23] ResidentBiscuit: has joined #ruby
[11:35:16] tvw: has joined #ruby
[11:36:09] bkxd: has joined #ruby
[11:40:48] bvcosta: has joined #ruby
[11:45:29] mostlybadfly: has joined #ruby
[11:47:03] rohitpaulk: has joined #ruby
[11:48:03] rohitpaulk: has joined #ruby
[11:50:43] belmoussaoui: has joined #ruby
[11:53:06] manveru: uZiel: like metasploit?
[11:53:20] roamingdog: has joined #ruby
[11:53:21] manveru: or more like bundle-audit
[11:55:05] cdg: has joined #ruby
[11:55:09] Jameser: has joined #ruby
[11:57:35] govg: has joined #ruby
[12:00:30] ldnunes: has joined #ruby
[12:00:57] Jameser: has joined #ruby
[12:01:06] opencw: has joined #ruby
[12:01:50] chopin: has joined #ruby
[12:02:05] cschneid_: has joined #ruby
[12:07:27] gigetoo: has joined #ruby
[12:08:35] uZiel: yeah something like that, I want to contribute to OSS (security) but hate java
[12:09:47] uZiel: manveru: ^
[12:10:15] dminuoso: uZiel: metasploit.
[12:15:47] belmoussaoui: has joined #ruby
[12:16:20] rc48: has joined #ruby
[12:23:49] nobitanobi: has joined #ruby
[12:28:32] rc48: has joined #ruby
[12:31:42] konsolebox: i find that you'll only have passion to understand metasploit, if there's something you'd truly want to breach - and there's nothing in the world worth doing it. using it to hack-proof your system is boring.
[12:32:54] qba73: has joined #ruby
[12:35:58] jane_booty_doe2: has joined #ruby
[12:36:31] dminuoso: konsolebox: That applies to most software projects.
[12:36:40] dminuoso: You contribute because you either love or use the software.
[12:36:41] Seenox: has joined #ruby
[12:38:01] konsolebox: yes i'm not saying anything against that
[12:38:16] workmad3: has joined #ruby
[12:43:39] pankaj: has joined #ruby
[12:44:15] doublemalt_: has joined #ruby
[12:46:09] dviola: has joined #ruby
[12:53:39] im0nde: has joined #ruby
[13:00:54] mdw: has joined #ruby
[13:03:11] valentin: has joined #ruby
[13:03:46] mim1k: has joined #ruby
[13:06:27] qba73: has joined #ruby
[13:22:33] iamayam: has joined #ruby
[13:23:21] kanutux: has joined #ruby
[13:27:00] Jakaria: has joined #ruby
[13:27:50] roshanavand: has joined #ruby
[13:29:17] rc48: has joined #ruby
[13:30:38] Cohedrin: has joined #ruby
[13:40:56] GodFather: has joined #ruby
[13:41:45] sepp2k: has joined #ruby
[13:46:03] apparition: has joined #ruby
[13:46:28] spheric: has joined #ruby
[13:53:06] oleo: has joined #ruby
[13:53:31] ltem: has joined #ruby
[13:58:31] cdg: has joined #ruby
[14:03:15] mim1k: has joined #ruby
[14:03:20] chopin: has joined #ruby
[14:04:08] ur5us: has joined #ruby
[14:06:31] qba73: has joined #ruby
[14:06:37] DoubleMalt: has joined #ruby
[14:07:23] ResidentBiscuit: has joined #ruby
[14:08:59] marr123: has joined #ruby
[14:14:31] jusa: has joined #ruby
[14:24:38] kanutux: has joined #ruby
[14:24:39] guardianx: has joined #ruby
[14:26:03] kanutux: has joined #ruby
[14:28:40] kanutux: has joined #ruby
[14:30:29] kanutux: has joined #ruby
[14:32:13] kanutux: has joined #ruby
[14:32:30] Trynemjoel: has joined #ruby
[14:33:44] kanutux: has joined #ruby
[14:36:18] Pongles: has left #ruby: ("Leaving")
[14:36:21] planigan: has joined #ruby
[14:36:57] j2k: has joined #ruby
[14:38:05] rc48: has joined #ruby
[14:39:22] jaruga________: has joined #ruby
[14:41:31] mim1k: has joined #ruby
[14:44:48] nobitanobi: has joined #ruby
[14:48:34] ResidentBiscuit: has joined #ruby
[14:54:13] uZiel: is ruby pass-by-value or pass-by-reference?
[14:55:45] mark_66: has left #ruby: ("PART #elixir-lang :PART #crystal-lang :QUIT :Leaving.")
[14:56:43] leah2: pass-by-value, but all non-primitive objects are represented as references :)
[14:57:31] uZiel: ah okay, that's the glitch
[14:57:42] uZiel: my array gets modified after returning from the function
[14:58:02] leah2: yes, you need to .dup it if you want to modify it without anyone noticing
[15:01:39] cschneid_: has joined #ruby
[15:02:08] rippa: has joined #ruby
[15:02:38] iamayam: has joined #ruby
[15:03:04] roshanavand: has joined #ruby
[15:05:10] uZiel: has joined #ruby
[15:06:30] hays: has joined #ruby
[15:06:31] qba73: has joined #ruby
[15:06:56] marr: has joined #ruby
[15:14:29] jrafanie: has joined #ruby
[15:17:19] shinnya: has joined #ruby
[15:18:04] BSaboia: has joined #ruby
[15:18:25] yqt: has joined #ruby
[15:18:41] kanutux: has joined #ruby
[15:20:03] ResidentBiscuit: has joined #ruby
[15:20:15] chalkmonster: has joined #ruby
[15:23:51] gothicsouth: has joined #ruby
[15:23:53] Bish: i don't remember
[15:24:04] Bish: was there a method of Hash that retrives the value if the key exists, and returns the key otherwise
[15:24:14] Bish: so that {"test"=>3}["test"] == 3
[15:24:29] Bish: and {"test"=>3}["testx"] == "testx"
[15:25:32] roshanavand: has joined #ruby
[15:25:33] roshanavand: has left #ruby: ()
[15:26:01] go|dfish: Bish: .fetch() can take a default value e.g. .fetch('testx', 'testx')
[15:28:05] __Yiota: has joined #ruby
[15:28:06] vondruch: has joined #ruby
[15:32:38] apeiros: uZiel: adding to what leah2 said - all those objects which are not represented as references (called "immediates") are immutable and have the same size as what's used to reference objects. i.e. it doesn't matter.
[15:32:55] vondruch: has joined #ruby
[15:33:16] apeiros: and IMO even though it's technically pass-by-value, you can consider it to be pass-by-reference. as that's how it practically behaves.
[15:37:14] brent__: has joined #ruby
[15:37:28] __Yiota: has joined #ruby
[15:40:48] leah2: it's not pass-by-reference since def foo(a); a=6; end doesnt work :)
[15:46:05] apeiros: ok, given that that's how languages where the term originates from work - valid point
[15:46:48] apeiros: but IMO just goes to show how badly those terms fit. depends entirely on what is being referenced.
[15:49:29] falcon10: has joined #ruby
[15:49:47] falcon10: has left #ruby: ()
[15:49:53] aufi: has joined #ruby
[15:49:58] havenwood: When the values you're passing are references the distinction blurs.
[15:50:49] ResidentBiscuit: has joined #ruby
[15:51:29] havenwood: uZiel: Neither, it's pass-by-object ;-P.
[15:51:30] apeiros: let's phrase it this way: arguments passed around in ruby are not copied (not talking about MRI's implementation there)
[15:51:32] edgr: has joined #ruby
[15:52:07] havenwood: Yeah, the question makes a lot more sense in C++.
[15:52:49] CacoS: has joined #ruby
[15:53:36] havenwood: "When you pass an object to a method in Ruby, it is an object reference that is passed to the method. It is not the object itself, and it is not a reference to the reference to the object."
[15:53:55] havenwood: "Another way to say this is that method arguments are passed by value rather than by reference, but that the values passed are object references."
[15:53:56] havenwood: ~ The Ruby Programming Language
[15:53:57] havenwood: (The Sparrows.)
[15:55:27] dionysus69: has joined #ruby
[15:56:04] yxhuvud: (and then we have the corner case when the value is stored in the reference itself, and hence copied. Values like integers, floats and booleans)
[15:56:20] gizmore|2: or even tiny strings?
[15:56:49] __Yiota: has joined #ruby
[15:57:13] havenwood: http://patshaughnessy.net/2012/1/4/never-create-ruby-strings-longer-than-23-characters
[15:58:20] cdg: has joined #ruby
[15:58:35] roamingdog: has joined #ruby
[15:58:57] gizmore|2: interesting... up to 23chars is a trickery string... i was expecting 3 chars only :)
[16:00:44] Papierkorb: Wild guess: 23 chars + 1 NUL byte + 8 byte for some pointer makes it 32Bytes.
[16:01:23] Ishido: has joined #ruby
[16:02:05] Papierkorb: > The value of RSTRING_EMBED_LEN_MAX was chosen to match the size of the len/ptr/capa values. That’s where the 23 limit comes from.
[16:02:06] roshanavand: has joined #ruby
[16:02:09] Papierkorb: Well that was simple
[16:05:04] Cohedrin: has joined #ruby
[16:05:15] ur5us: has joined #ruby
[16:05:49] patr0clus: has joined #ruby
[16:07:01] roshanavand: has joined #ruby
[16:07:22] Guest58547: has left #ruby: ("bye folks")
[16:08:08] ruurd: has joined #ruby
[16:10:55] cdg: has joined #ruby
[16:12:38] nobitanobi: has joined #ruby
[16:13:06] oleo: has joined #ruby
[16:17:34] oleo: has joined #ruby
[16:20:26] oleo: has joined #ruby
[16:20:54] jrafanie: has joined #ruby
[16:21:45] djbkd: has joined #ruby
[16:21:59] ResidentBiscuit: has joined #ruby
[16:22:49] TomyLobo: has joined #ruby
[16:25:16] rohitpaulk: has joined #ruby
[16:25:36] apeiros: Yxhuvud: you're late. already mentioned (immediates is the name)
[16:27:11] cam27: has joined #ruby
[16:28:21] rohitpaulk: has joined #ruby
[16:29:17] agent_white: has joined #ruby
[16:29:18] rgr: has joined #ruby
[16:30:04] rgr: has joined #ruby
[16:30:10] ikoma: has joined #ruby
[16:31:42] kmhn: has joined #ruby
[16:31:46] Talltree: has joined #ruby
[16:32:55] djbkd: has joined #ruby
[16:35:07] eightlimbed: has joined #ruby
[16:55:57] mjolnird: has joined #ruby
[16:57:20] LastWhisper____: has joined #ruby
[16:59:32] DLSteve: has joined #ruby
[17:00:54] t-recx: has joined #ruby
[17:01:17] mim1k: has joined #ruby
[17:03:26] chopin: has joined #ruby
[17:03:31] ResidentBiscuit: has joined #ruby
[17:09:09] Dark_Arc: has joined #ruby
[17:09:23] gothicsouth: has joined #ruby
[17:11:14] mim1k: has joined #ruby
[17:15:32] djbkd: has joined #ruby
[17:18:09] Dimik: has joined #ruby
[17:21:00] mim1k: has joined #ruby
[17:27:26] ldnunes: has joined #ruby
[17:28:12] ResidentBiscuit: has joined #ruby
[17:28:14] mikkel-: has joined #ruby
[17:30:54] mim1k: has joined #ruby
[17:32:50] uZiel: has joined #ruby
[17:33:26] hays: has joined #ruby
[17:33:26] hays: has joined #ruby
[17:34:26] uZiel: sorry guys, got disconnected
[17:35:06] uZiel: thanks leah2 apeiros havenwood
[17:35:34] Emmanuel_Chanel: has joined #ruby
[17:36:26] uZiel: my array was getting modified after return from the function, I wrote this earlier too, don't know if it got through or not because of the connection :/
[17:37:31] uZiel: will have to modify all the functions now to make a copy of the argument before operating on them
[17:37:56] oleo: has joined #ruby
[17:39:06] ResidentBiscuit: has joined #ruby
[17:40:43] mim1k: has joined #ruby
[17:40:58] cdg: has joined #ruby
[17:50:31] craysiii: hello everyone. it's been quite a while since i've used ruby, but im working on a pet project and can't seem to include a certain class inside my main module. https://gist.github.com/craysiii/9b675ff6c8769d9d6933e88ed9cd9e34 i seemingly have no issue including my first plugin class into the same module, but for some reason "Manager" does not want to come
[17:50:32] craysiii: through and I get a "uninitialized constant RolePlayAgent::Manager (NameError)
[17:50:32] craysiii: ". any ideas?
[17:50:33] mim1k: has joined #ruby
[17:53:25] dionysus69: is there a clean way to get script home dir? like Rails.dir ?
[17:53:28] havenwood: craysiii: It's the same thing if you put the require_relative at the top of the file. It doesn't affect the namespace.
[17:53:54] havenwood: dionysus69: Dir.home
[17:53:55] havenwood: dionysus69: Oh, I misread.
[17:53:55] sagax: has joined #ruby
[17:54:34] havenwood: dionysus69: Is it __dir__ you're looking for?: https://ruby-doc.org/core/Kernel.html#method-i-__dir__
[17:54:36] dionysus69: so there is none right? I would just call system "pwd" perhaps?
[17:55:03] ldnunes: has joined #ruby
[17:55:04] havenwood: dionysus69: There are multiple options, including `__dir__` or `Dir.pwd`.
[17:55:59] dionysus69: oh that's what I was looking for i guess thanks allot :)
[17:56:01] havenwood: dionysus69: Do you want the current working directory or the directory of the path of the file that's being run?
[17:56:07] havenwood: dionysus69: No prob.
[17:56:30] dionysus69: I ll just save Dir.pwd path to some project_root variable
[17:56:30] havenwood: dionysus69: You probably want __dir__.
[17:56:49] dionysus69: Dir.pwd and __dir__ would return same path in my case
[17:56:59] dionysus69: I am dealing with a single file scenario :)
[17:57:00] craysiii: thanks havenwood, i added the namespace to the Manager class declaration and it;s working now. I was avoiding trying that because my IDE was throwing an error, thought there might have been a different way.
[17:57:29] havenwood: craysiii: Nice, yeah that's the way to do it: class RolePlayAgent::Manager
[17:58:10] craysiii: I'm still a little confused though,because i am able to access PingPlugin through "RolePlayAgent::PingPlugin" even though it doesn't have the namespace
[17:59:22] Jakaria: has joined #ruby
[17:59:44] craysiii: do you think it could be because Object.get_const is just ignoring the namespace part of the string im passing it?
[18:00:23] craysiii: err I mean Object.const_get **
[18:00:27] mim1k: has joined #ruby
[18:00:42] pb122: has joined #ruby
[18:02:04] havenwood: >> module X; end; module Y; end; Object.const_get 'X::Y'
[18:02:05] ruby[bot]: havenwood: # => Y (https://eval.in/807186)
[18:02:41] bmurt: has joined #ruby
[18:03:04] craysiii: interesting... thanks a lot!
[18:03:10] havenwood: craysiii: My guess it it finds Y in the current context and returns it. It is odd indeed!
[18:03:35] havenwood: Checking the code, that's curious.
[18:04:06] havenwood: "If inherit is set, the lookup will also search the ancestors (and Object if mod is a Module.)"
[18:04:23] havenwood: >> module X; end; module Y; end; Object.const_get 'X::Y', false # craysiii
[18:04:24] ruby[bot]: havenwood: # => uninitialized constant X::Y ...check link for more (https://eval.in/807191)
[18:04:32] havenwood: Did you mean? Y
[18:05:54] ur5us: has joined #ruby
[18:06:31] craysiii: >> module X; module Y; end; end; Object.const_get 'X::Y', false
[18:06:32] ruby[bot]: craysiii: # => X::Y (https://eval.in/807192)
[18:06:32] havenwood: If it really is nested it will work with inherit set to false:
[18:06:54] havenwood: craysiii: \o/
[18:07:26] craysiii: Okay... now I must figure out how to get RubyMine to stop complaining about this namespace declared class lol. thanks once again!
[18:07:30] LastWhisper____: has joined #ruby
[18:08:16] tvw: has joined #ruby
[18:10:22] gothicsouth: has joined #ruby
[18:12:20] craysiii: ah. if i wrap the classes inside the module again instead of declaring it via :: then all is well :D
[18:13:11] nobitanobi: has joined #ruby
[18:16:58] glejeune: has joined #ruby
[18:17:49] dminuoso: craysiii: Do you also know *why* it is complaining?
[18:18:28] dminuoso: There's nothing inherently wrong with A::B (and I do it often to avoid silly indention) as long as you know the subtle implications it has.
[18:20:48] A124: has joined #ruby
[18:23:06] olivier__: has joined #ruby
[18:25:31] muelleme: has joined #ruby
[18:26:31] xco: has joined #ruby
[18:26:59] last_staff: has joined #ruby
[18:27:28] xco: i have an array like this array = %w[my name is em] is there a nice quick way for me to turn it to a hash like this? hashish = { my: 'my', name: 'name', is: 'is', bob: 'bob' }
[18:27:50] xco: i mean this hashish = { my: 'my', name: 'name', is: 'is', em: 'em' }
[18:29:17] elomatreb: >> %w[my name is em].map {|w| [w.to_sym, w] }.to_h
[18:29:18] ruby[bot]: elomatreb: # => {:my=>"my", :name=>"name", :is=>"is", :em=>"em"} (https://eval.in/807222)
[18:29:48] craysiii: dminuoso: no I don't, I would love to though :)
[18:30:47] mim1k: has joined #ruby
[18:30:55] cdg: has joined #ruby
[18:31:15] zapata: has joined #ruby
[18:31:28] ldnunes: has joined #ruby
[18:31:44] dminuoso: craysiii: https://cirw.in/blog/constant-lookup.html
[18:32:00] roamingdog: has joined #ruby
[18:32:23] dionysus69: just realized that everything one does through bash script, is also possible through ruby via system "" calls
[18:32:57] dionysus69: is ruby generally used in that way?
[18:33:41] dminuoso: craysiii: When you use A::B then "A" will not be part of the nesting, which means inside that A::B block, trying to use C, ruby will not even attempt to check A::C -> in most cases this is not even a serious issue as ruby will just toss some exception in your face.
[18:34:56] dminuoso: craysiii: In my opinion this fear of "using module A::B" is quite silly and leads to more indention - which harms readability, which in turns harms maintainability.
[18:35:27] havenwood: dionysus69: Sure, if the lack of portability is fine for your script, shell out.
[18:37:53] havenwood: dionysus69: It's fairly common if a POSIX system can be assumed.
[18:38:21] havenwood: >> Hash[*%w[my name is em]].invert.transform_values(&:to_sym).invert
[18:38:22] ruby[bot]: havenwood: # => undefined method `transform_values' for {"name"=>"my", "em"=>"is"}:Hash (NoMethodError) ...check link for more (https://eval.in/807232)
[18:38:53] havenwood: Ruby 2.4: #=> {:my=>"name", :is=>"em"}
[18:39:16] havenwood: Seems like #transform_keys should be a thing too. I know there's an issue open for it. Seems likely in 2.5.
[18:41:06] ResidentBiscuit: has joined #ruby
[18:41:22] dionysus69: havenwood: what do you mean by POSIX?
[18:42:06] dionysus69: you mean UNIX like systems?
[18:42:37] havenwood: dionysus69: POSIX "defines a standard operating system interface and environment, including a command interpreter (or “shell”), and common utility programs to support applications portability at the source code level."
[18:42:54] havenwood: dionysus69: Think BSD, macOS, Linux.
[18:43:01] havenwood: Windows Subsystem for Linux
[18:43:30] dionysus69: trying to support windows in any kind of software means duplicating work
[18:43:35] havenwood: dionysus69: For example, sh, bash, ksh, zsh, etc are POSIXy while Fish isn't.
[18:44:09] dionysus69: i've only had whatever experience with bash
[18:44:55] chopin: has joined #ruby
[18:44:56] jenrzzz: has joined #ruby
[18:45:46] ResidentBiscuit: has joined #ruby
[18:48:25] jrafanie: has joined #ruby
[18:51:22] mim1k: has joined #ruby
[18:51:37] craysiii: thanks dminuoso i will check it out
[18:53:50] mrconfused: has joined #ruby
[18:57:04] _sfiguser: has joined #ruby
[18:57:15] gothicsouth: has joined #ruby
[19:03:15] xco: has joined #ruby
[19:03:21] xco: elomatreb: thanks ;)
[19:03:26] rkazak: has joined #ruby
[19:10:18] Cohedrin: has joined #ruby
[19:11:57] mim1k: has joined #ruby
[19:13:53] ldnunes: has joined #ruby
[19:14:58] eightlimbed: has joined #ruby
[19:15:29] andrzejku: has joined #ruby
[19:16:09] Cohedrin: has joined #ruby
[19:24:02] patr0clus: has joined #ruby
[19:24:09] yqt: has joined #ruby
[19:24:36] mrconfused: has joined #ruby
[19:28:43] TomyLobo2: has joined #ruby
[19:31:21] _sfiguser: has joined #ruby
[19:33:26] ResidentBiscuit: has joined #ruby
[19:35:25] gizmore: has joined #ruby
[19:36:50] jgnagy: has joined #ruby
[19:41:33] ldnunes: has joined #ruby
[19:43:56] mim1k: has joined #ruby
[19:46:39] lxsameer: has joined #ruby
[19:46:56] gothicsouth: has joined #ruby
[19:52:12] roamingdog: has joined #ruby
[19:52:55] sundhell: has joined #ruby
[19:53:20] redondos: has joined #ruby
[19:54:04] vuoto: has joined #ruby
[19:57:03] Danny: has joined #ruby
[20:04:31] ResidentBiscuit: has joined #ruby
[20:04:33] ur5us: has joined #ruby
[20:05:47] quobo: has joined #ruby
[20:06:48] rohitpaulk: has joined #ruby
[20:09:18] LightStalker: has joined #ruby
[20:09:47] robouk: has joined #ruby
[20:10:03] roshanavand: has joined #ruby
[20:13:55] nobitanobi: has joined #ruby
[20:19:29] romank: has joined #ruby
[20:20:50] chopin: has joined #ruby
[20:23:24] romank: has joined #ruby
[20:24:48] jgnagy: has joined #ruby
[20:27:35] enterprisey: has joined #ruby
[20:27:59] nowhere_man: has joined #ruby
[20:29:05] perniciouscaffei: has joined #ruby
[20:30:41] mrconfused: has joined #ruby
[20:31:08] Murda: has joined #ruby
[20:31:58] TomyLobo2: has joined #ruby
[20:35:08] gothicsouth: has joined #ruby
[20:36:04] ResidentBiscuit: has joined #ruby
[20:38:38] xco: has left #ruby: ()
[20:40:06] olivier__: has joined #ruby
[20:41:32] olivier__: has joined #ruby
[20:42:50] ldnunes: has joined #ruby
[20:45:21] olivier__: has joined #ruby
[20:45:38] gheegh: has joined #ruby
[20:46:50] ResidentBiscuit: has joined #ruby
[20:46:55] chopin: has joined #ruby
[20:47:28] eightlimbed: has joined #ruby
[20:50:55] mim1k: has joined #ruby
[20:57:58] Cohedrin: has joined #ruby
[20:58:22] nadir: has joined #ruby
[21:01:07] brent__: has joined #ruby
[21:03:54] insidious15: has joined #ruby
[21:04:01] milardovich: has joined #ruby
[21:06:23] gothicsouth: has joined #ruby
[21:06:56] mim1k: has joined #ruby
[21:06:59] insidious15: anybody have exp with vagrant? getting some weird error: https://pastebin.com/XTxBF6cX
[21:07:01] ruby[bot]: insidious15: we in #ruby do not like pastebin.com, I reposted your paste to gist for you: https://gist.github.com/f0dc2da641ea2d03206bf9b0673307ef
[21:07:03] ruby[bot]: insidious15: pastebin.com loads slowly for most, has ads which are distracting and has terrible formatting.
[21:07:21] insidious15: oh, ok ruby[bot] thanks
[21:07:54] tristanp: has joined #ruby
[21:11:40] bvcosta: has joined #ruby
[21:12:09] Gucciferal: has joined #ruby
[21:13:50] mim1k: has joined #ruby
[21:14:13] milardovich: has joined #ruby
[21:21:02] LastWhisper____: has joined #ruby
[21:23:02] milardovich: has joined #ruby
[21:28:09] ResidentBiscuit: has joined #ruby
[21:29:59] jusa: has joined #ruby
[21:32:05] armyriad: has joined #ruby
[21:34:47] shamrock: has joined #ruby
[21:35:18] ur5us: has joined #ruby
[21:45:02] duderonomy: has joined #ruby
[21:47:57] GodFather: has joined #ruby
[21:48:49] eightlimbed: i have an array: [[true, ["7", "5"]], [false, ["N", "u", "m", "b", "e", "r"]], [true, ["0"]]]
[21:49:37] eightlimbed: how can use .select to select only the subarrays that are true? ["7", "5"] and ["0"]
[21:50:05] eightlimbed: doesn't have to be .select. I just want to get those arrays
[21:51:20] cerulean: check in your block function if it is those values
[21:51:33] zenspider: select then map would be clean and clear
[21:52:24] zenspider: >> [[true, ["7", "5"]], [false, ["N", "u", "m", "b", "e", "r"]], [true, ["0"]]].find_all { |(a, b)| a }.map(&:last)
[21:52:25] ruby[bot]: zenspider: # => [["7", "5"], ["0"]] (https://eval.in/807252)
[21:53:19] zenspider: looks like you're lexing... if so, there are better tools out there
[21:54:04] eightlimbed: zenspider: very nice :)
[21:55:17] eightlimbed: i'm working with a string, something like "88words9morewords10!" and i want to add up all the numbers. In this case I want to return 107, not 26, because consecutive numbers hold
[21:55:33] eightlimbed: I used .chunk to get that array
[21:56:06] zenspider: that's way overkill
[21:56:23] zenspider: "I want to add up all the numbers" ... so add up all the numbers
[21:56:33] zenspider: first, get all the numbers
[21:56:34] zenspider: >> "88words9morewords10!".scan(/\d+/)
[21:56:35] ruby[bot]: zenspider: # => ["88", "9", "10"] (https://eval.in/807254)
[21:56:41] zenspider: then make them numbers
[21:56:49] zenspider: >> "88words9morewords10!".scan(/\d+/).map(&:to_i)
[21:56:50] ruby[bot]: zenspider: # => [88, 9, 10] (https://eval.in/807255)
[21:56:55] zenspider: then add them
[21:56:59] zenspider: >> "88words9morewords10!".scan(/\d+/).map(&:to_i).inject(&:+)
[21:57:00] ruby[bot]: zenspider: # => 107 (https://eval.in/807256)
[21:57:30] milardovich: has joined #ruby
[21:57:30] zenspider: say what you want to do, then do it... that's what ruby is for
[21:57:45] eightlimbed: i haven't learned regular expressions yet.. i guess i should start!
[21:58:09] zenspider: they're a pain, but very useful
[21:59:58] ResidentBiscuit: has joined #ruby
[22:00:21] eightlimbed: zenspider: thank you for your help :)
[22:02:56] top4o: has joined #ruby
[22:05:19] zacts: has joined #ruby
[22:09:00] ledestin: has joined #ruby
[22:09:20] marr123: has joined #ruby
[22:15:20] millerti: has joined #ruby
[22:18:28] Authenticator: has joined #ruby
[22:19:12] stormbytes: has joined #ruby
[22:20:13] Authenticator: I'm having trouble with BinData, describing a .zip structure. The hard bit is the variable-length array of "extra" data. The format is NameLen, ExtraLen, Name, [[ID, Len, Data], ...]
[22:20:49] mim1k: has joined #ruby
[22:21:09] Authenticator: I can write a record for a File's structure if I treat the extra data like a blob, but I can't figure out how to make an array of structures.
[22:25:42] Authenticator: Can anyone help me with this BinData Array problem?
[22:25:57] mrconfused: has joined #ruby
[22:26:39] claw: has joined #ruby
[22:30:41] cisco: has joined #ruby
[22:30:58] ResidentBiscuit: has joined #ruby
[22:31:51] nowhere_man: has joined #ruby
[22:42:45] vrlogrs: has joined #ruby
[22:43:00] vrlogrs: hi folks .. is there no #rails channel?
[22:43:06] vrlogrs: or is it invite only? :S
[22:45:03] chopin: has joined #ruby
[22:45:18] dgs: #rubyonrails?
[22:49:27] olivier__: has joined #ruby
[22:52:20] ResidentBiscuit: has joined #ruby
[22:53:00] oleingem_: has joined #ruby
[22:53:07] roamingdog: has joined #ruby
[22:59:27] olivier__: has joined #ruby
[23:00:09] kies: has joined #ruby
[23:00:20] im0nde: has joined #ruby
[23:03:15] Authenticator: Can anyone help walk me through making a variable-length array of variable-length structure with the BinData gem?
[23:05:18] vrlogrs: has left #ruby: ()
[23:07:23] Danny: has joined #ruby
[23:08:56] Pongles: has joined #ruby
[23:10:23] gothicsouth: has joined #ruby
[23:12:02] Pongles: Hey all, I am having trouble with a socket program I am making in ruby. https://gist.github.com/anonymous/5f66266bfec19e9294848088e87f3d8d In the loop after authenication, the "$:>" won't show up until after the user sends a message instead of before like it is in the script
[23:30:52] jusa: has joined #ruby
[23:33:46] HumbleBee: has joined #ruby
[23:34:13] Radar: Pongles: hi. Why the until client.eof? wrapping in the first place? What purpose does that serve?
[23:34:56] Pongles: Should kill the thread once the client is no longer connected no? It's suppose to mimic a terminal like telnet
[23:36:22] Radar: Pongles: that's going to wait until the client's connection closes until it sends the prompt.
[23:36:55] Pongles: that's not what it's done in practise
[23:37:09] Radar: Well that's what I can see it is clearly doing from the code.
[23:37:16] Radar: UNTIL the CLIENT EOF's...
[23:37:57] Pongles: until the client closes connection, keep looping, yes
[23:38:07] Radar: I don't see a loop anywhere.
[23:38:17] Pongles: UNTIL is a loop...
[23:38:26] Radar: Oh yes sorry.
[23:40:03] Radar: If ios is a stream such as pipe or socket, IO#eof? blocks until the other end sends some data or closes it.
[23:40:07] Radar: On the documentation for eof? So it's blocking.
[23:44:42] Radar: I can't work out a way to do it. I was considering checking .closed?, but then the `gets` blocks.
[23:46:22] al2o3-cr: #closed? should do it, no?
[23:47:16] Radar: al2o3-cr: Then the `gets` blocks.
[23:47:24] Radar: Try it yourself.
[23:47:33] Radar: https://gist.github.com/radar/7dbc4532aabc7d9bf53b4f6aaf13b081
[23:47:39] Radar: Could probably get around it by implementing a timeout on the socket.
[23:47:50] Radar: http://www.mikeperham.com/2009/03/15/socket-timeouts-in-ruby/
[23:47:56] Radar: Or https://spin.atomicobject.com/2013/09/30/socket-connection-timeout-ruby/
[23:48:07] rgr: has joined #ruby
[23:49:09] al2o3-cr: i was thinking until client.closed? ...
[23:49:59] Pongles: So why did that affect the order of the gets and puts/print?
[23:50:11] Pongles: it's working in the proper order now
[23:51:56] Radar: [09:40:01] <Radar> If ios is a stream such as pipe or socket, IO#eof? blocks until the other end sends some data or closes it.
[23:51:58] Radar: [09:40:05] <Radar> On the documentation for eof? So it's blocking.
[23:51:59] Radar: Pongles: ^
[23:52:17] Pongles: oh sorry, I missed that
[23:53:29] enterprisey: has joined #ruby
[23:54:04] FastJack: has joined #ruby
[23:55:41] Pongles: well, thank you both, Radar, al2o3-cr, for helping me with the issue
[23:57:05] alveric3: has joined #ruby
[23:59:32] brent__: has joined #ruby
[23:59:34] Danny: has joined #ruby