Welcome to the COMPSCI3MI3-F2023 wiki!

Note that most of the material from September 26th onwards is based on [Types and Programming Languages](https://www.cis.upenn.edu/~bcpierce/tapl/); there are PDFs available on the internet of this book.

On top of the various files, there is some extra material available:
- [Syllabus](http://www.cas.mcmaster.ca/~carette/CS3MI3/F2023/index.html) which was covered in the first lecture
- Next two lectures (Sept. 7-8) revolved around history of PLs, with the aid of the [simplified graph](http://rigaux.org/language-study/diagram-light.png) of language genealogy and the [full graph](http://rigaux.org/language-study/diagram.png) too. The material is from [Pixel's PL study page](http://rigaux.org/language-study/diagram.html) where more is available. I scanned [my notes](https://github.com/JacquesCarette/COMPSCI3MI3-F2023/blob/81e5e79c48e79ef3f8e4c408d61453d15a0b54d8/Lecture/FirstTwoLectures.pdf) of what to cover. Additional material has been added as well.
- Sept. 12 and 14 were live-coding of Haskell. See repo for files produced in class.
- Sept. 15 was on esoteric languages, first by diving in to [Wikipedia](https://en.wikipedia.org/wiki/Esoteric_programming_language)'s links and then then the [esolangs](https://esolangs.org/wiki/Main_Page) web site. Also touched on were [quines](https://en.wikipedia.org/wiki/Quine_(computing)), ourobouros programs (same page) and [polyglots](https://en.wikipedia.org/wiki/Polyglot_(computing)).
  - we touched upon [Shakespeare](https://en.wikipedia.org/wiki/Shakespeare_Programming_Language), 
     [Befunge](https://en.wikipedia.org/wiki/Befunge), [LOLCODE](https://en.wikipedia.org/wiki/LOLCODE),
     [Malbolge](https://en.wikipedia.org/wiki/Malbolge), [INTERCAL](https://en.wikipedia.org/wiki/INTERCAL),
      [Brainfuck](https://en.wikipedia.org/wiki/Brainfuck), [PIET](https://en.wikipedia.org/wiki/Esoteric_programming_language#Piet)
- Sept. 19, 21, 22: Introduction to Prolog; we'll be using slide set 03 and 05 from [this course at York](https://www.eecs.yorku.ca/course_archive/2011-12/W/3401/3401.htm) as well as [swi-prolog](https://www.swi-prolog.org/). The rest of the material was live-coded - some Prolog, some Haskell, see repo for details.
- Sept 26, 28, 29: towards the lambda-calculus. We'll be loosely following the book usually called 'TAPL' (i.e. [Types and Programming Languages](https://www.cis.upenn.edu/~bcpierce/tapl/); there are PDFs available on the internet). Prof. Nick Moore covered this material in his 2021 version of the course, and the videos [are on this YouTube playlist](https://www.youtube.com/playlist?list=PLF7ZhwvkczzM3tTaJTVYIcsGsX8uyIeXA). A more modern take is Harper's [Practical Foundations of Programming Languages](http://www.cs.cmu.edu/~rwh/pfpl.html) (also has available PDF) but this text would likely be considered 'too hard' for a third year course (at Mac). The material is in the background informed by the [Curry-Howard Correspondance](https://en.wikipedia.org/wiki/Curry%E2%80%93Howard_correspondence) and its vast generalization of the [Computational Trilogy](https://ncatlab.org/nlab/show/computational+trilogy). The slides that I used are available under Lecture/towardslambda.pdf.
- Oct. 3. 5. 6: Domain Specific Languages and how to embed them in Haskell. There were [3 sets of Haskell code](https://github.com/JacquesCarette/COMPSCI3MI3-F2023/tree/main/Lecture/embedding%20dsls%20lectures) done in class to illustrate the ideas.
- next week was reading week
- Oct. 17 Introduction to the lambda calculus, slides Lecture/lambda.pdf and code Oct17.hs
- Oct. 19 more lambda calculus, slides Lecture/lc2.pdf and code Oct19.hs
- Oct. 20 start on types, Lecture/types.pdf
- Oct. 24 midterm
- Oct. 26 redo Oct. 20th lecture
- Oct. 27 take up midterm in class, and observation visit
- Oct. 31 more types. slides Lecture/types2.pdf slides 1-11
- Nov. 2 more types, slides Lecture/types2.pdf slides 12-18, Lecture/types3.pdf slides 1-5
- Nov. 3 type system in Prolog, Lecture/typing.pl
- Nov. 7 intro to statements, Unit type, sequencing, new vs derived, ascription, let bindings, Lecture/types3.pdf slides 6-15
- Nov. 9 references, memory / store semantics. Lecture/types4.pdf
- Nov. 10 types for references and memory / store, start on pairs
- Nov. 14 mechanized help again: Agda instead of Prolog, Nov4.agda
- Nov. 16 more extensions: pairs, tuples, records, pattern matching, list type, Lecture/features.agda
- Nov. 17 subtyping (on the way to FJ). I will borrow [these slides](https://xiongyingfei.github.io/DPPL/2021/zhao_ch15-p1.pdf) for that purpose. I started on FJ (see below) too.
- Nov. 21 featherweight Java. I will borrow [these slides](https://xiongyingfei.github.io/DPPL/2021/hu_ch18.pdf) for that topic. But first, I will revisit subtyping, in particular go over [A better explanation of the Liskov Substitution Principle](https://www.hillelwayne.com/post/lsp/) which helps and do an example on the board to also try to make it simpler to understand.
- Nov. 23 polymorphism and type reconstruction (inference). [these slides](http://lampwww.epfl.ch/teaching/archive/type_systems/2004/slides/8.pdf)
- Nov. 24 reconstruction continued

The following is a rough prediction of the future and is subject to change; all the material is from TAPL
- Nov. 28 "finish" one exercise on unification, sum types (Lecture/types5.pdf) and [recursive types](https://git.cs.lth.se/sde/type-systems-course/-/blob/master/slides/S13.pdf)
- Nov. 30th Q&A
- Dec. 1 no class, we've covered everything
- Dec. 5 review for final exam