Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20130824142900.3d96356a@x34f>
Date: Sat, 24 Aug 2013 14:29:00 +0300
From: Paul Sokolovsky <pmiscml@...il.com>
To: musl@...ts.openwall.com
Subject: Re: Squirrel - no-bloat scripting language with sane syntax
 and semantics

Hello,

On Sat, 24 Aug 2013 10:29:22 +0200
Luca Barbato <lu_zero@...too.org> wrote:

> > I'd like to draw attention to small very high level (meaning that
> > there's native support for lists and maps) language "Squirrel",
> > http://squirrel-lang.org/ . It compiles below 300K (dynamic linking)
> > with -O2 and can be gotten under 200K with -Os -flto (sizes are for
> > i386). It uses C-like syntax, so should be a quick start for many
> > folks.
> 
> Looks impressively similar to Pawn[1],

Well, depending on how you define "similar". In today's world, one can
say that it's similar to JavaScript, except that it doesn't have all
that "bad parts" which are defining to JS. Overall, there're gazillions
small scripting languages, dead, mature, and unfinished (and over last
half year I looked thru dozens of them). The difference comes to native,
well-integrated support of high-level data types: lists and maps. Very
few support that, and then binary size come into play.

Speaking of Pawn, I see that I looked into it, but I couldn't get its
trunk to compile. And it's advertised as "a compiled language." And
looking thru description, I couldn't find confirmation that it supports
mapping type (appears to be only C-like "structure" with symbolic
identifiers for fixed fields), neither look at source samples confirmed
that, but showed some pretty weird syntax patterns for a "C-like"
language.

All in all, despite difference in syntax, for me Squirrel is similar
to Python (which happens to be my scripting language of choice), and I
treat it exactly like that - unbloated alternative to Python for small
systems.

> with the cons of being written
> in C++ (thus limiting its usage to places where C++ is available),

Squirrel's external API is pure C. It itself implemented in a typical
subset of C++ (-fno-rtti, -fno-exceptions, it does use virtual
destructors though - it's dynamic language implementation after all).

> lua (and moonscript) are getting more and more traction in this field
> and there are lean enough implementations.

Yeah, Lua is definitely (weird) king of the hill here, with networked
package manager avalable, etc. - all like "real" language
(Python/Perl/Ruby). But drawbacks of Lua are well-known - its rather
hacked-up semantics which will make any programmer cringe (conscious
one from dissatisfaction, careless from actual debugging and code
maintenance). I tried to make me not sick of it for about a year and I
failed, hence look for alternative, then understanding that search is
vain and the effort can be rather put into Squirrel (btw, it was
started from dissatisfaction with Lua either).

Here's some comparison of Lua and Squirrel:

http://computerscomputing.wordpress.com/2013/02/18/lua-and-squirrel-the-case-for-squirrel/

> 
> lu
> 
> 
> [1] http://www.compuphase.com/pawn/pawn.htm

-- 
Best regards,
 Paul                          mailto:pmiscml@...il.com

Powered by blists - more mailing lists

Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.