From MAILER-DAEMON Sat Jan 03 20:22:34 2004
Received: from list by monty-python.gnu.org with archive (Exim 4.24)
	id 1AcwyP-0007LY-O8
	for mharc-pika-dev@gnu.org; Sat, 03 Jan 2004 20:22:33 -0500
Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.24)
	id 1AcwwT-0006J2-Lq
	for pika-dev@nongnu.org; Sat, 03 Jan 2004 20:20:33 -0500
Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.24)
	id 1Acwuz-0004yW-31
	for pika-dev@nongnu.org; Sat, 03 Jan 2004 20:19:32 -0500
Received: from [80.33.152.103] (helo=turing.uab.es)
	by monty-python.gnu.org with esmtp (TLSv1:RC4-SHA:128) (Exim 4.24)
	id 1Acwua-0004gp-KU
	for pika-dev@nongnu.org; Sat, 03 Jan 2004 20:18:37 -0500
Received: from jao by turing.uab.es with local (Exim 4.30) id 1Acvwn-0007LS-IR
	for pika-dev@nongnu.org; Sun, 04 Jan 2004 01:16:49 +0100
To: pika-dev@nongnu.org
X-Attribution: jao
X-URL: <http://tao.uab.es/jao/>
From: "Jose A. Ortega Ruiz" <jao@gnu.org>
Organization: CCD - Autonomous University of Barcelona
Face: iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAMAAABg3Am1AAAAYFBMVEUICAj////4+Pjw8PAY
	GBhYWFjg4OAQEBDQ0NC4uLjo6OjIyMg4ODggICBgYGBAQEAoKCiIiIhQUFCYmJiwsLBoaGiQkJBw
	cHCAgICgoKBISEgwMDCoqKjY2NjAwMB4eHjpzs9HAAAAAWJLR0QAiAUdSAAAAAlwSFlzAAALEgAA
	CxIB0t1+/AAAAAd0SU1FB9MMFhUWOMaLTbEAAAHBSURBVHic1VXLoqMgDDUgKIIiiPVt//8vb2jV
	3s60IruZbMjinOTkYUyS/8LKMpIgizmO4gDyKIYmBEQMoS4AIIskRGVQBKCPIWgk6M3PrkizAHRz
	x4IIFiTcsa34lMysFMuHpQoQZiQ0wrcKDeVBcQJOx35FDCEFl2Iw99aytqq/gVXv4yKeMxUu1gqO
	yYWxA8AcRKNlnZx98kwChKp8M5wzjVq9DsDF4BNxKJrEhaElEwH+UDQ12ASSBykGoMGHSQqPMdP0
	HJ9yIKNuCuD9VGIK6AIJ2GMdimFEX6O7hhThEPjaPmXckKoDeAy6uC471DWhBA6oKofceh/LzwMV
	+3vhY7ZFkyaKYvmhBII8Z8CoVPKCIAZkG7Kl9IKgjL/2uoWD/N3Mr5jYXiKnc7yiVO3+jcBC8cM7
	FbSAPQQRkCkjQG4nhAHM7iLUi+v9tqpv+PYVzVJwj2Ebv1fm8zlQ9MBj/NsGGvxV4p+6VecHvqL8
	WOlMeAbIv4ov1/sOMWT+dbfS/Hn+ZPU2xNLtMWuXvwuol+1iLuZVftrs/axc++c6KA6bUbcPMt01
	KPthe0b/adNc9PrqtdId03XML++ftx9ClhEPheraiAAAAABJRU5ErkJggg==
Date: Sun, 04 Jan 2004 01:16:49 +0100
Message-ID: <87hdzcpnym.fsf@turing.uab.es>
User-Agent: Gnus/5.1003 (Gnus v5.10.3) Emacs/21.3 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Sender: Jose Antonio Ortega Ruiz <jao@abra.uab.es>
Subject: [Pika-dev] new code: character special names
X-BeenThere: pika-dev@nongnu.org
X-Mailman-Version: 2.1.2
Precedence: list
List-Id: <pika-dev.nongnu.org>
List-Unsubscribe: <http://mail.nongnu.org/mailman/listinfo/pika-dev>,
	<mailto:pika-dev-request@nongnu.org?subject=unsubscribe>
List-Archive: <http://mail.gnu.org/pipermail/pika-dev>
List-Post: <mailto:pika-dev@nongnu.org>
List-Help: <mailto:pika-dev-request@nongnu.org?subject=help>
List-Subscribe: <http://mail.nongnu.org/mailman/listinfo/pika-dev>,
	<mailto:pika-dev-request@nongnu.org?subject=subscribe>
X-List-Received-Date: Sun, 04 Jan 2004 01:22:25 -0000

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1


happy new year!

i've spent some time of my holidays writing a little bit of code for
pika. more concretely (and following tom's suggestion), i've extended
the special character names handled by read and write: all usual names
(newline, return, page, etc.) plus standard ASCII names are included
(in fact, the same set as systas').

i've also spent sometime with tla 1.2 and i've created a new _signed_[1]
archive with the following coordinates:

jao@gnu.org--2004
  http://tao.uab.es/jao/archives/2004

the above-mentioned code corresponds to revision
scm--devo--0.1--patch-1.

some comments on the code:

- - i've tried to hide away all details of char representation and name
  handling inside reps/char-imp.c (for instance, avoiding explicit bit
  twiddling in lexer.c, and things like that.)

- - i've noticed that pointer arguments are seldom checked for
  non-nullness: i've used now and then invariant(arg != 0) in my new
  functions, but maybe not checking is a design issue?

- - i've also missed the (consistent) use of 'const' qualifiers for
  pointer parameters of functions (what the c++ people call
  const-correctness). from my previous experience, a rigorous use of
  'const' improves the code's consistency and 'self-documentedness'.
  i've already used it in my pika hacks, but of course it must be a
  shared policy to be of any use. if you think it's worth the effort,
  i volunteer to review the current pika source tree to make it
  'const-correct'. but, again, maybe i am missing some design issue...

- - tom, i think my changes are quite self-explanatory, but if you want
  me to explain them in more detail to save you time, just ask! :).
  also, please let me know if the archive change poses any problem
  (the old one is still alive, btw).

cheers,
jao

Footnotes: 
[1]  My public key is (i'm signing this message, too):

- -----BEGIN PGP PUBLIC KEY BLOCK-----
Version: GnuPG v1.2.3 (GNU/Linux)

mQGiBD/R4nMRBACbOInmQtBJNwQ4WC7nPzOXi48U8gq+y26ufDMMuQs2OMpoCsYJ
7LeW/dLC2q3DUFezLYcSLIq7GYPUEvAg6p7/P/D2e2HCEWZ2gk73+CklYeBOJlTs
TLZZLRy3CeGRMF4EaNu9NQetqkONgoR20yfpRJVLx9J3XCiknVPQokShowCgy5xA
GAbtZ5bBNeCA4t5OIEU1tAcD/1rxztKpb0N0YKs8ddu9FQHOQUIZ13IohVwV6aij
S7TGZ3w43I8ZyiFsuyfCMdV1OwiuYnXOWWqV2oFp0jQpBJJrvrk7yyVE3YMBB5n0
V4fopvA8pE6MX8CGxuCIB14hNmMhNKFVHQ84ebXTVtGj9gjiWS+LMyw/IF6GIkIq
1HhuBACIxayFTDUtluOKVY0NufSjnDHlS0IN30kicwhOXkDWzxGEGtFq3Jl9y489
CqEsfMhpO+Gdbt+ScfdNvZFLiMmioK9w+EY0SHwSyGl9bzQWds9zwJrGD1GcxmIP
EKc5e/a2qs7LlX4+f2M4S6mpzgiu7DvnELKkkDCfYtoG2EDr+bQsSm9zZSBBbnRv
bmlvIE9ydGVnYSBSdWl6IChqYW8pIDxqYW9AZ251Lm9yZz6IXgQTEQIAHgUCP9Hi
cwIbAwYLCQgHAwIDFQIDAxYCAQIeAQIXgAAKCRCVfY9tU0Oj7BORAJ4h6AGUJH2N
l7bks7XzN5w7Cnl9ZQCfZkXF6oGjbPu2mUkGRTa198diqpi5AQ0EP9HidBAEAI7Y
6UtuoTt+bVUTnvFtIWkfMNb37NTCi2dOhwK9dMH/MMgq3fLaNudeI04tzWyQ0SgD
Cmci+Q5zopYR4uNVg8qy7OcZlqCfOGE6t1ifJSI2iLlZfYYIc2ln44Ong6BdX1tf
HuBbyRks+fayymcx0E0W61UUCLlOGdBNuCKjbrpfAAMFA/0Ux+TSJTLJpZoSmwNi
oZIDMFyFNqJA4DNid4DXQzq8e6sgjaZvIC3zy5f0kVjQpFuUUq9hQdo9YjrfICWh
b1ggNUPQRu+pi+9m9HZDsv73sanZh2HE3GTXzPUZRf5NmIo+N1e2NKv+iHhecVEJ
bshLk30wZwwimIZHJZrt7n6cxIhJBBgRAgAJBQI/0eJ0AhsMAAoJEJV9j21TQ6Ps
dPAAn3aCoiIgm01fRECLpgwstVmJtyRFAKCxu2c2y58Gn2sY5542T7UIAx8fSw==
=FZwq
- -----END PGP PUBLIC KEY BLOCK-----


- -- 
Any sufficiently advanced technology is indistinguishable from magic.
- -Arthur C Clarke, science fiction writer (1917- )
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.4 (GNU/Linux)
Comment: Processed by Mailcrypt 3.5.8 <http://mailcrypt.sourceforge.net/>

iD8DBQE/91tblX2PbVNDo+wRApv2AKCbCoiSUyULNSdEou44kFcNwIK2ygCdFL1D
XaHoHmbKTguC45629/VBo3Y=
=DEGb
-----END PGP SIGNATURE-----



From MAILER-DAEMON Sun Jan 04 10:40:40 2004
Received: from list by monty-python.gnu.org with archive (Exim 4.24)
	id 1AdAMp-0001Hp-6w
	for mharc-pika-dev@gnu.org; Sun, 04 Jan 2004 10:40:39 -0500
Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.24)
	id 1AdAMk-0001Er-2A
	for pika-dev@nongnu.org; Sun, 04 Jan 2004 10:40:34 -0500
Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.24)
	id 1AdAMD-0000eX-65
	for pika-dev@nongnu.org; Sun, 04 Jan 2004 10:40:33 -0500
Received: from [199.232.41.8] (helo=mx20.gnu.org)
	by monty-python.gnu.org with esmtp (TLSv1:DES-CBC3-SHA:168)
	(Exim 4.24) id 1AdALs-0008V9-TC
	for pika-dev@nongnu.org; Sun, 04 Jan 2004 10:39:40 -0500
Received: from [80.33.152.103] (helo=turing.uab.es)
	by mx20.gnu.org with esmtp (Exim 4.24) id 1Ad9NI-0005cA-2L
	for pika-dev@nongnu.org; Sun, 04 Jan 2004 09:37:04 -0500
Received: from jao by turing.uab.es with local (Exim 4.30) id 1Ad9NC-0001Am-Jl
	for pika-dev@nongnu.org; Sun, 04 Jan 2004 15:36:58 +0100
To: pika-dev@nongnu.org
Subject: Re: [Pika-dev] new code: character special names
X-Attribution: jao
X-URL: <http://tao.uab.es/jao/>
References: <87hdzcpnym.fsf@turing.uab.es>
From: "Jose A. Ortega Ruiz" <jao@gnu.org>
Organization: CCD - Autonomous University of Barcelona
Face: iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAMAAABg3Am1AAAAYFBMVEUICAj////4+Pjw8PAY
	GBhYWFjg4OAQEBDQ0NC4uLjo6OjIyMg4ODggICBgYGBAQEAoKCiIiIhQUFCYmJiwsLBoaGiQkJBw
	cHCAgICgoKBISEgwMDCoqKjY2NjAwMB4eHjpzs9HAAAAAWJLR0QAiAUdSAAAAAlwSFlzAAALEgAA
	CxIB0t1+/AAAAAd0SU1FB9MMFhUWOMaLTbEAAAHBSURBVHic1VXLoqMgDDUgKIIiiPVt//8vb2jV
	3s60IruZbMjinOTkYUyS/8LKMpIgizmO4gDyKIYmBEQMoS4AIIskRGVQBKCPIWgk6M3PrkizAHRz
	x4IIFiTcsa34lMysFMuHpQoQZiQ0wrcKDeVBcQJOx35FDCEFl2Iw99aytqq/gVXv4yKeMxUu1gqO
	yYWxA8AcRKNlnZx98kwChKp8M5wzjVq9DsDF4BNxKJrEhaElEwH+UDQ12ASSBykGoMGHSQqPMdP0
	HJ9yIKNuCuD9VGIK6AIJ2GMdimFEX6O7hhThEPjaPmXckKoDeAy6uC471DWhBA6oKofceh/LzwMV
	+3vhY7ZFkyaKYvmhBII8Z8CoVPKCIAZkG7Kl9IKgjL/2uoWD/N3Mr5jYXiKnc7yiVO3+jcBC8cM7
	FbSAPQQRkCkjQG4nhAHM7iLUi+v9tqpv+PYVzVJwj2Ebv1fm8zlQ9MBj/NsGGvxV4p+6VecHvqL8
	WOlMeAbIv4ov1/sOMWT+dbfS/Hn+ZPU2xNLtMWuXvwuol+1iLuZVftrs/axc++c6KA6bUbcPMt01
	KPthe0b/adNc9PrqtdId03XML++ftx9ClhEPheraiAAAAABJRU5ErkJggg==
Date: Sun, 04 Jan 2004 15:36:58 +0100
In-Reply-To: <87hdzcpnym.fsf@turing.uab.es> (Jose A. Ortega Ruiz's message
	of "Sun, 04 Jan 2004 01:16:49 +0100")
Message-ID: <87ad53pyph.fsf@turing.uab.es>
User-Agent: Gnus/5.1003 (Gnus v5.10.3) Emacs/21.3 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Sender: Jose Antonio Ortega Ruiz <jao@abra.uab.es>
X-BeenThere: pika-dev@nongnu.org
X-Mailman-Version: 2.1.2
Precedence: list
List-Id: <pika-dev.nongnu.org>
List-Unsubscribe: <http://mail.nongnu.org/mailman/listinfo/pika-dev>,
	<mailto:pika-dev-request@nongnu.org?subject=unsubscribe>
List-Archive: <http://mail.gnu.org/pipermail/pika-dev>
List-Post: <mailto:pika-dev@nongnu.org>
List-Help: <mailto:pika-dev-request@nongnu.org?subject=help>
List-Subscribe: <http://mail.nongnu.org/mailman/listinfo/pika-dev>,
	<mailto:pika-dev-request@nongnu.org?subject=subscribe>
X-List-Received-Date: Sun, 04 Jan 2004 15:40:35 -0000


hi again.

jivera has suggested some improvements to my previous version of the
character handling code which i have added to my archive (patch-6).

> I've taken a little bit of time to review the patch now and here are
> my thoughts so far:
> 
> 1. Really picky but, add a tagline to
>    tests/char-tests/unit-char-names.c.  It'd be much simpler to do now
>    before it's merged into the mainline than later.
> 

done. i've also put the correct tag line in all other files i've added
so far.

> 2. In reps/chars-imp.c on lines 442, 451, 455, and 457, you have code
>    like:
> 
>    amt += scm_printfmt (errn, cport, "%s-", bstr);
> 
>    Look at pairs-imp.c's scm_pair_write_fn's use of amt and additional
>    to see how to correctly handle error conditions from sequential
>    calls to scm_printfmt.
>

that should be fixed now.

> 4. scm_codepoint_is_latin1 should be defined as:
> 
>    #define scm_codepoint_is_latin1(c) (!(0x1fff00 & (c)))
> 
>    or maybe even
> 
>    #define scm_codepoint_is_latin1(c) (!(~0xff & (c)))
> 
>    (I recall Tom being explicit about allowing up to U+1FFFFF even
>    though Unicode only requires up to U+10FFFF, but can't find
>    anything to back up my claim other than current code in
>    reps/chars-imp.c supporting up to 0x1fffff.)

i've used the second one: is that ok, tom?

i've also fixed (again with jivera's help) the new archive
(jao@gnu.org--2004) so that http access now works correctly.

cheers,
jao
-- 
I shall be telling this with a sigh / Somewhere ages and ages hence: / Two
roads diverged in a wood, and I -- / I took the one less traveled by, / And
that has made all the difference. -Robert Frost, poet (1874-1963)



From MAILER-DAEMON Sat Jan 10 12:33:10 2004
Received: from list by monty-python.gnu.org with archive (Exim 4.24)
	id 1AfMy4-00044B-T8
	for mharc-pika-dev@gnu.org; Sat, 10 Jan 2004 12:32:12 -0500
Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.24)
	id 1AfMxu-0003jA-Aj
	for pika-dev@nongnu.org; Sat, 10 Jan 2004 12:32:02 -0500
Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.24)
	id 1AfMx3-0002sH-Mb
	for pika-dev@nongnu.org; Sat, 10 Jan 2004 12:31:40 -0500
Received: from [80.33.152.103] (helo=turing.uab.es)
	by monty-python.gnu.org with esmtp (TLSv1:RC4-SHA:128) (Exim 4.24)
	id 1AfMx2-0002pM-RV
	for pika-dev@nongnu.org; Sat, 10 Jan 2004 12:31:09 -0500
Received: from jao by turing.uab.es with local (Exim 4.30) id 1AfLzU-0004hZ-LZ
	for pika-dev@nongnu.org; Sat, 10 Jan 2004 17:29:36 +0100
To: pika-dev@nongnu.org
X-Attribution: jao
X-URL: <http://tao.uab.es/jao/>
From: "Jose A. Ortega Ruiz" <jao@gnu.org>
Organization: CCD - Autonomous University of Barcelona
Face: iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAMAAABg3Am1AAAAYFBMVEUICAj////4+Pjw8PAY
	GBhYWFjg4OAQEBDQ0NC4uLjo6OjIyMg4ODggICBgYGBAQEAoKCiIiIhQUFCYmJiwsLBoaGiQkJBw
	cHCAgICgoKBISEgwMDCoqKjY2NjAwMB4eHjpzs9HAAAAAWJLR0QAiAUdSAAAAAlwSFlzAAALEgAA
	CxIB0t1+/AAAAAd0SU1FB9MMFhUWOMaLTbEAAAHBSURBVHic1VXLoqMgDDUgKIIiiPVt//8vb2jV
	3s60IruZbMjinOTkYUyS/8LKMpIgizmO4gDyKIYmBEQMoS4AIIskRGVQBKCPIWgk6M3PrkizAHRz
	x4IIFiTcsa34lMysFMuHpQoQZiQ0wrcKDeVBcQJOx35FDCEFl2Iw99aytqq/gVXv4yKeMxUu1gqO
	yYWxA8AcRKNlnZx98kwChKp8M5wzjVq9DsDF4BNxKJrEhaElEwH+UDQ12ASSBykGoMGHSQqPMdP0
	HJ9yIKNuCuD9VGIK6AIJ2GMdimFEX6O7hhThEPjaPmXckKoDeAy6uC471DWhBA6oKofceh/LzwMV
	+3vhY7ZFkyaKYvmhBII8Z8CoVPKCIAZkG7Kl9IKgjL/2uoWD/N3Mr5jYXiKnc7yiVO3+jcBC8cM7
	FbSAPQQRkCkjQG4nhAHM7iLUi+v9tqpv+PYVzVJwj2Ebv1fm8zlQ9MBj/NsGGvxV4p+6VecHvqL8
	WOlMeAbIv4ov1/sOMWT+dbfS/Hn+ZPU2xNLtMWuXvwuol+1iLuZVftrs/axc++c6KA6bUbcPMt01
	KPthe0b/adNc9PrqtdId03XML++ftx9ClhEPheraiAAAAABJRU5ErkJggg==
Date: Sat, 10 Jan 2004 17:29:36 +0100
Message-ID: <87ad4vn4wf.fsf@turing.uab.es>
User-Agent: Gnus/5.1006 (Gnus v5.10.6) Emacs/21.3 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Sender: Jose Antonio Ortega Ruiz <jao@abra.uab.es>
Subject: [Pika-dev] viewarch 
X-BeenThere: pika-dev@nongnu.org
X-Mailman-Version: 2.1.2
Precedence: list
List-Id: <pika-dev.nongnu.org>
List-Unsubscribe: <http://mail.nongnu.org/mailman/listinfo/pika-dev>,
	<mailto:pika-dev-request@nongnu.org?subject=unsubscribe>
List-Archive: <http://mail.gnu.org/pipermail/pika-dev>
List-Post: <mailto:pika-dev@nongnu.org>
List-Help: <mailto:pika-dev-request@nongnu.org?subject=help>
List-Subscribe: <http://mail.nongnu.org/mailman/listinfo/pika-dev>,
	<mailto:pika-dev-request@nongnu.org?subject=subscribe>
X-List-Received-Date: Sat, 10 Jan 2004 17:32:08 -0000


hi,

i've setup viewarch on my server, and my archives[1] (including the last
little contrib to pika on special character names) are browsable at

http://tao.uab.es/cgi-bin/viewarch.cgi
http://tao.uab.es/cgi-bin/viewarch.cgi/jao@gnu.org--2004/scm--devo--0.1

it's very easy to add new external archives: if you me to put there
any of yours (e.g. maybe it'd be useful to have tom's there) just tell
me. right now, the viewarch cache is updated once a day, but i've lots
of spare CPU cycles, so it can get updated as frequently as you see
fit. 

on an unrelated note, these days i've nothing to hack on pika: as
always, suggestions are welcome! ;)

cheers,
jao

Footnotes: 
[1]  jao@gnu.org--2004 at http://tao.uab.es/jao/archives/2004 (signed)
     jao@gnu.org--hacks04 at http://tao.uab.es/jao/{archives}/hacks04
       (signed, closed)
-- 
You are never too old to be what you might have been.
 -George Eliot (Mary Ann Evans), novelist (1819-1880)



From MAILER-DAEMON Sat Jan 10 19:14:27 2004
Received: from list by monty-python.gnu.org with archive (Exim 4.24)
	id 1AfTFL-0005s1-1m
	for mharc-pika-dev@gnu.org; Sat, 10 Jan 2004 19:14:27 -0500
Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.24)
	id 1AfTF9-0005pj-GR
	for pika-dev@nongnu.org; Sat, 10 Jan 2004 19:14:15 -0500
Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.24)
	id 1AfTEb-0005fV-Be
	for pika-dev@nongnu.org; Sat, 10 Jan 2004 19:14:13 -0500
Received: from [129.110.10.12] (helo=smtp1.utdallas.edu)
	by monty-python.gnu.org with esmtp (Exim 4.24) id 1AfSvo-00016I-1D
	for pika-dev@nongnu.org; Sat, 10 Jan 2004 18:54:16 -0500
Received: from kaiser (bluesocket.utdallas.edu [129.110.39.12])
	by smtp1.utdallas.edu (Postfix) with ESMTP id DF8ED3893A9
	for <pika-dev@nongnu.org>; Sat, 10 Jan 2004 16:52:44 -0600 (CST)
Received: from jivera by kaiser with local (Exim 3.35 #1 (Debian))
	id 1AfLQF-0001Fs-00
	for <pika-dev@nongnu.org>; Sat, 10 Jan 2004 16:53:11 +0100
To: pika-dev@nongnu.org
From: Matthew Dempsky <jivera@flame.org>
Date: Sat, 10 Jan 2004 16:53:11 +0100
Message-ID: <87hdz36brs.fsf@flame.org>
User-Agent: Gnus/5.1002 (Gnus v5.10.2) Emacs/21.3 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Sender: Matthew Dempsky <jivera@utdallas.edu>
Subject: [Pika-dev] mailserver test
X-BeenThere: pika-dev@nongnu.org
X-Mailman-Version: 2.1.2
Precedence: list
List-Id: <pika-dev.nongnu.org>
List-Unsubscribe: <http://mail.nongnu.org/mailman/listinfo/pika-dev>,
	<mailto:pika-dev-request@nongnu.org?subject=unsubscribe>
List-Archive: <http://mail.gnu.org/pipermail/pika-dev>
List-Post: <mailto:pika-dev@nongnu.org>
List-Help: <mailto:pika-dev-request@nongnu.org?subject=help>
List-Subscribe: <http://mail.nongnu.org/mailman/listinfo/pika-dev>,
	<mailto:pika-dev-request@nongnu.org?subject=subscribe>
X-List-Received-Date: Sun, 11 Jan 2004 00:14:16 -0000

If anyone receives this please let me know.

-jivera



From MAILER-DAEMON Sun Jan 11 01:25:23 2004
Received: from list by monty-python.gnu.org with archive (Exim 4.24)
	id 1AfZ2J-00020J-1M
	for mharc-pika-dev@gnu.org; Sun, 11 Jan 2004 01:25:23 -0500
Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.24)
	id 1AfZ2E-0001si-LQ
	for pika-dev@nongnu.org; Sun, 11 Jan 2004 01:25:18 -0500
Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.24)
	id 1AfZ1b-0000ks-Id
	for pika-dev@nongnu.org; Sun, 11 Jan 2004 01:25:12 -0500
Received: from [129.110.10.12] (helo=smtp1.utdallas.edu)
	by monty-python.gnu.org with esmtp (Exim 4.24) id 1AfZ1a-0000iv-T3
	for pika-dev@nongnu.org; Sun, 11 Jan 2004 01:24:38 -0500
Received: from kaiser (bluesocket.utdallas.edu [129.110.39.12])
	by smtp1.utdallas.edu (Postfix) with ESMTP id F30D638945D
	for <pika-dev@nongnu.org>; Sat, 10 Jan 2004 23:23:07 -0600 (CST)
Received: from jivera by kaiser with local (Exim 3.35 #1 (Debian))
	id 1AfRW2-0000q7-00
	for <pika-dev@nongnu.org>; Sat, 10 Jan 2004 23:23:34 +0100
To: pika-dev@nongnu.org
From: Matthew Dempsky <jivera@flame.org>
Date: Sat, 10 Jan 2004 23:23:33 +0100
Message-ID: <87fzenl9y2.fsf@flame.org>
User-Agent: Gnus/5.1002 (Gnus v5.10.2) Emacs/21.3 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Sender: Matthew Dempsky <jivera@utdallas.edu>
Subject: [Pika-dev] Naming issues in implementing numbers
X-BeenThere: pika-dev@nongnu.org
X-Mailman-Version: 2.1.2
Precedence: list
List-Id: <pika-dev.nongnu.org>
List-Unsubscribe: <http://mail.nongnu.org/mailman/listinfo/pika-dev>,
	<mailto:pika-dev-request@nongnu.org?subject=unsubscribe>
List-Archive: <http://mail.gnu.org/pipermail/pika-dev>
List-Post: <mailto:pika-dev@nongnu.org>
List-Help: <mailto:pika-dev-request@nongnu.org?subject=help>
List-Subscribe: <http://mail.nongnu.org/mailman/listinfo/pika-dev>,
	<mailto:pika-dev-request@nongnu.org?subject=subscribe>
X-List-Received-Date: Sun, 11 Jan 2004 06:25:19 -0000

Alright, I've added about 1000 or so lines of code to the pika to
implement numbers and all (not finished yet, but it's quickly
approaching there), and I've come across a few issues...

First, I want to know if there are any objections to renaming files in
libscm-numbers like fixnum.* and double.* to cvt-fixnum.* and
cvt-double.* (with appropriate changes to the remaining files in both
libscm-numbers and libscm-numbers-reps).

The reason for this is two fold: first, I think it would help clear up
that the files simply perform a conversion between internal
representations representations and C representations -- at first I
thought the functions were meant to define constructors and accessors,
but as simple a change as this might make that a little more clear.

Second, in case the first wasn't strong enough, I would like to define
two new types, bignum and bigrat, and, following the pattern defined
in libscm/ and reps/, should name their source files bignum.* and
bignum-imp.* and bigrat.* and bigrat-imp.*, however, this conflicts if
I want bignum and bigrat conversion functions.

(I considered further recommending to rename the functions to
scm_cvt_number_to_fixnum and so forth, but I'm not sure that's
necessary.)

The second change I want to make is simply to rename fixcplxrat to
fixratcplx.  The second seems a more consistant naming pattern - any
complex type is defined as it's component types name with a 'cplx'
suffix.

Finally, between the r5rs defined scm_is_complex and
scm_make_rectangular functions, it impairs my choice of names that I
can use consistantly (to define a scm_make_<type> constructor and
scm_is_<type> predicate), but I just recalled Larceny uses rectnum so
I'll probably use that unless someone can recommend a better one.

Also, is using scmx_vtable_object_vtable "portable" for use in
libscm-numbers-reps?

-jivera



From MAILER-DAEMON Sun Jan 11 01:43:24 2004
Received: from list by monty-python.gnu.org with archive (Exim 4.24)
	id 1AfZJj-0006QD-Jb
	for mharc-pika-dev@gnu.org; Sun, 11 Jan 2004 01:43:23 -0500
Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.24)
	id 1AfZJh-0006Pa-8Z
	for pika-dev@nongnu.org; Sun, 11 Jan 2004 01:43:21 -0500
Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.24)
	id 1AfZJB-0005oZ-Ao
	for pika-dev@nongnu.org; Sun, 11 Jan 2004 01:43:20 -0500
Received: from [129.110.10.12] (helo=smtp1.utdallas.edu)
	by monty-python.gnu.org with esmtp (Exim 4.24) id 1AfZJA-0005nn-U9
	for pika-dev@nongnu.org; Sun, 11 Jan 2004 01:42:49 -0500
Received: from kaiser (bluesocket.utdallas.edu [129.110.39.12])
	by smtp1.utdallas.edu (Postfix) with ESMTP
	id F313D389038; Sat, 10 Jan 2004 23:41:18 -0600 (CST)
Received: from jivera by kaiser with local (Exim 3.35 #1 (Debian))
	id 1AfRnd-000189-00; Sat, 10 Jan 2004 23:41:45 +0100
To: "Jose A. Ortega Ruiz" <jao@gnu.org>
Subject: Re: [Pika-dev] viewarch
References: <87ad4vn4wf.fsf@turing.uab.es>
From: Matthew Dempsky <jivera@flame.org>
Date: Sat, 10 Jan 2004 23:41:45 +0100
In-Reply-To: <87ad4vn4wf.fsf@turing.uab.es> (Jose A. Ortega Ruiz's message
	of "Sat, 10 Jan 2004 17:29:36 +0100")
Message-ID: <87brpbl93q.fsf@flame.org>
User-Agent: Gnus/5.1002 (Gnus v5.10.2) Emacs/21.3 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Sender: Matthew Dempsky <jivera@utdallas.edu>
Cc: pika-dev@nongnu.org
X-BeenThere: pika-dev@nongnu.org
X-Mailman-Version: 2.1.2
Precedence: list
List-Id: <pika-dev.nongnu.org>
List-Unsubscribe: <http://mail.nongnu.org/mailman/listinfo/pika-dev>,
	<mailto:pika-dev-request@nongnu.org?subject=unsubscribe>
List-Archive: <http://mail.gnu.org/pipermail/pika-dev>
List-Post: <mailto:pika-dev@nongnu.org>
List-Help: <mailto:pika-dev-request@nongnu.org?subject=help>
List-Subscribe: <http://mail.nongnu.org/mailman/listinfo/pika-dev>,
	<mailto:pika-dev-request@nongnu.org?subject=subscribe>
X-List-Received-Date: Sun, 11 Jan 2004 06:43:21 -0000

"Jose A. Ortega Ruiz" <jao@gnu.org> writes:

> on an unrelated note, these days i've nothing to hack on pika: as
> always, suggestions are welcome! ;)

If you don't have anything else to worry about, maybe now would be a
good time to gather together some of Tom's emails from the srfi-50
mailing list and stick them into the Pika notes under rationale for
the FFI?

On a side note, you should probably stay out of the
libscm-numbers[-reps] directories if you're looking for something to
do because I've done some serious remodeling in there.  I'd recommend
you download my scm--numbers branch, but it doesn't compile and a lot
of the temporary names I've chosen were rather arbitrary until I could
decide on better solutions -- some functions don't even exist as stubs
yet.

-jivera



From MAILER-DAEMON Sun Jan 11 02:38:01 2004
Received: from list by monty-python.gnu.org with archive (Exim 4.24)
	id 1AfaAM-0003Tx-OF
	for mharc-pika-dev@gnu.org; Sun, 11 Jan 2004 02:37:46 -0500
Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.24)
	id 1AfaAA-00037V-Lq
	for pika-dev@nongnu.org; Sun, 11 Jan 2004 02:37:34 -0500
Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.24)
	id 1Afa9G-0001ot-7c
	for pika-dev@nongnu.org; Sun, 11 Jan 2004 02:37:10 -0500
Received: from [65.234.195.98] (helo=morrowfield.regexps.com)
	by monty-python.gnu.org with esmtp (Exim 4.24)
	id 1Afa8Y-00010f-7u; Sun, 11 Jan 2004 02:35:54 -0500
Received: (from lord@localhost)
	by morrowfield.regexps.com (8.9.1/8.9.1) id XAA20929;
	Sat, 10 Jan 2004 23:01:34 -0800 (PST)
	(envelope-from lord@morrowfield.regexps.com)
Date: Sat, 10 Jan 2004 23:01:34 -0800 (PST)
Message-Id: <200401110701.XAA20929@morrowfield.regexps.com>
From: Tom Lord <lord@emf.net>
To: jivera@flame.org
In-reply-to: <87brpbl93q.fsf@flame.org> (message from Matthew Dempsky on Sat, 
	10 Jan 2004 23:41:45 +0100)
Subject: Re: [Pika-dev] viewarch
References: <87ad4vn4wf.fsf@turing.uab.es> <87brpbl93q.fsf@flame.org>
Cc: pika-dev@nongnu.org
X-BeenThere: pika-dev@nongnu.org
X-Mailman-Version: 2.1.2
Precedence: list
List-Id: <pika-dev.nongnu.org>
List-Unsubscribe: <http://mail.nongnu.org/mailman/listinfo/pika-dev>,
	<mailto:pika-dev-request@nongnu.org?subject=unsubscribe>
List-Archive: <http://mail.gnu.org/pipermail/pika-dev>
List-Post: <mailto:pika-dev@nongnu.org>
List-Help: <mailto:pika-dev-request@nongnu.org?subject=help>
List-Subscribe: <http://mail.nongnu.org/mailman/listinfo/pika-dev>,
	<mailto:pika-dev-request@nongnu.org?subject=subscribe>
X-List-Received-Date: Sun, 11 Jan 2004 07:37:43 -0000



    > From: Matthew Dempsky <jivera@flame.org>

    > > on an unrelated note, these days i've nothing to hack on pika: as
    > > always, suggestions are welcome! ;)

    > If you don't have anything else to worry about, maybe now would be a
    > good time to gather together some of Tom's emails from the srfi-50
    > mailing list and stick them into the Pika notes under rationale for
    > the FFI?

    > On a side note, you should probably stay out of the
    > libscm-numbers[-reps] directories if you're looking for something to
    > do because I've done some serious remodeling in there.  I'd recommend
    > you download my scm--numbers branch, but it doesn't compile and a lot
    > of the temporary names I've chosen were rather arbitrary until I could
    > decide on better solutions -- some functions don't even exist as stubs
    > yet.


Another possibility (jao):  are you interested in strings?

I'm cranking (in bursts) some code in hackerlab in support of the
string type for Pika -- Unicode primitives and also stuff for
"edittable strings".   I'm behind in writing test cases for that new
stuff and, if you'd like, I can try to split the (non-test) coding
tasks with you.

Very briefly: it's stuff related to unicode string manipulation and
also edittable text.   My approach to edittable text is to represent
strings as splay trees (similar to "ropes" or "cords" -- c.f. Boehm
for examples and literature pointers).   My approach to
splay-trees-for-strings is slightly novel [*] in that I'm using
_functional_ splay trees -- the splaying operation doesn't mutate an
existing tree but returns a new one (sharing structure with the old)
instead. 


-t

[*] I say "novel" but, while I don't have a cite, I could swear that
this technique is one I picked up from 3rd hand rumours about lisp
machines.



From MAILER-DAEMON Sun Jan 11 02:41:33 2004
Received: from list by monty-python.gnu.org with archive (Exim 4.24)
	id 1AfaE1-0005Et-4p
	for mharc-pika-dev@gnu.org; Sun, 11 Jan 2004 02:41:33 -0500
Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.24)
	id 1AfaDy-0005Dz-Nu
	for pika-dev@nongnu.org; Sun, 11 Jan 2004 02:41:30 -0500
Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.24)
	id 1AfaCw-00050B-KZ
	for pika-dev@nongnu.org; Sun, 11 Jan 2004 02:40:57 -0500
Received: from [129.110.10.12] (helo=smtp1.utdallas.edu)
	by monty-python.gnu.org with esmtp (Exim 4.24) id 1AfaB7-0004Oz-PY
	for pika-dev@nongnu.org; Sun, 11 Jan 2004 02:38:33 -0500
Received: from kaiser (bluesocket.utdallas.edu [129.110.39.12])
	by smtp1.utdallas.edu (Postfix) with ESMTP
	id 1DB42388CC6; Sun, 11 Jan 2004 00:37:04 -0600 (CST)
Received: from jivera by kaiser with local (Exim 3.35 #1 (Debian))
	id 1AfSfb-000249-00; Sun, 11 Jan 2004 00:37:31 +0100
To: Tom Lord <lord@emf.net>
Subject: Re: [Pika-dev] Naming issues in implementing numbers
References: <87fzenl9y2.fsf@flame.org>
	<200401110654.WAA20910@morrowfield.regexps.com>
From: Matthew Dempsky <jivera@flame.org>
Date: Sun, 11 Jan 2004 00:37:31 +0100
In-Reply-To: <200401110654.WAA20910@morrowfield.regexps.com> (Tom Lord's
	message of "Sat, 10 Jan 2004 22:54:53 -0800 (PST)")
Message-ID: <871xq7l6is.fsf@flame.org>
User-Agent: Gnus/5.1002 (Gnus v5.10.2) Emacs/21.3 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Sender: Matthew Dempsky <jivera@utdallas.edu>
Cc: pika-dev@nongnu.org
X-BeenThere: pika-dev@nongnu.org
X-Mailman-Version: 2.1.2
Precedence: list
List-Id: <pika-dev.nongnu.org>
List-Unsubscribe: <http://mail.nongnu.org/mailman/listinfo/pika-dev>,
	<mailto:pika-dev-request@nongnu.org?subject=unsubscribe>
List-Archive: <http://mail.gnu.org/pipermail/pika-dev>
List-Post: <mailto:pika-dev@nongnu.org>
List-Help: <mailto:pika-dev-request@nongnu.org?subject=help>
List-Subscribe: <http://mail.nongnu.org/mailman/listinfo/pika-dev>,
	<mailto:pika-dev-request@nongnu.org?subject=subscribe>
X-List-Received-Date: Sun, 11 Jan 2004 07:41:31 -0000

Tom Lord <lord@emf.net> writes:

> I have no objection to such renames.  Thank goodness we aren't using
> CVS :-)

:-)

>     > Also, is using scmx_vtable_object_vtable "portable" for use in
>     > libscm-numbers-reps?
>
> You can do that for now.  I guess that you want it instead of
> `scm_value_vtable' for efficiency reasons? [...]

Oh, heh, I actually meant to use scm_value_vtable but I must have just
missed it in the vtable-obj-imp.h header.  I guess that answers my
question.  :-)

-jivera



From MAILER-DAEMON Sun Jan 11 03:01:50 2004
Received: from list by monty-python.gnu.org with archive (Exim 4.24)
	id 1AfaXd-0002Z8-52
	for mharc-pika-dev@gnu.org; Sun, 11 Jan 2004 03:01:49 -0500
Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.24)
	id 1AfaXW-0002Nv-7X
	for pika-dev@nongnu.org; Sun, 11 Jan 2004 03:01:42 -0500
Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.24)
	id 1AfaWv-0001wh-VR
	for pika-dev@nongnu.org; Sun, 11 Jan 2004 03:01:37 -0500
Received: from [199.232.41.8] (helo=mx20.gnu.org)
	by monty-python.gnu.org with esmtp (TLSv1:DES-CBC3-SHA:168)
	(Exim 4.24) id 1AfaWv-0001wb-Nc
	for pika-dev@nongnu.org; Sun, 11 Jan 2004 03:01:05 -0500
Received: from [65.234.195.98] (helo=morrowfield.regexps.com)
	by mx20.gnu.org with esmtp (Exim 4.24) id 1AfZ4X-0002lL-Pu
	for pika-dev@nongnu.org; Sun, 11 Jan 2004 01:27:42 -0500
Received: (from lord@localhost)
	by morrowfield.regexps.com (8.9.1/8.9.1) id WAA20910;
	Sat, 10 Jan 2004 22:54:53 -0800 (PST)
	(envelope-from lord@morrowfield.regexps.com)
Date: Sat, 10 Jan 2004 22:54:53 -0800 (PST)
Message-Id: <200401110654.WAA20910@morrowfield.regexps.com>
From: Tom Lord <lord@emf.net>
To: jivera@flame.org
In-reply-to: <87fzenl9y2.fsf@flame.org> (message from Matthew Dempsky on Sat, 
	10 Jan 2004 23:23:33 +0100)
Subject: Re: [Pika-dev] Naming issues in implementing numbers
References: <87fzenl9y2.fsf@flame.org>
Cc: pika-dev@nongnu.org
X-BeenThere: pika-dev@nongnu.org
X-Mailman-Version: 2.1.2
Precedence: list
List-Id: <pika-dev.nongnu.org>
List-Unsubscribe: <http://mail.nongnu.org/mailman/listinfo/pika-dev>,
	<mailto:pika-dev-request@nongnu.org?subject=unsubscribe>
List-Archive: <http://mail.gnu.org/pipermail/pika-dev>
List-Post: <mailto:pika-dev@nongnu.org>
List-Help: <mailto:pika-dev-request@nongnu.org?subject=help>
List-Subscribe: <http://mail.nongnu.org/mailman/listinfo/pika-dev>,
	<mailto:pika-dev-request@nongnu.org?subject=subscribe>
X-List-Received-Date: Sun, 11 Jan 2004 08:01:47 -0000



    > From: Matthew Dempsky <jivera@flame.org>

    > Alright, I've added about 1000 or so lines of code to the pika to
    > implement numbers and all (not finished yet, but it's quickly
    > approaching there), and I've come across a few issues...

    > First, I want to know if there are any objections to renaming files in
    > libscm-numbers like fixnum.* and double.* to cvt-fixnum.* and
    > cvt-double.* (with appropriate changes to the remaining files in both
    > libscm-numbers and libscm-numbers-reps).

    > The reason for this is two fold: first, I think it would help clear up
    > that the files simply perform a conversion between internal
    > representations representations and C representations -- at first I
    > thought the functions were meant to define constructors and accessors,
    > but as simple a change as this might make that a little more clear.

    > Second, in case the first wasn't strong enough, I would like to define
    > two new types, bignum and bigrat, and, following the pattern defined
    > in libscm/ and reps/, should name their source files bignum.* and
    > bignum-imp.* and bigrat.* and bigrat-imp.*, however, this conflicts if
    > I want bignum and bigrat conversion functions.

    > (I considered further recommending to rename the functions to
    > scm_cvt_number_to_fixnum and so forth, but I'm not sure that's
    > necessary.)

I have no objection to such renames.  Thank goodness we aren't using
CVS :-)


    > The second change I want to make is simply to rename fixcplxrat to
    > fixratcplx.  The second seems a more consistant naming pattern - any
    > complex type is defined as it's component types name with a 'cplx'
    > suffix.

Ok.

    > Finally, between the r5rs defined scm_is_complex and
    > scm_make_rectangular functions, it impairs my choice of names that I
    > can use consistantly (to define a scm_make_<type> constructor and
    > scm_is_<type> predicate), but I just recalled Larceny uses rectnum so
    > I'll probably use that unless someone can recommend a better one.

That's fine too.

    > Also, is using scmx_vtable_object_vtable "portable" for use in
    > libscm-numbers-reps?

You can do that for now.  I guess that you want it instead of
`scm_value_vtable' for efficiency reasons?  The right thing (slightly
obsessively), i think, is to make `scm_vtable_object_vtable' which is
defined only over vtable objects, is basically equivalent to
scmx_vtable_object, and returns the same answer as `scm_value_vtable'
for the intersection of their domains.


Yr favorite "Yes man",
-t



From MAILER-DAEMON Sun Jan 11 18:16:54 2004
Received: from list by monty-python.gnu.org with archive (Exim 4.24)
	id 1AfopB-0005fv-PD
	for mharc-pika-dev@gnu.org; Sun, 11 Jan 2004 18:16:53 -0500
Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.24)
	id 1Afop0-0005ZR-A7
	for pika-dev@nongnu.org; Sun, 11 Jan 2004 18:16:42 -0500
Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.24)
	id 1AfooK-0005Ez-Rs
	for pika-dev@nongnu.org; Sun, 11 Jan 2004 18:16:33 -0500
Received: from [199.232.41.8] (helo=mx20.gnu.org)
	by monty-python.gnu.org with esmtp (TLSv1:DES-CBC3-SHA:168)
	(Exim 4.24) id 1AfooK-0005EZ-AI
	for pika-dev@nongnu.org; Sun, 11 Jan 2004 18:16:00 -0500
Received: from [65.234.195.98] (helo=morrowfield.regexps.com)
	by mx20.gnu.org with esmtp (Exim 4.24)
	id 1AfnbB-0006Lb-Mi; Sun, 11 Jan 2004 16:58:22 -0500
Received: (from lord@localhost)
	by morrowfield.regexps.com (8.9.1/8.9.1) id OAA03327;
	Sun, 11 Jan 2004 14:25:48 -0800 (PST)
	(envelope-from lord@morrowfield.regexps.com)
Date: Sun, 11 Jan 2004 14:25:48 -0800 (PST)
Message-Id: <200401112225.OAA03327@morrowfield.regexps.com>
From: Tom Lord <lord@emf.net>
To: jao@gnu.org
In-reply-to: <87hdzcpnym.fsf@turing.uab.es> (jao@gnu.org)
Subject: Re: [Pika-dev] new code: character special names
References: <87hdzcpnym.fsf@turing.uab.es>
Cc: pika-dev@nongnu.org
X-BeenThere: pika-dev@nongnu.org
X-Mailman-Version: 2.1.2
Precedence: list
List-Id: <pika-dev.nongnu.org>
List-Unsubscribe: <http://mail.nongnu.org/mailman/listinfo/pika-dev>,
	<mailto:pika-dev-request@nongnu.org?subject=unsubscribe>
List-Archive: <http://mail.gnu.org/pipermail/pika-dev>
List-Post: <mailto:pika-dev@nongnu.org>
List-Help: <mailto:pika-dev-request@nongnu.org?subject=help>
List-Subscribe: <http://mail.nongnu.org/mailman/listinfo/pika-dev>,
	<mailto:pika-dev-request@nongnu.org?subject=subscribe>
X-List-Received-Date: Sun, 11 Jan 2004 23:16:50 -0000




    > From: "Jose A. Ortega Ruiz" <jao@gnu.org>
    > Date: Sun, 04 Jan 2004 01:16:49 +0100

    > happy new year!

Likewise.   My apologies for the delay I'm working on how to balance
work on arch with work on Pika and am off to a rocky start, it seems.

    > i've spent some time of my holidays writing a little bit of code for
    > pika. more concretely (and following tom's suggestion), i've extended
    > the special character names handled by read and write: all usual names
    > (newline, return, page, etc.) plus standard ASCII names are included
    > (in fact, the same set as systas').

    > i've also spent sometime with tla 1.2 and i've created a new _signed_[1]
    > archive with the following coordinates:

This looks well done.

    > - - i've tried to hide away all details of char representation and name
    >   handling inside reps/char-imp.c (for instance, avoiding explicit bit
    >   twiddling in lexer.c, and things like that.)

I've moved the the codepoint and buckybit conversions to and from
strings to libscm/chars.c.  Those should be stable even under changes
to object representations and GC strategies.  Pika is Unicode centric
and makes up (drawing on emacs) its own standard for buckybits.


    > - - i've noticed that pointer arguments are seldom checked for
    >   non-nullness: i've used now and then invariant(arg != 0) in my new
    >   functions, but maybe not checking is a design issue?

Because of the calling conventions being used, unless an argument
parameter is not optional, it should not ever be null.   Invariants
aren't going to hurt there.

Perhaps return parameters should be permitted to be null -- I hadn't
considered it.


    > - - i've also missed the (consistent) use of 'const' qualifiers for
    >   pointer parameters of functions (what the c++ people call
    >   const-correctness). from my previous experience, a rigorous use of
    >   'const' improves the code's consistency and 'self-documentedness'.
    >   i've already used it in my pika hacks, but of course it must be a
    >   shared policy to be of any use. if you think it's worth the effort,
    >   i volunteer to review the current pika source tree to make it
    >   'const-correct'. but, again, maybe i am missing some design issue...


That's more just my bigotry and old-fasionedness than anything.   I
tend to just avoid const always because in my experience it hurts more
than helps.   However, I've left in your decls for now because I'm not
sure I'm not being just silly about that.

    > - - tom, i think my changes are quite self-explanatory, but if you want
    >   me to explain them in more detail to save you time, just ask! :).
    >   also, please let me know if the archive change poses any problem
    >   (the old one is still alive, btw).

It's all just fine.  I'm pushing the merge now.

-t






From MAILER-DAEMON Sun Jan 11 19:16:11 2004
Received: from list by monty-python.gnu.org with archive (Exim 4.24)
	id 1AfpkY-0001ZN-L3
	for mharc-pika-dev@gnu.org; Sun, 11 Jan 2004 19:16:10 -0500
Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.24)
	id 1AfpkV-0001Yl-VR
	for pika-dev@nongnu.org; Sun, 11 Jan 2004 19:16:07 -0500
Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.24)
	id 1Afpjy-0001Pl-1j
	for pika-dev@nongnu.org; Sun, 11 Jan 2004 19:16:05 -0500
Received: from [199.232.41.8] (helo=mx20.gnu.org)
	by monty-python.gnu.org with esmtp (TLSv1:DES-CBC3-SHA:168)
	(Exim 4.24) id 1Afpjx-0001PR-CE
	for pika-dev@nongnu.org; Sun, 11 Jan 2004 19:15:33 -0500
Received: from [80.33.152.103] (helo=turing.uab.es)
	by mx20.gnu.org with esmtp (Exim 4.24) id 1AfokS-0004rB-7H
	for pika-dev@nongnu.org; Sun, 11 Jan 2004 18:12:00 -0500
Received: from jao by turing.uab.es with local (Exim 4.30)
	id 1AfokB-0005mA-Q9; Mon, 12 Jan 2004 00:11:43 +0100
To: pika-dev@nongnu.org
Subject: Re: [Pika-dev] viewarch
X-Attribution: jao
X-URL: <http://tao.uab.es/jao/>
References: <87ad4vn4wf.fsf@turing.uab.es> <87brpbl93q.fsf@flame.org>
	<200401110701.XAA20929@morrowfield.regexps.com>
From: "Jose A. Ortega Ruiz" <jao@gnu.org>
Organization: CCD - Autonomous University of Barcelona
Face: iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAMAAABg3Am1AAAAYFBMVEUICAj////4+Pjw8PAY
	GBhYWFjg4OAQEBDQ0NC4uLjo6OjIyMg4ODggICBgYGBAQEAoKCiIiIhQUFCYmJiwsLBoaGiQkJBw
	cHCAgICgoKBISEgwMDCoqKjY2NjAwMB4eHjpzs9HAAAAAWJLR0QAiAUdSAAAAAlwSFlzAAALEgAA
	CxIB0t1+/AAAAAd0SU1FB9MMFhUWOMaLTbEAAAHBSURBVHic1VXLoqMgDDUgKIIiiPVt//8vb2jV
	3s60IruZbMjinOTkYUyS/8LKMpIgizmO4gDyKIYmBEQMoS4AIIskRGVQBKCPIWgk6M3PrkizAHRz
	x4IIFiTcsa34lMysFMuHpQoQZiQ0wrcKDeVBcQJOx35FDCEFl2Iw99aytqq/gVXv4yKeMxUu1gqO
	yYWxA8AcRKNlnZx98kwChKp8M5wzjVq9DsDF4BNxKJrEhaElEwH+UDQ12ASSBykGoMGHSQqPMdP0
	HJ9yIKNuCuD9VGIK6AIJ2GMdimFEX6O7hhThEPjaPmXckKoDeAy6uC471DWhBA6oKofceh/LzwMV
	+3vhY7ZFkyaKYvmhBII8Z8CoVPKCIAZkG7Kl9IKgjL/2uoWD/N3Mr5jYXiKnc7yiVO3+jcBC8cM7
	FbSAPQQRkCkjQG4nhAHM7iLUi+v9tqpv+PYVzVJwj2Ebv1fm8zlQ9MBj/NsGGvxV4p+6VecHvqL8
	WOlMeAbIv4ov1/sOMWT+dbfS/Hn+ZPU2xNLtMWuXvwuol+1iLuZVftrs/axc++c6KA6bUbcPMt01
	KPthe0b/adNc9PrqtdId03XML++ftx9ClhEPheraiAAAAABJRU5ErkJggg==
Date: Mon, 12 Jan 2004 00:11:43 +0100
In-Reply-To: <200401110701.XAA20929@morrowfield.regexps.com> (Tom Lord's
	message of "Sat, 10 Jan 2004 23:01:34 -0800 (PST)")
Message-ID: <87lloejd1s.fsf@turing.uab.es>
User-Agent: Gnus/5.1006 (Gnus v5.10.6) Emacs/21.3 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Sender: Jose Antonio Ortega Ruiz <jao@abra.uab.es>
Cc: 
X-BeenThere: pika-dev@nongnu.org
X-Mailman-Version: 2.1.2
Precedence: list
List-Id: <pika-dev.nongnu.org>
List-Unsubscribe: <http://mail.nongnu.org/mailman/listinfo/pika-dev>,
	<mailto:pika-dev-request@nongnu.org?subject=unsubscribe>
List-Archive: <http://mail.gnu.org/pipermail/pika-dev>
List-Post: <mailto:pika-dev@nongnu.org>
List-Help: <mailto:pika-dev-request@nongnu.org?subject=help>
List-Subscribe: <http://mail.nongnu.org/mailman/listinfo/pika-dev>,
	<mailto:pika-dev-request@nongnu.org?subject=subscribe>
X-List-Received-Date: Mon, 12 Jan 2004 00:16:08 -0000

Tom Lord <lord@emf.net> writes:

>
> Another possibility (jao):  are you interested in strings?
>

sure.

> I'm cranking (in bursts) some code in hackerlab in support of the
> string type for Pika -- Unicode primitives and also stuff for
> "edittable strings".   I'm behind in writing test cases for that new
> stuff and, if you'd like, I can try to split the (non-test) coding
> tasks with you.
>

yes, please. just point me to the concrete files/tasks, if possible.
in the meantime, i'm reading about ropes and splay trees (looks quite
entertaining)

jao
-- 
Think not those faithful who praise all thy words and actions; but those
who kindly reprove thy faults. -Socrates, philosopher (469?-399 BCE)



From MAILER-DAEMON Mon Jan 12 10:55:58 2004
Received: from list by monty-python.gnu.org with archive (Exim 4.24)
	id 1Ag4Q2-0007xN-4v
	for mharc-pika-dev@gnu.org; Mon, 12 Jan 2004 10:55:58 -0500
Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.24)
	id 1Ag4Pz-0007wt-SJ
	for pika-dev@nongnu.org; Mon, 12 Jan 2004 10:55:55 -0500
Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.24)
	id 1Ag4PT-0007pY-Os
	for pika-dev@nongnu.org; Mon, 12 Jan 2004 10:55:54 -0500
Received: from [129.110.10.12] (helo=smtp1.utdallas.edu)
	by monty-python.gnu.org with esmtp (Exim 4.24) id 1Ag4PT-0007oz-Fq
	for pika-dev@nongnu.org; Mon, 12 Jan 2004 10:55:23 -0500
Received: from kaiser (bluesocket.utdallas.edu [129.110.39.12])
	by smtp1.utdallas.edu (Postfix) with ESMTP id 01FC53895BD
	for <pika-dev@nongnu.org>; Mon, 12 Jan 2004 08:53:17 -0600 (CST)
Received: from jivera by kaiser with local (Exim 3.35 #1 (Debian))
	id 1AfwtO-0000cP-00
	for <pika-dev@nongnu.org>; Mon, 12 Jan 2004 08:53:46 +0100
To: pika-dev@nongnu.org
From: Matthew Dempsky <jivera@flame.org>
Date: Mon, 12 Jan 2004 08:53:46 +0100
Message-ID: <87hdz1zjp1.fsf@flame.org>
User-Agent: Gnus/5.1002 (Gnus v5.10.2) Emacs/21.3 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Sender: Matthew Dempsky <jivera@utdallas.edu>
Subject: [Pika-dev] status on numbers
X-BeenThere: pika-dev@nongnu.org
X-Mailman-Version: 2.1.2
Precedence: list
List-Id: <pika-dev.nongnu.org>
List-Unsubscribe: <http://mail.nongnu.org/mailman/listinfo/pika-dev>,
	<mailto:pika-dev-request@nongnu.org?subject=unsubscribe>
List-Archive: <http://mail.gnu.org/pipermail/pika-dev>
List-Post: <mailto:pika-dev@nongnu.org>
List-Help: <mailto:pika-dev-request@nongnu.org?subject=help>
List-Subscribe: <http://mail.nongnu.org/mailman/listinfo/pika-dev>,
	<mailto:pika-dev-request@nongnu.org?subject=subscribe>
X-List-Received-Date: Mon, 12 Jan 2004 15:55:56 -0000

Yesterday my network connection was out so I wasn't able to commit
anything to my archive, but this morning I finally committed patch-37
to my scm--numbers branch which fixed everything so all my new code
compiles.  I haven't written any unit tests yet, but I'm fairly happy
with the state of things.

Basically here's how it goes:

* NUMERIC_BINOP and NUMERIC_MONOP still need to be fixed to not
  destroy their arguments.

* scm_multiply needs a safe way to detect overflow when multiplying to
  fixnums - I was lazy and just use the built-in multiplication
  routine which will work as long as there isn't overflow.

* scm_quotient, scm_remainder, scm_modulo, scm_rationalize, and
  scm_expt still need to be implemented.

* The transcendental functions (sin, exp, etc.) still need to be
  implemented for complex numbers.  (SISC's code uses hyperbolic
  functions which don't exist in R5RS, but I might add them anyways
  unless there are any objections.)

* I originally implemented scm_truncate using trunc() from math.h only
  to find out it's only available in C99, so it's commented out at the
  moment.

* (sqrt 4) => 2.0

* scm_raise_for_binop isn't implemented yet for complex types.

I'm going to try to port some unit tests and benchmarks over to C so I
can verify that I'm getting the right results from this and I probably
won't move the code into scm--integration until I'm more confident in
this work.  (This is the first time it's compiled since patch-13.)

I also started hacked together a simple stop-and-copy garbage
collector, but it's not commited yet.  Once I get some more free time
later today I'll try to setup another spot in my archive for it.

-jivera



From MAILER-DAEMON Mon Jan 12 13:38:10 2004
Received: from list by monty-python.gnu.org with archive (Exim 4.24)
	id 1Ag6wz-0001kv-Pz
	for mharc-pika-dev@gnu.org; Mon, 12 Jan 2004 13:38:09 -0500
Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.24)
	id 1Ag5FH-0000EP-0i
	for pika-dev@nongnu.org; Mon, 12 Jan 2004 11:48:55 -0500
Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.24)
	id 1Ag5EZ-0008QN-Tm
	for pika-dev@nongnu.org; Mon, 12 Jan 2004 11:48:43 -0500
Received: from [65.234.195.98] (helo=morrowfield.regexps.com)
	by monty-python.gnu.org with esmtp (Exim 4.24) id 1Ag5Dv-0008B2-EL
	for pika-dev@nongnu.org; Mon, 12 Jan 2004 11:47:32 -0500
Received: (from lord@localhost)
	by morrowfield.regexps.com (8.9.1/8.9.1) id IAA06663;
	Mon, 12 Jan 2004 08:13:31 -0800 (PST)
	(envelope-from lord@morrowfield.regexps.com)
Date: Mon, 12 Jan 2004 08:13:31 -0800 (PST)
Message-Id: <200401121613.IAA06663@morrowfield.regexps.com>
From: Tom Lord <lord@emf.net>
To: jivera@flame.org
In-reply-to: <87hdz1zjp1.fsf@flame.org> (message from Matthew Dempsky on Mon, 
	12 Jan 2004 08:53:46 +0100)
Subject: Re: [Pika-dev] status on numbers
References: <87hdz1zjp1.fsf@flame.org>
Cc: pika-dev@nongnu.org
X-BeenThere: pika-dev@nongnu.org
X-Mailman-Version: 2.1.2
Precedence: list
List-Id: <pika-dev.nongnu.org>
List-Unsubscribe: <http://mail.nongnu.org/mailman/listinfo/pika-dev>,
	<mailto:pika-dev-request@nongnu.org?subject=unsubscribe>
List-Archive: <http://mail.gnu.org/pipermail/pika-dev>
List-Post: <mailto:pika-dev@nongnu.org>
List-Help: <mailto:pika-dev-request@nongnu.org?subject=help>
List-Subscribe: <http://mail.nongnu.org/mailman/listinfo/pika-dev>,
	<mailto:pika-dev-request@nongnu.org?subject=subscribe>
X-List-Received-Date: Mon, 12 Jan 2004 18:38:07 -0000



    > From: Matthew Dempsky <jivera@flame.org>

    > Yesterday my network connection was out so I wasn't able to commit
    > anything to my archive, but this morning I finally committed patch-37
    > to my scm--numbers branch which fixed everything so all my new code
    > compiles.  I haven't written any unit tests yet, but I'm fairly happy
    > with the state of things.

I will go ahead and merge then just to get it in the hub archive.

    > I also started hacked together a simple stop-and-copy garbage
    > collector, but it's not commited yet.  Once I get some more free
    > time later today I'll try to setup another spot in my archive
    > for it.

Holy cow, man!

-t




From MAILER-DAEMON Mon Jan 12 14:46:51 2004
Received: from list by monty-python.gnu.org with archive (Exim 4.24)
	id 1Ag81S-000260-RH
	for mharc-pika-dev@gnu.org; Mon, 12 Jan 2004 14:46:50 -0500
Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.24)
	id 1Ag812-0001zy-Kb
	for pika-dev@nongnu.org; Mon, 12 Jan 2004 14:46:24 -0500
Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.24)
	id 1Ag7wJ-0000Q4-D5
	for pika-dev@nongnu.org; Mon, 12 Jan 2004 14:42:02 -0500
Received: from [65.234.195.210] (helo=morrowfield.regexps.com)
	by monty-python.gnu.org with esmtp (Exim 4.24) id 1Ag7wI-0000OU-3V
	for pika-dev@nongnu.org; Mon, 12 Jan 2004 14:41:30 -0500
Received: (from lord@localhost)
	by morrowfield.regexps.com (8.9.1/8.9.1) id LAA07457;
	Mon, 12 Jan 2004 11:07:15 -0800 (PST)
	(envelope-from lord@morrowfield.regexps.com)
Date: Mon, 12 Jan 2004 11:07:15 -0800 (PST)
Message-Id: <200401121907.LAA07457@morrowfield.regexps.com>
From: Tom Lord <lord@emf.net>
To: jivera@flame.org
In-reply-to: <87hdz1z9l7.fsf@flame.org> (message from Matthew Dempsky on Mon, 
	12 Jan 2004 12:32:04 +0100)
Subject: Re: [Pika-dev] status on numbers
References: <87hdz1zjp1.fsf@flame.org>
	<200401121613.IAA06663@morrowfield.regexps.com>
	<87hdz1z9l7.fsf@flame.org>
Cc: pika-dev@nongnu.org
X-BeenThere: pika-dev@nongnu.org
X-Mailman-Version: 2.1.2
Precedence: list
List-Id: <pika-dev.nongnu.org>
List-Unsubscribe: <http://mail.nongnu.org/mailman/listinfo/pika-dev>,
	<mailto:pika-dev-request@nongnu.org?subject=unsubscribe>
List-Archive: <http://mail.gnu.org/pipermail/pika-dev>
List-Post: <mailto:pika-dev@nongnu.org>
List-Help: <mailto:pika-dev-request@nongnu.org?subject=help>
List-Subscribe: <http://mail.nongnu.org/mailman/listinfo/pika-dev>,
	<mailto:pika-dev-request@nongnu.org?subject=subscribe>
X-List-Received-Date: Mon, 12 Jan 2004 19:46:49 -0000


    > From: Matthew Dempsky <jivera@flame.org>

    > > I will go ahead and merge then just to get it in the hub archive.

    > Ack, sorry, I gave you the wrong patch number -- it's patch-38
    > actually (but I'm sure you'd figure that out since patch-37 is far
    > from compilable).

That was obvious from the log messages :-)

    > Also, the way I have my trees setup is I was intending for any patches
    > I write to get pushed to you through jivera@flame.org--2004's
    > scm--integration branch rather than directly.

Ok.  (Too late for this merge but....)


    > >     > I also started hacked together a simple stop-and-copy garbage
    > >     > collector, but it's not commited yet.  Once I get some more free
    > >     > time later today I'll try to setup another spot in my archive
    > >     > for it.

    > > Holy cow, man!

    > Once you've had a chance to sync up with me I'll try to figure out
    > what tree would be best to tag off into my scm--copying-gc branch and
    > then commit the code there.

The numbers stuff is merged and pushed.   The gmp foo in the configure
process is provisional but simple:  use --with gmp-prefix SOMEDIR if 
gmp is elsewhere besides /usr/include/gmp.h and /usr/lib/libgmp.a

One thing I notice is that you haven't added your name to the
copyright notices on the files you've contributed tons of code to.   
Please do when you have a chance.


-t




From MAILER-DAEMON Mon Jan 12 14:56:50 2004
Received: from list by monty-python.gnu.org with archive (Exim 4.24)
	id 1Ag8B8-0004zD-9R
	for mharc-pika-dev@gnu.org; Mon, 12 Jan 2004 14:56:50 -0500
Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.24)
	id 1Ag8B5-0004xH-Ac
	for pika-dev@nongnu.org; Mon, 12 Jan 2004 14:56:47 -0500
Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.24)
	id 1Ag8AR-0004f0-M7
	for pika-dev@nongnu.org; Mon, 12 Jan 2004 14:56:38 -0500
Received: from [199.232.41.8] (helo=mx20.gnu.org)
	by monty-python.gnu.org with esmtp (TLSv1:DES-CBC3-SHA:168)
	(Exim 4.24) id 1Ag8AQ-0003zQ-Rg
	for pika-dev@nongnu.org; Mon, 12 Jan 2004 14:56:06 -0500
Received: from [65.234.195.210] (helo=morrowfield.regexps.com)
	by mx20.gnu.org with esmtp (Exim 4.24) id 1Ag7Ct-0003OV-OB
	for pika-dev@nongnu.org; Mon, 12 Jan 2004 13:54:36 -0500
Received: (from lord@localhost)
	by morrowfield.regexps.com (8.9.1/8.9.1) id LAA07517;
	Mon, 12 Jan 2004 11:21:36 -0800 (PST)
	(envelope-from lord@morrowfield.regexps.com)
Date: Mon, 12 Jan 2004 11:21:36 -0800 (PST)
Message-Id: <200401121921.LAA07517@morrowfield.regexps.com>
From: Tom Lord <lord@emf.net>
To: lord@emf.net
In-reply-to: <200401121907.LAA07457@morrowfield.regexps.com> (message from Tom
	Lord on Mon, 12 Jan 2004 11:07:15 -0800 (PST))
Subject: Re: [Pika-dev] status on numbers
References: <87hdz1zjp1.fsf@flame.org>
	<200401121613.IAA06663@morrowfield.regexps.com>
	<87hdz1z9l7.fsf@flame.org>
	<200401121907.LAA07457@morrowfield.regexps.com>
Cc: jivera@flame.org, pika-dev@nongnu.org
X-BeenThere: pika-dev@nongnu.org
X-Mailman-Version: 2.1.2
Precedence: list
List-Id: <pika-dev.nongnu.org>
List-Unsubscribe: <http://mail.nongnu.org/mailman/listinfo/pika-dev>,
	<mailto:pika-dev-request@nongnu.org?subject=unsubscribe>
List-Archive: <http://mail.gnu.org/pipermail/pika-dev>
List-Post: <mailto:pika-dev@nongnu.org>
List-Help: <mailto:pika-dev-request@nongnu.org?subject=help>
List-Subscribe: <http://mail.nongnu.org/mailman/listinfo/pika-dev>,
	<mailto:pika-dev-request@nongnu.org?subject=subscribe>
X-List-Received-Date: Mon, 12 Jan 2004 19:56:48 -0000



    > From: Tom Lord <lord@emf.net>

    > One thing I notice is that you haven't added your name to the
    > copyright notices on the files you've contributed tons of code to.   
    > Please do when you have a chance.

Oops -- not entirely accurate.  It's there in some of them.
I assume you don't mind if I fill them in where I think they're
missing.

-t




From MAILER-DAEMON Mon Jan 12 15:23:43 2004
Received: from list by monty-python.gnu.org with archive (Exim 4.24)
	id 1Ag8b5-0007SZ-Uq
	for mharc-pika-dev@gnu.org; Mon, 12 Jan 2004 15:23:39 -0500
Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.24)
	id 1Ag8b3-0007Rn-PJ
	for pika-dev@nongnu.org; Mon, 12 Jan 2004 15:23:37 -0500
Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.24)
	id 1Ag8aQ-0007Eb-Ip
	for pika-dev@nongnu.org; Mon, 12 Jan 2004 15:23:36 -0500
Received: from [199.232.41.8] (helo=mx20.gnu.org)
	by monty-python.gnu.org with esmtp (TLSv1:DES-CBC3-SHA:168)
	(Exim 4.24) id 1Ag7pZ-0005JO-4y
	for pika-dev@nongnu.org; Mon, 12 Jan 2004 14:34:33 -0500
Received: from [129.110.10.12] (helo=smtp1.utdallas.edu)
	by mx20.gnu.org with esmtp (Exim 4.24) id 1Ag6qt-0001vH-J0
	for pika-dev@nongnu.org; Mon, 12 Jan 2004 13:31:51 -0500
Received: from kaiser (bluesocket.utdallas.edu [129.110.39.12])
	by smtp1.utdallas.edu (Postfix) with ESMTP id 215D738966C;
	Mon, 12 Jan 2004 12:31:35 -0600 (CST)
Received: from jivera by kaiser with local (Exim 3.35 #1 (Debian))
	id 1Ag0Ie-0000zl-00; Mon, 12 Jan 2004 12:32:04 +0100
To: Tom Lord <lord@emf.net>
Subject: Re: [Pika-dev] status on numbers
References: <87hdz1zjp1.fsf@flame.org>
	<200401121613.IAA06663@morrowfield.regexps.com>
From: Matthew Dempsky <jivera@flame.org>
Date: Mon, 12 Jan 2004 12:32:04 +0100
In-Reply-To: <200401121613.IAA06663@morrowfield.regexps.com> (Tom Lord's
	message of "Mon, 12 Jan 2004 08:13:31 -0800 (PST)")
Message-ID: <87hdz1z9l7.fsf@flame.org>
User-Agent: Gnus/5.1002 (Gnus v5.10.2) Emacs/21.3 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Sender: Matthew Dempsky <jivera@utdallas.edu>
Cc: pika-dev@nongnu.org
X-BeenThere: pika-dev@nongnu.org
X-Mailman-Version: 2.1.2
Precedence: list
List-Id: <pika-dev.nongnu.org>
List-Unsubscribe: <http://mail.nongnu.org/mailman/listinfo/pika-dev>,
	<mailto:pika-dev-request@nongnu.org?subject=unsubscribe>
List-Archive: <http://mail.gnu.org/pipermail/pika-dev>
List-Post: <mailto:pika-dev@nongnu.org>
List-Help: <mailto:pika-dev-request@nongnu.org?subject=help>
List-Subscribe: <http://mail.nongnu.org/mailman/listinfo/pika-dev>,
	<mailto:pika-dev-request@nongnu.org?subject=subscribe>
X-List-Received-Date: Mon, 12 Jan 2004 20:23:38 -0000

Tom Lord <lord@emf.net> writes:

>     > From: Matthew Dempsky <jivera@flame.org>
>
>     > Yesterday my network connection was out so I wasn't able to commit
>     > anything to my archive, but this morning I finally committed patch-37
>     > to my scm--numbers branch which fixed everything so all my new code
>     > compiles.  I haven't written any unit tests yet, but I'm fairly happy
>     > with the state of things.
>
> I will go ahead and merge then just to get it in the hub archive.

Ack, sorry, I gave you the wrong patch number -- it's patch-38
actually (but I'm sure you'd figure that out since patch-37 is far
from compilable).

Also, the way I have my trees setup is I was intending for any patches
I write to get pushed to you through jivera@flame.org--2004's
scm--integration branch rather than directly.

>     > I also started hacked together a simple stop-and-copy garbage
>     > collector, but it's not commited yet.  Once I get some more free
>     > time later today I'll try to setup another spot in my archive
>     > for it.
>
> Holy cow, man!

Once you've had a chance to sync up with me I'll try to figure out
what tree would be best to tag off into my scm--copying-gc branch and
then commit the code there.

> -t

-jivera



From MAILER-DAEMON Mon Jan 12 16:13:44 2004
Received: from list by monty-python.gnu.org with archive (Exim 4.24)
	id 1Ag9NX-0006qz-Mw
	for mharc-pika-dev@gnu.org; Mon, 12 Jan 2004 16:13:43 -0500
Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.24)
	id 1Ag9NS-0006pU-4M
	for pika-dev@nongnu.org; Mon, 12 Jan 2004 16:13:38 -0500
Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.24)
	id 1Ag9Mu-0006dV-VI
	for pika-dev@nongnu.org; Mon, 12 Jan 2004 16:13:36 -0500
Received: from [129.110.10.12] (helo=smtp1.utdallas.edu)
	by monty-python.gnu.org with esmtp (Exim 4.24) id 1Ag9Mu-0006dJ-Me
	for pika-dev@nongnu.org; Mon, 12 Jan 2004 16:13:04 -0500
Received: from kaiser (bluesocket.utdallas.edu [129.110.39.12])
	by smtp1.utdallas.edu (Postfix) with ESMTP id CE5AA3896B6;
	Mon, 12 Jan 2004 14:10:33 -0600 (CST)
Received: from jivera by kaiser with local (Exim 3.35 #1 (Debian))
	id 1Ag1qR-0004kH-00; Mon, 12 Jan 2004 14:11:03 +0100
To: Tom Lord <lord@emf.net>
Subject: Re: [Pika-dev] status on numbers
References: <87hdz1zjp1.fsf@flame.org>
	<200401121613.IAA06663@morrowfield.regexps.com>
	<87hdz1z9l7.fsf@flame.org>
	<200401121907.LAA07457@morrowfield.regexps.com>
	<200401121921.LAA07517@morrowfield.regexps.com>
From: Matthew Dempsky <jivera@flame.org>
Date: Mon, 12 Jan 2004 14:11:03 +0100
In-Reply-To: <200401121921.LAA07517@morrowfield.regexps.com> (Tom Lord's
	message of "Mon, 12 Jan 2004 11:21:36 -0800 (PST)")
Message-ID: <874qv1z508.fsf@flame.org>
User-Agent: Gnus/5.1002 (Gnus v5.10.2) Emacs/21.3 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Sender: Matthew Dempsky <jivera@utdallas.edu>
Cc: pika-dev@nongnu.org
X-BeenThere: pika-dev@nongnu.org
X-Mailman-Version: 2.1.2
Precedence: list
List-Id: <pika-dev.nongnu.org>
List-Unsubscribe: <http://mail.nongnu.org/mailman/listinfo/pika-dev>,
	<mailto:pika-dev-request@nongnu.org?subject=unsubscribe>
List-Archive: <http://mail.gnu.org/pipermail/pika-dev>
List-Post: <mailto:pika-dev@nongnu.org>
List-Help: <mailto:pika-dev-request@nongnu.org?subject=help>
List-Subscribe: <http://mail.nongnu.org/mailman/listinfo/pika-dev>,
	<mailto:pika-dev-request@nongnu.org?subject=subscribe>
X-List-Received-Date: Mon, 12 Jan 2004 21:13:38 -0000

Tom Lord <lord@emf.net> writes:

>     > From: Tom Lord <lord@emf.net>
>
>     > One thing I notice is that you haven't added your name to the
>     > copyright notices on the files you've contributed tons of code to.   
>     > Please do when you have a chance.
>
> Oops -- not entirely accurate.  It's there in some of them.
> I assume you don't mind if I fill them in where I think they're
> missing.

Of course not.  I was considering doing that myself, but I was afraid
maybe that would appear arrogant.  (I'm not entirely familiar with how
that should be handled so I was playing conservatively.)

-jivera



From MAILER-DAEMON Mon Jan 12 22:19:10 2004
Received: from list by monty-python.gnu.org with archive (Exim 4.24)
	id 1AgEmo-0006M9-3f
	for mharc-pika-dev@gnu.org; Mon, 12 Jan 2004 22:00:10 -0500
Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.24)
	id 1AgEjc-0004se-Ob
	for pika-dev@nongnu.org; Mon, 12 Jan 2004 21:56:52 -0500
Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.24)
	id 1AgDIz-0004To-Vn
	for pika-dev@nongnu.org; Mon, 12 Jan 2004 20:25:49 -0500
Received: from [199.232.41.8] (helo=mx20.gnu.org)
	by monty-python.gnu.org with esmtp (TLSv1:DES-CBC3-SHA:168)
	(Exim 4.24) id 1AgDIz-0004TY-KW
	for pika-dev@nongnu.org; Mon, 12 Jan 2004 20:25:17 -0500
Received: from [80.33.152.103] (helo=turing.uab.es)
	by mx20.gnu.org with esmtp (Exim 4.24) id 1AgCGE-0006Qh-MB
	for pika-dev@nongnu.org; Mon, 12 Jan 2004 19:18:23 -0500
Received: from jao by turing.uab.es with local (Exim 4.30)
	id 1AgCG1-000822-Qx; Tue, 13 Jan 2004 01:18:09 +0100
To: pika-dev@nongnu.org
Subject: Re: [Pika-dev] new code: character special names
X-Attribution: jao
X-URL: <http://tao.uab.es/jao/>
References: <87hdzcpnym.fsf@turing.uab.es>
	<200401112225.OAA03327@morrowfield.regexps.com>
From: "Jose A. Ortega Ruiz" <jao@gnu.org>
Organization: CCD - Autonomous University of Barcelona
Face: iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAMAAABg3Am1AAAAYFBMVEUICAj////4+Pjw8PAY
	GBhYWFjg4OAQEBDQ0NC4uLjo6OjIyMg4ODggICBgYGBAQEAoKCiIiIhQUFCYmJiwsLBoaGiQkJBw
	cHCAgICgoKBISEgwMDCoqKjY2NjAwMB4eHjpzs9HAAAAAWJLR0QAiAUdSAAAAAlwSFlzAAALEgAA
	CxIB0t1+/AAAAAd0SU1FB9MMFhUWOMaLTbEAAAHBSURBVHic1VXLoqMgDDUgKIIiiPVt//8vb2jV
	3s60IruZbMjinOTkYUyS/8LKMpIgizmO4gDyKIYmBEQMoS4AIIskRGVQBKCPIWgk6M3PrkizAHRz
	x4IIFiTcsa34lMysFMuHpQoQZiQ0wrcKDeVBcQJOx35FDCEFl2Iw99aytqq/gVXv4yKeMxUu1gqO
	yYWxA8AcRKNlnZx98kwChKp8M5wzjVq9DsDF4BNxKJrEhaElEwH+UDQ12ASSBykGoMGHSQqPMdP0
	HJ9yIKNuCuD9VGIK6AIJ2GMdimFEX6O7hhThEPjaPmXckKoDeAy6uC471DWhBA6oKofceh/LzwMV
	+3vhY7ZFkyaKYvmhBII8Z8CoVPKCIAZkG7Kl9IKgjL/2uoWD/N3Mr5jYXiKnc7yiVO3+jcBC8cM7
	FbSAPQQRkCkjQG4nhAHM7iLUi+v9tqpv+PYVzVJwj2Ebv1fm8zlQ9MBj/NsGGvxV4p+6VecHvqL8
	WOlMeAbIv4ov1/sOMWT+dbfS/Hn+ZPU2xNLtMWuXvwuol+1iLuZVftrs/axc++c6KA6bUbcPMt01
	KPthe0b/adNc9PrqtdId03XML++ftx9ClhEPheraiAAAAABJRU5ErkJggg==
Date: Tue, 13 Jan 2004 01:18:09 +0100
In-Reply-To: <200401112225.OAA03327@morrowfield.regexps.com> (Tom Lord's
	message of "Sun, 11 Jan 2004 14:25:48 -0800 (PST)")
Message-ID: <87llocem66.fsf@turing.uab.es>
User-Agent: Gnus/5.1006 (Gnus v5.10.6) Emacs/21.3 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Sender: Jose Antonio Ortega Ruiz <jao@abra.uab.es>
Cc: 
X-BeenThere: pika-dev@nongnu.org
X-Mailman-Version: 2.1.2
Precedence: list
List-Id: <pika-dev.nongnu.org>
List-Unsubscribe: <http://mail.nongnu.org/mailman/listinfo/pika-dev>,
	<mailto:pika-dev-request@nongnu.org?subject=unsubscribe>
List-Archive: <http://mail.gnu.org/pipermail/pika-dev>
List-Post: <mailto:pika-dev@nongnu.org>
List-Help: <mailto:pika-dev-request@nongnu.org?subject=help>
List-Subscribe: <http://mail.nongnu.org/mailman/listinfo/pika-dev>,
	<mailto:pika-dev-request@nongnu.org?subject=subscribe>
X-List-Received-Date: Tue, 13 Jan 2004 03:00:07 -0000

Tom Lord <lord@emf.net> writes:

>     > - - i've tried to hide away all details of char representation and name
>     >   handling inside reps/char-imp.c (for instance, avoiding explicit bit
>     >   twiddling in lexer.c, and things like that.)
>
> I've moved the the codepoint and buckybit conversions to and from
> strings to libscm/chars.c.  Those should be stable even under changes
> to object representations and GC strategies.  Pika is Unicode centric
> and makes up (drawing on emacs) its own standard for buckybits.
>

ok, that makes sense.

>
> That's more just my bigotry and old-fasionedness than anything.   I
> tend to just avoid const always because in my experience it hurts more
> than helps.   However, I've left in your decls for now because I'm not
> sure I'm not being just silly about that.
>

hm, my experience is just the opposite, but of course yours is wider.
just curious: what kind of problems have hit you while using const?

> It's all just fine.  I'm pushing the merge now.
>

ok, thanks. i've sync'd my archive with yours.

btw, i was reading a bit about ropes. any suggested reading beside's
Boehm's paper?

cheers,
jao
-- 
A designer knows he has achieved perfection not when there is
nothing left to add, but when there is nothing left to take away.
- Antoine de Saint-Exupery



From MAILER-DAEMON Tue Jan 13 19:50:08 2004
Received: from list by monty-python.gnu.org with archive (Exim 4.24)
	id 1AgZEW-00005B-L3
	for mharc-pika-dev@gnu.org; Tue, 13 Jan 2004 19:50:08 -0500
Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.24)
	id 1AgZET-0008WD-Mf
	for pika-dev@nongnu.org; Tue, 13 Jan 2004 19:50:05 -0500
Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.24)
	id 1AgZDx-0008Qj-5n
	for pika-dev@nongnu.org; Tue, 13 Jan 2004 19:50:04 -0500
Received: from [129.110.10.12] (helo=smtp1.utdallas.edu)
	by monty-python.gnu.org with esmtp (Exim 4.24) id 1AgZDw-0008Q3-KL
	for pika-dev@nongnu.org; Tue, 13 Jan 2004 19:49:32 -0500
Received: from kaiser (bluesocket.utdallas.edu [129.110.39.12])
	by smtp1.utdallas.edu (Postfix) with ESMTP id B67B4388E6B
	for <pika-dev@nongnu.org>; Tue, 13 Jan 2004 18:49:30 -0600 (CST)
Received: from jivera by kaiser with local (Exim 3.35 #1 (Debian))
	id 1AgSfx-0000d1-00
	for <pika-dev@nongnu.org>; Tue, 13 Jan 2004 18:50:01 +0100
To: pika-dev@nongnu.org
From: Matthew Dempsky <jivera@flame.org>
Date: Tue, 13 Jan 2004 18:50:00 +0100
Message-ID: <877jzv4u2f.fsf@flame.org>
User-Agent: Gnus/5.1002 (Gnus v5.10.2) Emacs/21.3 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Sender: Matthew Dempsky <jivera@utdallas.edu>
Subject: [Pika-dev] What's on my plate for Pika...
X-BeenThere: pika-dev@nongnu.org
X-Mailman-Version: 2.1.2
Precedence: list
List-Id: <pika-dev.nongnu.org>
List-Unsubscribe: <http://mail.nongnu.org/mailman/listinfo/pika-dev>,
	<mailto:pika-dev-request@nongnu.org?subject=unsubscribe>
List-Archive: <http://mail.gnu.org/pipermail/pika-dev>
List-Post: <mailto:pika-dev@nongnu.org>
List-Help: <mailto:pika-dev-request@nongnu.org?subject=help>
List-Subscribe: <http://mail.nongnu.org/mailman/listinfo/pika-dev>,
	<mailto:pika-dev-request@nongnu.org?subject=subscribe>
X-List-Received-Date: Wed, 14 Jan 2004 00:50:06 -0000

I just thought I'd let everyone know what I've been working on Pika
over the past few days:

  * Finishing implementing numbers- I've been refactoring a lot of
    code to get rid of some unnecessary temporaries, but in the
    process realized I've openned up a nasty possibility for aliasing
    bugs (bignum and bigrat constructors) so I'm going to need to
    clean up those aspects a bit.

    The remaining functionality that's missing I have strong ideas on
    what to do too, so while I don't want to give anyone the
    impression of "this code is mine - stay out", I just want to avoid
    redundant work in the area.  Until the code has stabilized a bit
    more I'd recommend bugs just be pointed out to me in case I'm
    already aware of it and have something planned.

  * Simple garbage collector - I mentioned this earlier and I still
    need to upload the code (which I'll try to do later tonight after
    my last class).  Once this is up, it'll probably be ready for
    hacking on by anyone interested.  (It's entirely localized to
    gc-arena-imp.c, but could use some looking over since the severely
    overloaded use of t_scm_word inside reps/ boggles my mind
    occasionally.)

  * Simple REPL - While it's not code that will probably make it into
    Pika without some revamping, I've ported a lot of the explicit
    control evaluator from SICP over to C using Pika's FFI.  It uses a
    gcc extension (labels as values), but maybe someone could hack
    that away.  I wanted to get this working primarily as an easy way
    to test the GC and numbers, but maybe it could be useful for other
    stuff.  (Again, I'll try to get this available later tonight.)

  * Porting Pika's FFI - I haven't actually started this yet, but I
    talked with Scott Miller (aka FoxFire; SISC developer) and he
    expressed interest in having Pika available as a C FFI.  To quote:

        "That would be fantastic.  I would almost certainly add it to
        the official distribution.  [...]  We don't have a C FFI, so
        it would be good to have until there is a decent FFI SRFI (50
        doesn't yet count)."

    I have zero familiarity with JNI so this will have to be held off
    for a little while, but it might serve as a proof of concept and
    add weight to Pika as a standard for a C FFI.

    I also wanted to look at Guile's FFI to see if it would be
    possible to wrap easily, but because Pika and Guile both use the
    scm_ prefix, there'd have to be some magical way of doing it.  For
    example, both define scm_make_complex but in Guile it's
    prototyped as:

        extern SCM scm_make_complex (SCM real, SCM imag);

    while in Pika we have:

        extern t_scm_error scm_make_complex (t_scm_word * result,
                                             t_scm_arena arena,
                                             t_scm_word * a,
                                             t_scm_word * b);

    Maybe one of our resident Guile experts could give some insight?

Alright, that's all - I hope I'm not stepping on anyone's toes with
all this.  If so, I'll go ahead and just make available what I have
and maybe it could be of a little use.

-jivera



From MAILER-DAEMON Tue Jan 13 22:34:35 2004
Received: from list by monty-python.gnu.org with archive (Exim 4.24)
	id 1Agbnf-0006JU-5C
	for mharc-pika-dev@gnu.org; Tue, 13 Jan 2004 22:34:35 -0500
Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.24)
	id 1Agbna-0006Hr-4i
	for pika-dev@nongnu.org; Tue, 13 Jan 2004 22:34:30 -0500
Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.24)
	id 1Agbmw-0006BH-83
	for pika-dev@nongnu.org; Tue, 13 Jan 2004 22:34:21 -0500
Received: from [129.110.10.12] (helo=smtp1.utdallas.edu)
	by monty-python.gnu.org with esmtp (Exim 4.24) id 1Agbmv-0006B6-S0
	for pika-dev@nongnu.org; Tue, 13 Jan 2004 22:33:49 -0500
Received: from kaiser (bluesocket.utdallas.edu [129.110.39.12])
	by smtp1.utdallas.edu (Postfix) with ESMTP id 5B201388E12
	for <pika-dev@nongnu.org>; Tue, 13 Jan 2004 21:33:44 -0600 (CST)
Received: from jivera by kaiser with local (Exim 3.35 #1 (Debian))
	id 1AgVEt-00027M-00
	for <pika-dev@nongnu.org>; Tue, 13 Jan 2004 21:34:15 +0100
To: pika-dev@nongnu.org
From: Matthew Dempsky <jivera@flame.org>
Date: Tue, 13 Jan 2004 21:34:15 +0100
Message-ID: <87n08r7flk.fsf@flame.org>
User-Agent: Gnus/5.1002 (Gnus v5.10.2) Emacs/21.3 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Sender: Matthew Dempsky <jivera@utdallas.edu>
Subject: [Pika-dev] cvt-bignum and cvt-bigrat
X-BeenThere: pika-dev@nongnu.org
X-Mailman-Version: 2.1.2
Precedence: list
List-Id: <pika-dev.nongnu.org>
List-Unsubscribe: <http://mail.nongnu.org/mailman/listinfo/pika-dev>,
	<mailto:pika-dev-request@nongnu.org?subject=unsubscribe>
List-Archive: <http://mail.gnu.org/pipermail/pika-dev>
List-Post: <mailto:pika-dev@nongnu.org>
List-Help: <mailto:pika-dev-request@nongnu.org?subject=help>
List-Subscribe: <http://mail.nongnu.org/mailman/listinfo/pika-dev>,
	<mailto:pika-dev-request@nongnu.org?subject=subscribe>
X-List-Received-Date: Wed, 14 Jan 2004 03:34:32 -0000

Tom asked me about this in IRC, so here goes:

18:26 < tomlord> i haven't looked at the code yet but i have a
                 question about converting numbers to bignums.
18:27 < tomlord> i mean converting scheme nums to gmp.
18:27 < tomlord> so --- are you careful, in the code you've written,
                 to be sure that if you take a gmp that is shared by a
                 scheme value, that that scheme value is protected
                 while you use it.
18:27 < tomlord> ?
18:27 < tomlord> and:
18:28 < tomlord> what's the right thing for an ffi, there.

Okay, my short answer was that I think the external interface is safe,
but I'll give a longer explanation as to why here.

The two gmp types in use by Pika right now are mpz_t (bignum) and
mpq_t (bigrat).  I'm only going to describe the mpz_t functions, but
for the most part it's equally applicable for mpq_t functions.

First, mpz_t is basically defined:

    typedef struct __mpz_struct mpz_t[1];

The __mpz_struct contains three variables -- a pointer to the limbs
containing the number itself, and two integers counting the number of
allocated words and the number of words in use.

gmp also defines a constructor, mpz_init, and a destructor, mpz_clear,
that need to be called on the defined variables as appropriate.

Now, the reason for the above typedef is so that in user code we can
define a mpz_t variable and then the variable name is actually a
pointer that can be conveniently passed to the mpz_* functions like
so:

    mpz_t a, b, c;

    [...]

    mpz_add (a, b, c);

This performs the operation "a = b + c".  It's my understanding that
this routine basically ensures that a has enough memory allocated to
store the result of b + c and if not allocates more.  Then it computes
the result and stores it in a's dynamic memory.

Now, the concern you had was over concerns of what memory the user has
and the answer is basically "whatever gmp thinks is safe for us to
use."  Here's the implementation for scm_reps_number_to_bignum (this
is code from a patch after you merged incase you're wondering where it
is)

    t_scm_error
    scm_reps_number_to_bignum (mpz_ptr result,
                               t_scm_arena arena,
                               t_scm_word * value)
    {
      switch (scm_get_numeric_type (arena, value))
        {
    
    [...]
    
        case scm_num_bignum:
          {
            mpz_set (result, scm_bignum_value (arena, value));
            return 0;
          }
    
    [...]
    
        }
    }

scm_bignum_value just returns a mpz_srcptr for the internally held
bignum value.  I don't know if gmp uses reference counting for numbers
or if it just reuses the memory already initialized in result (if
any), but either way Pika's code is at least consistant in it's
behaviour with what a gmp user expects (i.e. they must use mpz_init
before calling scm_number_to_bignum and mpz_clear once they're done
with their variable - I should probably add a comment regarding this
to the documentation) and they can't modify the value held internally
by the bignum.

The refactoring that I said caused aliasing issues is that I changed
scm_make_bignum to return a mpz_ptr so that it would be simpler to
implement scm_reps_add efficiently like this:

    mpz_add (scm_make_bignum (result, arena),
             scm_bignum_value (arena, a),
             scm_bignum_value (arena, b));

This eliminates the temporary mpz_t I had to generate earlier, but you
should be able to see the aliasing issue.  Of course this is just an
implementation issue -- this issue isn't visible from outside the FFI
(unless you think the numeric types should be publicly available).

Um, I think that's all there is to know about the gmp stuff, but if I
managed to miss something I'll elaborate on that more (this email's
already getting far too long).

-jivera



From MAILER-DAEMON Wed Jan 14 01:18:31 2004
Received: from list by monty-python.gnu.org with archive (Exim 4.24)
	id 1AgeMJ-0002g2-3E
	for mharc-pika-dev@gnu.org; Wed, 14 Jan 2004 01:18:31 -0500
Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.24)
	id 1AgeMH-0002fe-0d
	for pika-dev@nongnu.org; Wed, 14 Jan 2004 01:18:29 -0500
Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.24)
	id 1AgeLk-0002ZP-N5
	for pika-dev@nongnu.org; Wed, 14 Jan 2004 01:18:28 -0500
Received: from [213.165.64.20] (helo=mail.gmx.net)
	by monty-python.gnu.org with smtp (Exim 4.24) id 1AgeLk-0002Yu-88
	for pika-dev@nongnu.org; Wed, 14 Jan 2004 01:17:56 -0500
Received: (qmail 16284 invoked by uid 65534); 14 Jan 2004 06:17:54 -0000
Received: from chello212186006140.401.14.vie.surfer.at (EHLO garibaldi)
	(212.186.6.140)
	by mail.gmx.net (mp022) with SMTP; 14 Jan 2004 07:17:54 +0100
X-Authenticated: #3102804
Received: from ivanova.rhinosaur.lan ([192.168.1.9] helo=ivanova)
	by garibaldi with esmtp (Exim 4.30)
	id 1AgeLQ-0004Km-9x; Wed, 14 Jan 2004 07:17:36 +0100
Received: from andy by ivanova with local (Exim 4.30)
	id 1AgeLP-0001Tc-AI; Wed, 14 Jan 2004 07:17:35 +0100
To: Matthew Dempsky <jivera@flame.org>
Subject: Re: [Pika-dev] What's on my plate for Pika...
References: <877jzv4u2f.fsf@flame.org>
From: Andreas Rottmann <a.rottmann@gmx.at>
Date: Wed, 14 Jan 2004 07:17:35 +0100
In-Reply-To: <877jzv4u2f.fsf@flame.org> (Matthew Dempsky's message of "Tue,
	13 Jan 2004 18:50:00 +0100")
Message-ID: <87oet7t5og.fsf@alice.rotty.yi.org>
User-Agent: Gnus/5.1006 (Gnus v5.10.6) Emacs/21.3 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Sender: Andreas Rottmann <a.rottmann@gmx.at>
X-Spam-Score: -4.9 (----)
Cc: pika-dev@nongnu.org
X-BeenThere: pika-dev@nongnu.org
X-Mailman-Version: 2.1.2
Precedence: list
List-Id: <pika-dev.nongnu.org>
List-Unsubscribe: <http://mail.nongnu.org/mailman/listinfo/pika-dev>,
	<mailto:pika-dev-request@nongnu.org?subject=unsubscribe>
List-Archive: <http://mail.gnu.org/pipermail/pika-dev>
List-Post: <mailto:pika-dev@nongnu.org>
List-Help: <mailto:pika-dev-request@nongnu.org?subject=help>
List-Subscribe: <http://mail.nongnu.org/mailman/listinfo/pika-dev>,
	<mailto:pika-dev-request@nongnu.org?subject=subscribe>
X-List-Received-Date: Wed, 14 Jan 2004 06:18:29 -0000

Matthew Dempsky <jivera@flame.org> writes:

>   * Porting Pika's FFI - I haven't actually started this yet, but I
>     talked with Scott Miller (aka FoxFire; SISC developer) and he
>     expressed interest in having Pika available as a C FFI.  To quote:
>
>         "That would be fantastic.  I would almost certainly add it to
>         the official distribution.  [...]  We don't have a C FFI, so
>         it would be good to have until there is a decent FFI SRFI (50
>         doesn't yet count)."
>
>     I have zero familiarity with JNI so this will have to be held off
>     for a little while, but it might serve as a proof of concept and
>     add weight to Pika as a standard for a C FFI.
>
If I get you right, they want to use the Pika C interface (i.e. FFI)
for SISC. This would mean Pika and FFI can share C extensions, right?

>     I also wanted to look at Guile's FFI to see if it would be
>     possible to wrap easily, but because Pika and Guile both use the
>     scm_ prefix, there'd have to be some magical way of doing it.  For
>     example, both define scm_make_complex but in Guile it's
>     prototyped as:
>
>         extern SCM scm_make_complex (SCM real, SCM imag);
>
>     while in Pika we have:
>
>         extern t_scm_error scm_make_complex (t_scm_word * result,
>                                              t_scm_arena arena,
>                                              t_scm_word * a,
>                                              t_scm_word * b);
>
>     Maybe one of our resident Guile experts could give some insight?
>
[ Disclaimer: Being far from a Guile expert, I'm much lesser a Pika expert ;-) ]

I guess your intent is to re-use Guile extensions written in C for
Pika. The most significant problem I see is that Guile has no concept
of 'arenas'. So given a C function written for Guile's C interface
(and exposing a Guile-like prototype), you probably would have to
parse the function code and quite heavily munch it to spit out a
function that exposes a Pika-style prototype. 

Munching would at least include extending the orignal prototype with
an arena, doing likewise for all scm_*() calls in the function body
and deal with SCM vs. 't_scm_word *'. This seems not like an easy
undertaking. 

The other way round (i.e. making code written using the Pika-style FFI
usable from guile) should be easier (but probably not as useful, given
the amount of Guile C code vs. Pika C code).

Andy
-- 
Andreas Rottmann         | Rotty@ICQ      | 118634484@ICQ | a.rottmann@gmx.at
http://yi.org/rotty      | GnuPG Key: http://yi.org/rotty/gpg.asc
Fingerprint              | DFB4 4EB4 78A4 5EEE 6219  F228 F92F CFC5 01FD 5B62

It's *GNU*/Linux dammit!



From MAILER-DAEMON Wed Jan 14 19:22:51 2004
Received: from list by monty-python.gnu.org with archive (Exim 4.24)
	id 1AgtJR-0005YV-PV
	for mharc-pika-dev@gnu.org; Wed, 14 Jan 2004 17:16:33 -0500
Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.24)
	id 1AgqQb-0007o5-KV
	for pika-dev@nongnu.org; Wed, 14 Jan 2004 14:11:45 -0500
Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.24)
	id 1AgqPx-0007f9-Ln
	for pika-dev@nongnu.org; Wed, 14 Jan 2004 14:11:36 -0500
Received: from [129.110.10.12] (helo=smtp1.utdallas.edu)
	by monty-python.gnu.org with esmtp (Exim 4.24) id 1AgqJi-0006FY-ER
	for pika-dev@nongnu.org; Wed, 14 Jan 2004 14:04:38 -0500
Received: from kaiser (bluesocket.utdallas.edu [129.110.39.12])
	by smtp1.utdallas.edu (Postfix) with ESMTP id 20B7A388D03;
	Wed, 14 Jan 2004 13:04:36 -0600 (CST)
Received: from jivera by kaiser with local (Exim 3.35 #1 (Debian))
	id 1Agjlj-0000af-00; Wed, 14 Jan 2004 13:05:07 +0100
To: Andreas Rottmann <a.rottmann@gmx.at>
Subject: Re: [Pika-dev] What's on my plate for Pika...
References: <877jzv4u2f.fsf@flame.org> <87oet7t5og.fsf@alice.rotty.yi.org>
From: Matthew Dempsky <jivera@flame.org>
Date: Wed, 14 Jan 2004 13:05:07 +0100
In-Reply-To: <87oet7t5og.fsf@alice.rotty.yi.org> (Andreas Rottmann's message
	of "Wed, 14 Jan 2004 07:17:35 +0100")
Message-ID: <873caig2h8.fsf@flame.org>
User-Agent: Gnus/5.1002 (Gnus v5.10.2) Emacs/21.3 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Sender: Matthew Dempsky <jivera@utdallas.edu>
Cc: pika-dev@nongnu.org
X-BeenThere: pika-dev@nongnu.org
X-Mailman-Version: 2.1.2
Precedence: list
List-Id: <pika-dev.nongnu.org>
List-Unsubscribe: <http://mail.nongnu.org/mailman/listinfo/pika-dev>,
	<mailto:pika-dev-request@nongnu.org?subject=unsubscribe>
List-Archive: <http://mail.gnu.org/pipermail/pika-dev>
List-Post: <mailto:pika-dev@nongnu.org>
List-Help: <mailto:pika-dev-request@nongnu.org?subject=help>
List-Subscribe: <http://mail.nongnu.org/mailman/listinfo/pika-dev>,
	<mailto:pika-dev-request@nongnu.org?subject=subscribe>
X-List-Received-Date: Wed, 14 Jan 2004 22:16:32 -0000

Andreas Rottmann <a.rottmann@gmx.at> writes:

> If I get you right, they want to use the Pika C interface (i.e. FFI)
> for SISC. This would mean Pika and FFI can share C extensions, right?

Yeah, that's the idea.

> The other way round (i.e. making code written using the Pika-style FFI
> usable from guile) should be easier (but probably not as useful, given
> the amount of Guile C code vs. Pika C code).

Actually, that is the goal.  Basically the idea is the same as it is
for SISC -- to reinforce the idea that Pika's FFI is general enough to
serve as a standardized C FFI for Scheme (or to identify areas where
it needs correcting), it would be helpful to be able to say "Hey, look
- you can write code to Pika's FFI and it can interface not only with
Pika, but also [SISC, Guile, or whatever we can manage]."

I'm sure there's a good deal of code already written to specific
implementation FFIs, but the long term plan (or my understanding of it
at lesat) is to get this code ported to Pika so that any
implementation can benefit from it.

(Of course it would also be helpful to be able to automate a process
of porting code using another implementation's FFI to Pika's, but we
can worry about that later.  It will be hard to drive interest into
porting code to Pika's FFI if we can't make that code still usable
with the FFI they're currently using.)

-jivera



From MAILER-DAEMON Wed Jan 14 20:27:40 2004
Received: from list by monty-python.gnu.org with archive (Exim 4.24)
	id 1AgwIN-0005xr-R0
	for mharc-pika-dev@gnu.org; Wed, 14 Jan 2004 20:27:39 -0500
Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.24)
	id 1AgwIK-0005vr-OR
	for pika-dev@nongnu.org; Wed, 14 Jan 2004 20:27:36 -0500
Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.24)
	id 1AgwFv-0005II-Qd
	for pika-dev@nongnu.org; Wed, 14 Jan 2004 20:25:39 -0500
Received: from [129.110.10.12] (helo=smtp1.utdallas.edu)
	by monty-python.gnu.org with esmtp (Exim 4.24) id 1AgvLM-0003OY-M8
	for pika-dev@nongnu.org; Wed, 14 Jan 2004 19:26:40 -0500
Received: from kaiser (bluesocket.utdallas.edu [129.110.39.12])
	by smtp1.utdallas.edu (Postfix) with ESMTP id 1949B3890A8
	for <pika-dev@nongnu.org>; Wed, 14 Jan 2004 18:26:39 -0600 (CST)
Received: from jivera by kaiser with local (Exim 3.35 #1 (Debian))
	id 1AgonO-0001Jf-00
	for <pika-dev@nongnu.org>; Wed, 14 Jan 2004 18:27:10 +0100
To: pika-dev@nongnu.org
From: Matthew Dempsky <jivera@flame.org>
Date: Wed, 14 Jan 2004 18:27:10 +0100
Message-ID: <87k73u4f0x.fsf@flame.org>
User-Agent: Gnus/5.1002 (Gnus v5.10.2) Emacs/21.3 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Sender: Matthew Dempsky <jivera@utdallas.edu>
Subject: [Pika-dev] ugly repl for Pika
X-BeenThere: pika-dev@nongnu.org
X-Mailman-Version: 2.1.2
Precedence: list
List-Id: <pika-dev.nongnu.org>
List-Unsubscribe: <http://mail.nongnu.org/mailman/listinfo/pika-dev>,
	<mailto:pika-dev-request@nongnu.org?subject=unsubscribe>
List-Archive: <http://mail.gnu.org/pipermail/pika-dev>
List-Post: <mailto:pika-dev@nongnu.org>
List-Help: <mailto:pika-dev-request@nongnu.org?subject=help>
List-Subscribe: <http://mail.nongnu.org/mailman/listinfo/pika-dev>,
	<mailto:pika-dev-request@nongnu.org?subject=subscribe>
X-List-Received-Date: Thu, 15 Jan 2004 01:27:38 -0000

Alright, jivera@flame.org--2004/eceval--devo--0.1 now has some code to
implement a REPL using Pika's FFI (very direct port of SICP's explicit
control evaluator), but (WARNING) the code is really ugly and it
doesn't work that well yet and there's very little error detection so
it's not suitable for anything but an example at the moment.

You can pipe some Scheme stuff from echo into eceval (and then
probably want to pipe that into head), but all that it handles
correctly right now are characters and booleans.  (I have the
framework code to eventually add bindings for the built-in routines,
but no actual code yet.)

Also, something as simple as (define foo #\c) seems to fail, so don't
expect much from this yet.  It also requires gcc to compile.  It's
package-framework compatible, so just download it into the src/
directory and reconfigure.

-jivera



From MAILER-DAEMON Fri Jan 16 20:14:15 2004
Received: from list by monty-python.gnu.org with archive (Exim 4.24)
	id 1Ahey2-0002mO-Ni
	for mharc-pika-dev@gnu.org; Fri, 16 Jan 2004 20:09:38 -0500
Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.24)
	id 1Ahewx-0001ei-2B
	for pika-dev@nongnu.org; Fri, 16 Jan 2004 20:08:31 -0500
Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.24)
	id 1AhesV-0000gH-OX
	for pika-dev@nongnu.org; Fri, 16 Jan 2004 20:04:26 -0500
Received: from [129.110.10.12] (helo=smtp1.utdallas.edu)
	by monty-python.gnu.org with esmtp (Exim 4.24) id 1AhesU-0000f8-9D
	for pika-dev@nongnu.org; Fri, 16 Jan 2004 20:03:54 -0500
Received: from kaiser (bluesocket.utdallas.edu [129.110.39.12])
	by smtp1.utdallas.edu (Postfix) with ESMTP id EDB3B388FF7
	for <pika-dev@nongnu.org>; Fri, 16 Jan 2004 19:03:51 -0600 (CST)
Received: from jivera by kaiser with local (Exim 3.35 #1 (Debian))
	id 1AhYKZ-0001jR-00
	for <pika-dev@nongnu.org>; Fri, 16 Jan 2004 19:04:27 +0100
To: pika-dev@nongnu.org
From: Matthew Dempsky <jivera@flame.org>
Date: Fri, 16 Jan 2004 19:04:26 +0100
Message-ID: <87isjb4vo5.fsf@flame.org>
User-Agent: Gnus/5.1002 (Gnus v5.10.2) Emacs/21.3 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Sender: Matthew Dempsky <jivera@utdallas.edu>
Subject: [Pika-dev] issues in choosing a broken heart
X-BeenThere: pika-dev@nongnu.org
X-Mailman-Version: 2.1.2
Precedence: list
List-Id: <pika-dev.nongnu.org>
List-Unsubscribe: <http://mail.nongnu.org/mailman/listinfo/pika-dev>,
	<mailto:pika-dev-request@nongnu.org?subject=unsubscribe>
List-Archive: <http://mail.gnu.org/pipermail/pika-dev>
List-Post: <mailto:pika-dev@nongnu.org>
List-Help: <mailto:pika-dev-request@nongnu.org?subject=help>
List-Subscribe: <http://mail.nongnu.org/mailman/listinfo/pika-dev>,
	<mailto:pika-dev-request@nongnu.org?subject=subscribe>
X-List-Received-Date: Sat, 17 Jan 2004 01:09:35 -0000

Just so that these issues don't get lost into the void, I thought I
would document the issues involved in the implementation of Pika's
copying GC.  Those familiar with copying GCs can probably skip over
the first few paragraphs -- I include them only for completeness.
This is really more in depth than needed, but I've found Tom's
thoroughness on the SRFI-50 mailing to be crucial in understanding
many aspects of Pika I took for granted, so maybe others can benefit
from this similarly.

Whenever Pika tries to allocate a new object, it first checks if
memory is available from a singly linked list.  If so, it simply
claims that memory and removes it from the list.  If not available, it
runs a the gc routines and if memory is still not available, allocates
a new block of memory and creates a new linked list from it.
(Initially the GC routines were just stubs, so it would always
allocate a new page.)

The GC routines begin by walking the stack frames and pushing pointers
to all the non-immediate t_scm_word's (pairs, boxed doubles, and
vtable objects) into an array.  After this is done, we enter a loop
until the array is empty.  One at a time, elements are removed from
the array and the memory address they point to is checked for a
'broken heart' (just a constant value).  If not found, in a new arena,
space for the object is allocated and the old value copied over (along
with any t_scm_words held by the object being added to the array);
then the broken heart value is written over the original memory
followed by a pointer to the new memory address and the t_scm_word on
the stack is updated with a new value.  If the broken heart value was
found, then the local value is updated without copying the object.
Once the array is empty, we free the old arena's pages and copy the
new ones in its place.

Now for the issues involved in choosing a broken heart:

We need a broken heart value that will never be written to where we're
looking for it except by the GC.

For the vtable objects this idiom is fine - the broken heart value
currently gets written to where a vtable pointer is normally found so
all we need is a value which will never be used as a vtable pointer.

For pairs, the broken heart overwrites the car address which is a
t_scm_word, not a struct vtable *.  We need to be more careful in our
choice of the broken heart value now, because, for example, if we
chose 0x12344321, then once a user performs (cons 76353736 <x>) and
then the GC runs, any pointers to that will be randomly relocated.  In
the best case, the program crashes -- worst case, the user finds some
way to exploit the new "cons cell".  It gets worse though...

What about for boxed doubles?

On x86 platforms at least, the first word holds the lower 32-bits of
the mantissa of the double so essentially, any 32-bit bitstring is
valid and naturally occuring there.  Crap...

One possibility is, that since boxed doubles are only assigned once it
would be feasible to check if the 32-bits is equal to our broken heart
and if so toggle the least significant bit.  This would be a
relatively simple fix to make, but has the ugliness that it loses
precision once every 4294967296 floating point operations.

Another possibility is to reorder our broken heart and new pointer
value - it would be just as well to use the second word for the broken
heart and first for the new pointer.  IEEE doubles define a range of
2^52nd NaNs which can be uniquely identified by the upper word, which
(on x86) is stored second.  Without being able to find any
documentation explaining the significance of different NaNs, it seems
like it would be a safe bet to claim a certain range of these values
for ourselves and either silently change specific binary
representations of NaN into others (or return an error).  However,
this implementation then would depend on byte order, word size, and
wouldn't work in the presence of vtable objects who claim the memory
following the vtable pointer as binary data since we have _no_
control over that (unless we special cased boxed double handling).

So arguably the best (and at least simplest) solution is to allocate
four words for boxed doubles and store the double in the second memory
address.  (Comments in reps/tags.h imply that boxed doubles should
take four words of memory anyways.)

Note: as of now (lord@emf.net--2004/scm--devo--0.1--patch-10) this
isn't correctly handled, but it should be soon.  (And once we have a
better GC none of this will matter anymore.)

-jivera



From MAILER-DAEMON Sun Jan 18 14:06:25 2004
Received: from list by monty-python.gnu.org with archive (Exim 4.24)
	id 1AiIFd-0004UB-1t
	for mharc-pika-dev@gnu.org; Sun, 18 Jan 2004 14:06:25 -0500
Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.24)
	id 1AiIFa-0004TB-BM
	for pika-dev@nongnu.org; Sun, 18 Jan 2004 14:06:22 -0500
Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.24)
	id 1AiIF2-0003wo-9h
	for pika-dev@nongnu.org; Sun, 18 Jan 2004 14:06:20 -0500
Received: from [129.110.10.12] (helo=smtp1.utdallas.edu)
	by monty-python.gnu.org with esmtp (Exim 4.24) id 1AiIF1-0003t9-9c
	for pika-dev@nongnu.org; Sun, 18 Jan 2004 14:05:47 -0500
Received: from kaiser (bluesocket.utdallas.edu [129.110.39.12])
	by smtp1.utdallas.edu (Postfix) with ESMTP id 5DF2D388D16
	for <pika-dev@nongnu.org>; Sun, 18 Jan 2004 13:05:43 -0600 (CST)
Received: from jivera by kaiser with local (Exim 3.35 #1 (Debian))
	id 1AiBh7-0005ik-00
	for <pika-dev@nongnu.org>; Sun, 18 Jan 2004 13:06:21 +0100
To: pika-dev@nongnu.org
From: Matthew Dempsky <jivera@flame.org>
Date: Sun, 18 Jan 2004 13:06:21 +0100
Message-ID: <87isj9h35u.fsf@flame.org>
User-Agent: Gnus/5.1006 (Gnus v5.10.6) Emacs/21.3 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Sender: Matthew Dempsky <jivera@utdallas.edu>
Subject: [Pika-dev] request for merge -- gc and numbers fixes
X-BeenThere: pika-dev@nongnu.org
X-Mailman-Version: 2.1.2
Precedence: list
List-Id: <pika-dev.nongnu.org>
List-Unsubscribe: <http://mail.nongnu.org/mailman/listinfo/pika-dev>,
	<mailto:pika-dev-request@nongnu.org?subject=unsubscribe>
List-Archive: <http://mail.gnu.org/pipermail/pika-dev>
List-Post: <mailto:pika-dev@nongnu.org>
List-Help: <mailto:pika-dev-request@nongnu.org?subject=help>
List-Subscribe: <http://mail.nongnu.org/mailman/listinfo/pika-dev>,
	<mailto:pika-dev-request@nongnu.org?subject=subscribe>
X-List-Received-Date: Sun, 18 Jan 2004 19:06:23 -0000

jivera@flame.org--2004/scm--integration--0.1 has a bunch of fixes for
numbers and gc along with a few tests copied from R5RS for numbers.
I'll add more as time continues.

I need to add a function for something like:

    scm_build_number (t_scm_word * result, t_scm_arena arena,
                      t_uchar * a, size_t len);

Any recommendations on the name or is build_number fine?

-jivera



From MAILER-DAEMON Sun Jan 18 14:30:20 2004
Received: from list by monty-python.gnu.org with archive (Exim 4.24)
	id 1AiIcl-0008Fb-Pn
	for mharc-pika-dev@gnu.org; Sun, 18 Jan 2004 14:30:19 -0500
Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.24)
	id 1AiIci-0008DD-6g
	for pika-dev@nongnu.org; Sun, 18 Jan 2004 14:30:16 -0500
Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.24)
	id 1AiIcB-0007zW-Tl
	for pika-dev@nongnu.org; Sun, 18 Jan 2004 14:30:14 -0500
Received: from [65.234.195.89] (helo=morrowfield.regexps.com)
	by monty-python.gnu.org with esmtp (Exim 4.24) id 1AiIac-0007RY-Dd
	for pika-dev@nongnu.org; Sun, 18 Jan 2004 14:28:06 -0500
Received: (from lord@localhost)
	by morrowfield.regexps.com (8.9.1/8.9.1) id LAA01400;
	Sun, 18 Jan 2004 11:40:52 -0800 (PST)
	(envelope-from lord@morrowfield.regexps.com)
Date: Sun, 18 Jan 2004 11:40:52 -0800 (PST)
Message-Id: <200401181940.LAA01400@morrowfield.regexps.com>
From: Tom Lord <lord@emf.net>
To: pika-dev@nongnu.org
Subject: [Pika-dev] test message
X-BeenThere: pika-dev@nongnu.org
X-Mailman-Version: 2.1.2
Precedence: list
List-Id: <pika-dev.nongnu.org>
List-Unsubscribe: <http://mail.nongnu.org/mailman/listinfo/pika-dev>,
	<mailto:pika-dev-request@nongnu.org?subject=unsubscribe>
List-Archive: <http://mail.gnu.org/pipermail/pika-dev>
List-Post: <mailto:pika-dev@nongnu.org>
List-Help: <mailto:pika-dev-request@nongnu.org?subject=help>
List-Subscribe: <http://mail.nongnu.org/mailman/listinfo/pika-dev>,
	<mailto:pika-dev-request@nongnu.org?subject=subscribe>
X-List-Received-Date: Sun, 18 Jan 2004 19:30:17 -0000



Mailing lists at gnu-org seem to be very horked for the past few days.

-t





From MAILER-DAEMON Sun Jan 18 15:26:39 2004
Received: from list by monty-python.gnu.org with archive (Exim 4.24)
	id 1AiJVH-0005nD-FY
	for mharc-pika-dev@gnu.org; Sun, 18 Jan 2004 15:26:39 -0500
Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.24)
	id 1AiJVE-0005lq-9r
	for pika-dev@nongnu.org; Sun, 18 Jan 2004 15:26:36 -0500
Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.24)
	id 1AiJUh-0005dB-QC
	for pika-dev@nongnu.org; Sun, 18 Jan 2004 15:26:34 -0500
Received: from [129.110.10.12] (helo=smtp1.utdallas.edu)
	by monty-python.gnu.org with esmtp (Exim 4.24) id 1AiJUh-0005cu-GR
	for pika-dev@nongnu.org; Sun, 18 Jan 2004 15:26:03 -0500
Received: from kaiser (crtntx1-ar5-4-63-097-174.crtntx1.dsl-verizon.net
	[4.63.97.174])
	by smtp1.utdallas.edu (Postfix) with ESMTP id C6DDC388D72;
	Sun, 18 Jan 2004 14:26:02 -0600 (CST)
Received: from jivera by kaiser with local (Exim 3.35 #1 (Debian))
	id 1AiCwq-0000Pu-00; Sun, 18 Jan 2004 14:26:40 +0100
To: Tom Lord <lord@emf.net>
Subject: Re: [Pika-dev] test message
References: <200401181940.LAA01400@morrowfield.regexps.com>
From: Matthew Dempsky <jivera@flame.org>
Date: Sun, 18 Jan 2004 14:26:40 +0100
In-Reply-To: <200401181940.LAA01400@morrowfield.regexps.com> (Tom Lord's
	message of "Sun, 18 Jan 2004 11:40:52 -0800 (PST)")
Message-ID: <87ptdhgzfz.fsf@flame.org>
User-Agent: Gnus/5.1006 (Gnus v5.10.6) Emacs/21.3 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Sender: Matthew Dempsky <jivera@utdallas.edu>
Cc: pika-dev@nongnu.org
X-BeenThere: pika-dev@nongnu.org
X-Mailman-Version: 2.1.2
Precedence: list
List-Id: <pika-dev.nongnu.org>
List-Unsubscribe: <http://mail.nongnu.org/mailman/listinfo/pika-dev>,
	<mailto:pika-dev-request@nongnu.org?subject=unsubscribe>
List-Archive: <http://mail.gnu.org/pipermail/pika-dev>
List-Post: <mailto:pika-dev@nongnu.org>
List-Help: <mailto:pika-dev-request@nongnu.org?subject=help>
List-Subscribe: <http://mail.nongnu.org/mailman/listinfo/pika-dev>,
	<mailto:pika-dev-request@nongnu.org?subject=subscribe>
X-List-Received-Date: Sun, 18 Jan 2004 20:26:37 -0000

Tom Lord <lord@emf.net> writes:

> Mailing lists at gnu-org seem to be very horked for the past few days.
>
> -t

All the messages I've sent over the past few days are in the pika-dev
archives at gnu.org except for the one I sent just this morning
regarding new patches in my scm--integration branch.

-jivera



From MAILER-DAEMON Wed Jan 21 23:58:34 2004
Received: from list by monty-python.gnu.org with archive (Exim 4.24)
	id 1AjWvK-00035A-0W
	for mharc-pika-dev@gnu.org; Wed, 21 Jan 2004 23:58:34 -0500
Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.24)
	id 1AjWvI-00034e-3N
	for pika-dev@nongnu.org; Wed, 21 Jan 2004 23:58:32 -0500
Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.24)
	id 1AjWuk-0002r0-Ke
	for pika-dev@nongnu.org; Wed, 21 Jan 2004 23:58:31 -0500
Received: from [65.234.195.89] (helo=morrowfield.regexps.com)
	by monty-python.gnu.org with esmtp (Exim 4.24) id 1AjWuY-0002oH-Hg
	for pika-dev@nongnu.org; Wed, 21 Jan 2004 23:57:47 -0500
Received: (from lord@localhost)
	by morrowfield.regexps.com (8.9.1/8.9.1) id VAA18428;
	Wed, 21 Jan 2004 21:11:10 -0800 (PST)
	(envelope-from lord@morrowfield.regexps.com)
Date: Wed, 21 Jan 2004 21:11:10 -0800 (PST)
Message-Id: <200401220511.VAA18428@morrowfield.regexps.com>
From: Tom Lord <lord@emf.net>
To: pika-dev@nongnu.org
Subject: [Pika-dev] strings draft
X-BeenThere: pika-dev@nongnu.org
X-Mailman-Version: 2.1.2
Precedence: list
List-Id: <pika-dev.nongnu.org>
List-Unsubscribe: <http://mail.nongnu.org/mailman/listinfo/pika-dev>,
	<mailto:pika-dev-request@nongnu.org?subject=unsubscribe>
List-Archive: <http://mail.gnu.org/pipermail/pika-dev>
List-Post: <mailto:pika-dev@nongnu.org>
List-Help: <mailto:pika-dev-request@nongnu.org?subject=help>
List-Subscribe: <http://mail.nongnu.org/mailman/listinfo/pika-dev>,
	<mailto:pika-dev-request@nongnu.org?subject=subscribe>
X-List-Received-Date: Thu, 22 Jan 2004 04:58:32 -0000




                     Unicode Meets Scheme Meets C
                     ----------------------------

  Specifying Unicode string and character support for Pika is an
  exercise in language design (because standard Scheme needs to be
  modified and extended), Scheme interface design, C interface
  design, and implementation design.

  Additionally, we would like a subset of the Pika C interface to
  characters and strings to be something that _any_ C-compatible
  Scheme implementation can provide (including Schemes that support
  only ISO8859-* character sets or other subsets of Unicode).

  Additionally, we would like the new and modified Scheme interfaces
  to strings and characters to be such that other implementors may
  choose to provide them and future revisions to the Scheme standard
  may incorporate them.

  This document provides some background on the problem, specifies the
  three interfaces, identifies the (hopefully) portable subset of the
  C interface, recommends changes to the Scheme standard, and finally,
  describes how all of these will be implemented in Pika.

  The reader is presumed to be somewhat familiar with the Unicode
  standard.


  Contents

  * Scheme Characters Meet Unicode
  * Scheme Strings Meet Unicode
  * The Scheme Interface to Unicode Characters and Strings
  * The Portable FFI Interface to Unicode Characters and Strings
  * The Pika FFI Interface to Unicode Characters and Strings

  Non-contents (unresolved issues)

  * Unicode and Ports (what does READ-CHAR mean?)


* Scheme Characters

** Required and Expected Characters

  R5RS requires that all members of the character set used to specify
  the syntax of Scheme must be representable as Scheme characters.
  These include various punctuation marks, space, newline, digits, and
  the lowercase letters `a..z'.

  The specifications of CHAR-UPCASE, CHAR-DOWNCASE, and
  CHAR-ALPHABETIC?  strongly imply that `A..Z' must also be present.
  The only way to not read this as a requirement is to imagine an
  implementation in which, for example, `a' is not an alphabetic
  character.  

  By reasonable expectation, tab and form-feed should also be present.
  Implementations are possible which do not provide these but would be
  rather exceptional in that regard.

  /=== R6RS Recommendation:

   R6RS should explicitly require that tab, form-feed, and both `a..z'
   and `A..Z' are present, that the letters are alphabetic characters,
   and that they are case-mapped as expected.

  |=== Portable FFI Recommendation:

   A portable FFI should assume that that requirement is in place.

  |=== Pika Design:

   Pika assumes that that requirement is in place.

  \========


  Perhaps more controversially: all members of the character set
  comprising the first half (U+0000..U+007F) of iso8859-1 should be
  representable as Scheme characters.  These characters are found in
  ASCII, all iso8859-* character sets, and Unicode itself.  They are
  used almost universally and are likely to remain so indefinitely.

  /=== R6RS Recommendation:

   R6RS should explicitly and strongly encourage the presence of all
   ASCII characters in the CHAR? type.

  |=== Portable FFI Recommendation:

   A portable FFI should require that all characters representable in
   portable C as non-octal-escaped character constants are
   representable in Scheme.   It should strongly encourage that all
   ASCII characters are representable in Scheme.


  |=== Pika Design:

   The Pika CHAR? type will include representations for all of ASCII.

  \========


  By somewhat reasonable expectation, there must be at least 256
  distinct Scheme characters and INTEGER->CHAR must be defined for all
  integers in the range `0..255'.  There are many circumstances in
  which conversions between octets and characters are desirable and
  the requirements of this expectation say that such conversion is
  always possible.  It is quite possible to imagine implementations in
  which this is not the case: in which, for example, a (fully general)
  octet stream can not be read and written using READ-CHAR and DISPLAY
  (applied to characters).  Such an implementation might introduce
  non-standard procedures for reading and writing octets and
  representing arrays of octets.  While such non-standard extensions
  may be desirable for independent reasons, I see no good reason not
  to define at least a subset of Scheme characters which is mapped to
  the set of octet values.  

  /=== R6RS Recommendation:

   R6RS should explicitly and strongly encourage the presence of 
   at least 256 characters and that INTEGER->CHAR is defined for
   the entire range 0..255 (at least).

  |=== Portable FFI Recommendation:

   A portable FFI should require that the intersection of the 
   set of integers -128..127 and the set of values representable 
   as a `char' value are representable in Scheme as CHAR? values.

   The preferred 8-bit character representation in the FFI should be
   `unsigned char' and the scheme representation (if any) for any
   unsigned character `uc' should be the same as that for `(char)uc'.

   Note: stating these requirements is greatly simplified if the FFI 
   simply requires that `char' and `unsigned char' are 8-bit types.


  |=== Pika Design:

   Pika will satisfy the FFI requirement and require that `char' is an
   8-bit integer.

  \========


*** Remaining Degrees of Freedom for the CHAR? Type

  Scheme implementations consistent with our proposed requirements
  so far are likely to partition into four broad classes:

  ~ Those providing exactly 256 distinct (under CHAR=?) CHAR? values

  ~ Those providing approximately 2^16 CHAR? values

  ~ Those providing approximately 2^21 CHAR? values

  ~ Those providing an infinite set of CHAR? values


  /=== Pika Design:

   Pika is of the "approximately 2^21 characters" variety.

   Specifically, the Pika CHAR? type will in effect be a _superset_ of
   the set of Unicode codepoints.   Each 21-bit codepoint will
   correspond to a Pika character.   For each such character, there 
   will be (2^4-1) (15) additional related characters representing the
   basic code point modified by a combination of any of four
   "buckybits".

   For example, the Unicode codepoint U+0041 can be written in Pika
   as:

	#\A

   and by applying buckybits (shift, meta, alt, hyper) an additional
  15 characters can be formed giving the total set of 16 "A"
  characters:

        #\A
        #\S-A      #\M-A      #\H-A      #\A-A
        #\S-M-A    #\S-H-A    #\S-A-A    #\M-H-A    #\M-A-A    #\H-A-A
        #\S-M-H-A  #\S-M-A-A  #\S-H-A-A  #\M-H-A-A
        #\S-M-H-A-A

  \========


** Case Mappings

  Strictly speaking, R5RS does not require that the character set
  contain any upper or lower case letters.  For example, it must
  contain `a' but it does not require that CHAR-LOWER-CASE? of `a' is
  true.   However, in an implementation in which `a' is not lower
  case, `a' must also not be alphabetic.   

  /=== R6RS Recommendation:

   R6RS should explicitly require that `a..z' and `A..Z' are
   alphabetic and cased in the expected way.

  |=== Pika Design:

   Pika will satisfy the proposed requirement.

  \========


  R5RS requires a partial ordering of characters in which upper and
  lower case variants of "the same character" are treated as equal.

  Most problematically: R5RS requires that every alphabetic character
  have both an upper and lower case variant.  This is a problem
  because Unicode defines abstract characters which, at least
  intuitively, are alphabetic -- but which lack such case mappings.
  We'll explore the topic further, later, but briefly: it does not
  appear that "good Unicode support" and "R5RS requirements for case
  mappings" are compatible -- at least not in a simple way.

  /=== R6RS Recommendation:

   R6RS should drop the requirement from the closing sentence of
   section 6.3.4 which says:

	In addition, if char is alphabetic, then the result of
	char-upcase is upper case and the result of char-downcase is
	lower case.

   Instead, it should say:

	There is no requirement that all alphabetic characters have
        an upper and lowercase mappings and no requirement that all
        alphabetic characters return true for one of CHAR-UPPER-CASE?
        or CHAR-LOWER-CASE?.   There is no requirement that if a 
        character is upper or lower case that it has a case mapping
        which is itself a character.   However, it is required that
	the characters `a..z' are lowercase, `A..Z' are uppercase, 
        and that CHAR-UPCASE and CHAR-DOWNCASE converts between those
	two ranges.

   And:

        The case mapping procedures and predicates _must_ be
	consistent with the case mappings that determine equivalence
        of identifiers and symbol names. In many environments
	they are usable for case mappings in a broader linguistic
	sense but programmers are cautioned that, in general, they are
	not appropriate for such uses in portable applications: some
        alphabets lack the concept of case entirely; others have the
	concept of case but lack a 1:1 mapping between upper and
	lowercase characters.  Different case mapping procedures
        should be used in portable linguistically-oriented
        applications.
        

  |=== Pika Design:

   Pika will include CHAR? values such as Unicode's eszett
   (U+00DF) with the properties that can't satisfy R5RS' requirements
   as in the examples:

	(char-alphabetic? eszett) => #t
        (char-lower-case? eszett) => #t
        (char-lower-case? (char-upcase eszett)) => #t
        (char=? eszett (char-upcase eszett)) => #t

  \========


** Character Ordering and Enumeration

  R5RS requires a bijective mapping between characters and a set of
  integers (the CHAR->INTEGER and INTEGER->CHAR procedures).   Let's
  call this mapping the "enumeration of characters".

  R5RS requires a total ordering of characters and requires that that
  enumeration is isomorphic to the ordering of the enumeration.

  R5RS underspecifies the total ordering of characters.  It requires
  that alphabetic characters `a..z' and (if present) `A..Z' be
  (respectively) lexically ordered.  It requires that decimal digits
  be decimally ordered.  It requires that digits either all proceed or
  all follow all uppercase letters.

  The ordering requirements of R5RS are problematic for Unicode.
  While iso8859-* digits `0..9' easily satisfy the requirement,
  Unicode defines additional decimal digits which do not.
  Intuitively, it seems that either CHAR-NUMERIC? must not behave as
  one would like on some Unicode abstract characters or the ordering
  requirement will have to change in R6RS.

  /=== R6RS Recommendation:

   R6RS should modify the requirement from section 6.3.4 which says:

     These procedures impose a total ordering on the set of
     characters. It is guaranteed that under this ordering:

      * The upper case characters are in order. For example, 
        (char<? #\A #\B) returns #t.  

      * The lower case characters are in order. For example, 
        (char<? #\a #\b) returns #t. 

      * The digits are in order. For example, 
        (char<? #\0 #\9) returns #t. 

      * Either all the digits precede all the upper case letters, 
        or vice versa. 

      * Either all the digits precede all the lower case letters, 
         or vice versa. 


   Instead, it should say:

     These procedures impose a total ordering on the set of
     characters. It is guaranteed that under this ordering:

      * The characters `A..Z' are in order. For example, 
        (char<? #\A #\B) returns #t.  

      * The characters `a..z' are in order. For example, 
        (char<? #\a #\b) returns #t. 

      * The digits `0..9' are in order. For example, 
        (char<? #\0 #\9) returns #t. 

     Programmers are cautioned that the ordering of characters
     by these procedures is not expected to have linguistic 
     significance suitable for portable applications.   At the
     same time, implementors are strongly encouraged to define the
     ordering in such a way that a list of strings, sorted lexically by
     the character ordering, is at least likely to be in an order that 
     is suitable for presentation to users -- even though the sorting
     may not be culturally optimal.


  |=== Pika Design:

   Pika CHAR? values will map to their Unicode codepoint equivalents,
   with bucky-bits added added as additional high-order bits.
   This satisfies the proposed modified requirements and results in
   a situation where, for example, all characters with the META bit
   set will sort after all characters with no buckybits set.

  \========


** Character Classes

  R5RS defines 5 classes of characters by introducing 5 predicates:

  	char-alphabetic?
  	char-numeric?
  	char-whitespace?
  	char-upper-case?
  	char-lower-case?

  In the context of Unicode, there is a three-way ambiguity between
  linguistic categorization of characters, categorizations defined by
  the Unicode standard, and categorizations as they apply to Scheme
  syntax.  

  /=== R6RS Recommendation:

   Section 6.3.4 should be modified.  Instead of saying:

     These procedures return #t if their arguments are alphabetic,
     numeric, whitespace, upper case, or lower case characters,
     respectively, otherwise they return #f.  The following remarks,
     which are specific to the ASCII character set, are intended only
     as a guide: The alphabetic characters are the 52 upper and lower
     case letters. The numeric characters are the ten decimal
     digits. The whitespace characters are space, tab, line feed, form
     feed, and carriage return.

   it should say:

     These procedures return #t if their arguments are alphabetic,
     numeric, whitespace, upper case, or lower case characters,
     respectively, otherwise they return #f.   These procedures
     _must_ be consistent with the procedure READ provided by the
     implementation.   For example, if a character is
     CHAR-ALPHABETIC?, then it must also be suitable for use as the
     first character of an identifier.

     `a..z' and `A..Z' _must_ be alphabetic and _must_ be respectively
     lower and upper case.  

     #\space, #\tab, and #\formfeed _must_ be CHAR-WHITESPACE?.

     `0..9' _must_ be CHAR-NUMERIC?.

     No character may cause more than one the procedures
     CHAR-ALPHABETIC?, CHAR-NUMERIC? and CHAR-WHITESPACE? to return
     #t.

     No character may cause more than one of the procedures
     CHAR-UPPER-CASE? and CHAR-LOWER-CASE? to return #t.

     Programmer's are advised that these procedures are unlikely to be
     suitable for linguistic programming in portable code while
     implementors are strongly encouraged to define them in ways that
     make them a reasonable approximation of their linguistic
     counterparts.  

  |=== Pika Design:

     Pika will return #t from CHAR-NUMERIC? _only_ for `0..9'.

     Pika will return #t from CHAR-WHITESPACE? _only_ for space, tab,
     newline, carriage return, and formfeed.

     The set of characters for which Pika will return #t from
     CHAR-ALPHABETIC? is undetermined at this time.

     Pika will return #t from CHAR-UPPER-CASE? for those which have
     the Unicode general category property Lu or Lt; from
     CHAR-LOWER-CASE? for those which have the general category
     property Ll.


  \========


** What _is_ a Character, Anyway

  We have observed the need for various changes to the Scheme
  standard for the CHAR? type but have done so (deliberately) without 
  "nailing down" exactly what a character is.

  The good reason for preserving this ambiguity is that there are
  several reasonable choices for the CHAR? type -- implementations
  should not be required to all be the same in this regard.

  In particular, these strategies seem to me to be the most viable:

  ~ A CHAR? value roughly corresponds to a Unicode codepoint.

  ~ A CHAR? value roughly corresponds to a member of exactly one of
    the iso8859-* family of character sets.   (An implementation in
    this class would not have full Unicode support, of course.
    Nevertheless, the iso8859-* character sets are (abstractly, not 
    by numeric character values) a subset of Unicode -- they are
    consistent with Unicode.   It would seem gratuitous to rule an
    implementation non-standard simply because it doesn't support a
    huge character set.)

  ~ A CHAR? value corresponds to an 8-bit integer, with characters
    0..127 corresponding to ASCII characters, and the meaning of
    characters 128..255 depending on the host environment (such as a
    LOCALE setting).  (This is a second class of implementations
    without full Unicode support but consistent with Unicode.
    Implementations of this class would be consistent with a common
    form of internationalization practices used in C programming.)

  ~ A CHAR? value corresponds to a "combining sequence" of an
    arbitrary number of Unicode codepoints.   (At this time, such
    implementations are mostly theoretic.   This is the kind of 
    implementation Ray Dillenger has been working on and he makes
    an interesting case for it.)

  Related to these possibilities is an important question of
  _syntax_.  A Scheme program can contain a lexeme denoting a
  character constant:

	#\X

  and the question is "What can X be in a portable program?"


  /=== R6RS Recommendation:

    R6RS should explicitly define a _portable_character_set_
    containing the characters mentioned earlier:  `a..z', `A..Z', 
    space, formfeed, newline, carriage return, and the punctuation
    required by Scheme syntax.

    Additionally, R6RS should define an _optional_ syntax for 
    Unicode codepoints.   I propose:

		#\U+XXXXX

    and in strings:

		\U+XXXXX.

    where XXXXX is an (arbitrary length) string of hexadecimal digits.

    There is some "touchiness" with this optional syntax.
    Conceivably, for example, implementations may support Unicode to a
    degree but not support codepoints which are not assigned
    characters, or not support all possible codepoints, or not permit
    strings which are not in one of the (several available)
    canonical forms.  In my opinion, it is too early to try to
    differentiate these various forms of optional conformance.  At
    this stage in history, the optional syntaxes should be permitted
    -- but applications providing them should not be constrained to
    support arbitrary codepoint characters or arbitrary Unicode
    strings.

    

  |=== Pika Design:

    Pika's character set will include all Unicode codepoints with 
    all combinations of buckybits.   Some characters will only be 
    writable using hexadecimal escapes and/or buckybit prefixes.

  \========


* Scheme Strings Meet Unicode

  R5RS defines Scheme strings as sequences of scheme characters.
  They have a length measured in characters and may be indexed
  (to retrieve or set a given character) by character offsets.

  R5RS defines two lexical orderings of strings: once by the
  definitions of the ordering of characters; again by the definitions
  of the case-independent ordering of characters.

  There is a strong expectation that strings are "random access" 
  meaning that any character within them can be accessed or set in
  O(1) time.   The _intuitive_ model of a Scheme string is a uniform
  array of characters.

  /=== R6RS Recommendation:

    R6RS should strongly encourage implementations to make the
    expected-case complexity of STRING-REF and STRING-SET! O(1).

  \========


  There is an additional problem when designing portable APIs: the
  matter of string indexes.

  Most of the possible answers to "what is a Scheme character" are
  consistent with the view that characters correspond to (possibly a
  subset of) Unicode codepoints.

  One of the possible answers to that question has the CHAR? type
  correspond to a _sequence_ of Unicode code points.

  The difference between those two possibilities impacts on string
  indexes.  An index to the beginning of some substring has one
  numeric value if characters are codepoints, another if they are
  combined sequences of codepoints.

  That difference is, unfortunately, intolerable for portable code.
  Consider, for example, a string constant written:

	"XYZ"

  where X, Y, and Z are arbitrary Unicode substrings.  What is the
  index of the beginning of substring Y? The question becomes
  especially pressing for portable programs that want to encode that
  string index as an integer constant, for programs exchanging Scheme
  data which includes string indexes with other Scheme
  implementations, and for an FFI (in which FFI-using code may wish to
  compute and return to Scheme a string index -- or to interpret a
  string-index passed to C from Scheme).

  So, an ambiguity about string indexes should not be allowed to
  stand.


  /=== R6RS Recommendation:

   While R6RS should not require that CHAR? be a subset of Unicode,
   it should specify the semantics of string indexes for strings
   which _are_ subsets of Unicode.

   Specifically, if a Scheme string consists of nothing but Unicode
   codepoints (including substrings which form combining sequences),
   string indexes _must_ be Unicode codepoint offsets.

  \========


  That proposed modification to R6RS presents a (hopefully small)
  problem for Ray Dillinger.   He would like (for quite plausible
  reasons) to have CHAR? values which correspond to a _sequence_ of
  Unicode codepoints.   While I have some ideas about how to
  _partially_ reconcile his ideas with this proposal, I'd like to hear
  his thoughts on the matter.


* The Scheme Interface to Unicode Characters and Strings

  In the preceding, we have added no new procedures or types to
  Scheme -- only modified the requirements for existing procedures.
  We have added new syntax for characters and strings.

  Certainly, further extensions to Scheme are desirable -- for
  example, to provide linguistically sensitive string processing.
  I suggest that such extensions are best regarded as a separate topic
  -- to be taken up "elsewhere".


* The Portable FFI Interface to Unicode Characters and Strings

  This section is written in the style of Pika naming and calling 
  conventions.

** Basic Types

  ~ typedef <unspecified unsigned integer type> t_unicode;

  An unsigned integer type sufficiently large to hold a Unicode
  codepoint.


  ~ enum uni_encoding_scheme;

    Valid values include but are not limited to:

	uni_utf8
	uni_utf16
	uni_utf16be
	uni_utf16le
	uni_utf32
	uni_iso8859_1
        ...
	uni_iso8859_16
	uni_ascii



** Character Conversions

  ~ t_scm_error scm_character_to_codepoint (t_unicode * answer,
                                            t_scm_arena instance,
                                            t_scm_word * chr)

      Normally, return (via `*answer') the Unicode codepoint value
      corresponding to Scheme value `*chr'.  Return 0.

      If `*chr' is not a character or is not representable as a 
      Unicode codepoint, set `*answer' to U+FFFD and return an
      error code.


  ~ t_scm_error scm_character_to_ascii (char * answer,
                                        t_scm_arena instance,
                                        t_scm_word * chr)

      Normally, return (via `*answer') the ASCII codepoint value
      corresponding to Scheme value `*chr'.  Return 0.

      If `*chr' is not an ASCII character or is not representable as a 
      Unicode codepoint, set `*answer' to 0 and return an
      error code.


  ~ t_scm_error scm_codepoint_to_character (t_scm_word * answer,
                                            t_scm_arena instance,
                                            t_unicode codepoint)

      Normally, return (via `*answer') the Scheme character
      corresponding to `codepoint' which must be in the range
      0..(2^21-1).  Return 0.

      If `codepoint' is not representable as a Scheme character,
      set `*answer' to an unspecified Scheme value and return an
      error code.


  ~ void scm_ascii_to_character (t_scm_word * answer,
                                 t_scm_arena instance,
                                 char chr)

      Return (via `*answer') the Scheme character corresponding 
      to `chr' which must be representable as an ASCII character.


** String Conversions

  ~ t_scm_error scm_extract_string8 (t_uchar * answer,
                                     size_t * answer_len,
                                     enum uni_encoding_scheme enc,
                                     t_scm_arena instance,
                                     t_scm_word * str)

    Normally, convert `str' to the indicated encoding (which must be
    one of `uni_utf8', `uni_iso8859_*', or `uni_ascii') storing the
    result in the memory addressed by `answer' and the number of 
    bytes stored in `*answer_len'.  Return 0.

    On input, `*answer_len' should indicate the amount of storage 
    available at the address `answer'.  If there is insuffiencient 
    memory available, `*answer_len' will be set to the number of bytes
    needed and the value `scm_err_too_short' returned.


  ~ t_scm_error scm_extract_string16 (t_uint16 * answer,
                                      size_t * answer_len,
                                      enum uni_encoding_scheme enc,
                                      t_scm_arena instance,
                                      t_scm_word * str)

    Normally, convert `str' to the indicated encoding (which must be
    one of `uni_utf16', `uni_utf16be', or `uni_utf16le') storing the
    result in the memory addressed by `answer' and the number of 
    16-bit values stored in `*answer_len'.  Return 0.

    On input, `*answer_len' should indicate the amount of storage
    available at the address `answer' (measured in 16-bit values).  If
    there is insuffiencient memory available, `*answer_len' will be
    set to the number of 16-bit values needed and the value
    `scm_err_too_short' returned.


  ~ t_scm_error scm_extract_string32 (t_uint32 * answer,
                                      size_t * answer_len,
                                      t_scm_arena instance,
                                      t_scm_word * str)

    Normally, convert `str' to UTF-32, storing the result in the
    memory addressed by `answer' and the number of 32-bit values
    stored in `*answer_len'.  Return 0.

    On input, `*answer_len' should indicate the amount of storage
    available at the address `answer' (measured in 32-bit values).  If
    there is insuffiencient memory available, `*answer_len' will be
    set to the number of 32-bit values needed and the value
    `scm_err_too_short' returned.



  ~ t_scm_error scm_make_string8_n (t_scm_word uchar * answer,
                                    t_scm_arena instance,
                                    t_uchar * str,
                                    enum uni_encoding_scheme enc,
                                    size_t str_len)

    Convert `str' of length `str_len' and in encoding to `enc' to
    a Scheme value (returned in `*answer') if possible, and return 0.

    Otherwise, return an error code.


  ~ t_scm_error scm_make_string16_n (t_scm_word uchar * answer,
                                     t_scm_arena instance,
                                     t_uint16 * str,
                                     enum uni_encoding_scheme enc,
                                     size_t str_len)

    Convert `str' of length `str_len' and in encoding to `enc' to
    a Scheme value (returned in `*answer') if possible, and return 0.

    Otherwise, return an error code.


  ~ t_scm_error scm_make_string32_n (t_scm_word uchar * answer,
                                     t_scm_arena instance,
                                     t_uint32 * str,
                                     enum uni_encoding_scheme enc,
                                     size_t str_len)

    Convert `str' of length `str_len' and in encoding to `enc' to
    a Scheme value (returned in `*answer') if possible, and return 0.

    Otherwise, return an error code.



** Other FFI Functions

  Various standard Scheme procedures (e.g., `STRING-REF') ought to
  be present in the FFI as well.   Their mappings into C are
  straightforward given the proposed requirement that string indexes 
  refer to codepoint offsets.


* The Pika FFI Interface to Unicode Characters and Strings

  The standard Scheme string procedures map into the native Pika FFI
  in the expected way (their C function prototypes and semantics can
  be inferred in a trivial way from their standard Scheme
  specifications).   As such, they are not specified here.


** Pika FFI Access to String Data

  (Note: In earlier discussions with some people I had suggested
   that Pika strings might be represented by a tree structure.  I
   have since decided that that should not be the case:  I want Pika
   to live up to the expectation that STRING? values are represented
   as arrays.   The tree-structured-string-like type will be present
   in Pika, but it will be distinct from STRING?.)

  There is a touchy design issue regarding strings.   On the one hand,
  for efficiency's sake, C code needs fairly direct access (for both
  reading and writing) to string data.   On the other hand, that
  necessarily means exposing to C the otherwise internal details of
  value representation and of addressing the possibility of a
  multi-threaded Pika.

  ~ t_scm_error scm_lock_string_data (t_udstr * answer,
                                      t_scm_arena instance,
                                      t_scm_word * str)

    Obtain the `t_udstr' (see libhackerlab) corresponding to `str'.
    Return 0.   If `*str' is not a string, set `*answer' to 0 and 
    return an error code.

    A string obtained by this call must be released by
    `scm_release_string_data' (see below).  

    It is critical that between calls to `scm_lock_string_data' and 
    `scm_release_string_data' no other calls to Pika FFI functions
    be made, and that the number of instructions between those calls
    is sharply bounded.


  ~ t_scm_error scm_lock_string_data2 (t_udstr * answer1,
                                       t_udstr * answer2,
                                       t_scm_arena instance,
                                       t_scm_word * str1
                                       t_scm_word * str2)

    Like `scm_lock_string_data' but return the `t_udstr's for two 
    strings instead of one.



  ~ t_scm_error scm_release_string_data (t_scm_arena instance
                                         t_scm_word * str)

    Release a string locked by `scm_lock_string_data'.


  ~ t_scm_error scm_release_string_data (t_scm_arena instance
                                         t_scm_word * str1
                                         t_scm_word * str2)

    Release strings locked by `scm_lock_string_data2'.


** Pika String Internals

  libhackerlab contains a string-like type, `t_udstr' defined
  (internally) as a pointer to a structure of the form:

    struct udstr_handle
    {
      enum uni_encoding_scheme enc;
      size_t length;
      uni_string data;

      alloc_limits limits;
      int refs;
    };

  The intention here is to represent a string in an aribitray 
  Unicode encoding, with an explicitly recorded length measured in
  coding units.

  libhackerlab contains a (currently small but growing) number of
  "string primitives" for operating on `t_udstr' values.  For example, 
  one can concatenate two strings without regard to what encoding
  scheme each is in.

  In Pika, strings shall be represented as `t_udstr' values, pointed
  to by an scm_vtable object.

  Further restrictions apply, however:

  Pika strings will have the property that:

  ~ any string including a character in the range U+10000..U+1FFFFF
    will be stored in a t_udstr using the uni_utf32 encoding.

  ~ any other string including a character in the range U+0100..U+FFFF
    will be stored in a t_udstr using the uni_utf16 encoding.

  ~ all remaining strings will be stored in a t_udstr using
    the uni_iso8859_1 encoding.

  In that way, the length of the t_udstr (measured in encoding units)
  will always be equal to the length of the Scheme string (measured
  in codepoints).   Nearly all Scheme string operations involving
  string indexes can find the referenced characters in O(1) time.
  The primary exception is STRING-SET! if the character being stored
  requires the string it is being stored into to change encoding.

  At the same time, Scheme strings will have a space-efficient 
  representation.







From MAILER-DAEMON Thu Jan 22 12:50:51 2004
Received: from list by monty-python.gnu.org with archive (Exim 4.24)
	id 1AjiyM-0006Bj-Fc
	for mharc-pika-dev@gnu.org; Thu, 22 Jan 2004 12:50:30 -0500
Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.24)
	id 1Ajivf-0004nI-Hg
	for pika-dev@nongnu.org; Thu, 22 Jan 2004 12:47:43 -0500
Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.24)
	id 1Ajiuo-0004Ox-3u
	for pika-dev@nongnu.org; Thu, 22 Jan 2004 12:47:21 -0500
Received: from [65.234.195.150] (helo=morrowfield.regexps.com)
	by monty-python.gnu.org with esmtp (Exim 4.24)
	id 1AjitZ-0003oE-TC; Thu, 22 Jan 2004 12:45:34 -0500
Received: (from lord@localhost)
	by morrowfield.regexps.com (8.9.1/8.9.1) id JAA20868;
	Thu, 22 Jan 2004 09:58:50 -0800 (PST)
	(envelope-from lord@morrowfield.regexps.com)
Date: Thu, 22 Jan 2004 09:58:50 -0800 (PST)
Message-Id: <200401221758.JAA20868@morrowfield.regexps.com>
From: Tom Lord <lord@emf.net>
To: pika-dev@nongnu.org
Subject: [Pika-dev] so... string work
X-BeenThere: pika-dev@nongnu.org
X-Mailman-Version: 2.1.2
Precedence: list
List-Id: <pika-dev.nongnu.org>
List-Unsubscribe: <http://mail.nongnu.org/mailman/listinfo/pika-dev>,
	<mailto:pika-dev-request@nongnu.org?subject=unsubscribe>
List-Archive: <http://mail.gnu.org/pipermail/pika-dev>
List-Post: <mailto:pika-dev@nongnu.org>
List-Help: <mailto:pika-dev-request@nongnu.org?subject=help>
List-Subscribe: <http://mail.nongnu.org/mailman/listinfo/pika-dev>,
	<mailto:pika-dev-request@nongnu.org?subject=subscribe>
X-List-Received-Date: Thu, 22 Jan 2004 17:50:26 -0000



So, to sum up the implications for Pika of that long thing:

Strings will be "vtable objects" containing a pointer to a `t_udstr'
(see src/hackerlab/strigns).

`t_udstr's hold strings with an explicitly recorded length (measured
in encoding values -- e.g., bytes for utf-8, int16s for utf-16) and an
explicitly recorded encoding form (e.g. "this is a utf-8 string").

I want pika to use these encodings in such a way that Scheme strings 
(mostly) use the narrowest representation they can without needing to
encode a character as more than one encoding unit.   So, a 7-bit ASCII
string will usually be in UTF-8 (one byte per character) and most
other strings will be in UTF-16 (one uint16 per character) and some
strings (e.g., those containing characters with buckybits set;  those
containing Unicde characters outside the "basic multilingual plane")
will be stored in UTF-32.

So what needs to be done in libhackerlab is:

~ add uni_utf32 to the list of encoding forms
~ extend t_udstr for utf32
~ write test code for t_udstr
~ make sure there's enough in libhackerlab to implement the standard
  Scheme string procedures

and in Pika:

~ implement the representation for strings
~ implement the string primitives
~ write some tests


Any of that grab you as something you'd like to work on?

I should warn that the C macrology and inlining foo for adding UTF-32
is a little bit twisted.   I find that when I change it takes me a
while to figure out where I put everything :-).    But it's not as bad
as it might look at first.

-t




From MAILER-DAEMON Fri Jan 23 16:29:03 2004
Received: from list by monty-python.gnu.org with archive (Exim 4.24)
	id 1Ak8rP-0001CM-6t
	for mharc-pika-dev@gnu.org; Fri, 23 Jan 2004 16:29:03 -0500
Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.24)
	id 1Ak8rJ-00016s-Oj
	for pika-dev@nongnu.org; Fri, 23 Jan 2004 16:28:57 -0500
Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.24)
	id 1Ak8qn-0000W6-G8
	for pika-dev@nongnu.org; Fri, 23 Jan 2004 16:28:56 -0500
Received: from [80.33.152.103] (helo=turing.uab.es)
	by monty-python.gnu.org with esmtp (TLSv1:RC4-SHA:128) (Exim 4.24)
	id 1Ak8qm-0000Re-RR
	for pika-dev@nongnu.org; Fri, 23 Jan 2004 16:28:25 -0500
Received: from jao by turing.uab.es with local (Exim 4.30)
	id 1Ak8qh-0000GE-H4; Fri, 23 Jan 2004 22:28:19 +0100
To: pika-dev@nongnu.org
X-Attribution: jao
X-URL: <http://tao.uab.es/jao/>
References: <200401221758.JAA20868@morrowfield.regexps.com>
From: "Jose A. Ortega Ruiz" <jao@gnu.org>
Organization: CCD - Autonomous University of Barcelona
Date: Fri, 23 Jan 2004 22:28:18 +0100
In-Reply-To: <200401221758.JAA20868@morrowfield.regexps.com> (Tom Lord's
	message of "Thu, 22 Jan 2004 09:58:50 -0800 (PST)")
Message-ID: <877jziuzgt.fsf@turing.uab.es>
User-Agent: Gnus/5.1006 (Gnus v5.10.6) Emacs/21.3 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Sender: Jose Antonio Ortega Ruiz <jao@abra.uab.es>
Cc: 
Subject: [Pika-dev] Re: so... string work
X-BeenThere: pika-dev@nongnu.org
X-Mailman-Version: 2.1.2
Precedence: list
List-Id: <pika-dev.nongnu.org>
List-Unsubscribe: <http://mail.nongnu.org/mailman/listinfo/pika-dev>,
	<mailto:pika-dev-request@nongnu.org?subject=unsubscribe>
List-Archive: <http://mail.gnu.org/pipermail/pika-dev>
List-Post: <mailto:pika-dev@nongnu.org>
List-Help: <mailto:pika-dev-request@nongnu.org?subject=help>
List-Subscribe: <http://mail.nongnu.org/mailman/listinfo/pika-dev>,
	<mailto:pika-dev-request@nongnu.org?subject=subscribe>
X-List-Received-Date: Fri, 23 Jan 2004 21:28:58 -0000


hi,

Tom Lord <lord@emf.net> writes:

>
> Any of that grab you as something you'd like to work on?
>
> I should warn that the C macrology and inlining foo for adding UTF-32
> is a little bit twisted.   I find that when I change it takes me a
> while to figure out where I put everything :-).    But it's not as bad
> as it might look at first.
>

ok, i'm a taker for this job. if you think i can handle it all, i'll
begin, well, at the beginning, with the hackerlab stuff and those
hairy macros; once it's done, i'd go on with pika strings. unless any
of you wants to join the fun. tom: iirc, you mentioned something about
splitting the job? in that case, just tell me what part you're leaving
to me... btw, right now i'm quite busy reading emails: your string
document has raised quite a few reactions over there! :)

cheers,
jao
-- 
"There are three kinds of people: those who can count, and those who can't"



From MAILER-DAEMON Fri Jan 23 17:54:28 2004
Received: from list by monty-python.gnu.org with archive (Exim 4.24)
	id 1AkAC4-0003so-8s
	for mharc-pika-dev@gnu.org; Fri, 23 Jan 2004 17:54:28 -0500
Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.24)
	id 1AkABw-0003n9-Ll
	for pika-dev@nongnu.org; Fri, 23 Jan 2004 17:54:20 -0500
Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.24)
	id 1AkA9b-0001Pq-4V
	for pika-dev@nongnu.org; Fri, 23 Jan 2004 17:52:26 -0500
Received: from [199.232.41.8] (helo=mx20.gnu.org)
	by monty-python.gnu.org with esmtp (TLSv1:DES-CBC3-SHA:168)
	(Exim 4.24) id 1AkA3c-0004OY-2v; Fri, 23 Jan 2004 17:45:44 -0500
Received: from [65.234.195.150] (helo=morrowfield.regexps.com)
	by mx20.gnu.org with esmtp (Exim 4.24)
	id 1AkA3M-0001Dx-SW; Fri, 23 Jan 2004 17:45:29 -0500
Received: (from lord@localhost)
	by morrowfield.regexps.com (8.9.1/8.9.1) id OAA27847;
	Fri, 23 Jan 2004 14:58:49 -0800 (PST)
	(envelope-from lord@morrowfield.regexps.com)
Date: Fri, 23 Jan 2004 14:58:49 -0800 (PST)
Message-Id: <200401232258.OAA27847@morrowfield.regexps.com>
From: Tom Lord <lord@emf.net>
To: jao@gnu.org
In-reply-to: <877jziuzgt.fsf@turing.uab.es> (jao@gnu.org)
References: <200401221758.JAA20868@morrowfield.regexps.com>
	<877jziuzgt.fsf@turing.uab.es>
Cc: pika-dev@nongnu.org
Subject: [Pika-dev] Re: so... string work
X-BeenThere: pika-dev@nongnu.org
X-Mailman-Version: 2.1.2
Precedence: list
List-Id: <pika-dev.nongnu.org>
List-Unsubscribe: <http://mail.nongnu.org/mailman/listinfo/pika-dev>,
	<mailto:pika-dev-request@nongnu.org?subject=unsubscribe>
List-Archive: <http://mail.gnu.org/pipermail/pika-dev>
List-Post: <mailto:pika-dev@nongnu.org>
List-Help: <mailto:pika-dev-request@nongnu.org?subject=help>
List-Subscribe: <http://mail.nongnu.org/mailman/listinfo/pika-dev>,
	<mailto:pika-dev-request@nongnu.org?subject=subscribe>
X-List-Received-Date: Fri, 23 Jan 2004 22:54:26 -0000


    > From: "Jose A. Ortega Ruiz" <jao@gnu.org>

    > Tom Lord <lord@emf.net> writes:

    > > Any of that grab you as something you'd like to work on?

    > > I should warn that the C macrology and inlining foo for adding UTF-32
    > > is a little bit twisted.   I find that when I change it takes me a
    > > while to figure out where I put everything :-).    But it's not as bad
    > > as it might look at first.

    > ok, i'm a taker for this job. if you think i can handle it all, i'll
    > begin, well, at the beginning, with the hackerlab stuff and those
    > hairy macros; 

Neat.

    > once it's done, i'd go on with pika strings. unless any
    > of you wants to join the fun. 

Matthew mentioned (elsewhere) that he might work on the Pika object
representations.   He might wind up meeting you half-way.   (He's
interested in working on way too much stuff, though :-) -- and on the
other hand he's surprisingly fast.)

    > tom: iirc, you mentioned something about
    > splitting the job? in that case, just tell me what part you're leaving
    > to me... btw, right now i'm quite busy reading emails: your string
    > document has raised quite a few reactions over there! :)

Basically, I'm trying to let you get your pick of the litter.   You
can tell me what you'd rather have someone else do or where it would
be helpful to have someone else working in parallel.   My time is
annoyingly split between Pika and arch so I wind up being the
bottleneck if I'm not careful.

-t




From MAILER-DAEMON Fri Jan 23 19:14:56 2004
Received: from list by monty-python.gnu.org with archive (Exim 4.24)
	id 1AkBR0-00021h-MV
	for mharc-pika-dev@gnu.org; Fri, 23 Jan 2004 19:13:58 -0500
Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.24)
	id 1AkBQi-0001ia-EE
	for pika-dev@nongnu.org; Fri, 23 Jan 2004 19:13:40 -0500
Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.24)
	id 1AkBPS-0000LN-42
	for pika-dev@nongnu.org; Fri, 23 Jan 2004 19:12:56 -0500
Received: from [199.232.41.8] (helo=mx20.gnu.org)
	by monty-python.gnu.org with esmtp (TLSv1:DES-CBC3-SHA:168)
	(Exim 4.24) id 1AkB6F-0001S7-OA
	for pika-dev@nongnu.org; Fri, 23 Jan 2004 18:52:31 -0500
Received: from [80.33.152.103] (helo=turing.uab.es)
	by mx20.gnu.org with esmtp (Exim 4.24) id 1AkAaz-0004gX-7A
	for pika-dev@nongnu.org; Fri, 23 Jan 2004 18:20:13 -0500
Received: from jao by turing.uab.es with local (Exim 4.30)
	id 1AkAas-0000Sh-5M; Sat, 24 Jan 2004 00:20:06 +0100
Date: Sat, 24 Jan 2004 00:20:06 +0100
From: Jose A Ortega Ruiz <jao@gnu.org>
To: Tom Lord <lord@emf.net>
Message-ID: <20040123232006.GA1758@uab.es>
References: <200401221758.JAA20868@morrowfield.regexps.com>
	<877jziuzgt.fsf@turing.uab.es>
	<200401232258.OAA27847@morrowfield.regexps.com>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <200401232258.OAA27847@morrowfield.regexps.com>
X-Operating-System: Linux turing 2.4.23
User-Agent: Mutt/1.5.5.1+cvs20040105i
Sender: Jose Antonio Ortega Ruiz <jao@abra.uab.es>
Cc: pika-dev@nongnu.org
Subject: [Pika-dev] Re: so... string work
X-BeenThere: pika-dev@nongnu.org
X-Mailman-Version: 2.1.2
Precedence: list
List-Id: <pika-dev.nongnu.org>
List-Unsubscribe: <http://mail.nongnu.org/mailman/listinfo/pika-dev>,
	<mailto:pika-dev-request@nongnu.org?subject=unsubscribe>
List-Archive: <http://mail.gnu.org/pipermail/pika-dev>
List-Post: <mailto:pika-dev@nongnu.org>
List-Help: <mailto:pika-dev-request@nongnu.org?subject=help>
List-Subscribe: <http://mail.nongnu.org/mailman/listinfo/pika-dev>,
	<mailto:pika-dev-request@nongnu.org?subject=subscribe>
X-List-Received-Date: Sat, 24 Jan 2004 00:13:56 -0000

On Fri, Jan 23, 2004 at 02:58:49PM -0800, Tom Lord wrote:
> 
>     > tom: iirc, you mentioned something about
>     > splitting the job? in that case, just tell me what part you're leaving
>     > to me... btw, right now i'm quite busy reading emails: your string
>     > document has raised quite a few reactions over there! :)
> 
> Basically, I'm trying to let you get your pick of the litter.   You
> can tell me what you'd rather have someone else do or where it would
> be helpful to have someone else working in parallel.   My time is
> annoyingly split between Pika and arch so I wind up being the
> bottleneck if I'm not careful.
> 

ok. so i'll start working on hackerlab and the hairy macros, and keep
you informed about the progress. i think this string thing will be an
excellent way of finally getting into pika (and hackerlab) innards; in
the future, i'll surely be interested in more scheme-centered work, but
right now, as a scheme beginner, i'm surely more useful as a c
developer. so... string work!

jao




From MAILER-DAEMON Fri Jan 23 21:49:00 2004
Received: from list by monty-python.gnu.org with archive (Exim 4.24)
	id 1AkDr2-0001aJ-FE
	for mharc-pika-dev@gnu.org; Fri, 23 Jan 2004 21:49:00 -0500
Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.24)
	id 1AkDr0-0001Xn-Fg
	for pika-dev@nongnu.org; Fri, 23 Jan 2004 21:48:58 -0500
Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.24)
	id 1AkDqT-0001BU-0Z
	for pika-dev@nongnu.org; Fri, 23 Jan 2004 21:48:56 -0500
Received: from [199.232.41.8] (helo=mx20.gnu.org)
	by monty-python.gnu.org with esmtp (TLSv1:DES-CBC3-SHA:168)
	(Exim 4.24) id 1AkDqS-00014C-7Z
	for pika-dev@nongnu.org; Fri, 23 Jan 2004 21:48:24 -0500
Received: from [129.110.10.12] (helo=smtp1.utdallas.edu)
	by mx20.gnu.org with esmtp (Exim 4.24) id 1AkDk8-0006tZ-Eq
	for pika-dev@nongnu.org; Fri, 23 Jan 2004 21:41:52 -0500
Received: from kaiser (bluesocket.utdallas.edu [129.110.39.12])
	by smtp1.utdallas.edu (Postfix) with ESMTP id 8405A388D74;
	Fri, 23 Jan 2004 20:41:44 -0600 (CST)
Received: from jivera by kaiser with local (Exim 3.35 #1 (Debian))
	id 1Ak7CH-0000hS-00; Fri, 23 Jan 2004 20:42:29 +0100
To: Tom Lord <lord@emf.net>
Subject: Re: [Pika-dev] Re: so... string work
References: <200401221758.JAA20868@morrowfield.regexps.com>
	<877jziuzgt.fsf@turing.uab.es>
	<200401232258.OAA27847@morrowfield.regexps.com>
From: Matthew Dempsky <jivera@flame.org>
Date: Fri, 23 Jan 2004 20:42:29 +0100
In-Reply-To: <200401232258.OAA27847@morrowfield.regexps.com> (Tom Lord's
	message of "Fri, 23 Jan 2004 14:58:49 -0800 (PST)")
Message-ID: <87ektqtpsq.fsf@flame.org>
User-Agent: Gnus/5.1006 (Gnus v5.10.6) Emacs/21.3 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Sender: Matthew Dempsky <jivera@utdallas.edu>
Cc: pika-dev@nongnu.org
X-BeenThere: pika-dev@nongnu.org
X-Mailman-Version: 2.1.2
Precedence: list
List-Id: <pika-dev.nongnu.org>
List-Unsubscribe: <http://mail.nongnu.org/mailman/listinfo/pika-dev>,
	<mailto:pika-dev-request@nongnu.org?subject=unsubscribe>
List-Archive: <http://mail.gnu.org/pipermail/pika-dev>
List-Post: <mailto:pika-dev@nongnu.org>
List-Help: <mailto:pika-dev-request@nongnu.org?subject=help>
List-Subscribe: <http://mail.nongnu.org/mailman/listinfo/pika-dev>,
	<mailto:pika-dev-request@nongnu.org?subject=subscribe>
X-List-Received-Date: Sat, 24 Jan 2004 02:48:59 -0000

Tom Lord <lord@emf.net> writes:

>     > once it's done, i'd go on with pika strings. unless any
>     > of you wants to join the fun. 
>
> Matthew mentioned (elsewhere) that he might work on the Pika object
> representations.   He might wind up meeting you half-way.

Yeah, I can work on strings from the Pika side.

Tonight, however, I think I'll take a look at what needs to be done to
extend the lexer to support numbers and then probably work on strings
and number-to-string and string-to-number operations.

> (He's interested in working on way too much stuff, though :-) -- and
> on the other hand he's surprisingly fast.)

Yeah, I am probably being a bit too ambitious in what I want to do,
but I think sometimes I work better under pressure (school
habit)... but don't think I've revealed _everything_ I'm working on (I
have to leave a few things as a surprise. ;-)

-jivera



From MAILER-DAEMON Sat Jan 24 18:01:27 2004
Received: from list by monty-python.gnu.org with archive (Exim 4.24)
	id 1AkWmN-0001bK-9S
	for mharc-pika-dev@gnu.org; Sat, 24 Jan 2004 18:01:27 -0500
Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.24)
	id 1AkWmJ-0001b7-TC
	for pika-dev@nongnu.org; Sat, 24 Jan 2004 18:01:23 -0500
Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.24)
	id 1AkWlm-0001J7-LJ
	for pika-dev@nongnu.org; Sat, 24 Jan 2004 18:01:23 -0500
Received: from [129.110.10.12] (helo=smtp1.utdallas.edu)
	by monty-python.gnu.org with esmtp (Exim 4.24) id 1AkWlj-0001It-ER
	for pika-dev@nongnu.org; Sat, 24 Jan 2004 18:00:47 -0500
Received: from kaiser (bluesocket.utdallas.edu [129.110.39.12])
	by smtp1.utdallas.edu (Postfix) with ESMTP id 78DD1388C34;
	Sat, 24 Jan 2004 17:00:45 -0600 (CST)
Received: from jivera by kaiser with local (Exim 3.35 #1 (Debian))
	id 1AkQDy-0001RF-00; Sat, 24 Jan 2004 17:01:30 +0100
To: Tom Lord <lord@emf.net>
Subject: Re: [Pika-dev] so... string work
References: <200401221758.JAA20868@morrowfield.regexps.com>
From: Matthew Dempsky <jivera@flame.org>
Date: Sat, 24 Jan 2004 17:01:30 +0100
In-Reply-To: <200401221758.JAA20868@morrowfield.regexps.com> (Tom Lord's
	message of "Thu, 22 Jan 2004 09:58:50 -0800 (PST)")
Message-ID: <874qul5o9x.fsf@flame.org>
User-Agent: Gnus/5.1006 (Gnus v5.10.6) Emacs/21.3 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Sender: Matthew Dempsky <jivera@utdallas.edu>
Cc: pika-dev@nongnu.org
X-BeenThere: pika-dev@nongnu.org
X-Mailman-Version: 2.1.2
Precedence: list
List-Id: <pika-dev.nongnu.org>
List-Unsubscribe: <http://mail.nongnu.org/mailman/listinfo/pika-dev>,
	<mailto:pika-dev-request@nongnu.org?subject=unsubscribe>
List-Archive: <http://mail.gnu.org/pipermail/pika-dev>
List-Post: <mailto:pika-dev@nongnu.org>
List-Help: <mailto:pika-dev-request@nongnu.org?subject=help>
List-Subscribe: <http://mail.nongnu.org/mailman/listinfo/pika-dev>,
	<mailto:pika-dev-request@nongnu.org?subject=subscribe>
X-List-Received-Date: Sat, 24 Jan 2004 23:01:24 -0000

Tom Lord <lord@emf.net> writes:

> So, to sum up the implications for Pika of that long thing:
>
> Strings will be "vtable objects" containing a pointer to a `t_udstr'
> (see src/hackerlab/strigns).

I meant to ask this earlier, but when you say the vtable object should
contain "a pointer to a t_udstr", is that intentional or accidental?
Since t_udstr itself is a pointer value and I don't see any hackerlab
routines yet that require a t_udstr *, am I missing something?

A routine like:

	t_udstr scm_string_value (t_scm_arena arena, t_scm_word * value);

should have a GC-independant lifetime like the scm_big(num|rat)_value
functions.

-jivera



From MAILER-DAEMON Sat Jan 24 18:14:53 2004
Received: from list by monty-python.gnu.org with archive (Exim 4.24)
	id 1AkWzM-0007g2-DV
	for mharc-pika-dev@gnu.org; Sat, 24 Jan 2004 18:14:52 -0500
Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.24)
	id 1AkWzE-0007fj-Gj
	for pika-dev@nongnu.org; Sat, 24 Jan 2004 18:14:44 -0500
Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.24)
	id 1AkWyc-0007U6-TQ
	for pika-dev@nongnu.org; Sat, 24 Jan 2004 18:14:38 -0500
Received: from [65.234.195.150] (helo=morrowfield.regexps.com)
	by monty-python.gnu.org with esmtp (Exim 4.24) id 1AkWyb-0007Tz-RE
	for pika-dev@nongnu.org; Sat, 24 Jan 2004 18:14:06 -0500
Received: (from lord@localhost)
	by morrowfield.regexps.com (8.9.1/8.9.1) id PAA04794;
	Sat, 24 Jan 2004 15:27:59 -0800 (PST)
	(envelope-from lord@morrowfield.regexps.com)
Date: Sat, 24 Jan 2004 15:27:59 -0800 (PST)
Message-Id: <200401242327.PAA04794@morrowfield.regexps.com>
From: Tom Lord <lord@emf.net>
To: jivera@flame.org
In-reply-to: <874qul5o9x.fsf@flame.org> (message from Matthew Dempsky on Sat, 
	24 Jan 2004 17:01:30 +0100)
Subject: Re: [Pika-dev] so... string work
References: <200401221758.JAA20868@morrowfield.regexps.com>
	<874qul5o9x.fsf@flame.org>
Cc: pika-dev@nongnu.org
X-BeenThere: pika-dev@nongnu.org
X-Mailman-Version: 2.1.2
Precedence: list
List-Id: <pika-dev.nongnu.org>
List-Unsubscribe: <http://mail.nongnu.org/mailman/listinfo/pika-dev>,
	<mailto:pika-dev-request@nongnu.org?subject=unsubscribe>
List-Archive: <http://mail.gnu.org/pipermail/pika-dev>
List-Post: <mailto:pika-dev@nongnu.org>
List-Help: <mailto:pika-dev-request@nongnu.org?subject=help>
List-Subscribe: <http://mail.nongnu.org/mailman/listinfo/pika-dev>,
	<mailto:pika-dev-request@nongnu.org?subject=subscribe>
X-List-Received-Date: Sat, 24 Jan 2004 23:14:47 -0000


    > From: Matthew Dempsky <jivera@flame.org>

    > Tom Lord <lord@emf.net> writes:

    > > So, to sum up the implications for Pika of that long thing:

    > > Strings will be "vtable objects" containing a pointer to a `t_udstr'
    > > (see src/hackerlab/strigns).

    > I meant to ask this earlier, but when you say the vtable object should
    > contain "a pointer to a t_udstr", is that intentional or
    > accidental?

Accidental.

    > Since t_udstr itself is a pointer value and I don't see any hackerlab
    > routines yet that require a t_udstr *, am I missing something?

    > A routine like:

    > 	t_udstr scm_string_value (t_scm_arena arena, t_scm_word * value);

    > should have a GC-independant lifetime like the scm_big(num|rat)_value
    > functions.

That's a trickier issue.  

It would be good to have 

   t_scm_error scm_extract_string (t_udstr * answer, [....])

but not an `scm_string_value' that gives you the _same_ t_udstr used
by the Scheme string (except in the innards).

The issue is t_udstr is not intended to be a thread-safe or async-safe
function.   A t_udstr owned by a Scheme object may change size or
encoding or (data) address at essentially any time.

With one exception:  This is what scm_lock_string_data and
scm_lock_string_data2 are for.   Between them and the corresponding
scm_release_* call, the t_udstr(s) is (are) promised to be stable.

-t



From MAILER-DAEMON Sat Jan 24 18:17:30 2004
Received: from list by monty-python.gnu.org with archive (Exim 4.24)
	id 1AkX1t-0008CL-AJ
	for mharc-pika-dev@gnu.org; Sat, 24 Jan 2004 18:17:29 -0500
Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.24)
	id 1AkX1d-00088L-Uz
	for pika-dev@nongnu.org; Sat, 24 Jan 2004 18:17:13 -0500
Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.24)
	id 1AkX11-0007uE-Vo
	for pika-dev@nongnu.org; Sat, 24 Jan 2004 18:17:08 -0500
Received: from [65.234.195.150] (helo=morrowfield.regexps.com)
	by monty-python.gnu.org with esmtp (Exim 4.24) id 1AkX10-0007sp-Ml
	for pika-dev@nongnu.org; Sat, 24 Jan 2004 18:16:35 -0500
Received: (from lord@localhost)
	by morrowfield.regexps.com (8.9.1/8.9.1) id PAA04805;
	Sat, 24 Jan 2004 15:30:26 -0800 (PST)
	(envelope-from lord@morrowfield.regexps.com)
Date: Sat, 24 Jan 2004 15:30:26 -0800 (PST)
Message-Id: <200401242330.PAA04805@morrowfield.regexps.com>
From: Tom Lord <lord@emf.net>
To: lord@emf.net
In-reply-to: <200401242327.PAA04794@morrowfield.regexps.com> (message from Tom
	Lord on Sat, 24 Jan 2004 15:27:59 -0800 (PST))
Subject: Re: [Pika-dev] so... string work
References: <200401221758.JAA20868@morrowfield.regexps.com>
	<874qul5o9x.fsf@flame.org>
	<200401242327.PAA04794@morrowfield.regexps.com>
Cc: pika-dev@nongnu.org
X-BeenThere: pika-dev@nongnu.org
X-Mailman-Version: 2.1.2
Precedence: list
List-Id: <pika-dev.nongnu.org>
List-Unsubscribe: <http://mail.nongnu.org/mailman/listinfo/pika-dev>,
	<mailto:pika-dev-request@nongnu.org?subject=unsubscribe>
List-Archive: <http://mail.gnu.org/pipermail/pika-dev>
List-Post: <mailto:pika-dev@nongnu.org>
List-Help: <mailto:pika-dev-request@nongnu.org?subject=help>
List-Subscribe: <http://mail.nongnu.org/mailman/listinfo/pika-dev>,
	<mailto:pika-dev-request@nongnu.org?subject=subscribe>
X-List-Received-Date: Sat, 24 Jan 2004 23:17:16 -0000


    > From: Tom Lord <lord@emf.net>

    >     > 	t_udstr scm_string_value (t_scm_arena arena, t_scm_word * value);

    >     > should have a GC-independant lifetime like the scm_big(num|rat)_value
    >     > functions.

    > The issue is t_udstr is not intended to be a thread-safe or async-safe
    > function.   A t_udstr owned by a Scheme object may change size or
    > encoding or (data) address at essentially any time.

Which, by the way, is what makes them different from bignums.   It's
reasoanble for bignums to act like "constant" values that happen to
require explicit deallocation but the same isn't true of strings.

Gee, I've been presuming that GMP is thread/async-safe.  Is it?  (If
not, that doesn't change any interfaces -- only implementations,
later, when threading and asyncs are added.)

-t




From MAILER-DAEMON Sat Jan 24 20:00:17 2004
Received: from list by monty-python.gnu.org with archive (Exim 4.24)
	id 1AkYdN-00077x-55
	for mharc-pika-dev@gnu.org; Sat, 24 Jan 2004 20:00:17 -0500
Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.24)
	id 1AkYdH-000731-MW
	for pika-dev@nongnu.org; Sat, 24 Jan 2004 20:00:11 -0500
Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.24)
	id 1AkYce-0006mc-Hh
	for pika-dev@nongnu.org; Sat, 24 Jan 2004 20:00:04 -0500
Received: from [65.234.195.150] (helo=morrowfield.regexps.com)
	by monty-python.gnu.org with esmtp (Exim 4.24) id 1AkYcc-0006ke-Ff
	for pika-dev@nongnu.org; Sat, 24 Jan 2004 19:59:31 -0500
Received: (from lord@localhost)
	by morrowfield.regexps.com (8.9.1/8.9.1) id RAA05075;
	Sat, 24 Jan 2004 17:13:27 -0800 (PST)
	(envelope-from lord@morrowfield.regexps.com)
Date: Sat, 24 Jan 2004 17:13:27 -0800 (PST)
Message-Id: <200401250113.RAA05075@morrowfield.regexps.com>
From: Tom Lord <lord@emf.net>
To: pika-dev@nongnu.org
Subject: [Pika-dev] other char/string things
X-BeenThere: pika-dev@nongnu.org
X-Mailman-Version: 2.1.2
Precedence: list
List-Id: <pika-dev.nongnu.org>
List-Unsubscribe: <http://mail.nongnu.org/mailman/listinfo/pika-dev>,
	<mailto:pika-dev-request@nongnu.org?subject=unsubscribe>
List-Archive: <http://mail.gnu.org/pipermail/pika-dev>
List-Post: <mailto:pika-dev@nongnu.org>
List-Help: <mailto:pika-dev-request@nongnu.org?subject=help>
List-Subscribe: <http://mail.nongnu.org/mailman/listinfo/pika-dev>,
	<mailto:pika-dev-request@nongnu.org?subject=subscribe>
X-List-Received-Date: Sun, 25 Jan 2004 01:00:15 -0000



It's been called to my attention that I forgot to specify a "control"
buckybit.  Oops.

Just for the record, what we eventually need to tweak-things into
is to have:

	C-

as a character name prefix, mean to set the control buckybit.

Thus, 

	(char->integer #\C-a)

is some large integer -- not U+0001

Additionally, character _names_ (not bucky-like prefixes) are needed 
for ASCII control characters:


	ctl-a		== U+0001
        ctl-[		== U+001B
        ctl-@		== U+0000
        ctl-space	== U+0000

etc.

We currently have four buckybits and adding control will make five.

I think that there is a total _possible_ number of 8 buckybits
(because 32 == 21 + 8 + 3 and 3 == log_2(8) and 2*sizeof (t_scm_word)
is 8 on a 32 bit machine --- in other words,

	tag-bits + codepoint + buckybits == 32


Of those 8 possible buckybits, I'd like to reserve 2 for purely
internal use and to make use of these in uni_utf32 strings.  The
purpose of these extra bits in UTF32 strings is to represent
ill-formed and unrepresentable sequences of Unicode characters.  (See
enclosed.  There are variations on that idea using just 1 bit and
variations using the four values of 2-bits differently -- we can work
that out as it comes up which won't be for a while.)

So that will leave one unallocated bit in characters.


-t






    > From: Tom Lord <lord@mail.emf.net>
    > [To: gnu-arch-users]

    [....]

    >     > Just decide how many ISO 10646 planes you want to support, and use the
    >     > appropriate number of bits (21 is fine).  Use an additional bit to
    >     > squeeze in 256 code positions you might want to use to represent invalid
    >     > UTF-8 input data (so you have round-trip capability even for binary
    >     > files accidentally interpreted as UTF-8).

    > I'm not giving UTF-8 that kind of priveleged role in Pika.

    > However, it's a fascinating idea and I thank you for it.   It solves a
    > nasty little problem I was facing.

    > Let's suppose that I use up two buckybits purely internally to
    > represent "ill-formed-characters".   That is to say: users would have
    > 6 buckybits, not 8, and there's two bits per character for internal
    > use.

    > I don't actually need 2 bits --- I just need a bit more than 1.5 and
    > current hw isn't too good at fractional (let alone irrationally
    > fractional) bits yet.

    > Now I can have a string like:

    >   <00 codepoint><00 codepoint><01 bogus><10 bogus><10 bogus><00 codepoint>
    >                                         ^
    >                                         |
    >                                         X

    > in which <01 bogus> and <10 bogus><10 bogus> are ill-formed combining
    > character sequences that should be treated as distinct graphemes by
    > procedures like GRAPHEME-LENGTH and GRAPHEME-REF.

    > Now if I insert a string of the form:

    >         <01 bogus>

    > at point X in that string, then the result is:

    >   <00 cp><00 cp><01 bogus><10 bogus><01 bogus><01 bogus><00 cp>
    >                 \        /\        /\                  /
    >                  \      /  \      /  \                /
    >                   modified  insertion   modified by
    >                   by                     insertion
    >                   insertion

    > In other words, such an insertion has to change adjacent characters to 
    > preserve the "bogus grapheme" boundaries.

    > The upshot of this is that I can pun a single string as both a
    > sequence of codepoints and a sequence of (possibly ill-formed)
    > combining sequences -- and that is, btw, sufficient to provide the
    > round-tripping ability you were after not only for UTF-8 but for
    > UTF-16 and UTF-32 as well.   Total win -- thanks again.



From MAILER-DAEMON Sat Jan 24 20:07:27 2004
Received: from list by monty-python.gnu.org with archive (Exim 4.24)
	id 1AkYkE-000329-VU
	for mharc-pika-dev@gnu.org; Sat, 24 Jan 2004 20:07:22 -0500
Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.24)
	id 1AkYk7-0002qN-4b
	for pika-dev@nongnu.org; Sat, 24 Jan 2004 20:07:15 -0500
Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.24)
	id 1AkYjY-0002Eo-Ll
	for pika-dev@nongnu.org; Sat, 24 Jan 2004 20:07:12 -0500
Received: from [129.110.10.12] (helo=smtp1.utdallas.edu)
	by monty-python.gnu.org with esmtp (Exim 4.24) id 1AkYjY-0002EW-5Q
	for pika-dev@nongnu.org; Sat, 24 Jan 2004 20:06:40 -0500
Received: from kaiser (bluesocket.utdallas.edu [129.110.39.12])
	by smtp1.utdallas.edu (Postfix) with ESMTP id C7524388C9D;
	Sat, 24 Jan 2004 19:06:39 -0600 (CST)
Received: from jivera by kaiser with local (Exim 3.35 #1 (Debian))
	id 1AkSBp-0000nl-00; Sat, 24 Jan 2004 19:07:25 +0100
To: Tom Lord <lord@emf.net>
Subject: Re: [Pika-dev] so... string work
References: <200401221758.JAA20868@morrowfield.regexps.com>
	<874qul5o9x.fsf@flame.org>
	<200401242327.PAA04794@morrowfield.regexps.com>
	<200401242330.PAA04805@morrowfield.regexps.com>
From: Matthew Dempsky <jivera@flame.org>
Date: Sat, 24 Jan 2004 19:07:25 +0100
In-Reply-To: <200401242330.PAA04805@morrowfield.regexps.com> (Tom Lord's
	message of "Sat, 24 Jan 2004 15:30:26 -0800 (PST)")
Message-ID: <873ca5jk4i.fsf@flame.org>
User-Agent: Gnus/5.1006 (Gnus v5.10.6) Emacs/21.3 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Sender: Matthew Dempsky <jivera@utdallas.edu>
Cc: pika-dev@nongnu.org
X-BeenThere: pika-dev@nongnu.org
X-Mailman-Version: 2.1.2
Precedence: list
List-Id: <pika-dev.nongnu.org>
List-Unsubscribe: <http://mail.nongnu.org/mailman/listinfo/pika-dev>,
	<mailto:pika-dev-request@nongnu.org?subject=unsubscribe>
List-Archive: <http://mail.gnu.org/pipermail/pika-dev>
List-Post: <mailto:pika-dev@nongnu.org>
List-Help: <mailto:pika-dev-request@nongnu.org?subject=help>
List-Subscribe: <http://mail.nongnu.org/mailman/listinfo/pika-dev>,
	<mailto:pika-dev-request@nongnu.org?subject=subscribe>
X-List-Received-Date: Sun, 25 Jan 2004 01:07:17 -0000

Tom Lord <lord@emf.net> writes:

> That's a trickier issue.  
> 
> It would be good to have 
> 
>    t_scm_error scm_extract_string (t_udstr * answer, [....])
> 
> but not an `scm_string_value' that gives you the _same_ t_udstr used
> by the Scheme string (except in the innards).

I was actually intending to provide something like the
scm_extract_string you mentioned and just use scm_string_value as an
accessor to the data types binary data.  Roughly equal to how numbers
has scm_bignum_value and scm_number_to_bignum -- the first is just an
accessor (and assumes you have the right data type), while the latter
does type checking and is the routine the user's actually intended to
use.

(Initially I was thinking of returning a uni_string with an input
encoding value to specify what the output should be -- would it still
be useful in the form of scm_extract_uni_string?)

> The issue is t_udstr is not intended to be a thread-safe or async-safe
> function.   A t_udstr owned by a Scheme object may change size or
> encoding or (data) address at essentially any time.
> 
> With one exception:  This is what scm_lock_string_data and
> scm_lock_string_data2 are for.   Between them and the corresponding
> scm_release_* call, the t_udstr(s) is (are) promised to be stable.

Just one question about scm_lock_string_data2 -- what was the
rationale behind this?  Is it anything but a wrapper to two
scm_lock_string_data calls?

> Gee, I've been presuming that GMP is thread/async-safe.  Is it?  (If
> not, that doesn't change any interfaces -- only implementations,
> later, when threading and asyncs are added.)

Here's what the GMP manual has to say about thread/async issues (from
http://swox.com/gmp/manual/Reentrancy.html):

> Reentrancy
> 
> GMP is reentrant and thread-safe, with some exceptions:
> 
>     * If configured with --enable-alloca=malloc-notreentrant (or
>     with --enable-alloca=notreentrant when alloca is not available),
>     then naturally GMP is not reentrant.

I'll leave you to decide how serious this issue is.

>     * mpf_set_default_prec and mpf_init use a global variable for
>     the selected precision. mpf_init2 can be used instead.
> 
>     * mpz_random and the other old random number functions use a
>     global random state and are hence not reentrant. The newer
>     random number functions that accept a gmp_randstate_t parameter
>     can be used instead.

These functions aren't used so they aren't an issue.

>     * mp_set_memory_functions uses global variables to store the
>     selected memory allocation functions.
> 
>     * If the memory allocation functions set by a call to
>     mp_set_memory_functions (or malloc and friends by default) are
>     not reentrant, then GMP will not be reentrant either.

Again, I'll let you decide the severity, but to give a little bit of
background context -- by default, GMP uses libc's malloc and friends
routines to handle memory, but it accesses them via function pointers
set by mp_set_memory_functions.  Because the normal malloc routines
aren't interface compatible with lim_malloc et al, I've skipped over
this issue for now.  (Besides, even if I did hack it to use
lim_malloc, presently lim_malloc is implemented with libc's malloc
anyways.)

Because gmp rather nicely seperates its library into some core numeric
routines (mpn_*) optimized for different platforms and the wrapper
functions (mpz_* and mpf_*) that handle memory allocation and more
useful routines, maybe a long term goal would be to branch GMP and
"port" the routines to hackerlab and stick in alloc_limits somewhere.
(I daresay this could be done rather easily and backwards compatibly
by just modifying the __mpz_struct to hold an alloc_limits value and
then create a new mpz_init_limits function.)

>     * If the standard I/O functions such as fwrite are not reentrant
>     then the GMP I/O functions using them will not be reentrant
>     either.

The I/O functions aren't used at all.

>     * It's safe for two threads to read from the same GMP variable
>     simultaneously, but it's not safe for one to read while the
>     another might be writing, nor for two threads to write
>     simultaneously. It's not safe for two threads to generate a
>     random number from the same gmp_randstate_t simultaneously,
>     since this involves an update of that variable.

The only time a GMP value is actually modified is in its construction,
so again this is safe.

>     * On SCO systems the default <ctype.h> macros use per-file
>     static variables and may not be reentrant, depending whether the
>     compiler optimizes away fetches from them. The GMP text-based
>     input functions are affected.

I intend to use GMP's input functions to parse text, but haven't
implemented it yet so this may be an issue... on the other hand, I
don't really care about SCO.  (If I _should_ though, tell me and I'll
see what I can do.)

-jivera



From MAILER-DAEMON Sat Jan 24 20:25:06 2004
Received: from list by monty-python.gnu.org with archive (Exim 4.24)
	id 1AkZ1O-00031U-HS
	for mharc-pika-dev@gnu.org; Sat, 24 Jan 2004 20:25:06 -0500
Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.24)
	id 1AkZ1K-0002z2-PW
	for pika-dev@nongnu.org; Sat, 24 Jan 2004 20:25:02 -0500
Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.24)
	id 1AkZ0m-0002Yt-AI
	for pika-dev@nongnu.org; Sat, 24 Jan 2004 20:24:59 -0500
Received: from [129.110.10.12] (helo=smtp1.utdallas.edu)
	by monty-python.gnu.org with esmtp (Exim 4.24) id 1AkZ0l-0002Xc-EI
	for pika-dev@nongnu.org; Sat, 24 Jan 2004 20:24:27 -0500
Received: from kaiser (bluesocket.utdallas.edu [129.110.39.12])
	by smtp1.utdallas.edu (Postfix) with ESMTP id 01CD8388CBE;
	Sat, 24 Jan 2004 19:24:26 -0600 (CST)
Received: from jivera by kaiser with local (Exim 3.35 #1 (Debian))
	id 1AkST2-00015X-00; Sat, 24 Jan 2004 19:25:12 +0100
To: Tom Lord <lord@emf.net>
Subject: Re: [Pika-dev] other char/string things
References: <200401250113.RAA05075@morrowfield.regexps.com>
From: Matthew Dempsky <jivera@flame.org>
Date: Sat, 24 Jan 2004 19:25:12 +0100
In-Reply-To: <200401250113.RAA05075@morrowfield.regexps.com> (Tom Lord's
	message of "Sat, 24 Jan 2004 17:13:27 -0800 (PST)")
Message-ID: <87y8rxi4qf.fsf@flame.org>
User-Agent: Gnus/5.1006 (Gnus v5.10.6) Emacs/21.3 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Sender: Matthew Dempsky <jivera@utdallas.edu>
Cc: pika-dev@nongnu.org
X-BeenThere: pika-dev@nongnu.org
X-Mailman-Version: 2.1.2
Precedence: list
List-Id: <pika-dev.nongnu.org>
List-Unsubscribe: <http://mail.nongnu.org/mailman/listinfo/pika-dev>,
	<mailto:pika-dev-request@nongnu.org?subject=unsubscribe>
List-Archive: <http://mail.gnu.org/pipermail/pika-dev>
List-Post: <mailto:pika-dev@nongnu.org>
List-Help: <mailto:pika-dev-request@nongnu.org?subject=help>
List-Subscribe: <http://mail.nongnu.org/mailman/listinfo/pika-dev>,
	<mailto:pika-dev-request@nongnu.org?subject=subscribe>
X-List-Received-Date: Sun, 25 Jan 2004 01:25:04 -0000

Tom Lord <lord@emf.net> writes:

> It's been called to my attention that I forgot to specify a "control"
> buckybit.  Oops.

I recall pointing that out to you and getting a response rationale of
something like "control is something special and will be handled
elsewhere/differently."  :-P

> Just for the record, what we eventually need to tweak-things into
> is to have:
>
> 	C-
>
> as a character name prefix, mean to set the control buckybit.
>
> Thus, 
>
> 	(char->integer #\C-a)
>
> is some large integer -- not U+0001

That shouldn't be too hard to add.  At the moment it's mostly a
non-issue, but since you mentioned sorting on character value (which
includes buckybit value) perhaps it would be worthwhile to give some
thought to a stable ordering for the buckybits?

> Additionally, character _names_ (not bucky-like prefixes) are needed 
> for ASCII control characters:
>
>
> 	ctl-a		== U+0001
>         ctl-[		== U+001B
>         ctl-@		== U+0000
>         ctl-space	== U+0000
>
> etc.

Again, this should be easy to add since the lexing code won't mistake
any of those as buckybits.  (Is ctl-space really U+0000?)

> We currently have four buckybits and adding control will make five.
>
> I think that there is a total _possible_ number of 8 buckybits
> (because 32 == 21 + 8 + 3 and 3 == log_2(8) and 2*sizeof (t_scm_word)
> is 8 on a 32 bit machine --- in other words,
>
> 	tag-bits + codepoint + buckybits == 32

(Just wait until 64-bit PCs become common and we can have 40 buckybits
-- emacs users' heads will explode trying to remember all the
commands. :-)

> [stuff regarding reserving two bits]

I can't admit I fully understand the rationale of it, but I'll give it
a few days to try to sink in before questioning it.  I said before I
had a few other things I was working on, but luckily none of them
demand any buckybits allocated to them. ;-)

-jivera




From MAILER-DAEMON Sat Jan 24 22:31:04 2004
Received: from list by monty-python.gnu.org with archive (Exim 4.24)
	id 1AkazI-0002jz-CF
	for mharc-pika-dev@gnu.org; Sat, 24 Jan 2004 22:31:04 -0500
Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.24)
	id 1AkazF-0002iH-Nm
	for pika-dev@nongnu.org; Sat, 24 Jan 2004 22:31:01 -0500
Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.24)
	id 1Akayi-00026H-Li
	for pika-dev@nongnu.org; Sat, 24 Jan 2004 22:30:59 -0500
Received: from [65.234.195.150] (helo=morrowfield.regexps.com)
	by monty-python.gnu.org with esmtp (Exim 4.24) id 1Akayg-00022U-WA
	for pika-dev@nongnu.org; Sat, 24 Jan 2004 22:30:27 -0500
Received: (from lord@localhost)
	by morrowfield.regexps.com (8.9.1/8.9.1) id TAA05447;
	Sat, 24 Jan 2004 19:44:14 -0800 (PST)
	(envelope-from lord@morrowfield.regexps.com)
Date: Sat, 24 Jan 2004 19:44:14 -0800 (PST)
Message-Id: <200401250344.TAA05447@morrowfield.regexps.com>
From: Tom Lord <lord@emf.net>
To: jivera@flame.org
In-reply-to: <873ca5jk4i.fsf@flame.org> (message from Matthew Dempsky on Sat, 
	24 Jan 2004 19:07:25 +0100)
Subject: Re: [Pika-dev] so... string work
References: <200401221758.JAA20868@morrowfield.regexps.com>
	<874qul5o9x.fsf@flame.org>
	<200401242327.PAA04794@morrowfield.regexps.com>
	<200401242330.PAA04805@morrowfield.regexps.com>
	<873ca5jk4i.fsf@flame.org>
Cc: pika-dev@nongnu.org
X-BeenThere: pika-dev@nongnu.org
X-Mailman-Version: 2.1.2
Precedence: list
List-Id: <pika-dev.nongnu.org>
List-Unsubscribe: <http://mail.nongnu.org/mailman/listinfo/pika-dev>,
	<mailto:pika-dev-request@nongnu.org?subject=unsubscribe>
List-Archive: <http://mail.gnu.org/pipermail/pika-dev>
List-Post: <mailto:pika-dev@nongnu.org>
List-Help: <mailto:pika-dev-request@nongnu.org?subject=help>
List-Subscribe: <http://mail.nongnu.org/mailman/listinfo/pika-dev>,
	<mailto:pika-dev-request@nongnu.org?subject=subscribe>
X-List-Received-Date: Sun, 25 Jan 2004 03:31:02 -0000


    > From: Matthew Dempsky <jivera@flame.org>

    > I was actually intending to provide something like the
    > scm_extract_string you mentioned and just use scm_string_value as an
    > accessor to the data types binary data.  

I think the primary legit use for `scm_string_value' is to implement
`scm_lock_string_data[2]'.


    > Just one question about scm_lock_string_data2 -- what was the
    > rationale behind this?  Is it anything but a wrapper to two
    > scm_lock_string_data calls?

Not much more, no.

In a threaded context, if locking is per-string (rather than say,
locking of all strings -- or locking of all threads generally) then
scm_lock_string_data2 needs to be concerned with deadlock.

The alternative here is to have something like scm_lock_string_data
and scm_lock_string_data_instantly_or_fail and scm_string_lock_order
(a total ordering of string objects) -- and require client code to
manage lock priorities sanely.  It seemed far simpler just to capture
the two common cases of wanting to work on one string or two and hide
the deadlock issues inside of reps/.



    > > Gee, I've been presuming that GMP is thread/async-safe.  Is it?  (If
    > > not, that doesn't change any interfaces -- only implementations,
    > > later, when threading and asyncs are added.)

    > Here's what the GMP manual has to say about thread/async issues (from
    > http://swox.com/gmp/manual/Reentrancy.html):

    > > Reentrancy

    > > GMP is reentrant and thread-safe, with some exceptions:

    > >     * If configured with --enable-alloca=malloc-notreentrant (or
    > >     with --enable-alloca=notreentrant when alloca is not available),
    > >     then naturally GMP is not reentrant.

    > I'll leave you to decide how serious this issue is.

    > >     * mpf_set_default_prec and mpf_init use a global variable for
    > >     the selected precision. mpf_init2 can be used instead.

    > >     * mpz_random and the other old random number functions use a
    > >     global random state and are hence not reentrant. The newer
    > >     random number functions that accept a gmp_randstate_t parameter
    > >     can be used instead.

No problem.

    > >     * mp_set_memory_functions uses global variables to store the
    > >     selected memory allocation functions.

    > >     * If the memory allocation functions set by a call to
    > >     mp_set_memory_functions (or malloc and friends by default) are
    > >     not reentrant, then GMP will not be reentrant either.

    > Again, I'll let you decide the severity, but to give a little bit of
    > background context -- by default, GMP uses libc's malloc and friends
    > routines to handle memory, but it accesses them via function pointers
    > set by mp_set_memory_functions.  Because the normal malloc routines
    > aren't interface compatible with lim_malloc et al, I've skipped over
    > this issue for now.  (Besides, even if I did hack it to use
    > lim_malloc, presently lim_malloc is implemented with libc's malloc
    > anyways.)

Nothing to worry about there.

    > Because gmp rather nicely seperates its library into some core numeric
    > routines (mpn_*) optimized for different platforms and the wrapper
    > functions (mpz_* and mpf_*) that handle memory allocation and more
    > useful routines, maybe a long term goal would be to branch GMP and
    > "port" the routines to hackerlab and stick in alloc_limits somewhere.
    > (I daresay this could be done rather easily and backwards compatibly
    > by just modifying the __mpz_struct to hold an alloc_limits value and
    > then create a new mpz_init_limits function.)

Maybe.   Or just persuade the to add an optional rock to their
allocator calls.


    > >     * On SCO systems the default <ctype.h> macros use per-file
    > >     static variables and may not be reentrant, depending whether the
    > >     compiler optimizes away fetches from them. The GMP text-based
    > >     input functions are affected.

    > I intend to use GMP's input functions to parse text, but haven't
    > implemented it yet so this may be an issue... on the other hand, I
    > don't really care about SCO.  (If I _should_ though, tell me and I'll
    > see what I can do.)

No, ignore that.

-t




From MAILER-DAEMON Sat Jan 24 22:37:06 2004
Received: from list by monty-python.gnu.org with archive (Exim 4.24)
	id 1Akb58-0004Wm-5B
	for mharc-pika-dev@gnu.org; Sat, 24 Jan 2004 22:37:06 -0500
Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.24)
	id 1Akb50-0004VW-5C
	for pika-dev@nongnu.org; Sat, 24 Jan 2004 22:36:58 -0500
Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.24)
	id 1Akb4S-0004RC-8J
	for pika-dev@nongnu.org; Sat, 24 Jan 2004 22:36:56 -0500
Received: from [65.234.195.150] (helo=morrowfield.regexps.com)
	by monty-python.gnu.org with esmtp (Exim 4.24) id 1Akb4R-0004R9-1v
	for pika-dev@nongnu.org; Sat, 24 Jan 2004 22:36:23 -0500
Received: (from lord@localhost)
	by morrowfield.regexps.com (8.9.1/8.9.1) id TAA05463;
	Sat, 24 Jan 2004 19:50:15 -0800 (PST)
	(envelope-from lord@morrowfield.regexps.com)
Date: Sat, 24 Jan 2004 19:50:15 -0800 (PST)
Message-Id: <200401250350.TAA05463@morrowfield.regexps.com>
From: Tom Lord <lord@emf.net>
To: jivera@flame.org
In-reply-to: <87y8rxi4qf.fsf@flame.org> (message from Matthew Dempsky on Sat, 
	24 Jan 2004 19:25:12 +0100)
Subject: Re: [Pika-dev] other char/string things
References: <200401250113.RAA05075@morrowfield.regexps.com>
	<87y8rxi4qf.fsf@flame.org>
Cc: pika-dev@nongnu.org
X-BeenThere: pika-dev@nongnu.org
X-Mailman-Version: 2.1.2
Precedence: list
List-Id: <pika-dev.nongnu.org>
List-Unsubscribe: <http://mail.nongnu.org/mailman/listinfo/pika-dev>,
	<mailto:pika-dev-request@nongnu.org?subject=unsubscribe>
List-Archive: <http://mail.gnu.org/pipermail/pika-dev>
List-Post: <mailto:pika-dev@nongnu.org>
List-Help: <mailto:pika-dev-request@nongnu.org?subject=help>
List-Subscribe: <http://mail.nongnu.org/mailman/listinfo/pika-dev>,
	<mailto:pika-dev-request@nongnu.org?subject=subscribe>
X-List-Received-Date: Sun, 25 Jan 2004 03:37:04 -0000


    > From: Matthew Dempsky <jivera@flame.org>

    > Tom Lord <lord@emf.net> writes:

    > > It's been called to my attention that I forgot to specify a "control"
    > > buckybit.  Oops.

    > I recall pointing that out to you and getting a response rationale of
    > something like "control is something special and will be handled
    > elsewhere/differently."  :-P


Yup, I was wrong.  Sorry.

    > > Just for the record, what we eventually need to tweak-things into
    > > is to have:
    > >
    > > 	C-
    > >
    > > as a character name prefix, mean to set the control buckybit.
    > >
    > > Thus, 
    > >
    > > 	(char->integer #\C-a)
    > >
    > > is some large integer -- not U+0001
    > 
    > That shouldn't be too hard to add.  At the moment it's mostly a
    > non-issue, but since you mentioned sorting on character value (which
    > includes buckybit value) perhaps it would be worthwhile to give some
    > thought to a stable ordering for the buckybits?

Sure.  That's a detailing issue, though.  Nothing should actually
depend on it at this stage.


    > > Additionally, character _names_ (not bucky-like prefixes) are needed 
    > > for ASCII control characters:

    > > 	ctl-a		== U+0001
    > >         ctl-[		== U+001B
    > >         ctl-@		== U+0000
    > >         ctl-space	== U+0000

    > > etc.

    > Again, this should be easy to add since the lexing code won't mistake
    > any of those as buckybits.  (Is ctl-space really U+0000?)

Right and (I dunno -- pseudo-traditional kbd behavior there.   No
strong feelings either way.)


    > I can't admit I fully understand the rationale of it, but I'll give it
    > a few days to try to sink in before questioning it.  I said before I
    > had a few other things I was working on, but luckily none of them
    > demand any buckybits allocated to them. ;-)

Rationale: keyboards have buttons that "denote" codepoints.  But they
also have modifier buttons/modes.   Not all combinations of modifiers
and codepoints are codepoints.   Meanwhile, it's nice to have all
those combinations in a form where you can include them in strings and
buffers and so forth (and, no, GNU Emacs isn't up to that -- this is a
small way in which Pika Emacs will be cleaner).

-t




From MAILER-DAEMON Sat Jan 24 23:26:49 2004
Received: from list by monty-python.gnu.org with archive (Exim 4.24)
	id 1AkbrF-0003jU-IX
	for mharc-pika-dev@gnu.org; Sat, 24 Jan 2004 23:26:49 -0500
Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.24)
	id 1AkbrD-0003jH-51
	for pika-dev@nongnu.org; Sat, 24 Jan 2004 23:26:47 -0500
Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.24)
	id 1Akbqg-0003BQ-8I
	for pika-dev@nongnu.org; Sat, 24 Jan 2004 23:26:46 -0500
Received: from [129.110.10.12] (helo=smtp1.utdallas.edu)
	by monty-python.gnu.org with esmtp (Exim 4.24) id 1Akbqf-0003BL-Vz
	for pika-dev@nongnu.org; Sat, 24 Jan 2004 23:26:14 -0500
Received: from kaiser (bluesocket.utdallas.edu [129.110.39.12])
	by smtp1.utdallas.edu (Postfix) with ESMTP id 5CE28388D1E;
	Sat, 24 Jan 2004 22:26:12 -0600 (CST)
Received: from jivera by kaiser with local (Exim 3.35 #1 (Debian))
	id 1AkVIw-0001Lp-00; Sat, 24 Jan 2004 22:26:58 +0100
To: Tom Lord <lord@emf.net>
Subject: Re: [Pika-dev] so... string work
References: <200401221758.JAA20868@morrowfield.regexps.com>
	<874qul5o9x.fsf@flame.org>
	<200401242327.PAA04794@morrowfield.regexps.com>
	<200401242330.PAA04805@morrowfield.regexps.com>
	<873ca5jk4i.fsf@flame.org>
	<200401250344.TAA05447@morrowfield.regexps.com>
From: Matthew Dempsky <jivera@flame.org>
Date: Sat, 24 Jan 2004 22:26:58 +0100
In-Reply-To: <200401250344.TAA05447@morrowfield.regexps.com> (Tom Lord's
	message of "Sat, 24 Jan 2004 19:44:14 -0800 (PST)")
Message-ID: <87y8rxca1p.fsf@flame.org>
User-Agent: Gnus/5.1006 (Gnus v5.10.6) Emacs/21.3 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Sender: Matthew Dempsky <jivera@utdallas.edu>
Cc: pika-dev@nongnu.org
X-BeenThere: pika-dev@nongnu.org
X-Mailman-Version: 2.1.2
Precedence: list
List-Id: <pika-dev.nongnu.org>
List-Unsubscribe: <http://mail.nongnu.org/mailman/listinfo/pika-dev>,
	<mailto:pika-dev-request@nongnu.org?subject=unsubscribe>
List-Archive: <http://mail.gnu.org/pipermail/pika-dev>
List-Post: <mailto:pika-dev@nongnu.org>
List-Help: <mailto:pika-dev-request@nongnu.org?subject=help>
List-Subscribe: <http://mail.nongnu.org/mailman/listinfo/pika-dev>,
	<mailto:pika-dev-request@nongnu.org?subject=subscribe>
X-List-Received-Date: Sun, 25 Jan 2004 04:26:47 -0000

Tom Lord <lord@emf.net> writes:

> Not much more, no.
>
> In a threaded context, if locking is per-string (rather than say,
> locking of all strings -- or locking of all threads generally) then
> scm_lock_string_data2 needs to be concerned with deadlock.
>
> The alternative here is to have something like scm_lock_string_data
> and scm_lock_string_data_instantly_or_fail and scm_string_lock_order
> (a total ordering of string objects) -- and require client code to
> manage lock priorities sanely.  It seemed far simpler just to capture
> the two common cases of wanting to work on one string or two and hide
> the deadlock issues inside of reps/.

Hm, I guess I should move the core scaffolding I've written into
strings-reps.[ch] then... (I was thinking at first strings would
suffice as a purely libscm type, but I guess not.)

-jivera



From MAILER-DAEMON Sat Jan 24 23:37:42 2004
Received: from list by monty-python.gnu.org with archive (Exim 4.24)
	id 1Akc1m-0000Tv-L7
	for mharc-pika-dev@gnu.org; Sat, 24 Jan 2004 23:37:42 -0500
Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.24)
	id 1Akc1k-0000TB-5I
	for pika-dev@nongnu.org; Sat, 24 Jan 2004 23:37:40 -0500
Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.24)
	id 1Akc1D-0008VN-5O
	for pika-dev@nongnu.org; Sat, 24 Jan 2004 23:37:38 -0500
Received: from [65.234.195.150] (helo=morrowfield.regexps.com)
	by monty-python.gnu.org with esmtp (Exim 4.24) id 1Akc1C-0008S7-8L
	for pika-dev@nongnu.org; Sat, 24 Jan 2004 23:37:06 -0500
Received: (from lord@localhost)
	by morrowfield.regexps.com (8.9.1/8.9.1) id UAA05651;
	Sat, 24 Jan 2004 20:50:55 -0800 (PST)
	(envelope-from lord@morrowfield.regexps.com)
Date: Sat, 24 Jan 2004 20:50:55 -0800 (PST)
Message-Id: <200401250450.UAA05651@morrowfield.regexps.com>
From: Tom Lord <lord@emf.net>
To: jivera@flame.org
In-reply-to: <87y8rxca1p.fsf@flame.org> (message from Matthew Dempsky on Sat, 
	24 Jan 2004 22:26:58 +0100)
Subject: Re: [Pika-dev] so... string work
References: <200401221758.JAA20868@morrowfield.regexps.com>
	<874qul5o9x.fsf@flame.org>
	<200401242327.PAA04794@morrowfield.regexps.com>
	<200401242330.PAA04805@morrowfield.regexps.com>
	<873ca5jk4i.fsf@flame.org>
	<200401250344.TAA05447@morrowfield.regexps.com>
	<87y8rxca1p.fsf@flame.org>
Cc: pika-dev@nongnu.org
X-BeenThere: pika-dev@nongnu.org
X-Mailman-Version: 2.1.2
Precedence: list
List-Id: <pika-dev.nongnu.org>
List-Unsubscribe: <http://mail.nongnu.org/mailman/listinfo/pika-dev>,
	<mailto:pika-dev-request@nongnu.org?subject=unsubscribe>
List-Archive: <http://mail.gnu.org/pipermail/pika-dev>
List-Post: <mailto:pika-dev@nongnu.org>
List-Help: <mailto:pika-dev-request@nongnu.org?subject=help>
List-Subscribe: <http://mail.nongnu.org/mailman/listinfo/pika-dev>,
	<mailto:pika-dev-request@nongnu.org?subject=subscribe>
X-List-Received-Date: Sun, 25 Jan 2004 04:37:40 -0000


    > From: Matthew Dempsky <jivera@flame.org>

    > Hm, I guess I should move the core scaffolding I've written into
    > strings-reps.[ch] then... (I was thinking at first strings would
    > suffice as a purely libscm type, but I guess not.)

Construction and locking of strings definately goes in reps/.

Extraction definately goes in libscm/.

That strings are vtable objects is probably a reps/ issue.

Standard procedures (e.g., STRING-LENGTH) should be in libscm.

Sound about right?

(That's not a rhetorical question, just a hint about what I think --
you're the one fussing with the details of it.)

-t




From MAILER-DAEMON Sun Jan 25 00:05:44 2004
Received: from list by monty-python.gnu.org with archive (Exim 4.24)
	id 1AkcSu-0003Ym-2t
	for mharc-pika-dev@gnu.org; Sun, 25 Jan 2004 00:05:44 -0500
Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.24)
	id 1AkcSr-0003YL-Ez
	for pika-dev@nongnu.org; Sun, 25 Jan 2004 00:05:41 -0500
Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.24)
	id 1AkcSJ-0003UE-2o
	for pika-dev@nongnu.org; Sun, 25 Jan 2004 00:05:38 -0500
Received: from [129.110.10.12] (helo=smtp1.utdallas.edu)
	by monty-python.gnu.org with esmtp (Exim 4.24) id 1AkcSI-0003U7-Lz
	for pika-dev@nongnu.org; Sun, 25 Jan 2004 00:05:06 -0500
Received: from kaiser (bluesocket.utdallas.edu [129.110.39.12])
	by smtp1.utdallas.edu (Postfix) with ESMTP id 09FD6388DC7;
	Sat, 24 Jan 2004 23:05:06 -0600 (CST)
Received: from jivera by kaiser with local (Exim 3.35 #1 (Debian))
	id 1AkVua-00020Q-00; Sat, 24 Jan 2004 23:05:52 +0100
To: Tom Lord <lord@emf.net>
Subject: Re: [Pika-dev] so... string work
References: <200401221758.JAA20868@morrowfield.regexps.com>
	<874qul5o9x.fsf@flame.org>
	<200401242327.PAA04794@morrowfield.regexps.com>
	<200401242330.PAA04805@morrowfield.regexps.com>
	<873ca5jk4i.fsf@flame.org>
	<200401250344.TAA05447@morrowfield.regexps.com>
	<87y8rxca1p.fsf@flame.org>
	<200401250450.UAA05651@morrowfield.regexps.com>
From: Matthew Dempsky <jivera@flame.org>
Date: Sat, 24 Jan 2004 23:05:52 +0100
In-Reply-To: <200401250450.UAA05651@morrowfield.regexps.com> (Tom Lord's
	message of "Sat, 24 Jan 2004 20:50:55 -0800 (PST)")
Message-ID: <87d699c88v.fsf@flame.org>
User-Agent: Gnus/5.1006 (Gnus v5.10.6) Emacs/21.3 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Sender: Matthew Dempsky <jivera@utdallas.edu>
Cc: pika-dev@nongnu.org
X-BeenThere: pika-dev@nongnu.org
X-Mailman-Version: 2.1.2
Precedence: list
List-Id: <pika-dev.nongnu.org>
List-Unsubscribe: <http://mail.nongnu.org/mailman/listinfo/pika-dev>,
	<mailto:pika-dev-request@nongnu.org?subject=unsubscribe>
List-Archive: <http://mail.gnu.org/pipermail/pika-dev>
List-Post: <mailto:pika-dev@nongnu.org>
List-Help: <mailto:pika-dev-request@nongnu.org?subject=help>
List-Subscribe: <http://mail.nongnu.org/mailman/listinfo/pika-dev>,
	<mailto:pika-dev-request@nongnu.org?subject=subscribe>
X-List-Received-Date: Sun, 25 Jan 2004 05:05:42 -0000

Tom Lord <lord@emf.net> writes:

>     > From: Matthew Dempsky <jivera@flame.org>
>
>     > Hm, I guess I should move the core scaffolding I've written into
>     > strings-reps.[ch] then... (I was thinking at first strings would
>     > suffice as a purely libscm type, but I guess not.)
>
> Construction and locking of strings definately goes in reps/.
>
> Extraction definately goes in libscm/.
>
> That strings are vtable objects is probably a reps/ issue.
>
> Standard procedures (e.g., STRING-LENGTH) should be in libscm.
>
> Sound about right?
>
> (That's not a rhetorical question, just a hint about what I think --
> you're the one fussing with the details of it.)

Yeah, that's exactly what I was thinking about doing (now).

I don't feel like writing another email just to reply to the proper
thread about this, but I just made the change so (eqv? #\U+0001
#\ctl-a) => #t, but should it be #\ctl-A or both or should we just
make the table lookup case insensitive so that #\ctl-a == #\ctl-A ==
#\CTL-A (and consequently #\newline == #\NEWLINE etc)?

-jivera



From MAILER-DAEMON Sun Jan 25 00:10:21 2004
Received: from list by monty-python.gnu.org with archive (Exim 4.24)
	id 1AkcXN-0006aL-1k
	for mharc-pika-dev@gnu.org; Sun, 25 Jan 2004 00:10:21 -0500
Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.24)
	id 1AkcXJ-0006Xl-M9
	for pika-dev@nongnu.org; Sun, 25 Jan 2004 00:10:17 -0500
Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.24)
	id 1AkcWm-0006Rj-E0
	for pika-dev@nongnu.org; Sun, 25 Jan 2004 00:10:15 -0500
Received: from [65.234.195.150] (helo=morrowfield.regexps.com)
	by monty-python.gnu.org with esmtp (Exim 4.24) id 1AkcWl-0006Ra-B6
	for pika-dev@nongnu.org; Sun, 25 Jan 2004 00:09:43 -0500
Received: (from lord@localhost)
	by morrowfield.regexps.com (8.9.1/8.9.1) id VAA05734;
	Sat, 24 Jan 2004 21:23:25 -0800 (PST)
	(envelope-from lord@morrowfield.regexps.com)
Date: Sat, 24 Jan 2004 21:23:25 -0800 (PST)
Message-Id: <200401250523.VAA05734@morrowfield.regexps.com>
From: Tom Lord <lord@emf.net>
To: jivera@flame.org
In-reply-to: <87d699c88v.fsf@flame.org> (message from Matthew Dempsky on Sat, 
	24 Jan 2004 23:05:52 +0100)
Subject: Re: [Pika-dev] so... string work
References: <200401221758.JAA20868@morrowfield.regexps.com>
	<874qul5o9x.fsf@flame.org>
	<200401242327.PAA04794@morrowfield.regexps.com>
	<200401242330.PAA04805@morrowfield.regexps.com>
	<873ca5jk4i.fsf@flame.org>
	<200401250344.TAA05447@morrowfield.regexps.com>
	<87y8rxca1p.fsf@flame.org>
	<200401250450.UAA05651@morrowfield.regexps.com>
	<87d699c88v.fsf@flame.org>
Cc: pika-dev@nongnu.org
X-BeenThere: pika-dev@nongnu.org
X-Mailman-Version: 2.1.2
Precedence: list
List-Id: <pika-dev.nongnu.org>
List-Unsubscribe: <http://mail.nongnu.org/mailman/listinfo/pika-dev>,
	<mailto:pika-dev-request@nongnu.org?subject=unsubscribe>
List-Archive: <http://mail.gnu.org/pipermail/pika-dev>
List-Post: <mailto:pika-dev@nongnu.org>
List-Help: <mailto:pika-dev-request@nongnu.org?subject=help>
List-Subscribe: <http://mail.nongnu.org/mailman/listinfo/pika-dev>,
	<mailto:pika-dev-request@nongnu.org?subject=subscribe>
X-List-Received-Date: Sun, 25 Jan 2004 05:10:19 -0000



    > From: Matthew Dempsky <jivera@flame.org>

    > I don't feel like writing another email just to reply to the proper
    > thread about this, but I just made the change so (eqv? #\U+0001
    > #\ctl-a) => #t, but should it be #\ctl-A or both or should we just
    > make the table lookup case insensitive so that #\ctl-a == #\ctl-A ==
    > #\CTL-A (and consequently #\newline == #\NEWLINE etc)?

I think that case insensitive is the only reasonable alternative
there.

#\NEWLINE == #\newline is required by R5RS, afaict.

and "ctl-a" is a character name, just like "newline".

-t




From MAILER-DAEMON Sun Jan 25 02:57:31 2004
Received: from list by monty-python.gnu.org with archive (Exim 4.24)
	id 1Akf98-000180-Vw
	for mharc-pika-dev@gnu.org; Sun, 25 Jan 2004 02:57:30 -0500
Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.24)
	id 1Akf96-00016I-77
	for pika-dev@nongnu.org; Sun, 25 Jan 2004 02:57:28 -0500
Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.24)
	id 1Akf8Z-0000kS-70
	for pika-dev@nongnu.org; Sun, 25 Jan 2004 02:57:27 -0500
Received: from [129.110.10.12] (helo=smtp1.utdallas.edu)
	by monty-python.gnu.org with esmtp (Exim 4.24) id 1Akf8Y-0000kP-Td
	for pika-dev@nongnu.org; Sun, 25 Jan 2004 02:56:54 -0500
Received: from kaiser (bluesocket.utdallas.edu [129.110.39.12])
	by smtp1.utdallas.edu (Postfix) with ESMTP id 76748388CA7;
	Sun, 25 Jan 2004 01:56:54 -0600 (CST)
Received: from jivera by kaiser with local (Exim 3.35 #1 (Debian))
	id 1AkYaq-00042l-00; Sun, 25 Jan 2004 01:57:40 +0100
To: Tom Lord <lord@emf.net>
Subject: Re: [Pika-dev] so... string work
References: <200401221758.JAA20868@morrowfield.regexps.com>
	<874qul5o9x.fsf@flame.org>
	<200401242327.PAA04794@morrowfield.regexps.com>
	<200401242330.PAA04805@morrowfield.regexps.com>
	<873ca5jk4i.fsf@flame.org>
	<200401250344.TAA05447@morrowfield.regexps.com>
	<87y8rxca1p.fsf@flame.org>
	<200401250450.UAA05651@morrowfield.regexps.com>
From: Matthew Dempsky <jivera@flame.org>
Date: Sun, 25 Jan 2004 01:57:40 +0100
In-Reply-To: <200401250450.UAA05651@morrowfield.regexps.com> (Tom Lord's
	message of "Sat, 24 Jan 2004 20:50:55 -0800 (PST)")
Message-ID: <87ad4cetff.fsf@flame.org>
User-Agent: Gnus/5.1006 (Gnus v5.10.6) Emacs/21.3 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Sender: Matthew Dempsky <jivera@utdallas.edu>
Cc: pika-dev@nongnu.org
X-BeenThere: pika-dev@nongnu.org
X-Mailman-Version: 2.1.2
Precedence: list
List-Id: <pika-dev.nongnu.org>
List-Unsubscribe: <http://mail.nongnu.org/mailman/listinfo/pika-dev>,
	<mailto:pika-dev-request@nongnu.org?subject=unsubscribe>
List-Archive: <http://mail.gnu.org/pipermail/pika-dev>
List-Post: <mailto:pika-dev@nongnu.org>
List-Help: <mailto:pika-dev-request@nongnu.org?subject=help>
List-Subscribe: <http://mail.nongnu.org/mailman/listinfo/pika-dev>,
	<mailto:pika-dev-request@nongnu.org?subject=subscribe>
X-List-Received-Date: Sun, 25 Jan 2004 07:57:29 -0000

Tom Lord <lord@emf.net> writes:

> Construction and locking of strings definately goes in reps/.
>
> Extraction definately goes in libscm/.
>
> That strings are vtable objects is probably a reps/ issue.
>
> Standard procedures (e.g., STRING-LENGTH) should be in libscm.
>
> Sound about right?

Hopefully last question before I can commit some basic string
functionality/frameworking -- what are the semantics regarding
`udstr_copy'ing and `udstr_ref'ing of `t_udstr's in the FFI?  I assume
scm_make_string should at least ref the string if not copy it, but I'm
not sure about the rest of the functions.

-jivera



From MAILER-DAEMON Sun Jan 25 11:24:15 2004
Received: from list by monty-python.gnu.org with archive (Exim 4.24)
	id 1Akn3X-0003tQ-3i
	for mharc-pika-dev@gnu.org; Sun, 25 Jan 2004 11:24:15 -0500
Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.24)
	id 1Akn3U-0003t4-6r
	for pika-dev@nongnu.org; Sun, 25 Jan 2004 11:24:12 -0500
Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.24)
	id 1Akn2x-0003bl-R8
	for pika-dev@nongnu.org; Sun, 25 Jan 2004 11:24:11 -0500
Received: from [65.234.195.150] (helo=morrowfield.regexps.com)
	by monty-python.gnu.org with esmtp (Exim 4.24) id 1Akn2w-0003Xp-B5
	for pika-dev@nongnu.org; Sun, 25 Jan 2004 11:23:38 -0500
Received: (from lord@localhost)
	by morrowfield.regexps.com (8.9.1/8.9.1) id IAA17926;
	Sun, 25 Jan 2004 08:37:33 -0800 (PST)
	(envelope-from lord@morrowfield.regexps.com)
Date: Sun, 25 Jan 2004 08:37:33 -0800 (PST)
Message-Id: <200401251637.IAA17926@morrowfield.regexps.com>
From: Tom Lord <lord@emf.net>
To: jivera@flame.org
In-reply-to: <87ad4cetff.fsf@flame.org> (message from Matthew Dempsky on Sun, 
	25 Jan 2004 01:57:40 +0100)
Subject: Re: [Pika-dev] so... string work
References: <200401221758.JAA20868@morrowfield.regexps.com>
	<874qul5o9x.fsf@flame.org>
	<200401242327.PAA04794@morrowfield.regexps.com>
	<200401242330.PAA04805@morrowfield.regexps.com>
	<873ca5jk4i.fsf@flame.org>
	<200401250344.TAA05447@morrowfield.regexps.com>
	<87y8rxca1p.fsf@flame.org>
	<200401250450.UAA05651@morrowfield.regexps.com>
	<87ad4cetff.fsf@flame.org>
Cc: pika-dev@nongnu.org
X-BeenThere: pika-dev@nongnu.org
X-Mailman-Version: 2.1.2
Precedence: list
List-Id: <pika-dev.nongnu.org>
List-Unsubscribe: <http://mail.nongnu.org/mailman/listinfo/pika-dev>,
	<mailto:pika-dev-request@nongnu.org?subject=unsubscribe>
List-Archive: <http://mail.gnu.org/pipermail/pika-dev>
List-Post: <mailto:pika-dev@nongnu.org>
List-Help: <mailto:pika-dev-request@nongnu.org?subject=help>
List-Subscribe: <http://mail.nongnu.org/mailman/listinfo/pika-dev>,
	<mailto:pika-dev-request@nongnu.org?subject=subscribe>
X-List-Received-Date: Sun, 25 Jan 2004 16:24:12 -0000


    > From: Matthew Dempsky <jivera@flame.org>

    > Hopefully last question before I can commit some basic string
    > functionality/frameworking -- what are the semantics regarding
    > `udstr_copy'ing and `udstr_ref'ing of `t_udstr's in the FFI?  I assume
    > scm_make_string should at least ref the string if not copy it, but I'm
    > not sure about the rest of the functions.

_extract_ functions copy -- data or the entire t_udstr depending on
which they return.

_lock_ should do nothing -- just lease the t_udstr to C code for a
while. The Scheme object is live between lock and unlock and holds a
reference.

The _make_ functions that accept raw string data (the portable FFI
functions) should copy that string data.

For naming consistency, if you need a string constructor function that
copies a t_udstr that it's handed, call that _make_.

If you need a string constructor that wraps an existing t_udstr,
I think it should be called "scm_take_*".   The thing is, after a
call like:

	scm_take_udstr (&answer, arena, udstr);

the value of `udstr' is no longer valid to the C code.   Before that
call, the C code must have had a reference count on `udstr'.   So
`scm_take_udstr' should just "take over" the reference count from C,
not increment the reference count.   It might even not be a terrible 
idea to make it:

	scm_take_udstr (&answer, arena, &udstr);

and, as a side effect, set `udstr' to 0 in `scm_take_udstr'.


(I think there should not be functions like `scm_take_string8' because
callers don't know how to allocate data for t_udstr's.  For example,
there might need to be extra stuff to the "left" of the start of the
string.)

-t



From MAILER-DAEMON Sun Jan 25 18:07:31 2004
Received: from list by monty-python.gnu.org with archive (Exim 4.24)
	id 1AktLn-0000ju-KL
	for mharc-pika-dev@gnu.org; Sun, 25 Jan 2004 18:07:31 -0500
Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.24)
	id 1AktLk-0000iD-Ks
	for pika-dev@nongnu.org; Sun, 25 Jan 2004 18:07:28 -0500
Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.24)
	id 1AktLD-0000YB-It
	for pika-dev@nongnu.org; Sun, 25 Jan 2004 18:07:26 -0500
Received: from [80.33.152.103] (helo=turing.uab.es)
	by monty-python.gnu.org with esmtp (TLSv1:RC4-SHA:128) (Exim 4.24)
	id 1AktLC-0000TE-TA
	for pika-dev@nongnu.org; Sun, 25 Jan 2004 18:06:55 -0500
Received: from jao by turing.uab.es with local (Exim 4.30)
	id 1AktL8-0000zf-Ir; Mon, 26 Jan 2004 00:06:50 +0100
To: pika-dev@nongnu.org
X-Attribution: jao
X-URL: <http://tao.uab.es/jao/>
From: "Jose A. Ortega Ruiz" <jao@gnu.org>
Organization: CCD - Autonomous University of Barcelona
Date: Mon, 26 Jan 2004 00:06:50 +0100
Message-ID: <87ad4bpr05.fsf@turing.uab.es>
User-Agent: Gnus/5.1006 (Gnus v5.10.6) Emacs/21.3 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Sender: Jose Antonio Ortega Ruiz <jao@abra.uab.es>
Cc: 
Subject: [Pika-dev] string work
X-BeenThere: pika-dev@nongnu.org
X-Mailman-Version: 2.1.2
Precedence: list
List-Id: <pika-dev.nongnu.org>
List-Unsubscribe: <http://mail.nongnu.org/mailman/listinfo/pika-dev>,
	<mailto:pika-dev-request@nongnu.org?subject=unsubscribe>
List-Archive: <http://mail.gnu.org/pipermail/pika-dev>
List-Post: <mailto:pika-dev@nongnu.org>
List-Help: <mailto:pika-dev-request@nongnu.org?subject=help>
List-Subscribe: <http://mail.nongnu.org/mailman/listinfo/pika-dev>,
	<mailto:pika-dev-request@nongnu.org?subject=subscribe>
X-List-Received-Date: Sun, 25 Jan 2004 23:07:29 -0000


hi,

i'm back from a weekend abroad, and a little bit overwhelmed by the
sheer amount of mails regarding pika strings that i've found in my
inbox. after a quick perusal, it seems like Matthew is already working
on pika strings, advancing at his usual quick pace, right?

hm. given the amount of time i can devote to pika, i would need a week
to read all the relevant postings, then enter into hackerlab, then
catch Matthew's code... by that time, it seems like i'd be of little
use, wouldn't i?

tom, i think i really need a quiet corner of pika to hack on (at a
calm, slow pace) for the time being; otherwise, i'll become a
bottleneck. right now, i can hardly follow your discussions on the
list(s). i'd need to know better the pika innards. to that end, i'd
like to hack slowly on something complex enough, but probably out of
the critical path, so that i can take my time. what do you think? is
there such a corner?

or am i panicking without reason? :)

cheers,
jao
-- 
Nature uses as little as possible of anything.
  -Johannes Kepler, astronomer (1571-1630)



From MAILER-DAEMON Sun Jan 25 18:52:10 2004
Received: from list by monty-python.gnu.org with archive (Exim 4.24)
	id 1Aku30-0000VJ-GT
	for mharc-pika-dev@gnu.org; Sun, 25 Jan 2004 18:52:10 -0500
Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.24)
	id 1Aku2x-0000TZ-9X
	for pika-dev@nongnu.org; Sun, 25 Jan 2004 18:52:07 -0500
Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.24)
	id 1Aku2O-0008Cu-Fs
	for pika-dev@nongnu.org; Sun, 25 Jan 2004 18:52:04 -0500
Received: from [129.110.10.12] (helo=smtp1.utdallas.edu)
	by monty-python.gnu.org with esmtp (Exim 4.24) id 1Aku2N-0008Bl-Sz
	for pika-dev@nongnu.org; Sun, 25 Jan 2004 18:51:31 -0500
Received: from kaiser (bluesocket.utdallas.edu [129.110.39.12])
	by smtp1.utdallas.edu (Postfix) with ESMTP id 756B4388C6C;
	Sun, 25 Jan 2004 17:51:31 -0600 (CST)
Received: from jivera by kaiser with local (Exim 3.35 #1 (Debian))
	id 1AknUf-0000iZ-00; Sun, 25 Jan 2004 17:52:17 +0100
To: "Jose A. Ortega Ruiz" <jao@gnu.org>
Subject: Re: [Pika-dev] string work
References: <87ad4bpr05.fsf@turing.uab.es>
From: Matthew Dempsky <jivera@flame.org>
Date: Sun, 25 Jan 2004 17:52:17 +0100
In-Reply-To: <87ad4bpr05.fsf@turing.uab.es> (Jose A. Ortega Ruiz's message
	of "Mon, 26 Jan 2004 00:06:50 +0100")
Message-ID: <871xpokm2m.fsf@flame.org>
User-Agent: Gnus/5.1006 (Gnus v5.10.6) Emacs/21.3 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Sender: Matthew Dempsky <jivera@utdallas.edu>
Cc: pika-dev@nongnu.org
X-BeenThere: pika-dev@nongnu.org
X-Mailman-Version: 2.1.2
Precedence: list
List-Id: <pika-dev.nongnu.org>
List-Unsubscribe: <http://mail.nongnu.org/mailman/listinfo/pika-dev>,
	<mailto:pika-dev-request@nongnu.org?subject=unsubscribe>
List-Archive: <http://mail.gnu.org/pipermail/pika-dev>
List-Post: <mailto:pika-dev@nongnu.org>
List-Help: <mailto:pika-dev-request@nongnu.org?subject=help>
List-Subscribe: <http://mail.nongnu.org/mailman/listinfo/pika-dev>,
	<mailto:pika-dev-request@nongnu.org?subject=subscribe>
X-List-Received-Date: Sun, 25 Jan 2004 23:52:08 -0000

The only work I've done on Pika relating topics recently brought up
(strings + chars) is add the new codepoint names and a couple needed
fixes for them.  I only stepped forward to claim the Pika half of
strings because I thought you'd be working on the Hackerlab side of
things -- I still have some numbers related issues to hammer out,
however, so I'd be glad to free up the issue for you.

(I'm probably a little too eager in claiming a lot of the work anyways
-- it's just that this is the first project I've been able to _really_
get interested in and so I'm still really excited about it. :-)

-jivera



From MAILER-DAEMON Sun Jan 25 19:13:55 2004
Received: from list by monty-python.gnu.org with archive (Exim 4.24)
	id 1AkuO2-0003f1-Gj
	for mharc-pika-dev@gnu.org; Sun, 25 Jan 2004 19:13:54 -0500
Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.24)
	id 1AkuNz-0003eb-Dd
	for pika-dev@nongnu.org; Sun, 25 Jan 2004 19:13:51 -0500
Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.24)
	id 1AkuNT-0003P1-4g
	for pika-dev@nongnu.org; Sun, 25 Jan 2004 19:13:50 -0500
Received: from [80.33.152.103] (helo=turing.uab.es)
	by monty-python.gnu.org with esmtp (TLSv1:RC4-SHA:128) (Exim 4.24)
	id 1AkuNS-0003OV-5Q
	for pika-dev@nongnu.org; Sun, 25 Jan 2004 19:13:18 -0500
Received: from jao by turing.uab.es with local (Exim 4.30)
	id 1AkuNM-0001Bz-Dx; Mon, 26 Jan 2004 01:13:12 +0100
Date: Mon, 26 Jan 2004 01:13:12 +0100
From: Jose A Ortega Ruiz <jao@gnu.org>
To: Matthew Dempsky <jivera@flame.org>
Subject: Re: [Pika-dev] string work
Message-ID: <20040126001312.GA4572@uab.es>
References: <87ad4bpr05.fsf@turing.uab.es> <871xpokm2m.fsf@flame.org>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <871xpokm2m.fsf@flame.org>
X-Operating-System: Linux turing 2.4.23
User-Agent: Mutt/1.5.5.1+cvs20040105i
Sender: Jose Antonio Ortega Ruiz <jao@abra.uab.es>
Cc: pika-dev@nongnu.org
X-BeenThere: pika-dev@nongnu.org
X-Mailman-Version: 2.1.2
Precedence: list
List-Id: <pika-dev.nongnu.org>
List-Unsubscribe: <http://mail.nongnu.org/mailman/listinfo/pika-dev>,
	<mailto:pika-dev-request@nongnu.org?subject=unsubscribe>
List-Archive: <http://mail.gnu.org/pipermail/pika-dev>
List-Post: <mailto:pika-dev@nongnu.org>
List-Help: <mailto:pika-dev-request@nongnu.org?subject=help>
List-Subscribe: <http://mail.nongnu.org/mailman/listinfo/pika-dev>,
	<mailto:pika-dev-request@nongnu.org?subject=subscribe>
X-List-Received-Date: Mon, 26 Jan 2004 00:13:52 -0000

aaah. i see i was needlessly panicking, then! :)

sorry for the noise. i'll go on with hackerlab and strings---just
forget my previous rants :)

at any rate, Matthew, you're right in that i'll begin on the hackerlab
side, so i guess it would be no problem if you'd work on pika strings.
but, if you've got other things to do, and we're not in a hurry (and, of
course, it's ok with tom), i'd like to try my hand at the pika side too, 
and have the chance of learning about
pika in the process. my worries are that i will need twice as much time
as you to get it working, and i would hate to become a hindrance (cannot
wait to have a Pika Emacs :))

cheers,
jao

On Sun, Jan 25, 2004 at 05:52:17PM +0100, Matthew Dempsky wrote:
> The only work I've done on Pika relating topics recently brought up
> (strings + chars) is add the new codepoint names and a couple needed
> fixes for them.  I only stepped forward to claim the Pika half of
> strings because I thought you'd be working on the Hackerlab side of
> things -- I still have some numbers related issues to hammer out,
> however, so I'd be glad to free up the issue for you.
> 
> (I'm probably a little too eager in claiming a lot of the work anyways
> -- it's just that this is the first project I've been able to _really_
> get interested in and so I'm still really excited about it. :-)
> 
> -jivera
> 



From MAILER-DAEMON Sun Jan 25 20:26:21 2004
Received: from list by monty-python.gnu.org with archive (Exim 4.24)
	id 1AkvW9-0003G9-1J
	for mharc-pika-dev@gnu.org; Sun, 25 Jan 2004 20:26:21 -0500
Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.24)
	id 1AkvW6-0003Cl-6o
	for pika-dev@nongnu.org; Sun, 25 Jan 2004 20:26:18 -0500
Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.24)
	id 1AkvVZ-0002uj-Jn
	for pika-dev@nongnu.org; Sun, 25 Jan 2004 20:26:17 -0500
Received: from [65.234.195.150] (helo=morrowfield.regexps.com)
	by monty-python.gnu.org with esmtp (Exim 4.24)
	id 1AkvVW-0002uO-Tx; Sun, 25 Jan 2004 20:25:43 -0500
Received: (from lord@localhost)
	by morrowfield.regexps.com (8.9.1/8.9.1) id RAA26615;
	Sun, 25 Jan 2004 17:39:44 -0800 (PST)
	(envelope-from lord@morrowfield.regexps.com)
Date: Sun, 25 Jan 2004 17:39:44 -0800 (PST)
Message-Id: <200401260139.RAA26615@morrowfield.regexps.com>
From: Tom Lord <lord@emf.net>
To: jao@gnu.org
In-reply-to: <87ad4bpr05.fsf@turing.uab.es> (jao@gnu.org)
References: <87ad4bpr05.fsf@turing.uab.es>
Cc: pika-dev@nongnu.org
Subject: [Pika-dev] Re: string work
X-BeenThere: pika-dev@nongnu.org
X-Mailman-Version: 2.1.2
Precedence: list
List-Id: <pika-dev.nongnu.org>
List-Unsubscribe: <http://mail.nongnu.org/mailman/listinfo/pika-dev>,
	<mailto:pika-dev-request@nongnu.org?subject=unsubscribe>
List-Archive: <http://mail.gnu.org/pipermail/pika-dev>
List-Post: <mailto:pika-dev@nongnu.org>
List-Help: <mailto:pika-dev-request@nongnu.org?subject=help>
List-Subscribe: <http://mail.nongnu.org/mailman/listinfo/pika-dev>,
	<mailto:pika-dev-request@nongnu.org?subject=subscribe>
X-List-Received-Date: Mon, 26 Jan 2004 01:26:19 -0000



    > From: "Jose A. Ortega Ruiz" <jao@gnu.org>

    > i'm back from a weekend abroad, and a little bit overwhelmed by the
    > sheer amount of mails regarding pika strings that i've found in my
    > inbox. after a quick perusal, it seems like Matthew is already working
    > on pika strings, advancing at his usual quick pace, right?

He's working on the boilerplate code for wrapping a hackerlab t_udstr
as a Scheme object.  I suspect (intending no disrespect to Matthew)
that this code will need to be revised as Unicode string facilities
come on-line.  It's still a useful thing to do just to lay out the
framework and to help with bootstrapping.


    > hm. given the amount of time i can devote to pika, i would need a week
    > to read all the relevant postings, then enter into hackerlab, then
    > catch Matthew's code... by that time, it seems like i'd be of little
    > use, wouldn't i?

    > tom, i think i really need a quiet corner of pika to hack on (at a
    > calm, slow pace) for the time being; otherwise, i'll become a
    > bottleneck. right now, i can hardly follow your discussions on the
    > list(s). i'd need to know better the pika innards. to that end, i'd
    > like to hack slowly on something complex enough, but probably out of
    > the critical path, so that i can take my time. what do you think? is
    > there such a corner?

    > or am i panicking without reason? :)

How do you feel about working on libhackerlab, for now, rather than
libscm directly?  That would complement Matthew's work but also is
something that can proceed mostly separately at its own pace.  In
fact, this work includes working on the guts of the standard Scheme
string procedures --- the needed functions are those that will allow
Pika and Pika applications to be first-class Unicode-using programs;
you'd be implementing the engine for things like STRING-APPEND and
STRING-SET!.


Below is what's needed in ./src/hackerlab/strings.   

* Minor annoyance: C aliasing rules safety

  It's probably worth fixing this early, before lots of new code comes
  to depend on a mistake I made.

  The string functions use `uni_string' parameters.  That type is
  intended to be a way to pass pointers to string which might be:

	ASCII or iso8859-1		t_uchar *
	UTF-8				t_uchar *
        UTF-16				t_uint16 *

   It's defined in src/hackerlab/unicode/unicode.h as:

	typedef struct uni__undefined_struct * uni_string;

   which is a case of my "old school" coding habbits showing throw.

   It should instead be defined as a union type:

	union uni_string
        {
          t_uchar * iso8859_1;
          t_uchar * utf8;
          t_uint16 * utf16;
          t_uint32 * utf32;
        };

  and uses updated to reflect that.

  For convenience, there should be functions (which are optionally
  inlined) like:

	union uni_string
        uni_string_utf8 (t_uchar * utf8_data)
        {
          union uni_string answer;

          answer.utf8 = utf8_data;
          return answer;
        }

  (Such functions are a stand-in for cast-to-union which is not
  portable enough to use.)


* utf-32

  Notice that procedures like `udstr_save' take parameters of type
  `enum uni_encoding_scheme'.   Encodings are defined for iso8859_1,
  utf8, and variations on utf16.

  Support is also needed for the encoding `uni_utf32' which is a
  32-bits-per-character encoding using the native byte order.



* fixed width routines

  Pika should ultimately not use `udstr_save' or similar functions,
  at least in many circumstances.

  Rather, it should use `udstr_save_fw' (which needs to be written).

  `udstr_save_fw' returns the narrowest `t_udstr' in which all
  characters have the same width representation.

  For example, if `udstr_save_fw' is passed a UTF-16 string, but all
  of the characters in that string are ASCII characters, then the
  `t_udstr' returned should use the encoding `uni_iso8859_1' and 
  use one byte per character.

  On the other hand, if `udstr_save_fw' is passed a UTF-8 string, but
  not all of the characters are ASCII, then the `t_udstr' returned
  should use the encoding `uni_utf16' or `uni_utf32'.



* illegal coding sequences, uni_bogus32, and 23-bit characters

  What happens if `udstr_save_fw' is passed, for example, a
  purportedly UTF-8 string --- but the string is not valid UTF-8?

  libhackerlab should be modified to use a 22-bit extended version of
  Unicode.  If the higher order bit, bit 21, of a character is set,
  then that means that the character is a "bogus" character.

  For example, when scanning a UTF-8 string, an illegal byte is
  interpreted to represent a bogus character -- the scan returns that
  byte ORed with (1<<21).  (In the current code it returns a generic
  substitution character but the addition of "bogus characters" will
  allow a scan to work on ill-formed strings without discarding
  information.)

  The encoding `uni_bogus32' is used for `t_udstr' strings that
  contain bogus characters.  In this encoding, each character is
  represented by 23 bits.

  If bits 21 and 22 are 0, then the character is a normal Unicode
  codepoint.

  If bit 21 is 1, then the character is a "bogus character".

  The use for bit 22 is explained further below.



* buckybits and 28 bit characters

  A tiny bit of machinery should be moved from Pika into libhackerlab
  for dealing with buckybits.

  Strings (`t_udstr') can contain characters with buckybits set.  
  It represents these as `uni_utf32' strings (or `uni_bogus32' if the
  string also contains bogus characters).



* Character Properties and The Like

  For the purpose of character-property functions, such as:

        /* src/hackerlab/unidata/case-db-inlines.h 
         */
	unidata_to_upper (t_unicode c);

  a character with non-0 buckybits should be treated analogously to
  its buckybit version.   In other words, mask out the buckybits,
  compute the function on the underlying codepoint, and then put the
  buckybits back on the result.

  Bogus characters should be treated like unassigned Unicode
  codepoints.   For example, unidata_to_upper (bogus_char) returns
  its argument.




* hackerlab versions of standard Scheme string procedures

  Scheme defines standard procedures like STRING-REF, STRING-SET!,
  STRING-APPEND, etc.

  Analogous functions need to be provided for `t_udstr' -- these will
  be used to implement the Pika functions.

  Note that some of those functions should be `_fw' versions.   For
  example, perhaps libhackerlab should have:

	ustr_set (uni_string str, int coding_value_index, t_unicode value)

  but that isn't what Pika should use.   Pika should use:

	ustr_set_fw (uni_string str, 
                     int coding_value_index, 
                     t_unicode value)

  where the _fw varient will be doing things like promoting a
  `uni_iso8859_1' string to a `uni_utf16' string if it takes 16 bits
  to represent `value'.



* Bit 22 in `uni_bogus32'

  The routines described above should preserve the following invariant
  for `uni_bogus32' strings:

	If bit 21 is 0 (the character is not bogus), then bit 22 is 0.

	If bit 21 is 1, and there is a character to the left in which 
        bit 22 is 0 or else there is no character to the left, then
        bit 22 is 1.

        Otherwise, bit 22 is 0.


  That implies that in a substring of bogus characters in a
  `uni_bogus32' string, bit 22 alternates between 1 and 0 
  (assuming the string has been manipulated only by the functions
  described above).

  And it implies that in a maximal length substring of bogus
  characters, the first one has bit 22 set to 1.

  STRING-REF (and its hackerlab equivalent) should mask out bit 22.

  STRING-SET (and its hackerlab equivalent) should update the bit 22s
  of adjacent characters as necessary.

  Later, we'll add functions that cause bit 22 to not alternate that
  way (and the udpates performed by functions like STRING-SET should
  take this into account).

  For example, I think we'll want Pika to have a string append
  procedure, distinct from STRING-APPEND, that preserves combining
  character sequence boundaries.

  In other words, suppose that I have a string which is just:

	"A"

  and another string which is the ill-formed combinding character
  sequence:

	"\U+0301."

  where that's my way of typing in ASCII a string containing just
  U+0301 ("COMBINING ACUTE ACCENT").

  Now suppose we have a procedure GRAPHEME-LENGTH which reports,
  essentially, the number of combining character sequences in a
  string.  Then:

	(grapheme-length "A") => 1
	(grapheme-length "\U+0301") => 1

  and given:

	(define s (string-append "A" "\U+0301"))

  we get:

	(string-length s) => 2

        (grapheme-length s) => 1

  however, and this where bit 22 comes in:

	(define s2 (string-grapheme-append "A" "\U+0301"))

        (string-length s2) => 2

	(grapheme-length s2) => 2

        (string=? s s2) => #t

-t




From MAILER-DAEMON Sun Jan 25 20:43:44 2004
Received: from list by monty-python.gnu.org with archive (Exim 4.24)
	id 1Akvmy-0003vN-7M
	for mharc-pika-dev@gnu.org; Sun, 25 Jan 2004 20:43:44 -0500
Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.24)
	id 1Akvmw-0003v5-30
	for pika-dev@nongnu.org; Sun, 25 Jan 2004 20:43:42 -0500
Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.24)
	id 1AkvmQ-0003k6-F2
	for pika-dev@nongnu.org; Sun, 25 Jan 2004 20:43:41 -0500
Received: from [65.234.195.150] (helo=morrowfield.regexps.com)
	by monty-python.gnu.org with esmtp (Exim 4.24)
	id 1Akvlt-0003b1-IH; Sun, 25 Jan 2004 20:42:37 -0500
Received: (from lord@localhost)
	by morrowfield.regexps.com (8.9.1/8.9.1) id RAA26769;
	Sun, 25 Jan 2004 17:56:34 -0800 (PST)
	(envelope-from lord@morrowfield.regexps.com)
Date: Sun, 25 Jan 2004 17:56:34 -0800 (PST)
Message-Id: <200401260156.RAA26769@morrowfield.regexps.com>
From: Tom Lord <lord@emf.net>
To: jivera@flame.org
In-reply-to: <871xpokm2m.fsf@flame.org> (message from Matthew Dempsky on Sun, 
	25 Jan 2004 17:52:17 +0100)
Subject: Re: [Pika-dev] string work
References: <87ad4bpr05.fsf@turing.uab.es> <871xpokm2m.fsf@flame.org>
Cc: pika-dev@nongnu.org
X-BeenThere: pika-dev@nongnu.org
X-Mailman-Version: 2.1.2
Precedence: list
List-Id: <pika-dev.nongnu.org>
List-Unsubscribe: <http://mail.nongnu.org/mailman/listinfo/pika-dev>,
	<mailto:pika-dev-request@nongnu.org?subject=unsubscribe>
List-Archive: <http://mail.gnu.org/pipermail/pika-dev>
List-Post: <mailto:pika-dev@nongnu.org>
List-Help: <mailto:pika-dev-request@nongnu.org?subject=help>
List-Subscribe: <http://mail.nongnu.org/mailman/listinfo/pika-dev>,
	<mailto:pika-dev-request@nongnu.org?subject=subscribe>
X-List-Received-Date: Mon, 26 Jan 2004 01:43:42 -0000



    > From: Matthew Dempsky <jivera@flame.org>

    > (I'm probably a little too eager in claiming a lot of the work anyways
    > -- it's just that this is the first project I've been able to _really_
    > get interested in and so I'm still really excited about it. :-)

I'm in a similar spirit.   It's a little scary to contemplate how much
there is yet to do so I try not to :-)

-t




From MAILER-DAEMON Mon Jan 26 09:50:39 2004
Received: from list by monty-python.gnu.org with archive (Exim 4.24)
	id 1Al84V-0006jj-AR
	for mharc-pika-dev@gnu.org; Mon, 26 Jan 2004 09:50:39 -0500
Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.24)
	id 1Al84S-0006j3-Sn
	for pika-dev@nongnu.org; Mon, 26 Jan 2004 09:50:36 -0500
Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.24)
	id 1Al83v-0006YE-SO
	for pika-dev@nongnu.org; Mon, 26 Jan 2004 09:50:35 -0500
Received: from [213.165.64.20] (helo=mail.gmx.net)
	by monty-python.gnu.org with smtp (Exim 4.24) id 1Al83v-0006Xg-37
	for pika-dev@nongnu.org; Mon, 26 Jan 2004 09:50:03 -0500
Received: (qmail 5146 invoked by uid 65534); 26 Jan 2004 14:43:21 -0000
Received: from chello212186006140.401.14.univie.teleweb.at (EHLO garibaldi)
	(212.186.6.140)
	by mail.gmx.net (mp017) with SMTP; 26 Jan 2004 15:43:21 +0100
X-Authenticated: #3102804
Received: from ivanova.rhinosaur.lan ([192.168.1.9] helo=ivanova)
	by garibaldi with esmtp (Exim 4.30) id 1Al7xG-0001VZ-M7
	for pika-dev@nongnu.org; Mon, 26 Jan 2004 15:43:10 +0100
Received: from andy by ivanova with local (Exim 4.30) id 1Al7xF-0000ge-Jj
	for pika-dev@nongnu.org; Mon, 26 Jan 2004 15:43:09 +0100
To: Pika Developers <pika-dev@nongnu.org>
From: Andreas Rottmann <a.rottmann@gmx.at>
Date: Mon, 26 Jan 2004 15:43:09 +0100
Message-ID: <87fze27oua.fsf@alice.rotty.yi.org>
User-Agent: Gnus/5.1006 (Gnus v5.10.6) Emacs/21.3 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Sender: Andreas Rottmann <a.rottmann@gmx.at>
X-Spam-Score: -4.9 (----)
Subject: [Pika-dev] Memory fixes
X-BeenThere: pika-dev@nongnu.org
X-Mailman-Version: 2.1.2
Precedence: list
List-Id: <pika-dev.nongnu.org>
List-Unsubscribe: <http://mail.nongnu.org/mailman/listinfo/pika-dev>,
	<mailto:pika-dev-request@nongnu.org?subject=unsubscribe>
List-Archive: <http://mail.gnu.org/pipermail/pika-dev>
List-Post: <mailto:pika-dev@nongnu.org>
List-Help: <mailto:pika-dev-request@nongnu.org?subject=help>
List-Subscribe: <http://mail.nongnu.org/mailman/listinfo/pika-dev>,
	<mailto:pika-dev-request@nongnu.org?subject=subscribe>
X-List-Received-Date: Mon, 26 Jan 2004 14:50:37 -0000

Hi!

I just did a little bit of valgrinding of eceval, and found two memory
bugs. A fix for those is in pika-scm--integration--0.1--patch-1, in my
Archive (http://yi.org/rotty/Software#gnuarch).

Cheers, Andy
-- 
Andreas Rottmann         | Rotty@ICQ      | 118634484@ICQ | a.rottmann@gmx.at
http://yi.org/rotty      | GnuPG Key: http://yi.org/rotty/gpg.asc
Fingerprint              | DFB4 4EB4 78A4 5EEE 6219  F228 F92F CFC5 01FD 5B62

Make free software, not war!



From MAILER-DAEMON Mon Jan 26 10:56:39 2004
Received: from list by monty-python.gnu.org with archive (Exim 4.24)
	id 1Al96M-0001HT-QD
	for mharc-pika-dev@gnu.org; Mon, 26 Jan 2004 10:56:38 -0500
Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.24)
	id 1Al96K-0001Fy-AN
	for pika-dev@nongnu.org; Mon, 26 Jan 2004 10:56:36 -0500
Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.24)
	id 1Al95o-00012t-7J
	for pika-dev@nongnu.org; Mon, 26 Jan 2004 10:56:35 -0500
Received: from [213.165.64.20] (helo=mail.gmx.net)
	by monty-python.gnu.org with smtp (Exim 4.24) id 1Al8rY-0003UB-Q8
	for pika-dev@nongnu.org; Mon, 26 Jan 2004 10:41:20 -0500
Received: (qmail 27844 invoked by uid 65534); 26 Jan 2004 15:14:35 -0000
Received: from chello212186006140.401.14.univie.teleweb.at (EHLO garibaldi)
	(212.186.6.140)
	by mail.gmx.net (mp023) with SMTP; 26 Jan 2004 16:14:35 +0100
X-Authenticated: #3102804
Received: from ivanova.rhinosaur.lan ([192.168.1.9] helo=ivanova)
	by garibaldi with esmtp (Exim 4.30)
	id 1Al8RV-0001XR-MB; Mon, 26 Jan 2004 16:14:25 +0100
Received: from andy by ivanova with local (Exim 4.30)
	id 1Al8RV-0000hm-Gl; Mon, 26 Jan 2004 16:14:25 +0100
To: Matthew Dempsky <jivera@flame.org>
Subject: Re: [Pika-dev] What's on my plate for Pika...
References: <877jzv4u2f.fsf@flame.org> <87oet7t5og.fsf@alice.rotty.yi.org>
	<873caig2h8.fsf@flame.org>
From: Andreas Rottmann <a.rottmann@gmx.at>
Date: Mon, 26 Jan 2004 16:14:25 +0100
Message-ID: <87vfmy68tq.fsf@alice.rotty.yi.org>
User-Agent: Gnus/5.1006 (Gnus v5.10.6) Emacs/21.3 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Sender: Andreas Rottmann <a.rottmann@gmx.at>
X-Spam-Score: -4.9 (----)
Cc: pika-dev@nongnu.org
X-BeenThere: pika-dev@nongnu.org
X-Mailman-Version: 2.1.2
Precedence: list
List-Id: <pika-dev.nongnu.org>
List-Unsubscribe: <http://mail.nongnu.org/mailman/listinfo/pika-dev>,
	<mailto:pika-dev-request@nongnu.org?subject=unsubscribe>
List-Archive: <http://mail.gnu.org/pipermail/pika-dev>
List-Post: <mailto:pika-dev@nongnu.org>
List-Help: <mailto:pika-dev-request@nongnu.org?subject=help>
List-Subscribe: <http://mail.nongnu.org/mailman/listinfo/pika-dev>,
	<mailto:pika-dev-request@nongnu.org?subject=subscribe>
X-List-Received-Date: Mon, 26 Jan 2004 15:56:37 -0000

Matthew Dempsky <jivera@flame.org> writes:

>> The other way round (i.e. making code written using the Pika-style FFI
>> usable from guile) should be easier (but probably not as useful, given
>> the amount of Guile C code vs. Pika C code).
>
> Actually, that is the goal.  Basically the idea is the same as it is
> for SISC -- to reinforce the idea that Pika's FFI is general enough to
> serve as a standardized C FFI for Scheme (or to identify areas where
> it needs correcting), it would be helpful to be able to say "Hey, look
> - you can write code to Pika's FFI and it can interface not only with
> Pika, but also [SISC, Guile, or whatever we can manage]."
>
That's a really nice goal! When Pika is major enough, I will certainly
consider porting g-wrap [0] to use the Pika FFI, iff that means it
will still work with Guile (and SISC, ...). This would open the
possibilty of getting the bindings stacked upon it (GTK+2, libgda,
GStreamer, ...) to work with three implementations instead of
one. That's a really promising perspective IMO.

[0] http://yi.org/rotty/GWrap.html

> I'm sure there's a good deal of code already written to specific
> implementation FFIs, but the long term plan (or my understanding of it
> at lesat) is to get this code ported to Pika so that any
> implementation can benefit from it.
>
I see.

> (Of course it would also be helpful to be able to automate a process
> of porting code using another implementation's FFI to Pika's, but we
> can worry about that later.  It will be hard to drive interest into
> porting code to Pika's FFI if we can't make that code still usable
> with the FFI they're currently using.)
>
Sure. One area where the Guile and Pika FFI's will differ big time is
error handling. From what I get out of the Pika notes, errors are
returned as return values, whereas Guile uses non-returning functions
(that longjmp to the handler). I would be interested how the "Plan"
for errors looks like; I didn't find much about it in the notes. I
think it might be a good idea to have a look at SRFI-35 and keep that
in the back of the head while designing the error handling mechanism.

Error/Exception handling and unifiying Guile and Pika FFI is an area
I'd be interested in getting my hands dirty; however, I don't quite
know where errors fit into the big picture/plan.

Rotty
-- 
Andreas Rottmann         | Rotty@ICQ      | 118634484@ICQ | a.rottmann@gmx.at
http://yi.org/rotty      | GnuPG Key: http://yi.org/rotty/gpg.asc
Fingerprint              | DFB4 4EB4 78A4 5EEE 6219  F228 F92F CFC5 01FD 5B62

Packages should build-depend on what they should build-depend.



From MAILER-DAEMON Mon Jan 26 11:21:56 2004
Received: from list by monty-python.gnu.org with archive (Exim 4.24)
	id 1Al9Uq-0000tw-2y
	for mharc-pika-dev@gnu.org; Mon, 26 Jan 2004 11:21:56 -0500
Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.24)
	id 1Al9Sx-0000LM-Hl
	for pika-dev@nongnu.org; Mon, 26 Jan 2004 11:19:59 -0500
Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.24)
	id 1Al9SL-0000Af-1Z
	for pika-dev@nongnu.org; Mon, 26 Jan 2004 11:19:52 -0500
Received: from [80.33.152.103] (helo=turing.uab.es)
	by monty-python.gnu.org with esmtp (TLSv1:RC4-SHA:128) (Exim 4.24)
	id 1Al9Pv-0007my-Fl
	for pika-dev@nongnu.org; Mon, 26 Jan 2004 11:16:51 -0500
Received: from jao by turing.uab.es with local (Exim 4.30)
	id 1Al9Pj-0004yp-D9; Mon, 26 Jan 2004 17:16:39 +0100
Date: Mon, 26 Jan 2004 17:16:38 +0100
From: Jose A Ortega Ruiz <jao@gnu.org>
To: Tom Lord <lord@emf.net>
Message-ID: <20040126161638.GA19132@uab.es>
References: <87ad4bpr05.fsf@turing.uab.es>
	<200401260139.RAA26615@morrowfield.regexps.com>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <200401260139.RAA26615@morrowfield.regexps.com>
X-Operating-System: Linux turing 2.4.23
User-Agent: Mutt/1.5.5.1+cvs20040105i
Sender: Jose Antonio Ortega Ruiz <jao@abra.uab.es>
Cc: pika-dev@nongnu.org
Subject: [Pika-dev] Re: string work
X-BeenThere: pika-dev@nongnu.org
X-Mailman-Version: 2.1.2
Precedence: list
List-Id: <pika-dev.nongnu.org>
List-Unsubscribe: <http://mail.nongnu.org/mailman/listinfo/pika-dev>,
	<mailto:pika-dev-request@nongnu.org?subject=unsubscribe>
List-Archive: <http://mail.gnu.org/pipermail/pika-dev>
List-Post: <mailto:pika-dev@nongnu.org>
List-Help: <mailto:pika-dev-request@nongnu.org?subject=help>
List-Subscribe: <http://mail.nongnu.org/mailman/listinfo/pika-dev>,
	<mailto:pika-dev-request@nongnu.org?subject=subscribe>
X-List-Received-Date: Mon, 26 Jan 2004 16:21:46 -0000

On Sun, Jan 25, 2004 at 05:39:44PM -0800, Tom Lord wrote:
> 
> How do you feel about working on libhackerlab, for now, rather than
> libscm directly?  That would complement Matthew's work but also is
> something that can proceed mostly separately at its own pace.  In
> fact, this work includes working on the guts of the standard Scheme
> string procedures --- the needed functions are those that will allow
> Pika and Pika applications to be first-class Unicode-using programs;
> you'd be implementing the engine for things like STRING-APPEND and
> STRING-SET!.
> 
> [great implementation roadmap ...]
>

yeah, that sounds good to me. i'll go for it. thanks a lot for the
detailed roadmap, it's exactly what i needed.

so, jivera, please feel free to go on on your work on pika strings if
you feel like it: i promise i won't complain anymore! :)

thanks for your time and patience,
jao




From MAILER-DAEMON Mon Jan 26 11:27:04 2004
Received: from list by monty-python.gnu.org with archive (Exim 4.24)
	id 1Al9Xp-0002WE-F0
	for mharc-pika-dev@gnu.org; Mon, 26 Jan 2004 11:25:01 -0500
Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.24)
	id 1Al9WO-0001c0-QL
	for pika-dev@nongnu.org; Mon, 26 Jan 2004 11:23:32 -0500
Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.24)
	id 1Al9TG-0000S9-Nm
	for pika-dev@nongnu.org; Mon, 26 Jan 2004 11:20:50 -0500
Received: from [65.234.195.150] (helo=morrowfield.regexps.com)
	by monty-python.gnu.org with esmtp (Exim 4.24) id 1Al9Q4-0007rQ-Kq
	for pika-dev@nongnu.org; Mon, 26 Jan 2004 11:17:01 -0500
Received: (from lord@localhost)
	by morrowfield.regexps.com (8.9.1/8.9.1) id IAA24854;
	Mon, 26 Jan 2004 08:30:54 -0800 (PST)
	(envelope-from lord@morrowfield.regexps.com)
Date: Mon, 26 Jan 2004 08:30:54 -0800 (PST)
Message-Id: <200401261630.IAA24854@morrowfield.regexps.com>
From: Tom Lord <lord@emf.net>
To: a.rottmann@gmx.at, jivera@flame.org
In-reply-to: <87fze27oua.fsf@alice.rotty.yi.org> (message from Andreas
	Rottmann on Mon, 26 Jan 2004 15:43:09 +0100)
Subject: Re: [Pika-dev] Memory fixes
References: <87fze27oua.fsf@alice.rotty.yi.org>
Cc: pika-dev@nongnu.org
X-BeenThere: pika-dev@nongnu.org
X-Mailman-Version: 2.1.2
Precedence: list
List-Id: <pika-dev.nongnu.org>
List-Unsubscribe: <http://mail.nongnu.org/mailman/listinfo/pika-dev>,
	<mailto:pika-dev-request@nongnu.org?subject=unsubscribe>
List-Archive: <http://mail.gnu.org/pipermail/pika-dev>
List-Post: <mailto:pika-dev@nongnu.org>
List-Help: <mailto:pika-dev-request@nongnu.org?subject=help>
List-Subscribe: <http://mail.nongnu.org/mailman/listinfo/pika-dev>,
	<mailto:pika-dev-request@nongnu.org?subject=subscribe>
X-List-Received-Date: Mon, 26 Jan 2004 16:24:59 -0000



    > From: Andreas Rottmann <a.rottmann@gmx.at>

    > I just did a little bit of valgrinding of eceval, and found two memory
    > bugs. A fix for those is in pika-scm--integration--0.1--patch-1, in my
    > Archive (http://yi.org/rotty/Software#gnuarch).

Matthew should take that since the code it fixes hasn't been merged
yet from his archive.

-t



From MAILER-DAEMON Mon Jan 26 12:24:44 2004
Received: from list by monty-python.gnu.org with archive (Exim 4.24)
	id 1AlATb-0000q1-Vr
	for mharc-pika-dev@gnu.org; Mon, 26 Jan 2004 12:24:43 -0500
Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.24)
	id 1AlATa-0000op-29
	for pika-dev@nongnu.org; Mon, 26 Jan 2004 12:24:42 -0500
Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.24)
	id 1AlAT3-0000dR-1B
	for pika-dev@nongnu.org; Mon, 26 Jan 2004 12:24:40 -0500
Received: from [129.110.10.12] (helo=smtp1.utdallas.edu)
	by monty-python.gnu.org with esmtp (Exim 4.24) id 1AlAT2-0000cP-Iz
	for pika-dev@nongnu.org; Mon, 26 Jan 2004 12:24:08 -0500
Received: from kaiser (unknown [10.23.10.121])
	by smtp1.utdallas.edu (Postfix) with ESMTP id 21857388D34;
	Mon, 26 Jan 2004 11:24:07 -0600 (CST)
Received: from jivera by kaiser with local (Exim 3.35 #1 (Debian))
	id 1Al3vK-0002G5-00; Mon, 26 Jan 2004 11:24:54 +0100
To: Tom Lord <lord@emf.net>
Subject: Re: [Pika-dev] Memory fixes
References: <87fze27oua.fsf@alice.rotty.yi.org>
	<200401261630.IAA24854@morrowfield.regexps.com>
From: Matthew Dempsky <jivera@flame.org>
Date: Mon, 26 Jan 2004 11:24:54 +0100
In-Reply-To: <200401261630.IAA24854@morrowfield.regexps.com> (Tom Lord's
	message of "Mon, 26 Jan 2004 08:30:54 -0800 (PST)")
Message-ID: <87vfmzf1mx.fsf@flame.org>
User-Agent: Gnus/5.1006 (Gnus v5.10.6) Emacs/21.3 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Sender: Matthew Dempsky <jivera@utdallas.edu>
Cc: pika-dev@nongnu.org
X-BeenThere: pika-dev@nongnu.org
X-Mailman-Version: 2.1.2
Precedence: list
List-Id: <pika-dev.nongnu.org>
List-Unsubscribe: <http://mail.nongnu.org/mailman/listinfo/pika-dev>,
	<mailto:pika-dev-request@nongnu.org?subject=unsubscribe>
List-Archive: <http://mail.gnu.org/pipermail/pika-dev>
List-Post: <mailto:pika-dev@nongnu.org>
List-Help: <mailto:pika-dev-request@nongnu.org?subject=help>
List-Subscribe: <http://mail.nongnu.org/mailman/listinfo/pika-dev>,
	<mailto:pika-dev-request@nongnu.org?subject=subscribe>
X-List-Received-Date: Mon, 26 Jan 2004 17:24:42 -0000

Tom Lord <lord@emf.net> writes:

>     > From: Andreas Rottmann <a.rottmann@gmx.at>
>
>     > I just did a little bit of valgrinding of eceval, and found two memory
>     > bugs. A fix for those is in pika-scm--integration--0.1--patch-1, in my
>     > Archive (http://yi.org/rotty/Software#gnuarch).
>
> Matthew should take that since the code it fixes hasn't been merged
> yet from his archive.

Yeah, I'm looking at the bugs he pointed out now... unfortunately the
lexer fix isn't as trivial a fix as he implemented it with -- it
breaks the test cases.  (It doesn't help that I recently refactored
the lexer a little bit and now notice there's an issue if a comment
gets split across two buffers.)

I see a few ugly methods that would work, but I'll take a bit of time
to see if I can come up with a nice fix first.

-jivera



From MAILER-DAEMON Mon Jan 26 12:49:56 2004
Received: from list by monty-python.gnu.org with archive (Exim 4.24)
	id 1AlAs0-0006GN-DF
	for mharc-pika-dev@gnu.org; Mon, 26 Jan 2004 12:49:56 -0500
Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.24)
	id 1AlAry-0006Fp-4y
	for pika-dev@nongnu.org; Mon, 26 Jan 2004 12:49:54 -0500
Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.24)
	id 1AlArM-00068N-DA
	for pika-dev@nongnu.org; Mon, 26 Jan 2004 12:49:47 -0500
Received: from [129.110.10.12] (helo=smtp1.utdallas.edu)
	by monty-python.gnu.org with esmtp (Exim 4.24) id 1AlArM-00068I-1R
	for pika-dev@nongnu.org; Mon, 26 Jan 2004 12:49:16 -0500
Received: from kaiser (unknown [10.23.10.121])
	by smtp1.utdallas.edu (Postfix) with ESMTP id AE3A0388D21;
	Mon, 26 Jan 2004 11:49:15 -0600 (CST)
Received: from jivera by kaiser with local (Exim 3.35 #1 (Debian))
	id 1Al4Je-0002qf-00; Mon, 26 Jan 2004 11:50:02 +0100
To: Andreas Rottmann <a.rottmann@gmx.at>
Subject: Re: [Pika-dev] What's on my plate for Pika...
References: <877jzv4u2f.fsf@flame.org> <87oet7t5og.fsf@alice.rotty.yi.org>
	<873caig2h8.fsf@flame.org> <87vfmy68tq.fsf@alice.rotty.yi.org>
From: Matthew Dempsky <jivera@flame.org>
Date: Mon, 26 Jan 2004 11:50:02 +0100
In-Reply-To: <87vfmy68tq.fsf@alice.rotty.yi.org> (Andreas Rottmann's message
	of "Mon, 26 Jan 2004 16:14:25 +0100")
Message-ID: <87oesrf0h1.fsf@flame.org>
User-Agent: Gnus/5.1006 (Gnus v5.10.6) Emacs/21.3 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Sender: Matthew Dempsky <jivera@utdallas.edu>
Cc: pika-dev@nongnu.org
X-BeenThere: pika-dev@nongnu.org
X-Mailman-Version: 2.1.2
Precedence: list
List-Id: <pika-dev.nongnu.org>
List-Unsubscribe: <http://mail.nongnu.org/mailman/listinfo/pika-dev>,
	<mailto:pika-dev-request@nongnu.org?subject=unsubscribe>
List-Archive: <http://mail.gnu.org/pipermail/pika-dev>
List-Post: <mailto:pika-dev@nongnu.org>
List-Help: <mailto:pika-dev-request@nongnu.org?subject=help>
List-Subscribe: <http://mail.nongnu.org/mailman/listinfo/pika-dev>,
	<mailto:pika-dev-request@nongnu.org?subject=subscribe>
X-List-Received-Date: Mon, 26 Jan 2004 17:49:55 -0000

Andreas Rottmann <a.rottmann@gmx.at> writes:

> Sure. One area where the Guile and Pika FFI's will differ big time is
> error handling. From what I get out of the Pika notes, errors are
> returned as return values, whereas Guile uses non-returning functions
> (that longjmp to the handler). I would be interested how the "Plan"
> for errors looks like; I didn't find much about it in the notes. I
> think it might be a good idea to have a look at SRFI-35 and keep that
> in the back of the head while designing the error handling mechanism.
>
> Error/Exception handling and unifiying Guile and Pika FFI is an area
> I'd be interested in getting my hands dirty; however, I don't quite
> know where errors fit into the big picture/plan.

Well, my initial reaction was that most errors that can be raised
could be detected ahead of time in the FFI wrapper level so while
Guile's native scm_car may just use longjmp when the argument isn't a
pair, we can avoid that by testing before hand and then just
returning.

However, like I said earlier, both Pika and Guile use the scm_ prefix
for functions so I need to find some hack to work around that... maybe
write the Pika FFI wrapper for Guile to define instead functions like:

pika-ffi.c:
  +-------------------------------------
  | [etc...]
  |
  | t_scm_error
  | pika_car (t_scm_word * answer,
  |           t_scm_arena arena,
  |           t_scm_word * value)
  | {
  |   if (!scm_pair_p (*value))
  |     return scm_err_wta1;
  | 
  |   *answer = scm_car (*value);
  |   return 0;
  | }
  |
  | [etc...]
  +-------------------------------------

pika-ffi.h:
  +-------------------------------------
  | typedef SCM t_scm_word;
  | 
  | [etc...]
  |
  | t_scm_error pika_car (t_scm_word * answer,
  |                       t_scm_arena arena,
  |                       t_scm_word * value);
  | 
  | [etc...]
  | 
  | #define scm_car pika_car
  | 
  | [etc...]
  +-------------------------------------

Thoughts?

-jivera



From MAILER-DAEMON Mon Jan 26 12:56:36 2004
Received: from list by monty-python.gnu.org with archive (Exim 4.24)
	id 1AlAyR-0001JC-5v
	for mharc-pika-dev@gnu.org; Mon, 26 Jan 2004 12:56:35 -0500
Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.24)
	id 1AlAy8-0000wq-IB
	for pika-dev@nongnu.org; Mon, 26 Jan 2004 12:56:16 -0500
Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.24)
	id 1AlAxL-00084L-Vf
	for pika-dev@nongnu.org; Mon, 26 Jan 2004 12:55:59 -0500
Received: from [213.165.64.20] (helo=mail.gmx.net)
	by monty-python.gnu.org with smtp (Exim 4.24) id 1AlAxL-00083Y-Ct
	for pika-dev@nongnu.org; Mon, 26 Jan 2004 12:55:27 -0500
Received: (qmail 28977 invoked by uid 65534); 26 Jan 2004 17:55:26 -0000
Received: from chello212186006140.401.14.univie.teleweb.at (EHLO garibaldi)
	(212.186.6.140)
	by mail.gmx.net (mp011) with SMTP; 26 Jan 2004 18:55:26 +0100
X-Authenticated: #3102804
Received: from ivanova.rhinosaur.lan ([192.168.1.9] helo=ivanova)
	by garibaldi with esmtp (Exim 4.30)
	id 1AlAx7-0001lD-Os; Mon, 26 Jan 2004 18:55:13 +0100
Received: from andy by ivanova with local (Exim 4.30)
	id 1AlAx7-0000rs-9v; Mon, 26 Jan 2004 18:55:13 +0100
To: Matthew Dempsky <jivera@flame.org>
Subject: Re: [Pika-dev] Memory fixes
References: <87fze27oua.fsf@alice.rotty.yi.org>
	<200401261630.IAA24854@morrowfield.regexps.com>
	<87vfmzf1mx.fsf@flame.org>
From: Andreas Rottmann <a.rottmann@gmx.at>
Date: Mon, 26 Jan 2004 18:55:13 +0100
In-Reply-To: <87vfmzf1mx.fsf@flame.org> (Matthew Dempsky's message of "Mon,
	26 Jan 2004 11:24:54 +0100")
Message-ID: <87ektm61dq.fsf@alice.rotty.yi.org>
User-Agent: Gnus/5.1006 (Gnus v5.10.6) Emacs/21.3 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Sender: Andreas Rottmann <a.rottmann@gmx.at>
X-Spam-Score: -4.9 (----)
Cc: pika-dev@nongnu.org
X-BeenThere: pika-dev@nongnu.org
X-Mailman-Version: 2.1.2
Precedence: list
List-Id: <pika-dev.nongnu.org>
List-Unsubscribe: <http://mail.nongnu.org/mailman/listinfo/pika-dev>,
	<mailto:pika-dev-request@nongnu.org?subject=unsubscribe>
List-Archive: <http://mail.gnu.org/pipermail/pika-dev>
List-Post: <mailto:pika-dev@nongnu.org>
List-Help: <mailto:pika-dev-request@nongnu.org?subject=help>
List-Subscribe: <http://mail.nongnu.org/mailman/listinfo/pika-dev>,
	<mailto:pika-dev-request@nongnu.org?subject=subscribe>
X-List-Received-Date: Mon, 26 Jan 2004 17:56:31 -0000

Matthew Dempsky <jivera@flame.org> writes:

> Tom Lord <lord@emf.net> writes:
>
>>     > From: Andreas Rottmann <a.rottmann@gmx.at>
>>
>>     > I just did a little bit of valgrinding of eceval, and found two memory
>>     > bugs. A fix for those is in pika-scm--integration--0.1--patch-1, in my
>>     > Archive (http://yi.org/rotty/Software#gnuarch).
>>
>> Matthew should take that since the code it fixes hasn't been merged
>> yet from his archive.
>
> Yeah, I'm looking at the bugs he pointed out now... unfortunately the
> lexer fix isn't as trivial a fix as he implemented it with -- it
> breaks the test cases.
>
My bad. I ran the test cases after the GC fix, but only tried if
eceval would work with my lexer fix...

Andy
-- 
Andreas Rottmann         | Rotty@ICQ      | 118634484@ICQ | a.rottmann@gmx.at
http://yi.org/rotty      | GnuPG Key: http://yi.org/rotty/gpg.asc
Fingerprint              | DFB4 4EB4 78A4 5EEE 6219  F228 F92F CFC5 01FD 5B62

Any technology not indistinguishable from magic is insufficiently advanced.
   -- Terry Pratchett



From MAILER-DAEMON Mon Jan 26 13:15:45 2004
Received: from list by monty-python.gnu.org with archive (Exim 4.24)
	id 1AlBGz-0002GO-DT
	for mharc-pika-dev@gnu.org; Mon, 26 Jan 2004 13:15:45 -0500
Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.24)
	id 1AlBGx-0002FS-8x
	for pika-dev@nongnu.org; Mon, 26 Jan 2004 13:15:43 -0500
Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.24)
	id 1AlBGQ-00028s-Fo
	for pika-dev@nongnu.org; Mon, 26 Jan 2004 13:15:41 -0500
Received: from [129.110.10.12] (helo=smtp1.utdallas.edu)
	by monty-python.gnu.org with esmtp (Exim 4.24) id 1AlBGQ-00028k-3m
	for pika-dev@nongnu.org; Mon, 26 Jan 2004 13:15:10 -0500
Received: from kaiser (unknown [10.23.10.121])
	by smtp1.utdallas.edu (Postfix) with ESMTP id BACAE388EC8;
	Mon, 26 Jan 2004 12:15:09 -0600 (CST)
Received: from jivera by kaiser with local (Exim 3.35 #1 (Debian))
	id 1Al4ii-0003GW-00; Mon, 26 Jan 2004 12:15:56 +0100
To: Andreas Rottmann <a.rottmann@gmx.at>
Subject: Re: [Pika-dev] Memory fixes
References: <87fze27oua.fsf@alice.rotty.yi.org>
	<200401261630.IAA24854@morrowfield.regexps.com>
	<87vfmzf1mx.fsf@flame.org> <87ektm61dq.fsf@alice.rotty.yi.org>
From: Matthew Dempsky <jivera@flame.org>
Date: Mon, 26 Jan 2004 12:15:56 +0100
In-Reply-To: <87ektm61dq.fsf@alice.rotty.yi.org> (Andreas Rottmann's message
	of "Mon, 26 Jan 2004 18:55:13 +0100")
Message-ID: <87k73fez9v.fsf@flame.org>
User-Agent: Gnus/5.1006 (Gnus v5.10.6) Emacs/21.3 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Sender: Matthew Dempsky <jivera@utdallas.edu>
Cc: pika-dev@nongnu.org
X-BeenThere: pika-dev@nongnu.org
X-Mailman-Version: 2.1.2
Precedence: list
List-Id: <pika-dev.nongnu.org>
List-Unsubscribe: <http://mail.nongnu.org/mailman/listinfo/pika-dev>,
	<mailto:pika-dev-request@nongnu.org?subject=unsubscribe>
List-Archive: <http://mail.gnu.org/pipermail/pika-dev>
List-Post: <mailto:pika-dev@nongnu.org>
List-Help: <mailto:pika-dev-request@nongnu.org?subject=help>
List-Subscribe: <http://mail.nongnu.org/mailman/listinfo/pika-dev>,
	<mailto:pika-dev-request@nongnu.org?subject=subscribe>
X-List-Received-Date: Mon, 26 Jan 2004 18:15:43 -0000

Andreas Rottmann <a.rottmann@gmx.at> writes:

> My bad. I ran the test cases after the GC fix, but only tried if
> eceval would work with my lexer fix...

Don't worry about it -- I found a solution.

-jivera



From MAILER-DAEMON Mon Jan 26 19:28:37 2004
Received: from list by monty-python.gnu.org with archive (Exim 4.24)
	id 1AlH1O-00043A-7H
	for mharc-pika-dev@gnu.org; Mon, 26 Jan 2004 19:24:02 -0500
Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.24)
	id 1AlH17-0003v3-G7
	for pika-dev@nongnu.org; Mon, 26 Jan 2004 19:23:45 -0500
Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.24)
	id 1AlGzT-0003B6-7s
	for pika-dev@nongnu.org; Mon, 26 Jan 2004 19:22:35 -0500
Received: from [65.234.195.150] (helo=morrowfield.regexps.com)
	by monty-python.gnu.org with esmtp (Exim 4.24) id 1AlGvJ-0001u0-Go
	for pika-dev@nongnu.org; Mon, 26 Jan 2004 19:17:46 -0500
Received: (from lord@localhost)
	by morrowfield.regexps.com (8.9.1/8.9.1) id QAA26434;
	Mon, 26 Jan 2004 16:31:59 -0800 (PST)
	(envelope-from lord@morrowfield.regexps.com)
Date: Mon, 26 Jan 2004 16:31:59 -0800 (PST)
Message-Id: <200401270031.QAA26434@morrowfield.regexps.com>
From: Tom Lord <lord@emf.net>
To: pika-dev@nongnu.org
Subject: [Pika-dev] proposed srfi for extended character sets
X-BeenThere: pika-dev@nongnu.org
X-Mailman-Version: 2.1.2
Precedence: list
List-Id: <pika-dev.nongnu.org>
List-Unsubscribe: <http://mail.nongnu.org/mailman/listinfo/pika-dev>,
	<mailto:pika-dev-request@nongnu.org?subject=unsubscribe>
List-Archive: <http://mail.gnu.org/pipermail/pika-dev>
List-Post: <mailto:pika-dev@nongnu.org>
List-Help: <mailto:pika-dev-request@nongnu.org?subject=help>
List-Subscribe: <http://mail.nongnu.org/mailman/listinfo/pika-dev>,
	<mailto:pika-dev-request@nongnu.org?subject=subscribe>
X-List-Received-Date: Tue, 27 Jan 2004 00:23:54 -0000


<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
<html>
  <head>
    <title>SRFI ?: Permitting and Supporting  Extended Character Sets</title>
  </head>

  <body>

<H1>Title</H1>

Permitting and Supporting  Extended Character Sets

<H1>Author</H1>

Thomas Lord (<code>lord@emf.net</code> aka <code>lord@gnu.org</code>)

<H1>Abstract</H1>

<p>This SRFI describes how to modify the <i>Revised Report</i> (<a
href="http://www.schemers.org/Documents/Standards/R5RS/">R5RS</a>) in
order to enable conforming implementations to use an extended
character set such as (but not limited to) <a
href="http://www.unicode.org">Unicode</a>.


<p>Changes to some requirements of the report are recommended.
Currently, the <i>Revised Report</i> contains requirements which are
difficult or impossible to satisfy with some extended character sets.

<p>New required procedures are proposed, specified, and included
in the reference implementation.  These procedures enable portable
Scheme programs to manipulate Scheme source texts and source data
accurately, even in implementations using extended character sets.

<p>This SRFI concludes with some suggestions for implementors
interested in providing good Unicode support, using these suggestions
to illustrate how the proposed changes to the <i>Revised Report</i> can "play
out" in Unicode-based Scheme.

<p>This SRFI does <b>not</b> attempt to provide a comprehensive
library for global text processing.   For example, one issue in global
text processing is the need for linguistically-sensitive,
locale-sensitive procedures for sorting strings.   Such procedures are
beyond the scope of this SRFI.    On the other hand, by making Scheme
compatible with extended character sets, this SRFI is a step in the
direction of permitting global text processing standard libraries to
be developed in a form portable across all conforming implementations.

<p>This SRFI does <b>not</b> propose that implementations be required
to support Unicode or any other extended character set.  It does not
specify a representation for Unicode characters or strings.  It
<b>does</b> revise the specifications of the report so that
<code>char?</code> values <i>may be</i> Unicode (or other) characters.

<p>The reference implementation included should prove to be easily
ported to and effective for all ASCII-only implementations and for
many implementations using an 8-bit character set which is an
extension of ASCII (it will require very minor modifications for each
particular implementation).  Other implementations may need to use a
different implementation.



<H1>Issues</H1>

The reference implementation is currently untested.


<H1>Rationale</H1>

<p>The current edition of the <i>Revised Report</i> effectively defines a
<i>portable character set</i> for Scheme.  Portable programs should be
expressed using only these characters in their source text, character
constants, and string constants:

<pre>
        alphabetic letters:    a..z  A..Z

        digits:                0..9

        punctuation:           ( ) # ' ` , @ . " 
                               ; $ % & * / : + -
                               ^ _ ~ \ &lt; = &gt; ?

        whitespace:            newline space
</pre>

<p>In what follows, we will often be considering what happens if a
particular implementation permits additional characters.   Most
importantly, are we able to write <i>portable</i> Scheme programs that
behave reasonably even when running on an implementation that uses an
extended character set?


<H2>Problems With <code>char?</code>, <code>string?</code>, and
<code>symbol?</code></H2>

<p>The <i>Revised Report</i> imposes some structural requirements on
the <code>char?</code>, <code>string?</code>, and <code>symbol?</code>
types, relating these to the syntax of Scheme data representations.
For example, it contains requirements about case-mappings of alphabetic
characters.  The primary importance of the structural requirements in
the context of the report is that they enable portable, "metacircular"
Scheme programs.  For example, the structural requirements make it
possible to write a portable Scheme program which can accurately
implement a version of the procedure <code>read</code> which is able
to read data written using only the portable character set.

<p>There are problems with the structural requirements.

<p><b><i>The case-mapping problem:</i></b> The <i>Revised Report</i>'s
requirements for case mapping can not be satisfied for some extended
character sets.  For example, the requirements state that for a
<code>char-alphabetic?</code> character the procedure
<code>char-upcase</code> <i>must</i> return an uppercase character.
Yet for a character set containing the alphabetic character eszett (or
"lowercase sharp S"), that requirement can not necessarily be
satisfied in a pleasing way (if at all).

<p><b><i>The portable reader problem:</i></b> The existing character
class predicates such as <code>char-alphabetic?</code> are
insufficient for recognizing which extended characters may be part of
an identifier.

<p><b><i>The identifier equality and canonicalization problem:</i></b>
The case mapping and string comparison functions provided by the
<i>Revised Report</i> are insufficient for computing whether two
identifier names differ only by case distinctions.  They are not
suitable for converting an identifier name into the name of the symbol
that would yield if read by the native <code>read</code> procedure of
an implementation using an extended character set.

<p><b><i>The identifier concatenation problem:</i></b> The <i>Revised
Report</i> provides only <code>string-append</code> for deriving a new
identifier name by concatenating two more existing identifier names.
Unfortunately, <code>string-append</code> is an inappropriate
operation for concatenating identifiers which may use an extended
character set (as, for example, when sandhi rules apply).

<p><b><i>The character and string constant problem</i></b> The
<i>Revised Report</i> provides a syntax for character and string
constants however, it does not specify how that syntax should be
extended for larger character sets and does not provide sufficient
mechanism for a program to convert a character or string source form
to an internal representation if the source form contains or refers to
extended characters.

<p>Several of those problems (<i>portable reader</i>, <i>identifier
equality and canonicalization</i>, <i>identifier concatenation</i>,
and <i>string and character constants</i>) could be grouped into a
larger, more general category: <b><i>the metacircularity
problem</i></b>.  This SRFI is based in part on the presumption that
one should be able to write a portable Scheme program which can
accurately read and manipulate source texts in any implementation,
even if those source texts contain characters specific to that
implementation.


<H1>Specification</H1>

<p>The specification is divided into two parts.

<p>The first part, <b>Changes to the <i>Revised Report</i></b>,
describes how the report should be modified to permit extended
character sets.

<p>The second part, <b>New Procedures</b>, specifies the new
procedures defined by this report and included in the reference
implementation.  Because these procedures can not be implemented in a
way that is portable to all systems using extended character sets, and
because they are essential for solving the <b><i>metacircularity
problem</i></b>, the author recommends that these procedures be
included in future editions of the <i>Revised Report</i> as required
procedures.



<H2>Changes to the <i>Revised Report</i></H2>

<H3>Chapter 2, Introduction:</H3>

<p>Rather than:

<blockquote>Upper and lower case forms of a letter are never distinguished
except within character and string constants. For example, Foo is the
same identifier as FOO, and #x1AB is the same number as
#X1ab.</blockquote>

say:

<blockquote>Case distinctions are not significant except within
character and string constants. For example, Foo is the same
identifier as FOO, and #x1AB is the same number as #X1ab.</blockquote>

<p><i><b>Rationale:</b> The corrected text is consistent with what was
apparently intended however it is more appropriate for extended
character sets because in some systems using extended character sets,
ignoring distinctions between upper and lower forms of the letters in
a string is not the same thing as ignoring case distinctions in the
string.</i>


<H3>Section 6.3.3, Symbols:</H3> 

<p>The specification of <code>symbol->string</code> says:

<blockquote>Returns the name of <i>symbol</i> as a string. If the
symbol was part of an object returned as the value of a literal
expression (section 4.1.2) or by a call to the <code>read</code>
procedure, and its name contains alphabetic characters, then the
string returned will contain characters in the implementation's
preferred standard case -- some implementations will prefer upper
case, others lower case. If the symbol was returned by
<code>string->symbol</code>, the case of characters in the string
returned will be the same as the case in the string that was passed to
<code>string->symbol</code>. It is an error to apply mutation
procedures like <code>string-set!</code> to strings returned by this
procedure.</blockquote>

<p>It should say:

<blockquote>Returns the name of <i>symbol</i> as a string. If the
symbol was part of an object returned as the value of a literal
expression (section 4.1.2) or by a call to the <code>read</code>
procedure, its name will be in the implementation's preferred standard
case -- some implementations will prefer upper case, others lower
case. If the symbol was returned by <code>string->symbol</code>, the
string returned will be <code>string=?<code> to the string that was
passed to <code>string->symbol</code>. It is an error to apply
mutation procedures like <code>string-set!</code> to strings returned
by this procedure.</blockquote>

<p><i><b>Rationale:</b> (see previous).</i>

<H3>Section 6.3.4, Characters:</H3> 

<h4>character constant syntax</h4>

<p>The specification of character syntax says:

<blockquote>
<i>[...]</i> If <code>&lt;character&gt;</code> in
<code>#\&lt;character&gt;</code> is alphabetic, then the character
following &lt;character&gt; must be a delimiter character such as a
space or parenthesis.
</blockquote>

It should say: 

<blockquote>
<i>[...]</i> If <code>&lt;character&gt;</code> in
<code>#\&lt;character&gt;</code> is not one of the characters:

<pre>
        digits:                0..9

        punctuation:           ( ) # ' ` , @ . " 
                               ; $ % & * / : + -
                               ^ _ ~ \ &lt; = &gt; ?

        whitespace:            newline space
</pre>

then the character following &lt;character&gt; must be a delimiter
character such as a space or parenthesis.
</blockquote>

<p><i><b>Rationale:</b> For the portable character set, this change to
the <i>Revised Report</i> makes no difference -- the meaning is the
same.  However, this change makes it possible for a character name to
consist of more than one ideographic (hence non-alphabetic) character
without creating an ambiguous syntax.</i>


<h4>character order</h4>

<p>The specification of <code>char&lt;?</code> and related procedures 
says:

<blockquote>
<ul>
<li>The upper case characters are in order. For example, <code>(char&lt;? #\A #\B)</code> returns <code>#t</code>. 
<li> The lower case characters are in order. For example, <code>(char&lt;? #\a #\b)</code> returns <code>#t</code>. 
<li> The digits are in order. For example, <code>(char&lt;? #\0 #\9)</code> returns <code>#t</code>. 
<li> Either all the digits precede all the upper case letters, or vice versa. 
<li> Either all the digits precede all the lower case letters, or vice versa. 
</ul>
</blockquote>

<p>It should say:

<blockquote>
<ul>

<li>The upper case characters <code>A..Z</code> are in order. For
    example, <code>(char&lt;? #\A #\B)</code> returns <code>#t</code>.
    However, implementations may provide additional upper case letters
    which are not in order.

<li>The lower case characters <code>a..z</code> are in order. For
    example, <code>(char&lt;? #\a #\b)</code> returns
    <code>#t</code>. However, implementations may provide additional
    lower case letters which are not in order.

<li>The digits <code>0..9</code> are in order. For example,
    <code>(char&lt;? #\0 #\9)</code> returns <code>#t</code>.
    However, implementations may provide additional digits which are
    not in order.

<li>Either all the digits <code>0..9</code> precede the upper case
    letters <code>A..Z</code>, or vice versa.

<li>Either all the digits <code>0..9</code> precede the lower case
    letters <code>a..z</code>, or vice versa.

</ul>
</blockquote>


<p><i><b>Rationale:</b> The changes permit implementations to use the
"natural" ordering of an extended character set so long as that order
is consistent with the order required for the small set portable
characters.  For example, a Unicode implementation might order
characters by their assigned codepoint values -- but that would result
in (extended character set) upper case letters that follow
<code>a..z</code> while <code>A..Z</code> precede
<code>a..z</code>.</i>


<h4>character classes</h4>

<p>With regard to character class predicates such as
<code>char-alphabetic?</code> the <i>Revised Report</i> says:

<blockquote>
These procedures return <code>#t</code> if their arguments are
alphabetic, numeric, whitespace, upper case, or lower case characters,
respectively, otherwise they return <code>#f</code>.  The following
remarks, which are specific to the ASCII character set, are intended
only as a guide: The alphabetic characters are the 52 upper and lower
case letters. The numeric characters are the ten decimal digits. The
whitespace characters are space, tab, line feed, form feed, and
carriage return.
</blockquote>

It should instead say:

<blockquote>
These procedures return <code>#t</code> if their arguments are
alphabetic, numeric, whitespace, upper case, or lower case characters,
respectively, otherwise they return <code>#f</code>.  The characters
<code>a..z</code> and <code>A..Z</code> must be alphabetic.  The
digits <code>0..9</code> must be numeric.  Space and newline must be
whitespace.

<p>The procedure <code>read</code>, the syntax accepted by a
particular implementation, and the procedure
<code>char-whitespace?</code> must all agree about whitespace
characters.  For example, if a character causes
<code>char-whitespace?</code> to return <code>#t</code>, then that
character must serve as a delimiter.
</blockquote>

<p><i><b>Rationale:</b> Most of the guidance formerly provided
regarding ASCII should really apply to the portable character set.
This enables portable Scheme programs to use these procedures in a
parser for Scheme data that consists only of portable characters.
The new requirement for <code>char-whitespace?</code> allows a
portable Scheme program to recognize the same set of whitespace
delimiters as its host implementation.</i>

<h4>character case-mapping</h4>

<p>With regard to case-mapping, the specification of
<code>char-upcase</code> and <code>char-upcase</code> says:

<blockquote>
These procedures return a character <code>char<sub>2</sub></code> such
that <code>(char-ci=? char char<sub>2</sub>)</code>. In addition, if
<code>char</code> is alphabetic, then the result of
<code>char-upcase</code> is upper case and the result of
<code>char-downcase</code> is lower case.
</blockquote>

<p>It should say

<blockquote>

These procedures return a character <code>char<sub>2</sub></code> such
that <code>(char-ci=? char char<sub>2</sub>)</code>. In addition, 
<code>char-upcase</code> must map <code>a..z</code> to
<code>A..Z</code> and <code>char-downcase</code> must map
<code>A..Z</code> to <code>a..z</code>.
</blockquote>

<p><i><b>Rationale:</b> In some extended character sets, not all
lowercase alphabetic characters have a corresponding uppercase
character and not all uppercase alphabetic characters have a
corresponding lowercase letter.   This change recognizes that while
preserving the required behavior of these procedures for the portable
character set.</i>


<H3>Section 6.3.5, Strings:</H3> 

The introduction to strings says:

<blockquote>
Some of the procedures that operate on strings ignore the difference
between upper and lower case. The versions that ignore case have
``-ci'' (for ``case insensitive'') embedded in their names.
</blockquote>

<p>It should say:

<blockquote>
Some of the procedures that operate on strings ignore the difference
between strings in which upper and lower case variants of the same
character occur in corresponding positions. The versions that ignore case
have ``-ci'' (for ``case insensitive'') embedded in their names.
</blockquote>

<p><i><b>Rationale:</b> The string ordering predicates, in general,
are based on a lexical ordering induced by the constituent characters
and their order of appearance within the strings.  At the same time,
"case insensitive string comparison" has a different meaning
linguistically -- a character-based lexical ordering is not
appropriate.  This change simply makes it clear that the simple
character-wise lexical ordering is the one intended.   For example,
this change emphasizes that <code>string-ci=?</code> may be portably
and correctly implemented in terms of <code>char-ci=?</code>.
</i>



<H2>New Procedures</H2>

<p>This SRFI proposes the addition of a new section to the <i>Revised
Report</i>, <b>6.6.5 Parsing Scheme Data</b>, requiring
the functions specified below.

<p><u>procedure:</u><code>(string->character <i>string</i>)</code>
<blockquote>
If the string formed by <code>(string-append "#\\"
<i>string</i>)</code>, if suitably delimited, would be read by
<code>read</code> as a character constant, then return the character
it denotes.  Otherwise, return <code>#f</code>.
</blockquote>

<p><u>procedure:</u><code>(string->string <i>string</i>)</code>
<blockquote> If the string formed by <code>(string-append "\""
<i>string</i> "\"")</code> would be read by <code>read</code> as a
string constant, then return a string which is <code>string=?</code>
to the string it denotes.  Otherwise, return <code>#f</code>.
</blockquote>

<p><u>procedure:</u><code>(string->symbol-name <i>string</i>)</code>
<blockquote> If <code><i>string</i></code> would, if suitably
delimited, be read by <code>read</code> as an identifier, then return
a string which is <code>string=?</code> to what would be returned by
<code>symbol->string</code> for that symbol.  Otherwise, return
<code>#f</code>.
</blockquote>

<p><u>procedure:</u><code>(form-identifier <i>string<sub>1</sub></i> ...)</code>
<blockquote> The arguments must be <i>valid identifiers</i> (see
below).

<p>This procedure should return a valid identifier (conceptually)
formed by concatenating the arguments, then making any adjustments
necessary to form a valid identifier.

<p><code>form-identifier</code> must preserve the following invariant
for all arguments for which it is defined:

<pre>
    (string=? (apply form-identifier (map string->symbol-name <i>s<sub>1</sub></i> ...))
              (string->symbol-name (form-identifier <i>s<sub>1</sub></i> ...)))
    => #t
</pre>

<p>A <i>valid identifier</i> for these purposes is any string for
which <code>string->symbol-name</code> would not return false.
</blockquote>


<p><u>procedure:</u><code>(char-delimiter? <i>char</i>)</code>
<blockquote> Return <code>#t</code> if <code>read</code> would treat
<code><i>char</i></code> as a delimiter, <code>#f</code> otherwise.
</blockquote>

<p><i><b>New Procedures Rationale:</b> These procedures enable
programs to parse Scheme data that may use an extended
character set. Absent these or equivalent procedures, portable
programs can only parse Scheme data written only using the portable
character set.</i>


<H1>Illustrating a Unicode-based Scheme</H1>

<p>Let us suppose that one wanted to make a Scheme implementation with
two properties:

<p><b>Standard Scheme:</b>  The implementation should meet the
requirements of the latest edition of the <i>Revised Report</i>.

<p><b>Global Scheme:</b> The implementation should allow users to
write character constants, string constants, and identifier names in
their native language.   For example, German speaking users should be
free to use eszett in their identifier names and Chinese speaking
users should be free to use identifier names composed of ideographs.

<p>How might we do accomplish this?   Let's assume that the changes to
the <i>Revised Report</i> recommended above have been made.  This
sketch isn't the <i>only</i> way to do it --- just a reasonable way.

<p><b>Characters as Unicode codepoints</b> One natural approach to
take is to make each Unicode codepoint representable as a Scheme
<code>char?</code> value.  Absent the changes to the <i>Revised
Report</i> we could not easily do this -- for example, <i>R5RS</i>
requirements for the character ordering and case-mapping procedures
would be difficult to satisfy.  With the proposed changes, there is no
problem.

<p><b>Unicode <i>Best Practices</i> for Identifier Equivalence</b> Some of
the author's of the Unicode standard and related technical reports
have thought very hard about how decide <i>identifier equivalence</i>
in programming languages which ignore distinctions of case but allow
people to write identifier names in their native languages.  (For
example, see <a
href="http://www.unicode.org/reports/tr15/#Programming_Language_Identifiers">
Annex 7 ("Programming Language Identifiers") of Unicode Technical
Report 15 ("Unicode Normalization Forms")</a>.

<p>We can adopt those best practices for our Scheme fairly directly.
Most especially, the new procedure <code>string->string</code> reifies
our concept of identifier equality in a form that will allow portable
Scheme programs to access the identifier equality relation used by our
implementation.

<p><b>Character Constants and String Constants</b>  We can choose
whatever syntax we like for our extended character set Scheme, just so
long as it is consistent with the requirements for delimiters.
Portable programs can use procedures such as <code>string->char</code>
to access our extended namespace of characters.



<H1>Implementation</H1>

The enclosed implementation is suitable for a hypothetical Scheme
which supports <i>only</i> the portable character set.  The odds are
good that it will run correctly with only very minor modifications on
most other implementations.

<p>Ambitious implementations using extended character sets may need to
use a different implementation entirely.

<pre>

;;; SRFI-?? reference implementation

;;; WARNING UNTESTED CODE


(define (string->character s)
  (cond
    ((= 1 (string-length s))    (string-ref s 0))
    ((string-ci=? "newline" s)  #\newline)
    ((string-ci=? "space" s)    #\space)
    (#t                         #f)))


(define (string->string s)
  (let loop ((todo              (string->list s))
             (rev-output        '()))

     (cond
       ((null? todo)
        (apply string (reverse rev-output)))

       ((not (char=? #\\ (car todo)))   
         (loop (cdr todo) (cons (car todo) rev-output)))

       ((or (null? (cdr todo))
            (not (char=? #\\ (cadr todo))))
        (error "ill formed string"))

       (#t
        (loop (cddr todo) (cons #\\ rev-output))))))

(define (string->symbol-name s)
  (if (char=? #\a (string-ref (symbol-name 'A) 0))
      (apply string (map char-downcase (string->list s)))
      (apply string (map char-upcase (string->list s)))))

(define (form-identifier . strings)
  (apply string-append strings))

(define (char-delimiter? c)
  (or (char-whitespace? c)
      (not (not (memv c '(#\( #\) #\" #\;))))))
</pre>


<H1>Copyright</H1>
Copyright (C) Thomas Lord (2004). All Rights Reserved. 
<p>
This document and translations of it may be copied and furnished to
others, and derivative works that comment on or otherwise explain it
or assist in its implementation may be prepared, copied, published and
distributed, in whole or in part, without restriction of any kind,
provided that the above copyright notice and this paragraph are
included on all such copies and derivative works. However, this
document itself may not be modified in any way, such as by removing
the copyright notice or references to the Scheme Request For
Implementation process or editors, except as needed for the purpose of
developing SRFIs in which case the procedures for copyrights defined
in the SRFI process must be followed, or as required to translate it
into languages other than English.
<p>
The limited permissions granted above are perpetual and will not be
revoked by the authors or their successors or assigns.
<p>
This document and the information contained herein is provided on an
"AS IS" basis and THE AUTHOR AND THE SRFI EDITORS DISCLAIM ALL
WARRANTIES, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY
WARRANTY THAT THE USE OF THE INFORMATION HEREIN WILL NOT INFRINGE ANY
RIGHTS OR ANY IMPLIED WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A
PARTICULAR PURPOSE.


    <hr>
    <address>Editor: <a href="mailto:srfi-editors@srfi.schemers.org">Dave Mason</a></address>
<!-- Created: Tue Sep 29 19:20:08 EDT 1998 -->
<!-- hhmts start -->
Last modified: Sat Oct  9 17:43:25 EDT 1999
<!-- hhmts end -->
  </body>
</html>

<!-- arch-tag: Tom Lord Mon Jan 26 16:27:21 2004 (scm/=strings.srfi)
-->



From MAILER-DAEMON Tue Jan 27 12:47:42 2004
Received: from list by monty-python.gnu.org with archive (Exim 4.24)
	id 1AlXJO-0008Np-CJ
	for mharc-pika-dev@gnu.org; Tue, 27 Jan 2004 12:47:42 -0500
Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.24)
	id 1AlXJL-0008Mb-F9
	for pika-dev@nongnu.org; Tue, 27 Jan 2004 12:47:39 -0500
Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.24)
	id 1AlXIk-0008DI-Md
	for pika-dev@nongnu.org; Tue, 27 Jan 2004 12:47:33 -0500
Received: from [204.152.189.135] (helo=kechara.flame.org)
	by monty-python.gnu.org with esmtp (TLSv1:DES-CBC3-SHA:168)
	(Exim 4.24) id 1AlXFy-0007M4-EX
	for pika-dev@nongnu.org; Tue, 27 Jan 2004 12:44:10 -0500
Received: (qmail 28489 invoked by uid 323); 27 Jan 2004 17:44:04 -0000
Date: 27 Jan 2004 17:44:04 -0000
Message-ID: <20040127174404.2718.qmail@kechara.flame.org>
From: jivera@flame.org
To: pika-dev@nongnu.org
Subject: [Pika-dev] strings fix for hackerlab
X-BeenThere: pika-dev@nongnu.org
X-Mailman-Version: 2.1.2
Precedence: list
List-Id: <pika-dev.nongnu.org>
List-Unsubscribe: <http://mail.nongnu.org/mailman/listinfo/pika-dev>,
	<mailto:pika-dev-request@nongnu.org?subject=unsubscribe>
List-Archive: <http://mail.gnu.org/pipermail/pika-dev>
List-Post: <mailto:pika-dev@nongnu.org>
List-Help: <mailto:pika-dev-request@nongnu.org?subject=help>
List-Subscribe: <http://mail.nongnu.org/mailman/listinfo/pika-dev>,
	<mailto:pika-dev-request@nongnu.org?subject=subscribe>
X-List-Received-Date: Tue, 27 Jan 2004 17:47:40 -0000

I've implemented some rudimentary string functionality in Pika now,
but for the test cases to pass (or even terminate) I needed to patch a
simple copy/paste bug in hackerlab.  The patch is available from
jivera@flame.org--2004/hackerlab--strings--1.0--patch-1

-jivera



From MAILER-DAEMON Tue Jan 27 22:49:07 2004
Received: from list by monty-python.gnu.org with archive (Exim 4.24)
	id 1AlghO-0005ok-Rr
	for mharc-pika-dev@gnu.org; Tue, 27 Jan 2004 22:49:06 -0500
Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.24)
	id 1AlghM-0005od-O6
	for pika-dev@nongnu.org; Tue, 27 Jan 2004 22:49:04 -0500
Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.24)
	id 1Alggq-0005k3-2V
	for pika-dev@nongnu.org; Tue, 27 Jan 2004 22:49:03 -0500
Received: from [65.234.195.150] (helo=morrowfield.regexps.com)
	by monty-python.gnu.org with esmtp (Exim 4.24) id 1Alggp-0005k0-7A
	for pika-dev@nongnu.org; Tue, 27 Jan 2004 22:48:31 -0500
Received: (from lord@localhost)
	by morrowfield.regexps.com (8.9.1/8.9.1) id UAA09100;
	Tue, 27 Jan 2004 20:02:38 -0800 (PST)
	(envelope-from lord@morrowfield.regexps.com)
Date: Tue, 27 Jan 2004 20:02:38 -0800 (PST)
Message-Id: <200401280402.UAA09100@morrowfield.regexps.com>
From: Tom Lord <lord@emf.net>
To: jivera@flame.org
In-reply-to: <20040127174404.2718.qmail@kechara.flame.org> (jivera@flame.org)
Subject: Re: [Pika-dev] strings fix for hackerlab
References: <20040127174404.2718.qmail@kechara.flame.org>
Cc: pika-dev@nongnu.org
X-BeenThere: pika-dev@nongnu.org
X-Mailman-Version: 2.1.2
Precedence: list
List-Id: <pika-dev.nongnu.org>
List-Unsubscribe: <http://mail.nongnu.org/mailman/listinfo/pika-dev>,
	<mailto:pika-dev-request@nongnu.org?subject=unsubscribe>
List-Archive: <http://mail.gnu.org/pipermail/pika-dev>
List-Post: <mailto:pika-dev@nongnu.org>
List-Help: <mailto:pika-dev-request@nongnu.org?subject=help>
List-Subscribe: <http://mail.nongnu.org/mailman/listinfo/pika-dev>,
	<mailto:pika-dev-request@nongnu.org?subject=subscribe>
X-List-Received-Date: Wed, 28 Jan 2004 03:49:05 -0000



    > From: jivera@flame.org

    > I've implemented some rudimentary string functionality in Pika now,
    > but for the test cases to pass (or even terminate) I needed to patch a
    > simple copy/paste bug in hackerlab.  The patch is available from
    > jivera@flame.org--2004/hackerlab--strings--1.0--patch-1

Your fixes are merged and pushed as my hackerlab--devo--1.0--patch-31

Thanks,
-t




From MAILER-DAEMON Thu Jan 29 12:32:03 2004
Received: from list by monty-python.gnu.org with archive (Exim 4.24)
	id 1AmG18-0001Ql-O6
	for mharc-pika-dev@gnu.org; Thu, 29 Jan 2004 12:31:50 -0500
Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.24)
	id 1AmG15-0001Oh-R0
	for pika-dev@nongnu.org; Thu, 29 Jan 2004 12:31:47 -0500
Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.24)
	id 1AmG0Z-0001E9-M7
	for pika-dev@nongnu.org; Thu, 29 Jan 2004 12:31:46 -0500
Received: from [65.234.195.150] (helo=morrowfield.regexps.com)
	by monty-python.gnu.org with esmtp (Exim 4.24)
	id 1AmFzx-0000oq-DA; Thu, 29 Jan 2004 12:30:37 -0500
Received: (from lord@localhost)
	by morrowfield.regexps.com (8.9.1/8.9.1) id JAA15969;
	Thu, 29 Jan 2004 09:45:12 -0800 (PST)
	(envelope-from lord@morrowfield.regexps.com)
Date: Thu, 29 Jan 2004 09:45:12 -0800 (PST)
Message-Id: <200401291745.JAA15969@morrowfield.regexps.com>
From: Tom Lord <lord@emf.net>
To: gnu-arch-users@gnu.org, pika-dev@nongnu.org
Cc: 
Subject: [Pika-dev] Funding Drive
X-BeenThere: pika-dev@nongnu.org
X-Mailman-Version: 2.1.2
Precedence: list
List-Id: <pika-dev.nongnu.org>
List-Unsubscribe: <http://mail.nongnu.org/mailman/listinfo/pika-dev>,
	<mailto:pika-dev-request@nongnu.org?subject=unsubscribe>
List-Archive: <http://mail.gnu.org/pipermail/pika-dev>
List-Post: <mailto:pika-dev@nongnu.org>
List-Help: <mailto:pika-dev-request@nongnu.org?subject=help>
List-Subscribe: <http://mail.nongnu.org/mailman/listinfo/pika-dev>,
	<mailto:pika-dev-request@nongnu.org?subject=subscribe>
X-List-Received-Date: Thu, 29 Jan 2004 17:31:48 -0000


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

(This is part of a two part message.   The second half
 is called "NPO Time?" and is posted separately.)


Well, it's yet another one of those exciting times for the arch
project, financially speaking.  Among the currently overdue bills are
$181 for electricity, $120 for ISP services, and $120 for water....
and I have about $150 in the bank for the two of us and our cat to
live on until the next expected check -- mid-February for $500.

I must make the usual hat-passing appeal but I'd like to do it a bit
differently this time because the arch project is growing and
spreading, more people are becoming more seriously involved, and my
role in the project is gradually changing.

Financially speaking, the arch project operates on a simple principle:
the project publishes excellent and useful free software which you are
free to download, use, modify, and redistribute.   The project keeps
the community in touch with a lively discussion forum.   What I ask in
return is that from time to time, users ask themselves how valuable
the project is to them and, if they are able, to provide the project
with a measure of that value in the form of a cash donation.

I think that's an excellent deal -- an excellent "model", if you will
for how free software research and development can be funded.  No user
is _required_ to pay.  No user is asked to pay more than they can
afford.  No user is denied use of the software or participation in the
project for not paying.  The direct contribution model is efficient
because it "cuts out the middlemen" -- funding directly supports
further R&D.  And the system is especially affordable for users when
compared to "seat fees", "support contracts", and the other systems of
"metered software costs" found in commercial projects.

Contributions from private individuals are (as always) extremely
welcome, however, I'd like to dedicate today's appeal to a different
group -- and with a new goal.  I'm certainly not discouraging personal
contributions: I suspect they're still needed.  They've kept me alive
for quite a while now.  The more the merrier and thank you, thank you,
thank you.  

But it also seems to me that the project is reaching a stage in
development, popularity, and impact, where it becomes appropriate for
me to look beyond personal charity, and beyond the current informal
structure of the project.

Therefore, today's appeal is especially directed at those users whose
interest in arch is related to commercial activity.  There are at
least a small number of companies who are either already using arch
internally, or who are conducting pilot efforts to figure out how to
use arch internally, or who are supporting their employees while those
employees are exploring arch.  There are also beginning to be
contractors who are working with arch as part of their jobs.   It's
this group of users I'd like to especially appeal to today.

I'm asking those of you with a commercial interest in arch, either
individually or via your organization, to make a contribution today.
I suggest that you pick an amount on a self-assessed sliding scale of,
say, $50 to $500.

Because of the current circumstances, that's an /URGENT/ request.
Time is of the essence.  The count-down to "lights off" on this end is
proceeding quite rapidly.  I encourage the use of paypal right now
simply because in most cases, that's the most rapid route for turning
contributions into bill payments.

To the degree that this appeal is successful, I'd like to give
something new back to the community and to the financial supporters of
arch.  In particular, I'd like to expand the funding model I've been
using for arch.  I hope to formalize it legally in the form of a
non-profit, charitable organization.  I hope to extend the model so
that funding flows to other arch engineer's besides just me.  I hope
to apply the model to other software in addition to arch.   

I'll need the community's help to accomplish those goals.  In addition
to just (literally) "keeping the lights on" here at Arch Central, I'll
need to raise a little bit seed money.  I'll need to find officers to
help run the organization (California law requires 3) and pay the
incorporation fees.  And I'll need to work out with the most active
technical contributors to arch how funding should best flow.  I've
written more on those topics in a followup message to this one.

For now, though, the need is urgent and immediate.  Every little bit
helps.  

Paypal link:

  https://www.paypal.com/xclick/business=lord%40emf.net&item_name=support+for+arch+and+other+free+software+efforts+by+tom+lord&no_note=1&tax=0&currency_code=USD

and Moneybookers info:

  lord@emf.net for www.moneybookers.com payments.


I thought I'd leave off in this message with a brief summary of what's
been going in arch and related projects lately -- to give a better
sense of how contributions turn into R&D.

So what's up with arch?   What's been going on?

* reviewing and merging contributions

  Nearly all of the new code in the 1.2preX series (so far) is
  _contributed_ code.  The quantity and quality of contributed code
  continues to rise.  Arch has crossed a kind of project-lifetime
  milestone:  the contributed code to arch has begun to consistently
  exceed what I could create personally.

  My role seems to have clearly shifted, recently, from "primary
  hacker" to "primary gatekeeper".  I'm finding that arch is starting
  to proceed faster if I spend less time writing new code for it
  myself, and more time giving advise about, reviewing, testing and
  merging contributions.   Not as fast as some contributors would
  like, I'm sure -- but at what I judge to be "the right speed."

  The "gatekeeper" role is an interesting one.  I've found it
  important to say "no" to some contributions when testing revealed
  them problematic; other contributions when they damage portability
  or code cleanliness; other contributions when they would create
  "architectural" problems in arch.  This has worked out quite well in
  some cases when, after the "no", the contributors go back and fix
  the problems and their corrected work is later merged.



* designing process improvements

  As the size of the user community and the number of code
  contributors has grown, some weaknesses in the engineering process
  that creates arch releases have become apparent.

  Coordination with code contributors has proven to be a little too ad
  hoc -- a little too "the squeaky wheel gets the grease".

  The Savannah bug tracker, while arguably better than nothing, has
  proven to be an inefficient way to keep track of pending issues.
  It's an awkward tool and a bottleneck to development.   It's
  impossible to tune well for the kinds of "patch flows" that are best
  for the arch project.

  Therefore, I proposed "The Game" -- a new combination of practices
  and tools for running the arch project, and, eventually, other
  projects as well.

  As I write this, contributors have been working on designing and
  implementing the needed tools and I think prospects are good that
  we'll be able to move the project to "The Game" style of management 
  before too long.



* ancillary tools

  Quite independently of anything that _I_ work on, some contributors
  continue to work on "ancillary tools" such as front ends, shell
  completion support, browsers, and cvs gateways.  The gnu-arch-users
  mailing list is showing signs of success at helping those projects
  get off the ground by attracting users and contributors.



* advocacy

  Again, quite independently of anything I do, a number of community
  members have become arch advocates: giving talks to LUGs (Linux user
  groups) and, in one case, giving an _award_winning_session_ about
  arch at the "linux.conf.au" conference (congratulations to Robert
  Collins and his team!).



* security feature initiatives

  After the infamous security crack of the FSF's free software project
  host, savannah.gnu.org, I was contacted by the FSF and asked how
  hard it would be to add cryptographic signing features to arch.  The
  crack created a crisis, of sorts, for Savannah because it raised the
  possibility that CVS archives of hosted projects had been corrupted
  by the introduction of malicious code.  

  Indeed, exactly such an attempt has recently been made on the CVS
  archive hosted by BitMover for the Linux Kernel -- malicious code
  was indeed injected.  _That_ attack quickly failed, however, when
  the integrity checking features of Bitkeeper noticed and reported
  the problem.

  And so, I concluded, such integrity checking features are _vital_
  for arch.   

  I posted a design proposal for such features and some interesting
  results followed.   First, the design received careful study and
  criticism from the community who did, indeed, find bugs.  Second,
  the corrected design was quickly implemented by volunteers -- I
  needed to make only modest corrections before merging it.

  It was not more than a couple of weeks between the FSF's initial
  inquiry and the appearance of the features in arch.   Arch is now
  one of the most securable revision control systems in existence.


* a new project

  In addition to my work on arch, I've started a new project called
  "Pika Scheme".

  The goal is to build a portable Scheme implementation, with (among
  other features) excellent Unicode support, good support for systems
  programming on Posix-family systems, and a flexible and robust FFI
  that will enable Pika to evolve flexibly with respect to its
  implementation strategy (such as VM implementation and GC strategy).

  The long term goal is to build a Scheme suitable for applications
  like "itla" (a sophisticated interactive front-end for arch) and a
  Scheme-based, internationalized, GUI-intensive version of Emacs.

  I initially published just two things:  some long design sketches
  and plans for how to build Pika, and a small amount of "starter
  code" -- just barely implementing the core of the core of the core
  of what will be Pika.

  To my delight and surprise, even though the project community is
  still small, already it has attracted active contributors who are
  completing the work far more rapidly than I could do alone.  The
  "lexer" and "reader" (for parsing Scheme data and code) has matured
  rapidly;  the support for numbers (including bignums, exact rational
  numbers, and complex numbers) is nearly done;  support for Unicode
  strings and characters is underway.

  And as spin-offs of Pika, I've begun work on some "SRFIs" (community
  standards for Scheme) to specify a portable interface to Unicode
  programming in Scheme.


So that's what's up lately at Arch Central.

I hope that some of you will find these activities worth paying for
even though nobody is obligated to do so.   That's the free software
funding model:  we invent new and great software which anyone can use;
users pay what they think it's worth and what they can afford;  and
the cycle (hopefully) continues.

As I said, Arch Central faces an urgent crisis at the moment -- and
I'd sure like to get past that.  In addition, I hope to better
formalize the arch funding model and you can read more about that in
my next message.

If you can, please help.   Those links again are:

Paypal link:

  https://www.paypal.com/xclick/business=lord%40emf.net&item_name=support+for+arch+and+other+free+software+efforts+by+tom+lord&no_note=1&tax=0&currency_code=USD

and Moneybookers info:

  lord@emf.net for www.moneybookers.com payments.


Thanks and yeehaw,
- -t

- ----------

"Fast forward a couple of years. Now the truly massive profit margins
 meant that just about any mistake and I mean any mistake, was completely
 masked by the awesome cash flow. Management succumbed to the cash flow
 drug and vainly assumed that it was their hard work, superior strategies
 and dizzying business acumen that was driving the company ever skyward.
 They thought they could do no wrong but they were. 

 They thought that t-shirts, purple furniture, jackets, unique building
 architecture, polo shirts, sabbaticals, watches and great product code
 names were the secret recipe for success." --Chad Carlin

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.2 (FreeBSD)

iD8DBQFAGUZsYiL4ten68SkRAjU0AJ9ARnnF7CRmRDz4nrBq7o1aeeDesQCfWHLz
QYbbKWFOqES5ZmWNeQBSWMQ=
=HyPO
-----END PGP SIGNATURE-----



From MAILER-DAEMON Thu Jan 29 12:33:17 2004
Received: from list by monty-python.gnu.org with archive (Exim 4.24)
	id 1AmG2W-0001pW-OR
	for mharc-pika-dev@gnu.org; Thu, 29 Jan 2004 12:33:16 -0500
Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.24)
	id 1AmG2S-0001nw-Vt
	for pika-dev@nongnu.org; Thu, 29 Jan 2004 12:33:12 -0500
Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.24)
	id 1AmG1m-0001dn-1B
	for pika-dev@nongnu.org; Thu, 29 Jan 2004 12:33:01 -0500
Received: from [199.232.41.8] (helo=mx20.gnu.org)
	by monty-python.gnu.org with esmtp (TLSv1:DES-CBC3-SHA:168)
	(Exim 4.24) id 1AmG17-0001P2-0p; Thu, 29 Jan 2004 12:31:49 -0500
Received: from [65.234.195.150] (helo=morrowfield.regexps.com)
	by mx20.gnu.org with esmtp (Exim 4.24)
	id 1AmG0Q-0005nw-QD; Thu, 29 Jan 2004 12:31:07 -0500
Received: (from lord@localhost)
	by morrowfield.regexps.com (8.9.1/8.9.1) id JAA15972;
	Thu, 29 Jan 2004 09:45:28 -0800 (PST)
	(envelope-from lord@morrowfield.regexps.com)
Date: Thu, 29 Jan 2004 09:45:28 -0800 (PST)
Message-Id: <200401291745.JAA15972@morrowfield.regexps.com>
From: Tom Lord <lord@emf.net>
To: gnu-arch-users@gnu.org, pika-dev@nongnu.org
Cc: 
Subject: [Pika-dev] NPO Time?
X-BeenThere: pika-dev@nongnu.org
X-Mailman-Version: 2.1.2
Precedence: list
List-Id: <pika-dev.nongnu.org>
List-Unsubscribe: <http://mail.nongnu.org/mailman/listinfo/pika-dev>,
	<mailto:pika-dev-request@nongnu.org?subject=unsubscribe>
List-Archive: <http://mail.gnu.org/pipermail/pika-dev>
List-Post: <mailto:pika-dev@nongnu.org>
List-Help: <mailto:pika-dev-request@nongnu.org?subject=help>
List-Subscribe: <http://mail.nongnu.org/mailman/listinfo/pika-dev>,
	<mailto:pika-dev-request@nongnu.org?subject=subscribe>
X-List-Received-Date: Thu, 29 Jan 2004 17:33:15 -0000


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1


Revenues are not exactly "through the roof" for the arch project.
As I mentioned in my previous message, I'm struggling to just (quite
literally) keep the lights on here at Arch Central.   (Links are given
at the end of this message that you can use to help!)

Nevertheless:  arch is growing in users and contributors.   The
informal implementation of the current funding model is proving to be
an obstacle for some would-be contributors.   The number of people
contributing significant _labor_ to arch is on the rise and it is
critical to include such contributors in the funding model.   And,
looking beyond arch, there are other worthy projects to fund as well.

Therefore, I'd like to set a fund-raising goal for the arch project --
and an institutional goal.

The institutional goal is that I would like to create a new
non-for-profit, charitable organization whose role is to fund arch and
some other free software research and development projects.

The fund-raising goal is that I would like to raise enough money to
"seed" such an organization: to pay the legal fees for creating it; to
facilitate finding and recruiting the executives; to sustain
operations for at least a short initial period; and to help bootstrap
the technical, public relations, and fund-raising processes to keep
the organization going.

Creating a charitable NPO will be a boon for donors: at least in the
United States, they'll be able to receive a tax credit for their
donations.

Creating a charitable NPO makes good legal and public policy sense:
arch and other free software projects create a _public_good_ -- anyone
can benefit from what these projects create.   Donors to these
projects are not contracting for services:  they're recognizing the
value of these projects and saying "please keep up the good work."
The charitable NPO legal structure was created for exactly this kind
of situation -- both in letter and in spirit.

Creating a charitable NPO is a first step towards rewarding technical
contributors.  It seems to me that a funding model for free software
R&D must ultimately match donations to labor.  While it will always be
true that some people will contribute to arch for their own
commercial, charitable, or hobbyist reasons -- others will continue to
contribute out of technical interest combined with a kind of faith
that "down the road", their work might be recognized and rewarded.  A
legally formal funding organization will have the opportunity to
create policies for sharing funding with good technical contributors
whose work should be rewarded.

I don't want to propose, at this time, a full "charter" for the
proposed organization.   Those matters must wait to be decided by the
executive committee in cooperation with the community.

I do want set out some guidelines:

* What will make this NPO different from existing charitable
  organizations such as linuxfund.org and pubsoft.org?

  Those organizations are aimed at being general purpose "clearing
  houses" for funding free software R&D.  They attempt to match
  project proposals, which anyone may submit, to funding bids.

  In contrast, the NPO I propose will be more tightly focused on a few
  specific projects.  It will not allow just anyone to post a project
  proposal.  It will have an (evolving) "technical mission" and the
  projects it funds must fit into that mission.   

  Part of of the goal of the NPO I propose will be to hire engineers
  for their general skills -- to employ them in a variety of projects
  rather than to contract with "project proposers" to hit a specific
  milestone.  I'd like my NPO to evolve much more in the style of an
  R&D lab than a funding clearing house -- to inspire donors to
  contribute to a technical _culture_ rather than cherry-picking
  short-term project needs.

  The primary argument in favor of the "clearing house" approach is
  one of efficiency: by specializing in administering the acceptance
  and distribution of charitable contributions, they can reduce the
  overhead costs of those activities.  But there are two problems with
  that theory: first, the overhead costs are not _that_ high to begin
  with; second, the clearing houses do not seem to be operating at
  high volume, even after having been in business for a substantial
  time.


* What will make this NPO different from existing charitable
  organizations such as the Free Software Foundation?

  The Free Software Foundation sometimes helps to fund specific R&D
  projects but this is not their primary focus or mission.  These days
  they are far more active in equally important areas such as free
  software advocacy.   To the extent that they have a technical goal
  it is a vague one.   To the extent that they employ engineers, it is
  more often to work on maintaining vital FSF infrastructure than to 
  work on free software R&D.

  I hope that the NPO I propose can have a productive and mutually
  rewarding relationship with the FSF -- but I think there is a need
  for a new IPO that focuses more on R&D than on advocacy.



* What will this NPO look like?   Will it resemble an R&D lab?

  Yes, my intention is that this NPO _resemble_ and R&D lab.

  I believe that we will:

  ~ need to make a priority of communicating results through
    publication and software distributions

  ~ have a clearly articulated and evolving "mission" defining a 
    framework into which projects fit

  ~ develop an internal _culture_:  long term relationships among
    the programmer-researchers working their;  relationships that
    transcend the lifetimes of individual projects;  relationships
    that help to create a culture and well-spring of creativity

  However, I think that this organization should also _differ_ from
  traditional commercial R&D labs.  In particular:

  ~ academic credentials are not a priority.   Hiring, for example,
    will not be limited to PhDs wth publication records

  ~ academic publication is not a priority.  I believe strongly in 
    the rigor of peer review and the importance of publication.
    However, the focus of this organization being on _practical_ R&D
    rather than on research that advances the frontiers of theoretical
    computer science, academic publications are not a critical forum
    to target.   We will be much more interested in reaching the 
    free software community of individuals and businesses than on 
    reaching the halls of academia.



* Why will donors pay?

  I believe that donors can be inspired to pay because doing so 
  will be a cost-effective means for pursuing their self-interests.

  Some donors will want to pay just because they want to help build
  a world in which all software is free software.

  Some donors will want to pay because the NPO produces software of
  substantial value to them -- donations can be well below the
  cost of commercial licensing or support fees yet sufficient to 
  ensure that "the good stuff keeps flowing".

  Some donors will want to pay out of an entrepreneurial spirit.
  They'll reason that if the NPO accomplishes some of its published 
  technical goals, then that will create opportunities for economic 
  growth.



* What will be the technical focus of this lab?

  In terms of individual projects:

  Arch will play a critical role, initially.  Partly this is because
  it is an established project, just at the inflection point of its
  spread and impact.   Partly also because it is a good tool which the
  lab itself can use for other projects.

  I _hope_ that Pika Scheme will be a focus, but it is not my place to
  insist on that at this time.  In relation to Pika Scheme, I might
  also propose "itla" (a highly friendly, self-documenting, extensible,
  interactive front end to arch).

  In terms of the overarching mission:

  I think it would be foolish of me to try to draft a mission
  statement in isolation.

  If I have a chance to sit around a table with the founders of this
  NPO, when it's my time to go to the whiteboard and right down my
  first initial idea, I'll write something like:

	A radically simplified, "faster-cheaper-better" interactive
        computing environment for end-users, built with particular
        attention to making that environment easy for _programmers_ to
        extend.  What Emacs was to programming environments for
        TTY-based applications, I want my environment to be for modern
        environments.  What the Macintosh was for users of Apples,
        early IBM-PCs, and TRS-80s, I want my environment to be for
        modern users.



* How much money do you need?

  I was hoping you'd ask that.

  Unfortunately, the honest answer has to be: "Uh....I'm not sure."

  Personally, I need several hundred bucks just to catch up on bills
  and a small multiple of that would sure increase my comfort-level
  and give me a little room to breath.

  Fees for filing for NPO status are pretty cheap.

  Recruiting executives and seed funding?   I'm not an expert in those
  matters.   I can only (wildly) guess -- so I won't.   Other
  successful NPOs have grown from pretty small seeds, though setting a
  record in that regard isn't one of my goals.



* You say you need to catch up on bills?

  Yes.   Things like water bills, electricity, and ISP services.

  As I said, Arch Central faces an urgent crisis at the moment -- and
  I'd sure like to get past that.  In addition, I hope to better
  formalize the arch funding model as described above.

  If you can, please help.   Those links again are:

  Paypal link:

    https://www.paypal.com/xclick/business=lord%40emf.net&item_name=support+for+arch+and+other+free+software+efforts+by+tom+lord&no_note=1&tax=0&currency_code=USD

  and Moneybookers info:

    lord@emf.net for www.moneybookers.com payments.


Cheers,
- -t
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.2 (FreeBSD)

iD8DBQFAGUZ0YiL4ten68SkRAshdAJ9KhFwjY2UKmgJBn9IOyB8V83ZHcwCfXmRx
zsOuFoNyOEESftlrZ/lpL5o=
=qR30
-----END PGP SIGNATURE-----



From MAILER-DAEMON Thu Jan 29 14:07:18 2004
Received: from list by monty-python.gnu.org with archive (Exim 4.24)
	id 1AmHVV-00006u-U7
	for mharc-pika-dev@gnu.org; Thu, 29 Jan 2004 14:07:17 -0500
Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.24)
	id 1AmHVT-00005r-Rb
	for pika-dev@nongnu.org; Thu, 29 Jan 2004 14:07:15 -0500
Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.24)
	id 1AmHUw-0008OD-Ss
	for pika-dev@nongnu.org; Thu, 29 Jan 2004 14:07:14 -0500
Received: from [204.152.189.135] (helo=kechara.flame.org)
	by monty-python.gnu.org with esmtp (TLSv1:DES-CBC3-SHA:168)
	(Exim 4.24) id 1AmHRZ-0007Je-6C
	for pika-dev@nongnu.org; Thu, 29 Jan 2004 14:03:13 -0500
Received: (qmail 3339 invoked by uid 323); 29 Jan 2004 19:03:11 -0000
Date: 29 Jan 2004 19:03:11 -0000
Message-ID: <20040129190311.19935.qmail@kechara.flame.org>
From: jivera@flame.org
To: pika-dev@nongnu.org
Subject: [Pika-dev] Dropping the \U+xxxx. syntax for unicode characters in
	strings
X-BeenThere: pika-dev@nongnu.org
X-Mailman-Version: 2.1.2
Precedence: list
List-Id: <pika-dev.nongnu.org>
List-Unsubscribe: <http://mail.nongnu.org/mailman/listinfo/pika-dev>,
	<mailto:pika-dev-request@nongnu.org?subject=unsubscribe>
List-Archive: <http://mail.gnu.org/pipermail/pika-dev>
List-Post: <mailto:pika-dev@nongnu.org>
List-Help: <mailto:pika-dev-request@nongnu.org?subject=help>
List-Subscribe: <http://mail.nongnu.org/mailman/listinfo/pika-dev>,
	<mailto:pika-dev-request@nongnu.org?subject=subscribe>
X-List-Received-Date: Thu, 29 Jan 2004 19:07:16 -0000

After having implemented the "\(...)" syntax for string embedding
(where that whole substring gets replaced by the character represented
by "#\..."), I'd like to recommend the "\U+xxxx." syntax for Unicode
characters be dropped in favour of the above mentioned syntax --
i.e. "\U+10A." would instead be written as "\(U+10A)".  

Rationale: reuse of character lexing code, less complicated logic
(only one syntax for multi-character escapes), and less error prone
syntax (I wouldn't have noticed the . in the \U+xxxx. syntax if
someone had not pointed it out on srfi-50).

Thougts?

-jivera



From MAILER-DAEMON Thu Jan 29 14:48:08 2004
Received: from list by monty-python.gnu.org with archive (Exim 4.24)
	id 1AmI92-0007gF-Fc
	for mharc-pika-dev@gnu.org; Thu, 29 Jan 2004 14:48:08 -0500
Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.24)
	id 1AmI8y-0007dj-PO
	for pika-dev@nongnu.org; Thu, 29 Jan 2004 14:48:04 -0500
Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.24)
	id 1AmI8M-0007Mp-Sy
	for pika-dev@nongnu.org; Thu, 29 Jan 2004 14:47:58 -0500
Received: from [65.234.195.150] (helo=morrowfield.regexps.com)
	by monty-python.gnu.org with esmtp (Exim 4.24) id 1AmI8L-0007LS-LV
	for pika-dev@nongnu.org; Thu, 29 Jan 2004 14:47:26 -0500
Received: (from lord@localhost)
	by morrowfield.regexps.com (8.9.1/8.9.1) id MAA16877;
	Thu, 29 Jan 2004 12:01:49 -0800 (PST)
	(envelope-from lord@morrowfield.regexps.com)
Date: Thu, 29 Jan 2004 12:01:49 -0800 (PST)
Message-Id: <200401292001.MAA16877@morrowfield.regexps.com>
From: Tom Lord <lord@emf.net>
To: jivera@flame.org
In-reply-to: <20040129190311.19935.qmail@kechara.flame.org> (jivera@flame.org)
Subject: Re: [Pika-dev] Dropping the \U+xxxx. syntax for unicode characters in
	strings
References: <20040129190311.19935.qmail@kechara.flame.org>
Cc: pika-dev@nongnu.org
X-BeenThere: pika-dev@nongnu.org
X-Mailman-Version: 2.1.2
Precedence: list
List-Id: <pika-dev.nongnu.org>
List-Unsubscribe: <http://mail.nongnu.org/mailman/listinfo/pika-dev>,
	<mailto:pika-dev-request@nongnu.org?subject=unsubscribe>
List-Archive: <http://mail.gnu.org/pipermail/pika-dev>
List-Post: <mailto:pika-dev@nongnu.org>
List-Help: <mailto:pika-dev-request@nongnu.org?subject=help>
List-Subscribe: <http://mail.nongnu.org/mailman/listinfo/pika-dev>,
	<mailto:pika-dev-request@nongnu.org?subject=subscribe>
X-List-Received-Date: Thu, 29 Jan 2004 19:48:06 -0000


    > From: jivera@flame.org

    > After having implemented the "\(...)" syntax for string embedding
    > (where that whole substring gets replaced by the character represented
    > by "#\..."), I'd like to recommend the "\U+xxxx." syntax for Unicode
    > characters be dropped in favour of the above mentioned syntax --
    > i.e. "\U+10A." would instead be written as "\(U+10A)".  

    > Rationale: reuse of character lexing code, less complicated logic
    > (only one syntax for multi-character escapes), and less error prone
    > syntax (I wouldn't have noticed the . in the \U+xxxx. syntax if
    > someone had not pointed it out on srfi-50).

    > Thougts?

I think you are exactly right.   I will update the draft for "SRFI ?:
Scheme Characters as (Extended) Unicode Codepoints" accordingly.

-t




From MAILER-DAEMON Fri Jan 30 07:59:18 2004
Received: from list by monty-python.gnu.org with archive (Exim 4.24)
	id 1AmYEv-0007ie-Dn
	for mharc-pika-dev@gnu.org; Fri, 30 Jan 2004 07:59:17 -0500
Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.24)
	id 1AmYEr-0007gJ-RJ
	for pika-dev@nongnu.org; Fri, 30 Jan 2004 07:59:13 -0500
Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.24)
	id 1AmYEK-0007UW-7N
	for pika-dev@nongnu.org; Fri, 30 Jan 2004 07:59:11 -0500
Received: from [213.165.64.20] (helo=mail.gmx.net)
	by monty-python.gnu.org with smtp (Exim 4.24) id 1AmYEJ-0007U2-Bx
	for pika-dev@nongnu.org; Fri, 30 Jan 2004 07:58:39 -0500
Received: (qmail 6840 invoked by uid 65534); 30 Jan 2004 12:58:36 -0000
Received: from chello212186006140.401.14.univie.teleweb.at (EHLO garibaldi)
	(212.186.6.140)
	by mail.gmx.net (mp004) with SMTP; 30 Jan 2004 13:58:36 +0100
X-Authenticated: #3102804
Received: from ivanova.rhinosaur.lan ([192.168.1.9] helo=ivanova)
	by garibaldi with esmtp (Exim 4.30) id 1AmYDn-0004Vi-HJ
	for pika-dev@nongnu.org; Fri, 30 Jan 2004 13:58:07 +0100
Received: from andy by ivanova with local (Exim 4.30) id 1AmYDm-0002eF-V1
	for pika-dev@nongnu.org; Fri, 30 Jan 2004 13:58:06 +0100
To: Pika Developers <pika-dev@nongnu.org>
From: Andreas Rottmann <a.rottmann@gmx.at>
Date: Fri, 30 Jan 2004 13:58:06 +0100
Message-ID: <873c9x61b5.fsf@alice.rotty.yi.org>
User-Agent: Gnus/5.1006 (Gnus v5.10.6) Emacs/21.3 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Sender: Andreas Rottmann <a.rottmann@gmx.at>
X-Spam-Score: -4.9 (----)
Subject: [Pika-dev] Guile FFI wrapper
X-BeenThere: pika-dev@nongnu.org
X-Mailman-Version: 2.1.2
Precedence: list
List-Id: <pika-dev.nongnu.org>
List-Unsubscribe: <http://mail.nongnu.org/mailman/listinfo/pika-dev>,
	<mailto:pika-dev-request@nongnu.org?subject=unsubscribe>
List-Archive: <http://mail.gnu.org/pipermail/pika-dev>
List-Post: <mailto:pika-dev@nongnu.org>
List-Help: <mailto:pika-dev-request@nongnu.org?subject=help>
List-Subscribe: <http://mail.nongnu.org/mailman/listinfo/pika-dev>,
	<mailto:pika-dev-request@nongnu.org?subject=subscribe>
X-List-Received-Date: Fri, 30 Jan 2004 12:59:15 -0000

Hi!

I just wanted to note that I have started a FFI wrapper for Guile,
exposing the Pika FFI. I expect to have it ready so far that it can
run eceval sometime next week.

Cheers, Andy
-- 
Andreas Rottmann         | Rotty@ICQ      | 118634484@ICQ | a.rottmann@gmx.at
http://yi.org/rotty      | GnuPG Key: http://yi.org/rotty/gpg.asc
Fingerprint              | DFB4 4EB4 78A4 5EEE 6219  F228 F92F CFC5 01FD 5B62

Any technology not indistinguishable from magic is insufficiently advanced.
   -- Terry Pratchett



From MAILER-DAEMON Sat Jan 31 11:58:49 2004
Received: from list by monty-python.gnu.org with archive (Exim 4.24)
	id 1AmySH-00029k-72
	for mharc-pika-dev@gnu.org; Sat, 31 Jan 2004 11:58:49 -0500
Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.24)
	id 1AmySF-00026n-3N
	for pika-dev@nongnu.org; Sat, 31 Jan 2004 11:58:47 -0500
Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.24)
	id 1AmyRh-00017v-WC
	for pika-dev@nongnu.org; Sat, 31 Jan 2004 11:58:46 -0500
Received: from [199.232.41.8] (helo=mx20.gnu.org)
	by monty-python.gnu.org with esmtp (TLSv1:DES-CBC3-SHA:168)
	(Exim 4.24) id 1AmyRU-0000eR-4F
	for pika-dev@nongnu.org; Sat, 31 Jan 2004 11:58:00 -0500
Received: from [129.110.10.12] (helo=smtp1.utdallas.edu)
	by mx20.gnu.org with esmtp (Exim 4.24) id 1AmyPU-00061i-BX
	for pika-dev@nongnu.org; Sat, 31 Jan 2004 11:55:56 -0500
Received: from kaiser (bluesocket.utdallas.edu [129.110.39.12])
	by smtp1.utdallas.edu (Postfix) with ESMTP id 9AE17388D42;
	Sat, 31 Jan 2004 10:55:53 -0600 (CST)
Received: from jivera by kaiser with local (Exim 3.35 #1 (Debian))
	id 1Amrrt-0001AZ-00; Sat, 31 Jan 2004 10:56:49 +0100
To: Andreas Rottmann <a.rottmann@gmx.at>
Subject: Re: [Pika-dev] Guile FFI wrapper
References: <873c9x61b5.fsf@alice.rotty.yi.org>
From: Matthew Dempsky <jivera@flame.org>
Date: Sat, 31 Jan 2004 10:56:49 +0100
In-Reply-To: <873c9x61b5.fsf@alice.rotty.yi.org> (Andreas Rottmann's message
	of "Fri, 30 Jan 2004 13:58:06 +0100")
Message-ID: <87smhw4f1a.fsf@flame.org>
User-Agent: Gnus/5.1006 (Gnus v5.10.6) Emacs/21.3 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Sender: Matthew Dempsky <jivera@utdallas.edu>
Cc: Pika Developers <pika-dev@nongnu.org>
X-BeenThere: pika-dev@nongnu.org
X-Mailman-Version: 2.1.2
Precedence: list
List-Id: <pika-dev.nongnu.org>
List-Unsubscribe: <http://mail.nongnu.org/mailman/listinfo/pika-dev>,
	<mailto:pika-dev-request@nongnu.org?subject=unsubscribe>
List-Archive: <http://mail.gnu.org/pipermail/pika-dev>
List-Post: <mailto:pika-dev@nongnu.org>
List-Help: <mailto:pika-dev-request@nongnu.org?subject=help>
List-Subscribe: <http://mail.nongnu.org/mailman/listinfo/pika-dev>,
	<mailto:pika-dev-request@nongnu.org?subject=subscribe>
X-List-Received-Date: Sat, 31 Jan 2004 16:58:47 -0000

Andreas Rottmann <a.rottmann@gmx.at> writes:

> Hi!
>
> I just wanted to note that I have started a FFI wrapper for Guile,
> exposing the Pika FFI. I expect to have it ready so far that it can
> run eceval sometime next week.

Nice.  Let me know how it goes or if you find any bugs with Pika in
the process.  Oh, and I didn't write the eceval code in the most
portable manner -- WITH_KONT(label) and KONTINUE should be fixed to
use scm_fixnum_to_number and scm_number_to_fixnum because I don't
think scm_make_fixnum and scm_fixnum_value are intended for use in the
portable FFI.  (I just committed eceval--devo--0.1--patch-2 to fix
this.)

-jivera



From MAILER-DAEMON Sat Jan 31 12:05:41 2004
Received: from list by monty-python.gnu.org with archive (Exim 4.24)
	id 1AmyY9-00063E-Pq
	for mharc-pika-dev@gnu.org; Sat, 31 Jan 2004 12:04:53 -0500
Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.24)
	id 1AmyY3-0005wb-I3
	for pika-dev@nongnu.org; Sat, 31 Jan 2004 12:04:47 -0500
Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.24)
	id 1AmyX8-0004xq-TH
	for pika-dev@nongnu.org; Sat, 31 Jan 2004 12:04:23 -0500
Received: from [213.165.64.20] (helo=mail.gmx.net)
	by monty-python.gnu.org with smtp (Exim 4.24) id 1AmyX6-0004qQ-J5
	for pika-dev@nongnu.org; Sat, 31 Jan 2004 12:03:48 -0500
Received: (qmail 18524 invoked by uid 65534); 31 Jan 2004 17:03:44 -0000
Received: from chello212186006140.401.14.univie.teleweb.at (EHLO garibaldi)
	(212.186.6.140)
	by mail.gmx.net (mp009) with SMTP; 31 Jan 2004 18:03:44 +0100
X-Authenticated: #3102804
Received: from ivanova.rhinosaur.lan ([192.168.1.9] helo=ivanova)
	by garibaldi with esmtp (Exim 4.30) id 1AmyWj-0001xA-Gs
	for pika-dev@nongnu.org; Sat, 31 Jan 2004 18:03:25 +0100
Received: from andy by ivanova with local (Exim 4.30) id 1AmyWi-0002Lu-WE
	for pika-dev@nongnu.org; Sat, 31 Jan 2004 18:03:24 +0100
To: Pika Developers <pika-dev@nongnu.org>
References: <873c9x61b5.fsf@alice.rotty.yi.org>
From: Andreas Rottmann <a.rottmann@gmx.at>
Date: Sat, 31 Jan 2004 18:03:24 +0100
In-Reply-To: <873c9x61b5.fsf@alice.rotty.yi.org> (Andreas Rottmann's message
	of "Fri, 30 Jan 2004 13:58:06 +0100")
Message-ID: <87ad442gpv.fsf@alice.rotty.yi.org>
User-Agent: Gnus/5.1006 (Gnus v5.10.6) Emacs/21.3 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Sender: Andreas Rottmann <a.rottmann@gmx.at>
X-Spam-Score: -4.9 (----)
Subject: [Pika-dev] Re: Guile FFI wrapper, t_scm_word ambiguity
X-BeenThere: pika-dev@nongnu.org
X-Mailman-Version: 2.1.2
Precedence: list
List-Id: <pika-dev.nongnu.org>
List-Unsubscribe: <http://mail.nongnu.org/mailman/listinfo/pika-dev>,
	<mailto:pika-dev-request@nongnu.org?subject=unsubscribe>
List-Archive: <http://mail.gnu.org/pipermail/pika-dev>
List-Post: <mailto:pika-dev@nongnu.org>
List-Help: <mailto:pika-dev-request@nongnu.org?subject=help>
List-Subscribe: <http://mail.nongnu.org/mailman/listinfo/pika-dev>,
	<mailto:pika-dev-request@nongnu.org?subject=subscribe>
X-List-Received-Date: Sat, 31 Jan 2004 17:04:51 -0000

Andreas Rottmann <a.rottmann@gmx.at> writes:

> Hi!
>
> I just wanted to note that I have started a FFI wrapper for Guile,
> exposing the Pika FFI. I expect to have it ready so far that it can
> run eceval sometime next week.
>
I started the wrapper anew, since I realized it would probably make
sense to plug Guile in as just another "rep", i.e. leaving libscm/
mostly intact an modifying the stuff in reps/ to be just a thin layer
above Guile.

So far, with a bit of preprocessor magic, this seems work really
well. However, since in libscm/words.h I have

typedef SCM t_scm_word;

And SCM is supposed to be opaque (and happens to be implemented as
pointer normally), I wondered if it wouldn't be appropriate to make
t_scm_word an opaque type too. ATM, t_scm_word is used both to denote
a "scheme value" and an unsigned integer (e.g. all the hash functions
return a t_scm_word). I had to replace these uses of t_scm_word with
t_ulong. So these options seem to exist:

1) Just s/t_scm_word/t_ulong/ where apropriate for the Guile Pika FFI,
   as I've done now and leave everything the same in the "real" Pika.

2) The same as 1), but the do the substitutions in "real" Pika.

3) Add a new typedef that replaces the t_scm_word in the places where
   it is used as plain integer.

I'd favor 2) or 3), although I havne't yet been able to think of an
appropriate name for 3).

Cheers, Andy
-- 
Andreas Rottmann         | Rotty@ICQ      | 118634484@ICQ | a.rottmann@gmx.at
http://yi.org/rotty      | GnuPG Key: http://yi.org/rotty/gpg.asc
Fingerprint              | DFB4 4EB4 78A4 5EEE 6219  F228 F92F CFC5 01FD 5B62

Python is executable pseudocode, Perl is executable line-noise.



From MAILER-DAEMON Sat Jan 31 13:21:09 2004
Received: from list by monty-python.gnu.org with archive (Exim 4.24)
	id 1Amzjw-0006iT-T8
	for mharc-pika-dev@gnu.org; Sat, 31 Jan 2004 13:21:08 -0500
Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.24)
	id 1Amzju-0006hu-1g
	for pika-dev@nongnu.org; Sat, 31 Jan 2004 13:21:06 -0500
Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.24)
	id 1AmzjN-0006bi-SG
	for pika-dev@nongnu.org; Sat, 31 Jan 2004 13:21:04 -0500
Received: from [129.110.10.12] (helo=smtp1.utdallas.edu)
	by monty-python.gnu.org with esmtp (Exim 4.24) id 1AmzjN-0006bb-Ft
	for pika-dev@nongnu.org; Sat, 31 Jan 2004 13:20:33 -0500
Received: from kaiser (bluesocket.utdallas.edu [129.110.39.12])
	by smtp1.utdallas.edu (Postfix) with ESMTP id C329F388C87;
	Sat, 31 Jan 2004 12:20:32 -0600 (CST)
Received: from jivera by kaiser with local (Exim 3.35 #1 (Debian))
	id 1AmtBp-0001Lt-00; Sat, 31 Jan 2004 12:21:29 +0100
To: Andreas Rottmann <a.rottmann@gmx.at>
Subject: Re: [Pika-dev] Re: Guile FFI wrapper, t_scm_word ambiguity
References: <873c9x61b5.fsf@alice.rotty.yi.org>
	<87ad442gpv.fsf@alice.rotty.yi.org>
From: Matthew Dempsky <jivera@flame.org>
Date: Sat, 31 Jan 2004 12:21:29 +0100
In-Reply-To: <87ad442gpv.fsf@alice.rotty.yi.org> (Andreas Rottmann's message
	of "Sat, 31 Jan 2004 18:03:24 +0100")
Message-ID: <87znc4cqiu.fsf@flame.org>
User-Agent: Gnus/5.1006 (Gnus v5.10.6) Emacs/21.3 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Sender: Matthew Dempsky <jivera@utdallas.edu>
Cc: Pika Developers <pika-dev@nongnu.org>
X-BeenThere: pika-dev@nongnu.org
X-Mailman-Version: 2.1.2
Precedence: list
List-Id: <pika-dev.nongnu.org>
List-Unsubscribe: <http://mail.nongnu.org/mailman/listinfo/pika-dev>,
	<mailto:pika-dev-request@nongnu.org?subject=unsubscribe>
List-Archive: <http://mail.gnu.org/pipermail/pika-dev>
List-Post: <mailto:pika-dev@nongnu.org>
List-Help: <mailto:pika-dev-request@nongnu.org?subject=help>
List-Subscribe: <http://mail.nongnu.org/mailman/listinfo/pika-dev>,
	<mailto:pika-dev-request@nongnu.org?subject=subscribe>
X-List-Received-Date: Sat, 31 Jan 2004 18:21:06 -0000

Andreas Rottmann <a.rottmann@gmx.at> writes:

> And SCM is supposed to be opaque (and happens to be implemented as
> pointer normally), I wondered if it wouldn't be appropriate to make
> t_scm_word an opaque type too. ATM, t_scm_word is used both to denote
> a "scheme value" and an unsigned integer (e.g. all the hash functions
> return a t_scm_word). I had to replace these uses of t_scm_word with
> t_ulong.

Ooh, I hadn't thought of that problem originally... (I think it's a
valid issue though.)

> So these options seem to exist:
>
> 1) Just s/t_scm_word/t_ulong/ where apropriate for the Guile Pika FFI,
>    as I've done now and leave everything the same in the "real" Pika.
>
> 2) The same as 1), but the do the substitutions in "real" Pika.
>
> 3) Add a new typedef that replaces the t_scm_word in the places where
>    it is used as plain integer.
>
> I'd favor 2) or 3), although I havne't yet been able to think of an
> appropriate name for 3).

I don't know how well it would work, but there's at least one more
alternative:

4) Leave t_scm_word as an unsigned long and cast to an SCM as
   appropriate in the Guile wrapper FFI.

That would at least leave the Guile/Pika FFI compatible with Pika's
until Tom can voice his thoughts.  In fact, it's really similar to how
Pika has scmx_pointer_value to cast a t_scm_word to a void *.

Seperating the uses of t_scm_word into integer and Pika value (choice
#3) seems the cleanest solution to me at least.  We have briefly
discussed on IRC the possibily of making a standard binary interface
for Pika libraries -- this would involve probably standardizing at
least that t_scm_words were the same size as an unsigned long or
something, but I think that's an issue can be orthogonal to this
problem.

-jivera



From MAILER-DAEMON Sat Jan 31 14:05:28 2004
Received: from list by monty-python.gnu.org with archive (Exim 4.24)
	id 1An0Qq-0004lU-5i
	for mharc-pika-dev@gnu.org; Sat, 31 Jan 2004 14:05:28 -0500
Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.24)
	id 1An0Qo-0004l9-8R
	for pika-dev@nongnu.org; Sat, 31 Jan 2004 14:05:26 -0500
Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.24)
	id 1An0QI-0004dI-8s
	for pika-dev@nongnu.org; Sat, 31 Jan 2004 14:05:25 -0500
Received: from [213.165.64.20] (helo=mail.gmx.net)
	by monty-python.gnu.org with smtp (Exim 4.24) id 1An0QH-0004d8-Em
	for pika-dev@nongnu.org; Sat, 31 Jan 2004 14:04:53 -0500
Received: (qmail 14223 invoked by uid 65534); 31 Jan 2004 18:58:12 -0000
Received: from chello212186006140.401.14.univie.teleweb.at (EHLO garibaldi)
	(212.186.6.140)
	by mail.gmx.net (mp002) with SMTP; 31 Jan 2004 19:58:12 +0100
X-Authenticated: #3102804
Received: from ivanova.rhinosaur.lan ([192.168.1.9] helo=ivanova)
	by garibaldi with esmtp (Exim 4.30) id 1An0Jg-00024K-OF
	for pika-dev@nongnu.org; Sat, 31 Jan 2004 19:58:04 +0100
Received: from andy by ivanova with local (Exim 4.30) id 1An0Jg-0003u5-IN
	for pika-dev@nongnu.org; Sat, 31 Jan 2004 19:58:04 +0100
To: Pika Developers <pika-dev@nongnu.org>
From: Andreas Rottmann <a.rottmann@gmx.at>
Date: Sat, 31 Jan 2004 19:58:04 +0100
Message-ID: <871xpg2ber.fsf@alice.rotty.yi.org>
User-Agent: Gnus/5.1006 (Gnus v5.10.6) Emacs/21.3 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Sender: Andreas Rottmann <a.rottmann@gmx.at>
X-Spam-Score: -4.9 (----)
Subject: [Pika-dev] Guile FFI: resizable vector problem
X-BeenThere: pika-dev@nongnu.org
X-Mailman-Version: 2.1.2
Precedence: list
List-Id: <pika-dev.nongnu.org>
List-Unsubscribe: <http://mail.nongnu.org/mailman/listinfo/pika-dev>,
	<mailto:pika-dev-request@nongnu.org?subject=unsubscribe>
List-Archive: <http://mail.gnu.org/pipermail/pika-dev>
List-Post: <mailto:pika-dev@nongnu.org>
List-Help: <mailto:pika-dev-request@nongnu.org?subject=help>
List-Subscribe: <http://mail.nongnu.org/mailman/listinfo/pika-dev>,
	<mailto:pika-dev-request@nongnu.org?subject=subscribe>
X-List-Received-Date: Sat, 31 Jan 2004 19:05:26 -0000


The next thing I ran into: Guile has dropped resizable vectors some
time ago. A rationale can be found in [0]. The argument seems sound to
me, so what about Pika -- won't resizable vectors yield the same
problem wrt to threading? For now, I'll just work around that by
making scm_set_n_vector_elts() create a new vector.

[0] http://mail.gnu.org/archive/html/guile-devel/2000-10/msg00049.html

Andy
-- 
Andreas Rottmann         | Rotty@ICQ      | 118634484@ICQ | a.rottmann@gmx.at
http://yi.org/rotty      | GnuPG Key: http://yi.org/rotty/gpg.asc
Fingerprint              | DFB4 4EB4 78A4 5EEE 6219  F228 F92F CFC5 01FD 5B62

Any technology not indistinguishable from magic is insufficiently advanced.
   -- Terry Pratchett



From MAILER-DAEMON Sat Jan 31 14:20:58 2004
Received: from list by monty-python.gnu.org with archive (Exim 4.24)
	id 1An0fp-0007YK-W3
	for mharc-pika-dev@gnu.org; Sat, 31 Jan 2004 14:20:57 -0500
Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.24)
	id 1An0fn-0007Y4-M3
	for pika-dev@nongnu.org; Sat, 31 Jan 2004 14:20:55 -0500
Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.24)
	id 1An0fH-0007P4-Oj
	for pika-dev@nongnu.org; Sat, 31 Jan 2004 14:20:54 -0500
Received: from [213.165.64.20] (helo=mail.gmx.net)
	by monty-python.gnu.org with smtp (Exim 4.24) id 1An0fH-0007Ou-AO
	for pika-dev@nongnu.org; Sat, 31 Jan 2004 14:20:23 -0500
Received: (qmail 8757 invoked by uid 65534); 31 Jan 2004 18:53:41 -0000
Received: from chello212186006140.401.14.univie.teleweb.at (EHLO garibaldi)
	(212.186.6.140)
	by mail.gmx.net (mp017) with SMTP; 31 Jan 2004 19:53:41 +0100
X-Authenticated: #3102804
Received: from ivanova.rhinosaur.lan ([192.168.1.9] helo=ivanova)
	by garibaldi with esmtp (Exim 4.30)
	id 1An0FH-000240-D2; Sat, 31 Jan 2004 19:53:31 +0100
Received: from andy by ivanova with local (Exim 4.30)
	id 1An0FH-0003u2-Aa; Sat, 31 Jan 2004 19:53:31 +0100
To: Matthew Dempsky <jivera@flame.org>
Subject: Re: [Pika-dev] Re: Guile FFI wrapper, t_scm_word ambiguity
References: <873c9x61b5.fsf@alice.rotty.yi.org>
	<87ad442gpv.fsf@alice.rotty.yi.org> <87znc4cqiu.fsf@flame.org>
From: Andreas Rottmann <a.rottmann@gmx.at>
Date: Sat, 31 Jan 2004 19:53:31 +0100
In-Reply-To: <87znc4cqiu.fsf@flame.org> (Matthew Dempsky's message of "Sat,
	31 Jan 2004 12:21:29 +0100")
Message-ID: <8765es2bmc.fsf@alice.rotty.yi.org>
User-Agent: Gnus/5.1006 (Gnus v5.10.6) Emacs/21.3 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Sender: Andreas Rottmann <a.rottmann@gmx.at>
X-Spam-Score: -4.9 (----)
Cc: Pika Developers <pika-dev@nongnu.org>
X-BeenThere: pika-dev@nongnu.org
X-Mailman-Version: 2.1.2
Precedence: list
List-Id: <pika-dev.nongnu.org>
List-Unsubscribe: <http://mail.nongnu.org/mailman/listinfo/pika-dev>,
	<mailto:pika-dev-request@nongnu.org?subject=unsubscribe>
List-Archive: <http://mail.gnu.org/pipermail/pika-dev>
List-Post: <mailto:pika-dev@nongnu.org>
List-Help: <mailto:pika-dev-request@nongnu.org?subject=help>
List-Subscribe: <http://mail.nongnu.org/mailman/listinfo/pika-dev>,
	<mailto:pika-dev-request@nongnu.org?subject=subscribe>
X-List-Received-Date: Sat, 31 Jan 2004 19:20:56 -0000

Matthew Dempsky <jivera@flame.org> writes:

> Andreas Rottmann <a.rottmann@gmx.at> writes:
>
>> And SCM is supposed to be opaque (and happens to be implemented as
>> pointer normally), I wondered if it wouldn't be appropriate to make
>> t_scm_word an opaque type too. ATM, t_scm_word is used both to denote
>> a "scheme value" and an unsigned integer (e.g. all the hash functions
>> return a t_scm_word). I had to replace these uses of t_scm_word with
>> t_ulong.
>
> Ooh, I hadn't thought of that problem originally... (I think it's a
> valid issue though.)
>
>> So these options seem to exist:
>>
>> 1) Just s/t_scm_word/t_ulong/ where apropriate for the Guile Pika FFI,
>>    as I've done now and leave everything the same in the "real" Pika.
>>
>> 2) The same as 1), but the do the substitutions in "real" Pika.
>>
>> 3) Add a new typedef that replaces the t_scm_word in the places where
>>    it is used as plain integer.
>>
>> I'd favor 2) or 3), although I havne't yet been able to think of an
>> appropriate name for 3).
>
> I don't know how well it would work, but there's at least one more
> alternative:
>
> 4) Leave t_scm_word as an unsigned long and cast to an SCM as
>    appropriate in the Guile wrapper FFI.
>
Yes, I thought about that, but I hope Tom will choose #2 or #3.

> That would at least leave the Guile/Pika FFI compatible with Pika's
> until Tom can voice his thoughts.  In fact, it's really similar to how
> Pika has scmx_pointer_value to cast a t_scm_word to a void *.
>
I'll just go on with approach #1 until some consens is reached.

> Seperating the uses of t_scm_word into integer and Pika value (choice
> #3) seems the cleanest solution to me at least.
>
That's my opinion, too.

Andy
-- 
Andreas Rottmann         | Rotty@ICQ      | 118634484@ICQ | a.rottmann@gmx.at
http://yi.org/rotty      | GnuPG Key: http://yi.org/rotty/gpg.asc
Fingerprint              | DFB4 4EB4 78A4 5EEE 6219  F228 F92F CFC5 01FD 5B62

Make free software, not war!



From MAILER-DAEMON Sat Jan 31 14:39:52 2004
Received: from list by monty-python.gnu.org with archive (Exim 4.24)
	id 1An0y7-0002v4-PM
	for mharc-pika-dev@gnu.org; Sat, 31 Jan 2004 14:39:51 -0500
Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.24)
	id 1An0y5-0002un-Q0
	for pika-dev@nongnu.org; Sat, 31 Jan 2004 14:39:49 -0500
Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.24)
	id 1An0xZ-0002nV-2V
	for pika-dev@nongnu.org; Sat, 31 Jan 2004 14:39:48 -0500
Received: from [199.232.41.8] (helo=mx20.gnu.org)
	by monty-python.gnu.org with esmtp (TLSv1:DES-CBC3-SHA:168)
	(Exim 4.24) id 1An0xY-0002lC-Qw
	for pika-dev@nongnu.org; Sat, 31 Jan 2004 14:39:16 -0500
Received: from [129.110.10.12] (helo=smtp1.utdallas.edu)
	by mx20.gnu.org with esmtp (Exim 4.24) id 1An0wh-0000D3-In
	for pika-dev@nongnu.org; Sat, 31 Jan 2004 14:38:23 -0500
Received: from kaiser (bluesocket.utdallas.edu [129.110.39.12])
	by smtp1.utdallas.edu (Postfix) with ESMTP id 89D92388DBE;
	Sat, 31 Jan 2004 13:37:52 -0600 (CST)
Received: from jivera by kaiser with local (Exim 3.35 #1 (Debian))
	id 1AmuOf-0002al-00; Sat, 31 Jan 2004 13:38:49 +0100
To: Andreas Rottmann <a.rottmann@gmx.at>
Subject: Re: [Pika-dev] Guile FFI: resizable vector problem
References: <871xpg2ber.fsf@alice.rotty.yi.org>
From: Matthew Dempsky <jivera@flame.org>
Date: Sat, 31 Jan 2004 13:38:48 +0100
In-Reply-To: <871xpg2ber.fsf@alice.rotty.yi.org> (Andreas Rottmann's message
	of "Sat, 31 Jan 2004 19:58:04 +0100")
Message-ID: <87smhwcmxz.fsf@flame.org>
User-Agent: Gnus/5.1006 (Gnus v5.10.6) Emacs/21.3 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Sender: Matthew Dempsky <jivera@utdallas.edu>
Cc: Pika Developers <pika-dev@nongnu.org>
X-BeenThere: pika-dev@nongnu.org
X-Mailman-Version: 2.1.2
Precedence: list
List-Id: <pika-dev.nongnu.org>
List-Unsubscribe: <http://mail.nongnu.org/mailman/listinfo/pika-dev>,
	<mailto:pika-dev-request@nongnu.org?subject=unsubscribe>
List-Archive: <http://mail.gnu.org/pipermail/pika-dev>
List-Post: <mailto:pika-dev@nongnu.org>
List-Help: <mailto:pika-dev-request@nongnu.org?subject=help>
List-Subscribe: <http://mail.nongnu.org/mailman/listinfo/pika-dev>,
	<mailto:pika-dev-request@nongnu.org?subject=subscribe>
X-List-Received-Date: Sat, 31 Jan 2004 19:39:50 -0000

Andreas Rottmann <a.rottmann@gmx.at> writes:

> The next thing I ran into: Guile has dropped resizable vectors some
> time ago. A rationale can be found in [0]. The argument seems sound to
> me, so what about Pika -- won't resizable vectors yield the same
> problem wrt to threading? For now, I'll just work around that by
> making scm_set_n_vector_elts() create a new vector.

Pika's FFI will handle resizable vectors and threading fine because
users never get pointers to the vector contents -- they can only do
vector-ref and vector-set! operations on them.

Having scm_set_n_vector_elts create a new vector and copy elements
would be the Right Thing to do for this.

-jivera



From MAILER-DAEMON Sat Jan 31 14:54:13 2004
Received: from list by monty-python.gnu.org with archive (Exim 4.24)
	id 1An1C0-0003de-GK
	for mharc-pika-dev@gnu.org; Sat, 31 Jan 2004 14:54:12 -0500
Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.24)
	id 1An1Bm-00039y-K1
	for pika-dev@nongnu.org; Sat, 31 Jan 2004 14:53:58 -0500
Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.24)
	id 1An1B1-0002Nt-6Z
	for pika-dev@nongnu.org; Sat, 31 Jan 2004 14:53:42 -0500
Received: from [213.165.64.20] (helo=mail.gmx.net)
	by monty-python.gnu.org with smtp (Exim 4.24) id 1An1B0-0002Mg-FB
	for pika-dev@nongnu.org; Sat, 31 Jan 2004 14:53:10 -0500
Received: (qmail 15208 invoked by uid 65534); 31 Jan 2004 19:53:09 -0000
Received: from chello212186006140.401.14.univie.teleweb.at (EHLO garibaldi)
	(212.186.6.140)
	by mail.gmx.net (mp002) with SMTP; 31 Jan 2004 20:53:09 +0100
X-Authenticated: #3102804
Received: from ivanova.rhinosaur.lan ([192.168.1.9] helo=ivanova)
	by garibaldi with esmtp (Exim 4.30)
	id 1An1Ao-00027r-PI; Sat, 31 Jan 2004 20:52:58 +0100
Received: from andy by ivanova with local (Exim 4.30)
	id 1An1Ao-0004NP-Mi; Sat, 31 Jan 2004 20:52:58 +0100
To: Matthew Dempsky <jivera@flame.org>
Subject: Re: [Pika-dev] Guile FFI: resizable vector problem
References: <871xpg2ber.fsf@alice.rotty.yi.org> <87smhwcmxz.fsf@flame.org>
From: Andreas Rottmann <a.rottmann@gmx.at>
Date: Sat, 31 Jan 2004 20:52:58 +0100
In-Reply-To: <87smhwcmxz.fsf@flame.org> (Matthew Dempsky's message of "Sat,
	31 Jan 2004 13:38:48 +0100")
Message-ID: <87wu7728v9.fsf@alice.rotty.yi.org>
User-Agent: Gnus/5.1006 (Gnus v5.10.6) Emacs/21.3 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable
Sender: Andreas Rottmann <a.rottmann@gmx.at>
X-Spam-Score: -4.9 (----)
Cc: Pika Developers <pika-dev@nongnu.org>
X-BeenThere: pika-dev@nongnu.org
X-Mailman-Version: 2.1.2
Precedence: list
List-Id: <pika-dev.nongnu.org>
List-Unsubscribe: <http://mail.nongnu.org/mailman/listinfo/pika-dev>,
	<mailto:pika-dev-request@nongnu.org?subject=unsubscribe>
List-Archive: <http://mail.gnu.org/pipermail/pika-dev>
List-Post: <mailto:pika-dev@nongnu.org>
List-Help: <mailto:pika-dev-request@nongnu.org?subject=help>
List-Subscribe: <http://mail.nongnu.org/mailman/listinfo/pika-dev>,
	<mailto:pika-dev-request@nongnu.org?subject=subscribe>
X-List-Received-Date: Sat, 31 Jan 2004 19:54:10 -0000

Matthew Dempsky <jivera@flame.org> writes:

> Andreas Rottmann <a.rottmann@gmx.at> writes:
>
>> The next thing I ran into: Guile has dropped resizable vectors some
>> time ago. A rationale can be found in [0]. The argument seems sound to
>> me, so what about Pika -- won't resizable vectors yield the same
>> problem wrt to threading? For now, I'll just work around that by
>> making scm_set_n_vector_elts() create a new vector.
>
> Pika's FFI will handle resizable vectors and threading fine because
> users never get pointers to the vector contents -- they can only do
> vector-ref and vector-set! operations on them.
>
> Having scm_set_n_vector_elts create a new vector and copy elements
> would be the Right Thing to do for this.
>
OK. Another thing: What about defining SCM_FEATURE_ macros, e.g.:


#define SCM_FEATURE_CHAR_BUCKYBITS 1 /* for Pika */
#define SCM_FEATURE_CHAR_BUCKYBITS 0 /* for Guile Pika FFI */

We can use those in the testcases, to check only for supported
features. This is also usable for applications that want to use the
Pika FFI and use features as available, but still stay portable across
the different FFI implementations.

Andy
--=20
Andreas Rottmann         | Rotty@ICQ      | 118634484@ICQ | a.rottmann@gmx.=
at
http://yi.org/rotty      | GnuPG Key: http://yi.org/rotty/gpg.asc
Fingerprint              | DFB4 4EB4 78A4 5EEE 6219  F228 F92F CFC5 01FD 5B=
62

Latein ist das humanoide =C3=84quivalent zu Fortran.
   -- Alexander Bartolich in at.linux



From MAILER-DAEMON Sat Jan 31 15:13:19 2004
Received: from list by monty-python.gnu.org with archive (Exim 4.24)
	id 1An1UU-00011p-N3
	for mharc-pika-dev@gnu.org; Sat, 31 Jan 2004 15:13:18 -0500
Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.24)
	id 1An1UR-00011J-0N
	for pika-dev@nongnu.org; Sat, 31 Jan 2004 15:13:15 -0500
Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.24)
	id 1An1Tt-0000nR-6U
	for pika-dev@nongnu.org; Sat, 31 Jan 2004 15:13:12 -0500
Received: from [65.234.195.93] (helo=morrowfield.regexps.com)
	by monty-python.gnu.org with esmtp (Exim 4.24) id 1An1Tr-0000nC-S5
	for pika-dev@nongnu.org; Sat, 31 Jan 2004 15:12:40 -0500
Received: (from lord@localhost)
	by morrowfield.regexps.com (8.9.1/8.9.1) id MAA28656;
	Sat, 31 Jan 2004 12:27:42 -0800 (PST)
	(envelope-from lord@morrowfield.regexps.com)
Date: Sat, 31 Jan 2004 12:27:42 -0800 (PST)
Message-Id: <200401312027.MAA28656@morrowfield.regexps.com>
From: Tom Lord <lord@emf.net>
To: a.rottmann@gmx.at
In-reply-to: <87ad442gpv.fsf@alice.rotty.yi.org> (message from Andreas
	Rottmann on Sat, 31 Jan 2004 18:03:24 +0100)
Subject: Re: [Pika-dev] Re: Guile FFI wrapper, t_scm_word ambiguity
References: <873c9x61b5.fsf@alice.rotty.yi.org>
	<87ad442gpv.fsf@alice.rotty.yi.org>
Cc: pika-dev@nongnu.org
X-BeenThere: pika-dev@nongnu.org
X-Mailman-Version: 2.1.2
Precedence: list
List-Id: <pika-dev.nongnu.org>
List-Unsubscribe: <http://mail.nongnu.org/mailman/listinfo/pika-dev>,
	<mailto:pika-dev-request@nongnu.org?subject=unsubscribe>
List-Archive: <http://mail.gnu.org/pipermail/pika-dev>
List-Post: <mailto:pika-dev@nongnu.org>
List-Help: <mailto:pika-dev-request@nongnu.org?subject=help>
List-Subscribe: <http://mail.nongnu.org/mailman/listinfo/pika-dev>,
	<mailto:pika-dev-request@nongnu.org?subject=subscribe>
X-List-Received-Date: Sat, 31 Jan 2004 20:13:16 -0000




    > From: Andreas Rottmann <a.rottmann@gmx.at>

    > I started the wrapper anew, since I realized it would probably make
    > sense to plug Guile in as just another "rep", i.e. leaving libscm/
    > mostly intact an modifying the stuff in reps/ to be just a thin layer
    > above Guile.

Thank you!   Yes, I think that that's an excellent idea.

    > So far, with a bit of preprocessor magic, this seems work really
    > well. 

    > However, since in libscm/words.h I have

    > typedef SCM t_scm_word;

DOH!  That's a gosh-darn bug.   src/pika/libscm/words.[ch] should
really be called src/pika/reps/words-imp.[ch].

There should be a replacement file in src/pika/libscm/words.h which
does nothing but #include the reps copy.


    > And SCM is supposed to be opaque (and happens to be implemented as
    > pointer normally), I wondered if it wouldn't be appropriate to make
    > t_scm_word an opaque type too. ATM, t_scm_word is used both to denote
    > a "scheme value" and an unsigned integer (e.g. all the hash functions
    > return a t_scm_word). I had to replace these uses of t_scm_word with
    > t_ulong. 

    > So these options seem to exist:

    > 1) Just s/t_scm_word/t_ulong/ where apropriate for the Guile Pika FFI,
    >    as I've done now and leave everything the same in the "real"
    >    Pika.

I think that the right solution for the hash functions is:

        * use t_scm_fixnum rather than t_ulong
        * double check to make sure that scm_range_fix_hash_value
          can't return a negative t_scm_fixnum

    > 2) The same as 1), but the do the substitutions in "real" Pika.

The non-reps parts of "real" Pika (e.g., libscm/hash-values.[ch]
should _not_ be using t_scm_word as an integer type.   Those are
bugs.   They should be using t_scm_fixnum and should be reviewed for
sign issues and overflow issues.

The abstraction is:

    t_scm_fixnum is a signed integer type large enough to hold the 
    largest integers that can be represented by the implementation 
    of fixnums in reps --- that is: it's large enough to hold the 
    largest integers that the non-reps parts of Pika can pass back
    and forth with Scheme without using bignums.

    t_scm_word is the <unspecified> type of a Scheme location.
    The non-reps parts of Pika (and any FFI-using code) should 
    never use t_scm_word as the type of an rvalue.


    > 3) Add a new typedef that replaces the t_scm_word in the places where
    >    it is used as plain integer.

t_scm_fixnum is that typedef.

    > I'd favor 2) or 3), although I havne't yet been able to think of an
    > appropriate name for 3).

t_scm_fixnum :-)

-t




From MAILER-DAEMON Sat Jan 31 15:22:28 2004
Received: from list by monty-python.gnu.org with archive (Exim 4.24)
	id 1An1dM-0006o7-70
	for mharc-pika-dev@gnu.org; Sat, 31 Jan 2004 15:22:28 -0500
Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.24)
	id 1An1dJ-0006lq-DR
	for pika-dev@nongnu.org; Sat, 31 Jan 2004 15:22:25 -0500
Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.24)
	id 1An1cm-000659-1J
	for pika-dev@nongnu.org; Sat, 31 Jan 2004 15:22:23 -0500
Received: from [65.234.195.93] (helo=morrowfield.regexps.com)
	by monty-python.gnu.org with esmtp (Exim 4.24) id 1An1ck-00061S-Qv
	for pika-dev@nongnu.org; Sat, 31 Jan 2004 15:21:51 -0500
Received: (from lord@localhost)
	by morrowfield.regexps.com (8.9.1/8.9.1) id MAA28896;
	Sat, 31 Jan 2004 12:36:47 -0800 (PST)
	(envelope-from lord@morrowfield.regexps.com)
Date: Sat, 31 Jan 2004 12:36:47 -0800 (PST)
Message-Id: <200401312036.MAA28896@morrowfield.regexps.com>
From: Tom Lord <lord@emf.net>
To: jivera@flame.org
In-reply-to: <87znc4cqiu.fsf@flame.org> (message from Matthew Dempsky on Sat, 
	31 Jan 2004 12:21:29 +0100)
Subject: Re: [Pika-dev] Re: Guile FFI wrapper, t_scm_word ambiguity
References: <873c9x61b5.fsf@alice.rotty.yi.org>
	<87ad442gpv.fsf@alice.rotty.yi.org> <87znc4cqiu.fsf@flame.org>
Cc: pika-dev@nongnu.org
X-BeenThere: pika-dev@nongnu.org
X-Mailman-Version: 2.1.2
Precedence: list
List-Id: <pika-dev.nongnu.org>
List-Unsubscribe: <http://mail.nongnu.org/mailman/listinfo/pika-dev>,
	<mailto:pika-dev-request@nongnu.org?subject=unsubscribe>
List-Archive: <http://mail.gnu.org/pipermail/pika-dev>
List-Post: <mailto:pika-dev@nongnu.org>
List-Help: <mailto:pika-dev-request@nongnu.org?subject=help>
List-Subscribe: <http://mail.nongnu.org/mailman/listinfo/pika-dev>,
	<mailto:pika-dev-request@nongnu.org?subject=subscribe>
X-List-Received-Date: Sat, 31 Jan 2004 20:22:27 -0000



    > From: Matthew Dempsky <jivera@flame.org>

    > Seperating the uses of t_scm_word into integer and Pika value
    > (choice #3) seems the cleanest solution to me at least.

And, indeed, was the intention.  The current Pika reps/ is free to use
t_scm_word as an integer type but nothing else in the Pika tree should
(the current exceptions are bugs).  The declaration of it belongs in
reps, not libscm.


-t




From MAILER-DAEMON Sat Jan 31 16:00:55 2004
Received: from list by monty-python.gnu.org with archive (Exim 4.24)
	id 1An2EZ-0005h2-FW
	for mharc-pika-dev@gnu.org; Sat, 31 Jan 2004 16:00:55 -0500
Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.24)
	id 1An2EX-0005fh-3P
	for pika-dev@nongnu.org; Sat, 31 Jan 2004 16:00:53 -0500
Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.24)
	id 1An2Dz-0005SP-UJ
	for pika-dev@nongnu.org; Sat, 31 Jan 2004 16:00:52 -0500
Received: from [65.234.195.93] (helo=morrowfield.regexps.com)
	by monty-python.gnu.org with esmtp (Exim 4.24) id 1An2Dy-0005RU-Hr
	for pika-dev@nongnu.org; Sat, 31 Jan 2004 16:00:19 -0500
Received: (from lord@localhost)
	by morrowfield.regexps.com (8.9.1/8.9.1) id NAA29053;
	Sat, 31 Jan 2004 13:15:13 -0800 (PST)
	(envelope-from lord@morrowfield.regexps.com)
Date: Sat, 31 Jan 2004 13:15:13 -0800 (PST)
Message-Id: <200401312115.NAA29053@morrowfield.regexps.com>
From: Tom Lord <lord@emf.net>
To: a.rottmann@gmx.at
In-reply-to: <871xpg2ber.fsf@alice.rotty.yi.org> (message from Andreas
	Rottmann on Sat, 31 Jan 2004 19:58:04 +0100)
Subject: Re: [Pika-dev] Guile FFI: resizable vector problem
References: <871xpg2ber.fsf@alice.rotty.yi.org>
Cc: pika-dev@nongnu.org
X-BeenThere: pika-dev@nongnu.org
X-Mailman-Version: 2.1.2
Precedence: list
List-Id: <pika-dev.nongnu.org>
List-Unsubscribe: <http://mail.nongnu.org/mailman/listinfo/pika-dev>,
	<mailto:pika-dev-request@nongnu.org?subject=unsubscribe>
List-Archive: <http://mail.gnu.org/pipermail/pika-dev>
List-Post: <mailto:pika-dev@nongnu.org>
List-Help: <mailto:pika-dev-request@nongnu.org?subject=help>
List-Subscribe: <http://mail.nongnu.org/mailman/listinfo/pika-dev>,
	<mailto:pika-dev-request@nongnu.org?subject=subscribe>
X-List-Received-Date: Sat, 31 Jan 2004 21:00:53 -0000


    > From: Andreas Rottmann <a.rottmann@gmx.at>

    > The next thing I ran into: Guile has dropped resizable vectors some
    > time ago. A rationale can be found in [0]. The argument seems sound to
    > me, so what about Pika -- won't resizable vectors yield the same
    > problem wrt to threading? For now, I'll just work around that by
    > making scm_set_n_vector_elts() create a new vector.

(Jivera answered your questions about threads and the Pika vector
interface.)

Let's step back a second.   It'd be helpful to clarify your goals.

One goal might be described by the recipe:

* "infer" from the Pika API's a kind of "portable FFI"
  which _any_ Scheme implementation should be able to
  provide.   That is -- infer an alternative to the SRFI-50 
  draft.

* Implement that FFI for Guile.

* Use it to write modules for Guile with some degree of confidence
  that they'll be portable to Pika and hopefully to other
  implementations as well.


The other goal might be described by the recipe:

* Implement src/scm/reps using parts of Guile.   Parts of
  Guile's object representations.   Guile's GC.  Guile's
  fixnums and boxed doubles.   Guile's smobs as vtable objects.
  (etc.)

* Meanwhile we finish the rest of src/scm.

Then we wind up with multiple implementations of reps/ right off the
bat.  And those will make usefully different trade-offs, hopefully.

The thing about this second plan is that it means _not_ using all of
Guile and not being to mix all modules written using "native Guile"
APIs with Pika code.    For example, in Pika, vectors are (no matter
how reps/ is implemented) vtable objects.   So it's quite possibly
that the vector code from Guile just wouldn't be used.

That's not _absolutely_ true -- a Guile-based reps/ *could*
conceivably special-case vtable objects which it knows are vectors.
It might be able to use the Guile vector code directly, after all.
But if so, it would probably want to modify or augment the Guile code
-- for example to make vector_resize work.

(I actually like the second plan and had presumed that's what you
wanted to do -- but I also like the first plan.)

    > http://mail.gnu.org/archive/html/guile-devel/2000-10/msg00049.html

That message says it all:

    msg> And now to the problem: How do you use a vector?  You
    msg> typically extract the pointer to the elements and work on
    msg> those, while still making sure that the vector object is gc
    msg> protected.  But, if resizing of vectors is allowed, this
    msg> does not work anymore

It's a flaw of the Guile API (inherite from SCM) that the way you
usually work on a vector is to extract a pointer to the array of
elements.

That's just a swell paradigm for SCM but it was never really
appropriate for Guile, given the goal of being a general-purpose
extension language.

The Pika API doesn't work that way.  You never (other than
(optionally) in reps/) get "a pointer to the array of elements".   The
problem doesn't occur.

There will eventually be a need in the Pika API for calls that let you
"lock" a vector or two briefly, during which time it is promised that
they won't resized.   But that's mostly a separate topic.

-t





From MAILER-DAEMON Sat Jan 31 16:04:37 2004
Received: from list by monty-python.gnu.org with archive (Exim 4.24)
	id 1An2I9-0001DD-EK
	for mharc-pika-dev@gnu.org; Sat, 31 Jan 2004 16:04:37 -0500
Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.24)
	id 1An2I7-0001AI-9x
	for pika-dev@nongnu.org; Sat, 31 Jan 2004 16:04:35 -0500
Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.24)
	id 1An2HX-0000qg-8A
	for pika-dev@nongnu.org; Sat, 31 Jan 2004 16:04:30 -0500
Received: from [65.234.195.93] (helo=morrowfield.regexps.com)
	by monty-python.gnu.org with esmtp (Exim 4.24) id 1An2HH-0000iI-C6
	for pika-dev@nongnu.org; Sat, 31 Jan 2004 16:03:43 -0500
Received: (from lord@localhost)
	by morrowfield.regexps.com (8.9.1/8.9.1) id NAA29061;
	Sat, 31 Jan 2004 13:18:32 -0800 (PST)
	(envelope-from lord@morrowfield.regexps.com)
Date: Sat, 31 Jan 2004 13:18:32 -0800 (PST)
Message-Id: <200401312118.NAA29061@morrowfield.regexps.com>
From: Tom Lord <lord@emf.net>
To: a.rottmann@gmx.at
In-reply-to: <87wu7728v9.fsf@alice.rotty.yi.org> (message from Andreas
	Rottmann on Sat, 31 Jan 2004 20:52:58 +0100)
Subject: Re: [Pika-dev] Guile FFI: resizable vector problem
References: <871xpg2ber.fsf@alice.rotty.yi.org> <87smhwcmxz.fsf@flame.org>
	<87wu7728v9.fsf@alice.rotty.yi.org>
Cc: pika-dev@nongnu.org
X-BeenThere: pika-dev@nongnu.org
X-Mailman-Version: 2.1.2
Precedence: list
List-Id: <pika-dev.nongnu.org>
List-Unsubscribe: <http://mail.nongnu.org/mailman/listinfo/pika-dev>,
	<mailto:pika-dev-request@nongnu.org?subject=unsubscribe>
List-Archive: <http://mail.gnu.org/pipermail/pika-dev>
List-Post: <mailto:pika-dev@nongnu.org>
List-Help: <mailto:pika-dev-request@nongnu.org?subject=help>
List-Subscribe: <http://mail.nongnu.org/mailman/listinfo/pika-dev>,
	<mailto:pika-dev-request@nongnu.org?subject=subscribe>
X-List-Received-Date: Sat, 31 Jan 2004 21:04:36 -0000


    > From: Andreas Rottmann <a.rottmann@gmx.at>

    > > Andreas Rottmann <a.rottmann@gmx.at> writes:

    > >> The next thing I ran into: Guile has dropped resizable vectors some
    > >> time ago. A rationale can be found in [0]. The argument seems sound to
    > >> me, so what about Pika -- won't resizable vectors yield the same
    > >> problem wrt to threading? For now, I'll just work around that by
    > >> making scm_set_n_vector_elts() create a new vector.

    > > Pika's FFI will handle resizable vectors and threading fine because
    > > users never get pointers to the vector contents -- they can only do
    > > vector-ref and vector-set! operations on them.

    > > Having scm_set_n_vector_elts create a new vector and copy elements
    > > would be the Right Thing to do for this.

    > OK. Another thing: What about defining SCM_FEATURE_ macros, e.g.:

    > #define SCM_FEATURE_CHAR_BUCKYBITS 1 /* for Pika */
    > #define SCM_FEATURE_CHAR_BUCKYBITS 0 /* for Guile Pika FFI */

    > We can use those in the testcases, to check only for supported
    > features. This is also usable for applications that want to use the
    > Pika FFI and use features as available, but still stay portable across
    > the different FFI implementations.

This makes sense for the "first plan" -- extracting a "portable FFI"
from the Pika native FFI, and supporting that portable FFI as a way to
write extensions to Guile.

I think that initially, the portable FFI should not deal with
buckybits at all.   If C code says to Scheme "Hey, gimme that
character converted to a C value", and the character happens to have
non-0 buckybits, then Scheme should reply "Sorry, can't do it."

The rationale for that is that so few implementations deal with
buckybits that they are a low priority for a portable FFI.   At the
same time, many implementations will have _some_ kinds of characters
that aren't easilly converted to C values in a portable way -- so the
possibility that asking for a character can return an error is worth
building in to the portable FFI.

-t




From MAILER-DAEMON Sat Jan 31 16:18:43 2004
Received: from list by monty-python.gnu.org with archive (Exim 4.24)
	id 1An2Vn-0001GA-Dj
	for mharc-pika-dev@gnu.org; Sat, 31 Jan 2004 16:18:43 -0500
Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.24)
	id 1An2Vl-0001Ec-4V
	for pika-dev@nongnu.org; Sat, 31 Jan 2004 16:18:41 -0500
Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.24)
	id 1An2VD-0000zC-Uy
	for pika-dev@nongnu.org; Sat, 31 Jan 2004 16:18:39 -0500
Received: from [213.165.64.20] (helo=mail.gmx.net)
	by monty-python.gnu.org with smtp (Exim 4.24) id 1An2Rb-0008UO-KN
	for pika-dev@nongnu.org; Sat, 31 Jan 2004 16:14:23 -0500
Received: (qmail 29600 invoked by uid 65534); 31 Jan 2004 21:14:22 -0000
Received: from chello212186006140.401.14.univie.teleweb.at (EHLO garibaldi)
	(212.186.6.140)
	by mail.gmx.net (mp003) with SMTP; 31 Jan 2004 22:14:22 +0100
X-Authenticated: #3102804
Received: from ivanova.rhinosaur.lan ([192.168.1.9] helo=ivanova)
	by garibaldi with esmtp (Exim 4.30)
	id 1An2RR-0002CT-FN; Sat, 31 Jan 2004 22:14:13 +0100
Received: from andy by ivanova with local (Exim 4.30)
	id 1An2RR-00008V-DD; Sat, 31 Jan 2004 22:14:13 +0100
To: Tom Lord <lord@emf.net>
Subject: Re: [Pika-dev] Re: Guile FFI wrapper, t_scm_word ambiguity
References: <873c9x61b5.fsf@alice.rotty.yi.org>
	<87ad442gpv.fsf@alice.rotty.yi.org>
	<200401312027.MAA28656@morrowfield.regexps.com>
From: Andreas Rottmann <a.rottmann@gmx.at>
Date: Sat, 31 Jan 2004 22:14:13 +0100
In-Reply-To: <200401312027.MAA28656@morrowfield.regexps.com> (Tom Lord's
	message of "Sat, 31 Jan 2004 12:27:42 -0800 (PST)")
Message-ID: <87ptcz253u.fsf@alice.rotty.yi.org>
User-Agent: Gnus/5.1006 (Gnus v5.10.6) Emacs/21.3 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Sender: Andreas Rottmann <a.rottmann@gmx.at>
X-Spam-Score: -4.9 (----)
Cc: pika-dev@nongnu.org
X-BeenThere: pika-dev@nongnu.org
X-Mailman-Version: 2.1.2
Precedence: list
List-Id: <pika-dev.nongnu.org>
List-Unsubscribe: <http://mail.nongnu.org/mailman/listinfo/pika-dev>,
	<mailto:pika-dev-request@nongnu.org?subject=unsubscribe>
List-Archive: <http://mail.gnu.org/pipermail/pika-dev>
List-Post: <mailto:pika-dev@nongnu.org>
List-Help: <mailto:pika-dev-request@nongnu.org?subject=help>
List-Subscribe: <http://mail.nongnu.org/mailman/listinfo/pika-dev>,
	<mailto:pika-dev-request@nongnu.org?subject=subscribe>
X-List-Received-Date: Sat, 31 Jan 2004 21:18:41 -0000

Tom Lord <lord@emf.net> writes:

> I think that the right solution for the hash functions is:
>
>         * use t_scm_fixnum rather than t_ulong
>         * double check to make sure that scm_range_fix_hash_value
>           can't return a negative t_scm_fixnum
>
>     > 2) The same as 1), but the do the substitutions in "real" Pika.
>
> The non-reps parts of "real" Pika (e.g., libscm/hash-values.[ch]
> should _not_ be using t_scm_word as an integer type.   Those are
> bugs.   They should be using t_scm_fixnum and should be reviewed for
> sign issues and overflow issues.
>
Funny how things line up together: The next problem for me was
hashing; the unit tests run OK so far, up to unit-vector-hash, which
fails due to bogus hash value calculation. I guess I'll now pass the
ball, waiting for someone else fix this bug (I'm not feeling familiar
with the guts of Pika yet), and then have a look at the vector hashes
again. 

Andy
-- 
Andreas Rottmann         | Rotty@ICQ      | 118634484@ICQ | a.rottmann@gmx.at
http://yi.org/rotty      | GnuPG Key: http://yi.org/rotty/gpg.asc
Fingerprint              | DFB4 4EB4 78A4 5EEE 6219  F228 F92F CFC5 01FD 5B62

Make free software, not war!



From MAILER-DAEMON Sat Jan 31 16:35:57 2004
Received: from list by monty-python.gnu.org with archive (Exim 4.24)
	id 1An2mS-0006F0-UG
	for mharc-pika-dev@gnu.org; Sat, 31 Jan 2004 16:35:56 -0500
Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.24)
	id 1An2mQ-0006Em-Vs
	for pika-dev@nongnu.org; Sat, 31 Jan 2004 16:35:54 -0500
Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.24)
	id 1An2lu-00068v-JP
	for pika-dev@nongnu.org; Sat, 31 Jan 2004 16:35:54 -0500
Received: from [213.165.64.20] (helo=mail.gmx.net)
	by monty-python.gnu.org with smtp (Exim 4.24) id 1An2lt-00066j-TF
	for pika-dev@nongnu.org; Sat, 31 Jan 2004 16:35:22 -0500
Received: (qmail 14430 invoked by uid 65534); 31 Jan 2004 21:28:38 -0000
Received: from chello212186006140.401.14.univie.teleweb.at (EHLO garibaldi)
	(212.186.6.140)
	by mail.gmx.net (mp005) with SMTP; 31 Jan 2004 22:28:38 +0100
X-Authenticated: #3102804
Received: from ivanova.rhinosaur.lan ([192.168.1.9] helo=ivanova)
	by garibaldi with esmtp (Exim 4.30)
	id 1An2fB-0002DC-Dy; Sat, 31 Jan 2004 22:28:25 +0100
Received: from andy by ivanova with local (Exim 4.30)
	id 1An2fA-00009A-FK; Sat, 31 Jan 2004 22:28:24 +0100
To: Tom Lord <lord@emf.net>
Subject: Re: [Pika-dev] Guile FFI: resizable vector problem
References: <871xpg2ber.fsf@alice.rotty.yi.org>
	<200401312115.NAA29053@morrowfield.regexps.com>
From: Andreas Rottmann <a.rottmann@gmx.at>
Date: Sat, 31 Jan 2004 22:28:24 +0100
In-Reply-To: <200401312115.NAA29053@morrowfield.regexps.com> (Tom Lord's
	message of "Sat, 31 Jan 2004 13:15:13 -0800 (PST)")
Message-ID: <87llnn24g7.fsf@alice.rotty.yi.org>
User-Agent: Gnus/5.1006 (Gnus v5.10.6) Emacs/21.3 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Sender: Andreas Rottmann <a.rottmann@gmx.at>
X-Spam-Score: -4.9 (----)
Cc: pika-dev@nongnu.org
X-BeenThere: pika-dev@nongnu.org
X-Mailman-Version: 2.1.2
Precedence: list
List-Id: <pika-dev.nongnu.org>
List-Unsubscribe: <http://mail.nongnu.org/mailman/listinfo/pika-dev>,
	<mailto:pika-dev-request@nongnu.org?subject=unsubscribe>
List-Archive: <http://mail.gnu.org/pipermail/pika-dev>
List-Post: <mailto:pika-dev@nongnu.org>
List-Help: <mailto:pika-dev-request@nongnu.org?subject=help>
List-Subscribe: <http://mail.nongnu.org/mailman/listinfo/pika-dev>,
	<mailto:pika-dev-request@nongnu.org?subject=subscribe>
X-List-Received-Date: Sat, 31 Jan 2004 21:35:55 -0000

Tom Lord <lord@emf.net> writes:

>     > From: Andreas Rottmann <a.rottmann@gmx.at>
>
>     > The next thing I ran into: Guile has dropped resizable vectors some
>     > time ago. A rationale can be found in [0]. The argument seems sound to
>     > me, so what about Pika -- won't resizable vectors yield the same
>     > problem wrt to threading? For now, I'll just work around that by
>     > making scm_set_n_vector_elts() create a new vector.
>
> (Jivera answered your questions about threads and the Pika vector
> interface.)
>
> Let's step back a second.   It'd be helpful to clarify your goals.
>
> One goal might be described by the recipe:
>
> * "infer" from the Pika API's a kind of "portable FFI"
>   which _any_ Scheme implementation should be able to
>   provide.   That is -- infer an alternative to the SRFI-50 
>   draft.
>
> * Implement that FFI for Guile.
>
> * Use it to write modules for Guile with some degree of confidence
>   that they'll be portable to Pika and hopefully to other
>   implementations as well.
>
>
> The other goal might be described by the recipe:
>
> * Implement src/scm/reps using parts of Guile.   Parts of
>   Guile's object representations.   Guile's GC.  Guile's
>   fixnums and boxed doubles.   Guile's smobs as vtable objects.
>   (etc.)
>
> * Meanwhile we finish the rest of src/scm.
>
> Then we wind up with multiple implementations of reps/ right off the
> bat.  And those will make usefully different trade-offs, hopefully.
>
> The thing about this second plan is that it means _not_ using all of
> Guile and not being to mix all modules written using "native Guile"
> APIs with Pika code.    For example, in Pika, vectors are (no matter
> how reps/ is implemented) vtable objects.   So it's quite possibly
> that the vector code from Guile just wouldn't be used.
>
Yes, I already noticed that my wrapper will not end up using the Guile
reader/writer, but the one from libscm/.

> That's not _absolutely_ true -- a Guile-based reps/ *could*
> conceivably special-case vtable objects which it knows are vectors.
>
It does already (vtable-obj-imp.c):

struct scm_vtable *
scm_value_vtable (t_scm_arena arena, t_scm_word * value)
{
  /* FIXME: This could be faster */
  
  if (SCM_BOOLP (*value))
    return &scm_boolean_vtable;
[...]
  else if (SCM_VECTORP (*value))
    return &scm_vector_vtable;
  else
    {
      panic ("no vtable for type yet");
      return 0;
    }
}

> It might be able to use the Guile vector code directly, after all.
> But if so, it would probably want to modify or augment the Guile code
> -- for example to make vector_resize work.
>
Yes, the current vector_resize code just allocates a new vector;
altough it would be quite simple to avoid that by going a bit deeper
into Guile internals and cook up a Guile vector resize primitive.

> (I actually like the second plan and had presumed that's what you
> wanted to do -- but I also like the first plan.)
>
I go more in the direction of the second plan, but I don't thing that
it contradicts the first.

>     > http://mail.gnu.org/archive/html/guile-devel/2000-10/msg00049.html
>
> It's a flaw of the Guile API (inherite from SCM) that the way you
> usually work on a vector is to extract a pointer to the array of
> elements.
>
Since this message is from 2000, things have changed a bit; the Guile
vector API using a base pointer (SCM_VELTS) has been augmented by
SCM_VECTOR_REF/SET, so I think there is no real obstacle in re-adding
resizable vectors to Guile itself (and deprecating SCM_VELTS at the
same time). I'll ask about that on guile-user or -dev, once I've come
up with code for that.

Andy
-- 
Andreas Rottmann         | Rotty@ICQ      | 118634484@ICQ | a.rottmann@gmx.at
http://yi.org/rotty      | GnuPG Key: http://yi.org/rotty/gpg.asc
Fingerprint              | DFB4 4EB4 78A4 5EEE 6219  F228 F92F CFC5 01FD 5B62

Packages should build-depend on what they should build-depend.



From MAILER-DAEMON Sat Jan 31 16:37:40 2004
Received: from list by monty-python.gnu.org with archive (Exim 4.24)
	id 1An2o7-00078r-N7
	for mharc-pika-dev@gnu.org; Sat, 31 Jan 2004 16:37:39 -0500
Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.24)
	id 1An2o3-00077w-U2
	for pika-dev@nongnu.org; Sat, 31 Jan 2004 16:37:35 -0500
Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.24)
	id 1An2nX-0006wT-IJ
	for pika-dev@nongnu.org; Sat, 31 Jan 2004 16:37:34 -0500
Received: from [65.234.195.93] (helo=morrowfield.regexps.com)
	by monty-python.gnu.org with esmtp (Exim 4.24) id 1An2nW-0006ug-7o
	for pika-dev@nongnu.org; Sat, 31 Jan 2004 16:37:02 -0500
Received: (from lord@localhost)
	by morrowfield.regexps.com (8.9.1/8.9.1) id NAA29222;
	Sat, 31 Jan 2004 13:52:00 -0800 (PST)
	(envelope-from lord@morrowfield.regexps.com)
Date: Sat, 31 Jan 2004 13:52:00 -0800 (PST)
Message-Id: <200401312152.NAA29222@morrowfield.regexps.com>
From: Tom Lord <lord@emf.net>
To: a.rottmann@gmx.at
In-reply-to: <87hdyb249q.fsf@alice.rotty.yi.org> (message from Andreas
	Rottmann on Sat, 31 Jan 2004 22:32:17 +0100)
Subject: Re: [Pika-dev] Guile FFI: resizable vector problem
References: <871xpg2ber.fsf@alice.rotty.yi.org> <87smhwcmxz.fsf@flame.org>
	<87wu7728v9.fsf@alice.rotty.yi.org>
	<200401312118.NAA29061@morrowfield.regexps.com>
	<87hdyb249q.fsf@alice.rotty.yi.org>
Cc: pika-dev@nongnu.org
X-BeenThere: pika-dev@nongnu.org
X-Mailman-Version: 2.1.2
Precedence: list
List-Id: <pika-dev.nongnu.org>
List-Unsubscribe: <http://mail.nongnu.org/mailman/listinfo/pika-dev>,
	<mailto:pika-dev-request@nongnu.org?subject=unsubscribe>
List-Archive: <http://mail.gnu.org/pipermail/pika-dev>
List-Post: <mailto:pika-dev@nongnu.org>
List-Help: <mailto:pika-dev-request@nongnu.org?subject=help>
List-Subscribe: <http://mail.nongnu.org/mailman/listinfo/pika-dev>,
	<mailto:pika-dev-request@nongnu.org?subject=subscribe>
X-List-Received-Date: Sat, 31 Jan 2004 21:37:36 -0000


    > From: Andreas Rottmann <a.rottmann@gmx.at>

    > That also would solve the second feature macro I've in use so
    > far: SCM_FEATURE_CHAR_UNICODE. If it isn't defined, the
    > implementation is only guaranteed to support ASCII chars. I
    > think the macros would come handy in the scm/tests, however,
    > that way the test cases can be shared among all implementations.

I'm not against the feature-macro idea.  It makes me a _little_
nervous just because I don't like #ifdef'ed code -- but on the other
hand, ASCII-only (or iso8859-*-only) optoins would be very winning
things to provide.

-t






From MAILER-DAEMON Sat Jan 31 16:39:51 2004
Received: from list by monty-python.gnu.org with archive (Exim 4.24)
	id 1An2qE-0000rc-HS
	for mharc-pika-dev@gnu.org; Sat, 31 Jan 2004 16:39:50 -0500
Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.24)
	id 1An2qB-0000oU-44
	for pika-dev@nongnu.org; Sat, 31 Jan 2004 16:39:47 -0500
Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.24)
	id 1An2pY-0008M5-A6
	for pika-dev@nongnu.org; Sat, 31 Jan 2004 16:39:39 -0500
Received: from [213.165.64.20] (helo=mail.gmx.net)
	by monty-python.gnu.org with smtp (Exim 4.24) id 1An2pX-0008Jt-HE
	for pika-dev@nongnu.org; Sat, 31 Jan 2004 16:39:07 -0500
Received: (qmail 21110 invoked by uid 65534); 31 Jan 2004 21:32:25 -0000
Received: from chello212186006140.401.14.univie.teleweb.at (EHLO garibaldi)
	(212.186.6.140)
	by mail.gmx.net (mp025) with SMTP; 31 Jan 2004 22:32:25 +0100
X-Authenticated: #3102804
Received: from ivanova.rhinosaur.lan ([192.168.1.9] helo=ivanova)
	by garibaldi with esmtp (Exim 4.30)
	id 1An2iv-0002Dj-Qs; Sat, 31 Jan 2004 22:32:17 +0100
Received: from andy by ivanova with local (Exim 4.30)
	id 1An2iv-00009D-Kh; Sat, 31 Jan 2004 22:32:17 +0100
To: Tom Lord <lord@emf.net>
Subject: Re: [Pika-dev] Guile FFI: resizable vector problem
References: <871xpg2ber.fsf@alice.rotty.yi.org> <87smhwcmxz.fsf@flame.org>
	<87wu7728v9.fsf@alice.rotty.yi.org>
	<200401312118.NAA29061@morrowfield.regexps.com>
From: Andreas Rottmann <a.rottmann@gmx.at>
Date: Sat, 31 Jan 2004 22:32:17 +0100
In-Reply-To: <200401312118.NAA29061@morrowfield.regexps.com> (Tom Lord's
	message of "Sat, 31 Jan 2004 13:18:32 -0800 (PST)")
Message-ID: <87hdyb249q.fsf@alice.rotty.yi.org>
User-Agent: Gnus/5.1006 (Gnus v5.10.6) Emacs/21.3 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Sender: Andreas Rottmann <a.rottmann@gmx.at>
X-Spam-Score: -4.9 (----)
Cc: pika-dev@nongnu.org
X-BeenThere: pika-dev@nongnu.org
X-Mailman-Version: 2.1.2
Precedence: list
List-Id: <pika-dev.nongnu.org>
List-Unsubscribe: <http://mail.nongnu.org/mailman/listinfo/pika-dev>,
	<mailto:pika-dev-request@nongnu.org?subject=unsubscribe>
List-Archive: <http://mail.gnu.org/pipermail/pika-dev>
List-Post: <mailto:pika-dev@nongnu.org>
List-Help: <mailto:pika-dev-request@nongnu.org?subject=help>
List-Subscribe: <http://mail.nongnu.org/mailman/listinfo/pika-dev>,
	<mailto:pika-dev-request@nongnu.org?subject=subscribe>
X-List-Received-Date: Sat, 31 Jan 2004 21:39:48 -0000

Tom Lord <lord@emf.net> writes:

> I think that initially, the portable FFI should not deal with
> buckybits at all.   If C code says to Scheme "Hey, gimme that
> character converted to a C value", and the character happens to have
> non-0 buckybits, then Scheme should reply "Sorry, can't do it."
>
> The rationale for that is that so few implementations deal with
> buckybits that they are a low priority for a portable FFI.   At the
> same time, many implementations will have _some_ kinds of characters
> that aren't easilly converted to C values in a portable way -- so the
> possibility that asking for a character can return an error is worth
> building in to the portable FFI.
>
That also would solve the second feature macro I've in use so far:
SCM_FEATURE_CHAR_UNICODE. If it isn't defined, the implementation is
only guaranteed to support ASCII chars. I think the macros would come
handy in the scm/tests, however, that way the test cases can be shared
among all implementations.

Andy
-- 
Andreas Rottmann         | Rotty@ICQ      | 118634484@ICQ | a.rottmann@gmx.at
http://yi.org/rotty      | GnuPG Key: http://yi.org/rotty/gpg.asc
Fingerprint              | DFB4 4EB4 78A4 5EEE 6219  F228 F92F CFC5 01FD 5B62

Python is executable pseudocode, Perl is executable line-noise.



From MAILER-DAEMON Sat Jan 31 19:35:31 2004
Received: from list by monty-python.gnu.org with archive (Exim 4.24)
	id 1An5aE-0006ey-RY
	for mharc-pika-dev@gnu.org; Sat, 31 Jan 2004 19:35:30 -0500
Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.24)
	id 1An5aC-0006ek-Ns
	for pika-dev@nongnu.org; Sat, 31 Jan 2004 19:35:28 -0500
Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.24)
	id 1An5Zf-0006Zt-83
	for pika-dev@nongnu.org; Sat, 31 Jan 2004 19:35:27 -0500
Received: from [213.165.64.20] (helo=mail.gmx.net)
	by monty-python.gnu.org with smtp (Exim 4.24) id 1An5Ze-0006Zp-Ny
	for pika-dev@nongnu.org; Sat, 31 Jan 2004 19:34:54 -0500
Received: (qmail 2263 invoked by uid 65534); 1 Feb 2004 00:34:53 -0000
Received: from chello212186006140.401.14.univie.teleweb.at (EHLO garibaldi)
	(212.186.6.140)
	by mail.gmx.net (mp021) with SMTP; 01 Feb 2004 01:34:53 +0100
X-Authenticated: #3102804
Received: from ivanova.rhinosaur.lan ([192.168.1.9] helo=ivanova)
	by garibaldi with esmtp (Exim 4.30)
	id 1An5ZS-0002Ol-EJ; Sun, 01 Feb 2004 01:34:42 +0100
Received: from andy by ivanova with local (Exim 4.30)
	id 1An5ZS-0001Wq-C7; Sun, 01 Feb 2004 01:34:42 +0100
To: Tom Lord <lord@emf.net>,  pika-dev@nongnu.org
References: <873c9x61b5.fsf@alice.rotty.yi.org>
	<87ad442gpv.fsf@alice.rotty.yi.org>
	<200401312027.MAA28656@morrowfield.regexps.com>
	<87ptcz253u.fsf@alice.rotty.yi.org>
From: Andreas Rottmann <a.rottmann@gmx.at>
Date: Sun, 01 Feb 2004 01:34:42 +0100
In-Reply-To: <87ptcz253u.fsf@alice.rotty.yi.org> (Andreas Rottmann's message
	of "Sat, 31 Jan 2004 22:14:13 +0100")
Message-ID: <87smhvzlgd.fsf@alice.rotty.yi.org>
User-Agent: Gnus/5.1006 (Gnus v5.10.6) Emacs/21.3 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Sender: Andreas Rottmann <a.rottmann@gmx.at>
X-Spam-Score: -4.9 (----)
Cc: 
Subject: [Pika-dev] Re: Guile FFI wrapper, t_scm_word ambiguity
X-BeenThere: pika-dev@nongnu.org
X-Mailman-Version: 2.1.2
Precedence: list
List-Id: <pika-dev.nongnu.org>
List-Unsubscribe: <http://mail.nongnu.org/mailman/listinfo/pika-dev>,
	<mailto:pika-dev-request@nongnu.org?subject=unsubscribe>
List-Archive: <http://mail.gnu.org/pipermail/pika-dev>
List-Post: <mailto:pika-dev@nongnu.org>
List-Help: <mailto:pika-dev-request@nongnu.org?subject=help>
List-Subscribe: <http://mail.nongnu.org/mailman/listinfo/pika-dev>,
	<mailto:pika-dev-request@nongnu.org?subject=subscribe>
X-List-Received-Date: Sun, 01 Feb 2004 00:35:29 -0000

Andreas Rottmann <a.rottmann@gmx.at> writes:

>> The non-reps parts of "real" Pika (e.g., libscm/hash-values.[ch]
>> should _not_ be using t_scm_word as an integer type.   Those are
>> bugs.   They should be using t_scm_fixnum and should be reviewed for
>> sign issues and overflow issues.
>>
> Funny how things line up together: The next problem for me was
> hashing; the unit tests run OK so far, up to unit-vector-hash, which
> fails due to bogus hash value calculation. I guess I'll now pass the
> ball, waiting for someone else fix this bug (I'm not feeling familiar
> with the guts of Pika yet), and then have a look at the vector hashes
> again. 
>
I take that back (with using t_scm_fixnum, some pieces became much
more obvious to me); if you are comfortable with waiting a few days,
I'll sort the fixes for Pika out of my code and will provide them as a
changeset.

Andy
-- 
Andreas Rottmann         | Rotty@ICQ      | 118634484@ICQ | a.rottmann@gmx.at
http://yi.org/rotty      | GnuPG Key: http://yi.org/rotty/gpg.asc
Fingerprint              | DFB4 4EB4 78A4 5EEE 6219  F228 F92F CFC5 01FD 5B62

Make free software, not war!



From MAILER-DAEMON Sat Jan 31 19:51:06 2004
Received: from list by monty-python.gnu.org with archive (Exim 4.24)
	id 1An5pH-0001PF-5Y
	for mharc-pika-dev@gnu.org; Sat, 31 Jan 2004 19:51:03 -0500
Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.24)
	id 1An5p6-0001Lv-P6
	for pika-dev@nongnu.org; Sat, 31 Jan 2004 19:50:52 -0500
Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.24)
	id 1An5oY-0000zl-JP
	for pika-dev@nongnu.org; Sat, 31 Jan 2004 19:50:49 -0500
Received: from [65.234.195.229] (helo=morrowfield.regexps.com)
	by monty-python.gnu.org with esmtp (Exim 4.24) id 1An5oX-0000y5-Ls
	for pika-dev@nongnu.org; Sat, 31 Jan 2004 19:50:18 -0500
Received: (from lord@localhost)
	by morrowfield.regexps.com (8.9.1/8.9.1) id RAA29836;
	Sat, 31 Jan 2004 17:05:02 -0800 (PST)
	(envelope-from lord@morrowfield.regexps.com)
Date: Sat, 31 Jan 2004 17:05:02 -0800 (PST)
Message-Id: <200402010105.RAA29836@morrowfield.regexps.com>
From: Tom Lord <lord@emf.net>
To: a.rottmann@gmx.at
In-reply-to: <87smhvzlgd.fsf@alice.rotty.yi.org> (message from Andreas
	Rottmann on Sun, 01 Feb 2004 01:34:42 +0100)
References: <873c9x61b5.fsf@alice.rotty.yi.org>
	<87ad442gpv.fsf@alice.rotty.yi.org>
	<200401312027.MAA28656@morrowfield.regexps.com>
	<87ptcz253u.fsf@alice.rotty.yi.org> <87smhvzlgd.fsf@alice.rotty.yi.org>
Cc: pika-dev@nongnu.org
Subject: [Pika-dev] Re: Guile FFI wrapper, t_scm_word ambiguity
X-BeenThere: pika-dev@nongnu.org
X-Mailman-Version: 2.1.2
Precedence: list
List-Id: <pika-dev.nongnu.org>
List-Unsubscribe: <http://mail.nongnu.org/mailman/listinfo/pika-dev>,
	<mailto:pika-dev-request@nongnu.org?subject=unsubscribe>
List-Archive: <http://mail.gnu.org/pipermail/pika-dev>
List-Post: <mailto:pika-dev@nongnu.org>
List-Help: <mailto:pika-dev-request@nongnu.org?subject=help>
List-Subscribe: <http://mail.nongnu.org/mailman/listinfo/pika-dev>,
	<mailto:pika-dev-request@nongnu.org?subject=subscribe>
X-List-Received-Date: Sun, 01 Feb 2004 00:50:54 -0000


    > From: Andreas Rottmann <a.rottmann@gmx.at>

    > I take that back (with using t_scm_fixnum, some pieces became much
    > more obvious to me); if you are comfortable with waiting a few days,
    > I'll sort the fixes for Pika out of my code and will provide them as a
    > changeset.

That'll be schwell.  Thank you.

-t




From MAILER-DAEMON Sat Jan 31 19:54:28 2004
Received: from list by monty-python.gnu.org with archive (Exim 4.24)
	id 1An5sZ-0002kK-38
	for mharc-pika-dev@gnu.org; Sat, 31 Jan 2004 19:54:27 -0500
Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.24)
	id 1An5sR-0002eY-Tx
	for pika-dev@nongnu.org; Sat, 31 Jan 2004 19:54:19 -0500
Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.24)
	id 1An5ru-0002Dl-AC
	for pika-dev@nongnu.org; Sat, 31 Jan 2004 19:54:17 -0500
Received: from [213.165.64.20] (helo=mail.gmx.net)
	by monty-python.gnu.org with smtp (Exim 4.24) id 1An5rR-00025e-Dz
	for pika-dev@nongnu.org; Sat, 31 Jan 2004 19:53:17 -0500
Received: (qmail 5696 invoked by uid 65534); 1 Feb 2004 00:53:14 -0000
Received: from chello212186006140.401.14.univie.teleweb.at (EHLO garibaldi)
	(212.186.6.140)
	by mail.gmx.net (mp012) with SMTP; 01 Feb 2004 01:53:14 +0100
X-Authenticated: #3102804
Received: from ivanova.rhinosaur.lan ([192.168.1.9] helo=ivanova)
	by garibaldi with esmtp (Exim 4.30) id 1An5r3-0002QC-96
	for pika-dev@nongnu.org; Sun, 01 Feb 2004 01:52:53 +0100
Received: from andy by ivanova with local (Exim 4.30) id 1An5r3-0002Ra-2y
	for pika-dev@nongnu.org; Sun, 01 Feb 2004 01:52:53 +0100
To: Pika Developers <pika-dev@nongnu.org>
From: Andreas Rottmann <a.rottmann@gmx.at>
Date: Sun, 01 Feb 2004 01:52:53 +0100
Message-ID: <87oesjzkm2.fsf@alice.rotty.yi.org>
User-Agent: Gnus/5.1006 (Gnus v5.10.6) Emacs/21.3 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Sender: Andreas Rottmann <a.rottmann@gmx.at>
X-Spam-Score: -4.9 (----)
Subject: [Pika-dev] Guile FFI wrapper, status report
X-BeenThere: pika-dev@nongnu.org
X-Mailman-Version: 2.1.2
Precedence: list
List-Id: <pika-dev.nongnu.org>
List-Unsubscribe: <http://mail.nongnu.org/mailman/listinfo/pika-dev>,
	<mailto:pika-dev-request@nongnu.org?subject=unsubscribe>
List-Archive: <http://mail.gnu.org/pipermail/pika-dev>
List-Post: <mailto:pika-dev@nongnu.org>
List-Help: <mailto:pika-dev-request@nongnu.org?subject=help>
List-Subscribe: <http://mail.nongnu.org/mailman/listinfo/pika-dev>,
	<mailto:pika-dev-request@nongnu.org?subject=subscribe>
X-List-Received-Date: Sun, 01 Feb 2004 00:54:25 -0000

Hi!

I'll quit my hacking session on Guile-FFI for today :>. I just managed
to make eceval compile and even run; it seems to work -- I've done no
real testing however. A nice anecdote: When running eceval in valgrind
(which slows execution down by a factor > 20), the Guile
initialization time is nicely (;-) noticable on my Athlon 900, while
when eceval is running on top of Pika, there is almost no delay before
you get the prompt.

Over the next few days, I'll sort the stuff that is usable for Pika
directly (i.e. the fix for the fixnum/word hashing bug) out of my
changes and provide all code in my archive. I'm also contemplating
over if/when I should announce this to guile-user... :-)

Andy
-- 
Andreas Rottmann         | Rotty@ICQ      | 118634484@ICQ | a.rottmann@gmx.at
http://yi.org/rotty      | GnuPG Key: http://yi.org/rotty/gpg.asc
Fingerprint              | DFB4 4EB4 78A4 5EEE 6219  F228 F92F CFC5 01FD 5B62

Say NO to Software Patents! -- http://petition.eurolinux.org/



From MAILER-DAEMON Sat Jan 31 23:41:02 2004
Received: from list by monty-python.gnu.org with archive (Exim 4.24)
	id 1An9Pq-0006tR-En
	for mharc-pika-dev@gnu.org; Sat, 31 Jan 2004 23:41:02 -0500
Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.24)
	id 1An9Pn-0006sn-Si
	for pika-dev@nongnu.org; Sat, 31 Jan 2004 23:40:59 -0500
Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.24)
	id 1An9PF-0006gA-UQ
	for pika-dev@nongnu.org; Sat, 31 Jan 2004 23:40:58 -0500
Received: from [129.110.10.12] (helo=smtp1.utdallas.edu)
	by monty-python.gnu.org with esmtp (Exim 4.24) id 1An9PF-0006fu-Ja
	for pika-dev@nongnu.org; Sat, 31 Jan 2004 23:40:25 -0500
Received: from kaiser (bluesocket.utdallas.edu [129.110.39.12])
	by smtp1.utdallas.edu (Postfix) with ESMTP id A26CF388CEF;
	Sat, 31 Jan 2004 22:40:24 -0600 (CST)
Received: from jivera by kaiser with local (Exim 3.35 #1 (Debian))
	id 1An2rX-00013S-00; Sat, 31 Jan 2004 22:41:11 +0100
To: Tom Lord <lord@emf.net>
Subject: Re: [Pika-dev] Guile FFI: resizable vector problem
References: <871xpg2ber.fsf@alice.rotty.yi.org> <87smhwcmxz.fsf@flame.org>
	<87wu7728v9.fsf@alice.rotty.yi.org>
	<200401312118.NAA29061@morrowfield.regexps.com>
	<87hdyb249q.fsf@alice.rotty.yi.org>
	<200401312152.NAA29222@morrowfield.regexps.com>
From: Matthew Dempsky <jivera@flame.org>
Date: Sat, 31 Jan 2004 22:41:11 +0100
In-Reply-To: <200401312152.NAA29222@morrowfield.regexps.com> (Tom Lord's
	message of "Sat, 31 Jan 2004 13:52:00 -0800 (PST)")
Message-ID: <871xpfeqyw.fsf@flame.org>
User-Agent: Gnus/5.1006 (Gnus v5.10.6) Emacs/21.3 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Sender: Matthew Dempsky <jivera@utdallas.edu>
Cc: pika-dev@nongnu.org
X-BeenThere: pika-dev@nongnu.org
X-Mailman-Version: 2.1.2
Precedence: list
List-Id: <pika-dev.nongnu.org>
List-Unsubscribe: <http://mail.nongnu.org/mailman/listinfo/pika-dev>,
	<mailto:pika-dev-request@nongnu.org?subject=unsubscribe>
List-Archive: <http://mail.gnu.org/pipermail/pika-dev>
List-Post: <mailto:pika-dev@nongnu.org>
List-Help: <mailto:pika-dev-request@nongnu.org?subject=help>
List-Subscribe: <http://mail.nongnu.org/mailman/listinfo/pika-dev>,
	<mailto:pika-dev-request@nongnu.org?subject=subscribe>
X-List-Received-Date: Sun, 01 Feb 2004 04:41:00 -0000

Tom Lord <lord@emf.net> writes:

> I'm not against the feature-macro idea.  It makes me a _little_
> nervous just because I don't like #ifdef'ed code -- but on the other
> hand, ASCII-only (or iso8859-*-only) optoins would be very winning
> things to provide.

My greatest concern with #ifdef'ed code right now is the issues it
might bring up for the portable binary idea (I still like this idea
for a few reasons, but maybe I'll have to grow out of that later).
Among other solutions, I can think of at least two:

One is that extra functionality that may be present in an
implementation should be included in the standard, but allowed to
return error codes and conforming codes must accomodate for the
possibility of these errors.

The other (inspired by OpenGL) is to provide a function that returns a
string with the names of all the extensions they provide.  Client code
can request this string, search it for specific features, and if
they're available call another function and pass the features name to
return a pointer to the function.  (The user's required to cast the
function pointer appropriately.)  You can think of this as roughly
equivalent to srfi-0 or srfi-7.

-jivera



