Re: A Modest Proposal

2011-04-13 Thread William ML Leslie
On 14 April 2011 01:23, Pascal J. Bourguignon wrote: > In general, there may be a need for a very good lisp virtual machine to > run and integrate lisp code in general (CL, various schemes, and other > sorts of lisp-like languages, we could include perhaps implementations > of python,  ruby,  smal

Re: A Modest Proposal

2011-04-13 Thread Noah Lavine
Hello, > I think we should first compare the virtual machines. > > > If no obvious impossibility is observed, then perhaps modifying the > compiler of clisp to generate guile VM code would be an easy path to > obtain a CL implementation running on guile VM.  (This would disable the > interpreter i

Re: Avoiding variable clashes

2011-04-13 Thread Noah Lavine
> The beta rule is in denotational semantics something like >  ((lambda x . E_1) E_2) => [E_2/x]E_1, E_2 free for x in in E_1 > where [E_2/x]E_1 means substituting all free occurrences of x with E_2. > > In addition, one has the alpha rule >  (lambda x . E) => (lambda y . [y/x]E), y free for x in E

Re: A Modest Proposal

2011-04-13 Thread Pascal J. Bourguignon
Noah Lavine writes: > Hello Guile and Clisp developers, > > I'm writing to talk about vague big-picture ideas, but please bear > with me for a minute, because I think this could be useful. > > I noticed in the recent GNU Summer of Code applications (I'm a mentor > for Guile) that CLisp wants to b

Re: Trouble joining with threads from C

2011-04-13 Thread Ludovic Courtès
Hello, l...@gnu.org (Ludovic Courtès) writes: > l...@gnu.org (Ludovic Courtès) writes: >> Andy Wingo writes: >> >>> No, the issue is elsewhere, that the thread-exit handlers were not being >>> called >> >> I just tried with 60582b7c2a495957012f9a20cd8691dc6307a850 and >> ‘on_thread_exit’ /is/ ca

Re: Trouble joining with threads from C

2011-04-13 Thread Ludovic Courtès
l...@gnu.org (Ludovic Courtès) writes: > Hi! Howdy! > Andy Wingo writes: > >> No, the issue is elsewhere, that the thread-exit handlers were not being >> called > > I just tried with 60582b7c2a495957012f9a20cd8691dc6307a850 and > ‘on_thread_exit’ /is/ called after something like > ‘(call-with-n

Re: more define-inlinable-related breakage

2011-04-13 Thread Ludovic Courtès
Hey, Andy Wingo writes: > What should we do here? Here are a few options: > > 1) Require people to recompile all the time. Sucks. > > 2) Implement some sort of proper dependency management. Tricky, > because installing a new version of package A could force a > recompile of all

Re: more define-inlinable-related breakage

2011-04-13 Thread Mike Gran
> From:Andy Wingo > >     module/ice-9/boot-9.scm:118:20: In procedure module-lookup: Unbound > variable: %uri?-procedure FWIW, I got the same error while hacking one day.  I couldn't track it down so I did a make distclean and it went away.  Glad to know that it wasn't just me. -Mike

Re: [shift and reset, plus] "while"

2011-04-13 Thread Wolfgang J Moeller
On Wed, 13 Apr 2011, Andy Wingo wrote: >[...] > >From Guile 1.6: >[...] > It did indeed happen to return #t on a normal termination, and have > (break ARG). It has lots of other bugs though. I would prefer (break) > to return zero values, and (while #f 1) as well, but that is > incompatible with

Re: Avoiding variable clashes

2011-04-13 Thread Hans Aberg
On 13 Apr 2011, at 18:25, Andy Wingo wrote: >>> Sorry, I don't know what you mean. References? >> >> There is an article here: >> http://en.wikipedia.org/wiki/Variable_binding_operator > > I still don't understand. What are you trying to do? The beta rule is in denotational semantics somethin

Re: Avoiding variable clashes

2011-04-13 Thread Hans Aberg
On 13 Apr 2011, at 18:25, Noah Lavine wrote: > I think that mechanism is all that Guile uses at present. However, it > should be general enough to resolve all situations where variables of > the same name refer to different entities, assuming you set up the > environments correctly. > > Are you p

Re: Avoiding variable clashes

2011-04-13 Thread Andy Wingo
On Wed 13 Apr 2011 17:46, Hans Aberg writes: >> Sorry, I don't know what you mean. References? > > There is an article here: > http://en.wikipedia.org/wiki/Variable_binding_operator I still don't understand. What are you trying to do? Andy -- http://wingolog.org/

Re: Avoiding variable clashes

2011-04-13 Thread Noah Lavine
I think that mechanism is all that Guile uses at present. However, it should be general enough to resolve all situations where variables of the same name refer to different entities, assuming you set up the environments correctly. Are you planning on implementing a theorem prover for Guile? That w

more define-inlinable-related breakage

2011-04-13 Thread Andy Wingo
I was doing some bisecting. I started at v2.0.0, did a full clean and build then went to df1297956211b7353155c9b54d7e9c22d05ce493 and built without a "clean". However I got an error: GUILEC web/request.go ;;; note: source file /home/wingo/src/guile/module/web/uri.scm ;;; newe

Re: after-gc-hook recently broken for bdwgc 7.2alpha CVS

2011-04-13 Thread Ludovic Courtès
Hi Mark, Mark H Weaver writes: > Sometime between 2.0.0 and current stable-2.0, after-gc-hook has been > broken on my system: "FAIL: gc.test: gc: after-gc-hook gets called". FWIW Hydra has had this problem in the GCC 3.x build job: http://hydra.nixos.org/build/1043456 It first had the probl

Re: [PATCH] Fix the R6RS exact-integer-sqrt and import into core guile

2011-04-13 Thread Detlev Zundel
Hi Mark, > Since you don't want to continue this discussion on a theoretical basis, > can you please provide a concrete example of how the addition of > scm_exact_integer_sqrt might be a maintenance burden in the future, > given that our public C interface already consists of approximately 2K > fu

Re: Avoiding variable clashes

2011-04-13 Thread Hans Aberg
On 13 Apr 2011, at 17:27, Andy Wingo wrote: What method is Guile using to avoid substitution variable clashes (de Bruijn numbers, combinators, etc.)? >>> >>> Each lexical variable is given a fresh name (a gensym) when it is >>> introduced. The expander keeps an environment as to what n

Re: [shift and reset, plus] "while"

2011-04-13 Thread Andy Wingo
On Wed 13 Apr 2011 16:56, Wolfgang J Moeller writes: > On Wed, 13 Apr 2011, Andy Wingo wrote: > >>[...] >> > I'd like to "improve" (while) as currently provided by ice-9/boot.scm >> > >> > (a) to always have a well-defined result >> >> This is a good idea; it allows `while' to be an expression, n

Re: [PATCH] Fix the R6RS exact-integer-sqrt and import into core guile

2011-04-13 Thread Mark H Weaver
Hi Detlev, Detlev Zundel writes: > Maybe it doesn't make sense to continue this discussion on a theoretical > basis. Because on a theoretical basis I would probably cite the rule of > modularity or even Antoine de Saint-Exupery: > > Perfection (in design) is achieved not when there is nothing

Re: Avoiding variable clashes

2011-04-13 Thread Andy Wingo
On Wed 13 Apr 2011 16:34, Hans Aberg writes: > On 13 Apr 2011, at 16:19, Andy Wingo wrote: > >>> What method is Guile using to avoid substitution variable clashes (de >>> Bruijn numbers, combinators, etc.)? >> >> Each lexical variable is given a fresh name (a gensym) when it is >> introduced. T

Re: [shift and reset, plus] "while"

2011-04-13 Thread Wolfgang J Moeller
On Wed, 13 Apr 2011, Andy Wingo wrote: >[...] > > I'd like to "improve" (while) as currently provided by ice-9/boot.scm > > > > (a) to always have a well-defined result > > This is a good idea; it allows `while' to be an expression, not just a > statement. > > > (b) to allow for (break arg ...) >

Re: Avoiding variable clashes

2011-04-13 Thread Hans Aberg
On 13 Apr 2011, at 16:19, Andy Wingo wrote: >> What method is Guile using to avoid substitution variable clashes (de >> Bruijn numbers, combinators, etc.)? > > Each lexical variable is given a fresh name (a gensym) when it is > introduced. The expander keeps an environment as to what name maps t

Re: Avoiding variable clashes

2011-04-13 Thread Andy Wingo
On Wed 13 Apr 2011 14:57, Hans Aberg writes: > What method is Guile using to avoid substitution variable clashes (de > Bruijn numbers, combinators, etc.)? Each lexical variable is given a fresh name (a gensym) when it is introduced. The expander keeps an environment as to what name maps to what

A Modest Proposal

2011-04-13 Thread Noah Lavine
Hello Guile and Clisp developers, I'm writing to talk about vague big-picture ideas, but please bear with me for a minute, because I think this could be useful. I noticed in the recent GNU Summer of Code applications (I'm a mentor for Guile) that CLisp wants to become embeddable, and embed into E

Avoiding variable clashes

2011-04-13 Thread Hans Aberg
What method is Guile using to avoid substitution variable clashes (de Bruijn numbers, combinators, etc.)? Hans

Re: [PATCH] Fix the R6RS exact-integer-sqrt and import into core guile

2011-04-13 Thread Andy Wingo
On Wed 13 Apr 2011 10:59, Detlev Zundel writes: > But in the end maybe it is a question of whether one sees guile as a > scheme interpreter with the possibility to interface easily with C or if > one thinks of guile as a C library with a language built in. For me it > is the first choice but you

Re: shift and reset, plus "while"

2011-04-13 Thread Andy Wingo
Hi Wolfgang, Another in a series of asynchronous replies :) Copying guile-devel for comments on the extensions to `while'. On Mon 04 Apr 2011 15:05, Wolfgang J Moeller writes: > | GNU Guile 2.0.0 > | scheme@(guile-user)> (display (while #f 1)) > | :0:0: In procedure #:1:0 > ()>: > | :0:0: Thr

Re: Difference letrec & environment binding

2011-04-13 Thread dsmich
Hans Aberg wrote: > What is the practical difference between the two ways of doing the same thing > (letrec or an environment). Is letrec more efficient in the implementation of > Guile? > > Hans > > > (letrec ( > (even? (lambda (n) > (if (zero? n) #t (odd? (- n 1) > (odd?

Difference letrec & environment binding

2011-04-13 Thread Hans Aberg
What is the practical difference between the two ways of doing the same thing (letrec or an environment). Is letrec more efficient in the implementation of Guile? Hans (letrec ( (even? (lambda (n) (if (zero? n) #t (odd? (- n 1) (odd? (lambda (n) (if (zero? n) #f (even? (- n 1))

Re: [PATCH] Fix the R6RS exact-integer-sqrt and import into core guile

2011-04-13 Thread Detlev Zundel
Hi Noah, > You make good points, but I disagree. I think the ideal for Guile > should be a situation where C and Scheme can be used basically > interchangeably, with Guile providing the glue in between. Of course one can disagree, but then it immediately follows that there is no "ideal for guile"