guile-user
[Top][All Lists]
Advanced

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

Re: idea: create module


From: Jon Wilson
Subject: Re: idea: create module
Date: Mon, 01 May 2006 23:08:03 -0500
User-agent: Mozilla Thunderbird 1.0.2 (X11/20050324)

Hi Neil,

Neil Jerram wrote:

I still think that something within the language would be useful,

Jon,

You may well be right.  Although my initial thought was to see it as
more natural to run guile within an editor (or some kind of IDE, more
generally), having the other way round available as well could be very
useful.  For example when one only has a terminal to work with.

Actually, until recently, the thought to run it in an editor had not occured to me. I've been running vi in one screen and guile in another...


I think a key question is what would you want to write out?  Would it
be a verbatim transcript of what was typed in, or would it be somehow
"improved" - e.g. by eliminating previous definitions of the same name
and/or trivial non-definitions?  Possibly even pretty-printed?


My preference list:
1. Pretty-printed version of what was typed in.
2. Verbatim typed in.
3. pretty-printed values which are currently in all symbols marked for export.
4. values of export symbols.

I suspect that verbatim transcript would be rather wasteful of the REPL's memory, but if there's a good way to do it that I don't immediately see, then I think that would be best. Otherwise we might wind up with modules which were utterly unmaintainable because module writers just got lazy and stuck with the memoized version of functions and such.

3 and 4 would be sufficient I think for quick and dirty work. 1 might be good enough for release code.

Hmm. As I finish writing this, I think "but aren't we already storing everything typed, provided readline is activated?" So maybe 1 and 2 aren't that memory intensive after all. Is there an easy way to access the readline history from guile?

Regards,
Jon




reply via email to

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