« Back to channel list

#ruby - 29 July 2018

« Back 1 day Forward 1 day »
[00:02:01] eblip: has joined #ruby
[00:02:19] elphe: has joined #ruby
[00:03:20] redlegion: has joined #ruby
[00:12:44] elphe: has joined #ruby
[00:13:19] redlegion: has joined #ruby
[00:19:25] apeiros: has joined #ruby
[00:20:42] elphe: has joined #ruby
[00:23:20] redlegion: has joined #ruby
[00:29:22] usrunkwn: has joined #ruby
[00:29:47] usrunkwn: has left #ruby: ()
[00:32:48] scrptktty: has joined #ruby
[00:33:18] redlegion: has joined #ruby
[00:43:23] redlegion: has joined #ruby
[00:49:27] alfiemax: has joined #ruby
[00:54:58] vonfry: has joined #ruby
[01:03:19] redlegion: has joined #ruby
[01:13:17] redlegion: has joined #ruby
[01:21:18] yokel: has joined #ruby
[01:23:20] redlegion: has joined #ruby
[01:33:19] redlegion: has joined #ruby
[01:34:42] tdy: has joined #ruby
[01:43:21] redlegion: has joined #ruby
[01:47:03] tdy: has joined #ruby
[01:50:43] akaiiro: has joined #ruby
[01:51:31] mochiyoda: has left #ruby: ("Konversation terminated!")
[01:53:20] redlegion: has joined #ruby
[01:54:23] vonfry: has joined #ruby
[02:03:21] redlegion: has joined #ruby
[02:04:17] vonfry: has joined #ruby
[02:13:17] redlegion: has joined #ruby
[02:18:29] dzipc_: has joined #ruby
[02:20:45] dzipc_: hi ,if $SAFE=3, what "script" code can help to read a file in "eval"?
[02:20:48] dzipc_: STDOUT.puts Thread.new(script){|s| eval "$SAFE=3;#{s}"}.value
[02:23:18] redlegion: has joined #ruby
[02:32:04] Caerus: has joined #ruby
[02:34:58] cadillac_: has joined #ruby
[02:43:18] redlegion: has joined #ruby
[02:53:15] redlegion: has joined #ruby
[03:00:31] cadillac_: has joined #ruby
[03:03:18] redlegion: has joined #ruby
[03:04:14] bmurt: has joined #ruby
[03:11:55] braincrash: has joined #ruby
[03:13:18] redlegion: has joined #ruby
[03:13:30] akaiiro: has joined #ruby
[03:15:06] za1b1tsu: has joined #ruby
[03:23:18] redlegion: has joined #ruby
[03:24:59] kapil___: has joined #ruby
[03:33:17] redlegion: has joined #ruby
[03:39:08] akaiiro: has joined #ruby
[03:41:03] moei: has joined #ruby
[03:43:16] redlegion: has joined #ruby
[03:51:51] nadir: has joined #ruby
[03:53:21] redlegion: has joined #ruby
[04:03:17] redlegion: has joined #ruby
[04:14:59] jetchisel: has joined #ruby
[04:16:26] gigetoo: has joined #ruby
[04:23:20] redlegion: has joined #ruby
[04:25:27] duderonomy: has joined #ruby
[04:43:20] redlegion: has joined #ruby
[04:53:18] redlegion: has joined #ruby
[05:13:18] redlegion: has joined #ruby
[05:16:53] tdy: has joined #ruby
[05:20:24] elphe: has joined #ruby
[05:23:17] redlegion: has joined #ruby
[05:30:18] alem0lars: has joined #ruby
[05:33:20] redlegion: has joined #ruby
[05:35:46] Emmanuel_Chanel: has joined #ruby
[05:40:07] elphe: has joined #ruby
[05:41:24] conta: has joined #ruby
[05:43:17] redlegion: has joined #ruby
[05:50:00] elphe: has joined #ruby
[05:59:47] elphe: has joined #ruby
[06:09:39] elphe: has joined #ruby
[06:13:18] redlegion: has joined #ruby
[06:14:13] Nicmavr: has joined #ruby
[06:20:07] venmx: has joined #ruby
[06:21:33] Tempesta: has joined #ruby
[06:23:17] redlegion: has joined #ruby
[06:25:24] alfiemax: has joined #ruby
[06:27:40] SeepingN: has joined #ruby
[06:43:19] redlegion: has joined #ruby
[06:51:47] elphe: has joined #ruby
[07:11:59] elphe: has joined #ruby
[07:13:20] redlegion: has joined #ruby
[07:22:03] elphe: has joined #ruby
[07:23:17] redlegion: has joined #ruby
[07:32:08] elphe: has joined #ruby
[07:32:59] biberu: has joined #ruby
[07:37:13] reber: has joined #ruby
[07:37:29] beilabs: has joined #ruby
[07:42:19] elphe: has joined #ruby
[07:53:17] redlegion: has joined #ruby
[07:59:10] beilabs: has joined #ruby
[07:59:50] rippa: has joined #ruby
[08:03:19] redlegion: has joined #ruby
[08:12:14] clemens3: has joined #ruby
[08:13:16] redlegion: has joined #ruby
[08:21:27] kapil___: has joined #ruby
[08:23:21] redlegion: has joined #ruby
[08:24:39] elphe: has joined #ruby
[08:24:59] wasamasa: has joined #ruby
[08:28:09] wasamasa: https://gist.github.com/wasamasa/3962b3ab98e80d760545e247b1c29388
[08:28:26] wasamasa: how do I get from the nested loop to an enumerator taking a target sum and depth?
[08:29:38] wasamasa: I don't really mind hand-coding this, but I'm sure there must be a good solution
[08:29:54] wasamasa: kind of like you could write a password cracker by using String#next!
[08:32:35] elomatreb: That's certainly a unique task, what's it for if you don't mind me asking?
[08:33:10] wasamasa: just another coding exercise
[08:33:39] wasamasa: the goal is to do optimization with constraints, the constraint being that the individual terms have a target sum
[08:33:47] elomatreb: You could probably superficially ruby-ize it by using ranges/upto instead of the loops, but that's largely a cosmetic change
[08:34:09] wasamasa: I'd really like to create as many nested loops as needed
[08:34:20] wasamasa: if I had macros, I could actually do codegen, but I don't
[08:34:30] wasamasa: so I'd hope clever use of enumerators could work
[08:34:30] elphe: has joined #ruby
[08:34:51] wasamasa: like, by writing an enumerator calling another enumerator with a helper argument
[08:39:23] ineb: wasamasa: whats the question? generate 4 dimensional vectors with maximum sum of 5?
[08:39:43] ineb: can be done with Matrix::Vector i think
[08:39:56] wasamasa: all possible ones with exactly that sum
[08:43:19] redlegion: has joined #ruby
[08:44:38] lxsameer: has joined #ruby
[08:46:29] wasamasa: but what I'm really looking for is generic code to create such sequences for any parameters
[08:47:58] wasamasa: 4 and 5 are just convenient ones for a hand-coded solution, anything larger than that becomes hard to test
[08:54:11] elphe: has joined #ruby
[08:55:08] ShekharReddy: has joined #ruby
[08:59:20] Asher: has joined #ruby
[09:01:13] dhollin3: has joined #ruby
[09:03:23] redlegion: has joined #ruby
[09:03:52] quobo: has joined #ruby
[09:05:22] beilabs: has joined #ruby
[09:07:31] ineb: wasamasa: yeah. reminds me of subset sum problem
[09:09:59] User458764: has joined #ruby
[09:13:49] elphe: has joined #ruby
[09:23:17] conta: has joined #ruby
[09:23:40] elphe: has joined #ruby
[09:28:47] d^sh: has joined #ruby
[09:32:05] wildermind: has joined #ruby
[09:37:27] beilabs: has joined #ruby
[09:42:51] beilabs: has joined #ruby
[09:45:09] InfinityFye: has joined #ruby
[09:45:24] elphe: has joined #ruby
[09:50:15] InfinityFye: has left #ruby: ("Leaving")
[09:55:14] elphe: has joined #ruby
[10:14:54] elphe: has joined #ruby
[10:19:46] lytol_: has joined #ruby
[10:22:57] unreal: has joined #ruby
[10:24:43] elphe: has joined #ruby
[10:26:04] amelliaa: has joined #ruby
[10:32:21] sarna: has joined #ruby
[10:37:28] FernandoBasso: has joined #ruby
[10:40:23] FernandoBasso: has joined #ruby
[10:44:36] elphe: has joined #ruby
[10:50:40] bak1an: has joined #ruby
[11:01:13] Zaab1t: has joined #ruby
[11:02:53] beilabs: has joined #ruby
[11:04:04] elphe: has joined #ruby
[11:11:40] ciro: has joined #ruby
[11:23:19] redlegion: has joined #ruby
[11:23:43] elphe: has joined #ruby
[11:25:10] johnny56: has joined #ruby
[11:27:46] eblip: has joined #ruby
[11:28:10] conta: has joined #ruby
[11:32:55] AJA4350: has joined #ruby
[11:38:57] FernandoBasso: has joined #ruby
[11:43:28] elphe: has joined #ruby
[11:52:36] beefjoe: has joined #ruby
[11:53:20] redlegion: has joined #ruby
[11:53:20] elphe: has joined #ruby
[11:53:25] Sylario: has joined #ruby
[12:03:10] elphe: has joined #ruby
[12:03:19] redlegion: has joined #ruby
[12:08:32] FernandoBasso: has joined #ruby
[12:23:20] redlegion: has joined #ruby
[12:32:43] elphe: has joined #ruby
[12:33:18] redlegion: has joined #ruby
[12:43:20] redlegion: has joined #ruby
[12:52:30] elphe: has joined #ruby
[12:53:19] redlegion: has joined #ruby
[13:02:18] elphe: has joined #ruby
[13:03:18] redlegion: has joined #ruby
[13:13:18] redlegion: has joined #ruby
[13:21:37] venmx: has joined #ruby
[13:23:18] redlegion: has joined #ruby
[13:25:57] _aeris_: has joined #ruby
[13:30:49] elphe: has joined #ruby
[13:33:16] redlegion: has joined #ruby
[13:35:05] ciro: has joined #ruby
[13:43:23] redlegion: has joined #ruby
[13:44:02] Exagone313: has joined #ruby
[13:50:29] elphe: has joined #ruby
[14:01:34] elphe: has joined #ruby
[14:05:44] argoneus: has joined #ruby
[14:17:02] GodFather: has joined #ruby
[14:21:12] argoneus: has joined #ruby
[14:26:18] FernandoBasso: has joined #ruby
[14:35:19] KeyJoo: has joined #ruby
[14:36:32] snickers: has joined #ruby
[14:37:42] cadillac_: has joined #ruby
[14:41:46] elphe: has joined #ruby
[14:42:25] mzo: has joined #ruby
[14:42:48] goez: has joined #ruby
[14:43:12] Vile`: has joined #ruby
[14:46:44] mikecmpbll: has joined #ruby
[14:55:41] beefjoe: has joined #ruby
[15:03:21] redlegion: has joined #ruby
[15:12:35] conta: has joined #ruby
[15:13:08] Emmanuel_Chanel: has joined #ruby
[15:14:40] elphe: has joined #ruby
[15:23:23] redlegion: has joined #ruby
[15:28:10] ciro: has joined #ruby
[15:33:19] redlegion: has joined #ruby
[15:34:20] elphe: has joined #ruby
[15:38:52] houhoulis: has joined #ruby
[15:44:59] leitz: has joined #ruby
[15:53:21] redlegion: has joined #ruby
[15:54:00] elphe: has joined #ruby
[15:54:49] leitz: Can I get some scathing critique on this? Building a new workstation and getting fresh git pulls on all the git repos I was tracking. https://gist.github.com/LeamHall/8bab03229ddd1c90e30889fad1762598
[15:56:13] leitz: I can spell 'OOP' but still trying to get it.
[16:03:16] redlegion: has joined #ruby
[16:03:17] elphe: has joined #ruby
[16:14:38] raynold: has joined #ruby
[16:16:55] akaiiro: has joined #ruby
[16:23:20] redlegion: has joined #ruby
[16:23:25] leitz: And storms push me off-line again. *sigh*
[16:23:38] leitz: has left #ruby: ()
[16:23:45] wasamasa: has left #ruby: ("Bye")
[16:24:15] elphe: has joined #ruby
[16:33:19] redlegion: has joined #ruby
[16:34:21] za1b1tsu: has joined #ruby
[16:37:43] User458764: has joined #ruby
[16:42:21] User458764: has joined #ruby
[16:43:20] redlegion: has joined #ruby
[16:43:42] beilabs: has joined #ruby
[16:43:53] elphe: has joined #ruby
[16:45:54] sepp2k: has joined #ruby
[16:53:18] redlegion: has joined #ruby
[16:53:44] elphe: has joined #ruby
[16:54:23] Nicmavr: has joined #ruby
[17:03:21] redlegion: has joined #ruby
[17:03:36] elphe: has joined #ruby
[17:04:42] havenwood: leafyleong: Is the `@start_dir` meant to be the directory this file is in or the working directory when it's called?
[17:04:46] havenwood: oops, wrong nick
[17:05:10] havenwood: Ah, right - storms.
[17:07:21] beefjoe: has joined #ruby
[17:13:26] elphe: has joined #ruby
[17:13:56] laceless_: has joined #ruby
[17:23:19] redlegion: has joined #ruby
[17:33:04] elphe: has joined #ruby
[17:34:36] beefjoe: has joined #ruby
[17:35:32] ByronJohnson: has joined #ruby
[17:42:54] elphe: has joined #ruby
[17:43:07] akaiiro: has joined #ruby
[17:43:22] redlegion: has joined #ruby
[17:44:44] scrptktty: has joined #ruby
[17:52:46] elphe: has joined #ruby
[17:53:21] redlegion: has joined #ruby
[18:03:23] redlegion: has joined #ruby
[18:04:53] dviola: has joined #ruby
[18:13:18] redlegion: has joined #ruby
[18:19:02] headius: has joined #ruby
[18:23:18] redlegion: has joined #ruby
[18:42:02] biberu: has joined #ruby
[18:43:20] redlegion: has joined #ruby
[18:46:13] siery: has joined #ruby
[18:51:00] bhaak: has joined #ruby
[18:53:00] beefjoe: has joined #ruby
[18:53:19] redlegion: has joined #ruby
[19:02:53] siery: Hey guys! I run into a bug in my game, particularly sprites that should be drawn on different z axis are drawn on the same. For now there are only two sprites in the game, Tiles and Items. Tile class apply the method 'create_sprite' witch simply creates a new sprite object with is is later used in the draw method. The create sprite method then contain only one line:
[19:03:03] siery: @sprite = Sprite.new(@x, @y, @tileset, @code, ZOrder::TILES)
[19:04:43] siery: The Item class derives from tiles an the only difference in create_sprite method is that last argument witch is set to `ZOrder::ITEMS`.
[19:08:02] siery: But when I invoke some Item object with `create_sprite`, it looks like it is using the method from the Tile class. Even when I tried to print something from `create_sprite` within the Tile class, nothing happens. So I assume I have some basic misunderstanding of how Ruby handles method overwriting.
[19:09:31] havenwood: siery: Can you share the code? We might be able to spot the issue.
[19:10:58] siery: havenwood: Sure, https://gitgud.io/siery/thief/tree/dev/lib.
[19:12:13] nicesignal: has joined #ruby
[19:13:20] redlegion: has joined #ruby
[19:14:09] siery: The current state is on the dev branch, which is exactly the one I share on the link. `item.rb` and `tile.rb` are respectively to the classes
[19:22:58] johnny56: has joined #ruby
[19:23:06] sarna: has joined #ruby
[19:26:37] FrostCandy: has joined #ruby
[19:29:59] \void: has joined #ruby
[19:33:18] banisterfiend: has joined #ruby
[19:36:00] siery: The obvious fix is to remove the `creat_sprite` method from Item class and define the z_order by the argument. But I really want to understand where is the problem.
[19:38:13] duderonomy: has joined #ruby
[19:41:54] sidntrivedi012[m: has left #ruby: ("User left")
[19:45:54] white_lilies: has joined #ruby
[19:46:52] mroutis: has joined #ruby
[19:50:24] elphe: has joined #ruby
[19:56:54] jp: has joined #ruby
[20:02:24] duderonomy: has joined #ruby
[20:03:29] Freshnuts: has joined #ruby
[20:08:08] johnny56: has joined #ruby
[20:09:14] Inline: has joined #ruby
[20:09:22] tdy: has joined #ruby
[20:10:07] elphe: has joined #ruby
[20:13:25] redlegion: has joined #ruby
[20:16:56] mim7: has joined #ruby
[20:23:21] redlegion: has joined #ruby
[20:25:39] bjag9: has joined #ruby
[20:29:46] elphe: has joined #ruby
[20:33:20] redlegion: has joined #ruby
[20:40:14] FernandoBasso: has joined #ruby
[20:43:19] redlegion: has joined #ruby
[20:49:27] elphe: has joined #ruby
[20:52:47] al2o3-cr: has joined #ruby
[20:59:16] elphe: has joined #ruby
[21:03:20] redlegion: has joined #ruby
[21:09:16] elphe: has joined #ruby
[21:11:22] kitikonti: has joined #ruby
[21:13:18] redlegion: has joined #ruby
[21:19:06] elphe: has joined #ruby
[21:23:22] redlegion: has joined #ruby
[21:28:56] elphe: has joined #ruby
[21:38:46] elphe: has joined #ruby
[21:49:04] c0ncealed2: has joined #ruby
[21:53:20] redlegion: has joined #ruby
[21:58:23] elphe: has joined #ruby
[21:59:02] ur5us: has joined #ruby
[22:08:16] elphe: has joined #ruby
[22:10:20] crankharder: has joined #ruby
[22:18:06] elphe: has joined #ruby
[22:29:05] beilabs: has joined #ruby
[22:36:37] tcurdt: has joined #ruby
[22:39:57] elphe: has joined #ruby
[22:40:20] bhaak: has joined #ruby
[22:43:21] redlegion: has joined #ruby
[22:47:25] parduse: has joined #ruby
[22:48:07] hgost: has joined #ruby
[22:48:45] r29v: has joined #ruby
[22:51:24] p4p0l0: has joined #ruby
[22:53:18] redlegion: has joined #ruby
[22:57:21] banisterfiend: has joined #ruby
[22:59:37] elphe: has joined #ruby
[23:03:20] redlegion: has joined #ruby
[23:06:26] r29v: has joined #ruby
[23:09:27] elphe: has joined #ruby
[23:19:17] elphe: has joined #ruby
[23:19:58] spider-mario: has joined #ruby
[23:22:25] mroutis: has joined #ruby
[23:29:13] elphe: has joined #ruby
[23:32:48] segy: has joined #ruby
[23:38:59] elphe: has joined #ruby
[23:43:20] redlegion: has joined #ruby
[23:48:46] elphe: has joined #ruby
[23:53:19] redlegion: has joined #ruby