unofficial mirror of guile-user@gnu.org 
 help / color / mirror / Atom feed
From: Chris Vine <vine35792468@gmail.com>
To: guile-user@gnu.org
Subject: Re: "Missing" libraries/concepts found in other languages/ecosystems?
Date: Wed, 8 Jul 2020 12:29:38 +0100	[thread overview]
Message-ID: <20200708122938.24fb0a921a9af79b412c2366@gmail.com> (raw)
In-Reply-To: <878sfua22z.fsf@gmail.com>

On Wed, 08 Jul 2020 09:38:28 +0200
Simen Endsjø <simendsjo@gmail.com> wrote:
> Hi, I'm new to scheme/lisp, so I'm trying to find out how to do 
> things the "lisp
> way". On the other hand, I like things from other ecosystems too, 
> and I'm having
> problems finding this for Guile. It might be because there's no 
> need for it/I'm
> terrible at searching/nobody had the time yet, or something else.
> 
> I've been trying to find implementations for https://reactivex.io 
> without any
> luck. And I'm unable to find implementation of FP concepts as 
> found in Haskell
> and other languages. Functor, Monad, lenses (and other helpers for 
> working with
> immutable data).
> 
> Does things like this exists, or is it better to use something 
> else?

I should go with where the particular language leads you.  Scheme has:

1.  Dynamic typing rather than static typing, so that amongst other
    things functions can take and return multiple different types;

2.  Mutable variable bindings (set! and so on);

3.  Mutable objects (mutable fields in records, setcar! and setcdr! for
    lists, and so on);

4.  Exceptions and continuation objects.

5.  Macros which operate at compile time on s-expressions.

Functors (mappables) abound in scheme, notably in the form of lists,
and scheme has mandatory tail call elimination which encourages
some immutable techniques such as iterative recursion.  However I don't
think that in practice monadic uses, such as the state monad or option
or result monad, are really of much value in scheme, apart from for
pedagogical purposes (flatmap though can be very useful).  I have
written scheme code which for various reasons used a result type
indicating success and failure instead of exceptions, with associated
bind (and map), but I think that for that case using exceptions is
generally easier and more natural, and how guile itself operates.

If you want to see where scheme can take you, you might want to google
for the "Structure and Interpretation of Computer Programs" (SICP):
still a classic.



  parent reply	other threads:[~2020-07-08 11:29 UTC|newest]

Thread overview: 36+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-07-08  7:38 "Missing" libraries/concepts found in other languages/ecosystems? Simen Endsjø
2020-07-08  8:15 ` Vladimir Zhbanov
2020-07-08 10:08 ` Catonano
2020-07-08 11:29 ` Chris Vine [this message]
2020-07-10 12:15 ` Christopher Lam
2020-07-10 15:52   ` Chris Vine
     [not found] <mailman.75.1594224014.21222.guile-user@gnu.org>
2020-07-08 18:22 ` Zelphir Kaltstahl
2020-07-09 18:12   ` Leo Butler
2020-07-09 19:34     ` Zelphir Kaltstahl
2020-07-10  7:39   ` Aleix Conchillo Flaqué
2020-07-10  8:14     ` Alex Sassmannshausen
2020-07-10  8:49   ` Catonano
2020-07-10 10:21     ` Chris Vine
2020-07-10 11:20       ` Catonano
2020-07-11  0:19         ` Zelphir Kaltstahl
2020-07-11  0:34           ` Zelphir Kaltstahl
2020-07-11 10:14             ` Chris Vine
2020-07-11 13:45               ` Stefan Israelsson Tampe
2020-07-11 14:46             ` Linus Björnstam
2020-07-11 10:13           ` Chris Vine
2020-07-11 18:20             ` John Cowan
2020-07-11 22:39               ` Chris Vine
2020-07-11 22:41                 ` John Cowan
2020-07-11 23:09                   ` Chris Vine
2020-07-12  1:52                     ` John Cowan
2020-07-12 20:26                       ` Chris Vine
2020-07-13 10:10                 ` Chris Vine
2020-07-12 16:08             ` Catonano
2020-07-12 16:10               ` Catonano
2020-07-12 17:46               ` John Cowan
2020-07-12 19:14               ` Chris Vine
2020-07-12 19:32                 ` Chris Vine
2020-07-14 10:32                   ` Catonano
2020-07-14 11:06                     ` Catonano
2020-07-14 16:21                     ` Chris Vine
2020-07-12 20:33               ` Zelphir Kaltstahl

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

  List information: https://www.gnu.org/software/guile/

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

  git send-email \
    --in-reply-to=20200708122938.24fb0a921a9af79b412c2366@gmail.com \
    --to=vine35792468@gmail.com \
    --cc=guile-user@gnu.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.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).