[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: P-Lisp and Book



rtk wrote:
On Jun 28, 6:56 pm, "Michael J. Mahon" <mjma...@aol.com> wrote:

MuLISP is another possibility--and it has indefinite precision integers
and rational arithmetic!


True.  I have MuMath somewhere but I don't recall that it was able to
actually "use" the Apple II system, ie, nothing like PEEK and POKE and
CALL.  But, it has been many years since I looked at it so my memory
might be off.

But it was easily extensible, I'm sure.

I have started playing with P-Lisp a bit.  I created a base memory
image that includes a (loadfile ...) function to load source code from
disk.  It is simplistic and will load all the lists in the file until
it simply gets an end of file error.  Then it jumps back to the P-Lisp
interpreter with the loaded definitions intact.  Good enough for me.

Funny you should mention rational arithmetic.  That is the first thing
I'm going to do with P-Lisp, to make grading math homework for my kids
that much easier.  I had a similar "rational" calculator in Modula-2
for my old Kaypro but the computer died a long time ago.  Yes,
arithmetic with fractions is simple, but it does get tedious when you
have to do it 20-30 times per lesson.  (For the kids it isn't tedious,
they are learning it and once they do, they will be grateful,
right? :)  I'm being as simple as possible:

1/2 becomes (1 2)
22/7 becomes (22 7)
1 2/3 becomes (1 2 3)

so,  1/2 + 2/3 becomes (pp (+ (1 2) (2 3)))  where (pp ...) is a
function that "pretty prints" the answer, properly reduced, of course!

Now, all I need is a simple text editor that runs under DOS 3.3
(AppleWriter is overkill).  The "editor" included with P-Lisp is too
primitive, even for me.  So, I think I'll hack something together in
Applesoft.  It's a good excuse, after all.  Once I have something that
might be useful (?) I'll put it on my website and mention it here.

Sounds good!

-michael

AppleCrate: An Apple II "blade server"!
Home page:  http://members.aol.com/MJMahon/

"The wastebasket is our most important design
tool--and it's seriously underused."