Spyke

Replies

Comment on

Software is slow because of bad design, not slow languages

Reply in thread

Filesize doesn’t matter, if the functionality is missing.

Lua is meant to be embedded into other applications, not meant to be used on its own.

Wrong. Lua is meant to be used on its own, because it's so freaking good. It provides everything one needs to begin, while allowing for a wide array of libraries to be made. But I know you haven't made any serious number of scripts in either language, simply because you claim 'filesize doesn't matter', while Lua is so fast partly because of its size.

This is a design choice, because Lua isn’t meant to be used by its own.

Wrong again. Lua is amazing on its own, but third-party libraries make it even better.

Comment on

Software is slow because of bad design, not slow languages

Reply in thread

Oh really? Well guess what, that's a huge benefit for Lua because its entire total size is around 500 KB. It's loaded into memory and executed start to finish faster than you blink. If you need a ‘standard library’, just use Penlight. As I already mentioned, vast majority of libraries for Lua are written in... Lua itself, because it's so goddamn fast. I'm using Fennel, the Lua Lisp that's transcribed on-the-fly, and it's still faster than Python. Lua is great for interactive tasks like desktop automation, e.g. with Alfred, Hammerspoon (which latter uses Lua throughout), or for scripting in Termux on the phone where Python would kill the memory immediately.

Lua's problems with the absence of popular libraries aren't because of any language issues (even the lack of null can be dealt with), but solely due to its non-adoption in the masses. It is very popular as an embedded language in gaming, though, and that's not a coincidence, because it fits that niche precisely because of its small size and extraordinary speed.

Comment on

Software is slow because of bad design, not slow languages

Reply in thread

It is, yes. But I also commented on Lua vs Python, and if you even try to time them, Lua scripts will be finished before Python starts up. Lua is so fast that people mostly don't bother making libs for it in C, the fucking interpreter is quick enough for folks to skip any kind of compiling and just write libraries in the interpreted language. Oh, didn't I mention? The startup thing is with the interpreter, without any kind of bytescript, JIT and such.

In the same vein, the K and Q languages and the KDB+ database by Arthur Whitney are so goddamn fast at array processing that they're used in banking for decades despite their extremely inscrutable syntax that would shear any Python programmer's head clean off. They just stay in the cache at most times. And they are also interpreted, not compiled at any time.

Python suffers from the same shit as Java, it has to initialize hundreds of objects before the main program even starts, and then it creates hundreds more. Neither Lua nor JavaScript do that. PHP does to some extent, but the fucker is so fast that it can recreate the entire runtime context on every single request and then drop all of it afterwards, and it's still quicker than Python.

adhd

Comment on

It’s twice as fun when you have both

Reply in thread

It's perfect when you know the application inside and out. A completely different story when you get dropped into a project that uses sixteen frameworks and libraries, including widely employed features that are barely documented. You get to do guesswork on whether this pattern is recognised by that library, while your system is constantly swapping under the weight of dozens of browser tabs with the docs and StackOverflows.

Comment on

Software is slow because of bad design, not slow languages

Reply in thread

It wasn't my project. Afaict it's a standard pytest setup with the Litestar framework (unused in my tests) and an in-memory mock Postgre transaction with like five records per test, so choose for yourself which part of this is 'catastrophically wrong'. However, I can indeed agree that most of it is trash.

Same approach with dozens upon dozens of tests worked snappily as heck in PHP, haven't yet tried it with my beloved Lua.