« Back to channel list

#ruby - 04 January 2018

« Back 1 day Forward 1 day »
[00:04:50] neo95: has joined #ruby
[00:05:34] prometheus_falli: has joined #ruby
[00:07:03] mtkd: has joined #ruby
[00:08:48] jtdoncas: has joined #ruby
[00:11:36] prometheus_falli: has joined #ruby
[00:15:21] Vile`: has joined #ruby
[00:16:17] ResidentBiscuit: has joined #ruby
[00:16:49] leitz: I have a gem that I'm developing. I've installed an early version and continue to develop it. Now the issue is that the LOAD_PATH puts the gem's lib directory before the newest one. Is there any way besides "ruby -Ilib mycode" to force the LOAD_PATH to load the dev version first?
[00:18:58] jtdoncas: has joined #ruby
[00:21:50] kies: has joined #ruby
[00:22:46] r3kz: has joined #ruby
[00:24:20] chocoelho: has joined #ruby
[00:30:53] jtdoncas: has joined #ruby
[00:31:12] pastorinni: has joined #ruby
[00:40:05] jtdoncas: has joined #ruby
[00:41:21] Radar: leitz: How did you create that gem?
[00:41:38] Radar: leitz: `bundle exec <gem>` is usually how I'd do it because I use `bundle gem` to generate the gem.
[00:43:02] bronson: has joined #ruby
[00:43:06] c785127: has joined #ruby
[00:43:08] leitz: Radar, not quite sure. It's been a little bit. I know that I do basic stuff and I doubt I used bundle.
[00:44:42] Radar: leitz: does it have a Gemfile at least?
[00:45:18] leitz: Yup. Though I'm not sure I'm communicating well. The gem works.
[00:46:09] leitz: However, when I change code in the development directory the changes aren't seen if the installed gem's files come before the development version in the LOAD_PATH.
[00:47:45] orbyt_: has joined #ruby
[00:48:27] c785127: has joined #ruby
[00:52:01] pastorinni: has joined #ruby
[01:02:33] blindMoe: has joined #ruby
[01:02:33] blindMoe: has joined #ruby
[01:09:10] Radar: leitz: do you have the "gemspec" line in that Gemfile?
[01:09:11] mniip: has joined #ruby
[01:09:17] cdg: has joined #ruby
[01:09:29] Radar: If so, I thought "bundle exec <gem>" would execute that gem in the directory, rather than the one that is loaded.
[01:10:24] helpa: has joined #ruby
[01:12:29] badeball: has joined #ruby
[01:13:33] jinie: has joined #ruby
[01:13:34] leitz: Ah, interesting. Let me try that. Thanks Radar!
[01:13:57] jsaak: has joined #ruby
[01:14:07] kke: has joined #ruby
[01:14:23] nit3rid3_: has joined #ruby
[01:14:42] leitz: Looks like bundle isn't installed.
[01:14:59] leitz: Or there's more to the command line.
[01:15:07] linduxed: has joined #ruby
[01:15:16] CustosLimen: has joined #ruby
[01:17:03] Barrt: has joined #ruby
[01:17:13] blindMoe: has joined #ruby
[01:17:14] blindMoe: has joined #ruby
[01:17:47] Radar: leitz: "gem install bundler"
[01:19:03] leitz: No real need. I can build the gem without it and use the -Ilib option to specify the current directory. I try to not add a lot of software that I barely understand; there's already enough that I barely understand. :)
[01:19:12] ledestin: has joined #ruby
[01:19:30] sspreitz: has joined #ruby
[01:19:49] selim: has joined #ruby
[01:20:17] c785127: has joined #ruby
[01:20:26] ResidentBiscuit: has joined #ruby
[01:20:36] hyperreal: has joined #ruby
[01:22:02] eightlimbed: has joined #ruby
[01:23:03] jtdoncas: has joined #ruby
[01:23:31] cagomez: has joined #ruby
[01:24:15] blindMoe: has joined #ruby
[01:24:15] blindMoe: has joined #ruby
[01:27:41] leitz: Radar, I found my command. It was just "gem build <gemspec file>"
[01:28:07] cremes: has joined #ruby
[01:35:49] Azure: has joined #ruby
[01:36:58] nwm: has joined #ruby
[01:37:47] alfiemax: has joined #ruby
[01:38:40] c785127: has joined #ruby
[01:43:34] bronson: has joined #ruby
[01:43:46] cdg: has joined #ruby
[01:49:15] cdg: has joined #ruby
[01:56:49] ledestin: has joined #ruby
[01:57:04] elphe: has joined #ruby
[01:57:34] kapil___: has joined #ruby
[02:03:02] gizmore|2: has joined #ruby
[02:04:11] c785127: has joined #ruby
[02:04:37] bmurt: has joined #ruby
[02:07:01] guardianx: has joined #ruby
[02:13:54] chocoelho: has joined #ruby
[02:16:57] eightlimbed: has joined #ruby
[02:26:19] halt: has joined #ruby
[02:33:32] therealGent: has joined #ruby
[02:36:02] c785127: has joined #ruby
[02:36:34] mostly-harmless: has joined #ruby
[02:41:06] bmurt: has joined #ruby
[02:44:05] orbyt_: has joined #ruby
[02:45:09] bronson: has joined #ruby
[02:50:17] lele: has joined #ruby
[02:51:56] c785127: has joined #ruby
[02:52:54] mjolnird: has joined #ruby
[02:54:02] nertzy: has joined #ruby
[02:54:35] warreng_: has joined #ruby
[02:54:58] warreng_: 14880 == Zlib::GzipReader.new(StringIO.new(File.read("/private/tmp/127135\ 3/127135_2018-01-03_0\#18.json.gz"))).read.length
[02:55:07] warreng_: 159706438 == `cat /private/tmp/127135\\ 3/127135_2018-01-03_0\#18.json.gz | gzip -d`.length
[02:55:32] warreng_: can anybody shed some light on why Zlib::GzipReader is only returning the first 9 lines of a gzipped file?
[02:57:49] warreng_: 14880 == f=File.open("/private/tmp/127135\ 3/127135_2018-01-03_0\#18.json.gz", "rb"); Zlib::GzipReader.new(f).read.length
[02:57:58] warreng_: (it's not StringIO)
[03:01:14] mgtuiw1131: has joined #ruby
[03:02:22] rouge: has joined #ruby
[03:03:52] cdg: has joined #ruby
[03:05:24] rrutkowski: has joined #ruby
[03:05:55] alfiemax: has joined #ruby
[03:06:48] eightlimbed: has joined #ruby
[03:07:22] cdg_: has joined #ruby
[03:08:11] darkhanb: has joined #ruby
[03:08:39] cdg: has joined #ruby
[03:15:40] rrutkowski: has joined #ruby
[03:20:12] rrutkowski: has joined #ruby
[03:23:42] c785127: has joined #ruby
[03:26:06] orbyt_: has joined #ruby
[03:28:19] Yzguy: has joined #ruby
[03:30:34] uZiel: has joined #ruby
[03:35:11] despai: has joined #ruby
[03:39:57] beauby_: has joined #ruby
[03:40:10] nofxx__: has joined #ruby
[03:41:16] bocobit: has joined #ruby
[03:42:26] rrutkowski: has joined #ruby
[03:45:30] rrutkowski: has joined #ruby
[03:46:01] bronson: has joined #ruby
[03:46:09] ur5us: has joined #ruby
[03:46:58] pastorinni: has joined #ruby
[03:49:02] vichib: has joined #ruby
[03:52:33] RougeR: has joined #ruby
[03:55:21] uZiel: has joined #ruby
[03:56:06] eightlimbed: has joined #ruby
[04:00:26] c785127: has joined #ruby
[04:01:09] alfiemax: has joined #ruby
[04:01:48] rrutkowski: has joined #ruby
[04:11:42] juggler: has joined #ruby
[04:28:41] rrutkowski: has joined #ruby
[04:31:43] guardianx: has joined #ruby
[04:36:57] alfiemax: has joined #ruby
[04:37:08] tdy: has joined #ruby
[04:38:34] rrutkowski: has joined #ruby
[04:40:06] c785127: has joined #ruby
[04:40:30] tdy: has joined #ruby
[04:46:25] cdg: has joined #ruby
[04:46:37] bholzer: has joined #ruby
[04:47:02] bronson: has joined #ruby
[04:48:46] bholzer: I am using a method to build a message to send to the client. What I have is a bit verbose and I'm wondering if someone has any ideas for how to slim it down. https://gist.github.com/bholzer/a2100639c7fc5de70a318e4de4e8761b
[04:53:38] alfiemax_: has joined #ruby
[04:56:18] webguynow: has joined #ruby
[04:56:25] c785127: has joined #ruby
[04:57:56] gix-: has joined #ruby
[04:58:27] zacts: has joined #ruby
[05:04:26] mr_rich101: has joined #ruby
[05:04:29] alfiemax: has joined #ruby
[05:08:37] nowhere_man: has joined #ruby
[05:14:47] JusticeFries: has joined #ruby
[05:18:56] bholzer: has joined #ruby
[05:22:05] zwliew: has joined #ruby
[05:27:00] guardianx: has joined #ruby
[05:36:39] uZiel: has joined #ruby
[05:37:07] cdg: has joined #ruby
[05:41:33] cdg_: has joined #ruby
[05:45:25] anisha: has joined #ruby
[05:46:27] cdg: has joined #ruby
[05:46:44] ur5us: has joined #ruby
[05:47:46] bronson: has joined #ruby
[05:51:28] alfiemax_: has joined #ruby
[05:53:51] postmodern: has joined #ruby
[05:54:27] za1b1tsu: has joined #ruby
[05:54:44] aupadhye: has joined #ruby
[05:55:02] za1b1tsu: How do I use #<BigDecimal:567dcc8,'0.0',9(18)> ? I can't even manipulate in the consoles it expects some more lines?
[05:55:55] za1b1tsu: Basically I pulling it from a db, do some calculations and then updated the db, but it doesn't like the #<BigDecimal:567dcc8,'0.0',9(18)> format
[05:56:18] elomatreb: It won't, that's the format used by ruby's #inspect method.
[05:57:45] elomatreb: How you get an arbitrary precision number into your database depends on the adapter, the easy if hacky fix is to convert it to a float with #to_f, but that will lose accuracy
[05:58:23] za1b1tsu: I have a [x:=>bigdecimal, y:=>bigdecimal, ....] and I used inspect to get it to (value, value, value)
[05:58:32] za1b1tsu: that's why has that fromat
[05:59:00] cdg: has joined #ruby
[05:59:01] za1b1tsu: but now I have to it without inspec
[06:02:09] hyperreal: has joined #ruby
[06:02:24] za1b1tsu: So puts uses inspect on big decimals?
[06:02:31] KeyJoo: has joined #ruby
[06:03:08] za1b1tsu: Anyway I can print it without inspect?
[06:11:17] za1b1tsu: How can I do {[x:=>bigdecimal, y:=>bigdecimal, ....], [..], [...]} to (bigdecimal, bigdecimal ..),(....) without inspect
[06:11:28] hyperreal: has left #ruby: ("Leaving")
[06:12:07] c785127: has joined #ruby
[06:13:30] za1b1tsu: data.map do |k, v|
[06:13:30] za1b1tsu: v.merge(:id => k)
[06:13:30] za1b1tsu: "(" + v.values.to_a.join(",") + ")"
[06:13:30] za1b1tsu: end.join(",") Is this nice I have the merge because I also have a key that I need as value
[06:17:09] darkhanb: has joined #ruby
[06:27:08] mtkd: has joined #ruby
[06:27:55] cibs: has joined #ruby
[06:32:49] c785127: has joined #ruby
[06:33:41] jina: has joined #ruby
[06:33:46] zautomata: has joined #ruby
[06:34:57] mikhael_k33hl: has joined #ruby
[06:36:09] mikhael_k33hl: Anyone using concurrent-ruby? I have this script: https://gist.github.com/marzdgzmn/d767d844b00f51210aec75e135f98c41 and I seem to be stuck at the line where it outputs 'entering process_job'
[06:36:42] darkhanb: has joined #ruby
[06:38:28] LocaMocha: has joined #ruby
[06:43:01] despai: has joined #ruby
[06:47:28] DmitryBochkarev: has joined #ruby
[06:48:24] bronson: has joined #ruby
[06:48:50] c785127: has joined #ruby
[06:53:08] mikhael_k33hl: If I create another thread where will the output of that thread be displayed?
[06:58:42] darkhanb: has joined #ruby
[06:59:17] pelegreno: has joined #ruby
[07:05:01] jtdoncas_: has joined #ruby
[07:05:17] bkxd: has joined #ruby
[07:09:45] jtdoncas: has joined #ruby
[07:09:47] c785127: has joined #ruby
[07:16:24] rabajaj: has joined #ruby
[07:23:23] guardianx: has joined #ruby
[07:27:12] bkxd_: has joined #ruby
[07:34:16] conta: has joined #ruby
[07:36:58] qba73: has joined #ruby
[07:37:18] qba73: has joined #ruby
[07:37:32] kriskropd: has joined #ruby
[07:37:38] ctp_: has joined #ruby
[07:38:33] qba73: has joined #ruby
[07:39:44] pelegreno: has joined #ruby
[07:39:49] qba73: has joined #ruby
[07:41:05] qba73: has joined #ruby
[07:42:00] qba73: has joined #ruby
[07:42:55] qba73: has joined #ruby
[07:45:29] nwm: has joined #ruby
[07:46:46] c785127: has joined #ruby
[07:47:17] ur5us: has joined #ruby
[07:49:26] rippa: has joined #ruby
[07:49:36] bronson: has joined #ruby
[07:51:44] tfitts: has joined #ruby
[07:51:53] tAn: has joined #ruby
[07:52:54] InfinityFye: has joined #ruby
[07:53:17] oetjenj: has joined #ruby
[07:53:38] milardovich: has joined #ruby
[07:54:12] InfinityFye: has left #ruby: ()
[07:59:39] aufi: has joined #ruby
[08:00:31] bkxd: has joined #ruby
[08:01:14] bkxd: has joined #ruby
[08:01:20] InfinityFye: has joined #ruby
[08:01:57] bkxd: has joined #ruby
[08:02:39] bkxd: has joined #ruby
[08:02:45] c785127: has joined #ruby
[08:04:36] reaVer: has joined #ruby
[08:05:19] despai: has joined #ruby
[08:15:30] dionysus69: has joined #ruby
[08:19:36] milardovich: has joined #ruby
[08:20:41] qba73: has joined #ruby
[08:20:45] dminuoso: >> class Foo < (Class.new); end
[08:20:46] ruby[bot]: dminuoso: # => nil (https://eval.in/930284)
[08:21:56] SqREL: has joined #ruby
[08:23:52] claudiuinberlin: has joined #ruby
[08:27:41] alfiemax: has joined #ruby
[08:29:09] mark_66: has joined #ruby
[08:32:17] avelldiroll: has joined #ruby
[08:34:57] kriskropd: has joined #ruby
[08:36:12] alfiemax_: has joined #ruby
[08:37:16] ahrs: has joined #ruby
[08:39:17] c785127: has joined #ruby
[08:41:16] oyj: has joined #ruby
[08:41:24] oyj: has left #ruby: ()
[08:50:25] bronson: has joined #ruby
[08:51:29] marr: has joined #ruby
[08:53:44] ur5us: has joined #ruby
[08:54:47] mikhael_k33hl: anyone using concurrent ruby? my script seems to be stuck on creating Futures, e.g.: future = Concurrent::Future.new(executor: pool) { puts 'bright future' }
[08:59:26] jokke: has joined #ruby
[09:02:37] dinfuehr: has joined #ruby
[09:07:43] bkxd_: has joined #ruby
[09:07:44] alfiemax: has joined #ruby
[09:08:00] jenrzzz: has joined #ruby
[09:09:45] mikecmpbll: has joined #ruby
[09:12:45] Defenestrate: has joined #ruby
[09:12:45] Defenestrate: has joined #ruby
[09:16:09] c785127: has joined #ruby
[09:16:09] alfiemax_: has joined #ruby
[09:16:42] guille-moe: has joined #ruby
[09:18:46] cdg: has joined #ruby
[09:19:47] biberu: has joined #ruby
[09:28:17] cdg: has joined #ruby
[09:34:22] jtdoncas: has joined #ruby
[09:34:43] alfiemax: has joined #ruby
[09:36:40] c785127: has joined #ruby
[09:44:47] jtdoncas: has joined #ruby
[09:44:56] alfiemax: has joined #ruby
[09:49:00] bkxd: has joined #ruby
[09:50:06] bkxd__: has joined #ruby
[09:51:25] bronson: has joined #ruby
[09:56:01] jaruga: has joined #ruby
[09:57:53] amatas: has joined #ruby
[09:58:54] mikhael_k33hl: I have this script using concurrent-ruby and it doesn't seem to work: https://gist.github.com/marzdgzmn/5f240b977021afee23082c31f8c23878
[10:00:09] Beams: has joined #ruby
[10:02:39] herbmillerjr: has joined #ruby
[10:02:53] InfinityFye: has left #ruby: ("Leaving")
[10:05:40] jenrzzz: has joined #ruby
[10:06:10] rrutkowski: has joined #ruby
[10:13:11] c785127: has joined #ruby
[10:13:20] rrutkowski_: has joined #ruby
[10:16:00] rrutkowski_: has joined #ruby
[10:16:58] jtdoncas: has joined #ruby
[10:19:56] alfiemax_: has joined #ruby
[10:20:43] S007: has joined #ruby
[10:21:16] mikecmpbll: has joined #ruby
[10:27:43] z4phod: has joined #ruby
[10:28:21] z4phod: I did something strange, i dont understand how/why that's works with rails 4.2
[10:28:41] Cavallari: has joined #ruby
[10:29:11] c785127: has joined #ruby
[10:29:43] z4phod: Controller : def new/@object = Model.new/end ; def create/@object.save/end => works ?! (without @object = Model.create(params[:object]))
[10:30:59] z4phod: I don't understand how this code works, why @object exists in create action ? (i did this code by error, and i seen that work)
[10:31:03] rrutkowski_: has joined #ruby
[10:31:06] Ishido: has joined #ruby
[10:32:36] dminuoso: z4phod: Do you have any before_action/before_filter?
[10:35:45] TomyWork: has joined #ruby
[10:36:02] rrutkowski_: has joined #ruby
[10:36:35] z4phod: yes, but the function doesn't set @object
[10:37:09] z4phod: (an another @sector)
[10:37:39] SqREL: has joined #ruby
[10:38:49] brodul: has joined #ruby
[10:38:58] z4phod: oh i seen somethings, maybe : load_and_authorize_resource param_method: :object_params
[10:39:18] z4phod: (cancancan)
[10:39:38] blackmesa1: has joined #ruby
[10:39:57] ddffg: has joined #ruby
[10:40:28] z4phod: ok is that (https://github.com/ryanb/cancan/wiki/authorizing-controller-actions)
[10:41:07] qba73: has joined #ruby
[10:43:14] kies: has joined #ruby
[10:43:20] zwliew: has joined #ruby
[10:46:11] alfiemax: has joined #ruby
[10:50:11] jtdoncas: has joined #ruby
[10:51:34] uZiel: has joined #ruby
[10:52:02] bronson: has joined #ruby
[10:55:49] jenrzzz: has joined #ruby
[10:56:18] AJA4350: has joined #ruby
[11:00:22] ferr: has joined #ruby
[11:00:30] ferr: has left #ruby: ()
[11:01:13] milardovich: has joined #ruby
[11:02:57] TheBrayn: has joined #ruby
[11:03:12] tomphp: has joined #ruby
[11:03:33] oleo: has joined #ruby
[11:05:57] cdg_: has joined #ruby
[11:10:09] eightlimbed: has joined #ruby
[11:10:25] Cavallari1: has joined #ruby
[11:12:53] TheBrayn: has joined #ruby
[11:15:23] cdg_: has joined #ruby
[11:20:00] alfiemax_: has joined #ruby
[11:21:36] jtdoncas: has joined #ruby
[11:25:48] amatas: has joined #ruby
[11:29:56] mikecmpbll: has joined #ruby
[11:42:51] amatas: has joined #ruby
[11:46:21] matthewd: has joined #ruby
[11:50:13] qba73: has joined #ruby
[11:52:36] jtdoncas: has joined #ruby
[11:52:59] bronson: has joined #ruby
[12:01:04] Azure: has joined #ruby
[12:04:48] deadnull: has joined #ruby
[12:07:39] plexigras: has joined #ruby
[12:11:17] Psybur: has joined #ruby
[12:18:52] ur5us: has joined #ruby
[12:22:05] ltd: has joined #ruby
[12:22:12] dinfuehr: has joined #ruby
[12:26:37] Azure: has joined #ruby
[12:31:16] jtdoncas: has joined #ruby
[12:34:59] marcux: has joined #ruby
[12:35:26] ltd: has joined #ruby
[12:38:56] VladGh: has joined #ruby
[12:39:18] chocoelho: has joined #ruby
[12:41:40] [yas]: has joined #ruby
[12:53:48] bronson: has joined #ruby
[12:55:11] cdg_: has joined #ruby
[12:58:11] qba73: has joined #ruby
[13:00:44] guardianx: has joined #ruby
[13:01:43] jtdoncas: has joined #ruby
[13:02:19] beanish: has joined #ruby
[13:04:39] cdg_: has joined #ruby
[13:05:39] aceruser: has joined #ruby
[13:07:17] mark_66: has joined #ruby
[13:09:10] lxsameer: has joined #ruby
[13:14:53] InfinityFye: has joined #ruby
[13:15:16] InfinityFye: has left #ruby: ()
[13:15:18] dviola: has joined #ruby
[13:16:09] beanish: has joined #ruby
[13:17:47] despai: has joined #ruby
[13:20:46] conta1: has joined #ruby
[13:21:23] nankyokusei: has joined #ruby
[13:21:41] conta1: has joined #ruby
[13:24:19] ruby[bot]: -b *!*@43.241.44.163$#ruby-banned
[13:24:24] nchambers: has joined #ruby
[13:26:21] cdg_: has joined #ruby
[13:33:08] jtdoncas: has joined #ruby
[13:33:47] mtkd: has joined #ruby
[13:35:46] jnollette: has joined #ruby
[13:36:01] prometheus_falli: has joined #ruby
[13:39:35] _aeris_: has joined #ruby
[13:44:35] mniip: has joined #ruby
[13:45:43] cdg_: has joined #ruby
[13:47:14] leitz: has joined #ruby
[13:49:00] dionysus69: has joined #ruby
[13:49:21] dinfuehr: has joined #ruby
[13:50:11] bmurt: has joined #ruby
[13:50:13] rahul_bajaj: has joined #ruby
[13:50:14] cdg__: has joined #ruby
[13:52:37] shinnya: has joined #ruby
[13:52:57] ahrs: has joined #ruby
[13:53:15] cdg_: has joined #ruby
[13:54:33] aScottishBoat: has joined #ruby
[13:55:01] bronson: has joined #ruby
[13:58:24] ecuanaso: has joined #ruby
[13:59:45] jrafanie: has joined #ruby
[13:59:53] qba73: has joined #ruby
[14:04:18] john__: has joined #ruby
[14:07:56] jtdoncas: has joined #ruby
[14:08:32] cdg_: has joined #ruby
[14:09:18] _aeris_: has joined #ruby
[14:09:44] cdg__: has joined #ruby
[14:11:34] k0mpa: has joined #ruby
[14:14:15] cdg_: has joined #ruby
[14:15:19] mikkelsen: has joined #ruby
[14:15:46] cdg__: has joined #ruby
[14:19:28] ur5us: has joined #ruby
[14:20:23] cdg_: has joined #ruby
[14:20:39] aScottishBoat: has joined #ruby
[14:25:05] conta1: has joined #ruby
[14:26:06] _aeris_: has joined #ruby
[14:26:58] cdg_: has joined #ruby
[14:29:39] rwb: has joined #ruby
[14:31:43] tvw: has joined #ruby
[14:33:58] jobewan: has joined #ruby
[14:34:38] despai: has joined #ruby
[14:34:52] aef: has joined #ruby
[14:37:24] alfiemax: has joined #ruby
[14:39:01] jtdoncas: has joined #ruby
[14:39:38] za1b1tsu: has joined #ruby
[14:41:37] nwm: has joined #ruby
[14:42:21] nwm_: has joined #ruby
[14:46:47] cdg_: has joined #ruby
[14:48:14] cdg__: has joined #ruby
[14:50:55] rabajaj: has joined #ruby
[14:51:37] cdg_: has joined #ruby
[14:54:03] alfiemax: has joined #ruby
[14:55:41] bronson: has joined #ruby
[14:56:19] qba73: has joined #ruby
[14:57:46] cdg_: has joined #ruby
[15:00:33] cdg_: has joined #ruby
[15:03:26] jokke: has joined #ruby
[15:03:35] beanish: has joined #ruby
[15:04:23] chocoelho: has joined #ruby
[15:06:05] Rapture: has joined #ruby
[15:06:58] camilasan: has joined #ruby
[15:12:20] jtdoncas: has joined #ruby
[15:15:16] rikai: has joined #ruby
[15:17:11] Riddell: has joined #ruby
[15:17:25] safetypin: has joined #ruby
[15:17:34] minimalism: has joined #ruby
[15:19:15] jeffreylevesque: has joined #ruby
[15:23:03] qba73: has joined #ruby
[15:28:36] Vashy: has joined #ruby
[15:30:47] ctp_: has joined #ruby
[15:33:33] rwb1: has joined #ruby
[15:37:09] lroca: has joined #ruby
[15:37:22] amatas: has joined #ruby
[15:38:09] zwliew: has joined #ruby
[15:39:02] minimalism: has joined #ruby
[15:39:54] DaniG2k: has joined #ruby
[15:40:48] milardovich: has joined #ruby
[15:41:30] [Butch]: has joined #ruby
[15:46:26] amatas_: has joined #ruby
[15:47:07] yrstrly: has joined #ruby
[15:47:18] yrstrly: can someone help fix my while loop
[15:48:23] A124: has joined #ruby
[15:48:42] jtdoncas: has joined #ruby
[15:49:10] havenwood: yrstrly: what's wrong with it?
[15:49:36] yrstrly: can I Just copy and paste it in here?
[15:49:54] yrstrly: while i < limit-1 n = n[i] + n[i+1..limit-1].reverse i =+ 1 end
[15:50:19] yrstrly: im trying to reverse this string then keep the position fixed and reverse the rest until it reaches the end of the string
[15:50:34] yrstrly: so 012 would become 210 then 201
[15:50:51] yrstrly: limit is equal to the length of the original string
[15:52:31] wolfshappen: has joined #ruby
[15:53:17] havenwood: yrstrly: Just doing it for fun? Using the values?
[15:53:29] havenwood: >> s = '012'; s.size.times.map { |n| s.chars.rotate(n).join }
[15:53:30] ruby[bot]: havenwood: # => ["012", "120", "201"] (https://eval.in/930589)
[15:54:15] yrstrly: i have no idea how that even works
[15:54:35] [yas]: has left #ruby: ("Leaving")
[15:54:57] yrstrly: what was wrong with my loop though?
[15:56:27] bronson: has joined #ruby
[15:56:49] cschneid_: has joined #ruby
[15:57:46] havenwood: yrstrly: I'm not sure what you're expecting from the loop.
[15:58:43] yrstrly: to just go a long the string from the start, fixing each position and then reversing the rest and that becoming the new string
[15:58:44] havenwood: yrstrly: I'd suggest doing a gist with a working example so we can see what's going on. Let us know what was expected.
[15:59:07] aScottishBoat: has joined #ruby
[15:59:11] havenwood: >> 'yrstrly'.chars.rotate(-1).join
[15:59:12] ruby[bot]: havenwood: # => "yyrstrl" (https://eval.in/930590)
[15:59:12] PsyCypher: has joined #ruby
[16:00:17] yrstrly: so if the method was passed a string like Hello I reverse it first outside the loop to , then position 0 stays the same, rest reverses until you reach the end of the string
[16:00:19] ltem: has joined #ruby
[16:00:33] yrstrly: that code you posted returns something different
[16:01:30] yrstrly: If i have 012345 it should return 504132, not 501234
[16:01:47] yrstrly: ["012345", "123450", "234501", "345012", "450123", "501234"]
[16:02:09] al2o3-cr: has joined #ruby
[16:02:31] havenwood: >> s = '012345'; s.size.times.map { |n| s.chars.rotate(n).join }
[16:02:32] ruby[bot]: havenwood: # => ["012345", "123450", "234501", "345012", "450123", "501234"] (https://eval.in/930591)
[16:02:40] havenwood: yrstrly: like that ^?
[16:03:15] havenwood: or you just want?: 504132
[16:04:42] yrstrly: almost, if the passed string is 543210, id like it to return ["012345", "054321", "051234", "051432", "051423"]
[16:05:53] yrstrly: if I reverse the string outside of the loop
[16:05:56] yrstrly: and then use this i = 0 while i < limit-1 n = n[i] + n[i+1..limit-1].reverse i =+ 1 end
[16:06:07] yrstrly: i don't understand why doesn't that give me what I want, surely it should?
[16:06:35] havenwood: yrstrly: Gist your full code and someone can probably grok what you're wanting.
[16:06:38] ruby[bot]: https://gist.github.com - Multiple files, syntax highlighting, even automatically with matching filenames, can be edited
[16:10:58] yrstrly: https://gist.github.com/mattb20/838e0d84b2c49774d1e2bc93ebbd18ef
[16:11:03] yrstrly: is that right?
[16:11:32] yrstrly: thanks for your time btw
[16:12:42] havenwood: yrstrly: it looks like `limit` is undefined in that method
[16:13:42] tomphp: has joined #ruby
[16:13:48] yrstrly: if I defined it to be
[16:13:56] yrstrly: n.length.to_i outisde of the while loop
[16:13:58] yrstrly: would that fix it?
[16:14:55] troys: has joined #ruby
[16:15:07] yrstrly: i put it through and it took too long to compile
[16:15:40] yrstrly: https://gist.github.com/mattb20/838e0d84b2c49774d1e2bc93ebbd18ef
[16:16:08] bweston92: has joined #ruby
[16:19:50] ams__: has joined #ruby
[16:20:15] ur5us: has joined #ruby
[16:20:28] r00twrh: has joined #ruby
[16:20:39] r00twrh: Hi folks... When rendering json in Rails I can do something like... "render json: @items, :methods => :extra_method_on_item" .... That works. Question is: how do I call multiple methods when rendering?
[16:21:09] GodFather: has joined #ruby
[16:22:34] roshanavand: has joined #ruby
[16:23:49] gizmore|2: r00twrh: i am not sure, but you could try a hashmap/dict/array: :methods => [:method_name, :method2_name]
[16:24:15] gizmore|2: not sure if that would work... but "methodS" indicate you can supply multiple methods... never used that
[16:25:06] r00twrh: gizmore: That worked! Thank you!
[16:25:27] gizmore: :) welcome
[16:25:49] minimalism: has joined #ruby
[16:27:42] Vapez: has joined #ruby
[16:27:53] despai: has joined #ruby
[16:27:56] jtdoncas: has joined #ruby
[16:28:28] havenwood: yrstrly: I replied to your gist. See if that example helps you narrow down to the part you're not expecting.
[16:28:53] havenwood: yrstrly: try running that ^ code
[16:33:12] uZiel: has joined #ruby
[16:36:18] elphe: has joined #ruby
[16:36:27] gix: has joined #ruby
[16:38:18] uZiel: has joined #ruby
[16:42:19] pastorinni: has joined #ruby
[16:42:33] mtkd: has joined #ruby
[16:46:34] dinfuehr: has joined #ruby
[16:49:18] orbyt_: has joined #ruby
[16:50:18] cagomez: has joined #ruby
[16:50:47] chocoelho: has joined #ruby
[16:53:06] sepp2k: has joined #ruby
[16:57:22] bronson: has joined #ruby
[16:59:25] havenwood: It's interesting that you can't deserialized a marshalled kwarg struct. I hope that gets fixed in 2.5.1, because I want to use them!
[17:03:07] millerti: has joined #ruby
[17:05:34] jtdoncas: has joined #ruby
[17:05:47] nowhere_man: has joined #ruby
[17:05:49] orbyt_: has joined #ruby
[17:07:21] ctp_: has joined #ruby
[17:11:27] jamesaxl: has joined #ruby
[17:11:28] havenwood: https://bugs.ruby-lang.org/issues/14314
[17:15:23] ecuanaso: has joined #ruby
[17:16:42] despai: has joined #ruby
[17:20:06] darkhanb: has joined #ruby
[17:20:59] jtdoncas: has joined #ruby
[17:29:51] za1b1tsu_: has joined #ruby
[17:31:57] cschneid_: has joined #ruby
[17:32:09] nadir: has joined #ruby
[17:36:38] despai: has joined #ruby
[17:37:21] jrafanie: has joined #ruby
[17:37:34] orbyt_: has joined #ruby
[17:44:23] sanscoeur: has joined #ruby
[17:44:42] c_nick: has joined #ruby
[17:46:04] c_nick: Hi .. I am trying to load a C++ DLL inside my Ruby application .. I have registered the Interface using regsrv32 and loading the Dll using Win32OLE .. but if i am running a 64 bit variant of Ruby i cannot register a 32 bit C++ dll can anyone help?
[17:46:39] SeepingN: has joined #ruby
[17:50:06] despai_: has joined #ruby
[17:53:02] chocoelho1: has joined #ruby
[17:53:10] alfiemax: has joined #ruby
[17:53:34] alfiemax: has joined #ruby
[17:57:46] sameerynho: has joined #ruby
[17:58:18] bronson: has joined #ruby
[18:00:09] pilne: has joined #ruby
[18:00:11] k1l0b1t: has joined #ruby
[18:02:21] DmitryBochkarev: has joined #ruby
[18:02:35] alfiemax: has joined #ruby
[18:02:35] roshanavand: has joined #ruby
[18:07:44] jeffreylevesque: has joined #ruby
[18:09:13] tcopeland: has joined #ruby
[18:11:49] JusticeFries: has joined #ruby
[18:11:50] Ishido: has joined #ruby
[18:14:21] johno84: has joined #ruby
[18:16:33] workmad3: has joined #ruby
[18:17:08] eckhardt: has joined #ruby
[18:18:38] ur5us: has joined #ruby
[18:21:59] guille-moe: has joined #ruby
[18:23:38] jottr: has joined #ruby
[18:27:21] lagweezle: has joined #ruby
[18:27:31] lagweezle: has left #ruby: ()
[18:29:36] alfiemax: has joined #ruby
[18:31:37] zautomata: has joined #ruby
[18:31:48] orbyt_: has joined #ruby
[18:32:18] JusticeFries: has joined #ruby
[18:32:50] nit3rid3: has joined #ruby
[18:34:36] Papierkorb: has joined #ruby
[18:34:36] raynold: has joined #ruby
[18:35:34] cschneid_: has joined #ruby
[18:36:24] safetypin: has joined #ruby
[18:38:12] TomyLobo: has joined #ruby
[18:41:13] Nowaker: has left #ruby: ()
[18:42:17] lroca: has joined #ruby
[18:43:55] alfiemax: has joined #ruby
[18:44:41] k0mpa: has joined #ruby
[18:45:50] safetypin: has joined #ruby
[18:46:03] lroca: has joined #ruby
[18:46:16] mtkd: has joined #ruby
[18:46:34] cdg: has joined #ruby
[18:47:02] zautomata: has joined #ruby
[18:48:16] davic: has joined #ruby
[18:50:08] orbyt_: has joined #ruby
[18:54:28] lroca: has joined #ruby
[18:54:47] PaulCape_: has joined #ruby
[18:55:25] kirun: has joined #ruby
[18:59:10] bronson: has joined #ruby
[19:03:50] zautomata1: has joined #ruby
[19:06:12] despai: has joined #ruby
[19:07:43] jenrzzz: has joined #ruby
[19:07:43] jenrzzz: has joined #ruby
[19:08:00] mikecmpbll: has joined #ruby
[19:10:30] alfiemax_: has joined #ruby
[19:16:50] jottr: has joined #ruby
[19:17:37] pastorinni: has joined #ruby
[19:19:30] Dimik: has joined #ruby
[19:33:39] mr_foto: has joined #ruby
[19:37:59] wald0: has joined #ruby
[19:38:36] troulouliou_div2: has joined #ruby
[19:41:41] dionysus69: has joined #ruby
[19:45:13] zautomata2: has joined #ruby
[19:51:28] zautomata3: has joined #ruby
[19:51:41] despai: has joined #ruby
[19:52:15] BTRE: has joined #ruby
[19:54:45] zautomata4: has joined #ruby
[19:55:07] bweston92: has joined #ruby
[20:00:19] oetjenj: has joined #ruby
[20:00:28] romeoh: has joined #ruby
[20:01:00] chouhoulis: has joined #ruby
[20:01:26] chouhoulis: has joined #ruby
[20:01:52] nowhereman: has joined #ruby
[20:02:36] workmad3: has joined #ruby
[20:04:55] ur5us: has joined #ruby
[20:05:12] zautomata: has joined #ruby
[20:05:45] lytol_: has joined #ruby
[20:07:44] zautomata1: has joined #ruby
[20:09:51] r3kz: has joined #ruby
[20:13:42] Dreamer3: has joined #ruby
[20:13:49] guille-moe: has joined #ruby
[20:17:51] my123: has joined #ruby
[20:17:51] my123: has joined #ruby
[20:20:37] bmurt: has joined #ruby
[20:21:24] despai: has joined #ruby
[20:22:03] eightlimbed: has joined #ruby
[20:25:30] oetjenj: has joined #ruby
[20:25:46] guille-moe: has joined #ruby
[20:26:21] chocoelho: has joined #ruby
[20:26:31] oetjenj: has joined #ruby
[20:27:17] oetjenj: has joined #ruby
[20:28:03] oetjenj: has joined #ruby
[20:28:49] oetjenj: has joined #ruby
[20:29:42] rwb: has joined #ruby
[20:31:07] teej: has joined #ruby
[20:33:53] claudiuinberlin: has joined #ruby
[20:41:24] mostlybadfly: has joined #ruby
[20:43:40] joes: has joined #ruby
[20:45:26] cdg: has joined #ruby
[20:45:49] cagomez: has joined #ruby
[20:46:30] despai: has joined #ruby
[20:48:11] tcopeland: has joined #ruby
[20:49:39] eckhardt: has joined #ruby
[20:49:40] orbyt_: has joined #ruby
[20:50:41] pastorinni: has joined #ruby
[20:50:52] mtkd: has joined #ruby
[20:51:22] mikeiniowa: has joined #ruby
[20:56:11] cagomez: has joined #ruby
[20:59:22] cschneid_: has joined #ruby
[21:00:14] QualityAddict: has joined #ruby
[21:00:23] bronson: has joined #ruby
[21:03:52] jtdoncas: has joined #ruby
[21:04:01] chouhoulis: has joined #ruby
[21:04:43] nopolitica: has joined #ruby
[21:05:43] tdy: has joined #ruby
[21:11:49] guille-moe: has joined #ruby
[21:13:54] nicesignal: has joined #ruby
[21:15:09] Olipro: has joined #ruby
[21:16:48] jtdoncas: has joined #ruby
[21:18:05] romeoh: has joined #ruby
[21:25:45] cdg: has joined #ruby
[21:27:50] alfiemax: has joined #ruby
[21:30:42] jenrzzz: has joined #ruby
[21:30:42] jenrzzz: has joined #ruby
[21:34:24] tAn: has joined #ruby
[21:35:26] elphe: has joined #ruby
[21:37:04] jenrzzz: has joined #ruby
[21:37:04] jenrzzz: has joined #ruby
[21:38:45] eckhardt: has joined #ruby
[21:44:31] chouhoulis: has joined #ruby
[21:44:54] cdg: has joined #ruby
[21:45:27] tomphp: has joined #ruby
[21:47:26] Riddell: has joined #ruby
[21:47:30] jenrzzz: has joined #ruby
[21:47:30] jenrzzz: has joined #ruby
[21:50:11] ecuanaso: has joined #ruby
[21:52:19] jtdoncas: has joined #ruby
[21:54:07] jenrzzz: has joined #ruby
[21:54:07] jenrzzz: has joined #ruby
[21:54:37] cdg_: has joined #ruby
[21:57:15] banisterfiend: has joined #ruby
[21:58:04] aef: has joined #ruby
[22:01:08] bronson: has joined #ruby
[22:03:24] workmad3: has joined #ruby
[22:06:19] nowhereman: has joined #ruby
[22:14:58] jrafanie: has joined #ruby
[22:16:21] dtzuzu: has joined #ruby
[22:21:22] my123: has joined #ruby
[22:21:23] my123: has joined #ruby
[22:21:28] KeyJoo: has joined #ruby
[22:25:25] jtdoncas: has joined #ruby
[22:25:57] jnyw: has joined #ruby
[22:29:20] Psybur: has joined #ruby
[22:29:20] Psybur: has joined #ruby
[22:30:04] elphe_: has joined #ruby
[22:30:05] orbyt_: has joined #ruby
[22:32:50] c_nick: has joined #ruby
[22:33:24] jenrzzz_: has joined #ruby
[22:38:32] mjolnird: has joined #ruby
[22:38:55] chouhoulis: has joined #ruby
[22:40:01] spiette: has joined #ruby
[22:41:15] eightlimbed: has joined #ruby
[22:45:27] dviola: has joined #ruby
[22:52:33] tAn: has joined #ruby
[22:56:03] mtkd: has joined #ruby
[22:57:50] nso95: has joined #ruby
[22:59:12] jtdoncas: has joined #ruby
[23:01:57] bronson: has joined #ruby
[23:02:34] pastorinni: has joined #ruby
[23:03:30] alfiemax: has joined #ruby
[23:08:34] raz: has joined #ruby
[23:09:51] raz: when i have a method `def foo(a:, b:, c:)` - is there a away to access the parameters as a hash?
[23:10:05] chaos95: c_nick: you will have to run a 32-bit variant of ruby, I suspect
[23:10:54] eightlimbed: has joined #ruby
[23:12:26] ecuanaso: has joined #ruby
[23:13:03] c_nick: chaos95, is there another way as opposed to win32Ole to actually access bitness independent bin object?
[23:13:20] despai: has joined #ruby
[23:13:25] chaos95: c_nick: if you're feeling adventurous you can use ATL to create a COM wrapper exe for your 32-bit dll
[23:13:50] chaos95: c_nick: please note that my windows dev knowledge is ~6 years out of date so I don't know if this is still the way it's done
[23:14:23] chaos95: c_nick: more information here: https://blog.mattmags.com/2007/06/30/accessing-32-bit-dlls-from-64-bit-code/
[23:16:47] c_nick: hmm then i guess i am left to forking out processes
[23:17:02] c_nick: thanks, chaos95!
[23:18:13] c_nick: has joined #ruby
[23:18:25] lucz: has joined #ruby
[23:20:57] jeffreylevesque: has joined #ruby
[23:22:15] elphe: has joined #ruby
[23:22:25] al2o3-cr: raz: how so?
[23:23:01] raz: al2o3-cr: when called as `foo(a: 1, b: 2, b:3)` i would like to get all arguments as a hash { a:1, b:2, b:2 }
[23:23:28] raz: that way one could define a "schema" in the method signature and directly use the provided arguments e.g. in a database call
[23:24:13] raz: like... create_user(email:, password:) { User.create **kwargs }
[23:24:32] raz: (missing a 'def' in front of create_user ;) )
[23:24:50] al2o3-cr: send def foo(a:, b:, c:) method(__method__).parameters.map { |_, p| [p,binding.local_variable_get(p)] }.to_h end, {a: 1, b: 2, c: 3}
[23:25:28] raz: ok, that looks very hacky and probably slow, but i'm glad there is a way at all ;)
[23:25:59] raz: was hoping there might be an idiomatic shortcut that i had been missing
[23:26:20] al2o3-cr: not that i can recall.
[23:26:55] raz: if my japanese wasn't so rusty i'd be inclined to propose it
[23:27:42] raz: having to repeat the args in the method body often feels very unruby'ish
[23:27:47] al2o3-cr: raz: what do you want foo to return?
[23:28:06] k0mpa: has joined #ruby
[23:29:05] jtdoncas: has joined #ruby
[23:29:15] raz: al2o3-cr: nothing special. my example above is the pattern i most often run into. convenience wrappers such as `def create_user(email:, password:) { User.create **kwargs }`
[23:29:41] raz: without the imaginary '**kwargs' (or your crazy reflection stunt) you have to repeat all the kwargs inside the method body
[23:29:52] raz: often more than once, and often there are quite a few more than two...
[23:30:15] al2o3-cr: gotcha ;) yeah i can't see anything simple.
[23:30:31] al2o3-cr: with regard to this.
[23:31:04] eckhardt: has joined #ruby
[23:31:12] raz: yup, i should just learn me some japanese and hit up matz on tinder
[23:31:41] al2o3-cr: does it have to be require args?
[23:31:57] raz: well yes, that's the whole point, to have that minimum of validation
[23:32:11] raz: validation/visibility
[23:32:36] raz: it's much better than anonymous opts-hashes, esp. with multiple people working on the code
[23:33:13] raz: i mean, that's what i do in practice... i downgrade the method to an anonymous opts-hash, and validate that manually
[23:33:59] raz: ending up with effectively the same that your reflection code would do - but in a way that doesn't force me to explain it to a different co-worker every day ;)
[23:33:59] al2o3-cr: raz: ok, then i think you're stuck, unless someone knows.
[23:35:10] orbyt_: has joined #ruby
[23:37:19] a549: has joined #ruby
[23:38:18] a549: has left #ruby: ()
[23:45:06] oetjenj: has joined #ruby
[23:45:07] jtdoncas: has joined #ruby
[23:45:41] alfiemax: has joined #ruby
[23:50:24] despai: has joined #ruby
[23:57:02] alfiemax: has joined #ruby