havenwood changed the topic of #ruby to: Ruby 3.3.0, 3.2.3, 3.1.4 https://www.ruby-lang.org | Rules https://ruby-community.com | Logs https://libera.irclog.whitequark.org/ruby
<ewoud> yes, sounds like you're looking for bundler
<JordiGH> What's the "normal" thing to do?
<JordiGH> You're about to start a brand new shiny RoR project. What do you do?
<ewoud> maintain a Gemfile (which the rails generator will create for you) and then bundle install will create Gemfile.lock
jenrzzz has joined #ruby
jenrzzz has quit [Ping timeout: 264 seconds]
jenrzzz has joined #ruby
jenrzzz has quit [Ping timeout: 256 seconds]
rghiggi has joined #ruby
rghiggi has quit [Quit: Client closed]
jenrzzz has joined #ruby
jenrzzz has quit [Ping timeout: 272 seconds]
JordiGH has quit [Ping timeout: 240 seconds]
jenrzzz has joined #ruby
JordiGH has joined #ruby
bovis has left #ruby [#ruby]
Linux_Kerio has joined #ruby
<hwrd> what could be the cause for the difference between `real` and `total` time when doing `Benchmark.bm`?
Linux_Kerio has quit [Ping timeout: 264 seconds]
Linux_Kerio has joined #ruby
Linux_Kerio has quit [Read error: Connection reset by peer]
Linux_Kerio has joined #ruby
hightower3 has joined #ruby
hightower4 has quit [Ping timeout: 260 seconds]
cek has quit [Quit: Connection closed for inactivity]
JordiGH has quit [Remote host closed the connection]
Al2O3 has quit [Quit: Good mourning, good after nun, g'nite, and goober evenings.]
Al2O3 has joined #ruby
Al2O3 has quit [Changing host]
Al2O3 has joined #ruby
_ht has joined #ruby
grenierm has joined #ruby
ih8u has quit [Remote host closed the connection]
infinityfye has quit [Read error: Connection reset by peer]
Axenntio has joined #ruby
axsuul has quit [Quit: 👋]
axsuul has joined #ruby
hightower2 has joined #ruby
hightower3 has quit [Ping timeout: 255 seconds]
FetidToot has quit [Read error: Connection reset by peer]
FetidToot has joined #ruby
crespire has quit [Killed (NickServ (GHOST command used by crespire1))]
crespire1 has joined #ruby
nlxstq has joined #ruby
nlxstq has left #ruby [#ruby]
grenierm has quit [Ping timeout: 250 seconds]
wyclif has joined #ruby
trillion_exabyte has quit [Ping timeout: 246 seconds]
trillion_exabyte has joined #ruby
Obsdark has joined #ruby
Obsdark has quit [Changing host]
Obsdark has joined #ruby
osc4rpt has quit [Ping timeout: 246 seconds]
osc4rpt has joined #ruby
wyclif has quit [Ping timeout: 264 seconds]
rvalue has joined #ruby
c10l5 has quit [Ping timeout: 264 seconds]
eoli3n has quit [Remote host closed the connection]
eoli3n has joined #ruby
hightower2 has quit [Remote host closed the connection]
cek has joined #ruby
infernix has quit [Read error: Connection reset by peer]
Aminda has quit [Ping timeout: 260 seconds]
Aminda has joined #ruby
Linux_Kerio has quit [Ping timeout: 264 seconds]
Linux_Kerio has joined #ruby
donofrio__ has joined #ruby
infernix has joined #ruby
Fridtjof has quit [Quit: ZNC - http://znc.in]
<adam12> hwrd: OS/Kernel scheduling usually.
<adam12> (IIRC)
Fridtjof has joined #ruby
<hwrd> adam12: any reason it would be this large of a difference? https://gist.github.com/hahuang65/9db6e8ea35bcbd63c3725cfba8587532
<adam12> hwrd: Hard to say with just looking at that gist. Heavily loaded system? A lot of IO where the task is blocking and rescheduled later? etc.
<hwrd> shouldn't be loaded. it's my M2 Pro Macbook and I've shut everything off.
<gr33n7007h> hwrd: what you benchmarking with them sort of times?
<hwrd> gr33n7007h: a data transform job that basically crunches through an entire table. this run is just of 50k rows though, which is why it's alarmingly slow.
<gr33n7007h> yeah, crazy. one is like 9+ minutes =(
<hwrd> there's some contention somewhere. if I run 1000 rows, it's 3 seconds, which isn't fast but look at this benchmark
<hwrd> a: 0.489387 0.028311 0.517698 ( 3.239487)
<hwrd> why is it 3.2 seconds when the total runtime is half a second?
<gr33n7007h> hwrd: user = user space cpu time (e.g. program code) | system = kernel space cpu time (syscalls) | total = user + system | real = elapsed time (clock_monotic) executing the block of code
pgib has joined #ruby
<hwrd> gr33n7007h: right, but how can i troubleshoot why real is 6x total time here?
<adam12> hwrd: See if you can profile using something like rbspy.
<adam12> hwrd: or vernier.
<adam12> They both should be able to give you a flamegraph and you can see where you stand from there. I'm presuming that it's because the kernel has offloaded you for something IO related and the actual execution of your Ruby program was fairly short.
<hwrd> awesome, thank you. will check those out
razetime has joined #ruby
user71 has joined #ruby
the9ine has joined #ruby
Axenntio has quit [Quit: Axenntio]
Aminda has quit [Remote host closed the connection]
Aminda has joined #ruby
razetime has quit [Quit: Go back to your cringe 9 to 5. I'll be gaming.]
donofrio has quit [Quit: Leaving]
c10l5 has joined #ruby
c10l5 has quit [Remote host closed the connection]
c10l5 has joined #ruby
JordiGH has joined #ruby
the9ine has quit [Quit: Connection closed for inactivity]
osc4rpt has quit [Ping timeout: 252 seconds]
osc4rpt has joined #ruby
jenrzzz has quit [Ping timeout: 264 seconds]
jenrzzz has joined #ruby
aesthetikx has quit [Ping timeout: 256 seconds]
dviola has quit [Ping timeout: 260 seconds]
ghostbusters2 is now known as ghostbuster
milouse has joined #ruby
aesthetikx has joined #ruby
donofrio__ has quit [Ping timeout: 255 seconds]
donofrio_ has quit [Ping timeout: 264 seconds]
_ht has quit [Remote host closed the connection]
donofrio has joined #ruby
donofrio_ has joined #ruby
user71 has quit [Quit: Leaving]
<adam12> Tempted to stash a giant object into Rack's env to smuggle a few layers down but it feels just such a hack :|
user23 has joined #ruby
<weaksauc_> come to the dark side adam12
<adam12> LOL
<adam12> I'm trying to preserve the interface of `.call(env)` but it's getting in my way.
<[0x1eef]> IIRC Rack supports something like that. I think omniauth use it, and I've seen other objects hanging around there, usually namepsace 'foo.bar'.
<adam12> [0x1eef]: I've definitely dropped stuff on `env` but this one just feels dirty. I am not sure why.
<[0x1eef]> It looks like a pattern that's somewhat common.
<adam12> I'll check out what omniauth is doing.
<adam12> I feel like I want a new context object of some sort, but it breaks that interface so I am not sure.
<[0x1eef]> omniauth appear to store an instance of Omniauth::Strategy as @env['omniauth.strategy']. And only on some auth condition. It seems like an alright approach to me if you're doing that kind of thing.
<adam12> RequestContext = Data.define(:application, :request, :response, :session) style. What I want is to introduce the `application` here as a local since it's currently a global/singleton :|
<[0x1eef]> Same in Rails, right? Rails.application.
<adam12> Maybe I can use a delegator. I'll wrap the env hash with my own pieces.
<adam12> Yeah. But I don't like the Rails way :P
<[0x1eef]> I mean, it sounds nice to have isolated applications but there's probably more practical problems to solve.
<adam12> I've done a lot of work to isolate these. It's the last remaining piece, really.
<adam12> Which I can solve by smugging inside `env` but it just seems like the easy way out.
milouse has left #ruby [#ruby]
<adam12> Going to have to think on it some more.
Linux_Kerio has quit [Ping timeout: 260 seconds]
ftajhii has joined #ruby
milouse has joined #ruby
milouse has left #ruby [#ruby]
donofrio has quit [Ping timeout: 264 seconds]
ruby[bot] has quit [Remote host closed the connection]
ruby[bot] has joined #ruby
JordiGH has quit [Ping timeout: 246 seconds]
SunClonus has joined #ruby
SunClonus has quit [Client Quit]