[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Is Guile Useful to a Scheme Noob
From: |
Neil Jerram |
Subject: |
Re: Is Guile Useful to a Scheme Noob |
Date: |
Fri, 18 Dec 2009 00:42:53 +0000 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/23.1 (gnu/linux) |
"Andrew C. Suttles" <address@hidden> writes:
> I know this is going to sound troll-ish, but I really don't mean for it to be.
> I have been an Emacs user for quite some time and I've learned to hack my way
> around ELSIP some. I'd like to make a structured attempt to learn LISP(ish)
> programming and read SICP (etc) and so I searched the net and installed PLT.
> I
> recently re-stumbled across Guile and I'm wondering if I should give it
> another
> try. I like that I have the guile manual available in my Emacs info browser
> and
> I like that Guile can handle Elisp (though I'm not sure how I would ever use
> it
> that way). I always thought Guile's only useful domain was as an extension
> language.
That is its nominal purpose, but there isn't really a clearcut line
between use as an extension language and use for "standalone apps".
Both involve a mixture of C and Scheme code.
If we must try to draw a line, the question that occurs to me is "what
language is the main loop written in?" But I don't think that's really
meaningful. I can imagine a program with application-specific
primitives written in C, and lots of higher-level logic in Scheme, and
where moving the main loop from Scheme to C (or vice versa) would change
only an insignificant fraction of the program.
To try to be a bit more helpful: from a free software / GNU project
point of view, I think the ideal is that application developers should
try to write both
- a complete and consistent library of application-domain primitives,
which could be loaded and used by any instance of Guile
- a main program that uses that library and presents their favoured UI.
> 1) Is Guile used by anyone to create standalone apps,
Yes, certainly.
> or is it primarily an
> language to be imbedded into other language apps?
Covered above.
> Given that it cannot be
> compiled to native code,
True, but that's on the (mental) roadmap.
> I'd assume it's mainly used for light scripting and the
> extension language stuff.
I think that just begs the definition of "light". Someone may have a
Guile app that runs for a week - which would be fine if they only need
its output once a week.
> 2) Is it possible to use Guile on MS Windows apart from cygwin?
Yes, I believe so. The mingw32 cross-compiler successfully builds Guile
1.8.7 (build log at http://www.ossau.uklinux.net/guile/snapshots/).
However I haven't recently tested that the built executable and DLLs
work.
We don't yet have a successful cross-compile of Guile's master branch -
i.e. which will become Guile 2.0 - but that should happen in the next
few months.
> I've seen the GOOP and ECMAScript stuff and I read a quote to the affect that
> Guile is more CL-like than other Scheme impelementations (whatever
> that means),
It means that Guile is trying to retain its dynamic nature -
i.e. supporting interactive programming within a running Guile system -
at the same time as improving compilation (currently to a virtual
machine bytecode). Some Scheme implementations, and arguably R6RS,
apparently focus on compilation at the expense of interactivity.
> so I'm interested, but if I'd be better off sticking with something more
> noob-oriented and library intensive (as a beginner) like PLT, I'd be happy to
> continue my current trajectory.
Why not give Guile a quick try? I'm sure it should be able to interpret
SICP's code.
Regards,
Neil