3 ms·
"Claude please generate me a C compiler in bash" I mean, today it's possible to generate it in Tcl, Elisp, Windows BAT, Powershell. The effort is just 1 promp
by self_awareness 7mo ago
"Claude please generate me a C compiler in bash"
I mean, today it's possible to generate it in Tcl, Elisp, Windows BAT, Powershell.
The effort is just 1 prompt.
The WHY question is much more important today -- "because I can" no longer makes sense, because we all can do much, much more with minimum effort today than before LLMs.
- gaigalas 7mo agoHere's a prototype parser from 10 months ago, when this was not possible yet: https://gist.github.com/alganet/23df53c567b8a0bf959ecbc7b68997c0 https://gist.github.com/alganet/23df53c567b8a0bf959ecbc7b689... Here is me 10 years ago experimenting on parsing stuff with sed: https://gist.github.com/alganet/542f46865420529c9bd2 https://gist.github.com/alganet/542f46865420529c9bd2 --- Yes, c89cc.sh was definitely AI-assisted. However, I do carry extensive knowledge of the portable shell that was essential for the AI to complete it. You'll find tricks inside c89cc.sh that don't exist anywhere, except in other code from me (like the ksh93 fix for local dynamic scoping or the alias/macro read -n1 polyfill). The WHY is pretty obvious: I want to show that the portable shell is not a toy.
- self_awareness 7mo agoI didn't mean to imply that you're not capable doing it without LLM. I believe you. The point I'm trying to make is that the rest of us that don't know bash that well is capable of doing it as well. This is the new reality we all need to adapt to.
- fkoep 7mo ago>The WHY is pretty obvious: I want to show that the portable shell is not a toy. What does that mean? You sat down with the goal of showing that a decades old scripting environment can be used for large projects in production, with all its obscure hacks? I'd say it's more a novelty project made for the fun of it - and that's fine, it's a cool project. It would be pretty interesting to read a blog post about the making-of: How to write a compiler in portable shell, what parts could be automated and where LLM-coding fell short, what rare tricks were applied, etc...
- gaigalas 7mo agoMost people think shell is just bash, and portability is impossible. It is also common sense that shell scripts are just glue code, and it's impossible to do anything else with it. I think they're wrong. Never said one should use this to write large production programs though. The hacks I'm using are no different than JavaScript polyfills (set once, makes a feature more uniform). It's actually a clean design, the bulk of the program is POSIX shell.
- anthk 7mo agoLLM's can barely generate valid Subleq code.