« Back to channel list

#ruby - 25 August 2017

« Back 1 day Forward 1 day »
[00:00:03] gbgdev: has joined #ruby
[00:00:39] jrabe: has joined #ruby
[00:00:52] Asher: has joined #ruby
[00:02:57] _sfiguser: has joined #ruby
[00:04:45] Asher: has joined #ruby
[00:05:13] beilabs: has joined #ruby
[00:06:32] Asher: has joined #ruby
[00:06:47] Asher: has joined #ruby
[00:07:17] Guest57399: has joined #ruby
[00:10:23] Silthias: has joined #ruby
[00:11:17] skweek: has joined #ruby
[00:13:44] canteen4: has joined #ruby
[00:16:24] aduabu: has joined #ruby
[00:16:32] Kero: has joined #ruby
[00:16:38] SeepingN: has joined #ruby
[00:16:53] alfiemax: has joined #ruby
[00:19:25] canteen4: has joined #ruby
[00:22:07] nofxx: has joined #ruby
[00:22:53] Asher: has joined #ruby
[00:23:25] umaaji: has joined #ruby
[00:25:51] aduabu: has joined #ruby
[00:28:10] chouhoulis: has joined #ruby
[00:29:01] canteen4: has joined #ruby
[00:29:03] harai: has joined #ruby
[00:31:38] aduabu: has joined #ruby
[00:32:23] orbyt_: has joined #ruby
[00:33:03] tsia: has joined #ruby
[00:33:45] gbgdev: has joined #ruby
[00:36:14] Joufflu: has joined #ruby
[00:36:33] brent__: has joined #ruby
[00:37:47] nowhereman: has joined #ruby
[00:40:36] canteen4: has joined #ruby
[00:42:16] __Yiota: has joined #ruby
[00:44:18] cagomez: has joined #ruby
[00:45:42] cdg: has joined #ruby
[00:46:39] cagomez_: has joined #ruby
[00:50:37] aduabu: has joined #ruby
[00:51:47] ur5us: has joined #ruby
[00:54:53] canteen4: has joined #ruby
[00:57:48] aduabu: has joined #ruby
[01:01:36] canteen4: has joined #ruby
[01:02:25] TinkerTyper: has joined #ruby
[01:03:54] zenit: has joined #ruby
[01:05:39] TinkerTyper: has joined #ruby
[01:06:02] swills: has joined #ruby
[01:06:02] swills: has joined #ruby
[01:07:08] ryandevilla: has joined #ruby
[01:07:41] bkxd: has joined #ruby
[01:07:42] bronson: has joined #ruby
[01:08:55] TinkerTyper: has joined #ruby
[01:09:03] gizmore|2: has joined #ruby
[01:10:14] TinkerTyper_: has joined #ruby
[01:11:39] nowhereman: has joined #ruby
[01:13:23] d^sh: has joined #ruby
[01:13:27] TinkerTy-: has joined #ruby
[01:15:24] emilford: has joined #ruby
[01:16:44] beilabs_: has joined #ruby
[01:18:04] nowhereman: has joined #ruby
[01:20:29] aduabu: has joined #ruby
[01:22:51] guardianx: has joined #ruby
[01:24:59] canteen4: has joined #ruby
[01:25:09] TinkerTyper: has joined #ruby
[01:26:15] emilford: has joined #ruby
[01:29:32] enterprisey: has joined #ruby
[01:30:04] mikeiniowa: has joined #ruby
[01:33:51] aduabu: has joined #ruby
[01:34:56] phinxy: has joined #ruby
[01:36:26] skweek: has joined #ruby
[01:37:20] mim1k: has joined #ruby
[01:37:59] TinkerTyper: has joined #ruby
[01:38:37] phinxy: has left #ruby: ()
[01:40:08] canteen4: has joined #ruby
[01:43:29] aduabu: has joined #ruby
[01:44:00] swills: has joined #ruby
[01:44:00] swills: has joined #ruby
[01:45:43] Joufflu: has joined #ruby
[01:45:53] cschneid_: has joined #ruby
[01:48:04] swills: has joined #ruby
[01:48:04] swills: has joined #ruby
[01:49:36] canteen4: has joined #ruby
[01:50:20] TinkerTyper: has joined #ruby
[01:52:50] bmurt: has joined #ruby
[01:55:39] aduabu: has joined #ruby
[01:58:59] mtkd: has joined #ruby
[02:01:38] VarisNetizen: has joined #ruby
[02:03:04] hinbody: has joined #ruby
[02:04:19] herbmillerjr: has joined #ruby
[02:05:33] BSaboia: has joined #ruby
[02:08:16] canteen4: has joined #ruby
[02:09:17] swills: has joined #ruby
[02:09:17] swills: has joined #ruby
[02:10:29] TinkerTyper: has joined #ruby
[02:12:42] aduabu: has joined #ruby
[02:13:55] pugc: has joined #ruby
[02:16:45] canteen4: has joined #ruby
[02:19:40] alfiemax: has joined #ruby
[02:20:17] aduabu: has joined #ruby
[02:20:58] AndBobsYourUncle: has joined #ruby
[02:24:47] kent\n: has joined #ruby
[02:26:43] canteen4: has joined #ruby
[02:27:08] emilford: has joined #ruby
[02:28:54] TinkerTyper: has joined #ruby
[02:29:19] nfsnobody: has joined #ruby
[02:29:29] aduabu: has joined #ruby
[02:29:36] aphelion: has joined #ruby
[02:30:14] DarkBushido: has joined #ruby
[02:30:14] DarkBushido: has joined #ruby
[02:30:15] rideh: has joined #ruby
[02:32:07] tpendragon: has joined #ruby
[02:33:40] canteen4: has joined #ruby
[02:36:30] aduabu: has joined #ruby
[02:39:07] TinkerTyper: has joined #ruby
[02:40:39] canteen4: has joined #ruby
[02:41:19] ule: has joined #ruby
[02:41:46] ule: Hey guys.. Lets say you have an array.. foo = []
[02:42:13] ule: how would you add elements to foo, having 2 different structures: string and another array?
[02:42:25] ule: foo << 'test'
[02:42:30] ule: ^ this adds test to foo
[02:42:44] ule: now, lets say I have ['test1', 'test2']
[02:43:07] ule: if I do the same thing, it will become: foo = ['test', ['test1', 'test2']]
[02:43:20] ule: so how can I made a generic insert where.. if it's an array, it combines
[02:43:26] uZiel: has joined #ruby
[02:43:33] ule: if its an string, it adds
[02:44:03] ule: foo + input if input.is_a? Array
[02:44:17] ule: foo << input if input.is_a? String ?
[02:45:18] milardovich: has joined #ruby
[02:46:14] ule: I'm gonna do that
[02:46:23] ule: pls let me know if you know a kind of generic inserter
[02:47:55] aduabu: has joined #ruby
[02:48:52] al2o3-cr: ule: foo.push(*obj)
[02:49:16] TinkerTyper: has joined #ruby
[02:51:44] canteen4: has joined #ruby
[02:54:40] pinksandles: foo.concat(otherfoo)
[02:55:41] aduabu: has joined #ruby
[02:57:46] canteen4: has joined #ruby
[02:57:51] al2o3-cr: pinksandles: that won't work for strings
[02:58:34] pinksandles: neither does *"foo". it's not an array :) i see, i missed that part, then coerce to array first, and use concat/push.
[02:59:26] TinkerTyper: has joined #ruby
[02:59:28] pinksandles: [].push *"foo"
[02:59:34] pinksandles: so indeed, that's the nicest solution
[02:59:36] uZiel: has joined #ruby
[03:00:09] cadillac_: has joined #ruby
[03:01:49] aduabu: has joined #ruby
[03:03:34] pinksandles: so what's point to Array.wrap in Rails?
[03:04:06] al2o3-cr: pinksandles: the only one that differs is Hash
[03:04:17] al2o3-cr: >> [].push(**{a: 1})
[03:04:19] ruby[bot]: al2o3-cr: # => [{:a=>1}] (https://eval.in/850071)
[03:04:26] al2o3-cr: >> [].push(*{a: 1})
[03:04:32] ruby[bot]: al2o3-cr: I'm terribly sorry, I could not evaluate your code because of an error: NoMethodError:undefined method `[]' for nil:NilClass
[03:04:55] sspreitz: has joined #ruby
[03:05:00] pinksandles: pry(main)> [].push(*{a: 1})
[03:05:27] milardovich: has joined #ruby
[03:06:03] pinksandles: i guess it's also an issue for any class that implements to_a and returns something other than [self].
[03:07:40] canteen4: has joined #ruby
[03:08:06] pinksandles: standard ruby needs Array.wrap() imo, unless there's some syntax trick i'm missing.
[03:08:32] al2o3-cr: pinksandles: what does that do?
[03:09:31] TinkerTyper: has joined #ruby
[03:10:17] bronson: has joined #ruby
[03:12:15] aduabu: has joined #ruby
[03:14:26] canteen4: has joined #ruby
[03:18:53] aduabu: has joined #ruby
[03:19:26] Cope: has joined #ruby
[03:19:44] TinkerTyper: has joined #ruby
[03:22:33] ryandevilla: has joined #ruby
[03:25:07] zenit: has joined #ruby
[03:25:41] Cope: has joined #ruby
[03:27:25] alfiemax: has joined #ruby
[03:28:02] alfiemax: has joined #ruby
[03:28:36] emilford: has joined #ruby
[03:29:24] zenit_: has joined #ruby
[03:29:51] TinkerTyper: has joined #ruby
[03:32:31] psmolen: has joined #ruby
[03:32:37] lel: has joined #ruby
[03:36:20] canteen4: has joined #ruby
[03:37:02] Emmanuel_Chanel: has joined #ruby
[03:37:48] mim1k: has joined #ruby
[03:38:31] balazs: has joined #ruby
[03:40:03] TinkerTyper: has joined #ruby
[03:40:12] aduabu: has joined #ruby
[03:40:28] jackjackdripper: has joined #ruby
[03:40:49] ledestin: has joined #ruby
[03:41:34] __Yiota: has joined #ruby
[03:44:28] canteen4: has joined #ruby
[03:45:12] gix: has joined #ruby
[03:47:31] aduabu: has joined #ruby
[03:47:31] AndBobsYourUncle: has joined #ruby
[03:50:12] TinkerTyper: has joined #ruby
[03:50:14] canteen4: has joined #ruby
[03:50:17] AndBobsYourUncle: has joined #ruby
[03:52:03] chouhoulis: has joined #ruby
[03:54:25] aduabu: has joined #ruby
[03:58:16] canteen4: has joined #ruby
[03:58:33] cschneid_: has joined #ruby
[03:58:54] shiranuidong: has joined #ruby
[03:59:11] __Yiota: has joined #ruby
[04:00:21] TinkerTyper: has joined #ruby
[04:02:40] aduabu: has joined #ruby
[04:05:30] canteen4: has joined #ruby
[04:07:05] aduabu: has joined #ruby
[04:10:09] canteen4: has joined #ruby
[04:10:28] AndBobsYourUncle: has joined #ruby
[04:10:38] TinkerTyper: has joined #ruby
[04:12:47] mtkd: has joined #ruby
[04:14:21] aduabu: has joined #ruby
[04:18:29] canteen4: has joined #ruby
[04:20:44] TinkerTyper: has joined #ruby
[04:21:30] aduabu: has joined #ruby
[04:23:05] canteen4: has joined #ruby
[04:26:50] aduabu: has joined #ruby
[04:29:04] canteen4: has joined #ruby
[04:29:38] emilford: has joined #ruby
[04:30:46] TinkerTyper: has joined #ruby
[04:32:59] aduabu: has joined #ruby
[04:34:24] aupadhye: has joined #ruby
[04:35:55] enterprisey: has joined #ruby
[04:36:12] canteen4: has joined #ruby
[04:36:37] mim1k: has joined #ruby
[04:39:01] nobitanobi: has joined #ruby
[04:40:33] aduabu: has joined #ruby
[04:40:56] brent__: has joined #ruby
[04:41:01] TinkerTyper: has joined #ruby
[04:43:33] canteen4: has joined #ruby
[04:43:56] AnotherNick: has joined #ruby
[04:47:57] aduabu: has joined #ruby
[04:51:09] TinkerTyper: has joined #ruby
[04:51:16] canteen4: has joined #ruby
[04:52:51] aduabu: has joined #ruby
[04:53:25] DrCode: has joined #ruby
[04:53:39] conta: has joined #ruby
[04:59:00] canteen4: has joined #ruby
[05:01:23] TinkerTyper: has joined #ruby
[05:01:28] mikeric: has joined #ruby
[05:02:23] aduabu: has joined #ruby
[05:02:26] milardovich: has joined #ruby
[05:04:36] canteen4: has joined #ruby
[05:06:52] aduabu: has joined #ruby
[05:09:12] canteen4: has joined #ruby
[05:11:22] Stickwalker: has joined #ruby
[05:11:29] TinkerTyper: has joined #ruby
[05:11:30] aduabu: has joined #ruby
[05:12:06] bronson: has joined #ruby
[05:14:19] AndBobsYourUncle: has joined #ruby
[05:15:51] canteen4: has joined #ruby
[05:19:33] aduabu: has joined #ruby
[05:21:33] TinkerTyper: has joined #ruby
[05:22:44] canteen4: has joined #ruby
[05:23:17] paranoicsan: has joined #ruby
[05:23:43] Bock: has joined #ruby
[05:23:50] Stickwalker: has joined #ruby
[05:23:54] gothicsouth: has joined #ruby
[05:25:30] Stickwalker: has joined #ruby
[05:25:45] Cnapier: has joined #ruby
[05:28:19] sspreitz: has joined #ruby
[05:28:52] enterprisey: has joined #ruby
[05:30:46] emilford: has joined #ruby
[05:31:44] TinkerTyper: has joined #ruby
[05:32:31] biberu: has joined #ruby
[05:34:04] aduabu: has joined #ruby
[05:34:57] gusrub: has joined #ruby
[05:35:26] Xiti: has joined #ruby
[05:35:59] Mon_Ouie: has joined #ruby
[05:38:21] canteen4: has joined #ruby
[05:39:46] harfangk: has joined #ruby
[05:41:31] aduabu: has joined #ruby
[05:41:58] TinkerTyper: has joined #ruby
[05:43:59] canteen4: has joined #ruby
[05:46:09] anas: has joined #ruby
[05:48:22] aduabu: has joined #ruby
[05:50:47] canteen4: has joined #ruby
[05:51:58] TinkerTyper: has joined #ruby
[05:52:29] cdg: has joined #ruby
[05:52:50] conta: has joined #ruby
[05:53:04] pwnd_nsfw: has joined #ruby
[05:54:35] aduabu: has joined #ruby
[05:57:59] canteen4: has joined #ruby
[05:59:23] Stickwalker: has joined #ruby
[05:59:50] ur5us: has joined #ruby
[05:59:52] Dimik: has joined #ruby
[06:00:03] f48ds2: has joined #ruby
[06:00:06] andikr: has joined #ruby
[06:01:42] Puffball: has joined #ruby
[06:02:11] TinkerTyper: has joined #ruby
[06:02:12] kapil___: has joined #ruby
[06:03:22] frozengeek: has joined #ruby
[06:03:40] AnoHito: has joined #ruby
[06:06:19] aduabu: has joined #ruby
[06:10:17] roshanavand: has joined #ruby
[06:12:28] TinkerTyper: has joined #ruby
[06:14:19] canteen4: has joined #ruby
[06:17:33] aduabu: has joined #ruby
[06:19:53] FastJack: has joined #ruby
[06:20:33] djbkd: has joined #ruby
[06:20:53] dionysus69: has joined #ruby
[06:21:01] aufi: has joined #ruby
[06:22:33] canteen4: has joined #ruby
[06:22:33] TinkerTyper: has joined #ruby
[06:22:55] snowyrooftops: has joined #ruby
[06:25:10] jackjackdripper: has joined #ruby
[06:25:26] aduabu: has joined #ruby
[06:27:55] conta: has joined #ruby
[06:27:56] canteen4: has joined #ruby
[06:31:29] aduabu: has joined #ruby
[06:31:40] emilford: has joined #ruby
[06:32:45] TinkerTyper: has joined #ruby
[06:33:52] conta: has joined #ruby
[06:34:49] quattro_: has joined #ruby
[06:36:21] canteen4: has joined #ruby
[06:36:35] planigan: has joined #ruby
[06:40:03] aduabu: has joined #ruby
[06:42:52] TinkerTyper: has joined #ruby
[06:43:30] canteen4: has joined #ruby
[06:45:43] aduabu: has joined #ruby
[06:48:08] pinksandles: yaba daba doo
[06:48:16] canteen4: has joined #ruby
[06:50:30] aduabu: has joined #ruby
[06:51:03] milardovich: has joined #ruby
[06:51:04] snowyrooftops: fredflinstone: ...and Scooby Doo too! :-)
[06:51:18] ferr: has joined #ruby
[06:51:44] snowyrooftops: Maybe I should've said, "...and Ruby devs too" :-D
[06:52:29] Sembei: has joined #ruby
[06:53:04] TinkerTyper: has joined #ruby
[06:53:22] vivek: has joined #ruby
[06:54:56] snowyrooftops: Hello, Guest26295
[06:55:01] snowyrooftops: Hello, Guest33271
[06:55:39] Guest33271: i am using 'mechanize' gem
[06:55:43] frozengeek: has joined #ruby
[06:56:01] Guest33271: using this gem i am trying to submit the form
[06:56:05] Guest33271: form.field_with(:name => 'date_day1').option_with(:value => "1").click
[06:56:17] kke: has joined #ruby
[06:56:18] Guest33271: but after form submit
[06:56:19] Guest33271: p form p pp = form.submit
[06:56:38] Guest33271: i am getting the form['attribute'] value set to default only
[06:57:09] Guest33271: whereas the 'p form' shows my set value
[06:57:27] Guest33271: but 'p pp = form.submit' show to default value
[06:57:50] carnegie: has joined #ruby
[06:59:43] canteen4: has joined #ruby
[07:00:09] MyMind: has joined #ruby
[07:00:24] djbkd: has joined #ruby
[07:02:35] aduabu: has joined #ruby
[07:03:15] TinkerTyper: has joined #ruby
[07:04:57] kke: what would be the most sane way these days to have something like def parser { @parser ||= Parser.for(input) }, currently i'm using inheritance with automatic registration upon require by using Parser.self.inherited(where) { parsers << where } .. but i have a hunch that something like this is not 2017 ruby.
[07:06:46] postmodern_: has joined #ruby
[07:06:50] canteen4: has joined #ruby
[07:08:19] Silthias1: has joined #ruby
[07:09:32] aduabu: has joined #ruby
[07:09:49] mark_66: has joined #ruby
[07:10:22] vondruch: has joined #ruby
[07:10:42] gh: has joined #ruby
[07:11:11] Silthias: has joined #ruby
[07:11:43] kke: of course i could convert them to modules and have some kind of Parser.register(FooParser) in the end
[07:12:30] kke: or scan constants under some namespace
[07:13:22] TinkerTyper: has joined #ruby
[07:13:39] bronson: has joined #ruby
[07:14:16] vondruch: has joined #ruby
[07:15:24] bronson: has joined #ruby
[07:15:43] TomyWork: has joined #ruby
[07:18:04] tAn: has joined #ruby
[07:19:12] nowhereman: has joined #ruby
[07:19:45] vondruch: has joined #ruby
[07:22:20] canteen4: has joined #ruby
[07:23:00] ryandevilla: has joined #ruby
[07:23:02] alex``: has joined #ruby
[07:24:17] vondruch: has joined #ruby
[07:25:32] TinkerTyper: has joined #ruby
[07:26:35] nowhereman: has joined #ruby
[07:27:22] mim1k: has joined #ruby
[07:27:46] lel: has joined #ruby
[07:29:18] aduabu: has joined #ruby
[07:29:48] vondruch: has joined #ruby
[07:32:32] emilford: has joined #ruby
[07:34:19] vondruch: has joined #ruby
[07:36:20] canteen4: has joined #ruby
[07:36:22] marr: has joined #ruby
[07:36:49] alfiemax: has joined #ruby
[07:37:08] quiqua: has joined #ruby
[07:38:11] zenit: has joined #ruby
[07:39:23] burgestrand: has joined #ruby
[07:42:08] aduabu: has joined #ruby
[07:43:49] TinkerTyper: has joined #ruby
[07:44:37] tomphp: has joined #ruby
[07:46:31] canteen4: has joined #ruby
[07:46:57] apparition: has joined #ruby
[07:49:32] aduabu: has joined #ruby
[07:49:49] vondruch: has joined #ruby
[07:51:41] guille-moe: has joined #ruby
[07:52:25] chouhoulis: has joined #ruby
[07:53:56] canteen4: has joined #ruby
[07:54:00] TinkerTyper: has joined #ruby
[07:54:18] vondruch: has joined #ruby
[07:55:21] sysvalve: has joined #ruby
[07:57:01] tao_: has joined #ruby
[07:57:51] ams__: has joined #ruby
[07:59:08] MasterAsia: has joined #ruby
[08:00:07] gr33n7007h: has joined #ruby
[08:02:35] tvw: has joined #ruby
[08:05:21] aduabu: has joined #ruby
[08:08:50] bweston92: has joined #ruby
[08:09:28] canteen4: has joined #ruby
[08:09:48] vondruch: has joined #ruby
[08:11:21] aduabu: has joined #ruby
[08:13:33] mikecmpbll: has joined #ruby
[08:14:08] TinkerTyper: has joined #ruby
[08:14:18] vondruch: has joined #ruby
[08:14:36] canteen4: has joined #ruby
[08:15:00] RedNifre: has joined #ruby
[08:16:27] Ishido: has joined #ruby
[08:16:30] vondruch: has joined #ruby
[08:17:16] jinie: has joined #ruby
[08:18:48] aduabu: has joined #ruby
[08:20:28] vondruch: has joined #ruby
[08:22:50] canteen4: has joined #ruby
[08:23:32] runescape07rsps: has joined #ruby
[08:24:29] TinkerTyper: has joined #ruby
[08:28:45] aduabu: has joined #ruby
[08:29:58] Sylario: has joined #ruby
[08:30:30] charliesome: has joined #ruby
[08:31:39] mim1k: has joined #ruby
[08:33:23] emilford: has joined #ruby
[08:34:37] TinkerTyper: has joined #ruby
[08:36:09] canteen4: has joined #ruby
[08:37:22] sepp2k: has joined #ruby
[08:37:29] lxsameer: has joined #ruby
[08:37:34] mniip: has joined #ruby
[08:39:29] milardovich: has joined #ruby
[08:41:15] mim1k: has joined #ruby
[08:42:48] aduabu: has joined #ruby
[08:44:39] TinkerTyper: has joined #ruby
[08:49:08] canteen4: has joined #ruby
[08:50:42] Ishido: has joined #ruby
[08:52:54] ur5us: has joined #ruby
[08:54:23] dminuoso: Trick question (this took me 10 minutes to realize). Given this braindead code
[08:54:25] dminuoso: sprintf("%02d.%d", data["created_at_month"].to_s.rjust(2, '0')
[08:54:39] dminuoso: you get the error `invalid value for Integer(): "08"`
[08:54:50] dminuoso: Is the error obvious enough that I should feel bad?
[08:54:54] TinkerTyper: has joined #ruby
[08:55:34] jaruga_________: has joined #ruby
[08:55:45] ljarvis: where's the trick question?
[08:56:44] ljarvis: also why aren't you sending 2 arguments, there's so many questions
[08:56:56] dminuoso: ljarvis: I am, I just fail at copy pasting
[08:56:58] ljarvis: why the rjust
[08:57:03] ljarvis: why am i here
[08:57:08] ljarvis: why everything
[08:57:10] dminuoso: ljarvis: Yeah I know. I keep staring at this
[08:57:13] dminuoso: and ask myself the same thing
[08:57:18] dminuoso: I want to git blame this
[08:57:21] dminuoso: I know that I was the author
[08:57:34] ljarvis: sometimes i git blame just to make myself feel bad
[08:57:57] ljarvis: why i type ,gb in vim it pops up with the name and i hang my head in shame
[08:58:12] dminuoso: ljarvis: the great thing is, I tested this througoughly, and it worked. I mean, this was shipped in marhc.
[08:58:33] ljarvis: well, it works for some months (if there's a second arg only surely)
[09:01:32] aduabu: has joined #ruby
[09:02:26] dminuoso: ljarvis: Well I still hate rails.
[09:02:35] dminuoso: In fact I blame this error on rails.
[09:03:13] nofxxx: has joined #ruby
[09:03:53] paranoicsan: has joined #ruby
[09:05:05] TinkerTyper: has joined #ruby
[09:07:28] Guest77527: has joined #ruby
[09:08:19] ljarvis: Why do you hate rails, dminuoso?
[09:10:56] vondruch: has joined #ruby
[09:12:09] AndBobsYourUncle: has joined #ruby
[09:15:30] vondruch: has joined #ruby
[09:15:44] Serpent7776: has joined #ruby
[09:15:55] bronson: has joined #ruby
[09:16:53] jokke: has joined #ruby
[09:18:51] cagomez: has joined #ruby
[09:19:13] sspreitz: has joined #ruby
[09:20:57] vondruch: has joined #ruby
[09:22:29] ur5us: has joined #ruby
[09:24:14] MyMind: has joined #ruby
[09:25:27] vondruch: has joined #ruby
[09:27:18] TinkerTyper: has joined #ruby
[09:30:54] vondruch: has joined #ruby
[09:31:35] ljarvis: too many reasons eh
[09:34:33] emilford: has joined #ruby
[09:34:34] dminuoso: ljarvis: I think one of the main issues I have is those magical interfaces between parts.
[09:35:12] dminuoso: ljarvis: Let's say you are inside controller code. How and why can you use `request`? You dont know, but in some guide you read you can access with it. It's nothing you can figure out by just looking at a well organized documentation.
[09:39:08] ljarvis: isn't that problem just inherent with inheritance? (heh)
[09:39:29] ljarvis: and mixins, there's loads of additional context that you can access that might not be obvious
[09:40:02] ljarvis: but, there's some explitness in that your class inherits from another class so probably it inherits some behaviour and additional functionality
[09:40:27] vondruch: has joined #ruby
[09:41:17] dminuoso: ljarvis: Well that's the thing. In Ruby its extremely hard to reason interface, because of the highly dynamic duck typing. I found Haskell typeclasses to be exactly what I miss in Ruby.
[09:41:23] dminuoso: *to reason about interface
[09:43:00] ljarvis: or, surely, most statically typed and/or compiled language where the type information is really helpful for documenting things like that
[09:43:11] ts_: has joined #ruby
[09:45:33] TinkerTyper: has joined #ruby
[09:48:59] dminuoso: ljarvis: When I started with Ruby I felt that the lack of static typing meant less overhead and faster development speed.
[09:49:59] dminuoso: But that quickly proved to be wrong when you end up writing defensive type checks (which will blow up when the user uses the software), or testing for types explicitly in unit tests (now you invest many times the effort you originally saved)
[09:52:50] cdg: has joined #ruby
[09:54:26] quiqua: has joined #ruby
[09:55:48] TinkerTyper: has joined #ruby
[09:55:58] vondruch: has joined #ruby
[09:56:39] gixxer1k: has joined #ruby
[09:59:02] cdg: has joined #ruby
[09:59:40] ljarvis: yeah, sure. But the Ruby way is: don't do either :D
[10:00:24] cdg_: has joined #ruby
[10:05:01] cabotto: has joined #ruby
[10:06:01] TinkerTyper: has joined #ruby
[10:06:27] darix: dminuoso: *quaak*
[10:07:38] vondruch: has joined #ruby
[10:10:19] shiranuidong: has joined #ruby
[10:13:08] selim: has joined #ruby
[10:14:53] dminuoso: ljarvis: And Elixir (like Haskell, Rust or ML), or even just flowtype in JS, do it right by doing type inference.
[10:15:12] dminuoso: Even C++ has it now.
[10:16:13] TinkerTyper: has joined #ruby
[10:16:22] roshanavand: has joined #ruby
[10:16:50] darix: with the funny "auto" type?
[10:16:56] dminuoso: darix: Yes.
[10:19:08] bkxd: has joined #ruby
[10:19:09] cdg: has joined #ruby
[10:20:54] vondruch: has joined #ruby
[10:24:06] cschneid_: has joined #ruby
[10:25:29] vondruch: has joined #ruby
[10:26:20] TinkerTyper: has joined #ruby
[10:27:25] milardovich: has joined #ruby
[10:27:52] beilabs: has joined #ruby
[10:29:04] cadillac_: has joined #ruby
[10:34:37] _ixti_: has joined #ruby
[10:35:25] emilford: has joined #ruby
[10:35:53] ShekharReddy: has joined #ruby
[10:35:54] vondruch: has joined #ruby
[10:36:30] TinkerTyper: has joined #ruby
[10:37:24] tacoboy: has joined #ruby
[10:40:18] jamesaxl: has joined #ruby
[10:45:28] vondruch: has joined #ruby
[10:48:38] alfiemax: has joined #ruby
[10:48:38] TinkerTyper: has joined #ruby
[10:49:50] jamesaxl: has joined #ruby
[10:51:28] burgestrand: has joined #ruby
[10:53:05] apparition47: has joined #ruby
[11:03:28] burgestrand: has joined #ruby
[11:03:41] lel: has joined #ruby
[11:03:48] conta: has joined #ruby
[11:05:57] vondruch: has joined #ruby
[11:07:00] TinkerTyper: has joined #ruby
[11:08:41] GodFather: has joined #ruby
[11:09:00] high_fiver: has joined #ruby
[11:10:21] pugc: has joined #ruby
[11:11:16] Jameser: has joined #ruby
[11:13:14] zacts: has joined #ruby
[11:14:49] burgestrand: has joined #ruby
[11:15:26] vondruch: has joined #ruby
[11:17:05] TinkerTyper: has joined #ruby
[11:17:06] jinie: has joined #ruby
[11:17:41] bronson: has joined #ruby
[11:19:21] cabotto: has joined #ruby
[11:20:56] vondruch: has joined #ruby
[11:21:47] davic: has joined #ruby
[11:24:18] f48ds2_: has joined #ruby
[11:25:30] vondruch: has joined #ruby
[11:26:27] dachi: has joined #ruby
[11:28:46] orbyt_: has joined #ruby
[11:29:18] TinkerTyper: has joined #ruby
[11:31:26] dachi: hi. how can I test that class calls a class method?
[11:31:28] dachi: https://paste.ofcode.org/pH9FteMDAT3C8SxmqY3gE7
[11:32:49] burgestrand: has joined #ruby
[11:34:12] dminuoso: dachi: mock the parent?
[11:35:56] vondruch: has joined #ruby
[11:36:18] emilford: has joined #ruby
[11:36:21] dminuoso: dachi: Oh and also note that its not the class that receives the method call, but the classes singleton class.
[11:36:57] bruno-: has joined #ruby
[11:37:01] dminuoso: Errr. Nevermind that last bit.
[11:37:58] dachi: yes I wrote it incoreectly. thanks
[11:38:06] dachi: incorrectly*
[11:39:43] adlerdias: has joined #ruby
[11:40:28] vondruch: has joined #ruby
[11:41:36] ldnunes: has joined #ruby
[11:42:16] runescape07rsps: has joined #ruby
[11:47:44] TinkerTyper: has joined #ruby
[11:48:52] bmurt: has joined #ruby
[11:56:04] ldnunes: has joined #ruby
[11:56:43] roshanavand: has joined #ruby
[11:57:53] frozengeek: has joined #ruby
[11:59:45] giraffe: has joined #ruby
[12:00:31] tpendragon: has joined #ruby
[12:00:58] vondruch: has joined #ruby
[12:03:29] bkxd: has joined #ruby
[12:03:38] bmurt: has joined #ruby
[12:07:56] TinkerTyper: has joined #ruby
[12:10:13] _sfiguser: has joined #ruby
[12:10:28] vondruch: has joined #ruby
[12:12:01] zenit: has joined #ruby
[12:14:19] zenit_: has joined #ruby
[12:15:54] mjanssen: has joined #ruby
[12:16:03] eroux: has joined #ruby
[12:18:05] TinkerTyper: has joined #ruby
[12:20:40] frozengeek: has joined #ruby
[12:24:32] Wair1978: has joined #ruby
[12:28:24] bmurt: has joined #ruby
[12:28:44] balazs: has joined #ruby
[12:29:03] sepp2k: has joined #ruby
[12:30:41] dionysus70: has joined #ruby
[12:30:50] fredflinstone: don't need static typing
[12:30:58] vondruch: has joined #ruby
[12:31:06] fredflinstone: & flowtype is crap
[12:32:05] psychicist__: has joined #ruby
[12:35:58] chrisarc1nd: has joined #ruby
[12:35:58] j0bk: has joined #ruby
[12:35:58] connor_goodwolf: has joined #ruby
[12:35:58] admwrd: has joined #ruby
[12:35:58] daemonwrangler: has joined #ruby
[12:35:58] APK: has joined #ruby
[12:35:58] wnd: has joined #ruby
[12:35:58] z3uS: has joined #ruby
[12:35:58] jhass: has joined #ruby
[12:35:58] saltsa: has joined #ruby
[12:35:58] rgs: has joined #ruby
[12:35:59] _sfiguser: has joined #ruby
[12:35:59] coffeejunk: has joined #ruby
[12:35:59] Serpent7776: has joined #ruby
[12:35:59] Bock: has joined #ruby
[12:35:59] herbmillerjr: has joined #ruby
[12:35:59] thejoecarroll: has joined #ruby
[12:35:59] anas: has joined #ruby
[12:35:59] _ixti_: has joined #ruby
[12:35:59] matti: has joined #ruby
[12:35:59] lupine: has joined #ruby
[12:35:59] matti: has joined #ruby
[12:35:59] ineb: has joined #ruby
[12:35:59] genpaku_: has joined #ruby
[12:35:59] pabs: has joined #ruby
[12:35:59] Fraeon: has joined #ruby
[12:35:59] Phanes: has joined #ruby
[12:35:59] Phanes: has joined #ruby
[12:36:00] _main_: has joined #ruby
[12:36:00] d0nn1e: has joined #ruby
[12:36:00] nicoulaj: has joined #ruby
[12:36:00] quiqua: has joined #ruby
[12:36:00] foxxx0: has joined #ruby
[12:36:00] gusrub: has joined #ruby
[12:36:00] knight_: has joined #ruby
[12:36:00] spider-mario: has joined #ruby
[12:36:00] sonne: has joined #ruby
[12:36:00] __Yiota: has joined #ruby
[12:36:00] vondruch: has joined #ruby
[12:37:12] emilford: has joined #ruby
[12:37:31] agrecascino: has joined #ruby
[12:37:53] pragmatism: has joined #ruby
[12:37:53] sspreitz: has joined #ruby
[12:38:19] TinkerTyper: has joined #ruby
[12:38:49] pyemkey: has joined #ruby
[12:39:24] DOSHI: has joined #ruby
[12:39:47] oleo: has joined #ruby
[12:41:02] eelster: has joined #ruby
[12:41:10] eroux: has joined #ruby
[12:41:35] tekk: has joined #ruby
[12:42:32] kreantos: has joined #ruby
[12:43:18] gnarf: has joined #ruby
[12:45:00] InfinityFye: has joined #ruby
[12:46:05] dminuoso: fredflinstone: Name an example how static typing ever hinders you.
[12:47:07] Prutheus: has joined #ruby
[12:47:18] fredflinstone: it's unnecessary and unnatural in a dynamically typed language.
[12:47:58] dminuoso: That argument makes no sense, but okay.
[12:48:11] fredflinstone: makes sense to me.
[12:48:30] dminuoso: "static typing sucks because its unnratural in a dynamically typed language"
[12:48:34] dminuoso: I need to photograph this.
[12:48:40] fredflinstone: i didn't say static typing sucks
[12:48:51] mtkd: has joined #ruby
[12:48:55] fredflinstone: i said flow/flowtype sucks
[12:49:32] fredflinstone: go ahead.. photograph it.. you're misquoting me to start with.. but w/e, i really don't care & most discussions with you are nonsense anyway
[12:50:57] t-recx: has joined #ruby
[12:51:26] Puffball: has joined #ruby
[12:52:11] kreantos: has joined #ruby
[12:54:30] Wair1978: has joined #ruby
[12:55:56] vondruch: has joined #ruby
[12:58:43] TinkerTyper: has joined #ruby
[13:00:28] vondruch: has joined #ruby
[13:00:36] Wair1978: has left #ruby: ("Leaving")
[13:00:38] cdg: has joined #ruby
[13:02:53] jaruga_________: has joined #ruby
[13:03:52] jaruga__________: has joined #ruby
[13:04:22] kreantos: has joined #ruby
[13:07:03] tvw: has joined #ruby
[13:08:07] vondruch: has joined #ruby
[13:08:51] TinkerTyper: has joined #ruby
[13:10:36] cdg_: has joined #ruby
[13:13:31] laphoraig92: has joined #ruby
[13:15:28] vondruch: has joined #ruby
[13:16:48] cabotto: has joined #ruby
[13:17:11] jordanm: has joined #ruby
[13:18:56] TinkerTyper: has joined #ruby
[13:19:46] rwb: has joined #ruby
[13:19:47] bronson: has joined #ruby
[13:22:03] bronson: has joined #ruby
[13:26:22] olspookishmagus: has joined #ruby
[13:29:08] TinkerTyper: has joined #ruby
[13:29:52] DOSHI: has left #ruby: ()
[13:38:03] emilford: has joined #ruby
[13:39:18] shiranuidong: has joined #ruby
[13:40:58] vondruch: has joined #ruby
[13:42:32] milardovich: has joined #ruby
[13:43:50] uZiel: has joined #ruby
[13:44:37] Guest77527: has joined #ruby
[13:44:53] laphoraig92: has joined #ruby
[13:45:27] vondruch: has joined #ruby
[13:49:43] dachi: has joined #ruby
[13:50:42] maikowblue: has joined #ruby
[13:50:43] roshanavand: has joined #ruby
[13:51:25] TinkerTyper: has joined #ruby
[13:52:39] kreantos: has joined #ruby
[13:53:55] chouhoulis: has joined #ruby
[13:56:56] dachi: has joined #ruby
[13:57:12] dachi: can anyone help me test if class has singleton method call?
[13:57:19] dachi: https://stackoverflow.com/questions/45880870/rspec-how-to-test-class-call-to-singleton-class-method
[13:57:20] ryandevilla: has joined #ruby
[13:58:06] vondruch: has joined #ruby
[13:59:35] Rapture: has joined #ruby
[14:00:00] fredflinstone: expect(User).to receive(:class_method)
[14:00:30] fredflinstone: answer on SO seems good too....... what's the issue?
[14:00:30] vondruch: has joined #ruby
[14:00:31] ule: al2o3-cr: thanks
[14:00:48] ule: I didn't know about that foo.push(*obj), worked like a charm
[14:01:24] fredflinstone: ah i see. you don't want to test that. it's impossible. That method is called while the class is loaded, long before the test runs.
[14:01:29] dminuoso: dachi: does has_one_time_password any side effects?
[14:01:52] dminuoso: If so you could test for behavior, rather than white box testing.
[14:02:15] dachi: ok thanks
[14:02:51] Lyubo1: has joined #ruby
[14:03:29] fredflinstone: yes, test the behaviour and not that the class method has been called. and test via a use-case that exhibits user behaviour.
[14:05:58] chouhoul_: has joined #ruby
[14:09:48] TinkerTyper: has joined #ruby
[14:10:58] vondruch: has joined #ruby
[14:13:32] mson: has joined #ruby
[14:15:28] vondruch: has joined #ruby
[14:19:28] im314ous: has joined #ruby
[14:19:45] phinxy: has joined #ruby
[14:19:56] TinkerTyper: has joined #ruby
[14:20:53] mula: has joined #ruby
[14:21:21] weez17_: has joined #ruby
[14:25:12] TomyLobo: has joined #ruby
[14:25:22] anisha: has joined #ruby
[14:25:58] vondruch: has joined #ruby
[14:26:04] al2o3-cr: ule: you're welcome.
[14:27:46] danbishop: has left #ruby: ()
[14:28:36] cloutz: has joined #ruby
[14:30:28] vondruch: has joined #ruby
[14:30:47] anisha_: has joined #ruby
[14:35:56] vondruch: has joined #ruby
[14:38:29] ROCARTER_: has joined #ruby
[14:38:56] emilford: has joined #ruby
[14:39:18] milardovich: has joined #ruby
[14:39:45] runescape07rsps: has joined #ruby
[14:39:50] chouhoulis: has joined #ruby
[14:40:10] TinkerTyper: has joined #ruby
[14:40:30] vondruch: has joined #ruby
[14:40:59] GreatPotato: has joined #ruby
[14:41:08] alfiemax: has joined #ruby
[14:41:49] GreatPotato: Hello “ruby -v” says “ruby 2.4.0p0” - but when i do, “bundle env” it says v1.9.3...
[14:42:00] GreatPotato: How can i modify this to use the new version updated with rvm?
[14:42:17] bougyman: which bundle
[14:42:20] bougyman: and which ruby
[14:42:26] bougyman: i mean: type those
[14:42:26] bruno-: has joined #ruby
[14:42:29] bougyman: `whicn bundle`
[14:42:38] bougyman: and `which ruby`
[14:43:07] GreatPotato: I get: /usr/share/rvm/rubies/ruby-2.4.0/bin/ruby
[14:43:16] GreatPotato: Then: /usr/bin/bundle
[14:43:54] GreatPotato: Is it because i install bundle before updating ruby?
[14:44:24] bougyman: GreatPotato: it is.
[14:44:40] bougyman: gem i bundler
[14:44:43] kapil___: has joined #ruby
[14:44:51] bougyman: it will put a bundler in your rvm path which supercedes /usr/bin/bundle
[14:44:54] chouhoulis: has joined #ruby
[14:45:42] GreatPotato: If you were in this room i would probably have just kissed you
[14:45:48] carnegie: has joined #ruby
[14:45:56] vondruch: has joined #ruby
[14:48:02] truenito: has joined #ruby
[14:49:42] truenito: has joined #ruby
[14:50:23] TinkerTyper: has joined #ruby
[14:50:26] vondruch: has joined #ruby
[14:50:48] tacoboy: has joined #ruby
[14:55:49] cdg: has joined #ruby
[14:57:25] cdg__: has joined #ruby
[14:58:09] vondruch: has joined #ruby
[15:00:20] cdg_: has joined #ruby
[15:00:29] TinkerTyper: has joined #ruby
[15:01:44] mula: has joined #ruby
[15:02:39] vondruch: has joined #ruby
[15:06:20] dminuoso: You better wear lipstick.
[15:06:33] GreatPotato: Of course, im not a savage
[15:06:44] kreantos: has joined #ruby
[15:07:06] matthewd: dminuoso: There's no need to compound an inappropriate comment
[15:09:19] dviola: has joined #ruby
[15:10:05] goyox86: has joined #ruby
[15:10:40] TinkerTyper: has joined #ruby
[15:10:56] goyox86_: has joined #ruby
[15:15:42] cschneid_: has joined #ruby
[15:18:20] Prutheus: has joined #ruby
[15:19:09] Prutheus: Hello! I am dividing 238161.914 / 238161.914 and getting 1.0, but it isn't 1.0 ... it has some decimal palces, where are they gone?
[15:20:16] nobitanobi: has joined #ruby
[15:20:22] matthewd: IME, most numbers divided by themselves = 1.0
[15:20:42] Papierkorb: pry shows 1.0 for that
[15:21:16] kreantos: has joined #ruby
[15:21:21] im314ous: And because you're dividing a number with decimal points it's going to be returned as 1 in decimal form, thus 1.0
[15:21:42] Prutheus: upps wait copied wrong
[15:22:03] Prutheus: my fault xD
[15:22:26] im314ous: do you even math bruh
[15:22:50] bronson: has joined #ruby
[15:25:56] vondruch: has joined #ruby
[15:26:07] polishdub: has joined #ruby
[15:27:57] cagomez: has joined #ruby
[15:29:15] splitshot: has joined #ruby
[15:29:16] __Yiota: has joined #ruby
[15:30:10] sspreitz: has joined #ruby
[15:31:02] TinkerTyper: has joined #ruby
[15:33:57] alibby: has joined #ruby
[15:35:27] skweek: has joined #ruby
[15:37:27] cagomez: has joined #ruby
[15:37:29] [Butch]: has joined #ruby
[15:39:06] Brent___: has joined #ruby
[15:39:58] tomphp: has joined #ruby
[15:39:59] cdg: has joined #ruby
[15:40:04] emilford: has joined #ruby
[15:40:26] vondruch: has joined #ruby
[15:41:14] TinkerTyper: has joined #ruby
[15:41:23] gothicsouth: has joined #ruby
[15:41:51] cdg: has joined #ruby
[15:43:26] cdg: has joined #ruby
[15:45:24] sspreitz: has joined #ruby
[15:46:54] sepp2k: has joined #ruby
[15:50:09] j0bk: has joined #ruby
[15:50:56] vondruch: has joined #ruby
[15:51:21] TinkerTyper: has joined #ruby
[15:58:47] __Yiota: has joined #ruby
[15:59:16] sspreitz: has joined #ruby
[16:00:31] vondruch: has joined #ruby
[16:01:20] roshanavand: has joined #ruby
[16:01:31] TinkerTyper: has joined #ruby
[16:04:39] banisterfiend: has joined #ruby
[16:05:17] roshanavand: has joined #ruby
[16:06:38] SeepingN: has joined #ruby
[16:07:03] FrostCandy: has joined #ruby
[16:08:03] FrostCandy: Can someone break down this line? do_something :only => [:one, :two, :three] - Is do_something a function call? one two and three variables? and :only a class?
[16:09:10] _sfiguser: has joined #ruby
[16:09:45] matthewd: FrostCandy: :foo is a symbol literal
[16:09:56] yxhuvud: do_something is a method call. :only => [:one, :two, :three] is an argument to said method that is a hash. :only is a symbol (which is something similar to an immutable string. [:one, :two, :three] is an array that contain 3 symbols.
[16:10:53] ljarvis: it might be easier with the additional superfluous syntax: do_something({ :only => [:one, :two, :three] })
[16:10:54] FrostCandy: Oh ok so we are passing :only to the method, but setting :only = an array of symbolx
[16:10:56] vondruch: has joined #ruby
[16:11:10] ljarvis: you're passing a hash to the method
[16:11:14] RedNifre: Hi there. How do I programmatically put some getters and setters in some blank slate object?
[16:11:25] jackjackdripper: has joined #ruby
[16:11:29] ljarvis: RedNifre: attr_accessor
[16:11:36] konsolebox: is there a way to customize gemspec so the gem would only generate documentation for specific files? specifying files to spec.rdoc_options doesn't help.
[16:11:41] TinkerTyper: has joined #ruby
[16:12:29] konsolebox: i don't like the idea of using --exclude
[16:13:07] RedNifre: E.g. I have a hash { bla: 1, foo: 2 } and I want to create an object out of it that has a def bla(x); do_something_with(x); end
[16:13:46] RedNifre: ljarvis okay, but how do I create the empty object and then put some methods in it?
[16:13:58] RedNifre: Hm, maybe I can do it with the OpenStruct thing...
[16:14:32] ljarvis: RedNifre: yes, OpenStruct or just Struct would be the best idea
[16:14:33] zacts: has joined #ruby
[16:14:40] matthewd: RedNifre: Yes that is approximately OpenStruct's purpose, but be wary of treating Hash as a base object type
[16:15:26] vondruch: has joined #ruby
[16:16:39] MyMind: has joined #ruby
[16:16:45] matthewd: konsolebox: What do you want to achieve?
[16:16:50] sspreitz: has joined #ruby
[16:17:04] konsolebox: matthewd: i don't want my gem generating unnecessary ri documentation for some files
[16:17:13] konsolebox: everytime it gets installed
[16:17:25] konsolebox: i get documentation generated from Makefile, *.inc, etc.
[16:17:39] RedNifre: Can I bind a block to an object so that bla in the block will call the bla method of the object?
[16:17:40] konsolebox: it's even worse if i install with rdoc
[16:17:49] konsolebox: because it documents almost everything
[16:17:51] FrostCandy: ljarvis: thanks, so if i understand :only is the key and [:one, :two, :three] is the value of the :only symbol yes?
[16:17:57] ljarvis: FrostCandy: yep
[16:18:59] matthewd: konsolebox: That sounds unexpected :/
[16:19:05] FrostCandy: ljarvis: but the key value is an array right? thats why they used []
[16:19:35] RedNifre: My plan is to create a dead simple gem for controlling raspberry pi gpio pins. I hope to make it look somewhat like this: https://pastebin.com/1DjsM7Wh
[16:19:35] ruby[bot]: RedNifre: as I told you already, please use https://gist.github.com
[16:19:46] ljarvis: FrostCandy: correct
[16:20:00] konsolebox: matthewd: i'm pretty it happens in almost any gem, because the targetted files generated for ri or rdoc (html) are automatically generated/selected by rdoc
[16:20:06] ryandevilla: has joined #ruby
[16:20:47] konsolebox: and i'm surprised why there hasn't been a mechanism for this. rdoc has been around for a long time.
[16:21:35] splitshot: RedNifre, https://github.com/jwhitehorn/pi_piper
[16:21:38] RedNifre: Sure, here's a gist https://gist.github.com/RedNifre/2bb7b671516438c8f630db6a2ddd2d51
[16:21:50] matthewd: konsolebox: Admittedly, like [IMO] most people, I have doc generation turned off... but that doesn't sound familiar
[16:21:55] TinkerTyper: has joined #ruby
[16:22:18] konsolebox: matthewd: ri documentation is automatically generated with gem install, no?
[16:22:19] RedNifre: splitshot I know that there are already libraries for that, but I want to learn ruby and I want to control the pins in a dead simple way.
[16:22:57] matthewd: konsolebox: What's it even documenting from those files? Most C docs rely on explicit comments, and a few very specific function calls, don't they?
[16:23:29] matthewd: konsolebox: Unless it's disabled, which [I believe] most people do
[16:23:46] matthewd: It's slow, and the Internet is a thing
[16:23:46] konsolebox: matthewd: i have my important methods documented in the main c file
[16:23:50] charliesome: has joined #ruby
[16:23:56] RedNifre: My idea is that you call the gpio method with a hash that defines the pins, e.g. +8 would mean pin 8 configured as output, -7 would mean pin 7 configured as input. Then an object gets generated that has the pins as methods so you can read or write them. Then the block gets called inside the object and has access to the methods. Is this possible?
[16:24:24] ljarvis: RedNifre: yes it's possible
[16:25:00] roshanavand: has joined #ruby
[16:25:02] RedNifre: How do I yield the block inside of a particular object?
[16:25:07] konsolebox: matthewd: i just want to get this done consistently. i don't care if people disable generation of documentation or not. and as i observed, generation of ri is a default.
[16:25:23] emilford: has joined #ruby
[16:26:27] ljarvis: RedNifre: there are many ways, here's one: https://gist.github.com/leejarvis/a7bbbb9cfc9f0babdcd196d5f2df87b6
[16:26:30] carnegie: has joined #ruby
[16:26:33] belmoussaoui_: has joined #ruby
[16:26:39] ljarvis: (not necessarily the best, but that's subjective anyway)
[16:27:37] RedNifre: ljarvis ah, great. thanks.
[16:27:57] Sharcho: has joined #ruby
[16:29:37] Sharcho: Is there a way I can pinpoint what code is causing the GIL to lock and for how long?
[16:29:40] matthewd: RedNifre: The alternative is instead of instance_eval, you yield the object to the block as a parameter
[16:30:26] matthewd: Sharcho: All code locks the GVL
[16:30:28] ljarvis: RedNifre: like this: https://gist.github.com/leejarvis/aafe4221a5de6ded4f222c18e439f25a
[16:30:58] sspreitz: has joined #ruby
[16:31:12] ljarvis: replace yield with instance_eval if you don't want the block param (imo you should keep it for simplicity)
[16:31:40] ljarvis: well not replace 1:1, but add instance_eval to the end of the new struct chain
[16:32:00] TinkerTyper: has joined #ruby
[16:33:19] Sharcho: matthewd: I/O doesn't lock the GIL, I have mostly an I/O bound workload, but I need to identify if there's something that's causing it to lock
[16:36:47] sspreitz: has joined #ruby
[16:37:25] dionysus69: has joined #ruby
[16:37:41] matthewd: Sharcho: There once was a GVL_DEBUG, but I don't know of anything that can directly answer that question today
[16:38:24] havenwood: Sharcho: Can you show us the code?
[16:38:44] matthewd: Sharcho: Profile the C code, then manually verify the [presumably few] places that pause for a while are dropping the lock?
[16:39:20] Sharcho: I have a couple of Sidekiq jobs, and I think one of them is causing the GIL to lock, but I don't know which. I can't share the code, unfortunately
[16:39:46] matthewd: Split them into separate queues/worker processes?
[16:40:28] Pisuke: has joined #ruby
[16:40:32] Sharcho: matthewd: yes, that's a good idea
[16:40:37] mtkd: has joined #ruby
[16:40:37] matthewd: Doesn't solve the problem, obviously, but it might help you narrow down your suspect
[16:40:57] vondruch: has joined #ruby
[16:41:10] bruno-_: has joined #ruby
[16:41:24] havenwood: Or switch to Resque ;-)
[16:41:31] orbyt_: has joined #ruby
[16:42:19] havenwood: forking is sometimes nice
[16:42:40] tomphp: has joined #ruby
[16:43:12] alfiemax: has joined #ruby
[16:43:25] cdg_: has joined #ruby
[16:43:31] harfangk: has joined #ruby
[16:44:07] TinkerTyper: has joined #ruby
[16:44:23] jackjackdripper: has joined #ruby
[16:44:28] sspreitz: has joined #ruby
[16:45:28] vondruch: has joined #ruby
[16:46:03] michael1: has joined #ruby
[16:50:16] roshanavand: has joined #ruby
[16:52:19] sspreitz: has joined #ruby
[16:54:13] eckhardt: has joined #ruby
[16:55:57] mtkd: has joined #ruby
[16:57:13] milardovich: has joined #ruby
[16:57:42] cagomez: has joined #ruby
[16:58:11] cagomez: has joined #ruby
[16:59:01] belmoussaoui__: has joined #ruby
[16:59:28] sspreitz: has joined #ruby
[16:59:29] milardovich: has joined #ruby
[16:59:43] milardovich: has joined #ruby
[17:00:02] jackjackdripper: has joined #ruby
[17:00:15] gusrub_: has joined #ruby
[17:01:58] FrostCandy: I just spent an hour trying to find skip_authorization_check in the code base. Turns out the original author used the gem CanCan, and skip_authorization_check isn't searchable in the project. Is there an idiomatic way of determining if a method is part of a gem and not part of the project code?
[17:02:20] quattro_: has joined #ruby
[17:02:26] TinkerTyper: has joined #ruby
[17:02:31] apeiros: you can always get the origin of a method using Method#source_location
[17:02:36] matthewd: method(:skip_authorization_check).source_location
[17:02:40] apeiros: that is, unless it's a native method (one not implemented in ruby)
[17:02:44] FrostCandy: apeiros: so awesome!
[17:03:00] gixxer1k: has joined #ruby
[17:03:05] FrostCandy: matthewd: thanks i'll try each
[17:04:15] michael2: has joined #ruby
[17:06:43] quattro_: has joined #ruby
[17:10:53] sspreitz: has joined #ruby
[17:12:37] TinkerTyper: has joined #ruby
[17:16:52] mim1k: has joined #ruby
[17:17:32] TheDracle: has joined #ruby
[17:17:52] sspreitz: has joined #ruby
[17:19:34] tomphp: has joined #ruby
[17:20:33] alfiemax: has joined #ruby
[17:22:44] TinkerTyper: has joined #ruby
[17:22:53] sspreitz: has joined #ruby
[17:23:06] vondruch: has joined #ruby
[17:24:11] opekktar: has joined #ruby
[17:24:23] bronson: has joined #ruby
[17:27:51] username1: has joined #ruby
[17:28:07] username1: how is it possible to get (wrong number of arguments (1 for 0) in a method that takes no arguments
[17:28:17] username1: im looking straight at the source of the method using pry
[17:28:30] username1: im calling the method explicity with no arguments
[17:28:41] apeiros: by looking at the wrong source?
[17:28:42] havenwood: username1: What's the method's name?
[17:29:08] apeiros: or by misreading the exception and inspecting the wrong method?
[17:29:18] username1: havenwood: its an instance method, called perform (from the delayed_jobs rails gem)
[17:29:27] havenwood: username1: check?: method(:perform).owner
[17:29:32] eckhardt: has joined #ruby
[17:29:36] havenwood: method(:perform).source_location
[17:29:39] apeiros: or by using tools which mangle the backtrace and corrupt it in turn (yes, has happened to me, made me pretty angry)
[17:29:54] sspreitz: has joined #ruby
[17:30:09] apeiros: also, 1 for 0 means you *did* pass it an argument
[17:30:11] username1: havenwood: the owner is the class
[17:30:11] bmurt: has joined #ruby
[17:30:13] apeiros: not that the method expects one
[17:30:27] apeiros: >> def foo; end; foo(1)
[17:30:28] ruby[bot]: apeiros: # => wrong number of arguments (given 1, expected 0) (ArgumentError) ...check link for more (https://eval.in/850380)
[17:30:29] vondruch: has joined #ruby
[17:30:40] apeiros: 2.1>> def foo; end; foo(1)
[17:30:45] username1: apeiros: thats what im confused by
[17:30:56] username1: im calling it explicitly via command line
[17:30:58] apeiros: 21>> def foo; end; foo(1)
[17:30:59] ruby[bot]: apeiros: # => wrong number of arguments (1 for 0) (ArgumentError) ...check link for more (https://eval.in/850381)
[17:30:59] username1: MyClass.new.perform
[17:31:20] username1: or, the interpreter i should say
[17:31:24] apeiros: username1: gist us all information
[17:31:43] apeiros: code used to cause the error, code of the suspected method, full exception & backtrace
[17:31:57] kies: has joined #ruby
[17:32:03] apeiros: tele-diagnoses don't become easier through lack of info :-p
[17:32:59] TinkerTyper: has joined #ruby
[17:37:19] mim1k: has joined #ruby
[17:37:51] laphoraig92: has joined #ruby
[17:41:27] sspreitz: has joined #ruby
[17:43:05] TinkerTyper: has joined #ruby
[17:43:20] chouhoul_: has joined #ruby
[17:43:21] DrCode: has joined #ruby
[17:46:18] ltem: has joined #ruby
[17:47:03] Eiam: has joined #ruby
[17:50:26] sspreitz: has joined #ruby
[17:50:54] vondruch: has joined #ruby
[17:51:53] RedNifre: Is there a simpler way to do a.map {
[17:52:07] RedNifre: Is there a simpler way to do a.map { |x, y| bla(x,y) } ?
[17:52:19] RedNifre: like, mapping with a method reference of bla or something?
[17:53:14] TinkerTyper: has joined #ruby
[17:53:26] cagomez: has joined #ruby
[17:53:27] Papierkorb: RedNifre: try `a.map(&method(:bla))`
[17:53:38] Papierkorb: RedNifre: as in, Object#method
[17:54:53] roshanavand: has joined #ruby
[17:57:05] RedNifre: Hm, what's the & doing in there exactly? I only know it from block parameters.
[17:57:47] Papierkorb: RedNifre: The ampersand takes whatever follows, calls #to_proc on it, and then passes that Proc through as block
[17:57:55] Papierkorb: RedNifre: You probably know it from foo(&:bar)
[17:58:39] orbyt_: has joined #ruby
[17:58:39] Papierkorb: Which isn't actual special syntax, the & will call to_proc on :bar (=> Symbol#to_proc) and then pass that in
[17:58:43] RedNifre: Nah, I only know it from def foo(&block)
[17:59:11] Papierkorb: RedNifre: Try doing this: `%w[ foo bar baz ].map(&:upcase)`
[17:59:15] emilford: has joined #ruby
[17:59:39] RedNifre: But I get the feeling that I should read the entire "Programming Ruby" book before asking any more questions, everything seems to be a rabbit hole :)
[17:59:57] sspreitz: has joined #ruby
[18:00:25] laphoraig92: has joined #ruby
[18:00:55] RedNifre: Is %w( foo bar ) the same as %w[ foo bar ] always?
[18:01:13] Papierkorb: Yep, you can choose which brace style you prefer
[18:01:44] matthewd: RedNifre: It's exactly the same thing, from the other side. In a parameter list, it's pulling the block parameter out into a named variable; in a method call, it's setting the block parameter using the supplied expression
[18:02:05] cagomez: has joined #ruby
[18:02:12] RedNifre: that makes sense.
[18:02:56] orbyt_: has joined #ruby
[18:03:06] sniffer: has joined #ruby
[18:03:26] TinkerTyper: has joined #ruby
[18:03:29] bmurt: has joined #ruby
[18:04:47] balazs: has joined #ruby
[18:05:26] vondruch: has joined #ruby
[18:06:49] frozengeek: has joined #ruby
[18:08:15] eckhardt: has joined #ruby
[18:08:41] apeiros: RedNifre: you can always do `module Enumerable; def mapf(method_name); map { |*args| __send__(method_name, *args) }; end; end`
[18:08:50] apeiros: and then `a.mapf(:bla)`
[18:08:53] tomphp: has joined #ruby
[18:09:04] TinkerTyper: has joined #ruby
[18:09:35] sspreitz: has joined #ruby
[18:10:09] belmoussaoui: has joined #ruby
[18:10:16] goyox86_: has joined #ruby
[18:13:40] eckhardt: has joined #ruby
[18:14:35] Dimik: has joined #ruby
[18:15:29] ryandevilla: has joined #ruby
[18:15:40] beilabs: has joined #ruby
[18:16:08] __Yiota: has joined #ruby
[18:16:45] apeiros: wow, wth? IO::readlines' chomp arg is not documented?!?
[18:16:58] tomphp_: has joined #ruby
[18:17:26] apeiros: neither http://ruby-doc.org/core-2.4.1/IO.html#method-c-readlines nor http://ruby-doc.org/core-2.4.1/IO.html#method-c-read mention it.
[18:18:52] lxsameer: has joined #ruby
[18:19:55] dcluna: has joined #ruby
[18:21:30] ramfjord: has joined #ruby
[18:21:49] gothicsouth: has joined #ruby
[18:23:40] TinkerTyper: has joined #ruby
[18:28:40] tAn: has joined #ruby
[18:29:02] RedNifre: has joined #ruby
[18:29:53] Guest87430: Well, I couldn't replace my map { |x, y| bla(x,y) } for some reason. How would I simplify that? Or is it not worth it?
[18:30:09] apeiros: IMO not worth it
[18:30:34] Guest87430: ACTION is RedNifre but didn't notice the disconnect and now his nickname is not available for some time
[18:30:55] Guest87430: Alright, guess I'll keep it simple for now.
[18:31:18] apeiros: (and you've been shown how to replace it)
[18:31:31] apeiros: (and we can't help with "for some reason")
[18:31:53] apeiros: also see /ns help ghost
[18:32:01] cdg: has joined #ruby
[18:32:37] sspreitz: has joined #ruby
[18:33:49] TinkerTyper: has joined #ruby
[18:34:15] Guest87430: Well, map(&:bla) says that the number of arguments is wrong, but I'll try the mapf approach.
[18:34:41] apeiros: &:bla is for a different use case
[18:34:56] Guest87430: bla is for zero argument method calls only?
[18:34:59] apeiros: and it wasn't presented as a solution but as an explanation for the &
[18:35:10] KaitoDaumoto: has joined #ruby
[18:35:18] apeiros: no. &:bla is for method calls on the first yielded value
[18:35:24] apeiros: i.e. a.bla(b) in your example.
[18:36:09] cagomez: has joined #ruby
[18:37:16] kreantos: has joined #ruby
[18:37:34] Puffball: has joined #ruby
[18:37:59] sspreitz: has joined #ruby
[18:38:01] nobitanobi: has joined #ruby
[18:38:20] ledestin: has joined #ruby
[18:43:58] TinkerTyper: has joined #ruby
[18:45:58] vondruch: has joined #ruby
[18:47:32] sspreitz: has joined #ruby
[18:53:30] dionysus69: has joined #ruby
[18:55:30] vondruch: has joined #ruby
[18:56:11] TinkerTyper: has joined #ruby
[18:56:54] roshanavand: has joined #ruby
[18:57:47] mikeric: has joined #ruby
[18:58:33] sspreitz: has joined #ruby
[19:00:56] vondruch: has joined #ruby
[19:02:13] kreantos: has joined #ruby
[19:02:48] cagomez: has joined #ruby
[19:03:31] sspreitz: has joined #ruby
[19:03:44] carnegie: has joined #ruby
[19:06:18] tomphp: has joined #ruby
[19:06:23] workmad3: has joined #ruby
[19:07:05] apeiros: oh wow, only 40 directores in RbConfig::CONFIG
[19:07:06] SeepingN: has joined #ruby
[19:08:45] tomphp: has joined #ruby
[19:09:01] __Yiota: has joined #ruby
[19:09:57] Dry_Lips: has joined #ruby
[19:09:57] Dry_Lips: has joined #ruby
[19:10:01] enterprisey: has joined #ruby
[19:10:35] milardovich: has joined #ruby
[19:12:33] sspreitz: has joined #ruby
[19:12:55] milardovich: has joined #ruby
[19:14:28] TinkerTyper: has joined #ruby
[19:15:22] Mia: has joined #ruby
[19:16:20] tomphp: has joined #ruby
[19:16:37] RedNifre: So I'm vaguely aware that gems exists and that there are gem files and rake which is sort of like make. If I want to put a bit of code in a local gem and use that in a tiny script, how difficult would that be?
[19:16:47] RedNifre: Also, can I make a symbol falsey, e.g. :off ?
[19:17:22] apeiros: no, you can't make a symbol falsey
[19:17:35] apeiros: nothing but nil and false can be falsey in ruby
[19:17:46] goyox86_: has joined #ruby
[19:17:46] DrCode: has joined #ruby
[19:18:41] RedNifre: Okay, guess I'll make the method accept true/false/:on/:off as the single parameter then and simply case it.
[19:20:03] sspreitz: has joined #ruby
[19:20:54] tomphp: has joined #ruby
[19:21:08] opekktar: has joined #ruby
[19:21:55] apeiros: ACTION experiments with backtrace summaries
[19:21:57] apeiros: how do you like this: https://gist.github.com/apeiros/abf2c7541a28689bb0117c08bbaa510e ?
[19:22:09] apeiros: example with the full and the abbreviated backtrace
[19:24:43] jackjackdripper: has joined #ruby
[19:25:39] sspreitz: has joined #ruby
[19:26:11] bronson: has joined #ruby
[19:32:46] Puffball: has joined #ruby
[19:33:01] apeiros: hm, the amount of positive feedback is very reassuring :D
[19:34:46] TinkerTyper: has joined #ruby
[19:36:07] matthewd: apeiros: I do dislike how verbose backtraces can get
[19:36:22] matthewd: But then I worry that any given solution is going to hide too much information
[19:36:31] phinxy: has joined #ruby
[19:36:35] apeiros: it's not intended to be a replacement
[19:36:54] apeiros: it's for something like errbit (airbrake, if you know that better)
[19:36:59] apeiros: the summary page of that
[19:37:36] apeiros: i.e. a way to do a quick assessment, if you need/want you can just go to backtrace tab which has the full :)
[19:37:51] im314ous: has joined #ruby
[19:37:53] mim1k: has joined #ruby
[19:38:06] phinxy: has left #ruby: ()
[19:38:07] matthewd: Ah, well in that case I'd default to recommending the Rails backtrace cleaner :)
[19:38:58] apeiros: ah right, rails does something like that too. I rarely ever look at the exception screens (don't ask me why, I don't really know :D)
[19:39:02] carnegie: has joined #ruby
[19:39:07] sspreitz: has joined #ruby
[19:39:20] apeiros: you don't happen to know the code snippet? ^^
[19:39:40] matthewd: Yeah, pretty similar... but it hides the gem-sourced lines completely, instead of summarizing them as you are
[19:39:51] nobitanobi: has joined #ruby
[19:40:32] guille-moe: has joined #ruby
[19:42:11] apeiros: hm, though, that's not with the settings a rails app usually uses
[19:42:44] apeiros: sooo, I guess I somehow need to access the default cleaner of a rails app
[19:43:12] apeiros: which isn't present in a rails console, *sob*
[19:43:19] matthewd: I'd think you would do the cleaning in the app, and submit both versions
[19:43:56] apeiros: I was about to say "no", but actually that's necessary
[19:44:05] matthewd: Otherwise you can't tell the difference between a gem-sourced path, and an arbitrary outside-of-app script path
[19:44:24] apeiros: no access to stdlib dirs, gem dirs and app root
[19:44:37] mostlybadfly: has joined #ruby
[19:45:03] TinkerTyper: has joined #ruby
[19:46:06] sspreitz: has joined #ruby
[19:46:09] matthewd: Or maybe, instead of an actually-filtered version, submit ["activerecord", "5.1.0", "lib/active_record.rb"] tuples?
[19:46:40] apeiros: was pondering that. but still trying to figure how to manually run AS' backtracecleaner
[19:46:48] matthewd: Then you can dynamically collapse/summarize/hide them
[19:46:53] apeiros: I'd actually include the full line too
[19:47:28] im314ous: Does anybody here have any experience writing APIs in Ruby?
[19:47:54] apeiros: im314ous: that's relatively ambiguous ;-)
[19:48:08] matthewd: Bonus, if you know the gem name, gem version, and relative path, you can probably make a decent run at linking straight to the line on GitHub
[19:48:08] apeiros: I assume you mean REST/JSON or SOAP API?
[19:48:17] im314ous: REST/JSON, yes
[19:48:59] apeiros: im314ous: it's generally a better idea to ask the actual question instead of meta questions
[19:50:06] apeiros: matthewd: nice idea. alternatively to rdoc.info
[19:50:17] eckhardt: has joined #ruby
[19:50:17] im314ous: I answered "REST/JSON"... instead of responding like that you could have just said "yes" or "no", if it applied to you.
[19:51:45] sspreitz: has joined #ruby
[19:55:07] TinkerTyper: has joined #ruby
[19:56:06] apeiros: im314ous: and, do you actually have a question now or have you just been curious whether there's people in here with experience in building APIs? :)
[19:56:16] carnegie: has joined #ruby
[19:56:23] cdg: has joined #ruby
[19:57:54] apeiros: matthewd: hrmpf, I guess it's time to do a feature request to ljarvis… access rubydoc.info by file+line instead of class+method
[19:58:00] apeiros: ljarvis: ping… ^ :D
[19:59:01] nofxx: has joined #ruby
[20:00:37] sspreitz: has joined #ruby
[20:05:12] username1: has joined #ruby
[20:05:14] TinkerTyper: has joined #ruby
[20:05:39] __Yiota: has joined #ruby
[20:12:10] sspreitz: has joined #ruby
[20:15:08] nofxx: has joined #ruby
[20:15:22] TinkerTyper: has joined #ruby
[20:18:10] ljarvis: apeiros: I think you're looking for loren, not me :)
[20:18:14] spheric_: has joined #ruby
[20:18:56] apeiros: damn, why do I keep confusing the two of you?
[20:18:59] apeiros: lsegal, right?
[20:19:26] apeiros: not online, it seems :(
[20:20:01] ljarvis: you can submit requests right from rubydoc.info fwiw, they use Tender
[20:20:22] cdg: has joined #ruby
[20:20:59] gusrub: has joined #ruby
[20:22:10] __Yiota: has joined #ruby
[20:22:22] emilford: has joined #ruby
[20:24:06] Sambsquanch: has joined #ruby
[20:25:12] sspreitz: has joined #ruby
[20:25:20] fredflinstone: https://github.com/docmeta/rubydoc.info
[20:25:21] cagomez: has joined #ruby
[20:25:26] gothicsouth: has joined #ruby
[20:25:28] fredflinstone: i don't think that feature will be easy
[20:25:35] TinkerTyper: has joined #ruby
[20:25:47] fredflinstone: probably a yard feature
[20:26:21] ahrs: has joined #ruby
[20:26:37] apeiros: I don't think it should be too hard
[20:26:47] apeiros: I mean it already knows which method starts where
[20:27:00] apeiros: all you have to do is store the reverse lookup information somewhere
[20:28:52] matthewd: ACTION would still prefer a GitHub link
[20:29:35] apeiros: that's quite a lot harder, though
[20:29:58] apeiros: any number of users can have the same named repository f.ex.
[20:30:13] apeiros: ok, could look it up in the gemspec
[20:30:18] matthewd: Use the gem's metadata
[20:30:44] matthewd: If it's not in there, then ¯\_(ツ)_/¯.. but for most gems it should be fine
[20:31:34] Bhootrk_: has joined #ruby
[20:33:44] matthewd: Trickier part is guessing a tag to get the right version
[20:34:22] matthewd: Seems feasible enough to get right a fair amount of the time, but also probably separate-gem-worthy
[20:35:00] sniffer: has joined #ruby
[20:35:48] TinkerTyper: has joined #ruby
[20:36:43] apeiros: scan through all tags for the version number, get longest common pre- and -suffix, remove, find precise match.
[20:36:44] sspreitz: has joined #ruby
[20:36:51] apeiros: that'd be my naive approach
[20:37:48] apeiros: if there's still multiple cases, check whether any of the prefixes is "version" or "v" (optionally with a dash)
[20:38:35] balazs: has joined #ruby
[20:39:02] apeiros: alternatively - might be overkill though - install all images on the tracker-app host and read from that source :)
[20:39:11] apeiros: all *gems*, not images, oc
[20:39:22] apeiros: it'd probably be a lot easier, though :D
[20:39:37] orbyt_: has joined #ruby
[20:39:52] apeiros: and by install, I actually mean "just download and unpack"
[20:39:54] ur5us: has joined #ruby
[20:40:12] matthewd: Yeah, that's definitely an option too
[20:40:54] moei: has joined #ruby
[20:41:00] apeiros: it'd probably make most sense combined with extending the API endpoint for deployments -> submit the Gemfile + bundler options
[20:41:01] matthewd: I like a link to GitHub because it's easier for me to go exploring for additional context or whatever, but there's appeal in something that'll always work, too
[20:41:30] apeiros: can always combine it with a gitlab installation…
[20:41:48] apeiros: or a disk browser. are there any rack compatible apps to do that? o0
[20:42:11] sspreitz: has joined #ruby
[20:42:30] apeiros: ah lol, wth. I'm pondering features for an app which I mainly built to try out angular :D
[20:42:58] apeiros: but I have to admit, it's fun. And I'm not too fond of errbit (the app we currently use)
[20:45:56] TinkerTyper: has joined #ruby
[20:46:24] TheDracle: has joined #ruby
[20:46:45] neekoso: has joined #ruby
[20:48:32] matthewd: Yeah, I used to use Errbit, and while I like the fact it exists, it was definitely on my "I wish I had time to rewrite this" list
[20:49:07] carnegie: has joined #ruby
[20:49:08] apeiros: eh, the basics are easy
[20:49:31] ur5us: has joined #ruby
[20:49:40] apeiros: I'm about 10h in and the biggest missing thing is sending emails + pluggable auth (which I could probably do via devise)
[20:50:17] fredflinstone: easy_auth looks better
[20:50:19] apeiros: but client + app are there. and the client can do more than just report issues. it can also access parts of the api. though atm only listing and creating apps is done.
[20:51:22] fredflinstone: https://github.com/dockyard/ruby-easy_auth
[20:51:54] apeiros: thanks, but I don't intend to add pluggable auth. after all, this is really just an experiment :)
[20:55:09] kreantos: has joined #ruby
[20:57:16] eckhardt: has joined #ruby
[20:58:59] alfiemax: has joined #ruby
[20:59:43] sspreitz: has joined #ruby
[21:00:13] enterprisey: has joined #ruby
[21:03:37] belmoussaoui: has joined #ruby
[21:04:47] weathermaker: has joined #ruby
[21:05:51] sspreitz: has joined #ruby
[21:06:12] TinkerTyper: has joined #ruby
[21:09:25] gothicsouth: has joined #ruby
[21:16:24] TinkerTyper: has joined #ruby
[21:20:08] goyox86_: has joined #ruby
[21:24:54] cam27: has joined #ruby
[21:25:45] eckhardt: has joined #ruby
[21:26:10] cagomez: has joined #ruby
[21:26:34] TinkerTyper: has joined #ruby
[21:26:42] zephiro: has joined #ruby
[21:26:46] cagomez: has joined #ruby
[21:26:50] zephiro: Hello guys
[21:27:59] emilford: has joined #ruby
[21:28:15] bronson: has joined #ruby
[21:30:06] rwb: has joined #ruby
[21:31:05] zephiro: I have one problem with aarray ruby
[21:32:26] zephiro: How convert [[27, 171], [27, 169], [29, 125]] =>[27 => [171,169], 29 =>[ 125]]
[21:33:07] elomatreb: I'm assuming you mean `{ 27 => [171, 169], 29 => [125] }`?
[21:33:28] RedNifre: Is there a trick for finding the missing `end`? The error says that it's missing at the end of the file which doesn't help that much.
[21:34:17] elomatreb: If you run Ruby with -w you get warnings, including about misaligned indentation, which can show you where you're missing one
[21:34:55] sspreitz: has joined #ruby
[21:35:01] RedNifre: How exactly? ruby -w myfile.rb doesn't show anything extra.
[21:35:07] zephiro: { 27 => [171, 169], 29 => [125] }
[21:35:29] elomatreb: It's uppercase W, sorry
[21:35:33] zephiro: convert [[27, 171], [27, 169], [29, 125]] to { 27 => [171, 169], 29 => [125] }
[21:35:48] RedNifre: Ah, found the error, thanks.
[21:36:14] elomatreb: zephiro: You can probably compine Enumerable#group_by and Hash#transform_values to do what you want
[21:38:09] mim1k: has joined #ruby
[21:38:43] TinkerTyper: has joined #ruby
[21:39:56] cloutz: has joined #ruby
[21:40:46] sspreitz: has joined #ruby
[21:40:56] cloutz: has joined #ruby
[21:42:26] cagomez: has joined #ruby
[21:42:32] kapil___: has joined #ruby
[21:44:26] carnegie: has joined #ruby
[21:44:59] GodFather: has joined #ruby
[21:45:47] sspreitz: has joined #ruby
[21:46:30] eckhardt: has joined #ruby
[21:50:00] subrat: has joined #ruby
[21:50:17] cam27: has joined #ruby
[21:50:18] zephiro: solved array.group_by(&:first).map { |k, array_of_tuples| [k, array_of_tuples.map(&:last)] }.to_h
[21:50:33] mson: has joined #ruby
[21:50:37] carnegie: has joined #ruby
[21:50:42] yokel: has joined #ruby
[21:52:48] sspreitz: has joined #ruby
[21:55:17] gigetoo: has joined #ruby
[21:55:55] al2o3-cr: zephiro: bravo :)
[21:56:58] TinkerTyper: has joined #ruby
[21:59:49] sspreitz: has joined #ruby
[22:04:53] cdg_: has joined #ruby
[22:06:06] RedNifre: If undef just marks a method as undefined, is it possible to unundef it (restoring it)?
[22:08:25] tomphp: has joined #ruby
[22:09:09] TinkerTyper: has joined #ruby
[22:13:34] im314ous: has joined #ruby
[22:18:03] ramfjord: has joined #ruby
[22:19:14] neekoso: has joined #ruby
[22:20:37] belmoussaoui__: has joined #ruby
[22:20:38] Stickwalker: has joined #ruby
[22:21:53] al2o3-cr: RedNifre: NO!
[22:22:35] al2o3-cr: not without re-defining it
[22:22:39] mniip: has joined #ruby
[22:22:56] RedNifre: Okay, but what does it mean that the method "still exists"?
[22:23:27] sspreitz: has joined #ruby
[22:23:51] cagomez: has joined #ruby
[22:24:37] al2o3-cr: RedNifre: have you read the docs?
[22:25:48] al2o3-cr: RedNifre: read the docs its all there
[22:26:17] ascarter: has joined #ruby
[22:27:16] RedNifre: I'm currently reading "Programming Ruby", but I guess the current docs won't hurt.
[22:27:18] TinkerTyper: has joined #ruby
[22:27:57] nobitanobi: has joined #ruby
[22:29:43] al2o3-cr: RedNifre: Method#undef_method, still exists as such, it just doesn't respond to any subsequent calls
[22:29:53] nobitanobi: Is there any way to compress Ruby objects? Trying to reduce size before storing it in cache
[22:30:45] cadillac_: has joined #ruby
[22:31:23] al2o3-cr: RedNifre: Method#remove_method, removes the method
[22:31:35] al2o3-cr: nobitanobi: in what way?
[22:32:55] al2o3-cr: nobitanobi: serialisation?
[22:33:01] sspreitz: has joined #ruby
[22:33:37] nobitanobi: al2o3-cr: in a way to reduce total size. What type of serialization?
[22:34:16] al2o3-cr: nobitanobi: you've got json, yaml, marshalling
[22:34:32] nobitanobi: ok, I will take a look at that! Thanks al2o3-cr
[22:35:20] al2o3-cr: nobitanobi: *note* marshalling is binary
[22:35:24] havenwood: nobitanobi: Messagepack is one nice option on the small side.
[22:35:29] havenwood: MessagePack is binary as well.
[22:35:43] havenwood: You'll be able to Marshal more objects.
[22:35:52] nobitanobi: thank you guys, I will take a look
[22:36:12] havenwood: nobitanobi: You might want to look at PStore too, if you choose Marshalling and want to persist to disk.
[22:36:28] nobitanobi: amazing :) more options!
[22:36:40] havenwood: nobitanobi: PStore and YAML::Store are transactional file storage for serialized data that are in the Ruby stdlib.
[22:37:02] havenwood: Or there YAML::DBM as well, if you want to store the serialized data in Berkeley DB.
[22:37:16] TheDracle: has joined #ruby
[22:37:34] TinkerTyper: has joined #ruby
[22:38:25] nobitanobi: havenwood: great
[22:38:38] havenwood: Yomikomu's storage options are a sort of mediation on ways to store fetchable binary data: https://github.com/ko1/yomikomu/blob/master/lib/yomikomu.rb#L378-L399
[22:38:55] havenwood: Flat or nested, dbm or disk, etc.
[22:38:56] balazs: has joined #ruby
[22:40:23] sspreitz: has joined #ruby
[22:41:02] RedNifre: Alright, I got far enough for the book to stay open by itself. Time to call it a night.
[22:41:16] milardovich: has joined #ruby
[22:45:18] ams__: has joined #ruby
[22:46:10] nowhere_man: has joined #ruby
[22:46:41] ruby[bot]: al2o3-cr: # => "main" (https://eval.in/850442)
[22:46:53] al2o3-cr: >> singleton_class.instance_eval { undef_method :to_s }; to_s
[22:46:54] ruby[bot]: al2o3-cr: # => undefined local variable or method `to_s' for main:Object (NameError) ...check link for more (https://eval.in/850443)
[22:47:11] al2o3-cr: >> singleton_class.instance_eval { remove_method :to_s }; to_s
[22:47:12] ruby[bot]: al2o3-cr: # => "#<Object:0x412c1348>" (https://eval.in/850444)
[22:47:29] sspreitz: has joined #ruby
[22:47:39] TinkerTyper: has joined #ruby
[22:47:58] al2o3-cr: argh, they've gone
[22:50:40] ramfjord: has joined #ruby
[22:51:25] carnegie: has joined #ruby
[22:52:07] havenwood: >> class << self; undef inspect end; self
[22:52:13] ruby[bot]: havenwood: I'm terribly sorry, I could not evaluate your code because of an error: NoMethodError:undefined method `[]' for nil:NilClass
[22:52:29] milardovich: has joined #ruby
[22:52:31] guille-moe: has joined #ruby
[22:52:32] nadir: has joined #ruby
[22:54:32] al2o3-cr: havenwood: way moar cooler than mine :P
[22:54:48] havenwood: al2o3-cr: foiled by eval.in
[22:55:40] ramfjord: has joined #ruby
[22:55:56] al2o3-cr: i like to give a bit a love to the (meta) methods available
[22:56:42] al2o3-cr: wow, i sound like a do to much Lua
[22:56:55] havenwood: >> class << self; remove_method :to_s end; self
[22:56:56] sspreitz: has joined #ruby
[22:57:01] ruby[bot]: havenwood: I'm terribly sorry, I could not evaluate your code because of an error: NoMethodError:undefined method `[]' for nil:NilClass
[22:57:16] havenwood: Yeah, eval.in isn't cooperating
[22:58:01] TinkerTyper: has joined #ruby
[22:58:21] Stickwalker: has joined #ruby
[22:59:31] mtkd: has joined #ruby
[23:00:00] al2o3-cr: go home ruby[bot] you're drunk
[23:00:17] Paraxial: has joined #ruby
[23:00:40] s3nd1v0g1us: has joined #ruby
[23:01:23] cschneid_: has joined #ruby
[23:01:56] sspreitz: has joined #ruby
[23:02:16] tolerablyjake: has joined #ruby
[23:03:25] enterprisey: has joined #ruby
[23:03:35] al2o3-cr: >> RUBY_VERSION
[23:03:41] ruby[bot]: al2o3-cr: I'm terribly sorry, I could not evaluate your code because of an error: NoMethodError:undefined method `[]' for nil:NilClass
[23:04:47] cagomez: has joined #ruby
[23:05:03] al2o3-cr: does it evaluate 2.4 yet?
[23:05:10] havenwood: al2o3-cr: nope
[23:06:07] al2o3-cr: but 2.4 as got so many features :(
[23:06:56] sspreitz: has joined #ruby
[23:08:06] TinkerTyper: has joined #ruby
[23:10:35] mikecmpbll: has joined #ruby
[23:11:21] guille-moe: has joined #ruby
[23:12:27] sspreitz: has joined #ruby
[23:13:50] milardovich: has joined #ruby
[23:16:02] brent__: has joined #ruby
[23:16:04] carnegie: has joined #ruby
[23:18:12] TinkerTyper: has joined #ruby
[23:21:43] zephiro: has joined #ruby
[23:22:58] guille-moe: has joined #ruby
[23:25:30] sspreitz: has joined #ruby
[23:26:20] cschneid_: has joined #ruby
[23:26:48] emilford: has joined #ruby
[23:28:18] TinkerTyper: has joined #ruby
[23:29:48] guille-moe: has joined #ruby
[23:30:23] bronson: has joined #ruby
[23:30:29] sspreitz: has joined #ruby
[23:38:00] sspreitz: has joined #ruby
[23:38:39] mim1k: has joined #ruby
[23:40:59] bkxd: has joined #ruby
[23:42:55] milardovich: has joined #ruby
[23:43:08] milardovich: has joined #ruby
[23:44:15] nobitanobi: has joined #ruby
[23:44:28] belmoussaoui: has joined #ruby
[23:48:17] erlend: has joined #ruby
[23:48:47] TinkerTyper: has joined #ruby
[23:49:02] sspreitz: has joined #ruby
[23:49:07] nobitanobi: has joined #ruby
[23:50:19] belmoussaoui_: has joined #ruby
[23:52:31] bruno-: has joined #ruby
[23:56:25] dionysus69: has joined #ruby
[23:57:36] SteenJobs: has joined #ruby
[23:57:47] Stickwalker: has joined #ruby
[23:58:42] sspreitz: has joined #ruby
[23:58:53] TinkerTyper: has joined #ruby