From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.org/gmane.linux.lib.musl.general/3955 Path: news.gmane.org!not-for-mail From: Paul Sokolovsky Newsgroups: gmane.linux.lib.musl.general Subject: Re: Squirrel - no-bloat scripting language with sane syntax and semantics Date: Sat, 24 Aug 2013 14:29:00 +0300 Message-ID: <20130824142900.3d96356a@x34f> References: <20130824001118.5be5b3d7@x34f> <52186EE2.8020407@gentoo.org> Reply-To: musl@lists.openwall.com NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1377343752 23031 80.91.229.3 (24 Aug 2013 11:29:12 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 24 Aug 2013 11:29:12 +0000 (UTC) To: musl@lists.openwall.com Original-X-From: musl-return-3959-gllmg-musl=m.gmane.org@lists.openwall.com Sat Aug 24 13:29:16 2013 Return-path: Envelope-to: gllmg-musl@plane.gmane.org Original-Received: from mother.openwall.net ([195.42.179.200]) by plane.gmane.org with smtp (Exim 4.69) (envelope-from ) id 1VDC1s-0001A4-1S for gllmg-musl@plane.gmane.org; Sat, 24 Aug 2013 13:29:16 +0200 Original-Received: (qmail 5606 invoked by uid 550); 24 Aug 2013 11:29:15 -0000 Mailing-List: contact musl-help@lists.openwall.com; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: Original-Received: (qmail 5596 invoked from network); 24 Aug 2013 11:29:15 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=date:from:to:subject:message-id:in-reply-to:references:mime-version :content-type:content-transfer-encoding; bh=DSgTVXCBAZb8DH1HohIJ8DzLgcD21k1tUoReyv8bC8I=; b=g4BeAa/+UVHkOFJMRb0ANTUoMHSEPIM9Z4JUt8ojvY5SBN5SPssQ6YYXkWO8WuUZwW PWQn7LAAK7bXSKAnw2HQJd2JmeWk+51DankkhhDrJIWMOsVZ+iwOZMKjd3UhLPRfWlt1 6/BeqCALTQd9jGdGwizk0kwPXmw7foUbbHASnlvsj2zIzmSIyrhkCMFgWWZpy5aWw/FI JCw2ypVgd4iXDKQ5OGvx15vvimv0FL0CTGUJOB4B7cRyhPyEPPfKR/7EAtwrhnt7geUG JZO5fUpTqwCzLgD7Eycu8aG66OWZB1cAHskZqvojZDhEDmwEk93cUmKWZ0NCfklJN5KE xyNQ== X-Received: by 10.14.210.8 with SMTP id t8mr7034286eeo.39.1377343743618; Sat, 24 Aug 2013 04:29:03 -0700 (PDT) In-Reply-To: <52186EE2.8020407@gentoo.org> X-Mailer: Claws Mail 3.9.1 (GTK+ 2.24.10; i686-pc-linux-gnu) Xref: news.gmane.org gmane.linux.lib.musl.general:3955 Archived-At: Hello, On Sat, 24 Aug 2013 10:29:22 +0200 Luca Barbato 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@gmail.com