From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Maxime Devos Newsgroups: gmane.lisp.guile.user Subject: Re: Idiomatic Guile for semigroup/monoid/group? Date: Mon, 03 Jan 2022 10:14:26 +0000 Message-ID: <8c869dfc519b7faeec5feabe9243efa25cd1668d.camel@telenet.be> References: <7af1fd7e8bf7b0c84cdda3a431412bac31b45f18.camel@telenet.be> Mime-Version: 1.0 Content-Type: multipart/signed; micalg="pgp-sha512"; protocol="application/pgp-signature"; boundary="=-1ltFfQo4+nGzJrRw+8AS" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="37197"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Evolution 3.38.3-1 Cc: guile-user@gnu.org To: Stuart Hungerford Original-X-From: guile-user-bounces+guile-user=m.gmane-mx.org@gnu.org Mon Jan 03 11:14:52 2022 Return-path: Envelope-to: guile-user@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 1n4KMe-0009X4-DS for guile-user@m.gmane-mx.org; Mon, 03 Jan 2022 11:14:52 +0100 Original-Received: from localhost ([::1]:39404 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1n4KMd-0003LD-4t for guile-user@m.gmane-mx.org; Mon, 03 Jan 2022 05:14:51 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:35218) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1n4KMQ-0003JV-VB for guile-user@gnu.org; Mon, 03 Jan 2022 05:14:38 -0500 Original-Received: from [2a02:1800:120:4::f00:15] (port=41404 helo=andre.telenet-ops.be) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1n4KMO-0000Hh-Nh for guile-user@gnu.org; Mon, 03 Jan 2022 05:14:38 -0500 Original-Received: from ptr-bvsjgyhxw7psv60dyze.18120a2.ip6.access.telenet.be ([IPv6:2a02:1811:8c09:9d00:3c5f:2eff:feb0:ba5a]) by andre.telenet-ops.be with bizsmtp id eAEX2601V4UW6Th01AEYYc; Mon, 03 Jan 2022 11:14:32 +0100 In-Reply-To: DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=telenet.be; s=r21; t=1641204872; bh=D98GjJym2U+CkTrwVt/bD29L4ZGrz2eSOt/vMeDiiVM=; h=Subject:From:To:Cc:Date:In-Reply-To:References; b=YpQ0Zq3kJYAmwzX1RfHBhHRDRqwX02otmZAcue68LdatGJY3Pj6xhUeZG0eX7bMQ1 GJfyUd7hHp7z6fcIKNgBvMOcmpy+4+9RY+5vY7bGTC4tOrlePl/85X/ZLi3D055hWt DH4YJnQfbxi427ri+O9haZkioNzM7IZQc8MSn6hlNIV1DpWnEOnR2LpmuD1jFMQlY+ dO2lNsMajSMYfUiYwJT0e0XFOEJ6WofAhlGu0gMzN622bnWhnQEkIx2JjPlUZV2pTI 3QiAO5hWJLf3NQAZft34Ekz3Y8LDUKKlRHneWQL1nHQnRnK71qY5pon9WTZCopCHsA bu1e8WUnDeklQ== X-Host-Lookup-Failed: Reverse DNS lookup failed for 2a02:1800:120:4::f00:15 (failed) Received-SPF: pass client-ip=2a02:1800:120:4::f00:15; envelope-from=maximedevos@telenet.be; helo=andre.telenet-ops.be X-Spam_score_int: 0 X-Spam_score: -0.1 X-Spam_bar: / X-Spam_report: (-0.1 / 5.0 requ) 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, RDNS_NONE=0.793, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: guile-user@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: General Guile related discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guile-user-bounces+guile-user=m.gmane-mx.org@gnu.org Original-Sender: "guile-user" Xref: news.gmane.io gmane.lisp.guile.user:17949 Archived-At: --=-1ltFfQo4+nGzJrRw+8AS Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Stuart Hungerford schreef op ma 03-01-2022 om 10:46 [+1100]: > Just out of interest, are there other multimethod/ad-hoc polymorphism > approaches for Guile? I only know of GOOPS and Theme-D -- Guix also has a =E2=80=98define-gexp-compiler=E2=80=99 but it's very ad-hoc. It allows defining something like (define (lower stuff system target) (cond ((derivation? stuff) stuff) ; done ((foo? stuff) (lower (lower-foo stuff system target))) ((bar? stuff) (lower (lower-bar stuff system target))) [...])) (where 'lower-stuff' converts 'stuff' into something 'lowerable'), but in an extensible way. Greetings, Maxime. --=-1ltFfQo4+nGzJrRw+8AS Content-Type: application/pgp-signature; name="signature.asc" Content-Description: This is a digitally signed message part Content-Transfer-Encoding: 7bit -----BEGIN PGP SIGNATURE----- iI0EABYKADUWIQTB8z7iDFKP233XAR9J4+4iGRcl7gUCYdLMghccbWF4aW1lZGV2 b3NAdGVsZW5ldC5iZQAKCRBJ4+4iGRcl7pIMAQDktfrI3BNFDVvre7m61i+E2LFD Dhq+3a5iYTEqqa6ChgD+MuwixdO52KQsT5ufgk5fgp4vcbDhU2Jo3ir+/rIEUwg= =VAKF -----END PGP SIGNATURE----- --=-1ltFfQo4+nGzJrRw+8AS--