« Back to channel list

#ruby - 25 May 2019

« Back 1 day Forward 1 day »
[00:02:50] havenwood: xco: if you create any new objects, they'll automatically be in the ObjectSpace
[00:03:39] havenwood: >> xco = Object.new; ObjectSpace.each_object.include? xco
[00:03:45] ruby[bot]: havenwood: I'm terribly sorry, I could not evaluate your code because of an error: NoMethodError:undefined method `[]' for nil:NilClass
[00:03:47] havenwood: &>> xco = Object.new; ObjectSpace.each_object.include? xco
[00:03:53] rubydoc: stderr: playpen: timeout triggered! (https://carc.in/#/r/6z15)
[00:06:23] govg: has joined #ruby
[00:08:32] orbyt_: has joined #ruby
[00:09:43] xco: havenwood: i’m not sure i understand your version
[00:10:19] AJA4350: has joined #ruby
[00:10:43] skryking: has joined #ruby
[00:10:51] xco: unless you’re referring to how the list can be dynamic depending on what objects are created in the object space?
[00:11:12] havenwood: xco: yeah, i just mean it automatically includes newly created objects
[00:11:40] xco: aaaah yeah got that long ago :) thank you :P
[00:23:33] orbyt_: has joined #ruby
[00:25:56] fphilipe_: has joined #ruby
[00:35:36] jenrzzz: has joined #ruby
[00:37:50] iNs: has joined #ruby
[00:46:55] yasumi2136_: has joined #ruby
[00:50:54] digitalnomad: has joined #ruby
[01:05:30] graft: has joined #ruby
[01:05:30] graft: has joined #ruby
[01:08:43] Swyper: has joined #ruby
[01:13:19] tdy: has joined #ruby
[01:24:49] xco: has joined #ruby
[01:26:34] demond: has joined #ruby
[01:26:39] demond: has left #ruby: ("++++++++++++++")
[01:27:28] vaios: has joined #ruby
[01:27:32] vaios: has left #ruby: ("++++++++++++++")
[01:30:51] Azure: has joined #ruby
[01:34:23] fphilipe_: has joined #ruby
[01:35:40] Swyper: has joined #ruby
[01:36:19] esp32_prog: has joined #ruby
[01:43:38] codefriar: has joined #ruby
[01:49:37] tdy: has joined #ruby
[01:54:51] codefriar: has joined #ruby
[02:02:07] duderonomy: has joined #ruby
[02:03:48] ellcs: has joined #ruby
[02:04:45] ellcs: has joined #ruby
[02:05:25] codefriar: has joined #ruby
[02:12:09] ramfjord: has joined #ruby
[02:13:47] Swyper: has joined #ruby
[02:15:51] codefriar: has joined #ruby
[02:17:14] Swyper: has joined #ruby
[02:19:43] Swyper: has joined #ruby
[02:22:20] xco: has joined #ruby
[02:23:01] apparition: has joined #ruby
[02:24:49] codefriar: has joined #ruby
[02:26:36] vulski: has joined #ruby
[02:34:57] laaron: has joined #ruby
[02:35:21] codefriar: has joined #ruby
[02:37:36] graft: has joined #ruby
[02:37:36] graft: has joined #ruby
[02:38:51] doodlebug: has joined #ruby
[02:39:18] laaron: has joined #ruby
[02:44:51] morn_d: has joined #ruby
[02:45:43] codefriar: has joined #ruby
[02:48:52] laaron: has joined #ruby
[03:01:24] codefriar: has joined #ruby
[03:04:57] fphilipe_: has joined #ruby
[03:10:18] braincrash: has joined #ruby
[03:12:24] codefriar: has joined #ruby
[03:23:59] codefriar: has joined #ruby
[03:24:34] esp32_prog: has joined #ruby
[03:36:34] codefriar: has joined #ruby
[03:44:46] laaron-: has joined #ruby
[03:44:54] Fusl: has joined #ruby
[04:14:06] fphilipe_: has joined #ruby
[04:19:43] rippa: has joined #ruby
[04:27:11] _whitelogger: has joined #ruby
[04:36:12] _whitelogger: has joined #ruby
[04:45:12] _whitelogger: has joined #ruby
[04:51:31] jenrzzz: has joined #ruby
[05:02:38] GodFather: has joined #ruby
[05:12:51] esp32_prog: has joined #ruby
[05:14:19] iNs: has joined #ruby
[05:16:48] fphilipe_: has joined #ruby
[05:19:15] Renich: has joined #ruby
[05:33:10] kyrylo: has joined #ruby
[05:39:10] sauvin: has joined #ruby
[05:48:52] deimos: has joined #ruby
[05:52:28] reber: has joined #ruby
[06:11:43] Dbugger: has joined #ruby
[06:15:21] fphilipe_: has joined #ruby
[06:19:45] kapilp: has joined #ruby
[06:27:11] _whitelogger: has joined #ruby
[06:51:45] jenrzzz: has joined #ruby
[06:52:26] apparition: has joined #ruby
[06:55:22] sameerynho: has joined #ruby
[07:01:05] esp32_prog: has joined #ruby
[07:01:59] laaron: has joined #ruby
[07:06:07] laaron: has joined #ruby
[07:23:43] ravenousmoose: has joined #ruby
[07:26:14] kyrylo: has joined #ruby
[07:42:42] mochiyoda_: has left #ruby: ("Konversation terminated!")
[07:45:27] esp32_prog: has joined #ruby
[07:50:54] tdy: has joined #ruby
[08:04:02] morn_d: has joined #ruby
[08:05:34] nowhere_man: has joined #ruby
[08:07:07] conta: has joined #ruby
[08:10:36] jenrzzz: has joined #ruby
[08:15:22] laaron: has joined #ruby
[08:36:23] laaron: has joined #ruby
[08:51:12] Ai9zO5AP: has joined #ruby
[08:57:53] conta: has joined #ruby
[09:06:47] antong: has joined #ruby
[09:11:03] ravenousmoose: has joined #ruby
[09:21:27] galeido: has joined #ruby
[09:24:07] apparition: has joined #ruby
[09:40:05] r3m: has joined #ruby
[09:42:52] banisterfiend: has joined #ruby
[09:43:42] r3m: has joined #ruby
[09:47:38] r3m: has joined #ruby
[09:49:08] fphilipe_: has joined #ruby
[09:52:00] deepredsky: has joined #ruby
[09:53:40] esp32_prog: has joined #ruby
[09:54:53] u0_a113: has joined #ruby
[09:56:02] u0_a113: how i change width on it?
[09:58:52] ellcs: has joined #ruby
[09:59:54] ellcs: has joined #ruby
[10:00:49] xco: has joined #ruby
[10:03:37] u0_a113: has left #ruby: ("WeeChat 2.0.1")
[10:33:52] antong: has joined #ruby
[10:44:26] antong: has joined #ruby
[10:48:08] nowhere_man: has joined #ruby
[10:51:28] morn_d: has joined #ruby
[11:06:24] Fernando-Basso: has joined #ruby
[11:09:37] doodleb25: has joined #ruby
[11:21:11] kyrylo: has joined #ruby
[11:24:13] AJA4350: has joined #ruby
[11:27:41] fphilipe_: has joined #ruby
[11:32:54] doodlebug: has joined #ruby
[11:36:52] gix: has joined #ruby
[11:39:48] Hanmac: has joined #ruby
[11:41:51] deepredsky: has joined #ruby
[11:41:54] esp32_prog: has joined #ruby
[11:42:41] laaron-: has joined #ruby
[11:45:35] troulouliou_div2: has joined #ruby
[11:47:57] tdy: has joined #ruby
[11:59:30] jenrzzz: has joined #ruby
[12:00:27] sh7d: has joined #ruby
[12:06:55] fphilipe_: has joined #ruby
[12:24:40] jdawgaz: has joined #ruby
[12:28:32] AJA4351: has joined #ruby
[12:32:54] Swyper: has joined #ruby
[12:33:58] jdawgaz: has joined #ruby
[12:43:25] jdawgaz: has joined #ruby
[12:47:23] yasumi2136: has joined #ruby
[12:50:35] fphilipe_: has joined #ruby
[12:53:07] nowhere_man: has joined #ruby
[13:02:21] jenrzzz: has joined #ruby
[13:15:38] Fernando-Basso: has joined #ruby
[13:17:24] jenrzzz: has joined #ruby
[13:24:46] laaron: has joined #ruby
[13:25:36] fphilipe_: has joined #ruby
[13:25:36] tdy: has joined #ruby
[13:28:16] haxx0r: has joined #ruby
[13:30:10] esp32_prog: has joined #ruby
[13:36:09] AJA4351: has joined #ruby
[13:36:39] jenrzzz: has joined #ruby
[13:42:47] AJA4350: has joined #ruby
[13:53:47] jenrzzz: has joined #ruby
[14:08:16] jenrzzz: has joined #ruby
[14:20:49] jenrzzz: has joined #ruby
[14:24:04] kyrylo: has joined #ruby
[14:31:12] salerace: has joined #ruby
[14:32:21] nowhere_man: has joined #ruby
[14:33:58] nopolitica: has joined #ruby
[14:41:09] lele: has joined #ruby
[14:51:36] banisterfiend: has joined #ruby
[14:52:37] jenrzzz: has joined #ruby
[14:56:31] AJA4350: has joined #ruby
[15:02:23] Wolland: has joined #ruby
[15:09:04] jenrzzz: has joined #ruby
[15:11:43] haxx0r36: has joined #ruby
[15:16:52] laaron: has joined #ruby
[15:16:55] yxhuvud: has joined #ruby
[15:18:25] esp32_prog: has joined #ruby
[15:18:42] jenrzzz: has joined #ruby
[15:29:37] jenrzzz: has joined #ruby
[15:34:10] haxx0r: has joined #ruby
[15:35:33] tdy: has joined #ruby
[15:39:15] jenrzzz: has joined #ruby
[15:40:23] octos: has joined #ruby
[15:44:08] ua: has joined #ruby
[15:44:52] ricekrispie2: has joined #ruby
[15:47:06] laaron: has joined #ruby
[15:53:35] donofrio_: has joined #ruby
[15:54:47] jenrzzz: has joined #ruby
[15:55:41] c0dec: has joined #ruby
[15:56:14] Renich: has joined #ruby
[15:56:28] donofrio: has joined #ruby
[15:57:29] donofrio: has joined #ruby
[15:58:48] cd: has joined #ruby
[15:59:28] DTZUZU2: has joined #ruby
[16:00:27] Caerus: has joined #ruby
[16:09:45] graft: has joined #ruby
[16:09:45] graft: has joined #ruby
[16:15:23] Renich: has joined #ruby
[16:17:17] netz: has joined #ruby
[16:17:43] facest: has joined #ruby
[16:17:50] BuildTheRobots: has joined #ruby
[16:18:20] tdy1: has joined #ruby
[16:19:12] agent_white: has joined #ruby
[16:19:12] agent_white: has joined #ruby
[16:19:13] agent_white: has joined #ruby
[16:21:03] altious2: has joined #ruby
[16:21:23] reber_: has joined #ruby
[16:23:16] jenrzzz: has joined #ruby
[16:24:42] xco_: has joined #ruby
[16:25:56] fphilipe_: has joined #ruby
[16:35:28] jenrzzz: has joined #ruby
[16:39:32] doodlebug: has joined #ruby
[16:41:23] houhoulis: has joined #ruby
[16:46:35] jenrzzz: has joined #ruby
[16:55:13] houhoulis: has joined #ruby
[16:56:37] Swyper: has joined #ruby
[16:56:39] phenom: has joined #ruby
[17:01:48] phenom: has joined #ruby
[17:02:59] graft: has joined #ruby
[17:02:59] graft: has joined #ruby
[17:04:40] jenrzzz: has joined #ruby
[17:06:41] esp32_prog: has joined #ruby
[17:11:59] jenrzzz: has joined #ruby
[17:12:46] AJA4350: has joined #ruby
[17:15:04] agent_white: has joined #ruby
[17:16:12] jonian: has joined #ruby
[17:24:25] jenrzzz: has joined #ruby
[17:28:41] kyrylo: has joined #ruby
[17:30:26] Aloy: has joined #ruby
[17:36:22] doodleb97: has joined #ruby
[17:49:05] jenrzzz: has joined #ruby
[17:50:50] troulouliou_div2: has joined #ruby
[18:04:07] jenrzzz: has joined #ruby
[18:08:28] haxx0r: has joined #ruby
[18:16:25] exmortus: has joined #ruby
[18:17:38] jenrzzz: has joined #ruby
[18:27:15] fphilipe_: has joined #ruby
[18:28:24] govg: has joined #ruby
[18:33:16] jenrzzz: has joined #ruby
[18:40:00] troulouliou_div2: has joined #ruby
[18:42:24] doodlebug: has joined #ruby
[18:42:30] Hanmac: has joined #ruby
[18:52:34] gix: has joined #ruby
[18:54:56] esp32_prog: has joined #ruby
[18:57:51] houhoulis: has joined #ruby
[19:16:25] graft: has joined #ruby
[19:20:33] phaul: has joined #ruby
[19:22:51] tdy1: has joined #ruby
[19:50:43] jenrzzz: has joined #ruby
[19:51:00] kyrylo_: has joined #ruby
[19:58:02] ravenx: has joined #ruby
[20:00:47] troydm: has joined #ruby
[20:01:10] troydm: hey all! can I use guard clauses on assignment statements?
[20:01:23] troydm: like some thing: var = 'value' if true
[20:01:24] Swyper: has joined #ruby
[20:02:10] troydm: phaul: so assignment won't occur if guard is false
[20:02:13] troydm: or it will ?
[20:02:32] phaul: it will not, the local variable will be defined but will be nil
[20:02:43] troydm: phaul: okey ic, thx
[20:03:01] phaul: so it does more than not being there at all, which is pretty confusing
[20:03:35] phaul: &>> a = 13 if false; a
[20:03:37] rubydoc: # => nil (https://carc.in/#/r/6z8z)
[20:03:43] rubydoc: stderr: -e:2:in `<main>': undefined local variable or method `a' for main:Object (NameError) (https://carc.in/#/r/6z90)
[20:06:21] comet23: has joined #ruby
[20:06:53] comet23: hello everyone
[20:07:03] phaul: hi comet23
[20:07:28] comet23: is there a way to know if my algorithm is O(N) or O(N^2)
[20:07:45] comet23: like is there an app or something that will tell me?
[20:08:05] phaul: I would bet there isn't.
[20:08:29] comet23: do you know js?
[20:09:01] comet23: i could translate the code to ruby probably
[20:09:09] comet23: but here's what i wrote
[20:09:09] comet23: https://repl.it/repls/AngryLinearTrace
[20:12:25] doodleb72: has joined #ruby
[20:13:04] fphilipe_: has joined #ruby
[20:13:30] phaul: it's probably O(n (log n)) depending on how hash lookup is implemented.
[20:14:06] phaul: you can do it in O(n) if you really want to by not doing hash lookup but indexing an array
[20:14:27] comet23: i'm trying to learn algorithms now and i'm having a hard time understanding how the code will be implemented
[20:16:11] phaul: sorry I have to ask. Did you write this code or are you trying to understand it while you got it from somewhere else? You say how it will be implemented, but it already is...
[20:16:40] phaul: I can tell you what I think it does if that helps..
[20:20:49] phaul: 1.) creates a hash that maps chars of string 1. to the number of occurrences of the chars in string 1. 2.) does the same for string 2. walks the map of string 1, checking the for each count in string 1 if it matches the other map with that character. Ie checking if the strings have the same count of a given char.
[20:23:37] comet23: yes, phaul i wrote that code
[20:24:05] comet23: there is a solution that is shorter than mine and it says that's O(N) and I was wondering if my solution was O(N) and why/why not
[20:24:06] laaron: has joined #ruby
[20:24:11] phaul: I think you can argue it's actually O(n)
[20:25:06] phaul: given the argument that the character set is limited, so there exists some constant that is greater than the stepps spent in hash lookup
[20:25:48] phaul: (in other words the hashes can only grow to a certain maxium size and after that they don't go anymore)
[20:26:10] comet23: so O(N) means hashes can only grow to a certain maximum size?
[20:27:39] phaul: O(n) means that there exists some c0,c1 constants that the number of steps required by your code is < c0 + c1 * n where n is the length of the strings
[20:27:46] govg: has joined #ruby
[20:28:06] comet23: i have more learning to do, thank you for telling me that i'm on the right track at least
[20:28:20] comet23: that's somewhat reassuring... i'm gonna go practice more!
[20:28:22] phaul: it just means that if you increase your input sizes than the run time will increase with it propotionally
[20:28:32] Swyper: has joined #ruby
[20:28:49] phaul: as opposed to like exponentially
[20:28:49] weird_error: has joined #ruby
[20:29:16] comet23: i wish there was something that could test that and tell you what kind of algorithm you wrote
[20:29:18] phaul: O n just means n times bigger input -> roughly n times more time required
[20:31:21] phaul: comet23: there is a pretty unfortunate theorem, that proves that a computer program cannot decide of an other computer program in finite time if it finishes or not...
[20:31:46] phaul: called the halting problem
[20:34:03] dviola: has joined #ruby
[20:34:39] fphilipe_: has joined #ruby
[20:36:05] schne1der: has joined #ruby
[20:36:28] doodlebug: has joined #ruby
[20:41:39] mniip: has joined #ruby
[20:43:16] esp32_prog: has joined #ruby
[21:01:42] Xeago_: has joined #ruby
[21:05:29] fphilipe_: has joined #ruby
[21:07:24] Swyper: has joined #ruby
[21:07:40] hightower2: has joined #ruby
[21:15:04] paprika: has joined #ruby
[21:17:49] hightower2: has joined #ruby
[21:19:45] ruby-lang027: has joined #ruby
[21:20:23] morn_d: has joined #ruby
[21:20:38] morn_d: has left #ruby: ()
[21:21:51] Swyper: has joined #ruby
[21:25:42] Swyper: has joined #ruby
[21:26:43] paprika: has joined #ruby
[21:29:41] paprika: hi, curious i read godot is looking to support haxe lang, i was wondering since there is a ruby to haxe compiler could we (though in round about way) use ruby with godot engine once they support haxe
[21:37:37] paprika: has joined #ruby
[21:45:15] leitz: has joined #ruby
[21:57:31] Swyper: has joined #ruby
[22:22:39] yasumi2136: has joined #ruby
[22:22:57] Swyper: has joined #ruby
[22:29:22] Swyper: has joined #ruby
[22:31:29] esp32_prog: has joined #ruby
[22:33:30] Swyper: has joined #ruby
[22:36:59] fphilipe_: has joined #ruby
[22:46:44] weird_error: has joined #ruby
[22:57:02] dviola: has joined #ruby
[23:01:34] xco: has joined #ruby
[23:03:57] fphilipe: has joined #ruby
[23:07:18] galaxie_: has joined #ruby
[23:12:56] AJA4351: has joined #ruby
[23:19:00] armyriad: has joined #ruby
[23:24:58] matti: has joined #ruby
[23:24:58] matti: has joined #ruby
[23:28:45] Swyper: has joined #ruby
[23:34:25] laaron: has joined #ruby
[23:39:04] Swyper: has joined #ruby
[23:42:02] bambanx: has joined #ruby
[23:42:47] morozovm: has joined #ruby
[23:45:54] bambanx: has joined #ruby
[23:46:56] Swyper: has joined #ruby
[23:49:24] Swyper: has joined #ruby
[23:54:27] teeigeryuh: has joined #ruby
[23:59:13] orbyt_: has joined #ruby