havenwood changed the topic of #ruby to: Rules & more: https://ruby-community.com | Ruby 2.6.3, 2.5.5, 2.7.0-preview1: 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!
agent_white has quit [Quit: Lost terminal]
agent_white has joined #ruby
catbusters has quit [Quit: Connection closed for inactivity]
s2013 has joined #ruby
skryking has quit [Ping timeout: 268 seconds]
skryking has joined #ruby
lucasb has quit [Quit: Connection closed for inactivity]
Jonopoly has quit [Quit: WeeChat 2.5]
matheusmoreira has quit [Remote host closed the connection]
ramfjord has joined #ruby
s2013 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
Swyper has joined #ruby
Swyper has quit [Remote host closed the connection]
henninb has quit [Quit: Lost terminal]
ramfjord has quit [Ping timeout: 246 seconds]
Nilium has quit [Quit: <kristin> Cower is like... I dunno. sometimes he seems senile and other times he seems like a middle schooler.]
Nilium has joined #ruby
duderonomy has joined #ruby
ramfjord has joined #ruby
xtsee has quit [Ping timeout: 250 seconds]
houhoulis has quit [Remote host closed the connection]
znz_jp has quit [Remote host closed the connection]
znz_jp has joined #ruby
zave has quit [Remote host closed the connection]
ramfjord has quit [Ping timeout: 248 seconds]
xtsee has joined #ruby
ramfjord has joined #ruby
pwnd_nsfw has joined #ruby
duderonomy has quit [Ping timeout: 244 seconds]
ramfjord has quit [Ping timeout: 246 seconds]
DaRock has quit [Ping timeout: 245 seconds]
orbyt_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
exmortus has quit [Remote host closed the connection]
s2013 has joined #ruby
DaRock has joined #ruby
SeepingN has quit [Quit: The system is going down for reboot NOW!]
Swyper has joined #ruby
Swyper has quit [Remote host closed the connection]
impermanence has joined #ruby
Swyper has joined #ruby
bambanx has quit [Quit: Leaving]
Swyper has quit [Remote host closed the connection]
Swyper has joined #ruby
pwnd_nsfw` has joined #ruby
pwnd_nsfw has quit [Ping timeout: 245 seconds]
agent_white has quit [Quit: brb]
Swyper has quit [Remote host closed the connection]
Technodrome has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
_whitelogger has joined #ruby
matheusmoreira has joined #ruby
duderonomy has joined #ruby
tdy has joined #ruby
iNs_ has joined #ruby
cd has quit [Quit: cd]
iNs has quit [Quit: bubye]
jenrzzz has quit [Ping timeout: 245 seconds]
ramfjord has joined #ruby
ramfjord has quit [Ping timeout: 248 seconds]
jenrzzz has joined #ruby
gix- has joined #ruby
gix has quit [Disconnected by services]
involans has joined #ruby
jenrzzz has quit [Ping timeout: 244 seconds]
polishdub has joined #ruby
polishdub has quit [Quit: leaving]
jenrzzz has joined #ruby
Azure has quit [Read error: Connection reset by peer]
Azure has joined #ruby
polishdub has joined #ruby
s2013 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
kaiser has joined #ruby
howdoi has joined #ruby
SeepingN has joined #ruby
Nicmavr has quit [Read error: Connection reset by peer]
Nicmavr has joined #ruby
faces has joined #ruby
face has quit [Ping timeout: 248 seconds]
RiPuk has quit [Ping timeout: 244 seconds]
mdl8615 has joined #ruby
polishdub has quit [Remote host closed the connection]
RiPuk has joined #ruby
mdl8615 has quit [Quit: leaving]
orbyt_ has joined #ruby
nowhere_man has quit [Remote host closed the connection]
nowhere_man has joined #ruby
jenrzzz has quit [Ping timeout: 245 seconds]
jmcgnh has quit [Ping timeout: 272 seconds]
kapilp has joined #ruby
jmcgnh has joined #ruby
jenrzzz has joined #ruby
kaiser has quit [Quit: Leaving]
oetjenj has joined #ruby
x86sk has quit [Quit: Connection closed for inactivity]
orbyt_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
cliluw has quit [Ping timeout: 245 seconds]
Whoyeck has joined #ruby
xco has joined #ruby
<Whoyeck> hi
oetjenj has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
oetjenj has joined #ruby
conta has joined #ruby
oetjenj has quit [Client Quit]
oetjenj has joined #ruby
oetjenj has quit [Client Quit]
bga57 has quit [Quit: Leaving.]
oetjenj has joined #ruby
oetjenj has quit [Client Quit]
involans has quit [Quit: involans]
oetjenj has joined #ruby
oetjenj has quit [Client Quit]
oetjenj has joined #ruby
oetjenj has quit [Client Quit]
oetjenj has joined #ruby
oetjenj has quit [Client Quit]
bga57 has joined #ruby
oetjenj has joined #ruby
oetjenj has quit [Client Quit]
oetjenj has joined #ruby
oetjenj has quit [Client Quit]
Fr4n has quit [Quit: Fr4n]
unixcat has joined #ruby
unixcat has quit [Remote host closed the connection]
unixcat has joined #ruby
sauvin has joined #ruby
jenrzzz has quit [Ping timeout: 272 seconds]
absolutejam has joined #ruby
<havenwood> Whoyeck: hi
<Whoyeck> is this good place to start my journey with ruby / ruby on rails?
ramfjord has joined #ruby
oetjenj has joined #ruby
reber has quit [Read error: Connection reset by peer]
ramfjord_ has joined #ruby
ramfjord has quit [Ping timeout: 258 seconds]
jenrzzz has joined #ruby
oetjenj has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Inline has quit [Quit: Leaving]
kaiser has joined #ruby
teclator has quit [Ping timeout: 245 seconds]
teclator has joined #ruby
ramfjord_ has quit [Ping timeout: 245 seconds]
d^sh has quit [Ping timeout: 245 seconds]
d^sh has joined #ruby
<havenwood> Whoyeck: Yes, it is. Let us know when you have questions or code to show off!
kaiser has quit [Quit: Leaving]
testuser12342345 has joined #ruby
testuser12342345 has left #ruby [#ruby]
testuser12342345 has joined #ruby
chalkmonster has joined #ruby
absolutejam has quit [Ping timeout: 245 seconds]
<Whoyeck> havenwood: There's nothing to show yet :-) Which title is good to purchase first if my only experience is limited to shell scripts and hardware? (The Well Grounded Rubyist, Eloquent Ruby, Programming Ruby, An Illustrated Guide to Ruby)
fphilipe has joined #ruby
testuser12342345 has quit [Remote host closed the connection]
lxsameer has joined #ruby
aupadhye has joined #ruby
absolutejam has joined #ruby
SeepingN has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
TomyWork has joined #ruby
gix- has quit [Ping timeout: 246 seconds]
duderonomy has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
deepredsky has joined #ruby
nowhere_man has quit [Ping timeout: 250 seconds]
kapilp has quit [Quit: Connection closed for inactivity]
Whoyeck has quit [Ping timeout: 268 seconds]
sylario has joined #ruby
jenrzzz has quit [Ping timeout: 268 seconds]
jenrzzz has joined #ruby
rashila has joined #ruby
<rashila> Please suggest the best background job processing gem/tool with Rails 5
schne1der has joined #ruby
jmcgnh has quit [Ping timeout: 258 seconds]
andikr has joined #ruby
jmcgnh has joined #ruby
pabs has quit [Ping timeout: 245 seconds]
pabs has joined #ruby
jenrzzz has quit [Ping timeout: 258 seconds]
conta has quit [Ping timeout: 258 seconds]
deepreds1 has joined #ruby
Technodrome has joined #ruby
mikecmpbll has joined #ruby
deepreds1 has quit [Read error: Connection reset by peer]
deepreds1 has joined #ruby
themsay has joined #ruby
deepredsky has quit [Ping timeout: 244 seconds]
ByronJohnson has quit [Ping timeout: 246 seconds]
Technodrome has quit [Remote host closed the connection]
<balo> rashila: sidekiq. i think it's the gold standard :D
ByronJohnson has joined #ruby
ur5us has quit [Remote host closed the connection]
conta has joined #ruby
MindSpark has joined #ruby
jenrzzz has joined #ruby
ur5us has joined #ruby
ep4sh2k has joined #ruby
ur5us has quit [Read error: Connection reset by peer]
ur5us has joined #ruby
ep4sh2k has quit [Quit: Leaving]
ep4sh2k has joined #ruby
ep4sh2k has quit [Client Quit]
absolutejam has quit [Ping timeout: 245 seconds]
chalkmon1 has joined #ruby
chalkmonster has quit [Ping timeout: 244 seconds]
chalkmonster has joined #ruby
chalkmon1 has quit [Ping timeout: 245 seconds]
jefffrails35 has joined #ruby
jefffrails35 has quit [Client Quit]
conta has quit [Ping timeout: 258 seconds]
howdoi has quit [Quit: Connection closed for inactivity]
conta has joined #ruby
andikr has quit [Ping timeout: 245 seconds]
andikr has joined #ruby
jenrzzz has quit [Ping timeout: 258 seconds]
jmosco has quit [Ping timeout: 245 seconds]
jmosco has joined #ruby
jenrzzz has joined #ruby
Karan has joined #ruby
Karan has left #ruby [#ruby]
aupadhye is now known as aupadhye|food
aupadhye|food is now known as aupadhye
tdy has quit [Ping timeout: 272 seconds]
<rashila> balo: thanks
tdy has joined #ruby
ur5us has quit [Remote host closed the connection]
<dalpo> 334bb11
<dalpo> asdasd
Swyper has joined #ruby
jenrzzz has quit [Ping timeout: 245 seconds]
rashila has quit [Remote host closed the connection]
ur5us has joined #ruby
tdy has quit [Ping timeout: 248 seconds]
Swyper has quit [Remote host closed the connection]
Swyper has joined #ruby
howdoi has joined #ruby
conta has quit [Ping timeout: 245 seconds]
sepp2k has quit [Read error: Connection reset by peer]
Seance[m] has quit [Remote host closed the connection]
andikr has quit [Ping timeout: 245 seconds]
ellcs has joined #ruby
d^sh has quit [Ping timeout: 272 seconds]
turt2live has quit [Ping timeout: 250 seconds]
aecepoglu[m] has quit [Ping timeout: 276 seconds]
d^sh has joined #ruby
ur5us has quit [Remote host closed the connection]
irdr has quit [Remote host closed the connection]
irdr has joined #ruby
lightstalker has quit [Ping timeout: 248 seconds]
dan64 has quit [Ping timeout: 272 seconds]
ur5us has joined #ruby
conta has joined #ruby
lightstalker has joined #ruby
dan64 has joined #ruby
jenrzzz has joined #ruby
xfbs has quit [Quit: Free ZNC ~ Powered by LunarBNC: https://LunarBNC.net]
xfbs has joined #ruby
Swyper has quit [Remote host closed the connection]
ur5us has quit [Read error: Connection reset by peer]
xfbs has quit [Client Quit]
xfbs has joined #ruby
tdy has joined #ruby
Seich has quit [Quit: Gone fishing.]
al2o3-cr has quit [Quit: If the universe is a machine where the future is uniquely determined by its present state, it would not be possible to calculate what the future will be.]
aecepoglu[m] has joined #ruby
Swyper has joined #ruby
andikr has joined #ruby
Swyper has quit [Remote host closed the connection]
tdy has quit [Read error: error:1408F119:SSL routines:ssl3_get_record:decryption failed or bad record mac]
jenrzzz has quit [Ping timeout: 268 seconds]
al2o3-cr has joined #ruby
jenrzzz has joined #ruby
Seich has joined #ruby
AJA4350 has quit [Quit: AJA4350]
turt2live has joined #ruby
Seance[m] has joined #ruby
sepp2k has joined #ruby
ellcs has quit [Ping timeout: 250 seconds]
chalkmonster has quit [Quit: WeeChat 2.5]
marmotini_ has joined #ruby
mnemon has quit [*.net *.split]
spectra has quit [*.net *.split]
cca4 has joined #ruby
jenrzzz has quit [Ping timeout: 264 seconds]
marmotini_ has quit [Remote host closed the connection]
psmolen has quit [Ping timeout: 248 seconds]
cd has joined #ruby
mnemon has joined #ruby
spectra has joined #ruby
psmolen has joined #ruby
AJA4350 has joined #ruby
TvL2386 has quit [Ping timeout: 245 seconds]
andikr has quit [Remote host closed the connection]
Swyper has joined #ruby
catphish has joined #ruby
<catphish> i believe i am suffering with a rather nasty problem whereby ruby's garbage collector running in a thread is closing sockets that the main thread is still using
<catphish> is this remotely possible? can anyone think why this would happen and how to prevent it
RiPuk has quit [Ping timeout: 245 seconds]
<catphish> confirmed: in our case at least, passing a tcp listener through a unix socket to another ruby, attaching a TCPServer to it, then running a GC in a thread, it closes the FD
iotatron[m] has joined #ruby
chocoelho has joined #ruby
MindSpark has quit [Ping timeout: 245 seconds]
MindSpark has joined #ruby
MasterNayru has joined #ruby
stryek has joined #ruby
conta has quit [Ping timeout: 248 seconds]
conta has joined #ruby
ramfjord has joined #ruby
griffindy has joined #ruby
jenrzzz has joined #ruby
yalue has joined #ruby
ramfjord has quit [Ping timeout: 248 seconds]
aupadhye has quit [Quit: Leaving]
aupadhye has joined #ruby
corellian has joined #ruby
conta has quit [Ping timeout: 245 seconds]
ytti has quit [Ping timeout: 245 seconds]
sagax has quit [Ping timeout: 244 seconds]
deepredsky has joined #ruby
conta has joined #ruby
jenrzzz has quit [Ping timeout: 245 seconds]
deepreds1 has quit [Ping timeout: 245 seconds]
MindSpark has quit [Ping timeout: 248 seconds]
MindSpark has joined #ruby
ytti has joined #ruby
sagax has joined #ruby
cca414 has joined #ruby
cca4 has quit [Ping timeout: 260 seconds]
kapilp has joined #ruby
Swyper has quit [Remote host closed the connection]
Swyper has joined #ruby
ferhaty has joined #ruby
Fusl has quit [Max SendQ exceeded]
Fusl has joined #ruby
Swyper has quit [Ping timeout: 246 seconds]
DaRock has quit [Ping timeout: 245 seconds]
ramfjord has joined #ruby
conta has quit [Ping timeout: 245 seconds]
<catphish> the above problem may not have anything to do with threads at all, rather, the problem is with the TCPServer passed through the unix socket, and GC
conta has joined #ruby
howdoi has quit [Quit: Connection closed for inactivity]
ramfjord has quit [Ping timeout: 245 seconds]
Swyper has joined #ruby
lord4163 has quit [Excess Flood]
lord4163 has joined #ruby
howdoi has joined #ruby
jenrzzz has joined #ruby
<adam12> catphish: Passed through the unix socket as in some sort of IPC? or did you setup a socket and then Thread.new?
<catphish> adam12: the thread is a red herring, it happens in a single threaded app too
<catphish> adam12: i'm passing a TCPServer through an IPC UNIX socket
vondruch has quit [Ping timeout: 272 seconds]
<adam12> catphish: Probably too hard for any of us to guess without seeing some code.
<adam12> catphish: But I'm not surprosed the GC is reaping the socket since it loses the reference.
<catphish> i *think* i've found the problem
cca414 has quit [Remote host closed the connection]
lucasb has joined #ruby
<catphish> if i call UNIXSocket#recv_io without passing it a class, it returns an integer... i then create a new TCPServer using that integer, and when GC is called it closes the socket
<catphish> however, if i pass TCPServer to UNIXSocket#recv_io, it returns a TCPSocket, and the connection does not get closed by GC
<catphish> my confusion is that i don't understand why GC is closing the socket when it was originally represented by an integer, an integer isn't an object that can be reaped afaik
<catphish> unless UNIXSocket#recv_io creates a object internally even when it's told not to
<catphish> i hope that makes sense
<catphish> in all cases, i don't throw away the reference to the TCPServer
<catphish> obviously i do throw away references to the integer
<catphish> so... TCPServer.from_fd(unix_socket#recv_io) results in a situation where the socket is closed by GC, but unix_socket#recv_io(TCPServer) is fine
<catphish> as far as i can see, UNIXSocket#recv_io(nil) does not create any objects, so i'm pretty confused
Swyper has quit [Remote host closed the connection]
<catphish> as long as the workaround (which is better code anyway) works, i'm happy
gregf_ has joined #ruby
involans has joined #ruby
agent_white has joined #ruby
Swyper has joined #ruby
Inline has joined #ruby
RiPuk has joined #ruby
s2013 has joined #ruby
rikkipitt has joined #ruby
rikkipitt has quit [Read error: Connection reset by peer]
jenrzzz has quit [Ping timeout: 272 seconds]
conta has quit [Ping timeout: 248 seconds]
conta has joined #ruby
conta has quit [Ping timeout: 258 seconds]
Swyper has quit [Remote host closed the connection]
Nicmavr has quit [Read error: Connection reset by peer]
s2013 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
gregf_ has quit [Remote host closed the connection]
Nicmavr has joined #ruby
impermanence has quit [Ping timeout: 272 seconds]
chocoelho has quit [Quit: Connection closed for inactivity]
Esa_ has joined #ruby
greengriminal has joined #ruby
Technodrome has joined #ruby
ferhaty has quit [Quit: ferhaty]
<greengriminal> Hi Stripe folk, have a bit of weird situation surrounding Zip/Postal code validation. For background context here's what happened. We have a client that accepted a charge on their connect account. A buyer reported that it was asking them to input their zip code. They tried entering their Australian postal code but couldn't do so since the element form required 5 digits (this is because their card is US registered).
absolutejam1 has quit [Quit: WeeChat 2.5]
Swyper has joined #ruby
<greengriminal> That being said they entered a fake US Zip code (90210). The charge went through successfully meaning that Stripe isn't correctly validating postal code since its considered to pass the zip check.
<havenwood> greengriminal: I can't speak for Stripe, but Australian Square developers disable the zip code.
<havenwood> greengriminal: See if they have a way to disable the zip code?
<greengriminal> Right. However this is a USD transacting connect account for someone paying in USD.
ascarter has joined #ruby
<havenwood> greengriminal: Web or mobile?
<greengriminal> There isn't an issue per-se, its just interesting to see that you can enter a "fake" postal code and a charge will be considered to have passed a zip check.
<havenwood> Yeah, why take a zip if you're not going to check it? Seems it'd be nicer to disable the zip entirely if it's unused.
<havenwood> Maybe they only don't check Australian, UK or other places where a zip isn't required.
<greengriminal> For the same transacting USD connect account someone from Australia made a charge and wasn't required to enter a zip code at all: https://imgur.com/jQkG5Nj
<havenwood> greengriminal: Yeah, that's what I'd expect. No zip for AU.
<greengriminal> Also its worth noting that Zip verification checks are disabled on this connect account.
corellian has quit [Quit: leaving]
<catphish> UK definitely uses postal code checks, maybe stripe doesn't though
<havenwood> catphish: I see UK folk not doing zip checks. ¯\_(ツ)_/¯ The SCA is right around the corner though.
<catphish> SCA is scary
<havenwood> Verify!
<catphish> if you want to, you can still take card payments with basically no checks at all, but of course you shouldn't
<greengriminal> So here's something interesting. If you use the the test Asia-Pacific (Australian) card - 4000000360000006 and enter it for a USD transacting listing. You'll find that the zip code isn't required.
s2013 has joined #ruby
paraxial2 has quit [Ping timeout: 248 seconds]
<greengriminal> Well that makes sense after all the docs do state: ". However, street address verification is commonly supported for cards issued in the United States, Canada, and the United Kingdom." - https://stripe.com/docs/disputes/prevention#avs-check
Swyper has quit [Remote host closed the connection]
aupadhye has quit [Quit: Leaving]
<greengriminal> Still that doesn't explain the fact that if you are required to enter a postal code you could essentially enter a fake postal code/zip code and a charge will consider the check as "passed" :P
schne1der has quit [Ping timeout: 268 seconds]
vondruch has joined #ruby
<havenwood> greengriminal: Yeah, I don't get the point of that. They should disable the zip, it seems, rather than show it but ignore the input. You might want to ping them on a backchannel and see if it's functioning as intended.
vondruch has quit [Client Quit]
vondruch has joined #ruby
aupadhye has joined #ruby
Swyper has joined #ruby
pwnd_nsfw` has quit [Read error: Connection reset by peer]
<greengriminal> oh damn it i'm in the wrong channel.
<greengriminal> I thought i was in the stripe channel.
<havenwood> Haha, I was curious what it had to do with Ruby...
<greengriminal> well that's incredibly embarrassing.
<greengriminal> lol someone should've sounded the alarm and been like "kick this person out please" lol
<greengriminal> apologies.
<leftylink> hey, for all I know, everyone here except me is from stripe
<leftylink> so maybe it works out
<leftylink> s/is/could have been/
<leftylink> it could have just been an unspoken rule but everyone agreed not to talk about it
<greengriminal> lol
aupadhye has quit [Remote host closed the connection]
ascarter has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
SeepingN has joined #ruby
englishm has joined #ruby
TomyWork has quit [Ping timeout: 246 seconds]
vondruch has quit [Quit: vondruch]
vondruch has joined #ruby
jenrzzz has joined #ruby
oetjenj has joined #ruby
orbyt_ has joined #ruby
codefriar has joined #ruby
s2013 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
kapilp has quit [Quit: Connection closed for inactivity]
schne1der has joined #ruby
Swyper has quit [Remote host closed the connection]
Fraeon has quit [Remote host closed the connection]
s2013 has joined #ruby
tdy has joined #ruby
cow[moo] has joined #ruby
fphilipe has quit [Ping timeout: 268 seconds]
jenrzzz has quit [Ping timeout: 246 seconds]
RiPuk has quit [Ping timeout: 246 seconds]
impermanence has joined #ruby
Technodrome has quit [Ping timeout: 245 seconds]
r29v has joined #ruby
tdy has quit [Ping timeout: 248 seconds]
stooj has quit [Quit: ZNC 1.7.3 - https://znc.in]
stooj has joined #ruby
orbyt_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
RiPuk has joined #ruby
catphish has quit [Quit: Leaving]
chalkmonster has joined #ruby
mdl8615 has joined #ruby
mdl8615 has quit [Client Quit]
lxsameer has quit [Ping timeout: 268 seconds]
mikecmpbll has quit [Quit: inabit. zz.]
_falsebay_ has joined #ruby
gix has joined #ruby
cisco has joined #ruby
SCHAPiE has quit [Quit: ZNC - https://znc.in]
oetjenj has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
SCHAPiE has joined #ruby
tdy has joined #ruby
oetjenj has joined #ruby
r29v has quit [Ping timeout: 244 seconds]
agent_white has quit [Ping timeout: 244 seconds]
sezuan has quit [Ping timeout: 276 seconds]
sezuan has joined #ruby
cow[moo] has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
cd has quit [Quit: cd]
cd has joined #ruby
cow[moo] has joined #ruby
jenrzzz has joined #ruby
Dr_MDMA_MD has joined #ruby
duderonomy has joined #ruby
oetjenj has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
englishm has quit [Excess Flood]
englishm has joined #ruby
agent_white has joined #ruby
englishm has quit [Excess Flood]
englishm has joined #ruby
greengriminal has quit [Quit: This computer has gone to sleep]
hiroaki has joined #ruby
gnufied has quit [Quit: Leaving]
deepreds1 has joined #ruby
deepredsky has quit [Ping timeout: 244 seconds]
THE_GFR|WORK has quit []
<adam12> `whatthegem <gem> changes` is so damn handy when updating dependencies.
greengriminal has joined #ruby
ramfjord has joined #ruby
cisco has quit [Ping timeout: 248 seconds]
mdl8615 has joined #ruby
absolutejam has joined #ruby
sameerynho has joined #ruby
mdl8615 has quit [Client Quit]
mdl8615 has joined #ruby
sauvin has quit [Ping timeout: 248 seconds]
sauvin has joined #ruby
jenrzzz has quit [Ping timeout: 272 seconds]
sauvin has quit [Max SendQ exceeded]
sauvin has joined #ruby
bitwinery has joined #ruby
sauvin has quit [Max SendQ exceeded]
sauvin has joined #ruby
impermanence has quit [Remote host closed the connection]
sauvin has quit [Read error: Connection reset by peer]
themsay has quit [Ping timeout: 246 seconds]
absolutejam has quit [Ping timeout: 244 seconds]
nopc0de has joined #ruby
klaas has quit [Quit: ZNC 1.7.4 - https://znc.in]
klaas has joined #ruby
<mlt-> Is there a Set with default value? I'm looking for some idiom to "filter" a variable to be one of the predefined values or default value if something else is in the variable
greengriminal has quit [Quit: This computer has gone to sleep]
absolutejam has joined #ruby
<havenwood> mlt-: I answered in the other channel. >.>
<havenwood> But Set has no #fetch. It does have #find from including Enumerable, and #find does take a default argument to return when nothing is found.
Inline__ has joined #ruby
<havenwood> mlt-: There's also no problem with: set.member?(value) ? value : default
Inline has quit [Ping timeout: 264 seconds]
<havenwood> &>> Set.new.find(->{ 42 }) { |item| item == :nope }
<rubydoc> stderr: -e:2:in `<main>': uninitialized constant Set (NameError) (https://carc.in/#/r/7abg)
Inline__ has quit [Read error: Connection reset by peer]
<havenwood> &>> require 'set'; Set.new.member?(:nope) ? :nope : 42
<rubydoc> # => 42 (https://carc.in/#/r/7abh)
<havenwood> &>> require 'set'; Set.new.find(->{ 42 }) { |item| item == :nope }
<rubydoc> # => 42 (https://carc.in/#/r/7abi)
Inline has joined #ruby
mdl8615_ has joined #ruby
mdl8615 has quit [Quit: WeeChat 2.4]
themsay has joined #ruby
ramfjord has quit [Ping timeout: 248 seconds]
plujon has joined #ruby
<plujon> def foo(x = (return @x; nil)); end # what does this mean?
marmotini_ has joined #ruby
Dr_MDMA_MD has quit [Quit: Connection closed for inactivity]
marmotini_ has quit [Ping timeout: 248 seconds]
chalkmonster has quit [Quit: WeeChat 2.5]
ElFerna has joined #ruby
<havenwood> plujon: It means you have a deranged programmer. :P
<plujon> It appears to be an idiom for setting default arguments. But I don't know what the = (return @x; nil) does. Is that a way to use a default argument from the including class?
<havenwood> plujon: You'd normally set the default argument like: def foo(x = @x); end
<havenwood> plujon: That ^ method would always return `nil`, sine there's nothing in the method body.
<havenwood> plujon: The example you're showing is an odd hack to actually return from the default argument.
<plujon> def foo(x = (return @x; nil)); @x = x; end # what does this mean?
<havenwood> plujon: That is showing an odd hack where you can return from the default argument, never even evaluating the body.
<havenwood> plujon: For example: def foo(x = (return 41; nil)); 42 end
<havenwood> plujon: That ^ bizarre method will return 41 if you call it without an argument and 42 if you call it with an argument.
<havenwood> plujon: Don't code this way!
greengriminal has joined #ruby
<plujon> havenwood: Thanks; fascinating. I didn't know you could return from a default argument section.
<plujon> So, it's actually an idiom for a getter/setter.
<havenwood> plujon: Instead, you can write: UNSET = Object.new; def foo(x = UNSET); return @x if x == UNSET; end
ramfjord has joined #ruby
<adam12> havenwood: that might be the most bizarre thing I've seen recently.
<havenwood> plujon: I wouldn't call it an idiom. It's more of a hack.
Azure has quit [Ping timeout: 272 seconds]
<havenwood> adam12: Heh, srsly.
<havenwood> plujon: That shouldn't pass code review. It's not *supposed* to work. There are better ways to achieve the same thing that are much kinder on the reader.
<havenwood> plujon: It's fine to establish the desired behavior with your tests. But I'd recommend refactoring away from this particular approach to returning a default argument.
Azure has joined #ruby
<plujon> Got it. Thanks for the interpretation.
fphilipe has joined #ruby
nopc0de_ has joined #ruby
wolfshappen has quit [Quit: Waffs have technical problems too]
tf2ftw has joined #ruby
nopc0de has quit [Ping timeout: 246 seconds]
nopc0de has joined #ruby
schne1der has quit [Ping timeout: 245 seconds]
VeryBewitching has joined #ruby
nopc0de_ has quit [Ping timeout: 252 seconds]
ramfjord has quit [Ping timeout: 245 seconds]
MindSpark has quit [Ping timeout: 245 seconds]
<tf2ftw> hello
<havenwood> tf2ftw: hi
absolutejam has quit [Ping timeout: 248 seconds]
absolutejam has joined #ruby
tf2ftw has left #ruby [#ruby]
tf2ftw has joined #ruby
Naros has joined #ruby
Naros has left #ruby [#ruby]
jenrzzz has joined #ruby
ramfjord has joined #ruby
AJA4350 has quit [Ping timeout: 245 seconds]
<bougyman> what's the go-to for password generation? (lightweight)
<adam12> bougyman: I use this. Single file. https://gist.github.com/lpar/1031933
<havenwood> bougyman: SecureRandom.uuid :P
<havenwood> &>> SecureRandom.urlsafe_base64(32)
<rubydoc> stderr: -e:2:in `<main>': uninitialized constant SecureRandom (NameError) (https://carc.in/#/r/7acb)
<havenwood> &>> require 'securerandom'; SecureRandom.urlsafe_base64(32)
<rubydoc> # => "Vv1boeScazWF5XsS21Qeciip7fbFxo4iQE72KNg5phM" (https://carc.in/#/r/7acc)
<havenwood> &>> require 'securerandom'; SecureRandom.uuid
<rubydoc> # => "87fae1ef-174b-41bf-86f2-d02537e3a94a" (https://carc.in/#/r/7acd)
<havenwood> bougyman: UUIDs are hard to guess!
tf2ftw has quit [Quit: tf2ftw]
mdl8615_ has quit [Quit: leaving]
tf2ftw has joined #ruby
<bougyman> adam12: eh, I was thinking about something more along these lines: https://github.com/dmke/simple-password-gen/blob/master/lib/simple-password-gen.rb
<bougyman> I just really don't like his name for the class (Password)
<havenwood> bougyman: How about Base58?
yalue has quit [Quit: Leaving]
<havenwood> bougyman: It's Base64 with the ambiguous printed characters removed.
<havenwood> &>> require 'securerandom'; SecureRandom.send(:choose, [*?1..?9, *?a..?k, *?m..?z, *?A..?H, *?J..?N, *?P..?Z], 20).gsub(/(.{5})(?=.)/, '\1-\2')
<rubydoc> # => "TrECU-Q25PR-Q4Xym-xuke1" (https://carc.in/#/r/7ace)
<havenwood> bougyman: That's Base58, 20 digits, clumps of 5
Jonopoly has joined #ruby
nopc0de_ has joined #ruby
<adam12> bougyman: Yeah, that's a horrible class name for a gem to ship with.
<havenwood> &>> require 'securerandom'; SecureRandom.send(:choose, [*?1..?9, *?a..?k, *?m..?z, *?A..?H, *?J..?N, *?P..?Z], 12)
<rubydoc> # => "px34Jf2Ge1Bw" (https://carc.in/#/r/7acg)
<havenwood> How about a markov chain password generator using Matrix?
ramfjord has quit [Read error: Connection reset by peer]
nopc0de has quit [Ping timeout: 250 seconds]
ramfjord has joined #ruby
TvL2386 has joined #ruby
fphilipe has quit [Ping timeout: 272 seconds]
lucasb has quit [Quit: Connection closed for inactivity]
s2013 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<bougyman> adam12: I know.
AJA4350 has joined #ruby
tdy has quit [Ping timeout: 245 seconds]
merpnderp has joined #ruby
themsay has quit [Read error: Connection reset by peer]
themsay has joined #ruby
Esa_ has quit []
ur5us has joined #ruby
absolutejam1 has joined #ruby
absolutejam has quit [Ping timeout: 248 seconds]
wolfshappen has joined #ruby
xco has quit [Quit: xco]
themsay has quit [Ping timeout: 248 seconds]
themsay has joined #ruby
mikecmpbll has joined #ruby
nopc0de has joined #ruby
Jonopoly has quit [Quit: WeeChat 2.5]
nopc0de_ has quit [Ping timeout: 244 seconds]
themsay has quit [Read error: Connection reset by peer]
jinie has quit [Quit: ZNC 1.6.1 - http://znc.in]
themsay has joined #ruby
cow[moo] has quit [Read error: Connection reset by peer]
cow[moo] has joined #ruby
jinie has joined #ruby
tf2ftw has quit [Quit: tf2ftw]
cliluw has joined #ruby
Jonopoly has joined #ruby
mikecmpbll has quit [Quit: inabit. zz.]
absolutejam2 has joined #ruby
absolutejam1 has quit [Ping timeout: 248 seconds]
mokha has joined #ruby
oetjenj has joined #ruby
agent_white has quit [Quit: later]
x86sk has joined #ruby
jenrzzz has quit [Read error: Connection reset by peer]
jenrzzz has joined #ruby
xco has joined #ruby
jenrzzz has quit [Ping timeout: 246 seconds]
jenrzzz has joined #ruby
themsay has quit [Ping timeout: 245 seconds]
nowhere_man has joined #ruby
fphilipe has joined #ruby
sameerynho has quit [Ping timeout: 244 seconds]
<plujon> The 'geoip-c' gem fails to load my GeoLite2-Country database; anybody know of a reliable geoip gem that works with MaxMind 2 databases?
fphilipe has quit [Ping timeout: 248 seconds]
orbyt_ has joined #ruby
bitwinery has quit [Quit: Leaving]
impermanence has joined #ruby
ramfjord has quit [Ping timeout: 245 seconds]
GodFather has quit [Ping timeout: 245 seconds]
VeryBewitching has quit [Quit: Konversation terminated!]
greengriminal has quit [Quit: This computer has gone to sleep]
GodFather has joined #ruby
xco has quit [Quit: xco]
thebananaking has joined #ruby
bitwinery has joined #ruby
ElFerna has quit [Quit: ElFerna]
mokha has quit [Quit: leaving]
Ring0` has joined #ruby
oetjenj has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
s2013 has joined #ruby
Skaterhaym has joined #ruby
involans has quit [Quit: involans]
absolutejam2 has quit [Ping timeout: 268 seconds]
wildtrees has joined #ruby
bitwinery has quit [Ping timeout: 258 seconds]
oetjenj has joined #ruby
absolutejam2 has joined #ruby
GodFather has quit [Ping timeout: 258 seconds]
oetjenj has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
s2013 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
absolutejam2 has quit [Ping timeout: 245 seconds]
stryek has quit [Quit: Connection closed for inactivity]
wildtrees has quit [Quit: Leaving]
GodFather has joined #ruby
Skaterhaym has quit [Read error: Connection reset by peer]
Skaterhaym has joined #ruby
DaRock has joined #ruby
ramfjord has joined #ruby
Skaterhaym has quit [Client Quit]
agent_white has joined #ruby
nowhereman has joined #ruby
nowhere_man has quit [Ping timeout: 264 seconds]
nopc0de has quit [Read error: Connection reset by peer]