Re: Scheme Efficiency (was Re: Limitations of Inform and TADS?)


Tue, 14 Nov 1995 12:36:32 GMT

-----BEGIN PGP SIGNED MESSAGE-----

In an arcane scroll, Alexander Williams quotes the holy scripturist
Greg Ewing, replying to the mystic words as written, saying:

>|> I certainly agree that Scheme can be small. I don't think it can be as
>|> fast as a good implementation of a language like C for most tasks, though.

Actually, for tasks heavy in symbolic manipulation which allocate
and deallocate objects with some steady parameters, Scheme can be
/faster/, on the whole, than C, especially once development time is
taken into consideration. IF, at heart, is not much /more/ than
symbolic manipulation, so things start looking really happy once you
consider using it for IF.

>True, but I don't think it need be any worse than, for
>example, the TADS interpreter. So it would be possible
>to have a Scheme-based IF system that wasn't any less
>efficient than what everyone is using now.

It seems to me that J Random Scheme (maybe Scheme48) should be
able to have the YASOS Scheme object-system plugged onto the front
of it and the appropriate inheritable-objects created (starting with
the hierarchial `thing' with the global code and traits, frfom which
`room' and `object' are inherited and add on their especial natures,
and so on). With closures, it should be easy to add on behaviours,
even without access to internals (though you could modify the source
library as well).
I suppose the real question is how would you distribute the
runnable file? Written Scheme-generic enough, you could develop
under Scheme48 or whichever your prefered platform is and then run
it through Bigloo or Scheme->C to create a native code binary (or
just leave it as C source). Of course, my experiments with Bigloo
suggest that it will create a minimum 400k executable for anything
that does more than one or two things, so ...
[It occurs to me that writing a native-code version of the S48
virtual machine shouldn't be too hard; in fact, most of the work's
done in S48 already to run at all. Just migrate the VM emulator
from platform to platform and you can use the very same
virtual-image dump on every platform for your game.]

-----BEGIN PGP SIGNATURE-----
Version: 2.6.2i
Comment: Auto-signed with Bryce's Auto-PGP v1.0beta3

iQCVAwUBMKiNPF6rnc26j4NHAQFS/wQAo98YxcGUsmR8yucc+80k06UEMI9AbZYN
8778NfqvRd1xfHs2fY4t4rHshRIRjodsk6pxWSyhhzOQrRumQ7GzSqtIsDxQM4lZ
vCy082cMarqJ3OQWZFQ/pAKy5ux/VqAIBkWHF7E6MkYeGQQQbY4fxqWUo6tqqkQH
mi2ER5ULdho=
=+Ax6
-----END PGP SIGNATURE-----

-- 
=  2.6 key avail: DF 22 16 CE CA 7F 98 47 13 EE 8E EC 9C 2D 9B 9B  =
===   <a href="http://photobooks.com/~zander/">Home Page</a>     ===
=``Two Shiva-class Battleships flying ground-support missions ?!?''=
====================================================================