« Back to channel list

#ruby - 21 September 2017

« Back 1 day Forward 1 day »
[00:00:10] daydream: has joined #ruby
[00:03:36] cagomez: has joined #ruby
[00:07:57] michaelzinn: has joined #ruby
[00:08:14] millerti: has joined #ruby
[00:09:13] enterprisey: has joined #ruby
[00:09:31] skweek: has joined #ruby
[00:09:54] PresidentBiscuit: has joined #ruby
[00:18:26] noobineer: has joined #ruby
[00:19:50] jphase: has joined #ruby
[00:25:02] tAn: has joined #ruby
[00:27:11] jdawgaz: has joined #ruby
[00:28:01] jdawgaz: has joined #ruby
[00:28:13] workmad3: has joined #ruby
[00:28:46] jdawgaz: has joined #ruby
[00:29:01] Skull0Inc: has joined #ruby
[00:29:36] jdawgaz: has joined #ruby
[00:29:39] michaelzinn: has joined #ruby
[00:30:21] jdawgaz: has joined #ruby
[00:31:12] jdawgaz: has joined #ruby
[00:32:02] jdawgaz: has joined #ruby
[00:32:47] jdawgaz: has joined #ruby
[00:33:38] Azure: has joined #ruby
[00:35:35] brent__: has joined #ruby
[00:35:55] zapata: has joined #ruby
[00:38:11] astrobunny: has joined #ruby
[00:40:31] jphase: has joined #ruby
[00:41:52] nobitanobi: has joined #ruby
[00:42:20] orbyt_: has joined #ruby
[00:43:40] roadt: has joined #ruby
[00:46:46] Guest85471: has joined #ruby
[00:47:02] jdawgaz: has joined #ruby
[00:47:15] s2013: has joined #ruby
[00:47:49] Guest85471: How do I find out the version numbers of the dependencies of a gem package
[00:48:38] Algebr: and I want to be able to do this per version number of a gem package
[00:49:19] Algebr: so I want to know the version numbers of the dependencies of fastlane 2.50 for example
[00:50:27] michaelzinn: has joined #ruby
[00:51:38] yehowyada: has joined #ruby
[00:52:10] Cohedrin_: has joined #ruby
[00:52:11] kculpis: has joined #ruby
[00:53:29] skweek: has joined #ruby
[00:55:35] Algebr: oh, gem dependency gets me far
[00:57:34] paradisaeidae: has joined #ruby
[00:57:41] paradisaeidae_: has joined #ruby
[00:57:41] Cohedrin_: has joined #ruby
[01:00:11] PresidentBiscuit: has joined #ruby
[01:00:54] jdawgaz: has joined #ruby
[01:06:22] d^sh: has joined #ruby
[01:06:41] Algebr: has joined #ruby
[01:07:14] Cohedrin_: has joined #ruby
[01:11:09] michaelzinn: has joined #ruby
[01:12:28] yokel_: has joined #ruby
[01:12:49] gizmore|2: has joined #ruby
[01:13:26] knight33: has joined #ruby
[01:13:52] Cohedrin_: has joined #ruby
[01:17:18] kn-928: has joined #ruby
[01:24:38] Algebr`: has joined #ruby
[01:25:22] Algebr`: what is this command flag to ruby? -rbundler/setup
[01:25:48] tAn: has joined #ruby
[01:28:03] mtkd: has joined #ruby
[01:28:39] havenwood: Algebr`: that's like: ruby -e "require 'bundler/setup'"
[01:29:25] havenwood: Algebr`: -rlibrary require the library before executing your script
[01:30:38] uZiel: has joined #ruby
[01:31:00] Algebr`: do you know what running bundler/setup concretly does?
[01:31:00] charliesome: has joined #ruby
[01:31:21] Kilo`byte: has joined #ruby
[01:33:25] havenwood: Algebr`: it loads this file: https://github.com/bundler/bundler/blob/master/lib/bundler/setup.rb
[01:33:49] michaelzinn: has joined #ruby
[01:34:15] Algebr`: oh that's not bad at all
[01:34:25] Algebr`: I mean only 28 loc
[01:34:51] havenwood: Algebr`: which it turn loads: https://github.com/bundler/bundler/blob/master/lib/bundler/shared_helpers.rb
[01:35:41] havenwood: then cascading requires
[01:37:49] mim1k: has joined #ruby
[01:38:01] jdawgaz: has joined #ruby
[01:38:14] Algebr`: can mruby use arbitrary gems?
[01:38:18] hfp_work: has joined #ruby
[01:38:41] havenwood: it can use mgems
[01:39:14] PresidentBiscuit: has joined #ruby
[01:39:26] havenwood: Algebr`: module Kernel; alias original_require require; def require this; puts this; original_require this end end; require 'bundler/setup'
[01:39:34] brent__: has joined #ruby
[01:39:56] havenwood: Algebr`: https://gist.github.com/havenwood/5b57a3aea4fcebf2fa07124581aaaa8a
[01:40:00] naprimer: has joined #ruby
[01:40:35] Algebr`: quite a bit
[01:40:47] jackjackdripper: has joined #ruby
[01:40:52] Dimik: has joined #ruby
[01:41:39] PresidentBiscuit: has joined #ruby
[01:41:41] havenwood: you could also check which were already required
[01:42:05] Algebr`: ah darn, mgems doesn't have what I wanted.
[01:42:10] fyrril: has joined #ruby
[01:42:18] havenwood: what do you want?
[01:42:20] Cohedrin_: has joined #ruby
[01:43:05] cagomez: has joined #ruby
[01:43:17] naprimer: has joined #ruby
[01:44:24] Algebr`: oh this is cool, matz still commits on mruby
[01:44:35] havenwood: Algebr`: you actually build mruby along with the mgems you'll want for that build
[01:44:41] havenwood: it's a bit different than ruby gems
[01:44:52] havenwood: but you require them along the same lines
[01:46:26] Algebr`: havenwood: how long have you been doing ruby?
[01:46:44] havenwood: Algebr`: 7 years
[01:47:15] cschneid: has joined #ruby
[01:47:26] havenwood: Algebr`: heading to Ruby in Hollywood meetup, back in a few!
[01:47:38] Algebr`: cool, thanks for answering my questions
[01:48:18] bmurt: has joined #ruby
[01:48:19] hfp_work: has joined #ruby
[01:52:31] rrichardsr3: has joined #ruby
[01:53:40] Algebr`: is method name ending in ? a convention to say this return bool?
[01:54:29] michaelzinn: has joined #ruby
[01:56:18] JaredR: has joined #ruby
[01:58:48] kn-928: has joined #ruby
[01:59:21] MrBismuth: has joined #ruby
[01:59:24] edwardly: has joined #ruby
[01:59:24] edwardly: has joined #ruby
[02:02:21] cagomez: has joined #ruby
[02:02:48] nicolai86: has joined #ruby
[02:03:27] d^sh: has joined #ruby
[02:04:51] hfp_work: has joined #ruby
[02:05:08] havenwood: Algebr`: no, rather that the value will be used for truthiness
[02:05:51] Algebr`: but just convention right
[02:05:55] Algebr`: what about methods ending in !
[02:06:15] havenwood: Algebr`: a bang ! means there's a less dangerous version without a bang
[02:06:33] havenwood: Algebr`: often it means the ! version mutates the receiver
[02:07:13] havenwood: but it could be anything where there's a more squirrelly variants
[02:07:49] Algebr`: this language leaves so much up to convention
[02:08:21] Guiri: has joined #ruby
[02:08:44] chouhoulis: has joined #ruby
[02:13:25] chouhoulis: has joined #ruby
[02:15:12] michaelzinn: has joined #ruby
[02:18:15] Algebr`: bundle and bundler are the same thing?
[02:20:49] jdawgaz: has joined #ruby
[02:21:23] cagomez: has joined #ruby
[02:21:38] ornerymoose: has joined #ruby
[02:22:11] Algebr`: how do I dump all versions of a library available via gem
[02:24:57] milardovich: has joined #ruby
[02:26:48] tAn: has joined #ruby
[02:27:04] rrichardsr3: has joined #ruby
[02:28:45] Algebr`: bah, easier to just look at github releases
[02:29:18] Algebr`: bundler getting a lot of attention lately?
[02:30:08] Nilium: Probably no more than usual?
[02:32:38] s2013: has joined #ruby
[02:37:33] arescorpio: has joined #ruby
[02:37:47] michaelzinn: has joined #ruby
[02:40:54] perniciouscaffei: has joined #ruby
[02:41:01] maryo_: has joined #ruby
[02:43:24] ornerymoose: has joined #ruby
[02:44:31] Jameser: has joined #ruby
[02:48:36] lacuna: has joined #ruby
[02:54:41] znz_jp: has joined #ruby
[02:56:22] cschneid: has joined #ruby
[02:57:16] howdoi: has joined #ruby
[02:58:29] michaelzinn: has joined #ruby
[02:58:57] hfp_work: has joined #ruby
[02:59:56] jdawgaz: has joined #ruby
[03:00:09] cadillac_: has joined #ruby
[03:00:41] jdawgaz: has joined #ruby
[03:01:31] jdawgaz: has joined #ruby
[03:02:17] jdawgaz: has joined #ruby
[03:03:07] jdawgaz: has joined #ruby
[03:03:44] Skull0Inc: has joined #ruby
[03:03:52] jdawgaz: has joined #ruby
[03:04:47] jdawgaz: has joined #ruby
[03:05:30] jdawgaz: has joined #ruby
[03:06:19] jdawgaz: has joined #ruby
[03:10:10] jenrzzz: has joined #ruby
[03:10:10] jenrzzz: has joined #ruby
[03:11:14] jdawgaz: has joined #ruby
[03:12:19] paradisaeidae: has joined #ruby
[03:12:37] paradisaeidae_: has joined #ruby
[03:17:04] cschneid: has joined #ruby
[03:19:15] michaelzinn: has joined #ruby
[03:20:43] lacuna: has joined #ruby
[03:22:54] jdawgaz: has joined #ruby
[03:24:04] jphase: has joined #ruby
[03:27:20] roadt: has joined #ruby
[03:27:34] tAn: has joined #ruby
[03:27:55] jenrzzz: has joined #ruby
[03:34:20] DTZUZO: has joined #ruby
[03:38:24] mim1k: has joined #ruby
[03:40:00] jenrzzz: has joined #ruby
[03:41:50] michaelzinn: has joined #ruby
[03:42:29] gix: has joined #ruby
[03:46:47] jphase: has joined #ruby
[03:46:50] johnny56_: has joined #ruby
[03:48:42] zapata: has joined #ruby
[03:49:55] govg: has joined #ruby
[03:55:11] jenrzzz: has joined #ruby
[03:55:57] jphase: has joined #ruby
[03:56:16] orbyt_: has joined #ruby
[03:58:57] ornerymoose: has joined #ruby
[04:01:14] jdawgaz: has joined #ruby
[04:01:23] uZiel: has joined #ruby
[04:02:29] michaelzinn: has joined #ruby
[04:02:35] milardovich: has joined #ruby
[04:04:26] bronson: has joined #ruby
[04:09:46] jphase: has joined #ruby
[04:11:32] noobineer: has joined #ruby
[04:16:35] jenrzzz: has joined #ruby
[04:16:36] jenrzzz: has joined #ruby
[04:18:34] jdawgaz: has joined #ruby
[04:19:42] astronavt: has joined #ruby
[04:19:46] jdawgaz: has joined #ruby
[04:19:49] cdg: has joined #ruby
[04:20:18] astronavt: how does the system() decide which shell to use, and is it possible to control that explicitly?
[04:20:25] astronavt: the system() method
[04:20:29] jdawgaz: has joined #ruby
[04:21:19] jdawgaz: has joined #ruby
[04:22:44] jdawgaz: has joined #ruby
[04:23:06] matthewd: astronavt: https://github.com/ruby/ruby/blob/eccbd8c0ef262b133a9c706c335244072d863bdb/process.c#L2539
[04:23:15] michaelzinn: has joined #ruby
[04:23:28] jphase: has joined #ruby
[04:23:31] matthewd: astronavt: If you want to be more specific, you should probably invoke the shell explicitly
[04:23:32] jdawgaz: has joined #ruby
[04:28:20] tAn: has joined #ruby
[04:30:54] noobineer: has joined #ruby
[04:31:14] Puffball: has joined #ruby
[04:32:41] jphase: has joined #ruby
[04:33:46] Algebr`: is invoking bundle the same as bundle install
[04:36:14] cadillac_: has joined #ruby
[04:36:45] mim1k: has joined #ruby
[04:37:45] Skull0Inc: has joined #ruby
[04:37:51] Xiti: has joined #ruby
[04:38:57] matthewd: Algebr`: Yes
[04:41:49] jphase: has joined #ruby
[04:43:16] nobitanobi: has joined #ruby
[04:45:24] lacuna: has joined #ruby
[04:45:50] michaelzinn: has joined #ruby
[04:46:20] millerti: has joined #ruby
[04:48:08] jenrzzz: has joined #ruby
[04:50:01] jackjackdripper: has joined #ruby
[04:52:07] jackjackdripper: has joined #ruby
[04:53:30] knight33: has joined #ruby
[04:57:11] _whitelogger: has joined #ruby
[05:00:12] jphase: has joined #ruby
[05:02:25] Algebr`: saw this in a usage of bundle, --without development, read the page for --without but still don't understand
[05:06:35] michaelzinn: has joined #ruby
[05:09:21] jphase: has joined #ruby
[05:12:16] alex``: has joined #ruby
[05:13:54] dionysus69: has joined #ruby
[05:14:07] Bock: has joined #ruby
[05:15:56] brent__: has joined #ruby
[05:16:07] samlisl_: has joined #ruby
[05:18:33] jphase: has joined #ruby
[05:18:45] cschneid: has joined #ruby
[05:19:46] jenrzzz: has joined #ruby
[05:25:05] Dimik: has joined #ruby
[05:27:18] michaelzinn: has joined #ruby
[05:27:42] jphase: has joined #ruby
[05:29:05] tAn: has joined #ruby
[05:31:14] Algebr`: Is it possible to tell gem download another platform's native extensions? For example, I want to gem/bundle install the windows binaries for unf_ext but I am on OS X
[05:31:53] matthewd: Algebr`: I don't think so.. why do you want to do that?
[05:31:54] belmoussaoui: has joined #ruby
[05:32:13] Algebr`: my usecase is odd
[05:32:40] Algebr`: this seems like an oversight to me
[05:33:50] aupadhye: has joined #ruby
[05:33:59] biberu: has joined #ruby
[05:34:37] Cohedrin_: has joined #ruby
[05:36:06] nofxx: Algebr`, clone, `ag PLATFORM` , comment'em all
[05:36:45] retrazil: has joined #ruby
[05:37:09] Algebr`: what you mean by comment'em all
[05:37:46] retrazil: hi, can I ask beginner questions here ?
[05:39:02] Asher: has joined #ruby
[05:39:02] kn-928: has joined #ruby
[05:39:06] anisha: has joined #ruby
[05:40:29] paranoicsan: has joined #ruby
[05:41:29] jphase: has joined #ruby
[05:44:39] AnoHito: has joined #ruby
[05:45:14] paranoicsan: has joined #ruby
[05:46:56] alex``: has joined #ruby
[05:49:51] michaelzinn: has joined #ruby
[05:51:15] milardovich: has joined #ruby
[05:51:49] rabajaj: has joined #ruby
[05:55:40] jackjackdripper: has joined #ruby
[05:58:35] Silthias: has joined #ruby
[06:01:12] milardovich: has joined #ruby
[06:10:31] mkali: has joined #ruby
[06:10:35] michaelzinn: has joined #ruby
[06:13:58] mostlybadfly: has joined #ruby
[06:18:22] jenrzzz: has joined #ruby
[06:25:58] jenrzzz: has joined #ruby
[06:31:19] michaelzinn: has joined #ruby
[06:36:32] kazi: has joined #ruby
[06:39:58] jenrzzz: has joined #ruby
[06:40:06] Algebr`: how do you show show which platforms a gem is available for?
[06:40:18] Asher: has joined #ruby
[06:43:41] milardovich: has joined #ruby
[06:43:57] tAn: has joined #ruby
[06:51:31] phaul: has joined #ruby
[06:52:51] tAn: has joined #ruby
[06:54:07] rrichardsr3: has joined #ruby
[06:54:46] ur5us: has joined #ruby
[06:58:52] kazi: I tried to install a gem and found this error in my log https://gist.github.com/anonymous/595cbcc32342401d66ec6f3efb5d66bc#file-mkmf-log
[07:00:02] r7c: has joined #ruby
[07:00:07] kazi: Is there any suggestion regarding what I could do with this?
[07:03:08] Pisuke: has joined #ruby
[07:03:40] teatime: kazi: do you have libc headers installed
[07:03:50] teatime: kazi: what OS are you on?
[07:03:54] Mortomes|Work: has joined #ruby
[07:04:10] rrichardsr3: has joined #ruby
[07:05:45] teatime: e.g., on debian or ubuntu you'd do: apt-get install build-essential libc6-dev
[07:08:56] kazi: teatime: I do have linux mint or ubuntu installed on my machine
[07:09:38] teatime: welp then try that
[07:10:01] kazi: teatime: Yes I'm trying this
[07:12:17] kazi: teatime: My problem has been fixed using your solution.
[07:12:50] kazi: I highly appreciate your time and effort for reading my issue and giving your kind solution to it.
[07:13:02] teatime: hehe, no probs :)
[07:14:43] dionysus69: has joined #ruby
[07:14:52] enterprisey: has joined #ruby
[07:15:41] ledestin: has joined #ruby
[07:16:25] jaruga: has joined #ruby
[07:16:40] TomyWork: has joined #ruby
[07:17:12] Algebr`: if anyone happens to know about platform issues in gem files https://github.com/knu/ruby-unf_ext/issues/33
[07:17:35] anas: has joined #ruby
[07:21:18] nobitanobi: has joined #ruby
[07:22:06] matthewd: Algebr`: You seem to be misinterpreting the purpose of the :platform option
[07:23:03] Algebr`: I think so
[07:23:22] claudiuinberlin: has joined #ruby
[07:23:37] Algebr`: I thought that it could distribute prebuilt binaries as well for the native extensions
[07:23:59] anas: has joined #ruby
[07:24:06] matthewd: You'll likely have more luck if you describe the problem you're trying to solve
[07:27:30] Algebr`: I am trying to build a windows package using traveling ruby. Pure ruby code works fine packaged, but code using native extensions (seemingly) doesn't work, first example is this unf_ext package
[07:27:39] claudiuinberlin: has joined #ruby
[07:27:39] Algebr`: I build these packages on OS X
[07:27:44] Algebr`: (Or Linux)
[07:28:28] Algebr`: so it would be great if there was a way to say give me the prebuilt binaries of native extensions for a different platform.
[07:29:05] matthewd: Well three clicks just got me to https://github.com/phusion/traveling-ruby#caveats
[07:29:11] matthewd: > Native extensions are currently not supported when creating Windows packages
[07:29:36] selim: has joined #ruby
[07:29:52] aufi: has joined #ruby
[07:30:38] Algebr`: right. That said, when I try loading it on windows, I just get a unf_ext not found in sources, so I thought it would just be a matter of placing the correct compiled code in a path
[07:32:16] matthewd: If the authors of the tool are explicitly claiming it won't work, it seems unrealistic to expect to solve it by "just" putting the thing in the place
[07:37:09] michaelzinn: has joined #ruby
[07:43:55] Silthias1: has joined #ruby
[07:46:16] Silthias: has joined #ruby
[07:55:47] chihhsin: has joined #ruby
[07:58:17] astrobunny: has joined #ruby
[07:59:33] claudiuinberlin: has joined #ruby
[08:01:34] roadt: has joined #ruby
[08:13:09] ur5us: has joined #ruby
[08:13:33] mikecmpbll: has joined #ruby
[08:14:57] jphase: has joined #ruby
[08:15:42] fyrril2: has joined #ruby
[08:15:55] jphase: has joined #ruby
[08:17:16] jphase_: has joined #ruby
[08:18:21] jphase: has joined #ruby
[08:19:25] jphase: has joined #ruby
[08:20:26] jphase: has joined #ruby
[08:20:37] cdg: has joined #ruby
[08:21:23] mim1k: has joined #ruby
[08:21:40] jphase: has joined #ruby
[08:24:30] jphase: has joined #ruby
[08:25:59] cadillac_: has joined #ruby
[08:26:03] jphase_: has joined #ruby
[08:27:20] jphase: has joined #ruby
[08:28:16] ledestin: has joined #ruby
[08:28:28] jphase: has joined #ruby
[08:31:15] huyderman: has joined #ruby
[08:32:26] mim1k_: has joined #ruby
[08:35:13] rgr_: has joined #ruby
[08:35:55] kaibro: has joined #ruby
[08:37:22] mim1k: has joined #ruby
[08:39:19] lxsameer: has joined #ruby
[08:41:53] Doow: has joined #ruby
[08:42:01] jphase: has joined #ruby
[08:44:51] ledestin: has joined #ruby
[08:49:55] ledestin: has joined #ruby
[08:49:56] Doow: has joined #ruby
[08:50:36] ur5us: has joined #ruby
[08:51:35] Beams: has joined #ruby
[08:52:46] mark_66: has joined #ruby
[08:55:15] bruce_lee: has joined #ruby
[08:55:16] bruce_lee: has joined #ruby
[08:56:49] InfinityFye: has joined #ruby
[08:58:16] dextrey: has joined #ruby
[08:58:58] ertes-w: has joined #ruby
[08:59:03] adaedra: has joined #ruby
[09:00:41] `derpy: has joined #ruby
[09:00:46] jdawgaz: has joined #ruby
[09:00:53] ertes-w: hi… question from a non-ruby-programmer: is there any way to improve the boot times and general performance of ruby programs without changing the code? specific problem is that sensu checks are quite expensive: 300ms for `check-http.rb --help`
[09:01:40] mikecmpb_: has joined #ruby
[09:02:03] ertes-w: (i know i could just switch to perl/python/shell-based nagios checks, but perhaps there is a way to avoid that)
[09:07:17] acarpe: has joined #ruby
[09:07:38] matthewd: ertes-w: No magic go-fast button, no.. the perhaps-too-obvious answers are to load less at startup, or to avoid startup entirely
[09:08:04] ertes-w: i see, thanks
[09:09:11] matthewd: The only notable thing you could try would be --disable=gems, but most nontrivial applications will be expecting that functionality to be there
[09:09:32] jphase: has joined #ruby
[09:11:46] jinie: has joined #ruby
[09:11:54] ams__: has joined #ruby
[09:13:02] DipoleHourglass: has joined #ruby
[09:14:18] matthewd: ertes-w: If the script is being run by another ruby process, the best trick is to just fork and load it directly, instead of needlessly booting a new copy of the interpreter
[09:14:57] ertes-w: /bin/check-http.rb:13:in `<main>': uninitialized constant Gem (NameError)
[09:15:01] ertes-w: so much for that =)
[09:15:24] ertes-w: matthewd: unfortunately i believe sensu has no mechanism to do that
[09:16:17] ertes-w: well, it does have some extension concept, but it would basically require me to become a ruby programmer
[09:17:41] workmad3: has joined #ruby
[09:18:42] jphase: has joined #ruby
[09:19:39] howdoi: has joined #ruby
[09:22:41] tvw: has joined #ruby
[09:23:11] GhostK: has joined #ruby
[09:24:28] ledestin: has joined #ruby
[09:26:46] michaelzinn1: has joined #ruby
[09:27:50] jphase: has joined #ruby
[09:31:15] harai: has joined #ruby
[09:33:52] nobitanobi: has joined #ruby
[09:33:58] phinxy: has joined #ruby
[09:37:05] jphase: has joined #ruby
[09:40:54] InfinityFye: has joined #ruby
[09:40:57] Bhootrk_: has joined #ruby
[09:42:56] ledestin: has joined #ruby
[09:48:39] claudiuinberlin: has joined #ruby
[09:49:26] kn-928: has joined #ruby
[09:50:07] Serpent7776: has joined #ruby
[09:50:47] jphase: has joined #ruby
[09:59:05] ledestin: has joined #ruby
[10:03:34] ur5us: has joined #ruby
[10:05:06] mim1k: has joined #ruby
[10:06:55] claudiuinberlin: has joined #ruby
[10:07:24] roadt: has joined #ruby
[10:08:50] mikecmpbll: has joined #ruby
[10:09:06] huyderman: has joined #ruby
[10:15:29] ledestin: has joined #ruby
[10:16:42] huyderman_: has joined #ruby
[10:17:56] [reed]: has joined #ruby
[10:17:56] [reed]: has joined #ruby
[10:19:29] anisha: has joined #ruby
[10:25:22] brent__: has joined #ruby
[10:26:15] jottr: has joined #ruby
[10:27:01] Azure: has joined #ruby
[10:29:40] ledestin: has joined #ruby
[10:33:24] ledestin: has joined #ruby
[10:34:47] Silthias: has joined #ruby
[10:36:23] zenspider: has joined #ruby
[10:39:20] bruno-: has joined #ruby
[10:56:22] hinbody: has joined #ruby
[10:57:38] Jameser`: has joined #ruby
[10:59:26] apparition: has joined #ruby
[11:00:48] duckpuppy: has joined #ruby
[11:03:15] acarpe: has joined #ruby
[11:06:03] dionysus69: has joined #ruby
[11:06:59] mim1k: has joined #ruby
[11:09:15] banisterfiend: has joined #ruby
[11:10:29] DrCode: has joined #ruby
[11:11:48] cdg: has joined #ruby
[11:12:40] michaelzinn1: has joined #ruby
[11:14:37] DrCode: has joined #ruby
[11:17:25] milardovich: has joined #ruby
[11:17:48] yxhuvud: has joined #ruby
[11:17:56] bronson: has joined #ruby
[11:18:01] charliesome: has joined #ruby
[11:22:59] dextrey: has joined #ruby
[11:29:36] rawste: has joined #ruby
[11:29:53] claudiuinberlin: has joined #ruby
[11:32:47] mim1k: has joined #ruby
[11:33:48] mtkd: has joined #ruby
[11:37:03] banisterfiend: has joined #ruby
[11:37:19] bmurt: has joined #ruby
[11:41:30] FahmeF: has joined #ruby
[11:45:03] op84: has joined #ruby
[11:46:10] Sylario: has joined #ruby
[11:46:38] op84: hey there - how i can sort a an array based on hash value percent? [{:name=>”Fashion”, :percent=>25.0},{:name=>"Accessoires", :percent=>75.0}] any hint?
[11:47:15] matthewd: op84: sort_by
[11:47:27] tvw: has joined #ruby
[11:47:30] op84: matthewd: thanks
[11:48:38] ldnunes: has joined #ruby
[11:51:41] arup_r: has joined #ruby
[11:52:10] konos5: has joined #ruby
[11:52:13] ledestin: has joined #ruby
[11:52:26] ShalokShalom_: has joined #ruby
[11:52:41] arup_r: I want to change the string "Cannot delete record because of dependent inspection_components" to "Cannot delete record because of dependent Inspection components". I tried s.sub(/Cannot delete record because of dependent (\w+)/, '\1'.humanize) but it is returning 'inspection_components'. What am I missing?
[11:54:18] selim_: has joined #ruby
[11:54:51] synthroid: has joined #ruby
[11:57:03] claudiuinberlin: has joined #ruby
[12:02:45] acarpe: has joined #ruby
[12:03:55] acalycine: has joined #ruby
[12:07:05] mson: has joined #ruby
[12:07:24] matthewd: arup_r: You need a block
[12:08:02] arup_r: tried block.. but block argument is the whole string
[12:08:10] arup_r: don't know what am I missing
[12:09:31] matthewd: Well that just means you did the block wrong; it doesn't change my response for the above.
[12:10:44] teatime: arup_r: inside the block you can use $1 instead of \1
[12:11:52] teatime: arup_r: you're also going to need to capture the first part of the sentence so you can put it back in.
[12:12:22] nobitanobi: has joined #ruby
[12:14:48] arup_r: teatime: and matthewd thanks .. worked s.sub(/(Cannot delete record because of dependent) (\w+)/) { |m| p "#{$1} #{$2.humanize}" }
[12:18:27] bronson: has joined #ruby
[12:20:52] acalycine: has joined #ruby
[12:26:23] Bish_: has joined #ruby
[12:26:47] tAn: has joined #ruby
[12:28:44] dionysus69: has joined #ruby
[12:29:32] fusta: has joined #ruby
[12:32:47] gnufied: has joined #ruby
[12:36:59] _aeris_: has joined #ruby
[12:41:11] brent__: has joined #ruby
[12:43:43] ornerymoose: has joined #ruby
[12:45:34] FahmeF_: has joined #ruby
[12:46:38] uZiel: has joined #ruby
[12:47:37] ornerymoose_: has joined #ruby
[12:47:52] maryo_: has joined #ruby
[12:47:59] Mon_Ouie: has joined #ruby
[12:48:16] michaelzinn2: has joined #ruby
[12:52:22] jdawgaz: has joined #ruby
[12:52:34] charliesome: has joined #ruby
[12:52:59] claudiuinberlin: has joined #ruby
[12:56:32] AgentVenom: has joined #ruby
[13:02:46] tAn: has joined #ruby
[13:02:57] kahra: has joined #ruby
[13:03:10] soyokaze: has joined #ruby
[13:04:02] balazs_: has joined #ruby
[13:07:17] phaul: has joined #ruby
[13:08:22] cdg: has joined #ruby
[13:21:32] cagmz: has joined #ruby
[13:22:34] acarpe: has joined #ruby
[13:23:27] hfp_work: has joined #ruby
[13:24:16] Skull0Inc: has joined #ruby
[13:27:00] workmad3: has joined #ruby
[13:30:57] hfp_work: has joined #ruby
[13:31:57] hfp__work: has joined #ruby
[13:35:30] hfp_work-: has joined #ruby
[13:36:41] chouhoulis: has joined #ruby
[13:40:02] hfp_work: has joined #ruby
[13:41:22] t-recx: has joined #ruby
[13:42:02] nofxx: has joined #ruby
[13:42:04] biberu: has joined #ruby
[13:47:33] jphase: has joined #ruby
[13:50:20] dionysus69: has joined #ruby
[13:55:07] nofxx: has joined #ruby
[14:01:06] LastWhisper____: has joined #ruby
[14:01:58] Mighty_Warthog: has joined #ruby
[14:07:48] claudiuinberlin: has joined #ruby
[14:09:55] cdg: has joined #ruby
[14:10:34] Rapture: has joined #ruby
[14:14:10] jphase_: has joined #ruby
[14:19:46] bronson: has joined #ruby
[14:20:32] claudiuinberlin: has joined #ruby
[14:22:16] cagomez: has joined #ruby
[14:24:10] mbologna1: has joined #ruby
[14:26:51] Jameser: has joined #ruby
[14:30:05] LastWhisper____: has joined #ruby
[14:31:08] __Yiota: has joined #ruby
[14:32:20] marr: has joined #ruby
[14:37:13] mostlybadfly: has joined #ruby
[14:39:29] ldnunes: has joined #ruby
[14:42:42] cschneid: has joined #ruby
[14:46:31] jobewan: has joined #ruby
[14:48:32] claudiuinberlin: has joined #ruby
[14:49:01] milardovich: has joined #ruby
[14:52:01] cschneid: has joined #ruby
[14:56:40] ujhee: has joined #ruby
[14:59:38] cdg: has joined #ruby
[14:59:49] gusrub: has joined #ruby
[15:02:59] d10n-work: has joined #ruby
[15:04:03] fury: has joined #ruby
[15:05:37] fury: i am attempting to build a docker image for my ruby app based on 2.4.2-alpine, about how long is it supposed to take to run apk add --update build-base libxml2-dev libxslt-dev postgresql-dev libsqlite3-dev O_o cause it's just sitting there looking at me funny right now...been running for about 6 minutes
[15:05:55] fury: last line i see is fetch http://dl-cdn.alpinelinux.org/alpine/v3.4/community/x86_64/APKINDEX.tar.gz
[15:06:14] bruno-: has joined #ruby
[15:06:28] polishdub: has joined #ruby
[15:06:46] SeepingN: has joined #ruby
[15:09:16] fury: oh. unsatisfiable constraints, libsqlite3-dev missing... whoops. dunno why it took like 10 minutes to tell me that tho
[15:11:42] gizmore: has joined #ruby
[15:11:51] BigRonnieRon: has joined #ruby
[15:15:59] cagomez: has joined #ruby
[15:16:09] cagomez: has joined #ruby
[15:16:48] oleo: has joined #ruby
[15:17:23] belmoussaoui: has joined #ruby
[15:19:20] elsevero: has joined #ruby
[15:21:54] belmoussaoui: has joined #ruby
[15:24:51] s2013: has joined #ruby
[15:25:01] mim1k: has joined #ruby
[15:26:05] jackjackdripper: has joined #ruby
[15:29:40] __Yiota: has joined #ruby
[15:30:12] rippa: has joined #ruby
[15:32:23] raynold: has joined #ruby
[15:39:30] brent__: has joined #ruby
[15:40:47] Jameser: has joined #ruby
[15:43:07] nb_bez_______: has joined #ruby
[15:47:49] milardovich: has joined #ruby
[15:49:14] synthroid: has joined #ruby
[15:50:30] __Yiota: has joined #ruby
[15:53:49] banisterfiend: has joined #ruby
[15:59:34] beilabs: has joined #ruby
[16:02:15] [Butch]: has joined #ruby
[16:02:38] joker5bb: has joined #ruby
[16:06:54] FahmeF: has joined #ruby
[16:08:49] ledestin: has joined #ruby
[16:18:02] jphase: has joined #ruby
[16:19:09] banisterfiend: has joined #ruby
[16:19:55] claudiuinberlin: has joined #ruby
[16:20:23] dinfuehr: has joined #ruby
[16:20:48] joker5bb: has joined #ruby
[16:20:57] jphase: has joined #ruby
[16:21:04] kn-928: has joined #ruby
[16:21:23] bronson: has joined #ruby
[16:27:04] quobo: has joined #ruby
[16:27:43] kn-928: has joined #ruby
[16:28:15] nofxx: has joined #ruby
[16:30:23] orbyt_: has joined #ruby
[16:31:39] serhart: has joined #ruby
[16:34:03] jphase_: has joined #ruby
[16:37:44] ertes-w: has left #ruby: ("ERC (IRC client for Emacs 25.2.1)")
[16:38:32] cadillac_: has joined #ruby
[16:40:16] skweek: has joined #ruby
[16:41:40] dionysus69: has joined #ruby
[16:42:23] acarpe: has joined #ruby
[16:44:27] uZiel: has joined #ruby
[16:44:45] bruno-_: has joined #ruby
[16:52:10] hippo: has joined #ruby
[16:53:28] montyboy: has joined #ruby
[16:54:00] kies: has joined #ruby
[16:55:18] barbacua: has joined #ruby
[16:56:26] knight33: has joined #ruby
[17:07:22] Dimik: has joined #ruby
[17:08:46] FahmeF_: has joined #ruby
[17:09:50] ltem: has joined #ruby
[17:12:38] jottr: has joined #ruby
[17:20:44] dextrey: has joined #ruby
[17:25:08] imode: has joined #ruby
[17:30:33] ornerymoose: has joined #ruby
[17:31:26] kirun: has joined #ruby
[17:37:31] banisterfiend: has joined #ruby
[17:39:05] knight33: has joined #ruby
[17:42:33] npgm: has joined #ruby
[17:42:57] Rapture: has joined #ruby
[17:50:07] mim1k: has joined #ruby
[17:50:44] uZiel: has joined #ruby
[17:54:26] orbyt_: has joined #ruby
[17:55:32] TomyLobo: has joined #ruby
[17:56:51] Joufflu: has joined #ruby
[18:01:33] Puffball: has joined #ruby
[18:02:39] ornerymoose: has joined #ruby
[18:05:37] ivanskie: has joined #ruby
[18:07:29] ornerymoose: has joined #ruby
[18:08:18] Cohedrin_: has joined #ruby
[18:12:24] Algebr`: has joined #ruby
[18:13:46] Algebr`: matthewd: sorry, i got disconnected yesterday in case you had more to say
[18:14:04] chouhoulis: has joined #ruby
[18:19:19] s2013: has joined #ruby
[18:22:02] bronson: has joined #ruby
[18:22:21] Jameser: has joined #ruby
[18:24:41] ResidentBiscuit: has joined #ruby
[18:26:22] skweek: has joined #ruby
[18:26:24] dviola: has joined #ruby
[18:27:36] troys: has joined #ruby
[18:28:56] mkali: has joined #ruby
[18:31:48] Algebr`: .gemspec files are for publishing to gem?
[18:32:40] Algebr`: is bundle or bundler the preferred one today?
[18:33:24] nchambers: Algebr`: http://guides.rubygems.org/make-your-own-gem/
[18:37:31] kies: has joined #ruby
[18:38:59] ahrs: has joined #ruby
[18:40:15] orbyt_: has joined #ruby
[18:40:24] havenwood: Algebr`: Yes, gemspec files are for gems. You *can* have a Gemfile in a gem for devs with the line in it: gemspec
[18:40:39] kn-928: has joined #ruby
[18:40:43] havenwood: Algebr`: If you decide to use a Gemfile with your gem, don't commit the Gemfile.lock.
[18:41:10] havenwood: But you'll still need your .gemspec file.
[18:41:46] Algebr`: how do I locally build following the .gemspec?
[18:43:27] havenwood: Algebr`: gem build
[18:43:33] havenwood: Algebr`: see that link ^
[18:46:35] jenrzzz: has joined #ruby
[18:46:35] jenrzzz: has joined #ruby
[18:47:03] cdg: has joined #ruby
[18:48:09] Sembei: has joined #ruby
[18:52:25] nicesignal: has joined #ruby
[19:00:00] nobitanobi: has joined #ruby
[19:00:29] marr: has joined #ruby
[19:02:00] claudiuinberlin: has joined #ruby
[19:04:50] dysfigured: has joined #ruby
[19:06:53] bronson: has joined #ruby
[19:09:57] mikecmpbll: has joined #ruby
[19:11:13] rgr: has joined #ruby
[19:14:50] __Yiota: has joined #ruby
[19:16:47] jackjackdripper: has joined #ruby
[19:16:47] milardovich: has joined #ruby
[19:18:02] synthroid: has joined #ruby
[19:19:00] jackjackdripper: has joined #ruby
[19:21:18] acarpe: has joined #ruby
[19:27:42] milardovich: has joined #ruby
[19:32:31] jinie: has joined #ruby
[19:33:04] charliesome: has joined #ruby
[19:34:38] phinxy: has joined #ruby
[19:34:40] phinxy: has joined #ruby
[19:39:24] orbyt_: has joined #ruby
[19:41:59] mjolnird: has joined #ruby
[19:44:37] JD2020X: has joined #ruby
[19:45:12] duckpuppy: has joined #ruby
[19:47:07] elcontrastador: has joined #ruby
[19:51:22] elsevero: has joined #ruby
[19:54:09] claudiuinberlin: has joined #ruby
[19:54:18] charliesome: has joined #ruby
[19:54:26] L0rdShrek_____: has joined #ruby
[19:54:48] mjolnird: has joined #ruby
[19:56:17] Mon_Ouie: has joined #ruby
[20:00:55] s3nd1v0g1us: has joined #ruby
[20:03:27] RickHull: has joined #ruby
[20:04:46] RickHull: Hi, I'm having trouble finding the rdoc for Dir::Tmpname looking at Core and Stdlib. e.g. https://ruby-doc.org/core-2.4.1/
[20:05:06] RickHull: likewise, I know there is Dir stuff in Stdlib, but I don't see any way to get to it here: https://ruby-doc.org/stdlib-2.4.1/
[20:06:23] charliesome: has joined #ruby
[20:06:36] RickHull: are these just undocumented or omitted on purpose or some kind of oversight?
[20:07:31] cagomez: has joined #ruby
[20:09:27] cdg: has joined #ruby
[20:11:15] havenwood: RickHull: appears undocumented
[20:11:22] havenwood: module Tmpname # :nodoc:
[20:11:57] RickHull: is that the desired state of affairs?
[20:12:11] charliesome: has joined #ruby
[20:12:26] havenwood: RickHull: https://github.com/ruby/ruby/blob/trunk/lib/tmpdir.rb#L102-L140
[20:12:36] elomatreb: https://github.com/ruby/ruby/blob/c08f7b80889b531865e74bc5f573df8fa27f2088/lib/tmpdir.rb#L102 -- Explicitely undocumented
[20:12:54] RickHull: typically, does this just signify that we haven't gotten around to it yet?
[20:12:56] jdawgaz: has joined #ruby
[20:13:15] havenwood: http://documenting-ruby.org/support.html
[20:13:41] havenwood: Meant to link: http://documenting-ruby.org/
[20:13:52] elomatreb: I'd guess in this case it's more a matter of this being an internal thing
[20:13:53] havenwood: RickHull: "Only about 75% of Ruby is adequately documented"
[20:14:34] RickHull: thanks for the info, I may be able to contribute
[20:14:53] RickHull: my "real" problem is to create a filename that is (very) unlikely to previously exist :)
[20:15:22] havenwood: RickHull: SecureRandom.uuid
[20:15:40] mc_fail: has joined #ruby
[20:15:41] havenwood: If you want random but not a tempfile ^
[20:15:57] phaul: has joined #ruby
[20:15:59] RickHull: just a name. I'm guessing whatever Dir::Tmpname does is reasonable
[20:16:20] mc_fail: io have the old good "common.rb:155:in `parse': 757: unexpected token at {"
[20:16:20] mostlybadfly: has joined #ruby
[20:16:23] mc_fail: what the hell?
[20:16:33] mc_fail: my json is correct
[20:16:44] mc_fail: jsonlint validates it
[20:17:09] RickHull: mc_fail: put together some pastes on e.g. gist.github.com
[20:17:26] RickHull: to demonstrate the problem
[20:18:32] RickHull: mc_fail: what package owns common.rb? or what package is common.rb using?
[20:19:29] milardovich: has joined #ruby
[20:19:59] RickHull: could this be a parser that is rejecting more than one object per file? not sure if that's a JSON thing
[20:20:45] MyMind: has joined #ruby
[20:22:35] cdg_: has joined #ruby
[20:23:01] mc_fail: https://gist.github.com/anonymous/255b67dfef0b5ccb6374885aeab2b96f - here it is
[20:23:32] mc_fail: is it supposed to be one liner
[20:23:48] elomatreb: You can't parse JSON line-by-line like that, if I'm reading your code correctly
[20:24:43] cagomez: has joined #ruby
[20:25:16] RickHull: yep, slurp the file into a string and parse the entire string
[20:25:19] lele: has joined #ruby
[20:25:35] RickHull: or there is probably some parse_file() or similar
[20:26:05] jenrzzz_: has joined #ruby
[20:28:35] RickHull: there are surely stream parsers that can avoid slurping if that's a concern
[20:30:42] RickHull: Dir::Tmpname makes use of `module_function` which is new to me. Reading this https://idiosyncratic-ruby.com/8-self-improvement.html
[20:31:08] RickHull: > Not having to prepend the module name every time you use the functions saves time and looks good: # BARF
[20:31:52] EminenceHC: has joined #ruby
[20:31:53] kn-928: has joined #ruby
[20:32:00] RickHull: gee, I saved so much time by not having to type out Math.pi. and now my readers can try to figure out where it comes from. thankfully i saved all that time
[20:32:40] elomatreb: It's more a shorthand for not having to do self.something or ModuleName.something when defining new Module methods, IME
[20:33:23] RickHull: i actually much prefer self.foo when calling instance methods rather than naked foo
[20:33:47] RickHull: again, as a reader, I am looking for any clues as to what foo resolves to
[20:34:03] elomatreb: It's often used like `extend self`, but is arguably a little clearer in meaning
[20:34:17] cadillac_: has joined #ruby
[20:35:19] RickHull: I've never had a problem with keeping class methods as class methods, and transmuting them to the instance layer smells really bad to me
[20:37:29] RickHull: there is structure and semantics, IMHO, to class layer vs instance layer. and violating that for the sake of aesthetics is a mistake
[20:38:17] RickHull: class layer methods should be more or less functional, where there is no internal state. instance layer methods that do not refer to internal state should be rewritten as class methods
[20:38:46] elomatreb: It's just that class methods are the easy shortcut to singleton-like objects in Ruby, i.e. Logger.info
[20:39:00] RickHull: ah, good point
[20:39:05] milardovich: has joined #ruby
[20:39:40] RickHull: I think that is a valid use case but it still kind of smells
[20:40:58] SeepingN: has joined #ruby
[20:42:11] elomatreb: It's still true about the state part for many applications, a logger still shouldn't need or keep state
[20:42:21] jphase_: has joined #ruby
[20:42:30] RickHull: well, maybe the current log level
[20:42:41] RickHull: i.e. if level is FATAL then Logger.info should be a NOOP
[20:43:29] elomatreb: True, and other minor things like e.g. a File descriptor, but you get what I mean
[20:43:39] RickHull: interesting you bring that up: https://github.com/rickhull/lager ;)
[20:45:11] elomatreb: TBH, except for the Rails builtin logger, I don't remember ever actually feeling like I wanted to use one, I just abuse Kernel#warn for everything
[20:45:57] RickHull: it's super handy to turn on a debug or trace logging
[20:46:05] RickHull: and you don't want that on all the time
[20:46:22] ur5us: has joined #ruby
[20:46:33] quobo: has joined #ruby
[20:46:56] elomatreb: I guess I don't work with complicated enough scripts often enough to feel like I need to leave debugging prints in place, I add them when I need them and remove them again
[20:47:15] r3QuiEm_cL: has joined #ruby
[20:47:16] chouhoul_: has joined #ruby
[20:47:42] RickHull: yeah, my context is more libraries than scripts
[20:48:01] RickHull: at some point, a library doing something sufficiently complicated needs debug / trace logging
[20:48:10] enterprisey: has joined #ruby
[20:48:20] chouhoul_: has joined #ruby
[20:49:23] __Yiota: has joined #ruby
[20:50:34] lxsameer: has joined #ruby
[20:50:35] milardovich: has joined #ruby
[20:52:17] RickHull: elomatreb: as far as you know, is the `module_function` in Dir::Tmpname just to avoid typing `def self.fn_name` ?
[20:52:38] RickHull: i.e. typing `def fn_name` instead
[20:55:10] elomatreb: RickHull: As far as I see, yes
[20:55:11] RickHull: well, and I guess internal calls can avoid specifying the method is really at the class layer
[20:55:50] RickHull: er, hm, that last part should work without `module_function`
[20:56:10] RickHull: i.e. when Tmpname.create calls Tmpname.make_tmpname
[20:56:39] RickHull: I might write a PR before I write the docs ;)
[20:59:08] havenwood: RickHull: It's so you get the module method like you said, but also so if you mix-it-in it'll be private.
[21:00:02] havenwood: RickHull: It's saying this is a function, and it might be used directly from this namespace or mixed into another - but in the latter case it'll be private for internal use, without a public interface.
[21:00:29] havenwood: Either way, the receiver isn't important to its function, it's a function.
[21:00:36] havenwood: A module function.
[21:00:36] nobitanobi: has joined #ruby
[21:01:23] RickHull: I don't quite understand the desire to mix in a function that doesn't refer to internal state
[21:01:42] RickHull: why wouldn't I just call Dir::Tmpname.create when I need to create stuff?
[21:02:12] RickHull: and if Tmpname.create *does* refer to internal state -- i.e. ivars -- then it doesn't belong at the class layer
[21:03:32] havenwood: RickHull: It's a namespace to put some functions. You could insist the namespace always be used to access those function, but here they allow mixins as an alternative.
[21:04:09] RickHull: it seems destructive to me
[21:04:20] havenwood: RickHull: Normally when you mixin a module with include, its methods become public instance methods. With module_function they become private instance methods.
[21:04:33] havenwood: It lets you mixin some functions without defining public methods for them.
[21:04:42] havenwood: That's nice to do.
[21:05:21] RickHull: the cost of mixing in a "stateless" function outweighs the benefit, particularly to readers IMHO
[21:05:46] havenwood: It's a common pattern in the Ruby stdlib.
[21:05:53] RickHull: when I see a naked `create`, how do I track down which module it comes from and where the definition lies?
[21:06:12] RickHull: I have to load the whole method resolution mechanism in my head, along with any author-provided fuckery
[21:06:21] havenwood: RickHull: method(:create).owner
[21:06:22] havenwood: RickHull: method(:create).source_location
[21:06:23] havenwood: You ask it!
[21:06:45] havenwood: >> method(:puts).owner
[21:06:46] ruby[bot]: havenwood: # => Kernel (https://eval.in/866054)
[21:06:51] RickHull: not if I'm reading code on github or paper
[21:06:57] RickHull: but, fair enough :)
[21:07:07] orbyt_: has joined #ruby
[21:07:42] RickHull: it seems much nicer to just reference the method explicitly rather than hiding its origins from the reader
[21:07:51] RickHull: i truly don't understand the benefit
[21:10:26] kentin: has joined #ruby
[21:12:08] rfoust: has joined #ruby
[21:13:37] __Yiota: has joined #ruby
[21:13:52] RickHull: also, in what context would method(:create) actually work, say in irb? I'd have to reopen Dir::Tmpdir and define a method to call method(:create) and then close the module and call my method from outside?
[21:14:08] mson: has joined #ruby
[21:14:30] RickHull: er, sorry, reopen whatever class had Dir::Tmpdir mixed in
[21:15:27] RickHull: or I guess something like method(:the_class, :create)
[21:16:07] RickHull: or just use pry ;)
[21:16:24] bronson: has joined #ruby
[21:19:14] RickHull: TheClass.method(:create) # duh
[21:22:09] vb333: has joined #ruby
[21:22:45] Cohedrin_: has joined #ruby
[21:22:52] belmoussaoui_: has joined #ruby
[21:24:28] dysfigured: has joined #ruby
[21:25:45] RickHull: more new-to-me stuff: https://github.com/ruby/ruby/blob/trunk/lib/tmpdir.rb#L109 can someone explain the purpose of this form? (parenthesized method args)
[21:27:20] RickHull: best guess: it's a way to have suffix default to nil, while following args do not have a default
[21:27:51] chouhoulis: has joined #ruby
[21:28:52] RickHull: >> Dir::Tmpname.make_tmpname(["one", "two"], 3)
[21:28:54] ruby[bot]: RickHull: # => uninitialized constant Dir::Tmpname (NameError) ...check link for more (https://eval.in/866061)
[21:29:39] noizex: has joined #ruby
[21:29:47] RickHull: aside from the eval error, this shit is pretty goofy IMHO
[21:30:07] jenrzzz: has joined #ruby
[21:30:07] jenrzzz: has joined #ruby
[21:33:30] RickHull: why not: `def make_tmpname(prefix, suffix = nil, n = nil)` as both of these default cases are expected inputs. or just use an options hash
[21:33:55] elomatreb: A lot of Ruby stdlib code is older than keyword args
[21:34:20] RickHull: and I guess before options hashes were popular
[21:35:22] RickHull: I'm not sure I'm up to speed on actual keyword args. do they go beyond sugar around a hash with symbol keys?
[21:38:48] RickHull: ah yes, looks like it
[21:39:59] elomatreb: Yes, they're pretty nice, you can even have them emulate the old-style options Hash (which is also still possible) with **args
[21:44:09] ivanskie: has joined #ruby
[21:44:23] __Yiota: has joined #ruby
[21:44:30] jdawgaz: has joined #ruby
[21:44:35] root: has joined #ruby
[21:44:59] duckpuppy: has joined #ruby
[21:47:53] _whitelogger: has joined #ruby
[21:48:34] npgm: has joined #ruby
[21:48:42] claw: has joined #ruby
[21:48:43] graingert: has joined #ruby
[21:48:57] contradictioned: has joined #ruby
[21:49:08] doesntbyte: has joined #ruby
[21:49:10] rjungemann: has joined #ruby
[21:49:20] andersh: has joined #ruby
[21:49:21] Ikri: has joined #ruby
[21:49:23] cadillac_: has joined #ruby
[21:49:24] G: has joined #ruby
[21:49:29] RickHull: dumb question, asked sincerely: what is a very good way to find all calls to Dir::Tmpname.make_tmpname? git clone ruby and git grep? something with CTAGS?
[21:50:05] TvL: has joined #ruby
[21:50:16] RickHull: all calls within ruby core, that is
[21:50:21] d^sh: has joined #ruby
[21:50:21] icedragon: has joined #ruby
[21:50:26] L0rdShrek_____: has joined #ruby
[21:50:27] bokayio: has joined #ruby
[21:50:27] quobo: has joined #ruby
[21:51:09] peteretep: has joined #ruby
[21:51:12] cyberRodent: has joined #ruby
[21:51:23] Tony-St4rk: has joined #ruby
[21:51:38] nyuszika7h: has joined #ruby
[21:51:45] Xeago: has joined #ruby
[21:51:52] valkyr2e: has joined #ruby
[21:52:22] Technaton: has joined #ruby
[21:52:23] jrgifford: has joined #ruby
[21:52:31] davic: has joined #ruby
[21:52:35] gbailey: has joined #ruby
[21:52:38] elomatreb: has joined #ruby
[21:52:50] bmn: has joined #ruby
[21:52:51] Bilge: has joined #ruby
[21:52:56] lele: has joined #ruby
[21:52:58] jhass: has joined #ruby
[21:53:46] adaedra: has joined #ruby
[21:53:51] synstack: has joined #ruby
[21:53:51] synstack: has joined #ruby
[21:54:05] S007: has joined #ruby
[21:54:44] Zarthus: has joined #ruby
[21:55:59] SegFaultAX: has joined #ruby
[21:56:22] jdawgaz: has joined #ruby
[21:56:50] cschneid_: has joined #ruby
[21:57:05] Olipro: has joined #ruby
[21:58:20] mim1k: has joined #ruby
[22:00:46] justizin: has joined #ruby
[22:01:11] Klumben: has joined #ruby
[22:01:12] zapata: has joined #ruby
[22:01:31] ForeignBiscuit: has joined #ruby
[22:01:55] jokke: has joined #ruby
[22:02:04] orbyt_: has joined #ruby
[22:02:41] ForeignBiscuit: has joined #ruby
[22:03:06] tbuehlmann: has joined #ruby
[22:03:32] JR042444__: has joined #ruby
[22:03:52] zachk: has joined #ruby
[22:05:25] wogi: has joined #ruby
[22:05:39] gil_: has joined #ruby
[22:05:39] gil_: has joined #ruby
[22:09:01] iszak: has joined #ruby
[22:09:01] iszak: has joined #ruby
[22:10:25] imode: has joined #ruby
[22:12:22] brent__: has joined #ruby
[22:13:19] RickHull: is there no good way to find all callers? I didn't mean for this to be a point against unnecessary-and-trivial mixins, but I suppose it is
[22:15:03] RickHull: FWIW I don't see anyone actually mixing in Dir::Tmpname, which seems plenty sensible to me, so I would want to rip out any code that tries to make it friendly to would-be mix-in-ers
[22:15:59] jdawgaz: has joined #ruby
[22:16:37] RickHull: YAGNI and you probably don't want it anyway ;)
[22:23:43] __Yiota: has joined #ruby
[22:28:54] goyox86_: has joined #ruby
[22:32:05] goyox86__: has joined #ruby
[22:32:22] jenrzzz: has joined #ruby
[22:32:23] jenrzzz: has joined #ruby
[22:41:51] jphase: has joined #ruby
[22:45:34] jphase: has joined #ruby
[22:46:23] jenrzzz: has joined #ruby
[22:47:41] kn-928: has joined #ruby
[22:53:02] jphase: has joined #ruby
[22:54:10] goyox86_: has joined #ruby
[22:56:07] jphase_: has joined #ruby
[22:57:43] Cohedrin_: has joined #ruby
[23:01:22] nobitanobi: has joined #ruby
[23:02:51] jphase: has joined #ruby
[23:04:47] jphase_: has joined #ruby
[23:08:08] jphase: has joined #ruby
[23:13:11] Algebr`: How can I change a extconf.rb file so that it DOES NOT use a library that it ordinarily would use, -lgmp in this case
[23:20:08] orbyt_: has joined #ruby
[23:22:10] jphase: has joined #ruby
[23:26:21] RickHull: Algebr`: $LDFLAGS maybe?
[23:27:09] RickHull: I assume this relates to https://gmplib.org/ and the recent removal of the Bignum distinction
[23:27:27] Algebr`: do tell, please elaborate
[23:27:46] Algebr`: can I just do: $LDFLAGS = '' ?
[23:28:06] RickHull: not sure, this is a shaky area for me
[23:28:07] RickHull: http://blog.bigbinary.com/2016/11/18/ruby-2-4-unifies-fixnum-and-bignum-into-integer.html
[23:28:58] RickHull: for background, Ruby before 2.4 distinguished between Fixnum and Bignum (Bignums are, well, bigger). I assume Ruby was using gmplib for Bignums
[23:29:57] RickHull: but I'm kinda just guessing these are related and/or relevant
[23:31:31] RickHull: this seems like a reasonable example for $LDFLAGS: https://github.com/Mon-Ouie/ray/blob/master/ext/extconf.rb
[23:31:32] goyox86_: has joined #ruby
[23:34:08] Algebr`: is << appending to a list or appending to a stirng
[23:36:53] Algebr`: yes is ambigious, first or second
[23:37:18] imode: has joined #ruby
[23:38:48] jphase: has joined #ruby
[23:39:34] Algebr`: is `` another way to make a stirng
[23:40:06] bougyman: backticks shell out
[23:40:30] bougyman: %x{ls} and `ls` essentially are the same.
[23:40:40] Algebr`: straight part of the language? or just special in extconf.rb?
[23:40:56] elomatreb: Algebr`: If the left hand side is an array, << appends to the array, if it is a String it appends to a string
[23:41:26] bougyman: part of the language
[23:41:30] elomatreb: Part of the language, but a lot of languages have that feature (many even use the same syntax)
[23:42:28] Algebr`: I have only seen this in shell before
[23:42:44] Olipro: has joined #ruby
[23:43:23] elomatreb: PHP has it too, and Perl
[23:45:12] Algebr`: ah, I have never used either.
[23:45:23] meinside: has joined #ruby
[23:45:37] Chew: has joined #ruby
[23:45:43] tfitts: has joined #ruby
[23:47:42] koenrh: has joined #ruby
[23:48:06] daxroc: has joined #ruby
[23:48:27] Brak____________: has joined #ruby
[23:48:58] RickHull: Algebr`: what is the problem in the big picture? who wrote this extconf.rb ?
[23:49:32] RickHull: if you're not familiar with backticks or the append operator in ruby, messing with extconf stuff is pretty advanced
[23:50:16] enterprisey: has joined #ruby
[23:50:35] Algebr`: I learn quickly, not worried about that. Big picture is that I'm trying to compile https://github.com/knu/ruby-unf_ext to work with traveling-ruby using ruby 2.2.2 on windows.
[23:52:06] RickHull: oh fun, C extensions on windows
[23:52:44] Algebr`: I would not characterize as fun...
[23:53:47] RickHull: are you sure that removing `-lgmp` is the right approach? or just trying to get the install to proceed by any means necessary?
[23:54:28] x0F: has joined #ruby
[23:54:32] Algebr`: yea, not sure myself.
[23:55:07] Algebr`: I mean, the extconf test case compiles without -lgmp
[23:56:47] Algebr`: RUBY_PLATFORM of i386-mingw32 means its 32bit right
[23:58:48] mim1k: has joined #ruby