- (incorporates former Speagram)
Artificial General Intelligence
Algorithmic Game Theory: Prediction Markets (po polsku)
Programming in Java
kurs pracy w systemie Linux
Data Stores and Data Mining
Systemy Inteligentnych Agentów
Przetwarzanie Języka Naturalnego
Jump to the current lecture
The course will be taught in OCaml, with translations to F#. Most of the exercise solutions should be straightforward to translate between OCaml and F#.
Functional programming video lectures:
Lectures and assigned material
The time given is how many lecture-hours a lecture actually took us, for reference: don’t be scared that lecture 6 appears as a single lecture. One meeting is two lecture-hours.
- Lecture 1: Logic Δ (and Types). [2 hours]
- Examples: Lec1.ml Δ, Lec1.fs Δ.
- For further practice, you can do lessons 1–4 of the tutorial at http://try.ocamlpro.com/, and parts “Quick Language Overview” and “The Functional World” of the tutorial at http://www.tryfsharp.org/. Skip over the parts that you do not understand or that are too time-consuming. Unfortunately the F# tutorial wouldn’t work for me under Linux, but it works under Windows.
- Lecture 2: Algebra Δ (and Algebraic Data Types) (needs some fixes) — Lecture 2 Figure Δ. [2 hours]
- Lecture 3: Computation Δ. [2 hours]
- Lecture 4: Functions Δ (and Lambda Calculus). Also known as Alligator Calculus. (Lecture requires OCaml.) [3 hours]
- Lecture 5: Polymorphism and Abstract Data Types Δ. Type inference. Polymorphic recursion. Algebraic specifications. Maps. Red-black trees. [3 hours]
- Lecture 6: Generic functions, Lists. Δ Generic programming with mapping and folding. Backtracking with lists. [5 hours]
- Lecture 7: Laziness and Streams. Δ Lazy evaluation and stream processing. [3 hours]
- Lecture 8: Monads. Δ List comprehensions. Monads. The module system. Probabilistic Programming. Lightweight cooperative threads. [7 hours]
- Lecture 9: Compilation and Parsing. Δ Working with OCaml projects. Compiling and runtime of FPLs: Garbage Collection and closures. Optimization. Writing parsers in Menhir.
- Lecture 10: FRP. Δ Zippers. Adaptive Programming aka. Self-Adjusting Computation. Functional Reactive Programming i.e. temporal programming. GUIs.
- Lecture 11: the Expression Problem. Comparison of object-oriented and function-oriented program organization. Type system concepts for solving the Expression Problem. “Intellisense”. I might prepare lecture 11 this
- Lecture 12: OCaml Standard Libraries. Batteries and Core.
- Lecture 13: Category Theory for Functional Programmer. Overview of Haskell’s standard library. Invitation to Category Theory. Theory of monads.
- Lecture 14: Parallelism. Sharing memory across processes, MPI, and more. I might prepare lecture 14 next year (2014).
Contact me if you would like to receive our exam exercise sets. They are based in half on 99 problems.
Working in the browser:
- OCaml toplevel with the same
- OCaml toplevel running on client-side in Java plugin (compiled from OCaml sources by ocamljava).
- http://codepad.org/ online compiler/interpreter for several languages, running on server-side.
Installing on Windows:
- OCaml student-friendly: OCaml Installer
- The installer will also install Emacs. We will have several ways to use OCaml:
- using the graphical toplevel
- using any editor, e.g.
OCamlBrowser, copying to the toplevel
ocaml.exe and using the compiler
- using Emacs as we do under Linux.
- Save common.ml Δ as
.ocamlinit in a directory which OCaml will recognize (either “home” or where you start OCaml); or just
# #use “path\to\common.ml”;; in the toplevel (where
path\to is the directory in which you saved common.ml Δ).
- OCaml developer-friendly: Wodi (based on GODI)
- See also OCaml 4.0 Win readme.
- F#: Visual F#
Installing on Debian-derived systems (e.g. Ubuntu):
$ sudo apt-get install ocaml
$ sudo apt-get install tcl8.5-dev tk8.5-dev (as suggested)
- We do not need Batteries, so instead, save common.ml Δ as
.ocamlinit in your home directory.
- But if you really want Batteries, do:
$ sudo apt-get install ocaml-batteries-included
- and save ocamlinit.ml Δ as
.ocamlinit in your home directory, for OCaml Batteries Included to start automatically in the toplevel.
$ ocaml starts the toplevel.
- Instal other tools and libraries as needed, in similar manner.
$ sudo apt-get install mono-devel mono-tools-devel libmono-winforms2.0-cil libmono-system-runtime2.0-cil
- Download fsharp2.0-1all.deb (this is just one possibility…)
$ sudo dpkg -i fsharp2.0–1all.deb
$ fsharpi starts the toplevel.
- If the toplevel fails, we try to install from sources:
- I use Emacs with
fsharp-mode, download from http://sourceforge.net/projects/fsharp-mode/ and follow instructions in the