Hacker News new | ask | show | jobs
by johnklos 1354 days ago
@jhamby on Twitter is currently refactoring bash to c++, and it's really interesting to read anecdotes about it and read about the progress. It's a really interesting codebase.
3 comments

link to in-progress source?
why not rust?

(sorry, I had to)

Rust isn't quite portable enough yet. There are lots of small environments or specialized toolchains that are based on gcc that'll compile bash just fine, but once you require Rust, you're eliminating architectures like Alpha (which includes familial descendents like the Shenwei architecture in the Sunway TaihuLight), m68k, SuperH and others.

Rust is getting better, but they're not quite there yet.

c2rust https://github.com/immunant/c2rust :

> C2Rust helps you migrate C99-compliant code to Rust. The translator (or transpiler), c2rust transpile, produces unsafe Rust code that closely mirrors the input C code. The primary goal of the translator is to preserve functionality; test suites should continue to pass after translation.

crust https://github.com/NishanthSpShetty/crust :

> C/C++ to Rust transpiler

"CRustS: A Transpiler from Unsafe C to Safer Rust" (2022) https://scholar.google.com/scholar?q=related:WIDYx_PvgNoJ:sc...

rust-bindgen https://github.com/rust-lang/rust-bindgen/ :

Automatically generates Rust FFI bindings to C (and some C++) libraries

nushell/nushell looks like it has cool features and is written in rust.

awesome-rust > Applications > System Tools https://github.com/rust-unofficial/awesome-rust#system-tools

awesome-rust > Libraries > Command-line https://github.com/rust-unofficial/awesome-rust#command-line

rust-shell-script/rust_cmd_lib https://github.com/rust-shell-script/rust_cmd_lib :

> Common rust command-line macros and utilities, to write shell-script like tasks in a clean, natural and rusty way

hey thanks for this I didn't know it existed. I'm still kind of a rust noob and working my way through Rust in action and various examples.
FYI I wouldn't recommend browsing that guys feed. He has some strange posts on it.
FYI ... I probably never would have gone to look if not for your warning.

https://en.wikipedia.org/wiki/Streisand_effect

That doesn't apply. Streisand effect is for people who want to suppress something. I don't care if you look at that Twitter. I just know that I found it unpleasant, so was just putting a warning out for others.
His posts seem sane to me. The sheer volume of them is a bit weird though.
You would recommend against browsing his feed because some of his posts are "strange"?

Seems like an unnecessary callout.

Thanks for you opinion. Am I allowed to have one as well?
Recommending that other people avoid a certain page because it contains "strange posts" without further elaboration is definitely inviting the "unnecessary callout" remark.

As HackerNews is a discussion site, not your personal blog, some further elaboration on why you consider the guy's posts "strange" (and why you even consider "strange" being a bad thing in itself) would be in order.

You've been quite unspecific in expressing your opinion: how can we evaluate your suggestion of not browsing that guy's feed without actually browsing it to find out what "strange posts" means to you?
what if I find svnpenn strange for such an unspecified callout? Is that wrongthink if I'm unable to get svnpenn's approval?
yes
They are protected, did they just go now?