Programming Languages (F28PL)
Welcome to the Programming Languages webpage. In a nutshell, this course says:
“How should we program? Well, it matters what programs we have in mind. Let’s think this through …”
- Thursday at 11:15 in JW2.
- Thursday at 13:15 in EM250 (lab).
- Friday at 09:15 in PG201.
- Friday at 13:15 in PGG01.
- Attend lectures.
- Keep up with the course so you follow lectures. Research stuff on the internet.
A student who thinks “I’ll sort it out during the holidays” is a student in denial (look at 1m03s).
- Rules 1-2 apply most especially to the student who thinks that rules 1-2 do not apply to them.
- Attend lectures.
Here are slides:
The pdfs below were developed from the following older slides (l11 below corresponds to lecture-1 above):l11.pdf l12.pdf l13.pdf l14.pdf l15.pdf l16.pdf l17.pdf l18.pdf l19.pdf l20.pdf
- Deadline for ML1 has passed.
- Deadline for PY1 was 19 November at 21:00 (passed).
- Deadline for PG1 is 1 December at 21:00.
There are three items of coursework: ML1, PY1, and PR1.
- question ML1 exists and is in Vision.
- PY1 exists in and is below.
- PR1 exists in and is below.
For your convenience odt and pdf files for ML1 are here:
- ML1 coursework (.odt, .pdf). Version in Vision is definitive.
- PY1 coursework (.odt, .pdf). Use this template to submit your answers. Version here is definitive.
- PR1 coursework (.odt, .pdf). Use this template to submit your answers. Version here is definitive.
Coursework is worth 30% of your mark, as per this webpage (so for instance, ML1 above is roughly a third of the total coursework and so worth roughly 10% of the total grade). The exam is worth 70% of your mark.
There are out-of-date versions of the course descriptor floating around stating that coursework is worth 40%. This is wrong. Don’t ask me to change the coursework weightings because a) I can’t and b) I wouldn’t anyway.
- How to answer a programming question.
- A poem.
- Some comments on how to answer the question.
- Ciaran Dunne’s answer to QI7.
- A one-hour Prolog tutorial.
- A short WatMan talk exploring the corner cases of various programming languages, in a similar spirit to some of our explorations of Python.
- Not a bad page discussing types in Python.
Videos of lectures will go online as they are given. See also last year’s course videos. Many thanks to Cameron for making the transcripts below.
- Lecture of Thursday 14 September at 13.15 (video) (transcript 1)
- An introductory lecture. I warn that second year is harder than first year. I fire up PolyML.
- Lecture of Friday 15 September at 09:15 (video) (transcript 2)
- More on PolyML.
- Lecture of Friday 15 September at 13:15 (video) (transcript 3)
- By this point we’ve done int, real, string, functions, polymorphism (both ad hoc and parametric), and we’ve touched on lists.
- Lecture of Friday 22 September at 09:15 (video) (transcript 4)
- Discussion of declarative vs imperative programming.
- Lecture of Friday 22 September at 13:15 (video) (transcript 5)
- Lists, recursion, tail recursion.
- Lecture of Thursday 28 September at 11:15 (video) (transcript 6)
- More on ML.
- Lecture of Friday 29 September at 09:15 (video) (transcript 7)
- Discussion of how to answer programming questions.
- Lecture of Friday 29 September at 13:15 (video) (transcript 8)
- More on ML, including exceptions.
- Lecture of Thursday 5 October at 11:15 (video) (transcript 9; includes also ML code from lecture 11)
- Exceptions and global variables in ML, discussion of to what extend ML is functional.
- Lecture of Friday 6 October at 09:15 (video)
- We start on Python.
- Lecture of Friday 6 October at 13:15 (video)
- Discussion of how to unwrap ‘wrapper functions’ from datatypes in ML; binary tree sum example. Then back to Python, exploring arithmetic.
- Lecture of Thursday 12 October at 11:15 (video)
- Lecture of Friday 13 October at 09:15 (video) (transcript)
- Lecture of Friday 13 October at 13:15 (video) (transcript)
- Lecture of Thursday 19 October at 11:15 (video) (transcript)
- Lecture of Friday 20 October at 09:15 (video) (transcript)
- Lecture of Friday 20 October at 13:15 (video) (transcript)
- Lecture of Friday 27 October at 09:15 (video) (transcript)
- Lecture of Friday 27 October at 13:15 (video) (transcript)
- Lecture of Thursday 2 November at 11:15 (video) (transcript)
- Lecture of Friday 3 November at 09:15 (video) (transcript)
- We start on Prolog. The databases I use are here available as html and pl files.
- Lecture of Friday 3 November at 13:15 (video) (transcript)
- Lecture of Thursday 9 November at 11:15 (video) (transcript)
- Lecture of Friday 10 November at 09:15 (video)
- Alexander Johnstone’s talk. Thank you Alex.
- Lecture of Friday 10 November at 13:15 (video) (transcript)
- Lecture of Thursday 16 November at 11:15 (video)
- Lecture of Friday 17 November at 09:15 (video)
- Lecture of Friday 17 November at 13:15
- I dispense dodgy life advice. For your health and safety the video is not publicly available.
- Lecture of Friday 17 November at 14:15 (video)
- Allan Jardine’s excellent talk (organised by Santiago Chumbe as part of the Web Design and Databases course).
To watch the files above, you may need to download then locally (right-click save, then open). Just left-clicking on the link may not work.
rlwrap gives BASH-style history and completion at the command line. If you don’t know what that means then trust me—-you want this.
Run SML, PolyML, Python 3, and SWI Prolog by respectively typing
- See a mock for my half of the course from 2014, though note that the syllabus has changed.
- See a mock from 2013, though note that the syllabus has changed.
- See a past paper.
- See the 2015/16 course.
- See the 2014/15 course.
You may like:
- Hans-Wolfgang’s course F21SC on Industrial Programming which covers C-sharp and Python.
- This list of ten reasons not to use a functional programming language. (The ‘not’ here is ironic.)
- A Wired article about functional programming (Erlang and Haskell) being used by WhatsApp and Facebook. A worthwhile read.
- A rather beautiful article by Paul Graham about functional programming (Lisp) used in a startup. Also a very worthwhile read.
- If you liked Paul Graham’s essays, you could also look at The hundred-year language and Revenge of the nerds.
- A one-page SML crib sheet. Very helpful.
- A BBC podcast on Grace Hopper’s creation of compilers.
- Another BBC podcast on robots and their effect on jobs.
- Study class 1.
- Example SML programs (from a previous year, but still useful), and also
- The standard SML basis library. A useful read to explore built-in functions.
- A one-page SML crib sheet. Very helpful.
- These ML lecture notes from the University of Washington are succinct and very clear.
- Example Prolog programs.
- Bill Wilson’s Prolog dictionary.
- The Prolog tutorial by Paul Brna and Tamsin Treasure-Jones dates back to 1996 and is still great.
- Lydia Sinapova’s Prolog Class Notes.
You are required to read the following short essays, which discuss imperative programming (represented by C, Pascal, and Java), functional programming (represented in the essays by Lisp and in this course by ML), and logic programming (represented by Prolog).
I may base a discussion question in the exam on material from these essays.
A bit about me
I am a researcher in theoretical computer science. My research is mostly in formal logic.
Everybody calls me Jamie but my name is actually Murdoch. You can contact me by e-mail on “gabbay at macs hw ac don’ttypethis uk”. My office is G.50 Earl Mountbatten Building.
Ah, well. I’m glad you asked. You should be second year undergraduate students. Let me know if this is not the case; I’d be interested to know!
A propos nothing in particular
- Revised log levels proposal: “FYI” “WTF” and “OMG” (John Barnette)