4 ms·
I actually tried rewriting this in Python, but gave up since Python's startup latency is atrocious if you have even a few imports (and using a socket to a pre-e
by o11c 1y ago
I actually tried rewriting this in Python, but gave up since Python's startup latency is atrocious if you have even a few imports (and using a socket to a pre-existing server is fundamentally unable to preserve enough process context related to the terminal). Perl would probably be a better fit but it's $CURRENTYEAR and I've managed to avoid learning Perl every year so far, and I don't want to break my streak just for this.
The Bash code is not only fast but pretty easy to understand (other than perhaps the header, which I never have to change).
- Fire-Dragon-DoL 1y agoMaybe try ruby, or you could use go (yeah, have to compile)
- dataflow 1y agoPHP maybe? Or in limited cases, AWK? But I'd definitely learn Perl, it's a gem.
- oguz-ismail 1y agoPHP needs to be installed, Perl is dead and AWK is more limited than Bash
- ZYbCRq22HbJ2y7 1y ago> PHP needs to be installed There are some ways around this: https://github.com/crazywhalecc/static-php-cli https://github.com/crazywhalecc/static-php-cli
- macintux 1y agoFor what little it’s worth, Perl is very much not dead.