[PATCH] Add read-wrapper REPL option

2013-09-29 Thread David Thompson
Guile-2D needs a REPL that runs within its event loop without blocking when reading user input. Mark Weaver has helped me add a new REPL option, read-wrapper, that can be used by Guile-2D to push the read operation into another thread while the main thread's event loop continues to run as normal. T

Re: [PATCH] Replace define-macro with syntax-rules

2013-09-29 Thread Ian Price
taylanbayi...@gmail.com (Taylan Ulrich B.) writes: > (define-syntax endianness > (syntax-rules () > ((_ big) 'big) > ((_ little) 'little))) Except now whenever you use it, you only ever get big endianness. You forgot to add big and little to the literals list. Also, IMO, if you are usin

Re: [PATCH] Implement doctest utility as guild script

2013-09-29 Thread Ludovic Courtès
Dmitry Bogatov skribis: > Ludovic Courtès writes: > >> I share Ian Price’s concerns regarding the fundamental idea behind >> doctest. Namely, writing code in strings means that syntax errors can >> only be detected very late, and that the code in there cannot easily >> refer to anything outside

Re: [PATCH] Implement doctest utility as guild script

2013-09-29 Thread Dmitry Bogatov
Ludovic Courtès writes: > I share Ian Price’s concerns regarding the fundamental idea behind > doctest. Namely, writing code in strings means that syntax errors can > only be detected very late, and that the code in there cannot easily > refer to anything outside; What do you mean outside? I th

Re: [PATCH] Implement doctest utility as guild script

2013-09-29 Thread Ludovic Courtès
Hi, Thanks for the patch. kact...@gnu.org skribis: > +(define (substring-safe str index) > +" > +Return substring of STR, starting at INDEX, > +or empty string, if STR is too short. > + > ++++ (substring-safe \"1234\" 3) > +--- \"4\" > ++++ (substring-