need help on Clozure CL/Emacs on Vista

Discussion of programming Lisps using Emacs, including SLIME and other tools

need help on Clozure CL/Emacs on Vista

Postby Maxxum » Wed Jul 01, 2009 8:31 pm

I have been using Macintosh Common Lisp (MCL) for several years. Now I am switching to Clozure CL/Emacs on Windows Vista.

The first problem is I cannot load/compile my files successively. I use (load (compile-file "....")).
* Every .lisp file is "complied" to *.wx64fsl. But every wx64fsl file has size 1KB. I doubt my lisp files are actually compiled.
* When I tried to call some functions in my files, all I get is "undefined function".
* When I enter SLIME, select a function and "compile region", I can successively compile this function.

I am still in the very first stage of this system switch. Very frustrating....I will be very grateful if anyone can provide any tips.

Thanks a lot!!!!!
Maxxum
 
Posts: 6
Joined: Wed Jul 01, 2009 8:28 pm

Re: need help on Clozure CL/Emacs on Vista

Postby nuntius » Thu Jul 02, 2009 1:15 pm

A couple questions:
- What happens if you run CCL from the MSWin command line ("Run Program" "cmd")?
- Does (compile-file filename) print any errors or warnings?
User avatar
nuntius
 
Posts: 498
Joined: Sat Aug 09, 2008 10:44 am
Location: Burlington, MA

Re: need help on Clozure CL/Emacs on Vista

Postby Maxxum » Thu Jul 02, 2009 2:51 pm

It turns out my source code is in MAC format. Clozure on Vista reads unix format by default. But when compiling code in mac format, it does NOT return any error and still generate
object files. Although the size of these dummy object file is very small (< 1KB), it took me a long time to realize that my code has not been successively compiled.

I (compile-file "...." :external-format :macos) and my code is finally successively compiled.

New trouble:

When I run my program, it reads some control file. But my program breaks because the control file cannot be opened or read (not sure)?

This is the input stream when break happens #<BASIC-FILE-CHARACTER-INPUT-STREAM ("D:/CONTROL/control-file.66"/1828 ISO-8859-1) #x141EFE57D>

What is "/1828 ISO-8859-1"? The file path is correct.

Thank you!

nuntius wrote:A couple questions:
- What happens if you run CCL from the MSWin command line ("Run Program" "cmd")?
- Does (compile-file filename) print any errors or warnings?
Maxxum
 
Posts: 6
Joined: Wed Jul 01, 2009 8:28 pm

Re: need help on Clozure CL/Emacs on Vista

Postby gugamilare » Thu Jul 02, 2009 6:29 pm

Maxxum wrote:What is "/1828 ISO-8859-1"? The file path is correct.


I don't know about the /1828, but ISO-8859-1 is a codification standard (like utf-8 / unicode) which is the one used by windows (at least here, in Brazil).
gugamilare
 
Posts: 406
Joined: Sat Mar 07, 2009 6:17 pm
Location: Brazil

Re: need help on Clozure CL/Emacs on Vista

Postby nuntius » Thu Jul 02, 2009 7:44 pm

This stream encoding stuff is getting out of my league wrt CCL. You should probably seek help on openmcl-devel or their IRC channel.
http://trac.clozure.com/openmcl#Support
User avatar
nuntius
 
Posts: 498
Joined: Sat Aug 09, 2008 10:44 am
Location: Burlington, MA

Re: need help on Clozure CL/Emacs on Vista

Postby blandest » Fri Jul 03, 2009 5:33 am

Why don't you just save a copy of the source code and convert these files to the some "good" encoding for Windows ?
I did something similar using this function (works in ccl):

Code: Select all
(defun convert-file-encoding (file-encoding target-encoding file)
  "Converts `file' from `file-encoding' to `target-encoding'"
  (with-open-file (in file
                      :external-format file-encoding
                      :element-type 'character)
    (with-open-file (out (string-downcase
                          (format nil "~A.~A" file target-encoding))
                         :direction :output
                         :external-format target-encoding
                         :if-exists :supersede)
      (loop for line = (read-line in nil)
            while line
            do (princ line out))))
  (values))

You can use #'ccl:describe-character-encodings to list available encodings.
blandest
 
Posts: 19
Joined: Mon Jun 30, 2008 1:22 am

Re: need help on Clozure CL/Emacs on Vista

Postby Wodin » Sat Jul 11, 2009 2:47 pm

Maxxum wrote:When I run my program, it reads some control file. But my program breaks because the control file cannot be opened or read (not sure)?

This is the input stream when break happens #<BASIC-FILE-CHARACTER-INPUT-STREAM ("D:/CONTROL/control-file.66"/1828 ISO-8859-1) #x141EFE57D>

What is "/1828 ISO-8859-1"? The file path is correct.

It looks like it's trying to interpret your control file using the ISO-8859-1 (a.k.a. latin1) character encoding. Maybe your file is not encoded in ISO-8859-1. e.g. it might be in Mac OS Roman encoding or something else.
Wodin
 
Posts: 56
Joined: Sun Jun 29, 2008 8:16 am


Return to Emacs

Who is online

Users browsing this forum: No registered users and 2 guests

cron