From leavens@cs.iastate.edu Tue Jan 13 21:15:55 2004 Date: Tue, 13 Jan 2004 17:38:43 -0600 (CST) From: Gary T. Leavens To: Michael McCown Cc: cs342s@cs.iastate.edu Subject: Re: Scheme Interpreters Hi Michael, On Tue, 13 Jan 2004, Michael McCown wrote: > I have a mac that runs on Unix and would like to do my coding on my > laptop if possible. Will any of the following interpreters from the > following page work for our class? > > http://elvis.rowan.edu/~nlt/interpreters.html I think that both SCM and Dr. Scheme work with the Mac. I'm sure that SCM works with the type checker I have for Scheme, so that would be my choice. If you figure out how to compile that for the Mac, let me know. -- Gary T. Leavens Department of Computer Science, Iowa State University 229 Atanasoff Hall, Ames, Iowa 50011-1041 USA http://www.cs.iastate.edu/~leavens phone: +1-515-294-1580 ------------------------------------------- From leavens@cs.iastate.edu Tue Jan 13 23:07:01 2004 Date: Tue, 13 Jan 2004 23:02:41 -0600 (CST) From: Gary T. Leavens To: Jia-Zhen Lee Cc: Computer Science 342 Staff Subject: Re: Recitation Hi Jia-Zhen, On Tue, 13 Jan 2004 Jia-Zhen@iastate.edu wrote: > This is certainly an age old question and i apologize if this has been announced > already; > is there Recitation for the first week? Yes, we wil have discussion sections on the 14th. -- Gary T. Leavens Department of Computer Science, Iowa State University 229 Atanasoff Hall, Ames, Iowa 50011-1041 USA http://www.cs.iastate.edu/~leavens phone: +1-515-294-1580 -------------------------------------- From leavens@cs.iastate.edu Tue Jan 13 23:16:57 2004 Date: Tue, 13 Jan 2004 23:16:38 -0600 (CST) From: Gary T. Leavens To: cindyhsu@iastate.edu Cc: cs342s@cs.iastate.edu Subject: Re: login file? Hi Cindy, On Tue, 13 Jan 2004 cindyhsu@iastate.edu wrote: > Little questions at #5 of the homework. > > (If you use tcsh or csh instead of bash, then put the following > line in your ~/.login file, so that when you type > $PUB in the shell it expands to /home/course/cs342/public > > setenv PUB "/home/course/cs342/public" > > To see this working, you'll have to log out and then log back in. > Do that, then try the ls $PUB command, to demonstrate that it's working.) > > What is the login file? Where is it? It should be a file named ".login" in your home directory (i.e., ~). If you do the following commands: cd ls .login then you should see the .login file repeated by the ls command. If you are using tcsh or csh, creat it first. When I type it at the prompt, it gives me this: > popeye:~> ~/.login > /home/ugrad1/cindy/.login: Permission denied. That should be okay. To see the contents, you can use a program, like emacs to edit it: emacs .login or use "less" or "cat" to view it. > Also, when I set PUB, after I log out and log back in, it actually forgets everything. I > don't know if it's because I didn't put the line in my login file (which hopefully I can > know what is that file later). Looking at the file contents should tell you the answer. But the problem may be that you are not using tcsh or csh as your shell, but instead are using bash (which is the default). To check it do echo $SHELL at the command prompt. That should tell you which you are using. You can change it using the "chsh" command if you want. -- Gary T. Leavens Department of Computer Science, Iowa State University 229 Atanasoff Hall, Ames, Iowa 50011-1041 USA http://www.cs.iastate.edu/~leavens phone: +1-515-294-1580 ------------------------------------- From leavens@cs.iastate.edu Tue Jan 13 23:54:14 2004 Date: Tue, 13 Jan 2004 23:53:56 -0600 (CST) From: Gary T. Leavens To: Jason Cook Cc: cs342s@cs.iastate.edu Subject: Re: HW0 Question Hi Jason, On Tue, 13 Jan 2004, Jason Cook wrote: > In HW0 when we are supposed to load the scheme interpreter using: > > (load "simple-interpreter.scm") > > I get the following message: > > Error: variable println is not bound. (Don't you mean "displayln", not "println"?) > I know it says in the assingment that if we get an error to go back and > correct the file, but how do we do that to fix this problem? I tried looking > in Little Schemer to see if I could find anything that would cause this and I > could not. Can you please give some guidance? Anyway, this was a problem with the scripts used to run Scheme on the department machines. This is now fixed, so please try again and let me know if it doesn't work. Thanks. -- Gary T. Leavens Department of Computer Science, Iowa State University 229 Atanasoff Hall, Ames, Iowa 50011-1041 USA http://www.cs.iastate.edu/~leavens phone: +1-515-294-1580 ------------------------------------- From leavens@cs.iastate.edu Wed Jan 14 14:47:36 2004 Date: Wed, 14 Jan 2004 14:47:18 -0600 (CST) From: Gary T. Leavens To: Cindy Hsu Cc: Computer Science 342 Staff Subject: Re: Let me make sure what's due on Thursday. Hi Cindy, On Wed, 14 Jan 2004 cindyhsu@iastate.edu wrote: > So on Thursday, we need to hand in a piece of paper with #2 answers, and .login > file, .emacs file, simple-interpreter.scm and simple-interpreter.out print-outs. Is that > right? Yes, that sounds right to me. -- Gary T. Leavens Department of Computer Science, Iowa State University 229 Atanasoff Hall, Ames, Iowa 50011-1041 USA http://www.cs.iastate.edu/~leavens phone: +1-515-294-1580 ------------------------------------ From leavens@cs.iastate.edu Wed Jan 14 16:39:41 2004 Date: Wed, 14 Jan 2004 16:38:40 -0600 (CST) From: Gary T. Leavens To: irisch@iastate.edu Cc: cs342s@cs.iastate.edu Subject: Re: bash problem,please Hi Iris, On Wed, 14 Jan 2004 irisch@iastate.edu wrote: > I don't understand what hw5(a) should be done, > Could you please tell me where I am wrong on fllowing lines?Thank you very much. > > I am in the bash shell: > > popeye:~> ls ./bash_profile > ls: ./bash_profile: No such file or directory > popeye:~> ls ~/bash_profile > ls: /home/ugrad1/iris/bash_profile: No such file or directory > popeye:~> ls /bash_profile > ls: /bash_profile: No such file or directory > popeye:~> ls .bash_profile > .bash_profile > > where should I put fllowing two lines? > PUB="/home/course/cs342/public" > export PUB You'll have to make a new file ~/.bash_profile to hold those lines if you are using bash and don't have such a file already. -- Gary T. Leavens Department of Computer Science, Iowa State University 229 Atanasoff Hall, Ames, Iowa 50011-1041 USA http://www.cs.iastate.edu/~leavens phone: +1-515-294-1580 ----------------------------------------- From leavens@cs.iastate.edu Thu Jan 15 00:22:07 2004 Date: Thu, 15 Jan 2004 00:20:27 -0600 (CST) From: Gary T. Leavens To: Luan Chan Cc: cs342s@cs.iastate.edu Subject: Re: Problem gettings scheme to work on home machine.. Hi Luan, It looks like you have done the right things, but there must be something wrong. I have never tried using this from the "Program Files" directory, and the space in that name often causes some problems. You might try moving everything to C:\Scheme or some such directory and seeing if that works. The other thing to check is that scripts are correct and naming the correct files in the correct directories. If you use my batch files, be sure to get the right drive letter. On Wed, 14 Jan 2004, Luan Chan wrote: > Hello; > > I'm having problems getting scheme to work on my home machine. I installed Chez Scheme > and unzipped the > class libraries into the lib directory of Chez Scheme and unzipped slib into the Chez > Scheme directory. I > also changed the localize.scm (which I'm assuming goes into the lib dir) to look like > this: > > ;;; $Id: localize.scm,v 1.9 2004/01/14 05:51:19 leavens Exp $ > ;;; Local customizations for running EOPL 2e. > > ;;; Be sure to change the following two paths > ;;; Use forward slashes in both and leave a / at the end of both. > (define *cs342:libdir* "C:/Program Files/ChezScheme/lib/") > (define *cs342:hwdir* "C:/Program Files/ChezScheme/homework/") > > ;;; Also define the following, use forward slasheds, > ;;; but don't put a / at the end of this > (define *cs342:scheme-implementation-vicinity* "C:/Program Files/ChezScheme/slib") > > (load (string-append *cs342:libdir* "load-from-lib.scm")) > (load-from-lib "displayln.scm") > (load-from-lib "test-homework.scm") > > However when I write the code for simple-interpretor.scm and try to load it using > ChezScheme I keep getting > an error: Error:variable displayln is not bound. > > This also happens when I try using scm. -- Gary T. Leavens Department of Computer Science, Iowa State University 229 Atanasoff Hall, Ames, Iowa 50011-1041 USA http://www.cs.iastate.edu/~leavens phone: +1-515-294-1580 ---------------------------------- From leavens@cs.iastate.edu Thu Jan 15 17:58:25 2004 Date: Thu, 15 Jan 2004 17:57:52 -0600 (CST) From: Gary T. Leavens To: Corey Mitchell Cc: cs342s@cs.iastate.edu Subject: Re: hw0 # 8 On Thu, 15 Jan 2004, Corey Mitchell wrote: > when loading simple-interpreter.scm it I get > Error:variable simple-arith-expr.scm is not bound. > > Does anyone know what this means? Yes, it means that you forgot to put double quotes around the file name. You wrote: > (load simple-interpreter.scm) Error: variable simple-interpreter.scm is not bound. Type (debug) to enter the debugger. When you meant to write: > (load "simple-interpreter.scm") loading /home/course/cs342/public/lib/simple-interpreter.scm ... -- Gary T. Leavens Department of Computer Science, Iowa State University 229 Atanasoff Hall, Ames, Iowa 50011-1041 USA http://www.cs.iastate.edu/~leavens phone: +1-515-294-1580 ----------------------------------------------- From leavens@cs.iastate.edu Thu Jan 15 21:04:36 2004 Date: Thu, 15 Jan 2004 17:57:52 -0600 (CST) From: Gary T. Leavens To: Corey Mitchell Cc: cs342s@cs.iastate.edu Subject: Re: hw0 # 8 On Thu, 15 Jan 2004, Corey Mitchell wrote: > when loading simple-interpreter.scm it I get > Error:variable simple-arith-expr.scm is not bound. > > Does anyone know what this means? Yes, it means that you forgot to put double quotes around the file name. You wrote: > (load simple-interpreter.scm) Error: variable simple-interpreter.scm is not bound. Type (debug) to enter the debugger. When you meant to write: > (load "simple-interpreter.scm") loading /home/course/cs342/public/lib/simple-interpreter.scm ... -- Gary T. Leavens Department of Computer Science, Iowa State University 229 Atanasoff Hall, Ames, Iowa 50011-1041 USA http://www.cs.iastate.edu/~leavens phone: +1-515-294-1580 ------------------------------------------------ From leavens@cs.iastate.edu Wed Jan 21 15:15:52 2004 Date: Wed, 21 Jan 2004 15:12:27 -0600 (CST) From: Gary T. Leavens To: Jia-Zhen Lee Cc: Computer Science 342 Staff Subject: Re: Extra Credit from Homework 0 Hi Jia-Zhen, Lee, On Wed, 21 Jan 2004 Jia-Zhen@iastate.edu wrote: > I have a question about the Extra Credit question from Homework 0, Question 13. > Is the document in question this one? > http://www.cs.iastate.edu/~cs342/docs/c++-translation.txt Yes. > Also do we have to change the entire document or just make a table? You can either edit a copy of the document or make a table. Which ever you think is clearest. -- Gary T. Leavens Department of Computer Science, Iowa State University 229 Atanasoff Hall, Ames, Iowa 50011-1041 USA http://www.cs.iastate.edu/~leavens phone: +1-515-294-1580 -------------------------------------