« Back to channel list

#ruby - 29 August 2017

« Back 1 day Forward 1 day »
[00:03:02] nofxx: has joined #ruby
[00:03:12] aduabu: has joined #ruby
[00:05:24] kreantos: has joined #ruby
[00:06:37] canteen4: has joined #ruby
[00:09:01] aduabu: has joined #ruby
[00:12:00] canteen4: has joined #ruby
[00:13:02] t-recx: has joined #ruby
[00:15:42] aduabu: has joined #ruby
[00:18:51] canteen4: has joined #ruby
[00:19:22] eckhardt: has joined #ruby
[00:20:37] t-recx_: has joined #ruby
[00:21:57] brent__: has joined #ruby
[00:22:53] s3nd1v0g1us: has joined #ruby
[00:25:00] aduabu: has joined #ruby
[00:30:05] canteen4: has joined #ruby
[00:31:16] shakes: has joined #ruby
[00:32:34] emilford: has joined #ruby
[00:33:36] ResidentBiscuit: has joined #ruby
[00:34:16] orbyt_: has joined #ruby
[00:40:26] imode: am I crazy or can I not have a class inside of a module?
[00:40:29] aduabu: has joined #ruby
[00:41:38] imode: nevermind. that was dumb, I was missing a "self."
[00:42:39] bdnelson: has joined #ruby
[00:45:19] Technaton: has joined #ruby
[00:45:27] bdnelson: has joined #ruby
[00:46:58] canteen4: has joined #ruby
[00:50:26] aduabu: has joined #ruby
[00:50:43] chouhoulis: has joined #ruby
[00:52:43] canteen4: has joined #ruby
[00:55:35] aduabu: has joined #ruby
[00:56:49] creshiem: has joined #ruby
[00:58:18] carnegie: has joined #ruby
[00:59:00] umaaji: has joined #ruby
[01:00:00] ramfjord: has joined #ruby
[01:02:48] runescape07rsps: has joined #ruby
[01:04:03] imode: do I always have to define functions in modules via def MyModule.foobar()?
[01:04:22] matthewd: imode: It depends how you're using the module
[01:04:35] gothicsouth: has joined #ruby
[01:04:37] imode: matthewd: I have a module with one method inside of it, named timestamp.
[01:04:45] imode: it returns a string. how do I call this method?
[01:04:48] BSAlb: has joined #ruby
[01:04:50] elomatreb: If you just want a module that contains module-level methods "module_function" is pretty useful
[01:05:00] gizmore|2: has joined #ruby
[01:05:00] neo95: has joined #ruby
[01:05:05] matthewd: How do you want to call it?
[01:05:08] elomatreb: Additionally, you don't need to write out the module name, def self.foobar works as well
[01:05:14] d^sh_: has joined #ruby
[01:05:30] imode: I don't know. MyModule::timestamp I guess?
[01:05:50] imode: I am new to Ruby.
[01:05:53] ramfjord: has joined #ruby
[01:06:33] imode: I know Modules can be used for mixin-style programming but I'm honestly just wanting to use them as an indicator of a namespace.
[01:06:56] matthewd: If you want to define and use it as a "static" method (so the module is just a namespace for a global thing), then yes, define it with def self.xx and then call it as MyModule.xx
[01:07:28] matthewd: (or, as elomatreb said, `def xx; ..; end; module_method :xx`)
[01:07:52] imode: interesting. why does Ruby allow bare defs inside of modules then?
[01:08:14] imode: if, in order to actually use the things you define, you have to do def self.foobar or that module_method line.
[01:08:22] matthewd: Because they "can be used for mixin-style programming"
[01:08:37] imode: ah. and normally you aren't supposed to just use a bare module?
[01:08:37] elomatreb: For the mentioned mixin-style programming, if you include the module in a class they appear as instance methods
[01:09:14] matthewd: Well.. no more than you're 'supposed' to write a Java program mostly out of static methods
[01:09:23] elomatreb: A class technically is a special kind of module, so the distinction on when you should use a class and when you should use a module is often a matter of opinion
[01:09:42] matthewd: It's a thing you can do, and it's not *wrong*.. but it's somewhat missing out on the OO part of OOP
[01:10:34] imode: alright, that makes more sense. their use case makes more sense to me now.
[01:10:35] elomatreb: If there is any sort of state involved you should probably use a class, but you can have state in modules as well
[01:11:53] ramfjord: has joined #ruby
[01:13:16] tenderlo_: has joined #ruby
[01:14:29] imode: so that's weird. if I define something like def FooBar.BazQuux, trying to access it gives me an uninitialize constant error.
[01:14:48] imode: but if I name it FooBar.bazquux, it works fine.
[01:14:54] imode: is capitalization relevant?
[01:16:18] imode: https://ptpb.pw/BxCI/ruby
[01:16:54] brent__: has joined #ruby
[01:17:50] ramfjord: has joined #ruby
[01:18:12] matthewd: Yes, capitalization is relevant
[01:18:35] matthewd: Constants start with capital letters, variables and most methods start with lowercase
[01:19:26] matthewd: FooBar::ID() would work, because it's unambiguously a method call... but FooBar::ID looks like a constant lookup
[01:19:43] imode: I see. weird.
[01:19:53] matthewd: But don't use uppercase letters in method names. Lowercase, with underscores.
[01:20:16] matthewd: Also: no semicolons
[01:20:36] imode: I'll write in my own style, but thank you. I didn't find that detail anywhere.
[01:20:44] matthewd: And as a more stylistic note, Ruby code is almost always indented to two spaces
[01:21:02] imode: four is good.
[01:21:15] ResidentBiscuit: has joined #ruby
[01:23:41] lacuna: has joined #ruby
[01:26:33] canteen4: has joined #ruby
[01:26:55] mim1k: has joined #ruby
[01:27:41] crankharder: has joined #ruby
[01:30:15] aduabu: has joined #ruby
[01:31:24] perniciouscaffei: has joined #ruby
[01:32:01] irated: has joined #ruby
[01:32:06] irated: halp https://gist.github.com/pryorda/cc4041701fbfb536520efb03c72cff95
[01:32:16] irated: how do you partition by that?
[01:33:15] cagomez: has joined #ruby
[01:33:21] riskish: has joined #ruby
[01:33:24] matthewd: irated: You probably want #group_by instead
[01:33:40] irated: tried that too
[01:33:51] irated: it doesnt like the embedded attribute
[01:34:00] irated: returns nil class
[01:34:20] matthewd: Oh, right, you're missing the outer hash
[01:35:00] matthewd: The first x.keys is [:"int-ceph1"], not [:labels]
[01:36:32] canteen4: has joined #ruby
[01:36:40] elomatreb: You've also got a stray ' in there it seems
[01:37:38] Jameser: has joined #ruby
[01:38:12] irated: that wasnt there before and it stil does it
[01:39:28] irated: matthewd: i see what i did
[01:42:32] aduabu: has joined #ruby
[01:42:54] irated: well that wasnt it either
[01:43:01] irated: i need to get chef-shell working
[01:44:11] ramfjord: has joined #ruby
[01:46:53] canteen4: has joined #ruby
[01:48:45] go|dfish: has joined #ruby
[01:49:22] ResidentBiscuit: has joined #ruby
[01:53:00] aduabu: has joined #ruby
[01:56:26] canteen4: has joined #ruby
[02:05:49] aduabu: has joined #ruby
[02:07:35] uZiel: has joined #ruby
[02:07:41] pugcs: has joined #ruby
[02:09:57] alfiemax: has joined #ruby
[02:10:20] canteen4: has joined #ruby
[02:12:08] aduabu: has joined #ruby
[02:14:33] cagomez: has joined #ruby
[02:16:13] canteen4: has joined #ruby
[02:19:23] aduabu: has joined #ruby
[02:21:28] goyox86: has joined #ruby
[02:23:00] canteen4: has joined #ruby
[02:26:19] aduabu: has joined #ruby
[02:28:13] gothicsouth: has joined #ruby
[02:28:42] enterprisey: has joined #ruby
[02:30:14] canteen4: has joined #ruby
[02:31:32] subrat: has joined #ruby
[02:31:58] lacuna: has joined #ruby
[02:34:25] phinxy: has joined #ruby
[02:36:46] aduabu: has joined #ruby
[02:37:31] m27frogy: has joined #ruby
[02:39:00] bdnelson: has joined #ruby
[02:39:29] benlieb: has joined #ruby
[02:40:44] canteen4: has joined #ruby
[02:41:12] lacuna: has joined #ruby
[02:41:35] s3nd1v0g1us: has joined #ruby
[02:44:17] CrazyEddy: has joined #ruby
[02:44:40] orbyt_: has joined #ruby
[02:45:34] harai: has joined #ruby
[02:47:06] aduabu: has joined #ruby
[02:49:55] canteen4: has joined #ruby
[02:50:55] hutch34: has joined #ruby
[02:52:10] neo95: has joined #ruby
[02:52:47] uZiel: has joined #ruby
[02:54:19] aduabu: has joined #ruby
[02:56:46] canteen4: has joined #ruby
[02:57:09] bronson: has joined #ruby
[03:02:10] graft: has joined #ruby
[03:02:10] graft: has joined #ruby
[03:04:37] sspreitz: has joined #ruby
[03:05:49] haylon: has joined #ruby
[03:07:13] carnegie: has joined #ruby
[03:10:02] aduabu: has joined #ruby
[03:13:16] canteen4: has joined #ruby
[03:14:49] aduabu: has joined #ruby
[03:18:04] canteen4: has joined #ruby
[03:18:31] lacuna: has joined #ruby
[03:21:46] aduabu: has joined #ruby
[03:24:22] subrat: has joined #ruby
[03:25:10] canteen4: has joined #ruby
[03:27:27] mim1k: has joined #ruby
[03:27:38] aduabu: has joined #ruby
[03:28:43] alfiemax: has joined #ruby
[03:29:03] phinxy: has joined #ruby
[03:29:52] canteen4: has joined #ruby
[03:29:55] gix: has joined #ruby
[03:31:13] anisha_: has joined #ruby
[03:31:48] paradisaeidae: has joined #ruby
[03:31:54] paradisaeidae_: has joined #ruby
[03:32:16] aduabu: has joined #ruby
[03:32:59] subrat: has joined #ruby
[03:34:16] canteen4: has joined #ruby
[03:34:46] hutch34: has joined #ruby
[03:37:08] aduabu: has joined #ruby
[03:37:21] kapil___: has joined #ruby
[03:38:19] gusrub: has joined #ruby
[03:39:26] canteen4: has joined #ruby
[03:41:33] aduabu: has joined #ruby
[03:44:54] canteen4: has joined #ruby
[03:45:59] harai: has joined #ruby
[03:46:06] aduabu: has joined #ruby
[03:47:12] ascarter: has joined #ruby
[03:50:03] canteen4: has joined #ruby
[03:51:53] aduabu: has joined #ruby
[03:54:42] Defenestrate: has joined #ruby
[03:54:42] Defenestrate: has joined #ruby
[03:55:24] canteen4: has joined #ruby
[03:57:12] bronson: has joined #ruby
[03:57:45] lacuna: has joined #ruby
[03:57:50] aduabu: has joined #ruby
[04:00:03] canteen4: has joined #ruby
[04:04:21] aduabu: has joined #ruby
[04:04:47] enterprisey: has joined #ruby
[04:05:53] kreantos: has joined #ruby
[04:08:21] canteen4: has joined #ruby
[04:11:56] aduabu: has joined #ruby
[04:14:25] canteen4: has joined #ruby
[04:15:02] agent_white: has joined #ruby
[04:18:17] aduabu: has joined #ruby
[04:19:28] certhird: has joined #ruby
[04:19:29] Dry_Lips: has joined #ruby
[04:19:57] Dry_Lips: has joined #ruby
[04:20:08] gothicsouth: has joined #ruby
[04:22:39] canteen4: has joined #ruby
[04:25:05] Alina-malina: has joined #ruby
[04:25:52] mim1k: has joined #ruby
[04:29:31] uZiel: has joined #ruby
[04:31:56] aduabu: has joined #ruby
[04:35:51] canteen4: has joined #ruby
[04:38:52] aduabu: has joined #ruby
[04:39:59] cdg: has joined #ruby
[04:42:33] canteen4: has joined #ruby
[04:43:47] ramfjord: has joined #ruby
[04:47:04] aduabu: has joined #ruby
[04:47:38] kies: has joined #ruby
[04:49:45] canteen4: has joined #ruby
[04:51:57] aduabu: has joined #ruby
[04:53:15] nofxx: has joined #ruby
[04:54:47] canteen4: has joined #ruby
[04:56:57] in0perable: has joined #ruby
[04:58:35] segy: has joined #ruby
[04:58:45] _aeris_: has joined #ruby
[05:01:04] aduabu: has joined #ruby
[05:04:23] canteen4: has joined #ruby
[05:08:12] aduabu: has joined #ruby
[05:11:12] canteen4: has joined #ruby
[05:11:55] Bock: has joined #ruby
[05:15:31] aduabu: has joined #ruby
[05:17:50] canteen4: has joined #ruby
[05:20:26] aduabu: has joined #ruby
[05:22:29] brent__: has joined #ruby
[05:22:42] ramfjord: has joined #ruby
[05:22:53] canteen4: has joined #ruby
[05:25:15] aduabu: has joined #ruby
[05:27:41] canteen4: has joined #ruby
[05:29:55] aduabu: has joined #ruby
[05:32:15] canteen4: has joined #ruby
[05:33:47] P1ro: has joined #ruby
[05:37:01] aduabu: has joined #ruby
[05:38:22] ramfjord: has joined #ruby
[05:40:00] mtkd: has joined #ruby
[05:41:32] canteen4: has joined #ruby
[05:41:55] deepthought42: has joined #ruby
[05:44:20] gothicsouth: has joined #ruby
[05:45:43] alfiemax: has joined #ruby
[05:47:41] aduabu: has joined #ruby
[05:50:19] nupizdets: has joined #ruby
[05:50:36] canteen4: has joined #ruby
[05:52:15] jashmatthews: has joined #ruby
[05:52:52] aduabu: has joined #ruby
[05:53:59] enterprisey: has joined #ruby
[05:55:30] roshanavand: has joined #ruby
[05:56:30] jashmatthews: has joined #ruby
[05:56:32] roshanavand: has joined #ruby
[05:57:50] neo95: has joined #ruby
[05:58:03] bronson: has joined #ruby
[05:58:25] alex``: has joined #ruby
[05:58:43] ramfjord: has joined #ruby
[06:01:13] canteen4: has joined #ruby
[06:02:05] jashmatt_: has joined #ruby
[06:07:10] aduabu: has joined #ruby
[06:10:06] rabajaj: has joined #ruby
[06:10:48] canteen4: has joined #ruby
[06:10:52] ur5us: has joined #ruby
[06:14:50] aduabu: has joined #ruby
[06:16:53] Azure|dc: has joined #ruby
[06:21:05] canteen4: has joined #ruby
[06:23:42] ltem: has joined #ruby
[06:24:56] aduabu: has joined #ruby
[06:26:55] canteen4: has joined #ruby
[06:29:16] aduabu: has joined #ruby
[06:29:16] Mortomes|Work: has joined #ruby
[06:31:46] canteen4: has joined #ruby
[06:35:46] aduabu: has joined #ruby
[06:39:28] canteen4: has joined #ruby
[06:40:26] lacuna: has joined #ruby
[06:40:36] gothicsouth: has joined #ruby
[06:43:07] aduabu: has joined #ruby
[06:43:35] ResidentBiscuit: has joined #ruby
[06:44:29] uZiel: has joined #ruby
[06:47:23] canteen4: has joined #ruby
[06:49:03] conta: has joined #ruby
[06:51:08] aduabu: has joined #ruby
[06:52:38] bigkevmcd: has joined #ruby
[06:53:11] imode: well. I just rolled my own wrapper for several redis types in ruby. I love this language.
[06:54:25] canteen4: has joined #ruby
[06:55:18] TomyWork: has joined #ruby
[06:56:56] aduabu: has joined #ruby
[06:58:11] kalyan57: has joined #ruby
[07:01:30] canteen4: has joined #ruby
[07:04:09] aduabu: has joined #ruby
[07:05:02] andikr: has joined #ruby
[07:06:33] lxsameer: has joined #ruby
[07:06:37] alibby1: has joined #ruby
[07:07:28] canteen4: has joined #ruby
[07:07:50] ShekharReddy: has joined #ruby
[07:07:58] harfangk: has joined #ruby
[07:08:13] tAn: has joined #ruby
[07:08:33] lacuna: has joined #ruby
[07:09:40] jinie: has joined #ruby
[07:10:11] moei: has joined #ruby
[07:10:11] gothicsouth: has joined #ruby
[07:10:29] phaul: has joined #ruby
[07:12:45] chouhoulis: has joined #ruby
[07:12:46] jaruga: has joined #ruby
[07:13:31] waveprop: has joined #ruby
[07:13:49] aufi: has joined #ruby
[07:15:53] kreantos: has joined #ruby
[07:17:03] kreantos: has joined #ruby
[07:18:38] tAn: has joined #ruby
[07:20:26] sysvalve: has joined #ruby
[07:21:58] aduabu: has joined #ruby
[07:22:02] claudiuinberlin: has joined #ruby
[07:22:19] paranoicsan: has joined #ruby
[07:24:39] canteen4: has joined #ruby
[07:27:12] aduabu: has joined #ruby
[07:29:33] mark_66: has joined #ruby
[07:29:39] canteen4: has joined #ruby
[07:31:09] anisha__: has joined #ruby
[07:31:55] aduabu: has joined #ruby
[07:32:10] kapil___: has joined #ruby
[07:33:03] nofxx: imode, two seriously fun things to work...ruby and redis ;)
[07:36:02] imode: I have never felt this kind of freedom with a language before! it's exciting.
[07:39:56] Ropeney: has joined #ruby
[07:41:18] Silthias: has joined #ruby
[07:43:36] aduabu: speaking of redis .. I tried to cache remote api response with redis, but it keep hitting the api source each time I refresh, I was hoping it would be the less expensive option.. any ideas what I'm doing wrong
[07:44:45] anas: has joined #ruby
[07:46:17] canteen4: has joined #ruby
[07:46:30] marr: has joined #ruby
[07:46:50] ur5us: has joined #ruby
[07:48:46] bweston92: has joined #ruby
[07:49:28] aduabu: has joined #ruby
[07:49:35] claudiuinberlin: has joined #ruby
[07:51:12] claudiuinberlin: has joined #ruby
[07:53:06] dminuoso: nofxx: Only one of these two is fun.
[07:53:42] nowhere_man: has joined #ruby
[07:55:39] canteen4: has joined #ruby
[07:55:45] nofxx: dminuoso, hehe, ok, whatabout using redis with ruby?
[07:56:41] dminuoso: nofxx: If Salvatore wanted you, he would have given you native Ruby bindings. ;p
[07:57:38] mikecmpbll: has joined #ruby
[07:58:12] burgestrand: has joined #ruby
[07:58:54] bronson: has joined #ruby
[07:59:32] antgel: has joined #ruby
[08:02:58] frozengeek: has joined #ruby
[08:03:15] claudiuinberlin: has joined #ruby
[08:04:02] biberu: has joined #ruby
[08:04:28] nofxx: dminuoso, haha, we get close with hiredis, but, at least there's no python native bindings =P
[08:04:59] nofxx: heh, but maybe I'm just washing my dirties with it here, loose some time trying to run some stuff lately
[08:06:09] guille-moe: has joined #ruby
[08:07:11] ams__: has joined #ruby
[08:07:37] frozengeek: has joined #ruby
[08:09:17] aduabu: has joined #ruby
[08:12:03] dionysus69: has joined #ruby
[08:12:54] canteen4: has joined #ruby
[08:13:22] nowhere_man: has joined #ruby
[08:14:10] waveprop: has joined #ruby
[08:14:38] aduabu: has joined #ruby
[08:22:16] Cope: has joined #ruby
[08:22:28] dionysus69: has joined #ruby
[08:23:55] nofxxx: has joined #ruby
[08:26:31] tomphp: has joined #ruby
[08:26:39] cagomez: has joined #ruby
[08:27:02] claudiuinberlin: has joined #ruby
[08:35:06] ahrs: has joined #ruby
[08:37:35] Beams: has joined #ruby
[08:37:50] lxsameer: has joined #ruby
[08:39:15] Jameser: has joined #ruby
[08:40:43] cdg: has joined #ruby
[08:47:15] mtkd: has joined #ruby
[08:49:51] dionysus69: has joined #ruby
[08:52:14] mim1k: has joined #ruby
[08:53:27] dionysus69: has joined #ruby
[08:54:36] harfangk: has joined #ruby
[08:54:58] dangerousdave: has joined #ruby
[08:55:52] perlun: has joined #ruby
[08:56:45] perlun: Hi, I needed to recompile my Ruby from source to debug a memory leak in my application/some 3rd party dependency. However, the version I compiled gives a warning every time on boot:
[08:56:46] perlun: <main>: warning: pthread_create failed for timer: Invalid argument, scheduling broken
[08:57:08] dionysus69: has joined #ruby
[09:00:02] perlun: This is running on an Ubuntu 16.04 VM with VirtualBox on Vagrant. On my host macOS machine, it all works fine, compiled with the same flags. I have installed all the build dependencies.
[09:00:42] claudiuinberlin: has joined #ruby
[09:05:12] claudiuinberlin: has joined #ruby
[09:05:48] charliesome: has joined #ruby
[09:05:52] Pateros: your os sounds fucked
[09:06:47] Pateros: try spawn a new VM. do a sanity check that pthreads actually work. then recompile ruby.
[09:08:06] tvw: has joined #ruby
[09:08:55] Pateros: otherwise. if it keeps happening, then i think you'll have to isolate the problem with a ruby script, and find out why it is happening.
[09:10:22] matthewd: perlun: Are you compiling from scratch? Nothing that could be leaking through from your macOS build?
[09:14:30] jottr: has joined #ruby
[09:19:00] frozengeek: has joined #ruby
[09:21:52] wogi: has joined #ruby
[09:22:10] Puffball: has joined #ruby
[09:22:51] burgestrand: has joined #ruby
[09:22:58] brent__: has joined #ruby
[09:24:23] jaruga_________: has joined #ruby
[09:25:20] Defenestrate: has joined #ruby
[09:25:21] Defenestrate: has joined #ruby
[09:25:55] ResidentBiscuit: has joined #ruby
[09:26:39] pandaant: has joined #ruby
[09:29:27] lasey: has joined #ruby
[09:30:12] gixxer1k: has joined #ruby
[09:30:21] perlun: Pateros: thanks. I get it when I run `ruby -v` or similar trivial commands, so yes, something with pthreads seem seriously broken.
[09:30:48] perlun: matthewd: I was suspecting that also, and I did initially use the same working copy. But I've wiped it afterwards and unpacked the tar.gz from scratch
[09:31:42] matthewd: Try compiling from `apt-get source` instead, maybe?
[09:33:05] ur5us: has joined #ruby
[09:33:18] perlun: matthewd: could do, but it will give me a 2.3.0 instead of a 2.4.1
[09:34:07] Serpent7776: has joined #ruby
[09:34:30] matthewd: Yeah, I'd just be looking for a known-good baseline, to bound the search space in finding how the two differ
[09:34:47] ur5us: has joined #ruby
[09:35:06] perlun: matthewd: good point
[09:35:23] matthewd: (so assuming that's okay, I guess my next step would be a clean build from a 2.3.0 tarball, for example -- even though that's clearly not directly useful for your end-goal)
[09:37:42] jaruga__________: has joined #ruby
[09:40:16] perlun: matthewd: yes, will try that. I think I'll grab it from git instead, so I can easily switch between the releases also.
[09:40:22] perlun: thanks for the suggestion
[09:52:00] bladdezz: has joined #ruby
[09:52:53] tomphp: has joined #ruby
[09:53:30] sagax: has joined #ruby
[09:53:38] charliesome: has joined #ruby
[09:55:19] phaul: has joined #ruby
[09:55:50] canteen4: has joined #ruby
[09:56:51] tomphp: has joined #ruby
[09:58:14] neo95: has joined #ruby
[10:00:31] bronson: has joined #ruby
[10:02:03] aduabu: has joined #ruby
[10:02:04] sepp2k: has joined #ruby
[10:04:50] senape: has joined #ruby
[10:05:00] canteen4: has joined #ruby
[10:10:47] aduabu: has joined #ruby
[10:11:54] hfp_work: has joined #ruby
[10:12:44] jokke: how can i get a very large integer. like Float::INFINITY
[10:13:46] tvw: has joined #ruby
[10:14:05] matthewd: jokke: If you want infinity, the float might work
[10:14:29] dminuoso: jokke: Whats your goal?
[10:14:33] mim1k: has joined #ruby
[10:14:34] matthewd: jokke: If you just want a large number.. 10**[some number] ?
[10:14:49] jokke: i'm setting a limit to a database query
[10:15:02] Pateros: Float::INFINITY is beyond large. it has no finish. be ware of that or you'll just sit looking at infinite loops all day.
[10:15:04] jokke: or rather "unsetting" it
[10:15:19] dminuoso: jokke: Ah, so you need some large number that is effectively "infinite" as an upper boundary?
[10:15:29] matthewd: jokke: nil?
[10:15:48] jokke: A limit() value of 0 (i.e. .limit(0)) is equivalent to setting no limit.
[10:15:59] jokke: rtfm helps
[10:16:59] burgestrand: has joined #ruby
[10:17:05] ljarvis: was this an ActiveRecord question or something? this has nothing to do with Ruby tbh
[10:17:23] dminuoso: ACTION stabs ljarvis
[10:18:15] Pateros: dunno of `limit` method in ruby, so probably AR question
[10:18:19] ljarvis: the canonical way to remove an existing limit in AR is .limit(nil). You don't actually want a LIMIT to be added to the SQL, even if it's 0
[10:18:21] matthewd: ljarvis: It was a perfectly reasonable ruby question as asked... but it was an XY whose real answer involved the specific API in use
[10:18:48] matthewd: And yeah, not AR because .limit(0) isn't a thing
[10:18:53] canteen4: has joined #ruby
[10:19:06] ljarvis: not AR? what?
[10:19:31] Pateros: not supported is prob what he meant
[10:19:56] ljarvis: it's perfectly supported
[10:20:26] Pateros: ¯\(°_o)/¯
[10:20:41] matthewd: It's obviously not about AR, because jokke said they found .limit(0) was the documented right thing, and that's not true for AR
[10:20:50] ljarvis: but .limit(0) in AR is *not* equivalent to setting no limit
[10:21:40] jokke: it's the native mongodb driver
[10:22:03] aduabu: has joined #ruby
[10:23:15] anisha: has joined #ruby
[10:25:37] canteen4: has joined #ruby
[10:26:46] GodFather: has joined #ruby
[10:29:42] alfiemax: has joined #ruby
[10:31:02] tomphp: has joined #ruby
[10:31:11] cagomez: has joined #ruby
[10:33:42] aduabu: has joined #ruby
[10:36:56] canteen4: has joined #ruby
[10:40:45] aduabu: has joined #ruby
[10:44:21] canteen4: has joined #ruby
[10:46:53] cagomez: has joined #ruby
[10:49:12] aduabu: has joined #ruby
[10:51:19] mtkd: has joined #ruby
[10:51:47] canteen4: has joined #ruby
[10:52:44] hnt5lwbj: has joined #ruby
[10:54:13] ShalokShalom: has joined #ruby
[10:55:45] aduabu: has joined #ruby
[10:58:52] canteen4: has joined #ruby
[11:01:24] aduabu: has joined #ruby
[11:03:13] KeyJoo: has joined #ruby
[11:05:46] guille-moe: has joined #ruby
[11:06:37] apparition47: has joined #ruby
[11:07:05] bruno-: has joined #ruby
[11:08:00] InfinityFye: has joined #ruby
[11:09:31] canteen4: has joined #ruby
[11:09:32] perlun: matthewd: interesting, I get similar problems with a locally compiled Ruby 2.3.4 now...
[11:10:56] perlun: I wonder if jemalloc is causing the problems. I'll try compiling without it and see.
[11:11:08] matthewd: perlun: Using your compilation arguments, or the .deb build script?
[11:11:46] perlun: matthewd: in this case, my compilation arguments.
[11:12:02] perlun: you're right, I should try the `apt-get source` approach also.
[11:12:52] matthewd: Yeah, I'd wonder if the package has something special going on -- either a patch, or a specific config parameter
[11:13:04] BSaboia: has joined #ruby
[11:13:23] Pateros: stock ruby compiles and works fine for me on ubuntu
[11:13:33] matthewd: Either way, if you can find it, you might be able to transplant it to the thing you actually want to build
[11:15:40] aduabu: has joined #ruby
[11:19:08] canteen4: has joined #ruby
[11:19:28] camilasan: has joined #ruby
[11:22:12] perlun: interesting: compiling _with_ jemalloc gives me a Ruby that can't create pthreads. compiling _without_ jemalloc gives me one that works.
[11:23:38] mim1k: has joined #ruby
[11:26:33] aduabu: has joined #ruby
[11:29:40] xcesariox: has joined #ruby
[11:29:47] canteen4: has joined #ruby
[11:32:06] sajbar: has joined #ruby
[11:32:11] ldnunes: has joined #ruby
[11:33:01] sajbar: anybody that can recommend a free IDE that runs on mac, that does basic stuff like autocompletion and stuff like that
[11:35:29] aduabu: has joined #ruby
[11:37:38] cagomez: has joined #ruby
[11:38:38] canteen4: has joined #ruby
[11:39:51] cdg: has joined #ruby
[11:40:00] Pateros: rubymine for "IDE" but sublime text, atom, ..
[11:40:58] xcesariox: has joined #ruby
[11:41:18] charliesome: has joined #ruby
[11:43:32] Mon_Ouie: has joined #ruby
[11:44:23] xcesariox: has joined #ruby
[11:45:07] t-recx: has joined #ruby
[11:45:17] znz_jp: has joined #ruby
[11:45:55] perlun: sajbar: Visual Studio Code is what I use.
[11:46:15] perlun: I like its integrated debugger/launcher.
[11:46:39] burgestrand: has joined #ruby
[11:47:46] gregf_: has joined #ruby
[11:49:19] aduabu: has joined #ruby
[11:50:12] sajbar: perlun: thanks, I'll try that one
[11:50:14] Pateros: nice. it works with Ruby and OSX?
[11:50:27] aupadhye: has joined #ruby
[11:51:17] cabotto: has joined #ruby
[11:51:22] VladGh: has joined #ruby
[11:53:33] canteen4: has joined #ruby
[11:55:42] gixxer1k: has joined #ruby
[11:56:25] perlun: Pateros: that's where I use it. I don't use the code completion, but "go to definition" is really great. It messes up if you have methods with the same name in different classes, but it's still a great step in the right direction.
[11:56:45] xcesariox: has joined #ruby
[11:59:41] aduabu: has joined #ruby
[12:00:03] Pateros: for sure. great to have more options
[12:00:08] synthroid: has joined #ruby
[12:01:26] bronson: has joined #ruby
[12:01:55] knight33: has joined #ruby
[12:03:53] claudiuinberlin: has joined #ruby
[12:04:04] canteen4: has joined #ruby
[12:05:40] perlun: Pateros: vscode is great in that it's truly polyglot. The support for JavaScript and especially TypeScript is great. Also C# support works quite well. Not as great as in regular Visual Studio, but still really really nice for a FOSS application which has only been in development for a couple of years.
[12:08:04] aduabu: has joined #ruby
[12:08:54] dionysus69: how would I coolify this line ? https://gist.github.com/anonymous/598c506dad7145d3bd145b13ef699f25
[12:09:16] dionysus69: seems clumsy atm
[12:09:42] skweek: has joined #ruby
[12:10:32] ldnunes: has joined #ruby
[12:10:45] quiqua: has joined #ruby
[12:10:49] Papierkorb: dionysus69: `@selected_id = @property&.town&.id || Town.tbilisi_id` - Not 100% semantically equivalent
[12:11:01] Papierkorb: dionysus69: Or Object#try if you're using ActiveSupport (Rails)
[12:11:13] dionysus69: what does this mean? &
[12:11:37] Papierkorb: `&.` does a nil-check, and only calls the following method if the value is non-nil
[12:11:42] dionysus69: @property.try("town.id") ?
[12:11:59] ljarvis: dont use try if you can use &. -- they also do very different things
[12:11:59] tomphp: has joined #ruby
[12:12:00] dionysus69: oh nice, today I learned something xD
[12:12:19] dionysus69: well ye, & sounds simpler too
[12:12:23] dionysus69: I ll stick with it thanks :)
[12:14:04] alfiemax: has joined #ruby
[12:15:11] nadir: has joined #ruby
[12:15:40] sysvalve: has joined #ruby
[12:15:41] hutch34: has joined #ruby
[12:18:13] canteen4: has joined #ruby
[12:18:32] Pateros: perlun: nice
[12:18:52] tomphp: has joined #ruby
[12:20:25] simmaniac: has joined #ruby
[12:21:34] agimenez: has joined #ruby
[12:21:39] xcesariox: has joined #ruby
[12:22:46] brent__: has joined #ruby
[12:25:55] quobo: has joined #ruby
[12:26:58] bruno-: has joined #ruby
[12:28:34] DTZUZO: has joined #ruby
[12:28:40] aduabu: has joined #ruby
[12:28:54] bkxd: has joined #ruby
[12:29:00] tvw: has joined #ruby
[12:30:55] konsolebox: has joined #ruby
[12:32:32] canteen4: has joined #ruby
[12:34:50] sajbar: has left #ruby: ()
[12:35:54] aduabu: has joined #ruby
[12:37:39] gnufied: has joined #ruby
[12:39:45] canteen4: has joined #ruby
[12:39:50] claudiuinberlin: has joined #ruby
[12:43:29] aduabu: has joined #ruby
[12:48:51] imperator: has joined #ruby
[12:50:28] canteen4: has joined #ruby
[12:52:47] hutch34: has joined #ruby
[12:52:52] aduabu: has joined #ruby
[12:55:08] canteen4: has joined #ruby
[12:55:26] neo95: has joined #ruby
[12:56:06] kreantos_: has joined #ruby
[12:56:22] vondruch: has joined #ruby
[12:58:57] mim1k: has joined #ruby
[12:59:23] imperator: al2o3-cr, good morning, have another faraday question for you :)
[12:59:47] imperator: (or anyone who is up for it)
[12:59:59] imperator: I'm using oauth2, which uses faraday under the hood for requests
[13:00:10] frozengeek: has joined #ruby
[13:00:38] imperator: However, oauth2 appears to ignore custom error handlers on failed requests, raising an OAuth2::Error instead of using my custom handler
[13:00:42] imperator: https://gist.github.com/djberg96/ad863b3bf1109424b1522edb09ecc27a
[13:01:12] imperator: ideas on how to make it use the handler instead?
[13:01:59] ResidentBiscuit: has joined #ruby
[13:03:01] dminuoso: ast>> def foo(arg); puts 1+1; end
[13:03:02] ruby[bot]: dminuoso: I have parsed your code, the result is at https://eval.in/851906
[13:03:17] hutch34: has joined #ruby
[13:05:25] alibby: has joined #ruby
[13:06:18] lxsameer: has joined #ruby
[13:08:13] aduabu: has joined #ruby
[13:08:17] cdg: has joined #ruby
[13:08:25] quiqua: has joined #ruby
[13:09:42] Defenestrate: has joined #ruby
[13:09:42] Defenestrate: has joined #ruby
[13:11:02] aufi: has joined #ruby
[13:11:45] tvw: has joined #ruby
[13:14:02] bruno-: has joined #ruby
[13:14:10] jordanm: has joined #ruby
[13:14:10] nopolitica: has joined #ruby
[13:16:40] canteen4: has joined #ruby
[13:17:08] cdg_: has joined #ruby
[13:20:13] aduabu: has joined #ruby
[13:21:29] dionysus69: both this town_district.try(:name).prepend('- ')
[13:21:45] dionysus69: and town_district&.name.prepend('- ') give undefinied method for nil class if name is nil
[13:21:54] dionysus69: how do i rescue out of it?!
[13:22:12] laphoraig92: has joined #ruby
[13:25:02] dionysus69: ok I ended up with second try but it had some weird syntax if it involves calling a method with an argument
[13:26:38] canteen4: has joined #ruby
[13:28:08] mson: has joined #ruby
[13:30:41] aduabu: has joined #ruby
[13:34:01] canteen4: has joined #ruby
[13:37:43] aduabu: has joined #ruby
[13:40:49] canteen4: has joined #ruby
[13:44:13] Sylario: has joined #ruby
[13:45:23] xcesariox: has joined #ruby
[13:46:18] enterprisey: has joined #ruby
[13:47:50] aduabu: has joined #ruby
[13:50:04] canteen4: has joined #ruby
[13:50:37] yaewa: has joined #ruby
[13:51:43] chouhoulis: has joined #ruby
[13:54:14] aduabu: has joined #ruby
[13:55:49] Klumben: has joined #ruby
[13:55:53] Kyoshiro: has left #ruby: ("Ex-Chat")
[13:57:01] dyjakan: has joined #ruby
[13:57:17] huyderman: has joined #ruby
[13:57:56] dyjakan: has left #ruby: ()
[13:58:54] perlun: dionysus69: town_district&.name&.prepend('-') should work?
[13:59:23] al2o3-cr: imperator: i've only just seen your question, but i think you might need `raise_errors: false` in your request.
[13:59:41] imperator: al2o3-cr, tried that, it just does nothing then
[14:00:24] dionysus69: perlun: ok I guess that's easier :D
[14:00:28] ule: town_district&.name&.prepend('-') || "-#{town_district}"
[14:00:49] qCMFMcuB: has joined #ruby
[14:02:15] bronson: has joined #ruby
[14:03:02] GodFather: has joined #ruby
[14:05:18] canteen4: has joined #ruby
[14:05:42] ResidentBiscuit: has joined #ruby
[14:11:07] aduabu: has joined #ruby
[14:13:56] aufi: has joined #ruby
[14:14:04] canteen4: has joined #ruby
[14:14:11] runescape07rsps: has joined #ruby
[14:16:11] al2o3-cr: *phone call* - hmm, no to sure then. let me take a look
[14:16:24] tlaxkit: has joined #ruby
[14:16:27] alfiemax: has joined #ruby
[14:16:47] polishdub: has joined #ruby
[14:17:06] phaul: has joined #ruby
[14:19:15] xcesariox: has joined #ruby
[14:20:47] aduabu: has joined #ruby
[14:21:20] Rapture: has joined #ruby
[14:24:46] canteen4: has joined #ruby
[14:25:45] theunraveler: has joined #ruby
[14:27:05] samlisl_: has joined #ruby
[14:27:26] tvw: has joined #ruby
[14:27:47] facest: has joined #ruby
[14:29:21] aduabu: has joined #ruby
[14:32:36] mikecmpb_: has joined #ruby
[14:36:23] claudiuinberlin: has joined #ruby
[14:38:39] canteen4: has joined #ruby
[14:40:54] claudiuinberlin: has joined #ruby
[14:40:55] droidburgundy: has joined #ruby
[14:41:04] pandaant: has joined #ruby
[14:41:06] Defenestrate: has joined #ruby
[14:41:54] Defenestrate: has joined #ruby
[14:41:54] Defenestrate: has joined #ruby
[14:41:55] imperator: al2o3-cr, np, thanks
[14:42:47] Defenestrate: has joined #ruby
[14:43:33] Defenestrate: has joined #ruby
[14:43:33] Defenestrate: has joined #ruby
[14:44:36] Defenestrate: has joined #ruby
[14:45:01] chouhoulis: has joined #ruby
[14:46:48] TomyWork: has joined #ruby
[14:49:02] roshanavand: has joined #ruby
[14:49:22] sepp2k: has joined #ruby
[14:51:46] skweek: has joined #ruby
[14:53:19] aduabu: has joined #ruby
[14:55:46] canteen4: has joined #ruby
[14:55:54] vondruch: has joined #ruby
[14:58:12] aduabu: has joined #ruby
[14:59:51] rippa: has joined #ruby
[15:00:06] cdg: has joined #ruby
[15:00:14] sysvalve: has joined #ruby
[15:01:04] simmaniac: has joined #ruby
[15:01:22] vondruch: has joined #ruby
[15:01:51] cdg: has joined #ruby
[15:03:48] cdg_: has joined #ruby
[15:04:22] cdg__: has joined #ruby
[15:05:03] ctp: has joined #ruby
[15:13:54] mikecmpbll: has joined #ruby
[15:13:56] canteen4: has joined #ruby
[15:14:09] TomyWork: has joined #ruby
[15:14:38] milardovich: has joined #ruby
[15:15:30] charliesome: has joined #ruby
[15:18:50] howdoi: has joined #ruby
[15:18:53] synthroid: has joined #ruby
[15:22:45] aduabu: has joined #ruby
[15:23:07] synthroid: has joined #ruby
[15:29:23] alfiemax: has joined #ruby
[15:29:51] skweek: has joined #ruby
[15:32:22] cagomez: has joined #ruby
[15:32:47] bkxd: has joined #ruby
[15:32:57] tenderlove: has joined #ruby
[15:33:08] knight33: has joined #ruby
[15:33:17] tenderlo_: has joined #ruby
[15:33:24] chouhoulis: has joined #ruby
[15:33:57] cagomez: has joined #ruby
[15:37:13] ShalokShalom: has joined #ruby
[15:41:17] canteen4: has joined #ruby
[15:44:40] Trynemjoel: has joined #ruby
[15:44:45] brent__: has joined #ruby
[15:45:41] konsolebox: has joined #ruby
[15:45:44] brent__: has joined #ruby
[15:46:23] dionysus69: has joined #ruby
[15:47:21] skweek: has joined #ruby
[15:48:44] Ouchy: has joined #ruby
[15:50:17] aduabu: has joined #ruby
[15:50:33] armyriad: has joined #ruby
[15:51:41] kreantos: has joined #ruby
[15:51:45] alfiemax: has joined #ruby
[15:54:45] canteen4: has joined #ruby
[15:54:59] Prutheus: has joined #ruby
[15:55:01] kendocod`: has joined #ruby
[15:55:41] Prutheus: Hello! Wanna compile a program with gtk3 via OCRA to an exe. But ocra results with this error: https://bpaste.net/show/5690cdcb840e What does this mean? How can I fix it? If you need any more info, e.g. code or whatever, just tell me please....
[15:57:12] [Butch]: has joined #ruby
[15:58:49] aduabu: has joined #ruby
[15:59:01] quobo: has joined #ruby
[16:02:01] contradictioned: has joined #ruby
[16:02:09] Ropeney: has joined #ruby
[16:03:39] bronson: has joined #ruby
[16:06:02] belmoussaoui_: has joined #ruby
[16:06:57] frozengeek: has joined #ruby
[16:07:34] cdg: has joined #ruby
[16:08:13] GodFather: has joined #ruby
[16:11:11] canteen4: has joined #ruby
[16:11:49] gusrub: has joined #ruby
[16:14:25] aduabu: has joined #ruby
[16:14:43] GinoMan: has joined #ruby
[16:15:07] skweek: has joined #ruby
[16:15:34] eckhardt: has joined #ruby
[16:17:22] phaul: has joined #ruby
[16:17:43] oleo: has joined #ruby
[16:17:59] conta: has joined #ruby
[16:21:30] canteen4: has joined #ruby
[16:24:09] cdg: has joined #ruby
[16:25:15] imperator: has joined #ruby
[16:26:06] nrdb: has joined #ruby
[16:26:37] cdg: has joined #ruby
[16:28:09] aduabu: has joined #ruby
[16:28:33] wogi: has left #ruby: ()
[16:28:51] astronavt: has joined #ruby
[16:29:02] astronavt: has left #ruby: ()
[16:30:04] nrdb: I was wondering why RoR requires so many different applications to deploy. Mina, unicorn, nginx for example. Why so many? What do they do?
[16:32:34] cdg: has joined #ruby
[16:34:05] canteen4: has joined #ruby
[16:34:14] milardovich: has joined #ruby
[16:34:30] claudiuinberlin: has joined #ruby
[16:35:31] droidburgundy: has joined #ruby
[16:37:11] Papierkorb: Never heard of mina. Unicorn is the http server it uses for the application itself (there are many to choose from), but it's not a separate application to deploy. You don't *need* NGINX or any other front-end loadbalancer, but it's a good idea for many reasons, regardless if you use RoR, or NodeJS, or whatever else is hip right now
[16:37:19] t-recx: has joined #ruby
[16:37:55] orbyt_: has joined #ruby
[16:41:02] GinoMan2440: has joined #ruby
[16:41:37] kahra: has joined #ruby
[16:42:11] bruno-_: has joined #ruby
[16:42:39] nemesit|znc: has left #ruby: ("WeeChat 1.5")
[16:46:48] lacuna: has joined #ruby
[16:47:25] eam: does anyone know why unicorn came about instead of say developing a mod_ruby for apache?
[16:50:35] davidmichaelkarr: has joined #ruby
[16:50:37] aduabu: has joined #ruby
[16:51:07] davidmichaelkarr: has left #ruby: ()
[16:51:40] apeiros: eam: there is (or by now maybe "was") a mod_ruby
[16:52:00] apeiros: it had issues. don't remember which, though, since when I came to ruby, it was already declared dead.
[16:52:42] eam: I guess I should say I wonder why folks didn't develop a new mod_ruby
[16:52:57] apeiros: good question. I have no idea.
[16:53:52] apeiros: history as I remember was: mod_ruby -> mongrel -> mod_passenger -> exploooosion (puma, unicorn, and a couple of others which are already gone again)
[16:54:03] minimalism: has joined #ruby
[16:56:13] SeepingN: has joined #ruby
[16:56:39] kendocode: has joined #ruby
[16:57:14] mtkd: has joined #ruby
[16:57:39] nopolitica: has joined #ruby
[16:57:58] robouk: has joined #ruby
[16:58:12] frozengeek: has joined #ruby
[16:58:25] AndChat182964: has joined #ruby
[16:59:48] AndChat182964: Anyone looking for assistant?
[16:59:49] AndChat182964: <AndChat182964> I want to learn coding by assisting
[17:01:11] moei: has joined #ruby
[17:01:40] havenwood: eam: I think the Passenger folk did too good of a job fixing all the issues that mod_ruby was having. Since they released the Nginx and standalone version too and really-well maintained them nobody else has stepped up to duplicate.
[17:02:32] havenwood: I guess mod_mruby and mruby_ngx are spiritual successors.
[17:03:30] havenwood: I guess Rails was having issues with mod_ruby so Passenger called theirs mod_rails.
[17:04:03] belmoussaoui__: has joined #ruby
[17:05:14] tomphp: has joined #ruby
[17:07:21] raynold: has joined #ruby
[17:09:18] canteen4: has joined #ruby
[17:10:08] droidburgundy: has joined #ruby
[17:11:35] zachk: has joined #ruby
[17:11:37] bronson: has joined #ruby
[17:12:43] aduabu: has joined #ruby
[17:14:43] belmoussaoui__: has joined #ruby
[17:14:57] phaul: has joined #ruby
[17:16:35] imode: has joined #ruby
[17:19:28] AndChat182964: has left #ruby: ("Leaving")
[17:20:16] gothicsouth: has joined #ruby
[17:20:53] vondruch: has joined #ruby
[17:21:31] milardov_: has joined #ruby
[17:23:03] canteen4: has joined #ruby
[17:24:32] belmoussaoui: has joined #ruby
[17:26:02] aduabu: has joined #ruby
[17:26:23] vondruch: has joined #ruby
[17:29:40] kies: has joined #ruby
[17:30:12] belmoussaoui: has joined #ruby
[17:32:15] canteen4: has joined #ruby
[17:34:10] swills: has joined #ruby
[17:35:48] ur5us: has joined #ruby
[17:36:45] nrdb: so nginx is a load balancer?
[17:37:12] eam: it's a http server, and most all http servers can be configured to be routers or load balancers
[17:37:26] rabajaj: has joined #ruby
[17:37:49] eam: in general (and not specific to ruby) you'll have an application server which lets you run a set of worker processes with all your app logic
[17:38:02] havenwood: nrdb: Nginx is an Apache competitor.
[17:38:03] eam: and typically you'll have a smaller, high performance http server in front of that to handle slow clients
[17:38:17] havenwood: and static file serving
[17:39:08] conta: has joined #ruby
[17:39:33] havenwood: nrdb: Unicorn, for example, has a really rough time handling slow clients. So you reverse proxy from Nginx to Unicorn, and problem solved.
[17:39:38] eam: workers are typically memory bound; you don't want to spend a heavy worker process doing things like handshaking over the network, transmitting data, etc
[17:40:01] Rapture: has joined #ruby
[17:40:06] havenwood: You could instead use Rainbows! to handle slow clients in Ruby in front of Unicorn, but Apache and Nginx and battle-tested and performant.
[17:41:08] havenwood: nrdb: You *can* just serve Puma up on port 443, but for reasons above it's much more popular to reverse proxy to the Ruby webserver port or more often socket.
[17:41:12] sekmo: has joined #ruby
[17:41:31] zenit: has joined #ruby
[17:41:38] havenwood: nrdb: Run Ruby app on a socket, point Nginx or Apache to it as a reverse proxy.
[17:43:57] nrdb: so you have a webserver (nginx or apache) point to another app that is actually the RoR server?
[17:44:18] havenwood: nrdb: Here's an example setup: https://www.digitalocean.com/community/tutorials/how-to-deploy-a-rails-app-with-unicorn-and-nginx-on-ubuntu-14-04
[17:44:35] DroidBur_: has joined #ruby
[17:44:39] havenwood: nrdb: Unicorn listens on a socket: listen "#{shared_dir}/sockets/unicorn.sock"
[17:45:31] havenwood: nrdb: And Nginx reverse proxies to it: location @app { proxy_pass http://app; ... }
[17:45:40] jordanm: has joined #ruby
[17:46:27] zenit: has joined #ruby
[17:47:07] nrdb: how is unicorn different from the "rails server"?
[17:47:28] havenwood: nrdb: Rails ships with Puma as the default server.
[17:48:01] havenwood: nrdb: Just `rails s` on a default Rails 5 app will be Puma on port 3000.
[17:48:19] nrdb: is unicorn better than puma?
[17:48:29] banisterfiend: has joined #ruby
[17:48:32] havenwood: nrdb: If you swap out Puma for Unicorn in your Gemfile and bundle, it'd be Unicorn.
[17:48:41] havenwood: nrdb: No, not particularly. They're both very nice.
[17:49:27] havenwood: nrdb: I'd suggest sticking with the Rails default stack until you have a reason to switch - unless just experimenting, in which case carry on!
[17:49:41] havenwood: nrdb: They've chosen a nice selection.
[17:50:05] havenwood: ACTION ponders whether to resist omakase
[17:50:14] havenwood: ACTION caves
[17:50:16] havenwood: nrdb: http://david.heinemeierhansson.com/2012/rails-is-omakase.html
[17:50:49] havenwood: TL;DR: Here's a dramatic reading of the above: https://www.youtube.com/watch?v=E99FnoYqoII
[17:50:54] vondruch: has joined #ruby
[17:52:16] gusrub: has joined #ruby
[17:52:28] orbyt_: has joined #ruby
[17:52:30] mostlybadfly: has joined #ruby
[17:54:01] harai: has joined #ruby
[17:54:43] nrdb: havenwood, so if I understand this... we have nginx filter out static pages requests and just offload the RoR stuff to another program for the heavy lifting?
[17:55:14] havenwood: nrdb: Yes, the typical setup is that Nginx/Apache serve static files directly without pestering the Rails app.
[17:55:47] lxsameer: has joined #ruby
[17:56:01] havenwood: nrdb: Then app traffic is reverse proxied to the Rails app directly.
[17:56:06] TomyLobo: has joined #ruby
[17:56:34] havenwood: nrdb: You can have Rails serve static files, but it's very common to offload that responsibility.
[17:57:06] havenwood: nrdb: You can set it either way depending on the Rails environment in your Rails environment configuration.
[17:57:18] havenwood: config/environments/*
[17:57:37] havenwood: nrdb: The #RubyOnRails channel can go into detail on configuration options.
[17:57:51] nrdb: havenwood, ok I understand that. so why use something different from the default puma server?
[17:58:19] havenwood: nrdb: Apache/Nginx can handle more static file load with less memory and it's easy to configure.
[17:58:27] havenwood: nrdb: It's not necessary.
[17:59:03] imode: has joined #ruby
[17:59:49] gusrub: has joined #ruby
[18:01:24] vondruch: has joined #ruby
[18:02:36] droidburgundy: has joined #ruby
[18:02:49] milardovich: has joined #ruby
[18:02:52] ltem: has joined #ruby
[18:08:44] lacuna: has joined #ruby
[18:10:54] vondruch: has joined #ruby
[18:11:14] aduabu: has joined #ruby
[18:14:02] swills: has joined #ruby
[18:14:03] swills: has joined #ruby
[18:14:30] canteen4: has joined #ruby
[18:15:58] aduabu: has joined #ruby
[18:16:24] vondruch: has joined #ruby
[18:17:12] uZiel: has joined #ruby
[18:17:25] alfiemax: has joined #ruby
[18:18:29] Guest40: has joined #ruby
[18:18:54] canteen4: has joined #ruby
[18:19:47] workmad3: has joined #ruby
[18:21:22] hahuang65: has joined #ruby
[18:21:51] tomphp: has joined #ruby
[18:21:59] KeyJoo: has joined #ruby
[18:22:42] FrostCandy: has joined #ruby
[18:24:48] lxsameer: has joined #ruby
[18:27:27] jinie: has joined #ruby
[18:28:14] synthroid: has joined #ruby
[18:29:25] yqt: has joined #ruby
[18:29:36] belmoussaoui: has joined #ruby
[18:30:27] Guest40: has joined #ruby
[18:30:49] Ouchy`w: has joined #ruby
[18:31:47] ramfjord: has joined #ruby
[18:31:55] GodFather: has joined #ruby
[18:33:05] nrdb: havenwood, thanks for all the info
[18:33:53] Ouchy: has joined #ruby
[18:33:53] Ouchy: has joined #ruby
[18:34:17] aduabu: has joined #ruby
[18:36:54] Hanmac: has joined #ruby
[18:37:13] canteen4: has joined #ruby
[18:39:26] aduabu: has joined #ruby
[18:40:07] belmoussaoui: has joined #ruby
[18:42:18] canteen4: has joined #ruby
[18:43:25] milardovich: has joined #ruby
[18:45:22] aduabu: has joined #ruby
[18:46:06] ShalokShalom: has joined #ruby
[18:47:56] canteen4: has joined #ruby
[18:49:22] Ouchy`w: has joined #ruby
[18:50:00] Ouchy: has joined #ruby
[18:50:00] Ouchy: has joined #ruby
[18:50:56] bauruine: has joined #ruby
[18:51:56] jjaii9: has joined #ruby
[18:53:01] high_fiver: has joined #ruby
[18:53:40] alfiemax: has joined #ruby
[18:54:41] aduabu: has joined #ruby
[18:57:33] tAn: has joined #ruby
[18:58:44] canteen4: has joined #ruby
[19:00:01] aduabu: has joined #ruby
[19:00:07] jobewan: has joined #ruby
[19:02:56] ledestin: has joined #ruby
[19:04:09] canteen4: has joined #ruby
[19:04:12] raul782: has joined #ruby
[19:04:28] yosafbridge: has joined #ruby
[19:04:45] phaul: has joined #ruby
[19:06:17] MrMorkel: has joined #ruby
[19:07:32] MrMorkel: I try to mock Stripe::Customer.retrieve with mocha. Is this possible?
[19:09:17] ule: MrMorkel: VCR would be a good fit for that
[19:10:01] MrMorkel: ule: Thanks i use vcr. I thought it better to mock some requests
[19:11:02] milardovich: has joined #ruby
[19:14:44] aduabu: has joined #ruby
[19:16:45] WeiJunLi: has joined #ruby
[19:17:55] uZiel: has joined #ruby
[19:18:43] harai: has joined #ruby
[19:21:07] canteen4: has joined #ruby
[19:21:33] perniciouscaffei: has joined #ruby
[19:21:36] knight33: has joined #ruby
[19:24:46] aduabu: has joined #ruby
[19:26:53] canteen4: has joined #ruby
[19:27:35] eam: I don't suppose anyone's tried the various ruby netlink bindings and has a favorite to recommend?
[19:29:53] aduabu: has joined #ruby
[19:32:11] al2o3-cr: eam: only one i know of is https://github.com/kleymenus/netlink
[19:32:24] canteen4: has joined #ruby
[19:32:51] al2o3-cr: although i've never used it, so can't say anything about it :(
[19:34:24] aduabu: has joined #ruby
[19:35:48] GinoMan1423: has joined #ruby
[19:36:46] al2o3-cr: it must be possible to use netlink sockets from stdlib no?
[19:38:37] gixxer1k1k: has joined #ruby
[19:39:07] eam: I can definitely create a socket with vanilla ruby Socket stuff, but what I really want to avoid implementing is the message format
[19:39:33] eam: am currently giving the above netlink gem a spin, will see what works - I saw a couple others as well
[19:40:14] eam: it built as soon as I fixed this silly error: ERROR: While executing gem ... (Gem::InvalidSpecificationException) "FIXME" or "TODO" is not a description
[19:40:17] assembledbits: has joined #ruby
[19:40:22] eam: s/TODO//g
[19:40:52] vondruch: has joined #ruby
[19:41:48] al2o3-cr: yeah, i'd imagine it's a pain to implement tbh
[19:41:55] kapil___: has joined #ruby
[19:43:00] al2o3-cr: netlinks is the future
[19:44:27] neo95: has joined #ruby
[19:46:15] al2o3-cr: i was going to create a my first gem soley for iptables using netlinks, then got lazy :P
[19:46:30] eam: I want to extract some taskstats data but I can't find any userland tools to do so
[19:47:27] milardovich: has joined #ruby
[19:48:00] al2o3-cr: something i've not dug into tbf
[19:48:18] eam: me either!
[19:48:31] vondruch: has joined #ruby
[19:50:03] canteen4: has joined #ruby
[19:52:32] aduabu: has joined #ruby
[19:52:34] gusrub: has joined #ruby
[19:54:10] hahuang65: has joined #ruby
[19:56:25] canteen4: has joined #ruby
[19:56:54] mikecmpbll: has joined #ruby
[19:57:59] milardovich: has joined #ruby
[19:59:38] eckhardt: has joined #ruby
[20:01:30] gothicsouth: has joined #ruby
[20:03:24] imode: man, ruby code really does devolve into DSLs.
[20:03:59] emilford: has joined #ruby
[20:04:26] belmoussaoui: has joined #ruby
[20:04:36] imode: use_if? (is_type? :list and condition) do |db|\n yield db, @key;\n end
[20:05:54] imode: checks to see if the desired key we latched onto in Redis exists, has type 'list', and the condition afterwards is true. if so, it yields the db handle as well as the key associated with the list.
[20:06:03] imode: this is such a fun language.
[20:06:17] Rapture: has joined #ruby
[20:06:25] havenwood: https://www.ruby-lang.org/en/news/2017/08/29/multiple-vulnerabilities-in-rubygems/
[20:06:29] havenwood: gem update --system
[20:06:35] SeepingN: but unlike other 1 liners it isn't a complete disaster to decipher
[20:06:46] imode: no kidding. feels very forth-like without the mess.
[20:06:50] cagomez: has joined #ruby
[20:09:02] Pateros: heh. rubygems was thoroughly owned
[20:09:21] kies: has joined #ruby
[20:12:17] belmoussaoui_: has joined #ruby
[20:12:19] SeepingN: yeah. I suppose I should show this to our IT guy
[20:12:25] SeepingN: then I'm sure it will break something, somehow
[20:13:37] korzybski: has joined #ruby
[20:13:45] phinxy: has joined #ruby
[20:14:17] imode: welp, just upgraded. thanks for the PSA!
[20:15:04] Chasetopher: has joined #ruby
[20:19:06] aduabu: has joined #ruby
[20:21:08] haylon: has joined #ruby
[20:23:23] canteen4: has joined #ruby
[20:23:27] claudiuinberlin: has joined #ruby
[20:25:27] kreantos: has joined #ruby
[20:25:55] aduabu: has joined #ruby
[20:28:50] milardov_: has joined #ruby
[20:30:30] uZiel: has joined #ruby
[20:32:06] canteen4: has joined #ruby
[20:35:31] aduabu: has joined #ruby
[20:38:59] amosbird: has joined #ruby
[20:39:45] belmoussaoui: has joined #ruby
[20:42:13] raul782: has joined #ruby
[20:45:06] belmoussaoui: has joined #ruby
[20:45:46] runescape07rsps: has joined #ruby
[20:47:56] canteen4: has joined #ruby
[20:50:06] __Yiota: has joined #ruby
[20:51:20] aduabu: has joined #ruby
[20:53:13] ur5us: has joined #ruby
[20:55:30] canteen4: has joined #ruby
[20:59:31] aduabu: has joined #ruby
[21:00:43] ramfjord_: has joined #ruby
[21:02:04] neo95: has joined #ruby
[21:03:15] bkxd: has joined #ruby
[21:04:57] chouhoul_: has joined #ruby
[21:06:31] jamiejackson: has joined #ruby
[21:07:18] Ouchy`w: has joined #ruby
[21:07:36] ramfjord_: has joined #ruby
[21:09:40] jottr: has joined #ruby
[21:11:55] gothicsouth: has joined #ruby
[21:15:50] ramfjord: has joined #ruby
[21:18:32] canteen4: has joined #ruby
[21:19:09] justinweiss: has joined #ruby
[21:20:03] milardovich: has joined #ruby
[21:21:50] ramfjord: has joined #ruby
[21:21:53] neo95: has joined #ruby
[21:24:37] aduabu: has joined #ruby
[21:26:25] bkxd: has joined #ruby
[21:27:45] canteen4: has joined #ruby
[21:28:20] GodFather: has joined #ruby
[21:30:19] Dimik: has joined #ruby
[21:30:44] ramfjord: has joined #ruby
[21:30:46] ramfjord_: has joined #ruby
[21:31:54] waveprop: has joined #ruby
[21:33:47] aduabu: has joined #ruby
[21:34:47] bkxd: has joined #ruby
[21:38:03] canteen4: has joined #ruby
[21:38:32] mson: has joined #ruby
[21:44:20] aduabu: has joined #ruby
[21:45:33] carnegie: has joined #ruby
[21:47:17] hahuang65: has joined #ruby
[21:48:24] __Yiota: has joined #ruby
[21:49:15] GodFather: has joined #ruby
[21:50:08] kt: has joined #ruby
[21:51:46] raul782: has joined #ruby
[21:53:33] canteen4: has joined #ruby
[21:56:29] aduabu: has joined #ruby
[21:57:07] Pateros: @havenwood i think what DHH article misses is the prominence making a gem 'default' can mean. if it's only one line to remove, it's only one line to add, without promoting it as 'standard'.
[21:57:23] juria_roberts: has joined #ruby
[21:59:16] Pateros: basically adding a default gem to rails stock gemfile can make it part of rails culture, and other options are given less thought. that's my experience. so it's not as black and white as it is being painted imo
[22:00:32] tenderlove: has joined #ruby
[22:01:22] milardov_: has joined #ruby
[22:02:08] dviola: has joined #ruby
[22:03:26] harai: has joined #ruby
[22:07:00] canteen4: has joined #ruby
[22:07:51] GodFather: has joined #ruby
[22:10:21] Pateros: it's more like, "here's 5 diners. eat with them. none of them want to do anything non-standard. so eat this frog, like it, and don't complain".
[22:11:02] zenspider: yes... that's exactly what it is like...
[22:11:24] neo95: has joined #ruby
[22:12:49] bkxd: has joined #ruby
[22:13:49] pugcs1: has joined #ruby
[22:17:34] enterprisey: has joined #ruby
[22:21:17] droidburgundy: has joined #ruby
[22:21:37] Pateros: in a sense. i've worked with a lot of developers who are against moving to non-standard or unofficially recommended tools, even when there's merit to do so. the exception seems to be rspec.
[22:23:06] weaksauce: has joined #ruby
[22:23:09] aduabu: has joined #ruby
[22:23:22] Pateros: that's why coffeescript in particular was painful. but.. webpack in rails5. so at least there's that. hopefully ES6 will be a default in the future.
[22:24:13] mim1k: has joined #ruby
[22:24:31] __Yiota: has joined #ruby
[22:25:06] cdg: has joined #ruby
[22:28:45] GinoMan: has joined #ruby
[22:28:56] canteen4: has joined #ruby
[22:32:21] aduabu: has joined #ruby
[22:33:03] Pateros: btw context is http://david.heinemeierhansson.com/2012/rails-is-omakase.html frog analogy isn't random :)
[22:34:23] imode: if people have a problem with rails, go to sinatra.
[22:34:32] imode: if people have a problem with sinatra.. use cgi. ;)
[22:35:17] Pateros: sure. if the world was that flexible it'd be great. in a lot of cases there isn't a choice other than rails
[22:35:38] imode: if you're working on a project that someone else has created, sure.
[22:35:59] imode: the same is true for nearly every project under someone else's hands, regardless of language.
[22:36:53] Pateros: idk what it is, but basically some times, rails is too much. so you might suggest, hey let's do this part as a rack app and mount it. but response is "controller seems more standard and straight fwd". which probably true. it's just always a battle to take advantage of this 'modular' rails.
[22:36:58] okdas: has joined #ruby
[22:36:58] okdas: has joined #ruby
[22:38:19] Pateros: no. i don't think it's just that. it's just not a common practice to mount rack apps or sinatra apps inside rails in my experience.
[22:38:57] imode: I always have an uneasy feeling about the batteries included frameworks. too many assumptions are made.
[22:39:22] imode: it's a bit like an everything bagel. there's a certain kind of "everything" that's expected.
[22:39:48] __Yiota: has joined #ruby
[22:40:17] Pateros: rails doesn't try to be anything other than opinionated and it provides great stack for a lot of web apps. the idea that it is a modular framework is bit of a myth though given how rare it is to have a different opinion than the Rails one (it seems).
[22:40:59] imode: you can draw parallels to django, although from experience the two share a myriad of differences.
[22:42:02] Pateros: yea. not sure it's even a problem that needs solved.
[22:42:31] imode: I'm glad I have the opportunity to be picky.
[22:42:40] Pateros: nothing's perfect right. it's good enough for most things.
[22:42:43] milardovich: has joined #ruby
[22:43:16] shanecav: has joined #ruby
[22:43:59] ensyde: has joined #ruby
[22:45:46] moei: has joined #ruby
[22:46:47] nopolitica: has joined #ruby
[22:47:18] aclark: has joined #ruby
[22:48:06] imode: jesus. david really is in his own little world.
[22:48:25] imode: "your opinion doesn't matter." is what it all boils down to.
[22:48:40] imode: that's kind of sickening but also something I rarely see outside of C developers.
[22:49:22] zenspider: Pateros: except your entire analogy is flawed... "here's 5 people. eat with them. enjoy it"... "um... no... I'll have a burger, thanks"
[22:49:42] Pateros: did you read the article?
[22:49:52] Pateros: because that's the whole premise of it
[22:50:03] zenspider: yes. FIVE years ago. have you ever used rails? has it ever really stopped you from using rspec or anything else?
[22:50:25] zenspider: if only... testing would be faster and better if they did prevent it...
[22:50:59] Pateros: okay. so. then the article is also flawed, because programming in rails is rarely a solo task. one person can't eat a burger, and another a frog. you both have to share the same plate. yes i have used rails.
[22:51:18] imode: well, okay. are you project head?
[22:51:32] imode: are you working on an already-established codebase?
[22:51:37] imode: that has some years behind it?
[22:51:48] Pateros: i dont work with rails right now, but in all cases where i did, yeah
[22:52:03] imode: do you have the budget for a rewrite?
[22:52:43] imode: if not, honestly, sticking with "house style" is what's called for, regardless of anybody's opinion, even management's.
[22:53:02] Pateros: hm. it's not really relevant. the argument that "just change 1 line if you don't like it" is not black and white, is my point.
[22:53:05] matthewd: On an established codebase, it wouldn't matter whether Rails was batteries-in: the project would have already picked its batteries / set the menu, so you're still stuck trying to push back against already-made decisions.
[22:53:35] imode: probably to the detriment of yourself.
[22:53:45] zenspider: not probably
[22:54:21] imode: I would really not like to move an entire behemoth with personal preference and a crowbar. :P
[22:54:53] Pateros: it's going off point. the point is modular rails is rarely took advantage of. defaults matter a lot.
[22:54:58] alfiemax: has joined #ruby
[22:55:50] matthewd: A reasonable number of people use Mongo etc, and some use Sequel -- though less nowadays
[22:56:09] matthewd: Various non-erb template options are quite popular
[22:56:14] matthewd: Rspec, as already mentioned
[22:56:18] Pateros: true on erb
[22:57:08] cdg: has joined #ruby
[22:57:30] matthewd: ("less nowadays" isn't an indicator of declining Sequel popularity, to be clear: just IMO Sequel users are increasingly less likely to use Rails at all, as various alternatives are on the rise)
[22:58:28] matthewd: I'm not really sure which point of modularity you think isn't being used
[22:58:44] Pateros: are they? do they receive adoption in professional space too? it seems strange all frameworks aren't mixed and matched frequently given how you can mount them from Rails, and prob vice versa (never tried)
[23:00:13] Pateros: hm. i think diverging from the default stack is uncommon, and in that sense isn't modular.
[23:00:15] matthewd: Defaults absolutely matter a lot: that's David's thesis. A lot of the time it's better to just pick one, and if you're going to make an arbitrary choice, better if it's similar to what a bunch of other people are using.
[23:00:45] zenspider: diverging from the default stack is uncommon???
[23:00:54] Pateros: in rails yeah
[23:01:15] zenspider: put up numbers and sources
[23:01:34] Pateros: it's based on personal experience.
[23:02:43] zenspider: the plural of anecdote is not data
[23:02:57] Pateros: do you have stats and data for your bullshit claim?
[23:03:22] Pateros: if you don't sounds like bullshit lol
[23:03:25] matthewd: If modular = multiple equally-distributed choices, then yes I'll grant that Rails isn't that, and we can agree to disagree on that definition instead
[23:03:38] zenspider: first off... I'm not the one making claims w/o proof. burden of proof is on you.
[23:03:44] Pateros: this is a subjective conversation.
[23:03:55] Pateros: no. i'm not making universal claims.
[23:04:09] Pateros: i'm responding to an article
[23:04:09] zenspider: https://rubygems.org/gems/rspec 26.9 million downloads since may... you think that's just on developer dependencies on gems? hardly
[23:04:10] eam: I know this isn't what you mean, but an anecdote totally is data when *dis*proving something ;)
[23:04:37] zenspider: eam: only when you're disproving a proof
[23:05:08] Pateros: eh. rspec isn't the case-in-point of the whole argument. maybe you should take in the context of the whole conversation rather than focus on selective comments and aggressive replies.
[23:05:46] zenspider: way to ignore 26.9 million datapoints. cool. I'm done.
[23:05:48] matthewd: rspec, turbolinks, coffeescript
[23:06:00] Pateros: those are defaults..?
[23:06:11] Pateros: turbolinks+coffee
[23:06:37] Pateros: zenspider: way to ignore the whole conversation, then zone in a single thing, to prove yourself 'right'.
[23:06:40] imode: so heated in here.
[23:06:42] eam: what are we all talking about btw? I lost track of the positions here
[23:06:46] imode: ACTION grabs a fan.
[23:06:52] enterprisey: has joined #ruby
[23:06:59] eam: was it something about the ramifications of making components default in rails?
[23:07:42] Pateros: yeah, well. it was in response to http://david.heinemeierhansson.com/2012/rails-is-omakase.html
[23:07:56] zenspider: eam: "diverging from the default stack is uncommon" because something something
[23:08:11] matthewd: Pateros: They're defaults that ~most people turn off
[23:08:11] eam: is this maybe one of those "you're both right" kinda things?
[23:08:31] imode: it's more like "it's not that important".
[23:08:41] eam: I bet there are some components which are fairly rarely changed and some which are fairly often changed
[23:08:50] Pateros: i'm not trying to be right. zenspider is basically incapaable of conversation where he isn't trying to be an alpha male. he doesn't care for the contents of the discussion as much as how it makes him look.
[23:09:22] matthewd: Pateros: Okay, conversation over
[23:09:24] zenspider: Pateros: you're infringing on troll territory now
[23:09:41] zenspider: I was fine putting you on my /fools list... don't push it
[23:09:57] Pateros: sorry, but that's the impression you gave me. fine to ignore each other too.
[23:10:09] eam: the first time I was asked to work on a rails app it was jruby and sequel and I had a pretty bad time
[23:10:24] zenspider: eam: I bet... the startup time must have been painful
[23:10:57] zenspider: how'd it feel doing rails + sequel tho? (ignoring jruby) I haven't worked on that combo yet
[23:11:16] eam: I have a rule about deviation from the normal stack: Three deviations and you've got better than even odds of running into a bug with a stack interaction that no one's ever seen before
[23:11:31] zenspider: hah. that's a pretty safe bet
[23:11:55] neo95: has joined #ruby
[23:12:18] eam: I really didn't do very much with it, I'm not a web stack person and I just kinda got a maint job for this basic CRUD app. Don't have much feeling beyond "yup, definitely not a web dev"
[23:13:19] tacoboy: has joined #ruby
[23:16:07] canteen4: has joined #ruby
[23:16:13] frozengeek: has joined #ruby
[23:16:15] matthewd: eam: Yeah, that's a good rule -- and may also be where my "there's huge diversity in the choices people make" bias comes from: a good portion of the bugs I see start from people doing something(s) weird
[23:16:27] marr123: has joined #ruby
[23:16:58] eam: we found soooo many platform interaction bugs with jruby
[23:17:27] eam: jruby itself? fine. But when 99% of your rubygem authors are writing for mri they're going to make platform assumptions
[23:18:40] eam: almost all of them related to either system interactions like forking, or assumptions about GC behavior especially around file descriptor allocations
[23:19:53] eam: or (oh god I'm having flashbacks) differences in things like database drivers
[23:21:02] conta3: has joined #ruby
[23:21:03] Pateros: lack of fork is what i miss most when using jruby
[23:21:31] eam: I remember when I figured out that ruby -e'loop { File.open "/etc/passwd" }' in mri will run forever, but will raise in jruby
[23:21:56] Pateros: raise when?
[23:22:34] eam: in mri there's a guard around EMFILE which forces a blocking GC run when the descriptor table is full - the guard exists wrapped around every descriptor generating syscall
[23:23:13] eam: but the jvm doesn't provide an interface to the gc such that you can call it and block
[23:23:28] eam: so it's impossible to emulate the behavior -- so it just blows up and raises
[23:23:59] milardov_: has joined #ruby
[23:24:17] eam: we'd kinda regularly run into gems where someone provoked the above accidentally, and the impact is masked on mri so no one notices
[23:25:03] eam: same sorta stuff happens when you use any less popular platform, like say doing almost anything on FreeBSD
[23:25:09] Pateros: indeed. jruby can be diffilcult. probably amazing if you're a jvm/java dev though
[23:25:29] eam: yeah, the reason we got into jruby is that we have a pretty heavy investment in jvm platform
[23:26:35] ineb: has joined #ruby
[23:27:06] Pateros: cool. never walked into the jvm sphere. only through jruby. so it felt more like a limited ruby at the time.
[23:27:34] eam: I have a similar story about ocaml and shared libraries back when x86_64 was brand new
[23:28:02] eam: we had used ocamlopt to build a native object file and link it into a shared object which we'd then call via FFI from perl, python, ruby, etc
[23:28:09] s3nd1v0g1us: has joined #ruby
[23:28:10] eam: worked fine on i386
[23:28:20] eam: did not work on x86_64, segfaults
[23:28:34] s3nd1v0g1us: has joined #ruby
[23:28:53] eam: we eventually discovered that the ocaml native asm emitter used an x86_64 register incorrectly - specifically %r11, which is needed for position independent code
[23:29:24] eam: this is a non-issue if your ocaml object is the executable being run, but it will break if you're building an object file inside a shared object being linked to by something being run
[23:29:42] eam: and apparently we were the only people on earth using ocaml to build shared objects used by other interpreters
[23:29:59] knight33: has joined #ruby
[23:31:00] eam: beware oddball platforms
[23:31:01] skweek: has joined #ruby
[23:31:24] Pateros: languages too 😂
[23:34:47] s3nd1v0g1us: has joined #ruby
[23:35:10] s3nd1v0g1us: has joined #ruby
[23:35:25] funkytwig: has joined #ruby
[23:37:10] s3nd1v0g1us: has joined #ruby
[23:37:38] funkytwig: hi, been using the mysql gem and went to ruby 2.4.1 so went to mysql2 but it seems very slow. I have just come across ruby-mysql. So whitch of these do people recoment?
[23:38:41] matthewd: funkytwig: mysql2
[23:40:13] aduabu: has joined #ruby
[23:42:20] funkytwig: matthewd, thanks, is there something I need to do to make it perform well, it seems VERY slow compared to mysql gen
[23:42:47] nowhere_man: has joined #ruby
[23:42:53] canteen4: has joined #ruby
[23:44:41] aduabu: has joined #ruby
[23:45:42] matthewd: Nothing general that I know of
[23:47:13] canteen4: has joined #ruby
[23:49:31] aduabu: has joined #ruby
[23:50:03] jottr_: has joined #ruby
[23:50:33] gothicsouth: has joined #ruby
[23:54:05] canteen4: has joined #ruby
[23:54:21] alveric4: has joined #ruby
[23:55:37] gizmore: has joined #ruby
[23:55:52] t-recx: has joined #ruby
[23:59:08] electrostat: has joined #ruby
[23:59:22] rjungemann: has joined #ruby
[23:59:43] eckhardt: has joined #ruby