From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: David Pirotte Newsgroups: gmane.lisp.guile.user Subject: Re: name an array function Date: Wed, 23 Nov 2016 18:48:56 -0200 Message-ID: <20161123184856.4c6b276b@capac> References: <20161121125556.GA12982@tuxteam.de> <89CFAA9E-77F7-4428-AA59-72F9AB8796D7@bluewin.ch> <20161121132405.GA14580@tuxteam.de> <464A9A58-83D3-4C53-A936-BC2C83BC402C@bluewin.ch> <20161121135609.GA15712@tuxteam.de> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; boundary="Sig_/Z3+kQZd1c4JPXb051tjkQSR"; protocol="application/pgp-signature" X-Trace: blaine.gmane.org 1479934218 21872 195.159.176.226 (23 Nov 2016 20:50:18 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Wed, 23 Nov 2016 20:50:18 +0000 (UTC) Cc: guile-user@gnu.org To: Daniel Llorens Original-X-From: guile-user-bounces+guile-user=m.gmane.org@gnu.org Wed Nov 23 21:50:13 2016 Return-path: Envelope-to: guile-user@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1c9eUe-0004s1-QN for guile-user@m.gmane.org; Wed, 23 Nov 2016 21:50:12 +0100 Original-Received: from localhost ([::1]:36340 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1c9eUi-00062x-FA for guile-user@m.gmane.org; Wed, 23 Nov 2016 15:50:16 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:50963) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1c9eTi-0005hs-Ow for guile-user@gnu.org; Wed, 23 Nov 2016 15:49:15 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1c9eTe-0002P8-Mo for guile-user@gnu.org; Wed, 23 Nov 2016 15:49:14 -0500 Original-Received: from maximusconfessor.all2all.org ([79.99.200.102]:40618) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1c9eTe-0002No-G0 for guile-user@gnu.org; Wed, 23 Nov 2016 15:49:10 -0500 Original-Received: from localhost (unknown [192.168.0.2]) by maximusconfessor.all2all.org (Postfix) with ESMTP id E957AA04C1EA; Wed, 23 Nov 2016 21:49:08 +0100 (CET) Original-Received: from maximusconfessor.all2all.org ([192.168.0.1]) by localhost (maximusconfessor.all2all.org [192.168.0.2]) (amavisd-new, port 10024) with ESMTP id Ska3oc4lBbqK; Wed, 23 Nov 2016 21:49:04 +0100 (CET) Original-Received: from capac (unknown [189.60.226.83]) by maximusconfessor.all2all.org (Postfix) with ESMTPSA id 5DBC7A04C138; Wed, 23 Nov 2016 21:49:03 +0100 (CET) In-Reply-To: X-Mailer: Claws Mail 3.14.0 (GTK+ 2.24.31; x86_64-pc-linux-gnu) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x [fuzzy] X-Received-From: 79.99.200.102 X-BeenThere: guile-user@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: General Guile related discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guile-user-bounces+guile-user=m.gmane.org@gnu.org Original-Sender: "guile-user" Xref: news.gmane.org gmane.lisp.guile.user:13006 Archived-At: --Sig_/Z3+kQZd1c4JPXb051tjkQSR Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Le Wed, 23 Nov 2016 17:07:30 +0100, Daniel Llorens a =C3=A9crit : > On 21 Nov 2016, at 14:56, tomas@tuxteam.de wrote: >=20 > > I (politely) disagree: the most "commonly" used function is > > already array-ref, so you would seldomly use array-from/slice > > for a scalar result (the rank-0 result will be more frequent, > > because there's no substitute). But hey, as I said. =20 >=20 > I don't use array-ref/set! anymore since array-from/amend! generalize the= m. I > actually use a further generalization in a separate library :p >=20 > But I have a proposal below that makes this discussion moot, I hope. >=20 > | master (current) | meaning | proposal = | > |---------------------+----------------------------------+---------------= -------| > | array-from* | look up subarray, even #0(x) | array-slice = | > | array-from | look up cell, so x and not #0(x) | array-cell-ref= | > | array-amend! | set cell | array-cell-set= ! | > | array-for-each-cell | iterate over subarrays | array-for-each= -slice | I'd use=20 array-slice-ref/set! array-slice-for-each Unless I miss understood something :) Cheers, David --Sig_/Z3+kQZd1c4JPXb051tjkQSR Content-Type: application/pgp-signature Content-Description: OpenPGP digital signature -----BEGIN PGP SIGNATURE----- iQEzBAEBCAAdFiEEhCJlRZtBM3furJHe83T9k6MFetcFAlg2ALgACgkQ83T9k6MF etf4eQf/XtBN1PpClC+GnpufOftiuckZEBkgoMOgTGPL1BEIlqSUlpowaWMuUfl2 HZY0xqSHuugnd39p/WJjMsrotzlRNpgIQta5futNB3U8BKp4XPAAbwLRWcy5IOAj sje9RxxvQoceS528Xvos2T52YaM21dfGS/NNJlaXME86m//NK77717AgzXONQJf2 x6IPX4I0lpWtyEQpGlchz5UcjFoEz7MyyYbrqoGDyKpp9Hf1bgRbi+QQgyJ4aehg 96cgTr/sODLGEdyMPnF4N2IlHzCFUI+Swc4wzefjHlpO3vfLDEse7T5IRC5lQStF UcpKfbsrbOxm4a7IedD+YYBOPHzJZQ== =nFQY -----END PGP SIGNATURE----- --Sig_/Z3+kQZd1c4JPXb051tjkQSR--