[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: variable command interpretter
From: |
seba |
Subject: |
Re: variable command interpretter |
Date: |
Tue, 19 Jun 2001 21:31:36 +0000 |
I agree??????????
--
Mark Un
c/o Mark William Sebastian Ban
address@hidden
address@hidden - emails
(202) 756-4101 x1620 - voicemail/fax
http://64.70.208.116 ,and also as a gift.......
http://pioussa.tripod.com/pious.htm
---- Evan Prodromou <address@hidden> wrote:
> >>>>> "PE" == Paul Emsley <address@hidden> writes:
>
> PE> Do I take it then that it can't be done today - but I
> PE> should relax and let them choose python in the knowledge that
> PE> sometime in the future I will be able drop python and link
> PE> with guile and python-> guile?
>
> Two things, really quickly. First, if you really want to have custom
> syntax for your particular system, you should use Guile. Guile, like
> most Schemes, has a language extension mechanism, so you can actually
> make up new language primitives that will be more fit to your system.
>
> For example, you might be able to define a syntax that does something
> like:
>
> (define-molecule water H-O-H) ; Does all the hard stuff
>
> (molecular-weight water) => 18 ; or whatever... uh.
> (covalent-bonds water) => 2 ; again
> (charge water) => 0
>
> (define-molecule stuff H=C-C=O-P) ; Over my head here B-)
>
> (mix-with stuff H+Cl-)
>
> (add NaCl H20) => (NaOH HCl)
>
> In this example, I used a format that chemists would actually
> understand more easily (I think -- not a chemist myself, obviously
> --
> roughly high-school level chem there) to define the molecule. Because
> Scheme lets you extend the language, the "define-molecule" macro I
> wrote there becomes a new part of your "chemistry language."
>
> Second, why not start with Guile, and then let them use a
> Python-language compatibility module in the future? B-) Seriously,
> Python programmers tend to pick up lisp-like languages pretty easily.
>
> ~ESP
>
> --
> Evan Prodromou
> address@hidden
>
> _______________________________________________
> Guile-user mailing list
> address@hidden
> http://mail.gnu.org/mailman/listinfo/guile-user
>
__________________________________________________
FREE voicemail, email, and fax...all in one place.
Sign Up Now! http://www.onebox.com