News for hackers. Stuff that matters.
Re:Squirrel Programming Language by justusw on Tuesday July 12, 2016 @03:17PM (#12081623)
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?
Re:Squirrel Programming Language by qwertyuiop924 on Tuesday July 12, 2016 @04:17PM (#12082005)
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.
Re:Squirrel Programming Language by unit91 on Tuesday July 12, 2016 @05:30PM (#12082416)
In short, Squirrel is small, nimble and has features that are pretty nuts. Looking for something else? You're barking up the wrong tree.
Re:Squirrel Programming Language by marvy on Tuesday July 12, 2016 @11:49PM (#12083781)
Puns like these make my day.
Re:Squirrel Programming Language by udkl on Wednesday July 13, 2016 @02:34AM (#12084271)
You should visit Reddit front page more often
Re:Squirrel Programming Language by marvy on Friday July 15, 2016 @02:16PM (#12102828)
perhaps I should
Re:Squirrel Programming Language by trynumber9 on Tuesday July 12, 2016 @08:54PM (#12083312)
Is it actually faster though?

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

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

Re:Squirrel Programming Language by qwertyuiop924 on Wednesday July 13, 2016 @08:53PM (#12090973)
Huh. Weird. That shouldn't be right. Squirrel can do a lot of optimizations Lua can't. Maybe it's just that problem...
Re:Squirrel Programming Language by iamcreasy on Tuesday July 12, 2016 @05:09PM (#12082295)
What does it mean by a language can be multiplexed trivially?
Re:Squirrel Programming Language by qwertyuiop924 on Tuesday July 12, 2016 @06:30PM (#12082710)
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.
Re:Squirrel Programming Language by safewayclubcard on Tuesday July 12, 2016 @07:29PM (#12082961)
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.

Re:Squirrel Programming Language by qwertyuiop924 on Tuesday July 12, 2016 @08:59PM (#12083328)
Yes. Lua does it quite well by default. Apparently, luerl aspires to do it better.
Re:Squirrel Programming Language by duaneb on Tuesday July 12, 2016 @06:47PM (#12082790)
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.
Re:Squirrel Programming Language by theseoafs on Tuesday July 12, 2016 @04:47PM (#12082169)
Lua can't be multithreaded in any real sense (by "real", I mean "OS threads"). If Squirrel can that's a big advantage.
Re:Squirrel Programming Language by qwertyuiop924 on Tuesday July 12, 2016 @04:51PM (#12082189)
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.
Re:Squirrel Programming Language by bsder on Tuesday July 12, 2016 @06:15PM (#12082632)
0-index. I tried to like Lua, but indexing from 1 is just too painful when you have to talk to C.
Re:Squirrel Programming Language by GadgetJax on Tuesday July 12, 2016 @11:26PM (#12083719)
In times like that, I would just assume the array size is +1, and ignore the first C Zero position. It's a pain but just setup something once and its done.
Re:Squirrel Programming Language by bsder on Wednesday July 13, 2016 @02:16PM (#12088410)
No, it's not. See here: http://lua-users.org/wiki/CountingFromOne

I made a comment on that wiki MOONS ago, and it still holds.

Re:Squirrel Programming Language by SamReidHughes on Tuesday July 12, 2016 @03:23PM (#12081658)
It looks like arrays are different from tables and they start at 0.
Re:Squirrel Programming Language by mwcampbell on Tuesday July 12, 2016 @04:09PM (#12081962)
The combination of reference counting and tracing GC looks interesting. There have been a couple of attempts to retrofit reference counting into Lua, but nothing stable or widely used AFAIK.
Re:Squirrel Programming Language by gyoza on Tuesday July 12, 2016 @03:28PM (#12081692)
I am guessing that it is used in Valve games..
Re:Squirrel Programming Language by xufi on Tuesday July 12, 2016 @04:06PM (#12081938)
I wonder if parts of it were used in TF2 updates since that hasn't gotten an update in a while
Re:Squirrel Programming Language by petra on Tuesday July 12, 2016 @11:40PM (#12083759)
I think squirrel offers much better C++ integration.