|
|
|
|
|
by rollcat
509 days ago
|
|
TBH depending on Python also isn't the best choice - it has become a huge and complex language, goes as far as optionally embedding another full language (Tcl, for Tkinter), all the async stuff, kitchen sink standard library, etc. I don't even know how much effort it would require to bootstrap. I would personally go with something like Lua - small, trivial to embed, multiple implementations to pick from, etc. It would fit exactly where the shell falls short. |
|
have you ever tried bootstrapping python? because it's really not a big deal (the only hard dependencies are a C compiler, libffi, and zlib, though distros also add libedit or readline, expat, sqlite, bzip2, xz, and openssl, all trivial dependencies present in more or less any system); tkinter is pretty much always compiled and packaged separately
meanwhile with lua you'd need many additional modules, and the templates would be verbose and far less readable
a non-exhaustive list of stuff python provides that would need to be provided separately:
1) subprocess management 2) path parsing (and normalization, manipulation, etc.) 3) various filesystem operations 4) shell command lexing 5) globs and fnmatch patterns 6) json 7) date/time handling 8) filesystem advisory locks 9) temporary file handling 10) http client (for sources fetching without external subprocess) 11) termios and ptys (for isolation of controlling terminal) 12) regex 13) hashing 14) topological graph sorting 15) cmdline argument parsing 16) readline functionality 17) thread/task pools
and so on and so on