From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Lassi Kortela Newsgroups: gmane.lisp.guile.devel Subject: Re: Name of the standard library Date: Fri, 26 Jul 2024 12:38:21 +0300 Message-ID: <3498797f-c547-4a8b-81d4-5e178041c5b0@lassi.io> References: <20240629002027.13853-1-richard@freakingpenguin.com> <87h6co21qv.fsf@laura> <87r0bsxpoe.fsf@web.de> <4d9d9c2e-0830-4267-b8e5-1a50cb815508@msavoritias.me> <87a5ifyd0g.fsf@web.de> <20240719104617.pLmG2C00D4SnA1G01LmG1n@andre.telenet-ops.be> <87wmlgkyix.fsf@web.de> <15398dda-cb3e-4195-b2f8-263a59a73c68@lassi.io> <8734o4kte6.fsf@web.de> <4cc59aa4-755f-4dd3-a3b6-5d5d5edda053@lassi.io> <87plr8jcba.fsf@web.de> <20240720181139.psBf2C00D09gYMG06sBfG5@michel.telenet-ops.be> <87h6ckjagd.fsf@web.de> <875xszk9re.fsf@web.de> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="5368"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Mozilla Thunderbird Cc: Maxime Devos , Attila Lendvai , Greg Troxel , MSavoritias , "guile-devel@gnu.org" To: "Dr. Arne Babenhauserheide" Original-X-From: guile-devel-bounces+guile-devel=m.gmane-mx.org@gnu.org Fri Jul 26 11:38:58 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 1sXHPe-0001EP-2Q for guile-devel@m.gmane-mx.org; Fri, 26 Jul 2024 11:38:58 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sXHPH-0002iB-9I; Fri, 26 Jul 2024 05:38:35 -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 1sXHPF-0002ZQ-TD for guile-devel@gnu.org; Fri, 26 Jul 2024 05:38:33 -0400 Original-Received: from mail-108-mta187.mxroute.com ([136.175.108.187]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sXHPD-0007cd-Kr for guile-devel@gnu.org; Fri, 26 Jul 2024 05:38:33 -0400 Original-Received: from filter006.mxroute.com ([136.175.111.3] filter006.mxroute.com) (Authenticated sender: mN4UYu2MZsgR) by mail-108-mta187.mxroute.com (ZoneMTA) with ESMTPSA id 190ee67e81c00017a3.001 for (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384); Fri, 26 Jul 2024 09:38:25 +0000 X-Zone-Loop: 9ad82bb81dbdd38e365d616e682fc82ce3073857c0cd X-Originating-IP: [136.175.111.3] DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lassi.io; s=x; h=Content-Transfer-Encoding:Content-Type:In-Reply-To:From:References:Cc: To:Subject:MIME-Version:Date:Message-ID:Sender:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=TjipaSKqxM2ep0jh5XKJ67LluO6xq1ioJwUazUBDhTU=; b=DegjLUWrWZSogvOSS26fVKJTb4 vMj2yEKlC7TgM82hnK2X0LJMOdq7yqVoYDWR1cnsrsok5TfzhMgb4OLbXuqm+Ulgo4qHtvbqjBIl9 wZcY38VjvMj4xweBNx2JHbdhbUfjWOARmJTk2dWfqPwj2Jnqgou3FwySaqNSHtCaNTQpYL+RLAlKE 368rGblt4h1gDUvCqCwTPzN4CLxl9PeTpUcl0PcN+TUqcdCUq7gjVMICT4Y+vQ+pu9nuRFXqYzkz2 nkGO7grazt7Gw00EjlVq0192d5hOSxuhsRLnN69xqtTO7LqtZUIyNApKamO5+TgngE/PblPgMPm4D LclC38MQ==; Content-Language: en-US In-Reply-To: <875xszk9re.fsf@web.de> X-Authenticated-Id: lassi@lassi.io Received-SPF: pass client-ip=136.175.108.187; envelope-from=lassi@lassi.io; helo=mail-108-mta187.mxroute.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 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, 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:22661 Archived-At: Arne wrote: >> Indeed, Scheme doesn't have a clear separation between full-featured >> RnRS implementations and subset implementation. Several people have >> noted that this is confusing. > Maybe the r7rs-benchmark preludes and postludes could be a start for > documentation of that? > https://github.com/ecraven/r7rs-benchmarks/tree/master/src > > Example: Guile3-prelude.scm: > https://github.com/ecraven/r7rs-benchmarks/blob/master/src/Guile3-prelude.scm > > (use-modules (ice-9 rdelim)) > (define-syntax import > (syntax-rules () > ((import stuff ...) > (begin) ;; do nothing > ))) > (define flush-output-port force-output) > (define current-second current-time) > (define (jiffies-per-second) internal-time-units-per-second) > (define current-jiffy get-internal-real-time) > (define exact inexact->exact) > (define inexact exact->inexact) > (define (square x) (* x x)) > (define (write-string str out) (display str out)) ; sufficient for tail.scm > (define (this-scheme-implementation-name) (string-append "guile3-" (version))) > (read-enable 'r7rs-symbols) > (print-enable 'r7rs-symbols) > (use-modules (rnrs bytevectors) > (rnrs base) > (srfi srfi-9)) Those might be a good start for filling in the gaps in RnRS support. Some Scheme implemenetations have existing RnRS test suites. IIRC those are mostly cloned and hacked from Clinger's tests for Larceny. A test suite has the advantage that it is executable documentation of RnRS compatibility. Manual documentation is prone to mistakes. > Could some of those be eligible to be merged into (guile-user) — the > interactive module of the REPL? I'm not qualified to answer that one. >>> Is (import (srfi :N)) portable in practice? >> AFAIK: >> >> (import (srfi :N)) is portable across all R6RS implementations. >> >> (import (srfi N)) - without the colon - is portable across all R7RS >> implementations. >> >> [...] > Thank you for the overview! > > Do you want to cross-post this part of your answer to the srfi-list? You're welcome. I think I have posted an equivalent overview to srfi-discuss in the past, but I can't find it. >> R7RS has an (include "...") mechanism which R6RS lacks. chez-srfi adds >> a similar mechanism on top of the R6RS library system. The chez-srfi >> mechanism is widely portable in practice. > Does that work the same as Guile’s (include "...")? > > From the reference manual: > > -- Scheme Syntax: include file-name > Open FILE-NAME, at expansion-time, and read the Scheme forms that > it contains, splicing them into the location of the ‘include’, > within a ‘begin’. > > If FILE-NAME is a relative path, it is searched for relative to the > path that contains the file that the ‘include’ form appears in. > [...] Yes, Guile's include sounds very similar to R7RS include. There may be obscure technical differences, but the intent is exactly the same.