CPS 499/592: Emerging Languages/Spring 2016

CPS 499/592 (3 sem. hrs.) Special Topics in Emerging Languages (dynamic bindings for engineering software) is an advanced undergraduate and graduate course on the recent trend in programming languages toward more dynamic, functional, multi-paradigm languages. The course is an exploratory odyssey through a variety of emerging languages, such as Ruby and Erlang, with a focus on showcasing and creatively harnessing the niche features in each language to solve non-trivial, pragmatic programming problems faced by software engineers, particularly in the domains of game programming and Internet applications. Topics include new concurrency and object models, type systems, and security. The course emphasizes alternative language features such as continuations, currying, and lazy evaluation, and the use of these features in novel application areas such as web interaction management. This is a programming intensive course. Languages anticipated to be studied include LISP, Ruby, Erlang, Elixir, Clojure, Haskell, and Lua, among others. This course assumes no prior experience with any of the covered languages, but does require an open mind, an intellectual and scientific curiosity, and a passion for languages.

CPS 499/592: Emerging Languages/Spring 2016




















Pre-requisite: CPS 350 (Data Structures & Algorithms) (with a recommended minimum grade of B).

Meeting times: M W 5:05pm-6:20pm, MH 205.

Instructor: Dr. S. Perugini, e-mail id: sperugini1, 229-4079, AN 145, OHs: M W 6:30pm-7:30pm, T Th 5:00pm-6:00pm (only when class is in session), & by appointment.

Required textbooks:
    [PLCI] Programming Languages: Concepts and Implementation by S. Perugini. 2016. Draft (Available as a Resource in Isidore).
    [SLSW] Seven Languages in Seven Weeks: A Pragmatic Guide to Learning Programming Languages by B.A. Tate. Pragmatic Programmers, Dallas, TX, 2010. ISBN-13:978-1-934356-59-3 (textbook webpage contains links to the source code of all programs in the text).
    [SCMSW] Seven Concurrency Models in Seven Weeks: When Threads Unravel by P. Butcher. Pragmatic Programmers, Dallas, TX, 2014. ISBN-13:978-1-937785-65-9 (textbook webpage contains links to the source code of all programs in the text). An eBook of [SCMSW] is available free to all UD students in the library's eContent collection. To access it conduct a search for the title in the library's catalog at library.udayton.edu.

Steps to access [SCMSW] off-campus:
  1. Go to https://login.libproxy.udayton.edu/menu.
  2. Login using your standard UD credentials.
  3. Click on the link labeled: EBSCO Ebook Collection (formerly NetLibrary).
  4. This link will will take you to a page were you can perform a search. Search for "Seven concurrency models in seven weeks: When threads unravel" Click on "eBook Full Text".

    Note that there is a limit on how many people can view the book and once someone checks it out, no one else can use it. Also, if you incorrectly break your session (closing the page), the book remains checked out for a period of time and you cannot use the book in until the session ends.
    [SMLSW] Seven More Languages in Seven Weeks: Languages that are Shaping the Future by B.A. Tate, F. Daoud, I. Dees, & J. Moffit. Pragmatic Programmers, Dallas, TX, 2014. ISBN-13:978-1-941222-15-7 (textbook webpage contains links to the source code of all programs in the text). An eBook of [SMLSW] is available free to all UD students in the library's eContent collection. To access it conduct a search for the title in the library's catalog at library.udayton.edu. Steps to access [SMLSW] off-campus: follow same steps above for accessing [SCMSW] (with the title of this book).

Recommended textbooks:
    [EOPL2] Essentials of Programming Languages by D.P. Friedman, M. Wand, & C.T. Haynes. MIT Press, Cambridge, MA, 2nd edition, 2001. ISBN: 0-262-06217-8 (textbook webpage contains links to the source code of all programs in the text). An eBook of [EOPL2] is available free to all UD students in the library's eContent collection. To access it conduct a search for the title in the library's catalog at library.udayton.edu. Steps to access [EOPL2] off-campus: follow same steps above for accessing [SCMSW] (with the title of this book).
    [LISP] LISP in Small Pieces by C. Queinnec. (2003). Cambridge: Cambridge University Press. ISBN: 0-521-54566-8.
    [PG] Programming in Go: Creating Applications for the 21st Century by Summerfield, M. (2012). Boston, MA: Addison-Wesley. ISBN: 9780321774637 (textbook webpage contains links to the source code of all programs in the text). An eBook of [PG] is available free to all UD students in the library's eContent collection. To access it conduct a search for the title in the library's catalog at library.udayton.edu. Steps to access [PG] off-campus: follow same steps above for accessing [SCMSW] (with the title of this book).
    [SICP] The Structure and Interpretation of Computer Programs by G.J. Sussman & H. Abelson. MIT Press, Cambridge, MA, 2nd edition, 1996. ISBN: 0-262-01153-0. This book is on reserve at the Roesch library, and available in PDF format here.
    [TLS] The Little Schemer by D.P. Friedman & M. Felleisen. MIT Press, Cambridge, MA, 4th edition, 1996. ISBN: 0-262-56099-2. This book is on reserve at the Roesch library, and available in PDF format here.
    [TSS] The Seasoned Schemer by D.P. Friedman & M. Felleisen. MIT Press, Cambridge, MA, 1996. ISBN: 0-262-56100-X.
    [TSPL] The Scheme Programming Language by R.K. Dybvig. MIT Press, Cambridge, MA, 4th edition, 2009. ISBN: 978-0-262-51298-5 (entire text available online).
    [PLAI] Programming languages: Application and interpretation by S. Krishnamurthi. 2nd edition, 2012. This book is available in HTML & PDF formats.
    [TLM] The Little MLer by M. Felleisen & D.P. Friedman. MIT Press, Cambridge, MA, 1997. ISBN: 978-0262561143.
    [EMLP] Elements of ML Programming by J.D. Ullman. Prentice Hall, Upper Saddle River, NJ, 2nd edition, 1997. ISBN: 0-137-90387-1.
    [COFP] Haskell: The Craft of Functional Programming by S. Thompson. Addison-Wesley, Harlow, England, 2nd edition, 1999. ISBN: 0-201-34275-8.
    [PIH] Programming in Haskell by G. Hutton. Cambridge University Press, Cambridge, 2007. ISBN: 0-521-69269-5.
    [PPFC] Prolog Programming: A First Course by P. Brna (entire text available online in various formats).
    [PIP] Programming in Prolog by W.F. Clocksin & C.S. Mellish. Springer-Verlag, Berlin, 5th edition, 2003. ISBN: 3540006788.
    [QTOL] Squeak: A Quick Trip to ObjectLand by G. Korienek, T. Wrensch, & D. Dechow. Addison-Wesley, Boston, MA, 2002. ISBN: 0-201-73114-2.

Course objectives:
  • Establish an understanding of fundamental language concepts primarily through the implementation of interpreters.
  • Improve your ability to understand new languages and technologies, and expand background for selecting appropriate languages.
  • Expose students to alternate styles/paradigms of programming and exotic ways of affecting computation so to paint a more holistic picture of computing.
Evaluation, workload, & policies

Final course project ideas, requirements, and evaluation criteria

Selected completed course projects

Course outline, lecture notes, & homework & reading assignments (to be completed prior to class):
  1. FUNDAMENTALS
    1. Introduction to emerging languages course & Introduction to programming languages (programming language concepts, nomenclature, and paradigms; [PLCI] Ch 1): Jan 20

    2. Formal Languages & Grammars ([PLCI] Ch 2): self-study

    3. Programming Language Implementation ([PLCI] Ch 4): self-study

  2. LISP ([PLCI] Ch 5; fundamentals of functional programming)
    1. λ-calculus & S-expressions [A Brief Introduction to Lisp, installing & using Racket, functional programming resources, The Scheme Programming Language]: Jan 25
    2. Building data structures, such as binary trees, with lists [HW 1 due]: Jan 27
    3. let, let*, letrec: Jan 27 Feb 1 [HW 2 due]: Feb 3
    4. Closures & closures ([PLCI] Ch 11) [about closures]: Feb 8 10
    5. Binding & scope [PLCI] Ch 6) [HW 3 due]: Feb 10
    6. Functional data representation strategy ([PLCI] Ch 9): Feb 10 15
    7. Control ([PLCI] Ch 13; [TSPL] §§ 3.2-3.4, [TSS] Ch 13, 19)
      1. tail calls ([TSPL] § 3.2), continuations, & continuation-passing style ([TSPL] § 3.4, [TSS] Ch19): Feb 15 [HW 4 due]: 17 22
      2. first-class continuations & call/cc [about continuations] ([TSPL] § 3.3, [TSS] Ch13): Feb 22 24
    8. homoinconicity [The Roots of LISP] [HW 5 due]: Feb 24 [HW 6 due]: Mar 2

  3. CLOJURE

  4. HASKELL & ML & IDRIS (types and type systems)
    1. Introduction to Haskell ([PLCI] Appendix C) [installing & using GHC]: February 24

    2. Introduction to ML ([PLCI] Appendix B) [installing & using SML-NJ]: February 24

    3. Strong Typing & Type Inference ([PLCI] Ch 7): Feb 24 Mar 2

    4. Currying & Higher-order Functions ([PLCI] Ch 8): Mar 7 9

    5. Type Systems & Data Abstraction ([PLCI] Ch 9)
      1. inductive data types & abstract syntax: Mar 14 16
      2. type systems (in Haskell; & structures, signatures, & functors in ML; [PIH] Ch 10, [EMLP] Ch 6, 8): Mar 14 16

    6. Input/Output
      1. I/O in Haskell: self-study
      2. string I/O in Haskell & ML ([PLCI] Appendix B): self-study
      3. Hoogle (the Haskell API search engine): self-study

      Midterm (take-home): due Mar 16

    7. Parameter Passing ([PLCI] Ch 12)
      1. survey of parameter-passing mechanisms: Mar 21 28
      2. lazy evaluation & thunks (call-by-name & call-by-need): Mar 21 28 30
        [HW 7 due]: Mar 23
      3. lazy evaluation in Haskell ([PIH] Ch 4, 5, 12): Mar 21 [HW 8 due]: 30 Apr 6
      4. list and generator comprehensions in Python ([PLCI] Appendix D): Apr 6 28

  5. Go, & ERLANG & ELIXIR (Communication and Concurrency)
    1. Communicating Sequential Processes (CSP) ([SCMSW] Ch6)
      1. introduction to concurrent programming in Go ([PG] Ch7) (Go by example, a tour of Go, command-line programming with Go, effective Go): Mar 30 [HW 9 due]: Apr 6
    2. The Actor Model of Concurrency ([SCMSW] Ch 5)
      1. Elixir ([SMLSW] Ch 4): Apr 4

  6. LUA
    1. Introduction to Lua programming: Apr 11 [HW 10 due]: 13 18 20 25

  7. ELM

  8. FACTOR

  9. JULIA

  10. PROLOG & miniKanren ([PLCI] Ch 14; declarative/logic programming)
    1. First-order predicate logic (Horn clauses, resolution, & unification): self study
    2. Logic programming in PROLOG [A Brief Introduction to PROLOG, installing & using SWI-PROLOG, Logic programming resources, Prolog Programming A First Course]
      1. facts, rules, & goals: self-study
      2. control & cut: self-study

  11. SMALLTALK & RUBY ([PLCI] Ch 15)
    1. Object-orientation: Message Passing and Dynamic Binding ([QTOL]) [object-oriented programming resources]
    2. Squeak ([QTOL]) [A Brief Introduction to Smalltalk, installing & using Squeak]: self-study
    3. Reflection (pp. 169-171): self-study

  12. CONCLUSION
    1. course reflection (terms & themes; ACM A.M. Turing award winners with contributions related to languages): Apr 28
    2. Project presentations: May 2

  13. Final Exam (comprehensive, closed book, closed notes) [practice problems]: M May 2, 4:30pm-6:20pm, MH 205
Programming style guide

Programming languages resources

Practice problems

Grades: available in Isidore

Computer accounts: UDit | A beginner's guide to effective e-mail

Helpful links: academic calendar | student handbook | UDit policies

Feedback: Dr. Perugini welcomes any feedback you may have on the style of the lectures, the concepts presented in class, the course webpage, homeworks, deadlines, exams, course and grading policies, or your general experience in the course.