From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Simon Tournier <zimon.toutoune@gmail.com> Newsgroups: gmane.lisp.guile.user Subject: Re: Guile outside of Emacs + Geiser Date: Fri, 13 Oct 2023 15:38:03 +0200 Message-ID: <87ttquskw4.fsf@gmail.com> References: <87jzsbv387.fsf@dustycloud.org> 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="13650"; mail-complaints-to="usenet@ciao.gmane.io" To: Christine Lemmer-Webber <cwebber@dustycloud.org>, guile-user@gnu.org Original-X-From: guile-user-bounces+guile-user=m.gmane-mx.org@gnu.org Fri Oct 13 20:30:51 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 1qrMvy-0003Lf-FY for guile-user@m.gmane-mx.org; Fri, 13 Oct 2023 20:30:50 +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 1qrMvG-0001e7-RB; Fri, 13 Oct 2023 14:30:06 -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 <zimon.toutoune@gmail.com>) id 1qrMvE-0001dg-K4 for guile-user@gnu.org; Fri, 13 Oct 2023 14:30:05 -0400 Original-Received: from mail-wr1-x430.google.com ([2a00:1450:4864:20::430]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from <zimon.toutoune@gmail.com>) id 1qrMvC-0002cB-3A for guile-user@gnu.org; Fri, 13 Oct 2023 14:30:04 -0400 Original-Received: by mail-wr1-x430.google.com with SMTP id ffacd0b85a97d-32d89600755so285333f8f.0 for <guile-user@gnu.org>; Fri, 13 Oct 2023 11:30:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1697221800; x=1697826600; darn=gnu.org; h=content-transfer-encoding:mime-version:message-id:date:references :in-reply-to:subject:to:from:from:to:cc:subject:date:message-id :reply-to; bh=U+qh2f5t8oKRurK9yp6/5z36cbkiSl5ZTeH4H9LpVAQ=; b=Yo60icHmbJH2vpfQOIdhyuRWFCbETsAxQbhAUcSQnb7vfD9aBBhZWFu24rKbrVcI5A J9JEB2UAqddOve0X5DBSQU4dL6ClaeMAqUa9AHw/HyxmKHftjLWeo4MHRIiOcqYhLLTS BFRZksxVfjEpyxmcWrEM29OxC7EzJ1RmpF1uNbZ6EzP5YkyFyWuysRC2GipK8IBut/Mh lNVWt8VQhzISIsbkpsKQ9VnwQoOUhSmEZVhUpMiQxCzlpZGHjCisbcvyGbbd786yugF+ jh0h1K5ZJQabIkRw9aukj115mDq8zLQ6Wc4LR7/2babDlPhwKsuh6l4Zs3TMKwyYfX0r 6sKw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1697221800; x=1697826600; h=content-transfer-encoding:mime-version:message-id:date:references :in-reply-to:subject:to:from:x-gm-message-state:from:to:cc:subject :date:message-id:reply-to; bh=U+qh2f5t8oKRurK9yp6/5z36cbkiSl5ZTeH4H9LpVAQ=; b=CNkD9kQVvjQi+ogOObJiZ/vTw7886+B5ceR3p22gQBYV0FbLzsCQUFjrfcIRbCNWu3 sWsRu1YWE7GXrv5Hb5C0o/YIn5+EflPQXnvlBM5RcumyyFhyCRtP/MdOvfwn1I0MBivB 0AFpjfNaJrF0juGNK46Dh0cABKl6Wo52Zuyl4UU+g81Itmpq4RWb6LYBnWMkA4dnqDWg 9+0tymAlMM+l1aMw+2Ku7vC5ICeN6RMRhQzARlzrc0pKTo9yM6AwEIAD0m18eCfEwPgy NM8CH4tIeUsG73oyoNWq4S946gtqhwL9HhqUpwsnli5sJpNue4/ex5IsBKhAZwcGx95Y K++w== X-Gm-Message-State: AOJu0YxngjquWSMxZndEvaV4QAtuJD703ndEsGUe8lCWfyOk5nuUlBrs NFD37NG2I3TbxTazlWGQM4iGaI2D/FM= X-Google-Smtp-Source: AGHT+IEYm3rvBZDQkTcY8EZaZZ1gTPkMHKR+Y8BF6YETZOOiv5rQjzm5IXGGySxpTqrCg0x+uxWh2Q== X-Received: by 2002:a5d:4290:0:b0:317:3da0:7606 with SMTP id k16-20020a5d4290000000b003173da07606mr24150689wrq.4.1697221799352; Fri, 13 Oct 2023 11:29:59 -0700 (PDT) Original-Received: from pfiuh07 ([193.48.40.241]) by smtp.gmail.com with ESMTPSA id f16-20020adfdb50000000b0031ff89af0e4sm21250321wrj.99.2023.10.13.11.29.58 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 13 Oct 2023 11:29:59 -0700 (PDT) In-Reply-To: <87jzsbv387.fsf@dustycloud.org> Received-SPF: pass client-ip=2a00:1450:4864:20::430; envelope-from=zimon.toutoune@gmail.com; helo=mail-wr1-x430.google.com X-Spam_score_int: -4 X-Spam_score: -0.5 X-Spam_bar: / X-Spam_report: (-0.5 / 5.0 requ) BAYES_00=-1.9, DATE_IN_PAST_03_06=1.592, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no 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:19260 Archived-At: <http://permalink.gmane.org/gmane.lisp.guile.user/19260> Hi Christine, On Wed, 27 Sep 2023 at 15:07, Christine Lemmer-Webber <cwebber@dustycloud.o= rg> 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 Guile = without using Emacs mainly comes from the lack of Guile REPL features by default. My 2 cents. :-) Cheers, simon --8<---------------cut here---------------start------------->8--- $ 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-pro= c p-proc . arglists)> (ice-9 threads): par-map #<procedure 7f8076c96180 at ice-9/threads.scm:283:= 2 (proc . lists)> (ice-9 threads): n-par-map #<procedure n-par-map (n proc . arglists)> scheme@(guile-user)> ,describe map #f --8<---------------cut here---------------end--------------->8--- --8<---------------cut here---------------start------------->8--- $ 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 --8<---------------cut here---------------end--------------->8--- --8<---------------cut here---------------start------------->8--- $ 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 (experimenta= l) [...] :showi language show language flags for interactive evaluati= on 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.html 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] --8<---------------cut here---------------end--------------->8--- --8<---------------cut here---------------start------------->8--- $ 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'. --8<---------------cut here---------------end--------------->8--- --8<---------------cut here---------------start------------->8--- $ 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! m= acroexpand @macroexpand @macroexpand1 @atomicswap promote_shape ismutablety= pe map(f, c...) -> collection Transform collection c by applying f to each element. For multiple collec= tion arguments, apply f elementwise, and stop when when any of them is exha= usted. 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 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 all = 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 julia> map(+, [1 2; 3 4], zeros(2,1)) ERROR: DimensionMismatch =20=20 julia> map(+, [1 2; 3 4], [1,10,100,1000], zeros(3,1)) # iterates until = 3rd is exhausted 3-element Vector{Float64}: 2.0 13.0 102.0 --8<---------------cut here---------------end--------------->8---