Subject: [clisp-list] how to get clisp for MAC OSX ?

From: [email-masked] (Don Cohen)
Date: Tue Mar 30 18:34:01 2004

I found something that had "darwin" and PPC in the title.
Is that MAC OSX ?
When I download it I end up with something similiar to what
I expect in unix.
The instructions say "make".
But where's make?
If I get into a shell I don't see any evidence of such a thing.
I don't see and cc either.
Is this pre built binary stuff only usable by people who 
download some extensive "development environment" ?
How do I get that?  Is there a list of what I need?

---

From: Pascal J.Bourguignon <[email-masked]>
Date: Tue Mar 30 22:16:00 2004

> When I download it I end up with something similiar to what

Not surprizing, since MacOSX IS UNIX!
(MacOSX runs on Darwin and Darwin is a FreeBSD derivative).

> How do I get that?  Is there a list of what I need?

You would have to install the Developer tools, provided in separate
packages on the MacOSX installation media.

-- 
__Pascal_Bourguignon__                     http://www.informatimago.com/
There is no worse tyranny than to force a man to pay for what he doesn't
want merely because you think it would be good for him.--Robert Heinlein
http://www.theadvocates.org/

---

From: [email-masked] (Don Cohen)
Date: Tue Mar 30 22:30:00 2004

> packages on the MacOSX installation media.

What would go wrong if one person who had installed these tools did
the make and let everyone else copy his executable?
Given that the default installation seems NOT to include these tools,
it seems like that would be a reasonable way to distribute binaries
if it works.

---

From: Pascal J.Bourguignon <[email-masked]>
Date: Tue Mar 30 23:34:09 2004

> it seems like that would be a reasonable way to distribute binaries

Not much.  Well, a little more on Darwin\MacOSX than on Linux (the
system libraries seem to change a lot between each versions).

But the biggest problem is that the user is given a lot of choices at
compile-time by clisp: you can choose the modules you compile in, and
various other options. 

You can fetch a compiled binary with fink, but the latest version
available is 2.29 while we're at 2.33.

Anyway, a computer without a compiler IS NOT a computer.  
Go and install the developer tools!

---

From: [email-masked] (Don Cohen)
Date: Wed Mar 31 16:05:08 2004

> available is 2.29 while we're at 2.33.
I eventually managed to do this ...

 > Go and install the developer tools!
You imagine it's my computer!
Anyhow, it now has a lisp compiler.

Now I'm trying to use foreign characers.
I see the characters on the screen and can even read and write them
on files.
But when I ask the length of a string I get 2 x the number of
characters, i.e., the number of bytes.  Is that the way it's supposed
to work?  (Or related to 2.29 instead of 2.33 ?)
When I ask for individual characters I always get 8 bit characters.

---

From: Pascal J.Bourguignon <[email-masked]>
Date: Wed Mar 31 17:43:01 2004

> When I ask for individual characters I always get 8 bit characters.

First, check if clisp 2.29 from fink has been compiled with unicode support:

(MEMBER :UNICODE *FEATURES*)  shoud not be NIL.

Then you should launch clisp with one ore more -E options specifying
the encoding(s) you want to use, or set the encoding custom variables:

CUSTOM:*PATHNAME-ENCODING*
CUSTOM:*DEFAULT-FILE-ENCODING*
CUSTOM:*MISC-ENCODING*
CUSTOM:*FOREIGN-ENCODING*

http://clisp.cons.org/impnotes/clisp.html#opt-enc
http://clisp.cons.org/impnotes/encoding.html

For example, to work in ISO-8895-1 encoding 
(no need for unicode support in that case):

    clisp -ansi -q -K full -m 32M -I -E ISO-8859-1

to work in UTF-8 (unicode) encoding, but with files names encoded in
ISO-8859-1:

    clisp -ansi -q -K full -m 32M -I -E UTF-8 -Efile ISO-8859-1

To read a line from a japanese unix file:

   (with-open-file (jp-in "japanese.iso2022-jp" :direction :input
                          :external-format (ext:make-encoding
                                             :charset charset:ISO-2022-JP
                                             :line-terminator :unix))
       (print (read-line jp-in)))

-- 
__PASCAL_Bourguignon__                     http://www.informatimago.com/
There is no worse tyranny than to force a man to pay for what he doesn't
want merely because you think it would be good for him.--Robert Heinlein
http://www.theadvocates.org/