unofficial mirror of guile-devel@gnu.org 
 help / color / mirror / Atom feed
From: Andy Wingo <wingo@pobox.com>
To: Wolfgang J Moeller <wjm@heenes.com>
Cc: bug-guile@gnu.org, guile-devel <guile-devel@gnu.org>
Subject: Re: shift and reset, plus "while"
Date: Wed, 13 Apr 2011 11:47:45 +0200	[thread overview]
Message-ID: <m34o62iita.fsf@unquote.localdomain> (raw)
In-Reply-To: <alpine.LNX.2.00.1104041402090.26447@gwdw03.gwdg.de> (Wolfgang J. Moeller's message of "Mon, 4 Apr 2011 15:05:20 +0200 (CEST)")

Hi Wolfgang,

Another in a series of asynchronous replies :)  Copying guile-devel for
comments on the extensions to `while'.

On Mon 04 Apr 2011 15:05, Wolfgang J Moeller <wjm@heenes.com> writes:

> | GNU Guile 2.0.0
> | scheme@(guile-user)> (display (while #f 1))
> | <unnamed port>:0:0: In procedure #<procedure 887aa60 at <current input>:1:0 ()>:
> | <unnamed port>:0:0: Throw to key `vm-error' with args `(vm-run "VM: Stack overflow" ())'.

This is the same compiler bug as before, which is fixed in stable-2.0.
We'll push out a release Real Soon Now (TM).

> I'd like to "improve" (while) as currently provided by ice-9/boot.scm
>
> (a) to always have a well-defined result

This is a good idea; it allows `while' to be an expression, not just a
statement.

> (b) to allow for (break arg ...)

Also a good idea.

Tricky, though; your comments indicate that you would want (break) to
return #t, instead of zero values.

> (c) to only take a single (call-with-prompt)

Why?  It's true that the optimizer doesn't live up to its name yet, but
it should be trivial to elide one or the other if the prompt tag is only
referenced by the <prompt> form.

> (d) to correct a buglet that currently transforms the non-operator `continue'
>     into a function of arbitrarily many (as opposed to zero)
>     arguments.

I have not seen this bug.  Do you have code that can reproduce it with
stable-2.0 ?

> Just a hint: (GPLed) CLISP's compiler is written in LISP and in my
> experience perfectly succeeds at removing all redundant
> branches. Maybe something to look at?

No doubt, it would be instructive!

Andy
-- 
http://wingolog.org/



       reply	other threads:[~2011-04-13  9:47 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <alpine.LNX.2.00.1104041402090.26447@gwdw03.gwdg.de>
2011-04-13  9:47 ` Andy Wingo [this message]
2011-04-13 14:56   ` [shift and reset, plus] "while" Wolfgang J Moeller
2011-04-13 15:41     ` Andy Wingo
2011-04-13 17:31       ` Wolfgang J Moeller
2011-04-28 12:15         ` Andy Wingo

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/guile/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=m34o62iita.fsf@unquote.localdomain \
    --to=wingo@pobox.com \
    --cc=bug-guile@gnu.org \
    --cc=guile-devel@gnu.org \
    --cc=wjm@heenes.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).