From leavens@larch.cs.iastate.edu Thu Jan 19 21:57:28 2006 Date: Thu, 19 Jan 2006 21:57:28 -0600 (CST) From: Gary T. Leavens To: Stephen Morgan Cc: Com S 342 TAs -- Kewei Tu , Ru He Subject: Re: hw2? Hi Stephen, On Thu, 19 Jan 2006, Stephen Morgan wrote: > I just wanted to know exactly what you meen when you say "transcript of its > testing" in hw2. I assume you mean homework one (we started numbering homeworks from zero). A "transcript of its testing" means a printout of the DrScheme interactions window that shows how you tested the problem. (This assumes you are using DrScheme.) Does that help? 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@larch.cs.iastate.edu Fri Jan 20 10:10:27 2006 Date: Fri, 20 Jan 2006 10:10:27 -0600 (CST) From: Gary T. Leavens To: Chris Cornelison Cc: Com S 342 TAs -- Kewei Tu , Ru He Subject: Re: CS342 - HW1 Hi Chris, On Fri, 20 Jan 2006, Chris Cornelison wrote: > In problem 1b, are you looking for a precise algorithm to change infix > to prefix, or a less formal statement describing the process in terms of > recursion (i.e. starting with outer most expression move operator, and > then recursively do the same for subexpressions)? I'm not looking for a precise formally specified algorithm. A general description that conveys the idea clearly is fine. 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@larch.cs.iastate.edu Sat Jan 21 14:03:06 2006 Date: Sat, 21 Jan 2006 14:03:06 -0600 (CST) From: Gary T. Leavens To: Nick Retzl Cc: Com S 342 TAs -- Kewei Tu , Ru He Subject: Re: CS 342 HW1 Question Hi Nick, On Sat, 21 Jan 2006, Nick Retzl wrote: > Could you explain differently what you want in 1d, 1e, and 1f? I'm just a > little confused what exactly you want for these parts of problem number one. > Any help would be appreciated. Thanks. First, be sure to do the readings in the homework: STRUCTURE AND INTERPRETATION OF COMPUTER PROGRAMS (Sections 1.1.1-1.1.6, 2.2.1-2.2.2, and 2.3.1) THE LITTLE SCHEMER (p. xiii, chapter 1) REVISED^5 REPORT ON THE ALGORITHMIC LANGUAGE SCHEME (Sections 1 [Overview], and 6.1-6.3 [Standard Procedures]) When working in DrScheme, for all of these parts, you would use the interactions window. For part d, I want you to write an if-expression whose value is the value of pi, because that is larger than the value of e. This expression should use both e and pi. An if-expression has the form (if t c a) in Scheme, where t, c, and a are expressions. For part e, the expression should return the value of e, because that is smaller than pi. This expression should also use both e and pi and be an if-expression. For part f you are to write an expression that returns a Boolean, which in this case will be #f, but should look like it is testing the equality of e and pi. This expression cannot use if or cond, but must use both e and pi. Don't try to make these problems harder than they are also. They're really quite simple. 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@larch.cs.iastate.edu Sat Jan 21 16:26:07 2006 Date: Sat, 21 Jan 2006 16:26:07 -0600 (CST) From: Gary T. Leavens To: bkshmidt@cs.iastate.edu Cc: Com S 342 TAs -- Kewei Tu , Ru He Subject: Re: COMS 342 hw1 problems Hi Brian, On Sat, 21 Jan 2006 bkshmidt@cs.iastate.edu wrote: > I am running into some problems with hw1 problem 1.i when running on my home > computer. When using the Language: Typedscm, typed extension to EoPL(2e) and > running the following: > (displayln (list 'sentence #\newline > #\space #\space (list [rest omitted by Gary...]))) > > I get: > > Welcome to DrScheme, version 301. > Language: Typedscm, typed extension to EoPL(2e). > Teachpack: C:\Program Files\PLT\teachpack\drscheme-342-teachpack.scm. > (sentence > (np (noun fred)) > (vp (verb sells) > (object it))) You shouldn't put the #\newline and #\space characters into the list, the problem only asks you to make the values given, not to get them to display like shown in the problem. Also, you are not supposed to use displayln in the problem, just make a value, and let Scheme display it. To clarify, I'm adding the following to the statement of problem 1(i): (Note that the line breaks and indentation in the last of these lists does not matter; the interpreter will print out the value of your answer without this indentation, which is OK. We are asking for you to create the values displayed below, not the printing displayed below.) > However when running Language: Essentials of Programming Languages (2nd ed.) I > run: > (list 'sentence > (list 'np [rest omitted by Gary...]))) > > And I get: > Welcome to DrScheme, version 301. > Language: Essentials of Programming Languages (2nd ed.). > Teachpack: C:\Program Files\PLT\teachpack\drscheme-342-teachpack.scm. > (sentence (np (noun fred)) (vp (verb sells) (object it))) That's fine. > I attempted to use the #\newline and #\space definitions however they seemed not > to be defined in this package. No, those are built-in, but what is not present is "displayln". > The questions I have are a) Which language should I be using? the Essentials of > Programming Languages or Typedscm, typed extension to EoPL(2e)? You should be using the Typedscm, typed extension to EoPL(2e), as described in homework 0. 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@larch.cs.iastate.edu Mon Jan 23 13:07:06 2006 Date: Mon, 23 Jan 2006 13:07:05 -0600 (CST) From: Gary T. Leavens To: Com S 342 , Com S 342 TAs -- Kewei Tu , Ru He Subject: In the Com S labs, use the linux machines for DrScheme, not Windows Hi all, Nandita pointed out to me that the PCs running windows in 116a Atanasoff don't have DrScheme configured as we would like for 342 this semester. So if you are wanting to use DrScheme on a department machine, please use one of the Linux machines in 115 Atanasoff instead. 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@larch.cs.iastate.edu Tue Jan 24 00:33:28 2006 Date: Tue, 24 Jan 2006 00:33:28 -0600 (CST) From: Gary T. Leavens To: gqiu@cs.iastate.edu Subject: Re: COMS 342: homework 1 Hi Grace, On Tue, 24 Jan 2006 gqiu@cs.iastate.edu wrote: > I'm not sure what you mean by "a transcript that includes our tests." I just get > something along the lines of: > > Test case of $Date: 2005/01/18 03:02:04 $ > > All tests passed! > > Are we simply printing out that part? Yes. However, if you want to see more use (show-test-output!) before running the tests. See http://www.cs.iastate.edu/~leavens/ComS342/library.shtml#testing for more information. 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 ------------------------------