From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: lloda Newsgroups: gmane.lisp.guile.devel Subject: Re: guile array different than srfi 25 Date: Tue, 11 Jan 2022 18:22:43 +0100 Message-ID: References: Mime-Version: 1.0 (Mac OS X Mail 13.4 \(3608.120.23.2.7\)) Content-Type: multipart/alternative; boundary="Apple-Mail=_AB267C16-A547-469B-8DCD-159951D832F9" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="38844"; mail-complaints-to="usenet@ciao.gmane.io" Cc: guile-devel To: Damien Mattei Original-X-From: guile-devel-bounces+guile-devel=m.gmane-mx.org@gnu.org Tue Jan 11 18:58:04 2022 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 1n7LPI-0009w1-3Y for guile-devel@m.gmane-mx.org; Tue, 11 Jan 2022 18:58:04 +0100 Original-Received: from localhost ([::1]:41560 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1n7LPG-0000v5-OW for guile-devel@m.gmane-mx.org; Tue, 11 Jan 2022 12:58:02 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:38614) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1n7KrR-0003Ma-0t for guile-devel@gnu.org; Tue, 11 Jan 2022 12:23:05 -0500 Original-Received: from mta-06-4.privateemail.com ([198.54.122.56]:34690) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1n7KrM-0000lX-9v for guile-devel@gnu.org; Tue, 11 Jan 2022 12:23:01 -0500 Original-Received: from mta-06.privateemail.com (localhost [127.0.0.1]) by mta-06.privateemail.com (Postfix) with ESMTP id DBA0F18000A9; Tue, 11 Jan 2022 12:22:46 -0500 (EST) Original-Received: from [192.168.1.105] (unknown [10.20.151.184]) by mta-06.privateemail.com (Postfix) with ESMTPA id 24079180009F; Tue, 11 Jan 2022 12:22:45 -0500 (EST) In-Reply-To: X-Mailer: Apple Mail (2.3608.120.23.2.7) X-Virus-Scanned: ClamAV using ClamSMTP Received-SPF: pass client-ip=198.54.122.56; envelope-from=lloda@sarc.name; helo=MTA-06-4.privateemail.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, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-0.001, 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" Xref: news.gmane.io gmane.lisp.guile.devel:21029 Archived-At: --Apple-Mail=_AB267C16-A547-469B-8DCD-159951D832F9 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=utf-8 Guile arrays were implemented before srfi-25 existed and aren't supposed = to be compatible with it. There are many other array srfis all with = incompatible syntaxes... However srfi-25 is tiny so it should be really simple to implement it on = top of Guile arrays. If you or anyone else submits a patch, I'm sure it = will be considered. Regards Daniel > On 11 Jan 2022, at 12:19, Damien Mattei = wrote: >=20 > hello, >=20 > why guile array differs from SRFI 25: > make-array syntax : > = https://www.gnu.org/software/guile/manual/html_node/Array-Procedures.html = >=20 > (make-array 'ho 2 3) =E2=87=92 #2((ho ho ho) (ho ho ho)) >=20 >=20 > different than srfi 25: >=20 > https://srfi.schemers.org/srfi-25/srfi-25.html = >=20 > (make-array shape obj) >=20 >=20 > Returns a newly allocated array whose shape is given by > shape. If obj is provided, then each element is > initialized to it. Otherwise the initial contents of each element is > unspecified. The array does not retain a dependence to > shape. >=20 >=20 > it creates incompatibilties in code . >=20 > Damien --Apple-Mail=_AB267C16-A547-469B-8DCD-159951D832F9 Content-Transfer-Encoding: quoted-printable Content-Type: text/html; charset=utf-8

Guile arrays were implemented before = srfi-25 existed and aren't supposed to be compatible with it. There are = many other array srfis all with incompatible syntaxes...

However srfi-25 is tiny = so it should be really simple to implement it on top of Guile arrays. If = you or anyone else submits a patch, I'm sure it will be = considered.

Regards

= Daniel

On 11 = Jan 2022, at 12:19, Damien Mattei <damien.mattei@gmail.com> wrote:

hello,

why guile array = differs from SRFI 25:
make-array syntax :

(make-array 'ho 2 3) =E2=87=92 #2((ho ho ho) (ho ho =
ho))


different =
than srfi 25:

https://srfi.schemers.org/srfi-25/srfi-25.html

(make-array shape obj)
Returns a newly allocated array whose shape is given by shape. If obj is provided, = then each element is initialized to it. Otherwise the initial contents of each element is unspecified. The array does not retain a dependence to shape.

it creates =
incompatibilties in code .

Damien

= --Apple-Mail=_AB267C16-A547-469B-8DCD-159951D832F9--