all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Wojtek Kosior via "Development of GNU Guix and the GNU System distribution." <guix-devel@gnu.org>
To: "(" <paren@disroot.org>
Cc: <guix-devel@gnu.org>
Subject: Re: Struggling to write Dissecting Guix, Part 2
Date: Wed, 25 Jan 2023 16:54:45 +0100	[thread overview]
Message-ID: <20230125165445.24771f77.koszko@koszko.org> (raw)
In-Reply-To: <CQ13296O7II3.PG3SUFZDBPRI@guix-framework>

[-- Attachment #1: Type: text/plain, Size: 1919 bytes --]

Hi, Paren!

>   - Guile has no type system, so you can't express monads in terms of types

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

♥ R29kIGlzIHRoZXJlIGFuZCBsb3ZlcyBtZQ== | ÷ c2luIHNlcGFyYXRlZCBtZSBmcm9tIEhpbQ==
✝ YnV0IEplc3VzIGRpZWQgdG8gc2F2ZSBtZQ== | ? U2hhbGwgSSBiZWNvbWUgSGlzIGZyaWVuZD8=
-- (sig_end)


On Wed, 25 Jan 2023 07:12:45 +0000
"(" <paren@disroot.org> wrote:

> Hello Guix,
> 
> I've been struggling to write Part 2 of Dissecting Guix; I'm just not sure where to start to
> explain monads.
> 
> It's hard for a variety of reasons, those being that:
> 
>   - Guile has no type system, so you can't express monads in terms of types
>   - Guix doesn't implement very many monads (only state, identity, and store), so it's
>     difficult to explain with a simpler monad, as there are no simpler monads
>   - Guix doesn't have functors or monoids either, so it's hard to "progressively" explain
>     first functors, then monoids, then monads
>   - Monads are just difficult in general :P
> 
> Any suggestions? :/
> 
>     -- (



[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 228 bytes --]

  parent reply	other threads:[~2023-01-25 15:55 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-01-25  7:12 Struggling to write Dissecting Guix, Part 2 (
2023-01-25  9:58 ` zimoun
2023-01-26  6:32   ` (
2023-01-25 15:54 ` Wojtek Kosior via Development of GNU Guix and the GNU System distribution. [this message]
2023-01-26  6:33   ` (
2023-01-26 11:17   ` Simon Tournier
2023-01-26 20:03     ` bokr
2023-01-27 11:50       ` Simon Tournier
2023-01-25 19:39 ` david larsson
2023-01-26  6:34   ` (
2023-01-28 18:28     ` david larsson
2023-01-26 20:45 ` Felix Lechner via Development of GNU Guix and the GNU System distribution.

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20230125165445.24771f77.koszko@koszko.org \
    --to=guix-devel@gnu.org \
    --cc=koszko@koszko.org \
    --cc=paren@disroot.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/guix.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.