GithubHelp home page GithubHelp logo

ajipsum / aopl Goto Github PK

View Code? Open in Web Editor NEW

This project forked from w7cook/aopl

0.0 1.0 0.0 15.62 MB

A book on programming languages, using Haskell

TeX 2.89% CSS 0.02% Haskell 74.31% Ruby 0.98% Makefile 2.30% Yacc 4.28% PostScript 14.24% JavaScript 0.98%

aopl's Introduction

Anatomy of Programming Languages

William R. Cook

Copyright © 2013

What?

This document is a series of notes about programming languages, originally written for students of the undergraduate programming languages course at the University of Texas at Austin.

Install

Install "cabal" Install lhs2TeX by using "cabal install lhs2tex" Install Pandoc by using "cabal install pandoc" Install pandoc-citeproc by using "cabal install pandoc-citeproc" Use "make" to build. Here are some things you can build: pretty - builds anatomy.pdf and opens it verb - builds anatomyVerbatim.pdf and opens it anatomy.pdf - builds the pretty version anatomyVerbatim.pdf - builds the text-based version anatomy.htm - builds the HTML version (with source code) and comments clean - clean the builds update - upload a new copy of the book to the public server (requires server access) execute - run all the code and build the tests fixup - modify the core anatomy.lhs file to have updated paragraph marks and code

Why?

I’m writing these notes because I want to teach the theory of programming languages with a practical focus, but I don’t want to use Scheme (or ML) as the host language. Thus many excellent books do not fit my needs, including Programming Languages: Application and Interpretation (Krishnamurthi 2012), Essentials of Programming Languages (Friedman and Wand 2008) or Concepts in Programming Languages (Mitchell and Apt 2001).

This book uses Haskell, a pure functional language. Phil Wadler (Wadler 1987) gives some good reasons why to prefer Haskell over Scheme in his review of Structure and Interpretation of Computer Programs (Abelson and Sussman 1996). I agree with most but not all of his points. For example, I do not care much for the fact that Haskell is lazy. None of the examples in this book rely upon this feature.

I believe Haskell is particularly well suited to writing interpreters. But one must be careful to read Haskell code as one would read poetry, not the way one would read a romance novel. Ponder each line and extract its deep meaning. Don’t skim unless you are pretty sure what you are doing. comment

The title of this book is derived from one of my favorite books, The Anatomy of Lisp (Allen 1978).

Who?

These notes assume knowledge of programming, and in particular assume basic knowledge of programming in Haskell. When I teach the course I give a few hours of lectures to introduce Haskell. I teach the built-in data types including lists, the basic syntax for conditionals, function definitions, function calls, list comprehensions, and how to print out strings. I also spend a day on data definitions (algebraic data types) and pattern matching. Finally, I give a quick introduction to type classes so student will understand how Eq and Show work. During the course I teach more advanced topics, including first-class functions and monads. As background resources, I point students to the many excellent tutorials on Haskell. Search Google for “Haskell Tutorial” to find one. I recommend Learn You a Haskell for Great Good! or the Gentle Introduction To Haskell.

aopl's People

Contributors

w7cook avatar wting avatar ccotter avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.