Re: summer of code ideas

2011-03-08 Thread Ludovic Courtès
Hello, Noah Lavine writes: >>> We talked about having a Scheme-based language that could compile to >>> both plain C and JIT, but decided that would make the VM too >>> complicated, >> >> Maybe I forgot to feed that thread, but I think it might be easier to >> have a high-level representation th

Re: reprise: scm_c_eval_string_from_file_line

2011-03-08 Thread Andy Wingo
Hi Bruce, On Thu 24 Feb 2011 23:58, Bruce Korb writes: > Anyway, picking up threads from 2003 and 2008: > http://osdir.com/ml/lisp.guile.devel/2003-05/msg00202.html > http://www.mail-archive.com/guile-devel@gnu.org/msg02825.html > http://www.mail-archive.com/guile-devel@gnu.org/msg02826.html > >

Re: hygiene and macro-introduced toplevel bindings

2011-03-08 Thread Andy Wingo
On Mon 28 Feb 2011 22:49, Noah Lavine writes: > val (defined in call to define-syntactic-accessor, file.scm:53) = 5 > val (defined in call to define-syntactic-accessor, file.scm:55) = 7 It's not a bad idea. Our docstring situation for values -- like ints, for example -- is not that good; if we

Re: hygiene and macro-introduced toplevel bindings

2011-03-08 Thread Andy Wingo
On Mon 28 Feb 2011 22:28, Andy Wingo writes: > But you have to, I think. If that module that contained the above > define-syntactic-accessor expansion exports "foo", then in another > module you have: > > (define bar (lambda () (foo))) > > which expands to > > (define bar (lambda () val-2341

Re: [PATCH] Miscellaneous for 2.0

2011-03-08 Thread Andy Wingo
On Tue 01 Mar 2011 19:55, Mark H Weaver writes: > I'd like to apply these to both stable-2.0 and master. Any > objections? Go ahead, and feel free to push trivial patches like this to stable-2.0. They'll land on master as we merge stable-2.0 back there. Thanks! Andy -- http://wingolog.org/

Re: reprise: scm_c_eval_string_from_file_line

2011-03-08 Thread Andy Wingo
On Tue 08 Mar 2011 23:45, Bruce Korb writes: > So, this should go under: > #if GUILE_VERSION > 20 // anything after 2.0, e.g. 2.0.1 ?? Yes, I think that's right. >> return scm_call_5 (scm_variable_ref (eval_string_var), >>string, > > Wouldn't this arg need to be

Re: reprise: scm_c_eval_string_from_file_line

2011-03-08 Thread Bruce Korb
Hi Andy! On 03/08/11 14:28, Andy Wingo wrote: >> SCM >> ag_scm_c_eval_string_from_file_line( >> char const * pzExpr, char const * pzFile, int line) > > So! I implemented something, but it's not quite what you asked for. Sufficiently close that the resulting code isn't "icky". :) It no longe

Re: reprise: scm_c_eval_string_from_file_line

2011-03-08 Thread Mark H Weaver
Andy Wingo writes: >>> return scm_call_5 (scm_variable_ref (eval_string_var), >>>string, >> >> Wouldn't this arg need to be SCM-ized? viz. scm_from_locale_string >> (string) > > Indeed; though you should think about encodings here. There is also > scm_from_utf8_string

Re: Trouble joining with threads from C

2011-03-08 Thread Mark H Weaver
Having further investigated, I'm convinced that this is a bug. Attached are two minimal C programs. Both create threads that do nothing but sleep for 2 seconds and then exit. The parent tries to join with the child thread, with a timeout of 10 seconds. The only difference is that test1 uses scm