3 ms·
to make this great tool truly universal, it has to be written in c instead of python these days, then provide python|javascript|etc bindings if possible. I'd l
by synergy20 4y ago
to make this great tool truly universal, it has to be written in c instead of python these days, then provide python|javascript|etc bindings if possible.
I'd like to use it on embedded systems, where python is too large to fit. this tool can be widely deployed just like awk|sed|etc but it has to be in C for that.
- makapuf 4y agoAgreed but I would change it with "any compiled language that has no external runtime" and common shared libs dependencies. I don't care that a utility is written in Go, Zig, C++ or Pascal ;)
- kbrazil 4y ago`jc` is available today as a compiled binary with all dependencies self-contained. The binaries and OS package installers are available under the GitHub Releases: https://github.com/kellyjonbrazil/jc/releases https://github.com/kellyjonbrazil/jc/releases This is still python under the hood and not as small of a binary as I would like, but it does work.
- montroser 4y agoI would welcome POSIX shell or at least bash as an alternative to a compiled C/Rust/Go binary. But yeah, for these types of utilities, relying on an external language runtime like Python/Node is pretty rough.
- ElectricalUnion 4y agoBut python is also universal? You can just bundle jc inside https://github.com/jart/cosmopolitan/tree/master/third_party/python https://github.com/jart/cosmopolitan/tree/master/third_party... and it's as universal as it gets.
- bitwize 4y agoReplace C with Rust.
- synergy20 4y agoon embedded rust is still much larger than c because rust links its stdlib statically.
- bitwize 4y agoThere is such a thing as no-stdlib Rust deployments.
- synergy20 4y agowhich is for MCUs only and is like a bare metal language without any libraries, its use is very limited. all I need is that rust's stdlib can be linked dynamically just like c/c++/java/whatever, if that happens I'm ready to switch to it.
- maxbond 4y agoIt seems like you have multiple binaries (otherwise, I don't see how you would save space) in a context without an operating system, but do have abstractions like a linker; throwing this out there, you may be able to sort of fake having dynamically linked binaries with transparent disk compression. The shared code gets compressed, and you trade the overhead of your linker for the overhead of your compression, and probably roughly break even.
- synergy20 4y agonope,not even close,the final size of a few binaries is at least 10x larger
- maxbond 4y agoSeems to me like anywhere Python is too bulky to work, a layer serializing and deserializing JSON at every pipeline step is likely to exhaust your memory too.