BSaboia has quit [Quit: This computer has gone to sleep]
<lunarkitty>
Are there any factorygirl/bot/fabricator alternatives for sequel?
<lunarkitty>
I've just been making functions to do fixtures, but it's getting a little ugly
<lunarkitty>
oh wait, silly me fabrication does sequel too
bamdad has quit [Remote host closed the connection]
drincruz has quit [Ping timeout: 240 seconds]
<lunarkitty>
Hey, what are other langs to look into for someone who really likes the everything is an object, slightly functional, and different syntax aspects of ruby? Not looking to move away from ruby, I just like looking into new things
<lunarkitty>
I already know about crystal
drincruz has joined #ruby
<lunarkitty>
Really looking forward to ruby 3, lot of interesting things from the looks of it!
bsdbandit-01 has joined #ruby
ChmEarl has quit [Quit: Leaving]
bsdband66 has quit [Ping timeout: 240 seconds]
swaggboi has quit [Quit: C-x C-c]
bsdbandit-01 has quit [Ping timeout: 260 seconds]
adu has quit [Quit: adu]
swaggboi has joined #ruby
DaRock has joined #ruby
gix has quit [Ping timeout: 246 seconds]
sagax has joined #ruby
_whitelogger has joined #ruby
PaulePanter has quit [Quit: Lost terminal]
cthu| has joined #ruby
bsdband12 has joined #ruby
orbyt_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
magickid_ has joined #ruby
magickid has quit [Read error: Connection reset by peer]
magickid has joined #ruby
magickid_ has quit [Read error: Connection reset by peer]
magickid has quit [Read error: Connection reset by peer]
magickid_ has joined #ruby
cthu| has quit [Ping timeout: 265 seconds]
laball70 has joined #ruby
theelous3 has joined #ruby
<laball70>
I did a code assessment today and hadn't used irb for several months, and writing out some properties from a JSON object I got confused that it was writing out my properties but then the response. So nervous, but I spent over an hour of a two hour time limit on something I had correct in 5 minutes.
<laball70>
Feel really dumb.
<havenwood>
laball70: maybe let them know you got hung up on tooling and ask for another go?
<havenwood>
laball70: tech interviews especially tend to be hit or miss, however much you prep.
<laball70>
I told them in the followup. Because I didn't get to some of the tasks later, but I knew what to do to solve them so I explained. I just hope I get a shot. This is a great job and I want to work at a higher level with other devs that are good. But yeah thanks for the calm advice, lol
magickid has joined #ruby
magickid_ has quit [Read error: Connection reset by peer]
magickid has quit [Read error: Connection reset by peer]
magickid has joined #ruby
wymillerlinux has joined #ruby
bruce_lee has quit [Ping timeout: 240 seconds]
bruce_lee has joined #ruby
bruce_lee has quit [Changing host]
bruce_lee has joined #ruby
hahuang65 has quit [Ping timeout: 244 seconds]
alnk has quit [Ping timeout: 244 seconds]
alnk has joined #ruby
hahuang65 has joined #ruby
hahuang65 has quit [Max SendQ exceeded]
hahuang65 has joined #ruby
drincruz has quit [Ping timeout: 240 seconds]
braincrash has quit [Quit: bye bye]
theelous3 has quit [Read error: Connection reset by peer]
jenrzzz has joined #ruby
braincrash has joined #ruby
jenrzzz_ has quit [Ping timeout: 240 seconds]
rose_nd_ash has joined #ruby
laball70 has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
rose_nd_ash has quit [Remote host closed the connection]
rose_nd_ash has joined #ruby
greypack has quit [Ping timeout: 240 seconds]
fabio_ has joined #ruby
tbisker8 has joined #ruby
sagax has quit [Ping timeout: 246 seconds]
titanbiscuit has quit [Ping timeout: 240 seconds]
magickid_ has joined #ruby
magickid has quit [Read error: Connection reset by peer]
MadLamb has quit [Ping timeout: 240 seconds]
rose_nd_ash has quit [Ping timeout: 240 seconds]
greypack has joined #ruby
rose_nd_ash has joined #ruby
rose_nd_ash has quit [Remote host closed the connection]
rose_nd_ash has joined #ruby
rose_nd_ash has quit [Remote host closed the connection]
lucasb has quit [Quit: Connection closed for inactivity]
rose_nd_ash has joined #ruby
_aeris_ has quit [Remote host closed the connection]
_aeris_ has joined #ruby
rose_nd_ash has quit [Remote host closed the connection]
rdash has joined #ruby
rdash has quit [Remote host closed the connection]
rose_nd_ash has joined #ruby
skape has quit [Quit: Connection closed for inactivity]
rose_nd_ash has quit [Remote host closed the connection]
rose_nd_ash has joined #ruby
xylophone has joined #ruby
jenrzzz has quit [Ping timeout: 264 seconds]
bsdband12 has quit [Ping timeout: 260 seconds]
wymillerlinux has quit [Ping timeout: 260 seconds]
rose_nd_ash has quit [Remote host closed the connection]
rose_nd_ash has quit [Remote host closed the connection]
rose_nd_ash has joined #ruby
Luwe has joined #ruby
Luwe has quit [Quit: leaving]
Luwe has joined #ruby
rose_nd_ash has quit [Remote host closed the connection]
Luwe has quit [Client Quit]
Luwe has joined #ruby
Luwe has quit [Client Quit]
Luwe has joined #ruby
Luwe has quit [Client Quit]
jetchisel has quit [Ping timeout: 240 seconds]
Luwe has joined #ruby
Luwe has quit [Client Quit]
Emmanuel_Chanel has quit [Ping timeout: 246 seconds]
roadt has quit [Ping timeout: 246 seconds]
Emmanuel_Chanel has joined #ruby
roadt has joined #ruby
alexherbo2_ has joined #ruby
alexherbo2 has joined #ruby
jenrzzz has joined #ruby
jenrzzz has quit [Ping timeout: 246 seconds]
jerome__ has quit [Ping timeout: 240 seconds]
heidar has quit [Quit: Leaving]
rose_nd_ash has joined #ruby
rose_nd_ash has quit [Ping timeout: 256 seconds]
GodFather has quit [Ping timeout: 256 seconds]
jenrzzz has joined #ruby
roadt has quit [Ping timeout: 260 seconds]
jenrzzz has quit [Ping timeout: 256 seconds]
roadt has joined #ruby
sagax has quit [Remote host closed the connection]
rose_nd_ash has joined #ruby
rose_nd_ash has quit [Remote host closed the connection]
rose_nd_ash has joined #ruby
ChmEarl has joined #ruby
laball70 has joined #ruby
rose_nd_ash has quit [Remote host closed the connection]
rose_nd_ash has joined #ruby
alfiemax has joined #ruby
rose_nd_ash has quit [Remote host closed the connection]
rose_nd_ash has joined #ruby
rose_nd_ash has quit [Remote host closed the connection]
coniptor has quit [Ping timeout: 265 seconds]
rose_nd_ash has joined #ruby
claw has quit [Read error: Connection reset by peer]
kreantos has joined #ruby
laball70 has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
akem has quit [Quit: Leaving]
<kreantos>
Hi, i have a method which does some heavy calculation (and caches the result). is there a way to queue method calls until it is cached? the method is used by different rest calls which are being called at the same time from the frontend.
alfiemax has quit [Remote host closed the connection]
alfiemax has joined #ruby
alfiemax has quit [Ping timeout: 256 seconds]
TCZ has joined #ruby
jenrzzz has joined #ruby
coniptor has joined #ruby
claw has joined #ruby
jenrzzz has quit [Ping timeout: 256 seconds]
tbisker8 has quit [Ping timeout: 240 seconds]
magickid_ has quit [Read error: Connection reset by peer]
Technodrome has joined #ruby
titanbiscuit has joined #ruby
rose_nd_ash has quit [Remote host closed the connection]
kreantos_ has joined #ruby
kreantos has quit [Ping timeout: 256 seconds]
drincruz has joined #ruby
rose_nd_ash has joined #ruby
rose_nd_ash has quit [Ping timeout: 260 seconds]
bamdad has joined #ruby
davispuh has joined #ruby
alfiemax has joined #ruby
xylophone has quit [Ping timeout: 265 seconds]
sagax has joined #ruby
TCZ has quit [Quit: Leaving]
schne1der has quit [Ping timeout: 240 seconds]
Axy has quit [Ping timeout: 265 seconds]
magickid_ has joined #ruby
rose_nd_ash has joined #ruby
Mia has joined #ruby
Mia has quit [Changing host]
Mia has joined #ruby
rose_nd_ash has quit [Remote host closed the connection]
rose_nd_ash has quit [Remote host closed the connection]
<adam12>
kreantos_: Nothing built in to Ruby afaik. You'd probably want to have a mutex or something that indicates the value is being generated, then return an appropriate status to clients to try again later. I'm not sure queuing would be the best idea...
<kreantos_>
adam12, thanks for your input. by trying again later you mean on the network layer? is there standard response code for that?
roadt has quit [Ping timeout: 240 seconds]
davispuh has joined #ruby
<havenwood>
kreantos_: Does the cache ever expire?
rose_nd_ash has joined #ruby
<havenwood>
kreantos_: Consider caching the value once calculated in a persistent store, like Redis, Memcache, or something in Ruby memory like Rinda::TupleSpace.
<adam12>
kreantos_: You might be able to return 503. Client retry will be client specific tho.
<havenwood>
kreantos_: A Mutex was my first thought too.
alfiemax has quit [Remote host closed the connection]
chalkmonster has quit [Quit: WeeChat 2.9]
alfiemax has joined #ruby
<kreantos_>
yes it expires, as it covers some "realtime data" my current issue is, that the calls made by the clients are causing too much load on the server at once (before it is cached) precalculating all the possible data which results from all possible queries seems not really doable to me
<ruurd>
Well... you could consider using something like ActionCable to send the people who requested the result a notification when the result is available...
<kreantos_>
ruurd, this would be an option, if i would implement the clients, i just provide the api
<ruurd>
Or turn the thing upside down and use that in the first place to get at the value - have it updated from the backend - pushed instead of pulled.
<havenwood>
Active Job does pair nicely with Action Cable for this case.
<ruurd>
Yes well, if they want realtime updates they should fix their client innit?
<havenwood>
kreantos_: Just thought of it as something you might consider if you go the Action Cable route.
<adam12>
kreantos_: Building a lot of ActiveRecord models can thrash the GC so definitely check that you're not doing that.
<kreantos_>
havenwood, is it like phoenix liveview (elixir)
<havenwood>
kreantos_: yes, inspired by
<kreantos_>
havenwood, really nice to see this happening in ruby, wasn't aware of it. i will get into it. unfortunately not for this project, as i am only api provider
<kreantos_>
thanks for the link
<kreantos_>
adam12, so you would eliminate ActiveRecord everywhere where no CRUD is needed?
<adam12>
kreantos_: If you're doing a query that is composing a "report", I might be inclined to use ActiveRecord's direct SQL querying ability to return primitives. An Array of Hashes of Strings/Numerics...
xylophone has joined #ruby
<adam12>
kreantos_: I wouldn't probably do it everywhere but if you're returning lots of rows, all those heavy AR objects have to be built then gc'd.
<adam12>
kreantos_: I only really use Sequel anymore so I'd have to look up the AR syntax but that looks correct.
<adam12>
kreantos_: Of course this is dependent on if it's your actual issue. If you can run the query in psql and it returns a lot faster than in your app, it's likely your problem.
<kreantos_>
adam12, that is only a part of the problem, as when my service collapses memory_pressure on the application server is not that high
chalkmonster has joined #ruby
<kreantos_>
but there are too many queries at the same time and the db-server freezes
<kreantos_>
but it is definitely part of the problem.
<adam12>
Fun
<kreantos_>
adam12, haha definitely a lot of it :-D
<kreantos_>
maybe I'm thinking to complex with this queueing stuff. when a request/method call of a heavy calculation is executed i cache the result with memcached. problem is, that when the client starts, it calls several different endpoints which all rely partly on that heavy calculation. this calculation is then being called several times before it is even cached
lucasb has joined #ruby
<adam12>
Depends on how long it takes to calculate the data I guess? Is there chance it will take longer than the client will wait? or the app server / load balancer will wait?
<kreantos_>
no, they wait long enough
<adam12>
If they're all happy waiting, you could probably model something around the method locking while it builds the data. Any other calls to that method maybe end up blocking for the result (maybe a loop that continuously checks the lock to see if it's free, and if so, return the cached value? or check the cache directly?)
<adam12>
The push model is definitely better here but if you have no control of the client then you're limited.
<kreantos_>
i was thinking of extending the dalli gem (memcache client) that it blocks the call if its already calculating it
<adam12>
kreantos_: Could look at Moneta and see if there is middleware already that supports this.
<kreantos_>
i will have a look
<kreantos_>
thank you all for the input! does this channel have a public log?
<adam12>
Actually I looked quick out of curiosity and don't see one.
<adam12>
kreantos_: Yeah. URL is in topic I think.
<thoraxe>
i'm getting a weird (and new) openssl error and i'm not sure how to troubleshoot it any further. it's related to a paypal gem: OpenSSL::SSL::SSLError: SSL_connect returned=1 errno=0 state=error: certificate verify failed (unable to get local issuer certificate)
<thoraxe>
the log message just before it appears to show a successful connection to paypal's sandbox API, and if I use net::http directly to talk to paypal's API, that also works
<thoraxe>
it also says "from /usr/local/lib/ruby/2.6.0/net/protocol.rb:44:in `connect_nonblock'"
<thoraxe>
both `ruby version` and `bundle exec ruby version` report ruby 2.6.6p146 (2020-03-31 revision 67876) [x86_64-linux]
<thoraxe>
so it's weird to me that that error message comes from 2.6.0
<thoraxe>
if I set `OpenSSL::SSL::VERIFY_PEER = OpenSSL::SSL::VERIFY_NONE` it works, but this obviously is not a solution. however it validates that something is weird in my ssl chain
orbyt_ has joined #ruby
factormystic has joined #ruby
alfiemax has joined #ruby
alfiemax has quit [Ping timeout: 265 seconds]
magickid_ has joined #ruby
magickid_ has quit [Read error: Connection reset by peer]
jenrzzz has joined #ruby
jenrzzz has quit [Ping timeout: 264 seconds]
rose_nd_ash has joined #ruby
<thoraxe>
for giggles i'm now trying with rvm installed 2.6.6 as opposed to the docker image 2.6.6
rose_nd_ash has quit [Ping timeout: 256 seconds]
<thoraxe>
same problem with 2.6.6
<thoraxe>
trying 2.7 via rvm also for giggles
<thoraxe>
so system ruby, rvm 2.6.6, rvm 2.7 all don't work with the same openssl error, and I have no idea what to do here
ur5us has joined #ruby
kristian_on_linu has joined #ruby
kristian_on_linu has quit [Remote host closed the connection]
drincruz has joined #ruby
magickid has joined #ruby
chalkmonster has quit [Quit: WeeChat 2.9]
fabio_ has quit [Quit: Leaving]
TCZ has joined #ruby
roadie has quit [Ping timeout: 272 seconds]
drincruz has quit [Ping timeout: 260 seconds]
alfiemax has joined #ruby
alexherbo2_ has quit [Ping timeout: 246 seconds]
alfiemax has quit [Remote host closed the connection]
alfiemax has joined #ruby
alexherbo2 has quit [Ping timeout: 240 seconds]
jenrzzz has joined #ruby
dualfade_ has joined #ruby
dualfade has quit [Ping timeout: 256 seconds]
alfiemax has quit [Ping timeout: 240 seconds]
schne1der has quit [Ping timeout: 240 seconds]
jenrzzz has quit [Ping timeout: 256 seconds]
gdonald has quit [Remote host closed the connection]
lxsameer has quit [Quit: WeeChat 2.8]
kristian_on_linu has joined #ruby
Secret-Fire has quit [Remote host closed the connection]
Secret-Fire has joined #ruby
sgen has joined #ruby
Guest47754 has joined #ruby
Guest47754 is now known as afrojun
afrojun has quit []
roadt has quit [Ping timeout: 246 seconds]
roadt has joined #ruby
jenrzzz has joined #ruby
TCZ has quit [Quit: Leaving]
roadie has joined #ruby
magickid has quit [Read error: Connection reset by peer]
<havenwood>
thoraxe: Does your distro have a ca-certificates package?