From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Chris Lemmer-Webber Newsgroups: gmane.lisp.guile.devel Subject: Re: thoughts on targetting the web Date: Sun, 20 Jun 2021 10:14:55 -0400 Message-ID: <87lf74ei74.fsf@dustycloud.org> References: <87h7htfvy3.fsf@pobox.com> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="35268"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: mu4e 1.4.15; emacs 27.2 Cc: Andy Wingo , guile-devel@gnu.org To: Maxime Devos Original-X-From: guile-devel-bounces+guile-devel=m.gmane-mx.org@gnu.org Sun Jun 20 16:15:41 2021 Return-path: Envelope-to: guile-devel@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1luyEf-00094W-1f for guile-devel@m.gmane-mx.org; Sun, 20 Jun 2021 16:15:41 +0200 Original-Received: from localhost ([::1]:41932 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1luyEd-0006kT-SE for guile-devel@m.gmane-mx.org; Sun, 20 Jun 2021 10:15:39 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:42424) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1luyDy-00063l-DU for guile-devel@gnu.org; Sun, 20 Jun 2021 10:14:58 -0400 Original-Received: from dustycloud.org ([50.116.34.160]:33302) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1luyDw-0002cp-Nz for guile-devel@gnu.org; Sun, 20 Jun 2021 10:14:58 -0400 Original-Received: from twig (localhost [127.0.0.1]) by dustycloud.org (Postfix) with ESMTPS id 6DF082661B; Sun, 20 Jun 2021 10:14:55 -0400 (EDT) In-reply-to: Received-SPF: pass client-ip=50.116.34.160; envelope-from=cwebber@dustycloud.org; helo=dustycloud.org X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: guile-devel@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "Developers list for Guile, the GNU extensibility library" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guile-devel-bounces+guile-devel=m.gmane-mx.org@gnu.org Original-Sender: "guile-devel" Xref: news.gmane.io gmane.lisp.guile.devel:20789 Archived-At: Maxime Devos writes: > Andy Wingo schreef op za 19-06-2021 om 22:20 [+0200]: >> 5. Garbage collection. *We should re-use the host GC*. Although it >> would be possible to manage a heap in linear memory, that has >> retention problems due to cycles between the Guile heap and the JS >> heap. > > I could be mistaken (and I haven't written any ECMAScript in a long time), > but I believe ECMAScript doesn't have guardians, gc hooks, weak vectors and > (key, value, key-value) weak hash tables. So, if we re-use the host GC, > that would mean those GC things cannot be used right? > > In that case, it may be a good idea to raise an error at compile time > if some code tries to use these anyways. (I've been using guardians > and weak vectors lately.) > > Greetings, > Maxime Weakmaps are a thing these days I think: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/WeakMap Weak vectors, not so sure. (Never used them myself anyway.)