CM20214/CM20221: Advanced Programming Principles
End of Unit
These units have now been retired. Their content will be found
in other units, such as CM20252 Artificial intelligence;
CM20253 Comparative Programming Languages;
CM20256 Functional programming; and others
are some basic instructions on how to run Lisp on the BUCS lcpu
Books on Functional Languages
Lisp has been about since 1957, so there's been plenty of books written, some
of them good. The only thing to bear in mind is that each book tends to be
written for a particular variety of Lisp, so the details might vary.
Books I like include
Books on Algorithms
- "The Little Lisper" Friedman and Felleisen
- "The Little Schemer" Friedman and Felleisen
- "Structure and Interpretation of Computer Programs" Abelson and
Sussman. Probably ought to be read by all Computer Scientists whether they are
interested in Lisp or
not. (Video lectures)
- "Object-Oriented Programming: The CLOS Approach" Paepcke
- "The Art of the Metaobject Protocol" Kiczales et al
Again, very many texts out there. It's mostly a matter of personal choice of a
book that suits you.
The dedicated follower should read all volumes of "The Art of Computer
Programming" by Knuth.
- "Understanding Algorithms and Datastructures" Brunskill and
Turner. Uses C and Ada
- "Algorithms in C" Sedgewick
- "Analysis of Algorithms and Data Structures" Banachowski,
Kreczmar and Rytter. For the mathematical
- "Introduction to the Design and Analysis of Algorithms"
Levitin. Looks OK
- "Data Structures, Algorithms & Software Principles in C"
Wikipedia articles tend to be fairly accurate in this area.
of various languages in the real world
- C is more subtle than you think. Try
this Quiz about integers in
Programming on Wikipedia
of functional languages
- Functional Programming
For The Rest of Us from a Java perspective
of Lisp by John McCarthy
of Lisp by Herbert Stoyan
- The Evolution
of Lisp by Steele and Gabriel
- Common Lisp
- Practical Common Lisp
- R6RS Scheme
and Interpretation of Computer Programs full text
and Interpretation of Computer Programs Video Lectures by Hal Abelson
and Gerald Jay Sussman
a EuLisp implementation
- Some EuLisp
- Xlisp, a Scheme
- Clisp, a Common Lisp implementation
- Clojure a Lisp that runs on top of the
Clojure has many gratuitous
syntactic differences with other Lisps
and several semantic differences as a consequence of using the JVM
- Hyperpolyglot comparison
of Common Lisp, Scheme, Clojure and Emacs Lisp
- Haddocks' Eyes, with
- The Funarg
Issues of Separation in Function Cells and Value Cells Lisp-1 vs Lisp-2
- Boehm garbage
collector for C and C++. This contains several links to GC literature
- Visualizing Garbage Collection Algorithms
- Glasgow Haskell Compiler;
ghc and ghci interactive r-e-p loop
- Wikibook on Haskell
- Learn You a Haskell for
functional language that uses the Java virtual machine
- Erlang Practical functional
- Rust A post-C language
- Go A post-C language
- Lua Scripting, procedural, functional,
- OCaml Functional (and imperative and OO)
- Glib reference
- List of
- List of
string matching algorithms
- C Right-Left
Rule for deciphering C declarations
- The C Object System: Using C as a
High-Level Object-Oriented Language
error messages from the Apple MPW C compiler
Things I Hate About Object-Oriented Programming
- C++ as a
Multiparadigm Language including reflections on why OO is not a
- Go and Rust - objects without
- Resource Acquisition Is
Algorithms Nature-Inspired Programming Recipes
Brief, Incomplete, and Mostly Wrong History of Programming Languages
a fast memory error detector (currently only using Clang)
will stick with COBOL because Java has performance issues
Every Computer Scientist Should Know About Floating-Point Arithmetic
New Spam-Killer Hints at the Future of Coding
- Rosetta Code
solutions to tasks in many languages
- Use after free
and dangling pointers
worst mistake of computer science about how NULL is a big problem
Running Lisp and Haskell
Several Lisps are available on the BUCS machines lcpu
Xlisp is a Scheme
Euscheme is a EuLisp.
on using Euscheme.
This is GNU Common Lisp
This is a Lisp that runs on top of the Java VM. There are a lot of differences
between this and other Lisps
Most of the above are open source and may well run on other operating systems.
As Year 2 Students you should have no trouble finding the sources and
getting them to run.
There is even a repository of
EuLisp implementations. A version of EuScheme, renamed EuXlisp, is provided.
Lisp problems (for the keen student).
Online Past Papers
This Unit was previously called "Programming II"
The CM20221 exam content is identical.
This is a relatively new course that combines elements from several previous
- CM20029/COMP0029: Applications IV: compilers
- CM10138/COMP0138: Systems II: programming & C
- CM20167/COMP0167: Programming III: functional programming
- CM20168/COMP0168: Programming Languages IV
- C7: Programming in Lisp
- Math0071: Applications of Logic
Coursework accounts for 40% of the unit total.
There are two assignments; one in semester 1 and the second in semester 2.
CM20214 The first coursework will be worth 10% and the second
20%. Another 10% will come from part of the Integrative Project.
CM20221 Each coursework will be worth 20%.
Coursework 1 for CM20221 will be larger than that for CM20214.
At the end of Semester 2 (60%).
These will be released after the relevant lecture: there is no
substitute to having the material go through your brain at least once!
Note that these slides are hints to me as to what topics I should cover: they
don't contain everything I shall say in lectures. You should come to lectures,
take notes in lectures and read books.
The file numbers don't correspond to anything in particular in terms of
lectures or subject covered. I may have skipped some material in lectures: why
not improve your general education and read the extra too! The exam will only be
set on material covered in lectures.