Useful Links
Books to which we refer in class
-
Structure and Interpretation of Computer Programs, by H. Abelson and G.J. Sussman, MIT Press, 2nd edition, 1996. Available online in pdf or html.
-
How to Design Programs, by M. Felleisen, R.B. Findler, M. Flatt and S. Krishnamurthi, MIT Press, 2003. Available online http://www.htdp.org/
-
Programming Languages: Application and Interpretation, by S. Krishnamurthi, 2nd edition 2012. Available online https://www.plai.org/
-
The Art of Prolog by L. Sterling and E. Shapiro, 2nd edition MIT Press, 1994. Available online https://mitpress.mit.edu/books/art-prolog-second-edition (under the Open Access tab)
-
Essentials of Programming Languages, by D.P. Friedman and M.Wand, 3rd edition, MIT Press, 2008.
-
Programming and Programming Languages, by Shriram Krishnamurthi, Benjamin S. Lerner, Joe Gibbs Politz, 2019. Available online https://papl.cs.brown.edu/2019/
-
Professor Frisby’s Mostly Adequate Guide to Functional Programming, Mostly Adequate team, 2020, Available online https://mostly-adequate.gitbooks.io/mostly-adequate-guide/
-
Recursive Functions of Symbolic Expressions and Their Computation by Machine, Part I John McCarthy, Communications of the ACM, April 1960, Available online http://www-formal.stanford.edu/jmc/recursive.pdf.
Software
This section contains links to installations of the programming languages used in this course. These links may be useful if you intend to develop programs in these languages on computers that are not CS lab computers.
The instructions for installations are similar for Windows, Linux and MacOS (using a command line shell).
Node / TypeScript
The full installation and configuration guide can be seen here (the video shows older versions of VS Code and Node, but the setup should still be relevant).
- Download node.js from https://nodejs.org and install the LTS version (18).
- Download VS Code from https://code.visualstudio.com/ and install.
- Open command prompt by clicking on Start and typing
cmd
. - Make sure node is installed by running
node -v
. The expected output should start with ‘v18.’. - Globally install Typescript’s compiler and REPL
npm i -g ts-node typescript
. - Make sure Typescript is installed by running
tsc -v
. The expected output should start with ‘4.5’. - Navigate to a directory you want to create your projects in (e.g., ‘Desktop\ppl’).
- Open VS Code in this foler using
code .
- Open the “Extensions” panel (
ctrl-shift-x
) and search for “runner”. - Install the “Code Runner” extension.
- Open the “Explorer” panel (
ctrl-shift-E
) and select “New Folder” and name the new folderhw
. - Right-click on the new folder and select
open in the integrated terminal
. - Initialize
npm
in this directory usingnpm init -y
in the terminal (this will create apackage.json
file in thehw
folder) - Run
npm i ramda
to install theramda
library as a runtime dependency for this project. - Run
npm i -D typescript @types/ramda
to install development/compiletime dependencies for this project. - Right click
hw
and select “New File”. Call ithw1.ts
. - In the newly created file, type
console.log("Hello, world");
, save using Ctrl+S, and run using Ctrl+Alt+N. You should see “Hello, world” on the screen. - Check
ramda
is properly installed by adding to the top of your file the lineimport { map } from "ramda";
and change yourconsole.log("Hello, world");
toconsole.log(map(x => x * x, [1, 2, 3, 4]));
. Again, save using Ctrl+S, and run using Ctrl+Alt+N. You should see[1, 4, 9, 16]
on the screen.
Note: every assignment that has TypeScript coding in it will come with a predefined package.json
which specifies the packages and package versions for the assignment. For every assignment, extract the files in a new folder, open a cmd
in that folder, and run npm i
. This will install all necessary packages for the assignment.
Visual Studio Live Share
In order to work on the assignments in pairs, we recommend using the Visual Studio Live Share extension. A short tutorial on how to install and use it can be seen here.
Notes
- Upon first starting or joining a collaboration session on VS Live Share, you will be prompted to log in using either a GitHub account or a Microsoft account. We suggest logging in using a GitHub account. If you don’t have one already, create a GitHub account using this link.
- You can work on different files simultaneously and not necessarily work on the same file, as shown in the video.
Scheme
- The Racket homepage includes downloads and documentation. Current version is Racket 8.8.
- A tutorial The Scheme Programming Language by R.K. Dybvig.
- R6RS Standard
Prolog
- SWI Prolog homepage includes downloads and documentation.