« Back to channel list

#ruby - 21 December 2017

« Back 1 day Forward 1 day »
[00:00:08] eckhardt: has joined #ruby
[00:00:22] cdg: has joined #ruby
[00:03:24] mtkd: has joined #ruby
[00:09:08] tcopeland: has joined #ruby
[00:10:54] s3nd1v0g1us: has joined #ruby
[00:10:58] CrazyEddy: has joined #ruby
[00:13:34] s3nd1v0g1us: has joined #ruby
[00:15:49] s3nd1v0g1us: has joined #ruby
[00:20:02] mikecmpbll: hmm, more an algorithm question than a ruby one but, if i have two arrays, e.g. a1 = [2, 3, 6, 1, 4, 5], and a2 = [3,5,2,1,6,4], and I want to order the first array and make the same position-wise transformation to the second array
[00:20:10] mikecmpbll: what's the best way to achieve that?
[00:20:34] goepsilongo: has joined #ruby
[00:20:49] havenwood: mikecmpbll: what would the return value look like ideally?
[00:21:04] mikecmpbll: havenwood : one sec
[00:21:35] mikecmpbll: the rest would be ... a1_t = [1,2,3,4,5,6]; a2_t = [1,3,5,6,4,2]
[00:21:45] mikecmpbll: the two arrays after transformation
[00:21:57] mikecmpbll: the first one is sorted and the same positional changes are made in the 2nd array.
[00:22:19] havenwood: >> a1.each_with_index.sort_by(&:first).map(&:last).map { |i| a2[i] } # mikecmpbll
[00:22:20] ruby[bot]: havenwood: # => undefined local variable or method `a1' for main:Object (NameError) ...check link for more (https://eval.in/923031)
[00:22:31] havenwood: #=> [1, 3, 5, 6, 4, 2]
[00:23:00] bmurt: has joined #ruby
[00:23:31] mikecmpbll: didn't think of getting the index in and out again of the sorting array
[00:23:52] mikecmpbll: goddamn. good one! thanks.
[00:24:25] CrazyEddy: has joined #ruby
[00:24:57] rubycoder37: has joined #ruby
[00:25:12] rubycoder37: it annoys me that ruby isn't as popular as python is
[00:27:28] mikecmpbll: numpy/scipy/scikit-learn are some big reasons for it's current popularity
[00:27:51] mikecmpbll: ruby doesn't have much to answer for that right now tbh.
[00:28:12] cdolan: has joined #ruby
[00:29:57] rubycoder37: there is not a single program that depends on ruby that I have installed on my system, yet I have 13 programs that depend on python2 and 4 that depend on python3, this is ridiculous
[00:31:29] rubycoder37: I'm f*cking outraged!
[00:33:50] pilne: has joined #ruby
[00:35:36] rubycoder37: I'm sorry mike, but ruby should have been the number-one language
[00:36:01] rubycoder37: ruby needs to do something to make it seem that it's not just for rails
[00:36:26] rubycoder37: 2.5.0 will displace python as the queen of programming languages!
[00:36:47] synstack: python is the queen of programming languages?
[00:38:26] rubycoder37: yes, all my coworkers swear by it
[00:38:39] havenwood: Python 2 or Python 3?
[00:39:14] mtkd: has joined #ruby
[00:41:52] Jameser: has joined #ruby
[00:43:57] pastorinni: has joined #ruby
[00:44:29] havenwood: Python 2 EoL moved from 2015 to 2020. They have a couple more years.
[00:44:45] havenwood: Maybe they're just holding out for Ruby 3?
[00:51:40] cdolan: has joined #ruby
[00:52:48] rubycoder37: python = the poor man's programming language
[00:53:51] ur5us: has joined #ruby
[00:55:15] duderonomy: has joined #ruby
[01:01:27] mtkd: has joined #ruby
[01:02:00] workmad3: has joined #ruby
[01:03:12] cdg: has joined #ruby
[01:04:08] skweek: has joined #ruby
[01:04:17] romain_t: has joined #ruby
[01:08:23] alfiemax: has joined #ruby
[01:09:59] pdcawley: has joined #ruby
[01:11:25] ruby[bot]: -b *!*@116.58.236.191$#ruby-banned
[01:12:16] orbyt_: has joined #ruby
[01:12:40] cdolan: has joined #ruby
[01:14:02] sanscoeur: has joined #ruby
[01:14:52] CrazyEddy: has joined #ruby
[01:15:15] elphe: has joined #ruby
[01:18:49] hahuang65: has joined #ruby
[01:20:07] pdcawley: has joined #ruby
[01:21:54] cagomez: has joined #ruby
[01:23:47] vtx: has joined #ruby
[01:24:57] code_zombie: has joined #ruby
[01:25:16] neo95: has joined #ruby
[01:25:23] vtx: hi guys, has anyone here used mongodb with ruby? some of my queries take 10-20 seconds to complete, and when i have a number of queries running as part of a single request, my request takes minutes to complete. i was wondering if anyone had experience of improving mongo performance with the ruby driver? or if there are some options i can provide that will speed up my query completion time?
[01:26:29] m27frogy: has joined #ruby
[01:35:07] cdolan: has joined #ruby
[01:36:27] tAn: has joined #ruby
[01:37:31] tAn: has joined #ruby
[01:37:59] tAn: has joined #ruby
[01:38:25] guardianx: has joined #ruby
[01:38:47] tAn: has joined #ruby
[01:39:49] GodFather: has joined #ruby
[01:39:56] tAn: has joined #ruby
[01:41:22] neo95: has joined #ruby
[01:46:44] chocoelho: has joined #ruby
[01:49:04] tcopeland: has joined #ruby
[01:49:26] ResidentBiscuit: has joined #ruby
[01:50:49] hahuang65: has joined #ruby
[01:52:13] cdolan: has joined #ruby
[01:52:50] ResidentBiscuit: has joined #ruby
[01:53:40] CrazyEddy: has joined #ruby
[01:58:12] ResidentBiscuit: has joined #ruby
[01:59:32] k0mpa: has joined #ruby
[02:00:23] baweaver: Not sure if they were trolling or not havenwood
[02:02:16] code_zombie_: has joined #ruby
[02:02:39] rfoust: has joined #ruby
[02:02:55] |ifei5good: has joined #ruby
[02:03:04] Azure|dc: has joined #ruby
[02:03:05] nofxx1: has joined #ruby
[02:04:06] vtx_: has joined #ruby
[02:04:40] lloyd_: has joined #ruby
[02:04:41] nathani: has joined #ruby
[02:04:41] JJonah_: has joined #ruby
[02:04:45] deimos_: has joined #ruby
[02:05:05] cstrahan_: has joined #ruby
[02:05:11] fredx_: has joined #ruby
[02:05:29] BuildTheRobots_: has joined #ruby
[02:05:35] netwoodle: has joined #ruby
[02:05:39] mahlon_: has joined #ruby
[02:05:40] chihhsin_: has joined #ruby
[02:05:53] WhereIsMySpoon_: has joined #ruby
[02:05:54] lupine_: has joined #ruby
[02:06:35] daed_: has joined #ruby
[02:06:43] meesles: has joined #ruby
[02:06:56] meesles: join #rubyonrails
[02:06:56] argoneus_: has joined #ruby
[02:07:13] dtcristo1: has joined #ruby
[02:07:23] async_prince: has joined #ruby
[02:07:32] kloeri_: has joined #ruby
[02:07:39] dcluna_: has joined #ruby
[02:07:47] Tristan-Speccy: has joined #ruby
[02:07:51] SuperTux88: has joined #ruby
[02:07:51] naprimer: has joined #ruby
[02:08:13] matthewd: has joined #ruby
[02:08:21] ujjain: has joined #ruby
[02:08:21] ujjain: has joined #ruby
[02:08:28] ryotarai: has joined #ruby
[02:08:53] rileyy: has joined #ruby
[02:09:25] romain_t: has joined #ruby
[02:09:26] eblip: has joined #ruby
[02:10:11] DmitryBochkarev: has joined #ruby
[02:10:29] gf3: has joined #ruby
[02:12:08] esObe: has joined #ruby
[02:12:08] bokayio: has joined #ruby
[02:12:25] cadillac_: has joined #ruby
[02:12:37] Sirecote: has joined #ruby
[02:12:54] cdolan: has joined #ruby
[02:13:49] tAn: has joined #ruby
[02:17:13] CrazyEddy: has joined #ruby
[02:17:29] nekomune: has joined #ruby
[02:17:38] Iambchop: has joined #ruby
[02:17:40] _aeris_: has joined #ruby
[02:19:15] lukeyb: has joined #ruby
[02:22:02] chichou: has joined #ruby
[02:23:48] graft: has joined #ruby
[02:24:26] nadir: has joined #ruby
[02:25:56] ahrs: has joined #ruby
[02:31:21] _aeris_: has joined #ruby
[02:33:05] safetypin: has joined #ruby
[02:41:39] enterprisey: has joined #ruby
[02:44:02] cdg: has joined #ruby
[02:46:34] ResidentBiscuit: has joined #ruby
[02:49:17] cdolan: has joined #ruby
[02:50:11] pastorinni: has joined #ruby
[02:50:17] CrazyEddy: has joined #ruby
[02:52:36] pastorin_: has joined #ruby
[02:54:54] tAn: has joined #ruby
[02:55:12] rrichardsr3: has joined #ruby
[02:55:52] jnollette: has joined #ruby
[02:59:54] pastorinni: has joined #ruby
[03:00:21] cadillac_: has joined #ruby
[03:01:47] workmad3: has joined #ruby
[03:03:22] alfiemax: has joined #ruby
[03:05:26] cdolan: has joined #ruby
[03:06:49] mtkd: has joined #ruby
[03:09:23] veeti: has joined #ruby
[03:18:36] ResidentBiscuit: has joined #ruby
[03:26:13] goepsilongo: has joined #ruby
[03:26:39] cdolan: has joined #ruby
[03:27:15] Mikasi: has joined #ruby
[03:31:09] fschuindt: has joined #ruby
[03:35:59] veeti: has joined #ruby
[03:36:07] tAn: has joined #ruby
[03:39:47] |ifei5g00d: has joined #ruby
[03:42:32] cdolan: has joined #ruby
[03:43:00] bmurt: has joined #ruby
[03:51:37] hahuang65: has joined #ruby
[03:54:51] CrazyEddy: has joined #ruby
[04:01:29] Brak____________: has joined #ruby
[04:01:48] HashNuke: has joined #ruby
[04:02:06] jwheare: has joined #ruby
[04:03:05] cdolan: has joined #ruby
[04:10:46] chichou: has joined #ruby
[04:11:35] duderonomy: has joined #ruby
[04:15:31] DmitryBochkarev: has joined #ruby
[04:17:04] orbyt_: has joined #ruby
[04:17:17] nofxx: has joined #ruby
[04:17:46] gix: has joined #ruby
[04:17:47] bmurt: has joined #ruby
[04:18:46] pastorinni: has joined #ruby
[04:19:05] cdolan: has joined #ruby
[04:26:34] cagomez: has joined #ruby
[04:26:55] bkxd: has joined #ruby
[04:32:27] MrSparkle: has joined #ruby
[04:33:15] kapil___: has joined #ruby
[04:37:15] workmad3: has joined #ruby
[04:45:04] bmurt: has joined #ruby
[04:46:11] tAn: has joined #ruby
[04:50:26] eckhardt: has joined #ruby
[04:55:12] cdolan: has joined #ruby
[04:57:32] bmurt: has joined #ruby
[05:08:18] bkxd_: has joined #ruby
[05:08:24] cpallares: has joined #ruby
[05:09:21] seitensei: has joined #ruby
[05:10:31] Keltia_: has joined #ruby
[05:11:29] CrazyEddy: has joined #ruby
[05:11:32] `derpy: has joined #ruby
[05:11:43] chichou: has joined #ruby
[05:11:55] bkxd_: has joined #ruby
[05:12:15] dupin: has joined #ruby
[05:12:17] rrichardsr3: has joined #ruby
[05:12:29] jolamb_: has joined #ruby
[05:13:27] hxegon: has joined #ruby
[05:14:28] biox: has joined #ruby
[05:14:47] cdg: has joined #ruby
[05:16:07] cdolan: has joined #ruby
[05:16:34] bokayio: has joined #ruby
[05:18:14] gf3: has joined #ruby
[05:20:50] tAn: has joined #ruby
[05:25:59] eckhardt: has joined #ruby
[05:26:21] ur5us: has joined #ruby
[05:26:39] CrazyEddy: has joined #ruby
[05:31:31] jaequery: has joined #ruby
[05:31:46] cdolan: has joined #ruby
[05:31:49] mistergibson: anyone use qml gem here?
[05:32:44] alfiemax: has joined #ruby
[05:35:46] infernix: has joined #ruby
[05:36:58] monodoh: has joined #ruby
[05:37:08] aupadhye: has joined #ruby
[05:37:31] monodoh: has left #ruby: ()
[05:39:26] DmitryBochkarev: has joined #ruby
[05:39:40] jamesaxl: has joined #ruby
[05:40:38] anisha: has joined #ruby
[05:42:28] CrazyEddy: has joined #ruby
[05:44:57] reber: has joined #ruby
[05:45:33] gulp-gulp: has joined #ruby
[05:49:47] rhebz916: has joined #ruby
[05:51:39] iamarun: has joined #ruby
[05:52:25] hahuang65: has joined #ruby
[05:54:41] alfiemax: has joined #ruby
[05:58:31] tAn: has joined #ruby
[06:01:30] CrazyEddy: has joined #ruby
[06:02:47] akkad: has joined #ruby
[06:08:43] cdolan: has joined #ruby
[06:09:46] baweaver: mistergibson: you'd have better luck just asking your question
[06:11:55] RougeT430: has joined #ruby
[06:15:29] CrazyEddy: has joined #ruby
[06:16:49] alfiemax_: has joined #ruby
[06:17:47] zenspider_: has joined #ruby
[06:19:27] pavelz_: has joined #ruby
[06:19:29] conta: has joined #ruby
[06:20:02] coderphive_: has joined #ruby
[06:20:26] rhebz916_: has joined #ruby
[06:20:33] linduxed_: has joined #ruby
[06:22:16] bkxd: has joined #ruby
[06:23:56] yCrazyEdd: has joined #ruby
[06:24:58] ablackack: has joined #ruby
[06:25:43] hr3f: has joined #ruby
[06:26:04] kapil___: has joined #ruby
[06:26:29] Derperpe-: has joined #ruby
[06:26:32] Drakevr: has joined #ruby
[06:27:05] jamesaxl: has joined #ruby
[06:28:04] hsiktas: has joined #ruby
[06:28:25] [reed]: has joined #ruby
[06:28:26] [reed]: has joined #ruby
[06:28:43] llua: has joined #ruby
[06:29:14] cdolan: has joined #ruby
[06:30:14] lele: has joined #ruby
[06:30:24] veloutin: has joined #ruby
[06:30:50] bokayio: has joined #ruby
[06:31:02] mitchellvanw: has joined #ruby
[06:31:20] code_zombie_: has joined #ruby
[06:31:48] enterprisey: has joined #ruby
[06:31:48] Iambchop: has joined #ruby
[06:31:48] esObe: has joined #ruby
[06:31:48] JJonah: has joined #ruby
[06:31:48] Lloyd: has joined #ruby
[06:31:48] sparr: has joined #ruby
[06:31:48] rideh: has joined #ruby
[06:31:48] Zimsky: has joined #ruby
[06:31:48] justinweiss: has joined #ruby
[06:31:48] olivierjanss: has joined #ruby
[06:31:48] cttttt: has joined #ruby
[06:31:48] contradictioned: has joined #ruby
[06:31:48] Tony-St4rk: has joined #ruby
[06:31:48] Olipro: has joined #ruby
[06:31:48] Nightmare: has joined #ruby
[06:31:48] scott4000: has joined #ruby
[06:31:48] cschneid: has joined #ruby
[06:31:48] DarkBushido: has joined #ruby
[06:31:48] jtperreault: has joined #ruby
[06:31:48] larissa: has joined #ruby
[06:31:48] kent\n: has joined #ruby
[06:31:49] caw__: has joined #ruby
[06:31:49] wsmoak: has joined #ruby
[06:31:49] justizin: has joined #ruby
[06:31:49] peteretep: has joined #ruby
[06:31:49] swgillespie: has joined #ruby
[06:31:49] kapowaz: has joined #ruby
[06:31:49] ewilliam: has joined #ruby
[06:31:49] darthThorik: has joined #ruby
[06:31:49] Jicemo_: has joined #ruby
[06:31:49] twe4ked: has joined #ruby
[06:31:49] tuelz: has joined #ruby
[06:32:10] Olipro: has joined #ruby
[06:33:05] sparr: has joined #ruby
[06:33:41] caw__: has joined #ruby
[06:34:07] tAn: has joined #ruby
[06:36:51] bokayio: has joined #ruby
[06:38:36] TinkerTyper: has joined #ruby
[06:40:22] biberu: has joined #ruby
[06:42:30] chmurifree: has joined #ruby
[06:44:50] DmitryBochkarev: has joined #ruby
[06:45:12] cdolan: has joined #ruby
[06:47:56] CrazyEddy: has joined #ruby
[06:48:18] alfiemax: has joined #ruby
[06:48:29] SCHAPiE: has joined #ruby
[06:52:38] bkxd: has joined #ruby
[06:53:21] bokayio: has joined #ruby
[06:54:18] nadir: has joined #ruby
[06:58:26] hahuang65: has joined #ruby
[07:01:06] bkxd: has joined #ruby
[07:02:48] bkxd: has joined #ruby
[07:05:06] apeiros: has joined #ruby
[07:05:43] cdolan: has joined #ruby
[07:06:28] Jello_Raptor: has joined #ruby
[07:08:24] konsolebox: has joined #ruby
[07:11:28] tAn: has joined #ruby
[07:13:07] guardianx: has joined #ruby
[07:13:19] jenrzzz: has joined #ruby
[07:13:19] jenrzzz: has joined #ruby
[07:14:50] alex``: has joined #ruby
[07:15:20] KeyJoo: has joined #ruby
[07:16:55] konsolebox: has joined #ruby
[07:17:14] fusta: has joined #ruby
[07:17:40] gulp-gulp: has joined #ruby
[07:21:42] cdolan: has joined #ruby
[07:24:31] Zimsky: has joined #ruby
[07:24:31] Jicemo: has joined #ruby
[07:24:33] rideh: has joined #ruby
[07:24:35] esObe: has joined #ruby
[07:24:38] Nightmare: has joined #ruby
[07:24:39] kapowaz: has joined #ruby
[07:24:40] peteretep: has joined #ruby
[07:24:42] cttttt: has joined #ruby
[07:24:44] darthThorik: has joined #ruby
[07:24:48] jtperreault: has joined #ruby
[07:24:48] justizin: has joined #ruby
[07:24:49] swgillespie: has joined #ruby
[07:24:53] Lloyd: has joined #ruby
[07:24:57] JJonah: has joined #ruby
[07:24:59] DarkBushido: has joined #ruby
[07:24:59] DarkBushido: has joined #ruby
[07:24:59] cschneid: has joined #ruby
[07:25:04] scott4000: has joined #ruby
[07:25:06] wsmoak: has joined #ruby
[07:25:11] enterprisey: has joined #ruby
[07:25:14] twe4ked: has joined #ruby
[07:25:15] larissa: has joined #ruby
[07:25:17] justinweiss: has joined #ruby
[07:25:27] Tony-St4rk: has joined #ruby
[07:25:29] contradictioned: has joined #ruby
[07:26:18] ewilliam: has joined #ruby
[07:26:21] Iambchop: has joined #ruby
[07:26:32] olivierjanss: has joined #ruby
[07:26:55] kent\n: has joined #ruby
[07:27:01] ur5us: has joined #ruby
[07:29:16] tuelz: has joined #ruby
[07:29:54] bokayio: has joined #ruby
[07:30:04] mitchellvanw: has joined #ruby
[07:31:17] rhebz916: has joined #ruby
[07:34:56] konsolebox: has joined #ruby
[07:35:06] amatas: has joined #ruby
[07:38:07] ShekharReddy: has joined #ruby
[07:38:54] bkxd_: has joined #ruby
[07:39:46] Riddell: has joined #ruby
[07:41:12] apeiros: has joined #ruby
[07:41:39] coderxin: has joined #ruby
[07:41:44] pikislabis: has joined #ruby
[07:41:53] andikr: has joined #ruby
[07:42:38] cdolan: has joined #ruby
[07:46:24] jamesaxl: has joined #ruby
[07:51:03] dionysus69: has joined #ruby
[07:55:58] bkxd: has joined #ruby
[07:56:57] ur5us: has joined #ruby
[07:57:50] tAn: has joined #ruby
[07:58:14] TomyWork: has joined #ruby
[07:58:36] tAn: has joined #ruby
[07:59:09] burgestrand: has joined #ruby
[08:02:45] tAn: has joined #ruby
[08:02:59] huyderman: has joined #ruby
[08:03:11] tAn: has joined #ruby
[08:03:32] Pekoe: has joined #ruby
[08:04:46] MrSparkle: has joined #ruby
[08:05:18] abcd: has joined #ruby
[08:05:30] stealth[]: has joined #ruby
[08:06:47] tAn: has joined #ruby
[08:07:08] tAn: has joined #ruby
[08:09:10] tAn: has joined #ruby
[08:09:58] ferr: has joined #ruby
[08:15:47] jp: has joined #ruby
[08:17:54] bkxd: has joined #ruby
[08:18:55] cdolan: has joined #ruby
[08:19:49] anas: has joined #ruby
[08:21:25] claudiuinberlin: has joined #ruby
[08:24:08] InfinityFye: has joined #ruby
[08:25:24] InfinityFye: has left #ruby: ()
[08:26:03] tAn: has joined #ruby
[08:27:19] bkxd: has joined #ruby
[08:30:13] ur5us: has joined #ruby
[08:33:20] despai: has joined #ruby
[08:34:51] cdolan: has joined #ruby
[08:35:15] tomphp: has joined #ruby
[08:36:50] pikislabis: has joined #ruby
[08:41:06] ur5us: has joined #ruby
[08:42:10] gulp-gulp: has joined #ruby
[08:43:31] mark_66: has joined #ruby
[08:45:33] konsolebox: has joined #ruby
[08:51:59] unreal: has joined #ruby
[08:59:35] ur5us: has joined #ruby
[09:07:45] pikislabis: has joined #ruby
[09:07:52] bkxd_: has joined #ruby
[09:08:14] jaequery: has joined #ruby
[09:09:11] marr: has joined #ruby
[09:09:30] bkxd__: has joined #ruby
[09:10:59] cdolan: has joined #ruby
[09:12:19] konsolebox: has joined #ruby
[09:12:40] gulp-gulp: has joined #ruby
[09:12:46] duderono_: has joined #ruby
[09:13:16] burgestrand: has joined #ruby
[09:15:10] cdg: has joined #ruby
[09:16:16] yeticry: has joined #ruby
[09:16:51] alfiemax_: has joined #ruby
[09:17:40] mikecmpbll: has joined #ruby
[09:19:14] itachi: has joined #ruby
[09:21:07] iamarun: has joined #ruby
[09:24:44] Ishido: has joined #ruby
[09:28:40] tAn: has joined #ruby
[09:29:13] tAn: has joined #ruby
[09:31:32] cdolan: has joined #ruby
[09:36:42] duderonomy: has joined #ruby
[09:38:51] kies: has joined #ruby
[09:43:03] pikislabis: has joined #ruby
[09:44:34] chichou: has joined #ruby
[09:46:40] konsolebox: has joined #ruby
[09:47:31] cdolan: has joined #ruby
[09:49:18] Musashi007: has joined #ruby
[09:49:38] mikhael_k33hl: has joined #ruby
[09:49:45] KeyJoo: has joined #ruby
[09:50:20] mikhael_k33hl: Is it good practice to place multiple modules in one file? like I have a file named commons.rb and I'm planning to place all modules to be shared in that file
[09:50:52] bkxd: has joined #ruby
[09:52:03] Beams: has joined #ruby
[09:52:38] Serpent7776: has joined #ruby
[09:54:34] ur5us: has joined #ruby
[09:54:55] bkxd_: has joined #ruby
[09:56:00] ledestin: has joined #ruby
[09:57:21] code_zombie_: has joined #ruby
[10:01:02] fschuindt: has joined #ruby
[10:03:00] kits: has joined #ruby
[10:03:25] ur5us: has joined #ruby
[10:04:57] dn`: has joined #ruby
[10:07:58] cdolan: has joined #ruby
[10:12:11] Drakevr: has joined #ruby
[10:12:46] GodFather: has joined #ruby
[10:28:37] duderonomy: has joined #ruby
[10:30:09] Cavallari: has joined #ruby
[10:32:16] hahuang65: has joined #ruby
[10:32:30] Cavallari1: has joined #ruby
[10:35:12] ur5us: has joined #ruby
[10:35:18] chmurifree: has joined #ruby
[10:39:48] bkxd: has joined #ruby
[10:41:35] zapata: has joined #ruby
[10:46:40] cdolan: has joined #ruby
[10:46:48] KeyJoo: has joined #ruby
[10:51:06] cdg: has joined #ruby
[10:54:49] Musashi007: has joined #ruby
[10:59:27] coderxin: has joined #ruby
[11:06:03] vtx: has joined #ruby
[11:09:15] omphe: has joined #ruby
[11:09:45] mikhael_k33hl: Anybody can recommend a good book/article for ruby threads/concurrency?
[11:16:20] Musashi007: has joined #ruby
[11:17:54] coderxin: has joined #ruby
[11:18:05] duderonomy: has joined #ruby
[11:18:08] alfiemax: has joined #ruby
[11:20:53] Terens: has joined #ruby
[11:22:11] alfiemax: has joined #ruby
[11:22:23] bkxd_: has joined #ruby
[11:25:09] DmitryBochkarev: has joined #ruby
[11:25:22] Terens: is there a good book for threads/concurency in rubyu?
[11:25:38] DrCode: has joined #ruby
[11:26:24] apeiros: the "standard" books might have chapters on threads/concurrency, see topic for a list
[11:26:39] Kedare: has joined #ruby
[11:26:40] apeiros: ping me if you find a good one so I can add it topically
[11:26:56] bkxd: has joined #ruby
[11:29:32] Terens: I found it thnx
[11:30:17] Azure: has joined #ruby
[11:30:22] bkxd: has joined #ruby
[11:33:32] milardovich: has joined #ruby
[11:33:48] AJA4350: has joined #ruby
[11:37:20] vtx: has joined #ruby
[11:38:42] vtx: hi guys, has anyone here used mongodb with ruby? some of my queries take 10-20 seconds to complete, and when i have a number of queries running as part of a single request, my request takes minutes to complete. i was wondering if anyone had experience of improving mongo performance with the ruby driver? or if there are some options i can provide that will speed up my query completion time?
[11:41:01] amatas_: has joined #ruby
[11:44:32] Ishido: has joined #ruby
[11:46:04] pikislabis: has left #ruby: ()
[11:46:13] amatas_: has joined #ruby
[11:46:32] bkxd: has joined #ruby
[11:54:11] guille-moe: has joined #ruby
[11:54:17] al2o3-cr: has joined #ruby
[11:55:05] jaruga: has joined #ruby
[11:57:56] dima_: has joined #ruby
[11:58:32] mk[]: has joined #ruby
[11:59:51] coderxin: has joined #ruby
[12:03:46] Psybur: has joined #ruby
[12:11:31] bkxd: has joined #ruby
[12:14:18] danielpclark: has joined #ruby
[12:18:24] bkxd_: has joined #ruby
[12:27:54] amatas_: has joined #ruby
[12:28:27] alfiemax_: has joined #ruby
[12:29:20] Psybur_: has joined #ruby
[12:29:48] rabajaj: has joined #ruby
[12:32:38] leitz: has joined #ruby
[12:33:07] hahuang65: has joined #ruby
[12:35:49] ur5us: has joined #ruby
[12:36:25] mk[]: are there green threads for ruby?
[12:38:16] Puffball: has joined #ruby
[12:38:42] alfiemax: has joined #ruby
[12:39:13] kedare1: has joined #ruby
[12:42:50] cadillac_: has joined #ruby
[12:45:48] elphe: has joined #ruby
[12:49:58] RougeT430: has joined #ruby
[12:56:52] plexigras: has joined #ruby
[12:56:59] vichib: has joined #ruby
[13:00:52] mk[]: has left #ruby: ("WeeChat 1.9.1")
[13:01:27] Sylario: has joined #ruby
[13:05:56] milardovich: has joined #ruby
[13:07:41] mostlybadfly: has joined #ruby
[13:08:04] synthroid: has joined #ruby
[13:08:36] k0mpa: has joined #ruby
[13:09:51] coderxin: has joined #ruby
[13:14:05] mtkd: has joined #ruby
[13:14:54] vtx: hi guys, when creating a `BSON::Regexp::Raw` instance with: BSON::Regexp::Raw.new(/^#{name}\/.*/), i get: “warning: flags ignored” how can i get rid of this warning?
[13:22:58] Cavallari: has joined #ruby
[13:28:34] alfiemax_: has joined #ruby
[13:29:45] miskatonic: has joined #ruby
[13:30:17] mikhael_k33hl: has joined #ruby
[13:30:25] apeiros: vtx: way to omit about all necessary context…
[13:30:27] mikhael_k33hl: how do I determine what ruby interpreter am I using?
[13:30:49] apeiros: vtx: BSON::Regexp::Raw is not from ruby, so maybe start by telling us where that comes from
[13:30:59] apeiros: mikhael_k33hl: ruby -v
[13:31:18] apeiros: mikhael_k33hl: within ruby, RUBY_VERSION, also various other RUBY_ constants for other details. like e.g. RUBY_ENGINE
[13:31:22] mikhael_k33hl: apeiros: ruby 2.4.2p198 (2017-09-14 revision 59899) [x86_64-linux]
[13:32:05] mikhael_k33hl: apeiros: irb puts RUBY_VERSION doesn't display anything
[13:32:16] Musashi007: has joined #ruby
[13:32:39] apeiros: you don't have to puts it. but that it shows nothing is rather weird. RUBY_VERSION exists for ages…
[13:33:05] gnufied: has joined #ruby
[13:33:32] vtx: apeiros: sorry, i’m using it when querying my mongodb, and i guess it’s the point at which i execute my query that i get the warning
[13:33:33] gnufied__: has joined #ruby
[13:33:51] hahuang65: has joined #ruby
[13:34:06] mikhael_k33hl: apeiros: hmmm, so how do I determine if I'm using MRI or something else?
[13:34:12] apeiros: vtx: is there more than just a single mongodb driver for ruby?
[13:34:49] apeiros: mikhael_k33hl: your `ruby -v` indicates that you're using MRI. no idea about your irb. that RUBY_VERSION is blank there is as said rather weird.
[13:35:04] apeiros: I'd probably check `which irb` and compare with `which ruby`
[13:35:14] vtx: apeiros: um im not sure, i’m using “require “mongo”” which i guess is the default choice?
[13:35:35] apeiros: vtx: great. that's what you next time should lead with :-p
[13:35:41] mikhael_k33hl: apeiros: I'm sorry but I'm fairly new to ruby, which part of ruby 2.4.2p198 (2017-09-14 revision 59899) [x86_64-linux] indicates it is using MRI?
[13:35:51] bmurt: has joined #ruby
[13:35:56] vtx: apeiros: sorry
[13:36:14] apeiros: mikhael_k33hl: the part where it's missing any information about it being another engine. and yes, it means that you need to know that which isn't great.
[13:36:29] apeiros: mikhael_k33hl: e.g. jruby will contain "jruby" in that thingy
[13:37:00] monodoh: has joined #ruby
[13:37:39] mikhael_k33hl: apeiros: oh so MRI is the defacto okay got it thanks
[13:38:17] apeiros: vtx: funny. gem install mongo; pry -rmongo !> cannot load such file -- mongo
[13:38:41] apeiros: vtx: since that happens, let me ask - which gem do you use which allows for a `require 'mongo'`
[13:39:28] Musashi007: has joined #ruby
[13:40:24] jeffreylevesque: has joined #ruby
[13:40:37] vtx: apeiros: so i have “gem "mongo", ">=2.4.3"” in my gemfile
[13:42:24] cabotto: has joined #ruby
[13:42:42] apeiros: yeah, mongo 2.4.3 is what it installed here.
[13:43:41] apeiros: I'm not in the root dir, and the current dir has a Gemfile :D
[13:44:27] apeiros: vtx: ok, I don't get a warning with `name = "hello"; BSON::Regexp::Raw.new(/^#{name}\/.*/)`
[13:44:43] apeiros: so I guess you'll have to reveal an actual value for name which causes the warning
[13:48:57] chocoelho: has joined #ruby
[13:51:28] al2o3-cr: has joined #ruby
[13:52:23] milardovich: has joined #ruby
[14:08:09] rabajaj: has joined #ruby
[14:12:21] rfoust: has joined #ruby
[14:13:50] pavelz: has joined #ruby
[14:14:34] jobewan: has joined #ruby
[14:15:49] cdg: has joined #ruby
[14:16:35] sspreitz: has joined #ruby
[14:17:38] Jameser: has joined #ruby
[14:18:55] balo: has joined #ruby
[14:22:26] alex``: has joined #ruby
[14:23:07] JaccoP: has joined #ruby
[14:23:10] meesles: has joined #ruby
[14:24:16] milardovich: has joined #ruby
[14:29:58] terens2: has joined #ruby
[14:30:29] shinnya: has joined #ruby
[14:35:07] mjolnird: has joined #ruby
[14:36:15] ur5us: has joined #ruby
[14:38:03] johno84: has joined #ruby
[14:42:25] ShekharReddy: has joined #ruby
[14:45:44] webguynow: has joined #ruby
[14:49:38] jamiejackson: has joined #ruby
[14:50:21] mikhael_k33hl: If I have a class named WorkerPool, and plan to instantiate subclsses called Worker and have them share data throu WorkerPool's variable, what's the best way for doing that?
[14:51:04] RougeT430: has joined #ruby
[14:53:00] jnollette: has joined #ruby
[14:54:19] apeiros: class WorkerPool; @shared = {}; class << self; attr_reader :shared; end; end
[14:54:23] apeiros: and then WorkerPool.shared
[14:54:54] apeiros: if your worker pool is threaded, you should NOT provide a direct accessor. instead use gating methods, which synchronize over a mutex.
[14:54:57] chocoelho: has joined #ruby
[14:54:57] apeiros: mikhael_k33hl: ^
[14:55:19] hays_: has joined #ruby
[14:55:50] hays_: I am looking for a better pattern than this for envirnoment overrides: ENV['FOO'] ? ENV['FOO'] : do_something_else
[14:56:37] griffindy: has joined #ruby
[14:56:50] apeiros: ENV['foo'] || other
[14:56:59] GodFather_: has joined #ruby
[14:57:02] conta2: has joined #ruby
[14:57:28] cadillac_: has joined #ruby
[14:57:33] apeiros: alternatively: ENV.fetch(key, default) or even ENV.fetch(key) { default }
[14:57:35] Rapture: has joined #ruby
[14:58:39] tvw: has joined #ruby
[14:59:00] hays_: what if I've already set the value
[14:59:17] hays_: like foo = ENV['foo'] || foo ?
[14:59:20] mikhael_k33hl: apeiros: Oh so use a class instance variable, the WOrker Pool will run on the main thread but the instantiated subclasses will be threaded
[15:01:57] apeiros: mikhael_k33hl: then as I said, don't provide direct access, provide access through synchronized methods
[15:02:08] apeiros: hays_: I don't follow
[15:02:34] marr: has joined #ruby
[15:02:44] hays_: apeiros: foo = ENV['foo'] || foo
[15:02:47] mikhael_k33hl: apeiros: Oh like Mutex, hmmm, i'm looking into celluloid at the moment btw
[15:03:11] hays_: apeiros: this would be the way to do it, but it seems also repetetive. This is the case where foo is already assigned
[15:03:32] apeiros: hays_: again, I don't follow
[15:04:30] burgestrand: has joined #ruby
[15:04:42] _aeris_: has joined #ruby
[15:05:08] hays_: apeiros: so if foo isn't assigned, then the pattern foo = ENV['foo'] || default_value works great--no repetition. However if foo is already assigned to a value and and I want to override if it there is an environment variable, I have to repeat the 'foo' at the end. So I'm wondering if there is a way to do this that is better than foo = ENV['foo'] || foo, which assigns foo to itself if ENV['foo'] is empty
[15:05:45] dinfuehr: has joined #ruby
[15:05:49] mikhael_k33hl: apeiros: For a ruby script using rsync, what are your recommendations? gems maybe?
[15:05:52] r0ph: has joined #ruby
[15:06:10] apeiros: hays_: I don't think there's a non-repetitive form of `a = b || a`
[15:07:01] apeiros: mikhael_k33hl: I don't have any. if you don't want to shell out, I'd search rubygems, then ruby-toolbox
[15:07:16] nofxx: has joined #ruby
[15:07:19] al2o3-cr: has joined #ruby
[15:07:59] polishdub: has joined #ruby
[15:08:18] cadillac_: has joined #ruby
[15:08:48] Guest3691: has joined #ruby
[15:09:18] mikhael_k33hl: apeiros: pertaining the GIL on MRI, since only one thread is allowed to run, how to you put a thread that is currently syncing in the backgroud to allow other threads to run?
[15:09:28] Kedare: has joined #ruby
[15:10:00] apeiros: that's what the scheduler does
[15:10:10] JaccoP: has joined #ruby
[15:10:19] apeiros: and that's why you have threads in the first place, so you do not have to manage what's run when.
[15:10:35] mikhael_k33hl: apeiros: hmmmm, is that handled automatically?
[15:11:01] mikhael_k33hl: apeiros: so when the interpreter detects that one thread is detecting that it is waiting some IO operations, it puts it in the background and let other threads run?
[15:11:10] apeiros: yes. that's - as said - the very point of threads.
[15:11:24] apeiros: not just when it waits on IO
[15:11:36] chocoelho: has joined #ruby
[15:11:47] apeiros: each thread gets a slice of time to progress on its code
[15:12:04] mikhael_k33hl: apeiros: oh okay, I get it now hmm better refactor my code, lol
[15:12:22] apeiros: this is also the reason why you have to protect shared resources.
[15:14:57] burgestrand: fibers use cooperative scheduling though
[15:16:21] dminuoso: Burgestrand: Strictly speaking so do threads in 95% of all cases :P
[15:16:32] apeiros: dminuoso: no
[15:16:53] apeiros: dminuoso: cooperative would mean the thread controls the scheduling. they do not. apart from sleep.
[15:16:57] dminuoso: apeiros: They do. Preemption frequencies are really low to avoid high tlb pressure.
[15:17:01] dminuoso: apeiros: They do.
[15:17:11] dminuoso: apeiros: Almost every syscall calls the scheduler first.
[15:17:24] dminuoso: Which means any kernel interaction is essentially a cooperative yield
[15:17:26] burgestrand: dminuoso It's hard to starve the other threads of CPU time though, no?
[15:17:27] apeiros: dminuoso: that's not what cooperative scheduling is.
[15:17:43] burgestrand: (unless you do something funny in C and avoid calling any ruby methos :D)
[15:17:47] apeiros: dminuoso: the moment there is a scheduler, you do *not* have cooperative
[15:17:55] dminuoso: apeiros: yes you do...
[15:18:02] apeiros: reread the definition. you're wrong.
[15:18:03] dminuoso: apeiros: You dont get to pick the next task.
[15:18:11] cadillac__: has joined #ruby
[15:18:13] apeiros: you don't get to pick not to run another thread.
[15:18:16] dminuoso: apeiros: its not scheduling that conflicts with cooperation, its preemption.
[15:18:25] apeiros: other threads do not need *cooperation* from the running thread
[15:18:34] elphe: has joined #ruby
[15:18:39] apeiros: which is why it's called *cooperative* multithreading
[15:19:12] mtkd: has joined #ruby
[15:19:30] dminuoso: Burgestrand: Well even then you cant realistically starve CPU time, but you can drastically decrease responsiveness of your system.
[15:20:05] burgestrand: Yeeah, but I could do that by allocating gobs of memory too :)
[15:20:09] dminuoso: Burgestrand: If you're on a single CPU system and you're playing a movie, then highly computational code will seriously impact your experience if your kernel is configured with a low preemption frequency (which most linux kernels by default have)
[15:20:25] dminuoso: Yeah I guess
[15:21:31] burgestrand: I don't think I'd pick ruby as my first choice for any kind of media playback to be fair :)
[15:21:50] burgestrand: Because of the garbage collector
[15:22:53] Nahra`: has joined #ruby
[15:23:10] dminuoso: apeiros: The thing is kernels *do* expect kernels to yield implicitly by making syscalls. This is done to drastically reduce unnecessary TLB pressure and pipeline flushes.
[15:23:21] burgestrand: What's a TLB?
[15:23:27] dminuoso: transaction lookaside buffer
[15:23:34] burgestrand: Yeah not helping :p but I can google that!
[15:23:36] Papierkorb: *translation
[15:23:47] apeiros: dminuoso: that may all well be
[15:23:49] dminuoso: Burgestrand: Essentially the cache for virtual/physical page mapping
[15:24:05] apeiros: dminuoso: it doesn't change the definition, though
[15:24:41] dminuoso: Burgestrand: Though come to think of it.. it doesn't increase TLB pressure. But it definitely causes pipeline flushes.
[15:25:12] dminuoso: (Whereas cooperative scheduling does not)
[15:25:15] burgestrand: Ah, cool, the TLB reduces the cost of memory cache misses due to e.g. context switching?
[15:25:48] dminuoso: Burgestrand: Well there is an indirect relation. The TLB is fairly limited, so the less context switching happens the less evictions you get.
[15:25:59] wolfshappen: has joined #ruby
[15:26:01] burgestrand: Fair enough, cache trashing is also a thing :)
[15:26:10] burgestrand: … trashing or thrashing?
[15:26:18] jnollette: has joined #ruby
[15:26:23] burgestrand: thrashing, TIL
[15:26:57] cdg: has joined #ruby
[15:27:56] zautomata: has joined #ruby
[15:30:18] Azure: has joined #ruby
[15:30:20] oleo: has joined #ruby
[15:32:57] hays_: is there a preferred way to do string formatting other than "%02d" % [foo]
[15:33:58] burgestrand: hays_ Not AFAIK, but there's always another way(tm)
[15:34:08] balo: has joined #ruby
[15:34:24] burgestrand: I mean, string interpolation is probably even more used…
[15:34:51] hays_: yeah. it just looks a little weird agains tthe "#{foo}" syntax
[15:34:57] hahuang65: has joined #ruby
[15:35:04] hays_: but it works great
[15:35:13] Flashynuff: has joined #ruby
[15:35:16] burgestrand: Well, it does have numerical padding unlike straight up string interpolation :)
[15:35:35] burgestrand: e.g. adding spaces or zeroes to number to make them fit their desired width
[15:35:48] guille-moe: has joined #ruby
[15:35:56] burgestrand: (String#lpad doesn't count)
[15:36:25] ineb: has joined #ruby
[15:37:02] apeiros: dminuoso: "all programs must cooperate for the entire scheduling scheme" (source: https://en.wikipedia.org/wiki/Cooperative_multitasking) - ruby's threads do not require cooperation. therefore *not* cooperative scheduling. that you *can* voluntarily give up process time does not change that.
[15:38:23] apeiros: but apparently the controlling instance for threads in a cooperative multitasking env is still called "scheduler", so I guess I have to be more explicit there.
[15:39:41] apeiros: i.e. "presence of scheduler implies non-cooperative" was wrong. "presence of a scheduler which can forcedly change the scheduled thread implies non-cooperative" would be a better fit.
[15:40:14] hays_: Burgestrand: maybe one way to do it would be to derive an object from Integer that overrides to_s
[15:40:16] burgestrand: Ah, right, so if I'm sitting there and actively deciding which fiber to run then I'm the scheduler
[15:40:51] burgestrand: hays_ Absolutely, FixedWidthIntegerWithPadding(0) :D
[15:40:54] icedragon: has joined #ruby
[15:41:03] burgestrand: Darn, `.new(0)`
[15:41:16] apeiros: fibers are cooperative. but it has a scheduler (which afaik isn't you - or is there a way to explicitly state which fiber runs next?).
[15:41:29] burgestrand: apeiros you can transfer control from one fiber to another one
[15:41:42] hays_: Celluloid is cool. I've used it once. The GIL is kind of a bummer though.
[15:41:42] apeiros: ok. so you can even be a scheduler with fibers :D
[15:42:04] burgestrand: So in theory you could send a request to somebody's cellphone asking which fiber to run next
[15:42:19] apeiros: ACTION rebuilt the behavior of JS with threads once - should have used fibers. would have been much easier and probably more performant :D
[15:43:14] burgestrand: hays_ Nah, most of the time people's issue with the GIL is just their issue with the GIL, and nothing much concrete
[15:43:44] RougeT430: has joined #ruby
[15:43:58] burgestrand: I mean, that's just my opinion, but I don't think it's as bad as it's been made out to be
[15:44:30] hays_: Burgestrand: well it prevents the use of multiple cores
[15:44:32] burgestrand: I've written my fair share of concurrent software in ruby by now, the GIL turned out to be a problem only when I was doing some audio playback stuff on a raspberry pi :d
[15:44:42] troys: has joined #ruby
[15:44:55] burgestrand: hays_ Yeah, and that's a bummer, but most of the time that doesn't matter and you'll be running multiple instances of your software on the same machine through multiple processes anyway!
[15:45:16] hays_: guess it depends on your use case for Celluloid
[15:45:33] russt: has joined #ruby
[15:46:13] hays_: my use case was that I really wanted separate independent threads within the script/process
[15:46:17] burgestrand: One of the larger celluloid projects I wrote was interaction with a game server to send semi-live positional data for in-game vehicles to a web frontend, and even then we could easily serve over 20k simultaneous users in a single ruby process
[15:46:52] hays_: it ended up working, but it did stress out some of the laptops we ran it with due to the single core. Then I tried jruby and found concurrency bugs that didn't show up with the GIL.
[15:47:19] burgestrand: Ah yes, that'll bite you in the switch for sure, concurrency is hard!
[15:47:45] hays_: still don't know what it was--thought I had mutexes on everything. probably will never figure it out
[15:48:10] hays_: handed the project to an electrical engineer and now the code is pretty unmaintainable
[15:48:17] hays_: that may not have been the best idea
[15:50:40] hays_: anyone bored and want to help me figure out the best way to tie into an existing gem? I am using rmodbus, and I want to make some event-driven stuff when the server gets a query. trying to figure the best place to tie in
[15:51:25] mikecmpb_: has joined #ruby
[15:52:47] hays_: I think its here: https://github.com/rmodbus/rmodbus/blob/master/lib/rmodbus/tcp_server.rb#L39
[15:53:13] milardovich: has joined #ruby
[15:55:56] chocoelho: has joined #ruby
[15:58:57] pastorinni: has joined #ruby
[16:01:32] miskatonic: has joined #ruby
[16:05:02] mikecmpbll: has joined #ruby
[16:05:14] milardovich: has joined #ruby
[16:05:44] jaequery: has joined #ruby
[16:06:35] alfiemax: has joined #ruby
[16:06:55] cdg: has joined #ruby
[16:08:25] cschneid_: has joined #ruby
[16:10:21] dinfuehr: has joined #ruby
[16:10:47] neo95: has joined #ruby
[16:16:13] kent\n: has joined #ruby
[16:19:06] cadillac_: has joined #ruby
[16:21:05] consti: has joined #ruby
[16:25:53] lxnr: has joined #ruby
[16:27:16] hays_: has joined #ruby
[16:28:40] hays_: I am using this gem (rmodbus) and I'd like to modify its behavior. Specifically, I want to make the @holding_register = {} here (https://github.com/rmodbus/rmodbus/blob/434ad4921993d0f5419e3412f2d4437ef5188b00/lib/rmodbus/server.rb#L9) a custom class that implements the same API. How would I hook into the class to make this change?
[16:31:29] hays_: is overriding them as simple as assignment inside a new module block
[16:32:23] consti: has joined #ruby
[16:33:48] nofxx1: has joined #ruby
[16:34:35] cadillac_: has joined #ruby
[16:36:49] ur5us: has joined #ruby
[16:37:27] hays_: hrm. ok that didn't work
[16:43:39] jaequery: has joined #ruby
[16:44:53] nofxx: has joined #ruby
[16:45:18] synthroid: has joined #ruby
[16:46:20] hays_: how am I thinking about this wrong? https://bpaste.net/show/0cae106a2c47
[16:46:36] hays_: I'm expecting that holding_register to be now wrapped in my new object
[16:47:50] hays_: this is the relevant line in the gem https://github.com/rmodbus/rmodbus/blob/434ad4921993d0f5419e3412f2d4437ef5188b00/lib/rmodbus/server.rb#L9
[16:47:56] [Butch]: has joined #ruby
[16:51:24] cagomez: has joined #ruby
[16:52:58] cadillac_: has joined #ruby
[17:01:18] hays_: do i need to override the getter/setter?
[17:01:41] chocoelho: has joined #ruby
[17:02:24] rippa: has joined #ruby
[17:02:34] mikecmpb_: has joined #ruby
[17:04:18] hays_: hrm. that didn't do it either
[17:07:46] alfiemax: has joined #ruby
[17:12:27] RickHull: has joined #ruby
[17:13:17] cadillac_: has joined #ruby
[17:19:45] alex``: has joined #ruby
[17:24:17] rfoust: has joined #ruby
[17:24:22] mtkd: has joined #ruby
[17:25:05] raynold: has joined #ruby
[17:26:44] cadillac_: has joined #ruby
[17:31:10] dviola: has joined #ruby
[17:35:47] hahuang65: has joined #ruby
[17:37:35] cadillac_: has joined #ruby
[17:40:06] techn1cs: has joined #ruby
[17:40:06] techn1cs: has joined #ruby
[17:43:20] jnollette: has joined #ruby
[17:46:43] jaequery: has joined #ruby
[17:47:10] goepsilongo: has joined #ruby
[17:48:25] [Butch]: has joined #ruby
[17:49:34] cadillac_: has joined #ruby
[17:53:20] SeepingN: has joined #ruby
[17:53:59] sanscoeur: has joined #ruby
[17:54:43] safetypin: has joined #ruby
[17:59:21] FrostCandy: has joined #ruby
[18:04:17] skweek: has joined #ruby
[18:06:20] orbyt_: has joined #ruby
[18:08:57] hahuang65: has joined #ruby
[18:22:04] gizmore: has joined #ruby
[18:22:09] bmurt: has joined #ruby
[18:24:01] tAn: has joined #ruby
[18:26:28] gizmore|2: has joined #ruby
[18:26:33] falka: has joined #ruby
[18:28:03] gizmore|3: has joined #ruby
[18:29:10] falka: has left #ruby: ()
[18:29:32] [diecast]: has joined #ruby
[18:29:32] [diecast]: has joined #ruby
[18:30:18] centrx: has joined #ruby
[18:30:18] centrx: has joined #ruby
[18:32:07] orbyt_: has joined #ruby
[18:33:04] dviola: has joined #ruby
[18:35:13] ur5us: has joined #ruby
[18:36:58] cajone: has joined #ruby
[18:39:21] gizmore|3: is there type hinting planned / avail in JRuby maybe? i have read about contracts gem in ruby.. is it almost same as type hinting?
[18:39:48] gizmore|3: isnt it a more horrible slowdown? .... a typesafe ruby is a dream
[18:40:59] despai: has joined #ruby
[18:41:10] RickHull: gizmore: crystal and elixir offer ruby-like aesthetics with additional type guarantees, catching type errors before runtime
[18:41:43] gizmore: neato.... they are not ruby tho...?
[18:41:49] gizmore: is there the normal gems?
[18:42:04] RickHull: gizmore: this video is not the easiest to follow, but here is some proposal for types in ruby https://www.youtube.com/watch?v=Fjv9GxPXtck
[18:42:12] mjolnird: has joined #ruby
[18:42:29] gizmore: i dislike videos... but i give it a try. thank you
[18:42:33] RickHull: gizmore: it's a pipe dream, I feel. ruby is fundamentally duck typed
[18:42:42] dminuoso: gizmore: elixir doesnt realistically give type guarantees.
[18:42:43] RickHull: to add powerful typing to ruby would make it not ruby
[18:42:54] dminuoso: gizmore: Dialyzer is horrid to use.
[18:43:15] dminuoso: By gizmore I meant RickHull.
[18:43:17] RickHull: dminuoso: you get guarantees like pattern matched functions
[18:43:34] RickHull: but yes, I am not a fan of dialyzer -- last I looked
[18:43:46] RickHull: but you do get some errors at "compile time" rather than runtime
[18:43:54] dminuoso: gizmore: type hints are on the roadmap though.
[18:44:05] gizmore: dminuoso: thank you!
[18:44:16] TomyLobo: has joined #ruby
[18:44:20] gizmore: would be awesome to have typehints in ruby
[18:44:34] cagomez: has joined #ruby
[18:44:44] RickHull: what is the programmer UX for type hints?
[18:44:56] RickHull: what are the wins?
[18:44:56] gizmore: what is UX? user exp?
[18:45:18] gizmore: your IDE can easily create links in the src
[18:45:35] gizmore: like aptana studio could easily allow ctrl+click to jmp between funcs
[18:45:47] RickHull: so it's primarily about IDE stuff, not detecting errors?
[18:45:59] gizmore: for my side... yes
[18:46:13] dminuoso: RickHull: What are the wins? Is that question serious?
[18:46:23] dminuoso: RickHull: Let's say you have this situation:
[18:46:33] gizmore: not 100%.. but 95% .... the error catching is indeed a nice to have
[18:46:43] dminuoso: f :: (String -> Bool) -> String -> String
[18:46:46] dminuoso: And you call it with a double.
[18:46:56] RickHull: the question is serious :) I like discussing things that I am fuzzy on
[18:46:56] dminuoso: Why should it not hit you in the face when you save?
[18:47:12] RickHull: is that a type hint or strong typing?
[18:47:15] dminuoso: It's obviously wrong. To defer this error to runtime is just hiding bugs.
[18:47:29] dminuoso: RickHull: type hints are a necessity from incomplete typing systems.
[18:47:41] gizmore: in PHP there is auto conversion even.... like foo(string $bar) is auto converted to string
[18:47:44] RickHull: i understand the wins from strong typing -- I'm a true believer
[18:47:50] RickHull: i am asking about mere type hints
[18:47:53] dminuoso: RickHull: Im not talking about strong typing.
[18:48:07] gizmore: aptana studio could need type hinting :(
[18:48:24] gizmore: type hint might be a win:win
[18:48:27] gizmore: type hint might be a win:win:win
[18:48:41] dminuoso: RickHull: Type hints a) document usage (something you will do in rdoc anyway) and augment an incomplete type system when inference is not total.
[18:49:13] RickHull: is it distinct from type annotations? or would that cover strong typing as well?
[18:49:24] RickHull: i also like the idea of type inference
[18:49:28] xco: has joined #ruby
[18:49:31] dminuoso: RickHull: Nah, its just a synonymous expression.
[18:49:36] dminuoso: RickHull: And stop talking about strong typing.
[18:49:55] dminuoso: C++ for example is somewhat weakly type.
[18:49:58] cagomez: has joined #ruby
[18:50:10] xco: i want to grab the first and last names of a User and interpolate it in a view. I have this, it doesn’t look pretty, is there a better way to do it? <%= "Reviewer: " + User.where(id: image_response.reviewed_by).pluck(:first_name, :last_name).first.to_s %>
[18:50:12] jeffreylevesque: has joined #ruby
[18:50:21] RickHull: by strong typing, I mean that type checking occurs and where the check fails, there is an error
[18:50:27] RickHull: what is the term for that?
[18:50:32] dminuoso: xco: Dont trigger queries in your views.
[18:50:37] dminuoso: RickHull: Typing.
[18:50:48] RickHull: so ruby has types, right?
[18:50:56] dminuoso: RickHull: Ruby is singly typed.
[18:51:04] dminuoso: It has the one single type: Dynamic.
[18:51:24] RickHull: what is weak about c++ types?
[18:51:36] dminuoso: RickHull: type promotions, type conversions, reinterpret casts
[18:51:46] xco: dminuoso: what can i do instead?
[18:51:56] dminuoso: xco: pre calculate it before you feed it into the view.
[18:52:05] hays_: has joined #ruby
[18:52:25] xco: dminuoso: in the Model you mean?
[18:52:27] RickHull: in the controller, presumably
[18:52:35] RickHull: or the model, depending
[18:52:41] orbyt_: has joined #ruby
[18:53:20] hays_: how am I thinking about this wrong? https://bpaste.net/show/0cae106a2c47
[18:53:24] RickHull: xco: I like this from railsconf https://www.youtube.com/watch?v=HctYHe-YjnE
[18:53:31] hays_: I'm expecting that holding_register to be now wrapped in my new object
[18:53:46] hays_: this is the relevant line in the gem https://github.com/rmodbus/rmodbus/blob/434ad4921993d0f5419e3412f2d4437ef5188b00/lib/rmodbus/server.rb#L9
[18:53:55] meesles: has joined #ruby
[18:54:01] gizmore|2: has joined #ruby
[18:54:16] hays_: how am I misunderstanding this concept? I thought changes like this were possible in Ruby
[18:54:27] RickHull: hays_: are you aware that @holding_registers is a "class instance variable" and not a normal ivar?
[18:54:32] RickHull: because of the scope where you assign it
[18:54:42] RickHull: (I think that's the case)
[18:54:54] RickHull: you would typically assign an ivar within a method definition
[18:55:02] alfiemax: has joined #ruby
[18:55:08] hays_: yeah, I think that is the case as well
[18:55:32] RickHull: ok, I see -- it's that way in the gem too
[18:55:48] hays_: RickHull: I've also tried defining a holding_register function to overload the attr_accessor
[18:55:51] dminuoso: RickHull: For example in Haskell its impossible to feed an Integer into a place that expects a Double. Types don't automatically convert.
[18:55:59] dminuoso: RickHull: But the real weak thing about C++ is reinterpret_cast.
[18:56:53] hays_: like this: https://bpaste.net/show/47879c4323d3
[18:58:31] RickHull: hays_: I wouldn't expect that to help. I see that holding_registers is sometimes a method parameter and other times referring to the "class instance variable" (or would it be "module instance variable"?)
[18:58:59] raul782: has joined #ruby
[18:59:05] dminuoso: hays_: You shouldnt poke into internals like that. It will break rmodbus.
[18:59:06] ledestin: has joined #ruby
[18:59:07] RickHull: to me, this gem's design is confusing
[18:59:14] dminuoso: hays_: The gem makes assumptions about how holding_registers is used.
[18:59:29] fChanX: has joined #ruby
[18:59:40] hays_: dminuoso: ok. well I'm trying to figure out how to trigger an action whenever @holding_registers is changed
[18:59:51] hays_: so I'd like to replace it with something that is wrapped
[19:00:02] RickHull: hays_: I see that it's nominally an array -- why would you try to substitute a hash?
[19:00:31] dminuoso: hays_: Is this for debugging purposes?
[19:00:53] hays_: RickHull: yeah, brain fart on my part
[19:00:57] fChanX: Hello. :) I am wondering, what do you guys use ruby for? I have seen a lot of Rails things, but I am wondering if people are using it for anything else?
[19:01:05] hays_: dminuoso: no
[19:01:30] dminuoso: hays_: Then at the very least derive from Array and dont observably change its interface.
[19:01:48] RickHull: fChanX: e.g. https://github.com/rickhull?tab=repositories&q=&type=source&language=ruby
[19:01:52] hays_: dminuoso: its not working. the code has no effect
[19:01:54] dminuoso: fChanX: I don't.
[19:02:18] fChanX: You don't use Rails?
[19:02:31] rippa: has joined #ruby
[19:03:13] havenwood: fChanX: It's popular for dev ops (Chef, Puppet, etc), other web frameworks (Sinatra, Hanami, Roda, etc), telephony (Adhearsion), modeling automobile or aircraft hardware and software, and so on.
[19:03:20] hays_: dminuoso: @holding_registers = MyArray.new seems to have no effect on the code
[19:03:34] hays_: RickHull: I agree the gem is very confusing
[19:03:53] dminuoso: fChanX: I dont use Ruby.
[19:04:19] dminuoso: Outside of the 2 rails apps. Nowadays.
[19:05:28] hays_: it works in just an irb session (the deriving from Array)
[19:05:41] fChanX: Thanks guys!
[19:05:46] hays_: but setting @holding_registers = MyArray.new doesn't seem to actually do anything
[19:06:18] fChanX: has left #ruby: ()
[19:07:19] RickHull: one thing that I'm confused by -- can an instance method refer (properly) to a class instance variable?
[19:07:39] RickHull: it seems to me that rmodbus wants @holding_registers to be both an ivar and a class-ivar
[19:07:48] RickHull: and i'm not sure if they correspond or are totally distinct
[19:08:09] RickHull: when referring to @holding_registers in an instance method -- I think this is only the ivar and not the class-ivar
[19:08:18] hays_: RickHull: check out https://github.com/rmodbus/rmodbus/blob/434ad4921993d0f5419e3412f2d4437ef5188b00/lib/rmodbus/tcp_server.rb#L19
[19:08:23] RickHull: so I'm not sure what purpose the class-ivar serves
[19:09:07] hays_: maybe I need to modify TCPServer somehow
[19:09:21] RickHull: i believe @holding_registers only refers to the class-ivar in a class context -- and so again, not sure what purpose it serves
[19:09:22] hays_: like rerun include Server somehow?
[19:11:17] RickHull: now, it could be that modules which are mixed in -- their class-ivars might get plonked into the ivar space -- but I doubt it
[19:11:46] hays_: so that "include Server" would seem to add it in as an instance variable?
[19:11:49] RickHull: my guess is that the @holding_registers class-ivar is totally useless and irrelevant
[19:12:42] RickHull: hays_: yes, that is a remote and unlikely possibility, but ruby and mixins are pretty weird so I can't rule it out
[19:13:47] RickHull: hays_: probably what you want to do is `srv.holding_registers = MyThing.new`
[19:14:02] dminuoso: 20:07 RickHull | one thing that I'm confused by -- can an instance method refer (properly) to a class instance variable?
[19:14:05] apeiros_: has joined #ruby
[19:14:11] dminuoso: RickHull: class instance variables are not "special"
[19:14:15] dminuoso: they are instance variables like any other instance variable.
[19:14:23] RickHull: so it's pretty weird that rmodbus defines class instance variables
[19:14:26] Cavallari: has joined #ruby
[19:14:28] RickHull: but doesn't deign to use them
[19:14:30] dminuoso: The only "confusing" thing is the name "class instance variables"
[19:14:37] dminuoso: They are just regular instance variables of the class object itself.
[19:14:53] RickHull: that's what I thought, but it appears rmodbus didn't get the memo
[19:15:55] sameerynho: has joined #ruby
[19:17:12] hays_: RickHull: I like your idea of just modifying the array like that
[19:17:20] hays_: that also however doesn't seem to do the trick
[19:17:28] hays_: srv.holding_registers = MyArray.new [0]*11000
[19:18:25] hays_: interestingly, this works when I access it directly in the code, but not when I make the change via the server
[19:18:31] RickHull: git grep tells me that rmodbus's class-ivars are indeed totally useless and irrelevant
[19:18:40] RickHull: call it 90-95% certain
[19:19:32] hays_: here is the line that modifies the holding register array https://github.com/rmodbus/rmodbus/blob/434ad4921993d0f5419e3412f2d4437ef5188b00/lib/rmodbus/server.rb#L53
[19:19:49] RickHull: hays_: in that case, it is a method arg
[19:19:53] RickHull: it's not using the ivar
[19:20:03] RickHull: this gem is ... interesting
[19:20:20] hays_: so.. srv.holding_registers = MyArray.new [0]*11000 won't effec tit?
[19:20:31] dviola: has joined #ruby
[19:20:40] RickHull: hard to say -- I'm not really interested in untangling the logic :/
[19:21:04] neo95: has joined #ruby
[19:21:11] RickHull: but you understand the difference between a method arg and an ivar? holding_registers is effectively local to the method and does not affect the ivar
[19:21:58] nofxx1: has joined #ruby
[19:22:00] RickHull: you'll have to figure out what calls #exec_req and what is passed to it
[19:22:26] hays_: yeah, ok. I see what you are saying
[19:23:28] hays_: yeah, its a method arg here srv.holding_registers = MyArray.new [0]*11000
[19:23:42] hays_: doh https://github.com/rmodbus/rmodbus/blob/434ad4921993d0f5419e3412f2d4437ef5188b00/lib/rmodbus/tcp_server.rb#L51
[19:24:51] RickHull: it seems silly to not just reference the ivar in the exec_req method
[19:25:00] RickHull: it also seems silly to define and never use class-ivars
[19:25:18] RickHull: i *would* expect your ivar setting to affect what is passed in
[19:25:27] RickHull: but perhaps #exec_req is called before you set your ivar
[19:27:12] apeiros_: RickHull: not every gem author is an A class ruby programmer
[19:27:34] despai_: has joined #ruby
[19:27:52] RickHull: for sure -- but I always assume I'm the one who doesn't get it -- so I give lots of benefit of the doubt
[19:28:05] RickHull: I assume the code is intentional and does stuff for a reason
[19:28:39] RickHull: and I sympathize with those using the code as a reference for hacking on it, and getting confused
[19:29:16] apeiros: space/tab mixed for indent causes me to have a strong bias
[19:29:34] dminuoso: 20:27 apeiros_ | RickHull: not every gem author is an A class ruby programmer
[19:29:36] dminuoso: They should be.
[19:29:43] dminuoso: We should set up a tribunal.
[19:29:50] RickHull: trial by codewars
[19:30:02] hays_: this is interesting. setting the holding_registers with my wrapped array actually breaks the code
[19:30:12] apeiros: but it'd be nice if there was a segmentation system in rubygems to see at least a basic code quality classification
[19:30:38] RickHull: i'm not sure this "confusion" can be detected systematically (easily)
[19:30:56] hays_: Am I doing this right? https://bpaste.net/show/bbf1803cbb4f
[19:30:57] RickHull: using the same thing conceptually with the same name as class-ivar, ivar, and method arg
[19:31:22] hays_: like, this ^^ should essentially do nothing, but it breaks the code.
[19:31:38] RickHull: what's broken?
[19:32:12] dminuoso: RickHull: Ignoring things like XXX_eval or instance_Variable_set, yes.
[19:32:24] dminuoso: (A parser will reveal this information quickly)
[19:32:42] RickHull: well -- it could be that it's useful to have the class-ivar, ivar, and method arg
[19:32:46] RickHull: i assumed it was
[19:32:59] RickHull: and further inspection showed it was useless and irrelevant
[19:33:03] RickHull: as far as I looked, anyway
[19:33:34] RickHull: if only we had rick-as-a-service
[19:34:06] hays_: RickHull: the connection resets
[19:34:49] hays_: pdu = func.chr + (params[:quant] * 2).chr + holding_registers[params[:addr],params[:quant]].pack('n*')
[19:35:08] RickHull: hays_: i'd guess your assignment is blowing away state in the old array
[19:35:16] hays_: hm. what is somearray[0,1]
[19:35:28] RickHull: a slice, i think
[19:35:44] hays_: guess i need to look at function prototype of [] and []=?
[19:35:53] RickHull: yeah, they do more than you think
[19:36:00] RickHull: just go to the rdoc
[19:36:11] RickHull: &ri Array#[]
[19:36:11] `derpy: http://ruby-doc.org/core-2.4.1/Array.html#method-i-5B-5D
[19:36:25] netherwolfe: has joined #ruby
[19:37:12] nofxx: has joined #ruby
[19:37:18] pabs: has joined #ruby
[19:38:14] hays_: RickHull: i don't know how to interpret that-- you can pass into the [] a 1,2 and the 2 is a length... does that come in as a single argument?
[19:38:27] hays_: like def [] idx
[19:38:29] RickHull: `def [](*args)`
[19:38:41] RickHull: aka variadic args
[19:38:57] RickHull: are you familiar with splat?
[19:39:05] hays_: I'll need to read about it
[19:39:10] conta2: has joined #ruby
[19:39:25] RickHull: >> def foo(*args); args.map { |a| a**2 }; end; foo(1,2,3)
[19:39:26] ruby[bot]: RickHull: # => [1, 4, 9] (https://eval.in/923955)
[19:39:29] eckhardt: has joined #ruby
[19:40:05] hays_: *args ok it comes in as an array i guess
[19:40:57] hays_: hm so []=[*args, val] ? does that make sense?
[19:41:13] mtkd: has joined #ruby
[19:41:20] hays_: hm. guess so
[19:41:25] hays_: that's pretty flexible
[19:44:00] hays_: money.got it
[19:45:07] hays_: that's a wonderful solution, to just assign srv.holding_registers
[19:47:05] hays_: now I just need to learn all the ways items will come into the array
[19:47:13] hays_: which the above doc helps with
[19:50:27] alfiemax: has joined #ruby
[19:50:51] hays_: should I be using .class to distinguish between an Integer, a Range, and other things coming into Array?
[19:51:49] apeiros: hays_: no. almost never.
[19:52:01] apeiros: a.is_a?(b) >>> a.class == b
[19:52:22] apeiros: also note that you can do: case obj; when Integer then … when Range then … …
[19:52:24] elementaru: has joined #ruby
[19:52:45] apeiros: and last but not least - if it is your code, IMO avoid coming into this situation instead.
[19:53:04] hays_: well im just overriding Array
[19:53:04] dminuoso: apeiros: Wow you just made me stare in total confusion.
[19:53:10] dminuoso: I just read >>> as something completely different.
[19:53:16] dminuoso: for 2 minutes.
[19:53:16] apeiros: dminuoso: :-p
[19:53:38] apeiros: hays_: uh, what? how about: don't?
[19:54:09] apeiros: if you do, I really hope you have a very strong case to
[19:56:07] xenial64-user: has joined #ruby
[19:56:31] hays_: a gem expects me to assign something as an array, and then it uses it. so it seemed sensible to reimplement the interface
[19:56:47] hays_: since I want to tie in at that point and do something whenever that array is modified
[19:57:30] hays_: seems like case is a good way to go
[20:01:20] jenrzzz: has joined #ruby
[20:01:20] jenrzzz: has joined #ruby
[20:01:56] claudiuinberlin: has joined #ruby
[20:05:11] apeiros: hays_: that's not necessarily "overriding Array". the only sensible interpretations in ruby for that to me was that you either monkey patched array or did `class MyArray < Array`
[20:05:58] ur5us: has joined #ruby
[20:05:58] apeiros: well, then: bad :)
[20:06:20] reber: has joined #ruby
[20:06:25] apeiros: does it test for the class or inheritance? if not, use duck-typing
[20:08:54] hays_: im basically going to have a dict of function objects for read and writing actions to the array, and whenever the array is accessed, it will look for an object associated with that index and execute the function object associated with that index, if any.
[20:09:29] marr: has joined #ruby
[20:09:52] apeiros: no, I meant does the library where you want to pass your array-replacement explicitly test whether it is an array?
[20:10:09] apeiros: if not, you don't need (and absolutely should not) to inherit from Array
[20:10:30] hays_: it does not
[20:10:48] hays_: so you are going to argue for composition right?
[20:11:32] hays_: if I do that, don't I have to pick through the code and find every Array method it uses and write passthroughs?
[20:12:28] milardovich: has joined #ruby
[20:16:10] rippa: has joined #ruby
[20:17:36] orbyt_: has joined #ruby
[20:18:05] dionysus69: has joined #ruby
[20:18:25] darkhanb: has joined #ruby
[20:18:27] alfiemax: has joined #ruby
[20:18:45] darkhanb: Hey guys, that's the ruby on rails channel?
[20:19:02] havenwood: ?rails darkhanb
[20:19:02] ruby[bot]: darkhanb: Please join #RubyOnRails for Rails questions. You need to be identified with NickServ, see /msg NickServ HELP
[20:19:03] havenwood: darkhanb: #rubyonrails
[20:19:29] coderxin: has joined #ruby
[20:20:19] dminuoso: o/ havenwood
[20:20:32] havenwood: dminuoso: \o
[20:20:58] zanshin: has joined #ruby
[20:23:56] zanshin: has joined #ruby
[20:26:17] ur5us: has joined #ruby
[20:27:23] orbyt_: has joined #ruby
[20:29:55] Psybur_: has joined #ruby
[20:32:33] cdg: has joined #ruby
[20:34:50] mikecmpbll: has joined #ruby
[20:36:48] raul782: has joined #ruby
[20:48:41] workmad3: has joined #ruby
[20:49:30] guille-moe: has joined #ruby
[20:50:59] guille-moe1: has joined #ruby
[20:51:33] alfiemax: has joined #ruby
[20:55:49] Psybur: has joined #ruby
[20:59:06] jenrzzz: has joined #ruby
[20:59:06] jenrzzz: has joined #ruby
[20:59:46] nicesignal: has joined #ruby
[21:03:07] KeyJoo: has joined #ruby
[21:05:41] meesles: has joined #ruby
[21:07:00] jaequery: has joined #ruby
[21:09:27] kies: has joined #ruby
[21:15:14] jenrzzz: has joined #ruby
[21:16:50] Silthias: has joined #ruby
[21:19:05] Silthias: has left #ruby: ()
[21:21:09] nso95-: has joined #ruby
[21:23:55] DLSteve: has joined #ruby
[21:25:55] cagomez: has joined #ruby
[21:26:02] chichou: has joined #ruby
[21:33:36] orbyt_: has joined #ruby
[21:34:55] coderxin: has joined #ruby
[21:34:56] cagomez: has joined #ruby
[21:35:40] cagomez: has joined #ruby
[21:38:08] connor_goodwolf: has joined #ruby
[21:38:12] orbyt_: has joined #ruby
[21:41:14] nogic: has joined #ruby
[21:42:31] jenrzzz: has joined #ruby
[21:42:31] jenrzzz: has joined #ruby
[21:42:41] cadillac_: has joined #ruby
[21:44:24] raul782: has joined #ruby
[21:45:04] john__: has joined #ruby
[21:46:25] mtkd: has joined #ruby
[21:50:08] jaequery: has joined #ruby
[21:52:11] pastorin_: has joined #ruby
[21:54:47] hays_: has joined #ruby
[21:54:47] hays_: has joined #ruby
[21:54:48] jnyw: has joined #ruby
[21:54:55] jaequery: has joined #ruby
[21:59:08] halt: has joined #ruby
[21:59:26] tomphp: has joined #ruby
[22:05:48] cdg: has joined #ruby
[22:12:06] kapil___: has joined #ruby
[22:14:11] vtx: has joined #ruby
[22:14:43] postmodern: has joined #ruby
[22:17:10] cschneid_: has joined #ruby
[22:17:12] tomphp: has joined #ruby
[22:22:00] webguynow: has joined #ruby
[22:24:20] orbyt_: has joined #ruby
[22:27:24] pastorinni: has joined #ruby
[22:27:24] Riddell: has joined #ruby
[22:28:08] cdolan: has joined #ruby
[22:34:48] gizmore: has joined #ruby
[22:36:56] kn-928: has joined #ruby
[22:38:07] RougeT430: has joined #ruby
[22:40:36] SyntaxASI: has joined #ruby
[22:43:05] milardovich: has joined #ruby
[22:45:20] adac: has joined #ruby
[22:45:45] zapata: has joined #ruby
[22:46:01] adac: how can i fetch a page content if the page is protected by cloudflare?
[22:46:24] adac: always getting ERROR 503: Service Temporarily Unavailable
[22:48:29] workmad3: has joined #ruby
[22:53:08] cagomez: has joined #ruby
[22:55:55] alfiemax_: has joined #ruby
[22:59:20] orbyt_: has joined #ruby
[22:59:22] milardovich: has joined #ruby
[23:02:09] milardovich: has joined #ruby
[23:06:54] cdg: has joined #ruby
[23:10:38] romeoh: has joined #ruby
[23:14:31] Papierkorb: adac: Are you sure that page isn't simply down?
[23:15:08] meesles: has joined #ruby
[23:15:30] adac: Papierkorb, yes it is online. but the cloudflare protection is enabled
[23:15:37] adac: qhere one has to wait up to 5 seconds
[23:15:45] adac: open_http': 503 Service Temporarily Unavailable (OpenURI::HTTPError)
[23:17:00] Papierkorb: Well, in that case, you're trying to circumvent a security measure, in which case sharing full implementations of such isn't the best idea. You'll have to analyze that "checking your browser" page and then implement its algorithm to proof you're a browser (Which you're not), or you actually use a Browser (e.g. through selenium)
[23:17:42] adac: Papierkorb, yes I think selenium is an idea
[23:17:46] adac: will try that tomorrow
[23:17:51] adac: thanks and good night!
[23:20:02] Musashi007: has joined #ruby
[23:28:31] monodoh: has joined #ruby
[23:29:06] jenrzzz: has joined #ruby
[23:29:06] jenrzzz: has joined #ruby
[23:29:10] alfiemax: has joined #ruby
[23:32:47] vyorkin: has joined #ruby
[23:38:58] vyorkin: has joined #ruby
[23:45:10] _whitelogger: has joined #ruby
[23:49:59] cdg: has joined #ruby
[23:53:06] DTZUZO: has joined #ruby
[23:55:06] k0mpa: has joined #ruby
[23:55:53] sanscoeur: has joined #ruby
[23:57:00] hahuang65: has joined #ruby
[23:57:40] jnyw: has joined #ruby