unofficial mirror of guile-devel@gnu.org 
 help / color / mirror / Atom feed
From: Stefan Israelsson Tampe <stefan.itampe@gmail.com>
To: Mikael Djurfeldt <mikael@djurfeldt.com>
Cc: Andy Wingo <wingo@pobox.com>, guile-devel <guile-devel@gnu.org>
Subject: Re: GNU Guile 2.9.9 Released [beta]
Date: Tue, 14 Jan 2020 14:25:09 +0100	[thread overview]
Message-ID: <CAGua6m0=nEC-4qDev2=k957QMaNjFF_5Z4Ss7Hv0a9Pfu_zdXw@mail.gmail.com> (raw)
In-Reply-To: <CAA2XvwJCFn4PYB5RHgJLumG=M29XAFTJtiTycfFsST-u1myx3w@mail.gmail.com>

[-- Attachment #1: Type: text/plain, Size: 2856 bytes --]

I agree about the scary part as it e.g. would make it impossible to use
procedures in hashmaps (where my trouble stems from) in any sane way, I
know how to fix
my code but there will be a lot of anger on the mailinglist and irc to
teach how to avoid the problems.

Fortunately probably the next release will have fixes to this and we will
regain the identity features.

Also it is scary that scheme spec allows compilers to abuse the usage of
procedure identities.





On Tue, Jan 14, 2020 at 1:18 PM Mikael Djurfeldt <mikael@djurfeldt.com>
wrote:

> Dear Andy,
>
> I probably don't have a clue about what you are talking about (or at least
> hope so), but this---the "eq change"---sounds scary to me.
>
> One of the *strengths* of Scheme is that procedures are first class
> citizens. As wonderfully show-cased in e.g. SICP this can be used to obtain
> expressive and concise programs, where procedures can occur many times as
> values outside operator position.
>
> I would certainly *not* want to trade in an important optimization step in
> those cases to obtain intuitive procedure equality. The risk is then that
> you would tend to avoid passing around procedures as values.
>
> Have I misunderstood something or do I have a point here?
>
> Best regards,
> Mikael
>
> Den tis 14 jan. 2020 12:18Andy Wingo <wingo@pobox.com> skrev:
>
>> On Mon 13 Jan 2020 22:32, Stefan Israelsson Tampe <
>> stefan.itampe@gmail.com> writes:
>>
>> > In current guile (eq? f f) = #f for a procedure f. Try:
>>
>> Note that procedure equality is explicitly unspecified by R6RS.  Guile's
>> declarative modules optimization took advantage of this to eta-expand
>> references to declaratively-bound top-level lambda expressions.  This
>> unlocks the "well-known" closure optimizations: closure elision,
>> contification, and so on.
>>
>> However, the intention with the eta expansion was really to prevent the
>>
>>   (module-add! mod 'foo foo)
>>
>> from making the procedure not-well-known.  If that's the only reference
>> to `foo' outside the operator position, procedure identity for `foo' is
>> kept, because it's only accessed outside the module.  But then I
>> realized thanks to your mail (and the three or four times that people
>> stumbled against this beforehand) that we can preserve the optimizations
>> and peoples' intuitions about procedure equality if we restrict
>> eta-expansion to those procedures that are only referenced by value in
>> at most a single position.
>>
>> It would be best to implement the eta-expansion after peval; doing it
>> where we do leaves some optimization opportunities on the table.  But I
>> have implemented this change in git and it should fix this issue.
>>
>> Comparative benchmark results:
>>
>>
>> https://wingolog.org/pub/guile-2.9.7-vs-guile-2.9.9-with-eq-change-microbenchmarks.png
>>
>> Regards,
>>
>> Andy
>>
>>

[-- Attachment #2: Type: text/html, Size: 4141 bytes --]

  reply	other threads:[~2020-01-14 13:25 UTC|newest]

Thread overview: 51+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-01-13  8:39 GNU Guile 2.9.9 Released [beta] Andy Wingo
2020-01-13  8:44 ` Andy Wingo
2020-01-13 17:26 ` John Cowan
2020-01-13 23:09   ` bug#39118: " John Cowan
2020-01-20 16:35   ` bug#39118: Segfault while building on 64-bit Cygwin Ludovic Courtès
2020-01-20 16:38     ` John Cowan
2020-01-20 17:22       ` bug#39118: " Mike Gran via Bug reports for GUILE, GNU's Ubiquitous Extension Language
2020-02-06 10:53         ` Andy Wingo
2020-02-07  4:56           ` Charles Stanhope
2020-02-14 17:46             ` Charles Stanhope
2020-02-15 17:58               ` Marco Atzeri
2020-02-16 23:23               ` Mike Gran
2020-02-16 23:24                 ` John Cowan
2020-02-17  1:08                 ` Charles Stanhope
2020-02-17 19:27                   ` Charles Stanhope
2020-02-17 21:05                     ` Andy Wingo
2020-01-21  9:01       ` Ludovic Courtès
2020-01-21 18:40         ` bug#39118: " szgyg
2020-01-21 21:53           ` John Cowan
2020-01-21 21:37         ` John Cowan
2020-01-23 20:35           ` Ludovic Courtès
2020-01-24 14:36             ` John Cowan
2020-01-25 13:51               ` Ludovic Courtès
2020-01-25 15:54                 ` John Cowan
2020-01-31 14:23                   ` bug#39118: " John Cowan
2020-02-03 22:11                     ` szgyg
2020-02-05 21:11                       ` John Cowan
2020-02-05 22:42                         ` szgyg
2020-01-13 21:32 ` GNU Guile 2.9.9 Released [beta] Stefan Israelsson Tampe
2020-01-13 21:33   ` Stefan Israelsson Tampe
2020-01-14  9:57   ` Stefan Israelsson Tampe
2020-01-14 11:16   ` Andy Wingo
     [not found]     ` <CAGua6m3+mL-1mq0iot1+xvkgkC-_jnhX03uGpOxQkwk0iv12Vw@mail.gmail.com>
2020-01-14 11:43       ` Fwd: " Stefan Israelsson Tampe
2020-01-14 12:18     ` Mikael Djurfeldt
2020-01-14 13:25       ` Stefan Israelsson Tampe [this message]
2020-01-14 14:32       ` Andy Wingo
2020-01-14 14:47         ` Stefan Israelsson Tampe
2020-01-14 16:15           ` Andy Wingo
2020-01-14 16:36             ` Stefan Israelsson Tampe
2020-01-14 17:56               ` Stefan Israelsson Tampe
2020-01-14 16:03         ` Mikael Djurfeldt
     [not found]           ` <CAGua6m2cm2iFTf6EB4MuDR4qNDJ1kt1EjwRCBgLKS+qxncxp+w@mail.gmail.com>
2020-01-14 16:36             ` Fwd: " Stefan Israelsson Tampe
2020-01-14 16:47               ` Mikael Djurfeldt
2020-01-14 17:21                 ` Taylan Kammer
2020-01-14 17:27                 ` Stefan Israelsson Tampe
2020-01-14 20:54           ` Andy Wingo
2020-01-14 20:13 ` Stefan Israelsson Tampe
2020-01-14 21:17   ` Andy Wingo
2020-01-14 21:48     ` Stefan Israelsson Tampe
2020-01-15 19:58       ` Andy Wingo
  -- strict thread matches above, loose matches on Subject: below --
2020-01-14 14:39 dsmich

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='CAGua6m0=nEC-4qDev2=k957QMaNjFF_5Z4Ss7Hv0a9Pfu_zdXw@mail.gmail.com' \
    --to=stefan.itampe@gmail.com \
    --cc=guile-devel@gnu.org \
    --cc=mikael@djurfeldt.com \
    --cc=wingo@pobox.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).