[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Schemix-devel] Re: Some big changes in CVS
From: |
David Suárez de Lis |
Subject: |
[Schemix-devel] Re: Some big changes in CVS |
Date: |
Sun, 18 May 2003 02:07:40 +0200 |
All,
Dr William Bland writes:
On Fri, May 16, 2003 at 09:28:17PM +0200, Detlev Zundel wrote:
Hi David,
> any particular place to get the kallsyms patch? I'm searching the kernel
> archives, but it's kinda noisy and hard to follow...
I don't know if this patch[1] applies any longer, but it looks quite
generic as mostly only the link files have to be patched.
That looks like the patch I used. I had to modify it very slightly to get
it to apply, but it wasn't difficult.
Actually, my 2.4.20 kallsyms.h file is about 5kb (the patch specifies about
2kb, and patch reports a reverse patching, so I guess it's been already
patched several times)
I also wanted to check the R5RS compliance. The first things I would
check are true tail recursion, R5RS macro system (define-syntax ..),
and support for all numeric types.
Some things you'll want to note:
1) I took out TinyScheme's support for floating point numbers since the
Linux kernel implementation of sscanf / sprintf can't read or print
floating point numbers. I thought it would be pretty useless to have
support for them if they can't be read or written ;-)
I don't think this is very important, but it would be a good thing to add
this support later on... do complex numbers work with integer arguments?
also, does it support arbitrarily long integers, as required by R5RS?
I have to study for an unexpected irish gaelic exam next week, but I'll keep
on reading schemix for compliance, etc, I'll just go much slowly...
2) Tail recursion looks good to me so far. I only did some simple tests,
but the Linux kernel's stack is very small (can't remember the size off
the top of my head) and I believe I would have smashed it if TinyScheme
(and hence) Schemix wasn't properly tail-recursive. My tests might
have been too simple-minded though.
I'll concentrate on this code to be sure (once I have a working schemix, of
course, but will install TinyScheme to check their original code anyway, as
it can give some hints about this...)
Proper tail-recursion is probably vital, as the stack is pretty small and
scheme idioms work much better through recursion, even when it's possible to
use iterations, but so unelegant...
3) TinyScheme's macros don't look like R5RS's to me. In the init.scm file
that is distributed with TinyScheme, several macros are defined which
you can use to give you an idea of how TinyScheme's macro system works.
For example:
(macro (when form)
`(if ,(cadr form) (begin ,@(cddr form))))
This is is fairly intuitive, but possibly not as powerful as R5RS. I
have to admit I don't know enough about R5RS's hygenic macros to know
how far they differ from TinyScheme's macro facility.
well, at first look, they do look pretty different... That macro looks more
like R4RS macros to me (or even Common Lisp ones). I found R4RS macros
easier to write and understand, but R5RS are much more powerful and deal
with symbol-collision in a better way, plus expression expansion is
guaranteed not to collide with your symbols, which is a Good Thing.
Reading a FAQ the other day, 'will there be a R6RS?' the reply was that R5RS
was such a good document, most changes were being conducted through SRFIs,
and after watching them, I don't think R6RS will be written before 5 or more
years... One would thing would be IEE adopting R5RS and the bigger SRFIs as
the standard Scheme, it would make it easier to push into some kind of
projects...
4) I would also sugest checking continuations. They are notoriously hard
to implement correctly and I'd be rather suprised if TinyScheme got
everything perfectly right!
yes, continuations *do* look hard to implement (never tried)... good thing
is that I have sources for 5 or 6 different implementations, we can probably
do a cross-check.
5) Schemix doesn't have most of the R5RS functions for dealing with ports.
This is actually intentional: Opening files from the kernel is possible
(obviously!) but I'm not convinced it's a good idea for Schemix to do
it.
I don't think this is critical as for what's R5RS compliant or not, this is
not a general purpose scheme after all...
Best wishes,
Bill.
best regards,
david