If you need a debugger from sed, aren't you now using the wrong tool for the job? We have lots of mature, debuggable languages to process text...
> We have lots of mature, debuggable languages to process text... You mean like sed? Sed was written in the 70s and has been in mission critical stuff for decades on many platforms. What are you recommending that is more mature than that?
Show HN: Desed – Debugger for Sed
11–20 of 23 posts
Re: Show HN: Desed – Debugger for Sed
#12Earlier quoted context omitted.
I'll add technical section to readme, but for short. I've used tui-rs[1] with crossterm[2] backend (which handles the actual terminal interaction). The docs may seem intimidating, but it's surprisingly easy to use. I've considered using curses, but tui-rs seemed that it will be easier to handle. I can certainly recommend it for making tui applications. I didn't actually use any documentation at all, it wasn't in the…
OK thanks, that's helpful! It looks like a lot of the newer terminal rendering library use "diff" style of rendering like web frameworks, rather than something more stateful like curses? Is that why you thought it would be easier? You just update the entire page on every action, and it takes care of the details of coming up with the minimal terminal codes? ---- This is only tangentially related, but for those interes…
Another reason, albeit really small, was that tui-rs was written specifically for rust, and curses framework I looked into were essentially just C bindings, making it a bit weird to use. To be fair, this disadvantage is by far outweighed by the fact that curses is far more popular than tui-rs, and there is so much more tutorials and documentation to be found about it.
But I wanted to focus on writing the debugger, so I went with what seemed to be more convenient option and paid the price of lower control and performance - for example I have troubles implementing syntax highlighting because tui-rs tries to be clever with mine ansi escape codes.
---
Thanks for the links, especially the ble.sh looks amazing.
Re: Show HN: Desed – Debugger for Sed
#13Hi, author here. I’ve written a debugger for sed in Rust. This was not only to learn rust, but to actually have a solid debugger for sed. I’ve started learning sed recently and decided to start writing various algorithms in it. And as sed doesn’t have numbers and can just filter/transform text, this is a challenge even for something like comparing two numbers. I’ve seen people do amazing things with it. I’d be glad f…
Re: Show HN: Desed – Debugger for Sed
#14If you need a debugger from sed, aren't you now using the wrong tool for the job? We have lots of mature, debuggable languages to process text...
Re: Show HN: Desed – Debugger for Sed
#15Earlier quoted context omitted.
> We have lots of mature, debuggable languages to process text... You mean like sed? Sed was written in the 70s and has been in mission critical stuff for decades on many platforms. What are you recommending that is more mature than that?
Sed does not have a debugger that is 50 years old. The author was not saying that sed is a bad tool; he's saying it doesn't have a debugger. If there is a desire to have a debugger for the tool, that has existed for 50 years without having one, perhaps the tool is not being used in the way it has been used for the last 50 years. This would seem to make the argument that the tool has been tried and tested less relevan…
Re: Show HN: Desed – Debugger for Sed
#16If you need a debugger from sed, aren't you now using the wrong tool for the job? We have lots of mature, debuggable languages to process text...
> We have lots of mature, debuggable languages to process text... You mean like sed? Sed was written in the 70s and has been in mission critical stuff for decades on many platforms. What are you recommending that is more mature than that?
The things I'm recommending that are more mature are Go, Python, D, Rust, or any other language that is more verbose and maintainable than regular expressions. Anything with a full debugger, IDE support, and useful error messages is a better choice.
Re: Show HN: Desed – Debugger for Sed
#17Hi, author here. I’ve written a debugger for sed in Rust. This was not only to learn rust, but to actually have a solid debugger for sed. I’ve started learning sed recently and decided to start writing various algorithms in it. And as sed doesn’t have numbers and can just filter/transform text, this is a challenge even for something like comparing two numbers. I’ve seen people do amazing things with it. I’d be glad f…
Re: Show HN: Desed – Debugger for Sed
#18Hi, author here. I’ve written a debugger for sed in Rust. This was not only to learn rust, but to actually have a solid debugger for sed. I’ve started learning sed recently and decided to start writing various algorithms in it. And as sed doesn’t have numbers and can just filter/transform text, this is a challenge even for something like comparing two numbers. I’ve seen people do amazing things with it. I’d be glad f…
I like the tui UI, what was it like mapping it layout in the terminal? I've always wanted to try building a CLI interface like that.
Re: Show HN: Desed – Debugger for Sed
#19Hi, author here. I’ve written a debugger for sed in Rust. This was not only to learn rust, but to actually have a solid debugger for sed. I’ve started learning sed recently and decided to start writing various algorithms in it. And as sed doesn’t have numbers and can just filter/transform text, this is a challenge even for something like comparing two numbers. I’ve seen people do amazing things with it. I’d be glad f…
I like the tui UI, what was it like mapping it layout in the terminal? I've always wanted to try building a CLI interface like that.
There are Rust and C++ bindings, and it performs some truly ridiculous TUI tricks.
Re: Show HN: Desed – Debugger for Sed
#20Earlier quoted context omitted.
> We have lots of mature, debuggable languages to process text... You mean like sed? Sed was written in the 70s and has been in mission critical stuff for decades on many platforms. What are you recommending that is more mature than that?
COBOL was written in the 60s and has been in mission critical stuff for decades. Neither of those factors means it's the right tool for the job now . The things I'm recommending that are more mature are Go, Python, D, Rust, or any other language that is more verbose and maintainable than regular expressions. Anything with a full debugger, IDE support, and useful error messages is a better choice.