From mboxrd@z Thu Jan  1 00:00:00 1970
Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail
From: Christine Lemmer-Webber <cwebber@dustycloud.org>
Newsgroups: gmane.lisp.guile.user
Subject: Re: Guile outside of Emacs + Geiser
Date: Mon, 16 Oct 2023 15:41:51 -0400
Message-ID: <878r82pd52.fsf@dustycloud.org>
References: <87jzsbv387.fsf@dustycloud.org> <87ttquskw4.fsf@gmail.com>
Mime-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable
Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214";
	logging-data="16846"; mail-complaints-to="usenet@ciao.gmane.io"
User-Agent: mu4e 1.10.5; emacs 28.2
Cc: guile-user@gnu.org
To: Simon Tournier <zimon.toutoune@gmail.com>
Original-X-From: guile-user-bounces+guile-user=m.gmane-mx.org@gnu.org Mon Oct 16 21:43:38 2023
Return-path: <guile-user-bounces+guile-user=m.gmane-mx.org@gnu.org>
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 <guile-user-bounces+guile-user=m.gmane-mx.org@gnu.org>)
	id 1qsTV2-0004EK-KD
	for guile-user@m.gmane-mx.org; Mon, 16 Oct 2023 21:43:38 +0200
Original-Received: from localhost ([::1] helo=lists1p.gnu.org)
	by lists.gnu.org with esmtp (Exim 4.90_1)
	(envelope-from <guile-user-bounces@gnu.org>)
	id 1qsTUR-0002g3-Pe; Mon, 16 Oct 2023 15:42:59 -0400
Original-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 <cwebber@dustycloud.org>)
 id 1qsTUN-0002fY-0i
 for guile-user@gnu.org; Mon, 16 Oct 2023 15:42:56 -0400
Original-Received: from out5-smtp.messagingengine.com ([66.111.4.29])
 by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <cwebber@dustycloud.org>)
 id 1qsTUK-0001PE-FH
 for guile-user@gnu.org; Mon, 16 Oct 2023 15:42:54 -0400
Original-Received: from compute2.internal (compute2.nyi.internal [10.202.2.46])
 by mailout.nyi.internal (Postfix) with ESMTP id 875595C044B;
 Mon, 16 Oct 2023 15:42:51 -0400 (EDT)
Original-Received: from mailfrontend1 ([10.202.2.162])
 by compute2.internal (MEProxy); Mon, 16 Oct 2023 15:42:51 -0400
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=dustycloud.org;
 h=cc:cc:content-transfer-encoding:content-type:content-type
 :date:date:from:from:in-reply-to:in-reply-to:message-id
 :mime-version:references:reply-to:sender:subject:subject:to:to;
 s=fm3; t=1697485371; x=1697571771; bh=e2iEO57o7tf6JGF9znTi1QhrI
 c6MlPzNxSRmuUpj44k=; b=R5z+5q0RGApjeDbiRXHtwl9laVRgeGNdfLXp2Oob6
 V4PZOMPqFUoWKZoSOy1Q+yQCCnOKVIXG3Y9Kh5ZNbhfDMTj/cJe02JT2Kx20pQmZ
 6SKEZT1bhLaKArLr53UtFplyj16FMUr+xrPgdxR4kvxzI97B+MNUV0MCGlNP0q9h
 UehB9PxxL8GALnLoEf4DxrDbFvlqoKI9zm6Ii4qabYRfSg4fa5+hdR7FAmcqb0nC
 Kk0IFZ1y1ztl//pIA1Z7zOCoQEHHyCskp60CvNOdBl7E5nfE2EsJu6cNC1VpSUiB
 KfSwJZzk2z8z/gX++MzcYuRiiXJXJKihAB8DR1c4DsUXg==
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=
 messagingengine.com; h=cc:cc:content-transfer-encoding
 :content-type:content-type:date:date:feedback-id:feedback-id
 :from:from:in-reply-to:in-reply-to:message-id:mime-version
 :references:reply-to:sender:subject:subject:to:to:x-me-proxy
 :x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm3; t=
 1697485371; x=1697571771; bh=e2iEO57o7tf6JGF9znTi1QhrIc6MlPzNxSR
 muUpj44k=; b=KIb6w1fUILf3Q3RyzAo6V4humzC+tUe72RbtxqHM+hnbxKONYCa
 Uenijc0UEhwya7BOAhHhvRlNQAUxWSRFg4gq4YDC4zkBj6AJRLANhXwFsHzYikeg
 EZCzzf7UuYiDLZN1DI3rTZaSraebB9Okk1zgqZzKe26RwOrj4OxdpFNq412nAa5I
 LrLUTufyPQkfO+jRe/Y99RozOdWNqTOJpV46ZbvgyD7TTg3QvnAei8Yc6Tth89ni
 SFSzwpoEaXgkh4MWJimIFgvJO8oRifAWQ7hBuSi9WUOtS35LGEr+p35Zzavb0aV6
 GbdD3xKF4v2TRbj1L/9vWTMLg39eoUJEetA==
X-ME-Sender: <xms:O5ItZXv_fCf-6Us9NmQytNPvKy7TSBTlPcxg0PtbGQpXFNbUfF2G0Q>
 <xme:O5ItZYdlG5Wk61dI4of1w5qMUt7oS5AiCNLf9PsxJVq7wXamW9Zr-_42Zfe5UHXf1
 Zft83XC5KjULnFFwL8>
X-ME-Received: <xmr:O5ItZazctbtzkVNHZEf0dnWYqpXoRMzP7qmiEkNhdfZr6-qYPFcLkfXJL50DmTUOKwLDfqb3EoTsDduH-H0NQBB0>
X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvkedrjedtgddufeejucetufdoteggodetrfdotf
 fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen
 uceurghilhhouhhtmecufedttdenucenucfjughrpehffgfhvfevufffjgfkgggtgfesth
 hqredttderjeenucfhrhhomhepvehhrhhishhtihhnvgcunfgvmhhmvghrqdghvggssggv
 rhcuoegtfigvsggsvghrseguuhhsthihtghlohhuugdrohhrgheqnecuggftrfgrthhtvg
 hrnhepteeigeffuefghfeukeelfedtlefgjefguddtieejkeeiieetfeejtdeivdeitdet
 necuffhomhgrihhnpehhrghskhgvlhhlrdhorhhgpdhjuhhlihgrlhgrnhhgrdhorhhgne
 cuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomheptgifvggs
 sggvrhesughushhthigtlhhouhgurdhorhhg
X-ME-Proxy: <xmx:O5ItZWPpJCyF1Ayu3XdsfWv4hEgEODk4o2J4BPH5xxr5T7-BmYO8rw>
 <xmx:O5ItZX8V7jLgr8KBfu5ZWiiYLJec3YeYCYupSpXTkGF2VoAdO53GEg>
 <xmx:O5ItZWXdqQp3eaO_vjmpZL8_fn5wEhWrvmKUjMhOnRmtI-ylPbYoDQ>
 <xmx:O5ItZUFjqQeTO0KxAm4lTNIlRE9Njs17Q35aVU5zYXO_-tN5C20aiw>
Feedback-ID: i006446df:Fastmail
Original-Received: by mail.messagingengine.com (Postfix) with ESMTPA; Mon,
 16 Oct 2023 15:42:51 -0400 (EDT)
In-reply-to: <87ttquskw4.fsf@gmail.com>
Received-SPF: pass client-ip=66.111.4.29; envelope-from=cwebber@dustycloud.org;
 helo=out5-smtp.messagingengine.com
X-Spam_score_int: -27
X-Spam_score: -2.8
X-Spam_bar: --
X-Spam_report: (-2.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,
 RCVD_IN_DNSWL_LOW=-0.7, SPF_HELO_PASS=-0.001,
 SPF_PASS=-0.001 autolearn=ham autolearn_force=no
X-Spam_action: no action
X-BeenThere: guile-user@gnu.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: General Guile related discussions <guile-user.gnu.org>
List-Unsubscribe: <https://lists.gnu.org/mailman/options/guile-user>,
 <mailto:guile-user-request@gnu.org?subject=unsubscribe>
List-Archive: <https://lists.gnu.org/archive/html/guile-user>
List-Post: <mailto:guile-user@gnu.org>
List-Help: <mailto:guile-user-request@gnu.org?subject=help>
List-Subscribe: <https://lists.gnu.org/mailman/listinfo/guile-user>,
 <mailto:guile-user-request@gnu.org?subject=subscribe>
Errors-To: guile-user-bounces+guile-user=m.gmane-mx.org@gnu.org
Original-Sender: guile-user-bounces+guile-user=m.gmane-mx.org@gnu.org
Xref: news.gmane.io gmane.lisp.guile.user:19262
Archived-At: <http://permalink.gmane.org/gmane.lisp.guile.user/19262>

Good points in your email, Simon!  I'm used to REPLs being integrated
with editors, but if the rest of the world isn't, maybe giving them an
external REPL which feels good is already a step forward.

I thought I heard someone was working on an improved external REPL for
Guile but now I can't remember where I heard that...

 - Christine


Simon Tournier <zimon.toutoune@gmail.com> writes:

> Hi Christine,
>
> On Wed, 27 Sep 2023 at 15:07, Christine Lemmer-Webber <cwebber@dustycloud=
.org> wrote:
>
>> Has anyone had a "good" experience programming with Guile without using
>> Emacs?  If so, what was your development experience like?
>
> At work, I collaborate with people using different setup and different
> programming languages.  And it can be tedious or time-consuming to
> manage all that, for each; context switching, etc.  Therefore, most of
> the times, we ends with: an editor (whatever which one) and a terminal
> running some =E2=80=9CREPL=E2=80=9C.
>
> For sure, it is better if $editor and $repl are able to communicate back
> and forth.  However, most of the time, the pleasant experience comes
> first from the $repl capacities.
>
> Emacs + Geiser is often a way to have better $repl capacities than what
> Guile offers by default.
>
> For example, IPython, GHCi, R, Julia, etc. provides all a better
> experience by default: completion, quick access to documentation, etc.
>
> For what it is worth =E2=80=93 not much! :-), let trivially compare below=
, in
> order to get a feeling about one basic capacities.
>
> Well, I think the =E2=80=9Cpoor=E2=80=9D experience programming with Guil=
e without using
> Emacs mainly comes from the lack of Guile REPL features by default.
>
> My 2 cents. :-)
>
> Cheers,
> simon
>
> $ guix shell --pure guile -- guile -q
> GNU Guile 3.0.9
> Copyright (C) 1995-2023 Free Software Foundation, Inc.
>
> Guile comes with ABSOLUTELY NO WARRANTY; for details type `,show w'.
> This program is free software, and you are welcome to redistribute it
> under certain conditions; type `,show c' for details.
>
> Enter `,help' for help.
> scheme@(guile-user)> ,help map
> Unknown command or group: map
> scheme@(guile-user)> ,apropos map
> (guile): map	#<procedure map (f l) | (f l1 l2) | (f l1 . rest)>
> (guile): hash-map->list	#<procedure hash-map->list (_ _)>
> (guile): char-set-map	#<procedure char-set-map (_ _)>
> (guile): array-map-in-order!	#<procedure array-map-in-order! (_ _ . _)>
> (guile): array-map!	#<procedure array-map! (_ _ . _)>
> (guile): module-map	#<procedure module-map (proc module)>
> (guile): or-map	#<procedure or-map (f lst)>
> (guile): array-index-map!	#<procedure array-index-map! (_ _)>
> (guile): and-map	#<procedure and-map (f lst)>
> (guile): string-map	#<procedure string-map (_ _ #:optional _ _)>
> (guile): map-in-order	#<procedure map (f l) | (f l1 l2) | (f l1 . rest)>
> (guile): string-map!	#<procedure string-map! (_ _ #:optional _ _)>
> (ice-9 threads): n-for-each-par-map	#<procedure n-for-each-par-map (n s-p=
roc p-proc . arglists)>
> (ice-9 threads): par-map	#<procedure 7f8076c96180 at ice-9/threads.scm:28=
3:2 (proc . lists)>
> (ice-9 threads): n-par-map	#<procedure n-par-map (n proc . arglists)>
> scheme@(guile-user)> ,describe map
> #f
>
> $ guix shell --pure python python-ipython -- ipython=20
> Python 3.10.7 (main, Jan  1 1970, 00:00:01) [GCC 11.3.0]
> Type 'copyright', 'credits' or 'license' for more information
> IPython 8.5.0 -- An enhanced Interactive Python. Type '?' for help.
>
> In [1]: ?map
> Init signature: map(self, /, *args, **kwargs)
> Docstring:=20=20=20=20=20
> map(func, *iterables) --> map object
>
> Make an iterator that computes the function using arguments from
> each of the iterables.  Stops when the shortest iterable is exhausted.
> Type:           type
> Subclasses:=20=20=20=20=20
>
> $ guix shell --pure ghc gcc-toolchain -- ghci
> GHCi, version 9.2.5: https://www.haskell.org/ghc/  :? for help
> ghci> :? map
>  Commands available from the prompt:
>
> [...]
>
>    :doc <name>                 display docs for the given name (experimen=
tal)
>
> [...]
>
>    :showi language             show language flags for interactive evalua=
tion
>
>  The User's Guide has more information. An online copy can be found here:
>
>    https://downloads.haskell.org/~ghc/latest/docs/html/users_guide/ghci.h=
tml
>
> ghci> :doc map
> map :: (a -> b) -> [a] -> [b] 	-- Identifier defined in `GHC.Base'
>  \(\mathcal{O}(n)\). 'map' @f xs@ is the list obtained by applying @f@ to
>  each element of @xs@, i.e.,
>
>  > map f [x1, x2, ..., xn] =3D=3D [f x1, f x2, ..., f xn]
>  > map f [x1, x2, ...] =3D=3D [f x1, f x2, ...]
>
>  >>> map (+1) [1, 2, 3]
>  [2,3,4]
>
> $ guix shell --pure r-minimal coreutils -- R=20
>
> R version 4.3.1 (2023-06-16) -- "Beagle Scouts"
> Copyright (C) 2023 The R Foundation for Statistical Computing
> Platform: x86_64-unknown-linux-gnu (64-bit)
>
> R is free software and comes with ABSOLUTELY NO WARRANTY.
> You are welcome to redistribute it under certain conditions.
> Type 'license()' or 'licence()' for distribution details.
>
> R is a collaborative project with many contributors.
> Type 'contributors()' for more information and
> 'citation()' on how to cite R or R packages in publications.
>
> Type 'demo()' for some demos, 'help()' for on-line help, or
> 'help.start()' for an HTML browser interface to help.
> Type 'q()' to quit R.
>
>> help(map)
> No documentation for 'map' in specified packages and libraries:
> you could try '??map'
>> ??map
> Help files with alias or concept or title matching 'map' using regular
> expression matching:
>
> base::Filter            Common Higher-Order Functions in Functional
>                         Programming Languages
>   Aliases: Map
> base::mapply            Apply a Function to Multiple List or Vector
>                         Arguments
>
> [...]
>
> Type '?PKG::FOO' to inspect entries 'PKG::FOO', or 'TYPE?PKG::FOO' for
> entries like 'PKG::FOO-TYPE'.
>
> $ guix shell --pure julia -- julia
> WARNING: failed to select UTF-8 encoding, using ASCII
>                _
>    _       _ _(_)_     |  Documentation: https://docs.julialang.org
>   (_)     | (_) (_)    |
>    _ _   _| |_  __ _   |  Type "?" for help, "]?" for Pkg help.
>   | | | | | | |/ _` |  |
>   | | |_| | | | (_| |  |  Version 1.8.3 (2022-11-14)
>  _/ |\__'_|_|_|\__'_|  |=20=20
> |__/                   |
>
> julia> ?
> help?> map
> search: map map! mapfoldr mapfoldl mapslices mapreduce asyncmap asyncmap!=
 macroexpand @macroexpand @macroexpand1 @atomicswap promote_shape ismutable=
type
>
>   map(f, c...) -> collection
>
>   Transform collection c by applying f to each element. For multiple coll=
ection arguments, apply f elementwise, and stop when when any of them is ex=
hausted.
>
>   See also map!, foreach, mapreduce, mapslices, zip, Iterators.map.
>
>   Examples
>   =E2=89=A1=E2=89=A1=E2=89=A1=E2=89=A1=E2=89=A1=E2=89=A1=E2=89=A1=E2=89=
=A1=E2=89=A1=E2=89=A1
>
>   julia> map(x -> x * 2, [1, 2, 3])
>   3-element Vector{Int64}:
>    2
>    4
>    6
>=20=20=20
>   julia> map(+, [1, 2, 3], [10, 20, 30, 400, 5000])
>   3-element Vector{Int64}:
>    11
>    22
>    33
>
>   =E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=
=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=
=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=
=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=
=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=
=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=
=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80
>
>   map(f, A::AbstractArray...) -> N-array
>
>   When acting on multi-dimensional arrays of the same ndims, they must al=
l have the same axes, and the answer will too.
>
>   See also broadcast, which allows mismatched sizes.
>
>   Examples
>   =E2=89=A1=E2=89=A1=E2=89=A1=E2=89=A1=E2=89=A1=E2=89=A1=E2=89=A1=E2=89=
=A1=E2=89=A1=E2=89=A1
>
>   julia> map(//, [1 2; 3 4], [4 3; 2 1])
>   2=C3=972 Matrix{Rational{Int64}}:
>    1//4  2//3
>    3//2  4//1
>=20=20=20
>   julia> map(+, [1 2; 3 4], zeros(2,1))
>   ERROR: DimensionMismatch
>=20=20=20
>   julia> map(+, [1 2; 3 4], [1,10,100,1000], zeros(3,1))  # iterates unti=
l 3rd is exhausted
>   3-element Vector{Float64}:
>      2.0
>     13.0
>    102.0