« Back to channel list

#ruby - 27 January 2018

« Back 1 day Forward 1 day »
[00:01:29] postmodern: has joined #ruby
[00:02:26] knight33: has joined #ruby
[00:03:19] nopolitica: has joined #ruby
[00:13:33] jottr: has joined #ruby
[00:13:49] gnufied: has joined #ruby
[00:14:11] kiltzman: has joined #ruby
[00:14:44] kiltzman: has joined #ruby
[00:15:10] kiltzman: has joined #ruby
[00:15:18] aguestuser: has joined #ruby
[00:15:44] kiltzman: has joined #ruby
[00:16:11] kiltzman: has joined #ruby
[00:16:52] kiltzman: has joined #ruby
[00:19:17] cdg: has joined #ruby
[00:23:19] workmad3: has joined #ruby
[00:25:15] nowhere_man: has joined #ruby
[00:27:18] jenrzzz: has joined #ruby
[00:27:18] jenrzzz: has joined #ruby
[00:27:22] bronson: has joined #ruby
[00:28:09] orbyt_: has joined #ruby
[00:31:33] cschneid: has joined #ruby
[00:40:21] wilbert: has joined #ruby
[00:41:29] jottr: has joined #ruby
[00:43:34] alfiemax: has joined #ruby
[00:44:31] aguestuser: has joined #ruby
[00:47:08] ramfjord: has joined #ruby
[00:49:15] shorberg: has joined #ruby
[00:59:59] mjc_: has joined #ruby
[01:01:55] Psybur_: has joined #ruby
[01:03:47] mistym: has joined #ruby
[01:05:48] wilbert: has joined #ruby
[01:06:00] nertzy: has joined #ruby
[01:09:56] cagomez: has joined #ruby
[01:12:32] Tharbakim: has joined #ruby
[01:12:32] Tharbakim: has joined #ruby
[01:14:09] arescorpio: has joined #ruby
[01:16:15] oblique: has joined #ruby
[01:16:37] Nek: has joined #ruby
[01:17:17] aguestuser: has joined #ruby
[01:27:13] hahuang65: has joined #ruby
[01:28:17] bronson: has joined #ruby
[01:32:56] CrazyEddy: has joined #ruby
[01:35:03] tcopeland: has joined #ruby
[01:39:43] riskish: has joined #ruby
[01:40:44] mtkd: has joined #ruby
[01:41:25] alfiemax: has joined #ruby
[01:59:53] Psybur_: has joined #ruby
[02:03:34] jackjackdripper: has joined #ruby
[02:05:00] LookLikeHandsome: has joined #ruby
[02:11:24] hahuang65: has joined #ruby
[02:18:20] Puffball: has joined #ruby
[02:29:25] bronson: has joined #ruby
[02:32:27] hahuang65: has joined #ruby
[02:35:29] ramfjord: has joined #ruby
[02:37:11] jottr_: has joined #ruby
[02:37:19] gnufied: has joined #ruby
[02:40:00] gizmore|2: has joined #ruby
[02:43:47] cdg: has joined #ruby
[02:55:39] jenrzzz: has joined #ruby
[02:55:39] jenrzzz: has joined #ruby
[02:56:03] ramfjord: has joined #ruby
[02:59:54] Psybur_: has joined #ruby
[03:01:39] Guest90: has joined #ruby
[03:08:44] shinnya: has joined #ruby
[03:16:31] ramfjord: has joined #ruby
[03:17:12] darkhanb: has joined #ruby
[03:19:58] cdg: has joined #ruby
[03:22:35] dviola: has joined #ruby
[03:26:08] jtdoncas_: has joined #ruby
[03:30:15] bronson: has joined #ruby
[03:32:00] jnyw: has joined #ruby
[03:37:05] ramfjord: has joined #ruby
[03:44:35] cagomez: has joined #ruby
[03:45:27] mtkd: has joined #ruby
[03:51:24] hahuang65: has joined #ruby
[03:57:34] ramfjord: has joined #ruby
[03:59:56] Psybur_: has joined #ruby
[04:00:36] hahuang65: has joined #ruby
[04:01:01] dviola: has joined #ruby
[04:04:11] jottr_: has joined #ruby
[04:14:02] rrichardsr3: has joined #ruby
[04:17:26] kiltzman: has joined #ruby
[04:17:56] kiltzman: has joined #ruby
[04:18:27] kiltzman: has joined #ruby
[04:24:59] workmad3: has joined #ruby
[04:25:15] trautwein: has joined #ruby
[04:30:00] gix-: has joined #ruby
[04:30:56] bronson: has joined #ruby
[04:30:57] hahuang61: has joined #ruby
[04:31:58] hahuang61: has joined #ruby
[04:34:33] hahuang61: has joined #ruby
[04:35:10] cagomez: has joined #ruby
[04:38:29] JusticeFries: has joined #ruby
[04:39:26] jackjackdripper: has joined #ruby
[04:57:18] LocaMocha: has joined #ruby
[04:58:16] jottr_: has joined #ruby
[04:59:56] Psybur_: has joined #ruby
[05:01:24] LocaMocha: has joined #ruby
[05:02:30] darkhanb: has joined #ruby
[05:14:39] cschneid: has joined #ruby
[05:14:40] rrutkowski: has joined #ruby
[05:20:22] hahuang61: has joined #ruby
[05:29:44] Guest90: has joined #ruby
[05:31:56] bronson: has joined #ruby
[05:34:57] xco: has joined #ruby
[05:49:03] thejamespinto: has joined #ruby
[05:50:10] cdg: has joined #ruby
[05:52:22] jottr_: has joined #ruby
[05:59:55] Psybur_: has joined #ruby
[06:27:58] sergio_101: has joined #ruby
[06:32:15] alfiemax: has joined #ruby
[06:32:45] bronson: has joined #ruby
[06:46:26] jottr_: has joined #ruby
[06:59:36] mikhael_k33hl: has joined #ruby
[06:59:51] mikhael_k33hl: Anyone tried integrating a ruby script with systemd unit files?
[06:59:54] Psybur_: has joined #ruby
[06:59:57] mikhael_k33hl: How do you handle stop and restart?
[07:01:56] nso95: has joined #ruby
[07:02:31] ramfjord: has joined #ruby
[07:03:27] rippa: has joined #ruby
[07:16:02] apeiros: has joined #ruby
[07:18:34] xuyuheng: has joined #ruby
[07:33:45] bronson: has joined #ruby
[07:40:28] jottr_: has joined #ruby
[07:51:39] ddwagnz: has joined #ruby
[07:51:45] mtkd: has joined #ruby
[07:52:18] cdg: has joined #ruby
[07:52:43] ddwagnz: i know silly question, but cloning from github (master) there is no ./configure or am i missing a step in compiling from github on centos
[07:59:52] Psybur_: has joined #ruby
[08:00:29] apparition: has joined #ruby
[08:01:19] za1b1tsu: has joined #ruby
[08:01:30] darkhanb_: has joined #ruby
[08:03:08] alfiemax: has joined #ruby
[08:05:28] claudiuinberlin: has joined #ruby
[08:05:42] pwnd_nsfw`: has joined #ruby
[08:11:38] ddwagnz: k nvm got autoconf updated XD
[08:11:41] ddwagnz: has left #ruby: ("WeeChat 1.7-dev")
[08:14:07] apparition: has joined #ruby
[08:18:23] alfiemax: has joined #ruby
[08:26:05] nowhere_man: has joined #ruby
[08:26:37] workmad3: has joined #ruby
[08:29:41] shinnya: has joined #ruby
[08:31:04] marr: has joined #ruby
[08:31:12] nowhere_man: has joined #ruby
[08:34:33] jottr_: has joined #ruby
[08:34:37] bronson: has joined #ruby
[08:37:04] gizmore: has joined #ruby
[08:37:14] nowhere_man: has joined #ruby
[08:37:19] TomyLobo: has joined #ruby
[08:40:30] dionysus69: has joined #ruby
[08:52:27] mtkd: has joined #ruby
[08:59:55] Psybur_: has joined #ruby
[09:04:13] desperek: has joined #ruby
[09:05:29] alex``: has joined #ruby
[09:08:31] biberu: has joined #ruby
[09:11:47] jgnagy: has joined #ruby
[09:23:07] tAn: has joined #ruby
[09:23:36] xfbs: has joined #ruby
[09:24:41] alfiemax_: has joined #ruby
[09:28:37] jottr_: has joined #ruby
[09:35:35] bronson: has joined #ruby
[09:40:43] DoubleMalt: has joined #ruby
[09:45:36] erlend: has joined #ruby
[09:49:48] claudiuinberlin: has joined #ruby
[09:54:25] cdg: has joined #ruby
[09:57:31] amatas: has joined #ruby
[09:59:52] Psybur_: has joined #ruby
[10:02:12] tAn: has joined #ruby
[10:04:01] apparition: has joined #ruby
[10:04:41] jottr_: has joined #ruby
[10:06:44] konsolebox: has joined #ruby
[10:11:10] tomphp: has joined #ruby
[10:16:31] ltem: has joined #ruby
[10:21:03] Guest42976: has joined #ruby
[10:24:15] AJA4350: has joined #ruby
[10:27:24] workmad3: has joined #ruby
[10:31:36] mtkd: has joined #ruby
[10:33:53] jackjackdripper: has joined #ruby
[10:35:27] anisha: has joined #ruby
[10:36:23] bronson: has joined #ruby
[10:41:49] sameerynho: has joined #ruby
[10:43:41] tAn: has joined #ruby
[10:44:27] kapil___: has joined #ruby
[10:46:26] mtkd: has joined #ruby
[10:48:46] oleo: has joined #ruby
[10:53:37] rabajaj: has joined #ruby
[10:55:40] dionysus69: has joined #ruby
[10:55:51] cdg: has joined #ruby
[10:56:58] ledestin: has joined #ruby
[10:58:50] jottr_: has joined #ruby
[10:59:53] Psybur_: has joined #ruby
[11:00:47] InfinityFye: has joined #ruby
[11:07:41] Beams: has joined #ruby
[11:08:56] gnufied: has joined #ruby
[11:10:54] G: has joined #ruby
[11:12:42] jgnagy: has joined #ruby
[11:19:47] shorberg: has joined #ruby
[11:25:04] tAn: has joined #ruby
[11:27:35] chromis: has left #ruby: ()
[11:28:00] xco: has joined #ruby
[11:31:07] ldv: has joined #ruby
[11:31:30] alfiemax: has joined #ruby
[11:33:09] jottr_: has joined #ruby
[11:34:12] conta: has joined #ruby
[11:35:18] amatas: has joined #ruby
[11:35:45] vichib: has joined #ruby
[11:37:05] bronson: has joined #ruby
[11:42:38] zigzig: has joined #ruby
[11:46:26] ldv__: has joined #ruby
[11:46:40] jtdoncas_: has joined #ruby
[11:50:26] jamesaxl: has joined #ruby
[11:56:15] jottr_: has joined #ruby
[11:57:03] cdg: has joined #ruby
[11:59:52] jamesaxl: has joined #ruby
[11:59:52] Psybur_: has joined #ruby
[12:01:47] tAn: has joined #ruby
[12:02:16] jtdoncas_: has joined #ruby
[12:03:55] rikai: has joined #ruby
[12:10:12] jamesaxl: has joined #ruby
[12:15:24] za1b1tsu: has joined #ruby
[12:18:20] jtdoncas_: has joined #ruby
[12:18:39] gnufied: has joined #ruby
[12:18:48] dcluna: has joined #ruby
[12:20:24] Beams: has joined #ruby
[12:22:30] yxhuvud: has joined #ruby
[12:23:35] cadillac_: has joined #ruby
[12:25:08] untitaker: has joined #ruby
[12:28:11] workmad3: has joined #ruby
[12:30:53] marr: has joined #ruby
[12:34:11] TinkerTyper: has joined #ruby
[12:38:02] bronson: has joined #ruby
[12:38:27] conta: has joined #ruby
[12:38:34] jottr_: has joined #ruby
[12:42:07] apparition: has joined #ruby
[12:44:01] untitaker: Hello, I'm relatively new to Ruby but not new to programming in general. I've just submitted my first PR to rubocop, but I think I have a communication problem with the core maintainer that might be due to me still using the wrong terminology for some basic concepts. Does anybody have a clue? https://github.com/bbatsov/rubocop/pull/5513
[12:45:55] tAn: has joined #ruby
[12:46:52] spiette: has joined #ruby
[12:50:10] BuildTheRobots: has joined #ruby
[12:50:56] jtdoncas_: has joined #ruby
[12:51:41] mtkd: has joined #ruby
[12:55:27] cadillac_: has joined #ruby
[12:55:45] linduxed: has joined #ruby
[12:55:47] ldv: has joined #ruby
[12:57:21] cadillac_: has joined #ruby
[12:57:44] cdg: has joined #ruby
[12:58:44] zigzig: has joined #ruby
[12:58:47] Emmanuel_Chanel: has joined #ruby
[12:59:56] Psybur_: has joined #ruby
[13:00:35] jgnagy: has joined #ruby
[13:00:42] cadillac_: has joined #ruby
[13:01:26] John_Ivan: has joined #ruby
[13:02:14] cadillac_: has joined #ruby
[13:02:33] cajone: has joined #ruby
[13:03:13] balo: has joined #ruby
[13:04:16] gr33n7007h: has joined #ruby
[13:07:13] gr33n7007h1: has joined #ruby
[13:13:15] gr33n7007h1: has joined #ruby
[13:13:33] Psybur_: has joined #ruby
[13:14:35] gr33n7007h1: has joined #ruby
[13:15:15] al2o3-cr1: has joined #ruby
[13:16:42] RougeR: has joined #ruby
[13:17:20] gr33n7007h1: has joined #ruby
[13:19:24] jtdoncas_: has joined #ruby
[13:21:47] tAn: has joined #ruby
[13:29:48] oleo: has joined #ruby
[13:39:00] bronson: has joined #ruby
[13:39:09] ldv: has joined #ruby
[13:47:38] jtdoncas_: has joined #ruby
[13:48:15] conta: has joined #ruby
[13:53:32] c0ncealed: has joined #ruby
[13:54:36] ldv: has joined #ruby
[13:55:56] nofxx: has joined #ruby
[14:01:11] tAn: has joined #ruby
[14:02:33] JusticeFries: has joined #ruby
[14:04:08] leah2: has joined #ruby
[14:05:15] Beams: has joined #ruby
[14:06:29] drewmcmillan: has joined #ruby
[14:25:42] Beams: has joined #ruby
[14:28:59] workmad3: has joined #ruby
[14:38:16] tAn: has joined #ruby
[14:40:32] bronson: has joined #ruby
[14:44:34] jottr_: has joined #ruby
[14:51:08] nowhere_man: has joined #ruby
[14:52:24] jtdoncas_: has joined #ruby
[14:56:45] mtkd: has joined #ruby
[14:57:51] leitz: has joined #ruby
[14:58:47] cdg: has joined #ruby
[15:13:35] tAn: has joined #ruby
[15:14:28] dyyylan: has joined #ruby
[15:22:21] Ishido: has joined #ruby
[15:29:53] claudiuinberlin: has joined #ruby
[15:33:19] quobo: has joined #ruby
[15:34:23] jottr_: has joined #ruby
[15:34:32] jtdoncas_: has joined #ruby
[15:38:44] anisha: has joined #ruby
[15:40:03] mikhael_k33hl: has joined #ruby
[15:40:40] mikhael_k33hl: Tried trapping the KILL signal via trap(:KILL) but it's giving me an error `trap': Invalid argument - SIGKILL (Errno::EINVAL)
[15:41:32] bronson: has joined #ruby
[15:43:02] bawNg: mikhael_k33hl: you can't trap KILL, it forces a process to terminate immediately without time for any interrupts to be processed
[15:43:39] mikhael_k33hl: bawNg: Oh, I see
[15:43:42] stormpack: has joined #ruby
[15:48:22] stormpack_: has joined #ruby
[15:51:48] jgnagy: has joined #ruby
[15:52:06] BlueDragons: has joined #ruby
[15:58:42] tAn: has joined #ruby
[16:03:12] jtdoncas_: has joined #ruby
[16:09:54] ResidentBiscuit: has joined #ruby
[16:09:55] conta: has joined #ruby
[16:26:18] jtdoncas_: has joined #ruby
[16:28:26] jottr_: has joined #ruby
[16:29:49] workmad3: has joined #ruby
[16:31:54] doublemalt_: has joined #ruby
[16:35:58] nchambers: do classes have something like #send except for class variables? I'm dynamically loading certain ruby classes, and I want to test if the class has a certain class variable, and if it exists get the value of it
[16:38:26] al2o3-cr1: nchambers: class_variable_defined? and class_variable_get
[16:41:42] AJA4351: has joined #ruby
[16:42:11] bronson: has joined #ruby
[16:42:27] tAn: has joined #ruby
[16:49:30] Puffball: has joined #ruby
[16:50:41] BuildTheRobots: has joined #ruby
[16:54:02] Psybur__: has joined #ruby
[16:55:02] Miron: has joined #ruby
[16:55:46] tejasvi5: has joined #ruby
[16:58:02] tejasvi5: has left #ruby: ()
[17:01:37] mtkd: has joined #ruby
[17:07:06] Vapez: has joined #ruby
[17:11:00] jottr_: has joined #ruby
[17:12:14] drakko: has joined #ruby
[17:12:35] plexigras: has joined #ruby
[17:16:10] plexigras: has joined #ruby
[17:16:20] unreal: has joined #ruby
[17:20:19] guille-moe: has joined #ruby
[17:27:19] vichib: has joined #ruby
[17:27:39] tAn: has joined #ruby
[17:28:41] alfiemax: has joined #ruby
[17:31:31] alpine: has joined #ruby
[17:32:53] alpine: I have question on ssl authenication in ruby, let me know if i should go to a different channel
[17:33:21] alpine: im using rest-client to access ssl api, not having any luck
[17:34:40] dionysus70: has joined #ruby
[17:37:24] tAn: has joined #ruby
[17:38:08] gr33n7007h: has joined #ruby
[17:39:24] John_Ivan: has joined #ruby
[17:40:00] dreamthese: has joined #ruby
[17:40:01] Axsuul: has joined #ruby
[17:40:17] DLSteve: has joined #ruby
[17:42:56] bronson: has joined #ruby
[17:47:45] desperek: has joined #ruby
[17:47:56] selim: has joined #ruby
[17:50:33] xco: has joined #ruby
[17:52:37] jgnagy: has joined #ruby
[17:53:39] jtdoncas_: has joined #ruby
[17:58:41] reber: has joined #ruby
[18:05:04] jottr_: has joined #ruby
[18:06:00] alfiemax: has joined #ruby
[18:11:07] justinfaler: has joined #ruby
[18:11:45] quobo: has joined #ruby
[18:12:34] dtzuzu: has joined #ruby
[18:18:42] alfiemax: has joined #ruby
[18:18:46] hays_: this is a bit OT but im curious if anyone has opinions on a modern language that is in a similar efficiency class as C ? I've been poking around at Rust and maybe D as possibilities
[18:21:27] jtdoncas_: has joined #ruby
[18:23:49] leitz: hays_, I'm looking at Go. Well, casting glances at it, Ruby is still more fun for me.
[18:24:19] leitz: My slogan for Ruby is "Having fun getting things done!"
[18:24:29] hays_: yeah ruby is a lot of fun
[18:24:51] leitz: Even when it's frustrating. ;)
[18:25:25] hays_: Go is interesting, but not quite as fast as C.. maybe 1x-5x slower
[18:26:02] hays_: I kinda like Rust ideas but the syntax annoys me a bit
[18:26:34] nowhere_man: has joined #ruby
[18:26:41] leitz: Agreed. I'm more for Go as I think leaning into it as an almost early adopter will help. I think it has a better chance of displacing Java and .Net than others.
[18:27:02] plexigras: has joined #ruby
[18:27:37] hays_: for sure.. with kubernetes written in Go.. that's a big deal i think
[18:28:25] havenwood: hays_: Crystal
[18:30:04] gr33n7007h: has joined #ruby
[18:30:12] hays_: wow, interesting
[18:30:37] workmad3: has joined #ruby
[18:32:20] drewmcmillan: has joined #ruby
[18:32:26] leitz: I'm not overly fond of Ruby's "do...end" syntax.
[18:34:04] WA9ACE: you could always use brackets in place of do end
[18:34:11] WA9ACE: but those tend to be reserved for 1-3 liners
[18:36:41] gr33n7007h: has joined #ruby
[18:37:22] cdg: has joined #ruby
[18:39:55] leitz: WA9ACE, I will probably head to brackets down the road. While not a totally Ruby Newbie I'm only about half a step up. Plan is to work Ruby in 2018 and maybe find a project to join. Would use the project's conventions and most seem to prefer the "do..end".
[18:40:38] Emmanuel_Chanel: has joined #ruby
[18:40:54] leitz: Otherwise near the end of the year I'll either convert to bracets or maybe Go for something new. :)
[18:42:22] venmx: has joined #ruby
[18:42:25] pastorinni: has joined #ruby
[18:43:49] bronson: has joined #ruby
[18:46:44] leitz: Ugh...1 file, 47 Roffenses.
[18:46:51] leitz: Rubocop Offenses
[18:54:19] hays_: my advice to you is to conform to the generally accepted style norms
[18:54:30] hays_: it will help you collaborate
[18:55:02] leitz: If I collaborate, I agree. If I'm the only coder, and I see to be on my stuff, then I can do what looks best for me.
[18:55:32] leitz: I really dislike multi-levels of "end...end...end...end" and prefer the highlighting vim usually gets right.
[18:57:11] hays_: in cases like that i consider refactoring
[18:58:16] hays_: inasmuch as aesthetics influence design, even in something like a programming language
[18:58:50] hays_: my coding style has changed quite a bit just in the embrace of parenthesis omission
[18:59:06] jottr_: has joined #ruby
[19:00:35] za1b1tsu: has joined #ruby
[19:01:16] leitz: Mine changed for the better after spending time with python. i like the whitespace.
[19:01:38] Xiti: has joined #ruby
[19:06:46] mtkd: has joined #ruby
[19:08:55] leitz: 47 offences to 1 that I agree with but don't have a good plan for yet.
[19:09:34] lavamind: has joined #ruby
[19:09:53] riceandbeans: has joined #ruby
[19:10:13] lavamind: hello! I'd like to pass a list of arguments to a rake task, that includes one argument that need to be Nil
[19:10:16] riceandbeans: other than being less likely to accidential interpolation, is there a performance benefit at all to using '' instead of ""?
[19:10:39] Ishido: has joined #ruby
[19:10:45] leitz: Rubocop whines, but that seems to be about it.
[19:10:51] WA9ACE: I know back around ruby 1.8 and 1.9 there was definitely a reason to use single quotes over double
[19:10:58] WA9ACE: lemme go try to find the article about the string change
[19:11:46] lavamind: the task is set up to read arguments as task :mytask :param1 :param2 do |t, args|, I know how to specify arguments on the command line but how to pass something in :param2 while leaving :param1 nil?
[19:11:53] apeiros: I doubt that. single vs. double is a once-per-compilation difference. and even then the diff is mostly academic.
[19:12:16] riceandbeans: I'll be damned.....https://stackoverflow.com/questions/1836467/is-there-a-performance-gain-in-using-single-quotes-vs-double-quotes-in-ruby
[19:12:26] riceandbeans: double quotes are actually marginally faster than single quote
[19:12:54] alex``: has joined #ruby
[19:12:55] riceandbeans: I'm still going to use single when no interpolation needed, but I'm somehow surprised by the result
[19:13:05] apeiros: that's well within the range of statistical errors
[19:13:17] WA9ACE: I could have sworn aaron had a blog post on this
[19:15:48] WA9ACE: at least I found this. It's definitely true https://twitter.com/tenderlove/status/563256768739180544?lang=en
[19:16:54] Dimik: has joined #ruby
[19:17:46] hinbody: has joined #ruby
[19:18:07] apeiros: 😂👍🏻
[19:20:28] dviola: has joined #ruby
[19:22:25] WA9ACE: This was the string memory post I was misremembering in case anyone wants a good read http://patshaughnessy.net/2012/1/4/never-create-ruby-strings-longer-than-23-characters
[19:22:31] WA9ACE: I'm not sure if it's still relevant though
[19:22:43] apeiros: that part afaic still is
[19:23:24] leitz: Did anyone tell him the article title was longer than 23 characters?
[19:23:47] WA9ACE: ACTION ba dum tss
[19:23:47] apeiros: leitz: you don't know whether he used a couple of string objects!
[19:25:39] veduardo: has joined #ruby
[19:31:53] Stazer: has joined #ruby
[19:37:46] jottr_: has joined #ruby
[19:40:12] kssd: has joined #ruby
[19:45:06] bronson: has joined #ruby
[19:45:33] alfiemax: has joined #ruby
[19:48:33] Thaelim: has joined #ruby
[19:49:49] justinfaler: has joined #ruby
[19:50:44] jtdoncas_: has joined #ruby
[19:51:20] gnufied: has joined #ruby
[19:53:22] jgnagy: has joined #ruby
[20:02:15] tAn: has joined #ruby
[20:05:17] cschneid: has joined #ruby
[20:06:12] ahrs: has joined #ruby
[20:06:33] nowhere_man: has joined #ruby
[20:08:17] pastorinni: has joined #ruby
[20:08:54] raynold: Ahh it's a wonderful day
[20:11:13] Ishido: has joined #ruby
[20:13:16] dstrunk: has joined #ruby
[20:15:44] sammi`: has joined #ruby
[20:22:07] Stazer: has left #ruby: ()
[20:23:12] kapil___: has joined #ruby
[20:31:33] workmad3: has joined #ruby
[20:31:52] jottr_: has joined #ruby
[20:36:23] doublemalt_: has joined #ruby
[20:41:07] alfiemax: has joined #ruby
[20:48:08] jordanm: has joined #ruby
[20:54:18] jottr_: has joined #ruby
[20:54:44] jtdoncas_: has joined #ruby
[20:59:39] marr: has joined #ruby
[21:00:04] cdg: has joined #ruby
[21:02:30] Flashynuff: has joined #ruby
[21:06:28] leitz: Two different ways of expressing the same concept; fail if a file doesn't exist. Not sure a better way doesn't exist. Thoughts? https://github.com/makhidkarun/2d6_ogl_chargen/blob/master/lib/character_tools.rb#L146-L179
[21:11:58] mtkd: has joined #ruby
[21:13:56] Lytol: has joined #ruby
[21:14:55] drewmcmillan: has joined #ruby
[21:16:37] veduardo: has joined #ruby
[21:24:46] VladGh: has joined #ruby
[21:27:39] dstrunk: has joined #ruby
[21:33:28] tAn: has joined #ruby
[21:40:41] k0mpa: has joined #ruby
[21:42:35] rabajaj: has joined #ruby
[21:44:54] Asher: has joined #ruby
[21:46:36] bronson: has joined #ruby
[21:48:18] jottr_: has joined #ruby
[21:48:49] apeiros: leitz: if all you do is raise in your rescue, you can omit the whole thing.
[21:49:27] apeiros: also methods form an inherent begin/end block, so you can make the code less noisy.
[21:50:40] leitz: apeiros, right now I'm trying this, where MissingFIle < IOError. https://github.com/makhidkarun/2d6_ogl_chargen/blob/robust_file/lib/character_tools.rb#L150
[21:51:13] InfinityFye: has joined #ruby
[21:51:15] apeiros: e.g. https://gist.github.com/apeiros/c7d6147c8324c484f001db6e1f287b4d (the rand looks like it should not be part of the return value)
[21:52:21] apeiros: personally with race-conditional stuff I prefer rescue over testing
[21:53:03] leitz: The rand is a part of the return, it gives a measure of how much that plot is affecting that individual.
[21:53:18] rrutkowski: has joined #ruby
[21:53:25] apeiros: race condition being: 1) File.exist? -> true, 2) something outside your process deletes the file, 3) your try to open it fails despite your check
[21:53:50] leitz: Ah, got it.
[21:53:55] jgnagy: has joined #ruby
[21:54:20] apeiros: and you can always perform tests in the rescue to provide better diagnostics for your users
[21:55:18] leitz: So the second method, with the begin/rescue, is a bit more race robust?
[21:55:29] apeiros: no. unrelated things.
[21:55:53] apeiros: one is about being able to leave away begin/end due methods already having it
[21:56:24] apeiros: the other is about using begin/rescue over exist? checks because they don't always protect you
[21:56:42] dstrunk: has joined #ruby
[21:56:55] apeiros: oh, sorry, you meant your code
[21:57:04] apeiros: I thought you were referring to my gist :D
[21:57:04] rrutkowski: has joined #ruby
[21:57:22] alex``: has joined #ruby
[21:57:39] apeiros: yes, I'd prefer the way your second method handles it. though since your second method doesn't actually handle it, I'd just leave the check away entirely.
[21:58:01] apeiros: also, your first method doesn't really handle it either
[21:58:10] leitz: In theory I'm moving towards more expressive error messages and more robust checking.
[21:58:21] leitz: Not moving too fast, though.
[21:59:24] apeiros: you have to think about where in your code you are actually able to deal with that problem
[21:59:35] apeiros: otherwise you just create new ones on the way up
[22:00:20] apeiros: as in `array_from_file`, where you don't execute any code to set new_array, which you try to return. ruby might initialize it with nil, or it might consider it an undefined variable…
[22:00:56] leitz: Putting it in these methods seems best since they are called from multiple places. The non-error code generated a nil array which said nothing about the file not being there.
[22:00:57] apeiros: in the former case - can all code calling array_from_file handle a nil return value? is it wise requiring all methods calling array_from_file to be able to handle a nil value?
[22:01:06] cdg: has joined #ruby
[22:02:16] apeiros: ok, so your rationale was "then I only have to handle it in a single place", but again, can that single place actually handle it in a way that you can move on? (or abort the program?)
[22:02:51] apeiros: as in: once get_random_line_from_file handled the exception, can the code calling get_random_line_from_file continue?
[22:03:09] apeiros: mind you, those things are not easy. so don't worry if you struggle with it.
[22:03:27] alfiemax: has joined #ruby
[22:03:51] leitz: The code should fail if it cannot execute those methods. I had safety nets in before then realized the code was failing and I didn't know because the safety net caught it every time.
[22:06:07] kssd: has joined #ruby
[22:10:51] Ishido: has joined #ruby
[22:12:59] sonOfRa: has joined #ruby
[22:15:37] BTRE: has joined #ruby
[22:18:45] darkhanb: has joined #ruby
[22:20:37] rrutkowski: has joined #ruby
[22:21:35] leitz: Time for a break.
[22:21:54] jottr_: has joined #ruby
[22:26:03] rrutkowski: has joined #ruby
[22:29:46] alfiemax: has joined #ruby
[22:31:03] Psybur__: has joined #ruby
[22:32:36] workmad3: has joined #ruby
[22:35:25] alfiemax: has joined #ruby
[22:38:06] rrutkowski: has joined #ruby
[22:39:34] enanibus_: has joined #ruby
[22:41:27] enanibus_: has left #ruby: ()
[22:41:53] enanibus_: has joined #ruby
[22:47:24] enanibus_: has left #ruby: ("Textual IRC Client: www.textualapp.com")
[22:47:30] bronson: has joined #ruby
[22:53:55] ResidentBiscuit: has joined #ruby
[22:55:00] nowhere_man: has joined #ruby
[22:58:59] Ishido: has joined #ruby
[23:00:20] ruby[bot]: has joined #ruby
[23:00:20] ChanServ: +o ruby[bot]
[23:02:14] cdg: has joined #ruby
[23:09:31] Asher: has joined #ruby
[23:09:45] ledestin: has joined #ruby
[23:09:56] skinux: has joined #ruby
[23:10:07] skinux: has left #ruby: ("Konversation terminated!")
[23:15:42] yokel: has joined #ruby
[23:22:49] jrp93: has joined #ruby
[23:23:03] enanibus_: has joined #ruby
[23:31:50] linuxdaemon: has joined #ruby
[23:32:23] Guest90: has joined #ruby
[23:37:14] jgnagy: has joined #ruby
[23:37:24] enanibus_: has joined #ruby
[23:39:59] enanibus_: has joined #ruby
[23:43:15] venmx: has joined #ruby
[23:48:15] bronson: has joined #ruby
[23:51:52] jkprg: has joined #ruby
[23:52:33] jkprg: has left #ruby: ()
[23:53:54] zigzig: has joined #ruby