This is the mail archive of the guile@cygnus.com mailing list for the guile project.
| Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
|---|---|---|
| Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |
Jay Glascoe <jglascoe@jay.giss.nasa.gov> writes:
> yeah, for instance, the Scandinavians (?) are absolutely mad about Erlang.
> comp.lang.functional FAQ: "Erlang is a dynamically typed concurrent
> functional programming language for large industrial real-time systems."
>
> but what I really want is a high-level (very or not ;) language for gluing
> my C extensions together, i.e. "Guile".
But since I'm assuming we all want a well developed scheme envrionment
that is not trapped by it's own homogeneity, not a bloated
parenthetical beast of a compromise with the world of
machine-specialized assemblers, we need to tread carefully along the
edges of scheme.
I think it's crucial that guile be capable of incorporating the rest
of the world into itself without crumbling. I think this requires
careful design of the module system, and the interface to alien object
code.
CMUCL has a interesting alien interface, which allows you to describe
different values, and functions, all in lisp. This means I can attach
to alien libraries without having to write any foreign code, or at most a
minimal amount. I had a working, but incomplete ncurses interface in
about a night with it. This seems congruent with Jim's idea of having
an ABI aware foreign data manipulation "library". Here is an example
from the cmucl manual:
<startquote>
Alien types have a description language based on nested list structure. For
example:
struct foo {
int a;
struct foo *b[100];
};
has the corresponding Alien type:
(struct foo
(a int)
(b (array (* (struct foo)) 100)))
</endquote>
So you create Alien types, which are integrated with the rest of the
type system.
> I'm not sure I follow. In python I can do
>
> import math
> def area(r):
> return math.pi pow(r, 2)
>
> In Guile I would *like* to do, i.e
>
> (uses-modules (core math))
> (define area (r)
> (* math:pi (expt r 2)))
>
> (and maybe I can? I have no idea how Guile's module system works.)
Presently there is not support in the reader to handle that. I
believe you can do it with the low level module, I think
(module-symbol-binding module symbol &opt value), but I havent tried
it myself.
Jim has said that he wants to support this type of name space.
> I'm sure some whiz-bang elisp hacker can whip up some special Guile mode
> for emacs.
I believe someone is, and basing it on ilisp, which is nice.