« Back to channel list

#ruby - 03 May 2019

« Back 1 day Forward 1 day »
[00:00:14] fdimitri_: has joined #ruby
[00:03:05] al2o3-cr: &>> "foo\\\\\\\\\\\bar\n\t\r\t\\\\\\\\".unpack1('H*')
[00:03:07] rubydoc: # => "666f6f5c5c5c5c5c0861720a090d095c5c5c5c" (https://carc.in/#/r/6tw8)
[00:03:58] orbyt_: has joined #ruby
[00:04:18] al2o3-cr: &>> "foo\\\\\\\\\\\bar\n\t\r\t\\\\\\\\".unpack1('B*')
[00:04:19] rubydoc: # =>... check link for more (https://carc.in/#/r/6tw9)
[00:05:29] AJA4350: has joined #ruby
[00:06:22] ramfjord: has joined #ruby
[00:12:53] zacts: has joined #ruby
[00:13:09] comet23: has joined #ruby
[00:15:49] al2o3-cr: comet23: sup!
[00:21:13] Kestrel-029: has joined #ruby
[00:22:48] NightMonkey: has joined #ruby
[00:26:43] rhuang: has joined #ruby
[00:29:48] violentE: has joined #ruby
[00:32:34] fphilipe: has joined #ruby
[00:41:29] rhuang: has joined #ruby
[00:45:37] rhuang: has joined #ruby
[00:51:18] weteamsteve1: has joined #ruby
[00:52:45] ramfjord: I'm thinking of using ruby to codegen some golang for a terraform plugin in my company - does anyone know a ruby equivalent of `fmt` in bash for long lists of parameters?
[00:54:34] rhuang: has joined #ruby
[00:58:23] al2o3-cr: ramfjord: why?
[00:58:25] ramfjord: ruby to codegen a golang terraform plugin to interact with a graphql API based on the graphql schema introspection... what has my life become?
[00:58:46] ramfjord: I can probably just split the parameter lists with newlines
[00:59:18] al2o3-cr: use go then
[00:59:26] ramfjord: go to codegen go?
[01:00:15] rhuang: has joined #ruby
[01:01:31] ramfjord: because 1) it's string manipulation is not very nice compared to ruby, 2) perhaps there's a good way to do type introspection with it, but I'm not sure, 3) I'm not as familiar with golang graphql client libraries (which I will ened to query the schema from the live prod server at built time), though admittedly this last isn't such a good reason
[01:02:36] ramfjord: also I hate that they defined their own DSL for go templates rather than just using the actual library like ERB does
[01:02:45] ramfjord: actual go/ruby code I mean
[01:02:58] al2o3-cr: ramfjord: not really a ruby Q
[01:03:16] ramfjord: I was just looking for a ruby equivalent of fmt
[01:03:48] al2o3-cr: i'd the fuck we no golong?
[01:04:23] ramfjord: al2o3-cr: not really a ruby A
[01:05:02] fphilipe: has joined #ruby
[01:05:53] al2o3-cr: ramfjord: who knows?
[01:06:12] Nicmavr: has joined #ruby
[01:09:20] al2o3-cr: ramfjord: /msg alis go
[01:10:51] ramfjord: I'm not asking about go?
[01:11:20] al2o3-cr: ramfjord: /msg alis list go but whatever
[01:11:47] al2o3-cr: ramfjord: what part of fmt?
[01:12:15] duderonomy: has joined #ruby
[01:12:50] AJA4351: has joined #ruby
[01:13:11] ramfjord: echo "long string" | fmt -w 72
[01:13:33] ramfjord: break on word boundaries only, try to make it look nice at about 72 chars wide
[01:15:14] al2o3-cr: ramfjord: \b regex
[01:19:19] ramfjord: I'm aware of the 0 width regex anchors I can use, or String#split for that matter, but I think that good versions of this program is slghtly more complicated than you realize
[01:20:17] al2o3-cr: ok, ramfjord
[01:25:20] ramfjord: ah: ttps://www.rubydoc.info/gems/par/0.0.1
[01:27:05] duderono_: has joined #ruby
[01:28:14] al2o3-cr: ramfjord: the nice flip flop operater would've solved that
[01:34:12] al2o3-cr: ramfjord: are you trying to rewrite?
[01:35:03] al2o3-cr: don't bother
[01:35:54] weteamsteve: has joined #ruby
[01:40:23] al2o3-cr: ramfjord: #take_while and #drop_while
[01:42:14] ramfjord: I wouldn't rewrite - I'd use that `par` wrapper gem. par is actually an even better version of fmt for this
[01:42:24] ramfjord: anyway, thanks for at least trying to help al2o3-cr
[01:43:59] al2o3-cr: ramfjord: gems are exactly that.
[01:47:27] Nicmavr: has joined #ruby
[01:52:32] orbyt_: has joined #ruby
[02:00:05] duderonomy: has joined #ruby
[02:02:28] Kestrel-029: has joined #ruby
[02:04:04] ramfjord: has joined #ruby
[02:05:10] zacts: has joined #ruby
[02:05:35] dsmythe: has joined #ruby
[02:06:12] Nicmavr: has joined #ruby
[02:12:12] Fenhl: has joined #ruby
[02:12:13] rann: has joined #ruby
[02:12:29] BuildTheRobots: has joined #ruby
[02:16:52] tdy1: has joined #ruby
[02:17:07] rhuang: has joined #ruby
[02:19:29] dviola: has joined #ruby
[02:37:14] laaron: has joined #ruby
[02:59:34] zacts: has joined #ruby
[03:10:35] braincrash: has joined #ruby
[03:19:06] ur5us_: has joined #ruby
[03:19:50] ur5us: has joined #ruby
[03:32:21] dsmythe: has joined #ruby
[03:35:33] fphilipe: has joined #ruby
[03:38:26] roadt: has joined #ruby
[03:51:14] SuperL4g: has joined #ruby
[04:14:24] jenrzzz: has joined #ruby
[04:18:29] orbyt_: has joined #ruby
[04:21:15] Nicmavr: has joined #ruby
[04:21:22] jenrzzz: has joined #ruby
[04:21:28] dellavg_: has joined #ruby
[04:21:31] lupine: has joined #ruby
[04:29:33] SeepingN: has joined #ruby
[04:33:10] _whitelogger: has joined #ruby
[04:36:19] Kestrel-029: has joined #ruby
[04:51:04] Jcdavo: has joined #ruby
[05:02:01] orbyt_: has joined #ruby
[05:02:06] phs^: has joined #ruby
[05:02:48] cthulchu: has joined #ruby
[05:04:12] Matrix9180: has joined #ruby
[05:09:45] pwnd_nsfw: has joined #ruby
[05:13:32] reber: has joined #ruby
[05:15:20] fphilipe: has joined #ruby
[05:20:07] conta: has joined #ruby
[05:21:11] Nicmavr: has joined #ruby
[05:23:51] dinfuehr: has joined #ruby
[05:32:02] ur5us_: has joined #ruby
[05:32:50] ur5us_: has joined #ruby
[05:34:15] conta: has joined #ruby
[05:37:27] cnsvc: has joined #ruby
[05:37:56] dionysus69: has joined #ruby
[05:41:49] haengma: has joined #ruby
[05:44:17] Swyper: has joined #ruby
[05:49:27] sauvin: has joined #ruby
[05:51:06] sauvin: has joined #ruby
[05:53:14] Ai9zO5AP: has joined #ruby
[05:54:04] pwnd_nsfw`: has joined #ruby
[05:56:56] ricekrispie: has joined #ruby
[06:02:07] dionysus69: these are equivalent right? single_line = ->(arg) { ... }; multi_line = lambda { |arg| ... }
[06:02:26] havenwood: dionysus69: yes, both lambdas
[06:04:32] dionysus69: ok thanks :) before now I thought lambda(arg) would work the same
[06:05:12] havenwood: &>> RubyVM::InstructionSequence.compile('lambda { |arg| }').to_a.last
[06:05:15] rubydoc: # => [:label_0, 1, :RUBY_EVENT_LINE, [:putself], [:send, {:mid=>:lambda, :flag=>4, :orig_argc=>0}, false,... check link for more (https://carc.in/#/r/6twk)
[06:05:23] havenwood: &>> RubyVM::InstructionSequence.compile('->(arg) { }').to_a.last
[06:05:24] rubydoc: # => [1, :RUBY_EVENT_LINE, [:putspecialobject, 1], [:send, {:mid=>:lambda, :flag=>4, :orig_argc=>0}, false,... check link for more (https://carc.in/#/r/6twl)
[06:06:12] Nicmavr: has joined #ruby
[06:17:24] rhuang: has joined #ruby
[06:18:45] cnsvc: has joined #ruby
[06:25:09] aupadhye: has joined #ruby
[06:30:27] richard: has joined #ruby
[06:32:56] cold_iron: has joined #ruby
[06:33:53] cold_iron: has joined #ruby
[06:36:03] cold_iron: has joined #ruby
[06:40:45] andikr: has joined #ruby
[06:44:27] clemens3_: has joined #ruby
[06:45:07] fphilipe: has joined #ruby
[06:55:41] jenrzzz: has joined #ruby
[06:56:44] tdy: has joined #ruby
[07:00:17] dsmythe: has joined #ruby
[07:00:54] lxsameer: has joined #ruby
[07:01:21] conta: has joined #ruby
[07:08:41] baweaver: havenwood: we should add parser later
[07:08:54] baweaver: VM ISec is kinda nasty
[07:13:04] fphilipe: has joined #ruby
[07:15:22] evdubs: has joined #ruby
[07:16:30] clemens3_: has joined #ruby
[07:16:48] Dbugger: has joined #ruby
[07:17:48] cnsvc: has joined #ruby
[07:21:59] Sylario: has joined #ruby
[07:22:31] hightower3: has joined #ruby
[07:22:56] hightower3: has joined #ruby
[07:25:42] jenrzzz: has joined #ruby
[07:25:59] alem0lars: has joined #ruby
[07:28:29] alem0lars_: has joined #ruby
[07:28:56] jefffrails35: has joined #ruby
[07:30:38] ramfjord: has joined #ruby
[07:32:31] ellcs: has joined #ruby
[07:42:36] _whitelogger: has joined #ruby
[07:45:21] RyanMcCoskrie: has joined #ruby
[07:48:34] BH23: has joined #ruby
[07:50:53] mikecmpbll: has joined #ruby
[07:52:11] jenrzzz: has joined #ruby
[07:56:27] claudiuinberlin: has joined #ruby
[08:04:45] jenrzzz: has joined #ruby
[08:28:41] vondruch: has joined #ruby
[08:29:08] Squeeeez: has joined #ruby
[08:36:12] Nicmavr: has joined #ruby
[08:50:42] gregf_: has joined #ruby
[09:08:02] kyrylo: has joined #ruby
[09:28:41] _sfiguser: has joined #ruby
[09:30:27] m_antis: has joined #ruby
[09:33:07] huyens: has joined #ruby
[09:35:09] huyens: I'm having a tough time getting a bundle gem installed from git to work in my script, because it's not available as a system wide gem (shows up in bundle info, but not in gem list). I understand this is by design, so I've tried the following:
[09:35:40] huyens: 1. bundle install --system, but checking gem list does not have the library that is being pulled from git instead of rubygems.org
[09:35:56] huyens: 2. require 'bundler/setup', but the library is still not found
[09:36:17] huyens: According to the documentation, "Note that because RubyGems lacks the ability to handle gems from git, any gems installed from a git repository will not show up in gem list. They will, however, be available after running Bundler.setup."
[09:36:32] huyens: Can someone please help me?
[09:39:06] tdy: has joined #ruby
[09:39:35] timkaechele: has joined #ruby
[09:40:38] Fernando-Basso: has joined #ruby
[09:51:23] conta: has joined #ruby
[10:03:30] _sfiguser: guys has anybody tried perl? any impressions?
[10:03:31] Ai9zO5AP: has joined #ruby
[10:06:17] Kestrel-029: has joined #ruby
[10:15:00] Jonopoly: has joined #ruby
[10:16:23] crankharder: has joined #ruby
[10:17:46] rhuang: has joined #ruby
[10:18:53] huyens: has joined #ruby
[10:19:42] Jonopoly: has joined #ruby
[10:21:16] Nicmavr: has joined #ruby
[10:25:49] jenrzzz: has joined #ruby
[10:34:23] i9zO5AP: has joined #ruby
[10:56:15] jenrzzz: has joined #ruby
[11:02:09] tdy: has joined #ruby
[11:09:10] _whitelogger: has joined #ruby
[11:38:08] conta: has joined #ruby
[11:39:55] ldnunes: has joined #ruby
[11:44:04] kyrylo: has joined #ruby
[11:47:22] ltem: has joined #ruby
[11:52:54] AJA4350: has joined #ruby
[11:57:55] dar123: has joined #ruby
[11:58:00] jenrzzz: has joined #ruby
[12:01:25] crankharder: has joined #ruby
[12:22:25] rhuang: has joined #ruby
[12:27:01] BH23: has joined #ruby
[12:29:45] tuor: has joined #ruby
[12:39:54] crankharder: has joined #ruby
[12:42:46] _joes_: has joined #ruby
[12:48:24] dsmythe: has joined #ruby
[12:52:06] Inline: has joined #ruby
[12:58:03] leah2: has joined #ruby
[12:59:17] dsmythe: has joined #ruby
[13:02:32] Kestrel-029: has joined #ruby
[13:05:03] Ai9zO5AP: has joined #ruby
[13:05:38] dinfuehr: has joined #ruby
[13:06:21] Nicmavr: has joined #ruby
[13:07:29] sh7d: has joined #ruby
[13:08:26] jcalla: has joined #ruby
[13:19:40] Swyper: has joined #ruby
[13:21:49] millerti: has joined #ruby
[13:30:15] SeepingN: has joined #ruby
[13:31:10] ramfjord: has joined #ruby
[13:31:40] jenrzzz: has joined #ruby
[13:32:05] m_antis: has joined #ruby
[13:40:26] Fernando-Basso: has joined #ruby
[13:41:05] jelera: has joined #ruby
[13:42:11] pupsikov: has joined #ruby
[13:42:47] weird_error: has joined #ruby
[13:43:57] jelera: has joined #ruby
[13:55:20] lucasb: has joined #ruby
[13:56:11] tdy: has joined #ruby
[13:56:29] mguy: has left #ruby: ()
[14:03:53] jelera: has joined #ruby
[14:08:29] Azure: has joined #ruby
[14:19:31] reber: has joined #ruby
[14:21:16] Nicmavr: has joined #ruby
[14:21:36] zacts: has joined #ruby
[14:23:46] ule: _sfiguser: move away of it :P
[14:34:46] BH23: has joined #ruby
[14:37:22] agent_white: has joined #ruby
[14:38:30] zephiro: has joined #ruby
[14:41:52] houhoulis: has joined #ruby
[14:42:17] Dbugger: has joined #ruby
[14:46:08] sphenxes: has joined #ruby
[14:49:23] gnufied: has joined #ruby
[14:51:11] rubydoc: has joined #ruby
[14:53:05] jelera: has joined #ruby
[14:53:50] jelera: has joined #ruby
[14:54:40] jelera: has joined #ruby
[14:55:32] jelera: has joined #ruby
[14:56:11] jelera: has joined #ruby
[14:56:54] weteamsteve: has joined #ruby
[14:58:45] xfbs: has joined #ruby
[15:20:31] ngw: has joined #ruby
[15:21:34] ngw: I'm looking at elasticsearch-api, differente versions of the library support different versions of the server, how to support more than one version in a library/service?
[15:21:48] ngw: what an exceptionally weird design choice...
[15:30:24] jottr: has joined #ruby
[15:40:26] claudiuinberlin: has joined #ruby
[15:40:39] polishdub: has joined #ruby
[15:42:37] brendan-: has joined #ruby
[15:46:54] djdduty: has joined #ruby
[15:56:06] dar123: has joined #ruby
[16:03:47] sphenxes: has joined #ruby
[16:11:24] zacts: has joined #ruby
[16:17:49] zacts: has joined #ruby
[16:18:16] Paraxial: has joined #ruby
[16:23:25] orbyt_: has joined #ruby
[16:29:54] dsmythe_: has joined #ruby
[16:33:59] jenrzzz: has joined #ruby
[16:34:50] dsmythe: has joined #ruby
[16:37:32] jottr: has joined #ruby
[16:38:55] mikecmpbll: has joined #ruby
[16:47:34] haengma: has joined #ruby
[16:50:03] dsmythe: has joined #ruby
[16:50:59] nowhere_man: has joined #ruby
[16:53:48] duderonomy: has joined #ruby
[16:53:58] rhuang: has joined #ruby
[16:55:40] jottr: has joined #ruby
[16:57:33] fphilipe: has joined #ruby
[17:00:20] OneNeptune: has joined #ruby
[17:05:54] jottr: has joined #ruby
[17:06:05] Xiti: has joined #ruby
[17:07:31] cesaretto: has joined #ruby
[17:07:35] cesaretto: has left #ruby: ()
[17:16:10] jottr: has joined #ruby
[17:16:12] dar123: has joined #ruby
[17:16:45] hightower3: has joined #ruby
[17:20:06] OneNeptune: has joined #ruby
[17:34:37] old_relik: has joined #ruby
[17:35:38] old_relik: I have a job (activejob / sidekiq) that gets a bunch of IDs to process and for each, send an sms and then log it into a database
[17:37:03] old_relik: if this processing of an ID throws an exception, I don't want it to retry the job because the other IDs in the batch would get reprocessed again
[17:37:30] old_relik: I can solve this in two ways afaict:
[17:37:39] old_relik: 1. disable retries for the job
[17:38:01] old_relik: 2. rescue exceptions in the processing and just 'next'
[17:38:13] old_relik: does that seem sensible?
[17:38:45] mikecmpbll: old_relik : just depends what you want to happen. usually the advice is to make a job idempotent.
[17:38:57] old_relik: yeah, I was trying to make it idempotent
[17:39:05] kyrylo: has joined #ruby
[17:39:21] jottr: has joined #ruby
[17:39:24] mikecmpbll: so, for each id it should only send the sms if the database record doesn't already exist?
[17:39:26] mikecmpbll: then a job can retry and not cause duplication.
[17:39:30] old_relik: but it's a bit tricky because the idempotency is a bit domain specific
[17:39:38] old_relik: but the job is a bit generic
[17:40:20] claudiuinberlin: has joined #ruby
[17:44:04] old_relik: mikecmpbll: right
[17:44:27] duderonomy: has joined #ruby
[17:44:51] mikecmpbll: not sure in what way you mean. perhaps would benefit from an example :)
[17:45:22] old_relik: ok, let me try
[17:48:05] old_relik: mikecmpbll: https://dpaste.de/9sej
[17:49:09] old_relik: mikecmpbll: I can wrap this around an if as you said and ensure its idempotent
[17:49:34] jottr: has joined #ruby
[17:49:43] old_relik: the issue is that the idempotency condition is specific to the "comunication_type"
[17:49:58] old_relik: and I don't want that condition to sit here
[17:50:11] old_relik: that condition is already applied before the job is spun
[17:50:28] old_relik: but of course, that doesn't guarantee against retries
[17:56:07] ltem: has joined #ruby
[17:59:47] jottr: has joined #ruby
[18:05:45] govg: has joined #ruby
[18:08:45] cek: has joined #ruby
[18:09:17] cek: anyone good with Mail lib?
[18:09:22] adam12: old_relik: A third approach is to use another job to represent the sending of the SMS / logging, and have your job that recieves the list of IDs break them up into multiple jobs
[18:09:41] old_relik: adam12: I considered this
[18:09:59] jottr: has joined #ruby
[18:10:00] mikecmpbll: cek : i'm an expert
[18:10:02] old_relik: but wouldn't I run into the same problem?
[18:10:02] adam12: old_relik: Then make those smaller jobs idempotent. If you don't care about the job retrying, it might always be easiest to never retry. I'm not sure about Sidekiq but in Que I have an `ensure` that always calls `destroy`.
[18:10:04] mikecmpbll: on everything
[18:11:01] old_relik: oh right, so like AbstractEntryPointJob --> SpinUpDomainSpecificIdempotentJobs?
[18:11:17] adam12: old_relik: I'm just saying, SMSScheduler.enqueue([1, 2, 3]) calls SMSSender.enqueue(1), SMSSender.enqueue(2), etc.
[18:11:34] mikecmpbll: pretty much makes SMSScheduler irrelevant
[18:11:43] mikecmpbll: just schedule the SMSSender jobs off the bat
[18:12:00] adam12: old_relik: Then inside the job block for the SMSSender, `def run; send_sms && log; rescue => e; log_failure(e); end`.
[18:12:19] adam12: old_relik: I don't use Sidekiq so I'm obviously paraphrasing here.
[18:12:22] cek: ok, tell me why the header is empty - `Mail.new(body: 'xx', to: 'boy band:;')[:to].to_s`
[18:12:59] fphilipe: has joined #ruby
[18:13:25] old_relik: adam12: right, thanks, but I think that won't work for me
[18:13:38] old_relik: I actually need the job to process a bunch of messages, because there are a lot
[18:13:49] old_relik: don't want to spawn 100k jobs
[18:14:09] mikecmpbll: you'd be surprised how little job overhead actually is.
[18:14:30] Azure: has joined #ruby
[18:14:31] mikecmpbll: in fact. you'll likely get speed benefit due to job parallelism ..
[18:14:57] mikecmpbll: unless you know each job is going to be consistently large, in which case there's an argument for that.
[18:15:13] old_relik: each job is a fixed size of data
[18:15:35] mikecmpbll: and you're running many at a time?
[18:15:48] nowhere_man: has joined #ruby
[18:15:57] mikecmpbll: do you need it to retry if one item in the job fails?
[18:16:20] old_relik: I don't want it to retry (but that's only because it's not idempotent)
[18:16:39] mikecmpbll: but if item 14,000/100k fails
[18:16:49] mikecmpbll: 86k items will be missed ..
[18:17:09] old_relik: I can handle that simply by rescuing and moving on
[18:17:26] mikecmpbll: ok, so you don't mind if item 14,000 never succeeds?
[18:17:36] mikecmpbll: or if it fails, it's never likely to suceed?
[18:18:00] ruby[bot]: cek: # => 1 (https://eval.in/1102673)
[18:18:01] mikecmpbll: oh fine. so just do that :D
[18:18:11] cek: >> require 'mail'; Mail.new(body: 'xx', to: 'boy band:;')[:to].to_s
[18:18:12] ruby[bot]: cek: # => cannot load such file -- mail (LoadError) ...check link for more (https://eval.in/1102674)
[18:18:23] old_relik: my question i guess is a design question
[18:18:27] old_relik: I can solve this problem
[18:18:40] mikecmpbll: yeah, well that's the design answer.
[18:18:52] adam12: old_relik: IMHO, anytime I've looped and done work in the same job I've always regretted it later.
[18:18:58] mikecmpbll: if a failure is absolute and expected, then rescue and skip.
[18:19:00] ramfjord: has joined #ruby
[18:19:34] old_relik: I would _prefer_ if the job were idempotent
[18:19:43] old_relik: even if it doesn't need it to be
[18:19:47] old_relik: i don't know if that makes sense
[18:19:51] mikecmpbll: it should be idempotent anyway, regardless of this discussion.
[18:19:53] old_relik: adam12: why would you say so?
[18:19:56] old_relik: mikecmpbll: right
[18:20:02] ytti: varmaa joku 6 kertaa lätäkön yli
[18:20:05] mikecmpbll: because the failure might not be because the item failure
[18:20:12] jottr: has joined #ruby
[18:20:29] mikecmpbll: (the predictable, absolute failure)
[18:20:37] old_relik: you're completely right
[18:21:06] adam12: old_relik: 1. I usually end up needing to scale horizontally and with a single job I'm limited. 2. Some errors are recoverable and I'd rather have a single job retrying than the entire job blocked for retry.
[18:21:32] adam12: old_relik: There's nothing wrong with your implementation design tho, so if you feel it suits you better, just rescue and continue/next/whatever.
[18:22:20] mikecmpbll: batched/unbatched isn't particularly important. unbatched is cleaner, as adam illudes to, but there's good reasons to do batched too.
[18:22:24] mikecmpbll: very much depends on the workload.
[18:22:29] old_relik: mikecmpbll: an easy way to make this idempotent would be something like this: https://dpaste.de/5gYP
[18:22:56] old_relik: my worry is the modeling here, that condition leaks what is effectively a highly specific condition to the Model
[18:23:11] old_relik: but job tries to be generic
[18:24:13] mikecmpbll: are you dealing with something where you have an Active Record representation and an external API call?
[18:24:22] mikecmpbll: best to have some status in the Active Record, if that's the case
[18:24:43] Fernando-Basso: has joined #ruby
[18:24:51] mikecmpbll: it gets updated in the job, and you skip ones that are already x status .. which i think is probably what you were getting at with paste
[18:25:52] mikecmpbll: not sure what you mean about leaking. if Model is always a specific Model, then there's no worry about coupling the sidekiq job to that.
[18:26:42] mikecmpbll: unless you store whether or not send_sms has happened yet, you'll never be able to make the job idempotent.
[18:27:19] sameerynho: has joined #ruby
[18:27:39] sezuan: has joined #ruby
[18:27:39] old_relik: mikecmpbll: thanks for trying to help, but I realize how hard it is to explain these things on IRC
[18:28:06] pilcrow: has joined #ruby
[18:28:21] old_relik: mikecmpbll: basically, I guess the job is for sending any "kind" of SMS. the Model understands many kinds of SMSes
[18:28:39] old_relik: and each kind has it's unique idempotency condition
[18:28:50] old_relik: and so either the job needs to become type specific
[18:28:56] teej: has joined #ruby
[18:28:56] old_relik: or any of the other things we spoke above
[18:29:28] old_relik: i'm torn between the two
[18:29:36] mikecmpbll: i can't really comprehend how those conditions could differ if it's the same model, but if so then you'd expect them to have a unified interface at least
[18:29:51] old_relik: maybe that's something that I should explore
[18:29:55] old_relik: hide the details
[18:30:27] mikecmpbll: a `sent?` method that behaves correctly for the different cases? for example
[18:30:27] jottr: has joined #ruby
[18:31:46] old_relik: this was helpful
[18:31:46] old_relik: thanks a lot
[18:36:19] sezuan: has joined #ruby
[18:37:23] al-damiri: has joined #ruby
[18:38:18] ltem: has joined #ruby
[18:40:41] jottr: has joined #ruby
[18:44:29] loolool: has joined #ruby
[18:45:18] clemens3_: has joined #ruby
[18:56:36] jcarl43: has joined #ruby
[18:59:10] ricekrispie2: has joined #ruby
[18:59:37] phaul: has joined #ruby
[19:03:55] jottr: has joined #ruby
[19:05:59] jenrzzz: has joined #ruby
[19:06:06] orbyt_: has joined #ruby
[19:07:03] hightower3: has joined #ruby
[19:14:07] jottr: has joined #ruby
[19:24:22] jottr: has joined #ruby
[19:31:19] adam12: Has anybody ever seen a way to lazy-capture/parse Ruby without using a String to represent it, and preferably not using method_source? ie. foo = proc { puts "Hello World" }, foo.source # => puts "Hello World"
[19:33:48] jenrzzz: has joined #ruby
[19:34:34] jottr: has joined #ruby
[19:35:52] loveablelobster: has joined #ruby
[19:37:31] loveablelobster: Since when does rubocop require a gemfile to run? I used to be able to run rubocop on any source file. Now it will raise an error if I am not running it from a folder where there is no gemfile
[19:39:43] loveablelobster: never mind, deinstalled, reinstalled, works
[19:44:48] jottr: has joined #ruby
[19:47:49] OneNeptune: has joined #ruby
[19:47:53] postmodern: has joined #ruby
[19:48:42] orbyt_: has joined #ruby
[19:52:52] jenrzzz: has joined #ruby
[19:53:21] cnsvc: has joined #ruby
[19:55:01] jottr: has joined #ruby
[20:05:14] jottr: has joined #ruby
[20:11:38] zapata: has joined #ruby
[20:13:19] mikecmpbll: has joined #ruby
[20:15:28] jottr: has joined #ruby
[20:28:11] pupsikov: has joined #ruby
[20:29:31] cd: has joined #ruby
[20:31:30] orbyt_: has joined #ruby
[20:37:07] DarthGandalf: has joined #ruby
[20:38:10] laaron: has joined #ruby
[20:41:07] Swyper: has joined #ruby
[20:41:59] kyrylo: has joined #ruby
[20:46:24] laaron: has joined #ruby
[20:49:26] jottr: has joined #ruby
[20:51:18] houhoulis: has joined #ruby
[20:51:48] wallace_mu: has joined #ruby
[20:59:38] jottr: has joined #ruby
[21:01:59] dsmythe: has joined #ruby
[21:06:38] wallace_mu: has joined #ruby
[21:09:52] jottr: has joined #ruby
[21:20:05] jottr: has joined #ruby
[21:26:28] jenrzzz: has joined #ruby
[21:28:00] ramfjord_: has joined #ruby
[21:30:18] jottr: has joined #ruby
[21:32:54] ramfjord: has joined #ruby
[21:34:56] OneNeptune: has joined #ruby
[21:35:08] Swyper: has joined #ruby
[21:37:05] za1b1tsu: has joined #ruby
[21:37:32] ur5us: has joined #ruby
[21:38:00] ricer2_yFYh: has joined #ruby
[21:42:30] Azure: has joined #ruby
[21:43:21] pupsikov: has joined #ruby
[21:44:47] lambarena: has joined #ruby
[21:46:54] Swyper: has joined #ruby
[21:48:40] arthurnn: has joined #ruby
[21:50:10] queip: has joined #ruby
[21:50:43] jottr: has joined #ruby
[21:51:51] tdy: has joined #ruby
[21:52:18] noizex: has joined #ruby
[21:54:40] ramfjord: has joined #ruby
[21:59:10] haengma: has joined #ruby
[22:04:36] jenrzzz: has joined #ruby
[22:05:26] Swyper: has joined #ruby
[22:06:31] jottr: has joined #ruby
[22:06:32] RiPuk: has joined #ruby
[22:06:59] ramfjord: has joined #ruby
[22:07:28] mattwc: has joined #ruby
[22:07:28] ctp: has joined #ruby
[22:07:35] ryouba: has joined #ruby
[22:07:36] ablackack: has joined #ruby
[22:07:48] jonjitsu1: has joined #ruby
[22:07:55] mkroman: has joined #ruby
[22:08:04] balo: has joined #ruby
[22:08:13] Mutsuhito: has joined #ruby
[22:08:16] KevinSjoberg: has joined #ruby
[22:08:16] keden: has joined #ruby
[22:08:17] canton7: has joined #ruby
[22:08:18] fowlduck: has joined #ruby
[22:08:21] lunarkitty7: has joined #ruby
[22:08:22] Momentum: has joined #ruby
[22:08:23] uranoss: has joined #ruby
[22:08:27] Linuus: has joined #ruby
[22:08:36] JJonah_: has joined #ruby
[22:08:45] yxhuvud: has joined #ruby
[22:08:45] endorama: has joined #ruby
[22:08:50] gremax: has joined #ruby
[22:08:55] argoneus: has joined #ruby
[22:09:00] pwillard: has joined #ruby
[22:09:00] TheBrayn: has joined #ruby
[22:09:00] JoL1hAHN: has joined #ruby
[22:10:53] Fire-Dragon-DoL: has joined #ruby
[22:11:32] szulak: has joined #ruby
[22:12:34] mnemon: has joined #ruby
[22:12:41] znz_jp: has joined #ruby
[22:16:44] jottr: has joined #ruby
[22:18:11] Xiti: has joined #ruby
[22:18:16] pwnd_nsfw`: has joined #ruby
[22:21:27] Swyper_: has joined #ruby
[22:21:38] queip: has joined #ruby
[22:26:57] jottr: has joined #ruby
[22:27:19] haengma: has joined #ruby
[22:33:31] jenrzzz: has joined #ruby
[22:33:33] haengma: has joined #ruby
[22:37:24] jottr: has joined #ruby
[22:46:56] crankharder: has joined #ruby
[22:47:34] jottr: has joined #ruby
[22:48:59] elomatreb: has joined #ruby
[22:57:47] jottr: has joined #ruby
[23:02:17] u0_a238: has joined #ruby
[23:04:20] jenrzzz: has joined #ruby
[23:05:47] ramfjord: has joined #ruby
[23:05:53] Swyper: has joined #ruby
[23:07:47] clemens3: has joined #ruby
[23:10:55] weird_error: has joined #ruby
[23:11:26] jottr: has joined #ruby
[23:21:38] jottr: has joined #ruby
[23:24:06] orbyt_: has joined #ruby
[23:25:23] GodFather: has joined #ruby
[23:32:16] za1b1tsu: has joined #ruby
[23:36:29] jmcgnh: has joined #ruby
[23:37:35] Swyper: has joined #ruby
[23:38:13] jottr: has joined #ruby
[23:40:50] jenrzzz: has joined #ruby
[23:42:00] c0san0stra: has joined #ruby
[23:48:28] jottr: has joined #ruby
[23:58:42] jottr: has joined #ruby