« Back to channel list

#ruby - 05 July 2017

« Back 1 day Forward 1 day »
[00:02:51] PaulCapestany: has joined #ruby
[00:03:37] nertzy: has joined #ruby
[00:05:10] catphish: has joined #ruby
[00:09:44] PaulCapestany: has joined #ruby
[00:15:46] umaaji: has joined #ruby
[00:18:55] PaulCapestany: has joined #ruby
[00:18:57] corro_: has joined #ruby
[00:19:19] raul782: has joined #ruby
[00:22:46] nadir: has joined #ruby
[00:23:37] jyaworski: has joined #ruby
[00:26:44] PaulCapestany: has joined #ruby
[00:28:30] corro: has joined #ruby
[00:34:08] yarou_: has joined #ruby
[00:40:35] ascarter: has joined #ruby
[00:44:52] raul7821: has joined #ruby
[00:45:24] mrconfused: has joined #ruby
[00:50:11] __Yiota: has joined #ruby
[00:50:19] barx: has joined #ruby
[00:52:01] corro: has joined #ruby
[00:52:09] AnoHito: has joined #ruby
[00:54:27] dcunit3d: has joined #ruby
[00:54:58] raul782: has joined #ruby
[00:58:47] Puffball: has joined #ruby
[01:02:16] d^sh_: has joined #ruby
[01:10:06] koldbrutality: has joined #ruby
[01:14:58] AnoHito_: has joined #ruby
[01:15:00] ecuanaso: has joined #ruby
[01:19:08] jyaworski: has joined #ruby
[01:19:46] hkdsun: has joined #ruby
[01:20:21] ignarps: has joined #ruby
[01:24:18] arescorpio: has joined #ruby
[01:29:04] Rodya_: has joined #ruby
[01:29:11] al2o3-cr: >> RUBY_VERSION
[01:29:12] ruby[bot]: al2o3-cr: # => "2.3.0" (https://eval.in/827652)
[01:30:08] al2o3-cr: probably got broken fingers
[01:41:47] ascarter: has joined #ruby
[01:44:20] charliesome: has joined #ruby
[01:46:17] gizmore: has joined #ruby
[01:47:33] pb122: has joined #ruby
[01:48:29] ketan: has joined #ruby
[01:51:11] __Yiota: has joined #ruby
[01:51:26] mooser: has joined #ruby
[01:58:42] uZiel: has joined #ruby
[02:01:36] Jameser: has joined #ruby
[02:10:49] skweek: has joined #ruby
[02:11:28] wilbert: has joined #ruby
[02:15:01] z3uS: has joined #ruby
[02:22:35] uZiel: has joined #ruby
[02:29:15] unreal: has joined #ruby
[02:34:49] Ishido: has joined #ruby
[02:40:52] herbmillerjr: has joined #ruby
[02:42:39] ascarter: has joined #ruby
[02:48:16] dasher00: has joined #ruby
[02:53:27] mooser: has joined #ruby
[02:59:37] jyaworski: has joined #ruby
[02:59:39] Jameser: has joined #ruby
[03:02:40] knight33: has joined #ruby
[03:18:21] S1kx: has joined #ruby
[03:18:34] brent__: has joined #ruby
[03:30:01] pankaj: has joined #ruby
[03:32:27] Jameser: has joined #ruby
[03:36:12] _whitelogger: has joined #ruby
[03:38:01] raul782: has joined #ruby
[03:43:33] blackwind_123: has joined #ruby
[03:43:52] ascarter: has joined #ruby
[03:46:22] mim1k: has joined #ruby
[03:48:40] gix: has joined #ruby
[03:49:20] ketan: has joined #ruby
[03:49:38] gothicsouth: has joined #ruby
[03:49:58] nofxx: has joined #ruby
[03:52:07] nanoz: has joined #ruby
[03:57:50] jyaworski: has joined #ruby
[04:06:54] raul782: has joined #ruby
[04:06:57] cadillac_: has joined #ruby
[04:11:34] tacoboy: has joined #ruby
[04:12:26] rideh: has joined #ruby
[04:15:09] znz_jp: has joined #ruby
[04:19:07] umaaji: has joined #ruby
[04:22:31] moei: has joined #ruby
[04:22:49] bkxd: has joined #ruby
[04:22:51] bkxd_: has joined #ruby
[04:22:59] konsolebox: has joined #ruby
[04:23:55] jyaworski: has joined #ruby
[04:29:07] oleo: has joined #ruby
[04:31:31] umaaji: has joined #ruby
[04:34:35] Puffball: has joined #ruby
[04:39:29] raul782: has joined #ruby
[04:41:18] Rodya_: has joined #ruby
[04:44:21] ShekharReddy: has joined #ruby
[04:53:00] jyaworski: has joined #ruby
[04:53:10] Mortomes|Train: has joined #ruby
[04:54:35] nofxx: has joined #ruby
[05:04:10] jyaworski: has joined #ruby
[05:07:00] uZiel: has joined #ruby
[05:07:37] Mortomes|Train: has joined #ruby
[05:10:14] anisha: has joined #ruby
[05:11:32] ddddddd: has joined #ruby
[05:16:21] MrBusiness: has joined #ruby
[05:19:02] blackwind_123: has joined #ruby
[05:19:46] jyaworski: has joined #ruby
[05:20:56] alamar: has joined #ruby
[05:25:30] patrontechnosoft: has joined #ruby
[05:27:31] patronte_: has joined #ruby
[05:28:07] djbkd: has joined #ruby
[05:30:12] Silthias1: has joined #ruby
[05:31:56] ur5us: has joined #ruby
[05:33:30] yoongkang: has joined #ruby
[05:34:57] biberu: has joined #ruby
[05:35:30] aupadhye: has joined #ruby
[05:40:57] jyaworski: has joined #ruby
[05:46:48] mim1k: has joined #ruby
[05:48:34] cyphase: has joined #ruby
[05:48:45] nowhere_man: has joined #ruby
[05:49:41] cyphase: has joined #ruby
[05:50:18] ketan: has joined #ruby
[05:50:44] charliesome: has joined #ruby
[05:50:44] cyphase: has joined #ruby
[05:51:40] solocshaw: has joined #ruby
[05:52:25] cyphase: has joined #ruby
[05:54:04] cyphase: has joined #ruby
[05:54:57] nanoz: has joined #ruby
[05:54:57] nanoz: has joined #ruby
[05:56:25] nofxxx: has joined #ruby
[05:56:33] cyphase: has joined #ruby
[05:59:33] ddddddd: has joined #ruby
[06:03:58] xall: has joined #ruby
[06:05:36] jenrzzz: has joined #ruby
[06:05:36] jenrzzz: has joined #ruby
[06:05:39] alex``: has joined #ruby
[06:08:08] Pumukel: has joined #ruby
[06:11:21] bkxd: has joined #ruby
[06:11:23] bkxd_: has joined #ruby
[06:15:44] JoshS: has joined #ruby
[06:16:43] bkxd: has joined #ruby
[06:17:37] Silthias: has joined #ruby
[06:21:18] yoongkang: has joined #ruby
[06:30:23] Mia: has joined #ruby
[06:33:29] InfinityFye: has joined #ruby
[06:39:14] Mortomes|Work: has joined #ruby
[06:40:34] andrzejku: has joined #ruby
[06:49:44] tAn: has joined #ruby
[06:49:55] dionysus69: has joined #ruby
[06:54:32] jud: has joined #ruby
[06:54:32] jud: has joined #ruby
[06:55:22] andikr: has joined #ruby
[06:57:12] TomyLobo: has joined #ruby
[07:09:07] CrazyEddy: has joined #ruby
[07:09:33] uZiel: has joined #ruby
[07:19:01] brent__: has joined #ruby
[07:32:51] mark_66: has joined #ruby
[07:39:02] jyaworski: has joined #ruby
[07:40:49] alex``: has joined #ruby
[07:44:07] charliesome: has joined #ruby
[07:46:52] nOwz: has joined #ruby
[07:47:22] mim1k: has joined #ruby
[07:49:29] hplar: has joined #ruby
[07:51:09] ketan: has joined #ruby
[07:52:35] ych: has joined #ruby
[07:53:08] antgel: has joined #ruby
[07:53:43] mikecmpbll: has joined #ruby
[07:54:37] tvw: has joined #ruby
[08:00:31] patrontechnosoft: has joined #ruby
[08:01:21] TheBloke: has joined #ruby
[08:05:57] solocshaw1: has joined #ruby
[08:15:03] Puffball: has joined #ruby
[08:16:39] elsevero: has joined #ruby
[08:25:08] jyaworski: has joined #ruby
[08:28:51] Toledo: has joined #ruby
[08:30:00] sarbs: has joined #ruby
[08:32:04] S1kx: has joined #ruby
[08:32:26] Sylario: has joined #ruby
[08:35:08] mim1k: has joined #ruby
[08:38:39] latemus: has joined #ruby
[08:41:25] lxsameer: has joined #ruby
[08:43:15] xall: has joined #ruby
[08:46:31] latemus: has joined #ruby
[08:47:54] quobo: has joined #ruby
[08:49:11] mim1k: has joined #ruby
[08:51:08] Beams: has joined #ruby
[08:54:07] jyaworski: has joined #ruby
[08:59:40] ketan: has joined #ruby
[09:01:08] vuoto: has joined #ruby
[09:04:39] latemus: has joined #ruby
[09:07:57] ur5us: has joined #ruby
[09:11:13] workmad3: has joined #ruby
[09:12:37] mim1k: has joined #ruby
[09:15:29] ledestin: has joined #ruby
[09:18:25] anisha: has joined #ruby
[09:18:57] jrm: has joined #ruby
[09:21:07] jyaworski: has joined #ruby
[09:29:53] patrontechnosoft: has joined #ruby
[09:32:37] fusta: has joined #ruby
[09:39:58] patrontechnosoft: has joined #ruby
[09:40:27] patrontechnosoft: has joined #ruby
[09:41:45] nanoz: has joined #ruby
[09:42:29] mim1k: has joined #ruby
[09:42:32] patronte_: has joined #ruby
[09:43:22] marr: has joined #ruby
[09:44:02] patrontechnosoft: has joined #ruby
[09:45:13] patrontechnosoft: has joined #ruby
[09:46:27] patrontechnosoft: has joined #ruby
[09:47:10] _moep_: hey, when I do bundle exec gem install unicorn I get an error. is it the common way to install unicorn?
[09:49:15] mikecmpb_: has joined #ruby
[09:51:03] jrm: has joined #ruby
[09:52:27] patrontechnosoft: has joined #ruby
[09:53:59] elomatreb: _moep_: Depending on what the error is, you're probably just missing some development headers so it can't build the native extension
[09:54:07] patrontechnosoft: has joined #ruby
[09:55:27] patrontechnosoft: has joined #ruby
[09:57:20] _moep_: elomatreb: wait…
[09:57:40] charliesome: has joined #ruby
[09:57:55] _moep_: the strange thing when I do bundle installed it installs unicorn
[09:58:09] elomatreb: Also, just saw that, you don't call gem with bundle exec. If you want bundler to install unicorn you add it to the Gemfile
[09:58:48] _moep_: its added in the gemfile
[09:59:09] vuoto: has joined #ruby
[09:59:19] patrontechnosoft: has joined #ruby
[09:59:29] _moep_: so I dont need to install it via gem`
[09:59:59] elomatreb: Yes, bundler does that for you (including selecting the right version according to the Gemfile.lock and your constraints)
[10:00:20] pandaant: has joined #ruby
[10:00:24] ferr: has joined #ruby
[10:01:12] _moep_: and when I do bundle exec rake generate_secret_token
[10:01:30] romankapitonov: has joined #ruby
[10:01:52] _moep_: I see in the logs something like DEPRECATION WARNING: You didn't set `secret_key_base`
[10:02:05] _moep_: Read the upgrade documentation to learn more about this new config option. (called from load at /home/app/.rbenv/versions/2.3.4/bin/unicorn:22)
[10:02:24] cyphase: has joined #ruby
[10:02:53] catphish: has joined #ruby
[10:06:10] cyphase: has joined #ruby
[10:06:21] patrontechnosoft: has joined #ruby
[10:08:10] cyphase: has joined #ruby
[10:11:42] sarbs: has joined #ruby
[10:11:49] patrontechnosoft: has joined #ruby
[10:12:27] cyphase: has joined #ruby
[10:14:29] cyphase: has joined #ruby
[10:14:33] TheBloke: has joined #ruby
[10:14:40] patronte_: has joined #ruby
[10:16:58] cyphase: has joined #ruby
[10:18:36] stamina: has joined #ruby
[10:18:48] brent__: has joined #ruby
[10:21:58] patrontechnosoft: has joined #ruby
[10:25:55] conall: has joined #ruby
[10:27:34] conall: Hi. Lets say I have multiple version of a gem, one on each entry of my GEM_PATH. When I do a "gem <mygem>", will it take the first gem it sees on the path, or will it take the latest version of the gem? What if I want to prioritise gems on one path over the others, can I just puth that path first on GEM_PATH? Thanks
[10:28:29] dminuoso: conall: Depending on what you do you either let your gemspec or your Gemfile (bundler) deal with versions.
[10:28:41] dminuoso: Do not try to manually fiddle around with versions, it will backfire.
[10:30:24] conall: I guess I should explain my use-case. I basically want to say "if there is a certain directory on the system, use the gems from this directory, as they represent what will be on a production environment". Is this possible?
[10:30:43] mim1k: has joined #ruby
[10:31:23] patrontechnosoft: has joined #ruby
[10:33:15] jyaworski: has joined #ruby
[10:33:50] Sylario: conall > you are kind of trying to work against the purpose of bundler
[10:34:26] conall: sylario. Yeah, perhaps it is not the best solution. Do you know how else I could do this?
[10:34:53] Sylario: conall: why eactly do you want to use the gem of production?
[10:35:41] conall: During my tests, I want to most accurately reflect the real-world conditions
[10:35:51] Sylario: bundler will take care of installing (thanks to gemfile.lock) exactly the gem used in dev .
[10:37:10] Sylario: In dev you can, in the gemfile, specify version of gems, and the exact versions of your gems are stored (even without indicating a version) in the .lock
[10:37:18] matthewd: Yeah, this isn't working against bundler, it's reinventing bundler
[10:37:53] conall: sylario: Grand, so I should just stick with the Gemfile.lock
[10:37:58] heoau: has joined #ruby
[10:38:09] Sylario: when you deploy, you are supposed to use bundler, so that your (eventually) new list of gems are deployed by bundler, so that your prod use the exact same gems
[10:38:19] Sylario: never edit gemfile.lock
[10:38:40] Sylario: use gemfile, bundler will update lock when updating/upgrading
[10:39:02] Sylario: don't upgrade if you do not have test covering all of your codebase
[10:39:10] patrontechnosoft: has joined #ruby
[10:39:13] heoau: I installed Ruby Oauth from Gems. I use it currently from command promt, I would like to automate it, can I do this with Ruby somehow and which packages do I need to do this?
[10:39:49] conall: sylario: I am kind of working backwards here. So the environment (LogStash) I am working on already has a gemfile.lock, so I kind of want to make sure I use the same version of all of these gems
[10:39:50] patrontechnosoft: has joined #ruby
[10:40:13] Sylario: conall: when your app is in prod, just do bundle install
[10:40:25] Sylario: the prod will have the same gems
[10:40:40] conall: sylario: Lets say I want to say "if a certain directory on the machine exists, use the Gemfile.lock from this directory. Can I do this?"
[10:41:12] conall: sylario: Theproblem is, the prod env is already locked down and I cannot so a bundle install
[10:41:26] universa1: conall: then your dev env should be the same.
[10:41:44] patrontechnosoft: has joined #ruby
[10:41:53] Sylario: yes, manually specify gem versions in the gemfile (not .lock)
[10:42:45] Sylario: but I would say your production is not really adapted to bundler
[10:43:00] mikecmpbll: has joined #ruby
[10:44:03] conall: sylario: My prod is pretty much set in stone, I cant change the versions etc. The problem is that there are currently two valid prod environments with two different sets of gems
[10:44:26] Sylario: well, you can present RVB and RBenv to your devops
[10:44:55] Sylario: or dockers
[10:45:23] matthewd: conall: Again, this is what the lockfile is for
[10:45:59] solocshaw: has joined #ruby
[10:46:09] Sylario: conall :that's the kind of discussion you are supposed to have when you choose a language and it's tools.
[10:46:40] conall: sylario, mattewd: I agree with this solution. I will install two rvm environments and just manually install the specific versions of gems on each rvm env
[10:47:33] matthewd: That's absolutely not what I'm suggesting
[10:47:54] patrontechnosoft: has joined #ruby
[10:48:31] conall: matthewd: I believe it is what sylario was suggesting. Could yo clarify what you are suggesting? Sorry for the confusion
[10:48:46] Sylario: I'm suggesting you should have a meeting with whoever is in charge of prod
[10:49:25] matthewd: conall: The Gemfile.lock states the versions of gems to be used. If you have two environments you need to emulate, then you use two Gemfile.lock files.
[10:49:41] montanonic: has joined #ruby
[10:49:44] patrontechnosoft: has joined #ruby
[10:49:45] Sylario: and also with the people already deploying ruby on the prod
[10:49:55] ascarter: has joined #ruby
[10:50:25] conall: Ok, so two different Gemfile.lock files, one for each prod environment?
[10:50:54] matthewd: conall: Right
[10:52:09] conall: matthewd: Ok, that should be doable. What is a valid situation whereby two different rvm environments would be a good solution? When two different version if ruby are in play? Just wondering...
[10:53:21] patronte_: has joined #ruby
[10:53:37] matthewd: Personally I have never encountered a situation where I wanted a second RVM environment (or even one, tbh, but that's mostly just personal tooling preference)
[10:53:51] patrontechnosoft: has joined #ruby
[10:54:04] doublemalt_: has joined #ruby
[10:54:13] ur5us: has joined #ruby
[10:55:06] matthewd: (in post-Bundler times, that is -- it was a reasonable solution to the problem before that)
[10:55:43] conall: matthewd: sylario: Thanks for yer help with this
[10:56:01] patrontechnosoft: has joined #ruby
[11:00:34] patrontechnosoft: has joined #ruby
[11:02:01] mitt3ns: has joined #ruby
[11:06:35] mim1k: has joined #ruby
[11:08:34] mooser: has joined #ruby
[11:10:29] Tempesta: has joined #ruby
[11:13:54] ketan: has joined #ruby
[11:17:14] nanoz]: has joined #ruby
[11:18:02] mooser: has joined #ruby
[11:26:17] ketan: has joined #ruby
[11:26:48] sepp2k: has joined #ruby
[11:31:52] hightower2: has joined #ruby
[11:35:20] arup_r: has joined #ruby
[11:36:31] arup_r: Do we have the opposite String#empty? in Ruby? I was looking through the doc not seeing anything.. Like Rails has .present?
[11:38:07] manveru: you could use ''.chars.any?
[11:38:12] matthewd: arup_r: I don't think so. `str[0]` would work ¯\_(ツ)_/¯
[11:38:13] herwin: !string.empty?
[11:38:27] arup_r: ^ this is what I am using
[11:38:41] arup_r: ok cool. :) I thought I am missing something.
[11:39:17] herwin: https://bugs.ruby-lang.org/issues/13303
[11:41:28] ldnunes: has joined #ruby
[11:41:40] arup_r: ok that soon will come :D
[11:44:23] matthewd: I don't mind &. as a construct, but I do dislike it implying that all boolean methods need to gradually gain an inverse :/
[11:45:05] ij: has joined #ruby
[11:45:07] ij: has left #ruby: ("WeeChat 1.7.1")
[11:45:36] ketan: has joined #ruby
[11:46:27] ketan_: has joined #ruby
[11:54:24] dasher00: has joined #ruby
[11:55:39] dminuoso: &. feels like a kludge given to us because we dont have real monads :|
[11:57:16] herbmillerjr: has joined #ruby
[12:00:37] im0nde: has joined #ruby
[12:08:59] cadillac_: has joined #ruby
[12:11:34] ketan: has joined #ruby
[12:12:46] crova: has joined #ruby
[12:13:48] ketan: has joined #ruby
[12:14:35] Emmanuel_Chanel: has joined #ruby
[12:15:34] marr: has joined #ruby
[12:16:53] gnufied: has joined #ruby
[12:19:34] kev1n: has joined #ruby
[12:23:27] InfinityFye: has joined #ruby
[12:26:44] ldnunes: has joined #ruby
[12:27:10] xall: has joined #ruby
[12:28:37] truenito: has joined #ruby
[12:30:14] splitshot: has joined #ruby
[12:32:03] tacoboy: has joined #ruby
[12:32:41] soLucien: has joined #ruby
[12:35:35] kryptoz: has joined #ruby
[12:40:04] Mon_Ouie: has joined #ruby
[12:43:43] cschneid: has joined #ruby
[12:45:36] __Yiota: has joined #ruby
[12:48:54] bkxd: has joined #ruby
[12:48:56] bkxd_: has joined #ruby
[12:53:41] jyaworski: has joined #ruby
[12:54:10] bkxd: has joined #ruby
[13:03:39] soLucien: has joined #ruby
[13:05:04] brian_penguin: has joined #ruby
[13:05:58] shinnya: has joined #ruby
[13:06:29] mooser: has joined #ruby
[13:08:56] mim1k: has joined #ruby
[13:10:49] ketan: has joined #ruby
[13:13:00] gimmic: has left #ruby: ()
[13:13:49] brian_penguin: has joined #ruby
[13:14:49] knight33: has joined #ruby
[13:15:05] anisha: has joined #ruby
[13:18:12] BSAlb: has joined #ruby
[13:20:06] TomyLobo2: has joined #ruby
[13:21:26] jyaworski: has joined #ruby
[13:22:04] ltem: has joined #ruby
[13:22:22] lissitzki: has joined #ruby
[13:25:33] haylon: has joined #ruby
[13:25:51] rgiscard: has joined #ruby
[13:26:36] DLSteve_: has joined #ruby
[13:33:09] brian_penguin: has joined #ruby
[13:35:32] chouhoul_: has joined #ruby
[13:37:35] antgel: has joined #ruby
[13:39:15] abhi56rai: has joined #ruby
[13:39:52] abhi56rai: has joined #ruby
[13:41:26] jnollette: has joined #ruby
[13:51:07] griffindy: has joined #ruby
[13:51:25] psychicist__: has joined #ruby
[13:52:21] uZiel: has joined #ruby
[13:53:34] baweaver: @dminuoso: miss me?
[13:54:52] chouhoulis: has joined #ruby
[13:55:37] dminuoso: baweaver: There's no baweaver_missing in my codebase _yet_
[13:55:46] dminuoso: But I can change that with a single commit.
[13:56:16] baweaver: RE: Lonely op: Well, we got something at least.
[13:56:33] dminuoso: baweaver: You know whats fun?
[13:56:39] baweaver: As far as true monadic, that'd take some serious backend overhauls to make work. Moreso to make it work _well_
[13:57:44] dminuoso: baweaver: Nah.
[13:57:56] dminuoso: baweaver: All we need is Haskell bindings for truffle.
[13:58:02] charliesome: has joined #ruby
[13:58:19] dminuoso: Then we can interop with Haskell.
[13:58:24] dminuoso: Free monads.
[13:58:33] jnollette: has joined #ruby
[14:01:52] Dimik: has joined #ruby
[14:01:53] ResidentBiscuit: has joined #ruby
[14:02:05] baweaver: dminuoso: we could make a tshirt out of that
[14:02:19] baweaver: Ship one to Radar. He'd wear it
[14:04:18] webopsx: has joined #ruby
[14:06:36] kobain: has joined #ruby
[14:06:46] dminuoso: baweaver: So let's play Rock Paper Scissors Lizard Spock to determine which one of us convinces chrisseaton to add truffle bindings?
[14:07:01] theunraveler: has joined #ruby
[14:07:17] DLSteve_: has joined #ruby
[14:08:32] baweaver: dminuoso: ready?
[14:09:02] baweaver: apeiros: you on?
[14:10:16] patarr: has joined #ruby
[14:14:47] cam27: has joined #ruby
[14:15:54] chouhoul_: has joined #ruby
[14:17:21] doublemalt_: has joined #ruby
[14:20:07] oleo: has joined #ruby
[14:20:23] cyphase: has joined #ruby
[14:24:02] BlkDynmt: has joined #ruby
[14:25:29] cyphase: has joined #ruby
[14:26:00] mim1k: has joined #ruby
[14:26:01] mark_66: has left #ruby: ("PART #elixir-lang :PART #crystal-lang :PONG :hobana.freenode.net")
[14:26:41] cyphase: has joined #ruby
[14:28:23] cyphase: has joined #ruby
[14:29:27] cyphase: has joined #ruby
[14:29:35] Bish: is there something like a pooled fork?
[14:30:25] cyphase: has joined #ruby
[14:30:50] xall: has joined #ruby
[14:31:15] Bish: since threading of ruby sucks ( dont tell me it doesnt ), i want to have a solution that doesnt suck
[14:31:39] Bish: im writing a background worker for a projects which reacts to events on database
[14:31:56] elomatreb: So a job queue?
[14:31:56] patarr: has joined #ruby
[14:32:04] Bish: and some of the event handlers use heavy CPU
[14:32:34] Bish: how does a queue help me when using forks?
[14:33:20] adam12: Bish: Maybe the parallel gem will work for you?
[14:33:29] Bish: ACTION googles
[14:33:31] adam12: I'd suggest the concurrent-ruby gem, but it's threads only.
[14:33:45] Bish: i hate ruby threads, they really suck
[14:34:00] adam12: Yeah? If you're doing IO stuff, they're mostly fine.
[14:34:14] Bish: thats why i said some of the handlers use heavy cpu
[14:34:30] Bish: which would result in the worker being really slow when having one of those jobs
[14:34:40] elomatreb: Ruby threads are regular OS threads, they're just not running like you want them to
[14:34:48] Bish: elomatreb: bs
[14:34:54] adam12: I'm not sure how your monitoring database events, but maybe you could use an off the shelf async queue like Backburner or Sidekiq.
[14:35:16] adam12: Likely Backburner over Sidekiq, as it has a forking model and Sidekiq I don't believe does.
[14:35:31] Bish: never heard of backburner, thanks for the input
[14:35:50] Bish: hope it wont burn my back
[14:36:25] mooser: has joined #ruby
[14:37:05] Bish: tf is beanstalk
[14:37:06] __Yiota: has joined #ruby
[14:37:30] adam12: Job queue before redis was cool.
[14:38:01] matthewd: I think resque is still the most popular forking job library.. maybe?
[14:38:18] Bish: i try to avoid additional daemons as much as possible
[14:38:47] Bish: decided to move around redis at one point of the project
[14:39:08] darix: matthewd: sidekiq!
[14:39:09] adam12: Bish: Well in that case, you could just write your own. Use the Queue class from stdlib, have a bunch of workers pre-fork, have one process listen to database events and stick them in the queue. Have your forked processes pop the queue.
[14:39:22] Bish: thought about that one already
[14:39:25] Bish: maybe thats clever
[14:39:31] Bish: queues work between forks?
[14:39:41] darix: Bish: could it be you reimplement things like sensu?:p
[14:39:53] adam12: Bish: You're solving a bunch of other problems like workers dying and needing restart
[14:40:00] belmoussaoui: has joined #ruby
[14:40:11] Bish: ACTION does not know what sensu is
[14:40:22] ineb: sensupp, monitoring framework
[14:40:24] adam12: Bish: I'm not sure if that will work actually. I can't remember, but you could use IO.pipe.
[14:40:26] Bish: but yes, i wrote some monitoring tool back in the days, lol
[14:40:26] ineb: *sensuapp
[14:40:39] polishdub: has joined #ruby
[14:40:46] Bish: it was a ruby ~100 liner, putting stuff in a table
[14:40:48] jyaworski: has joined #ruby
[14:40:49] Bish: worked well
[14:41:17] mikecmpbll: i wish i'd gone with a forking background job worker :( #memoryissues
[14:41:28] Cork: anyone know a way around "uninitialized constant OpenSSL::Digest::DSS1" when using Net::SSH?
[14:41:35] mikecmpbll: our worker gets about 3 restarts a day atm. restarts when it hits 6GB memory :D
[14:41:47] adam12: I like Backburner. Sidekiq is good too, but I had issues with it missing jobs occasionally. Never could figure out if it was a Redis or Sidekiq issue.
[14:41:48] Cork: i'm connecting to a server that isn't mine so i can't fix what ciphers it uses
[14:43:19] adam12: Cork: Could you force a cipher you think youd' have in common with the server?
[14:43:24] Bish: ACTION writes his own prefork job worker
[14:43:32] mikecmpbll: Bish : for sidekiq?
[14:43:42] Bish: no, vanilla ruby :>
[14:43:56] Bish: i want to avoid things like
[14:43:59] Cork: adam12: i thought the client sends a list of supported ciphers and the server responds with the one it picks
[14:44:01] Bish: "i dunno where my job went, lol"
[14:44:20] Bish: but i will take another look at sidekiq
[14:44:25] Bish: does it has redis as dependency?
[14:44:57] mikecmpbll: yeah. maintainer isn't interested in alternative stores
[14:44:58] adam12: Cork: I'm not sure - but in the past, I've forced the blowfish cipher for backups, so I thought it might be possible?
[14:45:00] mikecmpbll: which keeps it simple i guess.
[14:45:06] Bish: why does it need a store?
[14:45:15] mikecmpbll: for the scheduled jobs
[14:45:18] Cork: hmm, will try, thx for the idea
[14:45:20] Bish: is it like, the webapp puts things into that redis thing
[14:45:21] patarr: has joined #ruby
[14:45:25] Bish: and your worker catches it from there?
[14:46:03] Bish: ACTION uses the queue capabilities of postgresql and listen,notify for notifying workers to wake up
[14:46:07] mikecmpbll: the worker doesn't handle job serialisation/deserialisation
[14:46:11] chouhoulis: has joined #ruby
[14:46:11] mikecmpbll: you wouldn't gain a lot from a bg processing library if it left all that to you
[14:46:32] charliesome: has joined #ruby
[14:46:33] Bish: okay, so it will be vanilla ruby
[14:46:59] adam12: Bish: There's a library called qu ? que? that did that.
[14:47:29] ketan_: has joined #ruby
[14:47:37] Bish: adam12: which did what?
[14:47:50] adam12: Bish: Used pg listen/notify
[14:47:57] Bish: oh, cool
[14:48:08] adam12: Or maybe it was Queue Classic...
[14:48:15] Bish: https://github.com/bkeepers/qu
[14:48:17] adam12: https://github.com/QueueClassic/queue_classic
[14:48:18] Bish: looks good
[14:48:19] cschneid_: has joined #ruby
[14:48:29] adam12: There's so many.
[14:49:02] kculpis: has joined #ruby
[14:49:18] oscurochu: has joined #ruby
[14:49:34] Bish: wait let me get this straight
[14:49:57] Bish: people use queues like.. a delayed background eval?
[14:50:04] Bish: so they say what code is executed when?
[14:50:44] adam12: Bish: you offload slow tasks during the request/response cycle for web work.
[14:50:59] mrconfused: has joined #ruby
[14:50:59] Bish: what i do is.. put things in the into the database
[14:51:03] Bish: and notify a worker.. what i did
[14:51:06] Bish: with a message
[14:51:18] Bish: i dont say do stuff later "some strings that is code, which describes what to do"
[14:51:48] dminuoso: Bish: use jruby.
[14:51:57] Bish: dminuoso: tried it, hated it
[14:52:01] dminuoso: I hate you.
[14:52:05] Bish: thats fine with me
[14:52:41] Bish: but people really do that, thats good practice?
[14:53:02] Bish: ruby -r queue_classic -e "QC.enqueue('Kernel.puts', 'hello world')"
[14:53:08] Bish: something like that?
[14:53:34] mooser: has joined #ruby
[14:53:59] mooser: has joined #ruby
[14:54:07] wilbert: has joined #ruby
[14:55:11] Bish: i mean is this how huge projects do it?
[14:56:00] adam12: Bish: It's just a form of RPC. method, args.
[14:56:29] Bish: yeah kinda, but im just amazed, i would've never expected a such hacky-feeling solution
[14:56:31] amclain: has joined #ruby
[14:56:34] adam12: Bish: It's no more "code" than having a symbol / value for the method, and a lookup table in the client.
[14:57:03] Bish: i mean it's so vague, mispell the method name and everythings broken, while seemingly working
[14:57:18] adam12: Bish: Yeah - a concern, for sure.
[14:58:02] fugue: has joined #ruby
[15:00:02] Cork: adam12: gah, nope they still insist on DSS1
[15:00:12] Cork: adam12: you know if there is anyway to get DSS1 working?
[15:00:22] Cork: my googling gives me zero :/
[15:00:30] adam12: Cork: I've never even heard of DSS1, but I suspect it's related to your openssl version?
[15:00:45] Cork: RSA with DSS1
[15:01:05] Cork: opps sorry DSA
[15:01:19] oaao: has joined #ruby
[15:01:34] nanoz: has joined #ruby
[15:03:43] fghjb3567: has joined #ruby
[15:04:09] Silthias: has joined #ruby
[15:06:12] fghjb3567: has joined #ruby
[15:07:54] antgel: has joined #ruby
[15:08:01] dasher00: has joined #ruby
[15:13:22] [Butch]: has joined #ruby
[15:17:14] hutch34: has joined #ruby
[15:18:02] Bish: and i thought my solution is hacky tobaccy
[15:18:41] Bish: dminuoso: thanks for the suggestion though, i misunderstood you, i guess u suggested jruby because of threading
[15:19:13] roshanavand: has joined #ruby
[15:21:21] ledestin: has joined #ruby
[15:26:34] enterprisey: has joined #ruby
[15:33:34] nobitanobi: has joined #ruby
[15:34:01] perniciouscaffei: has joined #ruby
[15:34:10] oncall-pokemon: has joined #ruby
[15:37:34] TomyLobo2: has joined #ruby
[15:38:09] brent__: has joined #ruby
[15:40:23] xall: has joined #ruby
[15:42:03] lifelearner: has joined #ruby
[15:42:24] None-ffck: has joined #ruby
[15:43:40] dcunit3d: has joined #ruby
[15:44:19] minimalism: has joined #ruby
[15:47:01] cagomez: has joined #ruby
[15:49:17] cagomez: how do I run my ruby server and sidekiq with one bash command? 'bundle exec sidekiq && bin/rails s' isn't working
[15:49:51] havenwood: cagomez: You could background one or both processes.
[15:49:56] havenwood: cagomez: Or use two tabs.
[15:50:29] adam12: or change && to &
[15:50:32] havenwood: bundle exec sidekiq&; rails s&
[15:50:38] havenwood: adam12: That's the backgrounding.
[15:51:44] havenwood: cagomez: Try just `rails s&` and then look at additional commands or try using the app and see the log. Type `fg` to foreground it again.
[15:52:26] havenwood: cagomez: https://linoxide.com/linux-command/fg-bg/
[15:52:28] cagomez: i got it, just changed it to a single ampersand
[15:52:44] cagomez: double ampersand means "wait for sidekiq to return 0
[15:54:39] mikecmpbll: pass --daemonize to sidekiq ;)
[15:55:18] mtkd: has joined #ruby
[15:55:52] havenwood: cagomez: ^ even better
[15:56:15] havenwood: http://www.mikeperham.com/2014/09/22/dont-daemonize-your-daemons/
[15:57:00] cagomez: this is just locally, I even kill processes left and right
[15:57:02] cinayakoshka: has joined #ruby
[15:57:08] havenwood: ̶D̶o̶n̶'̶t̶ Rarely daemonize your daemons.
[15:57:54] havenwood: cagomez: Backgrounding is a good trick in general. Or just use multiple tabs. That's sometimes easier to keep track of.
[15:58:47] cagomez: definitely, I just like to setup bash aliases that execute the whole environment, kill all processes, or reboot all processes
[15:59:32] adam12: Maybe you want foreman or forego?
[16:00:08] montanonic: has joined #ruby
[16:01:46] Joufflu: has joined #ruby
[16:03:32] None-ffck: has joined #ruby
[16:04:32] cadillac__: has joined #ruby
[16:04:40] perniciouscaffei: has joined #ruby
[16:05:53] mrconfused: has joined #ruby
[16:07:00] cagomez: has joined #ruby
[16:07:40] cagomez: has joined #ruby
[16:11:15] mim1k: has joined #ruby
[16:11:49] jakew: has joined #ruby
[16:13:46] None-ffck: has joined #ruby
[16:17:40] fghjb3567: has joined #ruby
[16:21:27] fghjb3567: has joined #ruby
[16:22:10] fghjb3567: has joined #ruby
[16:23:29] fghjb3567: has joined #ruby
[16:24:06] dionysus69: has joined #ruby
[16:24:51] gusrub: has joined #ruby
[16:26:47] Pumukel: has joined #ruby
[16:27:34] fghjb3567: has joined #ruby
[16:31:23] preyalone: has joined #ruby
[16:31:33] trac3r_: has joined #ruby
[16:33:43] uZiel: has joined #ruby
[16:34:10] InfinityFye: has joined #ruby
[16:35:46] xall: has joined #ruby
[16:36:13] anisha: has joined #ruby
[16:37:54] jordanm: has joined #ruby
[16:39:54] fghjb3567: has joined #ruby
[16:40:56] gusrub_: has joined #ruby
[16:41:59] dviola: has joined #ruby
[16:43:04] fghjb3567: has joined #ruby
[16:43:34] bkxd: has joined #ruby
[16:43:36] bkxd_: has joined #ruby
[16:47:37] jnollette: has joined #ruby
[16:48:53] bkxd: has joined #ruby
[16:48:55] bkxd_: has joined #ruby
[16:53:51] armyriad: has joined #ruby
[16:54:54] __Yiota: has joined #ruby
[16:55:20] oaao: has joined #ruby
[16:55:46] webopsx: has joined #ruby
[16:55:47] chouhoulis: has joined #ruby
[16:56:20] oaao1: has joined #ruby
[16:57:28] nicesignal: has joined #ruby
[17:00:48] Cohedrin_: has joined #ruby
[17:05:42] Bock: has joined #ruby
[17:09:29] aphprentice: has joined #ruby
[17:11:22] davidmichaelkarr: has joined #ruby
[17:21:18] dcunit3d: has joined #ruby
[17:21:21] marxarelli: has joined #ruby
[17:24:38] alex``: has joined #ruby
[17:24:50] agent_white: has joined #ruby
[17:25:10] Cohedrin_: has joined #ruby
[17:27:31] ketan: has joined #ruby
[17:30:31] duderonomy: has joined #ruby
[17:31:26] knight33: has joined #ruby
[17:33:24] oscurochu: has joined #ruby
[17:37:18] skweek: has joined #ruby
[17:49:40] rapha: Is Dir[] an exact synonym of Dir.glob() ?
[17:49:48] lxsameer: has joined #ruby
[17:51:24] Papierkorb: rapha: Not exactly, Dir.glob() takes an optional flags as second argument. Though I didn't even know until now myself, I always used `Dir[]` :)
[17:52:49] rapha: Papierkorb: I like Dir[] better, but can't get it to take a block for looping through the results. Is that what you mean by does not take optional flags?
[17:53:24] adam12: you likely need to call #each on it
[17:53:29] rapha: adam12: tried...
[17:53:35] Papierkorb: rapha: I did not, see https://ruby-doc.org/core-2.3.0/Dir.html#method-c-glob - But if you want it to immediately yield, you need to use `Dir.glob`
[17:53:46] clemens3: has joined #ruby
[17:53:50] Papierkorb: rapha: `Dir["*"].each{|x| ...}` should work, and is what I write tbh
[17:53:53] rapha: adam12: Papierkorb: indeed, it was the .each - i just had a type in there, too.
[17:54:03] rapha: Thank you both! :)
[17:55:14] adam12: I'm preferential to Dir[] as well. Can't remember the last time i thought about Dir.glob
[17:55:59] __Yiota: has joined #ruby
[17:57:23] rapha: "to be preferential to sth" ... didn't know that construct, but loving it, too :)
[17:57:57] dminuoso: I just refuse to interact with files.
[17:58:10] dminuoso: Just hold things in memory and dont stop your processes.
[17:58:14] dminuoso: IPC will take care of the rest!
[18:00:11] enterprisey_: has joined #ruby
[18:00:11] rapha: dminuoso: but how do you get data stored in files for legacy reasons into a database, etc. if you refuse to work with files?
[18:00:15] PatrikasZvaigzde: has joined #ruby
[18:01:17] dminuoso: rapha: XML coded strings held in shared memory sections.
[18:01:32] dminuoso: Always works.
[18:02:14] troys: has joined #ruby
[18:02:41] dminuoso: rapha: I mean, we use XML as our company database itself.
[18:03:07] rapha: dminuoso: but you start out with XML which happens to be contained in files. How do you get it out of those files without touching them?
[18:03:13] kobain: has joined #ruby
[18:03:18] danguita: has joined #ruby
[18:04:36] muelleme_: has joined #ruby
[18:04:41] dminuoso: rapha: We just copy and paste them into the source code at the end beyond __END__
[18:04:55] Murda: has joined #ruby
[18:05:05] dminuoso: Unifies a Ruby program and a database.
[18:05:23] elomatreb: Files imply state, which would impair the poetic perfection of my stateless functional program
[18:06:00] SeepingN: has joined #ruby
[18:07:07] Murda: has joined #ruby
[18:08:44] dionysus70: has joined #ruby
[18:09:47] br0d1n: has joined #ruby
[18:13:03] Cohedrin_: has joined #ruby
[18:15:19] rapha: dminuoso: oh. Interesting way of doing things. It wouldn't work for me atm, but I'll remember that for the future :)
[18:16:06] elomatreb: (Just to be on the safe side: We weren't exactly serious)
[18:16:13] rapha: say, guys
[18:16:21] wilbert: has joined #ruby
[18:16:30] rapha: i wrote this block here and it does what it's supposed to, but it's not pretty
[18:16:45] rapha: can you think of a way to write these lines (2-5) as one line somehow? https://gist.github.com/sixtyfive/fa009ba99f27b362a5b301446cbbf4fd#file-blah-rb-L2-L5
[18:17:06] danguita: has joined #ruby
[18:17:19] dminuoso: elomatreb: Are you telling me you dont pursue the poetic perfection of pure functional programming?
[18:17:41] rapha: ACTION wonders why dminuoso and elomatreb have not long abandoned #ruby for #haskell
[18:18:14] Joufflu: has joined #ruby
[18:18:38] dminuoso: rapha: What is that code supposed to do?
[18:18:51] dminuoso: I mean.. I see '*'+'*' in that code
[18:18:53] elomatreb: rapha: I'm not sure, but my guess is you're forgetting to insert separators between your path components?
[18:18:55] dminuoso: So I expect a big brainfart.
[18:20:13] rapha: dminuoso: It takes a path and extracts some parts of it into the variables in line 6.
[18:20:31] cagomez: has joined #ruby
[18:20:38] cseder: has joined #ruby
[18:20:47] rapha: ROFLMAOLOL
[18:21:05] rapha: Why is my brain always such a tomatoe?
[18:21:17] latemus: has joined #ruby
[18:21:18] tolerablyjake: has joined #ruby
[18:21:46] rapha: dminuoso: '*'+'*' is a case of 'self-documenting code, rapha-style', though
[18:21:52] truenito: has joined #ruby
[18:21:58] rapha: not using a regex is a big-o brainfart.
[18:23:08] elomatreb: A Big O brainfart? Is that better or worse than O(n²)? :P
[18:23:40] cseder: Hi! I have the "Pickaxe" book for Ruby 1.9 in paper form. They've released a 4th edition that covers 1.9 and 2.0. Are there so many differences between 1.9 and 2.0 that it warrants purchasing the 4th edition?
[18:23:59] dminuoso: cseder: Ditch it. Get `The Well-Grounded Rubyist`
[18:24:00] havenwood: cseder: Now that Ruby 2.4 is out even 2.0 is fairly dated.
[18:24:06] dminuoso: The pickaxe is how you learned Ruby 10 years ago.
[18:24:10] dminuoso: Now we have books.
[18:24:24] ule: Hey guys.. a = %w(foo bar) b = {:foo => 1, :bar => 2, :pub => 3} How would you remove :foo and :bar from "b" ? Any magic thing to pass a .reject over all elements in "b" based off "a" ?
[18:24:31] havenwood: cseder: The Second Edition of the Well-Grounded Rubyist reflects modern Ruby pretty well.
[18:25:26] adam12: Agreed re: Pickaxe & Well-Grounded Rubyist.
[18:25:27] cseder: havenwood dminuoso ok, thanks. I'll order that then. I'm going to jail for a couple of months, so I need something to study! :(
[18:25:53] cseder: damned alcohol
[18:25:54] havenwood: It's from 2014, but at least it's solidly Ruby 2.
[18:25:58] danguita: has joined #ruby
[18:26:01] ule: apeiros: ping
[18:26:46] havenwood: cseder: Get Ruby Under a Microscope too!
[18:26:50] hogetaro: has joined #ruby
[18:26:52] dminuoso: Best Ruby book
[18:26:57] cseder: havenwood have it!
[18:26:57] dminuoso: Despite being old
[18:27:01] dminuoso: And somewhat incorrect in lots of places
[18:27:19] dminuoso: But still amazing.
[18:27:31] rapha: elomatreb: Oh now I see why you thought that I was missing separators. Config.data is not a String though, but a Pathname.
[18:29:07] rapha: German Amazon thinks there's two editions of The Well-Grounded Rubyist from 1600 and from 1707, that is, before the one from 2009 and 2014.
[18:29:46] hutch34: has joined #ruby
[18:30:02] danguita: has joined #ruby
[18:31:10] graft: has joined #ruby
[18:32:01] cseder: rapha better get the 1707 version!
[18:32:16] cseder: co authored by ada lovelace
[18:32:26] tAn: has joined #ruby
[18:33:51] ule: apeiros: a = %w(foo bar) b = {:foo => 1, :bar => 2, :pub => 3} How would you remove :foo and :bar from "b" ? Any magic thing to pass a .reject over all elements in "b" based off "a" ?
[18:33:52] danguita: has joined #ruby
[18:34:08] dminuoso: apeiros: Echo.
[18:34:21] apeiros: ule: you can just ask such things the whole channel. I'm not the only competent rubyist around ;-)
[18:34:23] dminuoso: ule: Im still thinking.
[18:34:23] elomatreb: ule: Do you want to modify b or get a new object?
[18:34:28] dminuoso: elomatreb: WHAT?
[18:34:32] dminuoso: elomatreb: How dare you?
[18:34:53] ule: I'm doing this now: b.reject { |z| z == "foo" || z == "bar" }
[18:35:01] ule: but it's kind of ugly
[18:35:08] apeiros: if you know that a.size is usually < b.size, I'd go with a.each do |k| b.delete(k); end
[18:35:15] dminuoso: apeiros: Thats not elegant.
[18:35:19] elsevero: has joined #ruby
[18:35:38] apeiros: it's effective. and I'm unaware of some vanilla ruby elegance for this
[18:36:00] apeiros: with activesupport I'd do b.except(*a.map(&:to_sym))
[18:36:09] elomatreb: dminuoso: Sorry, and the motivation was wrong as well (I thought Hash#delete took a list of keys)
[18:36:24] apeiros: (only with ruby 2.2+, though)
[18:36:25] dminuoso: elomatreb: Was my first thought too.
[18:36:35] dminuoso: elomatreb: Was going for hash.dup.delete(*keys) :P
[18:36:46] elomatreb: Heh, that's cheating
[18:36:47] ule: you guys are awesome
[18:36:48] dminuoso: Im thinking this should be a thing.
[18:37:16] Cohedrin_: has joined #ruby
[18:37:21] apeiros: it'd be nice, yes. it's not uncommon to delete a list of keys.
[18:37:36] apeiros: you forgot to account for symbol mapping, though
[18:37:51] apeiros: ule: of course, if you can, do a = %i[foo bar], no symbol mapping needed with that
[18:38:02] elomatreb: Or even something like dminuosos suggestion with the dup, Hash#without(*keys) or something like that
[18:38:23] dminuoso: elomatreb: I don't think something like that would pass by nobu.
[18:38:33] dminuoso: It'd have to be a destructive method
[18:39:23] ule: awesome.. thank you very much guys
[18:39:28] elomatreb: I'm not familiar enough with Ruby internals processess to understand that :(
[18:40:00] dminuoso: elomatreb: It'd be too similar to delete. It'd be easy to convince them to allow delete allow multiple arguments.
[18:40:15] dminuoso: But adding new methods is not often done.
[18:41:01] elomatreb: True, I was just thinking that there really is no non-destructive method to do that (besides effectively building your own with reject)
[18:41:55] muelleme_: has joined #ruby
[18:42:24] Polysics: has joined #ruby
[18:43:13] dminuoso: hash.reject { |k, _| keys.include? k }
[18:43:25] _DanN_: has joined #ruby
[18:43:45] dminuoso: apeiros: ^- if anything my argument would be that this could be potentially expensive due to a large amount of methods being dispatched.
[18:44:41] dminuoso: (That and all the overhead for pushing and popping control frames for the block and #include?
[18:44:41] elomatreb: Having your keys in a Set would of course be helpful
[18:45:23] dminuoso: elomatreb: Well, if its baked directly into Hash#delete (and Array#delete) it would happen directly inside a c func, bypassing ruby entirely.
[18:46:09] ule: dminuoso: that works as well
[18:46:10] dminuoso: elomatreb: But actually you are right. Might as well modify reject to also allow arguments.
[18:46:33] dminuoso: i.e. hash.reject(:useless)
[18:46:44] ule: apeiros: good point.. I did %i[..
[18:46:45] dminuoso: (And then give it the same treatment)
[18:46:47] elomatreb: Oh, I could see an argument against that, since you'd be adding magic behavior to an Enumerable method
[18:46:54] dminuoso: elomatreb: not enumerable.
[18:46:59] dminuoso: elomatreb: Those are methods on Array and Hash.
[18:47:00] webopsx: has joined #ruby
[18:47:01] __Yiota: has joined #ruby
[18:47:02] mooser: has joined #ruby
[18:47:04] elomatreb: reject isn't Enumerable?
[18:47:08] rapha: cseder: Ada and Ruby in perfect union, that would be quite the language :)
[18:47:26] dminuoso: elomatreb: Mmm they are.
[18:47:37] dminuoso: elomatreb: But for optimization purposes they are defined on Hash and Array
[18:47:45] dminuoso: but point taken
[18:47:54] dminuoso: shouldnt modify those special cases and stray away from the Enumerable interface
[18:47:59] havenwood: Ada isn't running on Truffle and Graal... yet! ;-P
[18:48:00] havenwood: https://www.slideshare.net/ThomasWuerthinger/graal-truffle-ethdec2013
[18:48:01] apeiros: > dminuoso: hash.reject { |k, _| keys.include? k }
[18:48:04] apeiros: that's a joke answer, right?
[18:48:21] havenwood: R is. Makes me want to learn a bit of R.
[18:48:40] dminuoso: apeiros: Why?
[18:49:06] apeiros: because it's not in any way more elegant than keys.each, and it's definitively more expensive.
[18:49:21] dminuoso: apeiros: Please continue reading. :)
[18:49:27] havenwood: I meant to link to: https://www.youtube.com/watch?v=oWX2tpIO4Yc
[18:49:34] ule: apeiros: .each is faster in this case?
[18:49:50] apeiros: ule: it's not .each which is faster, it's the construct
[18:49:55] perniciouscaffei: has joined #ruby
[18:50:07] apeiros: even more so if keys is an array (hence elomatreb's comment re Set)
[18:50:08] dminuoso: apeiros: Which construct?
[18:50:21] havenwood: Call Java, JS or R functions directly from Ruby ^
[18:50:37] apeiros: dminuoso: the each+delete construct vs. the reject+include construct.
[18:50:44] elomatreb: ule: include? in an Array has to potentially iterate through all elements in it to see if it includes something
[18:50:44] dminuoso: apeiros: Why?
[18:50:51] dminuoso: apeiros: reject is just dup.delete_if
[18:51:00] Cohedrin_: has joined #ruby
[18:51:09] bkxd: has joined #ruby
[18:51:15] bkxd_: has joined #ruby
[18:51:15] dminuoso: apeiros: Due to how caches work I expect them to perform fairly similarly.
[18:51:51] nobitanobi: has joined #ruby
[18:52:03] dminuoso: (for reasonably sized hashes)
[18:52:42] dminuoso: elomatreb: Whether a set would be preferrablye really depends on the size.
[18:52:48] dminuoso: If its just a handful the array is going to be much faster.
[18:54:06] dminuoso: elomatreb: Another big problem is that Set introduces an artificial layer causing twice as many methods for a single lookup
[18:54:14] apeiros: assuming keys is an array, it'll be O(n*m) vs. O(m), that's the one we don't need to discuss
[18:54:14] dminuoso: Adding the hashing done by the underlying Hash
[18:54:20] dminuoso: apeiros: Bull.
[18:54:36] apeiros: if you call science bull, fine
[18:54:50] dminuoso: apeiros: Unless you get into astronomically sized arrays, the massive overhead of twice the method dispatch and the hashing is greatly offset by a linear search of hot memory.
[18:55:02] apeiros: assuming keys is a set, it's an argument of ruby implementation details + relative sizes
[18:56:18] dminuoso: apeiros: Okay lets turn discussion into research.
[18:56:21] apeiros: I'd pose that the hash will usually be larger than the array, so you'll iterate almost certainly a larger dataset than necessary
[18:56:42] elomatreb: (Crowd starts to chant: Benchmarks! Benchmarks!)
[18:56:43] apeiros: the ruby implementation details would be how reject will iirc construct an array for every yield
[18:56:45] graft: has joined #ruby
[18:56:45] graft: has joined #ruby
[18:56:47] dminuoso: apeiros: Alright. Let's assume a hash of say 100_000 pairs?
[18:56:50] dminuoso: And an array of 100 keys?
[18:57:11] apeiros: I'm afk now, but do tell me the result of your research, I'll read up on it
[18:57:16] dminuoso: apeiros: Alright.
[18:57:30] danguita: has joined #ruby
[18:59:24] ule: elomatreb: lol
[19:00:24] elomatreb: I'm picturing a crowd in a not very well lit parking garage standing in a circle around two persons on laptop
[19:01:22] t-recx: has joined #ruby
[19:06:20] Cohedrin_: has joined #ruby
[19:06:56] danguita: has joined #ruby
[19:08:58] cagomez: has joined #ruby
[19:10:59] dminuoso: apeiros: Heh.
[19:11:15] jenrzzz: has joined #ruby
[19:12:59] dminuoso: Okay. So merely wrt to set vs array, for small ones (10) they perform equally well.
[19:13:04] dminuoso: After that set starts to take off.
[19:13:20] danguita: has joined #ruby
[19:13:28] dminuoso: And I harshly ignored your arr.each { |e| hash.delete(e) } because Im an idiot.
[19:13:34] dminuoso: And I also understand why you thought it was a joke.
[19:13:35] truenito: has joined #ruby
[19:13:40] dminuoso: The hurt is real.
[19:15:25] danguita: has joined #ruby
[19:15:43] yarou_: has joined #ruby
[19:15:57] dminuoso: https://gist.github.com/dminuoso/29a313ff3ccd63414848a8a3445d24dc @ elomatreb, apeiros
[19:16:26] dminuoso: (The code repetition is real because it was faster to just copy and modify with vim than to provide a sensible abstraction)
[19:18:17] andrzejku: has joined #ruby
[19:21:01] dminuoso: And that hash is probably best constructed as hash = Array.new(100_000) { [SecureRandom.uuid.to_sym, SecureRandom.uuid] }.to_h
[19:21:07] dtzuzu: has joined #ruby
[19:21:55] nobitanobi: has joined #ruby
[19:23:06] GodFather_: has joined #ruby
[19:23:23] Murda_: has joined #ruby
[19:24:03] dminuoso: Updated for maximum bikeshedding.
[19:28:17] Cohedrin_: has joined #ruby
[19:29:34] cagomez: has joined #ruby
[19:34:18] jenrzzz: has joined #ruby
[19:34:38] jenrzzz: has joined #ruby
[19:35:46] aswen: has joined #ruby
[19:36:04] yarou_: has joined #ruby
[19:41:35] ketan: has joined #ruby
[19:43:07] Cohedrin_: has joined #ruby
[19:43:28] superflit: has joined #ruby
[19:44:12] mooser: has joined #ruby
[19:44:34] quuxman: has joined #ruby
[19:45:47] ianfleeton: has joined #ruby
[19:46:18] benjen: has joined #ruby
[19:46:58] meshsmith: has joined #ruby
[19:46:58] meshsmith: has joined #ruby
[19:48:28] quuxman: Where does Sequel.migration come from? It is undefined in pry after `require 'sequel'` but exists when I run a program from same environment that uses it
[19:49:40] apeiros: dminuoso: to be fair, reject+set.include becomes faster around keys being 1/3rd the size of the hash. that actually surprises me a bit. I did think it was possible but I didn't expect the threshold to be so low.
[19:49:49] cseder: Is Test::Unit widely used and worth learning, or do most people use RSpec for both Ruby and Rails testing?
[19:50:10] quuxman: cseder: I've only seen rspec but my experience is extremely limited
[19:50:11] apeiros: i.e. hash.size = 1000, keys.size = 500, reject+set is faster than each+delete by almost 2x.
[19:50:39] apeiros: cseder: test unit is about the second largest, and there's a lot of people who dislike rspec (like me)
[19:51:12] apeiros: quuxman: run binding.pry in a program where you have it, then do `$ Sequel.migration`
[19:51:14] cseder: apeiros why don't you like it?
[19:51:31] apeiros: cseder: I've to learn a language on top of ruby for no sensible gain
[19:51:35] Ishido: has joined #ruby
[19:51:46] cseder: apeiros I see
[19:52:14] apeiros: additionally I've got to learn its quirks and semantical specialities
[19:52:40] cseder: apeiros and test::unit is better in that way?
[19:52:47] Cohedrin_: has joined #ruby
[19:52:51] apeiros: IMO yes. it's pretty plain ruby.
[19:53:26] quuxman: I agree that rspec is not at all transparent for someone starting out with Ruby
[19:53:26] cseder: apeiros is it the same as the one included by default in rails?
[19:53:51] apeiros: test unit comes with ruby itself, not with rails
[19:53:58] apeiros: if you were referring to that
[19:54:32] cseder: apeiros I meant, when you start a new rails project it generates test stubs, is this using test::unit?
[19:54:37] adam12: quuxman: Sequel uses a plugin-style structure, which means just requiring sequel might not give you the methods you want.
[19:54:46] mtkd: has joined #ruby
[19:55:01] apeiros: cseder: oh, I don't actually know. been a while since I created a new rails project where I wanted to write tests for it.
[19:55:03] cseder: the generators in rails
[19:55:14] quuxman: adam12: presumably I have to require additional packages?
[19:55:34] adam12: quuxman: No, Sequel does that for you when you call it's `extension` method.
[19:56:32] jhooker: has joined #ruby
[19:56:33] adam12: quuxman: Anyways, I think I am wrong, kinda. The `Sequel.migration` method likely only exists when being called from the `sequel` binary, or Sequel::Migrator.apply method.
[19:56:59] quuxman: adam12: well that's weird. How do I use it from pry to debug things?
[19:57:04] wilbert: has joined #ruby
[19:57:06] adam12: quuxman: What are you trying to debug?
[19:57:21] cseder: apeiros rails generators create minitest stubs from ActiveSupport, so guess it's not the same animal
[19:57:26] ascarter: has joined #ruby
[19:57:45] apeiros: minitest is the replacement of test-unit and that'd actually be what ships with ruby
[19:57:48] quuxman: adam12: create_table() call that produces the wrong SQL for the particular DB I'm using
[19:57:59] apeiros: but iirc rails extends minitest a great deal
[19:59:05] adam12: quuxman: Interesting. I'd try to use the `sequel` binary, with the `-m <migrations path` option, a `-r pry` option if you're using pry, and then setup a binding.pry breakpoint in the migration file.
[19:59:05] quuxman: adam12: all I really need is a way to see the SQL string generated by a given create_table() call
[19:59:14] adam12: quuxman: Oh.
[19:59:27] adam12: quuxman: If you have a DB instance, you can use DB.create_table
[19:59:39] cam27: has joined #ruby
[19:59:43] quuxman: adam12: like with sqlalchemy: str(model.create(...))
[19:59:45] adam12: I'm not sure how to get the SQL from that as a string, but you can add a logger to DB and log it to $stdout
[20:00:02] adam12: quuxman: If you join #sequel, jeremyevans is super responsive and might have better suggestions.
[20:01:14] webopsx: has joined #ruby
[20:01:29] superflit: guys at https://pastebin.com/KKr57zc6 why the code on 2.1.1.1 does not run?
[20:01:30] ruby[bot]: superflit: we in #ruby do not like pastebin.com, I reposted your paste to gist for you: https://gist.github.com/f357431ed9ee513b56912e6a1a2d67d7
[20:01:32] ruby[bot]: superflit: pastebin.com loads slowly for most, has ads which are distracting and has terrible formatting.
[20:02:57] superflit: (impressive bot)
[20:03:41] BTRE: has joined #ruby
[20:03:42] InfinityFye: has joined #ruby
[20:06:20] Joufflu: has joined #ruby
[20:07:20] Polysics: has joined #ruby
[20:08:32] cseder: Test::Unit was the built in Ruby testing library but is considered dead (development has ceased). It has been superceeded by Minitest. according to a so post
[20:09:31] jhooker: has joined #ruby
[20:09:49] Cohedrin_: has joined #ruby
[20:11:17] cseder: So if minitest is pure ruby and it is default with rails generators, I'm sold on minitest
[20:11:57] jhooker: has joined #ruby
[20:12:50] elomatreb: RSpec (the main alternative) is also pure Ruby, it's just a different design
[20:13:06] Coldblackice: has joined #ruby
[20:13:15] elomatreb: And you can tell Rails to generate multiple types of specs, I think it'll even remember the choice
[20:14:45] gigetoo: has joined #ruby
[20:16:23] tacoboy: has joined #ruby
[20:19:13] ltem: has joined #ruby
[20:19:40] cagomez: has joined #ruby
[20:20:13] Polysics_: has joined #ruby
[20:21:42] mooser: has joined #ruby
[20:24:35] shinnya: has joined #ruby
[20:28:27] Cohedrin_: has joined #ruby
[20:33:40] zapata: has joined #ruby
[20:36:23] zenspider: elomatreb: I'd argue that it is less pure ruby in that rspec reinvents much of ruby for the sake of doing so... slows it way down. uses a ton more memory. just not worth it in my very biased opinion
[20:37:19] jenrzzz: has joined #ruby
[20:37:19] jenrzzz: has joined #ruby
[20:37:38] zenspider: where minitest just uses classes and just uses methods... nothing special. just ruby.
[20:37:53] elomatreb: I'm no less biased, the first Rails project I worked on used RSpec and it stuck
[20:38:39] bkxd: has joined #ruby
[20:38:41] bkxd_: has joined #ruby
[20:38:49] elomatreb: And I haven't had speed issues with it, but I haven't work on truly large projects
[20:39:15] zenspider: if you haven't measured, you don't know if you had speed issues or not.
[20:39:38] zenspider: half a second adds up fast if you're really doing test driven dev
[20:40:57] elomatreb: I meant something like "it was never slow enough to actively notice or annoy me", but yeah
[20:42:09] Uranio: has joined #ruby
[20:43:16] Uranio: has left #ruby: ()
[20:43:54] bkxd: has joined #ruby
[20:47:14] nobitanobi: has joined #ruby
[20:48:08] Fysicus: has joined #ruby
[20:49:09] cseder: If I want to start a freelance business using RoR as the main technology, what are the options for finding hosting providers that has RoR hosting options? Is it best to choose something like Heroku PaaS and deliver on that platform, or does it exist less complex alternatives for just plain webhosting for RoR?
[20:52:09] Papierkorb: cseder: A fully managed hosting solution, like Heroku, probably suits you best. It may be more expensive than other solutions, however, they maintain their servers for you, which is a thing you NEED to be knowledgable about.
[20:54:44] workmad3: has joined #ruby
[20:55:41] cseder: Papierkorb yeah, I guess... It would probably be the best alternative for other environments as well, not just RoR. I've gone all in on learning Ruby and Rails, even though as I plan on doing freelance work, I see that the demand for PHP is much larger on sites like freelancer.com, but I like Ruby better than PHP and even though I've worked as a developer using C# for desktop applications I'm not tempted to go the Asp.net route.
[20:56:04] FysiWRK: has joined #ruby
[20:56:08] ianfleeton: has joined #ruby
[21:01:40] carterparks: has joined #ruby
[21:04:53] jenrzzz_: has joined #ruby
[21:07:42] carterparks: has left #ruby: ("WeeChat 1.6")
[21:25:02] mim1k: has joined #ruby
[21:30:39] romankapitonov: has joined #ruby
[21:30:45] patarr1: has joined #ruby
[21:35:03] nobitanobi: has joined #ruby
[21:38:11] raspado: has joined #ruby
[21:39:00] zenspider: ffs... I'm running inside of docker on an alpine ruby box... it uses busybox for userspace so `less` isn't standard. pry is FREAKING out because it is trying to page everything :(
[21:39:00] ur5us: has joined #ruby
[21:39:22] eam: PAGER=cat
[21:40:19] __Yiota: has joined #ruby
[21:40:38] mooser: has joined #ruby
[21:40:45] zenspider: a bit late... I don't have much control over ENV at this point
[21:41:00] zenspider: and of course help wants to use the pager :P
[21:41:22] eam: can you set ENV?
[21:41:29] Zarthus: You're running pry but have no control over the environment?
[21:41:39] darix: zenspider: Pry.config.parge='cat'
[21:41:42] milardovich: has joined #ruby
[21:41:45] darix: zenspider: Pry.config.pager='cat'
[21:41:56] Zarthus: I'd imagine PAGER=cat pry should work, or just set the env within pry :P
[21:42:02] Zarthus: although darix's solution seems saner
[21:42:04] darix: Pry.config.pager = false
[21:42:27] ketan: has joined #ruby
[21:42:32] darix: zenspider: ^
[21:42:33] Cohedrin_: has joined #ruby
[21:43:55] zenspider: I ran pry locally so I could read the help and found `change-inspector simple`
[21:44:25] darix: zenspider: after over 12h working typos are allowed
[21:44:41] havenwood: Pry.pager = false
[21:44:55] havenwood: Pry.commands.rename_command '%cat', 'cat'
[21:45:10] zenspider: what's that last one about?
[21:45:34] havenwood: that's just me being silly - removing the Pry "cat" command so I can use `cat` as a local variable
[21:46:00] Zarthus: I'll just resort to pussy in the meantime
[21:46:01] havenwood: but you can remove any Pry command that way
[21:46:14] havenwood: Zarthus: Please none of that.
[21:47:06] zenspider: why even say please?
[21:49:17] eckhardt: has joined #ruby
[21:50:05] rustbest: has joined #ruby
[21:52:06] zenspider: the fact that puts will chomp the string will never ever stop vexing me
[21:52:10] zenspider: drives me nuts
[21:53:43] __Yiota: has joined #ruby
[21:55:57] SeepingN: is that new?
[21:58:57] havenwood: It is a strange thing that `puts "foo"` and `puts "foo\n"` both print the same thing but the former may not print them together in a multithreaded situation.
[21:59:47] rustbest: https://pastebin.com/0YbFNcQQ guys is there any way to create a "constant"-like thing pointing to "Example::Test"? So I wont need to call this big expression.
[21:59:48] ruby[bot]: rustbest: we in #ruby do not like pastebin.com, I reposted your paste to gist for you: https://gist.github.com/2997c40e81b6b9514007e0c5cd931c3e
[21:59:50] ruby[bot]: rustbest: pastebin.com loads slowly for most, has ads which are distracting and has terrible formatting.
[22:00:50] havenwood: rustbest: X = Example::Test
[22:01:00] havenwood: rustbest: Consider not nesting your classes and modules so deeply.
[22:01:03] Cohedrin_: has joined #ruby
[22:01:19] havenwood: rustbest: The Ruby community convention is to use two-space, soft tabs.
[22:01:22] ruby[bot]: Ruby community standards recommend using 2 spaces as indentation (see https://github.com/bbatsov/ruby-style-guide#spaces-indentation and https://ukupat.github.io/tabs-or-spaces/).
[22:03:17] rustbest: thanks havenwood
[22:05:44] jenrzzz: has joined #ruby
[22:06:43] FysiWRK: has left #ruby: ()
[22:06:54] eam: you can use as many zero-width spaces as you like, though
[22:08:27] BlkDynmt: has joined #ruby
[22:09:16] cschneid_: has joined #ruby
[22:10:50] wilbert: has joined #ruby
[22:12:05] havenwood: eam: String.new capacity: 100_000_000_000_000 # Virtual Memory Size: 90.95 TB
[22:14:01] milardovich: has joined #ruby
[22:14:09] jenrzzz: has joined #ruby
[22:14:09] jenrzzz: has joined #ruby
[22:21:55] havenwood: >> require 'objspace'; empty = String.new capacity: 10_000_000_000_000; ObjectSpace.memsize_of empty
[22:21:56] ruby[bot]: havenwood: # => unknown keyword: capacity (ArgumentError) ...check link for more (https://eval.in/828228)
[22:21:57] zenspider: rustbest: doesn't need to be X either... can be x
[22:22:01] zenspider: (constant vs local)
[22:22:06] havenwood: #=> 10000000000041
[22:22:19] havenwood: Ah, forgot the bot was 2.3.
[22:22:47] clemens3: zenspider: isn't puts doing the opposite of chomp?
[22:23:02] zenspider: it does both
[22:23:11] zenspider: puts "x" outputs the same as puts "x\n"
[22:23:34] zenspider: so if you want an extra newline, you must double it up
[22:23:36] clemens3: but chomp removes the n
[22:23:56] clemens3: puts adds one if one is missing
[22:24:12] zenspider: that's... not how I see it
[22:24:21] zenspider: puts is print w/ a newline... unless it has a newline
[22:24:34] clemens3: puts makes sure there is newline
[22:24:40] clemens3: chomp removes newline
[22:24:49] zenspider: are you a broken record?
[22:24:59] clemens3: seems pretty opposite to me
[22:25:00] havenwood: clemens3: Note how many newlines this prints: puts "one\n"
[22:25:12] zenspider: clemens3: you seem pretty opposite to me
[22:25:33] havenwood: clemens3: How many newlines do you expect to be printed, one right?: ""
[22:25:37] ecuanaso: has joined #ruby
[22:25:55] havenwood: clemens3: How many now?: "\n"
[22:26:06] clemens3: how many newlines removed?
[22:26:10] havenwood: clemens3: #=> "x"
[22:26:17] havenwood: clemens3: None.
[22:26:26] clemens3: "x\n".chomp
[22:27:34] havenwood: clemens3: Just to clarify, you get that `puts "\n"` and `puts ""` both print one line, yeah?
[22:27:59] clemens3: yes, so zero or 1 newline are added?
[22:30:14] rustbest: https://0x0.st/06O.png since I'm expecting a lot of messages per minute, the class model isn't recommended right? I mean it will generate a new instance every second?
[22:30:30] zenspider: rustbest: a png?? really?
[22:30:32] romankapitonov: has joined #ruby
[22:31:16] havenwood: clemens3: I do think of it as separate newline added, so yeah, I see your point after rereading.
[22:31:17] zenspider: rustbest: I don't understand your question wrt your "code"
[22:31:55] havenwood: (Since the separate newline is indeed added, and can happen slightly later than the String being printed.)
[22:32:11] rustbest: gist editor is shit, it's breaking the indentation
[22:32:35] zenspider: no... it's fine
[22:33:49] Radar: Underscore in a class? *tsk*
[22:35:00] zenspider: rust style? *shrug*
[22:35:03] aviraldg: has joined #ruby
[22:35:04] aviraldg: has joined #ruby
[22:35:21] Radar: rustbest: it has been longer than a second
[22:35:22] rustbest: sorry https://gist.github.com/anonymous/d4c3f4489f395d7ffb1fbe74c57bed79
[22:35:46] Radar: " the class model isn't recommended right?" what made you think this?
[22:36:12] Radar: And what is a Cygnus
[22:36:21] clemens3: havenwood: didn't know about the timing issue.. for me the name is indeed wired.. I think print indeed was just fine.. but got used to puts
[22:37:32] nofxxx: has joined #ruby
[22:38:11] rustbest: it's generating a new instance of log every second, even though it's the same file
[22:38:26] Murda_: has joined #ruby
[22:38:47] zenspider: rustbest: then don't do that?
[22:38:50] Radar: rustbest: Perhaps put line 1 outside of the loop so that it only creates one?
[22:38:51] havenwood: clemens3: You see the newline being separate often in threaded code. Two implicit newlines will stack, then the string output concatenated on one line. Explicit newline happen at the same time.
[22:38:57] Cohedrin_: has joined #ruby
[22:39:01] zenspider: log objects are generally created and kept around
[22:39:35] rustbest: I can't access the variables outside tho, it's a event
[22:39:52] zenspider: yes you (probably) can
[22:40:05] zenspider: actually definitely... depending on how you go about it.
[22:40:19] ski7777: has joined #ruby
[22:40:20] zenspider: but you're not providing enough code for us to actually advise
[22:40:27] clemens3: havenwood: yeah, i used to have lots of flush statements even in single threaded code for debug purposes, because can't always trust if messages didn't come or delayed in some buffer
[22:41:09] zenspider: that's what stderr is for
[22:42:02] clemens3: well, that is the other point making sense of which err messages came with which program output..
[22:42:05] havenwood: warn 'danger, will robinson'
[22:42:16] clemens3: so err goes to out for me often..
[22:42:51] clemens3: but i am not doing multi threading normally, so no biggy
[22:43:37] havenwood: clemens3: Auto-Fibers are a new possibility on the Ruby horizon: https://bugs.ruby-lang.org/issues/13618
[22:44:14] havenwood: Welcome back, green threads!
[22:44:44] havenwood: Goroutine-like primatives in Ruby? Queues as channels? Whee!
[22:45:05] blackwind_123: has joined #ruby
[22:45:44] quuxman: OK so I forked a gem, now I want to develop it in the context of a project I'm working on. How do I install it into my project?
[22:46:02] havenwood: Guilds along with lighter weight, auto-scheduled green thread primitives is interesting.
[22:46:39] havenwood: quuxman: You can specify your repo and the exact commit in your Gemfile.
[22:47:05] quuxman: havenwood: bun then it ends up in some archive in ~/.bundle instead of somewhere I can actually edit the code
[22:47:07] zenspider: quuxman: ^^ assuming gemfile. Or you can use `ruby -Ipath-to-lib`
[22:47:31] jnollette: has joined #ruby
[22:47:32] zenspider: I think you can also do file:// paths in the gemfile... not sure. By that time I usually give up on bundler
[22:47:47] quuxman: I guess I could just `cp -r ~/forked-lib/lib/* ~/current-project/lib`?
[22:48:24] zenspider: that's really not a good idea
[22:48:32] havenwood: quuxman: Why are you doing this? What's it for?
[22:48:48] havenwood: quuxman: You can edit the gem wherever it is. Why are you forking it?
[22:49:10] zenspider: You can put `$: << File.expand_path("~/forked-lib/lib")` before you require it to emulate the ruby -I
[22:49:26] webopsx: has joined #ruby
[22:50:13] quuxman: sounds like the best option is to simply put "file://$HOME/forked-lib" in the Gemfile
[22:50:29] milardovich: has joined #ruby
[22:50:57] xco: has joined #ruby
[22:51:03] clemens3: havenwood: reading.. but luckily I don't do much parallel programming.. once tried again some gui programming with jruby and silly me wanted to do coverage testing... args
[22:51:36] weaksauce: has joined #ruby
[22:52:19] mokiwis: has joined #ruby
[22:52:40] xco: i feel this might be bad but i don’t know how to do it well
[22:52:47] xco: can i do something like this
[22:52:54] xco: puts “hello” unless true
[22:53:01] xco: good or bad?
[22:53:31] zenspider: xco: it's fine
[22:53:45] zenspider: what's your actual concern?
[22:54:01] gigetoo: has joined #ruby
[22:54:01] xco: that there’ll be an endless loop
[22:54:45] xco: unless true means if true is false
[22:54:53] xco: which will never happen
[22:55:28] xco: so it’ll keep going and i thought it’s bad
[22:55:34] zenspider: so never happening means it'll loop forever?
[22:55:43] zenspider: I thought never happening means it'll loop never
[22:55:52] zenspider: did you try it?
[22:55:57] zenspider: fire up irb and type it in
[22:56:31] charliesome: has joined #ruby
[22:56:52] xco: aaaaa :D
[22:56:56] xco: silly me
[22:57:26] ski7777: has joined #ruby
[22:58:25] duderonomy: has joined #ruby
[22:59:52] ascarter: has joined #ruby
[23:06:14] mokiwis: has joined #ruby
[23:12:10] chmurifree: has joined #ruby
[23:17:24] charliesome: has joined #ruby
[23:18:00] Joufflu: has joined #ruby
[23:18:15] enterprisey: has joined #ruby
[23:22:01] milardovich: has joined #ruby
[23:22:07] alveric: has joined #ruby
[23:22:59] webopsx: has joined #ruby
[23:25:27] mim1k: has joined #ruby
[23:33:17] jenrzzz: has joined #ruby
[23:33:17] jenrzzz: has joined #ruby
[23:35:07] Dimik: has joined #ruby
[23:39:01] bkxd: has joined #ruby
[23:39:06] bkxd_: has joined #ruby
[23:39:14] yoongkang: has joined #ruby
[23:39:48] milardovich: has joined #ruby
[23:40:38] Cohedrin_: has joined #ruby
[23:43:19] ketan: has joined #ruby
[23:44:25] bkxd_: has joined #ruby
[23:45:04] charliesome: has joined #ruby
[23:48:51] xco: has joined #ruby
[23:49:32] yarou_: has joined #ruby
[23:49:41] xco: has joined #ruby
[23:50:41] xco: has joined #ruby
[23:51:27] xco: has joined #ruby
[23:52:17] xco: has joined #ruby
[23:52:42] dviola: has joined #ruby
[23:53:07] xco: has joined #ruby
[23:53:52] xco: has joined #ruby
[23:54:42] xco: has joined #ruby
[23:54:55] nadir: has joined #ruby
[23:55:41] Tau: has joined #ruby
[23:58:34] Cohedrin_: has joined #ruby