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: Fri, 10 Jul 2020 11:21:09 +0100 Message-ID: <20200710112109.b2ffa630699452541835924b@gmail.com> References: Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="30416"; 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 Fri Jul 10 12:21:41 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 1jtqA1-0007nS-Es for guile-user@m.gmane-mx.org; Fri, 10 Jul 2020 12:21:41 +0200 Original-Received: from localhost ([::1]:42166 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jtqA0-0002BX-4H for guile-user@m.gmane-mx.org; Fri, 10 Jul 2020 06:21:40 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:57874) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jtq9p-0002BN-R7 for guile-user@gnu.org; Fri, 10 Jul 2020 06:21:29 -0400 Original-Received: from mail-wr1-x431.google.com ([2a00:1450:4864:20::431]:36162) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jtq9n-0002X6-Uc for guile-user@gnu.org; Fri, 10 Jul 2020 06:21:29 -0400 Original-Received: by mail-wr1-x431.google.com with SMTP id k6so5393939wrn.3 for ; Fri, 10 Jul 2020 03:21:27 -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=A6Jpp6NJRw7oLVV/HkYNckIMOGHxalsKdIyyAkQ39Bk=; b=USame3EO0kN5oYEMoAlhtPMIgXNutmY5tWtsntPAghqXwpn74/XFuDXKTGD2cPNvn2 AEw9HbruJpQ/NSYUVBQCaxKfA8Tm55YtJp8h54hn0qHYzrcuwZ3X2JzfHSISqpzr4cZN 1RWI47oA66LCJYnyYye+YVuGLYjV7ZnCiFKUTlbgySKugF+YaTGhDHgkzjosgh8K8yTB VxqFEt9TsR3uKPH9gdoTCSnovs9G0x9TxB9gUclyZptzlNbQ6iW1/un2X35Vtz7xMnPP xn24+pDJXgtny02Sc6ibaXzMPzxet1H98yIHUBYTeTqQtxOH0sKDb6eVX+JaQE7oiQU3 4GvQ== 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=A6Jpp6NJRw7oLVV/HkYNckIMOGHxalsKdIyyAkQ39Bk=; b=ugo6yYlyXwOXmGDc8YYatwe3BfEsj7EFIwO/pXEWv0VUydQPdRBXgmVEBfUbfN4ISN b8vzEbTdUfyZ8IOTqpe9Gys/fEeKlnu5FvyNl2pC9F6tz5L421hBR3x+zGXo4ZLIKti5 yuJw82g9mjiMcag/zJoJyWX1xhLry3WSeXNx3K3rkF8p4Kbsc+w+v0PTJyctoQC73cH6 YVn0OomBB3W7a0ixYLG3q44LKMJlbdwt5ktBefgeSwr1zKaFdf71ED7LHmclM0Jp/Zif oAa1Vn8G4mT8+7clTTvFgSMrnwTJSUs60jmyIwTuKgg6w2aFljrssnAMC5nS/kwwptCF +dVw== X-Gm-Message-State: AOAM531SVUQFZBRvy7WFqrzEVrfHcWQBdy4T+6AUaq+Kbld4dqjT1nI+ Bup0jxyhY7h73WJK06wO4cSAwP4N X-Google-Smtp-Source: ABdhPJy3sRBQLsaGSrDFVE3XbkxWt56fjLwuE+KVRgaDHJjgsZe8bZ9lVCi/CYSExdlDcjEzv23fXA== X-Received: by 2002:adf:ff90:: with SMTP id j16mr48350887wrr.364.1594376485342; Fri, 10 Jul 2020 03:21:25 -0700 (PDT) Original-Received: from dell.homenet ([84.93.37.204]) by smtp.gmail.com with ESMTPSA id h14sm9842846wrt.36.2020.07.10.03.21.24 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 10 Jul 2020 03:21:24 -0700 (PDT) Original-Received: from dell.homenet (localhost [127.0.0.1]) by dell.homenet (Postfix) with SMTP id 6A9824241D6 for ; Fri, 10 Jul 2020 11:21:09 +0100 (BST) In-Reply-To: X-Mailer: Sylpheed 3.7.0 (GTK+ 2.24.32; x86_64-unknown-linux-gnu) Received-SPF: pass client-ip=2a00:1450:4864:20::431; envelope-from=vine35792468@gmail.com; helo=mail-wr1-x431.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:16652 Archived-At: On Fri, 10 Jul 2020 10:49:37 +0200 Catonano wrote: > Il giorno mer 8 lug 2020 alle ore 20:22 Zelphir Kaltstahl < > zelphirkaltstahl@gmail.com> ha scritto: > > > Hi Simen! > > > > On 7/8/20 6:00 PM, guile-user-request@gnu.org 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? > > > > > > Regards Simen > > > > To what others already have written I will add: > > > > From time to time one can copy ideas from Racket or look at what exists > > in Racket for solving a problem or seeing what the approach is. > > > > Catonano identified already the lack of examples in the Guile guide. I > > fight with that myself, so I created a repository with examples. Perhaps > > I should somehow add them to the guide. I've not looked into how to do > > that. Probably some commit in a repo somewhere for the guide: > > > > https://notabug.org/ZelphirKaltstahl/guile-examples > > > > Hope this can help! > > > > Thank you, yes that helps > > In fact, it's a precious resource ! > > I was especially delighted with the examples of using exceptions ! > > I had so missed examples of those ! > > As for the manual, very recently a mention of Guile Hall ended up being > included in the manual > > The same could be done with your examples collection > > I also think that your collection could be mentioned by the Guile web site, > maybe in the "learn" section > > Here's the repo for the web site: > https://git.savannah.gnu.org/cgit/guile/guile-web.git/ > > a regular patch could do > > What do people think of mentioning this resource on the Guile web site ? Whilst I don't have strong feelings, as a general approach I think it is better to include additional examples (where needed) in the body of the manual, which I think is generally well written. Also, at this level of detail what some find helpful others don't. You were delighted above with the exceptions example, whereas (if I read the right one) I thought that that was one of the weaker ones. It concentrates on R6RS/R7RS exceptions and with-exception-handler rather than with guile's much easier to use catch expression (for guile-2.2) or (for guile-3.0) its beefed-up with-exception-handler and exception objects. with-exception-handler is a tricky beast and the example didn't deal with the main case: most uses of exceptions involve handling them and moving on with program execution from the point where the exception is caught, and to do that using with-exception-handler instead of guile's 'catch' form you have to have a call/ec helper (or with guile-3.0 you can just set the #unwind argument to true). Instead you are left with the idea that you use continuable exceptions for that (which while they do stop the program exiting are something different) or the R6RS/R7RS guard form. I am not trying to be critical here - I think examples are useful to convey points and some of them were fine. My point is more about venue.