« Back to channel list

#ruby - 29 September 2017

« Back 1 day Forward 1 day »
[00:00:37] jrabe: has joined #ruby
[00:02:59] bruno-: has joined #ruby
[00:09:22] cdg: has joined #ruby
[00:13:01] tolerablyjake: has joined #ruby
[00:16:48] enko: would love to hear peoples preferred IDE for OSX & Ruby
[00:16:57] raul782: has joined #ruby
[00:17:43] raul782: has joined #ruby
[00:18:13] SeepingN: no IDE here, just Sublime Text. But I'd probably revisit RubyMines if I were doing more rails type stuff
[00:22:29] griffindy: has joined #ruby
[00:23:06] bronson: has joined #ruby
[00:25:18] enko: it's 5 o
[00:25:23] enko: somewhere
[00:29:13] duckpupp1: has joined #ruby
[00:34:05] coderphive: has joined #ruby
[00:38:40] jphase: has joined #ruby
[00:38:53] eckhardt: has joined #ruby
[00:42:15] Jameser: has joined #ruby
[00:47:35] p0p0pr37: has joined #ruby
[00:47:35] p0p0pr37: has joined #ruby
[00:49:53] Cohedrin_: has joined #ruby
[00:53:02] jphase_: has joined #ruby
[00:55:49] nchambers: I just use sublime and irb
[00:55:51] nchambers: sometimes nano
[01:02:21] johnbox: has joined #ruby
[01:04:49] jphase: has joined #ruby
[01:04:56] gizmore: has joined #ruby
[01:05:26] nertzy: has joined #ruby
[01:05:48] csk: has joined #ruby
[01:07:02] havenwood: enko: I find many Rubyists using vim, though others like emacs, atom, sublime, etc are popular.
[01:07:23] bmurt: has joined #ruby
[01:07:49] havenwood: enko: A text editor with plugins paired with a command line is a popular choice.
[01:08:48] millerti: has joined #ruby
[01:09:29] halt: has joined #ruby
[01:09:33] havenwood: enko: This recent RubyKaigi talk covers some possible options for neat stuff in editors in the future with Ruby: https://www.youtube.com/watch?v=k9WEDRMvanM
[01:09:36] nankyoku_: has joined #ruby
[01:10:29] ironcamel: has joined #ruby
[01:10:33] tamouse__: has joined #ruby
[01:11:41] cagomez: has joined #ruby
[01:17:04] jphase_: has joined #ruby
[01:18:13] milardovich: has joined #ruby
[01:20:28] Heph_: has joined #ruby
[01:25:13] cagomez: has joined #ruby
[01:26:42] d^sh: has joined #ruby
[01:27:08] joelwallis: has joined #ruby
[01:27:45] juggler: has joined #ruby
[01:30:53] mim1k: has joined #ruby
[01:31:51] jphase: has joined #ruby
[01:32:31] cagomez: has joined #ruby
[01:32:36] Defenestrate: has joined #ruby
[01:33:18] chmurifree: has joined #ruby
[01:37:24] bmurt: has joined #ruby
[01:41:21] cagomez: has joined #ruby
[01:43:17] xco: has joined #ruby
[01:45:41] xco: hi. in this https://gist.github.com/xcobar/6b747ccab81b83a2a6c96df991ec9f46 i am getting ArgumentError: comparison of String with String failed. i checked a similar issue on SO here: https://stackoverflow.com/questions/26989922/ruby-comparison-of-string-with-string-failed-argumenterror and in the accepted answer he’s only returning firstBook <=> secondBook so why am i getting that error?
[01:49:10] mkaito: hey is there something more succinct than `foo = bar if bar`?
[01:49:29] mkaito: that is, set foo to bar unless bar is falsey, presumably nil
[01:52:05] cagomez: has joined #ruby
[01:54:29] harai: has joined #ruby
[01:55:23] bmurt: has joined #ruby
[01:59:27] raul782: has joined #ruby
[02:00:56] kies: has joined #ruby
[02:02:45] cagomez: has joined #ruby
[02:10:52] enterprisey: has joined #ruby
[02:13:01] tamouse__: has joined #ruby
[02:14:22] jphase_: has joined #ruby
[02:17:18] orbyt_: has joined #ruby
[02:19:36] AnoHito_: has joined #ruby
[02:19:41] j416: has joined #ruby
[02:26:04] reaVer: has joined #ruby
[02:29:15] Nuck: has joined #ruby
[02:33:37] Emmanuel_Chanel: has joined #ruby
[02:33:57] Defenestrate: has joined #ruby
[02:34:12] j416: has joined #ruby
[02:34:45] cdg: has joined #ruby
[02:37:51] jinie: has joined #ruby
[02:45:03] guardianx: has joined #ruby
[02:51:03] Defenestrate: has joined #ruby
[02:52:14] Defenestrate: has joined #ruby
[02:52:14] Defenestrate: has joined #ruby
[03:08:22] bronson: has joined #ruby
[03:08:38] govg: has joined #ruby
[03:13:54] gnufied: has joined #ruby
[03:19:47] bambanx: has joined #ruby
[03:21:22] treeveins: has joined #ruby
[03:22:33] tcopeland: xco: perhaps the objects in locations have overridden the comparison operator?
[03:22:37] tcopeland: >> class String ; def <=>(s2) ; nil ; end ; end ; ["1", "2"].sort {|a,b| a <=> b }
[03:22:38] ruby[bot]: tcopeland: # => comparison of String with String failed (ArgumentError) ...check link for more (https://eval.in/870733)
[03:23:27] jenrzzz: has joined #ruby
[03:23:27] jenrzzz: has joined #ruby
[03:25:36] treeveins: first time caller. i'm trying to extract a value from a key-value pair after retrieving using httparty. not quite sure how to do it though. help?
[03:26:07] _aeris_: has joined #ruby
[03:26:40] xco: tcopeland: thank you :)
[03:26:58] jdawgaz: has joined #ruby
[03:30:32] uneeb: has joined #ruby
[03:31:29] mim1k: has joined #ruby
[03:31:55] xco: has joined #ruby
[03:32:04] gix: has joined #ruby
[03:35:28] bmurt: has joined #ruby
[03:40:40] havenwood: treeveins: probably deserialize it and then check that key's value
[03:40:44] havenwood: treeveins: JSON?
[03:41:36] havenwood: treeveins: HTTParty has some fancy JSON stuff if you want to use that instead of doing it straightforwardly.
[03:42:51] gr33n7007h: has joined #ruby
[03:47:07] havenwood: treeveins: HTTParty.get('https://swapi.co/api/people/1')['name'] #=> "Luke Skywalker"
[03:49:54] havenwood: treeveins: Or the long-form way: JSON.parse(HTTParty.get('https://swapi.co/api/people/1').to_s)['name']
[03:50:11] havenwood: (Same result.)
[03:56:44] smelnicki: has joined #ruby
[03:58:53] smelnicki: has joined #ruby
[03:59:05] gusrub: has joined #ruby
[03:59:52] cagomez: has joined #ruby
[04:02:40] treeveins: thanks, all. i'll poke around with those suggestions. in case it changes anything, here's an example of what i'm pulling and then looking through... page = HTTParty.get('https://itunes.apple.com/lookup?id=1224213087')
[04:03:59] tamouse__: has joined #ruby
[04:06:54] milardovich: has joined #ruby
[04:14:50] ramfjord: has joined #ruby
[04:15:05] kies: has joined #ruby
[04:16:26] rgr: has joined #ruby
[04:21:04] ramfjord: has joined #ruby
[04:21:58] ElDoggo: has joined #ruby
[04:23:36] bronson: has joined #ruby
[04:25:53] alfiemax: has joined #ruby
[04:27:17] alfiemax: nee some help formating a date object to look like "2017-09-27T23:59:59.999"
[04:28:59] alfiemax_: has joined #ruby
[04:29:45] rgr: has joined #ruby
[04:29:49] mim1k: has joined #ruby
[04:29:52] Ouchy`w: has joined #ruby
[04:29:56] rabajaj: has joined #ruby
[04:30:23] Dimik: has joined #ruby
[04:30:30] ElDoggo_: has joined #ruby
[04:30:49] elomatreb: Is that just ISO8601? Because there is a prebuilt method for that
[04:31:12] elomatreb: Otherwise, strftime is your friend
[04:31:30] alfiemax_: yea i think that is
[04:31:50] alfiemax_: i did it using strftime.. but was wondering if there in a builtin method
[04:32:13] ledestin: has joined #ruby
[04:32:30] ElDoggo: has joined #ruby
[04:33:20] elomatreb: There is, #iso_8601
[04:33:57] Defenestrate: has joined #ruby
[04:34:51] Defenestrate: has joined #ruby
[04:36:30] ElDoggo__: has joined #ruby
[04:38:29] ElDoggo__: has joined #ruby
[04:40:31] ElDoggo_: has joined #ruby
[04:41:15] cagomez: has joined #ruby
[04:44:31] ElDoggo__: has joined #ruby
[04:46:01] ElDoggo_: has joined #ruby
[04:46:40] noobineer: has joined #ruby
[04:51:01] ElDoggo_: has joined #ruby
[04:52:32] roshanavand1: has joined #ruby
[04:53:22] csk: has joined #ruby
[04:53:37] AnoHito: has joined #ruby
[04:56:39] paradisaeidae: has joined #ruby
[04:56:44] paradisaeidae_: has joined #ruby
[04:56:55] acalycine: has joined #ruby
[04:57:03] ElDoggo: has joined #ruby
[05:00:03] ElDoggo_: has joined #ruby
[05:01:03] ElDoggo__: has joined #ruby
[05:02:52] jdawgaz: has joined #ruby
[05:03:03] ElDoggo: has joined #ruby
[05:03:32] jdawgaz: has joined #ruby
[05:04:04] ElDoggo__: has joined #ruby
[05:04:17] jdawgaz: has joined #ruby
[05:05:05] jdawgaz: has joined #ruby
[05:05:24] tamouse__: has joined #ruby
[05:05:55] jdawgaz: has joined #ruby
[05:06:40] jdawgaz: has joined #ruby
[05:07:32] jdawgaz: has joined #ruby
[05:07:33] ElDoggo: has joined #ruby
[05:08:34] ElDoggo__: has joined #ruby
[05:10:07] enterprisey: has joined #ruby
[05:11:31] gusrub: has joined #ruby
[05:13:07] Bock: has joined #ruby
[05:17:07] ElDoggo: has joined #ruby
[05:20:37] ElDoggo__: has joined #ruby
[05:21:24] Ishido: has joined #ruby
[05:24:56] rgr_: has joined #ruby
[05:26:22] raul782: has joined #ruby
[05:31:22] Defenestrate: has joined #ruby
[05:32:10] Defenestrate: has joined #ruby
[05:32:58] Defenestrate: has joined #ruby
[05:33:09] ElDoggo: has joined #ruby
[05:33:46] Defenestrate: has joined #ruby
[05:34:36] Defenestrate: has joined #ruby
[05:34:40] Defenestrate: has joined #ruby
[05:36:31] jphase: has joined #ruby
[05:36:39] ElDoggo_: has joined #ruby
[05:37:55] cagomez: has joined #ruby
[05:39:46] aupadhye: has joined #ruby
[05:40:07] paolog: has joined #ruby
[05:43:16] capadesu: has joined #ruby
[05:48:48] djbkd: has joined #ruby
[05:50:38] BaconOverflow: has joined #ruby
[05:53:45] ElDoggo: has joined #ruby
[05:56:47] anisha: has joined #ruby
[05:57:11] uZiel: has joined #ruby
[05:58:44] ElDoggo: has joined #ruby
[05:59:44] ElDoggo_: has joined #ruby
[06:00:00] psmolen: has joined #ruby
[06:00:44] ElDoggo__: has joined #ruby
[06:03:14] ElDoggo__: has joined #ruby
[06:03:58] vondruch: has joined #ruby
[06:04:13] ElDoggo: has joined #ruby
[06:05:14] ElDoggo_: has joined #ruby
[06:06:28] milardovich: has joined #ruby
[06:08:28] vondruch: has joined #ruby
[06:08:43] ElDoggo: has joined #ruby
[06:09:44] ElDoggo_: has joined #ruby
[06:11:14] oetjenj: has joined #ruby
[06:11:58] snickers: has joined #ruby
[06:12:26] quobo: has joined #ruby
[06:15:01] psmolen: has joined #ruby
[06:16:32] claudiuinberlin: has joined #ruby
[06:17:46] jphase: has joined #ruby
[06:19:45] ElDoggo_: has joined #ruby
[06:19:51] gusrub: has joined #ruby
[06:21:07] andikr: has joined #ruby
[06:21:16] ElDoggo__: has joined #ruby
[06:22:34] ramfjord: has joined #ruby
[06:24:33] bronson: has joined #ruby
[06:24:38] mostlybadfly: has joined #ruby
[06:24:49] ElDoggo: has joined #ruby
[06:26:08] shime: has joined #ruby
[06:26:46] MarkBilk: has joined #ruby
[06:28:10] ramfjord: has joined #ruby
[06:28:10] rabajaj: has joined #ruby
[06:28:18] oetjenj: has joined #ruby
[06:31:14] naprimer2: has joined #ruby
[06:31:23] alfiemax: has joined #ruby
[06:34:29] ramfjord: has joined #ruby
[06:34:49] ElDoggo_: has joined #ruby
[06:35:02] cdg: has joined #ruby
[06:35:48] ElDoggo: has joined #ruby
[06:36:03] conta: has joined #ruby
[06:39:19] ElDoggo_: has joined #ruby
[06:40:19] ElDoggo__: has joined #ruby
[06:41:19] ElDoggo: has joined #ruby
[06:42:19] ElDoggo__: has joined #ruby
[06:42:37] cjs226: has joined #ruby
[06:43:05] guardianx: has joined #ruby
[06:43:49] ElDoggo__: has joined #ruby
[06:47:33] ^mtkd: has joined #ruby
[06:52:52] ElDoggo_: has joined #ruby
[06:55:34] cjs226: has joined #ruby
[06:59:53] ElDoggo_: has joined #ruby
[07:01:54] ElDoggo__: has joined #ruby
[07:02:35] r7c: has joined #ruby
[07:03:23] ElDoggo: has joined #ruby
[07:06:19] tamouse__: has joined #ruby
[07:06:53] ElDoggo__: has joined #ruby
[07:09:24] ElDoggo: has joined #ruby
[07:10:20] TomyWork: has joined #ruby
[07:10:47] gusrub: has joined #ruby
[07:13:24] ElDoggo_: has joined #ruby
[07:13:39] hinbody: has joined #ruby
[07:14:25] ElDoggo: has joined #ruby
[07:15:55] ElDoggo__: has joined #ruby
[07:21:21] dionysus69: has joined #ruby
[07:24:37] mark_66: has joined #ruby
[07:24:56] ElDoggo_: has joined #ruby
[07:26:56] ElDoggo: has joined #ruby
[07:28:21] Caius: has joined #ruby
[07:28:21] Caius: has joined #ruby
[07:33:55] quiqua: has joined #ruby
[07:34:46] shime: has joined #ruby
[07:35:44] ramfjord: has joined #ruby
[07:36:27] harai: has joined #ruby
[07:38:28] ElDoggo: has joined #ruby
[07:39:35] ShalokShalom: has joined #ruby
[07:41:36] ramfjord: has joined #ruby
[07:47:26] alfiemax: has joined #ruby
[07:47:46] ramfjord: has joined #ruby
[07:48:48] jenrzzz: has joined #ruby
[07:49:48] burgestrand: has joined #ruby
[07:50:46] ta: has joined #ruby
[07:57:43] ams__: has joined #ruby
[07:59:56] marr: has joined #ruby
[08:01:15] TomyWork: has joined #ruby
[08:03:55] Silthias1: has joined #ruby
[08:06:43] Silthias: has joined #ruby
[08:07:04] ElDoggo: has joined #ruby
[08:07:39] tamouse__: has joined #ruby
[08:10:04] ElDoggo_: has joined #ruby
[08:14:01] mim1k: has joined #ruby
[08:15:34] tvw: has joined #ruby
[08:16:01] jenrzzz: has joined #ruby
[08:16:01] jenrzzz: has joined #ruby
[08:16:02] mikecmpbll: has joined #ruby
[08:17:04] ElDoggo__: has joined #ruby
[08:18:04] ElDoggo__: has joined #ruby
[08:25:31] bronson: has joined #ruby
[08:28:05] ElDoggo__: has joined #ruby
[08:29:07] ElDoggo__: has joined #ruby
[08:30:08] ElDoggo__: has joined #ruby
[08:34:09] ElDoggo__: has joined #ruby
[08:40:00] lxsameer: has joined #ruby
[08:40:23] jaruga: has joined #ruby
[08:42:39] ElDoggo: has joined #ruby
[08:46:10] ElDoggo__: has joined #ruby
[08:49:00] ramfjord: has joined #ruby
[08:49:40] ElDoggo__: has joined #ruby
[08:50:04] cjs226: has joined #ruby
[08:51:40] ElDoggo__: has joined #ruby
[08:53:09] ElDoggo: has joined #ruby
[08:53:23] Beams: has joined #ruby
[08:56:40] ElDoggo_: has joined #ruby
[09:00:43] jdawgaz: has joined #ruby
[09:03:05] milardovich: has joined #ruby
[09:10:03] uZiel: has joined #ruby
[09:10:43] ElDoggo: has joined #ruby
[09:11:43] ElDoggo_: has joined #ruby
[09:12:07] roshanavand__: has joined #ruby
[09:12:44] ElDoggo__: has joined #ruby
[09:14:14] ElDoggo__: has joined #ruby
[09:15:43] ElDoggo: has joined #ruby
[09:16:45] ElDoggo_: has joined #ruby
[09:17:00] Valkyrie_: has joined #ruby
[09:17:45] ElDoggo__: has joined #ruby
[09:18:22] shinnya: has joined #ruby
[09:18:44] ElDoggo__: has joined #ruby
[09:19:41] Tempesta: has joined #ruby
[09:20:44] ElDoggo: has joined #ruby
[09:22:37] quobo: has joined #ruby
[09:22:46] ElDoggo__: has joined #ruby
[09:23:10] Serpent7776: has joined #ruby
[09:24:45] ElDoggo__: has joined #ruby
[09:25:44] ElDoggo: has joined #ruby
[09:27:47] ElDoggo_: has joined #ruby
[09:27:55] jenrzzz: has joined #ruby
[09:27:55] jenrzzz: has joined #ruby
[09:28:46] ElDoggo__: has joined #ruby
[09:32:19] rabajaj: has joined #ruby
[09:35:53] jenrzzz: has joined #ruby
[09:35:53] jenrzzz: has joined #ruby
[09:46:50] rikkipitt: has joined #ruby
[09:48:19] ElDoggo_: has joined #ruby
[09:54:15] paranoicsan: has joined #ruby
[10:00:22] ElDoggo: has joined #ruby
[10:08:13] pabs: has joined #ruby
[10:08:46] syndikate: has joined #ruby
[10:08:54] tamouse__: has joined #ruby
[10:09:23] ElDoggo: has joined #ruby
[10:10:47] cats: has joined #ruby
[10:11:06] Miron: has joined #ruby
[10:11:23] ElDoggo_: has joined #ruby
[10:13:30] rikkipitt: has joined #ruby
[10:14:06] NightMonkey: has joined #ruby
[10:14:23] ElDoggo: has joined #ruby
[10:15:53] ElDoggo__: has joined #ruby
[10:16:12] r7c: has joined #ruby
[10:17:55] ElDoggo_: has joined #ruby
[10:18:35] Jameser: has joined #ruby
[10:20:23] ElDoggo: has joined #ruby
[10:21:58] solos: has joined #ruby
[10:23:23] ElDoggo_: has joined #ruby
[10:24:55] ElDoggo: has joined #ruby
[10:26:39] xco: has joined #ruby
[10:28:14] charliesome: has joined #ruby
[10:29:43] Jameser: has joined #ruby
[10:30:00] anisha: has joined #ruby
[10:30:33] FastJack: has joined #ruby
[10:35:25] cdg: has joined #ruby
[10:36:57] xco: has joined #ruby
[10:40:20] biberu: has joined #ruby
[10:42:28] ElDoggo: has joined #ruby
[10:44:40] doublemalt_: has joined #ruby
[10:45:35] elsevero: has joined #ruby
[10:47:19] gr33n7007h: has joined #ruby
[10:48:15] digitalowl: has joined #ruby
[10:48:27] ElDoggo: has joined #ruby
[10:48:43] digitalowl: Hello, guys. Who can help me with 'require' and autoloading modules?
[10:50:04] ramfjord: has joined #ruby
[10:50:13] elomatreb: 1. State your problem, don't ask to ask. 2. Autoloading isn't exactly common in Ruby, generally explicit requires for everything are used
[10:50:29] ElDoggo__: has joined #ruby
[10:51:31] ElDoggo__: has joined #ruby
[10:52:20] digitalowl: Ok, sorry for my mistake. I have two linux distros in prod - Arch and CentOS. On each distro I have same versions of ruby (2.0.0) and gems. I use rails for some applications and run same code on each distros.
[10:52:31] ElDoggo__: has joined #ruby
[10:53:13] digitalowl: And I have a problem with module Resolv. On CentOS in rails console thats module is loaded by default, but on Arch is not and application don't working.
[10:57:14] sepp2k: has joined #ruby
[11:02:58] john__: has joined #ruby
[11:04:28] apparition: has joined #ruby
[11:06:11] gr33n7007h: has joined #ruby
[11:07:52] raz: has left #ruby: ("*fump*")
[11:08:02] ElDoggo: has joined #ruby
[11:08:32] charliesome: has joined #ruby
[11:09:59] tamouse__: has joined #ruby
[11:12:16] johnbox: has joined #ruby
[11:13:03] ElDoggo: has joined #ruby
[11:13:53] tvw: has joined #ruby
[11:14:03] ElDoggo__: has joined #ruby
[11:28:24] rrichardsr3: has joined #ruby
[11:28:32] MarkBilk_: has joined #ruby
[11:29:20] rabajaj: has joined #ruby
[11:30:46] dtzuzu: has joined #ruby
[11:35:10] ElDoggo__: has joined #ruby
[11:45:51] DoubleMalt: has joined #ruby
[11:46:09] govg: has joined #ruby
[11:50:22] frojnd: I have a question regarding each loops in ruby,... let say I see syntax like this on a wiki: `for j = i2, i2+i, i2+2i, i2+3i, ..., not exceeding n:` how would I implement this in ruby with each loop?
[11:51:00] teatime: I have no idea what that's supposed to do.
[11:51:08] ramfjord: has joined #ruby
[11:52:45] dionysus69: has joined #ruby
[11:56:31] Silthias1: has joined #ruby
[11:56:50] frojnd: well first, it's a pseudocode and I paste it as an example, j would be index from current for loop and i from previous for loop
[11:58:06] Caius: outer.each { |items| items.each do { |item| … } }
[11:58:21] frojnd: For example `for i = 2, 3, 4, ..., not exceeding √n:` would be in ruby smth like this: (2..Math.sqrt(@input)).to_a.each.with_index { |num, i| ... }
[11:59:36] Beams_: has joined #ruby
[11:59:51] jphase: has joined #ruby
[12:00:56] LastWhisper____: has joined #ruby
[12:02:21] AlienMayn: has joined #ruby
[12:03:15] Beams: has joined #ruby
[12:03:42] AlienMayn: Newbie question: How do I check if an array element within an array of arrays holds the last index position?
[12:05:46] lupine: ary.last == thingy ?
[12:05:53] synthroid: has joined #ruby
[12:05:58] tobiasvl: AlienMayn: not sure what you mean but: foo.last.last == element ?
[12:07:27] AlienMayn: tobiasvl: Thanks. Really, silly of me, I forgot that ='s should be double. Thanks a bunch!
[12:07:54] cagomez: has joined #ruby
[12:08:13] synthroid: has joined #ruby
[12:11:29] vb333: has joined #ruby
[12:12:28] tobiasvl: that's an important difference.
[12:12:33] tobiasvl: oh, they quit.
[12:13:33] jphase: has joined #ruby
[12:14:33] jinie: has joined #ruby
[12:18:18] BackEndCoder: has joined #ruby
[12:22:00] thinkpad: has joined #ruby
[12:22:06] ta: has joined #ruby
[12:24:23] ur5us: has joined #ruby
[12:26:15] mson: has joined #ruby
[12:27:19] jphase: has joined #ruby
[12:27:30] gnufied: has joined #ruby
[12:27:46] bronson: has joined #ruby
[12:27:54] xco: has left #ruby: ()
[12:28:53] truenito: has joined #ruby
[12:28:59] nertzy: has joined #ruby
[12:32:46] InfinityFye: has joined #ruby
[12:34:03] skweek: has joined #ruby
[12:35:18] skweek: has joined #ruby
[12:41:06] jphase: has joined #ruby
[12:42:05] cpruitt: has joined #ruby
[12:42:42] Beams: has joined #ruby
[12:43:08] frojnd: While I'm here... I have a hash { 1 => "true", 5 => "false", 2 => "true } What I would like to do is return the same hash where values are true
[12:44:00] ShalokShalom_: has joined #ruby
[12:44:04] fmcgeough: has joined #ruby
[12:44:04] bruno-: has joined #ruby
[12:44:30] Sylario: has joined #ruby
[12:44:50] nasaa: has joined #ruby
[12:45:11] nasaa: has left #ruby: ()
[12:46:16] cadillac_: has joined #ruby
[12:46:45] griffindy: has joined #ruby
[12:46:58] frojnd: reject it is
[12:47:33] tobiasvl: reject or select
[12:48:53] tobiasvl: hash.select { |k, v| v }
[12:50:26] frojnd: or maybe select is even more appropriate in my case, thank you
[12:51:51] ramfjord: has joined #ruby
[12:54:31] tcopeland: has joined #ruby
[12:54:52] jphase: has joined #ruby
[12:56:26] bmurt: has joined #ruby
[13:01:08] cdg: has joined #ruby
[13:01:40] cjs226: has joined #ruby
[13:02:04] tamouse__: has joined #ruby
[13:03:04] frojnd: Anyone dare to check my Sieve algorithm for primes? https://repl.it/LQ0s/10 for one reason when I enter Sieve.new(10).primes I get wrong numbers
[13:03:47] MarkBilk_: s = "abcdef"; t = s ; s.slice! "cd" ; puts t # prints abef -- t is an alias of s # had to do t = "#{s}" to assign the value of s to a different variable.
[13:04:01] jphase: has joined #ruby
[13:04:22] MarkBilk_: This seems silly. Is there a better way?
[13:06:45] uZiel: has joined #ruby
[13:07:03] ta: has joined #ruby
[13:07:07] _aeris_: has joined #ruby
[13:09:50] cpruitt: has joined #ruby
[13:11:04] AnotherNick: has joined #ruby
[13:11:38] chouhoulis: has joined #ruby
[13:11:58] cdg_: has joined #ruby
[13:14:41] ljarvis: MarkBilk_: I don't really understand your question. t and s will be the same value, so why would you do t = "#{s}" ?
[13:14:51] tobiasvl: MarkBilk_: not sure what you mean exactly, the code you pasted is the behavior you don't want, and you used interpolation as a workaround?
[13:14:56] tobiasvl: are you looking for s.dup ?
[13:15:22] ljarvis: looks like it
[13:15:38] ljarvis: t = s.dup # MarkBilk_, now you can change them independantly
[13:15:44] burgestrand: MarkBilk_ String#sub will allow you to remove a substring from a string, and it returns a duplicate, keeping the original intact
[13:16:30] burgestrand: >> "abcdef".sub("cd", "")
[13:16:31] ruby[bot]: Burgestrand: # => "abef" (https://eval.in/871084)
[13:17:59] FahmeF_: has joined #ruby
[13:18:04] phaul: has joined #ruby
[13:20:16] FahmeF: has joined #ruby
[13:21:11] phaul: hi all, I'm trying to write yard for a C extension, and I'm struggling a bit with @param, and where to write it in the first place. Does it go to rb_define_method or the actual C function? Is there some code on github that I can use as a reference?
[13:21:40] apparition: has joined #ruby
[13:21:52] gnufied: has joined #ruby
[13:22:29] jphase: has joined #ruby
[13:24:14] phaul: with writing @params before rb_define_method, it actually generates the right string but with warnings on the terminal..
[13:24:26] phaul: s/string/thing/
[13:26:28] elomatreb: has joined #ruby
[13:29:38] csk: has joined #ruby
[13:29:50] raul782: has joined #ruby
[13:30:03] DLSteve: has joined #ruby
[13:30:22] ResidentBiscuit: has joined #ruby
[13:30:37] marcux: has joined #ruby
[13:31:33] ResidentBiscuit: has joined #ruby
[13:31:58] ResidentBiscuit: has joined #ruby
[13:32:16] chouhoul_: has joined #ruby
[13:32:23] ResidentBiscuit: has joined #ruby
[13:32:37] tvw: has joined #ruby
[13:34:47] elomatreb: has joined #ruby
[13:36:12] jphase: has joined #ruby
[13:38:12] raul782: has joined #ruby
[13:38:24] rippa: has joined #ruby
[13:38:29] f3ttX]: has joined #ruby
[13:45:16] jphase: has joined #ruby
[13:46:55] roshanavand__: has joined #ruby
[13:47:54] sysvalve: has joined #ruby
[13:52:14] Jameser: has joined #ruby
[13:54:48] jdawgaz: has joined #ruby
[13:56:11] aupadhye: has joined #ruby
[13:58:25] oleo: has joined #ruby
[13:59:06] jphase: has joined #ruby
[13:59:40] orbyt_: has joined #ruby
[14:00:44] jrafanie: has joined #ruby
[14:01:56] truenito: has joined #ruby
[14:03:22] synthroid: has joined #ruby
[14:03:31] tamouse__: has joined #ruby
[14:03:54] claudevandort: has joined #ruby
[14:05:55] Rapture: has joined #ruby
[14:06:09] ramfjord: has joined #ruby
[14:08:57] snickers: has joined #ruby
[14:12:07] ramfjord: has joined #ruby
[14:12:10] Junaos: has joined #ruby
[14:12:53] jphase: has joined #ruby
[14:13:15] lxsameer: has joined #ruby
[14:16:15] phaul: nm, figured it out :) one has to use @overload for instance methods
[14:18:24] ramfjord: has joined #ruby
[14:21:11] FrostCandy: has joined #ruby
[14:22:23] gigetoo: has joined #ruby
[14:26:26] Axy: has joined #ruby
[14:26:36] jphase: has joined #ruby
[14:26:47] mtkd: has joined #ruby
[14:27:02] r_rios: has joined #ruby
[14:27:58] chouhoulis: has joined #ruby
[14:27:59] r_rios: Hello, all. Is there a pure Ruby gem (or, at least, a Ruby gem with very few native deps) to create simple GUI dialogs?
[14:28:05] r_rios: To be clear, I don't want a full-fledged GUI toolkit, just dialogs
[14:29:12] bronson: has joined #ruby
[14:31:31] jphase: has joined #ruby
[14:32:57] imode: has joined #ruby
[14:37:24] havenwood: r_rios: Ruby shipped with Tk in the stdlib until 2.4.
[14:37:52] havenwood: r_rios: They gemified it since there are other contenders now.
[14:38:20] r_rios: Which are those
[14:38:42] havenwood: the usual suspects
[14:38:52] havenwood: gtk2, wx, qt
[14:38:55] elomatreb: You could shell out to something like zenity for quick and dirty dialogs
[14:39:25] theunraveler: has joined #ruby
[14:39:52] rrichardsr3: has joined #ruby
[14:40:12] havenwood: r_rios: There's a Rubyish solution to guis called Shoes, and there are many versions of that as well. They'll wrap one or more of the other gui libs.
[14:40:15] havenwood: All types of shoes.
[14:40:28] jphase: has joined #ruby
[14:41:14] chouhoul_: has joined #ruby
[14:41:15] havenwood: Here's a modern shoes, Shoes4, for just JRuby at the moment: https://github.com/shoes/shoes4
[14:42:01] dinfuehr: has joined #ruby
[14:42:13] r_rios: havenwood, I've taken a look at shoes, but I really just want to add a bunch of dialogs to a script
[14:42:45] r_rios: Not write a GUI application, which seems to be the purpose of shoes
[14:43:08] havenwood: r_rios: elomatreb's suggestion is good for what you're doing
[14:43:34] havenwood: "Gtk+ dialog boxes"
[14:44:09] r_rios: The script is supposed to run on Linux and Windows, though
[14:44:21] r_rios: I don't think Windows has something like zenity
[14:44:58] elomatreb: There's probably a way to do something like than on windows as well, but I doubt you'll find a cross-platform solution like this
[14:45:21] r_rios: Not even Tk?
[14:45:37] ineb: maybe you can write your own wrapper if its really just dialog boxes
[14:45:47] havenwood: r_rios: as long as you don't care much how they look, should be fine
[14:45:48] ineb: for fancy stuff, i would look at qt
[14:45:59] elomatreb: Can you still use the old tk gem or did it break?
[14:46:13] havenwood: r_rios: qt, swt, etc should look fine
[14:46:23] havenwood: elomatreb: You can still use it.
[14:46:28] havenwood: It's just not shipped with 2.4.
[14:46:45] r_rios: Qt's Ruby binding is abandoned, afaik
[14:46:53] havenwood: r_rios: try tk
[14:46:58] r_rios: I'll do that
[14:47:00] havenwood: r_rios: not JRuby or do you care?
[14:47:08] havenwood: r_rios: SWT in JRuby.
[14:47:24] ineb: rwx is another option. (bindings for wxWidgets)
[14:47:33] r_rios: I'm running normal Ruby, so it better not be JRuby, I think
[14:48:03] r_rios: I think I'll go with Tk, since it seems to be the simplest to install
[14:49:26] jphase: has joined #ruby
[14:49:49] r_rios: Thanks for the help, everyone
[14:50:05] r_rios: elomatreb, ineb, and havenwood
[14:54:01] polishdub: has joined #ruby
[14:54:20] jphase: has joined #ruby
[14:54:27] ForeignBiscuit: has joined #ruby
[14:54:56] ForeignBiscuit: has joined #ruby
[14:55:21] ForeignBiscuit: has joined #ruby
[14:55:27] paranoicsan: has joined #ruby
[14:55:46] ForeignBiscuit: has joined #ruby
[14:56:31] paranoicsan: has left #ruby: ()
[15:00:57] rrichard_: has joined #ruby
[15:10:29] MarkBilk_: Is there a way to make the match in String#sub be case-insensitive without using a regex? Because the first argument to sub is full of backslashes.
[15:11:49] havenwood: MarkBilk_: You can use the %r{} form so you don't have to escape slashes.
[15:12:13] ruby[bot]: havenwood: # => /\// (https://eval.in/871174)
[15:12:31] ruby[bot]: havenwood: # => /\//i (https://eval.in/871175)
[15:12:48] kassav_: has joined #ruby
[15:13:03] jphase_: has joined #ruby
[15:13:11] MarkBilk_: Yay! Thanks!
[15:13:39] teatime: MarkBilk_: you can pick-your-own-quotes so you don't have to use {} either if those don't work good for a given a string
[15:15:14] jnollette: has joined #ruby
[15:16:05] alfiemax: has joined #ruby
[15:18:01] ElDoggo: has joined #ruby
[15:18:04] jdawgaz: has joined #ruby
[15:19:25] ramfjord: has joined #ruby
[15:20:09] raul782: has joined #ruby
[15:22:00] chouhoulis: has joined #ruby
[15:22:03] Puffball_: has joined #ruby
[15:22:18] jordanm: has joined #ruby
[15:24:07] orbyt_: has joined #ruby
[15:25:24] ramfjord: has joined #ruby
[15:26:12] TheBrayn: is there a list of characters I can use somewhere?
[15:26:49] havenwood: TheBrayn: Use for what? Why can't you use characters?
[15:27:02] MarkBilk_: havenwood: With %r I'm still getting the same error -- "too short meta escape". Does %r work on backslashes? The example you gave had forward-slash.
[15:27:27] TheBrayn: havenwood: for %r
[15:28:29] teatime: MarkBilk_: hrm, no it doesn't help with backslashes actually
[15:29:08] milardovich: has joined #ruby
[15:29:18] teatime: MarkBilk_: there is Regexp.quote though
[15:29:22] havenwood: MarkBilk_: Can you show us what you're trying to sub?
[15:29:23] moei: has joined #ruby
[15:29:27] raul782: has joined #ruby
[15:29:53] teatime: MarkBilk_: so you can do https://i.kinja-img.com/gawker-media/image/upload/oaemqvdyixjz3af0eujd.jpg
[15:29:57] teatime: bah ignore that
[15:30:21] teatime: MarkBilk_: so you can do Regexp.new(Regexp.escape(str)) or /#{Regexp.escape(str)}/
[15:30:28] teatime: (Regexp.escape and .quote are aliases)
[15:30:37] MarkBilk_: havenwood: A path in MSWindows.
[15:31:38] ramfjord: has joined #ruby
[15:34:46] teatime: TheBrayn: https://ruby-doc.org/core-2.4.2/doc/syntax/literals_rdoc.html#label-Percent+Strings
[15:35:10] havenwood: TheBrayn: Gimme a sec I'll give you a more comprehensive list.
[15:37:26] havenwood: TheBrayn: You can use each of these twice, to open/close: [" ", "!", "\"", "#", "$", "%", "&", "'", ")", "*", "+", ",", "-", ".", "/", ":", ";", "=", ">", "?", "@", "]", "^", "_", "`", "|", "}", "~"]
[15:37:43] havenwood: >> %]example]
[15:37:44] ruby[bot]: havenwood: # => "example" (https://eval.in/871194)
[15:37:59] ramfjord: has joined #ruby
[15:38:11] teatime: >> %aTesta
[15:38:25] havenwood: teatime: SyntaxError: (irb):33: unknown type of %string
[15:39:10] ruby[bot]: elomatreb: # => /tmp/execpad-6153d511774d/source-6153d511774d:3: syntax error, unexpected tCONSTANT, expecting keywo ...check link for more (https://eval.in/871199)
[15:39:23] havenwood: elomatreb: it does work ;-P
[15:39:23] elomatreb: (Bot strips the trailing whitespace, that works Oo)
[15:39:38] cagomez: has joined #ruby
[15:40:04] gusrub: has joined #ruby
[15:40:41] elomatreb: You need to be authed to use the bot
[15:40:42] bmurt: has joined #ruby
[15:40:44] havenwood: AnotherNick: Please only use the bot to demonstrate something for others.
[15:40:55] AnotherNick: havenwood, ok
[15:41:06] jdawgaz: has joined #ruby
[15:41:09] ruby[bot]: you need to be identified with NickServ, see `/msg NickServ HELP` or: https://freenode.net/kb/answer/registration
[15:42:26] gusrub: has joined #ruby
[15:43:20] cadillac__: has joined #ruby
[15:44:12] ramfjord: has joined #ruby
[15:44:24] SURAJIT: has joined #ruby
[15:45:05] claudiuinberlin: has joined #ruby
[15:46:30] MarkBilk_: teatime: Thanks! Regexp.escape worked!
[15:46:43] synthroid: has joined #ruby
[15:47:42] teatime: MarkBilk_: it's a lot of extra chars so it still doesn't make me very happy, but I guess it's about all you got.
[15:47:51] mim1k: has joined #ruby
[15:48:39] r_rios: tk's installation is failing. It failed to build the native gem extension. I think the ruby.h header is missing, but I installed msys when I was asked by RubyInstaller
[15:49:01] dionysus69: has joined #ruby
[15:49:14] Pisuke: has joined #ruby
[15:49:27] elomatreb: havenwood: \t and \n work as well, in a way Oo
[15:49:36] elomatreb: >> eval "%\ntest\n"
[15:49:36] MarkBilk_: teatime: How do you look up regex stuff in ri?
[15:49:37] ruby[bot]: elomatreb: # => "test" (https://eval.in/871208)
[15:49:45] havenwood: elomatreb: \a etc too
[15:50:13] teatime: elomatreb: I noticed \n was in havenwood's list
[15:50:33] elomatreb: This has got to be my favorite syntax quirk, so completely useless yet so complex
[15:50:35] ramfjord: has joined #ruby
[15:50:36] havenwood: >> 256.times.map(&:chr).select { |char| begin; eval("%#{char}#{char}"); rescue SyntaxError; end }
[15:50:42] ruby[bot]: havenwood: # => (eval):1: warning: encountered \r in middle of line, treated as a mere space ...check link for more (https://eval.in/871209)
[15:50:43] teatime: oh, or maybe it was just " " getting word-wrapped
[15:50:49] jrafanie: has joined #ruby
[15:50:49] havenwood: >> 'yikes'.downcase.gsub(/./) { |chr| "[#{chr.downcase}#{chr.upcase}]" }
[15:50:50] ruby[bot]: havenwood: # => "[yY][iI][kK][eE][sS]" (https://eval.in/871210)
[15:51:03] havenwood: MarkBilk_: case insensitive ^ glob >.>
[15:51:18] frojnd: Anyone dare to check my Sieve algorithm for primes? https://repl.it/LQ0s/10 for one reason when I enter Sieve.new(10).primes I get wrong numbers
[15:52:42] frojnd: Sieve.new(10).prime should return [2,3,5,7] instead it returns [2,3,4,5,6,7,8,9,10]
[15:52:54] frojnd: Sieve.new(10).primes
[15:53:02] LazerCat: has left #ruby: ()
[15:53:49] havenwood: frojnd: In your initializer consider making the instance variable name match the local variable name that you're setting it to.
[15:54:17] havenwood: frojnd: `@my_array` is... a Hash!
[15:54:53] havenwood: frojnd: On line 9, you don't need to turn a Range into an Array to use #each. You should omit that #to_a.
[15:55:05] havenwood: frojnd: Same with the other to_a
[15:55:36] havenwood: all of them.
[15:56:12] havenwood: frojnd: You can combine `.each.with_index` into the single method `each_with_index`.
[15:56:57] raul782: has joined #ruby
[15:57:38] havenwood: frojnd: I think these might read better as: `2.upto(stuff_here).with_index` instead of `(2..stuff_here).each_with_index`
[16:00:12] havenwood: frojnd: I think those fixes would make it easier to read and get feedback on.
[16:00:19] goyox86: has joined #ruby
[16:00:57] raynold: has joined #ruby
[16:02:53] Sembei: has joined #ruby
[16:03:03] daveomcd_: has joined #ruby
[16:03:53] AndBobsYourUncle: has joined #ruby
[16:04:45] tamouse__: has joined #ruby
[16:08:29] rt: has joined #ruby
[16:11:18] orbyt_: has joined #ruby
[16:11:36] matthewd: frojnd: In general, if I'm not getting the behaviour I expect, I'd start by adding some puts calls to track what it's actually doing / how it's getting to the value it is
[16:12:26] WebDawg: has joined #ruby
[16:13:03] matthewd: frojnd: Also, is this homework, a book exercise, or a real-world problem?
[16:23:59] bmurt: has joined #ruby
[16:25:18] rrawlins: has joined #ruby
[16:26:32] charliesome: has joined #ruby
[16:27:45] hahuang65: has joined #ruby
[16:28:05] jrafanie_: has joined #ruby
[16:30:16] bronson: has joined #ruby
[16:31:26] Mon_Ouie: has joined #ruby
[16:33:21] nadir: has joined #ruby
[16:39:29] charliesome: has joined #ruby
[16:41:50] ycyclist: has joined #ruby
[16:42:32] ycyclist: How do I check that an object has elements of a certain size? I want to check length, but it has to be length in terms of 256bit items.
[16:44:02] ycyclist: I guess I should be using the term octets.
[16:44:18] tcopeland: has joined #ruby
[16:44:34] troys: has joined #ruby
[16:47:03] chouhoulis: has joined #ruby
[16:47:44] raul782: has joined #ruby
[16:47:55] SeepingN: has joined #ruby
[16:48:53] ycyclist: Going close to the theme that has_a is better than is_a for checking, I want to make sure my size measurement is of octets, as per an RFC requirement.
[16:49:48] teatime: are these elements strings?
[16:50:01] cjs226: has joined #ruby
[16:51:13] ycyclist: I want to make sure it is octet size no matter what. It appears bytesize is a method I may use.
[16:51:24] ycyclist: Typically they will be strings, but no reason to limit it.
[16:51:41] ramfjord: has joined #ruby
[16:51:52] bmurt: has joined #ruby
[16:52:13] teatime: you're being so vague it's impossible to answer, though
[16:52:28] teatime: it's not like every object is required to implement .bytesize or even .size/.length
[16:53:17] ycyclist: Yes, well I have a simple boolean method is_compliant_with_rfc2181? and I want it to fail if it is out of range of 1 to 63 octets.
[16:53:33] charliesome: has joined #ruby
[16:53:40] jdawgaz: has joined #ruby
[16:53:45] ycyclist: The requirement is octets, but the object could have multi-byte charaters in it.
[16:54:23] teatime: I think you should say 'string' instead of object because you clearly mean string.
[16:54:30] jdawgaz: has joined #ruby
[16:55:11] ycyclist: The right way to say it, apparently, is that code points are variable byte size, but the size limit is 1 to 63.
[16:55:20] jdawgaz: has joined #ruby
[16:55:21] ycyclist: Given I will never see a root label.
[16:55:41] ycyclist: size limit 1 to 63 octets.
[16:56:21] mikecmpbll: has joined #ruby
[16:56:25] chouhoul_: has joined #ruby
[16:56:42] ycyclist: But could it be that another object could occur, given some cases may have multi-byte code points? Plus why omit use of daughter objects?
[16:57:17] teatime: talking about "codepoints" already pretty much implies you're talking about strings.
[16:57:31] teatime: anyway, yes, .bytesize seems to be what you're looking for.
[16:59:03] rrichardsr3: has joined #ruby
[17:00:16] gusrub: has joined #ruby
[17:00:48] Quentinius: has joined #ruby
[17:03:34] knight33: has joined #ruby
[17:04:27] Quentinius: Hi, I have two quick questions: I would like to edit content of multiple arrays with one method and then I would like to convert that arrays to string with same formating as it have (it’s just bunch of lines), thanks :)
[17:05:36] Cohedrin_: has joined #ruby
[17:05:49] tamouse__: has joined #ruby
[17:06:51] ghormoon: has joined #ruby
[17:07:16] Mia: has joined #ruby
[17:07:22] raul782: has joined #ruby
[17:07:38] jdawgaz: has joined #ruby
[17:09:59] ledestin: has joined #ruby
[17:10:46] Ishido: has joined #ruby
[17:12:08] ycyclist: Thank you teatime.
[17:14:03] eckhardt: has joined #ruby
[17:19:51] teatime: ycyclist: were you thinking you might get passed something like an array of bytes, and wanted your routine to handle that case too?
[17:19:54] AndBobsYourUncle: has joined #ruby
[17:20:16] frojnd: havenwood: thanx
[17:20:41] frojnd: matthewd: this is me improving ruby by doing exercism :)
[17:20:54] frojnd: Much appreciated all the comments
[17:20:59] audy: has joined #ruby
[17:23:46] gusrub: has joined #ruby
[17:28:25] kies: has joined #ruby
[17:30:44] raul782: has joined #ruby
[17:38:49] snath: has joined #ruby
[17:38:59] snath: has left #ruby: ()
[17:39:04] jenrzzz: has joined #ruby
[17:39:04] jenrzzz: has joined #ruby
[17:39:27] _aeris_: has joined #ruby
[17:40:42] zachk: has joined #ruby
[17:47:26] shortdudey123: has joined #ruby
[17:49:43] claudevandort: has joined #ruby
[17:55:58] orbyt_: has joined #ruby
[17:58:36] Quentinius: has joined #ruby
[18:00:59] LastWhisper____: has joined #ruby
[18:02:24] jeanlinux: has joined #ruby
[18:02:41] _aeris_: has joined #ruby
[18:06:25] raul782: has joined #ruby
[18:06:28] conta3: has joined #ruby
[18:06:51] tamouse__: has joined #ruby
[18:06:53] _aeris_: has joined #ruby
[18:07:18] bmurt: has joined #ruby
[18:07:54] chouhoulis: has joined #ruby
[18:10:57] raul782: has joined #ruby
[18:21:03] cdg: has joined #ruby
[18:21:38] dminuoso_: has joined #ruby
[18:24:24] agent_white: has joined #ruby
[18:24:59] sp4rrow: has joined #ruby
[18:25:32] agent_white: Afternoon' folks
[18:25:59] ramfjord: has joined #ruby
[18:26:43] LastWhisper____: has joined #ruby
[18:31:16] bronson: has joined #ruby
[18:32:41] amirite: has joined #ruby
[18:32:46] amirite: how do i drop into a debugger
[18:32:50] amirite: this is not rails
[18:32:54] sp4rrow: has joined #ruby
[18:33:08] Heph_: has joined #ruby
[18:34:09] Papierkorb: amirite: There's no real debugger. But you can use pry for this using `binding.pry` to drop you into a REPL right there within the scope of that code block. iirc, Ruby2.4 also has `binding.irb` if you don't want/have pry. For both, you need to require the library first
[18:34:18] Papierkorb: I mean, require "pry" or "irb"
[18:34:46] truenito: has joined #ruby
[18:35:34] Papierkorb: amirite, maybe you're interested in the `pry-rescue` gem. Install it, then call your script like `rescue my_script.rb` (So, replace "ruby" with "rescue"). This'll automatically drop you into a pry shell at the #raise-site of an unhandled exception.
[18:36:06] Papierkorb: In any case, you may also enjoy the `pry-stack_explorer` gem. This adds `up` and `down` commands to the pry shell for walking the stack frames :)
[18:38:02] zhunting: has joined #ruby
[18:39:05] zhunting: Hello, does anyone have experience hosting gems on a personal gem server?
[18:39:14] Dimik: has joined #ruby
[18:41:58] amirite: i run vagrant and print out RUBY_VERSION from it and I get 2.2.3
[18:42:12] amirite: but I have 4 different versions of ruby on my system, and i can't find 2.2.3
[18:42:22] amirite: how do I determine or control what version of ruby is getting called with vagrant?
[18:44:04] mson: has joined #ruby
[18:44:26] armyriad: has joined #ruby
[18:44:36] lxsameer: has joined #ruby
[18:45:02] tvw: has joined #ruby
[18:45:08] Stan: has joined #ruby
[18:50:32] orbyt_: has joined #ruby
[18:51:26] AndBobsYourUncle: has joined #ruby
[18:52:20] Stan: has joined #ruby
[18:52:50] Stan: has joined #ruby
[18:54:36] raul782: has joined #ruby
[18:55:13] dviola: has joined #ruby
[18:56:42] LastWhisper____: has joined #ruby
[18:57:29] morfin: has joined #ruby
[18:58:02] shinnya: has joined #ruby
[18:58:18] morfin: i have some issues with json 1.8.3(does not build with 2.3.0 and 2.4.0) - i should upgrade it?
[18:59:52] stanc: has joined #ruby
[19:03:23] Kyle__: details might help
[19:05:22] bmurt: has joined #ruby
[19:05:45] perniciouscaffei: has joined #ruby
[19:06:04] selim: has joined #ruby
[19:06:34] rrichardsr3: has joined #ruby
[19:06:38] stanc: has joined #ruby
[19:10:39] ur5us: has joined #ruby
[19:10:51] phaul: has joined #ruby
[19:12:50] bmurt: has joined #ruby
[19:16:18] stanc: has joined #ruby
[19:17:07] ta: has joined #ruby
[19:18:51] stanc: has joined #ruby
[19:20:53] armyriad: has joined #ruby
[19:24:04] Algebr`: has joined #ruby
[19:26:03] Silthias: has joined #ruby
[19:27:34] stanc: has joined #ruby
[19:27:55] bmurt: has joined #ruby
[19:28:20] morfin: it complains about missing symbols in 2.3.0 / 2.4.1
[19:28:29] havenwood: morfin: update the json gem
[19:30:06] dionysus69: has joined #ruby
[19:37:17] zhunting: When using gem generate_index I run it with a directory that contains a gems folder like it describes I should in the help on it, but it never seems to find the gems, is there something I'm missing about how the command should be used?
[19:40:31] bmurt: has joined #ruby
[19:41:35] oetjenj: has joined #ruby
[19:44:53] ta: has joined #ruby
[19:46:19] arup_r: has joined #ruby
[19:47:11] milardovich: has joined #ruby
[19:51:48] Stan: has joined #ruby
[19:52:48] ahrs: has joined #ruby
[19:56:50] bmurt: has joined #ruby
[19:59:09] claudiuinberlin: has joined #ruby
[20:02:09] claudiuinberlin: has joined #ruby
[20:02:21] kbengala: has joined #ruby
[20:03:11] kbengala: has left #ruby: ()
[20:03:50] ElDoggo: has joined #ruby
[20:04:37] kbengala: has joined #ruby
[20:05:25] kbengala: has left #ruby: ()
[20:06:03] bmurt: has joined #ruby
[20:06:16] rwb: has joined #ruby
[20:06:19] alfiemax: has joined #ruby
[20:08:09] tamouse__: has joined #ruby
[20:10:34] cagomez: has joined #ruby
[20:10:49] VeryBewitching: has joined #ruby
[20:12:08] cagomez: has joined #ruby
[20:12:46] cagomez_: has joined #ruby
[20:13:01] bmurt: has joined #ruby
[20:14:44] milardovich: has joined #ruby
[20:24:23] ElDoggo: has joined #ruby
[20:26:04] cagomez: has joined #ruby
[20:27:20] morfin: can i patch gem when installing?
[20:30:41] r7c: has joined #ruby
[20:31:40] Anthaas: has joined #ruby
[20:32:11] bronson: has joined #ruby
[20:36:39] mkali: has joined #ruby
[20:36:46] AlexRussia: has joined #ruby
[20:37:16] john__: has joined #ruby
[20:40:32] morfin: i need 0.3.21(otherwise activerecord do not load it)
[20:45:00] orbyt_: has joined #ruby
[20:45:17] mkali: has left #ruby: ()
[20:47:23] truenito: has joined #ruby
[20:51:58] cagomez: has joined #ruby
[21:11:13] morfin: i am doing some weird crap to build old gem =\
[21:11:25] eckhardt: has joined #ruby
[21:11:33] milardovich: has joined #ruby
[21:17:56] Axy: has joined #ruby
[21:17:57] Axy: has joined #ruby
[21:20:28] imode: has joined #ruby
[21:21:07] mtkd: has joined #ruby
[21:23:18] eckhardt: has joined #ruby
[21:24:17] eckhardt_: has joined #ruby
[21:28:01] Algebr`: in this: app = Spaceship::Portal.app.create!(bundle_id: "com.krausefx.app_name", name: "fastlane App") does ruby now have named parameters? , like bundle_id:
[21:29:50] Papierkorb: Algebr`: That's just implicit hash notation there. However, Ruby also supports key-word-arguments ("kw-args") since .. 2.1 or 2.2. They're separate from the normal arguments though. Notation mirrors the symbol notation from the call site: `def foo(bar: , baz: "Some default value")`
[21:30:15] Algebr`: but I thought hash notation had to use =>
[21:30:31] Papierkorb: That hasn't been the case for a long time at this point
[21:30:42] Algebr`: so you can use either => or :
[21:30:52] Papierkorb: `:foo => 1` is equivalent to `foo: 1`. Prefer the latter.
[21:31:46] Algebr`: because its newer?
[21:32:08] Papierkorb: Because it's clearer. And has been with us for .. >3 years.
[21:32:47] dionysus70: has joined #ruby
[21:33:06] raul782: has joined #ruby
[21:33:25] Algebr`: so in this case create is a method which is going to mutate app and takes just 1 parameter
[21:34:02] Papierkorb: We can say that #create! is a method. What it does we can't know from just the snippet.
[21:34:08] phaul: has joined #ruby
[21:34:37] fChanX: has joined #ruby
[21:34:38] Algebr`: but I mean from the !
[21:34:46] fChanX: Hello World.
[21:35:46] charliesome: has joined #ruby
[21:36:14] 5EXAAC0LJ: has joined #ruby
[21:39:11] Papierkorb: Algebr`: ..huh? the bang has no effect. It's canonical use indicates possibly unexpected behaviour. It doesn't (always) indicate a change of the underlying structure at all.
[21:42:13] ta: has joined #ruby
[21:43:03] cagomez: has joined #ruby
[21:43:09] Algebr`: I thought the convention in ruby was that ! was a dangerous, possibly mutating method
[21:43:38] Papierkorb: Yes: Possibly. It's a call for attention to the programmer. Nothing else.
[21:45:24] fusta: has joined #ruby
[21:46:30] tobiasvl: it usually means "there is a variant without the ! as well and this one is different"
[21:46:42] tobiasvl: "possibly it's a mutating variation"
[21:46:49] FastJack_: has joined #ruby
[21:47:22] Algebr`: irb is kinda crappy, is there an upped ipython style replacement ?
[21:47:41] tobiasvl: Algebr`: pry?
[21:49:04] SeepingN: pry, or something in between like wirb/wirble
[21:49:15] hahuang65: has joined #ruby
[21:49:19] jenrzzz: has joined #ruby
[21:50:16] mtkd: has joined #ruby
[21:51:18] Algebr`: can pry show me show source
[21:51:57] erlend: has joined #ruby
[21:52:53] Algebr`: like in ipython I can do foo?? and it shows me source code of foo
[21:53:39] amirite: has joined #ruby
[21:53:42] havenwood: ?pry Algebr`
[21:53:42] ruby[bot]: Algebr`: Pry, the better IRB, provides easy object inspection `ls`, `history`, viewing docs `?`, viewing source `$`, syntax highlighting and other features (see `help` for more). Put `binding.pry` in your source code for easy debugging. Install Pry (https://pryrepl.org/): gem install pry pry-doc
[21:53:57] Algebr`: most excellent
[21:54:28] code_zombie: has joined #ruby
[21:55:34] milardovich: has joined #ruby
[21:55:49] Algebr`: assignment is an expression and returns the RHS, correct
[21:57:11] Papierkorb: Have you tried it?
[21:57:21] Algebr`: I did, then asked here for verification
[21:57:26] Algebr`: hence the 'correct'
[21:57:33] Papierkorb: Then you already have your answer.
[21:57:50] Algebr`: I prefer asking knowledgable ruby folks before assuming I'm correct
[21:58:07] chouhoul_: has joined #ruby
[21:58:49] Algebr`: In this code: module Spaceship module Portal class << self, what is self in this instance? Portal?
[21:59:18] Algebr`: and why is it using, what, anonymous classes?
[21:59:21] havenwood: >> module Spaceship; module Portal; p self end end # Algebr`
[21:59:22] ruby[bot]: havenwood: # => Spaceship::Portal ...check link for more (https://eval.in/871306)
[21:59:43] havenwood: >> module Spaceship; module Portal; class << self; p self end end end
[21:59:44] ruby[bot]: havenwood: # => #<Class:Spaceship::Portal> ...check link for more (https://eval.in/871307)
[22:00:16] havenwood: Algebr`: you can put a `bining.pry` or `binding.irb` in there to jump to that point of execution and check: self
[22:00:26] havenwood: Algebr`: Or p-based debug printing like above ^
[22:01:05] havenwood: Algebr`: In your code, Spaceship is just a namespace.
[22:06:58] Stan: has joined #ruby
[22:09:26] Stan: has joined #ruby
[22:11:27] rrichardsr3: has joined #ruby
[22:11:38] enterprisey: has joined #ruby
[22:14:06] goyox86: has joined #ruby
[22:14:19] jenrzzz: has joined #ruby
[22:17:38] jdawgaz: has joined #ruby
[22:19:54] cjs226: has joined #ruby
[22:29:46] goyox86: has left #ruby: ()
[22:30:13] 92AAB3RGC: has joined #ruby
[22:32:04] snath: has joined #ruby
[22:33:21] bronson: has joined #ruby
[22:36:29] cagomez: has joined #ruby
[22:36:53] milardovich: has joined #ruby
[22:39:37] armando1: has joined #ruby
[22:40:17] jdawgaz: has joined #ruby
[22:40:48] cagomez: has joined #ruby
[22:43:20] elsevero: has joined #ruby
[22:44:00] jenrzzz: has joined #ruby
[22:45:42] Stan: has joined #ruby
[22:45:52] Stan: has joined #ruby
[22:47:18] stanc: has joined #ruby
[22:49:37] amirite: has joined #ruby
[22:49:39] amirite: wth is 'new.tap'
[22:49:45] mson: has joined #ruby
[22:49:49] amirite: or wth is the tap method
[22:50:07] havenwood: amirite: tap is like tapping a phoneline
[22:50:18] havenwood: amirite: it doesn't interrupt the conversation
[22:50:57] havenwood: >> 'hi'.reverse.tap { |s| p s }.reverse # amirite
[22:50:58] ruby[bot]: havenwood: # => "ih" ...check link for more (https://eval.in/871314)
[22:51:11] havenwood: amirite: it returns the receiver, unchanged
[22:51:47] havenwood: amirite: what happens in the block stays in the block, or rather is used for side-effects
[22:51:54] stanc: has joined #ruby
[22:52:20] havenwood: >> 42.tap { |n| p n + 1 }
[22:52:21] ruby[bot]: havenwood: # => 43 ...check link for more (https://eval.in/871315)
[22:52:35] havenwood: amirite: does that make any sense?
[22:52:37] jdawgaz: has joined #ruby
[22:52:52] cdg: has joined #ruby
[22:53:06] havenwood: &ri Object#tap
[22:53:06] `derpy: http://ruby-doc.org/core-2.4.1/Object.html#method-i-tap
[22:53:19] havenwood: "Yields self to the block, and then returns self."
[22:53:46] havenwood: amirite: Ruby 2.5 will have an additional method, #yield_self.
[22:54:07] havenwood: 42.yield_self { |n| n + 1 } #=> 43
[22:54:14] havenwood: 42.tap { |n| n + 1 } #=> 42
[22:55:27] havenwood: but unlike #tap, #yield_self can be called without a block
[22:56:05] havenwood: returning a sized enumerator
[22:56:20] havenwood: always with a size of one
[22:56:24] alfiemax: has joined #ruby
[22:56:52] havenwood: >> [42].to_enum { 1 }.first
[22:56:55] ruby[bot]: havenwood: # => 42 (https://eval.in/871321)
[22:57:07] havenwood: 42.yield_self.first #=> 42
[22:57:16] havenwood: 42.yield_self.size #=> 1
[22:58:40] Paraxial: has joined #ruby
[22:59:20] snath: has left #ruby: ("Leaving")
[22:59:24] havenwood: 42.yield_self(&:itself) #=> 42
[22:59:47] raul782: has joined #ruby
[23:00:56] havenwood: https://github.com/graalvm/truffleruby/blob/5debca92567afa47d7c5f7d55925cab24a57af94/src/main/ruby/core/kernel.rb#L482-L493
[23:01:27] havenwood: pure Ruby implementations of #tap and #yield_self in TruffleRuby ^
[23:01:54] griffindy: has joined #ruby
[23:04:01] stan__: has joined #ruby
[23:04:19] milardovich: has joined #ruby
[23:06:59] bmurt: has joined #ruby
[23:07:49] ramfjord: has joined #ruby
[23:10:29] tamouse__: has joined #ruby
[23:11:12] jdawgaz: has joined #ruby
[23:12:11] amirite: no, ruby is full of magic
[23:12:16] amirite: it's worse then perl
[23:12:21] amirite: but I love perl
[23:12:26] amirite: so I can understand why people like ruby
[23:12:50] havenwood: amirite: If a few lines of code is magical? Makes sense to me.
[23:13:42] havenwood: That's not some magical syntactic sugar to implement those methods, it's normal, pure Ruby.
[23:14:59] raynold: has joined #ruby
[23:16:16] jenrzzz: has joined #ruby
[23:16:16] jenrzzz: has joined #ruby
[23:16:28] jinie: has joined #ruby
[23:19:15] stan__: has joined #ruby
[23:20:51] charliesome: has joined #ruby
[23:23:00] bmurt: has joined #ruby
[23:26:04] stan__: has joined #ruby
[23:26:14] jenrzzz: has joined #ruby
[23:26:14] jenrzzz: has joined #ruby
[23:26:29] stan__: has joined #ruby
[23:28:39] ur5us: has joined #ruby
[23:33:11] holgerdanske: has joined #ruby
[23:34:11] hays: has joined #ruby
[23:36:12] armando1: has joined #ruby
[23:38:11] milardovich: has joined #ruby
[23:38:56] neofreak: has joined #ruby
[23:39:59] stan__: has joined #ruby
[23:40:14] holgerdanske: has joined #ruby
[23:41:00] stan_br: has joined #ruby
[23:43:38] stan__: has joined #ruby
[23:45:09] dviola: has joined #ruby
[23:48:40] veex: has joined #ruby
[23:51:13] bruno-: has joined #ruby
[23:53:31] cagomez: has joined #ruby
[23:58:41] orbyt_: has joined #ruby