Re: Interpreted language(s) in the base

From: C. P. Ghost <cpghost_at_cordula.ws>
Date: Thu, 19 Aug 2010 20:35:59 +0200
On Thu, Aug 19, 2010 at 7:22 PM, Bakul Shah <bakul_at_bitblocks.com> wrote:
> +1 for Scheme! It has a lot in its favor (see below).
>
> But this is an abstract discussion. Until there are plenty of
> useful system scripts (in one of these languages) that people
> really want, nothing is going to change.

Yes, it's abstract: I want my bikeshed named Gauche (lang/gauche): ;-)

http://practical-scheme.net/gauche/

But seriously, the point isn't so much which specific interpreter
we use (if we go down this road), it's about libraries: most
sysadmin tasks require some basic networking and I/O,
and a FFI to seamlessly call out C functions from .so libs.
Ideally a shell with a REPL loop, but even that isn't strictly
necessary for the scripts.

And, of course, instead of writing 1,001 sysadmin scripts
with endless code duplication and reinventing of the wheel,
common sysadmin tasks should also be made into reusable
functions, grouped into modules.

We're talking about a major task here, and no matter if it
will be in the base or as a port, it's something that will take
some time to emerge, so it's not a realistic option in the
short (or even middle) term.

> There is no reason to wait until something is in the base.
> And we don't have to argue about which language. I would
> suggest setting up a wiki page to list all the system scripts
> people want to write and get cracking in your favorite
> language! May the best effort win :-) At the very least we
> will get some useful tools out of this effort.  I will
> certainly help out with Scheme.

Funny idea. I only hope we won't end up with a typical
post-dot-com young developer distribution, a la:

  60% PHP (yuck!)
  25% Java (and XML-everywhere)
  15% ${OTHERS}

;-)

> Scheme has many interpreters & compilers so you can write
> Scheme scripts to be interpreted and at some point compile
> them for better performance if necessary. Scheme has some
> excellent text books, a precise definition for a given
> standard, it changes slowly, has IDEs and so on. If you stick
> to the R4RS subset, almost every scheme interprpter/compiler
> will handle it.  It has a very powerful macro facility.  Its
> interpreters can be very small. s9fes and tinyscheme for
> example are about 5K lines of C code each.  "Stalin" compiles
> Scheme to some extremely tight C code by doing global program
> analysis.  And there are many other systems in between.  slib
> is a library of a lot of useful packages that can be used
> with most Schemes.  Many of these interpreters can be used
> from C/C++.  Many provide a C-FFI to call C functions.
> Tinyscheme packages all of Scheme state in a single structure
> so one can easily create a separate Scheme interpreter per
> thread.  There is even a vi clone written in 4K lines s9fes
> Scheme!  Still beta but already useful.
>
> These many choices can be very confusing but we can pick one
> and stick to writing R4RS portable Scheme code.

Yes, but see above w.r.t. the needed library. And, again, it's
an academic discussion, as much as I'd love to do sysadmin
scripts in Scheme myself.

-cpghost.

-- 
Cordula's Web. http://www.cordula.ws/
Received on Thu Aug 19 2010 - 16:36:00 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:40:06 UTC