Valentino Stoll

speaker
350 appearances 6 recordings 1 series first heard Sep 2024 last heard Oct 2024

Valentino Stoll’s voice in public audio — every appearance, attributed to the second.

Trend

recordings per month · last 12 months
No recordings in the last 12 months.Older appearances are listed below; set an alert to hear about the next one.

Appearances

newest first · ▶ plays the moment
Yeah, that's right. And I mean, the customization of the prompt, too, is just hugely helpful, especially when you have to jump context through many servers. So we have at Doximity a series of staging servers that are separate from development, right, so that we can add quality control and test out a lot of our changes. And then we have several production servers that are all different.
And it's nice to see them labeled so you know instantly, especially if you have a bunch of different terminal windows open that all have an IRB session in it. You don't want to get confused about... which one you're in. Right.
Yeah. And I mean, we don't all have access and it's certainly limited.
Sure. I know a couple. I mean, a lot of these are brand new, like in Rails 3. But there was just merged a pry-like ls command. So you can basically list all the methods on a particular object. as an example. I imagine the next step to that would be the cd command to pry, where you can basically move into the object.
And you can kind of already do that with IRB, because you can run IRB on any Ruby object and enter inside of the context of it. So if you make an instance of something and you IRB that instance, then you're in the context of the instance. And you could do the same with the class and pretty much any, you know, object in Ruby. How do you do that? How do you go inside the objects? Sure.
So when you're in the IRB console itself, you just run IRB and then the object. So if you did, you know, string new and you just said IRB string new, you can enter inside the instance of a string and play with all the methods. You don't have to do the string's object name as a variable and then dot whatever. You just enter the method.
So it's kind of a fun way to explore the object without having to run a bunch of chained methods.
Yeah, and I mean, another cool thing which Pry gives that maybe you just don't know about IRB is you get a lot of context from the source code just using the method method, right? So when you say, you know, method and then... colon some, the name of some method, it returns a special Ruby object that describes what the method is, what it does, the source location.
And you could pull all that information to open up a new, you know, i use vim as my command or as my editor so i i often well i'll have a special you know method in my irbrc that allows me to open a vim you know editor with whatever the source location is for the method that i'm interested in in the context of an irb session so it ends up you know being a You can open up any editor.
It can be, it doesn't have to be Vim. Yeah. Right. But no, that makes sense. That, that sounds really handy.
I don't know if anybody else has looked in, and not to plug Pry again, but there's actually a project called Ruby Jard that combines Pry with Bybug, and it's pretty incredible. You basically can do just like you can binding the IRB in your source code or pry in your source code. You can do a jarred in your source code.
And when it stops the execution, it has this really beautiful kind of split pane debugging session. where it shows you the current line in context, but also shows you some lower level definitions within that context. And it's pretty wild. I definitely recommend people check that out. I've been using that on a couple projects as well.
But IRB is still my go-to for just testing out random Ruby files.
Yeah, that's really great.
Sure. Yeah. Let's see from, from pry itself. I'm not sure. I do know that IRB itself has introduced some tracing mechanisms and measure utility to make it easy to trace the execution of specific method calls while you're going through, as well as processing time.
So I actually do that for a lot of just quick performance testing of, will this array method lookup work faster than this one in this context? You know, just turn on the measuring processor and just check how fast it runs with each case.
Yeah, I believe so.
Yeah, and it's line-by-line measuring, too. So whatever you enter, every single thing will show you the processing time for it, which is really nice.
That's actually in 2.7. So if you're already on 2.7, you should have colors.
Okay. But one other thing I will note, at least with Ruby 3, actually it's 2.7, was the inline documentation. So if you just double tab while you're on a particular method name, it'll give you the documentation and the context, kind of like a man page. Oh, nice. And it does that through our docs.
Showing 261–280 of 350 · page 14 of 18 ← Previous Next →