From owner-freebsd-current@FreeBSD.ORG Mon Aug 16 09:27:16 2010 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 57952106564A for ; Mon, 16 Aug 2010 09:27:16 +0000 (UTC) (envelope-from peterjeremy@acm.org) Received: from mail34.syd.optusnet.com.au (mail34.syd.optusnet.com.au [211.29.133.218]) by mx1.freebsd.org (Postfix) with ESMTP id D8FF58FC16 for ; Mon, 16 Aug 2010 09:27:14 +0000 (UTC) Received: from server.vk2pj.dyndns.org (c220-239-116-103.belrs4.nsw.optusnet.com.au [220.239.116.103]) by mail34.syd.optusnet.com.au (8.13.1/8.13.1) with ESMTP id o7G9RC0N023157 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Mon, 16 Aug 2010 19:27:13 +1000 X-Bogosity: Ham, spamicity=0.000000 Received: from server.vk2pj.dyndns.org (localhost.vk2pj.dyndns.org [127.0.0.1]) by server.vk2pj.dyndns.org (8.14.4/8.14.4) with ESMTP id o7G9RALP006099; Mon, 16 Aug 2010 19:27:10 +1000 (EST) (envelope-from peter@server.vk2pj.dyndns.org) Received: (from peter@localhost) by server.vk2pj.dyndns.org (8.14.4/8.14.4/Submit) id o7G9RAct006098; Mon, 16 Aug 2010 19:27:10 +1000 (EST) (envelope-from peter) Date: Mon, 16 Aug 2010 19:27:10 +1000 From: Peter Jeremy To: Ivan Voras Message-ID: <20100816092710.GA5963@server.vk2pj.dyndns.org> References: <4C6505A4.9060203@FreeBSD.org> <4C650B75.3020800@FreeBSD.org> <4C651192.9020403@FreeBSD.org> <4C673898.2080609@FreeBSD.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="oyUTqETQ0mS9luUI" Content-Disposition: inline In-Reply-To: X-PGP-Key: http://members.optusnet.com.au/peterjeremy/pubkey.asc User-Agent: Mutt/1.5.20 (2009-06-14) Cc: freebsd-current@freebsd.org Subject: Scripting language in base [was Re: Official request: Please make GNU grep the default] X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 16 Aug 2010 09:27:16 -0000 --oyUTqETQ0mS9luUI Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Since this is now well off the original topic. On 2010-Aug-15 12:57:23 +0200, Ivan Voras wrote: >This is my long-term point - it really would be beneficial to have an >alternative, richer language in base which would fall between the >categories of "a good system language but far too complex for simple >string-parsing stuff" which is C and "a good glue language for system >utilities but lacking more evolved concepts" which is shell. I'd say the bigger problem with C is that its native string processing capabilities are basically non-existent. Compared to awk, perl, ruby, (insert your favourite scripting language here) or even sh, the equivalent code in C is going to be much longer and less clear. Note that the system does have a language intermediate between sh and C - awk. The main downside of awk is its lack of pipe support. >default. My current favorite is lua because it's very small and easily >embeddable and extendable by C code, but there are others - some >JavaScript engines probably fit the description. You have previously suggested importing lua. I'd suggest that all you need is the killer app written in lua to justify importing it. Another option might be ficl - the code is already in the base system, it would just need to be compiled. Of course, the downside is that FORTH is a very niche language. --=20 Peter Jeremy --oyUTqETQ0mS9luUI Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.15 (FreeBSD) iEUEARECAAYFAkxpBG4ACgkQ/opHv/APuIe/QQCY2icgcwdkbWGMqZP0IPIOdIze cwCfeNCxY2YUAptDYASBfe/JzWLr1BE= =Bw+8 -----END PGP SIGNATURE----- --oyUTqETQ0mS9luUI--