From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: "Thompson, David" Newsgroups: gmane.lisp.guile.devel Subject: Re: The Guile junk drawer and a C plea Date: Sat, 29 Jun 2024 20:17:18 -0400 Message-ID: References: <20240629002027.13853-1-richard@freakingpenguin.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="24022"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Richard Sent , guile-devel To: mikael@djurfeldt.com Original-X-From: guile-devel-bounces+guile-devel=m.gmane-mx.org@gnu.org Sun Jun 30 02:17:53 2024 Return-path: Envelope-to: guile-devel@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 1sNiGP-00062R-Gb for guile-devel@m.gmane-mx.org; Sun, 30 Jun 2024 02:17:53 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sNiGC-0007Iw-3H; Sat, 29 Jun 2024 20:17:40 -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 ) id 1sNiG6-0007IS-I4 for guile-devel@gnu.org; Sat, 29 Jun 2024 20:17:35 -0400 Original-Received: from mail-qt1-x829.google.com ([2607:f8b0:4864:20::829]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sNiG4-0001XW-N5 for guile-devel@gnu.org; Sat, 29 Jun 2024 20:17:34 -0400 Original-Received: by mail-qt1-x829.google.com with SMTP id d75a77b69052e-4449beccc7fso9925521cf.0 for ; Sat, 29 Jun 2024 17:17:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=worcester-edu.20230601.gappssmtp.com; s=20230601; t=1719706650; x=1720311450; darn=gnu.org; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=gIdfCw77NKr0nroa2foCCQNltzGyZ3HAeb9jjAZORkk=; b=n+r/1eIR+vhDLZ2IvsMaX2yK9MgpwnoNhODKQKNOB/L+hrqn5bV0eKL9gmBib+I+vX sVu+14zM4T3Unjfr0qtosiKi/UIJ6sjL17yLcaA7VxlkfsRKrMkLvLzkLkMFUynaJzmh mUA8hj9exL2BncYVvK7hei3cxPMZUUeqLInR/3Ee0W6ZYrhTRIu1HHOObUL4q4KoIF8D Tp1vx9byrop0NYiZ/0Hy2mcfxMmW+ynEqYRM5gFAKKT997dwmlVVRDexWiUBtQbQP7Tp IqiHCi0adaoQrP/8TBBgbun4LgxptuRxfLgKH6gKxtsUYAebm2b/QqABvZ7bIpoMla2M 8ogw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1719706650; x=1720311450; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=gIdfCw77NKr0nroa2foCCQNltzGyZ3HAeb9jjAZORkk=; b=VQmqtatWFKfIh9FQhUSJstZM9AtL3N2RUEaiJbbAwwbXL11oZZpqLNqnmG7CSt0shV M+DVK94jpCNP8Wve/6zh5TzMH9PQHV/uu2SDbgpGTe+9l6xtTXBsRtcFHriUZyk8aG36 YGim08aQEtzHKNyQSQGyHu5kYpRIvlLewjlXmGinfKs1chMHYx7l91liJHi+hnU7R18a uON57UfN0h1K8dYbQBNdKJe79AJw5N+6bNj9E/FoUyPuRfQkasLA2Q8mHUSl3RRGH9Zz Fc6eY4JhfClz5+/IPns4e56xc75ZivttEBUlpoLRsJWbYaAxdXoelqtc+xjG+E76FcN2 V0MQ== X-Forwarded-Encrypted: i=1; AJvYcCWSMYQNv8DnS4wTj0oN5Ym3pbp7yqdB8zZdq/ZWhoBBPN46Xr4s4ajGprOTGmJPjIi/Znd6M0KjqzvJZ4yFbO5zR0Xj X-Gm-Message-State: AOJu0YwP8wXI10yBxUxGAbagZejc232GyGgCeN99ngevOjkUNknMKtwj nfw1gyUog/ecDnvUp6F0/3EwxIggIu9YgDLarT4lkozCwkmz+RU0BQACqZVAGC+s5SZINTM4jj0 JoZdJKVrIlpJSH6Hlj+6XAWrQNvXnyzTbv01bqA== X-Google-Smtp-Source: AGHT+IFUR/DbRs5Qyt82zjSE7Z5oL31+mOLQZbSCsELZp+Exdl4b5RJOJ8VwGx9q/QzjQYHFnHLpxYc9jXia67Xkt7U= X-Received: by 2002:a05:622a:1194:b0:445:457:3fa with SMTP id d75a77b69052e-44662eadf50mr24164531cf.67.1719706650008; Sat, 29 Jun 2024 17:17:30 -0700 (PDT) In-Reply-To: Received-SPF: pass client-ip=2607:f8b0:4864:20::829; envelope-from=dthompson2@worcester.edu; helo=mail-qt1-x829.google.com X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: guile-devel@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Developers list for Guile, the GNU extensibility library" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guile-devel-bounces+guile-devel=m.gmane-mx.org@gnu.org Original-Sender: guile-devel-bounces+guile-devel=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.lisp.guile.devel:22516 Archived-At: Hi Mikael, On Sat, Jun 29, 2024 at 3:38=E2=80=AFAM Mikael Djurfeldt wrote: > > Your two points sound good. > > However, I personally hope that Guile will continue to be friendly toward= s those using it as an embedded language. There, a C API is important. Ther= e *is* a downside in moving to Scheme from that perspective, but that is fi= ne as long as it is easy to call Scheme from C. The typical use case is whe= n a binding in the application which use Guile as embedded language needs t= o manipulate Scheme data in its arguments in order to interpret them. To clarify: I am not saying that Guile's C API should go away. What I am saying is that we should not introduce new standard library procedures that are implemented in C. Guile is already slowly replacing C with Scheme (this is how we got suspendable ports, for example) and I'd like to see that trend continue. This work is being accelerated, in a way, it's just happening in the Hoot project. Whenever we try to port a new program that calls a (guile) procedure implemented in C, we write our own equivalent in Scheme. For example, I think we already have most, if not all, of libguile/list.c covered. We could upstream that code at some point. > Regarding the junk, I very much agree. I also look forward to getting rid= of ice-9 :). As has been spoken about here previously, I suggest that we d= esign a new module hierarchy, introduce aliases for module bindings, and st= ill supply the old module hierarchy during a few years for backward compati= bility. While I didn't explicitly bring up the ice-9 namespace, I am in favor of transitioning away from it. It confuses too many newcomers. The manual explains it, I think, but no one sees that and it's still a frequently asked question. I enjoyed reading Cat's Cradle in high school English class as much as any US public school student, but the fun reference isn't worth the confusion that it causes. But to be very clear: Shrinking the exports in the (guile) module is orthogonal to transitioning away from the ice-9 namespace. I wouldn't want the two conflated because the latter is much more controversial than the former, I think. > I don't see any harm in applying Richards patch, though, as things look r= ight now. I think the new procedures should simply be implemented in Scheme rather than C. Those destructive procedures are already there, might as well have nondestructive ones that are much more useful. And you'll save me porting 3 additional procedures for Hoot. ;) - Dave