Live data from Hacker News

The Squirrel Programming Language

developer.valvesoftware.com

31–40 of 51 posts

Re: The Squirrel Programming Language

#31

Please could you explain to me, if Squirrel is "similar to Lua, but uses a C like syntax", why I wouldn't want to use C or Lua instead? Is this about Steam? If not, is this (even) faster than Lua? Is it easier or safer than C? Am I missing something? You better have something seriously good to offer if in your first breath you're pitching yourself alongside the very best of both interpreted and compiled languages.

From the wiki (http://wiki.squirrel-lang.org/default.aspx/SquirrelWiki/Lua%...) it looks like most of the reasons Squirrel was created stemmed from problems that have since been fixed in Lua.

The remaining differences seem pretty minor; IMO having the OO system baked into the language instead of implemented in user-space is a step backwards. The 0-indexing might be nice if you do a lot of FFI with C, I suppose. Hardly worth giving up the insane performance of LuaJIT for though.

Re: The Squirrel Programming Language

#32
post #2

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?

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.

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: The Squirrel Programming Language

#33

Earlier quoted context omitted.

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.

Re: The Squirrel Programming Language

#34
New programming languages need really compelling, upfront "why this new language" arguments.

I love the idea of new languages but there's plenty of good ones out there so there has to be a super good argument in my face explaining why.

Re: The Squirrel Programming Language

#36
post #21
post #2

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?

0-index. I tried to like Lua, but indexing from 1 is just too painful when you have to talk to C.

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: The Squirrel Programming Language

#39
post #20

Earlier 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.

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.

Re: The Squirrel Programming Language

#40
I interviewed a candidate a year ago who said their preferred language was 'Squirrel'. This was my first interview ever I thought maybe I was being pranked. Was pretty straightforward to read though.
Post reply on HN