Earlier quoted context omitted.
In reality, tables are used in specific fashions and not fully generally. (Partly because Lua itself even recognizes some of these fashions and provides relevant operations accordingly.) Lua tables are not really a single data structure; it is a single type that acts as multiple data structures at once.
Yeah Lua optimizes array tables for performance as long as they're arrays. That's the only optimization I'm aware of. I get why they didn't just add arrays, to keep the syntax and semantics clean, simple, and unambiguous. I just don't like it. If you take that to its extreme, you get Lisp. Natural human languages are messy and full of warts, but they work despite that, or perhaps because of that, because human life i…
Teal – A statically-typed dialect of Lua
141–150 of 176 posts
Re: Teal – A statically-typed dialect of Lua
#142Earlier quoted context omitted.
One of Lua's goals has been extreme portability, and the main implementation works on anything that has a C compiler, going to the extreme of compiling cleanly on C89, C99, and even compiling as C++ (no extern "C"). Remember that Lua is popular in the embedded space too, so this is a big feature. Pallene isn't designed to be a new native language on its own. Pallene is designed to be a companion language for Lua, spe…
That's actually really exciting in that case. If it goes further and generates native C control flow statements when possible ("if", "for", native functions, native function calls, etc), I think it could be an omni-level language, generating basically Lua statements when dynamic and C when not, and mixing them all within the same program, entirely controlled by how much type information you give it (and how you use t…
Re: Teal – A statically-typed dialect of Lua
#143Earlier quoted context omitted.
One of Lua's goals has been extreme portability, and the main implementation works on anything that has a C compiler, going to the extreme of compiling cleanly on C89, C99, and even compiling as C++ (no extern "C"). Remember that Lua is popular in the embedded space too, so this is a big feature. Pallene isn't designed to be a new native language on its own. Pallene is designed to be a companion language for Lua, spe…
I'm Pallene's lead maintainer. Currently the code is maintained by me, my students and other open sou rce collaborators. We collaborate with Roberto over some Pallene-related research, specially about the type system semantics, but he isn't an active committer.
Re: Teal – A statically-typed dialect of Lua
#144Earlier quoted context omitted.
Seconded.
I think you and GP both mean that this TEAL is adjacent to crptocurrency, and therefore, who cares about stepping on toes? This heuristic works well in most cases maybe, but will lead to false positives sometimes. May I gently suggest that this might be one of those cases. Algorand is the project of this fellow https://en.m.wikipedia.org/wiki/Silvio_Micali Credentials aren't faultless but they do provide a certain we…
Re: Teal – A statically-typed dialect of Lua
#145Years ago, I tried lua and wasn't impressed. Then I started using Neovim, did the necessary configuration in lua, but continued writing my own scripts in vimscript. Later I started using wezterm and decided to give lua a second shot, and I began to really like it. I realized my initial dislike for lua stemmed from my experience with javascript (back in the jwquery days), where maintaining large codebases felt like na…
And indexing arrays starting from 1 rather than 0.
Re: Teal – A statically-typed dialect of Lua
#146Re: Teal – A statically-typed dialect of Lua
#147Years ago, I tried lua and wasn't impressed. Then I started using Neovim, did the necessary configuration in lua, but continued writing my own scripts in vimscript. Later I started using wezterm and decided to give lua a second shot, and I began to really like it. I realized my initial dislike for lua stemmed from my experience with javascript (back in the jwquery days), where maintaining large codebases felt like na…
> That being said, lua's lack of popularity probably stems from its limited stdlib, which often feels incomplete, and the absence of a robust package manager. luarocks is a pain to work with. And indexing arrays starting from 1 rather than 0.
>>> A table with exactly one border is called a sequence. For instance, the table {10, 20, 30, 40, 50} is a sequence, as it has only one border (5). The table {10, 20, 30, nil, 50} has two borders (3 and 5), and therefore it is not a sequence. (The nil at index 4 is called a hole.) The table {nil, 20, 30, nil, nil, 60, nil} has three borders (0, 3, and 6) and three holes (at indices 1, 4, and 5), so it is not a sequence, too. The table {} is a sequence with border 0. Note that non-natural keys do not interfere with whether a table is a sequence
Re: Teal – A statically-typed dialect of Lua
#148Earlier quoted context omitted.
That's actually really exciting in that case. If it goes further and generates native C control flow statements when possible ("if", "for", native functions, native function calls, etc), I think it could be an omni-level language, generating basically Lua statements when dynamic and C when not, and mixing them all within the same program, entirely controlled by how much type information you give it (and how you use t…
Alas, as of last month we changed Pallene's compiler and it now generates C gotos for control flow. ( ^ _ ^ メ ) It helped with certain optimizations...
But why gotos instead of proper control flow? Is it just easier to emit?
Re: Teal – A statically-typed dialect of Lua
#149Re: Teal – A statically-typed dialect of Lua
#150Oof. What is it about the devs who prefer static typing that they insist on bolting it onto every scripting language they can? It's nearly a compulsive disorder. There's plenty of languages with compile time type safety, just go use one of them and leave the perfectly good dynamic ones alone. Static typing proponents need accept that dynamic typing is a perfectly valid way to write and run code: It's way less verbose…