From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Stefan Israelsson Tampe Newsgroups: gmane.lisp.guile.devel Subject: Re: GNU Guile 2.9.9 Released [beta] Date: Tue, 14 Jan 2020 15:47:25 +0100 Message-ID: References: <87zherlphs.fsf@pobox.com> <87eew2i8z3.fsf@pobox.com> <87pnfmglbo.fsf@pobox.com> Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="0000000000003e2a3a059c1aacff" Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="188617"; 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 15:48:06 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 1irNUE-000mV0-56 for guile-devel@m.gmane-mx.org; Tue, 14 Jan 2020 15:48:06 +0100 Original-Received: from localhost ([::1]:41088 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1irNUC-0004nA-N5 for guile-devel@m.gmane-mx.org; Tue, 14 Jan 2020 09:48:04 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:33842) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1irNTn-0004ll-Gz for guile-devel@gnu.org; Tue, 14 Jan 2020 09:47:45 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1irNTl-0004BV-SL for guile-devel@gnu.org; Tue, 14 Jan 2020 09:47:39 -0500 Original-Received: from mail-wr1-x433.google.com ([2a00:1450:4864:20::433]:36225) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1irNTl-0004B7-L2 for guile-devel@gnu.org; Tue, 14 Jan 2020 09:47:37 -0500 Original-Received: by mail-wr1-x433.google.com with SMTP id z3so12449778wru.3 for ; Tue, 14 Jan 2020 06:47:37 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=3JgoAKml/j/327qLxqARXRD9TMEujjysfGaWcZCuSGs=; b=hMAnKseJNnliq5/BOe5QDMlrg4Liz/A5j5Vu2jqq6xh8cyh2FoPTBH79EBv4AoIVS0 InSsjIVlKyL8gfvWij71oTqpOWN3dJ9jACzAr0alnej6A6SFdEa7DoBih86RDGI8+gSD Ty37x3J57De2hP7rXS/l2g1zpGq4TCNzIJg5Xp3aeWbAKzTt8lasePi1ci/0X1hPQW9A w4+LS9fs6HxhA+oE54qWSQ6987NECS+zpukderU4fndcyuns8b1YV1ZEJQJ53RUPyiAd wPKq4yoiTanxJOwj0sZCrcCENnMMUqWl2ifo7wQ1vT2O/I4rPNBT5u5jQWdQCGp+Glst Q/HA== 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:from:date :message-id:subject:to:cc; bh=3JgoAKml/j/327qLxqARXRD9TMEujjysfGaWcZCuSGs=; b=Rl1qINscjRmth4L4wRLDlZlbkbpVExl1w+jNjlmO7HpDIGCmM0rZcGgEZcnnPjs2Af ml68rb8sLtRVd61IfqvJlZOL+fTgkO+iPoMD0syPd1hI+/s+sTCTBHQIrDl1DRle+WF5 8MQytyNYiMPOZkjj2VdWsu+D1utESmrYvZoGCNiiEw8MR1RJrjCpbLDZPriRSOCN3gon 9slOR/tSpYZYpWCJOE9VhExk3soLDtnPVpMuxUavDhgXfUQnxjAFscZMOgHs1+16UYZa 0+u5bYmvUNO1bc4wIsQHaH1vKn38RuPypchcwvuFbi/yhxXlUCp2ac6x2GX7UiGOidTg Byzw== X-Gm-Message-State: APjAAAWxvLO922snSoylMleIDyFPbSJqvyW3zAnDqfsIXVa20Q51e1g0 +IaVKHQamB8CcLy62F+tJ1362gvoJuIbMbpjs5M= X-Google-Smtp-Source: APXvYqzgq4ypRBBJSHApt8Yi7TEMRVaBddWH+0z0+maKdh02yx0GTBj8XiTGgf6IWarFrFBdgvJhCC5M/BYl6588Ef8= X-Received: by 2002:a5d:6144:: with SMTP id y4mr25853766wrt.367.1579013256390; Tue, 14 Jan 2020 06:47:36 -0800 (PST) In-Reply-To: <87pnfmglbo.fsf@pobox.com> X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:4864:20::433 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:20268 Archived-At: --0000000000003e2a3a059c1aacff Content-Type: text/plain; charset="UTF-8" Yes, your patch is indicating when you should use the same identity e.g. all uses of procedures in a higher order position such as an argument or a return value. But I looked at your patch, which looks good but I saw that for operator position you decrease the count. Why? Also you are free to use one version in argument / return position and another one in operator position the only limit is to use the same identity for on operator position. Finally don't you need to count usage of returning a variable as well? On Tue, Jan 14, 2020 at 3:34 PM Andy Wingo wrote: > 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 > > --0000000000003e2a3a059c1aacff Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Yes, your patch is indicating when you should use the same= identity e.g. all uses of procedures in a higher order position=C2=A0such = as an argument or a return=C2=A0
value. But I looked at your patch, whi= ch looks good but I saw that for operator position you decrease=C2=A0the co= unt. Why? Also you are free to use one version in
argument / retu= rn position and another one in operator position the only limit is to use t= he same identity for on operator position. Finally don't you need to co= unt=C2=A0
usage of returning a variable as well?

<= div class=3D"gmail_quote">
On Tue, Jan= 14, 2020 at 3:34 PM Andy Wingo <wing= o@pobox.com> wrote:
On Tue 14 Jan 2020 13:18, Mikael Djurfeldt <mikael@djurfeldt.com> write= s:

> 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/2016-01-17-fu= nction-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

--0000000000003e2a3a059c1aacff--