I must say your description of Fourth sounds great.  I have to agree with all your 
desires in a language for these purposes.
 
As to the Lego M's, though mine have been on the shelf for at least a year, you are 
always a kid if you choose to be!  Mine were a gift from my wife! :-)
 
I have played with the C like language on it, but not Fourth
 
Richard

        -----Original Message----- 
        From: Charles Steinkuehler [mailto:[EMAIL PROTECTED]] 
        Sent: Sat 8/31/2002 9:55 AM 
        To: Nathan Angelacos; [EMAIL PROTECTED] 
        Cc: 
        Subject: Re: [Leaf-devel] Re: Webbased configuration
        
        

        > Better sense tells me I should probably keep quiet, but ...
        
        Nah...speak up.  We won't even flame you here!
        
        > Back when this discussion came up previously (Dec 2001/Jan 2002?)  I
        > was able to get micro_httpd working with an embedded lua interpreter.
        > It allows one to write html code with inline lua scripting, like php.
        > To add some real numbers to this dicussion:
        >
        > micro_httpd - dynamically linked against libc        9404 bytes
        > lua_micro_httpd dynamic libc, static lualib         75972 bytes
        >
        > Compressing with upx gets it to 39K, which is still big for a
        > diskette-based configuration engine.  If FORTH can really get us an
        > embedded language in 10K, that sounds great.  I'll check the site
        > Charles mentioned tomorrow; any other pointers anyone can give -
        > please share! (I'm not a coder - but don't mind getting my fingers
        > burned either...)
        
        I like LUA (haven't programmed anything real in it, but I've gone over
        the docs pretty well, and compiled the stand-alone LUA interpreter).  I
        think it's excellent at its targeted application (a scripting language
        for complex programs), but is not particularly well suited to being
        added to the core of a LEAF distribution for a few reasons:
        
        Size - While fairly small for a scripting language (vs perl, python,
        etc), LUA is still pretty large.
        
        Requires libc - Not a show-stopper...almost all parts of LEAF require
        libc, but I'd like to have a light-weight scripting language that could
        boot w/o libc to enable some potentially complex booting scenarios that
        have been discussed previously, like run-time selection of libc version,
        mixed libc environments (ie a base system running off ulibc, with
        optional add-ons using gnu libc), and similar.
        
        We already have sh - While more powerful than ash in several respects
        (especially with handling numbers), I don't think LUA provides
        dramatically more functionality than is available with standard
        shell-scripts...especially if a light-weight numeric processing tool was
        provided to extend ash's native abilities in this regard.
        
        Untyped - I especially don't like the fact that LUA is untyped (strong
        integer & floating point math capability is one of the key things I miss
        when programming in shell-script).  I may be missing something with LUA
        since I don't have much experience with it, but as an example, I'd like
        to know how well a numeric processing program (like rrdtool or MRTG)
        would code in LUA.  This is one of the things I'd like to code in a
        small script for LEAF, but have not attempted due to the limited numeric
        processing available in sh.  LUA is definately better with math than sh,
        I just don't think it goes far enough.
        
        No linux syscalls - There is no inherent capabilitiy to directly make
        linux syscalls, and given LUA's untyped data structures, grafting on
        this ability would likely be difficult.  With the ability to directly
        make linux syscalls, not only is the requirement for libc drastically
        reduced (or eliminated), but ti becomes possible to script things like a
        full-fledged web-server, e-mail sending program, or other network based
        program, and it also becomes possible to script core utilities (like su,
        chroot, etc) if desired.
        
        Forth:
        
        Tiny - about 1/4 the size of LUA
        
        No libc required - works on any system, even at bootstrap with an initrd
        in the 10's of K, rather than 500K+
        
        low-level-power - While still considered a scripting language, Forth has
        the ability (and was initially designed) to do low-level machine
        control....like "c", you get the ability to talk directly to the
        machine...unlike "c", you have small programs, no compile required, and
        no libc required (at the expense of somewhat slower execution and coding
        your own library routines).  Talking directly to the machine means you
        can execute linux syscalls, load/call external libraries (including
        libc) if required, and pretty much do anything possible in a "real"
        compiled programming language.  For math, you get everything from
        bit-level twiddling to whatever you want to write for a math library
        (single/double precision floating point, arbitrary precision
        calculations, whatever)...of course for standard things like floating
        point, there are off-the-shelf GPL/public-domain "libraries" (actually,
        word-sets in forth) availble from a variety of places.
        
        Drawbacks - Forth is considered by many to be a wierd, arcane, and
        obscure language.  Of course, I don't think LUA is going to be replacing
        C or Java anytime soon, either, and I actually consider LEAF a bit
        obscure, although probably not wierd or arcane :)  There is actually a
        pretty large group of folks continuing to write Forth (and commercial
        vendors providing supported toolchains), but it's all in the "hidden"
        world of micro-controllers...the tiny CPU's controlling your dishwasher,
        oscilloscope, etc...several folks are even running forth on their Lego
        MindStorms RCX controllers (why didn't they have these when I was a
        kid!?!).  Drop by comp.lang.forth sometime, and you'll see a pretty
        active user community.
        
        I guess to me LUA is just not enough of a "win" for the extra size it
        requires, but as I said, I don't have much direct experience with it.  I
        try to keep an open mind, and stand prepared to be convinced otherwise,
        if anyone has some good arguments in LUA's favor.
        
        Charles Steinkuehler
        [EMAIL PROTECTED]
        
        
        
        -------------------------------------------------------
        This sf.net email is sponsored by: OSDN - Tired of that same old
        cell phone?  Get a new here for FREE!
        https://www.inphonic.com/r.asp?r=sourceforge1&refcode1=vs3390
        
        _______________________________________________
        Leaf-devel mailing list
        [EMAIL PROTECTED]
        https://lists.sourceforge.net/lists/listinfo/leaf-devel
        

+,~wzf+,좷o#
h~ZƦz]qe'xgjw~DA!l0)醉q&(~{Z}{[t-uޖf)+--uޖX(~zwilqzlX)ߣ^i^


Reply via email to