From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: =?UTF-8?Q?Linus_Bj=C3=B6rnstam?= Newsgroups: gmane.lisp.guile.devel Subject: Re: Clojure support Date: Sat, 04 Mar 2023 11:28:50 +0100 Message-ID: References: <2682583.mvXUDI8C0e@t480s> Mime-Version: 1.0 Content-Type: text/plain;charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="17803"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Cyrus-JMAP/3.9.0-alpha0-183-gbf7d00f500-fm-20230220.001-gbf7d00f5 To: "Lassi Kortela" , "Jessica Tallon" , guile-devel@gnu.org Original-X-From: guile-devel-bounces+guile-devel=m.gmane-mx.org@gnu.org Sat Mar 04 11:29:43 2023 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 1pYP92-0004SJ-Ic for guile-devel@m.gmane-mx.org; Sat, 04 Mar 2023 11:29:42 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pYP8i-0001CK-A9; Sat, 04 Mar 2023 05:29:20 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pYP8h-0001CB-9Q for guile-devel@gnu.org; Sat, 04 Mar 2023 05:29:19 -0500 Original-Received: from wout2-smtp.messagingengine.com ([64.147.123.25]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pYP8f-0003OS-AK for guile-devel@gnu.org; Sat, 04 Mar 2023 05:29:19 -0500 Original-Received: from compute2.internal (compute2.nyi.internal [10.202.2.46]) by mailout.west.internal (Postfix) with ESMTP id F2E5832002FB; Sat, 4 Mar 2023 05:29:12 -0500 (EST) Original-Received: from imap51 ([10.202.2.101]) by compute2.internal (MEProxy); Sat, 04 Mar 2023 05:29:13 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=veryfast.biz; h= cc:content-transfer-encoding:content-type:content-type:date:date :from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:sender:subject:subject:to:to; s=fm3; t= 1677925752; x=1678012152; bh=w3N4YC5+P0z1BcO2sUl0CYa0TjgaYtVSLUX YspFbnJ8=; b=VMFTklOpf0wV+4R9cOWv/rBVbKin4mB7xgOxv0GM9rpHklJ2Jqh xMGRlniJPeGrsCBZf43gRtM9lw9lPMaFMBBfYOrjDJajKQOXOn1F90nq0LMdTCfH Ztt1rjWS/9KVDOzHFE0c3bW+qJCC5eZI48VOPfbrLhzEo9rPapm7G6ss4mbISLwv CixDjfTyfDC503TgmpfmG1HXbUSz27MCWsI+CT7ZCm62uLhtF72p1kB5i+Qj7Ana FVLGdr6JOg0S5cUzQ7+fxcotseo6svi1jzqmacxtjrtnUwK/KoYV9GAbsenkrh/7 UfFu9w0vA0HXeTU+nwAMJs1r42uFJb4XuZA== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :content-type:date:date:feedback-id:feedback-id:from:from :in-reply-to:in-reply-to:message-id:mime-version:references :reply-to:sender:subject:subject:to:to:x-me-proxy:x-me-proxy :x-me-sender:x-me-sender:x-sasl-enc; s=fm1; t=1677925752; x= 1678012152; bh=w3N4YC5+P0z1BcO2sUl0CYa0TjgaYtVSLUXYspFbnJ8=; b=K j9wEyM6Mj4vZ7xP8YS1+BCq+hK7uiz3tm9cO+/bbEStUwJ0LFlerYLpV0M3DQPs1 Y/Smx3q7gu+9SdQpmI8I66mfox4KvvZQ7KVwp68gCEpdRqw/9jctq9r0Ns4gqp7a o9Y8mQdIf8lwxJASaegBUWz4CVkCQ+ZwI5r6LLUWXIxugAXtYGRBGRxRmf4twRtW qbukYkIpZySpElUppvTvdjc1MiyGpG4ov49ecub5uYqgFLykQGhxH1ELEcwNCv0w XwyvI2g92oatsuMG9LcA0RQHn9pkAwUb8cWOKx141UoBiiTjkYSjvSWYMW7ls0Xp pZOdD5PEZoPyyZh46r1hQ== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvhedrvddtuddgudegucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhepofgfggfkjghffffhvffutgfgsehtqhertderreejnecuhfhrohhmpefnihhn uhhsuceujhpnrhhnshhtrghmuceolhhinhhushdrsghjohhrnhhsthgrmhesvhgvrhihfh grshhtrdgsihiiqeenucggtffrrghtthgvrhhnpeeitdfgveekleetieegvddufeekieeg leeujedtjedtgfduheehgfejleefkeeftdenucffohhmrghinhepghhithhhuhgsrdgtoh hmnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomheplhhi nhhushdrsghjohhrnhhsthgrmhesvhgvrhihfhgrshhtrdgsihii X-ME-Proxy: Feedback-ID: i51694465:Fastmail Original-Received: by mailuser.nyi.internal (Postfix, from userid 501) id 2FF82B60086; Sat, 4 Mar 2023 05:29:12 -0500 (EST) X-Mailer: MessagingEngine.com Webmail Interface In-Reply-To: Received-SPF: pass client-ip=64.147.123.25; envelope-from=linus.bjornstam@veryfast.biz; helo=wout2-smtp.messagingengine.com X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H2=-0.001, 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.29 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-bounces+guile-devel=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.lisp.guile.devel:21769 Archived-At: Regarding data structures, there are some additions that should be made = to the standard clojure versions. There would be no reason to implement = a regular leftwise-dense persistent vector when there is something like = RRB-trees available, which provide no slowdown compared to the leftwise = dense vectors when used as such, but can "degrade" to RRB-trees when nee= ded as a means to support amortized O(1) concatenation, insertion, and s= plitting.=20 If a C library is to be used, C-rrb is a very high quality implementatio= n. I tried to implement RRB-trees in guile, but I never quite got the me= rge algorithm to work as it should. Scalas functional vectors are RRB-tr= ees with some really cool additions to the tail optimization. Andy already has a fast implementation of functional hashtables ("fash")= which are of a particular high quality. They do not support element rem= oval which should be trivial to add. Other than that it has all the bas= ic functionality needed to build a complex library on top.=20 --=20 Linus Bj=C3=B6rnstam On Tue, 28 Feb 2023, at 18:03, Lassi Kortela wrote: >> I've been thinking how it'd be nice to have available in Guile a numb= er of >> purely functional datatypes, these being hashmaps, vectors, and sets. > > Those are core data types of Clojure. It'd be nice if the canonical=20 > Scheme versions of these types have Clojure-compatible semantics. This=20 > will make it easy to turn Scheme implementations into partial=20 > implementations of Clojure. This is already being attempted in Lokke=20 > (https://github.com/lokke-org/lokke).