We figured that it wasn't worth dealing with the hassle of unaligned addresses because the more portable alternatives worked just as well.
tl;dr: For Pallene, Lua is a scripting language. For Terra, Lua is mainly for metaprogramming. The key difference is that Terra cannot directly manipulate Lua data. Although Terra's syntax is similar to Lua, its type…
The difference is the Lua-C API. The default Lua-C API is designed for humans: it is stable and safe to use, but every operation must pay the cost of function calls and passing data through the Lua stack. Pallene…
> I can just as good implement it in C using the Lua C API Pallene beats C when the code uses many Lua data structures. Acessing Lua data from C via the Lua-C API has significant overhead that can erase the gains from…
(I'm one of the Pallene authors) For compiled code, Pallene's performance can be comparable to LuaJIT[1]. Pallene might be better in code with unpredictable branches, which don't fit in a single trace. LuaJIT has the…
Pallene and Teal are in a bit of a different space. Teal is focused on compile-time type checking. The intention is to encourage you to add type annotations to your entire Lua codebase. It's another take at the problem…
It wouldn't be the JS we know and love if it had been burdened with a type system designed by a committee sometime in the 90s. That said, one thing we can say for sure is that the dynamic typing doesn't make your job…
I always love reading more about JavaScriptCore internals although I have to confess that much of the time one of the main lessons I get from it is that life would be much easier if we had types and didn't need to…
If you are curious, this is what the resulting format string looks like after expanding all the macros: https://gist.github.com/hugomg/73e91ebca7ced3c5c6f955e9e830b...
We chose the Pallene name because it was another one of Saturn's moon names that sounded nice, and is pronounced the same way in English and Portuguese. The Mike Pall thing was just a coincidence although we certainly…
It is no surprise that the benchmarks on the LuaJIT website are going to show it ahead of PUC-Lua, is it? In truth the performance comparison is a bit more complicated than that. :) For a pure Lua comparison LuaJIT is…
In case others aren't familiar with the termiology: #SAT is the counting version of the SAT problem, which tries to find how many different solutions exist to a set of constraints)
Some SAT solvers allow you to add additional constraints while they are running. So you can find a solution and then add additional constraints to try to get it to find a better one.
Generally speaking, if you ever find yourself coding a brute-force backtracking search for some combinatorical problem, it might be a good idea to consider using a SAT solver instead. This way you get to take advantage…
Seeing someone cite a little project I did for fun many years ago is a very nice surprise. :)
Yes.
Currently there is no special support for metaprogramming, but maybe we could borrow some ideas from Terra in a future version...
Wow, I hadn't thought of that. Its a complete coincidence, actually!
From the point of view of Lua, Pallene works the same as C If you want to produce a standalone executable, at the end of the day this executable will contain a copy of the Lua VM. If you want to produce a library that…
If you were writing naive code, it probably wouldn't be that much. Maybe a 2to 3 times difference. But the thing with Terra is that you can be even faster than naively-written C if you know what you are doing.
I talk a bit about this in a sibling comment. Maybe that helps answer your question? Pallene uses garbage collection, and shares the Lua garbage collector. The idea is to make as easy as possible to call Pallene from…
You hit the nail on the head. With a more "Oberon-like" language we can use textbook optimization algorithms and take advantage of existing compiler backends, like GCC and LLVM. For dynamic languages these techniques…
Don't worry, that is still a fine question. Pallene programs are still able to use Lua's "load" to eval dynamically-typed Lua code. But it is less likely that we would implement a function to load Pallene source code at…
Pallene has been designed to seamlessly interoperate with Lua, not to replace it. So you can still use Lua when you need dynamic code loading or magic debug hooks. Roughly speaking, from the point of view of Lua,…
Terra uses Lua as a metaprogramming language, while Pallene/Titan use Lua as a scripting language. Terra is designed for high performance numerical computing. As you mentioned, it has no garbage collector, uses C-like…
We figured that it wasn't worth dealing with the hassle of unaligned addresses because the more portable alternatives worked just as well.
tl;dr: For Pallene, Lua is a scripting language. For Terra, Lua is mainly for metaprogramming. The key difference is that Terra cannot directly manipulate Lua data. Although Terra's syntax is similar to Lua, its type…
The difference is the Lua-C API. The default Lua-C API is designed for humans: it is stable and safe to use, but every operation must pay the cost of function calls and passing data through the Lua stack. Pallene…
> I can just as good implement it in C using the Lua C API Pallene beats C when the code uses many Lua data structures. Acessing Lua data from C via the Lua-C API has significant overhead that can erase the gains from…
(I'm one of the Pallene authors) For compiled code, Pallene's performance can be comparable to LuaJIT[1]. Pallene might be better in code with unpredictable branches, which don't fit in a single trace. LuaJIT has the…
Pallene and Teal are in a bit of a different space. Teal is focused on compile-time type checking. The intention is to encourage you to add type annotations to your entire Lua codebase. It's another take at the problem…
It wouldn't be the JS we know and love if it had been burdened with a type system designed by a committee sometime in the 90s. That said, one thing we can say for sure is that the dynamic typing doesn't make your job…
I always love reading more about JavaScriptCore internals although I have to confess that much of the time one of the main lessons I get from it is that life would be much easier if we had types and didn't need to…
If you are curious, this is what the resulting format string looks like after expanding all the macros: https://gist.github.com/hugomg/73e91ebca7ced3c5c6f955e9e830b...
We chose the Pallene name because it was another one of Saturn's moon names that sounded nice, and is pronounced the same way in English and Portuguese. The Mike Pall thing was just a coincidence although we certainly…
It is no surprise that the benchmarks on the LuaJIT website are going to show it ahead of PUC-Lua, is it? In truth the performance comparison is a bit more complicated than that. :) For a pure Lua comparison LuaJIT is…
In case others aren't familiar with the termiology: #SAT is the counting version of the SAT problem, which tries to find how many different solutions exist to a set of constraints)
Some SAT solvers allow you to add additional constraints while they are running. So you can find a solution and then add additional constraints to try to get it to find a better one.
Generally speaking, if you ever find yourself coding a brute-force backtracking search for some combinatorical problem, it might be a good idea to consider using a SAT solver instead. This way you get to take advantage…
Seeing someone cite a little project I did for fun many years ago is a very nice surprise. :)
Yes.
Currently there is no special support for metaprogramming, but maybe we could borrow some ideas from Terra in a future version...
Wow, I hadn't thought of that. Its a complete coincidence, actually!
From the point of view of Lua, Pallene works the same as C If you want to produce a standalone executable, at the end of the day this executable will contain a copy of the Lua VM. If you want to produce a library that…
If you were writing naive code, it probably wouldn't be that much. Maybe a 2to 3 times difference. But the thing with Terra is that you can be even faster than naively-written C if you know what you are doing.
I talk a bit about this in a sibling comment. Maybe that helps answer your question? Pallene uses garbage collection, and shares the Lua garbage collector. The idea is to make as easy as possible to call Pallene from…
You hit the nail on the head. With a more "Oberon-like" language we can use textbook optimization algorithms and take advantage of existing compiler backends, like GCC and LLVM. For dynamic languages these techniques…
Don't worry, that is still a fine question. Pallene programs are still able to use Lua's "load" to eval dynamically-typed Lua code. But it is less likely that we would implement a function to load Pallene source code at…
Pallene has been designed to seamlessly interoperate with Lua, not to replace it. So you can still use Lua when you need dynamic code loading or magic debug hooks. Roughly speaking, from the point of view of Lua,…
Terra uses Lua as a metaprogramming language, while Pallene/Titan use Lua as a scripting language. Terra is designed for high performance numerical computing. As you mentioned, it has no garbage collector, uses C-like…