complete LISP noob needs some help

Discussion of Common Lisp

complete LISP noob needs some help

Postby psychoguy » Wed Sep 23, 2009 4:29 am

Hello,

I work for the psychology department of an universtiy and have been entrusted with the task to get a Common Lisp program to work. Unfortunately, I don't know anything about LISP, having only studied a semester of computer studies, all I am capable of is a little C and Java. The instructions of how to get the program to run can be found on this page:

http://cogsci.uwaterloo.ca/CoherenceCode/COHERE/COHERE.instructions.html

However, this didn't work for me. we have Windows XP computers here, and I was prompted to replace some filepaths in the source code. I changed it the following way.

From the default:
(load "Sanders HD:LISP:COHERE:Lisp code:utilities.lisp")
to:
(load "C:\\Programme\\Ufasoft\\Lisp\\src\\lisp\\code\\COHERE\\Lisp code\\utilities.lisp")

When I try to run the cohere-start file with Lisp-Studio as instructed I get a "Cell-Error" with which I don't know what to do.
Also, is Lisp-Studio a reasonable compiler?

I know this is asking very much of you guys but I would be happy for any help.
Thanks a lot.
psychoguy
 
Posts: 2
Joined: Wed Sep 23, 2009 4:11 am

Re: complete LISP noob needs some help

Postby Jasper » Wed Sep 23, 2009 3:02 pm

Wtf.. why aren't they just tarballing a bunch of .lisp files.. Why is it mixed in with html... I am not copy-pasting it just to get the code... And look at that code, is it usual to use lisp like that?? It's a bit strange..

Anyway. (Bash sucks btw.) Found html2text with 'aptitude search html2text' (one Ubuntu)
Code: Select all
wget -rl 1 -nv http://cogsci.uwaterloo.ca/CoherenceCode/COHERE/ gets me files
#Get correct directory, the one with the lisp.html files  -width 1000 is because we don't want it to add newlines.
for el in $( ls *.html ); do html2text -width 1000 $el > ${el%".html"}; done;
And now the replacing of Sanders HD... Note that he should have just used the *LOAD-PATHNAME* parameter, or that it defaults to the current path. I just replaced it with the editors' replace utility. Feh.. Now i am where you are.. Removed start-graph as asked..

Then it whines about *PIXELS-PER-INCH* grepping for it shows nothing. It doesn't even use packages.... (Maybe he used USE-PACKAGE to use libs, but not in the source..) Btw there is (IN-PACKAGE 'USER) in there, SBCL doesn't think that is right, but according to this, it is acceptable. (I guess, i'd only allow keyword symbols and maybe packageless symbols..) He also REQUIRE's some stuff, and i don't know where to find those libraries...
Jasper
 
Posts: 209
Joined: Fri Oct 10, 2008 8:22 am
Location: Eindhoven, The Netherlands

Re: complete LISP noob needs some help

Postby psychoguy » Thu Sep 24, 2009 1:06 am

Hey Jasper,
thanks for your effort. It seems like the given code isn't very well suited for replicating it on another computer then. By what you say it seems like the guys writing the code weren't expecting the code to be spread and therefore didn't write it cleanly. I guess I will tell my boss this, we will have to look for another way to deal with our problem then.
Thanks again.
psychoguy
 
Posts: 2
Joined: Wed Sep 23, 2009 4:11 am

Re: complete LISP noob needs some help

Postby TheGZeus » Thu Sep 24, 2009 4:57 am

psychoguy wrote:Hey Jasper,
thanks for your effort. It seems like the given code isn't very well suited for replicating it on another computer then. By what you say it seems like the guys writing the code weren't expecting the code to be spread and therefore didn't write it cleanly. I guess I will tell my boss this, we will have to look for another way to deal with our problem then.
Thanks again.

I think the biggest problem is that you're in dependency hell.
TheGZeus
 
Posts: 79
Joined: Mon Jun 30, 2008 10:46 am

Re: complete LISP noob needs some help

Postby Jasper » Thu Sep 24, 2009 9:31 am

Might not be a good idea to give up yet, i am not good in getting other peoples stuff going. And i pretty much got no further then you.

It may be a good idea to try find different software, not sure.. Maybe Macintosh Common LISP has the variable i am missing.(But you'd expect that in a package you'd need to 'activate' :? ) From wikipedia page Closure CL used to implement it, and also some other ones. That needn't mean that trying those will actually work, though. Could still be worth a shot.

Unless there are better implementations of what you want out there.. dunno, sounds pretty specific! Actually don't even really know what it does.
Jasper
 
Posts: 209
Joined: Fri Oct 10, 2008 8:22 am
Location: Eindhoven, The Netherlands

Solution

Postby nuntius » Thu Sep 24, 2009 7:15 pm

The original author does not appear to be a professional programmer. I resolved a number of issues, and an updated version of cohere is available at
http://libcl.com/tmp/cohere.zip

Note that I renamed cohere-start.lisp to start.lisp, and an example named "real" to "metareal"; but otherwise this should be good to go on most systems with no modifications required. Also note that some of the examples need to be fixed; for instance, cg-hot tries calling functions which are never defined...

As for compilers, I would recommend a beginner to start with Clisp or Clozure on Windows. If you have a budget, then Allegro, Corman, or LispWorks are also good. For more info, see
http://common-lisp.net/~dlw/LispSurvey.html

Hope that helps,
Daniel
User avatar
nuntius
 
Posts: 500
Joined: Sat Aug 09, 2008 10:44 am
Location: Burlington, MA


Return to Common Lisp

Who is online

Users browsing this forum: No registered users and 3 guests