Re: {debug,read,readline,print}-{set!,disable,enable}, etc.

2011-06-17 Thread Andy Wingo
Hi Wolfgang,

On Sun 22 May 2011 13:53, Wolfgang J Moeller w...@heenes.com writes:

 As regards (primitive-load) - it's only after our discussion that I realized
 that without file-compilation GUILE seems to always (slowly) interprete the
 LOADed code. Makes me ask for LISP's (LOAD ... :COMPILING T) [independent of
 invocation-time settings] again ... (maybe via compiling to /dev/null ?)

There is read-and-compile, from system base compile...

 Any provision for C-style #if ... #include ... (of, say, macros
 required by the subsequent code)? (LOAD) gets evaluated too late;
 (INCLUDE) of definitions isn't allowed within (IF); (EVAL) again
 comes too late.
 (I did notice your major changes to psyntax, but so far
 I don't see how they'd help me. No problems with them either ;-)

There is `eval-when', which you can use to build the exact thing you
need.  See Eval When in the manual.  In the Guile context we encourage
the use of modules.

 Otherwise, no problems with 2.0.1. Except for a tidbit ...

 Compiler error message not properly decoded, as in

 | moeller@louix-$ guile2 -q
 | GNU Guile 2.0.1
 |[...]
 | scheme@(guile-user) (load zwp.scm)
 | ;;; note: auto-compilation is enabled, set GUILE_AUTO_COMPILE=0
 | ;;;   or pass the --no-auto-compile argument to disable.
 | ;;; compiling /home/moeller/scm/zwp.scm
 | ;;; WARNING: compilation of /home/moeller/scm/zwp.scm failed:
 | ;;; key syntax-error, throw_args (#f definition in expression context #f 
 #t dummy3)
 | scheme@(guile-user)

 where zwp.scm is the prelude snippet that I sent you on April 2.
 Pretty sure it didn't look like this in 2.0.0.

It might have.  But fixed, in any case :-)

Cheers,

Andy
-- 
http://wingolog.org/



Re: {debug,read,readline,print}-{set!,disable,enable}, etc.

2011-05-22 Thread Wolfgang J Moeller
Hi,

On Fri, 20 May 2011, Andy Wingo wrote:
 On Fri 29 Apr 2011 14:12, Wolfgang J Moeller w...@heenes.com writes:
  In fact, {debug,print,read}-set! are macros that want option-name to
  be a literal symbol, while {debug,read}-{en,dis}able are procedures
  indeed (apparently taking multiple arguments) that want the
  option-name[s] to be quoted symbol[s].

 Indeed; nasty, but it's what we've got.  Fixed the docs.

Thanks.

  [Noticed while looking for something like V1 (debug-disable 'debug)
  that might speed up execution.]

 It's spelled `--no-debug'; see Invoking Guile.
[...]

Oops - didn't notice before at all. Thanks. Only a minor speed-up, indeed.

Invocation options ... you don't think scheme-shell, do you?

As regards (primitive-load) - it's only after our discussion that I realized
that without file-compilation GUILE seems to always (slowly) interprete the
LOADed code. Makes me ask for LISP's (LOAD ... :COMPILING T) [independent of
invocation-time settings] again ... (maybe via compiling to /dev/null ?)

Any provision for C-style #if ... #include ... (of, say, macros
required by the subsequent code)? (LOAD) gets evaluated too late;
(INCLUDE) of definitions isn't allowed within (IF); (EVAL) again
comes too late.
(I did notice your major changes to psyntax, but so far
I don't see how they'd help me. No problems with them either ;-)

Otherwise, no problems with 2.0.1. Except for a tidbit ...

Compiler error message not properly decoded, as in

| moeller@louix-$ guile2 -q
| GNU Guile 2.0.1
|[...]
| scheme@(guile-user) (load zwp.scm)
| ;;; note: auto-compilation is enabled, set GUILE_AUTO_COMPILE=0
| ;;;   or pass the --no-auto-compile argument to disable.
| ;;; compiling /home/moeller/scm/zwp.scm
| ;;; WARNING: compilation of /home/moeller/scm/zwp.scm failed:
| ;;; key syntax-error, throw_args (#f definition in expression context #f #t 
dummy3)
| scheme@(guile-user)

where zwp.scm is the prelude snippet that I sent you on April 2.
Pretty sure it didn't look like this in 2.0.0.

Thanks again, best regards,

Wolfgang J. Moeller, Tel. +49 551 47361, wjmATheenes.com
37085 Goettingen, Germany | Disclaimer: No claim intended!
http://www.wjmoeller.de/ -+ http://www.heenes.com/



Re: {debug,read,readline,print}-{set!,disable,enable}

2011-05-20 Thread Andy Wingo
On Fri 29 Apr 2011 14:12, Wolfgang J Moeller w...@heenes.com writes:

 In fact, {debug,print,read}-set! are macros that want option-name to
 be a literal symbol, while {debug,read}-{en,dis}able are procedures
 indeed (apparently taking multiple arguments) that want the
 option-name[s] to be quoted symbol[s].

Indeed; nasty, but it's what we've got.  Fixed the docs.

 [Noticed while looking for something like V1 (debug-disable 'debug)
 that might speed up execution.]

It's spelled `--no-debug'; see Invoking Guile.

  `--debug'
   Start with the debugging virtual machine engine.  Using the
   debugging VM will enable support for VM hooks, which are needed
   for tracing, breakpoints, and accurate call counts when profiling.
   The debugging VM is slower than the regular VM, though, by about
   10 percent.  *Note VM Hooks::, for more information.

   By default, the debugging VM engine is only used when entering an
   interactive session.  When executing a script with `-s' or `-c',
   the normal, faster VM is used by default.

  `--no-debug'
   Do not use the debugging VM engine, even when entering an
   interactive session.

Also note that git is about 10-20% faster than 2.0.1.

Andy
-- 
http://wingolog.org/