« Back to channel list

#ruby - 07 December 2017

« Back 1 day Forward 1 day »
[00:04:04] mtkd: has joined #ruby
[00:05:33] Tagami[m]: has joined #ruby
[00:05:38] Exhiled: has joined #ruby
[00:08:13] milardovich: has joined #ruby
[00:13:28] Exhiled: has joined #ruby
[00:13:49] blackmesa1: has joined #ruby
[00:14:17] ramfjord: has joined #ruby
[00:15:17] kinbiko: has joined #ruby
[00:20:07] ramfjord: has joined #ruby
[00:21:55] s3nd1v0g1us: has joined #ruby
[00:26:28] kinbiko: has joined #ruby
[00:28:50] despai: has joined #ruby
[00:31:07] charliesome: has joined #ruby
[00:31:41] aviraldg: has joined #ruby
[00:31:41] lasenna[m]: has joined #ruby
[00:31:41] Giphy[m]: has joined #ruby
[00:31:41] Hanma[m]: has joined #ruby
[00:31:42] watzon: has joined #ruby
[00:31:42] yana[m]: has joined #ruby
[00:31:42] astronavt[m]: has joined #ruby
[00:31:42] torarne: has joined #ruby
[00:31:42] M107262[m]: has joined #ruby
[00:31:42] jonjits[m]: has joined #ruby
[00:31:42] erciccione_[m]: has joined #ruby
[00:31:42] dtcristo: has joined #ruby
[00:31:42] turt2live: has joined #ruby
[00:31:43] haylon: has joined #ruby
[00:31:43] velu_aon[m]: has joined #ruby
[00:31:43] dman[m]: has joined #ruby
[00:31:43] KevinMGranger: has joined #ruby
[00:31:49] gokul_mr[m]: has joined #ruby
[00:31:49] kua[m]: has joined #ruby
[00:31:49] itmerc[m]: has joined #ruby
[00:31:49] zalipuha[m]: has joined #ruby
[00:31:50] Matt[m]2: has joined #ruby
[00:31:51] aagdbl[m]: has joined #ruby
[00:32:23] mim1k: has joined #ruby
[00:35:28] kinbiko: has joined #ruby
[00:39:55] urk187: has joined #ruby
[00:42:09] urk187: has joined #ruby
[00:42:28] milardovich: has joined #ruby
[00:43:23] pilne: has joined #ruby
[00:49:13] kinbiko: has joined #ruby
[00:49:51] Guest20429: has joined #ruby
[00:58:12] kinbiko: has joined #ruby
[00:59:46] mcr1: has joined #ruby
[01:02:41] orbyt_: has joined #ruby
[01:03:40] mynameisdebian: If I am iterating over a hash using "Hash.each do |x|", is there a way I can get the key value of each x?
[01:08:39] workmad3: has joined #ruby
[01:13:16] elomatreb: mynameisdebian: If you're doing that x will be an array of the form [key, value], so you should already have it
[01:13:59] elomatreb: Alternatively you can use destructuring to separate them, ".each do |key, value|"
[01:16:15] tcopeland: has joined #ruby
[01:17:14] quobo: has joined #ruby
[01:19:23] jxv: has joined #ruby
[01:26:38] baweaver: It yields two arguments into the block
[01:26:48] baweaver: so it's not destructuring per-se
[01:26:52] despai: has joined #ruby
[01:26:57] baweaver: {a: 1}.each{|x| p x }
[01:27:00] baweaver: > {a: 1}.each{|x| p x }
[01:27:05] baweaver: >> {a: 1}.each{|x| p x }
[01:27:07] ruby[bot]: baweaver: # => [:a, 1] ...check link for more (https://eval.in/913805)
[01:27:32] baweaver: either that or it's syntactic sugar destructuring
[01:27:37] havenwood: mynameisdebian: Or if you *just* want the keys: {}.keys
[01:27:41] baweaver: probably that. Honestly haven't thought about it much.
[01:28:26] rhyselsmore: has joined #ruby
[01:29:33] elomatreb: baweaver: If it yielded two arguments, wouldn't just having one block paramter silently ignore the second?
[01:29:48] baweaver: hence the later correction
[01:30:09] elomatreb: oh, right. sorry
[01:30:32] baweaver: Na, not a problem :P
[01:34:52] csk157: has joined #ruby
[01:35:08] hutch34: has joined #ruby
[01:36:54] DTZUZO: has joined #ruby
[01:40:18] himself: has joined #ruby
[01:40:28] himself: has left #ruby: ("AndroIRC")
[01:42:26] go|dfish: has joined #ruby
[01:47:05] r0nin: has joined #ruby
[01:55:26] iMadper: has joined #ruby
[01:55:45] hutch34: has joined #ruby
[01:56:30] nofxx: has joined #ruby
[02:01:29] chouhoulis: has joined #ruby
[02:03:49] hutch34: has joined #ruby
[02:04:09] houhoulis: has joined #ruby
[02:06:50] pastorinni: has joined #ruby
[02:09:47] jxv: has joined #ruby
[02:13:28] Barrt: has joined #ruby
[02:20:45] kitsunenokenja: has joined #ruby
[02:29:03] uZiel: has joined #ruby
[02:31:23] hutch34: has joined #ruby
[02:32:52] mim1k: has joined #ruby
[02:32:52] cdg: has joined #ruby
[02:35:14] lunarkitty7: has joined #ruby
[02:35:31] gizmore|2: has joined #ruby
[02:43:12] despai: has joined #ruby
[02:44:37] Barrt: has joined #ruby
[02:44:44] doublemalt_: has joined #ruby
[02:45:16] cadillac_: has joined #ruby
[02:52:00] d^sh: has joined #ruby
[02:52:02] hutch34: has joined #ruby
[02:52:02] despai: has joined #ruby
[02:53:36] mohabaks: has joined #ruby
[02:56:51] DmitryBochkarev: has joined #ruby
[02:57:27] jxv: has joined #ruby
[03:00:02] hays: has joined #ruby
[03:00:02] hays: has joined #ruby
[03:00:18] cadillac_: has joined #ruby
[03:04:51] sspreitz: has joined #ruby
[03:05:16] jxv: has joined #ruby
[03:05:20] hutch34: has joined #ruby
[03:06:15] agent_white: has joined #ruby
[03:08:33] workmad3: has joined #ruby
[03:08:46] cschneid: has joined #ruby
[03:09:26] mtkd: has joined #ruby
[03:11:01] hutch34: has joined #ruby
[03:11:44] pskosinski_: has joined #ruby
[03:16:59] Vashy: has joined #ruby
[03:21:55] Kero: has joined #ruby
[03:24:02] jenrzzz: has joined #ruby
[03:24:02] jenrzzz: has joined #ruby
[03:27:50] jxv: has joined #ruby
[03:28:47] bmurt: has joined #ruby
[03:30:21] brixen: has joined #ruby
[03:30:30] pastorinni: has joined #ruby
[03:31:48] csk157: has joined #ruby
[03:34:48] brian_penguin: has joined #ruby
[03:36:40] pastorin_: has joined #ruby
[03:38:03] DrCode: has joined #ruby
[03:39:42] DmitryBochkarev: has joined #ruby
[03:40:54] \13k: has joined #ruby
[03:41:46] sindork: has joined #ruby
[03:42:35] cdg: has joined #ruby
[03:42:56] cschneid: has joined #ruby
[03:43:21] brixen: has joined #ruby
[03:44:10] cschneid: has joined #ruby
[03:44:37] _aeris_: has joined #ruby
[03:44:51] jnollette: has joined #ruby
[03:45:07] mohabaks: has joined #ruby
[03:46:21] govg: has joined #ruby
[03:46:29] guardianx: has joined #ruby
[03:48:24] mson: has joined #ruby
[03:58:07] orbyt_: has joined #ruby
[04:05:13] gs: has joined #ruby
[04:07:08] cagomez: has joined #ruby
[04:13:28] enterprisey: has joined #ruby
[04:15:44] hutch34: has joined #ruby
[04:18:25] hahuang65: has joined #ruby
[04:21:37] Jameser: has joined #ruby
[04:22:02] evie_hammond: has joined #ruby
[04:24:24] \13k: has joined #ruby
[04:29:23] shoogz: has joined #ruby
[04:29:54] shoogz: has joined #ruby
[04:30:24] plexigras: has joined #ruby
[04:30:28] shoogz: has joined #ruby
[04:31:02] shoogz: has joined #ruby
[04:31:23] eckhardt: has joined #ruby
[04:31:38] shoogz: has joined #ruby
[04:32:11] shoogz: has joined #ruby
[04:33:00] cdg: has joined #ruby
[04:33:15] mim1k: has joined #ruby
[04:33:48] nofxx: has joined #ruby
[04:33:53] gix: has joined #ruby
[04:34:16] urk187: has joined #ruby
[04:46:19] jamesaxl: has joined #ruby
[04:50:18] milardovich: has joined #ruby
[04:52:29] r0nin: has joined #ruby
[04:52:43] rhebz916: has joined #ruby
[04:56:47] baweaver: I still think range should do something like this: def range(a, b) a <= b ? a..b : (a..b).reverse end
[04:56:56] baweaver: (Range doesn't have reverse, mind)
[04:56:56] hutch34: has joined #ruby
[05:03:49] baweaver: >> def range(a,b) a<=b ? a..b : (b..a).reverse_each end; range(10, 1).to_a
[05:03:51] ruby[bot]: baweaver: # => [10, 9, 8, 7, 6, 5, 4, 3, 2, 1] (https://eval.in/913906)
[05:04:05] baweaver: though then you get back one half Enumerator one half Range
[05:04:21] baweaver: ah, that was hours ago wasn't it dminuoso
[05:08:15] uZiel: has joined #ruby
[05:08:30] csk157: has joined #ruby
[05:09:01] workmad3: has joined #ruby
[05:11:29] ShekharReddy: has joined #ruby
[05:14:21] mtkd: has joined #ruby
[05:18:10] jenrzzz: has joined #ruby
[05:20:22] charliesome: has joined #ruby
[05:23:05] r0nin: has joined #ruby
[05:28:40] mim1k: has joined #ruby
[05:29:05] DTZUZO: has joined #ruby
[05:29:51] ramfjord: has joined #ruby
[05:37:10] chouhoulis: has joined #ruby
[05:44:41] dminuoso: That depends on which observer you are asking, baweaver.
[05:45:18] aupadhye: has joined #ruby
[05:46:13] r0nin: has joined #ruby
[05:48:55] houhoulis: has joined #ruby
[05:53:59] iamarun: has joined #ruby
[05:54:37] r0nin: has joined #ruby
[05:56:07] KeyJoo: has joined #ruby
[05:57:26] guardianx: has joined #ruby
[06:04:58] Gucciferal: has joined #ruby
[06:10:18] Kero: has joined #ruby
[06:13:40] lexruee: has joined #ruby
[06:13:48] ledestin: has joined #ruby
[06:19:43] hutch34: has joined #ruby
[06:20:23] LocaMocha: has joined #ruby
[06:20:28] reber: has joined #ruby
[06:24:40] LocaMocha: has joined #ruby
[06:25:13] r0nin: has joined #ruby
[06:36:46] csk157: has joined #ruby
[06:38:35] cschneid: has joined #ruby
[06:41:55] tAn: has joined #ruby
[06:46:03] DmitryBochkarev: has joined #ruby
[06:49:36] r0nin: has joined #ruby
[06:54:43] milardovich: has joined #ruby
[07:03:16] Technodrome: has joined #ruby
[07:05:14] r0nin: has joined #ruby
[07:06:14] dionysus69: has joined #ruby
[07:06:49] adaedra: has joined #ruby
[07:07:41] href: has joined #ruby
[07:09:24] workmad3: has joined #ruby
[07:09:34] guardianx: has joined #ruby
[07:10:18] `derpy: has joined #ruby
[07:14:16] _aeris_: has joined #ruby
[07:14:55] RahulT: has joined #ruby
[07:18:06] andikr: has joined #ruby
[07:18:46] r0nin: has joined #ruby
[07:20:28] b0mbnet: has joined #ruby
[07:22:31] avelldiroll: has joined #ruby
[07:24:32] tAn: has joined #ruby
[07:26:00] r0nin: has joined #ruby
[07:32:44] alex``: has joined #ruby
[07:34:28] BioSpider: has joined #ruby
[07:37:27] wilhelm1: has joined #ruby
[07:38:55] stoffus: has joined #ruby
[07:40:31] r0nin: has joined #ruby
[07:41:28] wilhelm1: has joined #ruby
[07:41:32] conta: has joined #ruby
[07:43:13] apeiros: has joined #ruby
[07:43:37] Xiti: has joined #ruby
[07:45:08] peirama: has joined #ruby
[07:45:55] RickHull: has left #ruby: ()
[07:46:02] ramfjord: has joined #ruby
[07:48:11] zautomata: has joined #ruby
[07:50:53] jnollette: has joined #ruby
[07:51:07] Dimik: has joined #ruby
[07:51:44] peirama: has joined #ruby
[07:52:31] Guest90: has joined #ruby
[07:54:07] r0nin: has joined #ruby
[07:54:40] anaeem1: has joined #ruby
[07:54:54] anas: has joined #ruby
[07:55:20] bkxd: has joined #ruby
[07:59:06] Technodrome: has joined #ruby
[08:02:19] TomyWork: has joined #ruby
[08:07:42] cschneid: has joined #ruby
[08:10:04] rhyselsmore: has joined #ruby
[08:10:21] r0nin: has joined #ruby
[08:11:52] Beams: has joined #ruby
[08:11:59] Rr4sT: has joined #ruby
[08:13:32] bkxd_: has joined #ruby
[08:15:13] jenrzzz: has joined #ruby
[08:15:14] jenrzzz: has joined #ruby
[08:16:44] sepp2k: has joined #ruby
[08:18:09] InfinityFye: has joined #ruby
[08:18:11] biberu: has joined #ruby
[08:18:16] jnollette: has joined #ruby
[08:19:33] r0nin: has joined #ruby
[08:19:39] aufi: has joined #ruby
[08:21:28] _aeris_: has joined #ruby
[08:22:00] dreamthese: has joined #ruby
[08:22:56] RahulT: has joined #ruby
[08:30:03] mark_66: has joined #ruby
[08:30:15] csk157: has joined #ruby
[08:30:39] bkxd: has joined #ruby
[08:31:30] miskatonic: has joined #ruby
[08:31:54] b0mbnet: has joined #ruby
[08:32:11] speakingcode: has joined #ruby
[08:33:21] shoogz: has joined #ruby
[08:33:46] r0nin: has joined #ruby
[08:33:54] shoogz: has joined #ruby
[08:34:29] shoogz: has joined #ruby
[08:35:03] shoogz: has joined #ruby
[08:35:05] guille-moe: has joined #ruby
[08:35:07] zautomata: has joined #ruby
[08:35:41] shoogz: has joined #ruby
[08:35:47] urk187: has joined #ruby
[08:36:15] shoogz: has joined #ruby
[08:36:16] hutch34: has joined #ruby
[08:37:27] claudiuinberlin: has joined #ruby
[08:39:54] jaruga: has joined #ruby
[08:41:25] InfinityFye: has left #ruby: ("Leaving")
[08:41:56] kies: has joined #ruby
[08:42:36] r0nin: has joined #ruby
[08:48:42] cdg: has joined #ruby
[08:49:40] marr: has joined #ruby
[08:53:05] Kero: has joined #ruby
[08:53:52] QualityAddict: has joined #ruby
[08:58:25] r0nin: has joined #ruby
[09:00:17] iamarun: has joined #ruby
[09:02:22] iamarun_: has joined #ruby
[09:05:46] guille-moe: has joined #ruby
[09:05:50] anisha: has joined #ruby
[09:05:51] bkxd: has joined #ruby
[09:07:28] n13z: has joined #ruby
[09:09:15] burgestrand: has joined #ruby
[09:09:54] workmad3: has joined #ruby
[09:13:17] r0nin: has joined #ruby
[09:14:42] tAn: has joined #ruby
[09:17:23] hutch34: has joined #ruby
[09:17:58] bkxd: has joined #ruby
[09:22:11] drowze: has joined #ruby
[09:22:19] mikecmpbll: has joined #ruby
[09:22:38] ShalokShalom_: has joined #ruby
[09:22:47] r0nin: has joined #ruby
[09:22:53] n13z: has joined #ruby
[09:28:38] bkxd: has joined #ruby
[09:30:41] tao_: has joined #ruby
[09:31:38] tomphp: has joined #ruby
[09:31:44] r0nin: has joined #ruby
[09:33:30] anisha: has joined #ruby
[09:35:09] ShalokShalom__: has joined #ruby
[09:35:43] tvw: has joined #ruby
[09:36:44] csk157: has joined #ruby
[09:37:34] anisha: has joined #ruby
[09:37:46] milardovich: has joined #ruby
[09:38:33] bkxd: has joined #ruby
[09:40:05] biox: has joined #ruby
[09:40:21] r0nin: has joined #ruby
[09:42:25] sindork: has joined #ruby
[09:44:36] aufi: has joined #ruby
[09:45:23] implose: has joined #ruby
[09:45:49] mim1k: has joined #ruby
[09:46:11] ramfjord: has joined #ruby
[09:46:13] drowze: has joined #ruby
[09:48:38] cgfbee: has joined #ruby
[09:49:38] anisha: has joined #ruby
[09:50:38] maattdd_: has joined #ruby
[09:52:17] r0nin: has joined #ruby
[09:57:31] srandon111: has joined #ruby
[09:57:41] srandon111: is it just me or people on perl is very unfriendly ?
[09:57:46] bkxd: has joined #ruby
[10:01:23] apeiros: no idea, I'm not on #perl. and honestly, I think the politeness of people in #perl is not really a topic for #ruby. feel free to discuss it in #ruby-offtopic
[10:02:12] dviola: has joined #ruby
[10:04:36] r0nin: has joined #ruby
[10:05:56] bkxd_: has joined #ruby
[10:06:01] blackmesa1: has joined #ruby
[10:07:16] tomphp: has joined #ruby
[10:11:24] mtkd: has joined #ruby
[10:14:06] blackmesa1: has joined #ruby
[10:15:31] srandon111: hello guys!!
[10:16:07] r0nin: has joined #ruby
[10:16:32] jnollette: has joined #ruby
[10:17:17] qba73: has joined #ruby
[10:19:22] hutch34: has joined #ruby
[10:20:26] ldnunes: has joined #ruby
[10:20:41] Serpent7776: has joined #ruby
[10:23:48] r0nin: has joined #ruby
[10:24:36] Fraeon: has joined #ruby
[10:26:24] lexruee: has joined #ruby
[10:28:02] n13z: has joined #ruby
[10:29:36] tomphp: has joined #ruby
[10:35:59] mohabaks: has left #ruby: ("WeeChat 1.9")
[10:36:47] urk187: has joined #ruby
[10:39:05] r0nin: has joined #ruby
[10:40:08] gs: has joined #ruby
[10:40:17] rhyselsmore: has joined #ruby
[10:46:49] anisha: has joined #ruby
[10:49:58] bkxd: has joined #ruby
[10:50:00] tomphp: has joined #ruby
[10:51:23] nofxx: has joined #ruby
[10:51:34] faces: has joined #ruby
[10:53:41] r0nin: has joined #ruby
[10:53:44] kinbiko: has joined #ruby
[10:55:26] blackmesa1: has joined #ruby
[10:56:01] nofxx: has joined #ruby
[10:56:40] leitao: has joined #ruby
[11:00:27] AJA4350: has joined #ruby
[11:00:40] FahmeF: has joined #ruby
[11:01:29] Strepsils: has joined #ruby
[11:03:59] nofxx: has joined #ruby
[11:04:38] r0nin: has joined #ruby
[11:08:48] workmad3: has joined #ruby
[11:09:09] apparition: has joined #ruby
[11:10:26] faces: has joined #ruby
[11:12:45] Quentinius: has joined #ruby
[11:15:01] enterprisey: has joined #ruby
[11:16:22] Nahra: has joined #ruby
[11:17:21] r0nin: has joined #ruby
[11:19:02] badeball: has joined #ruby
[11:21:18] charliesome: has joined #ruby
[11:22:52] endemic: has joined #ruby
[11:25:06] tjbp: has joined #ruby
[11:25:44] DrCode: has joined #ruby
[11:25:51] milardovich: has joined #ruby
[11:26:30] qba73: has joined #ruby
[11:26:44] ledestin: has joined #ruby
[11:27:48] vtx: has joined #ruby
[11:28:13] vtx: hi guys, has anyone here set up sinatra endpoints over https?
[11:29:53] ruby[bot]: Don't ask to ask. Just ask your question, and if anybody can help, they will likely try to do so.
[11:30:16] r0nin: has joined #ruby
[11:30:31] dminuoso: vtx: There's various methods. The easiest would be to handle TLS termination in front of sinatra.
[11:31:26] vtx: dminuoso: is it possible to add support for https entirely within my app code?
[11:31:42] vtx: i guess i should explain my setup
[11:31:54] Zimsky: has joined #ruby
[11:32:12] apeiros: has joined #ruby
[11:35:41] csk157: has joined #ruby
[11:37:25] yeticry: has joined #ruby
[11:40:30] thinkpad: has joined #ruby
[11:40:54] endemic: has joined #ruby
[11:43:00] r0nin: has joined #ruby
[11:46:23] ramfjord: has joined #ruby
[11:49:12] tvw: has joined #ruby
[11:51:03] skweek: has joined #ruby
[11:54:04] vtx: i have a react app that is deployed in docker, to marathon. the react app by default runs over https. i also have a sinatra app that is deployed to the same marathon instance. because sinatra is by default running over http, when the https react app requests data from its endpoints, the request fails because sinatra isnt running over https. the workaround right now, is to explicitly specify http when accessing the react app. but i guess i need to have the sinatra app
[11:54:04] vtx: serve over https if possible
[11:54:22] kinbiko: has joined #ruby
[11:54:39] aupadhye: has joined #ruby
[11:55:32] quobo: has joined #ruby
[11:55:53] yokel: has joined #ruby
[12:00:06] r0nin: has joined #ruby
[12:01:26] qba73: has joined #ruby
[12:01:30] Psybur: has joined #ruby
[12:04:18] Psybur_: has joined #ruby
[12:04:57] TinkerTyper: has joined #ruby
[12:07:27] FahmeF: has joined #ruby
[12:09:29] cdg: has joined #ruby
[12:10:06] kinbiko: has joined #ruby
[12:10:57] r0nin: has joined #ruby
[12:17:47] WhereIsMySpoon_: has joined #ruby
[12:17:59] WhereIsMySpoon_: How do I specify a space using character literals?
[12:18:04] WhereIsMySpoon_: or is it not possible?
[12:18:20] dminuoso: WhereIsMySpoon_: You mean with ? ?
[12:18:50] dminuoso: Let me check the lexer
[12:19:00] WhereIsMySpoon_: alright :) thanks
[12:19:48] ruby[bot]: dminuoso: I have disassembled your code, the result is at https://eval.in/914443
[12:19:49] ruby[bot]: dminuoso: I have parsed your code, the result is at https://eval.in/914444
[12:21:51] WhereIsMySpoon_: dminuoso: is that giving me the answer? Or is that just for you
[12:23:37] r0nin: has joined #ruby
[12:25:31] zapata: has joined #ruby
[12:25:46] dminuoso: WhereIsMySpoon_: Looking at the lexer I don't think it's possible.
[12:26:02] shinnya: has joined #ruby
[12:26:07] dminuoso: But this code is convoluted as heck.
[12:26:26] cschneid: has joined #ruby
[12:27:23] tobiasvl: should be possible to do ?" " just like :"symbol with space"
[12:28:02] WhereIsMySpoon_: that seems kinda pointless
[12:28:06] WhereIsMySpoon_: just use ‘ ‘ then
[12:28:07] dminuoso: tobiasvl: No.
[12:29:11] FahmeF: has joined #ruby
[12:29:20] dminuoso: WhereIsMySpoon_: `?\ `
[12:29:32] dminuoso: Yeah well. You asked for it!
[12:29:45] WhereIsMySpoon_: always love dropping in here :)
[12:29:52] ruby[bot]: dminuoso: # => "(" (https://eval.in/914447)
[12:29:54] ruby[bot]: dminuoso: # => (NilClass) ...check link for more (https://eval.in/914448)
[12:30:02] dminuoso: That looks wrong..
[12:30:11] dminuoso: >> (?\ ).inspect
[12:30:12] ruby[bot]: dminuoso: # => "\" \"" (https://eval.in/914449)
[12:30:15] dminuoso: There we go.
[12:30:32] WhereIsMySpoon_: so i could do (?\ ) ?
[12:30:34] dminuoso: WhereIsMySpoon_: Thank you too, learned something new about Ruby myself there. :)
[12:30:42] dminuoso: WhereIsMySpoon_: Yes.
[12:30:50] WhereIsMySpoon_: not sure if i want to do that or just ‘ '
[12:31:00] WhereIsMySpoon_: ive been using ? everywhere else
[12:31:03] dminuoso: Is your goal to create fun looking code, or readable code?
[12:31:13] WhereIsMySpoon_: im doing a hack day
[12:31:15] dminuoso: You have your answer then.
[12:31:36] apeiros: dminuoso: I think the bot strips your input, hence `>> ?\ ` not working
[12:31:38] WhereIsMySpoon_: im writing Sokoban in ruby
[12:32:03] dminuoso: apeiros: Ah, probably some .rstrip ?
[12:32:15] apeiros: >> % \x20 .inspect # should be fun too
[12:32:16] ruby[bot]: apeiros: # => "\" \"" (https://eval.in/914456)
[12:32:30] apeiros: dminuoso: I think just plain .strip
[12:32:42] dminuoso: What is that?
[12:32:54] dminuoso: asm>> % \x20 .inspect\
[12:32:55] ruby[bot]: dminuoso: I have disassembled your code, the result is at https://eval.in/914458
[12:32:55] dminuoso: asm>> % \x20 .inspect
[12:32:55] apeiros: what is what?
[12:32:56] ruby[bot]: dminuoso: I have disassembled your code, the result is at https://eval.in/914459
[12:33:05] apeiros: % string litreal
[12:33:08] r0nin: has joined #ruby
[12:33:10] apeiros: with space as delimiter
[12:33:38] apeiros: though if you want to go for obscure, I think octal instead of hex is nicer
[12:33:45] dminuoso: That's almost as obscure as rubys flip flop.
[12:33:57] WhereIsMySpoon_: dminuoso: flip flop?
[12:34:02] apeiros: >> % \40 == " " # should be fun too
[12:34:03] ruby[bot]: apeiros: # => true (https://eval.in/914460)
[12:34:13] dminuoso: WhereIsMySpoon_: Yes.. it's a feature only very few actually know about
[12:34:14] apeiros: WhereIsMySpoon_: if a .. b
[12:34:31] apeiros: and no, that's not a range :)
[12:34:34] WhereIsMySpoon_: and whats that do?
[12:34:42] apeiros: it flips until it flops
[12:34:49] rouge: has joined #ruby
[12:35:13] dminuoso: >> (1..10).map { |x| x if x.even? .. x.odd? }
[12:35:14] ruby[bot]: dminuoso: # => [nil, 2, 3, 4, 5, 6, 7, 8, 9, 10] (https://eval.in/914461)
[12:35:28] dminuoso: >> (1..10).each { |x| puts x if x.even? .. x.odd? }
[12:35:29] ruby[bot]: dminuoso: # => 2 ...check link for more (https://eval.in/914462)
[12:35:30] apeiros: if I remember correctly, it evaluates to true when the left expression evaluates true, and remains true until the right evaluates as true (or as false)
[12:35:37] dminuoso: >> (1..10).each { |x| print x if x.even? .. x.odd? }
[12:35:44] ruby[bot]: dminuoso: # => 23456789101..10 (https://eval.in/914463)
[12:35:46] apeiros: it's a stateful expression iirc
[12:35:48] dminuoso: apeiros: Yup
[12:35:52] csk157: has joined #ruby
[12:36:09] apeiros: so the .even? / .odd? might not be the best example, since they switch on every iteration
[12:36:09] dminuoso: Oh my example was just bad
[12:36:24] dminuoso: >> (1..10).each { |x| print x if x < 3 .. x > 5 }
[12:36:25] ruby[bot]: dminuoso: # => 1234561..10 (https://eval.in/914464)
[12:36:31] apeiros: and just in case it was not clear yet:
[12:36:32] RougeT430: any recommendations on a linux distro for a relative linux newb
[12:36:34] apeiros: DO NOT USE FLIPFLOPS
[12:36:42] dminuoso: Ah well. Never used them :P
[12:36:43] RougeT430: going to be used for development primarily
[12:36:45] WhereIsMySpoon_: i still dont get it
[12:36:58] WhereIsMySpoon_: RougeT430: mint is good
[12:37:06] apeiros: WhereIsMySpoon_: don't worry. takes a bit until the coin falls. it's expected.
[12:37:09] WhereIsMySpoon_: though not quite the right channel for this :)
[12:37:12] dminuoso: WhereIsMySpoon_: https://eval.in/914465
[12:37:14] apeiros: WhereIsMySpoon_: also google might yield better examples.
[12:37:19] dminuoso: This example is ruthlessly stolen from some website.
[12:37:24] RougeT430: WhereIsMySpoon_, ive been looking at mint. its what i run as a VM currently
[12:37:37] RougeT430: been looking at CentOS
[12:37:40] shoogz: has joined #ruby
[12:37:46] RougeT430: and openSUSE
[12:37:49] WhereIsMySpoon_: http://nithinbekal.com/posts/ruby-flip-flop/
[12:38:05] WhereIsMySpoon_: RougeT430: i like Arch, but it isnt for beginners
[12:38:10] RougeT430: no it isnt haha
[12:38:17] shoogz: has joined #ruby
[12:38:27] RougeT430: i can run around linux, but this will be my first time using it as a primary os
[12:38:28] dminuoso: WhereIsMySpoon_: It's like in C you can ask even the most expert C programmers any C related question, but the one detail you can get anyone, is how this program has undefined behavior: https://gist.github.com/dminuoso/954131cbed7c038e70482174b96a3a15
[12:38:41] RougeT430: im taking a programming course and i really need to make the leap
[12:38:53] shoogz: has joined #ruby
[12:39:28] shoogz: has joined #ruby
[12:39:34] dminuoso: (And I added a neat little trap to catch you off guard in there)
[12:39:44] apeiros: I think my explanation was wrong… https://eval.in/914469
[12:39:59] dminuoso: apeiros: ^- can you catch the undefined behavior in this?
[12:40:03] shoogz: has joined #ruby
[12:40:39] shoogz: has joined #ruby
[12:41:53] WhereIsMySpoon_: dont you need argv* in main?
[12:43:05] dminuoso: WhereIsMySpoon_: Strictly speaking no. That is actually the trap door: Technically it should either be int main(void) or int main(int argc, char *argv[]) but the standard allows for "equivalent" (which is a fancy way of saying: anything is permissable)
[12:43:23] Tempesta: has joined #ruby
[12:43:58] dminuoso: WhereIsMySpoon_: The detail lies in a little known fact that the C standard declares a translation unit that does not end in a newline to result in undefined behavior.
[12:44:51] Tempesta: has joined #ruby
[12:45:49] dminuoso: This is defined as per 5.1.1.2p1.2
[12:46:02] dminuoso: [...]A source file that is not empty shall end in a new-line character, which shall not be immediately preceded by a backslash character before any such splicing takes place.
[12:46:27] WhereIsMySpoon_: i imagine most compilers dont adhere strictly to that though
[12:47:51] dminuoso: WhereIsMySpoon_: What do you mean?
[12:47:55] aupadhye: has joined #ruby
[12:48:03] dminuoso: WhereIsMySpoon_: The standard places no requirement on the implementation to deal with that.
[12:48:25] WhereIsMySpoon_: whast the int argc for/
[12:48:51] dminuoso: WhereIsMySpoon_: To know how many arguments are being passed in argv
[12:49:25] WhereIsMySpoon_: ive done very little c
[12:49:26] r0nin: has joined #ruby
[12:49:30] WhereIsMySpoon_: really only uC based C
[12:49:38] dminuoso: WhereIsMySpoon_: But with Ruby there's lots of fancy gotchas.
[12:49:52] WhereIsMySpoon_: as with a lot of scripting languages :P
[12:50:33] Tempesta: has joined #ruby
[12:50:46] dminuoso: WhereIsMySpoon_: https://gist.github.com/dminuoso/e3ebba6466c84ce3e724fb4677902714
[12:51:00] dminuoso: Dont run it, just do it in your head. :p
[12:51:55] WhereIsMySpoon_: dminuoso: does ruby do truthy/falsy?
[12:52:29] WhereIsMySpoon_: im betting on no error, but it doesnt print 10 either
[12:52:44] dminuoso: WhereIsMySpoon_: Yes but more sanely. In ruby by definition nil and false are falsey, *everything* else is truthy.
[12:53:23] WhereIsMySpoon_: does the background initialisation of f get leaked?
[12:53:24] dminuoso: WhereIsMySpoon_: Now remove the line two.
[12:53:37] DTZUZO: has joined #ruby
[12:53:57] halt: has joined #ruby
[12:54:08] dminuoso: WhereIsMySpoon_: The problem has to do with the fact that you can define variables with the same name as methods
[12:54:20] dminuoso: >> gets = "123"; puts gets
[12:54:21] ruby[bot]: dminuoso: # => 123 ...check link for more (https://eval.in/914485)
[12:54:30] WhereIsMySpoon_: if i change that to f = ‘’, puts f still prints nil
[12:54:42] qba73: has joined #ruby
[12:55:10] dminuoso: WhereIsMySpoon_: Now.. lets make this even crazier.
[12:55:17] WhereIsMySpoon_: why does puts f print nil?
[12:55:20] WhereIsMySpoon_: i dont get it :p
[12:55:24] dminuoso: WhereIsMySpoon_: You know about `gets` right?
[12:55:51] dminuoso: Or lets do this simpler.
[12:55:52] WhereIsMySpoon_: gets gets all lines from an input right?
[12:56:08] WhereIsMySpoon_: and returns them as an iterable thing
[12:56:33] nadir: has joined #ruby
[12:56:41] dminuoso: WhereIsMySpoon_: https://gist.github.com/dminuoso/e3ebba6466c84ce3e724fb4677902714 this is clear right?
[12:57:55] mson: has joined #ruby
[12:58:25] dminuoso: WhereIsMySpoon_: Now what about when you reload? Ruby needs some way obviously to figure out on the call `puts m` whether m is a variable or method. The way Ruby does it, before the parser even sees the code the lexer scans your file. Once it sees an assignment "a = ..." it then considers `a` to be a variable until the end of the scope.
[12:59:07] dminuoso: But lexically. Thas some some really bizarre implications like in this example:
[12:59:09] dminuoso: >> puts a if (a = 10)
[12:59:10] ruby[bot]: dminuoso: # => /tmp/execpad-da340f60d909/source-da340f60d909:2: warning: found = in conditional, should be == ...check link for more (https://eval.in/914497)
[12:59:29] dminuoso: Bah. Run this in your irb, ruby[bot] is masking the desired output with a warning
[13:00:06] r0nin: has joined #ruby
[13:00:08] dminuoso: So because lexically the assignment happens _after_ `puts a`, at the time of `puts a` a is considered to be a method (which obviously does not exist). Any code that follows would consider `a` to be a variable.
[13:00:22] dminuoso: WhereIsMySpoon_: and the reason you saw nil, is because variables have to exist inside the entire method..
[13:00:25] WhereIsMySpoon_: dminuoso: irb has the same complaint
[13:00:37] dminuoso: WhereIsMySpoon_: Yeah but if you look afterwards, you see the NoMethodError
[13:00:40] WhereIsMySpoon_: did you mean == 10?
[13:00:47] dminuoso: I meant an assignment.
[13:00:51] WhereIsMySpoon_: NameError: undefined local variable or method `a' for main:Object
[13:00:56] dminuoso: You'd think it executes the assignment first, and then print it.
[13:01:04] dminuoso: Next level of crazyness:
[13:01:21] WhereIsMySpoon_: that previous exmaple
[13:01:27] WhereIsMySpoon_: i expected it to print 10
[13:01:30] WhereIsMySpoon_: not to print nil as well
[13:01:41] dminuoso: WhereIsMySpoon_: I was just about to cover that.
[13:01:47] dminuoso: But to do that, Ill have to do one more crazy.
[13:01:59] WhereIsMySpoon_: okay :P fire away
[13:02:05] dminuoso: WhereIsMySpoon_: So ruby has a method (dont ever use it) to dynamically get a variable right
[13:02:58] dminuoso: WhereIsMySpoon_: https://eval.in/914501
[13:03:20] dminuoso: (Dont think too much about how this works, just accept that it does in fact grab the local variable named "foo")
[13:03:30] WhereIsMySpoon_: some sort of reflection based thing
[13:03:45] WhereIsMySpoon_: i do java in my day job :)
[13:03:50] dminuoso: So now if we dont define "foo" you get this error obviously: https://eval.in/914502
[13:03:54] dminuoso: Everything should be clear so far.
[13:04:28] dminuoso: WhereIsMySpoon_: https://eval.in/914504 so this is where the magic happens.
[13:04:44] dminuoso: WhereIsMySpoon_: The moment ruby sees any assignment to "foo" anywhere inside the body, it creates a local variable named "foo" and initializes it to nil.
[13:04:49] dminuoso: Even if that assignment is in dead code.
[13:04:58] dminuoso: Which was the case in my `if nil` code
[13:05:02] WhereIsMySpoon_: is ruby lifting foo?
[13:05:08] WhereIsMySpoon_: like js lifts variables?
[13:05:10] dminuoso: Yeah. Or "hoisting"
[13:05:16] dminuoso: WhereIsMySpoon_: with `var` yes.
[13:05:36] dminuoso: WhereIsMySpoon_: So the only trick is, ruby does two things if it sees an assignment to "foo"
[13:05:46] dminuoso: WhereIsMySpoon_: a) it creates a local variable and hoists it.. BUT...
[13:06:16] tjbp: has joined #ruby
[13:06:16] dminuoso: only any code that lexically (that means literally to the right side and below it) knows that "foo" refers to a local variable
[13:06:45] dminuoso: The default behavior is to assume that "foo" is a method, unless ruby has seen an assignment to it (lexically before)
[13:07:04] dminuoso: Which can be shown in this case:
[13:07:09] DoubleMalt: has joined #ruby
[13:07:57] dminuoso: Actually its even more disgusting..
[13:08:02] dminuoso: https://eval.in/914512
[13:08:49] dminuoso: WhereIsMySpoon_: https://eval.in/914516
[13:08:51] dminuoso: there we go.
[13:09:18] dminuoso: WhereIsMySpoon_: So like I said, ruby specifically looks for an assignment in the style of "a = ..." to consider `a` a local variable in lexically code afterwards.
[13:09:26] FahmeF: has joined #ruby
[13:09:29] Bish: why does that yield something different as if done with foo =?
[13:09:29] dminuoso: you could still get it with reflection
[13:09:47] WhereIsMySpoon_: so back to https://gist.github.com/dminuoso/e3ebba6466c84ce3e724fb4677902714
[13:09:52] dminuoso: Bish: I give you some code, and you tell me something about it okay?
[13:09:58] dminuoso: Bish: foo(); is foo a method or a variable?
[13:10:12] Bish: can be both.
[13:10:17] burgestrand: foo = method(:foo)
[13:10:31] Bish: eh? that's what i meant, didnt i?
[13:10:35] dminuoso: Bish: in that case foo is assumed to be a method because you have explicitly provided parens. ruby will not consider a local variable foo.
[13:10:37] guille-moe: has joined #ruby
[13:10:57] WhereIsMySpoon_: dminuoso: i still dont understand why it returns 10 and nil
[13:11:18] dminuoso: WhereIsMySpoon_: it *prints* 10, but returns nil because the return of magic is nil.
[13:11:48] WhereIsMySpoon_: puts returns nil?
[13:11:52] dminuoso: WhereIsMySpoon_: Yeah.
[13:11:59] WhereIsMySpoon_: this seems fairly logical to me
[13:12:09] dminuoso: WhereIsMySpoon_: That code is straight forward yeah.
[13:12:26] r0nin: has joined #ruby
[13:12:29] dminuoso: Bish: What about: `a = foo`. Is foo considered a variable or a method?
[13:12:35] dminuoso: Bish: And hint: It is *not* determined at runtime.
[13:12:37] WhereIsMySpoon_: so why does https://eval.in/914516 print the text
[13:12:38] dminuoso: It's determined at compiletime.
[13:12:56] WhereIsMySpoon_: is it because foo wasnt defined before, so it doesnt set it?
[13:13:04] Bish: so local vars are methods? or what is the goal of this?
[13:13:04] DmitryBochkarev: has joined #ruby
[13:13:05] dminuoso: WhereIsMySpoon_: well it was defined.. but not using =
[13:13:08] dminuoso: Bish: Nope.
[13:13:26] Bish: so how is foo = 3 different from setting it by bindung?
[13:13:39] Bish: because at compiletime he knows about that local var by seeing foo = x
[13:13:46] dminuoso: Bish: the lexer specifically looks for things like "a = ..." to consider a a variable.
[13:13:57] milardovich: has joined #ruby
[13:13:58] dminuoso: It happens before compilation, heck before parsing even.
[13:14:39] dminuoso: Bish: and the meaning of `a` to be a variable is scoped to lexically after the assignment
[13:14:49] dminuoso: which is why `puts a if (a = 10)` will throw.
[13:16:08] rabajaj: has joined #ruby
[13:16:29] mtkd: has joined #ruby
[13:17:54] Bish: it does? didn't even know
[13:18:44] WhereIsMySpoon_: dminuoso: this is awesome :P
[13:19:17] WhereIsMySpoon_: and by awesome i mean horrifying
[13:20:03] gs: has joined #ruby
[13:21:03] apeiros: uh dminuoso, you can't create new variables in an existing binding
[13:21:24] apeiros: I mean you can, but they'll only be visible through Binding#instance_variable_get or eval'ing with that binding object.
[13:21:45] apeiros: (which is why pry/irb are bad tools to reason about that)
[13:22:05] dminuoso: apeiros: Ahh right, and I should even know why.
[13:22:15] dminuoso: I kind of hinted at it already.
[13:22:26] dminuoso: the lvar table is generated at compile time... so...
[13:22:43] r0nin: has joined #ruby
[13:22:51] apeiros: honestly, the way it's handled in ruby is IMO terrible
[13:23:07] apeiros: local_variable_set should raise for non-existing variables. and Binding.new should accept a hash
[13:23:58] apeiros: in order to use it with Binding#eval for e.g. template engines.
[13:25:07] dminuoso: apeiros: I dislike template engines in Ruby.
[13:25:10] WhereIsMySpoon_: doing when (?\) when casing on a character doesnt seem to be valid syntax
[13:25:12] dminuoso: They all feel quicky.
[13:25:25] WhereIsMySpoon_: that was the problem
[13:25:41] dminuoso: quirky. not quicky
[13:26:27] dminuoso: apeiros: The more I think about it, the only reason I still use ruby is because technical debts.
[13:26:34] apeiros: dminuoso: how so? also do you have examples of template engines you like?
[13:26:44] apeiros: dminuoso: :<
[13:27:07] WhereIsMySpoon_: i like the conciseness of ruby
[13:27:22] rahul_bajaj: has joined #ruby
[13:27:32] DTZUZO: has joined #ruby
[13:28:39] bmurt: has joined #ruby
[13:29:22] dminuoso: apeiros: JSX is the first that felt had the right abstraction, but the reason is partially related to the fact that its syntax sugar around a native builder pattern.
[13:29:36] mcr1: has joined #ruby
[13:29:39] dminuoso: Things like jbuilder are a good start
[13:29:48] miskatonic: i dislike template engines period
[13:30:05] apeiros: dminuoso: ruby's jbuilder?
[13:30:25] dminuoso: apeiros: Yeah. Its a bit wieldy to use, but in ruby land its the right direction
[13:30:40] apeiros: IMO those aren't template engines. those are structure builders. which can work great for stuff which actually has a rigid structure.
[13:30:53] apeiros: but are pointless for things like emails or pdf
[13:31:02] csk157: has joined #ruby
[13:31:20] Ouchy: has joined #ruby
[13:31:24] Ouchy`w: has joined #ruby
[13:31:33] dminuoso: apeiros: Fair enough, I have no experience in document generation.
[13:32:07] miskatonic: latex is best for document generation
[13:32:20] dminuoso: apeiros: The reason that JSX feels like a good approach is because it gives the feeling of a template engine, but the power of everything being pure code.
[13:32:21] apeiros: I concur with structure builders being a good idea to build structures. avoids a lot of the "whoops typo now my stuff is invalid crap"
[13:32:55] apeiros: and lets be clear - humans are crap at writing well formed documents
[13:33:02] jeffreylevesque: has joined #ruby
[13:33:02] apeiros: (well formed as in xml terminology)
[13:33:34] dminuoso: apeiros: It's near impossible for me to generate invalid markup with JSX :)
[13:33:51] dminuoso: Though I think it might let me do things like `<foo>` which are strictly speaking invalid..
[13:34:27] apeiros: I remember how I was happy about xhtml being touted relentless wrt parser errors and how all the crappy devs have been whining "but what about my invalid markup?!?". but well, it was short-lived. now we have html5 which is even worse in that regard.
[13:34:36] apeiros: (worse than html4)
[13:34:43] dminuoso: How is HTML5 worse?
[13:34:54] apeiros: it's not xml, it's not sgml.
[13:35:10] apeiros: it's some random definition of what's valid and what's not.
[13:35:15] dminuoso: apeiros: I suppose the rationale is "people write invalid code anyway..."
[13:35:44] apeiros: yes. it even includes a canonical sanitation recipe for common invalid code.
[13:35:56] r0nin: has joined #ruby
[13:36:11] apeiros: an html5 compliant parser is expected to recover from invalid code in a prescribed way.
[13:36:11] dminuoso: apeiros: The thing I dislike most is the way < /> is done in HTML5.
[13:36:32] apeiros: you mean that it's impossible to tell whether a tag is supposed to have content?
[13:36:37] dminuoso: Like... on void elements its valid but meaningless, on non-void elements its invalid, and on foreign elements it depends on what the foreign language does.
[13:36:37] apeiros: yeah, same
[13:36:54] apeiros: you need a list with content-bearing tags to know that they're not self-closed.
[13:37:05] dminuoso: apeiros: JSX handles this the sensible way for me.
[13:37:11] WhereIsMySpoon_: dminuoso: I agree wholeheartedly there
[13:37:15] dminuoso: If I do <div/> it will do the right thing.
[13:37:35] WhereIsMySpoon_: in html that is
[13:37:45] veeti: has joined #ruby
[13:38:07] dminuoso: apeiros: And I learned this the hardway. I once had an actual <div id="reactContainer" /><div id="anotherContainer" /> ..
[13:38:13] dminuoso: whenever React mounted, the other div disappeared..
[13:38:29] dminuoso: Best thing is, Browsers dont give you diagnostics in the console either that your markup could be broken.
[13:38:59] apeiros: dminuoso: https://facebook.github.io/jsx/ - that's the jsx you're talking about, right?
[13:39:07] dminuoso: apeiros: Yeah.
[13:40:15] apeiros: the idea I liked most about xhtml was that you could add other namespaces and still have proper validation. that's the part I like about xml too.
[13:40:30] dminuoso: apeiros: There's 2 great things about it. You can nest interpolation and use JSX in code anywhere.
[13:40:49] milardovich: has joined #ruby
[13:41:01] apeiros: you don't need to change the xhtml spec in order to add e.g. canvas or svg or mathml. just define a namespace. add it. done. parsers are all compliant and can handle it.
[13:41:07] dminuoso: So something like <div>{arr.map((e) => <span>{e}</span>)}</div> is legit (its readable if you split this on 5 lines)
[13:43:00] dminuoso: apeiros: https://gist.github.com/dminuoso/f1ee5a165f5bbb6c20ea4c2aee3e6c74 instead of inserting JS into HTML/XML, the opposite was done.
[13:43:31] jeffreylevesque_: has joined #ruby
[13:44:00] dminuoso: And the reason this is nice, is because it lets you compose the construction into functions easily.
[13:44:06] dminuoso: Something you just cant do with slim/haml/erb
[13:44:26] dminuoso: And also variables dont magically just appear.
[13:44:33] dminuoso: (angular, hint)
[13:44:44] dminuoso: Its just pure JS code
[13:45:43] dminuoso: Which means you dont have to "learn the engine". You just learn how interpolation works, and realize that you're writing pure JS code.
[13:50:44] r0nin: has joined #ruby
[13:52:27] alex``: has joined #ruby
[13:54:28] dminuoso: apeiros: const icon = <i className="fa fa-some-icon" />; return <div>Hello {icon} User</div>; this stuff makes any slim user jealous. =P
[13:55:00] dminuoso: How many times have I wished I could just do `a = render 'blah'` in rails
[13:55:57] apeiros: what does it do when icon == '</invalid>'?
[13:56:54] r0nin_: has joined #ruby
[13:57:11] dminuoso: apeiros: it doesn't compare. <div /> is desugared into React.createElement('div')
[13:57:18] dminuoso: And <Foo /> into React.createElement(Foo)
[13:57:29] dminuoso: (Which is why this is actually just JS code)
[13:58:12] dminuoso: And that function call returns a simple object that kind of looks like { type: 'div' } or { type: 'Foo' }
[14:01:08] apeiros: not sure you actually answered my question :)
[14:01:22] dminuoso: apeiros: I dont understand your question then.
[14:01:25] apeiros: can you in general use {} to interpolate strings or does that use separate syntax?
[14:01:26] qba73: has joined #ruby
[14:01:39] dminuoso: {} interpolates any valid javascript expression.
[14:01:47] apeiros: then my question stands
[14:01:59] dminuoso: I still dont understand the question then.
[14:02:06] apeiros: what happens when you interpolate a string which would turn your template invalid
[14:02:17] dminuoso: A string is just a string..
[14:02:22] dminuoso: Mmm. Let me show you
[14:02:39] cdg: has joined #ruby
[14:02:40] apeiros: so they didn't learn from others mistakes then. sad.
[14:02:46] jeffreylevesque_: has joined #ruby
[14:03:02] dminuoso: apeiros: No you misunderstand.
[14:03:13] dminuoso: apeiros: You cant create invalid HTML.
[14:03:24] dminuoso: If you interpolate a string, then it will escape that string and display it.
[14:03:26] apeiros: then you explained wrong
[14:03:33] apeiros: because as per your explanation, one could.
[14:03:40] dminuoso: As per what line?
[14:03:57] apeiros: icon = '</invalid>'; return <div>Hello {icon} User</div>; -- what would that evaluate to?
[14:04:45] dminuoso: apeiros: It would produce some opague object that when rendered gives the following HTML fragment: <div>Hello &lt;/invalid&gt;</div>
[14:05:13] apeiros: ok, so it treats html fragments differently from strings.
[14:05:30] dminuoso: apeiros: Yes, though there are mechanisms to inject strings as html should you ever want that.
[14:05:44] dminuoso: I dont see it very often
[14:06:02] dminuoso: But not inside JSX.
[14:06:21] WhereIsMySpoon_: if I have a class, can I not just do after its closing ‘end’, MyClass.new to run it?
[14:06:35] WhereIsMySpoon_: then assign it, run methods on it
[14:06:49] dminuoso: WhereIsMySpoon_: You dont "run" classes.
[14:07:06] dminuoso: WhereIsMySpoon_: A class is basically just a template, and "new" instructs ruby to build a new object from that template.
[14:07:12] WhereIsMySpoon_: yea, sorry wrong words
[14:07:14] millerti: has joined #ruby
[14:07:26] bmurt: has joined #ruby
[14:07:32] WhereIsMySpoon_: i meant can i just do myClass = MyClass.new; myClass.doStuff after its closing end
[14:07:35] WhereIsMySpoon_: and just run that file
[14:07:44] dminuoso: WhereIsMySpoon_: ?tias
[14:07:48] dminuoso: ?tias WhereIsMySpoon_
[14:07:48] ruby[bot]: WhereIsMySpoon_: Why don't you try it and see for yourself?
[14:07:55] WhereIsMySpoon_: sokoban/sokoban.rb:19:in `[]': wrong number of arguments (given 0, expected 1..2) (ArgumentError)
[14:08:13] dminuoso: WhereIsMySpoon_: What do you make of the error message without looking at your code.
[14:08:28] WhereIsMySpoon_: well im not giving it arguments it expects, but i dont have any constructor detailed
[14:08:32] blackmesa1: has joined #ruby
[14:08:35] WhereIsMySpoon_: so id expect a 0 arg constructor
[14:08:40] dminuoso: WhereIsMySpoon_: Hold on! What method is being called?
[14:08:53] dminuoso: What method is it choking on particular
[14:09:04] WhereIsMySpoon_: oh, on the method call after new
[14:09:11] dminuoso: WhereIsMySpoon_: Specifically?
[14:09:18] dminuoso: WhereIsMySpoon_: The message tells you.
[14:09:26] WhereIsMySpoon_: sokoban = Sokoban.new
[14:09:33] dminuoso: WhereIsMySpoon_: Nope.
[14:09:36] dminuoso: WhereIsMySpoon_: Look at the error message.
[14:09:42] dminuoso: WhereIsMySpoon_: Dont look at your code.
[14:09:46] dminuoso: WhereIsMySpoon_: This reads:
[14:09:51] WhereIsMySpoon_: i didnt paste the whole thing sorry
[14:09:52] WhereIsMySpoon_: sokoban/sokoban.rb:19:in `[]': wrong number of arguments (given 0, expected 1..2) (ArgumentError)
[14:09:53] WhereIsMySpoon_: from sokoban/sokoban.rb:19:in `startup'
[14:09:54] WhereIsMySpoon_: from sokoban/sokoban.rb:11:in `play'
[14:09:55] WhereIsMySpoon_: from sokoban/sokoban.rb:114:in `<main>'
[14:10:25] dminuoso: WhereIsMySpoon_: An exception "ArgumentError" was thrown In file: sokoban/sokoban.rb, at line: 19, in the call of the method '[]' the following went wrong: wrong number of arguments (given 0, expected 1..2)
[14:10:30] dminuoso: WhereIsMySpoon_: That is how you should read this.
[14:10:36] WhereIsMySpoon_: oh i see, right of course sorry
[14:10:53] WhereIsMySpoon_: i just did @map_state = [][] and assumed a 2d array constructor was like that without looking it up :P
[14:11:17] dminuoso: WhereIsMySpoon_: So you just have to know that [] is a method call (you could also write .[]())
[14:11:34] dminuoso: Likewise a[1] is a method call passing one argument: you could also write .[](1)
[14:11:43] apeiros: ruby doesn't have 2d arrays ;-) (but you can nest arrays arbitrarily deep since an array is just fine as an array-element)
[14:11:47] dminuoso: a[1,2] is a method call passing two arguments, you could also write .[](1,2) :-)
[14:13:06] dminuoso: WhereIsMySpoon_: Lesson being: Carefully read your error messages, they are usually very helpful. :)
[14:14:20] dminuoso: WhereIsMySpoon_: So in this case you ended up creating an array with [], and then immediately calling the [] method on it.
[14:14:34] dminuoso: >> puts [10,20,30][1]
[14:14:35] ruby[bot]: dminuoso: # => 20 ...check link for more (https://eval.in/914657)
[14:14:36] jeffreylevesque: has joined #ruby
[14:14:42] dminuoso: >> puts [10,20,30][]
[14:14:43] ruby[bot]: dminuoso: # => wrong number of arguments (given 0, expected 1..2) (ArgumentError) ...check link for more (https://eval.in/914658)
[14:14:48] dminuoso: >> puts [][]
[14:14:49] ruby[bot]: dminuoso: # => wrong number of arguments (given 0, expected 1..2) (ArgumentError) ...check link for more (https://eval.in/914660)
[14:14:54] dminuoso: If that makes sense.
[14:18:56] WhereIsMySpoon_: im gonna use matrix instead
[14:21:36] despai: has joined #ruby
[14:24:41] jeffreylevesque_: has joined #ruby
[14:25:06] bmurt: has joined #ruby
[14:26:56] cschneid: has joined #ruby
[14:33:12] JasonCL: has joined #ruby
[14:35:51] safetypin: has joined #ruby
[14:36:19] csk157: has joined #ruby
[14:37:05] DLSteve_: has joined #ruby
[14:38:26] helpa: has joined #ruby
[14:42:03] helpa: has joined #ruby
[14:44:03] helpa-bot: has joined #ruby
[14:46:03] helpa-bot: has joined #ruby
[14:48:04] helpa: has joined #ruby
[14:49:35] Psybur: has joined #ruby
[14:50:33] emerson: has joined #ruby
[14:54:08] c-c: has joined #ruby
[14:54:16] zapata: has joined #ruby
[14:54:16] mark_66: has joined #ruby
[14:54:16] biberu: has joined #ruby
[14:54:16] sepp2k: has joined #ruby
[14:54:16] lunarkitty7: has joined #ruby
[14:54:16] cochi: has joined #ruby
[14:54:16] olblak: has joined #ruby
[14:54:16] Travis-42: has joined #ruby
[14:54:16] DanKnox: has joined #ruby
[14:54:16] CustosLimen: has joined #ruby
[14:54:16] jhill: has joined #ruby
[14:54:16] chridal: has joined #ruby
[14:54:16] spastorino: has joined #ruby
[14:54:16] Uptime: has joined #ruby
[14:54:16] tobiasvl: has joined #ruby
[14:54:16] contradictioned: has joined #ruby
[14:54:16] wopi: has joined #ruby
[14:54:16] FastJack: has joined #ruby
[14:54:16] bosma: has joined #ruby
[14:54:16] AlHafoudh: has joined #ruby
[14:54:16] mistym: has joined #ruby
[14:54:17] rideh: has joined #ruby
[14:54:17] EvilJStoker: has joined #ruby
[14:54:17] tessi_zz: has joined #ruby
[14:54:17] Rush: has joined #ruby
[14:54:17] chrisseaton: has joined #ruby
[14:54:17] err_ok: has joined #ruby
[14:54:17] zipkid: has joined #ruby
[14:54:17] tekk: has joined #ruby
[14:54:17] creat: has joined #ruby
[14:54:17] machty: has joined #ruby
[14:54:17] micalexander: has joined #ruby
[14:54:17] Iacobus: has joined #ruby
[14:54:17] darix: has joined #ruby
[14:54:17] KnownSyntax: has joined #ruby
[14:54:17] stephenh: has joined #ruby
[14:54:17] canton7: has joined #ruby
[14:54:17] volix: has joined #ruby
[14:54:17] flips: has joined #ruby
[14:54:17] nfsnobody-: has joined #ruby
[14:54:17] jan4: has joined #ruby
[14:54:18] DarthGandalf: has joined #ruby
[14:54:18] petems: has joined #ruby
[14:54:18] cttttt: has joined #ruby
[14:54:18] sparr: has joined #ruby
[14:54:18] sorah___: has joined #ruby
[14:54:18] amitchellbullard: has joined #ruby
[14:54:18] [diecast]: has joined #ruby
[14:54:18] graingert: has joined #ruby
[14:54:18] lipoqil: has joined #ruby
[14:54:18] olivierjanss: has joined #ruby
[14:54:18] saltsa: has joined #ruby
[14:54:18] elomatreb: has joined #ruby
[14:54:18] timmow: has joined #ruby
[14:54:18] jnollette: has joined #ruby
[14:54:18] _aeris_: has joined #ruby
[14:54:19] millerti: has joined #ruby
[14:54:19] shinnya: has joined #ruby
[14:54:19] marr: has joined #ruby
[14:54:19] Guest37853: has joined #ruby
[14:54:19] sunrunner20: has joined #ruby
[14:54:19] A124: has joined #ruby
[14:54:19] naprimer: has joined #ruby
[14:54:19] beaorn: has joined #ruby
[14:54:19] my123: has joined #ruby
[14:54:19] half-a-pony: has joined #ruby
[14:54:19] leah2: has joined #ruby
[14:54:20] toogley: has joined #ruby
[14:54:20] livcd: has joined #ruby
[14:54:20] jordanm: has joined #ruby
[14:54:20] jokke: has joined #ruby
[14:54:20] crayfishx: has joined #ruby
[14:54:20] harmaahylje: has joined #ruby
[14:54:20] mochiyoda_: has joined #ruby
[14:54:20] FifthWall: has joined #ruby
[14:54:20] Seich: has joined #ruby
[14:54:20] gremax: has joined #ruby
[14:54:20] bauruine: has joined #ruby
[14:54:20] ghormoon: has joined #ruby
[14:54:20] Flonk: has joined #ruby
[14:54:20] davic: has joined #ruby
[14:54:20] johnny56_: has joined #ruby
[14:54:20] Hien: has joined #ruby
[14:54:20] Lyfe: has joined #ruby
[14:54:20] synstack: has joined #ruby
[14:54:21] scorphus: has joined #ruby
[14:54:21] nikivi: has joined #ruby
[14:54:21] skawa: has joined #ruby
[14:54:21] vqrs: has joined #ruby
[14:54:21] heyimwill: has joined #ruby
[14:54:21] TheMoonMaster: has joined #ruby
[14:54:21] Phage: has joined #ruby
[14:54:21] manveru: has joined #ruby
[14:54:21] DukeDave: has joined #ruby
[14:54:21] mitsuhiko: has joined #ruby
[14:54:21] mrsolo: has joined #ruby
[14:54:21] pmarreck: has joined #ruby
[14:54:21] incomprehensibly: has joined #ruby
[14:54:21] nOgAnOo: has joined #ruby
[14:54:21] HalcyonicStorm: has joined #ruby
[14:54:21] olspookishmagus: has joined #ruby
[14:54:21] caw__: has joined #ruby
[14:54:21] afisher: has joined #ruby
[14:54:21] Nuck: has joined #ruby
[14:54:21] drale2k: has joined #ruby
[14:54:21] tbuehlmann: has joined #ruby
[14:54:21] rfv: has joined #ruby
[14:54:21] RealMarc: has joined #ruby
[14:54:21] rflot: has joined #ruby
[14:54:21] pizzaops: has joined #ruby
[14:54:22] podman[USC]: has joined #ruby
[14:54:22] bougyman: has joined #ruby
[14:54:22] cybergeeek: has joined #ruby
[14:54:59] jaredrhine: has joined #ruby
[14:54:59] surrounder: has joined #ruby
[14:54:59] pabs: has joined #ruby
[14:54:59] spider-mario: has joined #ruby
[14:54:59] nikkyjr: has joined #ruby
[14:54:59] rgs: has joined #ruby
[14:54:59] TvL2386: has joined #ruby
[14:54:59] chaos95: has joined #ruby
[14:54:59] veloutin: has joined #ruby
[14:54:59] kitallis: has joined #ruby
[14:54:59] balo: has joined #ruby
[14:54:59] lele: has joined #ruby
[14:54:59] Liothen: has joined #ruby
[14:55:00] Guest86682: has joined #ruby
[14:55:00] m4rCsi: has joined #ruby
[14:55:00] wnd: has joined #ruby
[14:55:00] tcopeland: has joined #ruby
[14:55:00] gizmore|2: has joined #ruby
[14:55:00] jaruga: has joined #ruby
[14:55:00] tao_: has joined #ruby
[14:55:00] sindork: has joined #ruby
[14:55:00] Guest37449: has joined #ruby
[14:55:00] despai: has joined #ruby
[14:55:00] qba73_: has joined #ruby
[14:55:00] 7IZAALMT3: has joined #ruby
[14:55:00] GGMethos: has joined #ruby
[14:55:00] justache: has joined #ruby
[14:55:00] DmitryBochkarev: has joined #ruby
[14:55:00] _whitelogger_: has joined #ruby
[14:55:00] lexruee: has joined #ruby
[14:55:00] DLSteve_: has joined #ruby
[14:55:01] JasonCL: has joined #ruby
[14:55:01] mcr1: has joined #ruby
[14:55:01] mtkd: has joined #ruby
[14:55:01] guille-moe: has joined #ruby
[14:55:01] kinbiko: has joined #ruby
[14:55:01] yokel: has joined #ruby
[14:55:01] skweek: has joined #ruby
[14:55:01] endemic: has joined #ruby
[14:55:01] thinkpad: has joined #ruby
[14:55:01] yeticry: has joined #ruby
[14:55:01] apeiros: has joined #ruby
[14:55:01] Zimsky: has joined #ruby
[14:55:01] DrCode: has joined #ruby
[14:55:01] Nahra: has joined #ruby
[14:55:01] enterprisey: has joined #ruby
[14:55:01] faces: has joined #ruby
[14:55:01] apparition: has joined #ruby
[14:55:01] workmad3: has joined #ruby
[14:55:02] n13z: has joined #ruby
[14:55:02] Fraeon: has joined #ruby
[14:55:02] Serpent7776: has joined #ruby
[14:55:02] ldnunes: has joined #ruby
[14:55:02] maattdd_: has joined #ruby
[14:55:02] burgestrand: has joined #ruby
[14:55:02] QualityAddict: has joined #ruby
[14:55:02] speakingcode: has joined #ruby
[14:55:02] dreamthese: has joined #ruby
[14:55:02] anas: has joined #ruby
[14:55:02] andikr: has joined #ruby
[14:55:02] `derpy: has joined #ruby
[14:55:02] href: has joined #ruby
[14:55:02] adaedra: has joined #ruby
[14:55:02] jamesaxl: has joined #ruby
[14:55:02] plexigras: has joined #ruby
[14:55:02] hahuang65: has joined #ruby
[14:55:02] Vashy: has joined #ruby
[14:55:02] d^sh: has joined #ruby
[14:55:02] Barrt: has joined #ruby
[14:55:02] phenom: has joined #ruby
[14:55:02] mint: has joined #ruby
[14:55:03] Takumo: has joined #ruby
[14:55:03] swgillespie: has joined #ruby
[14:55:03] beccamorgan: has joined #ruby
[14:55:03] hsiktas: has joined #ruby
[14:55:03] nowhere_man: has joined #ruby
[14:55:03] tsglove: has joined #ruby
[14:55:03] PaulCapestany: has joined #ruby
[14:55:03] techn1cs: has joined #ruby
[14:55:03] selim: has joined #ruby
[14:55:03] webguynow: has joined #ruby
[14:55:03] MrSparkle: has joined #ruby
[14:55:03] dinfuehr: has joined #ruby
[14:55:03] Swat2: has joined #ruby
[14:55:03] MrBismuth: has joined #ruby
[14:55:03] Emmanuel_Chanel: has joined #ruby
[14:55:03] Tharbakim: has joined #ruby
[14:55:03] konsolebox: has joined #ruby
[14:55:03] lupine: has joined #ruby
[14:55:03] infernix: has joined #ruby
[14:55:04] dupondje: has joined #ruby
[14:55:04] rann: has joined #ruby
[14:55:04] kapowaz: has joined #ruby
[14:55:04] ewilliam_____: has joined #ruby
[14:55:04] Authenticator: has joined #ruby
[14:55:04] pwillard: has joined #ruby
[14:55:04] quiller: has joined #ruby
[14:55:04] darthThorik: has joined #ruby
[14:55:04] ablackack_: has joined #ruby
[14:55:04] Utkarsh_: has joined #ruby
[14:55:04] dhollinger: has joined #ruby
[14:55:04] shadeslayer: has joined #ruby
[14:55:04] Kuukunen: has joined #ruby
[14:55:04] mitchellvanw: has joined #ruby
[14:55:04] mniip: has joined #ruby
[14:55:04] Crash1hd: has joined #ruby
[14:55:05] nchambers: has joined #ruby
[14:55:05] chromis: has joined #ruby
[14:55:05] armando: has joined #ruby
[14:55:05] Zarthus: has joined #ruby
[14:55:05] inukshuk: has joined #ruby
[14:55:05] ineb: has joined #ruby
[14:55:05] celine_: has joined #ruby
[14:55:05] ByronJohnson: has joined #ruby
[14:55:05] Qommand0r: has joined #ruby
[14:55:05] Lyubo1: has joined #ruby
[14:55:05] nausea-: has joined #ruby
[14:55:05] Jicemo_: has joined #ruby
[14:55:05] Vircung: has joined #ruby
[14:55:05] cpallares: has joined #ruby
[14:55:05] fullstack: has joined #ruby
[14:55:05] j00n: has joined #ruby
[14:55:05] Caius: has joined #ruby
[14:55:05] cajone: has joined #ruby
[14:55:05] bathtub_shark: has joined #ruby
[14:55:06] fyrril: has joined #ruby
[14:55:06] nertzy: has joined #ruby
[14:55:06] aef_: has joined #ruby
[14:55:06] twe4ked: has joined #ruby
[14:55:06] mjolnird: has joined #ruby
[14:55:06] gil_: has joined #ruby
[14:55:06] segy: has joined #ruby
[14:55:06] jrabe: has joined #ruby
[14:55:06] romain_t: has joined #ruby
[14:55:06] jsaak: has joined #ruby
[14:55:06] tuelz: has joined #ruby
[14:55:06] Xeago: has joined #ruby
[14:55:06] cschneid-: has joined #ruby
[14:55:06] mikeiniowa: has joined #ruby
[14:55:06] bronson_: has joined #ruby
[14:55:06] xMopxShell: has joined #ruby
[14:55:06] chmuri: has joined #ruby
[14:55:06] Dark_Arc: has joined #ruby
[14:55:06] CrazyEddy: has joined #ruby
[14:55:06] lucas: has joined #ruby
[14:55:06] guardian: has joined #ruby
[14:55:06] marienz: has joined #ruby
[14:55:06] Guest29916: has joined #ruby
[14:55:06] ged: has joined #ruby
[14:55:07] irick: has joined #ruby
[14:55:07] lxsameer: has joined #ruby
[14:55:07] z3uS: has joined #ruby
[14:55:07] kenichi_: has joined #ruby
[14:55:07] Axsuul: has joined #ruby
[14:55:07] Jello_Raptor: has joined #ruby
[14:55:07] dminuoso: has joined #ruby
[14:55:07] yosafbridge: has joined #ruby
[14:55:07] BackEndCoder: has joined #ruby
[14:55:07] mbr: has joined #ruby
[14:55:07] Yxhvd: has joined #ruby
[14:55:07] Kilo`byte: has joined #ruby
[14:55:07] naquad: has joined #ruby
[14:55:07] TheBrayn: has joined #ruby
[14:55:07] esObe: has joined #ruby
[14:55:07] miah: has joined #ruby
[14:55:07] flori: has joined #ruby
[14:55:07] perry: has joined #ruby
[14:55:07] eb0t_: has joined #ruby
[14:55:07] aspiers: has joined #ruby
[14:55:07] hinbody: has joined #ruby
[14:55:07] reaVer: has joined #ruby
[14:55:07] hurricanehrndz: has joined #ruby
[14:55:07] reu: has joined #ruby
[14:55:08] heinrich5991: has joined #ruby
[14:55:08] pecan: has joined #ruby
[14:55:08] shortdudey123: has joined #ruby
[14:55:08] Chew: has joined #ruby
[14:55:08] Guest32854: has joined #ruby
[14:55:08] CBebop: has joined #ruby
[14:55:08] justinweiss: has joined #ruby
[14:55:08] planigan: has joined #ruby
[14:55:08] pppktz: has joined #ruby
[14:55:08] Aloy: has joined #ruby
[14:55:08] erlend: has joined #ruby
[14:55:08] edwardly: has joined #ruby
[14:55:08] rupam123456: has joined #ruby
[14:55:08] levifig: has joined #ruby
[14:55:08] coderphive: has joined #ruby
[14:55:08] ltp: has joined #ruby
[14:55:08] cout: has joined #ruby
[14:55:08] syndikate: has joined #ruby
[14:55:09] brucebag: has joined #ruby
[14:55:09] EXCHGR: has joined #ruby
[14:55:09] nathani: has joined #ruby
[14:55:09] knight-: has joined #ruby
[14:55:09] Eiam: has joined #ruby
[14:55:09] Cyrus: has joined #ruby
[14:55:09] rcs: has joined #ruby
[14:55:09] tris: has joined #ruby
[14:55:09] brainslug: has joined #ruby
[14:55:09] hxegon: has joined #ruby
[14:55:09] PaulePanter: has joined #ruby
[14:55:09] chihhsin: has joined #ruby
[14:55:09] Diabolik: has joined #ruby
[14:55:09] jxf: has joined #ruby
[14:55:09] redondos: has joined #ruby
[14:55:09] seitensei: has joined #ruby
[14:55:09] DarkBushido: has joined #ruby
[14:55:09] larissa_: has joined #ruby
[14:55:09] jsrn: has joined #ruby
[14:55:09] nyuszika7h: has joined #ruby
[14:55:09] Klumben: has joined #ruby
[14:55:09] devn: has joined #ruby
[14:55:09] G: has joined #ruby
[14:55:09] chrisarcand: has joined #ruby
[14:55:09] jpterry: has joined #ruby
[14:55:09] fmccann: has joined #ruby
[14:55:09] jolamb: has joined #ruby
[14:55:10] kent\n: has joined #ruby
[14:55:10] modin: has joined #ruby
[14:55:10] kke: has joined #ruby
[14:55:10] scott4000: has joined #ruby
[14:55:10] zack6849: has joined #ruby
[14:55:10] Voxxit: has joined #ruby
[14:55:10] drbrain: has joined #ruby
[14:55:10] LoRez: has joined #ruby
[14:55:10] psmolen_: has joined #ruby
[14:55:10] personofinterest: has joined #ruby
[14:55:10] gbailey: has joined #ruby
[14:55:10] ryotarai: has joined #ruby
[14:55:10] ikopico: has joined #ruby
[14:55:10] ndrst: has joined #ruby
[14:55:10] justizin: has joined #ruby
[14:55:10] elliottcable: has joined #ruby
[14:55:10] Tony-St4rk: has joined #ruby
[14:55:10] foamz: has joined #ruby
[14:55:10] doesntbyte: has joined #ruby
[14:55:10] wsmoak: has joined #ruby
[14:55:11] mattwc: has joined #ruby
[14:55:11] peteretep: has joined #ruby
[14:55:11] jtperreault: has joined #ruby
[14:55:11] NicolasHov: has joined #ruby
[14:55:11] musl_: has joined #ruby
[14:55:11] iamayam: has joined #ruby
[14:55:11] marahin: has joined #ruby
[14:55:11] fury: has joined #ruby
[14:55:11] jnix: has joined #ruby
[14:55:11] justinmrkva: has joined #ruby
[14:55:11] Nilium: has joined #ruby
[14:55:11] Keltia: has joined #ruby
[14:55:11] g3funk: has joined #ruby
[14:55:11] llua: has joined #ruby
[14:55:11] roger_rabbit: has joined #ruby
[14:55:11] Prira: has joined #ruby
[14:55:11] ElderFain: has joined #ruby
[14:55:12] mjuhl: has joined #ruby
[14:55:12] Gnubie_: has joined #ruby
[14:55:12] KramerC: has joined #ruby
[14:55:12] oblique: has joined #ruby
[14:55:12] joes: has joined #ruby
[14:55:12] mclee: has joined #ruby
[14:55:12] dyyylan: has joined #ruby
[14:55:12] tsul: has joined #ruby
[14:55:12] zachary12: has joined #ruby
[14:55:12] pocketprotector: has joined #ruby
[14:55:12] Sou|cuttr: has joined #ruby
[14:55:12] bayed: has joined #ruby
[14:55:12] Koshian: has joined #ruby
[14:55:12] webhat: has joined #ruby
[14:55:12] Evesy: has joined #ruby
[14:55:13] ghormoon: has joined #ruby
[14:55:16] jrabe: has joined #ruby
[14:55:26] cadillac_: has joined #ruby
[14:56:13] Psybur: has joined #ruby
[14:56:18] SCHAPiE: has joined #ruby
[14:56:53] eb0t_: has joined #ruby
[14:57:20] GGMethos: has joined #ruby
[14:57:36] halt: has joined #ruby
[14:57:52] eb0t: has joined #ruby
[14:57:57] Iacobus: has joined #ruby
[14:58:04] brixen: has joined #ruby
[14:58:17] Biohazard: has joined #ruby
[14:58:18] teej: has joined #ruby
[14:58:20] Fridtjof: has joined #ruby
[14:58:49] hsiktas: has joined #ruby
[14:58:51] guille-moe1: has joined #ruby
[14:58:55] rann: has joined #ruby
[14:58:59] justache: has joined #ruby
[14:59:22] machty: has joined #ruby
[14:59:23] discopatrick: has joined #ruby
[14:59:25] Meow-J: has joined #ruby
[14:59:29] KnownSyntax: has joined #ruby
[14:59:43] [diecast]: has joined #ruby
[14:59:48] cgfbee: has joined #ruby
[14:59:51] jhill: has joined #ruby
[14:59:54] rfv: has joined #ruby
[14:59:56] raynold: has joined #ruby
[15:00:02] graingert: has joined #ruby
[15:00:11] _whitelogger: has joined #ruby
[15:01:08] Ouchy`w: has joined #ruby
[15:01:27] elliottcable: has joined #ruby
[15:01:32] ggherdov: has joined #ruby
[15:01:33] graingert: has joined #ruby
[15:02:56] jaruga: has joined #ruby
[15:03:36] ggherdov: has joined #ruby
[15:04:23] tvw: has joined #ruby
[15:05:06] aufi: has joined #ruby
[15:09:41] quobo: has joined #ruby
[15:10:10] jottr: has joined #ruby
[15:12:56] polishdub: has joined #ruby
[15:19:14] justache: has joined #ruby
[15:20:29] oleo: has joined #ruby
[15:20:33] justache: has joined #ruby
[15:20:33] justache: has joined #ruby
[15:20:36] SCHAPiE: has joined #ruby
[15:20:36] rhebz916: has joined #ruby
[15:20:41] oleo: has joined #ruby
[15:20:49] dinfuehr: has joined #ruby
[15:20:49] sunrunner20: has joined #ruby
[15:20:50] BTRE: has joined #ruby
[15:20:50] Technodrome: has joined #ruby
[15:20:57] armyriad: has joined #ruby
[15:20:59] gnufied: has joined #ruby
[15:21:23] xMopxShell: has joined #ruby
[15:21:28] bmurt: has joined #ruby
[15:22:09] Azure: has joined #ruby
[15:22:31] webguynow: has joined #ruby
[15:24:49] harmaahylje: has joined #ruby
[15:25:11] guille-moe: has joined #ruby
[15:25:30] Uptime: has joined #ruby
[15:26:52] graingert: has joined #ruby
[15:27:48] graingert: has joined #ruby
[15:28:51] chocoelho: has joined #ruby
[15:29:59] krawchyk: has joined #ruby
[15:35:21] houhoulis: has joined #ruby
[15:35:36] jamiejackson: has joined #ruby
[15:35:50] Tagami[m]: has joined #ruby
[15:36:16] varesa: has joined #ruby
[15:37:07] d10n-work: has joined #ruby
[15:37:09] creat: has joined #ruby
[15:37:31] rann: has joined #ruby
[15:38:04] WhereIsMySpoon_: Anyone here worked with curses before?
[15:40:58] nyuszika7h: has joined #ruby
[15:43:39] mikecmpbll: has joined #ruby
[15:45:10] monkstone: has joined #ruby
[15:45:15] apeiros: I tried to. then I started to curse.
[15:45:20] apeiros: (and yes, pun, but also true)
[15:46:55] monkstone: has left #ruby: ()
[15:50:14] kculpis: has joined #ruby
[15:53:02] Serpent: has joined #ruby
[16:00:05] pastorinni: has joined #ruby
[16:02:20] speakingcode: has joined #ruby
[16:07:09] tacoboy: has joined #ruby
[16:07:22] schemanic: has joined #ruby
[16:07:45] schemanic: hello, I'm getting an undefined method [] for nil:NilClass error and I'm not understanding how.
[16:07:46] schemanic: https://gist.github.com/anonymous/8b381260aaefef355847cc20959ddd3b
[16:08:31] apeiros: schemanic: sounds like app_configuration was nil.
[16:08:32] tbuehlmann: schemanic: looks like app_configuration or app_configuration[:opentempo] is nil
[16:08:52] apeiros: tbuehlmann: can't be the latter. calls []= there, not []
[16:09:07] tbuehlmann: oh, it's a setter, you're right
[16:09:11] hutch34: has joined #ruby
[16:09:11] schemanic: so the whole object is failing
[16:09:24] schemanic: So how do I properly copy an @variable that is a hash?
[16:09:37] schemanic: @var2 = @var1.clone ?
[16:09:53] schemanic: @var2 = @var1.dup
[16:10:38] troys: has joined #ruby
[16:11:42] cagomez: has joined #ruby
[16:11:53] elomatreb: But it doesn't do a "deep" copy, which can trip you up
[16:12:14] uZiel: has joined #ruby
[16:12:33] Hanma[m]: has joined #ruby
[16:12:33] jonjits[m]: has joined #ruby
[16:12:34] dtcristo: has joined #ruby
[16:12:34] aviraldg: has joined #ruby
[16:12:34] M107262[m]: has joined #ruby
[16:12:34] yana[m]: has joined #ruby
[16:12:34] erciccione_[m]: has joined #ruby
[16:12:34] astronavt[m]: has joined #ruby
[16:12:34] watzon: has joined #ruby
[16:12:34] torarne: has joined #ruby
[16:12:35] lasenna[m]: has joined #ruby
[16:12:35] haylon: has joined #ruby
[16:12:35] turt2live: has joined #ruby
[16:12:35] velu_aon[m]: has joined #ruby
[16:12:35] Giphy[m]: has joined #ruby
[16:12:35] dman[m]: has joined #ruby
[16:12:36] KevinMGranger: has joined #ruby
[16:12:36] apeiros: ACTION is not entirely sure that's the problem
[16:12:41] aagdbl[m]: has joined #ruby
[16:12:41] kua[m]: has joined #ruby
[16:12:42] itmerc[m]: has joined #ruby
[16:12:43] gokul_mr[m]: has joined #ruby
[16:12:43] Matt[m]2: has joined #ruby
[16:12:43] zalipuha[m]: has joined #ruby
[16:13:15] apeiros: but I'm afk now, plenty of good people still here :) good luck!
[16:13:20] nadir: has joined #ruby
[16:14:05] aupadhye: has joined #ruby
[16:14:56] pastorinni: Guys, what is the best book that I can read in order to become a good vim user?
[16:16:31] cschneid: has joined #ruby
[16:16:59] schemanic: has joined #ruby
[16:17:06] schemanic: hi, I got disconnected
[16:17:16] NL3limin4t0r: has joined #ruby
[16:17:21] 7IZAALMT3: pastorinni: A few resources
[16:17:27] 7IZAALMT3: http://learnvimscriptthehardway.stevelosh.com
[16:17:35] 7IZAALMT3: http://yannesposito.com/Scratch/en/blog/Learn-Vim-Progressively/
[16:17:45] 7IZAALMT3: http://vimcasts.org
[16:18:01] Exhiled: has joined #ruby
[16:18:09] pastorinni: 7IZAALMT3: Thanks!!!
[16:18:25] 7IZAALMT3: Practical Vim is good also
[16:18:49] schemanic: https://gist.github.com/anonymous/f1fcfdc267568b44ae6f5b6af1b188cf
[16:20:17] pastorinni: 7IZAALMT3: all those resources are pretty cool!!!
[16:21:17] 7IZAALMT3: pastorinni: Once you get the basics, the best tips I can gave is to see different worflows and integrate the ones that fits your needs
[16:21:34] 7IZAALMT3: https://destroyallsoftware.com/screencasts
[16:22:28] pastorinni: 7IZAALMT3: Thanks again dude!!! i'll do
[16:22:40] NL3limin4t0r: I'm trying to convert an Array to a Hash with the following structure `[[:a, 1], [:b, 2], [:c, 3]]`, this can be easily done with the #to_h method on Enumarable. However if you create a new hash from scratch you can provide a default `Hash.new(0)`, is there also a way to convert an exsisting Array to a Hash while providing a default?
[16:24:15] NL3limin4t0r: 7IZAALMT3: The book "Practical Vim" by "Drew Neil" is also excelent.
[16:24:31] hsiktas: has joined #ruby
[16:24:47] urk187: has joined #ruby
[16:26:04] houhoulis: has joined #ruby
[16:30:22] kinbiko: has joined #ruby
[16:30:47] jackjackdripper: has joined #ruby
[16:30:51] csk157: has joined #ruby
[16:32:14] lexruee: has joined #ruby
[16:32:50] LocaMocha: has joined #ruby
[16:33:05] miskatonic: has joined #ruby
[16:35:27] pastorinni: NL3limin4t0r: 7IZAALMT3: thanks for all the resources!!!
[16:41:20] kinbiko: has joined #ruby
[16:41:31] shoogz: has joined #ruby
[16:42:57] TomyLobo: has joined #ruby
[16:44:23] ldepandis: has joined #ruby
[16:49:53] kinbiko: has joined #ruby
[16:50:50] motstgo: has left #ruby: ("WeeChat 1.9")
[16:51:37] dionysus69: has joined #ruby
[16:57:05] DmitryBochkarev: has joined #ruby
[16:59:34] kinbiko: has joined #ruby
[17:01:23] jxv: has joined #ruby
[17:01:31] quobo: has joined #ruby
[17:02:06] Guest90_: has joined #ruby
[17:05:43] Exhiled: has joined #ruby
[17:09:11] PaulCape_: has joined #ruby
[17:09:14] kinbiko: has joined #ruby
[17:18:25] kinbiko: has joined #ruby
[17:22:36] DTZUZO: has joined #ruby
[17:24:22] yeticry: has joined #ruby
[17:28:10] kinbiko: has joined #ruby
[17:30:32] despai: has joined #ruby
[17:31:24] yeticry: has joined #ruby
[17:33:02] ltem: has joined #ruby
[17:36:54] ar: has joined #ruby
[17:37:13] mtkd: has joined #ruby
[17:37:29] guille-moe: has joined #ruby
[17:37:48] kinbiko: has joined #ruby
[17:37:56] chocoelho: has joined #ruby
[17:37:57] csk157: has joined #ruby
[17:38:08] conta2: has joined #ruby
[17:39:11] synthroid: has joined #ruby
[17:39:29] ar: hi. is there a Set implementation that guarantees that retrieval order (set.each_with_index, for example) is the same as insertion order? it seems to work like that in MRI, but the docs specifically say that the order is not guaranteed
[17:41:54] eightlimbed: has joined #ruby
[17:43:11] ShekharReddy: has joined #ruby
[17:44:47] Guest22298: has joined #ruby
[17:45:39] yxhuvud: ar: no, but you can probably implement one pretty simply yourself as Hash is ordered by insertion. After all, set is implemented in terms of Hash.
[17:46:34] teej: has joined #ruby
[17:47:29] elomatreb: Well, if your Hash is already ordered you don't need to reimplement it
[17:47:30] kinbiko: has joined #ruby
[17:48:08] orbyt_: has joined #ruby
[17:49:58] skweek: has joined #ruby
[17:50:00] DTZUZO: has joined #ruby
[17:51:25] PaulCapestany: has joined #ruby
[17:55:09] Tagami[m]: has joined #ruby
[17:56:10] conta2: has joined #ruby
[17:56:15] jxv: has joined #ruby
[17:56:46] cdg_: has joined #ruby
[17:57:11] kinbiko: has joined #ruby
[17:58:30] apeiros_: has joined #ruby
[18:00:37] dviola: has joined #ruby
[18:03:59] KnownSyntax: has joined #ruby
[18:04:17] leah2: has joined #ruby
[18:04:58] sanscoeur: has joined #ruby
[18:05:24] tsglove: has joined #ruby
[18:05:26] NL3limin4t0r: ar: Hash and Set are not meant to be used in a certain order. Arrays are better suited for that.
[18:05:54] jackjackdripper: has joined #ruby
[18:06:24] kinbiko: has joined #ruby
[18:07:00] elomatreb: Conceptually true, but MRI Hashes are explicitly documented to be ordered today.
[18:07:30] ar: NL3limin4t0r: except i've hit a usecase where rewriting a piece of code from using Array to Set reduced the runtime from ~30s to ~0.3s
[18:08:22] raynold: ahh it's a wonderful day
[18:09:01] ar: NL3limin4t0r: checking if an element already exists in an array using Array#index proved to be very expensive compared to Set#add?
[18:10:41] eckhardt: has joined #ruby
[18:11:39] elomatreb: Which is precisely the point of a Set, checking if an element is in an Array is O(n), in a Set it amortizes to somewhere near constant time
[18:12:12] apeiros_: same for Hash of course (ruby's Set being implemented using Hash btw.)
[18:12:37] NL3limin4t0r: ar: Hmm, does it make any difference if you just insert the element and than call #uniq! ?
[18:12:53] kies: has joined #ruby
[18:13:12] elomatreb: Yeah that's probably a better way to put it, conceptually a Set might also be a sorted unique-element array/list (log n complexities)
[18:14:21] Dimik: has joined #ruby
[18:14:30] elomatreb: NL3limin4t0r: That will be even worse, since uniq is a very expensive operation and the insert doesn't get any better because of that
[18:14:45] apeiros: ar: Set will work, but since it's documented as not guaranteeing order, I'd just use Hash
[18:15:27] elomatreb: I wonder if that bit of documentation is just a leftover from the days when Hashes were not documented as ordered though
[18:15:39] apeiros: i.e. Hash with all values set to true. if you want to iterate, use .each_key. if you want an array at some point: .keys
[18:16:04] kinbiko: has joined #ruby
[18:16:08] apeiros: elomatreb: it probably is. but it might well have been left to allow implementing it differently.
[18:16:33] elomatreb: Set is a Ruby library though, not a native extension
[18:16:36] cognoscente: has joined #ruby
[18:16:46] apeiros: yes. but that's an implementation detail.
[18:17:05] apeiros: and leaving the docs as "set is unordered" may well be intentional to leave "it actually is ordered" an implementation detail too
[18:17:41] elomatreb: Mh. But it says "it actually is ordered" on Hashes as well, and that's the same line of thought. But I guess it's not really a problem
[18:17:45] ar: NL3limin4t0r: calling #uniq! makes it take… over 3 minutes now.
[18:18:12] apeiros: elomatreb: no, ruby's hashes are explicitly ordered. there it's not an implementation detail.
[18:18:26] ar: so, yeah, going with Hash will be better
[18:19:11] apeiros: it was an informed decision to "sacrifice" 16 bytes per entry to maintain a linked list for the order :)
[18:20:17] elomatreb: I guess I see what you mean
[18:20:31] skweek: has joined #ruby
[18:20:52] dcluna: has joined #ruby
[18:21:11] claudiuinberlin: has joined #ruby
[18:21:33] apeiros: I mean you can use the implementation detail. chances are very low that it'll change anytime soon. but it's something one would have to be aware. and given how trivial it is to just use Hash, I don't think there's a good point to it :)
[18:21:54] Exhiled: has joined #ruby
[18:22:00] ramfjord: has joined #ruby
[18:24:52] yabbes: has joined #ruby
[18:25:52] kinbiko: has joined #ruby
[18:28:57] Lytol: has joined #ruby
[18:32:24] Emmanuel_Chanel: has joined #ruby
[18:35:32] kinbiko: has joined #ruby
[18:38:05] Tagami[m]: has joined #ruby
[18:40:39] JaccoP: has joined #ruby
[18:41:33] orbyt_: has joined #ruby
[18:44:04] dionysus69: has joined #ruby
[18:44:31] goyox86_: has joined #ruby
[18:45:10] kinbiko: has joined #ruby
[18:46:30] daniman: has joined #ruby
[18:46:46] daniman: has left #ruby: ("WeeChat 1.9.1")
[18:50:27] Emmanuel_Chanel: has joined #ruby
[18:51:12] A124: has joined #ruby
[18:54:02] ldnunes: has joined #ruby
[18:54:54] kinbiko: has joined #ruby
[18:55:11] apeiros: NL3limin4t0r: re your hash question - not really. best you can do is Hash.new(0).merge(your_array.to_h)
[18:56:24] cdg: has joined #ruby
[18:56:38] al2o3-cr: has joined #ruby
[18:58:05] Tyrese: has joined #ruby
[18:58:13] Tyrese: what happens if I delete .gem?
[18:58:25] apeiros: .gem is gone
[18:58:41] Papierkorb: Next question please
[18:58:44] Tyrese: does it break my gems?
[18:59:08] elomatreb: Considering that's probably where they are stored, yes
[18:59:16] apeiros: that depends. is .gem a directory which you use a gem home? then es, it'll be broken.
[18:59:32] Tyrese: how do I check
[18:59:33] apeiros: but since you only said ".gem", we have *zero* idea what it is or what you use it for.
[18:59:54] Tyrese: same here
[19:00:03] apeiros: tyrese: how about you provide some actually useful information?
[19:00:05] elomatreb: Is it a directory? Is it a file? Where is it?
[19:00:08] jhass: your PC will stop to boot, don't do it. Next pleaase!
[19:00:10] apeiros: like: is it a directory? in our home?
[19:00:23] Tyrese: it's a folder - /root/.gems
[19:00:25] elomatreb: jhass: It will immediately explode
[19:00:40] jhass: nono, that's .gems, s for sploiding
[19:00:41] Tyrese: but I want to clean up /root because.. its root
[19:00:42] apeiros: tyrese: then yes, that's probably where rubygems stores the gems.
[19:01:13] apeiros: but that still leaves plenty of options. how did you install rubygems?
[19:01:27] elomatreb: A user-install directory for the root user seems wrong though, shouldn't system-installed gems be in a /usr/lib or something like that?
[19:01:36] Tyrese: gem install
[19:01:41] Tyrese: it's gentoo - who knows
[19:01:49] apeiros: elomatreb: who knows! any number of distros decide to do whatever the fuck they please
[19:01:52] Tyrese: I had to configure uwsgi with xml
[19:02:23] apeiros: tyrese: not how you installed gems, how you installed rubygems itself, or rather ruby, since rubygems is part of it
[19:02:56] Tyrese: oh, I compiled it from an ebuild
[19:03:12] Tyrese: https://packages.gentoo.org/packages/dev-lang/ruby
[19:03:14] SeepingN: has joined #ruby
[19:03:47] apeiros: can you gist the output of `gem env`?
[19:04:35] kinbiko: has joined #ruby
[19:04:56] Tyrese: https://paste.pound-python.org/show/jBG6yOnAbTl3LD7BOK3C/
[19:05:27] Tyrese: well then
[19:05:29] apeiros: so yes, your installation uses that directory to store gems.
[19:05:42] Tyrese: is that a safe idea?
[19:05:45] apeiros: note: it's possible to install rubygems to use different paths.
[19:06:15] apeiros: define "safe". I use ruby in a user-install only.
[19:06:58] jhass: are we sure yet there are actually any gems installed there?
[19:07:05] Tyrese: i doubt itll cause any issue now that I think about it
[19:07:18] NL3limin4t0r: apeiros: Thanks for the response, it moved quite far up.
[19:07:24] jhass: as root it should use installation directory over user installation directory given there's no --user-install in the configuration, no?
[19:07:25] goyox86_: has joined #ruby
[19:07:36] Exhiled: has joined #ruby
[19:08:26] Hanma[m]: has joined #ruby
[19:08:27] watzon: has joined #ruby
[19:08:27] torarne: has joined #ruby
[19:08:27] M107262[m]: has joined #ruby
[19:08:27] jonjits[m]: has joined #ruby
[19:08:27] aviraldg: has joined #ruby
[19:08:28] lasenna[m]: has joined #ruby
[19:08:28] yana[m]: has joined #ruby
[19:08:28] dtcristo: has joined #ruby
[19:08:28] astronavt[m]: has joined #ruby
[19:08:28] erciccione_[m]: has joined #ruby
[19:08:28] Giphy[m]: has joined #ruby
[19:08:28] velu_aon[m]: has joined #ruby
[19:08:28] turt2live: has joined #ruby
[19:08:28] haylon: has joined #ruby
[19:08:29] dman[m]: has joined #ruby
[19:08:29] KevinMGranger: has joined #ruby
[19:08:30] russt: has joined #ruby
[19:08:31] jhass: tyrese: do you remember the name of a gem you installed? if so, what gives gem which <thatgem>
[19:08:32] elomatreb: Yeah, the user directory appears in my gem env output as well but it doesn't actually exist
[19:08:34] kua[m]: has joined #ruby
[19:08:34] aagdbl[m]: has joined #ruby
[19:08:35] Matt[m]2: has joined #ruby
[19:08:36] zalipuha[m]: has joined #ruby
[19:08:36] gokul_mr[m]: has joined #ruby
[19:08:36] itmerc[m]: has joined #ruby
[19:08:57] selim: has joined #ruby
[19:10:01] blackmesa1: has joined #ruby
[19:11:07] csk157: has joined #ruby
[19:11:37] kinbiko: has joined #ruby
[19:15:32] rm8: has joined #ruby
[19:18:11] JustASlacker: has joined #ruby
[19:21:21] kinbiko: has joined #ruby
[19:22:35] Flashynuff: has joined #ruby
[19:23:38] DTZUZO: has joined #ruby
[19:26:58] csk157_1: has joined #ruby
[19:27:17] mikecmpbll: has joined #ruby
[19:30:06] DTZUZO: has joined #ruby
[19:31:04] kinbiko: has joined #ruby
[19:33:34] ozcanesen: has joined #ruby
[19:37:32] alex``: has joined #ruby
[19:41:51] cloaked1: has joined #ruby
[19:43:36] Technodrome: has joined #ruby
[19:43:39] vtx: has joined #ruby
[19:45:13] DTZUZO: has joined #ruby
[19:45:39] goyox86: has joined #ruby
[19:49:50] kinbiko: has joined #ruby
[19:51:09] Sembei: has joined #ruby
[19:51:47] Xiti: has joined #ruby
[19:58:27] rhyselsmore: has joined #ruby
[20:01:28] ahrs: has joined #ruby
[20:01:43] bmurt: has joined #ruby
[20:02:07] goyox86: has joined #ruby
[20:03:53] kinbiko: has joined #ruby
[20:04:25] epochwolf: has joined #ruby
[20:05:41] GodFather: has joined #ruby
[20:05:43] wilbert: has joined #ruby
[20:05:57] ozcanesen: has joined #ruby
[20:06:39] goyox86: has joined #ruby
[20:08:27] al2o3-cr: has joined #ruby
[20:10:06] DTZUZO: has joined #ruby
[20:12:01] jenrzzz: has joined #ruby
[20:12:01] jenrzzz: has joined #ruby
[20:12:08] cdg: has joined #ruby
[20:13:09] Sylario: has joined #ruby
[20:13:43] kinbiko: has joined #ruby
[20:14:11] minimalism: has joined #ruby
[20:15:57] wilbert: has joined #ruby
[20:16:38] wilbert: has joined #ruby
[20:23:05] kinbiko: has joined #ruby
[20:27:15] strayArch: has joined #ruby
[20:28:11] milardovich: has joined #ruby
[20:30:28] milardovich: has joined #ruby
[20:32:49] kinbiko: has joined #ruby
[20:33:06] workmad3: has joined #ruby
[20:34:57] despai_: has joined #ruby
[20:35:15] ozcanesen: has joined #ruby
[20:35:16] tomphp: has joined #ruby
[20:36:00] milardovich: has joined #ruby
[20:40:28] silvermine: has joined #ruby
[20:40:54] ozcanesen: has joined #ruby
[20:40:55] jackjackdripper: has joined #ruby
[20:42:14] tomphp: has joined #ruby
[20:42:34] kinbiko: has joined #ruby
[20:43:48] rrichardsr3: has joined #ruby
[20:43:59] jackjackdripper: has joined #ruby
[20:45:04] mcr1: has joined #ruby
[20:45:09] lexruee: has joined #ruby
[20:45:14] houhoulis: has joined #ruby
[20:49:06] blackmesa: has joined #ruby
[20:49:30] jamesaxl: has joined #ruby
[20:50:16] tAn: has joined #ruby
[20:51:05] tomphp: has joined #ruby
[20:51:52] ur5us: has joined #ruby
[20:52:47] kinbiko: has joined #ruby
[20:53:24] cdg: has joined #ruby
[20:55:13] Axy: has joined #ruby
[20:55:14] Axy: has joined #ruby
[20:55:27] banisterfiend: has joined #ruby
[20:55:28] tAn: has joined #ruby
[20:58:43] raul782: has joined #ruby
[20:59:35] tcopeland: has joined #ruby
[20:59:38] Mia: has joined #ruby
[21:00:03] ha: has joined #ruby
[21:02:29] kinbiko: has joined #ruby
[21:05:49] nwm_: has joined #ruby
[21:06:20] hutch34: has joined #ruby
[21:11:27] kinbiko: has joined #ruby
[21:11:59] carel: has joined #ruby
[21:13:35] ozcanesen: has joined #ruby
[21:13:45] carel: Is it possible for one to ask for help here or am I in the wrong channel per se ?
[21:13:56] apeiros: this channel is fine for asking ruby related questions
[21:14:54] carel: (I have an issue upon a gentoo box, with a rails app which is not seeing a gem or a bundle)
[21:15:33] carel: apeiros: how are you ? and thanks for the reply
[21:15:58] apeiros: for rails, there's a specific channel over at #rubyonrails
[21:17:55] carel: So I'm getting "Could not find Rake 12.1.0" in a log file and I have wiped my system rake install and run "sudo -u git bundle install --vendor/cache " which seemed to install the gem properly but it's still not seeing it ? (I have google/gitlab/gentoo/stackoverflow and do not really follow the answer, they're a bit ruby speak for me)
[21:17:57] ozcanesen: has joined #ruby
[21:18:10] carel: apeiros: Just saw the respone I'll head there.
[21:18:27] elomatreb: You need to auth to use that channel though
[21:18:32] carel: apeiros: Thanks for the time btw. Hope I didn't break channel rules too badly.
[21:18:51] carel: I thin I have, do you mean register on nickserv ?
[21:19:22] carel: Cool, Thanks and sorry for bombarding.
[21:19:27] apeiros: carel: don't worry, you didn't. this channel is here for help. or in the worst case, redirection ;-)
[21:19:58] kinbiko: has joined #ruby
[21:20:41] carel: I have tried looking for a nice terse Python=>Ruby tutorial but they're all lengthy and aimed at novices, you wouldn't happen to have a neat link or two up your sleaves would you ?
[21:21:07] carel: Perhaps Zetcode has one these days. Learnt Qt in an afternoon with their tuts.
[21:21:24] RougeT430: has joined #ruby
[21:23:03] mjolnird: has joined #ruby
[21:26:05] Asher: has joined #ruby
[21:27:07] apeiros: hm no, the only one I know is the ~20min tutorial on ruby-lang.org. I doubt that's what you're looking for
[21:28:49] carel: apeiros: Yeah I tend to loose interest if it starts of with a hello world :D Perhaps I should try for a fibonaci tut. Thanks once again for the friendly help and advice. Gonna work out how to tackle the login with pidgin next :D
[21:29:31] apeiros: I wish I had advice :)
[21:29:31] apeiros: but maybe just try a resource which starts without python
[21:29:32] baweaver: learnxinyminutes
[21:29:43] kinbiko: has joined #ruby
[21:29:59] eckhardt: has joined #ruby
[21:30:38] carel: baweaver: I'll check that out, thanks :D
[21:32:11] baweaver: otherwise book list in the channel topic
[21:32:34] goyox86: has joined #ruby
[21:33:04] carel: book list
[21:33:34] carel: Oh thought that was a irc command ^_^
[21:33:51] wilbert: has joined #ruby
[21:34:52] goyox86: has joined #ruby
[21:35:00] tAn: has joined #ruby
[21:35:06] kinbiko: has joined #ruby
[21:36:17] carel: baweaver: learnxinyminutes is awesome thanks. I'll hit that up and pop here once I start hitting the repl loop.
[21:36:18] carel: Thanks once again. Hope you have agood weekend when it hits.
[21:37:38] jaruga: has joined #ruby
[21:39:30] clemens3: has joined #ruby
[21:40:33] ghormoon: has joined #ruby
[21:43:13] harmaahylje: has joined #ruby
[21:43:19] Hien: has joined #ruby
[21:43:41] minimalism: has joined #ruby
[21:44:06] Flonk: has joined #ruby
[21:44:08] caw__: has joined #ruby
[21:44:25] pizzaops: has joined #ruby
[21:44:35] vqrs: has joined #ruby
[21:44:46] kinbiko: has joined #ruby
[21:46:07] vqrs: has joined #ruby
[21:46:59] xco: has joined #ruby
[21:48:03] bokayio: has joined #ruby
[21:48:16] Nuck: has joined #ruby
[21:48:16] johnny56_: has joined #ruby
[21:48:16] olspookishmagus: has joined #ruby
[21:48:16] houhoulis: has joined #ruby
[21:48:16] silvermine: has joined #ruby
[21:48:16] despai_: has joined #ruby
[21:48:16] workmad3: has joined #ruby
[21:48:16] jenrzzz: has joined #ruby
[21:48:16] Flashynuff: has joined #ruby
[21:48:16] JaccoP: has joined #ruby
[21:48:16] ltem: has joined #ruby
[21:48:16] dinfuehr: has joined #ruby
[21:48:16] marr: has joined #ruby
[21:48:16] Guest37853: has joined #ruby
[21:48:16] naprimer: has joined #ruby
[21:48:17] beaorn: has joined #ruby
[21:48:17] my123: has joined #ruby
[21:48:17] half-a-pony: has joined #ruby
[21:48:17] toogley: has joined #ruby
[21:48:17] livcd: has joined #ruby
[21:48:17] jordanm: has joined #ruby
[21:48:17] jokke: has joined #ruby
[21:48:17] crayfishx: has joined #ruby
[21:48:17] mochiyoda_: has joined #ruby
[21:48:17] FifthWall: has joined #ruby
[21:48:17] Seich: has joined #ruby
[21:48:17] gremax: has joined #ruby
[21:48:17] davic: has joined #ruby
[21:48:17] Lyfe: has joined #ruby
[21:48:18] synstack: has joined #ruby
[21:48:18] scorphus: has joined #ruby
[21:48:18] nikivi: has joined #ruby
[21:48:18] skawa: has joined #ruby
[21:48:18] heyimwill: has joined #ruby
[21:48:18] TheMoonMaster: has joined #ruby
[21:48:18] Phage: has joined #ruby
[21:48:18] manveru: has joined #ruby
[21:48:18] DukeDave: has joined #ruby
[21:48:18] mitsuhiko: has joined #ruby
[21:48:18] mrsolo: has joined #ruby
[21:48:18] pmarreck: has joined #ruby
[21:48:18] incomprehensibly: has joined #ruby
[21:48:18] nOgAnOo: has joined #ruby
[21:48:18] HalcyonicStorm: has joined #ruby
[21:48:18] afisher: has joined #ruby
[21:48:18] drale2k: has joined #ruby
[21:48:18] tbuehlmann: has joined #ruby
[21:48:18] RealMarc: has joined #ruby
[21:48:18] rflot: has joined #ruby
[21:48:19] podman[USC]: has joined #ruby
[21:48:19] bougyman: has joined #ruby
[21:48:19] cybergeeek: has joined #ruby
[21:48:19] Nuck: has joined #ruby
[21:48:50] olspookishmagus: has joined #ruby
[21:48:52] bauruine: has joined #ruby
[21:49:00] vqrs: has joined #ruby
[21:49:17] Nuck: has joined #ruby
[21:49:29] zanshin: has joined #ruby
[21:49:37] manveru: has joined #ruby
[21:50:05] claudiuinberlin: has joined #ruby
[21:50:25] zanshin: I know you can say `if blah =~ /regex/` to test using regex. How do I do the same thing with a hash, e.g., `hash.key?(/regex/)` ?
[21:51:45] apeiros: zanshin: that'll be really inefficient. hash.keys.grep(/regex/)
[21:51:48] apeiros: will give you all matching keys
[21:52:09] zanshin: apeiros: Ah - I didn't know about .grep. Thanks
[21:52:28] elomatreb: #grep is great
[21:52:56] clemens3: has joined #ruby
[21:53:02] apeiros: yupp. it is. it's the more specialized sister of .select { |key| key =~ /regex/ }
[21:53:21] apeiros: (technically of .select { |key| /regex/ === key })
[21:54:28] kinbiko: has joined #ruby
[21:54:46] kozrar: has joined #ruby
[21:56:17] kozrar: has joined #ruby
[21:56:24] safetypin: has joined #ruby
[21:57:00] jnyw: has joined #ruby
[21:57:32] kozrar: has joined #ruby
[22:02:06] cagomez: has joined #ruby
[22:02:18] mtkd: has joined #ruby
[22:02:32] rigby: has joined #ruby
[22:04:59] lupine: has joined #ruby
[22:05:43] xco: has left #ruby: ()
[22:07:07] rigby: dinuoso , also do not sleep
[22:08:06] dminuoso: Well, sleep just invokes hlt a low power mode that a cpu can be woken up from by any interrupt.
[22:08:23] dminuoso: That is unless there's other important things to do.
[22:08:27] dminuoso: Like, cleaning.
[22:08:57] rigby: not everywhere
[22:09:18] chocoelho1: has joined #ruby
[22:09:18] ramfjord: has joined #ruby
[22:09:36] rigby: you're right
[22:10:03] lupine: has joined #ruby
[22:10:52] nofxx1: has joined #ruby
[22:13:23] kitsunenokenja: has joined #ruby
[22:20:42] eckhardt: has joined #ruby
[22:20:43] goyox86: has joined #ruby
[22:20:52] DTZUZO: has joined #ruby
[22:24:46] rrichardsr3: has joined #ruby
[22:26:50] tomphp: has joined #ruby
[22:34:52] mtkd: has joined #ruby
[22:35:49] Exhiled: has joined #ruby
[22:36:05] paradisaeidae: has joined #ruby
[22:36:12] paradisaeidae_: has joined #ruby
[22:37:22] goyox86: has joined #ruby
[22:38:19] TomyLobo: actually sleep doesn't do that. it rather returns control to the OS to assign another task
[22:38:46] TomyLobo: unless you're talking about some sleep i am not aware of :)
[22:39:15] TomyLobo: oh, you are
[22:40:00] apeiros: might still apply :D
[22:41:11] mtkd: has joined #ruby
[22:41:49] havenwood: on the topic of #grep, it's exciting that similar functionality is coming to other Enumerable methods: https://medium.com/@baweaver/new-in-enumerable-triple-equals-predicates-c1fcd0eabf6d
[22:42:07] miskatonic: has joined #ruby
[22:42:07] eckhardt: has joined #ruby
[22:42:07] kitsunenokenja: has joined #ruby
[22:42:07] cagomez: has joined #ruby
[22:42:07] johnny56_: has joined #ruby
[22:42:07] houhoulis: has joined #ruby
[22:42:07] silvermine: has joined #ruby
[22:42:07] despai_: has joined #ruby
[22:42:07] workmad3: has joined #ruby
[22:42:07] Flashynuff: has joined #ruby
[22:42:07] dinfuehr: has joined #ruby
[22:42:07] marr: has joined #ruby
[22:42:07] Guest37853: has joined #ruby
[22:42:07] naprimer: has joined #ruby
[22:42:07] beaorn: has joined #ruby
[22:42:08] my123: has joined #ruby
[22:42:08] half-a-pony: has joined #ruby
[22:42:08] toogley: has joined #ruby
[22:42:08] livcd: has joined #ruby
[22:42:08] jordanm: has joined #ruby
[22:42:08] jokke: has joined #ruby
[22:42:08] crayfishx: has joined #ruby
[22:42:08] mochiyoda_: has joined #ruby
[22:42:08] FifthWall: has joined #ruby
[22:42:08] Seich: has joined #ruby
[22:42:08] gremax: has joined #ruby
[22:42:08] davic: has joined #ruby
[22:42:08] Lyfe: has joined #ruby
[22:42:08] synstack: has joined #ruby
[22:42:08] scorphus: has joined #ruby
[22:42:08] nikivi: has joined #ruby
[22:42:08] skawa: has joined #ruby
[22:42:08] heyimwill: has joined #ruby
[22:42:08] TheMoonMaster: has joined #ruby
[22:42:08] Phage: has joined #ruby
[22:42:08] DukeDave: has joined #ruby
[22:42:09] mitsuhiko: has joined #ruby
[22:42:09] mrsolo: has joined #ruby
[22:42:09] pmarreck: has joined #ruby
[22:42:09] incomprehensibly: has joined #ruby
[22:42:09] nOgAnOo: has joined #ruby
[22:42:09] HalcyonicStorm: has joined #ruby
[22:42:09] afisher: has joined #ruby
[22:42:09] drale2k: has joined #ruby
[22:42:09] tbuehlmann: has joined #ruby
[22:42:09] RealMarc: has joined #ruby
[22:42:09] rflot: has joined #ruby
[22:42:09] podman[USC]: has joined #ruby
[22:42:09] bougyman: has joined #ruby
[22:42:09] cybergeeek: has joined #ruby
[22:42:12] sindork: has joined #ruby
[22:42:14] A124: has joined #ruby
[22:42:21] kitallis: has joined #ruby
[22:42:35] A124: has joined #ruby
[22:43:06] jenrzzz: has joined #ruby
[22:44:34] bokayio: has joined #ruby
[22:44:57] pastorinni: has joined #ruby
[22:45:23] clemens3: has joined #ruby
[22:45:48] bazz_: has joined #ruby
[22:48:38] pastorin_: has joined #ruby
[22:50:24] DTZUZO: has joined #ruby
[22:58:55] nwm: has joined #ruby
[23:01:01] orbyt_: has joined #ruby
[23:04:50] TomyLobo2: has joined #ruby
[23:06:02] miskaton`: has joined #ruby
[23:07:23] chocoelho: has joined #ruby
[23:08:01] goyox86: has joined #ruby
[23:10:43] _aeris_: has joined #ruby
[23:13:53] raul782: has joined #ruby
[23:14:39] dminuoso: >> require 'set'; ℕ = Set.new [1]
[23:14:42] ruby[bot]: dminuoso: # => #<Set: {1}> (https://eval.in/914905)
[23:14:45] dminuoso: So why I have not used utf8 characters like this before?
[23:15:08] dminuoso: >> Π = nil
[23:15:09] ruby[bot]: dminuoso: # => nil (https://eval.in/914906)
[23:16:29] ezrios: has joined #ruby
[23:17:02] ramfjord: has joined #ruby
[23:17:19] ezrios: Can anyone recommend a good resource for understanding how BigDecimal is implemented in Ruby?
[23:17:47] Papierkorb: isn't the BigX stuff based on libgmp?
[23:18:11] eckhardt: has joined #ruby
[23:18:18] dminuoso: >> Τ = 6.28318; Object.const_get(:Τ)
[23:18:19] ruby[bot]: dminuoso: # => wrong constant name Τ (NameError) ...check link for more (https://eval.in/914908)
[23:18:43] ezrios: Is it? If so I imagine libgmp should be quite well documented
[23:19:07] apeiros: dminuoso: because constant must start with A-Z, not \p{upper}
[23:20:41] Papierkorb: ezrios: I guessed wrong, it's custom https://github.com/ruby/bigdecimal/blob/master/ext/bigdecimal/bigdecimal.c
[23:20:53] dminuoso: apeiros: :(
[23:22:05] ezrios: Papierkorb: OK, thanks. I guess I'll have to do some digging
[23:22:54] ramfjord: has joined #ruby
[23:23:07] goyox86: has joined #ruby
[23:23:49] ezrios: I guess I have a followup question - is Ruby BigDecimal subject to loss of significance or catastrophic cancellation when using a fixed precision?
[23:24:40] ezrios: Fixed number of sigdigs I should say
[23:24:49] Crash1hd: has left #ruby: ("Leaving")
[23:26:31] oetjenj: has joined #ruby
[23:30:44] raul782: has joined #ruby
[23:31:25] milardovich: has joined #ruby
[23:33:58] webguynow: has joined #ruby
[23:35:05] skweek: has joined #ruby
[23:35:10] mim1k: has joined #ruby
[23:38:26] 14WABU5GK: has joined #ruby
[23:39:58] tomphp: has joined #ruby
[23:43:23] cschneid: has joined #ruby
[23:46:48] tacoboy: has joined #ruby
[23:47:17] ramfjord: has joined #ruby
[23:53:59] pilne: has joined #ruby
[23:54:55] sanscoeur: has joined #ruby
[23:57:47] goyox86: has joined #ruby