« Back to channel list

#ruby - 12 April 2019

« Back 1 day Forward 1 day »
[00:05:01] nwradio878887987: has joined #ruby
[00:08:41] evdubs: has joined #ruby
[00:21:31] Swyper: has joined #ruby
[00:22:50] ramfjord: has joined #ruby
[00:42:13] zachk: has joined #ruby
[00:44:50] orbyt_: has joined #ruby
[00:47:34] jenrzzz: has joined #ruby
[00:49:42] mangold: has joined #ruby
[00:50:40] also_uplime: has joined #ruby
[00:54:35] leftylink: another possibility might be fdiv.
[00:58:41] leftylink: that's too bad. I waned to see if it was possible to define a custom operator, then you could `refine`/`using` in something like `1 // 3`, but I do not think that is possible, if I believe https://stackoverflow.com/questions/11874579/define-custom-ruby-operator
[00:58:45] ur5us: has joined #ruby
[01:00:11] IGnorAND: http://rubymoney.github.io/money/ Why would one use money-rails instead of plain money? I can't see why rails would need more than just money
[01:17:39] rafadc: has joined #ruby
[01:29:42] bambanx: has joined #ruby
[01:34:26] dsmythe: has joined #ruby
[01:34:44] ramfjord: has joined #ruby
[01:44:05] cagomez: has joined #ruby
[01:53:03] dennis2: has joined #ruby
[01:56:42] ramfjord: has joined #ruby
[01:59:13] DmitryBochkarev_: has joined #ruby
[02:00:09] code_zombie: has joined #ruby
[02:04:35] kyrylo: has joined #ruby
[02:14:54] leftylink: don't wanna spoil the surprise... I can refine in &>> right... let's see
[02:15:29] leftylink: &>> module HelloString refine String do def hello; "hello #{self}" end end end; using HelloString; p ?a.hello
[02:15:32] rubydoc: # => "hello a" (https://carc.in/#/r/6plc)
[02:15:36] leftylink: okay we can refine
[02:17:22] leftylink: if you want to abuse syntax and make /~ *look* like a floating point division operator (which the code does not actually make it do), and in the process remove your ability to bit-flip an integer, then have I got just your ticket.
[02:17:33] leftylink: &>> module LolDiv refine Integer do def ~; to_f end end end; using LolDiv; p 1 /~ 3
[02:17:34] rubydoc: # => 0.3333333333333333 (https://carc.in/#/r/6pld)
[02:17:43] leftylink: ACTION pounds table in laughter
[02:20:36] ramfjord: has joined #ruby
[02:20:56] lord4163: has joined #ruby
[02:21:57] leftylink: can shorten with alias?
[02:22:04] leftylink: yes, can shorten with alias
[02:22:18] leftylink: &>> module LolDiv refine Integer do alias :~ :to_f end end; using LolDiv; p 2 /~ 7
[02:22:19] rubydoc: # => 0.2857142857142857 (https://carc.in/#/r/6ple)
[02:24:09] leftylink: ... a 1 byte savings
[02:24:31] leftylink: it also expends extra time for me too since how to use alias isn't in my working memory
[02:24:35] leftylink: so I have to figure it out
[02:36:15] nwradio878887987: has joined #ruby
[02:40:34] fluxAeon: has joined #ruby
[02:42:12] nwradio878887987: has joined #ruby
[02:44:14] SuperL4g_: has joined #ruby
[02:44:16] Sup3rLurk: has joined #ruby
[02:44:56] lord4163: has joined #ruby
[02:48:11] i1nfusion: has joined #ruby
[02:53:47] SuperLag: has joined #ruby
[02:55:44] also_uplime: has joined #ruby
[02:57:45] AndroidKK: has joined #ruby
[03:07:15] DmitryBochkarev_: has joined #ruby
[03:07:59] gix-: has joined #ruby
[03:11:09] braincrash: has joined #ruby
[03:13:25] Swyper: has joined #ruby
[03:21:52] bokwoon: has joined #ruby
[03:28:13] bokwoon: has joined #ruby
[03:33:21] Blaguvest: has joined #ruby
[03:37:23] Swyper: has joined #ruby
[03:55:33] dsmythe: has joined #ruby
[04:07:06] Nicmavr: has joined #ruby
[04:09:22] Swyper: has joined #ruby
[04:20:43] fishcooker: has joined #ruby
[04:23:22] UnknownSoldier: has joined #ruby
[04:27:10] Swyper: has joined #ruby
[04:27:54] kapil____: has joined #ruby
[04:37:38] Tempesta: has joined #ruby
[04:45:12] bokwoon: has joined #ruby
[04:47:09] dsmythe: has joined #ruby
[04:57:36] dinfuehr: has joined #ruby
[05:04:22] jenrzzz: has joined #ruby
[05:09:00] pwnd_nsfw: has joined #ruby
[05:12:16] Fira: has joined #ruby
[05:18:01] mangold: has joined #ruby
[05:18:30] conta: has joined #ruby
[05:18:34] iMadper|`: has joined #ruby
[05:21:39] sidx64: has joined #ruby
[05:33:12] DmitryBochkarev_: has joined #ruby
[05:43:59] duderonomy: has joined #ruby
[05:50:38] ramfjord: has joined #ruby
[06:07:28] fishcooker: has joined #ruby
[06:15:07] Krebsgewehr: has joined #ruby
[06:20:46] Mia: has joined #ruby
[06:21:14] Swyper: has joined #ruby
[06:36:24] dar123: has joined #ruby
[06:36:42] andikr: has joined #ruby
[06:38:31] sidx64_: has joined #ruby
[06:39:00] duderonomy: has joined #ruby
[06:39:33] clemens3_: has joined #ruby
[06:44:50] schleppel: has joined #ruby
[07:00:02] vondruch: has joined #ruby
[07:04:38] Fira: has joined #ruby
[07:05:13] evdubs: has joined #ruby
[07:06:22] dsmythe: has joined #ruby
[07:06:37] mattwc: has joined #ruby
[07:06:42] JayDoubleu: has joined #ruby
[07:06:46] pwillard: has joined #ruby
[07:06:47] waheedi: has joined #ruby
[07:06:52] khalella_: has joined #ruby
[07:06:55] coffeejunk: has joined #ruby
[07:07:01] Mutsuhito: has joined #ruby
[07:07:23] justache: has joined #ruby
[07:08:11] tjbp: has joined #ruby
[07:09:11] clemens3_: has joined #ruby
[07:10:00] TomyWork: has joined #ruby
[07:10:11] teclator_: has joined #ruby
[07:16:55] i1nfusion: has joined #ruby
[07:17:09] ferr: has joined #ruby
[07:20:40] sidx64: has joined #ruby
[07:24:22] prestorium: has joined #ruby
[07:24:29] duderonomy: has joined #ruby
[07:28:31] lxsameer: has joined #ruby
[07:34:04] n13z: has joined #ruby
[07:38:10] hightower2: has joined #ruby
[07:40:52] ogurk: has joined #ruby
[07:45:27] bokwoon: has joined #ruby
[07:48:50] aupadhye: has joined #ruby
[07:54:07] dellavg_: has joined #ruby
[07:54:34] marmotini_: has joined #ruby
[07:59:02] duderonomy: has joined #ruby
[08:01:43] jenrzzz: has joined #ruby
[08:03:32] teclator_: has joined #ruby
[08:04:21] duderonomy: has joined #ruby
[08:04:22] andikr: has joined #ruby
[08:06:46] hightower2: has joined #ruby
[08:12:55] Renich: has joined #ruby
[08:15:29] am0123: has joined #ruby
[08:16:12] waheedi: has joined #ruby
[08:16:54] Swyper: has joined #ruby
[08:17:28] marmotini: has joined #ruby
[08:20:28] teclator_: has joined #ruby
[08:21:06] meinside: has joined #ruby
[08:25:22] kyrylo: has joined #ruby
[08:28:10] kyrylo_: has joined #ruby
[08:28:42] KeyJoo: has joined #ruby
[08:32:34] duderonomy: has joined #ruby
[08:33:20] marmotini_: has joined #ruby
[08:37:00] Ai9zO5AP: has joined #ruby
[08:38:03] daqing: has joined #ruby
[08:46:15] ltem: has joined #ruby
[08:55:02] dsmythe: has joined #ruby
[08:58:10] sidx64: has joined #ruby
[09:15:41] sidx64: has joined #ruby
[09:15:45] andikr: has joined #ruby
[09:16:31] troulouliou_div2: has joined #ruby
[09:37:48] jenrzzz: has joined #ruby
[09:40:36] nnielsen: has joined #ruby
[09:45:07] marmotini: has joined #ruby
[09:48:38] conta: has joined #ruby
[09:56:13] am0123: has joined #ruby
[09:56:38] sidx64: has joined #ruby
[10:11:31] sidx64: has joined #ruby
[10:12:06] marmotini_: has joined #ruby
[10:18:58] dinfuehr: has joined #ruby
[10:21:39] Dbugger: has joined #ruby
[10:22:43] conta: has joined #ruby
[10:25:58] yorickpeterse: has joined #ruby
[10:27:44] mangold: has joined #ruby
[10:45:45] anjen: has joined #ruby
[10:47:46] anjen: This isn't specially a "ruby" quesityon but a more general question to ruby users who manage promotional emails in their work. For the unsubscribe link, do you manually manage the unsubscriptions (ie, link is a mailto request for unsubscribe to admin) or handle them automatically via a controller?
[10:48:03] anjen: <<email proomo virgin here
[10:50:20] rbasak: I'm not a Ruby dev, but on the Internet generally, not having an automatic unsubscribe link is generally seen as abusive. If you can manage to automatically send bulk email, you can manage to automatically handle unsubscriptions. Anything else is seen as deliberately making it difficult for people to unsubscribe.
[10:51:31] anjen: rbasak: That's what I'd think as well, but since I'm new to this aspect, and (admittedly) I'm not the "sharpest tack" when it comes to security, I'm a little concerned about security
[10:54:05] anjen: in any case, thanks for the reply rbasak. I'll ask our host provider for advise on how to implement a secure response from outside a logged in entity.
[10:56:15] Swyper: has joined #ruby
[11:00:54] mnemon: anjen: subscriber specific unsubscribe link with api key in it usually for me
[11:04:45] AJA4350: has joined #ruby
[11:10:47] anjen: mnemon: thanks. I'll look into that.
[11:11:03] sidx64: has joined #ruby
[11:15:38] tuor: has joined #ruby
[11:23:20] mikeiniowa: has joined #ruby
[11:30:53] jinie: has joined #ruby
[11:36:51] ldnunes: has joined #ruby
[11:42:04] sidx64: has joined #ruby
[11:44:50] wolfshappen: has joined #ruby
[11:58:59] doodlebug: has joined #ruby
[12:00:41] sidx64: has joined #ruby
[12:05:25] IGnorAND: @leftylink I decided to use money so I don't have integers anymore :)
[12:05:28] IGnorAND: &>> puts "test"
[12:05:31] rubydoc: # => test (https://carc.in/#/r/6pne)
[12:08:25] bougyman: How can I make an object output the way pry makes it output?
[12:08:32] bougyman: I mean, I thought that was just pp, but it's not.
[12:09:50] phaul: afaik it's internal implementation in pry using syntax highlight. you could get something similar in capabilites with awesome_print, but that again would also be different
[12:10:03] bougyman: aha. #pretty_inspect
[12:11:30] phaul: that's again different
[12:13:46] sidx64: has joined #ruby
[12:16:48] bougyman: sure, but it's close enough. It's waht I was looking for.
[12:17:05] InfinityFye: has joined #ruby
[12:18:07] InfinityFye: has left #ruby: ()
[12:22:27] i1nfusion: has joined #ruby
[12:29:44] Fira_: has joined #ruby
[12:30:43] nnielsen: has joined #ruby
[12:33:27] vondruch: has joined #ruby
[12:43:28] marmotini: has joined #ruby
[12:45:00] nnielsen: has joined #ruby
[12:45:52] booboy: has joined #ruby
[12:47:25] AndroidKK: has joined #ruby
[12:49:19] AndroidKK: has joined #ruby
[12:50:55] Cthulu201: has joined #ruby
[12:51:14] Psy-Q: has joined #ruby
[12:51:43] marmotini_: has joined #ruby
[12:52:06] jmcgnh: has joined #ruby
[12:57:33] AndroidKitKat: has joined #ruby
[12:57:47] ogurk: has joined #ruby
[12:59:52] jcalla: has joined #ruby
[13:05:02] Inline: has joined #ruby
[13:05:02] Rapture: has joined #ruby
[13:08:39] dsmythe: has joined #ruby
[13:09:57] regedit: has joined #ruby
[13:21:10] iNs: has joined #ruby
[13:21:17] trayd: has joined #ruby
[13:27:19] pupsikov: has joined #ruby
[13:29:16] mondz: has joined #ruby
[13:31:44] cisco: has joined #ruby
[13:31:55] Swyper: has joined #ruby
[13:32:07] conta: has joined #ruby
[13:32:41] lucasb: has joined #ruby
[13:40:24] Swyper: has joined #ruby
[13:45:39] ech0s7: has joined #ruby
[13:47:05] ech0s7: I'm developing a gem, I have developed the library in the lib folder. The root folder has these three folder: lib, bin, test. I would like to import the gem/lib from the bin folder
[13:47:11] ech0s7: How can I do that ?
[13:48:02] UnknownSoldier: has joined #ruby
[13:52:08] DTZUZO: has joined #ruby
[13:53:49] akemot: has joined #ruby
[13:59:48] mangold: has joined #ruby
[14:07:27] Swyper: has joined #ruby
[14:08:47] krawchyk: has joined #ruby
[14:11:17] doodlebug: has joined #ruby
[14:17:56] cthulchu_: has joined #ruby
[14:18:11] iNs: has joined #ruby
[14:19:36] dar123: has joined #ruby
[14:21:34] Swyper: has joined #ruby
[14:26:29] d10n-work: has joined #ruby
[14:26:56] Wolland: has joined #ruby
[14:33:44] rippa: has joined #ruby
[14:38:37] nowhereman: has joined #ruby
[14:42:41] Azure: has joined #ruby
[14:47:21] Nicmavr: has joined #ruby
[14:54:00] orbyt_: has joined #ruby
[15:04:01] Wolland: has joined #ruby
[15:08:00] nowhereman: has joined #ruby
[15:09:30] tdy: has joined #ruby
[15:11:02] dar123: has joined #ruby
[15:11:15] doodleb96: has joined #ruby
[15:13:33] dostoyevsky: I want to transform an array: [1, 2, 3, 4] -> [[1, 2],[3, 4]] # is there an easy way to do that?
[15:16:10] phaul: &>> [*1..4].each_slice(2)
[15:16:10] rubydoc: # => #<Enumerator: [1, 2, 3, 4]:each_slice(2)> (https://carc.in/#/r/6po9)
[15:16:16] Wolland: has joined #ruby
[15:16:16] phaul: &>> [*1..4].each_slice(2).to_a
[15:16:17] rubydoc: # => [[1, 2], [3, 4]] (https://carc.in/#/r/6poa)
[15:16:31] dostoyevsky: thanks phaul! :)
[15:17:16] doodlebug: has joined #ruby
[15:24:05] bokwoon: has joined #ruby
[15:26:26] duderonomy: has joined #ruby
[15:31:37] duderonomy: has joined #ruby
[15:32:25] bokwoon: has joined #ruby
[15:32:27] sriehl: has joined #ruby
[15:34:37] akem: has joined #ruby
[15:34:55] jcarl43: has joined #ruby
[15:35:02] nowhereman: has joined #ruby
[15:40:30] DmitryBochkarev_: has joined #ruby
[15:41:37] ellcs1: has joined #ruby
[15:42:47] mondz: has joined #ruby
[15:44:19] Wolland: has joined #ruby
[15:45:15] dar123: has joined #ruby
[15:49:02] crankharder: has joined #ruby
[15:52:49] mondz: has joined #ruby
[15:54:03] crankharder: has joined #ruby
[15:55:11] Wolland: has joined #ruby
[16:01:16] mello: has joined #ruby
[16:12:20] Azure|dc: has joined #ruby
[16:14:56] Paraxial: has joined #ruby
[16:18:00] Azure: has joined #ruby
[16:18:54] houhoulis: has joined #ruby
[16:22:00] ramfjord: has joined #ruby
[16:24:26] i1nfusion: has joined #ruby
[16:28:50] millerti: has joined #ruby
[16:35:25] mondz: has joined #ruby
[16:35:38] i1nfusion: has joined #ruby
[16:43:09] dar123: has joined #ruby
[16:47:35] ramfjord: has joined #ruby
[16:49:42] flips: has joined #ruby
[16:52:33] ramfjord_: has joined #ruby
[16:54:08] dviola: has joined #ruby
[16:54:52] gix: has joined #ruby
[16:54:59] poguez_: has joined #ruby
[17:00:59] dar123: has joined #ruby
[17:01:17] Azure: has joined #ruby
[17:01:36] i1nfusion1: has joined #ruby
[17:01:41] tdy: has joined #ruby
[17:11:06] DmitryBochkarev: has joined #ruby
[17:39:32] ramfjord: has joined #ruby
[17:42:33] duderonomy: has joined #ruby
[17:49:07] jenrzzz: has joined #ruby
[17:53:18] DmitryBochkarev: has joined #ruby
[17:55:18] i1nfusion: has joined #ruby
[18:00:41] regedit: has joined #ruby
[18:00:54] jenrzzz: has joined #ruby
[18:01:55] lxsameer: has joined #ruby
[18:05:36] tjbp: has joined #ruby
[18:12:37] Dbugger: has joined #ruby
[18:14:00] Lytol: has joined #ruby
[18:17:24] doodleb95: has joined #ruby
[18:20:41] al2o3-cr: &>> 32.step(0, -8).map { |n| 280335306581 >> n & 0xff }.map &:chr
[18:20:46] rubydoc: # => ["A", "E", "I", "O", "U"] (https://carc.in/#/r/6pos)
[18:21:10] ukd1: has joined #ruby
[18:21:35] al2o3-cr: havenwood: another one for your crazy methods of getting vowels ;)
[18:21:57] havenwood: al2o3-cr: woot!
[18:23:57] postmodern: has joined #ruby
[18:26:11] dar123: has joined #ruby
[18:28:56] Net: What do you think of passing procs around as callbacks. Is that frowned upon in Ruby?
[18:29:13] conta: has joined #ruby
[18:29:35] tdy: has joined #ruby
[18:29:36] Net: I suppose the more conventional format would be to take a block, but this needs to be passed inside a hash
[18:31:47] zachk: has joined #ruby
[18:32:00] asnotehu: has joined #ruby
[18:33:33] zachk: has joined #ruby
[18:33:44] Azure: has joined #ruby
[18:34:52] zachk: has joined #ruby
[18:34:56] kyrylo: has joined #ruby
[18:41:24] doodlebug: has joined #ruby
[18:49:03] maryo: has joined #ruby
[18:53:02] jenrzzz: has joined #ruby
[19:08:33] Dbugger: has joined #ruby
[19:08:43] D9: has joined #ruby
[19:08:51] nowhere_man: has joined #ruby
[19:20:49] dar123: has joined #ruby
[19:27:25] pupsikov: has joined #ruby
[19:29:38] tdy: has joined #ruby
[19:32:28] sidx64: has joined #ruby
[19:34:25] dar123: has joined #ruby
[19:37:31] cd: has joined #ruby
[19:46:38] claudiuinberlin: has joined #ruby
[19:48:45] jenrzzz: has joined #ruby
[19:51:02] orbyt_: has joined #ruby
[19:54:49] Dbugger: has joined #ruby
[20:05:27] kyrylo: has joined #ruby
[20:09:40] galaxie: has joined #ruby
[20:10:18] SCHAAP137: has joined #ruby
[20:10:27] dinfuehr: has joined #ruby
[20:12:42] c0san0stra: has joined #ruby
[20:14:39] kyrylo: has joined #ruby
[20:21:27] DmitryBochkarev: has joined #ruby
[20:25:46] adam12: Net: I don't think it's frowned upon. I imagine the API to be mostly natural. That said, I believe (but not 100% for sure) that block.call might be a slower code path than yield, which is where an explicit block might win out. You'd have to benchmark and determine if that was an issue for you of course.
[20:52:01] bga57: has joined #ruby
[20:54:32] hightower2: has joined #ruby
[21:05:31] doodlebug: has joined #ruby
[21:06:17] Mike11: has joined #ruby
[21:11:24] wallace_mu: has joined #ruby
[21:17:52] fluxAeon: good morning!
[21:17:58] havenwood: fluxAeon: hi!
[21:18:43] phaul: hello there
[21:18:56] fluxAeon: how's it going
[21:18:58] fluxAeon: friday is hereee
[21:19:12] phaul: I am way ahead of you
[21:19:24] phaul: almost saturday :)
[21:19:40] fluxAeon: so monday will be here sooner for you than me lol
[21:19:46] Hobbyboy: has joined #ruby
[21:21:14] Fernando-Basso: has joined #ruby
[21:22:12] CrazyEddy: has joined #ruby
[21:23:32] doodlebug: has joined #ruby
[21:26:00] lomex: has joined #ruby
[21:32:44] aqd: has joined #ruby
[21:43:02] aqd: has joined #ruby
[21:51:25] havenwood: It's Freyja's Day here.
[21:51:46] havenwood: ACTION rides off in a chariot pulled by cats
[21:54:33] fluxAeon: do any of you folks run your rails apps in containers?
[21:55:39] DTZUZO: has joined #ruby
[22:09:14] dsmythe_: has joined #ruby
[22:11:35] Swyper: has joined #ruby
[22:13:15] FastJack: has joined #ruby
[22:13:56] ramfjord: has joined #ruby
[22:22:05] totallyserious: has joined #ruby
[22:26:07] totallyserious: has left #ruby: ()
[22:27:13] jenrzzz: has joined #ruby
[22:27:16] dar123: has joined #ruby
[22:30:00] Azure: has joined #ruby
[22:37:06] mochiyoda: has joined #ruby
[22:42:55] dsmythe: has joined #ruby
[22:57:55] dsmythe: has joined #ruby
[22:58:48] dsmythe: has joined #ruby
[22:59:59] dsmythe_: has joined #ruby
[23:07:53] jottr: has joined #ruby
[23:10:23] dsmythe: has joined #ruby
[23:10:54] SeepingN: has joined #ruby
[23:14:39] CrazyEddy: has joined #ruby
[23:18:46] tdy: has joined #ruby
[23:20:06] dsmythe: has joined #ruby
[23:23:40] CrazyEddy: has joined #ruby
[23:24:48] violentE: has joined #ruby
[23:26:08] n13z: has joined #ruby
[23:31:16] snk_: has joined #ruby
[23:36:47] CrazyEddy: has joined #ruby
[23:36:49] kyrylo: has joined #ruby
[23:37:08] CrazyEddy: has joined #ruby
[23:51:32] orbyt_: has joined #ruby
[23:52:18] CrazyEddy: has joined #ruby