Menu
Sign In Search Podcasts Charts People & Topics Add Podcast API Pricing

Rain Paharia

👤 Person
138 total appearances

Appearances Over Time

Podcast Appearances

Oxide and Friends
Crates We Love

Yeah. Is there anything like that? So I spent, it's funny because after we talked about it last time, I ended up spending a little while looking at it. And there are a bunch of great libraries and actually some of them that I wanted to talk about here. There wasn't quite anything that I noticed kind of hit that exact spot.

Oxide and Friends
Crates We Love

Yeah. Is there anything like that? So I spent, it's funny because after we talked about it last time, I ended up spending a little while looking at it. And there are a bunch of great libraries and actually some of them that I wanted to talk about here. There wasn't quite anything that I noticed kind of hit that exact spot.

Oxide and Friends
Crates We Love

And partly because I think one of the things that kind of becomes challenging is that you're If you want to do good error handling, and this kind of goes into the cosmic balance thing that you were talking about, Brian, if you want to do good error handling, often you can no longer use good type system things.

Oxide and Friends
Crates We Love

And partly because I think one of the things that kind of becomes challenging is that you're If you want to do good error handling, and this kind of goes into the cosmic balance thing that you were talking about, Brian, if you want to do good error handling, often you can no longer use good type system things.

Oxide and Friends
Crates We Love

So as an example, one of the ways you might model something in Rust is with a result of the OK value or the error value, right? But if you want to like collect errors, then often something you will do is you'll pass in like an ampersand mute error collector or something like that. And the value that you returned like is an option.

Oxide and Friends
Crates We Love

So as an example, one of the ways you might model something in Rust is with a result of the OK value or the error value, right? But if you want to like collect errors, then often something you will do is you'll pass in like an ampersand mute error collector or something like that. And the value that you returned like is an option.

Oxide and Friends
Crates We Love

And now you have to know that if, you know, there's kind of this implicit invariant here that if there is an option, then that means that you had at least one error go in and so on. A crate that I did actually want to call out, though, and something that doesn't quite solve this specific problem, even though I wish it would, is Miette. So Miette is a really, really cool crate.

Oxide and Friends
Crates We Love

And now you have to know that if, you know, there's kind of this implicit invariant here that if there is an option, then that means that you had at least one error go in and so on. A crate that I did actually want to call out, though, and something that doesn't quite solve this specific problem, even though I wish it would, is Miette. So Miette is a really, really cool crate.

Oxide and Friends
Crates We Love

It is kind of... So if you're familiar with Rust and, of course, DTolney's crateverse, you'll have come across this error and Anyhow, right? Miat is kind of a combination of this error and Anyhow, and it kind of meets both of those things. But another crate that it actually meets is Codespan. So,

Oxide and Friends
Crates We Love

It is kind of... So if you're familiar with Rust and, of course, DTolney's crateverse, you'll have come across this error and Anyhow, right? Miat is kind of a combination of this error and Anyhow, and it kind of meets both of those things. But another crate that it actually meets is Codespan. So,

Oxide and Friends
Crates We Love

If you're familiar, one of the things that's really interesting about Rust is that Rust C has great error messages. And I think that's one of the reasons that all of us feel pretty good about Rust, right? Is that fair to say?

Oxide and Friends
Crates We Love

If you're familiar, one of the things that's really interesting about Rust is that Rust C has great error messages. And I think that's one of the reasons that all of us feel pretty good about Rust, right? Is that fair to say?

Oxide and Friends
Crates We Love

And with the error messages, I think one of the things that's really nice is there's this lovely syntax highlighting where it'll show you the exact things that were wrong and it will give you a suggestion of what to do instead and all of those things. Amazing. Yeah, it's so good. And so there's actually a few crates that do that.

Oxide and Friends
Crates We Love

And with the error messages, I think one of the things that's really nice is there's this lovely syntax highlighting where it'll show you the exact things that were wrong and it will give you a suggestion of what to do instead and all of those things. Amazing. Yeah, it's so good. And so there's actually a few crates that do that.

Oxide and Friends
Crates We Love

So the Rust C's own error thing is extracted out into a crate that I don't remember the name of off the top of my head. Then there's another crate called ColdSpan, but Miette also captures all of that. And Miette actually, one of the things it can do is it can store a list of errors.

Oxide and Friends
Crates We Love

So the Rust C's own error thing is extracted out into a crate that I don't remember the name of off the top of my head. Then there's another crate called ColdSpan, but Miette also captures all of that. And Miette actually, one of the things it can do is it can store a list of errors.

Oxide and Friends
Crates We Love

So what you can do is, and I have used this pattern in some places, is that you actually store a list of errors and then you have Miette report that with, so you can provide the source code that those errors associated with and the byte offset. And so you kind of provide that source code and then Viet will kind of render that in a nice way.

Oxide and Friends
Crates We Love

So what you can do is, and I have used this pattern in some places, is that you actually store a list of errors and then you have Miette report that with, so you can provide the source code that those errors associated with and the byte offset. And so you kind of provide that source code and then Viet will kind of render that in a nice way.

Oxide and Friends
Crates We Love

So it's, I think that kind of style of like high quality error reporting is actually something that is really, really cool about Rust. And I don't know if there's any other ecosystem that has paid this much attention to like how your error messages look, right? Rather than just reporting like your line number or whatever.

Oxide and Friends
Crates We Love

So it's, I think that kind of style of like high quality error reporting is actually something that is really, really cool about Rust. And I don't know if there's any other ecosystem that has paid this much attention to like how your error messages look, right? Rather than just reporting like your line number or whatever.

← Previous Page 1 of 7 Next →