News for hackers. Stuff that matters.

Jdstanhope

This is exactly the case for "porting" Bash to Rust. There is a huge amount of existing tests that can be leverage and when in doubt you can run the same code in bash and Huck and compare the result and then fix the issue.
As few people have mentioned you have to guide the AI to clean up stuff, it doesn't seem to choose that on its own. If prompted it can come up with a lot of things to clean up.
Please check out the code and let me know what you think. I have driven a few large refactorings that I don't think Claude would have done on its own. The two big ones were related to handling tokenization and parsing (Claude's original code had circular dependencies and would scan forward in the lever instead of using the parser to determine structure) and the second was for using subshells for command substitution instead of inline and having dual FD and buffer handling.
I was going to say that it's pretty much exactly like working with an experienced software engineer ... except it never seems to take a step back and look at the bigger picture. It will happily fix the same class of bugs over and over without realizing a bigger change is required.
I have been using Claude to build a clone of Bash in Rust (https://github.com/jdstanhope/huck). It has been goin going on now for 81 days, 2600 commits and I have covered a good chunk of the features such that I can source by .bashrc with a number of extensions. It has been doing pretty good but it will sometimes spend hours to do few line fix and other times pushback on making big changes despite have over 3000 tests.

That being said, I am still guiding it on a regular basis and only recently let it run open ended trying fixing small to medium size bugs. The next stage will be try let it run in a loop trying to fix the 100 issues it has identified as well as getting most of the bash test suite to pass.

Re:Ask HN: What are you working on? (May 2026) on Monday May 11, 2026 @12:38PM (#48097303)
Working on analyticmind.io to help small teams with the decision making process. I feel like I've lived through a few too many decisions that didn't make sense to me or the rest of the organization.
Re:Welcome to Gas Town on Monday January 05, 2026 @10:08PM (#46508307)
Is there an example of something built with this other than itself?
Re:Always Look *Down* in London: Pavement Oddities on Saturday January 14, 2023 @02:54PM (#34383535)
Don't forget to look for the pieces of gum that have been painted everywhere. https://theculturetrip.com/europe/united-kingdom/england/lon....