jhass[m] changed the topic of #ruby to: Rules: https://ruby-community.com | Ruby 3.1.2, 3.0.4, 2.7.6: https://www.ruby-lang.org | Paste 4+ lines to: https://gist.github.com | Books: https://goo.gl/wpGhoQ
RickHull has quit [Ping timeout: 240 seconds]
pfharlock has quit [Remote host closed the connection]
pfharlock has joined #ruby
sylario has quit [Quit: Connection closed for inactivity]
<havenwood> But do just ask! IRC is async and folk won't know if they can answer until you ask and will answer in due time. :)
<havenwood> As they say, "don't ask to ask."
RickHull has joined #ruby
dionysus69 has quit [Ping timeout: 240 seconds]
ur5us has quit [Ping timeout: 240 seconds]
dynab has joined #ruby
Rounin has quit [Ping timeout: 240 seconds]
ur5us has joined #ruby
dynab has left #ruby [ERC (IRC client for Emacs 27.1)]
dynab has joined #ruby
dynab has quit [Read error: Connection reset by peer]
dynab has joined #ruby
RickHull has quit [Ping timeout: 240 seconds]
_whitelogger has joined #ruby
Ziyan has joined #ruby
<perrierjouet> hi all in emacs I get
<perrierjouet> starting emacs I get no such file or directory ~/.rbenv/version
Ziyan has quit [Ping timeout: 240 seconds]
<havenwood> perrierjouet: Is it in your $PATH?
<perrierjouet> havenwood: .rbenv/shims yes but not .rbenv/versions
<perrierjouet> I have in .zshrc eval "$(rbenv init - zsh)"
Ziyan has joined #ruby
mooff has quit [Remote host closed the connection]
Ziyan has quit [Read error: Connection reset by peer]
Ziyan has joined #ruby
mooff has joined #ruby
Ziyan has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
Ziyan has joined #ruby
polishdub has joined #ruby
Ziyan has quit [Ping timeout: 276 seconds]
Ziyan has joined #ruby
dviola has quit [Quit: WeeChat 3.5]
dviola has joined #ruby
_ht has joined #ruby
polishdub has quit [Remote host closed the connection]
ur5us has quit [Ping timeout: 240 seconds]
N_3Do has joined #ruby
N_3Do has quit [Ping timeout: 252 seconds]
protektwar has joined #ruby
protektwar has quit [Changing host]
protektwar has joined #ruby
Ziyan has quit [Ping timeout: 240 seconds]
Ziyan has joined #ruby
Pixi` has joined #ruby
teclator has joined #ruby
Pixi has quit [Ping timeout: 256 seconds]
Furai has quit [Quit: WeeChat 3.5]
Furai has joined #ruby
_ht has quit [Remote host closed the connection]
wand has quit [Ping timeout: 240 seconds]
wand has joined #ruby
dynab` has joined #ruby
dynab has quit [Ping timeout: 248 seconds]
Vonter has quit [Ping timeout: 246 seconds]
Vonter has joined #ruby
Rounin has joined #ruby
keyvan has quit [Quit: Connection closed for inactivity]
dynab` has quit [Ping timeout: 246 seconds]
dionysus69 has joined #ruby
ur5us has joined #ruby
ur5us_ has joined #ruby
ur5us has quit [Ping timeout: 240 seconds]
dionysus69 has quit [Ping timeout: 256 seconds]
<ox1eef> perrierjouet: does that file or directory exist? and is it, .rbenv/versions or .rbenv/version ? you mentioned both so far. are you also certain emacs is using zsh and not sh?
Starfoxxes has quit [Ping timeout: 260 seconds]
il has quit [Quit: tc]
Starfoxxes has joined #ruby
dionysus69 has joined #ruby
sam113101 has quit [Quit: WeeChat 3.4]
Starfoxxes has quit [Ping timeout: 248 seconds]
Starfoxxes has joined #ruby
Vonter has quit [Ping timeout: 256 seconds]
Vonter has joined #ruby
jpn has joined #ruby
roadie has joined #ruby
oxfuxxx has joined #ruby
oxfuxxx has quit [Ping timeout: 256 seconds]
oxfuxxx has joined #ruby
<perrierjouet> ox1eef: how to make emacs use zsh instead of sh ?
oxfuxxx has quit [Ping timeout: 246 seconds]
oxfuxxx has joined #ruby
oxfuxxx has quit [Ping timeout: 240 seconds]
oxfuxxx has joined #ruby
ur5us_ has quit [Remote host closed the connection]
Ziyan has quit [Quit: Textual IRC Client: www.textualapp.com]
ur5us_ has joined #ruby
<perrierjouet> nm
ur5us_ has quit [Ping timeout: 240 seconds]
oxfuxxx has quit [Ping timeout: 252 seconds]
Sankalp has quit [Read error: Connection reset by peer]
Sankalp has joined #ruby
oxfuxxx has joined #ruby
Tempesta has quit [Quit: See ya!]
mjacob has quit [Read error: Connection reset by peer]
mjacob has joined #ruby
oxfuxxx has quit [Ping timeout: 260 seconds]
oxfuxxx has joined #ruby
<oxfuxxx> Is it Mister DOOOONNNAALDDDD
jpn has quit [Ping timeout: 240 seconds]
Ziyan has joined #ruby
Tempesta has joined #ruby
jpn has joined #ruby
jpn has quit [Ping timeout: 248 seconds]
TomyWork has joined #ruby
jpn has joined #ruby
libsys has quit [Ping timeout: 246 seconds]
libsys has joined #ruby
jpn has quit [Ping timeout: 240 seconds]
Mikaela- has joined #ruby
jpn has joined #ruby
mdemo has quit [Quit: The Lounge - https://thelounge.github.io]
jpn has quit [Ping timeout: 256 seconds]
Ziyan has quit [Ping timeout: 240 seconds]
Ziyan has joined #ruby
sam113102 has joined #ruby
sam113102 has quit [Client Quit]
oxfuxxx has quit [Ping timeout: 252 seconds]
sam113102 has joined #ruby
jpn has joined #ruby
jpn has quit [Ping timeout: 240 seconds]
sam113102 has quit [Quit: WeeChat 3.4]
sam113102 has joined #ruby
sam113102 has quit [Remote host closed the connection]
sam113102 has joined #ruby
sam113102 has quit [Remote host closed the connection]
jpn has joined #ruby
roadie has quit [Ping timeout: 240 seconds]
Sankalp- has joined #ruby
Sankalp has quit [Ping timeout: 248 seconds]
Sankalp- is now known as Sankalp
roadie has joined #ruby
sam113102 has joined #ruby
John_Ivan has joined #ruby
sam113102 has quit [Ping timeout: 256 seconds]
roadie has quit [Ping timeout: 260 seconds]
howdoi has joined #ruby
roadie has joined #ruby
dionysus69 has quit [Remote host closed the connection]
dionysus69 has joined #ruby
bit4bit has joined #ruby
roadie has quit [Ping timeout: 240 seconds]
roadie has joined #ruby
gr33n7007h has joined #ruby
protektwar has quit [Ping timeout: 252 seconds]
jtdowney has quit [Quit: ZNC 1.8.2 - https://znc.in]
roadie has quit [Quit: ERC (IRC client for Emacs 25.3.50.1)]
Tempesta has quit [Ping timeout: 265 seconds]
Tempesta has joined #ruby
jpn has quit [Ping timeout: 260 seconds]
jpn has joined #ruby
sam113102 has joined #ruby
jtdowney has joined #ruby
sam113102 has quit [Quit: WeeChat 3.4]
bit4bit has quit [Ping timeout: 276 seconds]
dionysus69 has quit [Ping timeout: 276 seconds]
jazz has joined #ruby
___nick___ has joined #ruby
CrazyEddy has quit [Ping timeout: 240 seconds]
___nick___ has quit [Quit: https://quassel-irc.org - Chat comfortably. Anywhere.]
___nick___ has joined #ruby
mango_cake has joined #ruby
Ziyan has quit [Ping timeout: 240 seconds]
TomyWork has quit [Quit: Leaving]
Ziyan has joined #ruby
protektwar has joined #ruby
protektwar has quit [Changing host]
protektwar has joined #ruby
entropie has quit [Quit: ""]
entropie has joined #ruby
oxfuxxx has joined #ruby
oxfuxxx has quit [Ping timeout: 240 seconds]
oxfuxxx has joined #ruby
aesthetikx has quit [Ping timeout: 256 seconds]
oxfuxxx has quit [Ping timeout: 240 seconds]
emcb546 has joined #ruby
yxhuvud has quit [Quit: No Ping reply in 180 seconds.]
jpn has quit [Ping timeout: 256 seconds]
emcb54 has quit [Ping timeout: 256 seconds]
emcb546 is now known as emcb54
yxhuvud has joined #ruby
<caleb> how's everyone doing today?
Ziyan has quit [Ping timeout: 248 seconds]
jpn has joined #ruby
Ziyan has joined #ruby
<ox1eef> hello caleb - just fine, and you?
<caleb> I'm pretty good, thanks!
<caleb> channel seemed a little quiet, first time I've really looked at it since the move from freenode.
<caleb> and even then I mostly idled
emcb546 has joined #ruby
<caleb> just left my job at PBS to go to shopify, finally gonna get to do ruby professionally again
<caleb> missed that a lot
emcb54 has quit [Ping timeout: 240 seconds]
emcb546 is now known as emcb54
<ox1eef> that's great, congratulations. yeah, #ruby is largely quiet these days, still an odd burst of discussions but often replies can be 12 hours or more apart.
Ziyan has quit [Ping timeout: 246 seconds]
Ziyan has joined #ruby
jpn has quit [Ping timeout: 252 seconds]
<adam12> caleb: Congrats on the move.
jpn has joined #ruby
<adam12> It's funny how conversation ebbs and flows in here. Some days it's incredibly hopping, and others not a peep.
johnjaye has joined #ruby
<caleb> has there been any big community movements around adoption of steep/rbi vs sorbet?
<adam12> There's a "framework" that ships with RBI support. And some community gems (the Evil Martian ones) are adopting them as well. I still find some issues around Steep and features I use (like argument forwarding). I can never get a project fully typed because of it.
<adam12> This is the "framework" I mentioned: https://github.com/elsoul/souls
sam113102 has joined #ruby
sam113102 has quit [Client Quit]
sam113101 has joined #ruby
_ht has joined #ruby
dionysus69 has joined #ruby
<ox1eef> but ruby is a dynamic scripting language, aren't they're other languages better suited if you want a strong type system
<ox1eef> s/they're/there/g
sam113101 has quit [Client Quit]
<adam12> I think just having a better IDE experience would make people happy. I'm not sure people necessarily want Steep vs just having a great Solargraph experience.
<adam12> I'd agree in some ways. I'm not huge on auto-complete, but if I'm in some_object and I can't think of the method name, it would be nice to just auto-complete it out.
<adam12> I've said it before in this channel, but I just type my edges using Dry::Types/Dry::Schema. I normally don't care about types inside my app, only when I can't trust that I receive what I expect, and to ensure I sent what the other party expects. It works well.
<adam12> The whole "write less tests" seems bullshit because I care almost always that the code works correctly, not that it returns the expected type.
bit4bit has joined #ruby
<adam12> There are two great testing paradigms that have been of value lately. The first is James Shore's Nullable Infrastructure / Socialable tests. He has a video series on it (based on Javascript but you can see the overlap). The second is the Eventide's Project of the Doctrine of Usable Objects (and more specifically, Substitutable Objects). Both well
<adam12> worth checking out.
sam113101 has joined #ruby
<caleb> I live by thoughtbot's 4 phase testing https://thoughtbot.com/blog/four-phase-test
<caleb> doing that across several codebases for several years, once you cross the 80% coverage threshold, the number of production failures dropped off
<caleb> never wrote a test that checked for types ¯\_(ツ)_/¯
postmodern has joined #ruby
jpn_ has joined #ruby
___nick___ has quit [Ping timeout: 240 seconds]
_ht has quit [Remote host closed the connection]
jpn has quit [Ping timeout: 252 seconds]
donofrio_ has joined #ruby
donofrio has quit [Ping timeout: 276 seconds]
Ziyan has quit [Quit: Textual IRC Client: www.textualapp.com]
jpn_ has quit [Ping timeout: 276 seconds]
jpn has joined #ruby
Al2O3 has quit [Ping timeout: 256 seconds]
Al2O3 has joined #ruby
sam113101 has quit [Quit: WeeChat 3.4]
sam113101 has joined #ruby
FetidToot5 has joined #ruby
FetidToot has quit [Ping timeout: 240 seconds]
FetidToot has joined #ruby
FetidToot5 has quit [Ping timeout: 276 seconds]
<ox1eef> there are benefits to be had from a type system, but i think it imposes limits as well and ruby is not really a language of limits so it will be interesting to see how it plays out
jpn has quit [Quit: Lost terminal]
jpn has joined #ruby
jpn has quit [Client Quit]
FetidToot1 has joined #ruby
FetidToot has quit [Ping timeout: 276 seconds]
FetidToot has joined #ruby
FetidToot1 has quit [Ping timeout: 240 seconds]
ur5us_ has joined #ruby
FetidToot6 has joined #ruby
Sankalp has quit [Ping timeout: 256 seconds]
FetidToot has quit [Ping timeout: 240 seconds]
FetidToot6 is now known as FetidToot
dionysus69 has quit [Read error: Connection reset by peer]
dionysus70 has joined #ruby
dionysus70 is now known as dionysus69
FetidToot4 has joined #ruby
FetidToot has quit [Ping timeout: 276 seconds]
FetidToot has joined #ruby
FetidToot4 has quit [Ping timeout: 256 seconds]
teclator has quit [Remote host closed the connection]
FetidToot2 has joined #ruby
FetidToot has quit [Ping timeout: 256 seconds]
bogn has joined #ruby
FetidToot has joined #ruby
<bogn> Hi all, what would be the way to write a block and get the call-stack for a call in that block? I want to achieve this: `record_trace(file) { some_method }` so that every call made in some_method is written to a file.
FetidToot2 has quit [Ping timeout: 276 seconds]
<leftylink> if you asked me to write that, I would use TracePoint to do it
<ox1eef> bogn: https://0x1eef.github.io/x/trip.rb might help you, but built into ruby itself is set_trace_func and TracePoint, both of those should fit the bill, and TracePoint is recommended. The event you are interested in is probably b_call, and b_return for finding when the block is call, and returned from
<ox1eef> called*
<ox1eef> c_call, rb_call, c_return, rb_return can be used to find method calls and returns in that block.
FetidToot3 has joined #ruby
<bogn> I'll give trip.rb a try
<ox1eef> in that case, i will push a new gem because what the readme describes is not how the released version is, iirc
FetidToot has quit [Ping timeout: 276 seconds]
FetidToot3 is now known as FetidToot
<bogn> Successfully installed trip.rb-3.0.2
<ox1eef> that's old, i just pushed v4.0.0 but it seems to be taking a few to propagate
<ox1eef> gem info -r trip.rb shows v4.0.0 now
giorgian has quit [Read error: Connection reset by peer]
giorgian has joined #ruby
fercell has quit [Ping timeout: 256 seconds]
FetidToot5 has joined #ruby
FetidToot has quit [Ping timeout: 276 seconds]
FetidToot5 is now known as FetidToot
Sankalp has joined #ruby
<John_Ivan> would anyone happen to know if sinatra supports the return/response of a ruby list?
<John_Ivan> I get a NoMethodError.
<bogn> @ox1eef sort of works so far, my problem is that what's traced has a postgres transaction which now causes foreign key violations with this. I guess I will try manually using TracePoint.
<caleb> anyone ever played with Distributed ruby?
<caleb> it's part of the standard lib and yet I'd never heard of it before
<caleb> and I've definitely never seen it used in a production system
<adam12> caleb: Seems to have more of a life in Japan than here.
<adam12> caleb: There's a book on it too, if you're looking.
<caleb> oh yes, link me!
<caleb> I've built some make shift elixir equivalent supervisors and genservers for a project
<caleb> and was looking at finally giving up for elixir proper
<havenwood> caleb: I've played with it and use Rinda::TupleSpace from time to time.
<adam12> At one point I think it was used as part of the job queue at Twitter (ages ago; pre 2010). You'll often find it as the RPC mechanism for interacting with some Ruby daemons (Puma maybe via puma_ctl? Some of the old process managers like god/bluepill).
<havenwood> caleb: Have you watched the pirate game DRb talk?
<adam12> It had some annoying bugs until recently; jeremyevans squashed a few threading bugs a while ago.
<havenwood> caleb: https://youtu.be/IlGD8lAUMoA
<adam12> I think _why had an interesting talk at one of the old Rubyconf's where he'd let people druby:// to his machine and change the music playing, light colours, etc.
<caleb> is there anything jeremy doesn't do?
<caleb> man is prolific
<adam12> Definitely a Ruby superstar.
<caleb> > Some of the old process managers like god/bluepill).
<caleb> simpler times, god and capistrano
<adam12> Indeed. God watching over my Mongrels.
<adam12> Tho I've been code spelunking some old projects lately and I forgot how much Ruby was the wild west. It's definitely much better now.
<caleb> zed shaw and the mongrel/rails drama was 14 years ago
<caleb> damn
<ox1eef> ha wow, that's a throw back
sgt_chuckles has joined #ruby
<caleb> he posted it in 2008 when twitter was getting on their feet and my favorite line from that post was
<caleb> "I swear if someone says they’re starting a social network I’m gonna beat them with the heal of my shoe"
<ox1eef> drama is best avoided
<caleb> agreed
bit4bit has quit [Quit: Leaving]
dionysus69 has quit [Quit: dionysus69]
dionysus70 has joined #ruby
dionysus70 is now known as dionysus69
<ox1eef> John_Ivan: it sounds like you want to serialize your data, and that JSON would be a good fit.
<ox1eef> if i remember right, returning a string at the end of a route's block will send the string as the response body, so you could do: JSON.dump(obj)
<ox1eef> bogn: oh sorry, i missed that comment. sounds like an interesting case, if threads are involved that might be why - trip can only trace single-threaded code reliably.
niv has quit [Quit: Powered by LunarBNC: https://LunarBNC.net]
infernix has quit [Ping timeout: 240 seconds]
<bogn> no problem, got what I need now
Starfoxxes has quit [Ping timeout: 248 seconds]
<bogn> trace = TracePoint.new(:call, :b_call) do |tp|
<ox1eef> cool :)
Starfoxxes has joined #ruby
niv has joined #ruby
<ox1eef> and right, ruby call/return is just :call or :return rather than :rb_call, or :rb_return
emcb543 has joined #ruby
<John_Ivan> ox1eef, oh ok. thanks.
<ox1eef> no worries
<John_Ivan> ox1eef, I was under the assumption that sinatra had wrappers just like returning a string for arrays as well
<John_Ivan> I guess not.
emcb54 has quit [Ping timeout: 240 seconds]
emcb543 is now known as emcb54
<bogn> The actual reason I want to trace it is the complexity of things involved which make step-debugging a pain. There's tons of calls and transactions etc. involved. Even without all of the Rails or rspec calls its still 400 calls. Now I can diff two tracefiles why the second invocation is different.
<ox1eef> the response body can be whatever you want, in terms of format, json is probably most commonly agreed upon
<John_Ivan> ox1eef, that's what I thought until I got an error.
<ox1eef> bogn: nice
<ox1eef> John_Ivan: well, the only condition is that the response body ultimately has to be a string, and the consumer of the string has to know what it is and how to parse it