From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Mikael Djurfeldt Newsgroups: gmane.lisp.guile.devel Subject: Re: GNU Guile 2.9.9 Released [beta] Date: Tue, 14 Jan 2020 17:03:32 +0100 Message-ID: References: <87zherlphs.fsf@pobox.com> <87eew2i8z3.fsf@pobox.com> <87pnfmglbo.fsf@pobox.com> Reply-To: mikael@djurfeldt.com Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="0000000000009cce1d059c1bbcd9" Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="40769"; mail-complaints-to="usenet@blaine.gmane.org" Cc: guile-devel To: Andy Wingo Original-X-From: guile-devel-bounces+guile-devel=m.gmane-mx.org@gnu.org Tue Jan 14 17:07:29 2020 Return-path: Envelope-to: guile-devel@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by blaine.gmane.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1irOj2-000AGM-GA for guile-devel@m.gmane-mx.org; Tue, 14 Jan 2020 17:07:28 +0100 Original-Received: from localhost ([::1]:42796 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1irOj0-0001O6-Kg for guile-devel@m.gmane-mx.org; Tue, 14 Jan 2020 11:07:26 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:48939) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1irOfX-000675-CJ for guile-devel@gnu.org; Tue, 14 Jan 2020 11:03:54 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1irOfT-0006Bd-Jx for guile-devel@gnu.org; Tue, 14 Jan 2020 11:03:51 -0500 Original-Received: from mail-vs1-f42.google.com ([209.85.217.42]:37083) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1irOfT-0006BO-FM for guile-devel@gnu.org; Tue, 14 Jan 2020 11:03:47 -0500 Original-Received: by mail-vs1-f42.google.com with SMTP id x18so8552377vsq.4 for ; Tue, 14 Jan 2020 08:03:47 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:reply-to :from:date:message-id:subject:to:cc; bh=qQA+atakuM5HibU0KIKtaKK7fa0tvHNm6n4xgkqYPhQ=; b=m4bzIYj3Z1H9GsA9/PlwoX6FF/+yCNoiSil4/4qVaNFxm5JHtlPW6FnsSzuxt+zlQE axmm+/rQaVsT1m0p09QYtG8Ma4RE8+5dkya1NguzwUCuHKW1hDk3ZO6lA1t18BwokaBP 2aLqOxkIqA4ehxCNu0RNL/itLQcbvDXaevIlM1Zs47ag/WCeOkzOtULIE0yMPSMC0ICl PPgAZzs3qLPP+tFRPoMbCQZf4+4tsm9fd732nZFnLpqZdR9qQ08UgiGqUpBmeOF0W6pV DBwTTlejB2aNHPVhCyODDOxmgw88Rk5fvmtJPYow9LTrI+hZQTdNJP/DjxHK6XtH+mdC hTMw== X-Gm-Message-State: APjAAAWxsxezk5n3kocthXNEwuuUCAEasT401BhUNWagsEMAGphHMBB9 zLK5RuCVHIa0tAjGcbpW22G64F8wEdkR1Ok/J4o= X-Google-Smtp-Source: APXvYqx/byMjozusxPxJscKZHTbEd7Y5p05bJPIY5relsBFeO3Lwl4Pw3b3GRBgG+ZuNAL9aZZL0LERrgDY4QKrT6CA= X-Received: by 2002:a67:77d4:: with SMTP id s203mr1734976vsc.101.1579017825994; Tue, 14 Jan 2020 08:03:45 -0800 (PST) In-Reply-To: <87pnfmglbo.fsf@pobox.com> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 209.85.217.42 X-BeenThere: guile-devel@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "Developers list for Guile, the GNU extensibility library" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guile-devel-bounces+guile-devel=m.gmane-mx.org@gnu.org Original-Sender: "guile-devel" Xref: news.gmane.org gmane.lisp.guile.devel:20269 Archived-At: --0000000000009cce1d059c1bbcd9 Content-Type: text/plain; charset="UTF-8" Hmm... it seems like both Stefan and you have interpreted my post exactly the opposite way compared to how it was meant. :) I completely agree that procedure equality is not strongly connected to the first citizen-ness. What I wanted to say is that I probably prefer you to *reverse* the recent patch because I prefer to have good optimization also when procedures are referenced by value in more than one non-operator position. I prefer this over having (eq? p p) => #t for the reasons I stated. Best regards, Mikael Den tis 14 jan. 2020 15:33Andy Wingo skrev: > On Tue 14 Jan 2020 13:18, Mikael Djurfeldt writes: > > > 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. > > Is this true? > > (eq? '() '()) > > What about this? > > (eq? '(a) '(a)) > > And yet, are datums not first-class values? What does being first-class > have to do with it? > > Does it matter whether it's eq? or eqv? > > What about: > > (eq? (lambda () 10) (lambda () 10)) > > What's the difference? > > What's the difference in the lambda calculus between "\x.f x" and "f"? > > What if in a partial evaluator, you see a `(eq? x y)`, and you notice > that `x' is bound to a lambda expression? Can you say anything about > the value of the expression? > > Does comparing procedures for equality mean anything at all? > https://cs-syd.eu/posts/2016-01-17-function-equality-in-haskell > > Anyway :) All that is a bit of trolling on my part. What I mean to say > is that instincts are tricky when it comes to object identity, equality, > equivalence, and especially all of those combined with procedures. The > R6RS (what can be more Schemely than a Scheme standard?) makes this > clear. > > All that said, with the recent patch, I believe that Guile 3.0's > behavior preserves your intuitions. Bug reports very welcome! > > Andy > --0000000000009cce1d059c1bbcd9 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Hmm... it seems like both Stefan and you= have interpreted my post exactly the opposite way compared to how it was m= eant. :)

I completely agree that proc= edure equality is not strongly connected to the first citizen-ness.

What I wanted to say is that I probably prefer you to *re= verse* the recent patch because I prefer to have good optimization also whe= n procedures are referenced by value in more than one non-operator position= . I prefer this over having (eq? p p) =3D> #t for the reasons I stated.<= /div>

Best regards,
Mikael

=
Den tis 14= jan. 2020 15:33Andy Wingo <wingo@pobox.com> skrev:
On Tue 14 Jan 2020 13:18, Mikael Djurfeldt <mi= kael@djurfeldt.com> writes:

> 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.

Is this true?

=C2=A0 (eq? '() '())

What about this?

=C2=A0 (eq? '(a) '(a))

And yet, are datums not first-class values?=C2=A0 What does being first-cla= ss
have to do with it?

Does it matter whether it's eq? or eqv?

What about:

=C2=A0 (eq? (lambda () 10) (lambda () 10))

What's the difference?

What's the difference in the lambda calculus between "\x.f x"= and "f"?

What if in a partial evaluator, you see a `(eq? x y)`, and you notice
that `x' is bound to a lambda expression?=C2=A0 Can you say anything ab= out
the value of the expression?

Does comparing procedures for equality mean anything at all?
https://cs-syd.eu/posts/20= 16-01-17-function-equality-in-haskell

Anyway :)=C2=A0 All that is a bit of trolling on my part.=C2=A0 What I mean= to say
is that instincts are tricky when it comes to object identity, equality, equivalence, and especially all of those combined with procedures.=C2=A0 Th= e
R6RS (what can be more Schemely than a Scheme standard?) makes this
clear.

All that said, with the recent patch, I believe that Guile 3.0's
behavior preserves your intuitions.=C2=A0 Bug reports very welcome!

Andy
--0000000000009cce1d059c1bbcd9--