From: Stefan Israelsson Tampe <stefan.itampe@gmail.com>
To: Andy Wingo <wingo@pobox.com>
Cc: guile-devel <guile-devel@gnu.org>
Subject: Re: GNU Guile 2.9.9 Released [beta]
Date: Tue, 14 Jan 2020 17:36:22 +0100 [thread overview]
Message-ID: <CAGua6m3fhXQFJiCjOM9vZ7QcY6nmvK8L_11DCCZm548mpce8OA@mail.gmail.com> (raw)
In-Reply-To: <87imleggjt.fsf@pobox.com>
[-- Attachment #1: Type: text/plain, Size: 1511 bytes --]
1. I don't understand why you decrement the count in operator position
2. I don't see that you increase the count when a procedure is returned
from a lambda
Example
(define (f a) a)
(define (g)
(hash-set! H f 1) ; (*)
(f 1)) ;(**)
(define (h)
(pk (hash-ref H f))) ; (*)
(g)
(h)
=> '(#f) as count in your patch is counted up twice (*) and down ones (**)
in total count = 1 so you will not maintain the identity of f and you will
get a bad printout
Then we also have this example
(define (f a) a)
(define (u) f)
(define (g) (hash-set! H (u) 1))
(define (h) (pk (hash-ref H f)))
(g)
(h)
This will again print (#f) as the count will be 1.
/Stefan
On Tue, Jan 14, 2020 at 5:16 PM Andy Wingo <wingo@pobox.com> wrote:
> On Tue 14 Jan 2020 15:47, Stefan Israelsson Tampe <stefan.itampe@gmail.com>
> writes:
>
> > 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?
>
> Not sure what the bug is. Do you have a test case that shows the
> behavior that you think is not good?
>
> Andy
>
[-- Attachment #2: Type: text/html, Size: 2581 bytes --]
next prev parent reply other threads:[~2020-01-14 16:36 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
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 [this message]
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=CAGua6m3fhXQFJiCjOM9vZ7QcY6nmvK8L_11DCCZm548mpce8OA@mail.gmail.com \
--to=stefan.itampe@gmail.com \
--cc=guile-devel@gnu.org \
--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).