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: Fwd: GNU Guile 2.9.9 Released [beta] Date: Tue, 14 Jan 2020 17:36:49 +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="00000000000082fad8059c1c3359" Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="122439"; mail-complaints-to="usenet@blaine.gmane.org" To: guile-devel Original-X-From: guile-devel-bounces+guile-devel=m.gmane-mx.org@gnu.org Tue Jan 14 17:37:21 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 1irPBu-000VLp-H3 for guile-devel@m.gmane-mx.org; Tue, 14 Jan 2020 17:37:18 +0100 Original-Received: from localhost ([::1]:43246 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1irPBt-0000Fi-Bl for guile-devel@m.gmane-mx.org; Tue, 14 Jan 2020 11:37:17 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:59523) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1irPBg-0000FJ-3j for guile-devel@gnu.org; Tue, 14 Jan 2020 11:37:05 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1irPBe-0007Nu-7N for guile-devel@gnu.org; Tue, 14 Jan 2020 11:37:04 -0500 Original-Received: from mail-wm1-x32a.google.com ([2a00:1450:4864:20::32a]:35539) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1irPBd-0007MS-Vr for guile-devel@gnu.org; Tue, 14 Jan 2020 11:37:02 -0500 Original-Received: by mail-wm1-x32a.google.com with SMTP id p17so14516092wmb.0 for ; Tue, 14 Jan 2020 08:37:01 -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; bh=51hsyL8Ou79Cka17U04aN+uMllq/5KDxFXjaHRpVy54=; b=MldSTRp18oVlmIh8TqU1mAWcy9cUXb3qK1cYFwg8Yoypn/K64ZTAac3ct8H/hszVe9 GprDAXGFbUJlM5EZk+ils24lK/nIS8kMfcpygQXFCjvEuYMSBx6B1tw4xWEjOLMGYJvM 0m6YjLiYtc1JREkbdbyUX1tGYbDYGH5R12fLSnbNqH5PySEopnZO2s2/gGh7b/UyjDoj vAnJxarQbLYfI8knJ8vOzgoqcA96IXb7wiMxemlzzHuN2eKRd1lzy6t+3/+7/CVTaE3Q +kuNHWSNmmPROcNzkL97rWXzN299T4+/+idn0N5YLdhgPlz3bKMS2kRRXxEEilAiTPB5 Xn3Q== 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; bh=51hsyL8Ou79Cka17U04aN+uMllq/5KDxFXjaHRpVy54=; b=pDpXFxtEe/HbI17lPFWq7uSTDAxTf6T8UuY1yH3cHUvoqhhjjC0P0FDFJezAEHSI8l gWdxWksvRrLFRn5xT0xr6PZZhC4GsgjIiU1lrKYg7RFj+sMmPl95RxSSB3w75a2Q3ZvI GAQIkxkAJUAOSemUtOdF8S0rh1YllI6uyVIoQdsrlyd77SPfBLZmb0QVxrwxbeYUcbC1 aTIb/OniiDGt/TPLIid7AdFFONFbB7zdBv3m7T5FUgoTf7LD87hDnpyEYAlKeaWIjyn/ fEKq/H762jngi07qb9/0VwzS2w9hfQKdIKphYi8YbU/2BQkOPfx7ePg/aa163iDoz3Bt NUpg== X-Gm-Message-State: APjAAAWE5hWPTImUQ0qlfrIlvEXjexZ6IR2v/+dJvvLE11/bARH9SkQC oYOdEypGJwKL1gZ/aWNEUjDyr/+lo3R6PRzSh1DvPQ== X-Google-Smtp-Source: APXvYqytbO3f2fklwL0bJFv+xLgM85v6phXMuiGLr+jJxRdIIvwdBk/kjX4IbIvfmEYZxyLYWUy5B9t8rcffA5/oYzo= X-Received: by 2002:a1c:7d93:: with SMTP id y141mr29091545wmc.111.1579019820791; Tue, 14 Jan 2020 08:37:00 -0800 (PST) In-Reply-To: X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:4864:20::32a 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:20272 Archived-At: --00000000000082fad8059c1c3359 Content-Type: text/plain; charset="UTF-8" ---------- Forwarded message --------- From: Stefan Israelsson Tampe Date: Tue, Jan 14, 2020 at 5:23 PM Subject: Re: GNU Guile 2.9.9 Released [beta] To: Mikael Djurfeldt This is how it always have been in guile, without this patch you cannot use procedure-property, use a function as a key to hash maps etc. If this patch goes you need to forbid usage of procedures as keys to hashmap, nuke procedure properties and friends or mark it as internal to avoid luring schemers into using a faulty method. This patch improves the use of higher order functions not risk it. For example I often classify functions into different categories and maintain this information as a property on the function via a hashmap. This is a quite natural way of programming. Without it you need to put the procedures in a datastructure and track that datastructure that will uglify a lot of code. It is manageable but when the opposite is similarly speeded code but much nicer and enjoyable code with absolutely no risk in higher order functionality countrary as you state (because higher order worked flawlessly before in guile and the patch is restoring that). On Tue, Jan 14, 2020 at 5:07 PM Mikael Djurfeldt wrote: > 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 >> > --00000000000082fad8059c1c3359 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable


---------- Forwarded message ---------
From: Stefan Israelsson Tampe <stefan.itampe@= gmail.com>
Date: Tue, Jan 14, 2020 at 5:23 PM
Subject: = Re: GNU Guile 2.9.9 Released [beta]
To: Mikael Djurfeldt <mikael@djurfeldt.com>


=
This is how it always have been in guile, without this pat= ch you cannot use procedure-property, use a function as a key to hash maps = etc. If this=C2=A0patch goes you need to forbid usage
of procedures as = keys to hashmap, nuke procedure properties and friends or mark it as intern= al to avoid luring schemers into using a faulty method. This patch improves= the use of higher=C2=A0order functions
not risk it. For example = I often classify functions into different categories and maintain this info= rmation as a property on the function via a hashmap. This is a quite=C2=A0n= atural way of programming. Without it you need
to put the procedu= res in a datastructure and=C2=A0track that datastructure that will uglify a= lot of code. It is manageable=C2=A0but when the opposite is similarly spee= ded code but much nicer and enjoyable code with absolutely no risk in
=
higher order functionality countrary as you state (because higher orde= r worked=C2=A0flawlessly before in guile and the patch is restoring that).<= /div>

On Tue, Jan 14, 2020 at 5:07 PM Mikael Djurfeldt <mikael@djurfeldt.com> wrote= :
Hmm... it seems like both Stefan and you have interpre= ted 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.

<= div>What I wanted to say is that I probably prefer you to *reverse* the rec= ent patch because I prefer to have good optimization also when procedures a= re referenced by value in more than one non-operator position. I prefer thi= s over having (eq? p p) =3D> #t for the reasons I stated.

=
Best regards,
Mikael

Den tis 14 jan. 2020 15:= 33Andy Wingo <wingo= @pobox.com> skrev:
On Tue 14 Jan 2020 13:18, Mikael Djurfeldt <mikael@djurfeld= t.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
--00000000000082fad8059c1c3359--