mailing list of musl libc
 help / color / mirror / code / Atom feed
* Squirrel - no-bloat scripting language with sane syntax and semantics
@ 2013-08-23 21:11 Paul Sokolovsky
  2013-08-24  8:29 ` Luca Barbato
  2013-08-25  9:34 ` Rob Landley
  0 siblings, 2 replies; 14+ messages in thread
From: Paul Sokolovsky @ 2013-08-23 21:11 UTC (permalink / raw)
  To: musl

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@gmail.com


^ permalink raw reply	[flat|nested] 14+ messages in thread

end of thread, other threads:[~2013-09-01 22:43 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-08-23 21:11 Squirrel - no-bloat scripting language with sane syntax and semantics Paul Sokolovsky
2013-08-24  8:29 ` Luca Barbato
2013-08-24 11:29   ` Paul Sokolovsky
2013-08-25  9:34 ` Rob Landley
2013-08-25 15:03   ` Justin Cormack
2013-08-26 22:18     ` Rob Landley
2013-08-26 23:59       ` Rich Felker
2013-08-27  0:35         ` Rob Landley
2013-08-25 15:18   ` Ivan Kanakarakis
2013-08-25 19:40   ` Paul Sokolovsky
2013-08-25 20:00   ` Matias A. Fonzo
2013-08-25 20:10     ` Rich Felker
2013-08-31 18:39     ` Daniel Cegiełka
2013-09-01 22:43       ` Matias A. Fonzo

Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/musl/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).