« Back to channel list

#ruby - 26 February 2016

« Back 1 day Forward 1 day »
[00:01:36] shevy: oh my god https://github.com/Aviio/SecGen/blob/master/lib/templates/report.erb
[00:01:52] Aviio: oh god yeah thats going ASAP
[00:02:00] Aviio: just going to return the xml/json instead of that shite
[00:02:23] floatingpoint: has joined #ruby
[00:03:00] shevy: https://github.com/Aviio/SecGen/blob/master/system.rb
[00:03:10] Aviio: yeah its mental isnt it
[00:03:16] shevy: it's bad but at least he added some comments, and I think he can not be a total noob because of already using some classes at least
[00:03:30] uglybandersnatch: has joined #ruby
[00:03:34] Radar: Do spaces cost or something
[00:03:52] shevy: class variables tend to steer semi-newcomers ... if defined? @@networks; return @@networks ... weird code
[00:04:20] Aviio: Some of this was actually re-written by someone at the university
[00:04:31] Aviio: one of the lecturers tried to make it more... readable.
[00:04:45] shevy: Aviio well you are brave, I even hate rewriting my own old awful code, I could not get to fix someone else's awful code :)
[00:04:58] darkf: has joined #ruby
[00:04:59] shevy: aha, more spaghetti patches!
[00:05:37] _djbkd: has joined #ruby
[00:05:43] Aviio: shevy: im supposed to be adding vulnerable website generation to this process for my final year project, so im kinda saving myself headaches further down the line
[00:05:51] symm-: has joined #ruby
[00:06:04] sgambino: has joined #ruby
[00:06:27] Aviio: its a paid gig too, which is always a bonus
[00:09:07] gsilvapt: has joined #ruby
[00:09:44] MatthewsFace: has joined #ruby
[00:10:22] symm-_: has joined #ruby
[00:10:41] Aviio: Kinda annoying that I cant work on a single area of the application without everything else breaking
[00:11:52] llua: has left #ruby: ()
[00:11:54] llua: has joined #ruby
[00:12:33] uglybandersnatch: has left #ruby: ()
[00:12:34] duckpuppy: has joined #ruby
[00:13:16] ensyde_: has joined #ruby
[00:13:18] pawnbox: has joined #ruby
[00:14:03] blackmes1: has joined #ruby
[00:14:51] lemur: has joined #ruby
[00:15:31] _mak: has left #ruby: ("..")
[00:16:22] darix: Aviio: http://githubengineering.com/scientist/
[00:16:32] quakephil: has joined #ruby
[00:16:37] darix: Aviio: but in general ... if the app is that fragile the object model isnt right
[00:17:27] cpup: has joined #ruby
[00:17:48] NeckBeardPrince: has joined #ruby
[00:18:10] Aviio: 'fragile' is an understatement
[00:18:26] Aviio: imagine if you had a house built out of rice paper and sellotape
[00:18:36] Aviio: that house would be more stable than this code
[00:18:50] Ropeney: has joined #ruby
[00:19:13] kirillzh: has joined #ruby
[00:19:26] trinaldi: has joined #ruby
[00:19:40] jgpawletko: has joined #ruby
[00:19:52] sgambino: has joined #ruby
[00:22:11] godzillaenlacasa: has joined #ruby
[00:22:40] herminiotorres: has joined #ruby
[00:24:03] dlitvak: has joined #ruby
[00:24:24] samiux: has joined #ruby
[00:25:16] darkf: has joined #ruby
[00:26:17] stannard: has joined #ruby
[00:27:18] sp4rrow: has joined #ruby
[00:28:51] ta: has joined #ruby
[00:29:14] sdwrage: has joined #ruby
[00:30:05] dlitvak_: has joined #ruby
[00:30:12] bronson: has joined #ruby
[00:36:02] davedev24: has joined #ruby
[00:39:21] Azure: has joined #ruby
[00:39:59] Coldblackice: has joined #ruby
[00:41:50] dlitvak: has joined #ruby
[00:42:30] wldcordeiro: has joined #ruby
[00:43:06] pawnbox: has joined #ruby
[00:45:39] rbennacer: has joined #ruby
[00:45:45] aupadhye: has joined #ruby
[00:51:30] bricker: has joined #ruby
[00:51:49] sgambino: has joined #ruby
[00:52:04] LoneHerm_: has joined #ruby
[00:52:49] kam270: has joined #ruby
[00:54:36] duckpuppy: has joined #ruby
[00:54:42] lemur: has joined #ruby
[00:55:02] davedev24: has joined #ruby
[00:55:21] rbennacer: has joined #ruby
[00:55:59] Flakes: has joined #ruby
[00:56:28] cajone: has joined #ruby
[00:56:52] lemur: has joined #ruby
[00:57:42] cyclonis: has joined #ruby
[00:57:52] bronson: has joined #ruby
[01:00:21] sgambino: has joined #ruby
[01:01:25] NeverTired: has joined #ruby
[01:02:41] kobain: has joined #ruby
[01:03:00] chucky: has joined #ruby
[01:03:15] nettoweb: has joined #ruby
[01:03:49] sgambino: has joined #ruby
[01:03:53] davedev24: has joined #ruby
[01:04:59] Olipro: has joined #ruby
[01:05:31] steffes: has joined #ruby
[01:05:35] dlitvak: has joined #ruby
[01:07:56] Ebok: has joined #ruby
[01:10:13] elifoster: has joined #ruby
[01:12:07] mattwildig: has joined #ruby
[01:12:45] sgambino: has joined #ruby
[01:16:44] sgambino: has joined #ruby
[01:19:02] steffkes: has joined #ruby
[01:20:12] compyoyo123: has joined #ruby
[01:20:19] Jeremy1023: has joined #ruby
[01:20:25] dopamean_: has joined #ruby
[01:23:04] pawnbox: has joined #ruby
[01:26:42] freddief: has joined #ruby
[01:27:02] alexishuard: has joined #ruby
[01:28:25] freddief: has left #ruby: ()
[01:30:56] sgambino: has joined #ruby
[01:31:05] Rodya_: has joined #ruby
[01:31:07] kfpratt: has joined #ruby
[01:31:52] dopie: has joined #ruby
[01:32:37] bricker: has joined #ruby
[01:33:27] nettoweb: has joined #ruby
[01:36:35] kirillzh: has joined #ruby
[01:36:48] DonOtreply: has joined #ruby
[01:42:21] Graphettion: has joined #ruby
[01:42:37] sgambino: has joined #ruby
[01:46:28] rakm: has joined #ruby
[01:47:35] nando293921: has joined #ruby
[01:47:47] jenrzzz: has joined #ruby
[01:49:55] nettoweb: has joined #ruby
[01:50:47] lessless: has joined #ruby
[01:52:38] sgambino: has joined #ruby
[01:53:00] pawnbox: has joined #ruby
[01:55:39] TomPeed: has joined #ruby
[01:56:59] Ox0dea: pipework: Do you use Urbit?
[01:58:06] sanguisdex: has joined #ruby
[02:01:26] kfpratt: has joined #ruby
[02:03:15] duckpuppy: has joined #ruby
[02:05:35] BTRE: has joined #ruby
[02:07:43] araujo_: has joined #ruby
[02:08:09] Guest34101: has joined #ruby
[02:10:06] Rodya_: has joined #ruby
[02:11:13] dlitvak: has joined #ruby
[02:12:09] steffes: has joined #ruby
[02:12:45] toretore: has joined #ruby
[02:14:01] _djbkd: has joined #ruby
[02:16:00] baweaver: has joined #ruby
[02:18:28] rodolfowtf: has joined #ruby
[02:18:51] mhenrixon: has joined #ruby
[02:19:11] dfockler: has joined #ruby
[02:20:52] augcesar: has joined #ruby
[02:21:52] bronson: has joined #ruby
[02:25:00] DLSteve: has joined #ruby
[02:26:37] diegoviola: has joined #ruby
[02:30:16] _djbkd: has joined #ruby
[02:30:39] ReK2: has joined #ruby
[02:30:39] ReK2: has joined #ruby
[02:37:39] Papierkorb: has joined #ruby
[02:38:24] Kang0: has joined #ruby
[02:38:45] baweaver: has joined #ruby
[02:38:54] rickmasta: has joined #ruby
[02:39:00] MatthewsFace: has joined #ruby
[02:42:55] pawnbox: has joined #ruby
[02:43:52] chipotle: has joined #ruby
[02:43:59] kies^: has joined #ruby
[02:44:11] safe: has joined #ruby
[02:46:56] dEPy: has joined #ruby
[02:48:39] PaulCapestany: has joined #ruby
[02:49:24] aryaching: has joined #ruby
[02:52:03] blackmes1: has joined #ruby
[02:53:19] goodcodeguy: has joined #ruby
[02:55:00] dlitvak: has joined #ruby
[02:57:35] ta: has joined #ruby
[02:59:00] eregi: has joined #ruby
[02:59:12] MatthewsFace: has joined #ruby
[03:00:11] jenrzzz: has joined #ruby
[03:04:07] duckpuppy: has joined #ruby
[03:04:18] bronson: has joined #ruby
[03:05:17] yfeldblum: has joined #ruby
[03:06:06] ptierno: has joined #ruby
[03:06:06] ptierno: has joined #ruby
[03:06:22] ptierno: has left #ruby: ()
[03:06:49] ptierno: has joined #ruby
[03:06:49] ptierno: has joined #ruby
[03:07:13] idefine: has joined #ruby
[03:07:17] Guest75590: has joined #ruby
[03:07:53] ptierno_: has joined #ruby
[03:08:46] DmitryBochkarev: has joined #ruby
[03:10:15] zacstewart: has joined #ruby
[03:10:22] Jeremy1023: has joined #ruby
[03:11:26] Azulinho: has joined #ruby
[03:11:50] Guest85: has joined #ruby
[03:12:41] pawnbox: has joined #ruby
[03:17:57] duckpuppy: has joined #ruby
[03:18:53] zacstewa1t: has joined #ruby
[03:20:44] krzkrzkrz: has joined #ruby
[03:21:22] MatthewsFace: has joined #ruby
[03:22:15] cpup: has joined #ruby
[03:22:39] zenergi: has joined #ruby
[03:23:21] Rodya_: has joined #ruby
[03:23:24] TheMoonMaster: has joined #ruby
[03:24:49] ptierno: has joined #ruby
[03:24:59] steffes: has joined #ruby
[03:30:47] chipotle: has joined #ruby
[03:35:56] adgtl: has joined #ruby
[03:37:44] chipotle: has joined #ruby
[03:39:53] aryaching: has joined #ruby
[03:40:02] Kryptonical: has joined #ruby
[03:40:11] eregi: has joined #ruby
[03:41:55] rodolfowtf: has joined #ruby
[03:43:27] rbennacer: has joined #ruby
[03:45:27] bb010g: has joined #ruby
[03:45:28] devbug: has joined #ruby
[03:45:58] fedexo: has joined #ruby
[03:50:01] jgpawletko: has joined #ruby
[03:52:39] pawnbox: has joined #ruby
[03:52:42] ramfjord: has joined #ruby
[03:53:45] ensyde_: has joined #ruby
[03:55:05] hxegon: has joined #ruby
[03:55:07] blackmes1: has joined #ruby
[03:55:21] lpvb: has joined #ruby
[03:55:25] _djbkd: has joined #ruby
[03:55:29] jonee: has joined #ruby
[03:55:32] aryaching: has joined #ruby
[03:59:03] ta: has joined #ruby
[04:02:54] The_Phoenix: has joined #ruby
[04:10:39] uglybandersnatch: has joined #ruby
[04:11:25] auzty: has joined #ruby
[04:12:17] auzty: has joined #ruby
[04:14:01] DmitryBochkarev: has joined #ruby
[04:15:37] braincrash: has joined #ruby
[04:17:12] DmitryBochkarev: has joined #ruby
[04:17:27] steffkes: has joined #ruby
[04:17:27] steffkes: has joined #ruby
[04:18:17] zast: has joined #ruby
[04:20:27] gix: has joined #ruby
[04:21:54] bronson: has joined #ruby
[04:24:44] perturbation: has joined #ruby
[04:25:57] duckpuppy: has joined #ruby
[04:26:21] skweek: has joined #ruby
[04:27:00] sauvin: has joined #ruby
[04:27:46] baweaver: has joined #ruby
[04:31:59] dlitvak: has joined #ruby
[04:32:47] pawnbox: has joined #ruby
[04:32:48] uglybandersnatc-: has joined #ruby
[04:33:45] smolny: has left #ruby: ()
[04:34:17] jenrzzz: has joined #ruby
[04:35:16] mattwildig: has joined #ruby
[04:36:48] kfpratt: has joined #ruby
[04:37:15] elifoster: has joined #ruby
[04:42:17] william3: has joined #ruby
[04:42:45] devbug_: has joined #ruby
[04:42:46] chouhoul_: has joined #ruby
[04:43:32] kirillzh: has joined #ruby
[04:44:14] rbennacer: has joined #ruby
[04:47:38] stannard: has joined #ruby
[04:52:09] MatthewsFace: has joined #ruby
[04:53:32] quazimodo: has joined #ruby
[04:54:05] quazimodo: I know we can do Struct.new "NameOfStruct" and we can do SomeStruct = Struct.new(:foo, :bar) but how do we do AnethrStruct = Struct.new without any of those arguments
[04:54:17] pawnbox: has joined #ruby
[04:58:07] blackmes1: has joined #ruby
[05:00:35] ta: has joined #ruby
[05:01:27] pawnbox: has joined #ruby
[05:08:22] ruby[bot]: it seems like you are asking for a specific solution to a problem, instead of asking about your problem. This often leads to bad solutions and increases frustration for you and those trying to help you. More: http://meta.stackexchange.com/a/66378
[05:08:42] blackgoat: has joined #ruby
[05:09:56] Ox0dea: quazimodo: You want... a Struct with no fields?
[05:11:45] pawnbox: has joined #ruby
[05:14:28] quazimodo: Ox0dea: Struct.new "DummyApp" do def call(*args) end
[05:14:38] quazimodo: Ox0dea: https://gist.github.com/anonymous/cde057ac0e760ae5cf83
[05:15:14] Ox0dea: I'm inclined to agree with Line 14.
[05:15:37] quazimodo: Ox0dea: i guess I overthought it, as usual )
[05:16:00] Ox0dea: quazimodo: I think I kinda see what you were going for, but it's just not the right abstraction.
[05:16:33] quazimodo: I wanted a throw away dummy for testing
[05:16:38] quazimodo: but it's ok, iall use a throw away class
[05:16:40] Ox0dea: Classes are cheap.
[05:16:50] quazimodo: now to figure out how to send files using rack middleware *yay*
[05:17:10] Ox0dea: Er, how to simulate sending them, no?
[05:17:35] neanderslob_: has joined #ruby
[05:18:00] Ox0dea: Or did you not mean "testing" in the technical sense?
[05:18:55] steffkes: has joined #ruby
[05:19:45] baweaver: RSpec has doubles for a reason
[05:20:31] solocshaw1: has joined #ruby
[05:20:42] baweaver: they even throw up fails if they get something you didn't stub correctly, which is great for finding leaky unit tests
[05:20:59] uglybandersnatch: has joined #ruby
[05:21:49] RegulationD: has joined #ruby
[05:22:55] bronson: has joined #ruby
[05:23:18] yfeldblum: has joined #ruby
[05:23:28] bungoman: has joined #ruby
[05:26:41] duckpuppy: has joined #ruby
[05:26:57] eregi: has joined #ruby
[05:27:48] neanderslob: has joined #ruby
[05:28:15] recycle: has joined #ruby
[05:28:57] devbug: has joined #ruby
[05:29:39] recycle: has joined #ruby
[05:30:37] pawnbox: has joined #ruby
[05:37:18] uglybandersnatch: has joined #ruby
[05:37:53] chouhoulis: has joined #ruby
[05:41:02] Deck`: has joined #ruby
[05:46:04] quazimodo: Ox0dea: sorry i had to get lasagna
[05:46:24] Ox0dea: Scarcely cause for apology. :P
[05:46:41] quazimodo: Ox0dea: i wanted the dumy to do things like expect(dummy_app).to receive(:call).with(env)
[05:46:53] quazimodo: but now I'm moving to sending files from the middleware
[05:48:55] chipotle: has joined #ruby
[05:49:10] dEPy: has joined #ruby
[05:50:00] postmodern: has joined #ruby
[05:50:07] KnownSyntax: has joined #ruby
[05:52:12] Ox0dea: quazimodo: Actually moving them, or just stubbing that behavior?
[05:53:03] Rodya_: has joined #ruby
[05:55:35] quazimodo: Ox0dea: I'm not sure what you mean?
[05:56:27] quazimodo: in the tests i wanted to stub behaviour. But now i have finished that and am trying to figure out how I can write a middleware that sends a file in production mode, but actually builds the file on each request in development mode. I'm stuck at sending something atm :)
[05:56:31] quazimodo: reading Rack::File source
[05:56:37] Chau: has joined #ruby
[05:56:38] JohnBat26: has joined #ruby
[05:56:58] Ox0dea: I think you want Rack::Sendfile?
[05:58:28] quazimodo: Ox0dea: that one will take any file you're trying to send and offload that to apache/nginx
[05:59:00] quazimodo: so i may be able to use that afterwards to make rails do less work
[05:59:05] quazimodo: maybe not, though
[05:59:56] Ox0dea: It's what Rails already uses?
[06:00:52] skade: has joined #ruby
[06:01:04] blackmes1: has joined #ruby
[06:01:55] cajone: has joined #ruby
[06:02:31] dEPy: has joined #ruby
[06:02:40] quazimodo: it might be?
[06:02:47] quazimodo: i think you have to ask it to do that
[06:02:52] quazimodo: i vaguely recall
[06:03:01] Ox0dea: Well, yeah?
[06:03:17] Ox0dea: I hope your programs aren't doing things you (or somebody else) didn't ask them to.
[06:03:37] tvw: has joined #ruby
[06:03:59] trosborn: has joined #ruby
[06:04:19] statelesscode: has joined #ruby
[06:05:03] bricker: has joined #ruby
[06:08:53] baweaver: quazimodo: doubles
[06:10:09] Ox0dea: It feels like there's a lot of miscommunicating happening right meow.
[06:11:24] cjbottaro: has joined #ruby
[06:17:02] quazimodo: baweaver: i think I'd need to construct a double of a token rack middleware
[06:17:11] quazimodo: do you think it's a good idea?
[06:17:34] jonee: has joined #ruby
[06:21:10] william3: has joined #ruby
[06:22:01] bronson: has joined #ruby
[06:25:20] djbkd_: has joined #ruby
[06:27:25] duckpuppy: has joined #ruby
[06:32:35] adgtl: has joined #ruby
[06:32:52] Prawnzy: has joined #ruby
[06:33:42] KensoDev: has joined #ruby
[06:34:03] bkxd: has joined #ruby
[06:36:02] mattwildig: has joined #ruby
[06:38:01] aganov: has joined #ruby
[06:38:13] joonty: has joined #ruby
[06:38:32] skade: has joined #ruby
[06:42:12] intrigueD: has joined #ruby
[06:43:46] Cohedrin: has joined #ruby
[06:46:05] troulouliou_div2: has joined #ruby
[06:47:11] rbennacer: has joined #ruby
[06:47:30] lsmola: has joined #ruby
[06:50:22] steffkes: has joined #ruby
[06:50:22] steffkes: has joined #ruby
[06:50:52] stevemackinnon: has joined #ruby
[06:52:12] aufi: has joined #ruby
[06:52:45] astrobunny: has joined #ruby
[06:54:02] LoneHerm_: has joined #ruby
[06:54:32] Dimik: has joined #ruby
[06:55:51] _djbkd: has joined #ruby
[07:00:12] andikr: has joined #ruby
[07:00:16] _djbkd: has joined #ruby
[07:01:14] jolts: has joined #ruby
[07:02:00] jolts: has joined #ruby
[07:02:47] jolts: has joined #ruby
[07:03:19] yardenbar: has joined #ruby
[07:03:27] tAn: has joined #ruby
[07:03:34] jolts: has joined #ruby
[07:04:03] joonty: has joined #ruby
[07:04:19] blackmes1: has joined #ruby
[07:04:20] jolts: has joined #ruby
[07:05:06] jolts: has joined #ruby
[07:05:52] jolts: has joined #ruby
[07:05:55] ramfjord: has joined #ruby
[07:06:00] eregi: has joined #ruby
[07:06:47] william3: has joined #ruby
[07:07:26] ldg: has joined #ruby
[07:07:57] sandstrom: has joined #ruby
[07:08:24] adgtl: has joined #ruby
[07:08:24] adgtl: has joined #ruby
[07:08:32] jas02: has joined #ruby
[07:09:36] DoubleMalt: has joined #ruby
[07:09:51] mhoungbo: has joined #ruby
[07:09:57] htmldrum: has joined #ruby
[07:11:12] steffkes: has joined #ruby
[07:13:14] vdamewood: has joined #ruby
[07:14:27] eregi: has joined #ruby
[07:14:32] UtkarshRay: has joined #ruby
[07:15:03] dlitvak: has joined #ruby
[07:16:00] adgtl: has joined #ruby
[07:16:07] Xeago: has joined #ruby
[07:16:19] ur5us: has joined #ruby
[07:18:45] ensyde_: has joined #ruby
[07:19:09] solars: has joined #ruby
[07:20:40] adgtl: has joined #ruby
[07:20:52] Jagan_: has joined #ruby
[07:21:07] Jagan_: Can you please help me, mobile web automation using cucumber calabash
[07:21:11] Jagan_: using Ruby
[07:21:15] skade: has joined #ruby
[07:21:39] Jagan_: I want setup calabash for mobile web automation
[07:22:12] Jagan_: Can you please help me.
[07:22:45] eregi: has joined #ruby
[07:24:42] Jagan_: Can you please help me anybody
[07:26:37] Ishido: has joined #ruby
[07:28:11] duckpuppy: has joined #ruby
[07:29:08] ur5us: has joined #ruby
[07:29:28] slash_nick: Jagan_: i hadn't heard of calabash til now...
[07:29:43] Cohedrin: has joined #ruby
[07:30:19] Garo_: Jagan_: normal IRC culture is that you ask your question as well as possible and then you wait until somebody who knows notices your question.
[07:37:25] steffkes: has joined #ruby
[07:37:25] steffkes: has joined #ruby
[07:38:33] trosborn: has joined #ruby
[07:43:04] djbkd_: has joined #ruby
[07:43:19] jxs_: has joined #ruby
[07:44:08] firstdayonthejob: has joined #ruby
[07:45:37] anisha: has joined #ruby
[07:48:37] rbennacer: has joined #ruby
[07:51:34] firstdayonthejob: has joined #ruby
[07:51:39] mondok: has joined #ruby
[07:52:22] Xeago: has joined #ruby
[07:55:14] chipotle: has joined #ruby
[07:56:43] skade: has joined #ruby
[07:57:57] Kensei: has joined #ruby
[08:01:53] ptierno: has joined #ruby
[08:02:19] Deck`: has joined #ruby
[08:04:40] ferr: has joined #ruby
[08:05:03] tAn: has joined #ruby
[08:06:20] blackmes1: has joined #ruby
[08:06:34] chagel: has joined #ruby
[08:06:41] uglybandersnatch: has joined #ruby
[08:07:01] tomaz___: has joined #ruby
[08:07:23] slackbotgz: has joined #ruby
[08:08:32] mark1: has joined #ruby
[08:08:43] tomaz___: hi guys... i am really a newbie in ruby... i am trying to setup a Sensu monitoring platform which is using embedded ruby. it all works if i do it by hand... if i install new gem with calling gem command with full path to embedded dir
[08:09:24] tomaz___: and i get new files into the same directory where embedded gem is... and this is cool. i would like this to have it like this.
[08:09:40] whiteline: has joined #ruby
[08:09:40] dlitvak: has joined #ruby
[08:09:49] Jagan_: <Garo_> My question: Mobile web automation using calabash, is it possible?
[08:09:54] tomaz___: but i am trying to use Ansible for configuration... and are getting this error.
[08:10:38] tomaz___: "/opt/sensu/embedded/lib/ruby/2.2.0/rubygems/dependency.rb:315:in `to_specs': Could not find 'sensu-plugins-process-checks' (>= 0) among 42 total gem(s) (Gem::LoadError)"
[08:10:47] tomaz___: "Checked in 'GEM_PATH=/opt/sensu/embedded/lib/ruby/gems/2.2.0', execute `gem env` for more information"
[08:11:02] Jagan_: Is it possible means, can you please tell me the setup confirguration for calabash mobile web automation
[08:11:06] tomaz___: i would really appreciate some help
[08:12:49] codecop: has joined #ruby
[08:13:59] TomyWork: has joined #ruby
[08:18:13] cajone: has joined #ruby
[08:21:17] sandstrom: has joined #ruby
[08:22:18] Pumukel: has joined #ruby
[08:22:59] joonty: has joined #ruby
[08:23:33] kerunaru: has joined #ruby
[08:24:00] bronson: has joined #ruby
[08:24:34] scepticulous: has joined #ruby
[08:25:16] scepticulous: join #rubyonrails
[08:25:41] sepp2k: has joined #ruby
[08:26:59] jimcroft: has joined #ruby
[08:27:35] tAn: has joined #ruby
[08:28:02] Macaveli: has joined #ruby
[08:30:10] duckpuppy: has joined #ruby
[08:31:29] blackgoat: has joined #ruby
[08:36:08] manveru: Jagan_: what's calabash and what's mobile web automation?
[08:36:26] sandstrom: has joined #ruby
[08:36:55] mattwildig: has joined #ruby
[08:37:38] manveru: well, looks like calaba.sh shows it nicely :)
[08:37:44] manveru: and it uses cucumber, so yeah, that's with ruby
[08:38:11] manveru: just read the docs man: https://github.com/calabash/calabash-android
[08:40:35] dgncn: has joined #ruby
[08:41:38] slackbotgz: has joined #ruby
[08:42:26] edwinvdgraaf: has joined #ruby
[08:43:13] pawnbox: has joined #ruby
[08:43:25] Jagan_: <manveru> Generally Web automation Ruby cucumber framework using tool for Capybara
[08:43:47] Jagan_: Mobile automation Ruby cucumber framework using tool for Calabash
[08:44:13] manveru: jup, see the repo, it has all the infos you could ever want
[08:44:38] manveru: at least a lot more than this channel :)
[08:44:58] adgtl: has joined #ruby
[08:44:58] adgtl: has joined #ruby
[08:45:30] Jagan_: But I want Mobile web automation using Ruby cucumber framework using tool for calabash
[08:45:56] Jagan_: I already check this github
[08:46:44] Hounddog: has joined #ruby
[08:46:44] mikecmpbll: has joined #ruby
[08:47:39] vondruch: has joined #ruby
[08:47:55] lightheaded: has joined #ruby
[08:48:27] tristanp: has joined #ruby
[08:54:52] Jagan_: has left #ruby: ()
[08:55:11] baweaver: has joined #ruby
[08:55:46] eregi: has joined #ruby
[08:57:40] hayden_: has joined #ruby
[08:58:09] manveru: in other words, you don't understand english?
[09:01:35] mikecmpbll: has joined #ruby
[09:05:46] despai: has joined #ruby
[09:06:16] terlar: has joined #ruby
[09:09:19] blackmes1: has joined #ruby
[09:10:12] kirillzh: has joined #ruby
[09:10:16] sepp2k: has joined #ruby
[09:10:46] chagel: has joined #ruby
[09:15:43] chagel: has joined #ruby
[09:16:36] adgtl: has joined #ruby
[09:18:18] shredding: has joined #ruby
[09:21:41] william3: has joined #ruby
[09:22:56] Spami: has joined #ruby
[09:23:21] laith: has joined #ruby
[09:26:41] brijesh: has joined #ruby
[09:26:46] eljimmy: has joined #ruby
[09:29:22] FooMunki: has joined #ruby
[09:29:44] Mor: has joined #ruby
[09:30:29] Nuck: has joined #ruby
[09:30:56] duckpuppy: has joined #ruby
[09:33:44] helpa: has joined #ruby
[09:35:02] Mor: How does the method_missing method knows to react when i call some method after overriding this method?
[09:35:03] ljarvis: Mor: did you change your nickname after asking this yesterday?
[09:35:03] sinkensabe: has joined #ruby
[09:35:03] Hanmac: Mor it depends how you mean with overriding
[09:35:03] ljarvis: because it's the exact same question, worded (badly) the exact same
[09:35:03] eljimador: has joined #ruby
[09:35:03] Dreamer3_: has joined #ruby
[09:35:03] Ox0dea: Mor: It's just... what the Ruby interpreter does.
[09:35:04] mhenrixon_: has joined #ruby
[09:35:04] Ox0dea: It walks the ancestor chain in search of the method you invoke, then starts over looking instead for a definition of #method_missing if it didn't find the original method.
[09:35:04] brijesh: has joined #ruby
[09:35:04] adgtl: has joined #ruby
[09:35:04] adgtl: has joined #ruby
[09:35:04] Mor: ljarvis: correct. just did not fully understand it.
[09:35:04] Some-body_: has joined #ruby
[09:35:11] evidex: has joined #ruby
[09:35:17] Guest34101: has joined #ruby
[09:35:20] oddmunds1: has joined #ruby
[09:35:34] mfl: has joined #ruby
[09:35:55] dlitvak: has joined #ruby
[09:40:17] blackmes1: has joined #ruby
[09:40:40] Mor: Ox0dea: Ok, so it found my new def of method_missing. After calling a missing method it reacts like the original method. How?
[09:41:13] Ox0dea: Mor: It's not clear to me what you're asking.
[09:41:19] ptierno: has joined #ruby
[09:41:46] dgncn_: has joined #ruby
[09:41:51] Ox0dea: Are you asking for an explanation of what's happening under the hood? Do you know that the Ruby interpreter you're using is written in C?
[09:42:27] laith: has joined #ruby
[09:42:51] dgncn_: has joined #ruby
[09:43:46] tAn: has joined #ruby
[09:43:49] FooMunki: has joined #ruby
[09:43:56] Mor: Ox0dea: When you override a method, you change its entire content right?. When you override the method_missing method you still get the and exception when you call a missing method. it reacts like the original method_missing in the kernel module.
[09:44:04] tAn: has joined #ruby
[09:44:29] Ox0dea: Mor: The default #method_missing lives on BasicObject, not Kernel.
[09:44:57] Ox0dea: If your class doesn't override it, that's the one that gets used, and its default behavior is indeed to raise a NameError.
[09:45:10] Ox0dea: *NoMethodError
[09:45:46] Ox0dea: >> NoMethodError < NameError # technically correct :P
[09:45:47] ruby[bot]: Ox0dea: # => true (https://eval.in/525911)
[09:45:56] Mor: Ox0dea: When my class override it, It still raises a NoMethodError
[09:46:37] marr: has joined #ruby
[09:46:39] Ox0dea: Mor: Are you using `super`?
[09:47:57] Mor: Ox0dea: I mean, the error itself doesn't appear but it knows to identify when I call a missing method
[09:48:17] Ox0dea: ¯\_(ツ)_/¯
[09:48:20] jeanlinux: has joined #ruby
[09:48:29] Nanuq: has joined #ruby
[09:48:54] pandaant: has joined #ruby
[09:50:51] Ox0dea: Mor: That error won't get raised unless method resolution makes it all the way to BasicObject#method_missing.
[09:51:39] Ox0dea: Maybe post code?
[09:51:49] trosborn: has joined #ruby
[09:52:00] bertro: has joined #ruby
[09:52:05] Mor: Ox0dea: It executes the method_missing when I call a missing method to an object, after overriding the method_missing in the class of this object. Which mean it can still identify a missing method. I will post a code in a moment
[09:56:01] snowy: has joined #ruby
[09:56:05] Gnut: has joined #ruby
[09:56:30] ziyadb: has joined #ruby
[09:56:56] Hanmac: Mor i dont have your code there right now, but are you sure you are calling the right method_missing? if i remember correctly you did define it as a class method, so when you call a method from the Instance of the Class it doesnt use THAt method_missing
[09:58:42] BlkDynmt: has joined #ruby
[09:58:52] quazimodo: has joined #ruby
[09:59:09] ocbtec: has joined #ruby
[09:59:46] kirillzh: has joined #ruby
[09:59:50] htmldrum: has joined #ruby
[09:59:52] tristanp_: has joined #ruby
[10:01:04] Couch: has joined #ruby
[10:04:27] chipotle: has joined #ruby
[10:04:48] dlitvak: has joined #ruby
[10:05:05] Coldblackice: has joined #ruby
[10:05:23] atmosx: has joined #ruby
[10:06:39] gregf_: Mor: if you could paste some code, somebody could help :|
[10:09:07] gregf_: >> class Foo; def method_missing meth, *args, &bl; p meth, args;end;end; Foo.new.yay(1,2,3)
[10:09:09] ruby[bot]: gregf_: # => :yay ...check link for more (https://eval.in/525925)
[10:09:17] gregf_: >> class Foo; def self.method_missing meth, *args, &bl; p meth, args;end;end; Foo.yay(1,2,3)
[10:09:18] ruby[bot]: gregf_: # => :yay ...check link for more (https://eval.in/525926)
[10:09:48] BlkDynmt: has left #ruby: ()
[10:10:02] gregf_: >> class Foo;end; Foo.yay(1,2,3)
[10:10:04] ruby[bot]: gregf_: # => undefined method `yay' for Foo:Class (NoMethodError) ...check link for more (https://eval.in/525928)
[10:10:08] ruby[bot]: irb is "interactive ruby", it is part of ruby. You can run ruby code and see results immediately. it's useful for testing code. Also see ?pry, a gem which is a popular alternative to irb.
[10:10:12] uglybandersnatch: has joined #ruby
[10:10:18] gregf_: >> class Foo;def method_missing meth, *args, &bl; self.class.send(:define_method, meth, &bl);send(meth, *args);end;end; f = Foo.new; f.yay(1,2,3) { |*args| print "yay #{args} !!!" }
[10:10:19] ruby[bot]: gregf_: # => yay [1, 2, 3] !!!nil (https://eval.in/525930)
[10:10:48] Mor: gregf_: https://gist.github.com/mor789/5d5e4fefe7a2d3f30819
[10:11:08] platzhirsch: has joined #ruby
[10:11:36] Ox0dea: You're not even running your code...
[10:11:47] ljarvis: Mor: because that's how the interpreter is designed. Ox0dea has explained this. Plus, your code isn't even valid syntax-wise
[10:13:01] quaristice: has joined #ruby
[10:14:45] blackmes1: has joined #ruby
[10:14:45] gregf_: Mor: why do you worry about how the method gets called? atleast you know that the overridden method(not sure if its even overridden) is getting called?
[10:14:54] dubalubdub: has joined #ruby
[10:15:40] ur5us: has joined #ruby
[10:16:33] gregf_: >> class Foo;end;Foo.ancestors.each { |c| p [c, c.method(:method_missing)] }
[10:16:34] ruby[bot]: gregf_: # => [Foo, #<Method: Class(BasicObject)#method_missing>] ...check link for more (https://eval.in/525938)
[10:18:33] gregf_: Mor: whats it youre trying to achieve? just check how method_missing gets/doesnt_get called?
[10:18:54] gregf_: then there better things to worry about ;)
[10:19:00] blackmesa: has joined #ruby
[10:19:38] Mor: I'm sorry about the syntax errors. https://gist.github.com/mor789/fc79bcc3dbe2909280c6. Now when I know its by design, there are more methods that react like this when overridden?
[10:20:26] Ox0dea: Mor: I can't help but advise you to reconsider your approach to learning Ruby.
[10:20:41] Ox0dea: You're diving into one of the deeper parts of the pool first, and that's a brave idea.
[10:21:18] Ox0dea: Still, to answer your question: yes, there are about a dozen of these "hook" methods.
[10:22:09] Mor: I'm a kind of person who learn by understanding. When I understand something I can remember it better. :)
[10:23:13] tulak: has joined #ruby
[10:23:17] ElFerna_: has joined #ruby
[10:23:23] eregi: has joined #ruby
[10:23:53] htmldrum: has joined #ruby
[10:25:16] Mor: Ox0dea:I hope you can forgive my curiosity
[10:25:40] Ox0dea: Mor: You know what happened to the cat, I trust.
[10:27:14] Mor: Ox0dea: (;
[10:27:43] Ishido: has joined #ruby
[10:28:04] Ox0dea: Mor: I certainly applaud your curiosity, but I also think it's possible to learn things in the wrong order, such that prior knowledge has the potential to hinder later understanding.
[10:28:28] baweaver: has joined #ruby
[10:29:02] _djbkd: has joined #ruby
[10:30:24] htmldrum: has joined #ruby
[10:31:23] moeabdol: has joined #ruby
[10:31:51] duckpuppy: has joined #ruby
[10:33:41] gagrio: has joined #ruby
[10:34:03] shevy: Mor yes, now you can dynamically add methods via define_method inside of method_missing!
[10:35:40] blackmesa: has joined #ruby
[10:35:49] Hanmac: you can even define methods with "def" inside methods, but thats every bad voodoo ;P
[10:35:53] m8: has joined #ruby
[10:36:47] Hanmac: >> def func; def func; "nope"; end; "yeah"; end; [func, func]
[10:36:48] ruby[bot]: hanmac: # => ["yeah", "nope"] (https://eval.in/525945)
[10:37:21] adgtl: has joined #ruby
[10:37:35] BlkDynmt: has joined #ruby
[10:37:46] mattwildig: has joined #ruby
[10:37:51] BlkDynmt: has left #ruby: ()
[10:40:10] Ox0dea: That's terrifying. See here for a moderately practical use case: https://bugs.ruby-lang.org/issues/11665#note-7
[10:40:33] Mor: I'm blessed . This community is so friendly
[10:40:37] gregf_: Mor: im not sure how much dynamic methods are used in Ruby code(atleast not in the code we have), but its usually not allowed like say, in Perl(AUTOLOAD), PHP(__call) *wouldn't get past code reviews for sure*
[10:40:56] Ox0dea: gregf_: Frequently. :P
[10:41:16] Ox0dea: But the overall approach is comparatively sane.
[10:41:32] Hanmac: Ox0dea: or you can hide classes and modules inside a singleton class of an Object ;P (just another case of things you might not want to do ;P )
[10:41:42] gregf_: *happy debugging* ;) wonders how difficult writing tests would be :|
[10:42:00] Ox0dea: hanmac: We can't rb_obj_hide() from Ruby land, though. ;)
[10:42:19] Ox0dea: Or, well, yeah, we can use Fiddle to muck with an object's flags.
[10:42:33] lipoqil: has joined #ruby
[10:42:57] chipotle: has joined #ruby
[10:43:43] shevy: all the goodies
[10:43:48] shevy: that are never used in real code!!!
[10:44:56] Azulinho: has joined #ruby
[10:46:31] jenrzzz: has joined #ruby
[10:47:00] ur5us: has joined #ruby
[10:48:24] adgtl: has joined #ruby
[10:48:38] adgtl: has joined #ruby
[10:49:10] Hanmac: shevy good that ruby does not have a AbstractSingletonProxyFactoryBean like java ;P
[10:49:46] stevemackinnon: has joined #ruby
[10:53:34] shevy: activerecord may have
[10:54:04] shevy: it has all-the-things http://goo.gl/JdOybH
[10:55:52] Hanmac: shevy: pattern explained: http://geek-and-poke.com/geekandpoke/2014/5/31/the-geekpoke-pattern-weekend
[10:57:58] mdw: has joined #ruby
[10:58:43] ElFerna_: has joined #ruby
[10:59:01] trinaldi: has joined #ruby
[11:01:31] lapide_viridi: has joined #ruby
[11:03:20] Deck`: has joined #ruby
[11:03:31] tristanp: has joined #ruby
[11:03:34] htmldrum: has joined #ruby
[11:04:18] kirillzh: has joined #ruby
[11:05:22] themsay: has joined #ruby
[11:05:46] Guest85: has joined #ruby
[11:05:47] themsay2: has joined #ruby
[11:06:42] nettoweb: has joined #ruby
[11:07:02] bronson: has joined #ruby
[11:07:24] kumar: has joined #ruby
[11:11:26] dlitvak: has joined #ruby
[11:11:27] edwinvdgraaf: has joined #ruby
[11:16:15] edwinvdgraaf: has joined #ruby
[11:17:17] rob_: has joined #ruby
[11:17:46] dubalubdub: has joined #ruby
[11:17:51] rob_: hi, anyone who uses guard-rspec, is it possible to change the default 'cmd' to not use bundler? e.g: cmd=rspec rather than cmd="bundler exec rspec"?
[11:18:27] kirillzh: has joined #ruby
[11:18:39] kirillzh: How can I execute callbacks before caching in typhoeus?
[11:21:16] Kang0: has joined #ruby
[11:29:52] dlitvak: has joined #ruby
[11:31:29] ldnunes: has joined #ruby
[11:32:25] duckpuppy: has joined #ruby
[11:32:48] binaryplease: has joined #ruby
[11:33:16] MrDoctor: has joined #ruby
[11:33:48] SCHAAP137: has joined #ruby
[11:36:04] Macaveli: has joined #ruby
[11:38:43] dionysus69: has joined #ruby
[11:39:47] jenrzzz: has joined #ruby
[11:40:59] skade: has joined #ruby
[11:41:14] gagrio: has joined #ruby
[11:45:13] sanguisdex: has joined #ruby
[11:45:54] laith: has joined #ruby
[11:46:37] agit0: has joined #ruby
[11:51:17] bricker: has joined #ruby
[11:51:34] augcesar: has joined #ruby
[11:53:50] Xeago: has joined #ruby
[11:54:43] cpup: has joined #ruby
[11:55:00] sdothum: has joined #ruby
[11:56:29] ElFerna_: has joined #ruby
[11:57:04] roshanavand: has joined #ruby
[11:58:14] adgtl: has joined #ruby
[12:01:46] sandstrom: has joined #ruby
[12:03:49] Macaveli: has joined #ruby
[12:05:37] zapata: has joined #ruby
[12:09:58] Macaveli: has joined #ruby
[12:11:36] eregi: has joined #ruby
[12:12:39] binaryplease: has joined #ruby
[12:13:47] Jeremy1023: has joined #ruby
[12:15:54] dlitvak: has joined #ruby
[12:16:47] davedev24: has joined #ruby
[12:16:54] jonee: has joined #ruby
[12:17:48] chipotle: has joined #ruby
[12:19:04] htmldrum: has joined #ruby
[12:19:46] sanguisdex: has joined #ruby
[12:21:29] moeabdol1: has joined #ruby
[12:22:14] sgambino: has joined #ruby
[12:22:53] Macaveli: has joined #ruby
[12:25:35] ur5us: has joined #ruby
[12:27:25] dlitvak: has joined #ruby
[12:28:11] mhoungbo: has joined #ruby
[12:30:15] cyclonis: has joined #ruby
[12:31:11] hamed_r: has joined #ruby
[12:31:17] Mon_Ouie: has joined #ruby
[12:32:40] dlitvak: has joined #ruby
[12:33:15] duckpuppy: has joined #ruby
[12:33:16] chagel: has joined #ruby
[12:33:48] Deck`: has joined #ruby
[12:35:03] quakephil: has joined #ruby
[12:36:09] pawnbox: has joined #ruby
[12:36:35] terlar: has joined #ruby
[12:37:16] Ishido: has joined #ruby
[12:38:37] mattwildig: has joined #ruby
[12:39:34] Guest85: has joined #ruby
[12:39:51] jinetix: has joined #ruby
[12:42:03] cyclonis: has joined #ruby
[12:42:44] jenrzzz: has joined #ruby
[12:42:49] godzillaenlacasa: has joined #ruby
[12:44:03] dlitvak: has joined #ruby
[12:47:33] duckpuppy: has joined #ruby
[12:47:33] william3: has joined #ruby
[12:48:13] lightheaded: has joined #ruby
[12:49:37] rbennacer: has joined #ruby
[12:51:06] sgambino: has joined #ruby
[12:52:27] Garo_: I have an object which I first clone. Then I make changes to the clone and I would then want to merge the changes back to the original object. Any suggestion what would be the best way to do this?
[12:52:59] bnagy: omg hanmac is back
[12:53:37] Hanmac: bnagy: yeah you slowpoke! XD i am currently unemployed ... so i have many time for rwx and other ruby stuff again
[12:53:50] lightheaded: has joined #ruby
[12:54:35] Hanmac: Garo_: hm depending on the structure of your object i would do a #replace or #merge function where you can apply the data of the new object onto the old one
[12:56:09] tomphp: has joined #ruby
[12:56:35] krzkrzkrz: has joined #ruby
[12:57:02] Garo_: hanmac: yeah I'm just trying to figure out that I probably need to do some kind of recursive merge operation.
[12:57:11] laith: has joined #ruby
[12:57:18] napcae: has joined #ruby
[12:57:58] Garo_: in my case the data structure is a class containing mixed data (hash, arrays etc)
[12:58:13] Hanmac: Garo_: depending on your structure you might need to be careful with dup/clone because both of them are not deep-copy functions
[12:58:53] Garo_: hanmac: actually I duplicate the object by forking my process. Then inside the forked child I do modifications and I want to then send the modifications back to the parent process
[12:59:32] AlexRussia: has joined #ruby
[12:59:48] Garo_: I have an IPC which I can use to marshal the changed object, so I could somehow merge the data back on the parent process into the class instance
[12:59:54] Hanmac: hm i dont do much work with forked process ... and also not so much with interprocedual comunication ...
[13:00:21] lightheaded: has joined #ruby
[13:00:29] Garo_: yeah, luckily the IPC is implemented here, it's just the merging which I'm now worrying about =)
[13:00:29] Hanmac: Garo_: you might need a IO pipe for that so you could send data from the child to the parent
[13:00:37] Garo_: yeah, I have exactly that
[13:00:47] napcae: has left #ruby: ()
[13:01:29] Garo_: I can build a short snippet so you see what I have
[13:04:07] jeanlinux: has joined #ruby
[13:04:31] bnagy: Garo_: I'd honestly suggest you rewrite
[13:04:56] bnagy: object integrity over IPC is .. suboptimal
[13:05:14] bnagy: just impose normal API barriers
[13:05:16] Garo_: https://gist.github.com/garo/ec40869d2c0411c024b9
[13:05:41] Garo_: that's what I'm doing in a compact form. now I would want to merge the modifications back.
[13:06:08] anagha_: has joined #ruby
[13:06:25] Garo_: my other option is to refactor my code so that I can return the modified and unmarshalled object in my call stack long enough so that I don't need to merge but just replace the original variable holding the object with the new one
[13:06:34] moeabdol: has joined #ruby
[13:07:26] synthroid: has joined #ruby
[13:07:53] Garo_: bnagy: yeah, I have that feeling also :D
[13:07:54] jottr: has joined #ruby
[13:08:37] Garo_: I'm probably going with the refactoring way =)
[13:08:40] bnagy: a few things you said are confusing, but sending an object to an API and getting a new object back is an attractive pattern
[13:09:30] bronson: has joined #ruby
[13:09:48] bnagy: "replacing variables" and "in my callstack long enough" I don't really grok
[13:10:10] dlitvak_: has joined #ruby
[13:10:23] uglybandersnatch: has joined #ruby
[13:10:28] Garo_: yep. the more I talk this the more obvious is that I should not try to replace/merge but just to "get new objet back" and use that
[13:10:55] bnagy: I guess mainly my point is that imho writing all your IPC as RPC tends to pay off in the long run
[13:11:21] bruce_lee: has joined #ruby
[13:11:21] bruce_lee: has joined #ruby
[13:11:26] Guest34101: has joined #ruby
[13:11:37] mattwildig: has joined #ruby
[13:11:55] blackmesa: has joined #ruby
[13:12:26] bnagy: maybe 1% of applications really need multi-process plus shared memory, for everything else write it as RPC and you're ready for roflscale
[13:13:45] bnagy: tbh I even used to write jruby stuff (which has perfectly good threads) as if it were a multi process app, just because it's easier to reason about bugs
[13:14:03] Macaveli: has joined #ruby
[13:14:25] joonty: has joined #ruby
[13:14:31] Garo_: bnagy: my project is kinda an application container which accepts requests from outside and executes them by forking the process for the execution (think an old web server which forks for each request)
[13:14:47] sandelius: has joined #ruby
[13:15:22] scepticulous: I wonder if it is kind of idiomatic to combine conditionals and assignment in ruby... It is a style violation in most tools, but I keep seing and seing things like if tmp = some_query method: do_something_with(tmp); end
[13:16:19] bnagy: scepticulous: ||= is idiomatic
[13:17:07] bnagy: opinions probably start to differ wildly regarding conditionals following =
[13:17:36] bnagy: personally I wouldn't touch it with a stick
[13:17:43] B1n4r10: has joined #ruby
[13:17:50] Garo_: bnagy: but thanks for your input, at least this cleared my head a bit =)
[13:17:52] scepticulous: bnagy: yes, I totally agree.
[13:18:15] bnagy: Garo_: everything I said doesn't apply if you need really high perf
[13:18:27] bnagy: it's purely aimed at cleaner code
[13:18:49] bnagy: but anyway, just my 0.02
[13:19:04] Garo_: bnagy: very true. fork isn't very fast but in this case I'm after for really cleaning up my execution handler by letting the forked child to die instead for opting for better performance =)
[13:19:08] Garo_: bnagy: yeah, thanks =)
[13:19:24] dlitvak: has joined #ruby
[13:20:44] kent\n: has joined #ruby
[13:20:44] kent\n: has joined #ruby
[13:20:56] uglybandersnatch: has joined #ruby
[13:25:33] adgtl: has joined #ruby
[13:25:33] adgtl: has joined #ruby
[13:26:13] mgorbach: has joined #ruby
[13:27:36] jimcroft: has joined #ruby
[13:29:10] Suntzu: has joined #ruby
[13:30:00] Ropeney: has joined #ruby
[13:32:16] yardenbar: has joined #ruby
[13:32:36] dlitvak: has joined #ruby
[13:33:35] binaryplease: has joined #ruby
[13:35:15] RTG`: has joined #ruby
[13:35:21] binaryplease: has joined #ruby
[13:35:25] sonOfRa: has joined #ruby
[13:35:48] superlou: has joined #ruby
[13:38:02] dlitvak_: has joined #ruby
[13:40:30] krzkrzkrz: has joined #ruby
[13:41:29] QORRiE: has joined #ruby
[13:45:51] aufi: has joined #ruby
[13:46:25] araujo: has joined #ruby
[13:46:25] araujo: has joined #ruby
[13:47:52] araujo: has joined #ruby
[13:50:21] silverdust: I have this on a single line t.each_with_index { |h, i| if h.a == 'cool' puts i; end } what's wrong with the statement?
[13:50:39] silverdust: >>t.each_with_index { |h, i| if h.a == 'cool' puts i; end }
[13:50:40] ruby[bot]: silverdust: # => /tmp/execpad-f0d6300156c6/source-f0d6300156c6:2: syntax error, unexpected tIDENTIFIER, expecting key ...check link for more (https://eval.in/526074)
[13:52:16] lightheaded: has joined #ruby
[13:52:24] eljimmy: has joined #ruby
[13:52:59] silverdust: >>t = [Struct.new(:a, :b).new('cool','stuff'), Struct.new(:a,:b).new('cat','dog'), Struct.new(:a, :b).new('cool','bad')]; t.detect { |h| h.a == 'cool' }
[13:53:00] ruby[bot]: silverdust: # => #<struct a="cool", b="stuff"> (https://eval.in/526081)
[13:53:41] silverdust: what I want is to get the index of the returned array item
[13:53:51] silverdust: how can I do that?
[13:55:49] goodcodeguy: has joined #ruby
[13:56:44] ljarvis: silverdust: do you care about performance?
[13:58:33] silverdust: yes absolutely
[13:58:51] ljarvis: i feel like that's just a stock answer but ok fair enough
[13:58:56] silverdust: I'm just ignorant and I'd love to be pointed in the right direction
[13:59:20] ramortegui: has joined #ruby
[13:59:26] ljarvis: you can use Array#index like this: https://eval.in/526086 but you probably don't want that if you *really* care about performance
[13:59:35] eregi: has joined #ruby
[14:00:02] ljarvis: my question is, why do you want the index? how are you storing these such as the index matters?
[14:00:16] johnmilton: has joined #ruby
[14:01:39] ljarvis: I guess the performance question is better worded as "must this as performant as possible?"
[14:01:44] silverdust: I need to delete a struct within an array so I'm trying to check for the struct by an item it and get its index then delete from the array with acquired index
[14:01:45] william3: has joined #ruby
[14:02:07] ljarvis: you don't need an index to delete it
[14:02:18] rippa: has joined #ruby
[14:03:00] silverdust: how can I? I have #<struct id="4" stuff="hey"> and others with different ids. How can I delete the one with id=4?
[14:03:01] mdw: has joined #ruby
[14:03:20] silverdust: I mean other structs with different ids within the array
[14:03:55] ljarvis: you can use delete_if (though it's worth pointing out that it won't stop looking when it deletes the first element)
[14:04:06] ljarvis: items.delete_if { |i| i.id == 4 }
[14:05:33] Ishido: has joined #ruby
[14:05:33] rbennacer: has joined #ruby
[14:05:34] silverdust: I don't mind. It's what I need. Thanks but just in case how can I make it stop at the first it finds
[14:06:12] nchambers: has joined #ruby
[14:06:28] shevy: perhaps .find
[14:06:32] ljarvis: well, you'd probably be better to just use 2 operations: find/delete: item = items.find { |i| i.id == 4 }; items.delete(item);
[14:06:44] hxegon: has joined #ruby
[14:07:26] ljarvis: it's not ideal, but you'll start getting hacky the closer to the metal you try and get and it's not necessary unless you want the fastest possible implementation (you sacrifice something)
[14:08:38] ljarvis: silverdust: that said, do you care about the order of the items in your array?
[14:09:09] ljarvis: e.g. are they specifically sorted? (seems to me like you dont, because you're deleting stuff that might be in the middle somewhere)
[14:09:10] silverdust: you mean if I'd like to keep it in the same order after deleting an item?
[14:09:19] ljarvis: sure, do you care about the order in any way
[14:09:32] ljarvis: then use Set
[14:09:37] william3_: has joined #ruby
[14:09:39] mondok: has joined #ruby
[14:10:24] vali: has joined #ruby
[14:10:36] silverdust: I'd like to believe that removing 6 from [4,6,9,3] will leave me with [4,9,3]
[14:10:44] ljarvis: silverdust: then you care about order
[14:11:02] techietrash: has joined #ruby
[14:11:13] vali: New to ruby here...I want to convert a timestamp from something like (2016-02-26T14:42:36.340912+01:00) to a unix timestamp in miliseconds
[14:11:19] vali: any ideas on how I could do that?
[14:11:38] ljarvis: >> Time.new.to_i
[14:11:40] ruby[bot]: ljarvis: # => 1456495899 (https://eval.in/526118)
[14:11:40] tristanp_: has joined #ruby
[14:11:45] silverdust: okay. Set works just like in python I guess. arranges them from smallest to largest value
[14:12:03] ljarvis: silverdust: no, sets have no sort order. They're hashtables under the hood
[14:12:27] ljarvis: and hashes do not retain order (yes herp derp Ruby hashes remember their insertion order blah blah be quiet)
[14:13:51] d10n-work: has joined #ruby
[14:14:24] vali: ljarvis, but how to convert that timestamp from a variable ?
[14:14:37] ljarvis: vali: a String or a Time object?
[14:14:38] vali: timestamp = "2016-02-26T14:42:36.340912+01:00"; puts timestamp.to_i('%s')
[14:14:51] robbyoconnor: has joined #ruby
[14:15:12] ljarvis: >> require 'time'; Time.iso8601("2016-02-26T14:42:36.340912+01:00").to_i
[14:15:13] ruby[bot]: ljarvis: # => 1456494156 (https://eval.in/526133)
[14:16:21] vali: that was way to cool
[14:16:27] vali: ljarvis, thank you!
[14:18:05] thevaliantx: has joined #ruby
[14:19:44] claw: Hey channel, https://paste.triple6.org/9C2KnQ how would i do this more memory efficient ?
[14:21:43] shevy: is this a safe paste
[14:22:05] sinkensabe: has joined #ruby
[14:22:14] ljarvis: claw: please re-paste on a website whos security certs are up to date
[14:22:15] malconis: has joined #ruby
[14:22:29] ljarvis: I recommend gist.github.com
[14:22:59] malconis: has joined #ruby
[14:23:45] claw: https://gist.github.com/kochd/d20158c88afb6fc72628
[14:24:20] sgambino: has joined #ruby
[14:24:37] claw: i need some sort of IO buffering
[14:24:51] ljarvis: surely you dont actually plan on using this?
[14:25:12] ljarvis: there might be a conflict in the next 30 years
[14:25:18] idefine: has joined #ruby
[14:25:36] openstruct: has joined #ruby
[14:25:38] claw: ljarvis: this is a corruption test
[14:25:48] claw: actually its for testing if/when there is corruption
[14:26:36] ljarvis: ok, but I don't see how it tests anything. a will not equal b 99.999999999% of the time (actual statistic)
[14:26:53] ljarvis: i read something wrong
[14:27:15] sankaber: has joined #ruby
[14:27:27] claw: ljarvis: it will if data was not written to the disk at it was generated
[14:27:41] claw: by fs/disk/cache or memory corruption
[14:28:25] jottr: has joined #ruby
[14:28:56] TomPeed: has joined #ruby
[14:29:28] ljarvis: ok well im confused by this test in general so probably im not the best person to provide help
[14:30:46] platzhirsch: has left #ruby: ()
[14:30:58] bronson: has joined #ruby
[14:30:59] baweaver: has joined #ruby
[14:31:11] babblebre: has joined #ruby
[14:31:22] ljarvis: (I mean, I get the data corruption part) but if your data comes back as it should, you just keep running it forever
[14:31:52] claw: thats true ljarvis. if so there is no corruption happening
[14:32:13] ljarvis: so this is a realtime check happening hundreds/thousands of times a second?
[14:32:38] ptierno: has joined #ruby
[14:33:04] Bounga: has joined #ruby
[14:33:07] lightheaded: has joined #ruby
[14:33:12] anisha: has joined #ruby
[14:34:00] yardenbar: has joined #ruby
[14:34:27] claw: ljarvis: this is just for testing purpose
[14:34:44] ljarvis: if it's just for testing, why dont you run it once?
[14:34:53] neohunter: has joined #ruby
[14:34:54] sandstrom: has joined #ruby
[14:35:15] claw: ljarvis: actually i do. this is just a "i wonder how i could..." question
[14:35:31] ljarvis: please say that next time :(
[14:36:26] claw: i may ask more generell: how can i generate a large amount of random binary without needing to allocate it as a whole
[14:36:53] ESpiney: has joined #ruby
[14:37:31] polishdub: has joined #ruby
[14:38:36] claw: as data = Random.new.bytes(length) will allocate up to 1GB
[14:39:55] nettoweb: has joined #ruby
[14:45:43] dlitvak: has joined #ruby
[14:46:02] sankaber: has joined #ruby
[14:49:24] davedev24: has joined #ruby
[14:49:29] swills: has joined #ruby
[14:50:14] rbennacer: has joined #ruby
[14:52:03] pawnbox: has joined #ruby
[14:52:39] jottr: has joined #ruby
[14:52:46] pawnbox: has joined #ruby
[14:52:59] Peteykun: has joined #ruby
[14:53:32] araujo: has joined #ruby
[14:53:51] william3: has joined #ruby
[14:54:21] araujo: has joined #ruby
[14:54:51] pipework: claw: What you mean? You want to be able to read off random bytes as you need it, or you want chunks just not all of what you might want at once?
[14:54:54] failshell: has joined #ruby
[14:55:01] mary5030: has joined #ruby
[14:55:11] claw: pipework: chuncks
[14:55:20] araujo: has joined #ruby
[14:55:20] araujo: has joined #ruby
[14:55:40] pipework: claw: You'll probably want SecureRandom then.
[14:55:46] Frem: has joined #ruby
[14:55:55] pipework: It'll pull from the sources it has for randomness on the OS.
[14:56:44] pipework: There's a number of methods there, probably #random_bytes from SecureRadom
[14:56:45] FooMunki: has joined #ruby
[14:57:20] herminiotorres: has joined #ruby
[14:58:29] araujo: has joined #ruby
[14:58:29] araujo: has joined #ruby
[14:59:44] araujo: has joined #ruby
[15:00:56] araujo: has joined #ruby
[15:00:56] araujo: has joined #ruby
[15:01:05] stannard: has joined #ruby
[15:01:43] mary5030_: has joined #ruby
[15:04:56] stannard: has joined #ruby
[15:04:56] bricker: has joined #ruby
[15:05:36] decoponio: has joined #ruby
[15:05:41] Guest85: has joined #ruby
[15:08:07] alexherbo2: has joined #ruby
[15:08:22] dhollinger: has joined #ruby
[15:08:29] adgtl: has joined #ruby
[15:08:29] adgtl: has joined #ruby
[15:09:01] duckpupp1: has joined #ruby
[15:09:07] godzillaenlacasa: has joined #ruby
[15:09:24] idefine: has joined #ruby
[15:11:13] dlitvak_: has joined #ruby
[15:12:41] mary5030: has joined #ruby
[15:13:02] x77686d: has joined #ruby
[15:13:16] idefine: has joined #ruby
[15:14:37] polishdub: has joined #ruby
[15:14:52] sdothum: has joined #ruby
[15:17:01] rbennacer: has joined #ruby
[15:18:37] Jardayn: has joined #ruby
[15:20:22] adgtl: has joined #ruby
[15:20:28] fostertheweb: has joined #ruby
[15:21:31] rodolfowtf: has joined #ruby
[15:22:56] whippythellama: has joined #ruby
[15:22:57] gaf_: has joined #ruby
[15:24:33] cdg: has joined #ruby
[15:25:33] KensoDev: has joined #ruby
[15:26:16] zast: has joined #ruby
[15:26:29] B1n4r10: has joined #ruby
[15:26:57] diegoviola: has joined #ruby
[15:26:57] shredding: has joined #ruby
[15:28:03] aryaching: has joined #ruby
[15:28:18] Deck`: has joined #ruby
[15:28:39] sgambino: has joined #ruby
[15:29:59] fostertheweb: has joined #ruby
[15:30:08] snowy: has joined #ruby
[15:31:56] adgtl: has joined #ruby
[15:31:56] adgtl: has joined #ruby
[15:32:50] kies^: has joined #ruby
[15:36:06] idefine: has joined #ruby
[15:36:13] wolffles: has joined #ruby
[15:36:37] QORRiE: has joined #ruby
[15:37:52] sandstrom: has joined #ruby
[15:38:27] pawnbox: has joined #ruby
[15:39:23] jas02: has joined #ruby
[15:39:48] bricker: has joined #ruby
[15:40:32] arthurix: has joined #ruby
[15:42:42] thevaliantx: i still can't believe my The Well-Grounded Rubyist book isn't here. I ordered that thing from Amazon on January 9th :)
[15:42:43] snowy: has joined #ruby
[15:42:45] idefine: has joined #ruby
[15:42:57] wolffles: how to break Prime.include? #non-prime
[15:43:10] wolffles: and just return false?
[15:43:55] norc: has joined #ruby
[15:44:00] norc_: has joined #ruby
[15:44:33] goodcodeguy: has joined #ruby
[15:45:28] B1n4r10: has joined #ruby
[15:46:32] fostertheweb: has joined #ruby
[15:47:16] rbennacer: has joined #ruby
[15:47:59] avenj: has joined #ruby
[15:48:50] avenj: has joined #ruby
[15:49:52] moeabdol: has joined #ruby
[15:50:46] apeiros: wolffles: what?
[15:52:12] wolffles: apeiros: i ran include? on an infinate range that will never return true. how would i break the loop
[15:52:14] apeiros: uh… why do you use Prime.include?, that's from Enumerable and Prime.each is an infinite enumeration.
[15:52:19] humblespoon: has joined #ruby
[15:52:20] apeiros: use Prime.prime?
[15:52:58] pawnbox: has joined #ruby
[15:53:12] norc_: We have a Prime class in the stdlib? That is... well.
[15:53:13] dopamean_: has joined #ruby
[15:53:19] humblespoon: is this a good place to ask beginner ruby questions? or is there another irc you can recommend?
[15:53:34] norc_: humblespoon, you sir are in the right place.
[15:53:35] apeiros: norc_: useful?
[15:53:43] norc_: apeiros, Im actually trying to see how.
[15:53:44] humblespoon: awesome, thanks :D
[15:53:55] apeiros: humblespoon: there's this channel and ##new2ruby if you prefer a smaller group
[15:54:14] humblespoon: o thanks apeiros
[15:54:17] apeiros: norc_: I'm just sad that they use the slow generator by default
[15:54:23] Hanmac: norc_ do we want to talk about what php has as stdlib?
[15:54:45] norc_: hanmac, no we do not.
[15:55:02] norc_: But if you feel free to come outside my door we can discuss the matter.
[15:55:30] humblespoon: I'm learning ruby write now and I'm trying to extend an array class so it calculates the squares of each element in the array
[15:55:34] Rodya_: has joined #ruby
[15:55:59] apeiros: humblespoon: you don't need to extend the class. you can use the Array#map method for that
[15:56:26] humblespoon: well part of the learning is learning how to extend classes and rewrite existing methods XD
[15:56:48] humblespoon: at least that's the idea behind the instruction
[15:57:03] apeiros: they shouldn't teach you to do bad things. and changing classes you don't own is a bad thing.
[15:57:08] ljarvis: that's a bad thing to teach
[15:57:30] apeiros: I mean, yes, they should teach you that it's possible. but once you're reasonably competent.
[15:57:59] humblespoon: I guess using map it would be something like numbers.map! {|ele| ele**2}
[15:58:08] apeiros: humblespoon: correct
[15:58:25] norc: apeiros, and even then most guides I find refuse to even mention Refinements, which is so sad - since that is the feature that makes monkey patching foreign classes bearable. :(
[15:58:37] idefine: has joined #ruby
[15:58:41] apeiros: norc: well, refinements are still relatively new
[15:58:48] humblespoon: they wanted me to extend the class to make a method so that numbers.square would return that
[15:58:57] humblespoon: without modifying the original array
[15:58:58] humblespoon: def square self.each {|ele| ele**2} end
[15:59:05] humblespoon: so I wrote that in the Array calss
[15:59:05] apeiros: and for me it's still something I'm elaborating and working on figuring out its advantages and weaknesses
[15:59:09] norc: apeiros, a bit ago I was really surprised to find that they were still considered experimental in 2.0 (OSX default Ruby)
[15:59:11] humblespoon: but I have no idea why it doesn
[15:59:20] havenwood: norc_: It was just days ago that all supported Rubies now support modern refinements.
[15:59:28] apeiros: humblespoon: #each usually returns self
[15:59:36] apeiros: you want map there
[15:59:42] apeiros: >> [1,2,3].each { "hi" }
[15:59:44] ruby[bot]: apeiros: # => [1, 2, 3] (https://eval.in/526208)
[15:59:48] adgtl: has joined #ruby
[15:59:48] adgtl: has joined #ruby
[15:59:48] apeiros: >> [1,2,3].map { "hi" }
[15:59:59] ruby[bot]: apeiros: # => ["hi", "hi", "hi"] (https://eval.in/526209)
[16:00:15] humblespoon: so because I used self, it doesn't return what I called in the block
[16:00:25] apeiros: no, because you used each ;-)
[16:00:26] norc: havenwood, Im guessing it just got backported to 2.1?
[16:00:39] humblespoon: ok that makes a lot of sense, thanks apeiros :D
[16:00:53] idefine: has joined #ruby
[16:01:23] chouhoulis: has joined #ruby
[16:01:33] apeiros: norc: refinements have a couple of caveats. strongest are no toplevel refinements, no sensible way of aggregating refinements.
[16:03:15] bricker: has joined #ruby
[16:03:35] norc: apeiros, no toplevel refinements?
[16:03:50] apeiros: `using` in the toplevel scope iirc won't work
[16:03:55] norc: You meant to write *only* top level refinements.
[16:04:06] norc: It *only* works there. ;-)
[16:04:52] mondok: has joined #ruby
[16:05:16] norc: >> class C; end; module M; refine C; do; end; end; using M
[16:05:17] ruby[bot]: norc: # => /tmp/execpad-9e8b4621d96a/source-9e8b4621d96a:2: syntax error, unexpected keyword_do_block, expectin ...check link for more (https://eval.in/526212)
[16:05:27] norc: >> class C; end; module M; refine C do; end; end; using M
[16:05:28] ruby[bot]: norc: # => main (https://eval.in/526213)
[16:05:35] norc: >> class C; end; module M; refine C do; end; end; module Q; using M; end
[16:05:36] ruby[bot]: norc: # => Q (https://eval.in/526214)
[16:05:57] JohnBat26: has joined #ruby
[16:06:04] norc: Oh well. That must be a new feature from 2.2 then.
[16:06:12] norc: 21>> class C; end; module M; refine C do; end; end; module Q; using M; end
[16:06:18] pdoherty: has joined #ruby
[16:06:33] monashko2: has joined #ruby
[16:06:44] bubbys: has joined #ruby
[16:06:54] apeiros: hm toplevel using seems to work again in 2.3
[16:07:06] norc: apeiros, it alwyas worked in top level
[16:07:08] havenwood: apeiros: It works, just not from the REPL.
[16:07:18] apeiros: havenwood: whaaaat? for real?
[16:07:34] apeiros: damit, seems like. I never tested that outside the repl :-S
[16:07:35] norc: apeiros, because pry/irb have a different toplevel binding
[16:07:42] norc: So they choke on it.
[16:07:51] havenwood: apeiros: https://gist.github.com/havenwood/8d9f41483e0baebdec59
[16:08:09] apeiros: yeah, I just tested with `ruby -e`
[16:08:15] apeiros: so I retract that one :)
[16:08:26] havenwood: apeiros: it's an oddity though! eek
[16:08:52] cdg: has joined #ruby
[16:08:53] apeiros: yeah, it's uncomfortable since the REPL is a prime place to have toplevel using's
[16:09:19] norc: apeiros, Ill have to dig when the change was made. But it used to be that refinements could only be activated in top level, and it was added for classes/modules somewhere in 2.2 I think
[16:09:32] havenwood: norc: 2.0 was the old style
[16:09:35] havenwood: norc: so it's no more
[16:09:38] norc: Ah right.
[16:10:16] nogic: has joined #ruby
[16:10:28] shevy: the new replaces the old
[16:10:42] shevy: - Soylent Green
[16:11:30] apeiros: that's dark shevy
[16:11:53] idefine: has joined #ruby
[16:14:23] shevy: norc I think some of the guides, even the not-so-totally-old ones, don't mean or mention Refinements because they were not stable or too commonly used. It may take a few ... decades before they become more common
[16:14:28] nettoweb: has joined #ruby
[16:14:44] Rodya_: has joined #ruby
[16:15:36] norc: apeiros, do you have access to an OSX machine right now?
[16:15:46] apeiros: I'm on one, yes
[16:16:06] dlitvak: has joined #ruby
[16:16:26] norc: Put "$1294967295" into your pry and tell me the version of your pry please.
[16:16:42] alexishuard: has joined #ruby
[16:16:44] apeiros: without quotes?
[16:17:07] apeiros: .rvm/gems/ruby-2.3.0/gems/method_source-0.8.2/lib/method_source/code_helpers.rb:71:in `eval': integer 2589934590 too big to convert to `int' (RangeError)
[16:18:25] apeiros: pry version? yes
[16:18:28] amargherio: has joined #ruby
[16:18:38] norc: Alright, Im going to find this silly bug.
[16:18:53] apeiros: so I guess you can't have >(2**31)-1 captures in a regex, hu? :)
[16:19:24] norc: Yes - and I want to test my new regex badly in pry, so it needs to be fixed.
[16:19:46] apeiros: you… no way? you have a regex with 2**31+ capturing groups?
[16:19:51] Gasher: has joined #ruby
[16:20:00] norc: Are you jealous?
[16:20:51] apeiros: slightly. but since it's already established that I'm not the most crazy person in this chat, it's limited ;-p
[16:21:05] Gasher: hi everyone. how to use Ruby bytecode? I couldn't duck anything about it. it's probably in the bot, I forgot how to use it
[16:21:21] norc: Hello Gasher!
[16:21:40] darix: Gasher: what do you try to achieve?
[16:21:43] apeiros: so your regex is at least 6GB big?
[16:21:59] davedev24: has joined #ruby
[16:22:05] Gasher: darix; compile Ruby in and out of its bytecode, so I can achieve better performance
[16:22:12] sarbs: has joined #ruby
[16:22:21] Rodya_: has joined #ruby
[16:22:29] norc: Gasher, since you are doing it for performance here come my usual questions.
[16:22:31] Gasher: well, compile in and then run it
[16:22:48] darix: Gasher: and your performance is really limited by *that*?
[16:22:57] norc: Gasher, have you written code that works and have you then written tests for that code, and then - have you profiled your code and determined that parsing and compiling is your bottleneck?
[16:23:00] apeiros: Gasher: are you looking for RubyVM::InstructionSequence ?
[16:23:04] norc: Gasher, in that order.
[16:23:09] norc: Gasher, otherwise RubyVM::InstructionSequence.from_binary_format will give you what you want.
[16:23:14] Gnut: has joined #ruby
[16:23:40] norc: But I really recommend you write code that works, test it - then *profile* it - and then spend your time optimizing *if* and *where* necessary.
[16:23:58] Gasher: I just want to check it out, I wouldn't write code that requires performance in Ruby in the first place. I just want to test the RubyVM out, and I can't find any information on it.
[16:24:37] norc: Gasher, http://ruby-doc.org/core-2.3.0/RubyVM/InstructionSequence.html has pretty much all you need. :)
[16:24:58] Gasher: thanks norc
[16:25:10] norc: Note that load_from_binary/to_binary were added in 2.3, so you need to use that version.
[16:26:33] Gasher: ehh, as always Debian-based distros must have outdated versions...
[16:27:16] norc: Gasher, I do not know of any distribution that ships recent Ruby versions. Usage of ruby-installer with chruby is the most widely used way to serve Ruby.
[16:27:27] norc: For Linux/BSD anyway.
[16:27:35] baweaver: has joined #ruby
[16:27:36] Gasher: there is Arch :D
[16:28:04] Gasher: it has 2.3: https://www.archlinux.org/packages/extra/x86_64/ruby/
[16:28:39] norc: Gasher, my mentioned setup has the added advantage of being able to run many ruby versions concurrently without any problem though. ;-)
[16:28:59] norc: (Even including jruby or rubinius)
[16:29:14] binaryplease: has joined #ruby
[16:29:16] Gasher: yeah, I know about those things, but I switch languages all the time so I can't be bothered to install all kinds of version managers
[16:29:43] norc: Fair enough. :)
[16:29:50] Gasher: what was Rubinius?
[16:29:55] norc: Ruby in Ruby.
[16:30:09] verde: has joined #ruby
[16:30:24] norc: (Except for the VM)
[16:30:26] kent\n: has joined #ruby
[16:30:29] Gasher: rubyception?
[16:30:44] Suntzu: has joined #ruby
[16:30:51] adgtl: has joined #ruby
[16:31:04] tAn: has joined #ruby
[16:31:33] skade: has joined #ruby
[16:33:09] bougyman: i'm getting `undefined group option` on /conn=(?<conn>\d+) op=(?<id>\d+) (?<op>[A-Z]+).*(?etime=(?<etime>\d+))
[16:33:28] bougyman: it's (?etime instead of (?:etime
[16:33:47] tAn: has joined #ruby
[16:34:18] norc: bougyman, sometimes its amusing. We are sitting in front of say a parser error and immediately assume there is something really wrong with Ruby - while Ruby tells us quite consively what is wrong. :-)
[16:34:19] apeiros: if there's a ? behind your (?:…) group, you might want to reconsider the .*
[16:34:40] apeiros: because .*(x)? is allowed to not capture x
[16:34:54] adgtl: has joined #ruby
[16:34:54] adgtl: has joined #ruby
[16:35:16] norc: >> ".x" =~ /.*(x)?/
[16:35:17] ruby[bot]: norc: # => 0 (https://eval.in/526232)
[16:35:23] norc: >> ".x" =~ /.*(x)?/; puts $1
[16:35:24] ruby[bot]: norc: # => ...check link for more (https://eval.in/526233)
[16:35:36] bkxd: has joined #ruby
[16:35:57] apeiros: >> "yyyyx"[/.*(x)/, 1] # shorter ;-)
[16:35:58] ruby[bot]: apeiros: # => "x" (https://eval.in/526234)
[16:36:06] IrishGringo: has joined #ruby
[16:36:06] apeiros: >> "yyyyx"[/.*(x)?/, 1] # shorter ;-)
[16:36:07] ruby[bot]: apeiros: # => nil (https://eval.in/526235)
[16:36:21] norc: Okay, wtf is that syntax.
[16:36:31] norc: ri String#[]
[16:36:33] norc: &ri String#[]
[16:36:34] `derpy: http://ruby-doc.org/core-2.3.0/String.html#method-i-5B-5D
[16:36:42] apeiros: Errno::EDOCOVERFLOW!
[16:37:41] apeiros: very convenient to extract a substring by regex. and that in turn is useful to figure which part a regex matches.
[16:37:42] wldcordeiro: has joined #ruby
[16:37:43] norc: apeiros, can we get a heuristic parser that is smarter than me and knows about typos?
[16:37:51] norc: For `derpy I mean.
[16:37:54] jhn: has joined #ruby
[16:38:02] apeiros: `derpy is adaedra's
[16:38:11] apeiros: but you can write it for ruboto and make a PR ;-p
[16:38:33] norc: Well, if I was that smart, it would be hard to write a parser that was smarter than me. :S
[16:38:42] fostertheweb: has joined #ruby
[16:38:47] bougyman: there's no one regex to get both of these, then:
[16:38:55] bougyman: [25/Feb/2016:15:29:25 +0000] conn=5958673 op=4115 SRCH <big search filter>
[16:39:06] bougyman: [25/Feb/2016:15:29:25 +0000] conn=5958673 op=4115 RESULT err=0 tag=101 nentries=1 etime=0
[16:39:20] bougyman: <big search filter> is arbitrary stuff.
[16:39:21] apeiros: bougyman: why? SRCH/RESULT can be used to diff, no?
[16:39:32] bougyman: sure, but that's an if/conditional
[16:39:41] bougyman: and SRCH isn't always SRCH
[16:39:45] bougyman: could be MOD ADD DEL
[16:39:50] adaedra: apeiros: surely you mean for ruby[bot], right?
[16:39:56] zacstewart: has joined #ruby
[16:40:29] apeiros: /<date><con><op>(?:(?:SRCH|MOD|ADD|DEL) .*|RESULT …)/
[16:40:32] apeiros: bougyman: ^
[16:40:39] bougyman: was really trying to outgolf perl -lne '%h=(); if (m{conn=(\d+) op=(\d+).*etime=(\d+)}) {delete($h{"$1-$2"});} elsif (m{conn=(\d+) op=(\d+)}) {$h{"$1-$2"}=1};END{print join("\n", keys %h)}
[16:40:47] bougyman: but it's not that important.
[16:41:03] apeiros: oh, ok. outgolfing perl in regex is hard. if not impossible.
[16:41:04] adgtl: has joined #ruby
[16:41:04] adgtl: has joined #ruby
[16:41:12] adaedra: norc: you mean, binding `derpy search to just 'ri' too?
[16:41:16] apeiros: after all, perl's regex engine is quite a bit more powerful than ruby's afaik
[16:41:27] apeiros: adaedra: ruby[bot] = ruboto
[16:41:30] bougyman: i thought we had close-to-partiy since oniguruma?
[16:41:43] apeiros: bougyman: no code execution in oni
[16:41:53] adaedra: apeiros: tell that to shevy :p
[16:42:04] norc: adaedra, preferrably with an AI that learns about how I make typos.
[16:42:33] apeiros: and within 3 weeks, nobody but norc can use the bot
[16:42:51] s00pcan: has joined #ruby
[16:42:52] adaedra: bot is tied to ri resolution anyway.
[16:42:56] graydot: has joined #ruby
[16:43:16] adaedra: I'm planning to use the correction feature ri has, but it's not coming soon.
[16:43:30] norc: bougyman, or you know.. you could man up and use parslet.
[16:43:46] norc: (Or woman up, but Im just making an assumption based on your nickname)
[16:43:51] araujo: has joined #ruby
[16:43:51] araujo: has joined #ruby
[16:44:04] rodolfowtf: has joined #ruby
[16:44:07] yorickpeterse: Ah yes parslet
[16:44:08] herminiotorres: has joined #ruby
[16:44:13] yorickpeterse: Where parsing takes 10 years
[16:44:17] TolleLege: has joined #ruby
[16:44:26] TolleLege: has left #ruby: ("Leaving")
[16:44:27] william3: has joined #ruby
[16:44:32] yorickpeterse: PEG is great and all, but I've yet to see it perform well
[16:44:53] apeiros: I think PEGs strength isn't performance but relative ease of implementation?
[16:45:06] yorickpeterse: well yeah you don't have to write a separate lexer
[16:45:15] yorickpeterse: which can be good or bad depending on your perspective
[16:45:23] bougyman: that won't help with golfing, guys.
[16:45:31] norc: You would be golfing with readable code points.
[16:45:39] Macaveli: has joined #ruby
[16:46:21] apeiros: bougyman: you've lost me at "outgolfing perl" ;-p
[16:46:31] bougyman: hey i've outgolfed it before.
[16:46:40] bougyman: but not on a regex-central op.
[16:46:43] apeiros: then the perl authors tried to write readable code!
[16:47:26] yorickpeterse: then they made Perl 6
[16:47:32] norc: Perl can be used to write quite readable code. Except nobody does it because they offer you millions of ways to do the opposite.
[16:47:58] yorickpeterse: allrighty, time to write some Rust
[16:48:08] norc: yorickpeterse, sometimes I think that Perl is being developed by Debian people. They have similar release cycles.
[16:48:22] yorickpeterse: Rust's syntax is thankfully not as annoying as Perl's
[16:48:28] yorickpeterse: though I fkn hate the lifetime sytnax
[16:48:36] norc: I keep hearing about Rust.
[16:48:39] norc: Is this a thing?
[16:48:41] yorickpeterse: Though you can actually avoid it quite often
[16:48:48] yorickpeterse: norc: https://www.rust-lang.org/
[16:48:57] dionysus69: has joined #ruby
[16:49:17] yorickpeterse: https://github.com/YorickPeterse/aeon/blob/compiler/src/lexer.rs#L68-L69 brrrr single quotes
[16:49:34] fedexo: has joined #ruby
[16:49:40] yorickpeterse: (that means the value of the "data" field lives as long as the Lexer struct itself)
[16:50:01] volty: has joined #ruby
[16:50:01] apeiros: yorickpeterse: lifetime syntax? wassat?
[16:50:02] adaedra: at least as long, no?
[16:50:24] adaedra: erm, also, we're diving into ot here :p
[16:50:24] yorickpeterse: adaedra: euh yeah technically it can outlive it IIRC
[16:50:41] yorickpeterse: apeiros: basically telling the compiler "Yo stop being a fucking idiot, this is how long this thing sticks around"
[16:50:47] yorickpeterse: The compiler can't always figure it out itself
[16:50:58] apeiros: compiler has ties into the gc?
[16:51:01] synthroid: has joined #ruby
[16:51:03] yorickpeterse: usually when you stuff a reference into some structure you'll end up having to tag things
[16:51:04] apeiros: or do I misunderstand something there?
[16:51:08] adaedra: there's no gc
[16:51:17] yorickpeterse: Based on lifetimes the compiler basically injects free() calls so to speak
[16:51:31] yorickpeterse: It's closer to ARC in Objective-C
[16:51:32] adaedra: and this is more a check of "I have a reference on this object, and I want it to live at least this long because I need it for this time"
[16:51:48] yorickpeterse: also hand writing parsers is the worst
[16:52:10] yorickpeterse: I'm not going to port ruby-ll to Rust. I'm not going to port ruby-ll to Rust. I'm not going to port ruby-ll to Rust.
[16:52:17] yorickpeterse: ACTION rocks himself in the corner
[16:52:25] fullofcaffeine: has joined #ruby
[16:52:34] adaedra: here, a coffee fullofcaffeine.
[16:52:45] yorickpeterse: I mostly just miss my compiler yelling at me when there is a conflict in the grammar
[16:52:51] yorickpeterse: now I have to do all that using pen and paper
[16:53:18] Mon_Ouie: has joined #ruby
[16:55:38] Hanmac: i think i should make popcorn while watching this https://github.com/ContributorCovenant/contributor_covenant/issues/278 XD
[16:55:56] volty: has left #ruby: ("Konversation terminated!")
[16:57:01] yorickpeterse: I wasn't aware children use GitHub these days
[16:57:52] jenrzzz: has joined #ruby
[16:57:56] zast1: has joined #ruby
[16:57:56] darix: hanmac: lol
[16:58:10] darix: the replies in the shanley tweet are even more a reason
[16:58:17] darix: Shanley ‏@shanley 19h19 hours ago
[16:58:18] darix: @oceanomare74 good, I hope you got a disease for which you were unvaccinated
[16:58:27] darix: leading by example
[16:58:48] Deck`: has joined #ruby
[16:58:55] yorickpeterse: Also I think this is now getting offtopic enough
[16:59:23] darix: right ... lets update gitlab to see what yorickpeterse broke this time! :p
[16:59:25] cdg: has joined #ruby
[16:59:34] yorickpeterse: A bunch of caching related things
[16:59:39] amclain: has joined #ruby
[16:59:58] ljames: has joined #ruby
[17:00:15] diegoviola: has joined #ruby
[17:00:33] darix: updating to 4bff9da
[17:01:55] gizmore: has joined #ruby
[17:02:05] ljarvis: hand written parsers FOR LIFE
[17:02:11] kegster: has joined #ruby
[17:02:39] darix: yorickpeterse: btw: would graphite compatible tools also be supported for collecting your metrics?
[17:02:50] william3: has joined #ruby
[17:03:03] yorickpeterse: darix: No, we emit to InfluxDB only
[17:03:14] yorickpeterse: and IIRC InfluxDB's UDP protocol is home grown and not compatible with anything else
[17:03:39] darkxploit: has joined #ruby
[17:04:01] william3: has joined #ruby
[17:04:46] kegster: has left #ruby: ()
[17:04:49] sphex: has joined #ruby
[17:05:35] tulak: has joined #ruby
[17:09:20] jottr: has joined #ruby
[17:11:21] peteyg_: has joined #ruby
[17:11:28] Deck-: has joined #ruby
[17:11:30] chouhoul_: has joined #ruby
[17:11:34] sphex_: has joined #ruby
[17:12:08] BlindSight`: has joined #ruby
[17:12:16] diego_k: has joined #ruby
[17:12:23] iamvery_: has joined #ruby
[17:12:48] solocshaw1: has joined #ruby
[17:13:06] symm-: has joined #ruby
[17:13:11] eregi: has joined #ruby
[17:13:11] rickmasta: has joined #ruby
[17:13:21] deavidsedice: has joined #ruby
[17:13:33] jtdowney_: has joined #ruby
[17:13:40] ESpiney_: has joined #ruby
[17:13:47] mattwildig: has joined #ruby
[17:14:15] Lorn_: has joined #ruby
[17:14:16] gbailey-: has joined #ruby
[17:14:23] anirban: has joined #ruby
[17:14:23] bakedb_: has joined #ruby
[17:14:28] neanderslob_: has joined #ruby
[17:14:59] Mio-chan: has joined #ruby
[17:15:07] ex0ns_: has joined #ruby
[17:15:10] tw1sted_: has joined #ruby
[17:15:11] william3: has joined #ruby
[17:15:15] bnagy_: has joined #ruby
[17:15:17] creat_: has joined #ruby
[17:15:24] jsaak_: has joined #ruby
[17:15:26] Marsjan: has joined #ruby
[17:15:29] ec\_: has joined #ruby
[17:15:35] Kero_: has joined #ruby
[17:15:38] ereslibre: has joined #ruby
[17:15:38] ereslibre: has joined #ruby
[17:15:46] PaulePan1er: has joined #ruby
[17:15:49] tommylom1ykins: has joined #ruby
[17:15:50] cfloare_: has joined #ruby
[17:15:50] angelixd_: has joined #ruby
[17:15:51] Petazz_: has joined #ruby
[17:15:55] janno_: has joined #ruby
[17:15:56] mc_fail_: has joined #ruby
[17:15:57] [ace]_: has joined #ruby
[17:16:01] patteh_: has joined #ruby
[17:16:01] LiquidIn1ect: has joined #ruby
[17:16:02] sunya7a__: has joined #ruby
[17:16:03] Raboo_: has joined #ruby
[17:16:06] kaspergr1bbe: has joined #ruby
[17:16:16] matt_d_: has joined #ruby
[17:16:18] Guest12896_: has joined #ruby
[17:16:59] Drakevr_: has joined #ruby
[17:17:57] Ariadeno_: has joined #ruby
[17:18:03] ruisanto1: has joined #ruby
[17:18:06] sneakerhax: has joined #ruby
[17:18:07] claws: has joined #ruby
[17:19:09] grumpycat: has joined #ruby
[17:19:16] Amnez777-: has joined #ruby
[17:19:33] pragmatism_: has joined #ruby
[17:19:39] vqrs_: has joined #ruby
[17:19:39] sanguisdex: has joined #ruby
[17:19:54] kies^: has joined #ruby
[17:20:03] sudoubuntu: has joined #ruby
[17:20:12] yossarian: has joined #ruby
[17:20:25] martinbjeldbak_: has joined #ruby
[17:20:31] Sigma01: has joined #ruby
[17:20:49] swistak35_: has joined #ruby
[17:20:50] Drakevr: has joined #ruby
[17:20:50] gaffo: has joined #ruby
[17:20:50] mburns_: has joined #ruby
[17:20:54] tabakhase: has joined #ruby
[17:21:02] mfb2: has joined #ruby
[17:21:08] NightMonkey: has joined #ruby
[17:21:11] donnoc_: has joined #ruby
[17:21:13] Zackio: has joined #ruby
[17:21:14] Phanes: has joined #ruby
[17:21:14] Phanes: has joined #ruby
[17:21:20] KrzaQ: has joined #ruby
[17:21:23] llua: has joined #ruby
[17:21:25] segy: has joined #ruby
[17:21:29] j416: has joined #ruby
[17:21:32] maxmanders: has joined #ruby
[17:21:36] joconcepts: has joined #ruby
[17:21:44] Biohazard: has joined #ruby
[17:21:47] kitallis: has joined #ruby
[17:21:52] WebDawg: has joined #ruby
[17:21:53] philtr: has joined #ruby
[17:22:14] joevandyk: has joined #ruby
[17:22:20] queequeg1: has joined #ruby
[17:22:45] Brando753: has joined #ruby
[17:22:54] Log1x: has joined #ruby
[17:22:54] Log1x: has joined #ruby
[17:23:11] Tessier-Ashpool: has joined #ruby
[17:23:48] arthurnn: has joined #ruby
[17:24:09] cpruitt: has joined #ruby
[17:24:40] apeiros: has joined #ruby
[17:26:25] twodayslate: has joined #ruby
[17:26:31] mg^: has joined #ruby
[17:26:33] uglybandersnatch: has joined #ruby
[17:26:42] djellemah: has joined #ruby
[17:26:55] dasher^0_o: has joined #ruby
[17:27:08] al2o3-cr: has joined #ruby
[17:27:12] timonv: has joined #ruby
[17:27:13] lannonbr: has joined #ruby
[17:27:14] greister: has joined #ruby
[17:27:14] lady3bean: has joined #ruby
[17:27:27] Veejay: has joined #ruby
[17:27:28] jtdoncas: has joined #ruby
[17:27:28] majjoha: has joined #ruby
[17:27:34] hplar: has joined #ruby
[17:27:44] kies: has joined #ruby
[17:27:50] mondok: has joined #ruby
[17:27:52] go|dfish: has joined #ruby
[17:29:29] irick: has joined #ruby
[17:29:35] lsmola: has joined #ruby
[17:29:46] tonini: has joined #ruby
[17:29:54] agit0: has joined #ruby
[17:29:58] sekrit: has joined #ruby
[17:32:26] davedev24: has joined #ruby
[17:32:27] cantaberry: has joined #ruby
[17:32:41] bronson: has joined #ruby
[17:33:11] Maletor: has joined #ruby
[17:33:46] TomyLobo: has joined #ruby
[17:34:36] platzhirsch: has joined #ruby
[17:36:14] flughafen_: has joined #ruby
[17:37:01] replay: has joined #ruby
[17:37:43] replay: has joined #ruby
[17:38:25] rht: has joined #ruby
[17:39:00] herminiotorres: has joined #ruby
[17:39:32] Anderson69s_Deb: has joined #ruby
[17:40:47] ElFerna_: has joined #ruby
[17:42:31] safe: has joined #ruby
[17:43:53] poguez_: has joined #ruby
[17:48:21] blackmesa: has joined #ruby
[17:48:37] benlieb: has joined #ruby
[17:49:25] fantazo: has joined #ruby
[17:50:11] fostertheweb: has joined #ruby
[17:50:43] marr: has joined #ruby
[17:51:07] KensoDev: has joined #ruby
[17:52:18] benlieb: I'm trying to stub an attr_reader in active record with rspec: expect_any_instance_of(PaypalIpn).to receive(:postback_response).and_return('VERIFIED'). PaypalIpn does not implement #postback_response, but it DOES. Can rspec stub attributes?
[17:52:34] platzhirsch: has left #ruby: ()
[17:53:56] Asher: has joined #ruby
[17:55:11] uris: has joined #ruby
[17:55:36] dopamean_: has joined #ruby
[17:58:30] sgambino: has joined #ruby
[17:59:03] VeryBewitching: has joined #ruby
[17:59:46] alexishuard: has joined #ruby
[18:02:42] dopamean_: has joined #ruby
[18:03:47] aryaching: has joined #ruby
[18:04:02] dhollinger: has joined #ruby
[18:05:29] uris: has joined #ruby
[18:05:59] firstdayonthejob: has joined #ruby
[18:06:19] devbug: has joined #ruby
[18:06:20] jottr: has joined #ruby
[18:07:25] adgtl: has joined #ruby
[18:07:25] adgtl: has joined #ruby
[18:09:20] Kensei: has joined #ruby
[18:09:20] Kensei: has joined #ruby
[18:11:19] Gnut_: has joined #ruby
[18:11:23] tomphp: has joined #ruby
[18:12:53] goku`: has joined #ruby
[18:13:22] goodcodeguy: has joined #ruby
[18:13:50] yqt: has joined #ruby
[18:14:04] Dimik: has joined #ruby
[18:14:39] adgtl: has joined #ruby
[18:14:39] adgtl: has joined #ruby
[18:14:44] blackmesa: has joined #ruby
[18:15:49] goodcodeguy: has joined #ruby
[18:16:13] sepp2k: has joined #ruby
[18:16:22] despai: has joined #ruby
[18:17:44] binaryplease: has joined #ruby
[18:20:29] emilford: has joined #ruby
[18:21:00] dgncn: has joined #ruby
[18:25:40] Ishido: has joined #ruby
[18:25:53] turova: has joined #ruby
[18:26:15] maho: has joined #ruby
[18:26:28] turova: hello, I just built ruby (1.9.3) from source and noticed that there's a miniruby binary, though I can't find a description for what it's supposed to be. Anyone know?
[18:26:29] maho: Can someone modify this so that the order of input numbers is not changed http://codepad.org/G7lrsDow
[18:27:42] Hanmac: turova: some newer ruby does need ruby to build itself ... as you can see the problem how to build ruby without ruby when it does need ruby ... thats what this miniruby is for
[18:28:15] Hanmac: maho: a reason why you ask a python question in the #ruby channel?
[18:28:27] turova: hanmac, so it's a less functional version of ruby that can run without dependencies and such?
[18:28:54] turova: I'm trying to put together a folder with some ruby binaries that can be semi-portable
[18:28:55] maho: hanmac: um, not registered on freenode
[18:29:06] turova: I know it's discouraged, but I need it at least temporarily
[18:29:06] Hanmac: turova: yeah similar, its only reason is to build ruby if you dont have a system or other ruby
[18:29:21] Deck-: has joined #ruby
[18:29:31] sandstrom: has joined #ruby
[18:29:47] shadoi: has joined #ruby
[18:30:11] maho: hanmac: Could you help?
[18:30:51] Hanmac: maho my python exp is ~ 0
[18:31:10] maho: Somebody
[18:33:46] bronson: has joined #ruby
[18:33:48] goodcodeguy: has joined #ruby
[18:34:11] BtcBen: has joined #ruby
[18:36:06] tomphp: has joined #ruby
[18:36:24] shevy: maho go get a real client, register, then join #python
[18:36:42] fostertheweb: has joined #ruby
[18:37:04] maho: shevy: That wouldn't help thoigh
[18:37:19] kirillzh: has joined #ruby
[18:37:55] gregf_: maho: is your question like, what does this python code do?
[18:38:22] maho: gregf_: No
[18:39:33] bronson: has joined #ruby
[18:39:35] kirillzh: has joined #ruby
[18:40:17] gregf_: so what you want is instead of (3 * ( 2 + 1)) (1 * (2 + 3 ))
[18:40:27] Asher: has joined #ruby
[18:42:08] tomphp: has joined #ruby
[18:42:12] krobzaur: has joined #ruby
[18:42:46] baweaver: has joined #ruby
[18:43:04] intrigue_: has joined #ruby
[18:43:08] LuckyABA: has joined #ruby
[18:44:33] trosborn: has joined #ruby
[18:44:54] c0ncealed: has joined #ruby
[18:45:10] araujo_: has joined #ruby
[18:45:59] rbennacer: has joined #ruby
[18:46:27] jolts: has joined #ruby
[18:47:15] B1n4r10: has joined #ruby
[18:48:22] devbug: has joined #ruby
[18:48:47] freerobby: has joined #ruby
[18:48:59] freerobby: has left #ruby: ()
[18:49:23] araujo_: has joined #ruby
[18:49:26] jolts: has joined #ruby
[18:49:48] alexishuard: has joined #ruby
[18:51:14] ElFerna_: has joined #ruby
[18:52:17] jolts: has joined #ruby
[18:52:35] zacstewart: has joined #ruby
[18:55:06] jolts: has joined #ruby
[18:55:13] rbennacer: has joined #ruby
[18:56:10] sp4rrow: has joined #ruby
[18:57:54] jolts: has joined #ruby
[18:59:50] jenrzzz: has joined #ruby
[19:00:29] fostertheweb: has joined #ruby
[19:00:41] jolts: has joined #ruby
[19:01:10] moeabdol: has joined #ruby
[19:03:32] jolts: has joined #ruby
[19:03:44] pawnbox: has joined #ruby
[19:03:59] baweaver: has joined #ruby
[19:05:47] sp4rrow: has joined #ruby
[19:06:18] jolts: has joined #ruby
[19:08:06] Renich: has joined #ruby
[19:09:04] jolts: has joined #ruby
[19:09:18] krobzaur: has joined #ruby
[19:10:14] baweaver: has joined #ruby
[19:10:24] sinkensabe: has joined #ruby
[19:11:50] jolts: has joined #ruby
[19:12:31] zeroDivisible: has joined #ruby
[19:13:03] nb_bez___: has joined #ruby
[19:14:38] jolts: has joined #ruby
[19:15:01] maho: has left #ruby: ()
[19:15:31] nogic: has joined #ruby
[19:16:32] nogic: has joined #ruby
[19:17:24] jolts: has joined #ruby
[19:17:33] nogic: has joined #ruby
[19:18:40] dfockler: has joined #ruby
[19:18:48] codecop: has joined #ruby
[19:19:07] anirban: has joined #ruby
[19:20:02] jimcroft: has joined #ruby
[19:20:12] jolts: has joined #ruby
[19:20:32] cabargas: has joined #ruby
[19:22:14] mattwildig: has joined #ruby
[19:23:00] jolts: has joined #ruby
[19:23:45] dhollinger: has joined #ruby
[19:25:50] jolts: has joined #ruby
[19:27:13] cj: has joined #ruby
[19:27:30] cj: Hey folks, I need to tell the builder not to build with references to deprecated OpenSSL symbols. Is there an argument for this?
[19:28:26] goodcodeguy: has joined #ruby
[19:28:33] _djbkd: has joined #ruby
[19:28:37] graydot: has joined #ruby
[19:28:38] jolts: has joined #ruby
[19:30:14] nando293921: has joined #ruby
[19:30:18] st0mar: has joined #ruby
[19:30:31] sinkensabe: has joined #ruby
[19:30:50] baweaver: has joined #ruby
[19:31:24] jolts: has joined #ruby
[19:31:25] aegis3121: has joined #ruby
[19:32:07] pdoherty: has joined #ruby
[19:32:44] Antiarc: has joined #ruby
[19:33:30] alexishuard: has joined #ruby
[19:33:47] axisys: has joined #ruby
[19:34:10] jolts: has joined #ruby
[19:35:17] sandstrom: has joined #ruby
[19:36:39] Elysia: has joined #ruby
[19:36:55] nogic: has joined #ruby
[19:37:00] jolts: has joined #ruby
[19:37:44] yqt: has joined #ruby
[19:38:11] michael_mbp: has joined #ruby
[19:39:06] sgambino: has joined #ruby
[19:39:14] allcentury: has joined #ruby
[19:39:23] sinkensabe: has joined #ruby
[19:39:31] slash_nick: whoa, why are Net::HTTPResponse#header and #read_header obsolete? Is there a replacement? https://github.com/ruby/ruby/blob/trunk/lib/net/http/response.rb#L145-L153
[19:39:40] tomphp: has joined #ruby
[19:39:46] jolts: has joined #ruby
[19:40:13] freerobby: has joined #ruby
[19:40:18] slash_nick: Nevermind...
[19:40:33] slash_nick: @response.header('x-foo') becomes @response['x-foo']
[19:42:16] mdw: has joined #ruby
[19:42:38] jolts: has joined #ruby
[19:43:09] jolts: has joined #ruby
[19:43:10] rht: has joined #ruby
[19:43:41] jolts: has joined #ruby
[19:44:10] kirun: has joined #ruby
[19:44:12] jolts: has joined #ruby
[19:44:20] jenrzzz: has joined #ruby
[19:44:45] jolts: has joined #ruby
[19:46:13] tomphp: has joined #ruby
[19:46:15] elifoster: has joined #ruby
[19:47:55] Gnut: has joined #ruby
[19:48:00] quakephil_: has joined #ruby
[19:50:16] solars: has joined #ruby
[19:52:09] rbennacer: has joined #ruby
[19:54:03] rob_: has left #ruby: ()
[19:54:38] mattwildig: has joined #ruby
[19:55:06] Xeago: has joined #ruby
[19:55:59] moeabdol: has joined #ruby
[19:56:46] prefix: has joined #ruby
[19:59:34] prefix: does the JSON module make a distinction between strings and booleans when creating hashes? for example, given a config_hash that was converted from a json file using JSON.parse, will there be a difference between values "true" and true within config_hash?
[19:59:52] Deck-: has joined #ruby
[20:00:15] jolts: has joined #ruby
[20:00:36] Jeremy1023: has joined #ruby
[20:01:11] aegis3121: has joined #ruby
[20:01:58] adaedra: >> require 'json'; json.parse %({"boolean":true,"string":"true"})
[20:01:59] ruby[bot]: adaedra: # => undefined local variable or method `json' for main:Object ...check link for more (https://eval.in/526334)
[20:02:08] adaedra: >> require 'json'; Json.parse %({"boolean":true,"string":"true"})
[20:02:09] ruby[bot]: adaedra: # => uninitialized constant Json ...check link for more (https://eval.in/526335)
[20:02:15] adaedra: double duh.
[20:02:44] adaedra: >> require 'json'; JSON.parse %({"boolean":true,"string":"true"})
[20:02:45] ruby[bot]: adaedra: # => {"boolean"=>true, "string"=>"true"} (https://eval.in/526336)
[20:02:56] adaedra: Here we go.
[20:03:53] alem0lars__: has joined #ruby
[20:04:57] prefix: reasonable
[20:05:05] baweaver: has joined #ruby
[20:06:57] wldcordeiro: has joined #ruby
[20:07:06] kirillzh: has joined #ruby
[20:10:29] Don_John: has joined #ruby
[20:11:22] mdw: has joined #ruby
[20:12:12] Coldblackice: has joined #ruby
[20:12:39] RegulationD: has joined #ruby
[20:14:48] nogic: has joined #ruby
[20:15:49] freerobby: has joined #ruby
[20:16:09] _djbkd: has joined #ruby
[20:16:27] mattwildig: has joined #ruby
[20:16:56] yfeldblum: has joined #ruby
[20:19:19] ElFerna_: has joined #ruby
[20:19:36] jimcroft: has joined #ruby
[20:20:43] futilegames: has joined #ruby
[20:21:04] MrDoctor: has joined #ruby
[20:22:00] wilbert: has joined #ruby
[20:23:28] Cohedrin: has joined #ruby
[20:24:03] devbug: has joined #ruby
[20:24:19] benlieb: has joined #ruby
[20:25:38] NeverTired: has joined #ruby
[20:28:44] blackgoat: has joined #ruby
[20:29:03] alexishuard: has joined #ruby
[20:30:52] Pumukel: has joined #ruby
[20:31:45] Nuck: has joined #ruby
[20:31:55] benlieb: has joined #ruby
[20:32:55] Spami: has joined #ruby
[20:36:31] humblespoon: if I have an array of words and I want to do something to each word except if it is the first word or last word in the array
[20:36:35] finisherr: has joined #ruby
[20:36:54] humblespoon: can I somehow reference the index in this block? words.map do |word|
[20:37:49] nogic: has joined #ruby
[20:38:18] rbennacer: has joined #ruby
[20:39:13] tomphp: has joined #ruby
[20:39:16] baweaver: has joined #ruby
[20:39:38] sinkensa_: has joined #ruby
[20:40:16] steffkes: has joined #ruby
[20:40:16] steffkes: has joined #ruby
[20:41:37] mfb2: has joined #ruby
[20:42:11] idefine: has joined #ruby
[20:42:14] rbennacer: has joined #ruby
[20:42:29] BtcBen: has joined #ruby
[20:43:24] Kensei: has joined #ruby
[20:48:49] Maletor: has joined #ruby
[20:50:42] baweaver: has joined #ruby
[20:51:13] yxhuvud: humblespoon: words.map.with_index do |word, index|
[20:52:06] DonOtreply: has joined #ruby
[20:52:13] blackmesa: has joined #ruby
[20:52:50] humblespoon: awesome, thanks yxhuvud I couldn't find the combination to use for it
[20:53:41] davedev24: has joined #ruby
[20:53:49] hinbody: has joined #ruby
[20:55:06] jwinder: has joined #ruby
[20:55:11] alexishuard: has joined #ruby
[20:55:39] pawnbox: has joined #ruby
[20:57:53] spuk: has joined #ruby
[21:00:27] prefix: is there a method in ruby that will allow me to iterate over a hash and do something special wit the last K V pair?
[21:01:07] jottr: has joined #ruby
[21:01:22] idefine: has joined #ruby
[21:02:14] st0mar: has joined #ruby
[21:02:23] chipotle: has joined #ruby
[21:02:27] jenrzzz: has joined #ruby
[21:03:29] n_blownapart: has joined #ruby
[21:04:20] mfb2: has joined #ruby
[21:05:05] the_jza: has joined #ruby
[21:05:46] st0mar: words.map.with_index do |word, index|
[21:05:56] Ox0dea: humblespoon: #with_index is good, but `foo[1...-1] = foo[1...-1].map {}` is a little cleaner if you're okay with modifying the array in-place.
[21:06:07] fullofcaffeine: has joined #ruby
[21:06:12] minimalism: has joined #ruby
[21:06:29] ferr: has joined #ruby
[21:06:48] DmitryBochkarev: has joined #ruby
[21:07:05] humblespoon: ah thanks Ox0dea . I think I needed the index for another use case where we had to modify every even numbered entry in the array
[21:07:37] idefine: has joined #ruby
[21:07:44] Ox0dea: humblespoon: Sure, #with_index is a great method, but having an involved conditional in a #map predicate is... unpleasant.
[21:08:22] humblespoon: haha I feel like I'm a little to new to understand how that could be bad
[21:08:42] the_jza: has left #ruby: ()
[21:08:43] Gnut: has joined #ruby
[21:09:04] humblespoon: don't know what you mean by an "involved conditional" in the "#map predicate"
[21:10:05] QORRiE: has joined #ruby
[21:10:06] MatthewsFace: has joined #ruby
[21:10:22] Ox0dea: humblespoon: https://eval.in/526352
[21:10:47] giblez: has joined #ruby
[21:10:53] giblez: has left #ruby: ()
[21:11:10] Ox0dea: humblespoon: Those do essentially the same thing (if you're okay with the in-place modification), and I can't help but prefer one over the other. :P
[21:11:12] sinkensabe: has joined #ruby
[21:11:16] bkxd: has joined #ruby
[21:12:29] MyMind: has joined #ruby
[21:12:43] baweaver: has joined #ruby
[21:14:11] humblespoon: is there an easy way to get irb to the directory where I'm currently writing my code?
[21:15:21] ruby[bot]: Pry, the better IRB. Includes easy object inspection via `ls`, `history`, docs view with `?`, source view with `$` and syntax highlighting, among other features (see `help` for more). It can also be used for easy debugging by putting `binding.pry` directly in your source code. Visit https://pryrepl.
[21:15:21] ruby[bot]: org/ or get it now with: gem install pry pry-doc
[21:15:29] eam: humblespoon: humblespoon Dir.chdir?
[21:15:47] baweaver: then use the `pry --gem` to load it in the context of a gem
[21:15:59] baweaver: it probably has other lib features.
[21:16:24] idefine_: has joined #ruby
[21:16:26] mostlybadfly: has joined #ruby
[21:16:34] bkxd: has joined #ruby
[21:17:14] bronson: has joined #ruby
[21:17:21] tomphp: has joined #ruby
[21:17:37] humblespoon: baweaver I'll take a look at pry to see if I can get it to work. I'm completely new to this so not too sure how to do the other things yet
[21:18:03] baweaver: Look up 'Pry the Good Parts' by Conrad Irwin
[21:18:10] baweaver: it'll cover most of the fun stuff
[21:21:10] MatthewsFace: has joined #ruby
[21:21:57] pdoherty: has joined #ruby
[21:22:33] mfb2: has joined #ruby
[21:23:30] ElFerna_: has joined #ruby
[21:23:49] st0mar: has joined #ruby
[21:25:04] sinkensabe: has joined #ruby
[21:25:17] devbug: has joined #ruby
[21:26:37] sp4rrow: has joined #ruby
[21:27:22] rht: has joined #ruby
[21:27:34] uris: has joined #ruby
[21:30:26] Deck-: has joined #ruby
[21:31:33] flughafen_: has joined #ruby
[21:32:45] theunraveler: has joined #ruby
[21:33:18] ElFerna_: has joined #ruby
[21:33:56] sandstrom: has joined #ruby
[21:34:06] Musashi007: has joined #ruby
[21:37:24] rakm: has joined #ruby
[21:41:23] intrigue_: has joined #ruby
[21:41:55] mfb2: has joined #ruby
[21:43:16] pawnbox: has joined #ruby
[21:45:22] freerobby: has joined #ruby
[21:45:45] mfb2: has joined #ruby
[21:47:28] jenrzzz: has joined #ruby
[21:49:57] sevenfourk: has joined #ruby
[21:53:46] sp4rrow: has joined #ruby
[21:53:59] kirillzh: has joined #ruby
[21:54:05] symm-: has joined #ruby
[21:55:15] freerobby: has joined #ruby
[21:56:24] Rutix: has joined #ruby
[21:56:24] Rutix: has joined #ruby
[21:57:34] sinkensa_: has joined #ruby
[21:58:21] theunraveler: has joined #ruby
[21:58:26] ur5us: has joined #ruby
[21:59:00] x77686d: has joined #ruby
[22:01:15] s00pcan_: has joined #ruby
[22:01:16] fostertheweb: has joined #ruby
[22:02:03] jivemeat: has joined #ruby
[22:02:29] evidex: has joined #ruby
[22:03:11] mpistone: has joined #ruby
[22:03:13] jivemeat: hey guys, I used rails installer but got this error when rails new app - "Checksum of /versions does not match the checksum provided by the server! Something is wrong"
[22:03:29] jivemeat: Happened after it ran run bundle install
[22:03:29] Gnut_: has joined #ruby
[22:04:00] ruby[bot]: Please join #RubyOnRails for Rails questions. You need to be identified with NickServ, see /msg NickServ HELP
[22:04:28] jivemeat: oh okay, sorry
[22:05:52] tomphp: has joined #ruby
[22:06:08] imperator: has joined #ruby
[22:06:25] chipotle: has joined #ruby
[22:06:30] imperator: given a URI object, is there a better way to get this string? "#{uri.scheme}://#{uri.host}"
[22:10:34] ljarvis: imperator: not really (you could munge the uri object by setting path to "" and query to nil and then call to_s) but what you have is fine
[22:11:01] nando293921: has joined #ruby
[22:11:47] openstruct: has joined #ruby
[22:12:00] sinkensabe: has joined #ruby
[22:12:06] ElFerna_: has joined #ruby
[22:12:42] FooMunki: has joined #ruby
[22:13:03] fullofcaffeine: has joined #ruby
[22:13:29] Gnut: has joined #ruby
[22:15:04] dionysus69: has joined #ruby
[22:15:19] tfitts: has joined #ruby
[22:17:12] bkxd: has joined #ruby
[22:17:31] hangelo: has joined #ruby
[22:18:02] imperator: ljarvis, ok, thanks
[22:18:03] bronson: has joined #ruby
[22:18:05] fredrik: has joined #ruby
[22:19:54] freddief: has joined #ruby
[22:20:10] freddief: has left #ruby: ()
[22:20:31] trinaldi: has joined #ruby
[22:20:57] Aviio: has joined #ruby
[22:21:35] holyGlitch: has joined #ruby
[22:22:18] bkxd_: has joined #ruby
[22:23:08] nogic: has joined #ruby
[22:23:11] nfk: has joined #ruby
[22:23:29] Aviio: shevy: are you good with erb templates?
[22:23:37] ur5us: has joined #ruby
[22:24:08] fullofcaffeine: has joined #ruby
[22:24:12] nogic: has joined #ruby
[22:25:04] nogic: has joined #ruby
[22:26:12] nogic: has joined #ruby
[22:27:09] nogic: has joined #ruby
[22:27:18] rbennacer: has joined #ruby
[22:27:50] baweaver: has joined #ruby
[22:28:07] mfb2: has joined #ruby
[22:28:20] sinkensabe: has joined #ruby
[22:30:35] BaroMeter: has joined #ruby
[22:33:10] kirillzh: has joined #ruby
[22:33:13] hxegon: has joined #ruby
[22:34:45] mfb2: has joined #ruby
[22:36:26] nettoweb: has joined #ruby
[22:36:45] DonOtreply: has joined #ruby
[22:39:13] quazimodo: has joined #ruby
[22:40:46] zenlot1: has joined #ruby
[22:41:07] rdavila: has joined #ruby
[22:42:25] s00pcan: has joined #ruby
[22:46:09] idefine: has joined #ruby
[22:47:24] sinkensabe: has joined #ruby
[22:47:26] blackmesa: has joined #ruby
[22:47:29] nettoweb: has joined #ruby
[22:47:41] TBAA: has joined #ruby
[22:49:58] openstruct: has joined #ruby
[22:50:55] mikeiniowa: has joined #ruby
[22:51:26] tristanp: has joined #ruby
[22:53:09] bkxd: has joined #ruby
[22:53:29] mfb2: has joined #ruby
[22:55:08] mfb2: has joined #ruby
[22:57:55] yfeldblum: has joined #ruby
[22:59:09] babblebre: has joined #ruby
[23:00:40] idefine_: has joined #ruby
[23:02:56] mfb2: has joined #ruby
[23:07:28] Terens: has joined #ruby
[23:07:32] mdw: has joined #ruby
[23:07:54] baweaver: has joined #ruby
[23:09:27] MeMoc: has joined #ruby
[23:12:30] sneakerhax: has joined #ruby
[23:12:55] caserg: has joined #ruby
[23:13:15] nettoweb: has joined #ruby
[23:13:24] pawnbox: has joined #ruby
[23:15:09] j2t: has joined #ruby
[23:16:22] aoelk: has joined #ruby
[23:16:25] aoelk: has left #ruby: ()
[23:17:26] bronson: has joined #ruby
[23:18:44] y2mq37: has joined #ruby
[23:18:44] sneakerhax: has joined #ruby
[23:22:21] pika_pika: has joined #ruby
[23:23:51] ramfjord: has joined #ruby
[23:24:49] mfb2: has joined #ruby
[23:25:07] shadynastys: has joined #ruby
[23:26:17] LuckyABA: has joined #ruby
[23:28:00] thevaliantx: has joined #ruby
[23:29:21] shiver: has joined #ruby
[23:29:21] shiver: has joined #ruby
[23:29:24] uglybandersnatch: has joined #ruby
[23:30:31] johnmilton: has joined #ruby
[23:30:42] snowy: has joined #ruby
[23:30:50] Kensei: has joined #ruby
[23:30:50] Kensei: has joined #ruby
[23:33:22] Wolland: has joined #ruby
[23:34:59] peteyg: has joined #ruby
[23:36:31] snockerton: has joined #ruby
[23:37:27] rbennacer: has joined #ruby
[23:40:33] Musashi007: has joined #ruby
[23:41:03] B1n4r10: has joined #ruby
[23:41:46] jottr: has joined #ruby
[23:43:50] ElFerna_: has joined #ruby
[23:49:31] TomPeed: has joined #ruby
[23:50:37] aaeron: has joined #ruby
[23:52:34] felltir: has joined #ruby
[23:52:44] kirillzh: has joined #ruby
[23:53:59] nettoweb: has joined #ruby
[23:55:06] kam270: has joined #ruby
[23:55:56] kam270: has joined #ruby
[23:56:39] nettoweb: has joined #ruby
[23:59:27] jinetix: has joined #ruby