* Emacs-like file buffers
@ 2006-05-07 7:18 Jason Meade
2006-05-07 19:02 ` Rob Browning
0 siblings, 1 reply; 11+ messages in thread
From: Jason Meade @ 2006-05-07 7:18 UTC (permalink / raw)
Under the "Cool Ideas" section of the Guile website, Emacs-like
buffers are mentioned. I'm thinking this would be a really useful
library, even independent of Guile. Once such a library is built, then
extending it into guile shouldn't be too much extra effort.
Is anyone actively pursuing this? If so, I'd be interested in
assisting. If not, then I plan to give a shot at this independently.
:)
As a start I see a need for:
* In-memory string (including binary string?) buffers
* buffer->string (and vice-versa) features (including splitting & tokenizing)
* Point based search/replace/insert/delete/copy facilities
* Full regular expression support (this touches upon another wish-list item)
* File I/O encapsulation
If anyone has any additional info on this topic, then I'd like to hear about it.
Thanks
-Jason
_______________________________________________
Guile-devel mailing list
Guile-devel@gnu.org
http://lists.gnu.org/mailman/listinfo/guile-devel
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: Emacs-like file buffers
2006-05-07 7:18 Emacs-like file buffers Jason Meade
@ 2006-05-07 19:02 ` Rob Browning
2006-05-08 23:42 ` Kevin Ryde
0 siblings, 1 reply; 11+ messages in thread
From: Rob Browning @ 2006-05-07 19:02 UTC (permalink / raw)
Cc: guile-devel
"Jason Meade" <jemeade@gmail.com> writes:
> Under the "Cool Ideas" section of the Guile website, Emacs-like
> buffers are mentioned. I'm thinking this would be a really useful
> library, even independent of Guile. Once such a library is built,
> then extending it into guile shouldn't be too much extra effort.
>
> Is anyone actively pursuing this? If so, I'd be interested in
> assisting. If not, then I plan to give a shot at this independently.
> :)
If there's still a chance that Guile might eventually be used by
Emacs, then it would probably make sense to consider both Emacs
buffers and Emacs regular expressions when trying to decide what to
do, and even if there isn't a chance, Emacs is still a significant
precedent.
Also, you might want to look at Thien-Thi Nguyen's ttn-pers-scheme to
see if "Editing Buffers" are relevant. I don't know enough to comment
either way.
> * Full regular expression support (this touches upon another
> wish-list item)
I would really like to see Guile provide a fixed regular expression
format, one that doesn't vary depending on what the build platform has
available. Without that, you cannot write scripts that are portable,
at least not with respect to regular expressions.
Relevant questions:
- How is the addition of support for Unicode likely to affect any
regular expression or buffer work?
- What well-known form of regular expressions should be chosen -
POSIX, Emacs, Perl?
- Is it acceptable to add an external dependency for regular
expression suppport, or does the implementation need to be in
Guile's source tree? Note that the latter choice doesn't
necessarily rule out using an existing library if, for example,
the author of the library is willing to allow the inclusion of the
code in Guile.
Hope this helps.
--
Rob Browning
rlb @defaultvalue.org and @debian.org; previously @cs.utexas.edu
GPG starting 2002-11-03 = 14DD 432F AE39 534D B592 F9A0 25C8 D377 8C7E 73A4
_______________________________________________
Guile-devel mailing list
Guile-devel@gnu.org
http://lists.gnu.org/mailman/listinfo/guile-devel
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: Emacs-like file buffers
2006-05-07 19:02 ` Rob Browning
@ 2006-05-08 23:42 ` Kevin Ryde
2006-05-09 0:50 ` Rob Browning
0 siblings, 1 reply; 11+ messages in thread
From: Kevin Ryde @ 2006-05-08 23:42 UTC (permalink / raw)
Cc: guile-devel
Rob Browning <rlb@defaultvalue.org> writes:
>
> I would really like to see Guile provide a fixed regular expression
> format, one that doesn't vary depending on what the build platform has
> available. Without that, you cannot write scripts that are portable,
> at least not with respect to regular expressions.
If you assume you've got mostly posix then it's not too bad is it?
> - How is the addition of support for Unicode likely to affect any
> regular expression or buffer work?
You actually get utf8 or whatever matching already if you "setlocale"
into such a charset. A bit of a trap if your strings are in one
charset and it's being interpreted in another.
> - What well-known form of regular expressions should be chosen -
> POSIX, Emacs, Perl?
The perl way has its fans. I guess an add-on that let you get that
instead or as well as the basic posix bits might be cute.
> - Is it acceptable to add an external dependency for regular
> expression suppport,
It might have to be LGPL to maintain that status on the resulting
program.
_______________________________________________
Guile-devel mailing list
Guile-devel@gnu.org
http://lists.gnu.org/mailman/listinfo/guile-devel
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: Emacs-like file buffers
2006-05-08 23:42 ` Kevin Ryde
@ 2006-05-09 0:50 ` Rob Browning
2006-05-13 1:55 ` Kevin Ryde
0 siblings, 1 reply; 11+ messages in thread
From: Rob Browning @ 2006-05-09 0:50 UTC (permalink / raw)
Cc: guile-devel
Kevin Ryde <user42@zip.com.au> writes:
> Rob Browning <rlb@defaultvalue.org> writes:
>>
>> I would really like to see Guile provide a fixed regular expression
>> format, one that doesn't vary depending on what the build platform has
>> available. Without that, you cannot write scripts that are portable,
>> at least not with respect to regular expressions.
>
> If you assume you've got mostly posix then it's not too bad is it?
My impression was that Guile just uses whatever library it finds on
the system (if any), and that the library found might or might not be
POSIX compliant. If that's correct, then I'd much rather have an
arrangement where we know exactly what kind of regular expressions
Guile will provide on *any* host system.
As motivation, imagine you're using Guile to write a cross-platform
tool that will need to use regular expressions to build a list of
files to pass to the equivalent of "rm -rf".
>> POSIX, Emacs, Perl?
>
> The perl way has its fans. I guess an add-on that let you get that
> instead or as well as the basic posix bits might be cute.
A while back I actually hacked up a preliminary (use-modules (pcre)).
(I probably still have the source around here somewhere.)
>> - Is it acceptable to add an external dependency for regular
>> expression suppport,
>
> It might have to be LGPL to maintain that status on the resulting
> program.
Right, though the main concern I was trying to raise was that, as it
stands now, Guile has very few external dependencies, and so we should
probably consider carefully the merit of adding any given new
dependency.
--
Rob Browning
rlb @defaultvalue.org and @debian.org; previously @cs.utexas.edu
GPG starting 2002-11-03 = 14DD 432F AE39 534D B592 F9A0 25C8 D377 8C7E 73A4
_______________________________________________
Guile-devel mailing list
Guile-devel@gnu.org
http://lists.gnu.org/mailman/listinfo/guile-devel
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: Emacs-like file buffers
2006-05-09 0:50 ` Rob Browning
@ 2006-05-13 1:55 ` Kevin Ryde
2006-05-13 4:08 ` Rob Browning
0 siblings, 1 reply; 11+ messages in thread
From: Kevin Ryde @ 2006-05-13 1:55 UTC (permalink / raw)
Cc: guile-devel
Rob Browning <rlb@defaultvalue.org> writes:
>
> - How is the addition of support for Unicode likely to affect any
> regular expression or buffer work?
Oh, I see what you mean. Yes, no doubt a utf-8 aware regexp library
would be needed.
To turn around what I said about glibc, glibc in the right setlocale
does it, but I think it'd depend on having and finding a utf-8 locale
that's been enabled in locale.gen (or wherever). Switching back and
forward with setlocale would no doubt be as horrible as the same thing
we do with tzset, though when I measured it setlocale was pretty fast
(unlike tzset).
> My impression was that Guile just uses whatever library it finds on
> the system (if any), and that the library found might or might not be
> POSIX compliant. If that's correct, then I'd much rather have an
> arrangement where we know exactly what kind of regular expressions
> Guile will provide on *any* host system.
I'd probably only go so far as help someone link to a decent library,
a "--with" option on configure or whatever. Non-posix libc would
probably hurt many programs so you could argue guile needn't try too
hard to overcome it.
> A while back I actually hacked up a preliminary (use-modules (pcre)).
> (I probably still have the source around here somewhere.)
That sounds good as an add-on.
_______________________________________________
Guile-devel mailing list
Guile-devel@gnu.org
http://lists.gnu.org/mailman/listinfo/guile-devel
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: Emacs-like file buffers
2006-05-13 1:55 ` Kevin Ryde
@ 2006-05-13 4:08 ` Rob Browning
[not found] ` <9c4a82e00605122309g6f3e061etd702479d88664b96@mail.gmail.com>
0 siblings, 1 reply; 11+ messages in thread
From: Rob Browning @ 2006-05-13 4:08 UTC (permalink / raw)
Kevin Ryde <user42@zip.com.au> writes:
> Rob Browning <rlb@defaultvalue.org> writes:
>> My impression was that Guile just uses whatever library it finds on
>> the system (if any), and that the library found might or might not be
>> POSIX compliant. If that's correct, then I'd much rather have an
>> arrangement where we know exactly what kind of regular expressions
>> Guile will provide on *any* host system.
>
> I'd probably only go so far as help someone link to a decent library,
> a "--with" option on configure or whatever. Non-posix libc would
> probably hurt many programs so you could argue guile needn't try too
> hard to overcome it.
I still think there's quite a lot to be said for the fact that in Perl
(and I assume Python) you can write the equivalent of
(if (regex-match FOO filename)
(rm-rf filename))
and know for *sure* that according to the official documentation
(barring an implementation bug) you will get the exact same behavior
on every supported platform.
Frankly, without some guarantee like that, I would think twice about
trying to write regular expression based, cross-platform scripts (in
particular, destructive programs) using Guile.
Of course if we could add a mandatory, full POSIX regular expression
test suite to make check (whenever regular expressions are available),
then that, along with suitable documentation, would be one way to
solve the problem.
--
Rob Browning
rlb @defaultvalue.org and @debian.org; previously @cs.utexas.edu
GPG starting 2002-11-03 = 14DD 432F AE39 534D B592 F9A0 25C8 D377 8C7E 73A4
_______________________________________________
Guile-devel mailing list
Guile-devel@gnu.org
http://lists.gnu.org/mailman/listinfo/guile-devel
^ permalink raw reply [flat|nested] 11+ messages in thread
end of thread, other threads:[~2006-05-19 12:12 UTC | newest]
Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-05-07 7:18 Emacs-like file buffers Jason Meade
2006-05-07 19:02 ` Rob Browning
2006-05-08 23:42 ` Kevin Ryde
2006-05-09 0:50 ` Rob Browning
2006-05-13 1:55 ` Kevin Ryde
2006-05-13 4:08 ` Rob Browning
[not found] ` <9c4a82e00605122309g6f3e061etd702479d88664b96@mail.gmail.com>
[not found] ` <87ejyx37af.fsf@trouble.defaultvalue.org>
[not found] ` <9c4a82e00605131824v23a934dah1404210beb57e1b3@mail.gmail.com>
2006-05-14 1:27 ` Fwd: " Jason Meade
2006-05-14 14:58 ` Bruce Korb
2006-05-14 22:34 ` Kevin Ryde
2006-05-14 22:11 ` Kevin Ryde
2006-05-19 12:12 ` Regular expressions Ludovic Courtès
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).