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: The Guile junk drawer and a C plea (was: [PATCH] Add nondestructive delq1, delv1, and delete1.) Date: Fri, 28 Jun 2024 22:52:46 -0400 Message-ID: References: <20240629002027.13853-1-richard@freakingpenguin.com> Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="16885"; mail-complaints-to="usenet@ciao.gmane.io" Cc: guile-devel To: Richard Sent Original-X-From: guile-devel-bounces+guile-devel=m.gmane-mx.org@gnu.org Sat Jun 29 04:53:29 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 1sNODQ-0004GW-HR for guile-devel@m.gmane-mx.org; Sat, 29 Jun 2024 04:53:28 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sNOD3-00028F-JM; Fri, 28 Jun 2024 22:53:05 -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 1sNOD0-000282-SY for guile-devel@gnu.org; Fri, 28 Jun 2024 22:53:03 -0400 Original-Received: from mail-qt1-x82d.google.com ([2607:f8b0:4864:20::82d]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sNOCy-0001jb-1l for guile-devel@gnu.org; Fri, 28 Jun 2024 22:53:02 -0400 Original-Received: by mail-qt1-x82d.google.com with SMTP id d75a77b69052e-445032cf88fso5941991cf.1 for ; Fri, 28 Jun 2024 19:52:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=worcester-edu.20230601.gappssmtp.com; s=20230601; t=1719629578; x=1720234378; darn=gnu.org; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=c6+HnZAJOFr6rysXEPTJwDcpA8X9ELQqXDbd++DGVLw=; b=sgb7SJMDksHNudrttfWAMeHK+G5ojiCkPtAM6B50l2Pv0h32dRHBEkkLzQati9npB9 LdE389Up5VymVf7HM2y5PZkQ8j8RbczUR+Qp2nED3BjUYpp4E6vhmm259XgHx5Ypu7mC 6afMg+EfpFDcodvWQXR1S3ssknYEz/PidOjFnvf7OkFBrF3sOELFhORQdvRx/+PzxDUd mWIgWA921R+DGCIGj0MgypLJTgTJCqQcmjaWM2ysCr3p8IPFQQFD4HNrZRK6sMVbH5cF 4CGh79ZgsrdhRqbTS+2gRw9aqhBZ6Vrs+ty6HiOTQIO811JXvfG1TsoKWQ+VXGX/zl6A y1WQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1719629578; x=1720234378; h=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=c6+HnZAJOFr6rysXEPTJwDcpA8X9ELQqXDbd++DGVLw=; b=WYIDvWyLbLOsnhKH9zNFMFtz5rxYTF8D36cLDxGrmvv4yumtAQQV+9XU0v0ZGwO2fj +0E/l6GgX5dMbl8nmJHbSC4kdpdg07SXiRKLWPW795VcVTeVf8+2KPRlAUDmXFK37epw zdBkaqZH0XUrluplDu+rS6XFiuourlD7RRRqDxofakkF6D1+pCGkZztsGzB/X3S3HM1y 6uCRkEIrzoumSspL5C6sp/gx5DYWi9Ik9YUVGaWPiW3CGw2lV8lbtSG2Diua/eFh+qzy LWVlJeGevu8bC2xuJhSAOlshUJKp6LIMOvrPPtH2478rB+BJN5WPYU+B0h7qw3VU4OWr /JCw== X-Gm-Message-State: AOJu0YxAL0svh5bIAKSXKHB0EfoSWLlrdeEr8gAEMfT5gnSWR18NzgpG 4oP6XRs/km7RsFi418got5TiaMTItlGcrsYSLM6Btp0xucXGxo2U6RCjpnXA1ylX8E/hyG7pc2L 1miEsj29RuVSBktEuiTo+hI3AA1fubaQOGUIVMeYL63dCFLIR4x4= X-Google-Smtp-Source: AGHT+IFqrb/bRWTx7zzZtlIIJFIifvPFHqNZBpbG9TeCl6fEsUeOQvtRwSxWF+2NxsMjSScVz8ly+PxV0HJE8NRRpAk= X-Received: by 2002:ac8:5fcb:0:b0:444:b495:e94d with SMTP id d75a77b69052e-444d9178211mr199717201cf.3.1719629577544; Fri, 28 Jun 2024 19:52:57 -0700 (PDT) In-Reply-To: <20240629002027.13853-1-richard@freakingpenguin.com> Received-SPF: pass client-ip=2607:f8b0:4864:20::82d; envelope-from=dthompson2@worcester.edu; helo=mail-qt1-x82d.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:22496 Archived-At: Hi Richard and all other Guilers, too, What follows is not code review, but your patch felt like an opportunity to provide some commentary about the trajectory of Guile development that I've wanted to share for awhile. First, I think Guile's default environment is a total mess. It's the very definition of a junk drawer. There's over 1000 names in the (guile) module! Contrast this with R7RS-small's (scheme base) module that only has 200ish. Guile is an old project and I'm sure stuff just accumulated over the years, but having so much in the default environment makes it hard to know what a program actually uses because many things that ought to be explicit imports are not. This makes it a challenge to move Guile in a more "least authority" direction. As a rule, I think Guile should *not* add any additional names to the default environment without an extremely good reason. Because (guile) is imported implicitly, new names can cause clashes with existing code that require #:replace to suppress the warning about shadowing core bindings. For example, the newish 'spawn' procedure collides with 'spawn' in (goblins core) in the Goblins project. I think Guile needs a (multi-year, multi-major version) plan to deprecate cruft and move the good stuff into different modules. Give a hoot, don't pollute (the default environment)! Second, please please please, no more C! Guile's substantial amount of C code is a legacy of its origins decades ago, and we need to make it clear to new users and contributors that new code should be written in Scheme! The procedures in Richard's patch would be much more elegantly written in Scheme and it would allow the compiler to gnaw on the code, too. Those experienced with Guile know that writing Scheme procedures in C has all sorts of issues, like non-resumable continuations if a C stack frame is captured, but we could probably do more to discourage writing C in the docs and stuff. It's also just no fun at all. Who actually wants to use that C API? Furthermore, every procedure implemented in C is a challenge for bringing Guile to new places like, say, WebAssembly. Hoot is unable to import any module from Guile that loads a C extension. Did you know that (srfi srfi-1) loads a C extension? Argh! I'm hoping we on the Hoot team will fix that particular issue soon. Okay I should be going to bed instead of writing emails. That's all for now! - Dave