Given that Lua and Squirrel are quite similar due to meta tables resembling each other, what does Squirrel provide compared to Lua except for the C-Style syntax?
The Squirrel Programming Language
21–30 of 51 posts
Re: The Squirrel Programming Language
#22Earlier quoted context omitted.
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.
What does it mean by a language can be multiplexed trivially?
Re: The Squirrel Programming Language
#23Earlier quoted context omitted.
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.
What does it mean by a language can be multiplexed trivially?
Re: The Squirrel Programming Language
#24Official site: http://squirrel-lang.org/ Similar: http://wren.io/index.html
AngelScript too: http://www.angelcode.com/angelscript/
Re: The Squirrel Programming Language
#25Earlier quoted context omitted.
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.
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.
Re: The Squirrel Programming Language
#26If you're changing the syntax, why not take the time to fix having to use `local` everywhere instead of making things local by default?
"The problem is that without local declarations, you cannot say where the variable is local to" [2]. Take Python, for example, where "local by default" means "local to the current function". Variables are created in the current function's scope on assignment, which causes 2 problems:
1. It is awkward to modify variables in outer scopes, because an attempt to assign to them creates a new variable. Python works around this with the `global` and `nonlocal` keywords.
2. Python does not support variables which are local to the current block, for example, the body of a loop.
[1] http://lua-users.org/lists/lua-l/2006-10/msg00056.html [2] http://lua-users.org/lists/lua-l/2006-10/msg00063.html
Re: The Squirrel Programming Language
#27http://irrlicht.sourceforge.net/ (seems down at the moment)
Re: The Squirrel Programming Language
#28If you're changing the syntax, why not take the time to fix having to use `local` everywhere instead of making things local by default?
Presumably the author of Squirrel agrees with (one of) the authors of Lua: "Local by default is wrong" [1]. "The problem is that without local declarations, you cannot say where the variable is local to" [2]. Take Python, for example, where "local by default" means "local to the current function". Variables are created in the current function's scope on assignment, which causes 2 problems: 1. It is awkward to modify…
This sort of static checking massively increases the amount of code you can look after without going insane. Add static types too, and you're even better off.
(Last time I used Lua, I modified it so that all variables had to be introduced before their first use, either using `local', or a new `global' keyword. More static checks, and no more accidental globals.)
Re: The Squirrel Programming Language
#29Earlier quoted context omitted.
Presumably the author of Squirrel agrees with (one of) the authors of Lua: "Local by default is wrong" [1]. "The problem is that without local declarations, you cannot say where the variable is local to" [2]. Take Python, for example, where "local by default" means "local to the current function". Variables are created in the current function's scope on assignment, which causes 2 problems: 1. It is awkward to modify…
If Lua did the decent thing and insisted that you declare every variable first, it wouldn't have this stupid problem. Squirrel should probably do it, too. Python certainly should! (Even Javascript , misguided as it is in so many respects, has strict mode!) This sort of static checking massively increases the amount of code you can look after without going insane. Add static types too, and you're even better off. (Las…
Re: The Squirrel Programming Language
#30Earlier quoted context omitted.
AngelScript too: http://www.angelcode.com/angelscript/
Also Lily https://github.com/jesserayadkins/lily recently discussed https://news.ycombinator.com/item?id=12015158