bug-mes
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Gash on Mes


From: Timothy Sample
Subject: Gash on Mes
Date: Sat, 30 Apr 2022 10:19:04 -0600
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux)

Hi bug-mes!

Now that we have working modules, I took a look at getting Gash running
on Mes.  For the most part, it’s going very well!  I can already launch
a shell and run built-ins and simple commands.  This means that Gash’s
parser, backend, evaluator, and built-ins are working.  They certainly
don’t work well, but I’m happy to see them all pass a smoke test.

The Mes branch is wip-gash:

    https://git.savannah.gnu.org/cgit/mes.git/log/?h=wip-gash

and the Gash branch is wip-modular-mes:

    https://git.savannah.nongnu.org/cgit/gash.git/log/?h=wip-modular-mes

You can run Gash by setting up a launching script:

    (use-modules ((gash gash) #:prefix gash:))

    (set-current-input-port 0)
    (gash:main '())

and invoking the script like this (setting the path to Gash
appropriately):

    MES_ARENA=10000000                  \
    MES_BOOT=mes/module/mes/boot-5.scm  \
    GUILE_LOAD_PATH=../gash             \
    ./pre-inst-env mes-gcc ./gash.scm

You should be greeted with a “$”.  Most expressions will cause a crash,
but simple commands and built-ins work (try ‘ls’ or ‘pwd’).

(As an aside, did you notice how the ‘#:prefix’ keyword just works?
It’s nice how many of Guile’s niceties the Mes module system has,
including ‘@’ and ‘@@’.)

So far I’m only testing with the GCC build of Mes.  The first commit on
wip-gash disables M2-Planet completely.  The reason for this is I’m not
sure it makes sense to add all the new POSIX interfaces needed for Gash
to the M2 build of Mes.  Maybe it’s easier to bootstrap Mes first and
then run Gash on the MesCC build of Mes.  Newer versions of M2 support
conditional compilation, so it would be straightforward to omit some
POSIX-heavy Mes built-ins when building with M2 provided we can use an
updated version.  Thoughts?

The other thing to note is that I’m putting a bunch of shims in Gash,
since it already has a compatibility layer for different versions of
Guile.  I adapted that to work with Mes, too, and it’s really easy to
just fix things at that layer.  I think that a lot of the shims should
end up in Mes itself, but since the compatibility layer works well
enough, there’s no urgency there.


-- Tim



reply via email to

[Prev in Thread] Current Thread [Next in Thread]