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

2012-01-23 Thread Andy Wingo
Hi Mark, On Fri 20 Jan 2012 23:45, Mark H Weaver writes: > Andy Wingo writes: > >> How about, we extend seed->random-state to operate on bytevectors, and >> have that interface do the right thing. > > I agree that it would be nice for `seed->random-state' to support > bytevectors as well, but f

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

2012-01-23 Thread Andy Wingo
On Sat 21 Jan 2012 00:46, Mike Gran writes: > (seed->random-state (current-time)) seems to be a common idiom that > you would end up breaking. This is a common idiom that is worth deprecating. Mark's new functions that seed the random state from /dev/urandom are much better. So no, no plans to

Re: add-relative-load-path ?

2012-01-23 Thread Andy Wingo
Hi Neil, Thanks for the feedback! On Sun 22 Jan 2012 00:17, Neil Jerram writes: > Thing 1 is that (current-filename) can return a relative filename, or a > filename with a "./" in its middle [...] > > Would there be any downside from putting [canonicalize-path] inside > current-filename, so tha

Re: Eval, tail calls, (current-module), and backward compatibility

2012-01-23 Thread Andy Wingo
On Tue 17 Jan 2012 04:28, Mark H Weaver writes: > Ideally, I think that `eval' should set (current-module) during > expansion, but _not_ during evaluation. Then it can be properly tail > recursive. However, some code out there might depend on the existing > behavior, so I guess we can't change

Re: syntax-local-value patch for discussion

2012-01-23 Thread Andy Wingo
Hi Stefan, On Thu 19 Jan 2012 10:50, Stefan Israelsson Tampe writes: > Working on porting syntax-parse is a learning experience and I know > understand how it uses syntax-local-value as a way to lookup a syntax > object by joining the wraps together with the total wrap at the macro > call. syn

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

2012-01-23 Thread Andy Wingo
Hi Mark! Thanks for your review of my patches. I would like to say, "our patches", as they are not really mine, but I understand if you don't want to claim parentage in this case :) I fixed the module-related scope issues by adding a new accessor for syntax objects, `syntax-module'. It is like

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

2012-01-23 Thread Mike Gran
> From: Andy Wingo >> (seed->random-state (current-time)) seems to be a common idiom that >> you would end up breaking. > >This is a common idiom that is worth deprecating.  Mark's new functions >that seed the random state from /dev/urandom are much better.   Are you suggesting that you'll break t

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

2012-01-23 Thread Andy Wingo
On Mon 23 Jan 2012 14:06, Mike Gran writes: >> From: Andy Wingo >>> (seed->random-state (current-time)) seems to be a common idiom that >>> you would end up breaking. >> >>This is a common idiom that is worth deprecating.  Mark's new functions >>that seed the random state from /dev/urandom are m

Re: guile-sqlite3 - patch

2012-01-23 Thread Andy Wingo
Pushed both of these patches; thanks! Andy -- http://wingolog.org/

Re: add-relative-load-path ?

2012-01-23 Thread Ludovic Courtès
Hello! Thanks for working on it. :-) Andy Wingo skribis: > (add-to-load-path (dirname (dirname (current-filename What about calling it ‘current-file-name’ instead? Ludo’.

Re: Compiler Warning message ideas

2012-01-23 Thread Ludovic Courtès
Hi Stefan, Stefan Israelsson Tampe skribis: > When compiling newest stable-2.0 I noticed, > > wrote `ice-9/eval.go' > GUILEC ice-9/psyntax-pp.go > GC Warning: Repeated allocation of very large block (appr. size 69632): > May lead to memory leak and poor performance. > wrote `ice-9/psyntax-

Re: syntax-local-value patch for discussion

2012-01-23 Thread Stefan Israelsson Tampe
Ok, here is a discussoin using code in syntax-parse. Let's start with the defintion of a syntax-class, str in the macro package syntax-parse: (define-syntax-class str #:attributes () #:opaque #:commit #:description "string" (pattern (~and x (~fail #:unless (string? (syntax-e #'x)) So the

Re: syntax-local-binding

2012-01-23 Thread Andy Wingo
Heya Mark, On Fri 20 Jan 2012 23:03, Mark H Weaver writes: > (let ((x 1)) > (syntax-local-binding #'x)) > > is not equivalent to: > > (let ((x 1)) > (local-eval '(syntax-local-binding #'x) (the-environment))) Indeed; bummer! I think, though, that this is simply a consequence of giv

Re: add-relative-load-path ?

2012-01-23 Thread Andy Wingo
Hi, On Mon 23 Jan 2012 16:45, l...@gnu.org (Ludovic Courtès) writes: > Andy Wingo skribis: > >> (add-to-load-path (dirname (dirname (current-filename > > What about calling it ‘current-file-name’ instead? > (apropos "filename") (guile): set-module-filename! # (guile): module-filenam

Re: add-relative-load-path ?

2012-01-23 Thread Neil Jerram
Andy Wingo writes: > Hi, > > On Mon 23 Jan 2012 16:45, l...@gnu.org (Ludovic Courtès) writes: > >> Andy Wingo skribis: >> >>> (add-to-load-path (dirname (dirname (current-filename >> >> What about calling it ‘current-file-name’ instead? I sympathise with that too, although I know I was in

Re: add-relative-load-path ?

2012-01-23 Thread Neil Jerram
Andy Wingo writes: > Hi Neil, > > Thanks for the feedback! > > On Sun 22 Jan 2012 00:17, Neil Jerram writes: > >> Thing 1 is that (current-filename) can return a relative filename, or a >> filename with a "./" in its middle > [...] >> >> Would there be any downside from putting [canonicalize-pat

Re: syntax-local-binding

2012-01-23 Thread Mark H Weaver
Andy Wingo writes: > On Fri 20 Jan 2012 23:03, Mark H Weaver writes: > >> (let ((x 1)) >> (syntax-local-binding #'x)) >> >> is not equivalent to: >> >> (let ((x 1)) >> (local-eval '(syntax-local-binding #'x) (the-environment))) > > Indeed; bummer! I think, though, that this is simpl

Re: syntax-local-binding

2012-01-23 Thread Andy Wingo
Hi Mark, On Mon 23 Jan 2012 22:03, Mark H Weaver writes: > Andy Wingo writes: > >> with identifier-syntax, one can no longer write a code walker with >> syntax-rules pattern matching, as single identifiers may expand out >> to complicated expressions, possibly even with side effects. > > This i

Re: syntax-local-binding

2012-01-23 Thread Mark H Weaver
Andy Wingo writes: >> Your priorities are reversed from what they ought to be. >> >> What you _should_ be worried about is making commitments in our API that >> we must continue to support forever. This is a _real_ problem, since it >> constrains our ability to modify our implementation in the f

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

2012-01-23 Thread Mike Gran
> From: Andy Wingo > That would indeed be a mean thing to do!  It's not what I'm suggesting > though.  Deprecation means causing Guile to emit warnings, at > compile-time or at runtime, indicating that a particular interface will > go away at some point, and noting the interface that should be use