« Back to channel list

#ruby - 15 December 2017

« Back 1 day Forward 1 day »
[00:00:35] cagomez: has joined #ruby
[00:02:00] GodFather: has joined #ruby
[00:08:58] cagomez: has joined #ruby
[00:09:59] uZiel: has joined #ruby
[00:10:08] funburn: has joined #ruby
[00:11:04] DrCode: has joined #ruby
[00:12:25] naprimer2: has joined #ruby
[00:14:07] selim: has joined #ruby
[00:14:17] ur5us: has joined #ruby
[00:14:24] alfiemax: has joined #ruby
[00:16:04] ResidentBiscuit: has joined #ruby
[00:18:47] houhoulis: has joined #ruby
[00:19:33] ur5us: has joined #ruby
[00:21:38] ghoti: has joined #ruby
[00:22:49] mim1k: has joined #ruby
[00:23:50] zenspider: damn cafe network...
[00:23:52] zenspider: havenwood: I thought it should be using the threshold passed in to initialize?
[00:25:48] veeti: has joined #ruby
[00:31:02] cagomez: has joined #ruby
[00:32:10] jdawgaz: has joined #ruby
[00:38:50] steveAT: has joined #ruby
[00:39:31] havenwood: zenspider: ahhh, gotcha
[00:41:27] stephh: has joined #ruby
[00:43:37] veeti: has joined #ruby
[00:51:10] bonhoeffer: has joined #ruby
[00:53:24] mostly-harmless: has joined #ruby
[00:53:33] Puffball: has joined #ruby
[00:53:53] eckhardt: has joined #ruby
[00:54:58] alfiemax: has joined #ruby
[01:00:32] bonhoeffer: do folks still use selenium?
[01:02:59] lucz: has joined #ruby
[01:07:02] leah2: has joined #ruby
[01:07:22] veeti: has joined #ruby
[01:10:28] Xeago: has joined #ruby
[01:13:17] cagomez: has joined #ruby
[01:15:37] zautomata1: has joined #ruby
[01:17:13] jdawgaz: has joined #ruby
[01:26:09] kryptoz: has joined #ruby
[01:28:25] cagomez: has joined #ruby
[01:29:22] ogres: has joined #ruby
[01:29:27] uZiel: has joined #ruby
[01:32:00] stephh: has joined #ruby
[01:32:11] DrCode: has joined #ruby
[01:33:24] lucz: has joined #ruby
[01:36:35] herbmillerjr: has joined #ruby
[01:46:22] lucz: has joined #ruby
[01:51:47] bmurt: has joined #ruby
[01:53:30] mtkd: has joined #ruby
[01:53:47] mikecmpbll: has joined #ruby
[01:55:36] yeticry: has joined #ruby
[01:56:45] orbyt_: has joined #ruby
[02:01:12] funburn: has joined #ruby
[02:11:07] jnollette: has joined #ruby
[02:13:12] truenito: has joined #ruby
[02:14:18] kryptoz: has joined #ruby
[02:16:29] mikecmpb_: has joined #ruby
[02:17:12] zautomata1: has joined #ruby
[02:23:22] mim1k: has joined #ruby
[02:23:38] jdawgaz: has joined #ruby
[02:24:28] jdawgaz: has joined #ruby
[02:25:13] jdawgaz: has joined #ruby
[02:26:18] mikecmpbll: has joined #ruby
[02:29:47] veeti: has joined #ruby
[02:29:51] mikecmpbll: has joined #ruby
[02:30:13] nowhere_man: has joined #ruby
[02:34:58] code_zombie: has joined #ruby
[02:39:11] jdawgaz: has joined #ruby
[02:42:23] d^sh: has joined #ruby
[02:42:36] mrBen2k2k2k: has joined #ruby
[02:43:44] gizmore: has joined #ruby
[02:48:54] mikecmpb_: has joined #ruby
[02:50:00] nofxx: has joined #ruby
[02:55:42] mrBen2k2k2k: has joined #ruby
[02:56:14] nankyoku_: has joined #ruby
[02:59:11] mikecmpbll: has joined #ruby
[03:00:18] cadillac_: has joined #ruby
[03:00:41] cschneid_: has joined #ruby
[03:00:56] nofxx: has joined #ruby
[03:00:59] cdg: has joined #ruby
[03:06:40] pilne: has joined #ruby
[03:09:12] ramfjord: has joined #ruby
[03:09:32] veeti: has joined #ruby
[03:15:21] shortdudey123: has joined #ruby
[03:16:21] ramfjord: has joined #ruby
[03:18:26] rrutkowski: has joined #ruby
[03:20:07] DmitryBochkarev: has joined #ruby
[03:23:52] ramfjord: has joined #ruby
[03:24:16] mikecmpb_: has joined #ruby
[03:26:51] uZiel: has joined #ruby
[03:29:47] ramfjord: has joined #ruby
[03:35:03] ramfjord: has joined #ruby
[03:36:03] enterprisey: has joined #ruby
[03:40:04] nopolitica: has joined #ruby
[03:42:28] nofxx: has joined #ruby
[03:52:38] astronavt: has joined #ruby
[03:55:34] kies: has joined #ruby
[03:57:15] mikecmpbll: has joined #ruby
[04:00:53] uZiel: has joined #ruby
[04:02:49] nowhereman_: has joined #ruby
[04:03:01] jdawgaz: has joined #ruby
[04:05:06] meshsmith: has joined #ruby
[04:05:06] meshsmith: has joined #ruby
[04:05:29] hahuang65: has joined #ruby
[04:06:20] jackjackdripper: has joined #ruby
[04:07:20] bmurt: has joined #ruby
[04:13:28] x0F: has joined #ruby
[04:16:26] lucz: has joined #ruby
[04:16:48] jdawgaz: has joined #ruby
[04:16:59] alfiemax: has joined #ruby
[04:17:29] ur5us: has joined #ruby
[04:20:35] mikecmpb_: has joined #ruby
[04:23:40] gix-: has joined #ruby
[04:23:43] mim1k: has joined #ruby
[04:23:55] howdoi: has joined #ruby
[04:28:54] jnollette: has joined #ruby
[04:30:06] alex``: has joined #ruby
[04:31:06] mikecmpbll: has joined #ruby
[04:31:46] stephh: has joined #ruby
[04:38:58] jdawgaz: has joined #ruby
[04:40:57] nopolitica: has joined #ruby
[04:51:00] mikecmpb_: has joined #ruby
[05:00:33] nofxx: has joined #ruby
[05:01:28] mikecmpbll: has joined #ruby
[05:03:32] jamesaxl: has joined #ruby
[05:04:53] dionysus69: has joined #ruby
[05:07:30] cschneid_: has joined #ruby
[05:14:33] ShekharReddy: has joined #ruby
[05:15:38] alfiemax: has joined #ruby
[05:17:19] orbyt_: has joined #ruby
[05:17:48] mtkd: has joined #ruby
[05:17:49] jackjackdripper: has joined #ruby
[05:22:19] mim1k: has joined #ruby
[05:22:59] zautomata1: has joined #ruby
[05:26:38] anisha_: has joined #ruby
[05:34:17] armyriad: has joined #ruby
[05:41:41] nopolitica: has joined #ruby
[05:42:38] cloaked1: has joined #ruby
[05:42:59] charliesome: has joined #ruby
[05:44:48] c0ncealed: has joined #ruby
[05:46:50] iamarun: has joined #ruby
[05:46:50] lucz: has joined #ruby
[05:48:26] mikecmpb_: has joined #ruby
[05:52:32] ramfjord: has joined #ruby
[05:53:28] nofxx: has joined #ruby
[05:54:11] alfiemax: has joined #ruby
[05:54:37] anisha__: has joined #ruby
[05:55:23] sleetdrop: has joined #ruby
[05:57:49] DmitryBochkarev: has joined #ruby
[06:00:05] SuperLag: has joined #ruby
[06:00:57] enterprisey: has joined #ruby
[06:02:29] _aeris_: has joined #ruby
[06:04:09] nofxx: has joined #ruby
[06:09:01] Exhiled: has joined #ruby
[06:10:30] alfiemax: has joined #ruby
[06:12:30] lucz: has joined #ruby
[06:15:08] Exhiled: has joined #ruby
[06:16:11] ldepandis: has joined #ruby
[06:17:28] zautomata1: has joined #ruby
[06:17:28] reber: has joined #ruby
[06:21:58] LocaMocha: has joined #ruby
[06:28:16] dionysus69: has joined #ruby
[06:28:20] cschneid_: has joined #ruby
[06:35:20] lucz: has joined #ruby
[06:35:23] alfiemax: has joined #ruby
[06:41:39] nofxx1: has joined #ruby
[06:42:29] nopolitica: has joined #ruby
[06:47:58] TvL: has joined #ruby
[06:52:02] p0p0pr37_: has joined #ruby
[06:52:02] p0p0pr37_: has joined #ruby
[07:00:28] eckhardt: has joined #ruby
[07:12:37] lucz: has joined #ruby
[07:13:52] KeyJoo: has joined #ruby
[07:19:13] karapetyan: has joined #ruby
[07:19:35] mikhael_k33hl: has joined #ruby
[07:19:52] mikhael_k33hl: I'm trying to setup rvm with jenkins, how do I install it as a single user to be within jenkins home directory?
[07:20:10] yokel: has joined #ruby
[07:24:35] plexigras: has joined #ruby
[07:32:21] anas: has joined #ruby
[07:35:38] apeiros: has joined #ruby
[07:38:06] pikislabis: has joined #ruby
[07:38:23] anisha_: has joined #ruby
[07:41:15] ledestin: has joined #ruby
[07:43:18] nopolitica: has joined #ruby
[07:44:42] kernelPaniq: has joined #ruby
[07:45:11] yeewos: has joined #ruby
[07:46:23] kapil___: has joined #ruby
[07:52:37] lucz: has joined #ruby
[07:54:07] karapetyan: has joined #ruby
[07:55:35] quobo: has joined #ruby
[07:58:47] qba73: has joined #ruby
[07:58:50] namho: has joined #ruby
[07:59:06] namho: has left #ruby: ()
[07:59:30] alfiemax: has joined #ruby
[08:01:32] lucz: has joined #ruby
[08:06:28] uZiel: has joined #ruby
[08:08:06] rhebz916: has joined #ruby
[08:08:43] drbrain: has joined #ruby
[08:08:43] drbrain: has joined #ruby
[08:09:42] vondruch: has joined #ruby
[08:10:51] namho: has joined #ruby
[08:13:46] srandon111: has joined #ruby
[08:13:47] srandon111: hello all, how do you structure your code in the presence of a database ? imean do you useually create a single class to deal with the database and put all the method representing the queries there or more classes ?
[08:14:19] kapil___: has joined #ruby
[08:17:32] lucz: has joined #ruby
[08:18:43] ramfjord: has joined #ruby
[08:21:26] kapil___: has joined #ruby
[08:22:07] drbrain: has joined #ruby
[08:22:07] drbrain: has joined #ruby
[08:24:08] rhebz916: has joined #ruby
[08:24:32] claudiuinberlin: has joined #ruby
[08:27:48] nowhere_man: has joined #ruby
[08:29:37] lucz: has joined #ruby
[08:30:38] aufi: has joined #ruby
[08:34:36] conta: has joined #ruby
[08:34:46] mikecmpbll: has joined #ruby
[08:37:07] andikr: has joined #ruby
[08:37:09] drbrain: has joined #ruby
[08:37:10] drbrain: has joined #ruby
[08:38:57] TomyWork: has joined #ruby
[08:40:12] uZiel: has joined #ruby
[08:40:33] zautomata1: has joined #ruby
[08:44:00] nopolitica: has joined #ruby
[08:44:12] TomyWork: has joined #ruby
[08:48:38] plexigras: has joined #ruby
[08:49:44] mikecmpb_: has joined #ruby
[08:50:04] iamarun: has joined #ruby
[08:50:17] cdg: has joined #ruby
[08:53:15] alex``: has joined #ruby
[08:56:35] guille-moe: has joined #ruby
[09:00:52] Mon_Ouie: has joined #ruby
[09:03:22] marr: has joined #ruby
[09:05:55] alfiemax: has joined #ruby
[09:08:27] mikecmpbll: has joined #ruby
[09:10:26] hs366: has joined #ruby
[09:12:18] voker57: has joined #ruby
[09:13:20] amatas: has joined #ruby
[09:15:36] bkxd: has joined #ruby
[09:17:27] pikislabis: has joined #ruby
[09:17:58] bkxd: has joined #ruby
[09:19:32] srandon111: if i want to use scikit-learn in ruby how can i do ?
[09:21:16] mikecmpbll: srandon111 : what functionality are you after? :) there's _some_ ML stuff in the ruby community going on
[09:21:16] apeiros: google gave me this: https://www.practicalai.io/using-scikit-learn-machine-learning-library-in-ruby-using-pycall/
[09:24:04] mnemon: srandon111: there's plenty of frameworks for DB's(probably most notable one being activerecord), essentially ruby object to DB "object" mapping with all the standard DB code already in place.
[09:24:42] karapetyan: has joined #ruby
[09:27:44] bruce_lee: has joined #ruby
[09:27:48] zautomata1: has joined #ruby
[09:33:44] srandon111: mikecmpbll: well neural networks... and deep learning... such as tensorflow also would not be bad
[09:33:52] srandon111: is there something for ruby ?
[09:34:13] karapetyan: has joined #ruby
[09:34:38] mikecmpbll: i'm not going to pretend there's as good libraries as in python but there's some stuff here: https://github.com/arbox/machine-learning-with-ruby
[09:42:16] lucz: has joined #ruby
[09:43:35] dminuoso: ML with Ruby?
[09:43:47] dminuoso: That requires some serious masochism.
[09:44:39] nopolitica: has joined #ruby
[09:48:41] yaewa: has joined #ruby
[09:48:45] sepp2k: has joined #ruby
[09:50:47] bkxd: has joined #ruby
[09:51:44] nowhere_man: has joined #ruby
[09:55:19] zautomata1: has joined #ruby
[09:56:05] Technodrome: has joined #ruby
[09:56:56] lucz: has joined #ruby
[09:58:03] Beams: has joined #ruby
[09:58:06] mim1k: has joined #ruby
[09:58:30] uZiel: has joined #ruby
[10:01:19] jnollette: has joined #ruby
[10:02:03] DarkUnicorn: has joined #ruby
[10:03:15] Revan007: has joined #ruby
[10:04:46] qba73: has joined #ruby
[10:06:18] plexigras: has joined #ruby
[10:07:14] mim1k: has joined #ruby
[10:09:54] miskatonic: has joined #ruby
[10:12:33] Kedare: has joined #ruby
[10:18:52] Serpent7776: has joined #ruby
[10:18:57] ramfjord: has joined #ruby
[10:19:25] GeorgesLeYeti: has joined #ruby
[10:20:32] workmad3: has joined #ruby
[10:21:00] mnemon: dminuoso: all the heavy lifting will be done with by the libs/native extensions anyways eh?
[10:21:31] GeorgesLeYeti: I want to record some stats on my web application using a table Statistic. I want to record this stats every month, so I haded a column stated_at which is a datetime. But i'm confused about using DateTime or Time
[10:22:04] GeorgesLeYeti: I try to record my value as DateTime.new(year, month).beginning_of_month
[10:22:46] nowhere_man: has joined #ruby
[10:22:59] mtkd: has joined #ruby
[10:24:35] zautomata1: has joined #ruby
[10:24:48] ldnunes: has joined #ruby
[10:24:51] GeorgesLeYeti: But if i make s = Statistic.last; Statistic.where(stated_at: (s.stated_at - 1.month).beginnig_of_month) it didn't works.
[10:26:22] dminuoso: mnemon: I'd hope so. Wouldn't want to train some rudimentary net for some weeks just to recognize digits.
[10:27:52] moei: has joined #ruby
[10:28:02] mnemon: dminuoso: It does require some additional throght to make sure ruby doesn't do anything beyond the coordinating :)
[10:28:40] DarkUnicorn: has joined #ruby
[10:33:51] cdg: has joined #ruby
[10:34:37] karapetyan: has joined #ruby
[10:35:21] Cavallari: has joined #ruby
[10:38:47] cdg_: has joined #ruby
[10:39:39] alfiemax: has joined #ruby
[10:40:05] jaruga: has joined #ruby
[10:40:19] cdg: has joined #ruby
[10:41:21] Exhiled: has joined #ruby
[10:45:31] nopolitica: has joined #ruby
[10:45:39] eksi_: has joined #ruby
[10:46:57] mrBen2k2k2k: has joined #ruby
[10:51:36] workmad3: has joined #ruby
[10:54:51] karapetyan: has joined #ruby
[10:56:41] Exhiled: has joined #ruby
[10:56:44] fusta: has joined #ruby
[10:58:45] karapetyan: has joined #ruby
[10:59:56] karapety_: has joined #ruby
[11:00:55] karapetyan: has joined #ruby
[11:01:18] alfiemax: has joined #ruby
[11:01:36] nopolitica: has joined #ruby
[11:01:58] karapetyan: has joined #ruby
[11:02:58] karapetyan: has joined #ruby
[11:04:01] Exhiled: has joined #ruby
[11:04:06] karapety_: has joined #ruby
[11:04:56] zautomata1: has joined #ruby
[11:06:10] karapetyan: has joined #ruby
[11:06:53] quobo: has joined #ruby
[11:07:10] karapetyan: has joined #ruby
[11:09:13] karapetyan: has joined #ruby
[11:10:18] karapety_: has joined #ruby
[11:11:21] karapetyan: has joined #ruby
[11:12:21] karapety_: has joined #ruby
[11:12:47] bkxd: has joined #ruby
[11:13:22] apeiros: !fixcon karapetyan
[11:13:22] ruby[bot]: +bbb karapetyan!*@*$#ruby-fix-your-connection karapety_!*@*$#ruby-fix-your-connection *!*@85.115.248.149$#ruby-fix-your-connection
[11:14:45] qba73: has joined #ruby
[11:27:21] Riddell: has joined #ruby
[11:28:00] TvL2386_: has joined #ruby
[11:28:11] lucz: has joined #ruby
[11:33:36] lucz: has joined #ruby
[11:33:59] hfp_work: has joined #ruby
[11:34:25] larcara: has joined #ruby
[11:34:56] RevanOne: has joined #ruby
[11:35:17] pikislabis: has joined #ruby
[11:35:34] Ishido: has joined #ruby
[11:37:05] tvw: has joined #ruby
[11:37:39] burgestrand: has joined #ruby
[11:38:32] zapata: has joined #ruby
[11:41:45] anisha_: has joined #ruby
[11:44:02] nowhere_man: has joined #ruby
[11:46:26] tsglove: has joined #ruby
[11:49:02] nathias: has joined #ruby
[11:49:23] jamesaxl: has joined #ruby
[11:50:18] jnollette: has joined #ruby
[11:52:57] shinnya: has joined #ruby
[11:55:29] nowhere_man: has joined #ruby
[11:56:30] larcara: has joined #ruby
[12:00:44] jdawgaz: has joined #ruby
[12:01:13] cadillac_: has joined #ruby
[12:04:50] qba73: has joined #ruby
[12:08:59] workmad3: has joined #ruby
[12:12:56] Psybur: has joined #ruby
[12:13:02] cschneid_: has joined #ruby
[12:16:17] jnollette: has joined #ruby
[12:19:13] ramfjord: has joined #ruby
[12:21:16] uZiel: has joined #ruby
[12:23:07] larcara: has joined #ruby
[12:25:05] alfiemax: has joined #ruby
[12:25:41] alfiemax: has joined #ruby
[12:27:19] workmad3: has joined #ruby
[12:32:34] KeyJoo: has joined #ruby
[12:33:12] bmurt: has joined #ruby
[12:41:36] VladGh: has joined #ruby
[12:43:41] AJA4350: has joined #ruby
[12:47:18] alex``: has joined #ruby
[12:47:30] GodFather: has joined #ruby
[12:48:21] chocoelho: has joined #ruby
[12:49:15] truenito: has joined #ruby
[12:51:01] raynold: has joined #ruby
[12:52:30] pdcawley: has joined #ruby
[12:54:38] truenito: has joined #ruby
[12:59:45] lucz: has joined #ruby
[13:01:59] jdawgaz: has joined #ruby
[13:02:10] pikislabis: has left #ruby: ()
[13:08:43] sameerynho: has joined #ruby
[13:10:24] jdawgaz: has joined #ruby
[13:12:06] xco: has joined #ruby
[13:12:40] xco: can some good guy explain to me what this casecmp method does? https://ruby-doc.org/core-2.1.0/String.html#method-i-casecmp i don’t get the examples
[13:15:29] lucz: has joined #ruby
[13:17:27] jdawgaz: has joined #ruby
[13:23:05] jdawgaz: has joined #ruby
[13:24:34] Antiarc: has joined #ruby
[13:25:28] alfiemax: has joined #ruby
[13:25:29] sriehl: has joined #ruby
[13:25:29] sriehl: has joined #ruby
[13:25:38] creat: has joined #ruby
[13:26:06] endemic: has joined #ruby
[13:26:15] znz_jp: has joined #ruby
[13:26:30] DmitryBochkarev: has joined #ruby
[13:27:15] funburn: has joined #ruby
[13:29:23] qba73: has joined #ruby
[13:31:39] konsolebox: has joined #ruby
[13:32:41] tcopeland: has joined #ruby
[13:33:26] rhebz916: has joined #ruby
[13:35:12] jdawgaz: has joined #ruby
[13:37:09] mtkd: has joined #ruby
[13:39:12] jdawgaz: has joined #ruby
[13:39:29] charliesome: has joined #ruby
[13:40:15] rippa: has joined #ruby
[13:40:57] synthroid: has joined #ruby
[13:42:47] mostlybadfly: has joined #ruby
[13:43:28] jdawgaz: has joined #ruby
[13:44:14] adaedra: Don't we !fixcon them regularly or is it bad memory from me?
[13:44:49] adaedra: xco: It compares two string while ignoring the case.
[13:44:54] adaedra: two strings*
[13:45:14] xco: thanks. when is the case 1, 0 or -1
[13:45:23] xco: when the strings match it’s 1 i guess
[13:45:28] adaedra: no, it's 0
[13:45:52] xco: and when it’s 1?
[13:45:54] adaedra: it's a relative comparaison, so the string are either the same or one is before the other, and in this case you have -1 or 1 depending which one
[13:46:07] adaedra: same as for <=>
[13:46:31] xco: got it now thank you
[13:47:11] aScottishBoat: has joined #ruby
[13:50:55] ski7777: has joined #ruby
[13:52:34] uZiel: has joined #ruby
[13:52:59] Riddell: has joined #ruby
[13:55:21] hinbody: has joined #ruby
[13:55:23] lucz: has joined #ruby
[13:55:36] funburn: has joined #ruby
[13:56:29] KeyJoo: has joined #ruby
[13:58:30] cdg: has joined #ruby
[13:58:48] my123: has joined #ruby
[13:58:48] my123: has joined #ruby
[13:59:45] cdg: has joined #ruby
[14:00:06] jdawgaz: has joined #ruby
[14:01:31] DmitryBochkarev: has joined #ruby
[14:05:29] jdawgaz: has joined #ruby
[14:07:10] cdg_: has joined #ruby
[14:14:05] qba73: has joined #ruby
[14:19:27] ramfjord: has joined #ruby
[14:19:28] ltem: has joined #ruby
[14:24:13] mikkelsen: has joined #ruby
[14:26:15] huyderman: has joined #ruby
[14:27:46] aScottishBoat: has joined #ruby
[14:28:44] Cu5tosLimen: has joined #ruby
[14:28:53] Cu5tosLimen: how do I determine if a package is loaded?
[14:29:03] Cu5tosLimen: say I did require 'asciidoctor' - how can I see it is loaded?
[14:33:26] Papierkorb: Cu5tosLimen: What is your usecase? What are you trying to do?
[14:33:35] jdawgaz: has joined #ruby
[14:34:01] apeiros: Cu5tosLimen: $LOADED_FEATURES contains all required files
[14:34:21] apeiros: and wrt Papierkorb's question - this is something which should only be used for debugging purposes.
[14:34:38] Cu5tosLimen: Papierkorb, actually I should maybe ask in jruby rather - but I'm having some issue with asciidoctor-gradle-plugin which uses jruby - if gradle is running in daemon mode then it only find asciidoctor-diagram on first build and on subsequent builds it does not find it
[14:34:50] Cu5tosLimen: I'm trying to figure out why the module is not there on subsequent runs
[14:35:00] Cu5tosLimen: apeiros, ok let me try dump that
[14:35:25] Papierkorb: Cu5tosLimen: You can always just `require` asciidoctor, require will only load something that's not already loaded
[14:35:42] Cu5tosLimen: Papierkorb, it is doing that though - but I'm not sure why it has no effect
[14:35:58] Cu5tosLimen: I think the error is probbably some levels deeper than this though
[14:36:50] pdcawley: has joined #ruby
[14:37:44] apeiros: Cu5tosLimen: sounds like something swallows a LoadError
[14:37:57] apeiros: look out for code like `rescue Exception` and `rescue LoadError`
[14:38:56] Papierkorb: Cu5tosLimen: You can also try to rescue Exception yourself, log it, and then reraise the error to make it 'transparent' to other logic.
[14:39:09] Papierkorb: or rescue LoadError, same effect in this case
[14:41:46] pastorinni: has joined #ruby
[14:47:36] aScottishBoat: has joined #ruby
[14:48:15] Strepsils: has joined #ruby
[14:51:31] elisaado: has joined #ruby
[14:51:33] Rapture: has joined #ruby
[14:52:27] elisaado: Is there a way I can listen for telegram updates but also listen for http things?
[14:56:05] veeti: has joined #ruby
[14:57:30] funburn: has joined #ruby
[15:00:11] safetypin: has joined #ruby
[15:02:21] lucz: has joined #ruby
[15:03:47] dinfuehr: has joined #ruby
[15:05:10] uZiel: has joined #ruby
[15:06:37] Psybur_: has joined #ruby
[15:09:42] DLSteve_: has joined #ruby
[15:12:34] zapata: has joined #ruby
[15:16:32] skweek: has joined #ruby
[15:17:42] dinfuehr: has joined #ruby
[15:19:08] polishdub: has joined #ruby
[15:21:07] pdcawley: has joined #ruby
[15:26:28] chocoelho: has joined #ruby
[15:29:33] uZiel: has joined #ruby
[15:32:38] Lyubo1: has joined #ruby
[15:33:10] Kristjan: has joined #ruby
[15:34:07] Cu5tosLimen: so I have a class here: Asciidoctor::Extensions.instance_variable_get('@groups').values[0].class => Proc
[15:34:11] Cu5tosLimen: but I have no idea where it is defined
[15:36:06] milardovich: has joined #ruby
[15:36:17] Cu5tosLimen: https://ruby-doc.org/core-2.2.0/Proc.html
[15:39:40] jnollette: has joined #ruby
[15:41:22] lucz: has joined #ruby
[15:42:36] qba73: has joined #ruby
[15:47:56] cschneid_: has joined #ruby
[15:50:25] oleo: has joined #ruby
[15:53:03] JaccoP: has joined #ruby
[15:54:11] sameerynho: has joined #ruby
[15:54:49] polishdub: has left #ruby: ()
[15:56:20] lucz: has joined #ruby
[15:56:40] d10n-work: has joined #ruby
[15:57:09] uZiel: has joined #ruby
[15:57:12] Lyubo1: has joined #ruby
[15:58:44] jdawgaz: has joined #ruby
[15:58:49] cdg: has joined #ruby
[15:58:52] apeiros: has joined #ruby
[15:59:39] jdawgaz: has joined #ruby
[15:59:40] cdg: has joined #ruby
[16:00:30] jdawgaz: has joined #ruby
[16:01:17] jdawgaz: has joined #ruby
[16:02:02] jdawgaz: has joined #ruby
[16:02:53] jdawgaz: has joined #ruby
[16:09:18] quobo: has joined #ruby
[16:09:19] aintno_sunshine: has joined #ruby
[16:09:44] Riddell: has joined #ruby
[16:12:18] cschneid_: has joined #ruby
[16:12:24] troys: has joined #ruby
[16:12:45] Lyubo1: has joined #ruby
[16:15:20] dviola: has joined #ruby
[16:18:45] nogic: has joined #ruby
[16:23:31] earwig2: has joined #ruby
[16:23:56] earwig2: Anyone here know about Net::HTTP and /etc/hosts?
[16:30:37] elisaado: apeiros: Can you give me a hint? :D
[16:31:37] apeiros: elisaado: :D yes
[16:31:38] despai: has joined #ruby
[16:32:06] apeiros: but seriously - what are we talking about. at what level is your problem?
[16:32:10] polishdub: has joined #ruby
[16:32:17] elisaado: Quite high level
[16:32:28] apeiros: I mean http & telegram are both tcp based, so all you need is different ports
[16:32:36] elisaado: apeiros: I mean
[16:32:46] elisaado: Two threads running at the same time
[16:32:58] elisaado: One sinatra
[16:33:18] elisaado: and the other is going to be telegram-ruby-bot
[16:33:32] apeiros: and where does your problem start?
[16:34:52] elisaado: apeiros: The blueprint of the app
[16:35:03] elisaado: What can I use to run those two loops at the same time
[16:35:15] apeiros: elisaado: let's start at the bottom - why do the two need to run in the same process?
[16:35:31] elisaado: They need to use the same variable
[16:35:57] elisaado: I don't want to write a lot of times to my filesystem >:(
[16:35:57] apeiros: I mean there are other ways to share data than shared memory
[16:36:17] apeiros: ok, so: "simplicity"
[16:36:37] apeiros: how do you run your sinatra? because usually sinatra apps aren't written by writing a loop yourself…
[16:37:35] tsglove: has joined #ruby
[16:38:23] mtkd: has joined #ruby
[16:41:20] cagomez: has joined #ruby
[16:41:24] jamesaxl: has joined #ruby
[16:44:31] RougeT430: has joined #ruby
[16:45:07] uZiel: has joined #ruby
[16:46:06] synthroid: has joined #ruby
[16:47:13] TomyLobo: has joined #ruby
[16:49:46] amatas_: has joined #ruby
[16:50:38] Beams: has joined #ruby
[16:51:17] houhoulis: has joined #ruby
[16:51:56] stephh: has joined #ruby
[16:53:40] ninjalurking: has joined #ruby
[16:56:01] jdawgaz: has joined #ruby
[16:56:17] cagomez: has joined #ruby
[16:57:54] clemens3: has joined #ruby
[16:58:50] chocoelho: has joined #ruby
[17:01:38] cdg: has joined #ruby
[17:01:40] br0d1n: has joined #ruby
[17:01:52] lele: has joined #ruby
[17:03:51] cdg_: has joined #ruby
[17:04:46] cdg: has joined #ruby
[17:05:27] elisaado: Sinatra does that
[17:05:50] elisaado: be a loop, right?
[17:06:15] apeiros: yes and no. hence my question.
[17:06:58] JaccoP: has joined #ruby
[17:07:22] apeiros: see, if you use e.g. puma to run your sinatra app, you will have multiple processes
[17:07:33] bmurt: has joined #ruby
[17:07:50] apeiros: or if you use one of the many other methods which use multiple processes
[17:07:57] apeiros: so no shared variable for you in those cases.
[17:10:13] conta1: has joined #ruby
[17:10:27] tomphp: has joined #ruby
[17:18:25] cagomez: has joined #ruby
[17:18:40] qba73: has joined #ruby
[17:18:52] kapil___: has joined #ruby
[17:19:57] orbyt_: has joined #ruby
[17:24:12] stephh: has joined #ruby
[17:24:33] slester_: has joined #ruby
[17:24:37] webguynow: has joined #ruby
[17:24:53] FastJack: has joined #ruby
[17:25:18] _aeris_: has joined #ruby
[17:25:59] jnollette: has joined #ruby
[17:26:34] bmurt: has joined #ruby
[17:26:38] cschneid_: has joined #ruby
[17:27:32] Exhiled: has joined #ruby
[17:28:31] veeti: has joined #ruby
[17:29:01] mim1k: has joined #ruby
[17:30:12] Technodrome: has joined #ruby
[17:30:35] cagomez: has joined #ruby
[17:33:26] FrostCandy: has joined #ruby
[17:34:26] stephh: has joined #ruby
[17:35:33] FrostCandy: Why doesn't this work? A = {:type=>:account, :myarray=>[{"thing":"1", "thing2":"2" }] }
[17:35:51] FrostCandy: Shouldn't I be able to store json info in a hash like that?
[17:37:34] jdawgaz: has joined #ruby
[17:38:24] jdawgaz: has joined #ruby
[17:39:01] al2o3-cr: >> require 'json'; {:type=>:account, :myarray=>[{"thing":"1", "thing2":"2" }.to_json] }
[17:39:01] apeiros: FrostCandy: it does work
[17:39:02] ruby[bot]: al2o3-cr: # => {:type=>:account, :myarray=>["{\"thing\":\"1\",\"thing2\":\"2\"}"]} (https://eval.in/919939)
[17:39:06] apeiros: so what's your question?
[17:39:13] jdawgaz: has joined #ruby
[17:39:22] al2o3-cr: maybe i'm just guesses there.
[17:39:23] apeiros: also that's just an ordinary hash/array/otherstuff, no json
[17:39:37] apeiros: json in ruby is a string, since json is a *serialized* format
[17:39:56] uZiel: has joined #ruby
[17:40:36] bmurt: has joined #ruby
[17:41:43] ledestin: has joined #ruby
[17:41:50] jdawgaz: has joined #ruby
[17:42:37] kapil___: How I get variable values of yield based function when calling? Sorry asked twice
[17:42:45] AJA4351: has joined #ruby
[17:44:14] apeiros: kapil___: not sure what you're asking for. basic yield methods work like this: def foo; yield your_variable; end; … foo { |value_of_your_variable_here| … }
[17:44:24] polishdub: has joined #ruby
[17:45:58] funburn: has joined #ruby
[17:46:16] Technodrome: has joined #ruby
[17:46:16] FrostCandy: well i kept getting errors saying unexpected, and : expected keyword end. But ya turning to to_json worked
[17:46:48] slester_: has joined #ruby
[17:49:36] pikislabis: has joined #ruby
[17:50:08] jerryskye: has joined #ruby
[17:51:11] brent__: has joined #ruby
[17:56:07] ramfjord: has joined #ruby
[17:56:10] cagomez: has joined #ruby
[17:57:01] pikislabis: has joined #ruby
[18:00:01] stephh: has joined #ruby
[18:01:38] uZiel: has joined #ruby
[18:05:48] deadnull: has joined #ruby
[18:06:16] cagomez: has joined #ruby
[18:10:38] claudiuinberlin: has joined #ruby
[18:11:45] jxv: has joined #ruby
[18:12:14] sspreitz: has joined #ruby
[18:15:10] pikislabis: has joined #ruby
[18:16:23] SeepingN: has joined #ruby
[18:19:58] veeti: has joined #ruby
[18:21:14] dcluna: has joined #ruby
[18:21:33] uZiel: has joined #ruby
[18:24:34] funburn: has joined #ruby
[18:26:47] uZiel: has joined #ruby
[18:26:57] krawchyk: has joined #ruby
[18:29:46] Puppet`: has joined #ruby
[18:31:06] mson: has joined #ruby
[18:31:24] mikecmpbll: has joined #ruby
[18:31:41] Technodrome: has joined #ruby
[18:32:34] pb122: has joined #ruby
[18:34:27] Riddell: has joined #ruby
[18:36:16] mson: has left #ruby: ()
[18:38:10] jxv: has joined #ruby
[18:38:20] mikecmpbll: has joined #ruby
[18:39:07] Mon_Ouie: has joined #ruby
[18:40:50] pikislabis: has joined #ruby
[18:40:52] mikkelsen: has joined #ruby
[18:42:15] veeti: has joined #ruby
[18:44:12] kies: has joined #ruby
[18:44:28] nopolitica: has joined #ruby
[18:47:17] baweaver: kapil___: you may want to take a read through the book list: https://goo.gl/wpGhoQ
[18:47:37] baweaver: A lot of questions you have will be answered faster by establishing a base foundation in Ruby by which to work from
[18:48:23] guille-moe: has joined #ruby
[18:56:28] jxv: has joined #ruby
[18:58:18] Axsuul: has joined #ruby
[18:58:31] mikkelsen: mvp.kablamo.org
[18:58:35] mikkelsen: been having fun with this :D
[18:58:45] mikkelsen: ooops wrong chat
[18:59:00] mikkelsen: feel free to check it out though
[19:03:46] eckhardt: has joined #ruby
[19:05:55] kapil___: baweaver: thanks
[19:09:13] alfiemax: has joined #ruby
[19:09:42] jdawgaz: has joined #ruby
[19:12:22] pikislabis: has joined #ruby
[19:16:51] stephh: has joined #ruby
[19:17:41] nadir: has joined #ruby
[19:17:46] dionysus69: has joined #ruby
[19:21:45] nopolitica: has joined #ruby
[19:23:26] alex``: has joined #ruby
[19:24:05] apeiros: has joined #ruby
[19:25:11] tvw: has joined #ruby
[19:27:39] pikislabis: has joined #ruby
[19:28:10] n13z: has joined #ruby
[19:31:39] bradleyprice: has joined #ruby
[19:31:40] jdawgaz: has joined #ruby
[19:32:05] yqt: has joined #ruby
[19:33:04] waveprop: has joined #ruby
[19:33:37] mikecmpbll: has joined #ruby
[19:34:46] cdg: has joined #ruby
[19:36:05] dionysus69: has joined #ruby
[19:37:03] Dimik: has joined #ruby
[19:44:04] guille-moe: has joined #ruby
[19:45:08] mim1k: has joined #ruby
[19:56:31] lytol_: has joined #ruby
[19:58:47] SafeCamp: has joined #ruby
[20:06:30] haylon: has joined #ruby
[20:08:42] vichib: has joined #ruby
[20:09:37] vichib: has joined #ruby
[20:11:03] lucz: has joined #ruby
[20:14:20] miskatonic: has joined #ruby
[20:17:12] ur5us: has joined #ruby
[20:17:31] sspreitz: has joined #ruby
[20:26:23] milardovich: has joined #ruby
[20:30:51] tomphp: has joined #ruby
[20:34:01] milardovich: has joined #ruby
[20:40:35] milardovich: has joined #ruby
[20:41:26] DTZUZO: has joined #ruby
[20:42:25] trolltoll: has joined #ruby
[20:44:02] mtkd: has joined #ruby
[20:44:16] armando: has joined #ruby
[20:44:45] orbyt_: has joined #ruby
[20:49:08] armando: has joined #ruby
[20:49:41] milardovich: has joined #ruby
[20:50:37] vichib`: has joined #ruby
[20:52:34] armando: has joined #ruby
[20:53:05] jdawgaz: has joined #ruby
[20:57:58] leitz: has joined #ruby
[20:59:56] despai: has joined #ruby
[21:00:36] yokel: has joined #ruby
[21:01:34] alfiemax: has joined #ruby
[21:02:58] JaccoP: has joined #ruby
[21:03:39] vichib`: has left #ruby: ("Killed buffer")
[21:06:53] leitz: Happily confused by "Design Patterns in Ruby". Is there a better term for the "ChangeMe" class than "Class that changes stuff?" https://gist.github.com/LeamHall/2eda48be9973330f776cc5edd758d05e
[21:07:42] lupine: you could call it Changer
[21:12:38] milardovich: has joined #ruby
[21:13:08] al2o3-cr: i'd call it Morphy, thats sounds like a legit name. :P
[21:14:08] apeiros: leitz: why do you have a class which modifies other objects? why is the modifying method not on the object itself?
[21:14:13] slester_: has joined #ruby
[21:15:16] leitz: apeiros, because there are a dozen or more child classes that can potentially modifiy the MyObject instance. In general, only one does. But one of a dozen. Or two.
[21:15:31] leitz: I'm back to the "Career" discussion.
[21:15:54] apeiros: you realize that that's not actually an answer? it's just a proxy to: why do those dozen classes modify another object?
[21:16:04] apeiros: yeah, thought so :) I remember
[21:16:38] apeiros: but why is it: Career#modify(character) instead of Character#having(career) (better naming optional)
[21:17:01] leitz: Ah, so "Class" seems to be a good thing to get better at, and inheritance on the Career bit seems to make it better as a class.
[21:17:55] leitz: The current iteration is more like "Character#having(career)". Trying to figure out how to grow it better.
[21:18:23] craysiii: So i'm trying to integrate typheous into a gem of mine, and im on windows. when i run "gem install typheous" it installs just fine, but when i add it to my gemspec and run "bundle install" bundler says it could not find a compatible version. what am i missing here?
[21:18:24] apeiros: in OO, classes are usually nouns. and you have IMO properly identified the nouns to be "Career" and "Character". now the remaining thing is the operation. and mutating operations in OO usually belong to the object being mutated. try to mutate self, not an arg.
[21:19:14] apeiros: craysiii: what's the precise error/message you get?
[21:19:18] nofxx: has joined #ruby
[21:20:32] leitz: apeiros, the issue with the object owning its own mutator is the need to swap out careers.
[21:20:46] apeiros: I don't follow
[21:20:51] leitz: Though I will admit this is right at, and just a little past, my understanding.
[21:21:00] waveprop: has joined #ruby
[21:21:14] apeiros: care to elaborate on what the issue is with that?
[21:21:36] leitz: An instance of Character class stores data and has a few methods to present formatted data.
[21:21:38] apeiros: as in: bonuses from one career might vanish once another career is applied?
[21:22:35] nymous: has joined #ruby
[21:22:42] nymous: hey folks
[21:22:45] leitz: A Character "goes through" a Career, but does not "have a" career as a tangible thing. The Career modifies the character, and mutltiple careers accumulate modifications.
[21:23:17] apeiros: leitz: ok. makes me see even less problems :)
[21:23:17] nymous: i have a rather strange question about modules and instance_eval
[21:23:18] leitz: Conversely, a newly created Character may get sent through one of dozens of careers.
[21:23:41] apeiros: leitz: seems to me like the character should ask the career how the modifications look and apply them
[21:23:49] nymous: i wrote a DSL, most classes do use instance_eval for processing
[21:23:58] leitz: apeiros, current code. https://github.com/LeamHall/CT_Character_Generator/blob/master/bin/chargen.rb
[21:24:04] selim: has joined #ruby
[21:24:20] nymous: to run it smoothly i allow user to write inside my module's namespace
[21:24:23] apeiros: and one or hundred careers doesn't matter to a computer. it's just: careers.each do |career| character.learn(career) end # again, naming?!?
[21:24:36] milardovich: has joined #ruby
[21:25:00] leitz: apeiros, the Career has multiple methods and data sets, would that still work?
[21:25:02] nymous: but then i add a function in my script, nested classes doesn't see it, unless i strictly set prefix to my namespace
[21:25:14] apeiros: leitz: why not
[21:25:24] apeiros: leitz: after all, the number of properties on a character is finite
[21:25:30] leitz: apeiros, dunno. I'm still learning.
[21:25:47] apeiros: leitz: as said, the character can still ask the career as to how the modifications should look. but should apply it itself.
[21:25:53] nymous: maybe there is a simple solution for this?
[21:26:06] apeiros: and the career can now about the character modified, using it in its calculations as to how the final values should look
[21:26:07] xco: has joined #ruby
[21:26:13] nymous: setting prefix is kind of weird
[21:26:35] leitz: apeiros: https://github.com/LeamHall/CT_Character_Generator/blob/master/lib/character.rb#L33-L35
[21:26:38] apeiros: ?code nymous
[21:26:38] ruby[bot]: nymous: We can't help you without your code, please post it to https://gist.github.com
[21:26:45] al2o3-cr: nymous: probably need to gist an example of this strange behaviour you're experiencing
[21:27:21] apeiros: leitz: that's still the career mutating the character
[21:27:28] al2o3-cr: i always forget bot comms
[21:27:51] apeiros: al2o3-cr: they're all on the website for your convenience ;-)
[21:28:17] craysiii: apeiros https://gist.github.com/craysiii/2e73564cb46dee10195fc78f3e4bfb8f
[21:28:22] al2o3-cr: aye, should visit it more often :)
[21:28:58] nymous: here's my code https://github.com/divanikus/salus
[21:29:07] nymous: here's my gist https://gist.github.com/divanikus/a476b6bb902c86505102234d025f074c
[21:29:12] leitz: apeiros, yup. So, back to your statement of xx:26 character.learn(career). How would "learn" activate different methods in career? When called that way how does the career reach up to the Character and modify it?
[21:29:31] apeiros: career wouldn't
[21:29:46] apeiros: character would ask "what would you modify on me?" and then apply the changes.
[21:29:49] nymous: ERROR -- : undefined local variable or method `get_devs' for #<Salus::Group:0x00000002141980> (NameError)
[21:30:28] leitz: ACTION sits down with his whiteboard.
[21:30:46] apeiros: e.g. for numerical stats: career = Careers::Adventurer.new(self); career.stats_modifications # => {health: -10, health: 20, …}
[21:32:05] apeiros: so e.g.: character.learn(Careers::Adventurer), with: def learn(career_class); career = career_class.new(self); career.stats_modifications.each do |stat, change| @stats[stat] += change end; …
[21:33:25] leitz: apeiros, so the Character would get passes the Career object?
[21:33:46] Azure: has joined #ruby
[21:33:53] al2o3-cr: i've never seen so much evalualtioning
[21:34:03] uZiel: has joined #ruby
[21:34:05] al2o3-cr: or whatever you call it
[21:34:38] apeiros: depends, either the class, or if careers vary among the same career type, then an instance. latter is a bit more annoying as it makes it more difficult to keep the class/instance pattern (since you now have 3 levels instead of 2 as in normal class/instance)
[21:35:19] ramfjord: has joined #ruby
[21:35:38] apeiros: nymous: that error is from your test.rb? which line?
[21:35:45] leitz: Okay, lemme code for a bit and see if I get it.
[21:36:07] roshanavand: has joined #ruby
[21:36:24] nymous: apeiros: 21
[21:36:51] apeiros: nymous: where is group defined?
[21:36:55] nymous: test.rb is a script which should be run by salus cli from this gem
[21:37:00] apeiros: https://github.com/divanikus/salus/blob/master/lib/salus.rb#L22 ?
[21:37:52] nogic: has joined #ruby
[21:37:52] apeiros: how is test.rb evaluated? because it seems to be in the context of a Salus::Group
[21:37:59] apeiros: ah well, wait
[21:38:02] apeiros: lets cut the chase
[21:38:28] apeiros: module Kernel; module_function def get_devs; …; end; end
[21:38:40] apeiros: also that `devs =` is somewhat pointless IMO :)
[21:38:52] apeiros: I mean it's not like you use that variable
[21:39:05] havenwood: if you assign a variable on the last line of a method, stop that!
[21:39:08] nymous: https://github.com/divanikus/salus/blob/master/lib/salus.rb#L84
[21:39:10] cagomez: has joined #ruby
[21:39:52] nymous: apeiros: i know about the devs = , but it's not the problem now
[21:39:55] apeiros: ah yeah, well, toplevel methods are not global methods.
[21:40:12] apeiros: yeah, your problem is ^, and the solution is ^2
[21:40:18] pastorinni: has joined #ruby
[21:40:43] nymous: one level up i guess
[21:41:43] apeiros: yeah, ^ is "message above" and ^2 "two (relevant) messages above". question is: which do you count as relevant messages :)
[21:42:56] nymous: i can just say Salus.get_devs
[21:43:09] nymous: but that looks ugly to me, and also i guess for a end user
[21:43:24] apeiros: I don't think that'd work with your current code, no
[21:43:38] nymous: well, it works
[21:43:47] nymous: i mean Salus.get_devs
[21:43:57] apeiros: ah, right, instance_eval, not class_eval
[21:44:23] nymous: i can also move the def inside group
[21:44:33] nymous: but it won't be shared with discover code
[21:44:34] apeiros: you could use class_eval instead of instance_eval
[21:44:52] apeiros: but I'm not sure you really should run your stuff that way.
[21:45:09] nymous: i need eval it on instance, because of runtime things
[21:45:30] apeiros: I don't really get the rationale, but the scope which `def` uses with instance_eval is the singleton_class scope.
[21:45:36] mim1k: has joined #ruby
[21:45:36] eckhardt: has joined #ruby
[21:45:40] nymous: my thing forms a kind of tree structure with nested groups with metrics as leaves
[21:46:05] apeiros: don't use `def` then
[21:46:17] apeiros: do something like rspec: let :get_devs do … end
[21:46:54] apeiros: and: class Salus::Group; def let(name, &definition); singleton_class.define_method(name, &definition); end; end
[21:47:10] nymous: hmm, that make sense, even though it makes things a little bit more complicated
[21:47:53] nymous: well, it would be called not inside Salus::Group, but module Salus itself
[21:47:59] nofxx1: has joined #ruby
[21:49:09] apeiros: something's amiss here
[21:49:12] stephh: has joined #ruby
[21:49:24] leitz: apeiros, like this? https://gist.github.com/LeamHall/ea234baa69dc72d3f5fa5a96eeb793ae
[21:49:59] apeiros: oh, I see, Group uses yet a different eval for its instance
[21:50:06] apeiros: well, you created yourself a scope hell there.
[21:50:21] leitz: Though I have to figure out how different sections of the career would work.
[21:50:31] nymous: really? it's just a DSL like in the tutorials)
[21:51:01] apeiros: leitz: IMO still the wrong way round. but maybe I'm riding a purist horse for no good reason ;-)
[21:51:26] apeiros: nymous: did you see arbitrary def's being used in those tutorials?
[21:51:39] leitz: apeiros, I thought that was your code. Well, as I understood it.
[21:51:56] apeiros: nymous: point is, a method belongs to a class. and you're wildly changing scopes but expect the method to exist
[21:52:02] nymous: maybe i'll move to cleanroom sometime later
[21:52:14] apeiros: nymous: variant a: use something like what I showed. variant b: use a lambda
[21:52:41] apeiros: nymous: like: get_devs = ->() { … }; get_devs.().each do…
[21:52:49] apeiros: note the . before ()
[21:52:50] nymous: strange enough, CONSTANTS works great for nested scopes
[21:53:13] apeiros: you understand how lookup for method works versus how lookup for constants work?
[21:53:30] alfiemax: has joined #ruby
[21:53:32] apeiros: their scoping rules are quite different
[21:53:46] nymous: seems like not really, because i though they should be just symbols inside a scope
[21:53:51] al2o3-cr: nymous: you should of been a week ago.
[21:53:59] apeiros: leitz: ah. some of what I gave you earlier?
[21:54:09] apeiros: leitz: I try not to deviate too much from original code
[21:54:11] nymous: al2o3-cr: a month, maybe, yes
[21:54:51] al2o3-cr: probably i don't keep track of time to good :P
[21:55:15] nymous: apeiros: i can extend my var syntax or use lambdas, i just want to make my dsl less confusing
[21:55:29] apeiros: leitz: i.e. I don't necessarily/always show you immediately how I would model something. sometimes because I don't (yet) have a full understanding of the problem domain, sometimes because too much change makes it difficult for the other person to embed it into their knowledge framework
[21:56:08] leitz: apeiros, trust me, I get the "embed" issue. I have to think through these things a lot.
[21:56:44] al2o3-cr: apeiros: absolutley true that
[21:56:49] leitz: One of these days I'm going to figure out how to find a Ruby mentor that can survive looking at my code and offereing advice.
[21:59:38] leitz: Would it help if I wrote up the projected use cases and (il)logic?
[22:01:00] aScottishBoat: has joined #ruby
[22:01:26] leitz: And is 2.5 going to be released Christmas Day or sooner?
[22:01:31] Exhiled: has joined #ruby
[22:02:24] apeiros: leitz: re mentor - I think people here try, no?
[22:02:38] apeiros: or you mean as in a more stable/continuous fashion?
[22:02:58] leitz: apeiros, I can't afford to pay what the folks here have done to help.
[22:03:01] mikecmpbll: has joined #ruby
[22:03:51] apeiros: oh sure you can. one day somebody else will need help ;-)
[22:04:03] leitz: A mentor is more a continous thing: "Your next step is to learn X. Show me your progress next week."
[22:04:06] apeiros: or maybe you already did
[22:04:24] leitz: I try. In my limited newbie fashion. :)
[22:04:34] apeiros: ok, I see. I'd love to do that, but I don't see myself having the time for it :(
[22:04:51] ramfjord: has joined #ruby
[22:04:54] apeiros: or rather: if I took the time to do that, I'd feel even more guilt for all the stuff I'm not doing right now :o)
[22:04:55] leitz: Understood. It's not everyone's shot of whiskey.
[22:04:56] alfiemax: has joined #ruby
[22:05:10] al2o3-cr: make that a rum :)
[22:05:26] leitz: Oddly, we gave away our TV a few years ago. Found a lot of time shortly there after.
[22:05:47] jenrzzz: has joined #ruby
[22:05:47] jenrzzz: has joined #ruby
[22:05:58] leitz: The Career <=> Character thing has melted my brain for years.
[22:06:03] al2o3-cr: leitz: you got new one now tho?
[22:06:13] leitz: And at least three languages.
[22:06:19] Nahra: has joined #ruby
[22:06:22] leitz: al203-cr, nope.
[22:06:32] nofxx: has joined #ruby
[22:06:38] al2o3-cr: ACTION al2o3-cr freaks out
[22:07:02] leitz: Not much on then, either. That was about 15-20 years ago.
[22:07:16] leitz: I think. Chronologically challenged.
[22:07:26] ljarvis: not having a tv = winning
[22:07:53] leitz: ljarvis, not paying for cable means more money for technical books!
[22:08:05] ljarvis: leitz: nice :)
[22:08:07] nymous: i have a tv, i do play my PS4 on it
[22:08:08] nofxx: has joined #ruby
[22:08:30] nymous: and Steam games too
[22:08:51] ljarvis: i have a tv but no cable, and i seldom use it
[22:08:52] leitz: Last electronic game I played was Neverwinter Nights. Only because they gave you the tools to build your own worlds.
[22:09:00] nymous: not having a TV doesn't sound beneficial to me
[22:09:07] leitz: Had to build a computer able to handle it.
[22:09:27] leitz: nymous, you can get news from the web, and more interaction on IRC.
[22:10:10] nymous: i'm not about the cable, but a large screen to show things
[22:10:37] apeiros: leitz: re career <=> character - think about responsibilities
[22:10:41] leitz: I'll be blunt; the average American watches life go by on a screen. They know more about Sheldon than their neighbors.
[22:10:58] apeiros: career's responsibility is to know how a character would change. character's responsibility is to change :)
[22:11:20] leitz: career actively changes; character gets changed.
[22:11:22] apeiros: sheldon usually is more interesting than your neighbor
[22:11:29] nymous: now i'm stuck searching how let from rspec is implemented
[22:11:35] apeiros: leitz: ^ IMO not
[22:11:46] apeiros: nymous: uh, don't
[22:11:51] apeiros: it doesn't necessarily apply
[22:11:57] apeiros: I gave you an implementation
[22:12:12] apeiros: you can pass the defining block around and define a method at the right place
[22:12:18] apeiros: or even invoke it upon method_missing
[22:12:59] leitz: apeiros, at the reduced "thing" level a Character could almost be a hash and a Career a set of methods.
[22:13:08] nymous: i'm doubt about the inheritance
[22:13:16] apeiros: leitz: yeah and I'm trying to tell you that you got it wrong :)
[22:13:21] leitz: Which was an early implementation.
[22:13:41] nymous: i mean scoping
[22:13:51] leitz: Understood on "wrong", just trying to comprehend.
[22:14:47] zenspider: nymous: heh. good luck with that.
[22:15:30] zenspider: minitest has a clean and easy to find version of let in minitest/spec.rb
[22:15:46] Nahra: has joined #ruby
[22:17:37] leitz: apeiros, though it could be much better; Careers do modify the character. https://github.com/LeamHall/CT_Character_Generator/blob/master/lib/career.rb
[22:18:13] leitz: The career subclasses just add arrays for options and the occasional method specific to that career.
[22:18:37] apeiros: leitz: yes, I understand that *in your code* they do
[22:19:14] apeiros: leitz: but I try to get you to understand that IMO they should only *inform* character on how a career would modify the character. and that the character then applies that modification.
[22:19:20] mikecmpb_: has joined #ruby
[22:19:37] ramfjord: has joined #ruby
[22:20:05] apeiros: ACTION off to his own devices now, though
[22:20:10] leitz: ACTION is pondering.
[22:22:23] bkxd: has joined #ruby
[22:25:24] ramfjord: has joined #ruby
[22:25:51] johnpaul: has joined #ruby
[22:27:00] mikecmpbll: has joined #ruby
[22:27:52] nymous: zenspider: yeah, it looks easier to understand
[22:29:05] _aeris_: has joined #ruby
[22:29:13] nymous: my first quick and dirty solution is to extend var syntax to accept blocks as lazy eval vars and make a proxy functions inside Group
[22:29:29] zenspider: it doesn't LOOK easier to understand. It IS easier to understand.
[22:29:34] vtx: has joined #ruby
[22:30:02] zenspider: I don't know what that means
[22:30:20] vtx: hi guys, is there a way to find out how many unused methods i have defined in my ruby code?
[22:31:13] nymous: oh, it's about my code https://github.com/divanikus/salus/blob/master/lib/salus.rb#L46-L54
[22:31:51] ramfjord: has joined #ruby
[22:31:57] zenspider: vtx: the debride gem can help... but because ruby is so dynamic nothing can be truly definitive... what are you trying to do?
[22:32:16] alfiemax: has joined #ruby
[22:33:09] vtx: um, i guess i just wanted to see if i had any unused code in my project
[22:33:23] zenspider: nymous: that seems overly clever and not terribly clear.
[22:33:35] zenspider: vtx: if you're wondering, you probably do. :P
[22:33:44] vtx: lol, i agree
[22:34:06] zenspider: vtx: debride will analyze the code and find any methods that aren't obviously called. Doesn't mean they're actually unused tho. Depends on how the code is set up, what it connects to, etc.
[22:34:11] baweaver: vtx: if you test things well, you can get a code coverage report but that may mean you're testing things which are never actually used
[22:34:28] zenspider: Object#send will guarantee incomplete analysis...
[22:34:34] baweaver: Tree shaking in Ruby is hard
[22:34:56] zenspider: it also provides a whitelist for things you know are called externally
[22:35:03] nymous: zenspider: it's for things like that https://gist.github.com/divanikus/a476b6bb902c86505102234d025f074c#file-test-rb-L4-L5
[22:35:23] zenspider: nymous: I stand by my statement
[22:35:51] mikecmpb_: has joined #ruby
[22:35:52] nymous: zenspider: you mean my code or proposed approach?
[22:36:18] zenspider: yes, probably
[22:36:51] zenspider: starting with: def var(*args)
[22:36:54] leitz: apeiros, if you meander back here, is this a path to take? "The instance of Character sends Career::Whatever two pieces of data; a number of terms and a set of stats. The Career returns a hash containing skills to be modified, cash and stuff, and optionally a Rank title."
[22:37:31] leitz: Sending the stats is because the list of skills can vary based on the stats.
[22:38:01] ramfjord: has joined #ruby
[22:38:26] baweaver: Too much magic and cleverness will bite you
[22:40:37] leitz: baweaver, enjoying the Algorithms book.
[22:41:01] baweaver: It's good stuff
[22:41:03] leitz: As much as I can. It takes a bit. :)
[22:42:46] leitz: apeiros was just giving me some ideas on the Character <=> Career bit. I'm back to trying to understand OOP via gaming.
[22:43:08] leitz: With *trying* being the operative word.
[22:43:23] milardov_: has joined #ruby
[22:43:42] ramfjord: has joined #ruby
[22:43:57] jenrzzz: has joined #ruby
[22:44:10] leitz: vtx, I will occasionally just "grep" for methods in my code. If it's only found in the definition then I usually clean it up and see what breaks.
[22:44:28] nymous: zenspider: what wrong with that?
[22:45:09] vtx: leitz: zenspider: baweaver: thanks everyone!
[22:45:46] leitz: ACTION notes the newbie gets first billing. :P
[22:48:39] jdawgaz: has joined #ruby
[22:50:11] leitz: And for my next dumb question, is there a Ruby equivalent of "py.test"? Something that just goes and runs everything in ~/tests
[22:50:13] baweaver: nymous: the entire DSL is too much magic. This could likely be expressed in straight Ruby a lot more simply
[22:50:22] baweaver: leitz: minitest
[22:50:24] leitz: I'ts been a rough couple of months.
[22:50:26] mlkkk: has joined #ruby
[22:50:52] ogres: has joined #ruby
[22:51:30] baweaver: namely with case statements for fallthrough
[22:52:14] nymous: baweaver: i need magic, i'm tired of writing and maintaining things like this https://github.com/scoopex/zabbix-agent-extensions/blob/master/extension-files/tools/zabbix_check_dmesg over and over again
[22:52:46] shoogz: has joined #ruby
[22:53:01] conta2: has joined #ruby
[22:53:35] baweaver: you really don't need the magic.
[22:53:47] baweaver: and you also don't have to write things like that either
[22:53:59] leitz: minitest requrires setup. I've got the unittests, just need to run them. Back to a test suite.
[22:54:08] zenspider: nymous: what's right about it? var... var is a good name. def... needed. but the rest?
[22:54:14] shoogz: has joined #ruby
[22:54:48] zenspider: all code requires setup. All code requires running it. That's kinda the whole point of this mess.
[22:55:18] nymous: baweaver: do you want me to show you my script in perl for monitoring stuff?
[22:55:46] shoogz: has joined #ruby
[22:56:07] nymous: i don't have to do many things, i can resign from my job and become a part time construction worker, i guess
[22:56:55] leitz: zenspider, py.test just looks in ~/test and runs what's there. No real setup.
[22:57:06] al2o3-cr: do it, bob the builder is easier :P
[22:57:15] shoogz: has joined #ruby
[22:57:30] leitz: So you can run one test manually or just run the entire suite.
[22:57:53] despai: has joined #ruby
[22:58:07] al2o3-cr: just don't drill into the gas mains
[22:58:41] shoogz: has joined #ruby
[22:59:02] stephh: has joined #ruby
[22:59:27] nymous: have recently re-watched the Office Space
[22:59:57] zenspider: leitz: wrong. you need to setup python and py.test.
[23:00:07] shoogz: has joined #ruby
[23:00:16] zenspider: *everything* on a computer has setup. period.
[23:01:57] despai: has joined #ruby
[23:02:10] leitz: Not really. I install it. I run it. It works. If I want to change the setup then I do so, otherwise I take the defaults.
[23:02:29] leitz: With py.test, I run it. It works. No configuration necessary.
[23:03:07] steph__: has joined #ruby
[23:03:22] jhass: not sure I'd call `require "minitest/autorun"` that much setup
[23:03:25] zenspider: woosh. again. that IS setup. if you can't see that, then I don't see the point of this discussion in the slightest
[23:04:08] zenspider: jhass: eh. you need ruby. you need minitest (which does ship with ruby, fwiw)... you need a test file (ish)... the right code structure...
[23:04:24] zenspider: but that's entirely true for py.test too... *shrug*
[23:04:30] jhass: sorry should have said that much more setup than what you need for py.test
[23:04:39] zenspider: obtuse is obtuse. I can't do much about that.
[23:05:17] leitz: jhass, where does that require go? I have the unittests, just trying to figure out how to call every test file without having to track each one in a test suite.
[23:05:39] jhass: at the top of each file
[23:06:01] jhass: then run a file with ruby thefile.rb or all of them with a simple for loop or whatever
[23:06:11] zenspider: or rake task
[23:06:53] iszak: has joined #ruby
[23:07:18] leitz: Ah-HA! zenspider, that's what I was looking for. I thought I had done something like this already.
[23:07:25] leitz: Thanks for the reminder!
[23:07:37] bkxd: has joined #ruby
[23:08:08] leitz: Since I'm not using rake for much else there's a default task to run the tests.
[23:10:44] nymous: what's the benefit of using minitest instead of rspec?
[23:11:02] jhass: pure preference
[23:11:22] leitz: nymous, I use unittest, too. jhass is right, though. I'd say mostly preference.
[23:11:50] baweaver: nymous: https://gist.github.com/divanikus/a476b6bb902c86505102234d025f074c#gistcomment-2291106
[23:12:00] baweaver: all plain Ruby
[23:13:47] tcopeland: has joined #ruby
[23:14:37] ramfjord: has joined #ruby
[23:14:39] nymous: baweaver: you forgot about the renderer part and also more complex metrics like counters or derives
[23:14:56] nymous: and i didn't even tried to implement histograms
[23:15:25] baweaver: Y'know I could be incredibly snarky here
[23:15:53] baweaver: Point being, you don't need all that magic and it's going to bite you later
[23:17:32] bradleyprice: has joined #ruby
[23:19:12] leitz: Is there an easy fix for the duplicated "roll_2" method? The outer one gets called elsewhere but the Struct seems to want its own. https://github.com/LeamHall/CT_Character_Generator/blob/c_tools_issue_51/lib/character_tools.rb#L21-L39
[23:19:24] nymous: i'm ok with that, or i should be a python fan
[23:19:50] nymous: i hate python for being to straightforward
[23:20:11] leitz: I like not having 27 layers of "end".
[23:20:24] leitz: Just not as fun a language though. Not sure why.
[23:20:33] ramfjord: has joined #ruby
[23:20:44] nymous: because it forbids you to make magic
[23:21:38] baweaver: You use that word a lot, I do not think it means what you think it means
[23:21:40] pilne: has joined #ruby
[23:22:00] nymous: and as "language for learning how to program" it makes too much assumptions on it's side which you most likely can't avoid
[23:22:01] leitz: Prepare to die!
[23:22:22] baweaver: inconceivable
[23:22:48] leitz: "I'm left handed too."
[23:22:52] nymous: baweaver: my english skills are too imperfect, so i can't argue with you in full
[23:23:01] cagomez: has joined #ruby
[23:23:04] baweaver: Anyways, I know quite a few Python programmers who would be highly amused by that assertion
[23:23:27] leitz: nymous, we have been quoting, or mis-quoting in my case, from "The Princess Bride".
[23:24:13] baweaver: Yep, just asked Python, they're amused and say there's a lot of magic in Python
[23:25:09] leitz: nymous, while your English isn't perfect it is a thousand times better than my Russian.
[23:25:26] baweaver: Anyways, you have a fixation on using magic. That's dangerous
[23:25:37] baweaver: It leads you to try and be clever where simple solutions would do the same
[23:25:52] baweaver: and nothing is more dangerous than clever code which you don't truly understand
[23:26:26] nymous: i have i guess 20+ years of programming (including pre-school and basic lol), and my first taste of python is that it makes me think dumb to do dumb things
[23:26:32] ramfjord: has joined #ruby
[23:26:53] nymous: even C is much more flexible to me
[23:27:10] baweaver: Yeah, definitely don't mention that on #python
[23:27:11] leitz: nymous, think of coding like talking to someone not from that language. Simple and powerful.
[23:27:52] nymous: i won't, because i won't go to #python
[23:28:01] nymous: just avoiding things i hate
[23:28:14] nymous: sound clever enough to me
[23:28:57] nymous: leitz: i hated pascal, python is a new pascal
[23:29:04] baweaver: Well that's enough for me then
[23:29:12] nymous: so nothing is changed on that point
[23:30:14] leitz: baweaver, you bouncing out?
[23:30:37] baweaver: I'm still on, but getting back to other things
[23:30:40] pastorin_: has joined #ruby
[23:30:58] nymous: i don't want to offend anyone, language choice is a matter of taste
[23:31:05] leitz: Ah, enjoy. I'm still looking for thoughts on that duplicated roll_2 issue.
[23:31:07] nymous: you don't have to know and use all them, right?
[23:31:20] baweaver: pro tip, you can use kwargs in blocks
[23:31:42] nymous: i don't like python and avoiding it, that's all
[23:32:42] leitz: ACTION goes to get the book to read up on kwargs.
[23:33:30] nymous: it's python's thing
[23:33:36] zenspider: <leitz> "I like not having 27 layers of 'end'". ... obvious response: don't design 27 layers. that's shit code in any language.
[23:33:59] baweaver: zenspider: wanna see something fun?
[23:34:02] baweaver: >> [{name:"cpu.usage",value:12.528473606797895,timestamp:1510700076.4455612,ttl:60}].map { |name: 'default', value: 0, timestamp: 0, ttl: 300| [name, value, timestamp, ttl] }
[23:34:04] ruby[bot]: baweaver: # => [["cpu.usage", 12.528473606797895, 1510700076.4455612, 60]] (https://eval.in/920051)
[23:34:10] herbmillerjr: has joined #ruby
[23:34:11] baweaver: kwargs work in block args :D
[23:34:22] baweaver: with defaults too
[23:34:31] baweaver: >> [{name:"cpu.usage",ttl:60}].map { |name: 'default', value: 0, timestamp: 0, ttl: 300| [name, value, timestamp, ttl] }
[23:34:33] ruby[bot]: baweaver: # => [["cpu.usage", 0, 0, 60]] (https://eval.in/920052)
[23:34:34] jdawgaz: has joined #ruby
[23:35:04] baweaver: It's nice when dealing with JSON
[23:35:05] baweaver: Oh come now, you know whenever I say "fun" it's loaded
[23:37:04] baweaver: Like Hash#to_proc fun that I hacked together once
[23:37:30] phate408: has joined #ruby
[23:39:51] baweaver: https://medium.com/@baweaver/new-in-enumerable-triple-equals-predicates-c1fcd0eabf6d
[23:39:57] baweaver: See the black magic fun section
[23:41:51] baweaver: zenspider: https://eval.in/920054 :D
[23:43:02] stephh: has joined #ruby
[23:46:04] mim1k: has joined #ruby
[23:46:41] Emmanuel_Chanel: has joined #ruby
[23:49:30] alfiemax: has joined #ruby
[23:50:02] cdg: has joined #ruby
[23:52:46] bkxd: has joined #ruby
[23:53:22] DmitryBochkarev: has joined #ruby
[23:53:33] pastorinni: has joined #ruby
[23:55:32] amatas: has joined #ruby
[23:56:11] priodev: has joined #ruby
[23:57:12] nymous: i got your point about *args btw, it was from function like somethg(name, *args, &block), the function later disappeared, and the code was just copy-pasted to different places
[23:57:57] nymous: yeah, i can safely change it to just args
[23:58:18] jdawgaz: has joined #ruby
[23:59:41] al2o3-cr: at least it's not ...