From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.org/gmane.linux.lib.musl.general/3965 Path: news.gmane.org!not-for-mail From: Rob Landley Newsgroups: gmane.linux.lib.musl.general Subject: Re: Squirrel - no-bloat scripting language with sane syntax and semantics Date: Mon, 26 Aug 2013 17:18:43 -0500 Message-ID: <1377555523.2737.129@driftwood> References: Reply-To: musl@lists.openwall.com NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii; DelSp=Yes; Format=Flowed Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1377555537 22085 80.91.229.3 (26 Aug 2013 22:18:57 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 26 Aug 2013 22:18:57 +0000 (UTC) Cc: Justin Cormack To: musl@lists.openwall.com Original-X-From: musl-return-3969-gllmg-musl=m.gmane.org@lists.openwall.com Tue Aug 27 00:19:01 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 1VE57j-000882-HW for gllmg-musl@plane.gmane.org; Tue, 27 Aug 2013 00:18:59 +0200 Original-Received: (qmail 1879 invoked by uid 550); 26 Aug 2013 22:18:56 -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 1870 invoked from network); 26 Aug 2013 22:18:56 -0000 X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-gm-message-state:date:from:subject:to:cc:in-reply-to:message-id :mime-version:content-type:content-disposition :content-transfer-encoding; bh=sWrETdEIAIdZMjzYjWcGd6qCsVqg5Pv+9KoAjeUY5oc=; b=FfCmtbDtauFRulvxlPFmNc5M1HKLImGx/MMVhzFJLYRLiGr0LRAyQ4GzmNXIllZ13d 1+W/UG34WQtSDRoB/kcF0sWK2TL/pw3VIdhIG9SrnO5McJ6oywZkIgMul1m0FNpV9X/1 aT3usuG6xFH4V+GQFHSefEsUrefOZABd7z2fupMpWp7l2Ek/ybxpfNNVZt+wUUEuy4nI EOXGD+zw23D3FDdS0jWZUBmDGHEgVaBbGTYkLREdxBRenGo3pRcbboFC5lWg5SrFkC6D 0xu8kMg9cDCNKN79Su70Qz7MsyXkbQ+gQKtv/Uk+e6m/moOg7Fv0XjU7mkvS6hidvz+3 bTlg== X-Gm-Message-State: ALoCoQleqU0jTCzgFPqkHmXnVG+k9SqBt6PrP8L+iEizENyKXT7bNNicmkHjEiMz5psagxcxDmsX X-Received: by 10.182.110.164 with SMTP id ib4mr34607obb.87.1377555523728; Mon, 26 Aug 2013 15:18:43 -0700 (PDT) In-Reply-To: (from justin@specialbusservice.com on Sun Aug 25 10:03:33 2013) X-Mailer: Balsa 2.4.11 Content-Disposition: inline Xref: news.gmane.org gmane.linux.lib.musl.general:3965 Archived-At: On 08/25/2013 10:03:33 AM, Justin Cormack wrote: > On Sun, Aug 25, 2013 at 10:34 AM, Rob Landley wrote: > > Normally people use lua for this, which has around 100k of =20 > interpreter. > > > > The downside of lua is it doesn't have a full standard posix C =20 > binding > > library. (It has a nonstandard one you can add on, but when I =20 > looked at > > writing a busybox clone in it, I needed to install something like 7 =20 > packages > > to get all the libraries I needed. Then again, most people aren't > > implementing their own "ifconfig", "mount", and "taskset"...) >=20 > I have implemented ifconfig, mount etc in Lua (the APIs, not the > commands), see https://github.com/justincormack/ljsyscall - its pretty > comprehensive now. While nice, this is another library that's not included in the base lua =20 package. A library to implement raw system call bindings, which =20 implements support independently for each architecture. A glance at the =20 code implies that installing it builds C code somewhere, but after =20 finding out that "buildrump.sh" is the name of a subdirectory I stopped =20 trying to find where. The appeal of lua to me was that I _didn't_ have to cross compile C =20 stuff, but could instead use a scripting langauge that should just work =20 on strange architectures it had never seen before, without cross =20 compiling additional packages or installing a native toolchain. (A =20 scripting language doesn't even need a build step.) This library is autogenerating a MK file and probing for CFLAGS. Plus =20 raw system calls sans libc wrapping vary slightly between architectures =20 anyway, so what this is _trying_ to do wouldn't give me the portability =20 I wanted. Back when I was poking at lua I came to the conclusion I could extend =20 lua with C myself, or I could just write my program in C, which is what =20 I did. Rob=