« Back to channel list

#ruby - 09 May 2019

« Back 1 day Forward 1 day »
[00:00:13] rhuang_: has joined #ruby
[00:15:35] rhuang_: has joined #ruby
[00:23:22] ramfjord: has joined #ruby
[00:24:54] fphilipe: has joined #ruby
[00:25:14] jenrzzz: has joined #ruby
[00:34:13] comet23: has joined #ruby
[00:34:28] comet23: hello everyone
[00:36:11] comet23: how do i "wrap" around values?
[00:36:32] comet23: like let's say i have an array with a range and then it goes out of bounds
[00:36:47] comet23: i want it to go back to the first index and then until x number of desired iterations
[00:36:58] baweaver: Read through Enumerable, see what you find
[00:37:20] comet23: like [1,2,3] iterate 5 times and you start at 0 and you would get the 2nd index with the value of 3
[00:38:07] baweaver: There's a method in there which does pretty well exactly that
[00:38:45] comet23: thank you :)
[00:48:06] budonyc: has joined #ruby
[00:55:41] havenwood: &>> [1, 2, 3].cycle.lazy.drop(5).first
[00:55:44] rubydoc: # => 3 (https://carc.in/#/r/6vlm)
[00:56:44] comet23: i found it... i am trying to incorporate it with a caesar cipher solution
[00:56:53] comet23: i have to go to bed now but i think i will solve it :D
[00:57:28] havenwood: &>> [1, 2, 3].then { |a| a[5 % a.size] }
[00:57:29] rubydoc: # => 3 (https://carc.in/#/r/6vln)
[01:02:12] altigraph: has joined #ruby
[01:26:30] houhoulis: has joined #ruby
[01:42:03] AJA4351: has joined #ruby
[01:46:08] tdy: has joined #ruby
[01:46:47] rhuang_: has joined #ruby
[01:51:11] Jameser: has joined #ruby
[01:54:27] s00pcan: has joined #ruby
[01:55:22] fphilipe: has joined #ruby
[01:57:29] jenrzzz: has joined #ruby
[02:00:24] dhuey: has joined #ruby
[02:00:29] rhuang_: has joined #ruby
[02:01:59] haengma: has joined #ruby
[02:12:13] laaron: has joined #ruby
[02:23:57] budonyc: has joined #ruby
[02:26:54] pwnd_nsfw: has joined #ruby
[02:29:23] dsmythe: has joined #ruby
[02:31:10] tdy: has joined #ruby
[02:38:11] sdrew: has joined #ruby
[02:39:19] jenrzzz: has joined #ruby
[03:10:37] braincrash: has joined #ruby
[03:12:14] dhuey_: has joined #ruby
[03:12:59] dhuey_: has joined #ruby
[03:25:37] fphilipe: has joined #ruby
[03:30:50] spacesuitdiver: has joined #ruby
[03:44:05] rhuang_: has joined #ruby
[03:49:51] zacts: has joined #ruby
[04:02:58] hightower2: has joined #ruby
[04:10:09] Azure|dc: has joined #ruby
[04:10:32] ricekrispie: has joined #ruby
[04:17:55] haengma: has joined #ruby
[04:20:24] sauvin: has joined #ruby
[04:44:36] conta: has joined #ruby
[04:51:02] jenrzzz: has joined #ruby
[04:55:44] rippa: has joined #ruby
[04:55:53] fphilipe: has joined #ruby
[05:08:03] hiroaki: has joined #ruby
[05:08:52] tdy: has joined #ruby
[05:19:16] conta: has joined #ruby
[05:32:22] reber: has joined #ruby
[05:32:30] fphilipe: has joined #ruby
[05:32:48] jordanm: has joined #ruby
[05:36:02] TomyWork: has joined #ruby
[05:40:25] haxx0r: has joined #ruby
[05:41:16] haxx0r: 5cd3bcfc9d99100004866a79
[05:42:12] ricekrispie2: has joined #ruby
[05:56:49] duderonomy: has joined #ruby
[05:57:01] conta: has joined #ruby
[06:00:04] za1b1tsu: has joined #ruby
[06:09:01] geonaumov: has joined #ruby
[06:20:35] ffl^: has joined #ruby
[06:26:18] marmotini_: has joined #ruby
[06:31:50] ramfjord: has joined #ruby
[06:33:58] jordanm: has joined #ruby
[06:36:04] andikr: has joined #ruby
[06:53:52] trebor8: has joined #ruby
[06:58:28] fphilipe: has joined #ruby
[07:06:21] clemens3: has joined #ruby
[07:10:56] lele: has joined #ruby
[07:18:48] jenrzzz: has joined #ruby
[07:26:14] alem0lars: has joined #ruby
[07:27:09] kyrylo: has joined #ruby
[07:37:31] yqt: has joined #ruby
[07:40:46] dsmythe: has joined #ruby
[07:43:54] Ai9zO5AP: has joined #ruby
[07:47:27] laaron: has joined #ruby
[07:47:45] _joes_: has joined #ruby
[07:50:18] esrse: has joined #ruby
[08:04:19] jefffrails35: has joined #ruby
[08:04:55] conta: has joined #ruby
[08:07:22] mikecmpbll: has joined #ruby
[08:09:26] Momentum: has joined #ruby
[08:15:52] ta: has joined #ruby
[08:17:00] _joes_: has joined #ruby
[08:23:17] waheedi: has joined #ruby
[08:32:03] ramfjord: has joined #ruby
[08:36:45] stanc: has joined #ruby
[08:42:48] Jonopoly: has joined #ruby
[08:55:04] DarthGandalf: has joined #ruby
[08:55:17] ellcs: has joined #ruby
[09:05:11] laaron: has joined #ruby
[09:13:50] lxsameer: has joined #ruby
[09:19:06] jenrzzz: has joined #ruby
[09:20:29] contradictioned: has joined #ruby
[09:28:00] conta: has joined #ruby
[09:30:26] Jonopoly: for threads
[09:30:31] Jonopoly: what is the join doing? starting it?
[09:41:13] havenwood: Jonopoly: waiting on it
[09:41:48] havenwood: Jonopoly: blocking until the thread finishes
[09:46:09] Jonopoly: ah wait... so that means if i do a new thread it will run
[09:46:20] havenwood: Jonopoly: yes
[09:46:22] Jonopoly: and me doing thread.join means wait here until thread has finished
[09:46:37] Jonopoly: That's more impressive than i thought!
[10:12:39] BTRE: has joined #ruby
[10:13:19] mjacob: has joined #ruby
[10:14:33] timeless: has joined #ruby
[10:20:12] kapil____: has joined #ruby
[10:20:36] apparition: has joined #ruby
[10:32:15] ramfjord: has joined #ruby
[10:45:17] AJA4350: has joined #ruby
[10:53:35] Swyper: has joined #ruby
[10:55:31] conta: has joined #ruby
[10:55:56] donofrio_: has joined #ruby
[11:03:12] Jameser`: has joined #ruby
[11:05:23] Swyper: has joined #ruby
[11:10:48] woodruffw: has joined #ruby
[11:10:48] woodruffw: has joined #ruby
[11:20:31] jenrzzz: has joined #ruby
[11:26:26] laaron: has joined #ruby
[11:33:43] kyrylo: has joined #ruby
[11:36:29] n13z: has joined #ruby
[11:43:42] ldnunes: has joined #ruby
[11:53:20] TvL: has joined #ruby
[12:01:06] twoone: has joined #ruby
[12:17:56] AlHafoudh: has joined #ruby
[12:19:38] clemens3_: has joined #ruby
[12:21:39] Guestss1: has joined #ruby
[12:23:17] GodFather: has joined #ruby
[12:26:32] Guestss1: has joined #ruby
[12:26:53] Guestss1: has joined #ruby
[12:27:09] GodFather_: has joined #ruby
[12:27:16] Guestss1: has joined #ruby
[12:27:37] Guestss1: has joined #ruby
[12:28:34] Squeeeez: has left #ruby: ("%IRC-I-USRLFT, User left channel")
[12:43:11] reber__: has joined #ruby
[12:49:45] laaron-: has joined #ruby
[12:59:19] dsmythe: has joined #ruby
[13:18:15] ldnunes: has joined #ruby
[13:20:53] jenrzzz: has joined #ruby
[13:29:43] _sfiguser: has joined #ruby
[13:30:08] _sfiguser: hello all guys i wanted to learn some new programming language and was considering ruby... is it still viable in 2019? i wanted to do some network programming...
[13:31:02] Inline: has joined #ruby
[13:34:30] pupsikov: has joined #ruby
[13:34:33] _sfiguser: is it viable in 2019? or is it a dying language?
[13:35:23] Zarthus: it's not primetime, but it still works well *shrug*
[13:37:52] Jonopoly: im learning it now for work
[13:37:59] Jonopoly: It's easier to read than python
[13:38:32] Jonopoly: _sfiguser: I think ruby&rails will be worth learning
[13:40:10] za1b1tsu: has joined #ruby
[14:03:51] Frem: has joined #ruby
[14:21:00] FrankDW: has joined #ruby
[14:35:03] spacesuitdiver: has joined #ruby
[14:39:03] ellcs: has joined #ruby
[14:40:08] nadir: has joined #ruby
[14:40:12] zacts: has joined #ruby
[14:42:30] Jameser: has joined #ruby
[14:47:00] Bish: i disagree with the rails part
[14:47:05] Bish: rails was never worth learning, ruby is
[14:47:32] Bish: _sfiguser: what do you mean by saying network programming?
[14:47:49] Bish: ruby is bad with threads, as long as it is not IO-only
[14:47:57] Bish: so depending on your usecase ruby could be bad
[14:48:27] t3hyoshi: I don't think Rails is good to learn as a newcomer to Ruby. If you want to make simple sites, start with Sinatra before jumping into Rails.
[14:48:43] Bish: or stay with sinatra/roda :p
[14:49:13] Bish: but i have no clue what "network programming" is
[14:49:17] Bish: routing tcp packages?
[14:51:40] adam12: To be fair, there is a bunch of work going on to improve Ruby for networking. The async-* packages and lightweight fibers being one.
[14:53:18] Bish: i think ruby-code-style doesn't really fit asynchronous programming
[14:53:32] Bish: i always cringe when i see on_event { ... } stuff in ruby
[14:55:21] _sfiguser: Bish, crafting packets
[14:55:25] _sfiguser: ethernet frames 802.111
[14:55:26] _sfiguser: ethernet frames 802.11
[14:55:32] _sfiguser: and tcp sockets and stuff like that
[14:56:05] Bish: oh ruby is good for that
[14:56:24] Bish: that's the best thing about ruby, it's super high, and crafting "strings"/buffers with it is great
[14:57:35] Bish: >> "\x19\x91\x12\x83".unpack("L+")
[14:57:36] ruby[bot]: Bish: # => [2199032089] (https://eval.in/1104754)
[14:57:39] Bish: love shit like that
[14:58:13] Bish: the ruby-elf package or rubyelf gem don't know handels nicely with binary stuff
[15:03:53] ua_: has joined #ruby
[15:05:56] pwillard: _sfiguser: Take a look at AsciiDoctor-pdf for an example of really cool "current" stuff being done with ruby. I use it to write all my documentation now.
[15:07:08] ellcs: has joined #ruby
[15:07:11] tdy: has joined #ruby
[15:09:55] waheedi: has joined #ruby
[15:13:28] AlHafoudh: has joined #ruby
[15:21:14] jenrzzz: has joined #ruby
[15:27:21] AJA4351: has joined #ruby
[15:28:14] Renich: has joined #ruby
[15:45:56] millerti: has joined #ruby
[15:48:08] alem0lars: has joined #ruby
[15:49:10] Jonopoly: why is ruby not good for multithreading?
[15:52:51] buckworst: has joined #ruby
[15:52:56] ytti: in MRI implementation the threads wont run in parallel
[15:53:06] ytti: due to global lock
[15:53:13] ytti: in some other implementation they may
[15:53:29] buckworst: has joined #ruby
[15:54:17] buckworst: has joined #ruby
[15:55:52] buckworst: has joined #ruby
[16:04:48] laaron: has joined #ruby
[16:06:15] cd: has joined #ruby
[16:09:25] laaron: has joined #ruby
[16:12:58] dellavg_: has joined #ruby
[16:15:39] clemens3: has joined #ruby
[16:17:08] laaron: has joined #ruby
[16:17:49] ua: has joined #ruby
[16:20:30] Renich: has joined #ruby
[16:24:14] tdy: has joined #ruby
[16:26:26] twoone: has left #ruby: ()
[16:29:58] polishdub: has joined #ruby
[16:31:32] haengma: has joined #ruby
[16:33:19] rhuang_: has joined #ruby
[16:33:55] haengma: has joined #ruby
[16:39:30] AJA4350: has joined #ruby
[16:40:20] duderonomy: has joined #ruby
[16:41:14] gix: has joined #ruby
[16:49:01] rhuang_: has joined #ruby
[16:50:43] doodlebug: has joined #ruby
[16:52:46] skryking: has joined #ruby
[17:06:24] rhuang: has joined #ruby
[17:11:47] stryek: has joined #ruby
[17:18:08] budonyc: has joined #ruby
[17:19:38] pupsikov: has joined #ruby
[17:19:44] jenrzzz: has joined #ruby
[17:20:56] tdy: has joined #ruby
[17:21:13] za1b1tsu: has joined #ruby
[17:27:46] doodlebug: has joined #ruby
[17:28:20] ebbflowgo: has joined #ruby
[17:33:56] Jameser: has joined #ruby
[17:36:28] ramfjord: has joined #ruby
[17:37:06] SeepingN: has joined #ruby
[17:37:18] zacts: has joined #ruby
[17:40:59] tdy: has joined #ruby
[17:44:00] fphilipe: has joined #ruby
[17:45:28] jrafanie: has joined #ruby
[17:47:31] jmcgnh_: has joined #ruby
[17:53:05] mochiyoda: has joined #ruby
[18:02:07] AlHafoudh: has joined #ruby
[18:02:43] cosmouser: has joined #ruby
[18:03:38] twoone: has joined #ruby
[18:04:03] Jameser`: has joined #ruby
[18:04:28] alem0lars: has joined #ruby
[18:04:28] gix: has joined #ruby
[18:07:08] cthulchu_: has joined #ruby
[18:10:21] jenrzzz: has joined #ruby
[18:11:12] mochiyoda: has joined #ruby
[18:16:33] ElF3rn4: has joined #ruby
[18:29:40] Dbugger: has joined #ruby
[18:35:01] AlHafoudh: has joined #ruby
[18:45:02] tdy: has joined #ruby
[18:53:40] Xiti: has joined #ruby
[18:56:08] ramfjord_: has joined #ruby
[18:59:27] anoob: has joined #ruby
[19:01:51] anoob: Is it possible to unlock a sidekiq unique job only if it goes to the "dead queue"? My jobs are unlocked when they fail and I need them to retry ...
[19:21:40] cnsvc: has joined #ruby
[19:22:16] jobewan: has joined #ruby
[19:23:50] za1b1tsu: has joined #ruby
[19:24:20] mikecmpbll: has joined #ruby
[19:26:37] weteamsteve: has joined #ruby
[19:27:20] cnsvc: has joined #ruby
[19:35:41] cnsvc: has left #ruby: ("WeeChat 2.4")
[19:36:21] cnsvc: has joined #ruby
[19:36:56] cnsvc: has joined #ruby
[19:43:29] cnsvc: has joined #ruby
[19:47:44] jmcgnh: has joined #ruby
[19:54:16] wilbert: has joined #ruby
[20:01:17] dinfuehr: has joined #ruby
[20:07:02] ramfjord: has joined #ruby
[20:12:26] pwnd_nsfw`: has joined #ruby
[20:18:11] _whitelogger: has joined #ruby
[20:22:13] robotcars: has joined #ruby
[20:24:01] jenrzzz: has joined #ruby
[20:25:14] agent_white: has joined #ruby
[20:37:35] cnsvc: has joined #ruby
[20:38:14] dsmythe_: has joined #ruby
[20:42:13] dsmythe: has joined #ruby
[20:42:17] doodleb23: has joined #ruby
[20:44:13] Mia: has joined #ruby
[20:44:21] dsmythe: has joined #ruby
[20:48:29] baiyang: has joined #ruby
[20:48:32] doodlebug: has joined #ruby
[20:52:20] houhoulis: has joined #ruby
[20:54:32] ramfjord: has joined #ruby
[20:56:18] fphilipe: has joined #ruby
[20:57:16] havenwood: TruffleRuby landed their first release, version 19.0.0!
[20:57:34] havenwood: rvm get head && rvm install truffleruby
[20:57:42] havenwood: ruby-install --latest truffleruby
[20:58:19] jenrzzz: has joined #ruby
[20:59:42] rhuang_: has joined #ruby
[21:01:25] ramfjord: has joined #ruby
[21:03:42] jhill: has joined #ruby
[21:06:09] fphilipe_: has joined #ruby
[21:12:34] doodleb84: has joined #ruby
[21:13:17] ur5us: has joined #ruby
[21:13:32] zacts: has joined #ruby
[21:24:00] dsmythe: has joined #ruby
[21:34:37] baiyang: has left #ruby: ()
[21:36:08] fphilipe_: has joined #ruby
[21:45:49] fphilipe_: has joined #ruby
[21:47:34] DTZUZO: has joined #ruby
[21:48:22] ramfjord: has joined #ruby
[21:48:55] ellcs: has joined #ruby
[21:49:36] jenrzzz: has joined #ruby
[21:54:14] jmcgnh: has joined #ruby
[21:56:36] tyraeltong: has joined #ruby
[21:57:55] fphilipe_: has joined #ruby
[21:58:27] sameerynho: has joined #ruby
[21:58:38] jenrzzz: has joined #ruby
[22:14:26] Fernando-Basso: has joined #ruby
[22:17:25] ur5us_: has joined #ruby
[22:18:33] doodlebug: has joined #ruby
[22:23:08] nowhere_man: has joined #ruby
[22:23:56] ellcs: has joined #ruby
[22:24:34] doodlebug: has joined #ruby
[22:27:11] jenrzzz: has joined #ruby
[22:30:34] doodlebug: has joined #ruby
[22:31:28] fphilipe_: has joined #ruby
[22:35:03] haengma: has joined #ruby
[22:35:09] sparc: has joined #ruby
[22:36:26] uranoss: has joined #ruby
[22:36:34] doodlebug: has joined #ruby
[22:37:29] rhuang: has joined #ruby
[22:40:55] FrankDW: has joined #ruby
[22:41:12] AJA4350: has joined #ruby
[22:42:35] doodlebug: has joined #ruby
[22:42:37] jmcgnh: has joined #ruby
[22:46:30] AlHafoudh: has joined #ruby
[22:48:34] doodlebug: has joined #ruby
[22:54:06] tdy: has joined #ruby
[22:54:35] doodlebug: has joined #ruby
[23:00:35] doodlebug: has joined #ruby
[23:02:37] Jameser: has joined #ruby
[23:05:31] haengma: has joined #ruby
[23:06:36] doodlebug: has joined #ruby
[23:12:36] doodlebug: has joined #ruby
[23:13:44] jenrzzz: has joined #ruby
[23:14:56] symm-: has joined #ruby
[23:15:35] symm-: hi, can I have nested modules and within them module functions that I can call like `Foo.Bar.blah()`?
[23:16:07] phaul: you can nest modules, but you have to resolve nesting with ::
[23:16:08] symm-: I found that it's possible to do `Foo::Bar.blah()` but the cognitive dissonance is killing me
[23:16:26] phaul: ok you found the way
[23:16:36] symm-: ah I see, so that's the only way?
[23:17:47] phaul: you could do :: on the method too, so Foo::Bar::blah works, but Dont. This is the acceted way.
[23:17:56] haengma: has joined #ruby
[23:18:37] doodlebug: has joined #ruby
[23:18:38] phaul: modules and methods are different, it's fine to separate them differently - as far as dissonance is concerned
[23:20:08] havenwood: symm-: You *can* set it up like you say you'd like.
[23:20:29] havenwood: symm-: The Ruby convention is :: separator between modules and classes and . for method calls.
[23:20:59] ellcs: has joined #ruby
[23:21:02] symm-: that seems reasonable actually
[23:21:03] havenwood: symm-: Here's an example of the interface you want: https://gist.github.com/havenwood/9ae14630c79031ed6f4c44d14c9a2578
[23:21:04] phaul: calling a method on a receiver, and resolving a constant in module nesting are fundamentally different things
[23:22:07] symm-: havenwood: what even...
[23:22:51] phaul: upper case methods work too. but..
[23:23:03] havenwood: symm-: Yeah, use the Ruby convention :P
[23:23:14] symm-: haha I will
[23:23:25] symm-: I'm not ready fot this yet
[23:24:37] doodlebug: has joined #ruby
[23:25:38] haengma: has joined #ruby
[23:29:08] nadir: has joined #ruby
[23:30:37] doodlebug: has joined #ruby
[23:35:04] kyrylo: has joined #ruby
[23:36:37] doodlebug: has joined #ruby
[23:39:37] symm-: just to confirm: is saying `def self.method` equivalent to `def ModuleName.method` in a module?
[23:40:06] AlHafoudh: has joined #ruby
[23:40:16] phaul: yes. or even better def self.method
[23:40:35] phaul: as self is ModuleName in the Module context
[23:40:56] baweaver: havenwood loves them some modiule_method
[23:41:41] haengma: has joined #ruby
[23:42:38] doodlebug: has joined #ruby
[23:43:27] phaul: ah. it's true what I said but didn't really make sense, so the short answer is yes you were right with that symm-
[23:44:49] symm-: thank you:)
[23:45:52] haengma: has joined #ruby
[23:53:17] jenrzzz: has joined #ruby
[23:59:08] rhuang: has joined #ruby