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

Hello,

I apologize if this message can be considered off-topic. However, my
reading thru mailing list archive showed that there's favorable
attitude to generic no-bloat stuff, so I hope this message may be of
interest to some readers.

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.

The language was created in 2003, and now at 3.0.4, but it's mostly
one-man project, and the maintainer is not interested in its usage
beyond "embed in C/C++ application" pattern. After some poking around
for alternative small scripting languages and even considering writing
web apps in C++, I gave up and decided to take solution of the "last
mile" problem myself - to turn it into standalone general-purpose
language, so it was suitable for arbitrary applications and wide
audience (which means resolving few warts the original language does
have).

What I have done so far is at
https://github.com/pfalcon/squirrel-modules and
https://github.com/pfalcon/squirrel-lang/tree/squirrel3-pfalcon . So,
if you ever dreams of sane unbloated scripting language, please give it
a try. And of course, I couldn't lead it to general-purposed'ness
myself, so if you find the idea neat, please consider joining the
effort ;-).

Example no-nonsense script written in (general-purpose) Squirrel:

==========
fin = file(vargv[1], "r")
fout = file(vargv[2], "w")

prefix = "sq"
while (l = fin.readline()) {
    if (l.find("/*stdlib*/"))
        prefix = "sqstd"

    if (!l.find("(*"))
        continue

    toks = split(l, "()")
    sym = toks[1].slice(1)
    fout.write("#define " + prefix + "_" + sym + " (sqapi->" + sym + ")\n")
}
==========


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