* User perception on backward compatibility
@ 2010-01-21 10:54 Ludovic Courtès
2010-01-21 12:42 ` Thien-Thi Nguyen
2010-01-21 15:09 ` Mike Gran
0 siblings, 2 replies; 9+ messages in thread
From: Ludovic Courtès @ 2010-01-21 10:54 UTC (permalink / raw)
To: guile-devel
Hello!
I think the next big task will be to list and try to reduce
incompatibilities compared to 1.8.
For the record, here’s what I found in GNU Dico; it’s interesting to see
how its maintainer feels about backward compatibility in Guile:
http://mail.gnu.org.ua/archives/html/public/bug-dico/threads.html#00000
Thanks,
Ludo’.
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: User perception on backward compatibility
2010-01-21 10:54 User perception on backward compatibility Ludovic Courtès
@ 2010-01-21 12:42 ` Thien-Thi Nguyen
2010-01-21 14:27 ` Ludovic Courtès
2010-01-21 15:09 ` Mike Gran
1 sibling, 1 reply; 9+ messages in thread
From: Thien-Thi Nguyen @ 2010-01-21 12:42 UTC (permalink / raw)
To: guile-devel
() ludo@gnu.org (Ludovic Courtès)
() Thu, 21 Jan 2010 11:54:51 +0100
I think the next big task will be to list and try to reduce
incompatibilities compared to 1.8.
Yes, please.
At the moment, i would ask you to look at the guile-user message
w/ subject "(define ((f a) b) ...)".
thi
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: User perception on backward compatibility
2010-01-21 12:42 ` Thien-Thi Nguyen
@ 2010-01-21 14:27 ` Ludovic Courtès
2010-01-21 20:14 ` Neil Jerram
0 siblings, 1 reply; 9+ messages in thread
From: Ludovic Courtès @ 2010-01-21 14:27 UTC (permalink / raw)
To: guile-devel
Hi,
Thien-Thi Nguyen <ttn@gnuvola.org> writes:
> At the moment, i would ask you to look at the guile-user message
> w/ subject "(define ((f a) b) ...)".
I didn’t reply on the grounds that Andy may have his views on this. :-)
Thanks,
Ludo’.
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: User perception on backward compatibility
2010-01-21 10:54 User perception on backward compatibility Ludovic Courtès
2010-01-21 12:42 ` Thien-Thi Nguyen
@ 2010-01-21 15:09 ` Mike Gran
2010-01-21 16:04 ` Ludovic Courtès
` (2 more replies)
1 sibling, 3 replies; 9+ messages in thread
From: Mike Gran @ 2010-01-21 15:09 UTC (permalink / raw)
To: Ludovic Courtès, guile-devel
> From: Ludovic Courtès <ludo@gnu.org>
>
> Hello!
>
> I think the next big task will be to list and try to reduce
> incompatibilities compared to 1.8.
>
> For the record, here’s what I found in GNU Dico; it’s interesting to see
> how its maintainer feels about backward compatibility in Guile:
>
> http://mail.gnu.org.ua/archives/html/public/bug-dico/threads.html#00000
Guile's API has always fairly incompatibly from revision to
revision. Each rev always requires a significant rewrite of the glue
code in Guile-using projects.
Just in the time that I've been using Guile, I've used four different
functions to convert an integer into a guile number: gh_int2scm,
SCM_MAKINUM, scm_int2num, scm_from_int.
A lot of projects have their own Guile compatibility layers to map
current practice to a consistent API: AutoGen, Geda, even Gucu.
Maybe we need a gnulib-like project for guile ;-)
So, yeah, reducing incompatibilities might be nice.
Thanks,
Mike
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: User perception on backward compatibility
2010-01-21 15:09 ` Mike Gran
@ 2010-01-21 16:04 ` Ludovic Courtès
2010-01-21 16:57 ` Sergey Poznyakoff
2010-01-22 14:26 ` Peter Brett
2 siblings, 0 replies; 9+ messages in thread
From: Ludovic Courtès @ 2010-01-21 16:04 UTC (permalink / raw)
To: Mike Gran; +Cc: guile-devel
Hi Mike,
Mike Gran <spk121@yahoo.com> writes:
> Guile's API has always fairly incompatibly from revision to
> revision. Each rev always requires a significant rewrite of the glue
> code in Guile-using projects.
s/revision/major version/. Fortunately, major versions are pretty rare,
but I get your point, of course.
> Just in the time that I've been using Guile, I've used four different
> functions to convert an integer into a guile number: gh_int2scm,
> SCM_MAKINUM, scm_int2num, scm_from_int.
That’s partly because until 1.8, and to a lesser extent now, there has
been a poor separation between the internal API and the public API,
along with incomplete documentation. I think 1.8 has been a noticeable
improvement on both fronts, and we can probably do better
(‘SCM_INTERNAL’ and the GNU ld version script are good tools to formally
separate public from private APIs and version them.)
> A lot of projects have their own Guile compatibility layers to map
> current practice to a consistent API: AutoGen, Geda, even Gucu.
>
> Maybe we need a gnulib-like project for guile ;-)
Heh.
> So, yeah, reducing incompatibilities might be nice.
I sympathize and encourage people to report (and fix) incompatibilities
introduced in 1.9. :-)
Looking at http://hydra.nixos.org/jobset/nixpkgs/guile2test already
gives a good idea of things to look at.
Thanks,
Ludo’.
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: User perception on backward compatibility
2010-01-21 15:09 ` Mike Gran
2010-01-21 16:04 ` Ludovic Courtès
@ 2010-01-21 16:57 ` Sergey Poznyakoff
2010-01-22 14:26 ` Peter Brett
2 siblings, 0 replies; 9+ messages in thread
From: Sergey Poznyakoff @ 2010-01-21 16:57 UTC (permalink / raw)
To: Mike Gran; +Cc: Ludovic Courtès, guile-devel
Mike Gran <spk121@yahoo.com> ha escrit:
> Maybe we need a gnulib-like project for guile ;-)
Oh, no. That'd be an overkill, really :^) But retaining the old
interfaces for at least a couple of revisions, since introduction of
the new ones, will be very helpful (the current practice of
issuing deprecation warnings is quite OK).
Regards,
Sergey
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: User perception on backward compatibility
[not found] <cmu-lmtpd-30631-1264093887-1@mail-imap1.uio.no>
@ 2010-01-21 17:36 ` Kjetil S. Matheussen
0 siblings, 0 replies; 9+ messages in thread
From: Kjetil S. Matheussen @ 2010-01-21 17:36 UTC (permalink / raw)
To: guile-devel
Thien-Thi Nguyen:
>
> I think the next big task will be to list and try to reduce
> incompatibilities compared to 1.8.
>
> Yes, please.
>
> At the moment, i would ask you to look at the guile-user message
> w/ subject "(define ((f a) b) ...)".
>
I agree about this. IMO it's very elegant, and also
(probably) the simplest way to expand define:
(define-macro (define def . rest)
(if (pair? def)
`(define ,(car def)
(lambda ,(cdr def)
,@rest))
`(internal-define ,def ,@rest)))
=> (macroexpand '(define ((f a) b) ...))
(internal-define f (lambda (a) (lambda (b) ...)))
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: User perception on backward compatibility
2010-01-21 14:27 ` Ludovic Courtès
@ 2010-01-21 20:14 ` Neil Jerram
0 siblings, 0 replies; 9+ messages in thread
From: Neil Jerram @ 2010-01-21 20:14 UTC (permalink / raw)
To: Ludovic Courtès; +Cc: guile-devel
ludo@gnu.org (Ludovic Courtès) writes:
> Hi,
>
> Thien-Thi Nguyen <ttn@gnuvola.org> writes:
>
>> At the moment, i would ask you to look at the guile-user message
>> w/ subject "(define ((f a) b) ...)".
>
> I didn’t reply on the grounds that Andy may have his views on this. :-)
I think it just needs a bit of define-syntax.
As it happens, the definition of define-public has the required form:
(define-syntax define-public
(syntax-rules ()
((_ (name . args) . body)
(define-public name (lambda args . body)))
((_ name val)
(begin
(define name val)
(export name)))))
and it works:
scheme@(guile-user)> (define-public ((f a) b) (* a b))
scheme@(guile-user)> (f 2)
#<program a117550 (b)>
scheme@(guile-user)> ((f 2) 3)
6
But I completely agree that we want `define' to support that too, `out
of the box'.
What is the correct way of writing something like this in boot-9.scm?
(define-syntax primitive-define define)
(define-syntax define
(syntax-rules ()
((_ (name . args) . body)
(define name (lambda args . body)))
((_ name val)
(begin
(primitive-define name val)
(export name)))))
Regards,
Neil
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: User perception on backward compatibility
2010-01-21 15:09 ` Mike Gran
2010-01-21 16:04 ` Ludovic Courtès
2010-01-21 16:57 ` Sergey Poznyakoff
@ 2010-01-22 14:26 ` Peter Brett
2 siblings, 0 replies; 9+ messages in thread
From: Peter Brett @ 2010-01-22 14:26 UTC (permalink / raw)
To: guile-devel
Mike Gran <spk121@yahoo.com> writes:
> A lot of projects have their own Guile compatibility layers to map
> current practice to a consistent API: AutoGen, Geda, even Gucu.
gEDA 1.6.x doesn't have a compatibility layer -- we only support Guile
1.8.x at the moment. However, we're still using a bunch of API that's
deprecated in 1.8.x.
OTOH if there are major changes in the C API in 2.x (particularly the
mechanisms for converting strings and numbers to/from SCM
representation) I will likely go postal.
Peter
--
Peter Brett <peter@peter-b.co.uk>
Remote Sensing Research Group
Surrey Space Centre
^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2010-01-22 14:26 UTC | newest]
Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-01-21 10:54 User perception on backward compatibility Ludovic Courtès
2010-01-21 12:42 ` Thien-Thi Nguyen
2010-01-21 14:27 ` Ludovic Courtès
2010-01-21 20:14 ` Neil Jerram
2010-01-21 15:09 ` Mike Gran
2010-01-21 16:04 ` Ludovic Courtès
2010-01-21 16:57 ` Sergey Poznyakoff
2010-01-22 14:26 ` Peter Brett
[not found] <cmu-lmtpd-30631-1264093887-1@mail-imap1.uio.no>
2010-01-21 17:36 ` Kjetil S. Matheussen
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).