Re: Improve `seed->random-state' in stable-2.0?

2012-01-20 Thread David Kastrup
Mark H Weaver writes: > Can't we just make a clean break now? 2.0 is still not widely > deployed, so now is a great time to assert our right to change the > PRNG at will. As you say, it's unlikely that anyone is relying on > this anyway. If anyone is, wouldn't it be better to deal with that >

Re: Improve `seed->random-state' in stable-2.0?

2012-01-20 Thread Mike Gran
> From: Andy Wingo wi...@pobox.com >How about, we extend seed->random-state to operate on bytevectors, and >have that interface do the right thing.  We deprecate the number >interface.  At some point in the future we deprecate the string >interface as well. The number or string argument to seed->

Re: add-relative-load-path ?

2012-01-20 Thread Andy Wingo
Hi Neil, On Sat 14 Jan 2012 22:48, Neil Jerram writes: > Andy Wingo writes: > > Of the possibilities above, I think I prefer > >> (add-to-load-path (dirname (current-source-filename))) Done. Actually I called it "current-filename", so it would be: (add-to-load-path (dirname (current-file

Re: Improve `seed->random-state' in stable-2.0?

2012-01-20 Thread Mark H Weaver
Andy Wingo writes: > On Fri 20 Jan 2012 19:52, Mark H Weaver writes: > >> We have a 64-bit PRNG, but even if you make sure to seed it with a >> number that has plenty of entropy, `seed->random-state' will only >> preserve around 32 bits of it. > > Wow, that's horrible. Agreed that this needs fi

Re: syntax-local-binding

2012-01-20 Thread Mark H Weaver
Andy Wingo writes: > On Fri 20 Jan 2012 21:26, Mark H Weaver writes: > >> Andy Wingo writes: >>> `lexical' >>> A lexically-bound variable. The value is a unique token (in >>> the sense of `eq?') identifying this binding. >>> >>> `macro' >>> A syntax transf

Re: The empty string and other empty strings

2012-01-20 Thread Andy Wingo
On Fri 13 Jan 2012 17:39, Mark H Weaver writes: > Should we defend the legitimacy of this optimization, and ask the R7RS > working group to include explicit language specifying that empty > strings/vectors need not be freshly allocated? It's a worthwhile question IMO. I'll mail scheme-reports.

Re: syntax-local-binding

2012-01-20 Thread Andy Wingo
On Fri 20 Jan 2012 21:26, Mark H Weaver writes: > Andy Wingo writes: >> `lexical' >> A lexically-bound variable. The value is a unique token (in >> the sense of `eq?') identifying this binding. >> >> `macro' >> A syntax transformer, either local or global.

Re: Compiler Branch

2012-01-20 Thread Andy Wingo
Heya Noah, A brief note: On Sun 08 Jan 2012 22:15, Noah Lavine writes: > I do think there's a problem with plain CPS, though - it forces you to > pick an order for the evaluation of function arguments. I would like > to use CPS with some sort of parallel-call operator, so we can leave > the ord

Re: Improve `seed->random-state' in stable-2.0?

2012-01-20 Thread Andy Wingo
Hi Mark, Thanks for the explanations! On Fri 20 Jan 2012 19:52, Mark H Weaver writes: > We have a 64-bit PRNG, but even if you make sure to seed it with a > number that has plenty of entropy, `seed->random-state' will only > preserve around 32 bits of it. Wow, that's horrible. Agreed that thi

Re: syntax-local-binding

2012-01-20 Thread Mark H Weaver
Andy Wingo writes: > `lexical' > A lexically-bound variable. The value is a unique token (in > the sense of `eq?') identifying this binding. > > `macro' > A syntax transformer, either local or global. The value is > the transformer procedure. Iron

Re: when and unless

2012-01-20 Thread Andy Wingo
Heya, On Sat 07 Jan 2012 23:36, l...@gnu.org (Ludovic Courtès) writes: > Andy Wingo skribis: > >> (define-syntax (when condition stmt stmt* ...) >>(if condition (begin stmt stmt* ...))) >> >> (define-syntax (unless condition stmt stmt* ...) >>(if (not condition) (begin stmt stmt* ...))

Re: syntax-locally-bound-identifiers, local-eval

2012-01-20 Thread Mark H Weaver
There's another thing that really should be fixed, for the sake of preserving our ability to change the implementation `local-eval' in the future. Since (the-environment) can be included in code compiled to disk, the lexical environment objects that it returns are effectively now part of our ABI.

Re: syntax-locally-bound-identifiers, local-eval

2012-01-20 Thread Mark H Weaver
Hi Andy. Thanks for following through on this. As you probably noticed, my motivation to work on `local-eval' has largely dissipated, so it's great that you finished this up in time for 2.0.4. I haven't yet had time to fully review these patches, but for now, a quick scan reveals a few remaining

Re: Improve `seed->random-state' in stable-2.0?

2012-01-20 Thread Mark H Weaver
Andy Wingo writes: > On Fri 20 Jan 2012 04:28, Mark H Weaver writes: > >> `seed->random-state' is poorly implemented when passed a numeric >> argument. It converts the number to a decimal string, and then >> `scm_i_init_rstate' takes over and basically adds every 8th byte >> together to form th

guile-library - make bug report

2012-01-20 Thread David Pirotte
Hello, guile 2.0.3.150-88c0 guile-lib release-0.2.1-2-ge9fe22b ... make[1]: Entering directory `/usr/local/src/guile-lib/git-clone/src' ../dev-environ /usr/local/bin/guile-tools compile -o "text/parse-lalr.go" "text/parse-lalr.scm" ice-9/boot-9.scm:106:20: In procedure #:

guile-sqlite3 - patch

2012-01-20 Thread David Pirotte
Hello, Attached is a patch which changes the sqlite-open default optional flags argument value. If I am not misunderstanding the API doc and the intention behind the union of both sqlite3_open and sqlite3_open_v2 into a single sqlite-open procedure with optional arguments, then the default val

guile-sqlite3 - patch

2012-01-20 Thread David Pirotte
Hello, Attached is a patch which defines and export sqlite3_enable_load_extension Cheers, David>From 866e578beaf1eb89b1bb80b9c6347f62e8ee5c60 Mon Sep 17 00:00:00 2001 From: David Pirotte Date: Fri, 20 Jan 2012 14:38:13 -0200 Subject: [PATCH] sqlite3_enable_load_extension, added Extension loadin

Re: Improve `seed->random-state' in stable-2.0?

2012-01-20 Thread Andy Wingo
On Fri 20 Jan 2012 04:28, Mark H Weaver writes: > `seed->random-state' is poorly implemented when passed a numeric > argument. It converts the number to a decimal string, and then > `scm_i_init_rstate' takes over and basically adds every 8th byte > together to form the 64-bit internal state. Is

Re: syntax-locally-bound-identifiers, local-eval

2012-01-20 Thread Andy Wingo
On Fri 20 Jan 2012 13:33, Andy Wingo writes: > Here are a couple of patches. Aaaand, the patches: >From f549f273139bda9591194766157bb771a67d9563 Mon Sep 17 00:00:00 2001 From: Andy Wingo Date: Sun, 15 Jan 2012 18:39:44 +0100 Subject: [PATCH 1/2] add syntax-locally-bound-identifiers * module/i

syntax-locally-bound-identifiers, local-eval

2012-01-20 Thread Andy Wingo
Hello, Here are a couple of patches. The first implements a new helper, syntax-locally-bound-identifiers, documented thusly: -- Scheme Procedure: syntax-locally-bound-identifiers id Return a list of identifiers that were visible lexically when the identifier ID was created, in order f

Re: Improve `seed->random-state' in stable-2.0?

2012-01-20 Thread David Kastrup
Mark H Weaver writes: > I know how to make this _much_ better, but here's the question: is it > okay to change the behavior of the random number generator in 2.0? Or > is it important that the same sequence of random numbers are generated > from a given seed in the entire stable-2.0 series? As