Re: [PATCH] Avoid `SCM_VALIDATE_LIST ()'

2008-09-10 Thread Neil Jerram
2008/9/9 Ludovic Courtès <[EMAIL PROTECTED]>: > Hi Neil, > > "Neil Jerram" <[EMAIL PROTECTED]> writes: > >> Snapshots as of now are up at >> http://www.ossau.uklinux.net/guile/snapshots, and I hope they will >> keep automagically appearing there. > > Looks good! I think you can already update the

Re: [PATCH] Avoid `SCM_VALIDATE_LIST ()'

2008-09-09 Thread Ludovic Courtès
Hi Neil, "Neil Jerram" <[EMAIL PROTECTED]> writes: > Snapshots as of now are up at > http://www.ossau.uklinux.net/guile/snapshots, and I hope they will > keep automagically appearing there. Looks good! I think you can already update the web page since the current link is broken anyway. Thanks!

Re: [PATCH] Avoid `SCM_VALIDATE_LIST ()'

2008-09-08 Thread Neil Jerram
2008/9/7 Neil Jerram <[EMAIL PROTECTED]>: > 2008/9/7 Ken Raeburn <[EMAIL PROTECTED]>: >> >> Still keeping it in the back of my mind, but first my attempts to use SVK to >> mirror the Emacs repository broke (naturally, after it had looked solid >> enough that I had switched to it for my Emacs develo

Re: [PATCH] Avoid `SCM_VALIDATE_LIST ()'

2008-09-08 Thread Ludovic Courtès
Hi, Clinton Ebadi <[EMAIL PROTECTED]> writes: > Perhaps a macro could be used instead (is it possible to pass entire > blocks of code to a macro using something like CYCLE_DETECTING({ > code ... }) in C?). Sure, something like `scm_i_for_each (element, list)' that expands to a tortoise-and-

Re: [PATCH] Avoid `SCM_VALIDATE_LIST ()'

2008-09-08 Thread Ludovic Courtès
Hello! "Neil Jerram" <[EMAIL PROTECTED]> writes: > I'm sorry but I'm still really struggling to see how this change helps us... Yes, I see... ;-) I'm taking it the other way: I can't see how one can argue for unneeded run-time overhead. > 2008/9/1 Ludovic Courtès <[EMAIL PROTECTED]>: >> You'

Re: [PATCH] Avoid `SCM_VALIDATE_LIST ()'

2008-09-07 Thread Clinton Ebadi
Han-Wen Nienhuys <[EMAIL PROTECTED]> writes: > Neil Jerram escreveu: >> 2008/9/2 Han-Wen Nienhuys <[EMAIL PROTECTED]>: >>> If you are doing memq? for something you already know to >>> somewhere in front of the list [...] >> >> Why would you do that? In two senses: >> >> 1. I know memq gives you

Re: [PATCH] Avoid `SCM_VALIDATE_LIST ()'

2008-09-07 Thread Han-Wen Nienhuys
Neil Jerram escreveu: > 2008/9/2 Han-Wen Nienhuys <[EMAIL PROTECTED]>: >> If you are doing memq? for something you already know to >> somewhere in front of the list [...] > > Why would you do that? In two senses: > > 1. I know memq gives you the tail of the list, but I usually use its > result o

Re: development goals (was: [PATCH] Avoid `SCM_VALIDATE_LIST ()')

2008-09-07 Thread Neil Jerram
2008/9/7 Han-Wen Nienhuys <[EMAIL PROTECTED]>: > > OK - I will admit that interpreter/GC hacking is cool, but on the > downside, when I try to do anything, the intertia/resistance I feel in > the community here is a big turnoff for me. Do you mean regarding releases (as you say more on below)? Or

Re: [PATCH] Avoid `SCM_VALIDATE_LIST ()'

2008-09-07 Thread Han-Wen Nienhuys
Neil Jerram escreveu: > Since you mention 'cleanups', I must say that I agree with Ludovic, > that it would have been preferable to post the patch for > review/discussion before committing it, since that is our (majority) > current practice. Sure there may have been a few exceptions, but only > fo

Re: [PATCH] Avoid `SCM_VALIDATE_LIST ()'

2008-09-07 Thread Neil Jerram
2008/9/7 Ken Raeburn <[EMAIL PROTECTED]>: > > Not if you want to build and install the full guile package and then link > emacs against libguile, which is how I've generally done it. Or if you want > to build both emacs and guile executables at once so you can test libguile > without the rest of e

Re: [PATCH] Avoid `SCM_VALIDATE_LIST ()'

2008-09-07 Thread Ken Raeburn
On Sep 7, 2008, at 11:24, Neil Jerram wrote: I'm using a Mac as my main machine these days. The Emacs unexec mechanism interacts badly with the Mac version of malloc, so Emacs uses its own version specially tailored to use Mac system allocation routines in a way that works with unexec. Guil

Re: [PATCH] Avoid `SCM_VALIDATE_LIST ()'

2008-09-07 Thread Neil Jerram
2008/9/7 Han-Wen Nienhuys <[EMAIL PROTECTED]>: > > Actually, since the couple of cleanups (or as some on this list like > to say: 'cleanups') I did, the GC has become a lot more simple. Actually I did get that impression, from my look so far at your cleanup patch - i.e. that it is now easier to un

Re: development goals (was: [PATCH] Avoid `SCM_VALIDATE_LIST ()')

2008-09-07 Thread Han-Wen Nienhuys
Andy Wingo escreveu: >> I am not using and enhancing GUILE primarily for fun. > > Then why do it? > > I'm serious. Because I take my (LilyPond) users serious. OK - I will admit that interpreter/GC hacking is cool, but on the downside, when I try to do anything, the intertia/resistance I feel i

Re: [PATCH] Avoid `SCM_VALIDATE_LIST ()'

2008-09-07 Thread Neil Jerram
Hi Ken, 2008/9/7 Ken Raeburn <[EMAIL PROTECTED]>: > > Still keeping it in the back of my mind, but first my attempts to use SVK to > mirror the Emacs repository broke (naturally, after it had looked solid > enough that I had switched to it for my Emacs development work), and now > Guile uses git,

Re: [PATCH] Avoid `SCM_VALIDATE_LIST ()'

2008-09-07 Thread Neil Jerram
2008/9/7 Han-Wen Nienhuys <[EMAIL PROTECTED]>: > > I am participating in GUILE since it is a foundation of LilyPond. As > far as I am concerned, it should be fast, bug-free, standards-compliant > and should not have any code that is so complex that it will bitrot when > its developer takes off. A

Re: [PATCH] Avoid `SCM_VALIDATE_LIST ()'

2008-09-07 Thread Han-Wen Nienhuys
Neil Jerram escreveu: > 2008/9/7 Han-Wen Nienhuys <[EMAIL PROTECTED]>: >> I am not using and enhancing GUILE primarily for fun. A large part of >> the lilypond architecture in written in it, and performance problems >> in GUILE often translate directly to problems in LilyPond. The reason >> I del

Re: [PATCH] Avoid `SCM_VALIDATE_LIST ()'

2008-09-07 Thread Andy Wingo
Hi, On Sun 07 Sep 2008 04:33, "Han-Wen Nienhuys" <[EMAIL PROTECTED]> writes: > I am not using and enhancing GUILE primarily for fun. Then why do it? I'm serious. > I feel using GUILE has been a big mistake -especially considering the > amount of time I sank into it. I seriously looked into mo

Re: [PATCH] Avoid `SCM_VALIDATE_LIST ()'

2008-09-07 Thread Neil Jerram
2008/9/7 Han-Wen Nienhuys <[EMAIL PROTECTED]>: > > I am not using and enhancing GUILE primarily for fun. A large part of > the lilypond architecture in written in it, and performance problems > in GUILE often translate directly to problems in LilyPond. The reason > I delved in the GC years ago wa

Re: [PATCH] Avoid `SCM_VALIDATE_LIST ()'

2008-09-07 Thread Neil Jerram
2008/9/7 Mikael Djurfeldt <[EMAIL PROTECTED]>: > > >From my experience, there was a huge improvement in scheme program > development time when we moved to real type-checking of lists from the > kind of type-checking you seem to want to re-introduce. It's much > easier to debug code if you can assum

Re: [PATCH] Avoid `SCM_VALIDATE_LIST ()'

2008-09-06 Thread Ken Raeburn
On Sep 1, 2008, at 16:30, Ludovic Courtès wrote: On a tangent, is anyone still seriously considering to run Emacs atop GUILE? There's Ken Reaburn's attempt at http://www.mit.edu/~raeburn/guilemacs/ , and there's also the Elisp support that's under `lang'. I don't think the former is really

Re: [PATCH] Avoid `SCM_VALIDATE_LIST ()'

2008-09-06 Thread Han-Wen Nienhuys
Mikael Djurfeldt escreveu: >> Yes, that's what I meant by "happily traverse circular lists". :-) > Having been part of Guile development for some time, it's sad to see > how much work is put into changing code back and forth due to > vacillating development goals. It's apparent how important it

Re: [PATCH] Avoid `SCM_VALIDATE_LIST ()'

2008-09-06 Thread Han-Wen Nienhuys
On Sat, Sep 6, 2008 at 7:45 PM, Neil Jerram <[EMAIL PROTECTED]> wrote: >>> Well, I remember having a flamewar with RMS about language agnosticism >>> and running emacs on GUILE about 8 years ago, and I don't think we >>> have progressed much since then. Extrapolating this pace, I think >>> it's a

Re: [PATCH] Avoid `SCM_VALIDATE_LIST ()'

2008-09-06 Thread Mikael Djurfeldt
2008/9/1 Ludovic Courtès <[EMAIL PROTECTED]>: >> Are you sure about traversing circular lists? From my reading of your >> patch, I would expect: >> >> (memq 'not-in-the-list some-circular-list) >> => >> (don't know, still waiting...) > > Yes, that's what I meant by "happily traverse circular lists

Re: [PATCH] Avoid `SCM_VALIDATE_LIST ()'

2008-09-06 Thread Neil Jerram
2008/9/5 Andy Wingo <[EMAIL PROTECTED]>: > I don't know why I'm answering this, but... > > On Thu 04 Sep 2008 17:10, Han-Wen Nienhuys <[EMAIL PROTECTED]> writes: > >> Well, I remember having a flamewar with RMS about language agnosticism >> and running emacs on GUILE about 8 years ago, and I don't

Re: [PATCH] Avoid `SCM_VALIDATE_LIST ()'

2008-09-06 Thread Neil Jerram
2008/9/4 Andy Wingo <[EMAIL PROTECTED]>: > > I think it makes a *lot* of sense to compile elisp to the VM. I don't > plan on doing so myself, but if the VM gets good enough, it could be > enhanced with the instructions that elisp needs, if any, and it would be > possible to run emacs lisp code, and

Re: [PATCH] Avoid `SCM_VALIDATE_LIST ()'

2008-09-06 Thread Neil Jerram
2008/9/2 Han-Wen Nienhuys <[EMAIL PROTECTED]>: > > If you are doing memq? for something you already know to > somewhere in front of the list [...] Why would you do that? In two senses: 1. I know memq gives you the tail of the list, but I usually use its result only as a true/false value Why woul

Re: [PATCH] Avoid `SCM_VALIDATE_LIST ()'

2008-09-06 Thread Neil Jerram
2008/9/2 Han-Wen Nienhuys <[EMAIL PROTECTED]>: > > What is the intended use case of running Elisp in GUILE ? Is anyone using it > for anything? I would like to have the GDS elisp code, running in Guile, displaying debugging information in Gtk (or Qt, or X) windows, without a full Emacs present.

Re: [PATCH] Avoid `SCM_VALIDATE_LIST ()'

2008-09-06 Thread Neil Jerram
Hi Ludovic, I'm sorry but I'm still really struggling to see how this change helps us... 2008/9/1 Ludovic Courtès <[EMAIL PROTECTED]>: > Hi Neil, > > "Neil Jerram" <[EMAIL PROTECTED]> writes: > >>> so that they >>> don't validate their input with `SCM_VALIDATE_LIST ()' since it's O(n). >> >> I'm

Re: [PATCH] Avoid `SCM_VALIDATE_LIST ()'

2008-09-06 Thread Neil Jerram
2008/9/1 Ludovic Courtès <[EMAIL PROTECTED]>: > > Han-Wen Nienhuys <[EMAIL PROTECTED]> writes: > >> On a tangent, is anyone still seriously considering to run Emacs atop GUILE? > > There's Ken Reaburn's attempt at http://www.mit.edu/~raeburn/guilemacs/ , > and there's also the Elisp support that's

Re: [PATCH] Avoid `SCM_VALIDATE_LIST ()'

2008-09-04 Thread Andy Wingo
I don't know why I'm answering this, but... On Thu 04 Sep 2008 17:10, Han-Wen Nienhuys <[EMAIL PROTECTED]> writes: > Well, I remember having a flamewar with RMS about language agnosticism > and running emacs on GUILE about 8 years ago, and I don't think we > have progressed much since then. Extr

Re: [PATCH] Avoid `SCM_VALIDATE_LIST ()'

2008-09-04 Thread Han-Wen Nienhuys
Andy Wingo escreveu: > On Sun 31 Aug 2008 17:12, Han-Wen Nienhuys <[EMAIL PROTECTED]> writes: > >> On a tangent, is anyone still seriously considering to run Emacs atop GUILE? >> (It looks a bit like a travesty if we're trying to accomodate elisp while >> also trying to follow standards like SRFI-

Re: [PATCH] Avoid `SCM_VALIDATE_LIST ()'

2008-09-04 Thread Andy Wingo
On Sun 31 Aug 2008 17:12, Han-Wen Nienhuys <[EMAIL PROTECTED]> writes: > On a tangent, is anyone still seriously considering to run Emacs atop GUILE? > (It looks a bit like a travesty if we're trying to accomodate elisp while > also trying to follow standards like SRFI-x and RxRS) I think it ma

Re: [PATCH] Avoid `SCM_VALIDATE_LIST ()'

2008-09-01 Thread Han-Wen Nienhuys
Neil Jerram escreveu: > 2008/9/1 Ludovic Courtès <[EMAIL PROTECTED]>: >> Hello, >> >> This is a followup to this discussion: >> >> http://thread.gmane.org/gmane.lisp.guile.devel/7194 >> >> The attached patch changes several list-related functions > > reverse!, memq, memv, member, filter, filter!

Re: [PATCH] Avoid `SCM_VALIDATE_LIST ()'

2008-09-01 Thread Han-Wen Nienhuys
Ludovic Courtès escreveu: >> On a tangent, is anyone still seriously considering to run Emacs atop GUILE? > > There's Ken Reaburn's attempt at http://www.mit.edu/~raeburn/guilemacs/ , > and there's also the Elisp support that's under `lang'. I don't think > the former is really maintained. The l

Re: [PATCH] Avoid `SCM_VALIDATE_LIST ()'

2008-09-01 Thread Ludovic Courtès
Hi Neil, "Neil Jerram" <[EMAIL PROTECTED]> writes: >> so that they >> don't validate their input with `SCM_VALIDATE_LIST ()' since it's O(n). > > I'm afraid I don't get your rationale, because all these functions are > O(n) anyway. You're right, but it's always better to traverse the list once r

Re: [PATCH] Avoid `SCM_VALIDATE_LIST ()'

2008-09-01 Thread Neil Jerram
2008/9/1 Ludovic Courtès <[EMAIL PROTECTED]>: > Hello, > > This is a followup to this discussion: > > http://thread.gmane.org/gmane.lisp.guile.devel/7194 > > The attached patch changes several list-related functions reverse!, memq, memv, member, filter, filter! SRFI-1: concatenate, concatenate!,

Re: [PATCH] Avoid `SCM_VALIDATE_LIST ()'

2008-09-01 Thread Ludovic Courtès
Hi, Han-Wen Nienhuys <[EMAIL PROTECTED]> writes: > - return scm_c_memq (x, lst); > + for (; !SCM_NULL_OR_NIL_P (lst); lst = SCM_CDR (lst)) > +{ > + SCM_VALIDATE_CONS (2, lst); > > Looks cleaner to use SCM_CONS_P (or whatever it is called) as loop guard, > so it is obviously correct, an

Re: [PATCH] Avoid `SCM_VALIDATE_LIST ()'

2008-09-01 Thread Neil Jerram
2008/9/1 Han-Wen Nienhuys <[EMAIL PROTECTED]>: > > On a tangent, is anyone still seriously considering to run Emacs atop GUILE? Running a whole Emacs on top of Guile? - no. Running some Emacs Lisp code on top of Guile? - yes. But I admit that what I have in mind is still vaporware right now. So

Re: [PATCH] Avoid `SCM_VALIDATE_LIST ()'

2008-08-31 Thread Han-Wen Nienhuys
Ludovic Courtès escreveu: > Hello, > > This is a followup to this discussion: > > http://thread.gmane.org/gmane.lisp.guile.devel/7194 > > The attached patch changes several list-related functions so that they > don't validate their input with `SCM_VALIDATE_LIST ()' since it's O(n). > > A side

[PATCH] Avoid `SCM_VALIDATE_LIST ()'

2008-08-31 Thread Ludovic Courtès
Hello, This is a followup to this discussion: http://thread.gmane.org/gmane.lisp.guile.devel/7194 The attached patch changes several list-related functions so that they don't validate their input with `SCM_VALIDATE_LIST ()' since it's O(n). A side-effect (besides performance improvements) is