From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp12.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms5.migadu.com with LMTPS id 8HC8FPZQ0WNmkQAAbAwnHQ (envelope-from ) for ; Wed, 25 Jan 2023 16:55:34 +0100 Received: from aspmx1.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp12.migadu.com with LMTPS id WMJ7FPZQ0WOyJwAAauVa8A (envelope-from ) for ; Wed, 25 Jan 2023 16:55:34 +0100 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 29ED33B602 for ; Wed, 25 Jan 2023 16:55:34 +0100 (CET) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pKi7E-0001ZD-5Z; Wed, 25 Jan 2023 10:55:12 -0500 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 1pKi75-0001O4-Kc for guix-devel@gnu.org; Wed, 25 Jan 2023 10:55:04 -0500 Received: from koszko.org ([93.95.227.159]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pKi72-0006Ym-4y for guix-devel@gnu.org; Wed, 25 Jan 2023 10:55:03 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=koszko.org; s=mail; h=Content-Type:MIME-Version:References:In-Reply-To:Message-ID: Subject:Cc:To:From:Date:Sender:Reply-To:Content-Transfer-Encoding:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=G/DyjlNe9qv2jkEqCqGpUxu8SdsSR4A+vxPY2roG4eM=; b=SGfWeaJ0S2OTSJ6hUDCLrUpzxi G6YRpLgX2aK7QRK2mzU5kluRhJdB3quoPDVUntw4hkWclmDsqgS7gQJXiPyU9mnTBNyzFlSmkI4r+ EfeEYWP2uTX9LJb6swPO5vEZ5kHmW289teft6EJxBoAyrjMZN/xmK6qazrVd5M2Dv7mgMWpU1NjpG fwERe4+D3m4PD0aTVyi7P3AfCegCPbWJ6QKtIeYa8eqM3qrm1o3PjGqV5K6btlzv9m+Ix8VooCqOO UzLdDS9QX6vHrje+PY9yGSLLHyGTwPEDn6UEVt2fB4Soi97loghppD5L05HGbrOzAhI02svyWwaqf ncC4cXnrS/F48h9Ucf4Ambrp8CCcSf8MIN79zvW9XyGK25u7dzsDjO6bQkFtVEioQb93LGAeaYcL+ kNx1PrkyTBp2td3YElXsgtNSzz217z+UPQznuSsQuITn+zk0G5QDtmZqreH/vbP+V3UnhmfhAf8L1 2khqGip3sz4N2GcIz3NAYtUmh5A5DPRBnWE0ryhbQvnZ29SaqTw/KGGwrx1S3DSBeFeB0D8NB4i6C UKkiHxEgXWBsJFo8VB1/GmWVi1e7OoazauunWY2bJRSae2hHew1LmBQAvcXO0RripF66an9Tb3aGL TA28GkgFT3oa1tixgdfRDJH+BstENyQHln9B6R+mI=; Received: from 77-252-46-225.static.ip.netia.com.pl ([77.252.46.225] helo=koszkonutek-tmp.pl.eu.org) by koszko.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1pKi6q-0001hi-3d; Wed, 25 Jan 2023 16:54:48 +0100 Date: Wed, 25 Jan 2023 16:54:45 +0100 To: "(" Cc: Subject: Re: Struggling to write Dissecting Guix, Part 2 Message-ID: <20230125165445.24771f77.koszko@koszko.org> In-Reply-To: References: X-Mailer: Claws Mail 3.17.8 (GTK+ 2.24.33; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: multipart/signed; boundary="Sig_/EvkT+txPaCDVCbiyNAcTDPz"; protocol="application/pgp-signature"; micalg=pgp-sha256 Received-SPF: pass client-ip=93.95.227.159; envelope-from=koszko@koszko.org; helo=koszko.org X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 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, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: guix-devel@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-to: Wojtek Kosior From: Wojtek Kosior via "Development of GNU Guix and the GNU System distribution." Errors-To: guix-devel-bounces+larch=yhetil.org@gnu.org Sender: guix-devel-bounces+larch=yhetil.org@gnu.org X-Migadu-Flow: FLOW_IN X-Migadu-Country: US ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1674662134; h=from:from:sender:sender:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=G/DyjlNe9qv2jkEqCqGpUxu8SdsSR4A+vxPY2roG4eM=; b=l1P7dtAtI9ELeehLdopd4Udi4VrLtPhZrmiU6PfgPcnqMwYGKp1rextLm9v+LSsDIwYGw2 QqkhaR+uVB2PMbs52GtaXqF9a2KytHq7kOzrAEIB01dE1nCm3uFyF446R64nmg/GX1p7t/ ifS10jKoGY5HaRvX1/tZvckh+MCO149yTZ5gAGBa08DGGLOdF6dlWD64oaxxl5OJ6ST8T+ XLmvCK4yLgZFkcaF3GT8VADFRhZlHkXIpZKF+B1+uHddbRG2g/lflorX+6ea225LAMJDHa xqp60B/OYywtM6c2vlNJVxbI9dZtkm5bYOKWyj4W2k+8pWpuYdt/3THynSq8MA== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=koszko.org header.s=mail header.b=SGfWeaJ0; spf=pass (aspmx1.migadu.com: domain of "guix-devel-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-devel-bounces+larch=yhetil.org@gnu.org"; dmarc=pass (policy=none) header.from=gnu.org ARC-Seal: i=1; s=key1; d=yhetil.org; t=1674662134; a=rsa-sha256; cv=none; b=WRYCbDKBPbO+dIkt2xo/mn4ygFYompkGZhxw8rMBIBp/i5robn0Ng4d2/pWg1n/o3FjxCY tS6rD/w0ZrMVfsNH9HgQwm5X+YyVps9bisVJOJ4/ZXpiann4N4+OWJiEtPa7fQfysyoA7j 7fcHby8hiKuRz0O0B79XwLrIw8C2B9vcnE4neYp3zFa+K4O41QEBsJ0VKbcZscOeFZenP2 6DPMrWS4zb9VHQOSwOJODedwnoVvDELDy7XX4XXcS6nFQKIJH2bA9Rv3ePtBFxgMwRxnkm 0zOUAfBQ5I4zpSECycbICMzKGwiFoYUrmIGhqTAACJNhLgU783V5XxPqdHixAQ== X-Migadu-Scanner: scn1.migadu.com Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=koszko.org header.s=mail header.b=SGfWeaJ0; spf=pass (aspmx1.migadu.com: domain of "guix-devel-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-devel-bounces+larch=yhetil.org@gnu.org"; dmarc=pass (policy=none) header.from=gnu.org X-Migadu-Spam-Score: -5.48 X-Spam-Score: -5.48 X-Migadu-Queue-Id: 29ED33B602 X-TUID: vhk87c9pGG1P --Sig_/EvkT+txPaCDVCbiyNAcTDPz Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Hi, Paren! > - Guile has no type system, so you can't express monads in terms of typ= es While Guile is dynamically typed, functions we define in it generally do expect their arguments to be of certain types. And they also generally guarantee their return values to be of certain types. So even though there's no static type checking, it is still possible (and often practical) to treat the functions as being typed. Btw, I really like the explanation of a monad as function taking World as one of its arguments and producing a modified World. Although you probably already have your own favorite sources on the topic, here[1] is the paper (written by someone at Microsoft, lol) where I found this approach. Happy dissecting, Wojtek [1] https://www.cs.tufts.edu/comp/150PLD/Papers/awkward.pdf -- (sig_start) website: https://koszko.org/koszko.html PGP: https://koszko.org/key.gpg fingerprint: E972 7060 E3C5 637C 8A4F 4B42 4BC5 221C 5A79 FD1A =E2=99=A5 R29kIGlzIHRoZXJlIGFuZCBsb3ZlcyBtZQ=3D=3D | =C3=B7 c2luIHNlcGFyYXR= lZCBtZSBmcm9tIEhpbQ=3D=3D =E2=9C=9D YnV0IEplc3VzIGRpZWQgdG8gc2F2ZSBtZQ=3D=3D | ? U2hhbGwgSSBiZWNvbWUg= SGlzIGZyaWVuZD8=3D -- (sig_end) On Wed, 25 Jan 2023 07:12:45 +0000 "(" wrote: > Hello Guix, >=20 > I've been struggling to write Part 2 of Dissecting Guix; I'm just not sur= e where to start to > explain monads. >=20 > It's hard for a variety of reasons, those being that: >=20 > - Guile has no type system, so you can't express monads in terms of typ= es > - Guix doesn't implement very many monads (only state, identity, and st= ore), so it's > difficult to explain with a simpler monad, as there are no simpler mo= nads > - Guix doesn't have functors or monoids either, so it's hard to "progre= ssively" explain > first functors, then monoids, then monads > - Monads are just difficult in general :P >=20 > Any suggestions? :/ >=20 > -- ( --Sig_/EvkT+txPaCDVCbiyNAcTDPz Content-Type: application/pgp-signature Content-Description: OpenPGP digital signature -----BEGIN PGP SIGNATURE----- iHUEARYIAB0WIQTpcnBg48VjfIpPS0JLxSIcWnn9GgUCY9FQxQAKCRBLxSIcWnn9 Gto1AP9tMBCA93Sh8KP/7V2gyWUdrDaYI2TAiuLYMpWEFxqopgEAm3lhe7yjyEM3 E+wRpS/5GzQXRuzxv50LpkDIaQnyzAc= =epAe -----END PGP SIGNATURE----- --Sig_/EvkT+txPaCDVCbiyNAcTDPz--