From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Chris Vine Newsgroups: gmane.lisp.guile.user Subject: Re: "Missing" libraries/concepts found in other languages/ecosystems? Date: Wed, 8 Jul 2020 12:29:38 +0100 Message-ID: <20200708122938.24fb0a921a9af79b412c2366@gmail.com> References: <878sfua22z.fsf@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="8198"; mail-complaints-to="usenet@ciao.gmane.io" To: guile-user@gnu.org Original-X-From: guile-user-bounces+guile-user=m.gmane-mx.org@gnu.org Wed Jul 08 13:30:19 2020 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 1jt8HL-00022b-6M for guile-user@m.gmane-mx.org; Wed, 08 Jul 2020 13:30:19 +0200 Original-Received: from localhost ([::1]:40880 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jt8HK-0005A8-8c for guile-user@m.gmane-mx.org; Wed, 08 Jul 2020 07:30:18 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:52364) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jt8H0-0005A2-Qg for guile-user@gnu.org; Wed, 08 Jul 2020 07:29:58 -0400 Original-Received: from mail-wm1-x335.google.com ([2a00:1450:4864:20::335]:55057) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jt8Gz-0004Mj-1C for guile-user@gnu.org; Wed, 08 Jul 2020 07:29:58 -0400 Original-Received: by mail-wm1-x335.google.com with SMTP id o8so2555238wmh.4 for ; Wed, 08 Jul 2020 04:29:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:subject:message-id:in-reply-to:references:mime-version :content-transfer-encoding; bh=FDWAA6EF/AifS/hYQr+1Pbnvr6gjVrWocy5G+hmImgE=; b=LSqeXgmAp8DGE9/XhGmYfDPsxYwk0g2W8r+5acqZhEMsnWWOx+vGFddQ1Yw/ymgJso C9ceKYRqfeIz7NvaP/LKxbhtxiOVEtN3BicmFELaAps4eFdalAZNUKgOjiPh/R4HFhH7 SgVdM9XxLNgpl1Ri3q0QyfL5D50lzT21PmAr0WWleXjmsWHo2ajGNgwtXnGhBeblIa4+ ns9U5+lfk4owKfZy0ROzOc6ZjDWJzh28e92NerXbTWmr088O2tSAAGeiiLDtzZxA21Co 44Nv7C5QzvYBHfexHK3hRYASC3OMLNWeWEzQBaeJzhGZgObtWn7i2hYHMQ+tOtntdfn7 tOKg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:subject:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=FDWAA6EF/AifS/hYQr+1Pbnvr6gjVrWocy5G+hmImgE=; b=sACVXn34RXUh/cm6+n4AvAy04mQYTPaHtcOC+lgrsQoTzlEXPyV/NM48zydq8c2qD/ +32CC8fV9OG2I+EPdIJrnQ3SHRGi2JeyDKY1R+oJ4aueyQsBelEtZzx/Rp5PeYZe4Ecx GU0q7HykUbMdJUhq8pL++oBRWQQ4gR7vtF+J5EN7hpPiMF+ihT0UDW4RbhI4fynDapwv 4zZmil6sgNnom9AveXRvQApT8+mN62btHs4jReiwhq9kJ5esIs0Wc/TfpT83ro7U2ivK qOrf8iqFdCjz1JZDoFGa8zzmpijZmBunFXXCikAdRMi4EmsxTSJKQ4r1PbncU6V20FXX ZElQ== X-Gm-Message-State: AOAM531BjmPMi1p6wFFPlkc1xc391fbea2U1hLhpNFPP14BA0vRzDqDC nGaF+6rF7EZ3yLRZJ0uQ74rRKy0q X-Google-Smtp-Source: ABdhPJyFK/f2MgOK1S6NYDVsX32/yy0+wBZ2Tl97PY7vVL2+kuxaH/2ROFa0OHeK6Ofhhh5c3MXkaA== X-Received: by 2002:a1c:7f82:: with SMTP id a124mr8286458wmd.132.1594207794575; Wed, 08 Jul 2020 04:29:54 -0700 (PDT) Original-Received: from dell.homenet ([84.93.37.204]) by smtp.gmail.com with ESMTPSA id p17sm5160352wma.47.2020.07.08.04.29.53 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 08 Jul 2020 04:29:53 -0700 (PDT) Original-Received: from dell.homenet (localhost [127.0.0.1]) by dell.homenet (Postfix) with SMTP id 04CEB421382 for ; Wed, 8 Jul 2020 12:29:39 +0100 (BST) In-Reply-To: <878sfua22z.fsf@gmail.com> X-Mailer: Sylpheed 3.7.0 (GTK+ 2.24.32; x86_64-unknown-linux-gnu) Received-SPF: pass client-ip=2a00:1450:4864:20::335; envelope-from=vine35792468@gmail.com; helo=mail-wm1-x335.google.com X-detected-operating-system: by eggs.gnu.org: No matching host in p0f cache. That's all we know. X-Spam_score_int: -17 X-Spam_score: -1.8 X-Spam_bar: - X-Spam_report: (-1.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_ENVFROM_END_DIGIT=0.25, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: guile-user@gnu.org X-Mailman-Version: 2.1.23 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:16641 Archived-At: On Wed, 08 Jul 2020 09:38:28 +0200 Simen Endsj=F8 wrote: > Hi, I'm new to scheme/lisp, so I'm trying to find out how to do=20 > things the "lisp > way". On the other hand, I like things from other ecosystems too,=20 > and I'm having > problems finding this for Guile. It might be because there's no=20 > need for it/I'm > terrible at searching/nobody had the time yet, or something else. >=20 > I've been trying to find implementations for https://reactivex.io=20 > without any > luck. And I'm unable to find implementation of FP concepts as=20 > found in Haskell > and other languages. Functor, Monad, lenses (and other helpers for=20 > working with > immutable data). >=20 > Does things like this exists, or is it better to use something=20 > 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.