jdeen has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
blackmesa has joined #ruby
blackmesa1 has joined #ruby
crankharder has joined #ruby
TCZ is now known as Hayato
Hayato is now known as TCZ
blackmesa has quit [Ping timeout: 260 seconds]
drincruz_ has joined #ruby
<jhass>
?crosspost
<ruby[bot]>
Please do not crosspost without at least telling so and mentioning provided suggestions and their outcome in all channels. Experience shows that people don't do either, and not doing so is considered rude.
akem has quit [Ping timeout: 264 seconds]
<njstewart>
Am guessing that's at me. Fair enough. It's my first time on these channels. My post above is also on #RubyOnRails. Thanks!
bkuhlmann has joined #ruby
lucasb has joined #ruby
roshanavand has joined #ruby
crankharder has quit [Ping timeout: 240 seconds]
al2o3-cr has quit [Ping timeout: 256 seconds]
al2o3-cr has joined #ruby
al2o3-cr has quit [Client Quit]
jdeen has joined #ruby
al2o3-cr has joined #ruby
njstewart has quit [Remote host closed the connection]
drincruz_ has quit [Ping timeout: 256 seconds]
TCZ has quit [Quit: Diabe? tkwi w szczegó?ach]
helpa has quit [Remote host closed the connection]
helpa has joined #ruby
jenrzzz has joined #ruby
_aeris has joined #ruby
BH23 has joined #ruby
vondruch has quit [Ping timeout: 256 seconds]
jenrzzz has quit [Ping timeout: 256 seconds]
blackmesa1 has quit [Quit: WeeChat 3.0]
blackmesa has joined #ruby
rubydoc has quit [Ping timeout: 260 seconds]
phaul has quit [Ping timeout: 260 seconds]
phaul has joined #ruby
crankharder has joined #ruby
drincruz_ has joined #ruby
phaul has quit [Ping timeout: 256 seconds]
AndyC has joined #ruby
TCZ has joined #ruby
rubydoc has joined #ruby
vondruch has joined #ruby
phaul has joined #ruby
TCZ is now known as toxic_worm
dionysus69 has joined #ruby
vondruch has quit [Quit: vondruch]
vondruch has joined #ruby
drincruz_ has quit [Ping timeout: 256 seconds]
akem has joined #ruby
cloud69 has quit [Quit: Connection closed for inactivity]
dviola has quit [Ping timeout: 256 seconds]
Garb0 has joined #ruby
dionysus69 has quit [Ping timeout: 246 seconds]
<Garb0>
Hey, really question how do you get resolv to resolve local IPs?
<jhass>
iirc you cant't unless you got a local stub resolver running
<jhass>
like dnsmasq or systemd-resolved
<Garb0>
hm. bummer. i guess i'll have to edit local IPs out of my regex
<jhass>
I mean I took your question as resolving local hostnames to local IPs
drincruz_ has joined #ruby
<jhass>
"resolving an IP" doesn't make a whole lot of sense
<Garb0>
jhass, crap, i'm drunk, i meant get names from IPs
<Garb0>
as in hostnames
<jhass>
okay, I'm not aware of libnss doing that, so that'd always be your local network's resolver providing that
<jhass>
what are you trying and how does it work outside ruby?
<jhass>
.. for your setup
crankharder has quit [Ping timeout: 256 seconds]
<Garb0>
jhass, i figured it out lol, just regex'd out local IPs, thanks for the help
<pienkowb>
Hi folks! If you tend to use a lot of timestamp fields in your ActiveRecord models, you can check out a gem I recently released called active_record-events: https://github.com/pienkowb/active_record-events
<havenwood>
pienkowb: Nifty!
<havenwood>
It almost feels like a state machine, but simpler to use and tailored to a common need.
duderonomy has quit [Ping timeout: 264 seconds]
roshanavand has quit [Ping timeout: 240 seconds]
carbone5 has joined #ruby
<pienkowb>
havenwood: Thanks! Yes, exactly. I see it as middle ground between a boolean flag and a full-blown state machine.
dfucci has quit [Ping timeout: 240 seconds]
aremaref has joined #ruby
rubydoc has quit [Remote host closed the connection]
rubydoc has joined #ruby
phaul has quit [Ping timeout: 240 seconds]
junaidnaseer2 has joined #ruby
phaul has joined #ruby
Mrbuck has quit [Ping timeout: 240 seconds]
mcr has quit [Ping timeout: 240 seconds]
AndyC has joined #ruby
cow[moo] has quit [Read error: Connection reset by peer]
r29v has joined #ruby
dfucci has joined #ruby
mcr has joined #ruby
rubydoc has quit [Ping timeout: 260 seconds]
aremaref has quit [Ping timeout: 240 seconds]
phaul has quit [Ping timeout: 240 seconds]
AndyC has quit [Remote host closed the connection]
<adam12>
pienkowb: Interesting! I can see where this would be useful.
AndyC has joined #ruby
cliluw has quit [Read error: Connection reset by peer]
aremaref has joined #ruby
dviola has left #ruby ["WeeChat 2.9"]
orbyt_ has joined #ruby
blackmesa has joined #ruby
<pienkowb>
adam12: Thanks! I hope you'll benefit from using it.
<adam12>
pienkowb: I don't use ActiveRecord but I could see it maybe being useful for Sequel, so I'd have to port it.
<pienkowb>
adam12: I think it's a great idea
dviola has joined #ruby
weaksauce has joined #ruby
rubydoc has joined #ruby
phaul has joined #ruby
carbone5 has quit [Quit: carbone5]
rubydoc has quit [Remote host closed the connection]
rubydoc has joined #ruby
phaul has quit [Ping timeout: 260 seconds]
phaul has joined #ruby
phaul has quit [Remote host closed the connection]
phaul has joined #ruby
AndyC has quit [Ping timeout: 256 seconds]
phaul has quit [Remote host closed the connection]
phaul has joined #ruby
pienkowb has quit [Remote host closed the connection]
<havenwood>
al2o3-cr: It's like a mini-ruby-install but macOS specific and only nightly dev builds.
<havenwood>
I should update it to remove the hardcoded jemalloc. I think I did that in my non-gist version.
dionysus69 has quit [Ping timeout: 246 seconds]
<havenwood>
I do like a with jemalloc default though.
<al2o3-cr>
havenwood: ah, nice!
<al2o3-cr>
yeah, i should of added --with-jemalloc
vondruch has joined #ruby
rubydoc has quit [Ping timeout: 246 seconds]
<al2o3-cr>
might create a little script like yours.
phaul has quit [Ping timeout: 240 seconds]
BSaboia has quit [Quit: This computer has gone to sleep]
BSaboia has joined #ruby
ignorand has joined #ruby
<ignorand>
How can I better understand what the 'render' command in the controller does?
<ignorand>
render json: @posts displays the posts as json code. But what are the functions and what are the arguments?
<ignorand>
it looks to be the same as render(json: @posts)
<leftylink>
that is true
phaul has joined #ruby
rubydoc has joined #ruby
aremaref has joined #ruby
phaul has quit [Ping timeout: 264 seconds]
rubydoc has quit [Ping timeout: 264 seconds]
phaul has joined #ruby
rubydoc has joined #ruby
TCZ is now known as toxic_worm
junaidnaseer2 has quit [Read error: Connection reset by peer]
rubydoc has quit [Ping timeout: 256 seconds]
phaul has quit [Ping timeout: 264 seconds]
rubydoc has joined #ruby
phaul has joined #ruby
zacts has quit [Ping timeout: 264 seconds]
m27frogy has joined #ruby
bambanx has quit [Ping timeout: 256 seconds]
roshanavand has joined #ruby
bambanx has joined #ruby
zacts has joined #ruby
bambanx has quit [Remote host closed the connection]
rubydoc has quit [Ping timeout: 260 seconds]
phaul has quit [Ping timeout: 240 seconds]
bambanx has joined #ruby
bambanx has quit [Remote host closed the connection]
bambanx has joined #ruby
BH23 has quit [Quit: Connection closed for inactivity]
zacts has quit [Quit: leaving]
ignorand has quit [Remote host closed the connection]
roshanavand has quit [Ping timeout: 264 seconds]
roshanavand has joined #ruby
rubydoc has joined #ruby
roshanavand has quit [Ping timeout: 272 seconds]
rubydoc has quit [Ping timeout: 240 seconds]
bambanx has quit [Remote host closed the connection]
bambanx has joined #ruby
cthu| has quit [Read error: Connection reset by peer]
cthu| has joined #ruby
bambanx_ has joined #ruby
toxic_worm has quit [Remote host closed the connection]
bambanx_ has quit [Client Quit]
dviola has quit [Ping timeout: 272 seconds]
crankharder has quit [Quit: leaving]
dviola has joined #ruby
dviola has left #ruby [#ruby]
bambanx_ has joined #ruby
akem has quit [Ping timeout: 246 seconds]
bambanx_ has quit [Client Quit]
bambanx has quit [Quit: Leaving]
bambanx has joined #ruby
akem has joined #ruby
TCZ has joined #ruby
blackmesa has quit [Ping timeout: 256 seconds]
AndyC has joined #ruby
roshanavand has joined #ruby
rubydoc has joined #ruby
ruby[bot] has quit [Remote host closed the connection]
ruby[bot] has joined #ruby
rubydoc has quit [Excess Flood]
rubydoc has joined #ruby
Nowaker has joined #ruby
<Nowaker>
How do I pass all arguments from one method to another method, pre-Ruby 2.7? For example, bleh(1, 2, 3, val4: 4, val5: 5), then how do I write my def bleh to execute something(1, 2, 3, val4: 4, val5: 5) dynamically? I tried def bleh *args, and something(*args) and I think it doesn't pass the kwargs. I tried def bleh *args, **kwargs and something(*args, **kwargs) and it didn't seem to work either.
rubydoc has quit [Ping timeout: 272 seconds]
<leftylink>
huh, the *args **kwargs one is what I would have tried. now you are making me curious about how this is supposed to be done...
<Nowaker>
yeah... my knowledge around splat and double splat has always been murky. I tried one way, and if it didn't work, I tried another way, until it worked. But can't get it to work this time lol
<leftylink>
give an example of it not working, maybe that will at least get the ball rolling and let me know what I shouldn't try to do
<Nowaker>
ok, writing down to a pastie, one moment
<Nowaker>
leftylink: regarding what you typed in the channel, yeah, it looks exactly like what I have in my pastie, and it doesn't seem to work, at least with Rack::Attack... i wonder why
dfucci has quit [Quit: Lost terminal]
<leftylink>
could it have anything at all to do with the fact that previously, throttle was called with a block? there's the do |req| bit, you see
<leftylink>
in which case, &blk after **kwargs in both locations to pass the block
<Nowaker>
aaaaah
<Nowaker>
forgot about the block!
<Nowaker>
will pass the &block!
<Nowaker>
thanks!
<leftylink>
👍
<Nowaker>
i focused too much on kwargs which I barely ever passed therefore assumed it's where the problem is
<Nowaker>
and it was the &block i forgot about
<Nowaker>
thanks again
rubydoc has joined #ruby
phaul has joined #ruby
Guest13 has quit [Quit: Idle time exceeded]
BSaboia has quit [Quit: This computer has gone to sleep]
ignorand_ has joined #ruby
akem_ has joined #ruby
<ignorand_>
I am trying to parse a jsonapi page. sort seems to be a parameter, and it can be split on ',', and a '-' in front indicates descending.
ignorand_ is now known as ignorand
dviola has joined #ruby
BSaboia has joined #ruby
<ignorand>
so 'name, last_name, -day_of_birth' would need to be transformed into .order(name: :asc, last_name: :asc, day_of_birth: :desc)