<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
	<id>tag:old.nabble.com,2006:forum-1752</id>
	<title>Nabble - Gnu - MIT Scheme</title>
	<updated>2009-12-23T14:33:31Z</updated>
	<link rel="self" type="application/atom+xml" href="http://old.nabble.com/Gnu---MIT-Scheme-f1752.xml" />
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Gnu---MIT-Scheme-f1752.html" />
	<subtitle type="html">MIT/GNU Scheme is an implementation of the Scheme programming language, providing an interpreter, compiler, source-code debugger, integrated Emacs-like editor, and a large runtime library. MIT/GNU Scheme is best suited to programming large applications with a rapid development cycle. Gnu - MIT Scheme home is &lt;a href=&quot;http://savannah.gnu.org/projects/mit-scheme/&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;here&lt;/a&gt;.</subtitle>
	
<entry>
	<id>tag:old.nabble.com,2006:post-26908369</id>
	<title>Re: Complexity</title>
	<published>2009-12-23T14:33:31Z</published>
	<updated>2009-12-23T14:33:31Z</updated>
	<author>
		<name>Joe Marshall</name>
	</author>
	<content type="html">This list is for discussion of the development of MIT Scheme.
&lt;br&gt;I think you'll have more success if you ask your instructor.
&lt;br&gt;&lt;br&gt;&lt;br&gt;-- 
&lt;br&gt;~jrm
&lt;br&gt;&lt;br&gt;&lt;br&gt;_______________________________________________
&lt;br&gt;MIT-Scheme-devel mailing list
&lt;br&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26908369&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;MIT-Scheme-devel@...&lt;/a&gt;
&lt;br&gt;&lt;a href=&quot;http://lists.gnu.org/mailman/listinfo/mit-scheme-devel&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://lists.gnu.org/mailman/listinfo/mit-scheme-devel&lt;/a&gt;&lt;br&gt;&lt;p&gt;From forum: &lt;a href=&quot;http://old.nabble.com/Gnu---MIT-Scheme---Dev-f1755.html&quot; embed=&quot;fixTarget[1755]&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;Gnu - MIT Scheme - Dev&lt;/a&gt;&lt;/p&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Complexity-tp26893993p26908369.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26893993</id>
	<title>Complexity</title>
	<published>2009-12-22T12:37:28Z</published>
	<updated>2009-12-22T12:37:28Z</updated>
	<author>
		<name>johngalt</name>
	</author>
	<content type="html">Hi,
&lt;br&gt;I wrote the nwxt codes:
&lt;br&gt;&lt;br&gt;(define (prefix k lst)
&lt;br&gt;&amp;nbsp; (cond ( (= k 0) '())
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;( (null? lst) '())
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;(else (cons (car lst) (prefix (- k 1) (cdr lst))))))
&lt;br&gt;&lt;br&gt;(define (runs k lst)
&lt;br&gt;&amp;nbsp; (let ((p (prefix k lst)))
&lt;br&gt;&amp;nbsp; &amp;nbsp; (if (&amp;gt; k (length p)) '()
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; (cons &amp;nbsp;p (runs k (cdr lst))))))
&lt;br&gt;&lt;br&gt;-------------
&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;(define (accumulate op initial sequence)
&lt;br&gt;&amp;nbsp; (if (null? sequence)
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; initial
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; (op (car sequence)
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; (accumulate op initial (cdr sequence)))))
&lt;br&gt;&lt;br&gt;(define (accumulate-runs k op init lst)
&lt;br&gt;&amp;nbsp; &amp;nbsp;(map (lambda (x) (accumulate op init x))
&lt;br&gt;&amp;nbsp; &amp;nbsp; (runs k lst)))
&lt;br&gt;----------------
&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;I'm not very familiar with this subject, so I need to ask. What is the complexity of the two codes above?
&lt;br&gt;Thanks for any kind of help.&lt;p&gt;From forum: &lt;a href=&quot;http://old.nabble.com/Gnu---MIT-Scheme---Dev-f1755.html&quot; embed=&quot;fixTarget[1755]&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;Gnu - MIT Scheme - Dev&lt;/a&gt;&lt;/p&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Complexity-tp26893993p26893993.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26888810</id>
	<title>Re: weak hash table data</title>
	<published>2009-12-22T05:59:04Z</published>
	<updated>2009-12-22T05:59:04Z</updated>
	<author>
		<name>Taylor R Campbell</name>
	</author>
	<content type="html">&amp;nbsp; &amp;nbsp;Date: Tue, 22 Dec 2009 02:04:03 -0800
&lt;br&gt;&amp;nbsp; &amp;nbsp;From: Chris Hanson &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26888810&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;cph@...&lt;/a&gt;&amp;gt;
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp;This is incorrect. &amp;nbsp;GC marks every table as needing rehash; the next
&lt;br&gt;&amp;nbsp; &amp;nbsp;access to that table forces a rehash, which cleans the table.
&lt;br&gt;&lt;br&gt;Right, although HASH-TABLE/DATUM-LIST and friends don't count as
&lt;br&gt;`access'. &amp;nbsp;Still, weak hash tables that are not in frequent use will
&lt;br&gt;not be cleaned, nor will weak hash tables that are not GC-sensitive.
&lt;br&gt;For example, a weak hash table keyed by symbols with SYMBOL-HASH as
&lt;br&gt;its hash function rather than EQ-HASH (or one keyed by URIs with
&lt;br&gt;(COMPOSE STRING-HASH URI-&amp;gt;STRING) as its hash function, since interned
&lt;br&gt;symbols are now held strongly as keys).
&lt;br&gt;&lt;br&gt;&lt;br&gt;_______________________________________________
&lt;br&gt;MIT-Scheme-devel mailing list
&lt;br&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26888810&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;MIT-Scheme-devel@...&lt;/a&gt;
&lt;br&gt;&lt;a href=&quot;http://lists.gnu.org/mailman/listinfo/mit-scheme-devel&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://lists.gnu.org/mailman/listinfo/mit-scheme-devel&lt;/a&gt;&lt;br&gt;&lt;p&gt;From forum: &lt;a href=&quot;http://old.nabble.com/Gnu---MIT-Scheme---Dev-f1755.html&quot; embed=&quot;fixTarget[1755]&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;Gnu - MIT Scheme - Dev&lt;/a&gt;&lt;/p&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/weak-hash-table-data-tp26884398p26888810.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26886064</id>
	<title>Re: weak hash table data</title>
	<published>2009-12-22T02:04:03Z</published>
	<updated>2009-12-22T02:04:03Z</updated>
	<author>
		<name>Chris Hanson-6</name>
	</author>
	<content type="html">This is incorrect. &amp;nbsp;GC marks every table as needing rehash; the next
&lt;br&gt;access to that table forces a rehash, which cleans the table.
&lt;br&gt;&lt;br&gt;On Mon, Dec 21, 2009 at 10:09 PM, Taylor R Campbell &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26886064&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;campbell@...&lt;/a&gt;&amp;gt; wrote:
&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt; Key-weak hash tables are never cleaned automatically, not even in a
&lt;br&gt;&amp;gt; secondary GC daemon; unless you call HASH-TABLE/CLEAN! or cause them
&lt;br&gt;&amp;gt; to be rehashed, broken entries will retain their data (but not their
&lt;br&gt;&amp;gt; keys) strongly.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; (let ((a (make-eq-hash-table))
&lt;br&gt;&amp;gt;      (b (make-eq-hash-table)))
&lt;br&gt;&amp;gt;  (let ((p (list 'p))
&lt;br&gt;&amp;gt;        (q (list 'q))
&lt;br&gt;&amp;gt;        (r (list 'r)))
&lt;br&gt;&amp;gt;    (hash-table/put! a p q)
&lt;br&gt;&amp;gt;    (hash-table/put! b q r))
&lt;br&gt;&amp;gt;  (gc-flip)
&lt;br&gt;&amp;gt;  (list (hash-table/datum-list a)
&lt;br&gt;&amp;gt;        (hash-table/datum-list b)))
&lt;br&gt;&amp;gt; ;Value: (() ((r)))
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; The manual doesn't claim that *associations* are deleted from weak
&lt;br&gt;&amp;gt; hash tables if their keys are reclaimed -- it says only that the hash
&lt;br&gt;&amp;gt; table holds its keys weakly --, but this is not the behaviour I expect
&lt;br&gt;&amp;gt; for an object called a `weak hash table'.  Does this behaviour worry
&lt;br&gt;&amp;gt; anyone else?
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; _______________________________________________
&lt;br&gt;&amp;gt; MIT-Scheme-devel mailing list
&lt;br&gt;&amp;gt; &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26886064&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;MIT-Scheme-devel@...&lt;/a&gt;
&lt;br&gt;&amp;gt; &lt;a href=&quot;http://lists.gnu.org/mailman/listinfo/mit-scheme-devel&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://lists.gnu.org/mailman/listinfo/mit-scheme-devel&lt;/a&gt;&lt;br&gt;&amp;gt;
&lt;/div&gt;&lt;br&gt;&lt;br&gt;_______________________________________________
&lt;br&gt;MIT-Scheme-devel mailing list
&lt;br&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26886064&amp;i=2&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;MIT-Scheme-devel@...&lt;/a&gt;
&lt;br&gt;&lt;a href=&quot;http://lists.gnu.org/mailman/listinfo/mit-scheme-devel&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://lists.gnu.org/mailman/listinfo/mit-scheme-devel&lt;/a&gt;&lt;br&gt;&lt;p&gt;From forum: &lt;a href=&quot;http://old.nabble.com/Gnu---MIT-Scheme---Dev-f1755.html&quot; embed=&quot;fixTarget[1755]&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;Gnu - MIT Scheme - Dev&lt;/a&gt;&lt;/p&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/weak-hash-table-data-tp26884398p26886064.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26884398</id>
	<title>weak hash table data</title>
	<published>2009-12-21T22:09:09Z</published>
	<updated>2009-12-21T22:09:09Z</updated>
	<author>
		<name>Taylor R Campbell</name>
	</author>
	<content type="html">Key-weak hash tables are never cleaned automatically, not even in a
&lt;br&gt;secondary GC daemon; unless you call HASH-TABLE/CLEAN! or cause them
&lt;br&gt;to be rehashed, broken entries will retain their data (but not their
&lt;br&gt;keys) strongly.
&lt;br&gt;&lt;br&gt;(let ((a (make-eq-hash-table))
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; (b (make-eq-hash-table)))
&lt;br&gt;&amp;nbsp; (let ((p (list 'p))
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; (q (list 'q))
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; (r (list 'r)))
&lt;br&gt;&amp;nbsp; &amp;nbsp; (hash-table/put! a p q)
&lt;br&gt;&amp;nbsp; &amp;nbsp; (hash-table/put! b q r))
&lt;br&gt;&amp;nbsp; (gc-flip)
&lt;br&gt;&amp;nbsp; (list (hash-table/datum-list a)
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; (hash-table/datum-list b)))
&lt;br&gt;;Value: (() ((r)))
&lt;br&gt;&lt;br&gt;The manual doesn't claim that *associations* are deleted from weak
&lt;br&gt;hash tables if their keys are reclaimed -- it says only that the hash
&lt;br&gt;table holds its keys weakly --, but this is not the behaviour I expect
&lt;br&gt;for an object called a `weak hash table'. &amp;nbsp;Does this behaviour worry
&lt;br&gt;anyone else?
&lt;br&gt;&lt;br&gt;&lt;br&gt;_______________________________________________
&lt;br&gt;MIT-Scheme-devel mailing list
&lt;br&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26884398&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;MIT-Scheme-devel@...&lt;/a&gt;
&lt;br&gt;&lt;a href=&quot;http://lists.gnu.org/mailman/listinfo/mit-scheme-devel&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://lists.gnu.org/mailman/listinfo/mit-scheme-devel&lt;/a&gt;&lt;br&gt;&lt;p&gt;From forum: &lt;a href=&quot;http://old.nabble.com/Gnu---MIT-Scheme---Dev-f1755.html&quot; embed=&quot;fixTarget[1755]&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;Gnu - MIT Scheme - Dev&lt;/a&gt;&lt;/p&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/weak-hash-table-data-tp26884398p26884398.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26881177</id>
	<title>Re: make-eq-hash-table</title>
	<published>2009-12-21T14:35:04Z</published>
	<updated>2009-12-21T14:35:04Z</updated>
	<author>
		<name>Taylor R Campbell</name>
	</author>
	<content type="html">&amp;nbsp; &amp;nbsp;Date: Mon, 21 Dec 2009 14:03:50 -0800
&lt;br&gt;&amp;nbsp; &amp;nbsp;From: Chris Hanson &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26881177&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;cph@...&lt;/a&gt;&amp;gt;
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp;Actually, they want to be both key-weak and datum-weak.
&lt;br&gt;&lt;br&gt;EXPANDED-NAMES needs to be key-weak and datum-strong (its data are
&lt;br&gt;hash tables that are not likely to be referenced, strongly or weakly,
&lt;br&gt;from anywhere else), but for the other two hash tables, while they
&lt;br&gt;ought to be datum-weak, I don't think it matters whether they are
&lt;br&gt;key-weak or key-strong: their data have strong references to their
&lt;br&gt;keys, so as long as their data are strongly referenced, the keys will
&lt;br&gt;be too.
&lt;br&gt;&lt;br&gt;But this is all moot until we have datum-weak hash tables. &amp;nbsp;I've just
&lt;br&gt;left a comment by %MAKE-XML-NAME explaining this. &amp;nbsp;I'll commit my
&lt;br&gt;changes once I have finished a LIARC build.
&lt;br&gt;&lt;br&gt;&lt;br&gt;_______________________________________________
&lt;br&gt;MIT-Scheme-devel mailing list
&lt;br&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26881177&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;MIT-Scheme-devel@...&lt;/a&gt;
&lt;br&gt;&lt;a href=&quot;http://lists.gnu.org/mailman/listinfo/mit-scheme-devel&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://lists.gnu.org/mailman/listinfo/mit-scheme-devel&lt;/a&gt;&lt;br&gt;&lt;p&gt;From forum: &lt;a href=&quot;http://old.nabble.com/Gnu---MIT-Scheme---Dev-f1755.html&quot; embed=&quot;fixTarget[1755]&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;Gnu - MIT Scheme - Dev&lt;/a&gt;&lt;/p&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/make-eq-hash-table-tp26861209p26881177.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26880760</id>
	<title>Re: make-eq-hash-table</title>
	<published>2009-12-21T14:03:50Z</published>
	<updated>2009-12-21T14:03:50Z</updated>
	<author>
		<name>Chris Hanson-6</name>
	</author>
	<content type="html">Actually, they want to be both key-weak and datum-weak.
&lt;br&gt;&lt;br&gt;On Mon, Dec 21, 2009 at 9:12 AM, Taylor R Campbell &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26880760&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;campbell@...&lt;/a&gt;&amp;gt; wrote:
&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt;   Date: Sun, 20 Dec 2009 21:49:38 -0800
&lt;br&gt;&amp;gt;   From: Chris Hanson &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26880760&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;cph@...&lt;/a&gt;&amp;gt;
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;   I agree with most of your analysis.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; OK, I'll start making the changes.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;   *** xml/xml-names.scm
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;   This is hairy: part of it looks like it needs to be datum-weak, but we
&lt;br&gt;&amp;gt;   don't have that now.  But someone more familiar with the XML name
&lt;br&gt;&amp;gt;   abstraction should review this.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;   ****************
&lt;br&gt;&amp;gt;   All three tables should be weak.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; Making them weak will do nothing, actually, because every datum in
&lt;br&gt;&amp;gt; them has a strong reference to its key.  These want to be datum-weak
&lt;br&gt;&amp;gt; hash tables, not key-weak hash tables.  So I think that for now, since
&lt;br&gt;&amp;gt; we don't have datum-weak hash tables, these should all be strong,
&lt;br&gt;&amp;gt; perhaps with a comment about what the state of affairs should be.
&lt;br&gt;&amp;gt;
&lt;/div&gt;&lt;br&gt;&lt;br&gt;_______________________________________________
&lt;br&gt;MIT-Scheme-devel mailing list
&lt;br&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26880760&amp;i=2&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;MIT-Scheme-devel@...&lt;/a&gt;
&lt;br&gt;&lt;a href=&quot;http://lists.gnu.org/mailman/listinfo/mit-scheme-devel&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://lists.gnu.org/mailman/listinfo/mit-scheme-devel&lt;/a&gt;&lt;br&gt;&lt;p&gt;From forum: &lt;a href=&quot;http://old.nabble.com/Gnu---MIT-Scheme---Dev-f1755.html&quot; embed=&quot;fixTarget[1755]&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;Gnu - MIT Scheme - Dev&lt;/a&gt;&lt;/p&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/make-eq-hash-table-tp26861209p26880760.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26877037</id>
	<title>Re: make-eq-hash-table</title>
	<published>2009-12-21T09:12:33Z</published>
	<updated>2009-12-21T09:12:33Z</updated>
	<author>
		<name>Taylor R Campbell</name>
	</author>
	<content type="html">&amp;nbsp; &amp;nbsp;Date: Sun, 20 Dec 2009 21:49:38 -0800
&lt;br&gt;&amp;nbsp; &amp;nbsp;From: Chris Hanson &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26877037&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;cph@...&lt;/a&gt;&amp;gt;
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp;I agree with most of your analysis.
&lt;br&gt;&lt;br&gt;OK, I'll start making the changes.
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp;*** xml/xml-names.scm
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp;This is hairy: part of it looks like it needs to be datum-weak, but we
&lt;br&gt;&amp;nbsp; &amp;nbsp;don't have that now. &amp;nbsp;But someone more familiar with the XML name
&lt;br&gt;&amp;nbsp; &amp;nbsp;abstraction should review this.
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp;****************
&lt;br&gt;&amp;nbsp; &amp;nbsp;All three tables should be weak.
&lt;br&gt;&lt;br&gt;Making them weak will do nothing, actually, because every datum in
&lt;br&gt;them has a strong reference to its key. &amp;nbsp;These want to be datum-weak
&lt;br&gt;hash tables, not key-weak hash tables. &amp;nbsp;So I think that for now, since
&lt;br&gt;we don't have datum-weak hash tables, these should all be strong,
&lt;br&gt;perhaps with a comment about what the state of affairs should be.
&lt;br&gt;&lt;br&gt;&lt;br&gt;_______________________________________________
&lt;br&gt;MIT-Scheme-devel mailing list
&lt;br&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26877037&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;MIT-Scheme-devel@...&lt;/a&gt;
&lt;br&gt;&lt;a href=&quot;http://lists.gnu.org/mailman/listinfo/mit-scheme-devel&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://lists.gnu.org/mailman/listinfo/mit-scheme-devel&lt;/a&gt;&lt;br&gt;&lt;p&gt;From forum: &lt;a href=&quot;http://old.nabble.com/Gnu---MIT-Scheme---Dev-f1755.html&quot; embed=&quot;fixTarget[1755]&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;Gnu - MIT Scheme - Dev&lt;/a&gt;&lt;/p&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/make-eq-hash-table-tp26861209p26877037.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26870168</id>
	<title>Re: make-eq-hash-table</title>
	<published>2009-12-20T21:49:38Z</published>
	<updated>2009-12-20T21:49:38Z</updated>
	<author>
		<name>Chris Hanson-6</name>
	</author>
	<content type="html">I agree with most of your analysis. &amp;nbsp;Here are my comments:
&lt;br&gt;&lt;br&gt;*** edwin/eystep.scm, ynode-regions
&lt;br&gt;&lt;br&gt;What are the keys to these hash tables? &amp;nbsp;I don't know how long they
&lt;br&gt;persist.
&lt;br&gt;&lt;br&gt;****************
&lt;br&gt;The keys are stepper nodes; they are stored in a text property and
&lt;br&gt;consequently will be held appropriately. &amp;nbsp;This should be a weak table.
&lt;br&gt;&lt;br&gt;*** edwin/win32.scm, event-handlers
&lt;br&gt;&lt;br&gt;The keys in EVENT-HANDLERS are integers. &amp;nbsp;I think this should be a
&lt;br&gt;key-strong eqv hash table rather than a key-weak eq hash table.
&lt;br&gt;&lt;br&gt;****************
&lt;br&gt;For numbers, it doesn't matter, but strong is slightly lower overhead.
&lt;br&gt;&lt;br&gt;*** edwin/xterm.scm, symbol-&amp;gt;x-atom table in display/cached-atom-tables
&lt;br&gt;&lt;br&gt;Whether this should be key-strong or key-weak depends on whether the
&lt;br&gt;set of atoms that it will map is arbitrarily large.
&lt;br&gt;&lt;br&gt;****************
&lt;br&gt;This table should be strong.
&lt;br&gt;&lt;br&gt;*** xml/xhtml-entities.scm, table in html-char-&amp;gt;name-map
&lt;br&gt;&lt;br&gt;The keys in the table inside HTML-CHAR-&amp;gt;NAME-MAP is keyed by
&lt;br&gt;characters. &amp;nbsp;Should this be a key-strong eqv hash table rather than a
&lt;br&gt;key-weak eq hash table?
&lt;br&gt;&lt;br&gt;****************
&lt;br&gt;Again, it doesn't matter, but strong is lower overhead.
&lt;br&gt;&lt;br&gt;*** xml/xml-names.scm
&lt;br&gt;&lt;br&gt;This is hairy: part of it looks like it needs to be datum-weak, but we
&lt;br&gt;don't have that now. &amp;nbsp;But someone more familiar with the XML name
&lt;br&gt;abstraction should review this.
&lt;br&gt;&lt;br&gt;****************
&lt;br&gt;All three tables should be weak.
&lt;br&gt;&lt;br&gt;&lt;br&gt;On Sun, Dec 20, 2009 at 5:29 PM, Taylor R Campbell &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26870168&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;campbell@...&lt;/a&gt;&amp;gt; wrote:
&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt;   Date: Sun, 20 Dec 2009 15:21:20 -0800
&lt;br&gt;&amp;gt;   From: Chris Hanson &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26870168&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;cph@...&lt;/a&gt;&amp;gt;
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;   The documentation clearly states that make-eq-hash-table returns a
&lt;br&gt;&amp;gt;   weak table, and has so stated for a long time.  So it's not reasonable
&lt;br&gt;&amp;gt;   to change the semantics overnight.  Here's what I propose:
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;   [...]
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;   OK?
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; Sounds good to me.  I have gone through the list I made earlier and
&lt;br&gt;&amp;gt; updated some of my analysis.  Since there were so many cases and my
&lt;br&gt;&amp;gt; analysis was very shallow, I am not yet comfortable committing changes
&lt;br&gt;&amp;gt; reflecting the analysis.  Would anyone care to review the list, the
&lt;br&gt;&amp;gt; updated version of which I have attached?
&lt;br&gt;&amp;gt;
&lt;/div&gt;&lt;br&gt;&lt;br&gt;_______________________________________________
&lt;br&gt;MIT-Scheme-devel mailing list
&lt;br&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26870168&amp;i=2&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;MIT-Scheme-devel@...&lt;/a&gt;
&lt;br&gt;&lt;a href=&quot;http://lists.gnu.org/mailman/listinfo/mit-scheme-devel&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://lists.gnu.org/mailman/listinfo/mit-scheme-devel&lt;/a&gt;&lt;br&gt;&lt;p&gt;From forum: &lt;a href=&quot;http://old.nabble.com/Gnu---MIT-Scheme---Dev-f1755.html&quot; embed=&quot;fixTarget[1755]&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;Gnu - MIT Scheme - Dev&lt;/a&gt;&lt;/p&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/make-eq-hash-table-tp26861209p26870168.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26869078</id>
	<title>Re: make-eq-hash-table</title>
	<published>2009-12-20T17:46:08Z</published>
	<updated>2009-12-20T17:46:08Z</updated>
	<author>
		<name>Taylor R Campbell</name>
	</author>
	<content type="html">&amp;nbsp; &amp;nbsp;Date: Mon, 21 Dec 2009 00:37:10 +0000
&lt;br&gt;&amp;nbsp; &amp;nbsp;From: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26869078&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;eval.apply@...&lt;/a&gt;
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp;Of course the response to this is that the obarray isn't intended
&lt;br&gt;&amp;nbsp; &amp;nbsp;to be used in this manner. It is not guaranteed to retain symbols
&lt;br&gt;&amp;nbsp; &amp;nbsp;and that it was simply an implementation detail that it happened to
&lt;br&gt;&amp;nbsp; &amp;nbsp;retain them. And user code should not assume that calling intern on
&lt;br&gt;&amp;nbsp; &amp;nbsp;a symbol will cause it to appear in the obarray.
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp;I argue the same is true of hash tables. User code should not
&lt;br&gt;&amp;nbsp; &amp;nbsp;assume that inserting a key/value pair in the table will cause the
&lt;br&gt;&amp;nbsp; &amp;nbsp;key to appear in the key-list.
&lt;br&gt;&lt;br&gt;Your last sentence is not the documented intent, and would severely
&lt;br&gt;restrict the applicability of the hash table abstraction. &amp;nbsp;There are
&lt;br&gt;cases in which that assumption is valid, and there are cases in which
&lt;br&gt;that assumption is not valid. &amp;nbsp;In the case of the obarray (which is
&lt;br&gt;not expressible using the runtime's hash table abstraction, of course,
&lt;br&gt;because the hash table abstraction does not support key-strong,
&lt;br&gt;datum-weak hash tables, which is what the obarray is), the assumption
&lt;br&gt;is not valid.
&lt;br&gt;&lt;br&gt;&lt;br&gt;_______________________________________________
&lt;br&gt;MIT-Scheme-devel mailing list
&lt;br&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26869078&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;MIT-Scheme-devel@...&lt;/a&gt;
&lt;br&gt;&lt;a href=&quot;http://lists.gnu.org/mailman/listinfo/mit-scheme-devel&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://lists.gnu.org/mailman/listinfo/mit-scheme-devel&lt;/a&gt;&lt;br&gt;&lt;p&gt;From forum: &lt;a href=&quot;http://old.nabble.com/Gnu---MIT-Scheme---Dev-f1755.html&quot; embed=&quot;fixTarget[1755]&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;Gnu - MIT Scheme - Dev&lt;/a&gt;&lt;/p&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/make-eq-hash-table-tp26861209p26869078.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26868991</id>
	<title>Re: make-eq-hash-table</title>
	<published>2009-12-20T17:29:20Z</published>
	<updated>2009-12-20T17:29:20Z</updated>
	<author>
		<name>Taylor R Campbell</name>
	</author>
	<content type="html">&amp;nbsp; &amp;nbsp;Date: Sun, 20 Dec 2009 15:21:20 -0800
&lt;br&gt;&amp;nbsp; &amp;nbsp;From: Chris Hanson &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26868991&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;cph@...&lt;/a&gt;&amp;gt;
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp;The documentation clearly states that make-eq-hash-table returns a
&lt;br&gt;&amp;nbsp; &amp;nbsp;weak table, and has so stated for a long time. &amp;nbsp;So it's not reasonable
&lt;br&gt;&amp;nbsp; &amp;nbsp;to change the semantics overnight. &amp;nbsp;Here's what I propose:
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp;[...]
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp;OK?
&lt;br&gt;&lt;br&gt;Sounds good to me. &amp;nbsp;I have gone through the list I made earlier and
&lt;br&gt;updated some of my analysis. &amp;nbsp;Since there were so many cases and my
&lt;br&gt;analysis was very shallow, I am not yet comfortable committing changes
&lt;br&gt;reflecting the analysis. &amp;nbsp;Would anyone care to review the list, the
&lt;br&gt;updated version of which I have attached?
&lt;br&gt;&lt;br /&gt;* Use of MAKE-EQ-HASH-TABLE in MIT Scheme, 2009-12-20 &amp;nbsp;-*- outline -*-
&lt;br&gt;&lt;br&gt;In MIT Scheme, MAKE-EQ-HASH-TABLE yields a hash table whose keys are
&lt;br&gt;held only weakly, so that they will be garbage-collected if there are
&lt;br&gt;no strong references to them. &amp;nbsp;To make a similar hash table whose keys
&lt;br&gt;are held strongly, one must use MAKE-STRONG-EQ-HASH-TABLE explicitly.
&lt;br&gt;Of the sixty-two uses of MAKE-EQ-HASH-TABLE throughout the MIT Scheme
&lt;br&gt;source code, only four appear to need weak references to their keys,
&lt;br&gt;and for only two more is there an obvious reason to use weak
&lt;br&gt;references. &amp;nbsp;This list categorizes most uses of MAKE-EQ-HASH-TABLE.
&lt;br&gt;&lt;br&gt;** Hash table must be key-weak
&lt;br&gt;&lt;br&gt;*** edwin/curren.scm, screen-buffer-layouts
&lt;br&gt;*** edwin/eystep.scm, stepper-buffers
&lt;br&gt;*** edwin/xterm.scm, display/cached-atoms-table
&lt;br&gt;*** edwin/xterm.scm, display/selection-records
&lt;br&gt;&lt;br&gt;** Hash table should be key-weak, but will work as key-strong
&lt;br&gt;&lt;br&gt;*** edwin/comman.scm, permanent-local-variables
&lt;br&gt;&lt;br&gt;As long as Edwin variables are strongly interned, it is safe to use a
&lt;br&gt;key-strong hash table for properties on Edwin variables such as the
&lt;br&gt;permanent-local property, but if Edwin variables were weakly interned
&lt;br&gt;then this would be a space leak.
&lt;br&gt;&lt;br&gt;*** sos/class.scm, built-in-class-table
&lt;br&gt;&lt;br&gt;Dispatch tags that are garbage-collected shouldn't accumulate space
&lt;br&gt;here. &amp;nbsp;These might arise, for instance, from re-evaluating
&lt;br&gt;DEFINE-RECORD-TYPE forms causing the old record type's dispatch tags
&lt;br&gt;to be garbage-collected. &amp;nbsp;But this is not likely to be a big problem.
&lt;br&gt;&lt;br&gt;** Hash table should be key-strong, but will work as key-weak
&lt;br&gt;&lt;br&gt;*** compiler/machines/i386/lapopt.scm, *rules*
&lt;br&gt;&lt;br&gt;If the compiler never generates instructions with certain symbols in
&lt;br&gt;them, and hence the compiler's code has no strong references to those
&lt;br&gt;symbols, then the rules for those symbols may as well be discarded.
&lt;br&gt;But that's pretty sketchy.
&lt;br&gt;&lt;br&gt;*** compiler/machines/svm/assembler-runtime.scm, symbolic-operators
&lt;br&gt;*** compiler/machines/svm/assembler-runtime.scm, pvar-type-table
&lt;br&gt;*** compiler/machines/svm/lapopt.scm, *rules* (not really used)
&lt;br&gt;*** compiler/machines/x86-64/lapopt.scm, *rules* (not really used)
&lt;br&gt;*** edwin/nntp.scm, equivalences in build-equivalence-classes
&lt;br&gt;&lt;br&gt;The only reason that this works as a key-weak hash table is that every
&lt;br&gt;key is also strongly referenced by the hash table's data.
&lt;br&gt;&lt;br&gt;*** edwin/nntp.scm, tables in convert-header-graphs-to-trees
&lt;br&gt;&lt;br&gt;In the only caller of CONVERT-HEADER-GRAPHS-TO-TREES, the (strong)
&lt;br&gt;list of headers is still strongly referenced, so the keys of the two
&lt;br&gt;hash tables in TABLES will not be garbage-collected.
&lt;br&gt;&lt;br&gt;*** edwin/xterm.scm, built-in-atoms-table
&lt;br&gt;&lt;br&gt;If the binding for BUILT-IN-ATOMS were collected while that for
&lt;br&gt;BUILT-IN-ATOMS-TABLE were not, then the latter would be in trouble.
&lt;br&gt;This generally doesn't happen currently.
&lt;br&gt;&lt;br&gt;*** imail/imail-core.scm, memoized-resources
&lt;br&gt;&lt;br&gt;As long as URLs are interned strongly, it doesn't matter whether
&lt;br&gt;MEMOIZED-RESOURCES is key-weak or key-strong. &amp;nbsp;However, if URLs were
&lt;br&gt;interned weakly, then this table would need to be key-strong in order
&lt;br&gt;to avoid losing entries for resources that are still referenced but
&lt;br&gt;whose locators are not still referenced.
&lt;br&gt;&lt;br&gt;*** microcode/os2pm.scm, type-abbreviations
&lt;br&gt;*** microcode/os2pm.scm, id-external-roots
&lt;br&gt;&lt;br&gt;This code is probably defunct, but if it weren't, and if the
&lt;br&gt;presentation manager procedure abstraction were used outside this
&lt;br&gt;file, it would probably be necessary to make these two hash tables
&lt;br&gt;key-strong. &amp;nbsp;Another hash table, PM-PROCEDURES, is incorrectly
&lt;br&gt;key-weak.
&lt;br&gt;&lt;br&gt;*** runtime/genio.scm, {en,de}coder/sizer/{,de}normalizer maps
&lt;br&gt;&lt;br&gt;Since there are maps in both directions, each hash table's keys also
&lt;br&gt;have strong references in the data positions of the other hash table.
&lt;br&gt;But this is pretty fragile, and in any case there is no need to use
&lt;br&gt;key-weak hash tables.
&lt;br&gt;&lt;br&gt;*** runtime/sfile.scm, interned-mime-types
&lt;br&gt;&lt;br&gt;This should really be a key-strong, datum-weak hash table, which the
&lt;br&gt;hash table abstraction does not presently support. &amp;nbsp;(The same goes for
&lt;br&gt;UNUSUAL-INTERNED-MIME-TYPES.) &amp;nbsp;Barring that, INTERNED-MIME-TYPES
&lt;br&gt;should be key-strong, although it happens to work as a key-weak hash
&lt;br&gt;table because its data have strong references to its keys anyway.
&lt;br&gt;&lt;br&gt;*** runtime/syntax-output.scm, unmappings
&lt;br&gt;*** runtime/syntax-output.scm, rename-databases' mapping-tables
&lt;br&gt;*** runtime/syntax-output.scm, rename-databases' id-tables
&lt;br&gt;*** ssp/xmlrpc.scm, methods in get-xmlrpc-method-handler
&lt;br&gt;&lt;br&gt;Since the hash table is used only in one place, and only one key is
&lt;br&gt;fetched out of it, that key will be strongly referenced until it is
&lt;br&gt;fetched, and the other keys don't matter.
&lt;br&gt;&lt;br&gt;*** xml/turtle.scm, table in write-prefixes
&lt;br&gt;&lt;br&gt;** Hash table must be key-strong
&lt;br&gt;&lt;br&gt;*** compiler/machines/svm/assembler-runtime.scm, symbol tables
&lt;br&gt;&lt;br&gt;These are probably meant to be treated like the symbol tables
&lt;br&gt;implemented in compiler/back/symtab.scm.
&lt;br&gt;&lt;br&gt;*** imail/imail-file.scm, file-folder-types
&lt;br&gt;*** imail/imail-mime.scm, mime-encodings
&lt;br&gt;*** microcode/os2pm.scm, pm-procedures
&lt;br&gt;*** runtime/http-syntax.scm, header-value-defns
&lt;br&gt;*** ssp/mod-lisp.scm, mime-handlers
&lt;br&gt;*** ssp/xhtml-expander.scm, *sabbr-table*
&lt;br&gt;&lt;br&gt;The processing instructions are processed incrementally as the file is
&lt;br&gt;parsed, so keys in the sabbr table may be garbage-collected and then
&lt;br&gt;re-interned, between which times the associations would be destroyed.
&lt;br&gt;&lt;br&gt;*** star-parser/matcher.scm, matcher-preprocessors
&lt;br&gt;*** star-parser/matcher.scm, matcher-compilers
&lt;br&gt;*** star-parser/parser.scm, parser-preprocessors
&lt;br&gt;*** star-parser/parser.scm, parser-compilers
&lt;br&gt;*** star-parser/shared.scm, make-parser-macros
&lt;br&gt;*** star-parser/shared.scm, *global-parser-macros*
&lt;br&gt;*** xdoc/validate-xdoc.scm, element-checkers
&lt;br&gt;*** xdoc/xdoc.scm, html-generators
&lt;br&gt;*** xdoc/xdoc.scm, when-conditions
&lt;br&gt;*** xdoc/xdoc.scm, xdoc-content-types
&lt;br&gt;*** xdoc/xdoc.scm, xdoc-element-types
&lt;br&gt;*** xdoc/xdoc.scm, xdoc-input-canonicalizers
&lt;br&gt;*** xdoc/xdoc.scm, xdoc-output-definitions
&lt;br&gt;*** xml/xhtml.scm, element-context-map
&lt;br&gt;&lt;br&gt;** Other
&lt;br&gt;&lt;br&gt;*** compiler/machines/C/stackify.scm, stackify count tables
&lt;br&gt;&lt;br&gt;It is not immediately clear to me whether these need to be strong, but
&lt;br&gt;they probably should be.
&lt;br&gt;&lt;br&gt;*** compiler/rtlbase/rtlobj.scm, label-&amp;gt;object maps
&lt;br&gt;&lt;br&gt;It's not immediately obvious to me whether LABEL-&amp;gt;OBJECT will ever be
&lt;br&gt;used after the last references to the keys of the hash tables involved
&lt;br&gt;(which cause strong references to those keys to be dropped, if
&lt;br&gt;COMPILER:PRESERVE-DATA-STRUCTURES? is false). &amp;nbsp;A little further
&lt;br&gt;analysis is required. &amp;nbsp;A conservative guess would be that these should
&lt;br&gt;to be strong.
&lt;br&gt;&lt;br&gt;*** edwin/eystep.scm, ynode-regions
&lt;br&gt;&lt;br&gt;What are the keys to these hash tables? &amp;nbsp;I don't know how long they
&lt;br&gt;persist.
&lt;br&gt;&lt;br&gt;*** edwin/prompt.scm, prompt-histories
&lt;br&gt;&lt;br&gt;Making this key-strong is not likely to be a space leak, but if a
&lt;br&gt;command is garbage-collected, then so may the symbol for its history
&lt;br&gt;be garbage-collected, and its history is presumably no longer needed.
&lt;br&gt;&lt;br&gt;*** edwin/win32.scm, event-handlers
&lt;br&gt;&lt;br&gt;The keys in EVENT-HANDLERS are integers. &amp;nbsp;I think this should be a
&lt;br&gt;key-strong eqv hash table rather than a key-weak eq hash table.
&lt;br&gt;&lt;br&gt;*** edwin/xterm.scm, selection-&amp;gt;record table in display/selection-records
&lt;br&gt;&lt;br&gt;I'm not sure what the domain of possible keys to this hash table is --
&lt;br&gt;it may be just the symbols PRIMARY and CLIPBOARD, which will probably
&lt;br&gt;be strongly referenced by the rest of the Edwin code, but on the other
&lt;br&gt;hand I think this should probably be a key-strong hash table.
&lt;br&gt;&lt;br&gt;*** edwin/xterm.scm, symbol-&amp;gt;x-atom table in display/cached-atom-tables
&lt;br&gt;&lt;br&gt;Whether this should be key-strong or key-weak depends on whether the
&lt;br&gt;set of atoms that it will map is arbitrarily large.
&lt;br&gt;&lt;br&gt;*** xdoc/xdoc.scm, *xdoc-element-properties*
&lt;br&gt;*** xdoc/xdoc.scm, *xdoc-inputs*
&lt;br&gt;*** xdoc/xdoc.scm, *xdoc-outputs*
&lt;br&gt;&lt;br&gt;As maps from XML elements by identity to properties, these three
&lt;br&gt;should probably be key-weak, but since new ones are created for each
&lt;br&gt;xdoc expansion, they could probably safely be key-strong without
&lt;br&gt;badly leaking memory.
&lt;br&gt;&lt;br&gt;*** xdoc/xdoc.scm, *xdoc-id-map*
&lt;br&gt;&lt;br&gt;This should be key-strong, although it doesn't matter until XML names
&lt;br&gt;become weakly interned.
&lt;br&gt;&lt;br&gt;*** xml/xhtml-entities.scm, table in html-char-&amp;gt;name-map
&lt;br&gt;&lt;br&gt;The keys in the table inside HTML-CHAR-&amp;gt;NAME-MAP is keyed by
&lt;br&gt;characters. &amp;nbsp;Should this be a key-strong eqv hash table rather than a
&lt;br&gt;key-weak eq hash table?
&lt;br&gt;&lt;br&gt;*** xml/xml-names.scm
&lt;br&gt;&lt;br&gt;This is hairy: part of it looks like it needs to be datum-weak, but we
&lt;br&gt;don't have that now. &amp;nbsp;But someone more familiar with the XML name
&lt;br&gt;abstraction should review this.&lt;br /&gt;_______________________________________________
&lt;br&gt;MIT-Scheme-devel mailing list
&lt;br&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26868991&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;MIT-Scheme-devel@...&lt;/a&gt;
&lt;br&gt;&lt;a href=&quot;http://lists.gnu.org/mailman/listinfo/mit-scheme-devel&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://lists.gnu.org/mailman/listinfo/mit-scheme-devel&lt;/a&gt;&lt;br&gt;&lt;p&gt;From forum: &lt;a href=&quot;http://old.nabble.com/Gnu---MIT-Scheme---Dev-f1755.html&quot; embed=&quot;fixTarget[1755]&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;Gnu - MIT Scheme - Dev&lt;/a&gt;&lt;/p&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/make-eq-hash-table-tp26861209p26868991.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26889268</id>
	<title>Re: Re: make-eq-hash-table</title>
	<published>2009-12-20T16:37:10Z</published>
	<updated>2009-12-20T16:37:10Z</updated>
	<author>
		<name>Joe Marshall-2</name>
	</author>
	<content type="html">On Dec 20, 2009 2:54pm, Taylor R Campbell &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26889268&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;campbell@...&lt;/a&gt;&amp;gt; wrote:
&lt;br /&gt;&amp;gt;
&lt;br /&gt;&amp;gt;  It is very surprising for hash tables to be weak by
&lt;br /&gt;&amp;gt; default: that causes parts of data structures to apparently randomly
&lt;br /&gt;&amp;gt; vanish.
&lt;br /&gt;
&lt;br /&gt;I could argue that it is very surprising for *symbols* to be weak
&lt;br /&gt;by default.  It causes parts of data structures (in particular, the obarray)
&lt;br /&gt;to apparently randomly vanish.
&lt;br /&gt;
&lt;br /&gt;Suppose someone had written some code that interns
&lt;br /&gt;strings with the intent of retrieving them later from the obarray.  The change
&lt;br /&gt;you made to make weak symbols will cause this code to break.  Someone
&lt;br /&gt;might be pretty upset that parts of the data structure are randomly
&lt;br /&gt;vanishing.
&lt;br /&gt;
&lt;br /&gt;Of course the response to this is that the obarray isn&amp;#39;t intended to be
&lt;br /&gt;used in this manner.  It is not guaranteed
&lt;br /&gt;to retain symbols and that it was simply an implementation detail that
&lt;br /&gt;it happened to retain them.  And user code should not assume that
&lt;br /&gt;calling intern on a symbol will cause it to appear in the obarray. 
&lt;br /&gt;
&lt;br /&gt;I argue the same is true of hash tables.  User code should not assume
&lt;br /&gt;that inserting a key/value pair in the table will cause the key to appear
&lt;br /&gt;in the key-list.  
&lt;br /&gt;
&lt;br /&gt;Basically, if I do this:
&lt;br /&gt;
&lt;br /&gt;  (hash-table/put!  my-eq-table  (cons &amp;#39;a &amp;#39;b) &amp;#39;hello)
&lt;br /&gt;
&lt;br /&gt;There is no possible way for me to retrieve the value from this table
&lt;br /&gt;with hash-table/get because I cannot regenerate the key.  Therefore,
&lt;br /&gt;the entry itself is useless because no one can access it.  So it need
&lt;br /&gt;not be in the table.  
&lt;br /&gt;
&lt;br /&gt;If you are writing code that assumes the key list
&lt;br /&gt;*will* retain the mapping even if no one else will, then you are doing
&lt;br /&gt;the equivalent thing to using the obarray to retain symbols that no one
&lt;br /&gt;is using.  (You&amp;#39;re relying on an accident of implementation that would
&lt;br /&gt;be better served by simply consing a list!)
&lt;br /&gt;
&lt;br /&gt;&amp;gt; Now what would happen if I made URIs weakly interned?  You would need
&lt;br /&gt;&amp;gt; to change the code again, to handle URIs similarly.  Next, what about
&lt;br /&gt;&amp;gt; MIME types?
&lt;br /&gt;
&lt;br /&gt;This has been an issue in lisp for close to 50 years
&lt;br /&gt;(see  http://home.pipeline.com/~hbaker1/ObjectIdentity.html )
&lt;br /&gt;I think the solution is probably to differentiate between the weak links to
&lt;br /&gt;hash-table values and the weak links to hash-table keys and make the GC
&lt;br /&gt;smarter about them.  You could then write your URI&amp;#39;s to be weakly interned
&lt;br /&gt;(as hash table values) and this would protect them from dropping out of weak
&lt;br /&gt;keyed tables.&lt;br /&gt;_______________________________________________
&lt;br&gt;MIT-Scheme-devel mailing list
&lt;br&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26889268&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;MIT-Scheme-devel@...&lt;/a&gt;
&lt;br&gt;&lt;a href=&quot;http://lists.gnu.org/mailman/listinfo/mit-scheme-devel&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://lists.gnu.org/mailman/listinfo/mit-scheme-devel&lt;/a&gt;&lt;br&gt;&lt;p&gt;From forum: &lt;a href=&quot;http://old.nabble.com/Gnu---MIT-Scheme---Dev-f1755.html&quot; embed=&quot;fixTarget[1755]&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;Gnu - MIT Scheme - Dev&lt;/a&gt;&lt;/p&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/make-eq-hash-table-tp26861209p26889268.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26868368</id>
	<title>Re: make-eq-hash-table</title>
	<published>2009-12-20T15:39:22Z</published>
	<updated>2009-12-20T15:39:22Z</updated>
	<author>
		<name>Arthur A. Gleckler-3</name>
	</author>
	<content type="html">&amp;gt; OK?
&lt;br&gt;&lt;br&gt;That's an excellent plan.
&lt;br&gt;&lt;br&gt;&lt;br&gt;_______________________________________________
&lt;br&gt;MIT-Scheme-devel mailing list
&lt;br&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26868368&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;MIT-Scheme-devel@...&lt;/a&gt;
&lt;br&gt;&lt;a href=&quot;http://lists.gnu.org/mailman/listinfo/mit-scheme-devel&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://lists.gnu.org/mailman/listinfo/mit-scheme-devel&lt;/a&gt;&lt;br&gt;&lt;p&gt;From forum: &lt;a href=&quot;http://old.nabble.com/Gnu---MIT-Scheme---Dev-f1755.html&quot; embed=&quot;fixTarget[1755]&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;Gnu - MIT Scheme - Dev&lt;/a&gt;&lt;/p&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/make-eq-hash-table-tp26861209p26868368.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26868232</id>
	<title>Re: make-eq-hash-table</title>
	<published>2009-12-20T15:21:20Z</published>
	<updated>2009-12-20T15:21:20Z</updated>
	<author>
		<name>Chris Hanson-6</name>
	</author>
	<content type="html">Now that Joe has &amp;quot;fixed&amp;quot; the handling of interned symbols, we should
&lt;br&gt;address the more general problem that Taylor is concerned with.
&lt;br&gt;&lt;br&gt;The documentation clearly states that make-eq-hash-table returns a
&lt;br&gt;weak table, and has so stated for a long time. &amp;nbsp;So it's not reasonable
&lt;br&gt;to change the semantics overnight. &amp;nbsp;Here's what I propose:
&lt;br&gt;&lt;br&gt;* Add a new binding make-weak-eq-hash-table (and
&lt;br&gt;make-weak-eqv-hash-table, which you haven't mentioned but which should
&lt;br&gt;also be done).
&lt;br&gt;&lt;br&gt;* Change the documentation to recommend that programmers use the
&lt;br&gt;explicit name to guarantee a particular semantics, and to warn that
&lt;br&gt;make-eq-hash-table may change its semantics from weak to strong in the
&lt;br&gt;future.
&lt;br&gt;&lt;br&gt;* Change our code base to use the explicit names in all cases.
&lt;br&gt;&lt;br&gt;* File a bug report, referring to or attaching this discussion.
&lt;br&gt;&lt;br&gt;* Optionally, add a compiler warning when make-eq-hash-table is used.
&lt;br&gt;&lt;br&gt;* Sometime down the road, in a couple of years, close the bug report
&lt;br&gt;by making appropriate changes.
&lt;br&gt;&lt;br&gt;OK?
&lt;br&gt;&lt;br&gt;On Sun, Dec 20, 2009 at 2:54 PM, Taylor R Campbell &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26868232&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;campbell@...&lt;/a&gt;&amp;gt; wrote:
&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt;   Date: Sun, 20 Dec 2009 13:48:59 -0800
&lt;br&gt;&amp;gt;   From: Joe Marshall &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26868232&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;jmarshall@...&lt;/a&gt;&amp;gt;
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;   On Sun, Dec 20, 2009 at 8:46 AM, Taylor R Campbell &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26868232&amp;i=2&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;campbell@...&lt;/a&gt;&amp;gt; wrote:
&lt;br&gt;&amp;gt;   &amp;gt; Â What I observed in MIT Scheme is that, of
&lt;br&gt;&amp;gt;   &amp;gt; the sixty-two uses of MAKE-EQ-HASH-TABLE, more of them are incorrect,
&lt;br&gt;&amp;gt;   &amp;gt; and need key-strong hash tables, than actally need key-weak hash
&lt;br&gt;&amp;gt;   &amp;gt; tables.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;   This is what I disagree with.  If they were correct when symbols were
&lt;br&gt;&amp;gt;   strongly interned, the behavior shouldn't change when symbols are
&lt;br&gt;&amp;gt;   weakly interned.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;   In other words, the *use* of MAKE-EQ-HASH-TABLE isn't the bug, it
&lt;br&gt;&amp;gt;   is the *behavior* of MAKE-EQ-HASH-TABLE that is buggy.  It should
&lt;br&gt;&amp;gt;   retain symbols and numbers the same as it used to.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; Although changing symbols to be interned weakly exhibited several
&lt;br&gt;&amp;gt; problems related to eq hash tables, those cover only a subset of the
&lt;br&gt;&amp;gt; problems with using weak hash tables, only some of which are keyed by
&lt;br&gt;&amp;gt; interned symbols.  It is very surprising for hash tables to be weak by
&lt;br&gt;&amp;gt; default: that causes parts of data structures to apparently randomly
&lt;br&gt;&amp;gt; vanish.  I am not aware of any other system in which one gets a weak
&lt;br&gt;&amp;gt; hash table by asking for a hash table without explicitly requesting
&lt;br&gt;&amp;gt; that it be weak.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;   BTW, the fix for this was trivial and I checked it in this morning.
&lt;br&gt;&amp;gt;   you need these two changes:
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;   77c8301526fc3a8f420c2922eefad215bd8d8dba (patch)
&lt;br&gt;&amp;gt;   097a3ee6c70d396a3277fb96374abbfc2da86e51 (patch)
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;   and now entries keyed by interned symbols will not drop out of EQ
&lt;br&gt;&amp;gt;   hash tables.  Otherwise, the behavior is as before.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; Now what would happen if I made URIs weakly interned?  You would need
&lt;br&gt;&amp;gt; to change the code again, to handle URIs similarly.  Next, what about
&lt;br&gt;&amp;gt; MIME types?  That doesn't scale, and that makes every use of hash
&lt;br&gt;&amp;gt; tables harder to understand and control, because the behaviour of the
&lt;br&gt;&amp;gt; hash table on different data types is built into the abstraction, not
&lt;br&gt;&amp;gt; a part of its parameters.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; _______________________________________________
&lt;br&gt;&amp;gt; MIT-Scheme-devel mailing list
&lt;br&gt;&amp;gt; &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26868232&amp;i=3&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;MIT-Scheme-devel@...&lt;/a&gt;
&lt;br&gt;&amp;gt; &lt;a href=&quot;http://lists.gnu.org/mailman/listinfo/mit-scheme-devel&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://lists.gnu.org/mailman/listinfo/mit-scheme-devel&lt;/a&gt;&lt;br&gt;&amp;gt;
&lt;/div&gt;&lt;br&gt;&lt;br&gt;_______________________________________________
&lt;br&gt;MIT-Scheme-devel mailing list
&lt;br&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26868232&amp;i=4&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;MIT-Scheme-devel@...&lt;/a&gt;
&lt;br&gt;&lt;a href=&quot;http://lists.gnu.org/mailman/listinfo/mit-scheme-devel&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://lists.gnu.org/mailman/listinfo/mit-scheme-devel&lt;/a&gt;&lt;br&gt;&lt;p&gt;From forum: &lt;a href=&quot;http://old.nabble.com/Gnu---MIT-Scheme---Dev-f1755.html&quot; embed=&quot;fixTarget[1755]&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;Gnu - MIT Scheme - Dev&lt;/a&gt;&lt;/p&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/make-eq-hash-table-tp26861209p26868232.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26868037</id>
	<title>Re: make-eq-hash-table</title>
	<published>2009-12-20T14:54:47Z</published>
	<updated>2009-12-20T14:54:47Z</updated>
	<author>
		<name>Taylor R Campbell</name>
	</author>
	<content type="html">&amp;nbsp; &amp;nbsp;Date: Sun, 20 Dec 2009 13:48:59 -0800
&lt;br&gt;&amp;nbsp; &amp;nbsp;From: Joe Marshall &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26868037&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;jmarshall@...&lt;/a&gt;&amp;gt;
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp;On Sun, Dec 20, 2009 at 8:46 AM, Taylor R Campbell &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26868037&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;campbell@...&lt;/a&gt;&amp;gt; wrote:
&lt;br&gt;&amp;nbsp; &amp;nbsp;&amp;gt; Â What I observed in MIT Scheme is that, of
&lt;br&gt;&amp;nbsp; &amp;nbsp;&amp;gt; the sixty-two uses of MAKE-EQ-HASH-TABLE, more of them are incorrect,
&lt;br&gt;&amp;nbsp; &amp;nbsp;&amp;gt; and need key-strong hash tables, than actally need key-weak hash
&lt;br&gt;&amp;nbsp; &amp;nbsp;&amp;gt; tables.
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp;This is what I disagree with. &amp;nbsp;If they were correct when symbols were
&lt;br&gt;&amp;nbsp; &amp;nbsp;strongly interned, the behavior shouldn't change when symbols are
&lt;br&gt;&amp;nbsp; &amp;nbsp;weakly interned.
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp;In other words, the *use* of MAKE-EQ-HASH-TABLE isn't the bug, it
&lt;br&gt;&amp;nbsp; &amp;nbsp;is the *behavior* of MAKE-EQ-HASH-TABLE that is buggy. &amp;nbsp;It should
&lt;br&gt;&amp;nbsp; &amp;nbsp;retain symbols and numbers the same as it used to.
&lt;br&gt;&lt;br&gt;Although changing symbols to be interned weakly exhibited several
&lt;br&gt;problems related to eq hash tables, those cover only a subset of the
&lt;br&gt;problems with using weak hash tables, only some of which are keyed by
&lt;br&gt;interned symbols. &amp;nbsp;It is very surprising for hash tables to be weak by
&lt;br&gt;default: that causes parts of data structures to apparently randomly
&lt;br&gt;vanish. &amp;nbsp;I am not aware of any other system in which one gets a weak
&lt;br&gt;hash table by asking for a hash table without explicitly requesting
&lt;br&gt;that it be weak.
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp;BTW, the fix for this was trivial and I checked it in this morning.
&lt;br&gt;&amp;nbsp; &amp;nbsp;you need these two changes:
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp;77c8301526fc3a8f420c2922eefad215bd8d8dba (patch)
&lt;br&gt;&amp;nbsp; &amp;nbsp;097a3ee6c70d396a3277fb96374abbfc2da86e51 (patch)
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp;and now entries keyed by interned symbols will not drop out of EQ
&lt;br&gt;&amp;nbsp; &amp;nbsp;hash tables. &amp;nbsp;Otherwise, the behavior is as before.
&lt;br&gt;&lt;br&gt;Now what would happen if I made URIs weakly interned? &amp;nbsp;You would need
&lt;br&gt;to change the code again, to handle URIs similarly. &amp;nbsp;Next, what about
&lt;br&gt;MIME types? &amp;nbsp;That doesn't scale, and that makes every use of hash
&lt;br&gt;tables harder to understand and control, because the behaviour of the
&lt;br&gt;hash table on different data types is built into the abstraction, not
&lt;br&gt;a part of its parameters.
&lt;br&gt;&lt;br&gt;&lt;br&gt;_______________________________________________
&lt;br&gt;MIT-Scheme-devel mailing list
&lt;br&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26868037&amp;i=2&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;MIT-Scheme-devel@...&lt;/a&gt;
&lt;br&gt;&lt;a href=&quot;http://lists.gnu.org/mailman/listinfo/mit-scheme-devel&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://lists.gnu.org/mailman/listinfo/mit-scheme-devel&lt;/a&gt;&lt;br&gt;&lt;p&gt;From forum: &lt;a href=&quot;http://old.nabble.com/Gnu---MIT-Scheme---Dev-f1755.html&quot; embed=&quot;fixTarget[1755]&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;Gnu - MIT Scheme - Dev&lt;/a&gt;&lt;/p&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/make-eq-hash-table-tp26861209p26868037.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26867566</id>
	<title>Re: make-eq-hash-table</title>
	<published>2009-12-20T13:48:59Z</published>
	<updated>2009-12-20T13:48:59Z</updated>
	<author>
		<name>Joe Marshall</name>
	</author>
	<content type="html">On Sun, Dec 20, 2009 at 8:46 AM, Taylor R Campbell &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26867566&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;campbell@...&lt;/a&gt;&amp;gt; wrote:
&lt;br&gt;&amp;gt;  What I observed in MIT Scheme is that, of
&lt;br&gt;&amp;gt; the sixty-two uses of MAKE-EQ-HASH-TABLE, more of them are incorrect,
&lt;br&gt;&amp;gt; and need key-strong hash tables, than actally need key-weak hash
&lt;br&gt;&amp;gt; tables.
&lt;br&gt;&lt;br&gt;This is what I disagree with. &amp;nbsp;If they were correct when symbols were
&lt;br&gt;strongly interned, the behavior shouldn't change when symbols are
&lt;br&gt;weakly interned.
&lt;br&gt;&lt;br&gt;In other words, the *use* of MAKE-EQ-HASH-TABLE isn't the bug, it
&lt;br&gt;is the *behavior* of MAKE-EQ-HASH-TABLE that is buggy. &amp;nbsp;It should
&lt;br&gt;retain symbols and numbers the same as it used to.
&lt;br&gt;&lt;br&gt;BTW, the fix for this was trivial and I checked it in this morning. &amp;nbsp;you need
&lt;br&gt;these two changes:
&lt;br&gt;77c8301526fc3a8f420c2922eefad215bd8d8dba (patch)
&lt;br&gt;097a3ee6c70d396a3277fb96374abbfc2da86e51 (patch)
&lt;br&gt;&lt;br&gt;and now entries keyed by interned symbols will not drop out of EQ hash tables.
&lt;br&gt;Otherwise, the behavior is as before.
&lt;br&gt;&lt;br&gt;&lt;br&gt;-- 
&lt;br&gt;~jrm
&lt;br&gt;&lt;br&gt;&lt;br&gt;_______________________________________________
&lt;br&gt;MIT-Scheme-devel mailing list
&lt;br&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26867566&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;MIT-Scheme-devel@...&lt;/a&gt;
&lt;br&gt;&lt;a href=&quot;http://lists.gnu.org/mailman/listinfo/mit-scheme-devel&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://lists.gnu.org/mailman/listinfo/mit-scheme-devel&lt;/a&gt;&lt;br&gt;&lt;p&gt;From forum: &lt;a href=&quot;http://old.nabble.com/Gnu---MIT-Scheme---Dev-f1755.html&quot; embed=&quot;fixTarget[1755]&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;Gnu - MIT Scheme - Dev&lt;/a&gt;&lt;/p&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/make-eq-hash-table-tp26861209p26867566.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26865063</id>
	<title>Re: make-eq-hash-table</title>
	<published>2009-12-20T08:46:50Z</published>
	<updated>2009-12-20T08:46:50Z</updated>
	<author>
		<name>Taylor R Campbell</name>
	</author>
	<content type="html">&amp;nbsp; &amp;nbsp;Date: Sun, 20 Dec 2009 07:55:07 -0800
&lt;br&gt;&amp;nbsp; &amp;nbsp;From: Joe Marshall &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26865063&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;jmarshall@...&lt;/a&gt;&amp;gt;
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp;It seems to me that a weak internment scheme should not be
&lt;br&gt;&amp;nbsp; &amp;nbsp;observably different from a strong one in any way. &amp;nbsp;It should only
&lt;br&gt;&amp;nbsp; &amp;nbsp;be (potentially) more memory efficient. &amp;nbsp;This implies that if
&lt;br&gt;&amp;nbsp; &amp;nbsp;weakly interned objects are used as keys in a hash table, then the
&lt;br&gt;&amp;nbsp; &amp;nbsp;entries they map to must be preserved under all circumstances.
&lt;br&gt;&lt;br&gt;Generally, unless I explicitly request weak references, I expect the
&lt;br&gt;parts of my data structures -- whether they be hash tables, weight-
&lt;br&gt;balanced trees, lists, &amp;c. -- not to vanish automatically under any
&lt;br&gt;circumstances, irrespective of what objects I put in them. &amp;nbsp;Whether
&lt;br&gt;programs that use weak references can observe a difference between a
&lt;br&gt;weak internment scheme and a strong internment scheme -- which is
&lt;br&gt;something that programs using only strong references, of course, can't
&lt;br&gt;observe -- is a separate issue.
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp;A weak-key EQ hash table should not be observably different from a
&lt;br&gt;&amp;nbsp; &amp;nbsp;strong one with regard to the put and get operations. It may be
&lt;br&gt;&amp;nbsp; &amp;nbsp;observably different in the count and key-list operations, that is,
&lt;br&gt;&amp;nbsp; &amp;nbsp;inaccessible entries would be allowed to drop out. If the user
&lt;br&gt;&amp;nbsp; &amp;nbsp;doesn't want this, he should use an EQUAL hash table.
&lt;br&gt;&lt;br&gt;I agree with every sentence in this paragraph except for the last one.
&lt;br&gt;There already is a way to make a key-strong eq hash table, called
&lt;br&gt;MAKE-STRONG-EQ-HASH-TABLE. &amp;nbsp;What I observed in MIT Scheme is that, of
&lt;br&gt;the sixty-two uses of MAKE-EQ-HASH-TABLE, more of them are incorrect,
&lt;br&gt;and need key-strong hash tables, than actally need key-weak hash
&lt;br&gt;tables. &amp;nbsp;(There is a large number for which it doesn't really matter,
&lt;br&gt;or for which a key-weak hash table pretty much only accidentally
&lt;br&gt;works.) &amp;nbsp;This led me to the conclusion that MAKE-EQ-HASH-TABLE is a
&lt;br&gt;confusing name.
&lt;br&gt;&lt;br&gt;&lt;br&gt;_______________________________________________
&lt;br&gt;MIT-Scheme-devel mailing list
&lt;br&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26865063&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;MIT-Scheme-devel@...&lt;/a&gt;
&lt;br&gt;&lt;a href=&quot;http://lists.gnu.org/mailman/listinfo/mit-scheme-devel&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://lists.gnu.org/mailman/listinfo/mit-scheme-devel&lt;/a&gt;&lt;br&gt;&lt;p&gt;From forum: &lt;a href=&quot;http://old.nabble.com/Gnu---MIT-Scheme---Dev-f1755.html&quot; embed=&quot;fixTarget[1755]&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;Gnu - MIT Scheme - Dev&lt;/a&gt;&lt;/p&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/make-eq-hash-table-tp26861209p26865063.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26864736</id>
	<title>Re: make-eq-hash-table</title>
	<published>2009-12-20T07:55:07Z</published>
	<updated>2009-12-20T07:55:07Z</updated>
	<author>
		<name>Joe Marshall</name>
	</author>
	<content type="html">On Sun, Dec 20, 2009 at 12:59 AM, Taylor R Campbell &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26864736&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;campbell@...&lt;/a&gt;&amp;gt; wrote:
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; The only reason that this may not have bitten anyone before is that
&lt;br&gt;&amp;gt; nobody has implemented any weak internment scheme for objects that are
&lt;br&gt;&amp;gt; ever used as keys in eq hash tables -- and the other cases are highly
&lt;br&gt;&amp;gt; unlikely to be encountered.
&lt;br&gt;&lt;br&gt;I think this is the place where we disagree.
&lt;br&gt;&lt;br&gt;It seems to me that a weak internment scheme should not be observably
&lt;br&gt;different from a strong one in any way. &amp;nbsp;It should only be (potentially) more
&lt;br&gt;memory efficient. &amp;nbsp;This implies that if weakly interned objects are used
&lt;br&gt;as keys in a hash table, then the entries they map to must be preserved
&lt;br&gt;under all circumstances.
&lt;br&gt;&lt;br&gt;A weak-key EQ hash table should not be observably different from a strong
&lt;br&gt;one with regard to the put and get operations. It may be observably different
&lt;br&gt;in the count and key-list operations, that is, inaccessible entries would be
&lt;br&gt;allowed to drop out. If the user doesn't want this, he should
&lt;br&gt;use an EQUAL hash table.
&lt;br&gt;&lt;br&gt;&lt;br&gt;-- 
&lt;br&gt;~jrm
&lt;br&gt;&lt;br&gt;&lt;br&gt;_______________________________________________
&lt;br&gt;MIT-Scheme-devel mailing list
&lt;br&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26864736&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;MIT-Scheme-devel@...&lt;/a&gt;
&lt;br&gt;&lt;a href=&quot;http://lists.gnu.org/mailman/listinfo/mit-scheme-devel&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://lists.gnu.org/mailman/listinfo/mit-scheme-devel&lt;/a&gt;&lt;br&gt;&lt;p&gt;From forum: &lt;a href=&quot;http://old.nabble.com/Gnu---MIT-Scheme---Dev-f1755.html&quot; embed=&quot;fixTarget[1755]&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;Gnu - MIT Scheme - Dev&lt;/a&gt;&lt;/p&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/make-eq-hash-table-tp26861209p26864736.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26861872</id>
	<title>Re: make-eq-hash-table</title>
	<published>2009-12-20T00:59:44Z</published>
	<updated>2009-12-20T00:59:44Z</updated>
	<author>
		<name>Taylor R Campbell</name>
	</author>
	<content type="html">&amp;nbsp; &amp;nbsp;Date: Sun, 20 Dec 2009 00:43:25 -0800
&lt;br&gt;&amp;nbsp; &amp;nbsp;From: Joe Marshall &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26861872&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;jmarshall@...&lt;/a&gt;&amp;gt;
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp;On Sun, Dec 20, 2009 at 12:25 AM, Taylor R Campbell &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26861872&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;campbell@...&lt;/a&gt;&amp;gt; wrote:
&lt;br&gt;&amp;nbsp; &amp;nbsp;&amp;gt; I don't buy `they shouldn't' unless we're prepared to eliminate
&lt;br&gt;&amp;nbsp; &amp;nbsp;&amp;gt; HASH-TABLE/KEY-LIST, HASH-TABLE/DATUM-LIST, HASH-TABLE/FOR-EACH, &amp;c.,
&lt;br&gt;&amp;nbsp; &amp;nbsp;&amp;gt; and then rewrite everything that uses them to use a different
&lt;br&gt;&amp;nbsp; &amp;nbsp;&amp;gt; abstraction.
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp;I don't think so. &amp;nbsp;If a hash table is a mapping from key to value, then the
&lt;br&gt;&amp;nbsp; &amp;nbsp;key list need only contain those items that could conceivably be looked up.
&lt;br&gt;&amp;nbsp; &amp;nbsp;It *doesn't* need to contain keys that cannot appear as arguments to
&lt;br&gt;&amp;nbsp; &amp;nbsp;hash-table/get &amp;nbsp; (a subtle difference)
&lt;br&gt;&lt;br&gt;There is indeed a subtle difference here, but it is one that the hash
&lt;br&gt;table abstraction should present clearly as a choice to the user. &amp;nbsp;The
&lt;br&gt;hash table abstraction does provide this choice, but I contend that
&lt;br&gt;the name MAKE-EQ-HASH-TABLE inadequately, and dangerously, conveys the
&lt;br&gt;option its current implementation implies in this choice.
&lt;br&gt;&lt;br&gt;The only reason that this may not have bitten anyone before is that
&lt;br&gt;nobody has implemented any weak internment scheme for objects that are
&lt;br&gt;ever used as keys in eq hash tables -- and the other cases are highly
&lt;br&gt;unlikely to be encountered. &amp;nbsp;For example, the threading algorithm in
&lt;br&gt;edwin/nntp.scm will break, I believe, if the garbage collector runs
&lt;br&gt;some time between the evaluation of the last FOR-EACH call and the
&lt;br&gt;evalution of the last MAP call in BUILD-EQUIVALENCE-CLASSES. &amp;nbsp;That's
&lt;br&gt;highly unlikely to happen, though, especially since very few people
&lt;br&gt;use Edwin's newsreader, and those who do only very infrequently call
&lt;br&gt;BUILD-EQUIVALENCE-CLASSES.
&lt;br&gt;&lt;br&gt;&lt;br&gt;_______________________________________________
&lt;br&gt;MIT-Scheme-devel mailing list
&lt;br&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26861872&amp;i=2&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;MIT-Scheme-devel@...&lt;/a&gt;
&lt;br&gt;&lt;a href=&quot;http://lists.gnu.org/mailman/listinfo/mit-scheme-devel&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://lists.gnu.org/mailman/listinfo/mit-scheme-devel&lt;/a&gt;&lt;br&gt;&lt;p&gt;From forum: &lt;a href=&quot;http://old.nabble.com/Gnu---MIT-Scheme---Dev-f1755.html&quot; embed=&quot;fixTarget[1755]&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;Gnu - MIT Scheme - Dev&lt;/a&gt;&lt;/p&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/make-eq-hash-table-tp26861209p26861872.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26861852</id>
	<title>Re: make-eq-hash-table</title>
	<published>2009-12-20T00:43:25Z</published>
	<updated>2009-12-20T00:43:25Z</updated>
	<author>
		<name>Joe Marshall</name>
	</author>
	<content type="html">On Sun, Dec 20, 2009 at 12:25 AM, Taylor R Campbell &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26861852&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;campbell@...&lt;/a&gt;&amp;gt; wrote:
&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt;   Date: Sun, 20 Dec 2009 00:07:17 -0800
&lt;br&gt;&amp;gt;   From: Joe Marshall &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26861852&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;jmarshall@...&lt;/a&gt;&amp;gt;
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;   Ignoring the issue of weak symbols for the moment, there is no need
&lt;br&gt;&amp;gt;   to have strong references to the keys *unless* someone is depending
&lt;br&gt;&amp;gt;   upon walking the hash table to find them.  (and they shouldn't)
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; I don't buy `they shouldn't' unless we're prepared to eliminate
&lt;br&gt;&amp;gt; HASH-TABLE/KEY-LIST, HASH-TABLE/DATUM-LIST, HASH-TABLE/FOR-EACH, &amp;c.,
&lt;br&gt;&amp;gt; and then rewrite everything that uses them to use a different
&lt;br&gt;&amp;gt; abstraction.
&lt;/div&gt;&lt;br&gt;I don't think so. &amp;nbsp;If a hash table is a mapping from key to value, then the
&lt;br&gt;key list need only contain those items that could conceivably be looked up.
&lt;br&gt;It *doesn't* need to contain keys that cannot appear as arguments to
&lt;br&gt;hash-table/get &amp;nbsp; (a subtle difference)
&lt;br&gt;&lt;br&gt;&lt;br&gt;-- 
&lt;br&gt;~jrm
&lt;br&gt;&lt;br&gt;&lt;br&gt;_______________________________________________
&lt;br&gt;MIT-Scheme-devel mailing list
&lt;br&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26861852&amp;i=2&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;MIT-Scheme-devel@...&lt;/a&gt;
&lt;br&gt;&lt;a href=&quot;http://lists.gnu.org/mailman/listinfo/mit-scheme-devel&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://lists.gnu.org/mailman/listinfo/mit-scheme-devel&lt;/a&gt;&lt;br&gt;&lt;p&gt;From forum: &lt;a href=&quot;http://old.nabble.com/Gnu---MIT-Scheme---Dev-f1755.html&quot; embed=&quot;fixTarget[1755]&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;Gnu - MIT Scheme - Dev&lt;/a&gt;&lt;/p&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/make-eq-hash-table-tp26861209p26861852.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26861834</id>
	<title>Re: hash-table/modify!</title>
	<published>2009-12-20T00:39:41Z</published>
	<updated>2009-12-20T00:39:41Z</updated>
	<author>
		<name>Taylor R Campbell</name>
	</author>
	<content type="html">&amp;nbsp; &amp;nbsp;Date: Sun, 20 Dec 2009 03:34:53 -0500
&lt;br&gt;&amp;nbsp; &amp;nbsp;From: Taylor R Campbell &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26861834&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;campbell@...&lt;/a&gt;&amp;gt;
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; Date: Sun, 20 Dec 2009 00:30:22 -0800
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; From: Joe Marshall &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26861834&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;jmarshall@...&lt;/a&gt;&amp;gt;
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; What would happen if the modifier procedure added or deleted an element
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; from the table? &amp;nbsp;I'm thinking about the case where we've found the cell
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; pointing at the entry, but the modifier code causes a rehash and the
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; bucket links are rethreaded while we're trying to walk them.
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp;That's a screw case that blocking interrupts doesn't change. &amp;nbsp;The
&lt;br&gt;&amp;nbsp; &amp;nbsp;modifier procedure is not supposed to update the table.
&lt;br&gt;&lt;br&gt;It occurs to me, though, that while HASH-TABLE/MODIFY! is not
&lt;br&gt;documented, HASH-TABLE-UPDATE! is, and as a consequence of what I said
&lt;br&gt;above, our implementation of it does not conform to the specification
&lt;br&gt;of HASH-TABLE-UPDATE! in SRFI 69, which does not prohibit editing the
&lt;br&gt;hash table in &amp;lt;procedure&amp;gt; and says that
&lt;br&gt;&lt;br&gt;(HASH-TABLE-UPDATE! &amp;lt;hash-table&amp;gt; &amp;lt;key&amp;gt; &amp;lt;procedure&amp;gt; &amp;lt;default&amp;gt;)
&lt;br&gt;&lt;br&gt;is semantically equivalent to
&lt;br&gt;&lt;br&gt;(HASH-TABLE-SET!
&lt;br&gt;&amp;nbsp;&amp;lt;hash-table&amp;gt;
&lt;br&gt;&amp;nbsp;&amp;lt;key&amp;gt;
&lt;br&gt;&amp;nbsp;(&amp;lt;procedure&amp;gt; (HASH-TABLE-REF &amp;lt;hash-table&amp;gt; &amp;lt;key&amp;gt; &amp;lt;default&amp;gt;))),
&lt;br&gt;&lt;br&gt;modulo duplicate evaluation of arguments. &amp;nbsp;So maybe we need to change
&lt;br&gt;our definition of HASH-TABLE-UPDATE!, too.
&lt;br&gt;&lt;br&gt;&lt;br&gt;_______________________________________________
&lt;br&gt;MIT-Scheme-devel mailing list
&lt;br&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26861834&amp;i=2&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;MIT-Scheme-devel@...&lt;/a&gt;
&lt;br&gt;&lt;a href=&quot;http://lists.gnu.org/mailman/listinfo/mit-scheme-devel&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://lists.gnu.org/mailman/listinfo/mit-scheme-devel&lt;/a&gt;&lt;br&gt;&lt;p&gt;From forum: &lt;a href=&quot;http://old.nabble.com/Gnu---MIT-Scheme---Dev-f1755.html&quot; embed=&quot;fixTarget[1755]&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;Gnu - MIT Scheme - Dev&lt;/a&gt;&lt;/p&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/hash-table-modify%21-tp26861415p26861834.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26861770</id>
	<title>Re: hash-table/modify!</title>
	<published>2009-12-20T00:34:53Z</published>
	<updated>2009-12-20T00:34:53Z</updated>
	<author>
		<name>Taylor R Campbell</name>
	</author>
	<content type="html">&amp;nbsp; &amp;nbsp;Date: Sun, 20 Dec 2009 00:30:22 -0800
&lt;br&gt;&amp;nbsp; &amp;nbsp;From: Joe Marshall &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26861770&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;jmarshall@...&lt;/a&gt;&amp;gt;
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp;What would happen if the modifier procedure added or deleted an element
&lt;br&gt;&amp;nbsp; &amp;nbsp;from the table? &amp;nbsp;I'm thinking about the case where we've found the cell
&lt;br&gt;&amp;nbsp; &amp;nbsp;pointing at the entry, but the modifier code causes a rehash and the
&lt;br&gt;&amp;nbsp; &amp;nbsp;bucket links are rethreaded while we're trying to walk them.
&lt;br&gt;&lt;br&gt;That's a screw case that blocking interrupts doesn't change. &amp;nbsp;The
&lt;br&gt;modifier procedure is not supposed to update the table.
&lt;br&gt;&lt;br&gt;&lt;br&gt;_______________________________________________
&lt;br&gt;MIT-Scheme-devel mailing list
&lt;br&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26861770&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;MIT-Scheme-devel@...&lt;/a&gt;
&lt;br&gt;&lt;a href=&quot;http://lists.gnu.org/mailman/listinfo/mit-scheme-devel&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://lists.gnu.org/mailman/listinfo/mit-scheme-devel&lt;/a&gt;&lt;br&gt;&lt;p&gt;From forum: &lt;a href=&quot;http://old.nabble.com/Gnu---MIT-Scheme---Dev-f1755.html&quot; embed=&quot;fixTarget[1755]&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;Gnu - MIT Scheme - Dev&lt;/a&gt;&lt;/p&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/hash-table-modify%21-tp26861415p26861770.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26861745</id>
	<title>Re: hash-table/modify!</title>
	<published>2009-12-20T00:30:22Z</published>
	<updated>2009-12-20T00:30:22Z</updated>
	<author>
		<name>Joe Marshall</name>
	</author>
	<content type="html">On Sat, Dec 19, 2009 at 11:53 PM, Taylor R Campbell &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26861745&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;campbell@...&lt;/a&gt;&amp;gt; wrote:
&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt;   Date: Sat, 19 Dec 2009 23:48:12 -0800
&lt;br&gt;&amp;gt;   From: Joe Marshall &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26861745&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;jmarshall@...&lt;/a&gt;&amp;gt;
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;   You need to avoid a race between two processes trying to modify
&lt;br&gt;&amp;gt;   the cell at the same time.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; None of the hash table implementation is safe for concurrent update.
&lt;br&gt;&amp;gt; It is protected only against interruption during updates.  If you want
&lt;br&gt;&amp;gt; to make concurrent updates to a hash table safe, you must synchronize
&lt;br&gt;&amp;gt; them yourself, for instance with a mutex.
&lt;/div&gt;&lt;br&gt;What would happen if the modifier procedure added or deleted an element
&lt;br&gt;from the table? &amp;nbsp;I'm thinking about the case where we've found the cell
&lt;br&gt;pointing at the entry, but the modifier code causes a rehash and the
&lt;br&gt;bucket links are rethreaded while we're trying to walk them.
&lt;br&gt;&lt;br&gt;-- 
&lt;br&gt;~jrm
&lt;br&gt;&lt;br&gt;&lt;br&gt;_______________________________________________
&lt;br&gt;MIT-Scheme-devel mailing list
&lt;br&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26861745&amp;i=2&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;MIT-Scheme-devel@...&lt;/a&gt;
&lt;br&gt;&lt;a href=&quot;http://lists.gnu.org/mailman/listinfo/mit-scheme-devel&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://lists.gnu.org/mailman/listinfo/mit-scheme-devel&lt;/a&gt;&lt;br&gt;&lt;p&gt;From forum: &lt;a href=&quot;http://old.nabble.com/Gnu---MIT-Scheme---Dev-f1755.html&quot; embed=&quot;fixTarget[1755]&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;Gnu - MIT Scheme - Dev&lt;/a&gt;&lt;/p&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/hash-table-modify%21-tp26861415p26861745.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26861716</id>
	<title>Re: make-eq-hash-table</title>
	<published>2009-12-20T00:25:09Z</published>
	<updated>2009-12-20T00:25:09Z</updated>
	<author>
		<name>Taylor R Campbell</name>
	</author>
	<content type="html">&amp;nbsp; &amp;nbsp;Date: Sun, 20 Dec 2009 00:07:17 -0800
&lt;br&gt;&amp;nbsp; &amp;nbsp;From: Joe Marshall &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26861716&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;jmarshall@...&lt;/a&gt;&amp;gt;
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp;Ignoring the issue of weak symbols for the moment, there is no need
&lt;br&gt;&amp;nbsp; &amp;nbsp;to have strong references to the keys *unless* someone is depending
&lt;br&gt;&amp;nbsp; &amp;nbsp;upon walking the hash table to find them. &amp;nbsp;(and they shouldn't)
&lt;br&gt;&lt;br&gt;I don't buy `they shouldn't' unless we're prepared to eliminate
&lt;br&gt;HASH-TABLE/KEY-LIST, HASH-TABLE/DATUM-LIST, HASH-TABLE/FOR-EACH, &amp;c.,
&lt;br&gt;and then rewrite everything that uses them to use a different
&lt;br&gt;abstraction.
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp;Interned objects that can be recreated from their print names (that
&lt;br&gt;&amp;nbsp; &amp;nbsp;is symbols, numbers, and other symbol-like things such as hostnames
&lt;br&gt;&amp;nbsp; &amp;nbsp;and/or URLs) should be treated as strong keys, but other objects
&lt;br&gt;&amp;nbsp; &amp;nbsp;that cannot be re-created (like cons cells) should not be strong.
&lt;br&gt;&lt;br&gt;How do I make new types of interned objects? &amp;nbsp;For example, suppose I
&lt;br&gt;want to implement a hash consing scheme for expressions in a certain
&lt;br&gt;symbolic algebra system to speed up my job as a celestial mechanic.
&lt;br&gt;The hash table abstraction as is doesn't provide any way for me to
&lt;br&gt;tell it what types of keys should be weakly held and what types of
&lt;br&gt;keys should be strongly held for key-weak hash tables.
&lt;br&gt;&lt;br&gt;Of course, in order to make new types of interned objects the right
&lt;br&gt;way, I really need a datum-weak, not key-weak, association collection,
&lt;br&gt;which the current hash table abstraction doesn't provide -- although I
&lt;br&gt;think it should. &amp;nbsp;And I'd much rather implement that than implement
&lt;br&gt;some hook into the hash table abstraction for instructing it what to
&lt;br&gt;automatically treat with strong references and what to automatically
&lt;br&gt;treat with weak references -- such a hook would make the abstraction
&lt;br&gt;harder to understand and probably still more error-prone.
&lt;br&gt;&lt;br&gt;&lt;br&gt;_______________________________________________
&lt;br&gt;MIT-Scheme-devel mailing list
&lt;br&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26861716&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;MIT-Scheme-devel@...&lt;/a&gt;
&lt;br&gt;&lt;a href=&quot;http://lists.gnu.org/mailman/listinfo/mit-scheme-devel&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://lists.gnu.org/mailman/listinfo/mit-scheme-devel&lt;/a&gt;&lt;br&gt;&lt;p&gt;From forum: &lt;a href=&quot;http://old.nabble.com/Gnu---MIT-Scheme---Dev-f1755.html&quot; embed=&quot;fixTarget[1755]&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;Gnu - MIT Scheme - Dev&lt;/a&gt;&lt;/p&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/make-eq-hash-table-tp26861209p26861716.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26861679</id>
	<title>Re: make-eq-hash-table</title>
	<published>2009-12-20T00:12:38Z</published>
	<updated>2009-12-20T00:12:38Z</updated>
	<author>
		<name>Joe Marshall</name>
	</author>
	<content type="html">On Sat, Dec 19, 2009 at 11:04 PM, Arthur A. Gleckler &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26861679&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;aag@...&lt;/a&gt;&amp;gt; wrote:
&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; On a related note, in a recent build, I noticed some of my code
&lt;br&gt;&amp;gt; failing sporadically to find certain values in EQ hash tables.
&lt;br&gt;&amp;gt; Depending on the order in which the code was loaded, one particular
&lt;br&gt;&amp;gt; symbol value would be missing from one such table, which was used to
&lt;br&gt;&amp;gt; represent a set of symbols.  I haven't had a chance to track that
&lt;br&gt;&amp;gt; down.  I did spend a few hours trying to create a reproducible test
&lt;br&gt;&amp;gt; case, but failed.  Could this have been caused by the keys being held
&lt;br&gt;&amp;gt; weakly?  In this hash table, the keys are symbols and the values are
&lt;br&gt;&amp;gt; always #t.
&lt;/div&gt;&lt;br&gt;That's almost certainly what the problem was.
&lt;br&gt;&lt;br&gt;I was wondering if the symbol GC change was going to affect hash tables,
&lt;br&gt;but I guess I didn't worry hard enough.
&lt;br&gt;&lt;br&gt;-- 
&lt;br&gt;~jrm
&lt;br&gt;&lt;br&gt;&lt;br&gt;_______________________________________________
&lt;br&gt;MIT-Scheme-devel mailing list
&lt;br&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26861679&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;MIT-Scheme-devel@...&lt;/a&gt;
&lt;br&gt;&lt;a href=&quot;http://lists.gnu.org/mailman/listinfo/mit-scheme-devel&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://lists.gnu.org/mailman/listinfo/mit-scheme-devel&lt;/a&gt;&lt;br&gt;&lt;p&gt;From forum: &lt;a href=&quot;http://old.nabble.com/Gnu---MIT-Scheme---Dev-f1755.html&quot; embed=&quot;fixTarget[1755]&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;Gnu - MIT Scheme - Dev&lt;/a&gt;&lt;/p&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/make-eq-hash-table-tp26861209p26861679.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26861650</id>
	<title>Re: make-eq-hash-table</title>
	<published>2009-12-20T00:07:17Z</published>
	<updated>2009-12-20T00:07:17Z</updated>
	<author>
		<name>Joe Marshall</name>
	</author>
	<content type="html">On Sat, Dec 19, 2009 at 9:50 PM, Taylor R Campbell &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26861650&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;campbell@...&lt;/a&gt;&amp;gt; wrote:
&lt;br&gt;&amp;gt; After I changed the microcode to hold only weak references to interned
&lt;br&gt;&amp;gt; symbols without global bindings, I noticed a number of problems with
&lt;br&gt;&amp;gt; weak hash tables keyed by symbols.  The procedure MAKE-EQ-HASH-TABLE,
&lt;br&gt;&amp;gt; counterintuitively to me, yields hash tables with only weak references
&lt;br&gt;&amp;gt; to their keys.
&lt;br&gt;&lt;br&gt;If the only reference to a key is from within the hash table itself,
&lt;br&gt;there is no need
&lt;br&gt;to keep the entry in the table (no one can generate a new reference).
&lt;br&gt;&lt;br&gt;The exception is, of course, symbols. &amp;nbsp;Someone can always re-create a
&lt;br&gt;symbol by interning a string. &amp;nbsp;You probably want to handle this by
&lt;br&gt;strengthening symbols that happen to
&lt;br&gt;be used as keys in hash tables.
&lt;br&gt;&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt; Many uses of MAKE-EQ-HASH-TABLE in MIT Scheme actually
&lt;br&gt;&amp;gt; need key-strong hash tables, not key-weak hash tables, and after going
&lt;br&gt;&amp;gt; through all the uses, I see that the problem is worse than I expected.
&lt;br&gt;&amp;gt; Attached to this message is a summary of all sixty-two uses; here are
&lt;br&gt;&amp;gt; two noteworthy statistics:
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; - Only eleven, i.e. 17%, of the uses are obviously legitimate uses for
&lt;br&gt;&amp;gt;  key-weak tables.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; - Thirteen of the uses are obviously incorrect and require key-strong
&lt;br&gt;&amp;gt;  hash tables.  That is, more than 20% of the uses are bugs.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; At the very least, we should make sure that every use of hash tables
&lt;br&gt;&amp;gt; correctly uses key-strong or key-weak hash tables.  However, I'd like
&lt;br&gt;&amp;gt; to go a step further and change the semantics of MAKE-EQ-HASH-TABLE to
&lt;br&gt;&amp;gt; yield strong hash tables, and add a separate MAKE-WEAK-EQ-HASH-TABLE
&lt;br&gt;&amp;gt; which would behave as MAKE-EQ-HASH-TABLE does currently.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; I realize that MAKE-EQ-HASH-TABLE has yielded weak hash tables since
&lt;br&gt;&amp;gt; 1993, and that its predecessor MAKE-OBJECT-HASH-TABLE has done so for
&lt;br&gt;&amp;gt; even longer than that, but since even in MIT Scheme itself there are
&lt;br&gt;&amp;gt; more incorrect uses of MAKE-EQ-HASH-TABLE than correct uses (and many
&lt;br&gt;&amp;gt; more ambiguous uses where the intent is not clear), I think that it is
&lt;br&gt;&amp;gt; dangerous to use the name MAKE-EQ-HASH-TABLE, or any name without the
&lt;br&gt;&amp;gt; word `weak' in it, for a constructor of weak hash tables.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; If we made this change, existing code using MAKE-EQ-HASH-TABLE
&lt;br&gt;&amp;gt; legitimately would exhibit space leaks only on new versions of Scheme.
&lt;br&gt;&amp;gt; On the other hand, if we don't make this change, I think that more and
&lt;br&gt;&amp;gt; more code will be written that accidentally uses weak hash tables
&lt;br&gt;&amp;gt; where strong ones are at best intended or at worst needed, with subtle
&lt;br&gt;&amp;gt; heisenbugs that show up depending on when garbage collection happens.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; Comments?
&lt;/div&gt;&lt;br&gt;I think you should re-analyze things.
&lt;br&gt;&lt;br&gt;Ignoring the issue of weak symbols for the moment, there is no need to
&lt;br&gt;have strong
&lt;br&gt;references to the keys *unless* someone is depending upon walking the hash table
&lt;br&gt;to find them. &amp;nbsp;(and they shouldn't)
&lt;br&gt;&lt;br&gt;Interned objects that can be recreated from their print names (that is symbols,
&lt;br&gt;numbers, and other symbol-like things such as hostnames and/or URLs)
&lt;br&gt;should be treated
&lt;br&gt;as strong keys, but other objects that cannot be re-created (like cons
&lt;br&gt;cells) should
&lt;br&gt;not be strong.
&lt;br&gt;&lt;br&gt;The issues here are subtle, and they have been been gotten wrong many
&lt;br&gt;times before. &amp;nbsp;However, I seem to recall talking about this with CPH and GJR
&lt;br&gt;many years ago and I know they've given it some hard thought.
&lt;br&gt;&lt;br&gt;-- 
&lt;br&gt;~jrm
&lt;br&gt;&lt;br&gt;&lt;br&gt;_______________________________________________
&lt;br&gt;MIT-Scheme-devel mailing list
&lt;br&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26861650&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;MIT-Scheme-devel@...&lt;/a&gt;
&lt;br&gt;&lt;a href=&quot;http://lists.gnu.org/mailman/listinfo/mit-scheme-devel&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://lists.gnu.org/mailman/listinfo/mit-scheme-devel&lt;/a&gt;&lt;br&gt;&lt;p&gt;From forum: &lt;a href=&quot;http://old.nabble.com/Gnu---MIT-Scheme---Dev-f1755.html&quot; embed=&quot;fixTarget[1755]&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;Gnu - MIT Scheme - Dev&lt;/a&gt;&lt;/p&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/make-eq-hash-table-tp26861209p26861650.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26861600</id>
	<title>Re: hash-table/modify!</title>
	<published>2009-12-19T23:53:03Z</published>
	<updated>2009-12-19T23:53:03Z</updated>
	<author>
		<name>Taylor R Campbell</name>
	</author>
	<content type="html">&amp;nbsp; &amp;nbsp;Date: Sat, 19 Dec 2009 23:48:12 -0800
&lt;br&gt;&amp;nbsp; &amp;nbsp;From: Joe Marshall &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26861600&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;jmarshall@...&lt;/a&gt;&amp;gt;
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp;You need to avoid a race between two processes trying to modify
&lt;br&gt;&amp;nbsp; &amp;nbsp;the cell at the same time.
&lt;br&gt;&lt;br&gt;None of the hash table implementation is safe for concurrent update.
&lt;br&gt;It is protected only against interruption during updates. &amp;nbsp;If you want
&lt;br&gt;to make concurrent updates to a hash table safe, you must synchronize
&lt;br&gt;them yourself, for instance with a mutex.
&lt;br&gt;&lt;br&gt;&lt;br&gt;_______________________________________________
&lt;br&gt;MIT-Scheme-devel mailing list
&lt;br&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26861600&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;MIT-Scheme-devel@...&lt;/a&gt;
&lt;br&gt;&lt;a href=&quot;http://lists.gnu.org/mailman/listinfo/mit-scheme-devel&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://lists.gnu.org/mailman/listinfo/mit-scheme-devel&lt;/a&gt;&lt;br&gt;&lt;p&gt;From forum: &lt;a href=&quot;http://old.nabble.com/Gnu---MIT-Scheme---Dev-f1755.html&quot; embed=&quot;fixTarget[1755]&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;Gnu - MIT Scheme - Dev&lt;/a&gt;&lt;/p&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/hash-table-modify%21-tp26861415p26861600.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26861588</id>
	<title>Re: hash-table/modify!</title>
	<published>2009-12-19T23:48:12Z</published>
	<updated>2009-12-19T23:48:12Z</updated>
	<author>
		<name>Joe Marshall</name>
	</author>
	<content type="html">You need to avoid a race between two processes trying to modify
&lt;br&gt;the cell at the same time.
&lt;br&gt;&lt;br&gt;On Sat, Dec 19, 2009 at 10:49 PM, Taylor R Campbell &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26861588&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;campbell@...&lt;/a&gt;&amp;gt; wrote:
&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt; (HASH-TABLE/MODIFY! &amp;lt;hash-table&amp;gt; &amp;lt;key&amp;gt; &amp;lt;modifier&amp;gt; [&amp;lt;default&amp;gt;]) may
&lt;br&gt;&amp;gt; call &amp;lt;modifier&amp;gt; with interrupts blocked, or with the same mask as in
&lt;br&gt;&amp;gt; the caller of HASH-TABLE/MODIFY!.  I can't think of any reason to
&lt;br&gt;&amp;gt; block interrupts during the call to &amp;lt;modifier&amp;gt;, and it seems confusing
&lt;br&gt;&amp;gt; to me to call it in one of two very different states; does it seem
&lt;br&gt;&amp;gt; sensible to pull the call to it outside WITH-TABLE-LOCKED! in the body
&lt;br&gt;&amp;gt; of MAKE-METHOD:MODIFY!'s lambda in hashtb.scm?  And if we made that
&lt;br&gt;&amp;gt; change, would it b necessary to lock the table at all (i.e., to block
&lt;br&gt;&amp;gt; interrupts) for the single write that SET-ENTRY-DATUM! incurs?
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; _______________________________________________
&lt;br&gt;&amp;gt; MIT-Scheme-devel mailing list
&lt;br&gt;&amp;gt; &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26861588&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;MIT-Scheme-devel@...&lt;/a&gt;
&lt;br&gt;&amp;gt; &lt;a href=&quot;http://lists.gnu.org/mailman/listinfo/mit-scheme-devel&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://lists.gnu.org/mailman/listinfo/mit-scheme-devel&lt;/a&gt;&lt;br&gt;&amp;gt;
&lt;/div&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;-- 
&lt;br&gt;~jrm
&lt;br&gt;&lt;br&gt;&lt;br&gt;_______________________________________________
&lt;br&gt;MIT-Scheme-devel mailing list
&lt;br&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26861588&amp;i=2&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;MIT-Scheme-devel@...&lt;/a&gt;
&lt;br&gt;&lt;a href=&quot;http://lists.gnu.org/mailman/listinfo/mit-scheme-devel&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://lists.gnu.org/mailman/listinfo/mit-scheme-devel&lt;/a&gt;&lt;br&gt;&lt;p&gt;From forum: &lt;a href=&quot;http://old.nabble.com/Gnu---MIT-Scheme---Dev-f1755.html&quot; embed=&quot;fixTarget[1755]&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;Gnu - MIT Scheme - Dev&lt;/a&gt;&lt;/p&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/hash-table-modify%21-tp26861415p26861588.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26861525</id>
	<title>Re: make-eq-hash-table</title>
	<published>2009-12-19T23:30:05Z</published>
	<updated>2009-12-19T23:30:05Z</updated>
	<author>
		<name>Taylor R Campbell</name>
	</author>
	<content type="html">&amp;nbsp; &amp;nbsp;Date: Sat, 19 Dec 2009 23:04:29 -0800
&lt;br&gt;&amp;nbsp; &amp;nbsp;From: &amp;quot;Arthur A. Gleckler&amp;quot; &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26861525&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;aag@...&lt;/a&gt;&amp;gt;
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp;On a related note, in a recent build, I noticed some of my code
&lt;br&gt;&amp;nbsp; &amp;nbsp;failing sporadically to find certain values in EQ hash tables.
&lt;br&gt;&amp;nbsp; &amp;nbsp;Depending on the order in which the code was loaded, one particular
&lt;br&gt;&amp;nbsp; &amp;nbsp;symbol value would be missing from one such table, which was used to
&lt;br&gt;&amp;nbsp; &amp;nbsp;represent a set of symbols. &amp;nbsp;I haven't had a chance to track that
&lt;br&gt;&amp;nbsp; &amp;nbsp;down. &amp;nbsp;I did spend a few hours trying to create a reproducible test
&lt;br&gt;&amp;nbsp; &amp;nbsp;case, but failed. &amp;nbsp;Could this have been caused by the keys being held
&lt;br&gt;&amp;nbsp; &amp;nbsp;weakly? &amp;nbsp;In this hash table, the keys are symbols and the values are
&lt;br&gt;&amp;nbsp; &amp;nbsp;always #t.
&lt;br&gt;&lt;br&gt;If you were using MAKE-EQ-HASH-TABLE to make a hash table keyed by
&lt;br&gt;symbols, then this is probably caused by my 2009-12-02 change, commit
&lt;br&gt;056bfc369b57df0864fd88f40ce26cd0e5da75ed, which enables garbage
&lt;br&gt;collection of interned symbols without global bindings. &amp;nbsp;If so, try
&lt;br&gt;using MAKE-STRONG-EQ-HASH-TABLE rather than MAKE-EQ-HASH-TABLE.
&lt;br&gt;&lt;br&gt;&lt;br&gt;_______________________________________________
&lt;br&gt;MIT-Scheme-devel mailing list
&lt;br&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26861525&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;MIT-Scheme-devel@...&lt;/a&gt;
&lt;br&gt;&lt;a href=&quot;http://lists.gnu.org/mailman/listinfo/mit-scheme-devel&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://lists.gnu.org/mailman/listinfo/mit-scheme-devel&lt;/a&gt;&lt;br&gt;&lt;p&gt;From forum: &lt;a href=&quot;http://old.nabble.com/Gnu---MIT-Scheme---Dev-f1755.html&quot; embed=&quot;fixTarget[1755]&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;Gnu - MIT Scheme - Dev&lt;/a&gt;&lt;/p&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/make-eq-hash-table-tp26861209p26861525.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26861460</id>
	<title>Re: make-eq-hash-table</title>
	<published>2009-12-19T23:04:29Z</published>
	<updated>2009-12-19T23:04:29Z</updated>
	<author>
		<name>Arthur A. Gleckler-3</name>
	</author>
	<content type="html">&amp;gt; Comments?
&lt;br&gt;&lt;br&gt;I agree with your recommendation.
&lt;br&gt;&lt;br&gt;On a related note, in a recent build, I noticed some of my code
&lt;br&gt;failing sporadically to find certain values in EQ hash tables.
&lt;br&gt;Depending on the order in which the code was loaded, one particular
&lt;br&gt;symbol value would be missing from one such table, which was used to
&lt;br&gt;represent a set of symbols. &amp;nbsp;I haven't had a chance to track that
&lt;br&gt;down. &amp;nbsp;I did spend a few hours trying to create a reproducible test
&lt;br&gt;case, but failed. &amp;nbsp;Could this have been caused by the keys being held
&lt;br&gt;weakly? &amp;nbsp;In this hash table, the keys are symbols and the values are
&lt;br&gt;always #t.
&lt;br&gt;&lt;br&gt;&lt;br&gt;_______________________________________________
&lt;br&gt;MIT-Scheme-devel mailing list
&lt;br&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26861460&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;MIT-Scheme-devel@...&lt;/a&gt;
&lt;br&gt;&lt;a href=&quot;http://lists.gnu.org/mailman/listinfo/mit-scheme-devel&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://lists.gnu.org/mailman/listinfo/mit-scheme-devel&lt;/a&gt;&lt;br&gt;&lt;p&gt;From forum: &lt;a href=&quot;http://old.nabble.com/Gnu---MIT-Scheme---Dev-f1755.html&quot; embed=&quot;fixTarget[1755]&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;Gnu - MIT Scheme - Dev&lt;/a&gt;&lt;/p&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/make-eq-hash-table-tp26861209p26861460.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26861415</id>
	<title>hash-table/modify!</title>
	<published>2009-12-19T22:49:39Z</published>
	<updated>2009-12-19T22:49:39Z</updated>
	<author>
		<name>Taylor R Campbell</name>
	</author>
	<content type="html">(HASH-TABLE/MODIFY! &amp;lt;hash-table&amp;gt; &amp;lt;key&amp;gt; &amp;lt;modifier&amp;gt; [&amp;lt;default&amp;gt;]) may
&lt;br&gt;call &amp;lt;modifier&amp;gt; with interrupts blocked, or with the same mask as in
&lt;br&gt;the caller of HASH-TABLE/MODIFY!. &amp;nbsp;I can't think of any reason to
&lt;br&gt;block interrupts during the call to &amp;lt;modifier&amp;gt;, and it seems confusing
&lt;br&gt;to me to call it in one of two very different states; does it seem
&lt;br&gt;sensible to pull the call to it outside WITH-TABLE-LOCKED! in the body
&lt;br&gt;of MAKE-METHOD:MODIFY!'s lambda in hashtb.scm? &amp;nbsp;And if we made that
&lt;br&gt;change, would it b necessary to lock the table at all (i.e., to block
&lt;br&gt;interrupts) for the single write that SET-ENTRY-DATUM! incurs?
&lt;br&gt;&lt;br&gt;&lt;br&gt;_______________________________________________
&lt;br&gt;MIT-Scheme-devel mailing list
&lt;br&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26861415&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;MIT-Scheme-devel@...&lt;/a&gt;
&lt;br&gt;&lt;a href=&quot;http://lists.gnu.org/mailman/listinfo/mit-scheme-devel&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://lists.gnu.org/mailman/listinfo/mit-scheme-devel&lt;/a&gt;&lt;br&gt;&lt;p&gt;From forum: &lt;a href=&quot;http://old.nabble.com/Gnu---MIT-Scheme---Dev-f1755.html&quot; embed=&quot;fixTarget[1755]&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;Gnu - MIT Scheme - Dev&lt;/a&gt;&lt;/p&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/hash-table-modify%21-tp26861415p26861415.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26861209</id>
	<title>make-eq-hash-table</title>
	<published>2009-12-19T21:50:31Z</published>
	<updated>2009-12-19T21:50:31Z</updated>
	<author>
		<name>Taylor R Campbell</name>
	</author>
	<content type="html">After I changed the microcode to hold only weak references to interned
&lt;br&gt;symbols without global bindings, I noticed a number of problems with
&lt;br&gt;weak hash tables keyed by symbols. &amp;nbsp;The procedure MAKE-EQ-HASH-TABLE,
&lt;br&gt;counterintuitively to me, yields hash tables with only weak references
&lt;br&gt;to their keys. &amp;nbsp;Many uses of MAKE-EQ-HASH-TABLE in MIT Scheme actually
&lt;br&gt;need key-strong hash tables, not key-weak hash tables, and after going
&lt;br&gt;through all the uses, I see that the problem is worse than I expected.
&lt;br&gt;Attached to this message is a summary of all sixty-two uses; here are
&lt;br&gt;two noteworthy statistics:
&lt;br&gt;&lt;br&gt;- Only eleven, i.e. 17%, of the uses are obviously legitimate uses for
&lt;br&gt;&amp;nbsp; key-weak tables.
&lt;br&gt;&lt;br&gt;- Thirteen of the uses are obviously incorrect and require key-strong
&lt;br&gt;&amp;nbsp; hash tables. &amp;nbsp;That is, more than 20% of the uses are bugs.
&lt;br&gt;&lt;br&gt;At the very least, we should make sure that every use of hash tables
&lt;br&gt;correctly uses key-strong or key-weak hash tables. &amp;nbsp;However, I'd like
&lt;br&gt;to go a step further and change the semantics of MAKE-EQ-HASH-TABLE to
&lt;br&gt;yield strong hash tables, and add a separate MAKE-WEAK-EQ-HASH-TABLE
&lt;br&gt;which would behave as MAKE-EQ-HASH-TABLE does currently.
&lt;br&gt;&lt;br&gt;I realize that MAKE-EQ-HASH-TABLE has yielded weak hash tables since
&lt;br&gt;1993, and that its predecessor MAKE-OBJECT-HASH-TABLE has done so for
&lt;br&gt;even longer than that, but since even in MIT Scheme itself there are
&lt;br&gt;more incorrect uses of MAKE-EQ-HASH-TABLE than correct uses (and many
&lt;br&gt;more ambiguous uses where the intent is not clear), I think that it is
&lt;br&gt;dangerous to use the name MAKE-EQ-HASH-TABLE, or any name without the
&lt;br&gt;word `weak' in it, for a constructor of weak hash tables.
&lt;br&gt;&lt;br&gt;If we made this change, existing code using MAKE-EQ-HASH-TABLE
&lt;br&gt;legitimately would exhibit space leaks only on new versions of Scheme.
&lt;br&gt;On the other hand, if we don't make this change, I think that more and
&lt;br&gt;more code will be written that accidentally uses weak hash tables
&lt;br&gt;where strong ones are at best intended or at worst needed, with subtle
&lt;br&gt;heisenbugs that show up depending on when garbage collection happens.
&lt;br&gt;&lt;br&gt;Comments?
&lt;br&gt;&lt;br /&gt;* Use of MAKE-EQ-HASH-TABLE in MIT Scheme, 2009-12-19 &amp;nbsp;-*- outline -*-
&lt;br&gt;&lt;br&gt;In MIT Scheme, MAKE-EQ-HASH-TABLE yields a hash table whose keys are
&lt;br&gt;held only weakly, so that they will be garbage-collected if there are
&lt;br&gt;no strong references to them. &amp;nbsp;To make a similar hash table whose keys
&lt;br&gt;are held strongly, one must use MAKE-STRONG-EQ-HASH-TABLE explicitly.
&lt;br&gt;Of the sixty-two uses of MAKE-EQ-HASH-TABLE throughout the MIT Scheme
&lt;br&gt;source code, only seven appear to need weak references to their keys,
&lt;br&gt;and for only four more is there an obvious reason to use weak
&lt;br&gt;references. &amp;nbsp;This list categorizes most uses of MAKE-EQ-HASH-TABLE. &amp;nbsp;I
&lt;br&gt;have not analyzed the complicated uses of MAKE-EQ-HASH-TABLE in
&lt;br&gt;xdoc/xdoc.scm and xml/xml-names.scm.
&lt;br&gt;&lt;br&gt;** Hash table must be key-weak
&lt;br&gt;&lt;br&gt;*** edwin/comman.scm, permanent-local-variables
&lt;br&gt;*** edwin/curren.scm, screen-buffer-layouts
&lt;br&gt;*** edwin/eystep.scm, stepper-buffers
&lt;br&gt;*** edwin/xterm.scm, display/cached-atoms-table
&lt;br&gt;*** edwin/xterm.scm, display/selection-records
&lt;br&gt;*** imail/imail-core.scm, memoized-resources
&lt;br&gt;*** runtime/sfile.scm, interned-mime-types
&lt;br&gt;&lt;br&gt;** Hash table should probably be key-weak
&lt;br&gt;&lt;br&gt;*** edwin/prompt.scm, prompt-histories
&lt;br&gt;*** edwin/xterm.scm, symbol-&amp;gt;atom table in display/cached-atom-tables
&lt;br&gt;*** imail/imail-file.scm, file-folder-types
&lt;br&gt;*** sos/class.scm, built-in-class-table
&lt;br&gt;&lt;br&gt;** Hash table could be key-strong; not sure whether it should be
&lt;br&gt;&lt;br&gt;*** compiler/machines/i386/lapopt.scm, *rules*
&lt;br&gt;&lt;br&gt;If the compiler never generates instructions with certain symbols in
&lt;br&gt;them, and hence the compiler's code has no strong references to those
&lt;br&gt;symbols, then the rules for those symbols may as well be discarded.
&lt;br&gt;But that's pretty sketchy.
&lt;br&gt;&lt;br&gt;*** compiler/machines/svm/assembler-runtime.scm, symbol tables
&lt;br&gt;*** compiler/machines/svm/assembler-runtime.scm, symbolic-operators
&lt;br&gt;*** compiler/machines/svm/assembler-runtime.scm, pvar-type-table
&lt;br&gt;*** compiler/machines/svm/lapopt.scm, *rules* (not really used)
&lt;br&gt;*** compiler/machines/x86-64/lapopt.scm, *rules* (not really used)
&lt;br&gt;*** edwin/nntp.scm, tables in convert-header-graphs-to-trees
&lt;br&gt;&lt;br&gt;In the only caller of CONVERT-HEADER-GRAPHS-TO-TREES, the (strong)
&lt;br&gt;list of headers is still strongly referenced, so the keys of the two
&lt;br&gt;hash tables in TABLES will not be garbage-collected. &amp;nbsp;But this is
&lt;br&gt;still sketchy (and see below on BUILD-EQUIVALENCE-CLASSES in the same
&lt;br&gt;file).
&lt;br&gt;&lt;br&gt;*** edwin/xterm.scm, built-in-atoms-table
&lt;br&gt;&lt;br&gt;If the binding for BUILT-IN-ATOMS were collected while that for
&lt;br&gt;BUILT-IN-ATOMS-TABLE were not, then the latter would be in trouble.
&lt;br&gt;But this doesn't happen currently.
&lt;br&gt;&lt;br&gt;*** microcode/os2pm.scm, type-abbreviations
&lt;br&gt;*** microcode/os2pm.scm, id-external-roots
&lt;br&gt;*** microcode/os2pm.scm, pm-procedures
&lt;br&gt;&lt;br&gt;This code is probably defunct, but if it weren't, and if the
&lt;br&gt;presentation manager procedure abstraction were used outside this
&lt;br&gt;file, it would probably be necessary to make these three hash tables
&lt;br&gt;key-strong. &amp;nbsp;It's not clear to me that PM-PROCEDURES is safe as is,
&lt;br&gt;too.
&lt;br&gt;&lt;br&gt;*** runtime/genio.scm, {en,de}coder/sizer/{,de}normalizer maps
&lt;br&gt;&lt;br&gt;Since there are maps in both directions, each hash table's keys also
&lt;br&gt;have strong references in the data positions of the other hash table.
&lt;br&gt;But this is pretty fragile, and in any case there is no need to use
&lt;br&gt;key-weak hash tables.
&lt;br&gt;&lt;br&gt;*** runtime/syntax-output.scm, unmappings
&lt;br&gt;*** runtime/syntax-output.scm, rename-databases' mapping-tables
&lt;br&gt;*** runtime/syntax-output.scm, rename-databases' id-tables
&lt;br&gt;*** ssp/xmlrpc.scm, methods
&lt;br&gt;&lt;br&gt;Since the hash table is used only in one place, and only one key is
&lt;br&gt;fetched out of it, that key will be strongly referenced until it is
&lt;br&gt;fetched, and the other keys don't matter.
&lt;br&gt;&lt;br&gt;*** xml/turtle.scm, table in write-prefixes
&lt;br&gt;&lt;br&gt;** Hash table must be key-strong
&lt;br&gt;&lt;br&gt;*** edwin/nntp.scm, equivalences in build-equivalence-classes
&lt;br&gt;&lt;br&gt;In the expression for the call to MAP at the end of
&lt;br&gt;BUILD-EQUIVALENCE-CLASSES, there are no extant references to the
&lt;br&gt;threads except in the keys of the hash table. &amp;nbsp;(SUBJECT-ALIST, and the
&lt;br&gt;caller's THREADS in ORGANIZE-HEADERS-INTO-THREADS, are no longer
&lt;br&gt;referenced at this point.) &amp;nbsp;Hence the garbage collector may reclaim
&lt;br&gt;some (or in fact all) of the hash table's associations.
&lt;br&gt;&lt;br&gt;*** imail/imail-mime.scm, mime-encodings
&lt;br&gt;*** runtime/http-syntax.scm, header-value-defns
&lt;br&gt;*** ssp/mod-lisp.scm, mime-handlers
&lt;br&gt;*** ssp/xhtml-expander.scm, *sabbr-table*
&lt;br&gt;&lt;br&gt;The processing instructions are processed incrementally as the file is
&lt;br&gt;parsed, so keys in the sabbr table may be garbage-collected and then
&lt;br&gt;re-interned, between which times the associations will be destroyed.
&lt;br&gt;&lt;br&gt;*** star-parser/matcher.scm, matcher-preprocessors
&lt;br&gt;*** star-parser/matcher.scm, matcher-compilers
&lt;br&gt;*** star-parser/parser.scm, parser-preprocessors
&lt;br&gt;*** star-parser/parser.scm, parser-compilers
&lt;br&gt;*** star-parser/shared.scm, make-parser-macros
&lt;br&gt;*** star-parser/shared.scm, *global-parser-macros*
&lt;br&gt;*** xdoc/validate-xdoc.scm, element-checkers
&lt;br&gt;*** xml/xhtml.scm, element-context-map
&lt;br&gt;&lt;br&gt;** Unsure
&lt;br&gt;&lt;br&gt;*** compiler/machines/C/stackify.scm, stackify count tables
&lt;br&gt;*** compiler/rtlbase/rtlobj.scm, label-&amp;gt;object maps
&lt;br&gt;&lt;br&gt;It's not immediately obvious to me whether LABEL-&amp;gt;OBJECT will ever be
&lt;br&gt;used after the last references to the keys of the hash tables involved
&lt;br&gt;(which cause strong references to those keys to be dropped, if
&lt;br&gt;COMPILER:PRESERVE-DATA-STRUCTURES? is false). &amp;nbsp;A little further
&lt;br&gt;analysis is required.
&lt;br&gt;&lt;br&gt;*** edwin/eystep.scm, ynode-regions
&lt;br&gt;&lt;br&gt;What are the keys to these hash tables? &amp;nbsp;I don't know how long they
&lt;br&gt;persist.
&lt;br&gt;&lt;br&gt;*** edwin/win32.scm, event-handlers
&lt;br&gt;&lt;br&gt;The keys in EVENT-HANDLERS are integers. &amp;nbsp;Should the table be a strong
&lt;br&gt;eqv hash table rather than a weak eq hash table?
&lt;br&gt;&lt;br&gt;*** edwin/xterm.scm, selection-&amp;gt;record table in display/selection-records
&lt;br&gt;&lt;br&gt;I'm not sure what the domain of possible keys to this hash table is --
&lt;br&gt;it may be just the symbols PRIMARY and CLIPBOARD, which will probably
&lt;br&gt;be strongly referenced by the rest of the Edwin code, but on the other
&lt;br&gt;hand I think this should probably be a key-strong hash table.
&lt;br&gt;&lt;br&gt;*** xml/xhtml-entities.scm, table in html-char-&amp;gt;name-map
&lt;br&gt;&lt;br&gt;The keys in the table inside HTML-CHAR-&amp;gt;NAME-MAP is keyed by
&lt;br&gt;characters. &amp;nbsp;Should this be a strong eqv hash table rather than a weak
&lt;br&gt;eq hash table?
&lt;br&gt;&lt;br&gt;** Complicated
&lt;br&gt;&lt;br&gt;*** xdoc/xdoc.scm
&lt;br&gt;*** xml/xml-names.scm
&lt;br&gt;&lt;br /&gt;_______________________________________________
&lt;br&gt;MIT-Scheme-devel mailing list
&lt;br&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26861209&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;MIT-Scheme-devel@...&lt;/a&gt;
&lt;br&gt;&lt;a href=&quot;http://lists.gnu.org/mailman/listinfo/mit-scheme-devel&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://lists.gnu.org/mailman/listinfo/mit-scheme-devel&lt;/a&gt;&lt;br&gt;&lt;p&gt;From forum: &lt;a href=&quot;http://old.nabble.com/Gnu---MIT-Scheme---Dev-f1755.html&quot; embed=&quot;fixTarget[1755]&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;Gnu - MIT Scheme - Dev&lt;/a&gt;&lt;/p&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/make-eq-hash-table-tp26861209p26861209.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26852529</id>
	<title>implementing OS-dependent primitives on Windows</title>
	<published>2009-12-18T19:41:34Z</published>
	<updated>2009-12-18T19:41:34Z</updated>
	<author>
		<name>Taylor R Campbell</name>
	</author>
	<content type="html">Over the past couple of years I have added some microcode primitives
&lt;br&gt;that have OS-dependent interfaces without (more than stubs of)
&lt;br&gt;implementations on Windows, which would probably be worth implementing
&lt;br&gt;before we make a new snapshot, if someone who knows about the Windows
&lt;br&gt;API and can test them is up for that. &amp;nbsp;Two such interfaces that come
&lt;br&gt;to mind are OS_channel_synchronize and OS_open_exclusive_output_file;
&lt;br&gt;there may be others that I don't remember.
&lt;br&gt;&lt;br&gt;&lt;br&gt;_______________________________________________
&lt;br&gt;MIT-Scheme-devel mailing list
&lt;br&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26852529&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;MIT-Scheme-devel@...&lt;/a&gt;
&lt;br&gt;&lt;a href=&quot;http://lists.gnu.org/mailman/listinfo/mit-scheme-devel&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://lists.gnu.org/mailman/listinfo/mit-scheme-devel&lt;/a&gt;&lt;br&gt;&lt;p&gt;From forum: &lt;a href=&quot;http://old.nabble.com/Gnu---MIT-Scheme---Dev-f1755.html&quot; embed=&quot;fixTarget[1755]&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;Gnu - MIT Scheme - Dev&lt;/a&gt;&lt;/p&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/implementing-OS-dependent-primitives-on-Windows-tp26852529p26852529.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26849109</id>
	<title>Re: Jumping the gun?</title>
	<published>2009-12-18T12:11:07Z</published>
	<updated>2009-12-18T12:11:07Z</updated>
	<author>
		<name>Joe Marshall</name>
	</author>
	<content type="html">On Fri, Dec 18, 2009 at 11:26 AM, Chris Hanson &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26849109&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;cph@...&lt;/a&gt;&amp;gt; wrote:
&lt;br&gt;&amp;gt; Unfortunately you also need to define an environment variable:
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;     NT_INCLUDE=C:\WATCOM\H\NT
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; Maybe it would make sense to just hard-code that value instead of
&lt;br&gt;&amp;gt; using a variable.
&lt;br&gt;&lt;br&gt;Woohoo! &amp;nbsp;It worked!!!! &amp;nbsp;I now have a brand new microcode and a runtime band.
&lt;br&gt;I'll figure out how to get the compiler bootstrapped this weekend.
&lt;br&gt;&lt;br&gt;Thanks Chris!
&lt;br&gt;&lt;br&gt;-- 
&lt;br&gt;~jrm
&lt;br&gt;&lt;br&gt;&lt;br&gt;_______________________________________________
&lt;br&gt;MIT-Scheme-devel mailing list
&lt;br&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26849109&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;MIT-Scheme-devel@...&lt;/a&gt;
&lt;br&gt;&lt;a href=&quot;http://lists.gnu.org/mailman/listinfo/mit-scheme-devel&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://lists.gnu.org/mailman/listinfo/mit-scheme-devel&lt;/a&gt;&lt;br&gt;&lt;p&gt;From forum: &lt;a href=&quot;http://old.nabble.com/Gnu---MIT-Scheme---Dev-f1755.html&quot; embed=&quot;fixTarget[1755]&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;Gnu - MIT Scheme - Dev&lt;/a&gt;&lt;/p&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Jumping-the-gun--tp26846027p26849109.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26848458</id>
	<title>Re: Jumping the gun?</title>
	<published>2009-12-18T11:26:22Z</published>
	<updated>2009-12-18T11:26:22Z</updated>
	<author>
		<name>Chris Hanson-6</name>
	</author>
	<content type="html">Unfortunately you also need to define an environment variable:
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;NT_INCLUDE=C:\WATCOM\H\NT
&lt;br&gt;&lt;br&gt;Maybe it would make sense to just hard-code that value instead of
&lt;br&gt;using a variable.
&lt;br&gt;&lt;br&gt;On Fri, Dec 18, 2009 at 8:32 AM, Joe Marshall &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26848458&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;jmarshall@...&lt;/a&gt;&amp;gt; wrote:
&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt; So I tried the new compile scripts, but compile-prepare.bat errors out
&lt;br&gt;&amp;gt; after compiling a lot of stuff:
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; Open Watcom Make Version 1.8
&lt;br&gt;&amp;gt; Portions Copyright (c) 1988-2002 Sybase, Inc. All Rights Reserved.
&lt;br&gt;&amp;gt; Source code is available under the Sybase Open Watcom Public License.
&lt;br&gt;&amp;gt; See &lt;a href=&quot;http://www.openwatcom.org/&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.openwatcom.org/&lt;/a&gt;&amp;nbsp;for details.
&lt;br&gt;&amp;gt;        wrc /q /ad /bt=nt /r /x /D__WATCOMC__ /i= ntgui.rc
&lt;br&gt;&amp;gt; ntgui.rc(2): Fatal Error! 62:  Unable to open 'windows.h'
&lt;br&gt;&amp;gt; Error(E14): Cannot execute (wrc): No error
&lt;br&gt;&amp;gt; Error(E42): Last command making (ntgui.res) returned a bad status
&lt;br&gt;&amp;gt; Error(E02): Make execution terminated
&lt;br&gt;&amp;gt;        1 file(s) copied.
&lt;br&gt;&amp;gt; Open Watcom Make Version 1.8
&lt;br&gt;&amp;gt; Portions Copyright (c) 1988-2002 Sybase, Inc. All Rights Reserved.
&lt;br&gt;&amp;gt; Source code is available under the Sybase Open Watcom Public License.
&lt;br&gt;&amp;gt; See &lt;a href=&quot;http://www.openwatcom.org/&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.openwatcom.org/&lt;/a&gt;&amp;nbsp;for details.
&lt;br&gt;&amp;gt;        wrc /q /ad /bt=nt /r /x /D__WATCOMC__ /i= dibutils.rc
&lt;br&gt;&amp;gt; dibutils.rc(3): Fatal Error! 62:  Unable to open 'winver.h'
&lt;br&gt;&amp;gt; Error(E14): Cannot execute (wrc): No error
&lt;br&gt;&amp;gt; Error(E42): Last command making (dibutils.res) returned a bad status
&lt;br&gt;&amp;gt; Error(E02): Make execution terminated
&lt;br&gt;&amp;gt; machines\i386\compiler.cbf
&lt;br&gt;&amp;gt; machines\i386\compiler.pkg
&lt;br&gt;&amp;gt; machines\i386\compiler.sf
&lt;br&gt;&amp;gt;        3 file(s) copied.
&lt;br&gt;&amp;gt; -------------------------------------
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; Am I doing it wrong?  Am I jumping the gun?
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; --
&lt;br&gt;&amp;gt; ~jrm
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; _______________________________________________
&lt;br&gt;&amp;gt; MIT-Scheme-devel mailing list
&lt;br&gt;&amp;gt; &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26848458&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;MIT-Scheme-devel@...&lt;/a&gt;
&lt;br&gt;&amp;gt; &lt;a href=&quot;http://lists.gnu.org/mailman/listinfo/mit-scheme-devel&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://lists.gnu.org/mailman/listinfo/mit-scheme-devel&lt;/a&gt;&lt;br&gt;&amp;gt;
&lt;/div&gt;&lt;br&gt;&lt;br&gt;_______________________________________________
&lt;br&gt;MIT-Scheme-devel mailing list
&lt;br&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26848458&amp;i=2&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;MIT-Scheme-devel@...&lt;/a&gt;
&lt;br&gt;&lt;a href=&quot;http://lists.gnu.org/mailman/listinfo/mit-scheme-devel&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://lists.gnu.org/mailman/listinfo/mit-scheme-devel&lt;/a&gt;&lt;br&gt;&lt;p&gt;From forum: &lt;a href=&quot;http://old.nabble.com/Gnu---MIT-Scheme---Dev-f1755.html&quot; embed=&quot;fixTarget[1755]&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;Gnu - MIT Scheme - Dev&lt;/a&gt;&lt;/p&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Jumping-the-gun--tp26846027p26848458.html" />
</entry>

</feed>
