From owner-freebsd-stable@FreeBSD.ORG Sun Aug 3 14:26:22 2008 Return-Path: Delivered-To: freebsd-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E38411065772; Sun, 3 Aug 2008 14:26:22 +0000 (UTC) (envelope-from louie@transsys.com) Received: from ringworld.transsys.com (ringworld.transsys.com [144.202.0.15]) by mx1.freebsd.org (Postfix) with ESMTP id B7BF78FC27; Sun, 3 Aug 2008 14:26:22 +0000 (UTC) (envelope-from louie@transsys.com) Received: from PM-G5.transsys.com (c-69-141-158-166.hsd1.nj.comcast.net [69.141.158.166]) (using TLSv1 with cipher AES128-SHA (128/128 bits)) (No client certificate requested) (Authenticated sender: louie) by ringworld.transsys.com (Postfix) with ESMTP id A137D5C5D; Sun, 3 Aug 2008 10:02:43 -0400 (EDT) Message-Id: <9C6216B2-AB67-45A2-900C-3492340737DF@transsys.com> From: Louis Mamakos To: Luigi Rizzo In-Reply-To: <20080802225643.GA84798@onelab2.iet.unipi.it> Content-Type: text/plain; charset=US-ASCII; format=flowed; delsp=yes Content-Transfer-Encoding: 7bit Mime-Version: 1.0 (Apple Message framework v926) Date: Sun, 3 Aug 2008 10:02:42 -0400 References: <372128.56919.qm@web51502.mail.re2.yahoo.com> <20080802.002039.58462077.imp@bsdimp.com> <4894A9D8.2090606@freebsd.org> <20080802225643.GA84798@onelab2.iet.unipi.it> X-Mailer: Apple Mail (2.926) Cc: fbsd2@yahoo.com, Sam Leffler , freebsd-stable@freebsd.org Subject: Re: busybox and small scripting languages on FreeBSD ? (was Re: 80 Mb / enough for 7.x? OK to delete /stand/ and /modules/ ?) X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 03 Aug 2008 14:26:23 -0000 On Aug 2, 2008, at 6:56 PM, Luigi Rizzo wrote: > On Sat, Aug 02, 2008 at 11:39:20AM -0700, Sam Leffler wrote: > ... >> I've been looking at nanobsd for a couple of applications and >> working to >> reduce the footprint of the images without hacking special rules. >> With > ... >> If we're ever to consider building images for flash parts (not >> compact >> flash) then we'll need to do a lot of work to pare down the bloat--or >> replace current apps w/ special purpose replacements a la busybox >> (not >> something I find appealing). > > related to this thread -- does anyone have experience in trying > to build busybox on FreeBSD ? > > Also, what would you suggest as a small scripting language to be used > in this kind of platform for implementing CGI scripts (and preferably > able to use sockets/select) ? > > The various perl/python/php and friend are in the 10MB range once you > pick up a little bit of libraries (sockets etc) and the tangle of > modules they require; awk (which is present in busybox) is ok-ish for > some things, but doing > I/O and calling external programs with it is very unfriendly; > javascript/spidermonkey is on the 500KB range but it doesn't have > a library to play with sockets... I'd also suggest looking at Lua, as someone else mentioned. It's BSD licensed, and written explicitly for small footprint, embedded applications. There's a port to the Lego Mindstorms controller, for example. The Lua language is written in ANSI C, and has a small set of well defined interfaces to the OS for opening files, memory allocation, etc. There are a number of web based Lua application environments; google for "Lua Kepler" for one such example. There's also a couple of Wiki platforms written in Lua. I think of Lua as the sort of tool you might use these days as compared to Tcl some years ago. It also would be suitable for replacing FORTH in /boot/loader as something that's still small and compact enough, with many fewer sharp edges exposed to users.. louie