havenwood changed the topic of #ruby to: Rules & more: https://ruby-community.com | Ruby 2.6.5, 2.5.7, 2.7.0-rc1: 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!
turbo_choo has quit [Ping timeout: 240 seconds]
bambanx has quit [Remote host closed the connection]
bambanx has joined #ruby
galaxie has joined #ruby
phaul__ has joined #ruby
drincruz_ has quit [Ping timeout: 265 seconds]
phaul_ has quit [Ping timeout: 268 seconds]
phaul__ has quit [Ping timeout: 260 seconds]
phaul__ has joined #ruby
duderonomy has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
fphilipe_ has joined #ruby
phaul__ has quit [Ping timeout: 260 seconds]
Esa_ has quit []
fphilipe_ has quit [Ping timeout: 248 seconds]
DaRock has quit [Ping timeout: 258 seconds]
davidw has quit [Ping timeout: 265 seconds]
ivanskie_ has joined #ruby
ivanskie_ has quit [Client Quit]
ivanskie has quit [Ping timeout: 265 seconds]
DaRock has joined #ruby
akemhp_ has joined #ruby
akemhp has quit [Ping timeout: 260 seconds]
ivanskie has joined #ruby
turbo_choo has joined #ruby
wallace_mu has joined #ruby
orbyt_ has joined #ruby
bsdbandit-01 has joined #ruby
wallace_mu has quit [Ping timeout: 260 seconds]
SeepingN has joined #ruby
itarato has joined #ruby
leitz has quit [Quit: Leaving]
bsdband9 has joined #ruby
turbo_choo has quit [Ping timeout: 260 seconds]
phaul__ has joined #ruby
bsdbandit-01 has quit [Ping timeout: 260 seconds]
ur5us_ has quit [Ping timeout: 260 seconds]
turbo_choo has joined #ruby
phaul__ has quit [Ping timeout: 265 seconds]
drincruz_ has joined #ruby
cthulchu has quit [Ping timeout: 268 seconds]
ur5us_ has joined #ruby
bsdbandit-01 has joined #ruby
wildtrees has quit [Quit: Leaving]
houhoulis has joined #ruby
gix has quit [Ping timeout: 260 seconds]
bsdband9 has quit [Ping timeout: 258 seconds]
ivanskie has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
jenrzzz has joined #ruby
jenrzzz has quit [Ping timeout: 260 seconds]
wallace_mu has joined #ruby
duderonomy has joined #ruby
wallace_mu has quit [Remote host closed the connection]
wallace_mu has joined #ruby
wallace_mu has quit [Ping timeout: 265 seconds]
fphilipe_ has joined #ruby
jedimaster2810 has joined #ruby
fphilipe_ has quit [Ping timeout: 260 seconds]
jedimaster2810 has quit [Quit: Leaving]
ExoUNX has joined #ruby
im0nde has joined #ruby
im0nde_ has quit [Ping timeout: 240 seconds]
drincruz_ has quit [Ping timeout: 268 seconds]
codic_ has joined #ruby
DaRock has quit [Remote host closed the connection]
<codic_> Hey again, y'all.
<codic_> 😎️
<skx86> hello codic_
DaRock has joined #ruby
<codic_> Quoting what I asked in the Ruby Discord server:
<codic_> My IRC client, Polari, wanted to paste it into there, so here you go :p
jenrzzz has joined #ruby
<codic_> No use
akemhp_ has quit [Quit: Leaving]
itarato has quit [Ping timeout: 260 seconds]
bkuhlmann has joined #ruby
wallace_mu has joined #ruby
jenrzzz has quit [Ping timeout: 260 seconds]
codic_ has quit [Quit: codic_]
bruce_lee has quit [Ping timeout: 265 seconds]
bruce_lee has joined #ruby
drincruz_ has joined #ruby
duderonomy has quit [Read error: Connection reset by peer]
duderono_ has joined #ruby
jenrzzz has joined #ruby
jenrzzz has quit [Ping timeout: 265 seconds]
auteroche has joined #ruby
drincruz_ has quit [Ping timeout: 258 seconds]
ctOS has quit [Quit: Connection closed for inactivity]
NODE has quit [Quit: changing servers]
itarato has joined #ruby
NODE has joined #ruby
NODE has quit [Client Quit]
NODE has joined #ruby
Nicmavr has quit [Read error: Connection reset by peer]
s2013 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
Nicmavr has joined #ruby
itarato has quit [Ping timeout: 268 seconds]
auteroche has quit [Quit: leaving]
_whitelogger has joined #ruby
drincruz_ has joined #ruby
s2013 has joined #ruby
wallace_mu has quit [Remote host closed the connection]
wallace_mu has joined #ruby
s2013 has quit [Ping timeout: 268 seconds]
wallace_mu has quit [Ping timeout: 258 seconds]
ivanskie has joined #ruby
<uplime> havenwood: whenever you're around, what would be the best way to tuse timers with async?
bkuhlmann has quit []
dinfuehr has quit [Ping timeout: 258 seconds]
dinfuehr has joined #ruby
cthulchu has joined #ruby
fphilipe_ has joined #ruby
AJA4350 has quit [Quit: AJA4350]
fphilipe_ has quit [Ping timeout: 248 seconds]
cincy_kal has joined #ruby
<cincy_kal> I am running into an issue with bundler. I do a bundle install and all goes well. When I try to run my app, it says that it can't find gem bcrypt. When I inspect the /usr/local/bundle/gems directory, the bcrypt gem is there and the proper version. however when i run bundle check, it says bcrypt is not installed. Out of 25 gems, it does this with
<cincy_kal> only 4 of them.
<cincy_kal> I'm having a hard time understanding how it can find some but not others as they are all installed to the same bundle
ur5us_ has quit [Ping timeout: 260 seconds]
<uplime> ah, found this: https://github.com/socketry/timers, nmd havenwood
SeepingN has quit [Quit: The system is going down for reboot NOW!]
greypack has quit [Read error: Connection reset by peer]
greypack has joined #ruby
_whitelogger has joined #ruby
code_zombie has quit [Read error: Connection reset by peer]
code_zombie has joined #ruby
cincy_kal has quit [Remote host closed the connection]
markopasha has quit [Ping timeout: 240 seconds]
xipho[m] has joined #ruby
RiPuk has joined #ruby
RiPuk_ has quit [Read error: Connection reset by peer]
bvdw has quit [Read error: Connection reset by peer]
bvdw has joined #ruby
jenrzzz has joined #ruby
wallace_mu has joined #ruby
jenrzzz has quit [Ping timeout: 260 seconds]
wallace_mu has quit [Ping timeout: 260 seconds]
Inline has quit [Quit: Leaving]
code_zombie has quit [Quit: Leaving]
pablo_ has joined #ruby
<pablo_> Hi, anyone here is familiar with the async gem?
Tikku has joined #ruby
orbyt_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
pablo_ has quit [Quit: Leaving]
shah^ has joined #ruby
Tikku has quit [Quit: Leaving]
bambanx has quit [Ping timeout: 265 seconds]
cthulchu has quit [Read error: Connection reset by peer]
houhoulis has quit [Remote host closed the connection]
fphilipe_ has joined #ruby
Emmanuel_Chanel has quit [Ping timeout: 250 seconds]
orbyt_ has joined #ruby
orbyt_ has quit [Client Quit]
rippa has joined #ruby
bsdbandit-01 has quit [Ping timeout: 246 seconds]
bsdband23 has joined #ruby
BTRE has quit [Ping timeout: 252 seconds]
jenrzzz has joined #ruby
BTRE has joined #ruby
jenrzzz has quit [Ping timeout: 268 seconds]
turbo_choo has quit [Ping timeout: 268 seconds]
Mia has joined #ruby
Mia has joined #ruby
Mia has quit [Changing host]
suukim has joined #ruby
vondruch has joined #ruby
fphilipe_ has quit [Ping timeout: 248 seconds]
DTZUZO has quit [Ping timeout: 248 seconds]
fphilipe_ has joined #ruby
Emmanuel_Chanel has joined #ruby
schne1der has joined #ruby
akemhp has joined #ruby
NODE has quit [Quit: changing servers]
NODE has joined #ruby
NODE has quit [Client Quit]
NODE has joined #ruby
NODE has quit [Client Quit]
NODE has joined #ruby
fphilipe_ has quit [Read error: Connection reset by peer]
DTZUZO has joined #ruby
fphilipe_ has joined #ruby
akemhp_ has joined #ruby
akemhp has quit [Ping timeout: 258 seconds]
jenrzzz has joined #ruby
akemhp_ has quit [Ping timeout: 258 seconds]
akemhp has joined #ruby
akemhp_ has joined #ruby
lacedem777 has joined #ruby
jenrzzz has quit [Ping timeout: 268 seconds]
akemhp has quit [Ping timeout: 260 seconds]
shokohsc89 has joined #ruby
<lacedem777> Hello, I am try to parse the result on a env command done via ssh, see exemple below. I try this with scan method but cant find the good regexp.
akemhp_ has quit [Ping timeout: 258 seconds]
<lacedem777> var1=fjqsljf flqksjfVAR2=fsdqjfslk fqslkjkVar3=flkjqsflk sqldjfsqlfkj lsjqkfsjflkVar=slqkjfsqlk
shokohsc8 has quit [Ping timeout: 265 seconds]
<ljarvis> lacedem777: what are you trying to extract?
<lacedem777> sorry the paste did not render as expected, it's multiline
<ljarvis> paste your input and what you want in the output into gist.github.com
<lacedem777> yes sorry I should begin by this
turbo_choo has joined #ruby
Axy has joined #ruby
mikecmpbll has joined #ruby
Mia has quit [Ping timeout: 260 seconds]
<ljarvis> use the /m modifier in your regex to match across the newlines
Mia has joined #ruby
Mia has joined #ruby
Mia has quit [Changing host]
<lacedem777> I'm using it
clemens3 has joined #ruby
Axy has quit [Ping timeout: 265 seconds]
<ljarvis> str.scan(/(\w+)=([^^[A-Z]]+)/m).to_h
phaul__ has joined #ruby
<ljarvis> change the character class as appropriate
yann-kaelig has joined #ruby
<lacedem777> Many thx I try this now
ivanskie has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
GodFather_ has quit [Read error: Connection reset by peer]
GodFather_ has joined #ruby
alexherbo2 has joined #ruby
shokohsc89 has quit [Quit: The Lounge - https://thelounge.chat]
shokohsc has joined #ruby
thebananaking has quit [Quit: Connection closed for inactivity]
fphilipe_ has quit [Read error: Connection reset by peer]
akemrir has joined #ruby
jenrzzz has joined #ruby
fanta1 has joined #ruby
evdubs_ has joined #ruby
evdubs has quit [Ping timeout: 260 seconds]
chalkmonster has joined #ruby
dionysus69 has joined #ruby
alexherbo24 has joined #ruby
alexherbo2 has quit [Ping timeout: 260 seconds]
clemens3 has quit [Quit: WeeChat 1.6]
alexherbo245 has joined #ruby
alexherbo24 has quit [Ping timeout: 240 seconds]
clemens3 has joined #ruby
phaul has joined #ruby
phaul__ has quit [Ping timeout: 240 seconds]
Bounga has joined #ruby
tobiasvl has quit [Ping timeout: 250 seconds]
Fernando-Basso has joined #ruby
ellcs has joined #ruby
jenrzzz has quit [Ping timeout: 240 seconds]
phaul has quit [Ping timeout: 260 seconds]
ellcs has quit [Ping timeout: 260 seconds]
chalkmonster has quit [Quit: WeeChat 2.7]
ctOS has joined #ruby
<NL3limin4t0r> lacedem777: Another option is: txt.split(/\n(?! )/).map { |str| str.split('=', 2) }.each { |_key, value| value.gsub!(/^ /, '') }.to_h
turbo_choo has quit [Ping timeout: 265 seconds]
<NL3limin4t0r> Which first splits the string when the line doesn't start with two spaces. Then splits each elements on the first "=" character. Then removes the first two spaces form multiline variables.
turbo_choo has joined #ruby
ellcs has joined #ruby
phaul has joined #ruby
bvdw has quit [Read error: Connection reset by peer]
jenrzzz has joined #ruby
bvdw has joined #ruby
phaul has quit [Ping timeout: 260 seconds]
yann-kaelig has quit [Quit: yann-kaelig]
turbo_choo has quit [Ping timeout: 240 seconds]
phaul has joined #ruby
rippa has quit [Read error: Connection reset by peer]
davor_ has joined #ruby
davispuh has joined #ruby
davor has quit [Ping timeout: 268 seconds]
davor_ is now known as davor
jenrzzz has quit [Ping timeout: 260 seconds]
jenrzzz has joined #ruby
fphilipe_ has joined #ruby
skx86 has quit [Quit: Connection closed for inactivity]
cliluw has quit [Read error: Connection reset by peer]
mozzarella has quit [Remote host closed the connection]
cliluw has joined #ruby
mozzarel1 has joined #ruby
mozzarel1 is now known as mozzarella
turbo_choo has joined #ruby
AJA4350 has joined #ruby
RiPuk has quit [Remote host closed the connection]
RiPuk has joined #ruby
teamslothdotnet has joined #ruby
za1b1tsu has joined #ruby
RiPuk has quit [Remote host closed the connection]
RiPuk has joined #ruby
NODE has quit [Quit: changing servers]
NODE has joined #ruby
errst has joined #ruby
markopasha has joined #ruby
markopasha has quit [Max SendQ exceeded]
jinie has quit [Quit: ZNC 1.6.1 - http://znc.in]
markopasha has joined #ruby
rafadc_ has quit [Read error: Connection reset by peer]
jinie has joined #ruby
phaul has quit [Ping timeout: 260 seconds]
ellcs has quit [Ping timeout: 260 seconds]
phaul has joined #ruby
rafadc has joined #ruby
drincruz_ has quit [Ping timeout: 265 seconds]
rippa has joined #ruby
phaul has quit [Ping timeout: 258 seconds]
rafadc has quit [Quit: ZNC - https://znc.in]
davispuh has quit [Quit: http://quassel-irc.org - Chat comfortably. Anywhere.]
ellcs has joined #ruby
lucasb has joined #ruby
errst has quit [Ping timeout: 268 seconds]
errst has joined #ruby
teamslothdotnet has quit [Quit: Leaving]
svankmajer has joined #ruby
arekushi has quit [Quit: Gateway shutdown]
<svankmajer> Has someone used RSpec `allow_any_instance_of(Class).to receive(:method)`, where :method is called with a block, and been able to access that block?
<svankmajer> Something like `yield arg if block_given?` doesn't work =/
errst has quit [Read error: Connection reset by peer]
chalkmonster has joined #ruby
bsdband23 has quit [Quit: -a- Connection Timed Out]
alexherbo2453 has joined #ruby
fanta1 has quit [Quit: fanta1]
alexherbo245 has quit [Ping timeout: 268 seconds]
chalkmonster has quit [Quit: WeeChat 2.7]
bsdbandit-01 has joined #ruby
DaRock has quit [Ping timeout: 268 seconds]
<adam12> svankmajer: Are you looking for something like and_yield?
<svankmajer> adam12: Yes! Thanks. But... this method can be invoked like this: `my_method(:arg)` and `my_method { |arg| ... }`. Do I need to mock/stub (sorry for my ignorance) each kind of invocation, so to speak?
phaul has joined #ruby
<adam12> svankmajer: Not sure tbh. Can you share some code? What's your ultimate goal here?
phaul has quit [Ping timeout: 240 seconds]
Nicmavr has quit [Read error: Connection reset by peer]
shokohsc has quit [Quit: The Lounge - https://thelounge.chat]
chalkmonster has joined #ruby
Nicmavr has joined #ruby
wallace_mu has joined #ruby
shokohsc has joined #ruby
ellcs has quit [Ping timeout: 240 seconds]
wallace_mu has quit [Remote host closed the connection]
wallace_mu has joined #ruby
jcalla has joined #ruby
dionysus69 has quit [Ping timeout: 268 seconds]
NODE has quit [Quit: changing servers]
NODE has joined #ruby
wallace_mu has quit [Remote host closed the connection]
wallace_mu has joined #ruby
william1_ has joined #ruby
alexherbo2453 has quit [Ping timeout: 265 seconds]
alexherbo24531 has joined #ruby
NODE has quit [Quit: changing servers]
NODE has joined #ruby
lxsameer has quit [Quit: out]
wallace_mu has quit [Remote host closed the connection]
wallace_mu has joined #ruby
drincruz_ has joined #ruby
leitz has joined #ruby
wallace_mu has quit [Ping timeout: 260 seconds]
skx86 has joined #ruby
akemrir has quit [Quit: WeeChat 2.6]
turbo_choo has quit [Ping timeout: 260 seconds]
drincruz_ has quit [Ping timeout: 260 seconds]
ltp has quit [Ping timeout: 268 seconds]
priodev has quit [Ping timeout: 268 seconds]
turbo_choo has joined #ruby
shokohsc4 has joined #ruby
shokohsc has quit [Ping timeout: 265 seconds]
shokohsc8 has joined #ruby
turbo_choo has quit [Ping timeout: 258 seconds]
shokohsc4 has quit [Ping timeout: 265 seconds]
shokohsc81 has joined #ruby
shokohsc8 has quit [Ping timeout: 258 seconds]
shokohsc88 has joined #ruby
shokohsc884 has joined #ruby
shokohsc81 has quit [Ping timeout: 260 seconds]
shokohsc887 has joined #ruby
AJA4350 has quit [Quit: AJA4350]
<havenwood> lacedem777: Another option: split(/\n(?!\s)/).to_h { |pair| pair.split '=' }.transform_values { |value| value.gsub /(?<=\n) /, '' }
shokohsc88 has quit [Ping timeout: 260 seconds]
wallace_mu has joined #ruby
shokohsc884 has quit [Ping timeout: 260 seconds]
<havenwood> (Split on newlines not followed by whitespace, split on equals, the get rid of soft tabs.)
<havenwood> (Split on newlines not followed by whitespace, split those on equals, then get rid of soft tabs.)
wallace_mu has quit [Remote host closed the connection]
shokohsc887 has quit [Ping timeout: 268 seconds]
wallace_mu has joined #ruby
wallace__ has joined #ruby
wallace_mu has quit [Ping timeout: 265 seconds]
impermanence has joined #ruby
drincruz_ has joined #ruby
svankmajer has quit [Ping timeout: 268 seconds]
skryking has joined #ruby
william1_ has quit [Ping timeout: 258 seconds]
lacrymology has quit [Remote host closed the connection]
Bounga` has joined #ruby
Bounga has quit [Ping timeout: 246 seconds]
AJA4350 has joined #ruby
orbyt_ has joined #ruby
chalkmonster has quit [Quit: WeeChat 2.7]
Esa_ has joined #ruby
turbo_choo has joined #ruby
ellcs has joined #ruby
gix has joined #ruby
phaul has joined #ruby
Bounga` has quit [Ping timeout: 246 seconds]
orbyt_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
dionysus69 has joined #ruby
phaul has quit [Ping timeout: 265 seconds]
clemens3 has quit [Quit: WeeChat 1.6]
davidw has joined #ruby
davidw has joined #ruby
davidw has quit [Changing host]
phaul has joined #ruby
william1_ has joined #ruby
shokohsc has joined #ruby
sameerynho has joined #ruby
dionysus69 has quit [Ping timeout: 260 seconds]
mikecmpbll has quit [Quit: inabit. zz.]
svankmajer has joined #ruby
ctOS has quit [Quit: Connection closed for inactivity]
phaul has quit [Ping timeout: 258 seconds]
conta1 has joined #ruby
phaul has joined #ruby
svankmajer has quit [Quit: leaving]
ivanskie has joined #ruby
conta1 has quit [Client Quit]
NODE has quit [Quit: changing servers]
phaul has quit [Ping timeout: 265 seconds]
NODE has joined #ruby
bvdw has quit [Read error: Connection reset by peer]
impermanence has quit [Ping timeout: 265 seconds]
fphilipe_ has quit [Ping timeout: 268 seconds]
bvdw has joined #ruby
bambanx has joined #ruby
gheegh has joined #ruby
<gheegh> Hey all, I'm curious to get some feedback. I've got a gem im' working on that a NER thing. I have about 15 million records i need to store.. I'd like to avoid pulling it all into memory.. but i'd like it to be as quick as posssible.. thoughts on how I should store it? I'm currently using Moneta / GDBM and compressing the value..
houhoulis has joined #ruby
markopasha has quit [Remote host closed the connection]
<adam12> gheegh: Is that mechanism not working for you? Building on top of one of the DBM (maybe SDBM since it ships with Ruby) is a nice solution since it's dependency free.
<gheegh> well, the file is something like 1GB in size..
evertvdb has quit [Quit: ZNC - https://znc.in]
<gheegh> though maybe it is the best solution.. i'm about to double the size of teh DB most likley..
evert has joined #ruby
<gheegh> the good news is that this seems to perform well.. just wondering about the ram implications..
<adam12> I guess my next solution would be something sqlite based?
evert has quit [Client Quit]
evert has joined #ruby
<gheegh> yeah, which is pretty similar..
<gheegh> these records in theory are highly compressable.. i'm wondering if there's some sort of better strategy for compressing the data, yet keeping similar performance
<adam12> I guess if that's the case then looking at a better compression engine might work. Something like xz where you pay the compression penalty up front but decompression has very little penalty?
shah^ has quit []
za1b1tsu has quit [Remote host closed the connection]
<gheegh> yeah, something like that
phaul has joined #ruby
william1_ has quit [Ping timeout: 260 seconds]
phaul has quit [Ping timeout: 268 seconds]
Ai9zO5AP has joined #ruby
pavelz has joined #ruby
<pavelz> hola ppl
NODE has quit []
Benett has quit [Quit:  ]
<pavelz> why does "%#X" % [["1",2]].hash give me "0X..FCC96BDD45DCC9D22"
<pavelz> what are those dots
Benett has joined #ruby
<pavelz> nobody ? :)
NODE has joined #ruby
<adam12> &>> "%#X" % [["1",2]].hash
<rubydoc> # => "0X..FC9616C4B8DE470A9" (https://carc.in/#/r/88ov)
<adam12> Interesting.
<pavelz> ah negatives.
<pavelz> shouldn't negative be in the first bit
NODE has quit [Client Quit]
<pavelz> like num && 1 to test for negative.
<pavelz> guess ruby hex is not hex editor hex
<pavelz> or wait , num && 32 >> 1
NODE has joined #ruby
<pavelz> wierd. thanks adam12
<adam12> Not sure I helped at all but cheers :)
robotcars has joined #ruby
Bounga` has joined #ruby
schne1der has quit [Ping timeout: 268 seconds]
bsdbandit-01 has quit [Ping timeout: 268 seconds]
<robotcars> https://gist.github.com/robert-carroll/a739fb1c6385cb52f2013f0500f196da :9:in `<class:AccountReports>': undefined local variable or method `config' for AccountReports:Class
<robotcars> how do I bring yaml config into AccountReports ?
<robotcars> i guess, with 1 declaration for both class and instance use
Bounga` has quit [Ping timeout: 252 seconds]
duderono_ has quit [Remote host closed the connection]
bsdbandit-01 has joined #ruby
duderonomy has joined #ruby
william1_ has joined #ruby
gheegh has quit [Ping timeout: 260 seconds]
ellcs has quit [Ping timeout: 260 seconds]
ivanskie has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
bsdband9 has joined #ruby
ivanskie has joined #ruby
bsdbandit-01 has quit [Ping timeout: 268 seconds]
<adam12> robotcars: Could make it a global too..
william1_ has quit [Ping timeout: 258 seconds]
bsdbandit-01 has joined #ruby
<robotcars> there a way without using globals?
bambanx has quit [Quit: Leaving]
bsdband9 has quit [Ping timeout: 250 seconds]
ur5us_ has joined #ruby
priodev has joined #ruby
bsdband38 has joined #ruby
ur5us_ has quit [Read error: Connection reset by peer]
bsdbandit-01 has quit [Ping timeout: 240 seconds]
fphilipe_ has joined #ruby
wildtrees has joined #ruby
ivanskie has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
bsdbandit-01 has joined #ruby
errst has joined #ruby
fphilipe_ has quit [Ping timeout: 268 seconds]
bsdband38 has quit [Ping timeout: 260 seconds]
ByronJohnson has quit [Ping timeout: 265 seconds]
bsdbandit-01 has quit [Ping timeout: 258 seconds]
drincruz has joined #ruby
bsdband66 has joined #ruby
drincruz_ has quit [Ping timeout: 268 seconds]
ivanskie has joined #ruby
bsdband66 has quit [Ping timeout: 258 seconds]
bsdbandit-01 has joined #ruby
klaas has quit [Quit: ZNC 1.7.5 - https://znc.in]
klaas has joined #ruby
Rapture has joined #ruby
bsdband98 has joined #ruby
bsdband98 has quit [Max SendQ exceeded]
DTZUZO has quit [Ping timeout: 265 seconds]
dviola has joined #ruby
DTZUZO_ has joined #ruby
bsdbandit-01 has quit [Ping timeout: 260 seconds]
errst has quit [Ping timeout: 260 seconds]
errst has joined #ruby
Mia has quit [Excess Flood]
bsdband61 has joined #ruby
Mia has joined #ruby
Mia has quit [Changing host]
Mia has joined #ruby
Bounga` has joined #ruby
sauvin has quit [Ping timeout: 265 seconds]
suukim has quit [Quit: Konversation terminated!]
Bounga` has quit [Ping timeout: 260 seconds]
william1_ has joined #ruby
skx86 has quit [Quit: Connection closed for inactivity]
<havenwood> robotcars: Make a CONFIG constant inside AccountReport?
<havenwood> robotcars: AccountReports::CONFIG from the outside, and just CONFIG from within AccountReports.
<havenwood> robotcars: It's hard to tell from this snippet, but does AccountReport have state? Should it be a module or singleton class?
<havenwood> robotcars: It looks like it would be nice to put your day name methods in a module.
<havenwood> robotcars: I'd recommend considering async-http or http libraries in place of httparty. (I don't like to party hard though, so...)
cthulchu has joined #ruby
rippa has quit [Quit: {#`%${%&`+'${`%&NO CARRIER]
bairyn has joined #ruby
ivanskie has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
ivanskie has joined #ruby
phaul has joined #ruby
cliluw has quit [Ping timeout: 240 seconds]
cliluw has joined #ruby
fphilipe_ has joined #ruby
fphilipe_ has quit [Ping timeout: 260 seconds]
jinie_ has joined #ruby
jinie has quit [Ping timeout: 265 seconds]
jinie_ is now known as jinie
william1_ has quit [Ping timeout: 265 seconds]
william1_ has joined #ruby
s2013 has joined #ruby
bsdband61 has quit [Ping timeout: 260 seconds]
fphilipe_ has joined #ruby
bsdbandit-01 has joined #ruby
<uplime> havenwood: so i got a small client working with async, only question now is, how do I run multiple loops in a non blocking manner? like if i wanted to run multiple instances of the bot at once (to connect to multiple networks) from one script?
jmcgnh has quit [Read error: Connection reset by peer]
<havenwood> uplime: It follows the patter of the Asyc gem, where it's synchronous when one Async deep and asynchronous when two: https://github.com/socketry/async#usage
<uplime> ohhhhhh
<uplime> I'm already doing that already actually, my testing was just flawed
<uplime> that clears that up though, thanks!
jmcgnh has joined #ruby
william1_ has quit [Ping timeout: 258 seconds]
william1_ has joined #ruby
davidw has quit [Ping timeout: 265 seconds]
<adam12> havenwood: I think we're changing your title to async evangelist.
alexherbo24531 has quit [Quit: The Lounge - https://thelounge.chat]
NL3limin4t0r is now known as NL3limin4t0r_afk
sagax has quit [Ping timeout: 265 seconds]
dviola has quit [Quit: WeeChat 2.7]
<havenwood> adam12: Isolate.new(bare: true) { |isolate| Async do |task| isolate.selector = task.reactor; channel.evangelize } }
<adam12> havenwood: :O
sagax has joined #ruby
<havenwood> Oops, messed up my do/}/end. Typical!
<havenwood> I'm not responsible enough for multiple ways to do it. :P
cthu| has joined #ruby
cthulchu has quit [Ping timeout: 260 seconds]
<NL3limin4t0r_afk> robotcars: Another option is to allow AccountReports to accept the config through the constructor. https://gist.github.com/3limin4t0r/05e375a29964fdd1b495478322a61e50
<NL3limin4t0r_afk> afk for real now
bruce_lee has quit [Read error: Connection reset by peer]
<robotcars> thanks, all, will review in a bit.
william1 has joined #ruby
leitz has quit [Quit: Leaving]
Skarlso has quit [Quit: The Lounge - https://thelounge.chat]
william1 has quit [Quit: WeeChat 2.6]
fphilipe_ has quit [Ping timeout: 260 seconds]
Skarlso has joined #ruby
william1 has joined #ruby
william1 has quit [Client Quit]
ivanskie has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
ivanskie has joined #ruby
bsdbandit-01 has quit [Ping timeout: 250 seconds]
dionysus69 has joined #ruby
davidw has joined #ruby
davidw has quit [Changing host]
davidw has joined #ruby
inclusa has joined #ruby
bsdbandit-01 has joined #ruby
duderonomy has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
bambanx has joined #ruby
inclusa has quit [Quit: leaving]
fphilipe_ has joined #ruby
Bounga` has joined #ruby
Bounga` has quit [Ping timeout: 245 seconds]
fphilipe_ has quit [Ping timeout: 260 seconds]
itarato has joined #ruby
TCZ has joined #ruby
Rapture has quit [Quit: Textual IRC Client: www.textualapp.com]
<dorian> anybody know of an example of a gem that tests for headers of a C library and if it doesn't find them, downloads that library and compiles it?
fphilipe_ has joined #ruby
itarato has quit [Ping timeout: 260 seconds]
<adam12> dorian: Only one I've seen that's remotely comparable is bcrypt, but it ships with the blowfish crypt sources.
<uplime> that sounds like something that a package/dep manager would do rather than a gem
<adam12> I guess nokogiri is similar in that regard.
<dorian> i'm taking over maintaining the lmdb gem, and currently it has the lmdb source embedded in it
<dorian> and i was thinking, it would be nice to strip that out and only download it if necessary
<dorian> (that way it would always be fresh)
<dorian> i haven't looked at it too hard but it seems to prefer the system's install
phaul has quit [Ping timeout: 260 seconds]
<adam12> Looks that way.
<adam12> Does it change frequently enough that downloading and compiling is worth it?
<adam12> I'd probably prefer that it shipped as a whole unit, if I was looking at adding a dependency to my project.
skryking has quit [Quit: WeeChat 1.9.1]
istrasci has joined #ruby
<istrasci> How can I check if a value can be converted to a Date object by `to_date`?
william1_ has quit [Ping timeout: 258 seconds]
<pabs> istrasci: obj.respond_to?(:to_date)
<uplime> havenwood: is it possible to send a client certificate with Async::IO::SSLEndpoint?
<istrasci> pabs: "abc".respond_to?(:to_date) is true, but "abc".to_date gives an ArgumentError ("invalid date").
<istrasci> So this is not what I'm looking for.
phaul has joined #ruby
<pabs> istrasci: 'abc'.respond_to?(:to_date) is false for me, are you in an environment that adds additional global methods to objects (e.g. rails)
<pabs> >> 'abc'.respond_to?(:to_date)
<pabs> => false
<ruby[bot]> pabs: # => false (https://eval.in/1122421)
<leftylink> heh. there's always the "try it and rescue" approach, even if ti seems unsatisfying.
<pabs> yeah
<pabs> istrasci: the other option is to test the arity of the to_date method as well
<dorian> adam12: yeah i'm mostly just lukewarm about having it in the git repo
<dorian> like if building the gem hoovered the latest version or whatever i'd prefer that i think, especially if i'm gonna maintain it
<pabs> here's an example of testing the arity as well, by the way:
<pabs> Permission denied (publickey,gssapi-keyex,gssapi-with-mic).
<pabs> err, hello :D
<pabs> >> def can_to_date(o); o.respond_to?(:to_date) && o.method(:to_date).arity == 0; end
<ruby[bot]> pabs: # => :can_to_date (https://eval.in/1122422)
<pabs> >> class Foo; def to_date(b); 'fdsa'; end; end
<pabs> >> require 'time'
<pabs> >> [nil, 'asdf', Time.new, Date.new, Foo].map { |v| can_to_date(v) }
<pabs> => [false, false, true, true, false]
<ruby[bot]> pabs: # => :to_date (https://eval.in/1122423)
<ruby[bot]> pabs: # => true (https://eval.in/1122424)
<pabs> sorry about the spam
<havenwood> i like: o.public_method(:to_date).arity.zero?
<istrasci> pabs: Sorry, was AFK. Yes, this is within a Rails class.
<havenwood> uplime: unsure! hmm, I think you should be able to.
<pabs> havenwood: that works too (and i like the public_method bit, good catch)
<uplime> digging through, i think i may have to provide an ssl context manually with the client_cert_cb callback
itarato has joined #ruby
wallace__ has quit [Remote host closed the connection]
wallace_mu has joined #ruby
galaxie has quit [Remote host closed the connection]
galaxie has joined #ruby
sagax has quit [Ping timeout: 268 seconds]
GodFather_ has quit [Ping timeout: 268 seconds]
wallace_mu has quit [Ping timeout: 265 seconds]
Nahra has joined #ruby
markopasha has joined #ruby
phaul_ has joined #ruby
phaul has quit [Ping timeout: 268 seconds]
bsdbandit-01 has quit [Ping timeout: 245 seconds]
bsdband42 has joined #ruby
errst has quit [Changing host]
errst has joined #ruby
TCZ has quit [Quit: Bye Bye]
TCZ has joined #ruby
TCZ has quit [Read error: Connection reset by peer]
TCZ has joined #ruby
MzrE has joined #ruby
TCZ has quit [Read error: Connection reset by peer]
TCZ has joined #ruby
TCZ has quit [Read error: Connection reset by peer]
TCZ has joined #ruby
TCZ has quit [Client Quit]
TCZ has joined #ruby
<uplime> havenwood: got a small working example: https://clbin.com/6rNBE
Nahra has quit [Quit: leaving]
TCZ has quit [Read error: Connection reset by peer]
TCZ has joined #ruby
bsdband42 has quit [Ping timeout: 265 seconds]
TCZ has quit [Read error: Connection reset by peer]
bsdbandit-01 has joined #ruby
bsdbandit-01 has quit [Max SendQ exceeded]
TCZ has joined #ruby
port1024 has joined #ruby
TCZ has quit [Client Quit]
TCZ has joined #ruby
TCZ has quit [Client Quit]
ivanskie has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
ivanskie has joined #ruby
TCZ has joined #ruby
bsdbandit-01 has joined #ruby
wymillerlinux has joined #ruby
cthulchu_ has joined #ruby
cthulchu_ has quit [Read error: Connection reset by peer]
bvdw has quit [Read error: Connection reset by peer]
cthulchu_ has joined #ruby
cthu| has quit [Ping timeout: 260 seconds]
bvdw has joined #ruby
MzrE has quit [Quit: Leaving]
errst has quit [Ping timeout: 260 seconds]
Bounga` has joined #ruby
DaRock has joined #ruby
Bounga` has quit [Ping timeout: 246 seconds]
jenrzzz has quit [Ping timeout: 260 seconds]
Esa_ has quit []
cthulchu_ has quit [Remote host closed the connection]
cthulchu_ has joined #ruby
cthulchu_ has quit [Read error: Connection reset by peer]
cthulchu_ has joined #ruby
jenrzzz has joined #ruby
shokohsc has quit [Ping timeout: 260 seconds]
bsdbandit-01 has quit [Ping timeout: 268 seconds]
bsdband74 has joined #ruby
ivanskie has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
ivanskie has joined #ruby
Exuma has joined #ruby
drincruz has quit [Ping timeout: 268 seconds]