baweaver changed the topic of #ruby to: Rules & more: https://ruby-community.com | Ruby 2.6.3, 2.5.5, 2.4.6: https://www.ruby-lang.org | Paste 4+ lines of text to https://dpaste.de/ and select Ruby as the language | Rails questions? Ask in #RubyOnRails | Books: https://goo.gl/wpGhoQ | Logs: https://irclog.whitequark.org/ruby | Can't talk? Register/identify with Nickserv first!
fdimitri_ has joined #ruby
<al2o3-cr> &>> "foo\\\\\\\\\\\bar\n\t\r\t\\\\\\\\".unpack1('H*')
<rubydoc> # => "666f6f5c5c5c5c5c0861720a090d095c5c5c5c" (https://carc.in/#/r/6tw8)
fdimitri has quit [Ping timeout: 250 seconds]
orbyt_ has joined #ruby
<al2o3-cr> &>> "foo\\\\\\\\\\\bar\n\t\r\t\\\\\\\\".unpack1('B*')
<rubydoc> # =>... check link for more (https://carc.in/#/r/6tw9)
AJA4350 has joined #ruby
ramfjord has joined #ruby
fphilipe has quit [Ping timeout: 252 seconds]
zacts has joined #ruby
comet23 has joined #ruby
<comet23> hello
NightMonkey has quit [Quit: ZNC - http://znc.in]
<al2o3-cr> comet23: sup!
Kestrel-029 has joined #ruby
Nicmavr has quit [Ping timeout: 245 seconds]
NightMonkey has joined #ruby
rhuang has quit [Ping timeout: 244 seconds]
rhuang has joined #ruby
duderonomy has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
violentE has joined #ruby
nowhere_man has quit [Ping timeout: 258 seconds]
lucasb has quit [Quit: Connection closed for inactivity]
fphilipe has joined #ruby
rhuang has quit [Ping timeout: 246 seconds]
zacts has quit [Quit: WeeChat 2.4]
fphilipe has quit [Ping timeout: 258 seconds]
rhuang has joined #ruby
rhuang has quit [Remote host closed the connection]
kyrylo has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
rhuang has joined #ruby
rhuang has quit [Remote host closed the connection]
weteamsteve1 has joined #ruby
<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?
rhuang has joined #ruby
weteamsteve has quit [Ping timeout: 276 seconds]
rhuang has quit [Remote host closed the connection]
<al2o3-cr> ramfjord: why?
<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?
<ramfjord> I can probably just split the parameter lists with newlines
<al2o3-cr> use go then
<ramfjord> go to codegen go?
<ramfjord> nonsense
<al2o3-cr> why not?
rhuang has joined #ruby
mikecmpbll has quit [Quit: inabit. zz.]
<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
rhuang has quit [Remote host closed the connection]
<ramfjord> also I hate that they defined their own DSL for go templates rather than just using the actual library like ERB does
<ramfjord> actual go/ruby code I mean
<al2o3-cr> ramfjord: not really a ruby Q
<ramfjord> I was just looking for a ruby equivalent of fmt
<al2o3-cr> i'd the fuck we no golong?
crankharder has quit [Ping timeout: 252 seconds]
<ramfjord> al2o3-cr: not really a ruby A
<ramfjord> :D
fphilipe has joined #ruby
<al2o3-cr> ramfjord: who knows?
Kestrel-029 has quit [Ping timeout: 245 seconds]
Nicmavr has joined #ruby
<al2o3-cr> ramfjord: /msg alis go
<ramfjord> I'm not asking about go?
<al2o3-cr> ramfjord: /msg alis list go but whatever
<al2o3-cr> ramfjord: what part of fmt?
duderonomy has joined #ruby
AJA4351 has joined #ruby
<ramfjord> echo "long string" | fmt -w 72
AJA4350 has quit [Ping timeout: 258 seconds]
AJA4351 is now known as AJA4350
<ramfjord> break on word boundaries only, try to make it look nice at about 72 chars wide
<al2o3-cr> ramfjord: \b regex
AJA4350 has quit [Client Quit]
<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
<al2o3-cr> ok, ramfjord
<ramfjord> ah: ttps://www.rubydoc.info/gems/par/0.0.1
gnufied has quit [Remote host closed the connection]
duderono_ has joined #ruby
<al2o3-cr> ramfjord: the nice flip flop operater would've solved that
duderonomy has quit [Ping timeout: 276 seconds]
orbyt_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
gix has quit [Ping timeout: 246 seconds]
<al2o3-cr> ramfjord: are you trying to rewrite?
duderono_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<al2o3-cr> don't bother
weteamsteve has joined #ruby
fphilipe has quit [Ping timeout: 276 seconds]
weteamsteve1 has quit [Ping timeout: 276 seconds]
<al2o3-cr> ramfjord: #take_while and #drop_while
<ramfjord> I wouldn't rewrite - I'd use that `par` wrapper gem. par is actually an even better version of fmt for this
al-damiri has quit [Quit: Connection closed for inactivity]
<ramfjord> anyway, thanks for at least trying to help al2o3-cr
<al2o3-cr> ramfjord: gems are exactly that.
Nicmavr has quit [Ping timeout: 245 seconds]
Nicmavr has joined #ruby
orbyt_ has joined #ruby
duderonomy has joined #ruby
ramfjord has quit [Ping timeout: 258 seconds]
Kestrel-029 has joined #ruby
Nicmavr has quit [Ping timeout: 245 seconds]
ramfjord has joined #ruby
dviola has quit [Ping timeout: 245 seconds]
dsmythe has quit [Remote host closed the connection]
zacts has joined #ruby
duderonomy has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
dsmythe has joined #ruby
Nicmavr has joined #ruby
Kestrel-029 has quit [Ping timeout: 245 seconds]
BuildTheRobots has quit [Ping timeout: 258 seconds]
rann has quit [Ping timeout: 258 seconds]
Fenhl has quit [Ping timeout: 258 seconds]
Fenhl has joined #ruby
rann has joined #ruby
BuildTheRobots has joined #ruby
tdy1 has joined #ruby
rhuang has joined #ruby
dviola has joined #ruby
rhuang has quit [Ping timeout: 245 seconds]
agent_white has quit [Quit: bbl]
laaron has quit [Quit: ZNC 1.7.1 - https://znc.in]
laaron has joined #ruby
zacts has quit [Quit: WeeChat 2.4]
ramfjord has quit [Ping timeout: 255 seconds]
zacts has joined #ruby
tdy1 is now known as tdy
braincrash has quit [Quit: bye bye]
braincrash has joined #ruby
ur5us_ has joined #ruby
ur5us_ has quit [Remote host closed the connection]
ur5us has quit [Read error: Connection reset by peer]
ur5us has joined #ruby
roadt has quit [Ping timeout: 246 seconds]
comet23 has quit [Quit: Connection closed for inactivity]
dsmythe has quit [Remote host closed the connection]
dsmythe has joined #ruby
fphilipe has joined #ruby
roadt has joined #ruby
violentE has quit [Quit: Leaving]
SuperL4g has joined #ruby
SuperLag has quit [Ping timeout: 245 seconds]
houhoulis has quit [Remote host closed the connection]
orbyt_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
fphilipe has quit [Ping timeout: 258 seconds]
lupine has quit [Ping timeout: 250 seconds]
jenrzzz has joined #ruby
orbyt_ has joined #ruby
Nicmavr has quit [Ping timeout: 245 seconds]
jenrzzz has quit [Ping timeout: 268 seconds]
Nicmavr has joined #ruby
jenrzzz has joined #ruby
dellavg_ has joined #ruby
lupine has joined #ruby
SeepingN has joined #ruby
_whitelogger has joined #ruby
Kestrel-029 has joined #ruby
Nicmavr has quit [Ping timeout: 245 seconds]
SeepingN has quit [Ping timeout: 258 seconds]
Inline has quit [Quit: Leaving]
Jcdavo has joined #ruby
Jcdavo has quit []
orbyt_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
orbyt_ has joined #ruby
phs^ has joined #ruby
cthulchu has joined #ruby
Matrix9180 has joined #ruby
pwnd_nsfw has joined #ruby
UncleCid__ has quit [Ping timeout: 246 seconds]
clemens3_ has quit [Ping timeout: 246 seconds]
reber has joined #ruby
reber has quit [Read error: Connection reset by peer]
fphilipe has joined #ruby
conta has joined #ruby
Kestrel-029 has quit [Ping timeout: 245 seconds]
Nicmavr has joined #ruby
dinfuehr has quit [Ping timeout: 250 seconds]
dinfuehr has joined #ruby
conta has quit [Ping timeout: 245 seconds]
ur5us_ has joined #ruby
ur5us_ has quit [Remote host closed the connection]
ur5us_ has joined #ruby
conta has joined #ruby
ur5us has quit [Ping timeout: 250 seconds]
ur5us_ has quit [Ping timeout: 252 seconds]
dionysus69 has quit [Read error: Connection reset by peer]
cnsvc has joined #ruby
weteamsteve has quit [Read error: Connection reset by peer]
dionysus69 has joined #ruby
Matrix9180 has quit [Remote host closed the connection]
haengma has joined #ruby
Swyper has quit [Remote host closed the connection]
Swyper has joined #ruby
Swyper has quit [Remote host closed the connection]
haengma has quit [Remote host closed the connection]
sauvin has joined #ruby
sauvin has quit [Max SendQ exceeded]
sauvin has joined #ruby
Ai9zO5AP has joined #ruby
pwnd_nsfw` has joined #ruby
pwnd_nsfw has quit [Ping timeout: 245 seconds]
ricekrispie has joined #ruby
ricekrispie2 has quit [Ping timeout: 258 seconds]
<dionysus69> these are equivalent right? single_line = ->(arg) { ... }; multi_line = lambda { |arg| ... }
<havenwood> dionysus69: yes, both lambdas
<dionysus69> ok thanks :) before now I thought lambda(arg) would work the same
<havenwood> &>> RubyVM::InstructionSequence.compile('lambda { |arg| }').to_a.last
<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)
<havenwood> &>> RubyVM::InstructionSequence.compile('->(arg) { }').to_a.last
<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)
Nicmavr has quit [Ping timeout: 245 seconds]
Nicmavr has joined #ruby
orbyt_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
m_antis has quit [Quit: m_antis]
jenrzzz has quit [Ping timeout: 245 seconds]
rhuang has joined #ruby
cnsvc has quit [Quit: WeeChat 2.4]
cnsvc has joined #ruby
rhuang has quit [Ping timeout: 258 seconds]
aupadhye has joined #ruby
zacts has quit [Quit: WeeChat 2.4]
richard has joined #ruby
richard is now known as Guest2485
Guest2485 has quit [Client Quit]
cold_iron has joined #ruby
cold_iron has quit [Client Quit]
fphilipe has quit [Ping timeout: 252 seconds]
cold_iron has joined #ruby
cold_iron has quit [Client Quit]
cold_iron has joined #ruby
andikr has joined #ruby
clemens3_ has joined #ruby
fphilipe has joined #ruby
clemens3_ has quit [Ping timeout: 246 seconds]
cold_iron has quit [Quit: WeeChat 2.4]
jenrzzz has joined #ruby
tdy has quit [Read error: Connection reset by peer]
jcarl43 has quit [Quit: WeeChat 2.4]
tdy has joined #ruby
dsmythe has quit [Remote host closed the connection]
dsmythe has joined #ruby
lxsameer has joined #ruby
conta has quit [Quit: conta]
conta has joined #ruby
<baweaver> havenwood: we should add parser later
<baweaver> VM ISec is kinda nasty
fphilipe has quit [Ping timeout: 276 seconds]
fphilipe has joined #ruby
evdubs has quit [Remote host closed the connection]
evdubs has joined #ruby
cnsvc has quit [Remote host closed the connection]
clemens3_ has joined #ruby
Dbugger has joined #ruby
cnsvc has joined #ruby
Dbugger has quit [Client Quit]
sylario has joined #ruby
hightower3 has joined #ruby
hightower3 has quit [Changing host]
hightower3 has joined #ruby
jenrzzz has quit [Ping timeout: 255 seconds]
jenrzzz has joined #ruby
alem0lars has joined #ruby
alem0lars_ has joined #ruby
jefffrails35 has joined #ruby
ramfjord has joined #ruby
alem0lars has quit [Ping timeout: 250 seconds]
ellcs has joined #ruby
ramfjord has quit [Ping timeout: 255 seconds]
jenrzzz has quit [Ping timeout: 250 seconds]
_whitelogger has joined #ruby
RyanMcCoskrie has joined #ruby
BH23 has joined #ruby
mikecmpbll has joined #ruby
jenrzzz has joined #ruby
claudiuinberlin has joined #ruby
jenrzzz has quit [Ping timeout: 268 seconds]
jenrzzz has joined #ruby
cnsvc has quit [Remote host closed the connection]
vondruch has joined #ruby
Squeeeez has joined #ruby
Nicmavr has quit [Ping timeout: 245 seconds]
Nicmavr has joined #ruby
gregf_ has joined #ruby
kyrylo has joined #ruby
tdy has quit [Ping timeout: 252 seconds]
alem0lars_ has quit [Remote host closed the connection]
cd has quit [Quit: cd]
kyrylo has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
_sfiguser has joined #ruby
m_antis has joined #ruby
huyens has joined #ruby
<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:
<huyens> 1. bundle install --system, but checking gem list does not have the library that is being pulled from git instead of rubygems.org
<huyens> 2. require 'bundler/setup', but the library is still not found
<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."
conta has quit [Ping timeout: 246 seconds]
<huyens> Can someone please help me?
tdy has joined #ruby
jefffrails35 has quit [Remote host closed the connection]
timkaechele has joined #ruby
Fernando-Basso has joined #ruby
conta has joined #ruby
jenrzzz has quit [Ping timeout: 258 seconds]
Ai9zO5AP has quit [Ping timeout: 246 seconds]
<_sfiguser> guys has anybody tried perl? any impressions?
Ai9zO5AP has joined #ruby
Kestrel-029 has joined #ruby
Nicmavr has quit [Ping timeout: 245 seconds]
Jonopoly has joined #ruby
crankharder has joined #ruby
rhuang has joined #ruby
huyens has quit [Ping timeout: 268 seconds]
huyens has joined #ruby
Jonopoly has quit [Client Quit]
Jonopoly has joined #ruby
Nicmavr has joined #ruby
Kestrel-029 has quit [Ping timeout: 245 seconds]
rhuang has quit [Ping timeout: 245 seconds]
jenrzzz has joined #ruby
postmodern has quit [Quit: Leaving]
jenrzzz has quit [Ping timeout: 268 seconds]
tdy has quit [Ping timeout: 245 seconds]
i9zO5AP has joined #ruby
Ai9zO5AP has quit [Ping timeout: 250 seconds]
jenrzzz has joined #ruby
tdy has joined #ruby
huyens has quit [Quit: Leaving]
_whitelogger has joined #ruby
conta has quit [Ping timeout: 250 seconds]
jenrzzz has quit [Ping timeout: 245 seconds]
Azure has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
weird_error has quit [Quit: weird_error]
<towo> 🤔
conta has joined #ruby
BH23 has quit [Ping timeout: 255 seconds]
ldnunes has joined #ruby
kyrylo has joined #ruby
Ltem has joined #ruby
crankharder has quit [Ping timeout: 255 seconds]
AJA4350 has joined #ruby
dar123 has joined #ruby
jenrzzz has joined #ruby
crankharder has joined #ruby
rhuang has joined #ruby
dsmythe has quit [Ping timeout: 255 seconds]
rhuang has quit [Ping timeout: 244 seconds]
BH23 has joined #ruby
Tuor has joined #ruby
crankharder has quit [Ping timeout: 245 seconds]
sh7d has quit [Quit: meh]
crankharder has joined #ruby
_joes_ has joined #ruby
_joes_ has quit [Client Quit]
dsmythe has joined #ruby
Inline has joined #ruby
leah2 has quit [Read error: Connection reset by peer]
leah2 has joined #ruby
dsmythe has quit [Read error: Connection reset by peer]
dsmythe has joined #ruby
Kestrel-029 has joined #ruby
Nicmavr has quit [Ping timeout: 245 seconds]
jenrzzz has quit [Ping timeout: 246 seconds]
dinfuehr has quit [Ping timeout: 245 seconds]
i9zO5AP has quit [Quit: WeeChat 2.4]
Ai9zO5AP has joined #ruby
dinfuehr has joined #ruby
Nicmavr has joined #ruby
Kestrel-029 has quit [Ping timeout: 245 seconds]
sh7d has joined #ruby
jcalla has joined #ruby
Swyper has joined #ruby
millerti has joined #ruby
dar123 has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Fernando-Basso has quit [Remote host closed the connection]
tdy has quit [Ping timeout: 246 seconds]
SeepingN has joined #ruby
m_antis has quit [Read error: Connection reset by peer]
ramfjord has joined #ruby
jenrzzz has joined #ruby
m_antis has joined #ruby
ramfjord has quit [Ping timeout: 245 seconds]
GodFather has quit [Ping timeout: 276 seconds]
Fernando-Basso has joined #ruby
jelera has joined #ruby
pupsikov has joined #ruby
weird_error has joined #ruby
jelera has quit [Client Quit]
jelera has joined #ruby
Swyper has quit [Remote host closed the connection]
lucasb has joined #ruby
tdy has joined #ruby
mguy has left #ruby [#ruby]
weird_error has quit [Quit: weird_error]
jelera has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
jelera has joined #ruby
Azure has joined #ruby
aupadhye has quit [Ping timeout: 276 seconds]
reber has joined #ruby
Nicmavr has quit [Ping timeout: 245 seconds]
reber has quit [Remote host closed the connection]
Nicmavr has joined #ruby
zacts has joined #ruby
<ule> _sfiguser: move away of it :P
BH23 has quit [Ping timeout: 250 seconds]
BH23 has joined #ruby
Tuor has quit [Quit: Konversation terminated!]
jenrzzz has quit [Ping timeout: 245 seconds]
agent_white has joined #ruby
<_sfiguser> ule, why?
zEphiRo has joined #ruby
houhoulis has joined #ruby
Dbugger has joined #ruby
ellcs has quit [Remote host closed the connection]
sphenxes has joined #ruby
gnufied has joined #ruby
rubydoc has quit [Remote host closed the connection]
rubydoc has joined #ruby
jelera has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
jelera has joined #ruby
jelera has quit [Client Quit]
jelera has joined #ruby
jelera has quit [Client Quit]
jelera has joined #ruby
jelera has quit [Client Quit]
jelera has joined #ruby
jelera has quit [Client Quit]
jelera has joined #ruby
jelera has quit [Client Quit]
weteamsteve has joined #ruby
BH23 has quit [Ping timeout: 246 seconds]
xfbs has quit [Quit: Free ZNC ~ Powered by LunarBNC: https://LunarBNC.net]
xfbs has joined #ruby
sphenxes has quit [Ping timeout: 246 seconds]
tdy has quit [Ping timeout: 246 seconds]
Ltem has quit [Quit: bye]
claudiuinberlin has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
mikecmpbll has quit [Quit: inabit. zz.]
conta has quit [Ping timeout: 252 seconds]
ngw has joined #ruby
<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?
<ngw> what an exceptionally weird design choice...
zacts has quit [Ping timeout: 255 seconds]
brendan- has quit [Ping timeout: 255 seconds]
jottr has joined #ruby
hightower3 has quit [Ping timeout: 258 seconds]
gregf_ has quit [Ping timeout: 256 seconds]
Jonopoly has quit [Quit: WeeChat 2.4]
claudiuinberlin has joined #ruby
polishdub has joined #ruby
brendan- has joined #ruby
djdduty has quit [Ping timeout: 244 seconds]
djdduty has joined #ruby
andikr has quit [Remote host closed the connection]
dar123 has joined #ruby
sphenxes has joined #ruby
paraxial has quit [Quit: The Lounge - https://thelounge.chat]
zacts has joined #ruby
lxsameer has quit [Ping timeout: 246 seconds]
zEphiRo has quit [Quit: zEphiRo]
zacts has quit [Quit: WeeChat 2.4]
zacts has joined #ruby
paraxial has joined #ruby
orbyt_ has joined #ruby
clemens3_ has quit [Ping timeout: 244 seconds]
ngw has quit [Quit: WeeChat 2.4]
dsmythe_ has joined #ruby
jottr has quit [Ping timeout: 258 seconds]
dsmythe has quit [Ping timeout: 250 seconds]
fphilipe has quit [Ping timeout: 252 seconds]
jenrzzz has joined #ruby
dsmythe has joined #ruby
jottr has joined #ruby
dsmythe_ has quit [Ping timeout: 276 seconds]
mikecmpbll has joined #ruby
sticaz has quit [Ping timeout: 245 seconds]
orbyt_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
haengma has joined #ruby
dsmythe has quit [Ping timeout: 246 seconds]
jottr has quit [Ping timeout: 268 seconds]
dsmythe has joined #ruby
Fernando-Basso has quit [Remote host closed the connection]
nowhere_man has joined #ruby
duderonomy has joined #ruby
rhuang has joined #ruby
jottr has joined #ruby
Azure has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
fphilipe has joined #ruby
jottr has quit [Ping timeout: 246 seconds]
OneNeptune has joined #ruby
claudiuinberlin has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Xiti has quit [Quit: Xiti]
jottr has joined #ruby
Xiti has joined #ruby
cesaretto has joined #ruby
cesaretto has left #ruby [#ruby]
jottr has quit [Ping timeout: 245 seconds]
duderonomy has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
dar123 has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
jottr has joined #ruby
dar123 has joined #ruby
hightower3 has joined #ruby
OneNeptune has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
OneNeptune has joined #ruby
fphilipe has quit [Ping timeout: 258 seconds]
jottr has quit [Ping timeout: 244 seconds]
kyrylo has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
old_relik has joined #ruby
<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
<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
<old_relik> I can solve this in two ways afaict:
<old_relik> 1. disable retries for the job
<old_relik> 2. rescue exceptions in the processing and just 'next'
<old_relik> does that seem sensible?
<mikecmpbll> old_relik : just depends what you want to happen. usually the advice is to make a job idempotent.
<old_relik> yeah, I was trying to make it idempotent
kyrylo has joined #ruby
jottr has joined #ruby
<mikecmpbll> so, for each id it should only send the sms if the database record doesn't already exist?
<mikecmpbll> then a job can retry and not cause duplication.
<old_relik> but it's a bit tricky because the idempotency is a bit domain specific
<old_relik> but the job is a bit generic
_sfiguser has quit [Remote host closed the connection]
claudiuinberlin has joined #ruby
zacts has quit [Quit: WeeChat 2.4]
fdimitri_ has quit [Quit: Leaving]
dellavg_ has quit [Ping timeout: 258 seconds]
jottr has quit [Ping timeout: 245 seconds]
Dbugger has quit [Quit: Leaving]
<old_relik> mikecmpbll: right
duderonomy has joined #ruby
<mikecmpbll> not sure in what way you mean. perhaps would benefit from an example :)
<old_relik> ok, let me try
<old_relik> mikecmpbll: https://dpaste.de/9sej
<old_relik> mikecmpbll: I can wrap this around an if as you said and ensure its idempotent
jottr has joined #ruby
<old_relik> the issue is that the idempotency condition is specific to the "comunication_type"
<old_relik> and I don't want that condition to sit here
<old_relik> that condition is already applied before the job is spun
<old_relik> but of course, that doesn't guarantee against retries
jottr has quit [Ping timeout: 258 seconds]
Ltem has joined #ruby
jottr has joined #ruby
kyrylo has quit [Ping timeout: 246 seconds]
jottr has quit [Ping timeout: 268 seconds]
govg has joined #ruby
cek has joined #ruby
<cek> anyone good with Mail lib?
<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
<old_relik> adam12: I considered this
jottr has joined #ruby
<mikecmpbll> cek : i'm an expert
<old_relik> but wouldn't I run into the same problem?
<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`.
<mikecmpbll> on everything
<mikecmpbll> 😂
nowhere_man has quit [Ping timeout: 246 seconds]
<old_relik> oh right, so like AbstractEntryPointJob --> SpinUpDomainSpecificIdempotentJobs?
<old_relik> hrmm
<adam12> old_relik: I'm just saying, SMSScheduler.enqueue([1, 2, 3]) calls SMSSender.enqueue(1), SMSSender.enqueue(2), etc.
<mikecmpbll> pretty much makes SMSScheduler irrelevant
<mikecmpbll> just schedule the SMSSender jobs off the bat
<adam12> old_relik: Then inside the job block for the SMSSender, `def run; send_sms && log; rescue => e; log_failure(e); end`.
<adam12> old_relik: I don't use Sidekiq so I'm obviously paraphrasing here.
<cek> ok, tell me why the header is empty - `Mail.new(body: 'xx', to: 'boy band:;')[:to].to_s`
fphilipe has joined #ruby
<old_relik> adam12: right, thanks, but I think that won't work for me
<old_relik> I actually need the job to process a bunch of messages, because there are a lot
<old_relik> don't want to spawn 100k jobs
<mikecmpbll> you'd be surprised how little job overhead actually is.
Azure has joined #ruby
<mikecmpbll> in fact. you'll likely get speed benefit due to job parallelism ..
jottr has quit [Ping timeout: 255 seconds]
<mikecmpbll> unless you know each job is going to be consistently large, in which case there's an argument for that.
<old_relik> each job is a fixed size of data
<mikecmpbll> ah ok.
<mikecmpbll> and you're running many at a time?
<old_relik> yeah
nowhere_man has joined #ruby
<mikecmpbll> do you need it to retry if one item in the job fails?
<old_relik> I don't want it to retry (but that's only because it's not idempotent)
<mikecmpbll> but if item 14,000/100k fails
<mikecmpbll> 86k items will be missed ..
<mikecmpbll> that cool?
<old_relik> I can handle that simply by rescuing and moving on
<mikecmpbll> ok, so you don't mind if item 14,000 never succeeds?
<mikecmpbll> or if it fails, it's never likely to suceed?
<old_relik> yeah, #2
<cek> >> 1
<ruby[bot]> cek: # => 1 (https://eval.in/1102673)
<mikecmpbll> oh fine. so just do that :D
<old_relik> heh
<cek> >> require 'mail'; Mail.new(body: 'xx', to: 'boy band:;')[:to].to_s
<ruby[bot]> cek: # => cannot load such file -- mail (LoadError) ...check link for more (https://eval.in/1102674)
<old_relik> my question i guess is a design question
<old_relik> I can solve this problem
<mikecmpbll> yeah, well that's the design answer.
<adam12> old_relik: IMHO, anytime I've looped and done work in the same job I've always regretted it later.
<mikecmpbll> if a failure is absolute and expected, then rescue and skip.
ramfjord has joined #ruby
<old_relik> I would _prefer_ if the job were idempotent
<old_relik> even if it doesn't need it to be
<old_relik> i don't know if that makes sense
<mikecmpbll> it should be idempotent anyway, regardless of this discussion.
<old_relik> adam12: why would you say so?
<old_relik> mikecmpbll: right
<ytti> varmaa joku 6 kertaa lätäkön yli
<mikecmpbll> because the failure might not be because the item failure
jottr has joined #ruby
<mikecmpbll> (the predictable, absolute failure)
<old_relik> you're completely right
<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.
<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.
<mikecmpbll> batched/unbatched isn't particularly important. unbatched is cleaner, as adam illudes to, but there's good reasons to do batched too.
<mikecmpbll> very much depends on the workload.
<old_relik> mikecmpbll: an easy way to make this idempotent would be something like this: https://dpaste.de/5gYP
<mikecmpbll> alludes*
<old_relik> my worry is the modeling here, that condition leaks what is effectively a highly specific condition to the Model
<old_relik> but job tries to be generic
<mikecmpbll> are you dealing with something where you have an Active Record representation and an external API call?
<mikecmpbll> best to have some status in the Active Record, if that's the case
Fernando-Basso has joined #ruby
jottr has quit [Ping timeout: 246 seconds]
<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
<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.
<mikecmpbll> unless you store whether or not send_sms has happened yet, you'll never be able to make the job idempotent.
nowhere_man has quit [Ping timeout: 244 seconds]
sezuan has quit [Ping timeout: 276 seconds]
sameerynho has joined #ruby
sezuan has joined #ruby
<old_relik> mikecmpbll: thanks for trying to help, but I realize how hard it is to explain these things on IRC
pilcrow has quit [Remote host closed the connection]
teej has quit [Remote host closed the connection]
pilcrow has joined #ruby
<mikecmpbll> ack :)
<old_relik> mikecmpbll: basically, I guess the job is for sending any "kind" of SMS. the Model understands many kinds of SMSes
<old_relik> and each kind has it's unique idempotency condition
<old_relik> and so either the job needs to become type specific
teej has joined #ruby
<old_relik> or any of the other things we spoke above
sauvin has quit [Ping timeout: 252 seconds]
<old_relik> i'm torn between the two
<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
<old_relik> right
<old_relik> maybe that's something that I should explore
<old_relik> hide the details
<mikecmpbll> a `sent?` method that behaves correctly for the different cases? for example
jottr has joined #ruby
<old_relik> this was helpful
<old_relik> thanks a lot
jottr has quit [Ping timeout: 268 seconds]
sezuan has quit [Ping timeout: 258 seconds]
sezuan has joined #ruby
jenrzzz has quit [Ping timeout: 250 seconds]
al-damiri has joined #ruby
Ltem has quit [Read error: Connection reset by peer]
OneNeptune has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Ltem has joined #ruby
jottr has joined #ruby
loolool has joined #ruby
clemens3_ has joined #ruby
hightower3 has quit [Ping timeout: 244 seconds]
jcarl43 has joined #ruby
phaul has quit [Quit: :wq]
jottr has quit [Ping timeout: 268 seconds]
ricekrispie2 has joined #ruby
phaul has joined #ruby
ricekrispie has quit [Ping timeout: 258 seconds]
jottr has joined #ruby
jenrzzz has joined #ruby
orbyt_ has joined #ruby
hightower3 has joined #ruby
jottr has quit [Ping timeout: 246 seconds]
jottr has joined #ruby
old_relik has quit [Quit: Page closed]
houhoulis has quit [Remote host closed the connection]
jottr has quit [Ping timeout: 245 seconds]
loolool has quit [Remote host closed the connection]
jottr has joined #ruby
hightower3 has quit [Ping timeout: 245 seconds]
jottr has quit [Ping timeout: 245 seconds]
<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"
jenrzzz has quit [Ping timeout: 246 seconds]
jenrzzz has joined #ruby
jottr has joined #ruby
loveablelobster has joined #ruby
<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
jottr has quit [Ping timeout: 246 seconds]
<loveablelobster> never mind, deinstalled, reinstalled, works
orbyt_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
jottr has joined #ruby
jenrzzz has quit [Ping timeout: 250 seconds]
OneNeptune has joined #ruby
postmodern has joined #ruby
orbyt_ has joined #ruby
jottr has quit [Ping timeout: 246 seconds]
Azure has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
jenrzzz has joined #ruby
cnsvc has joined #ruby
jottr has joined #ruby
jottr has quit [Ping timeout: 258 seconds]
claudiuinberlin has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
jottr has joined #ruby
mikecmpbll has quit [Quit: inabit. zz.]
jottr has quit [Ping timeout: 246 seconds]
pupsikov has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
loveablelobster has quit [Quit: Textual IRC Client: www.textualapp.com]
zapata has quit [Read error: Connection reset by peer]
zapata has joined #ruby
mikecmpbll has joined #ruby
jottr has joined #ruby
orbyt_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
pupsikov has joined #ruby
dsmythe has quit [Ping timeout: 250 seconds]
cd has joined #ruby
cnsvc has quit [Ping timeout: 256 seconds]
orbyt_ has joined #ruby
DarthGandalf has quit [Ping timeout: 246 seconds]
laaron has quit [Remote host closed the connection]
DarthGandalf has joined #ruby
laaron has joined #ruby
Swyper has joined #ruby
sphenxes has quit [Quit: Leaving]
orbyt_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
kyrylo has joined #ruby
jottr has quit [Ping timeout: 258 seconds]
laaron has quit [Remote host closed the connection]
laaron has joined #ruby
jottr has joined #ruby
houhoulis has joined #ruby
wallace_mu has joined #ruby
jottr has quit [Ping timeout: 268 seconds]
jottr has joined #ruby
haengma has quit [Remote host closed the connection]
dsmythe has joined #ruby
jottr has quit [Ping timeout: 246 seconds]
Ai9zO5AP has quit [Ping timeout: 246 seconds]
wallace_mu has quit [Remote host closed the connection]
wallace_mu has joined #ruby
jottr has joined #ruby
wallace_mu has quit [Ping timeout: 250 seconds]
OneNeptune has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
jottr has quit [Ping timeout: 250 seconds]
ldnunes has quit [Quit: Leaving]
jenrzzz has quit [Ping timeout: 250 seconds]
Swyper has quit [Remote host closed the connection]
jottr has joined #ruby
agent_white has quit [Quit: bbl]
jottr has quit [Ping timeout: 245 seconds]
cek has quit [Quit: Connection closed for inactivity]
jenrzzz has joined #ruby
ramfjord_ has joined #ruby
jottr has joined #ruby
ramfjord has quit [Ping timeout: 244 seconds]
ramfjord_ has quit [Read error: Connection reset by peer]
ramfjord has joined #ruby
pupsikov has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
OneNeptune has joined #ruby
jottr has quit [Ping timeout: 258 seconds]
Swyper has joined #ruby
za1b1tsu has joined #ruby
ur5us has joined #ruby
ricer2_yFYh has joined #ruby
pwillard has quit [*.net *.split]
mattwc has quit [*.net *.split]
ctp has quit [*.net *.split]
ricer2 has quit [*.net *.split]
ryouba has quit [*.net *.split]
jonjitsu1 has quit [*.net *.split]
JoL1hAHN has quit [*.net *.split]
canton7 has quit [*.net *.split]
ablackack has quit [*.net *.split]
szulak has quit [*.net *.split]
mnemon has quit [*.net *.split]
Swyper has quit [Remote host closed the connection]
d0liver has quit [Quit: Connection closed for inactivity]
Azure has joined #ruby
queip has quit [Ping timeout: 255 seconds]
pupsikov has joined #ruby
gremax has quit [*.net *.split]
fowlduck has quit [*.net *.split]
lunarkitty7 has quit [*.net *.split]
kevinsjoberg has quit [*.net *.split]
uranoss has quit [*.net *.split]
endorama has quit [*.net *.split]
Yxhuvud has quit [*.net *.split]
Mutsuhito has quit [*.net *.split]
znz_jp has quit [*.net *.split]
Fire-Dragon-DoL has quit [*.net *.split]
TheBrayn has quit [*.net *.split]
argoneus has quit [*.net *.split]
linuus has quit [*.net *.split]
lambarena has quit [*.net *.split]
mkroman has quit [*.net *.split]
Momentum has quit [*.net *.split]
balo has quit [*.net *.split]
keden has quit [*.net *.split]
pupsikov has quit [Client Quit]
lambarena has joined #ruby
ramfjord has quit [Ping timeout: 244 seconds]
arthurnn has quit [Ping timeout: 255 seconds]
Swyper has joined #ruby
gnufied has quit [Quit: Leaving]
arthurnn has joined #ruby
queip has joined #ruby
jottr has joined #ruby
noizex has quit [Ping timeout: 250 seconds]
tdy has joined #ruby
noizex has joined #ruby
ramfjord has joined #ruby
Swyper has quit [Remote host closed the connection]
Ltem has quit [Quit: bye]
haengma has joined #ruby
jottr has quit [Ping timeout: 250 seconds]
RiPuk has quit [Ping timeout: 246 seconds]
jenrzzz has quit [Ping timeout: 252 seconds]
jenrzzz has joined #ruby
ramfjord has quit [Ping timeout: 255 seconds]
Swyper has joined #ruby
jottr has joined #ruby
RiPuk has joined #ruby
ramfjord has joined #ruby
jenrzzz has quit [Read error: Connection reset by peer]
mattwc has joined #ruby
ctp has joined #ruby
ryouba has joined #ruby
ablackack has joined #ruby
jonjitsu1 has joined #ruby
mkroman has joined #ruby
balo has joined #ruby
Mutsuhito has joined #ruby
kevinsjoberg has joined #ruby
keden has joined #ruby
canton7 has joined #ruby
fowlduck has joined #ruby
lunarkitty7 has joined #ruby
Momentum has joined #ruby
uranoss has joined #ruby
linuus has joined #ruby
JJonah_ has joined #ruby
Yxhuvud has joined #ruby
JJonah has quit [Ping timeout: 250 seconds]
endorama has joined #ruby
JJonah_ is now known as JJonah
gremax has joined #ruby
argoneus has joined #ruby
pwillard has joined #ruby
TheBrayn has joined #ruby
JoL1hAHN has joined #ruby
Fire-Dragon-DoL has joined #ruby
jottr has quit [Ping timeout: 258 seconds]
queip has quit [Ping timeout: 255 seconds]
szulak has joined #ruby
haengma has quit [Remote host closed the connection]
mnemon has joined #ruby
znz_jp has joined #ruby
jottr has joined #ruby
Swyper has quit [Remote host closed the connection]
Xiti has quit [Read error: Connection reset by peer]
OneNeptune has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
pwnd_nsfw` has quit [Read error: Connection reset by peer]
Xiti has joined #ruby
pwnd_nsfw` has joined #ruby
jottr has quit [Ping timeout: 245 seconds]
Swyper_ has joined #ruby
queip has joined #ruby
jottr has joined #ruby
haengma has joined #ruby
haengma has quit [Remote host closed the connection]
moei has quit [Quit: Leaving...]
Swyper_ has quit [Remote host closed the connection]
jottr has quit [Ping timeout: 250 seconds]
jenrzzz has joined #ruby
haengma has joined #ruby
mikecmpbll has quit [Quit: inabit. zz.]
jottr has joined #ruby
jottr has quit [Ping timeout: 244 seconds]
crankharder has quit [Read error: Connection reset by peer]
crankharder has joined #ruby
jottr has joined #ruby
elomatreb has quit [Quit: mep mep]
elomatreb has joined #ruby
jottr has quit [Ping timeout: 250 seconds]
jenrzzz has quit [Ping timeout: 245 seconds]
jottr has joined #ruby
ramfjord has quit [Ping timeout: 246 seconds]
u0_a238 has joined #ruby
jenrzzz has joined #ruby
ramfjord has joined #ruby
Swyper has joined #ruby
clemens3_ has quit [Ping timeout: 245 seconds]
clemens3 has joined #ruby
jottr has quit [Ping timeout: 250 seconds]
Swyper has quit [Remote host closed the connection]
weird_error has joined #ruby
ramfjord has quit [Ping timeout: 250 seconds]
jottr has joined #ruby
jottr has quit [Ping timeout: 246 seconds]
SuperL4g is now known as SuperLag
jottr has joined #ruby
RyanMcCoskrie has quit [Remote host closed the connection]
orbyt_ has joined #ruby
kyrylo has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
GodFather has joined #ruby
jottr has quit [Ping timeout: 244 seconds]
al-damiri has quit [Quit: Connection closed for inactivity]
za1b1tsu has quit [Read error: Connection reset by peer]
za1b1tsu has joined #ruby
jmcgnh has joined #ruby
Swyper has joined #ruby
jottr has joined #ruby
Swyper has quit [Remote host closed the connection]
za1b1tsu has quit [Remote host closed the connection]
jenrzzz has quit [Ping timeout: 246 seconds]
jenrzzz has joined #ruby
c0san0stra has quit [Ping timeout: 252 seconds]
c0san0stra has joined #ruby
jottr has quit [Ping timeout: 246 seconds]
jottr has joined #ruby
jenrzzz has quit [Ping timeout: 246 seconds]
jottr has quit [Ping timeout: 258 seconds]
rhuang has quit [Ping timeout: 246 seconds]
houhoulis has quit [Remote host closed the connection]
jottr has joined #ruby