Hacker News new | ask | show | jobs
by _callcc 3977 days ago
Felt the same about Go syntax. For scripting in C I've had some fun with tcc: "C script supported : just add '#!/usr/local/bin/tcc -run' at the first line of your C source, and execute it directly from the command line."[0]

[0] http://bellard.org/tcc/

1 comments

Thanks for the reference I'll look into it.. I haven't written C since I was a student but I kind of figured it would always be too low level to be a good choice for most shell utilities.

e.g. I want to just allocate a string to a variable, I don't want to worry about the length of the string in memory etc.

I looked briefly at stuff like Squirrel, but it seems largely abandoned these days, and as far as I can tell to compile it requires a C/C++ host app, you can't just compile a .nut file(s) to an executable, and as a scripting language obviously requires installing the Squirrel Shell runtime first.