Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

It's hyper-optimized, small, and can be multithreaded or multiplexed trivially, but that's true of lua as well. The array thing gives it a leg up in speed as well, as does 0-indexing. Finally, its gc algorithm doesn't have cpu bursts (it's not "stop the world"). I don't know of Lua has this feature, but it makes the language ideal for real-time applications. Like games.


In short, Squirrel is small, nimble and has features that are pretty nuts. Looking for something else? You're barking up the wrong tree.


Puns like these make my day.


You should visit Reddit front page more often


perhaps I should


Is it actually faster though?

https://github.com/r-lyeh/scriptorium

Perhaps these results are due to poor coding practices in the example code.


Huh. Weird. That shouldn't be right. Squirrel can do a lot of optimizations Lua can't. Maybe it's just that problem...


What does it mean by a language can be multiplexed trivially?


You can run multiple interpreters, embedded in the same application, in separate threads: multiplexing, as you have multiple instances, as opposed to multithreading, where you have a single instance.


Is that what https://github.com/rvirding/luerl is doing in the erlang VM?

From the docs:

> It should give you a Lua environment that allows you to effortlessly run tens of thousands of Lua processes in parallel, leveraging the famed microprocesses implementation of the Erlang VM. The empty Luerl State footprint will be yet smaller than the C Lua State footprint.


Yes. Lua does it quite well by default. Apparently, luerl aspires to do it better.


It really speaks more to the runtime than the language. There's nothing fundamentally anti-parallel about lua, but even just concurrent GC is difficult to execute well. Look at how big of a deal Go's recent low latency claims are.


Lua can't be multithreaded in any real sense (by "real", I mean "OS threads"). If Squirrel can that's a big advantage.


I thought it could, but I think I might have been wrong... Nope, just coroutines. Sorry for being wrong. However, as it is small and embeddable, it's trivial to spin up multiple instances of the interpreter. But Lua and TCL are just as good at that.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: