Below is a loosely-categorized collection of links to CS textbooks in a variety of areas that are freely available online, usually because they are one of the following:

- An open textbook (such as PLAI, SF, or the HoTT book)
- An older book that is out of print, for which the copyright has returned to the original author(s) (such as TTFP)
- An author’s own preprint or draft of a textbook. This includes cases where the author has made special arrangements with a publisher to host an electronic copy of a published text on their homepage while it remains in print.

I also include below a list of papers I consider good stand-alone introductions to certain topics, and a list of links to thorough special topics courses.

If you find one of the links below is broken or has moved, feel free to let me know.

Those with time to spare and looking to have less of it may enjoy browsing the QA call numbers in UPenn’s extensive listing of online books. Most of those listed here were found independently over the years, but I’ve just now (June 2020) learned of this excellent repository of links. I’ll add to the links below as I find promising books.

Key:

- + = A book I have spent considerable time with and highly recommend.
- No prefix: a book I’ve perused casually, and looks good, but I have not (yet) spent much time with.

Topics such as semantics, types, abstract interpretation, proof assistants…

- Software Foundations
- Practical Foundations for Programming Languages (draft)
- Programming in Martin-Lof’s Type Theory
- Proofs and Types
- Practical Foundations of Mathematics
- +Programming Languages: Application and Interpretation (second edition in progress)
- Semantics with Applications
- Lectures on the Curry Howard Isomorphism (draft)
- +Type Theory and Functional Programming
- +Certified Programming with Dependent Types
- Isabelle/HOL: A Proof Assistant for Higher-Order Logic
- Communicating Sequential Processes
- The Craft of Programming
- Denotational Semantics: A Methodology for Language Development
- +Lambda Calculi with Types
- Lambda Calculus with Types
- Logics and Type Systems
- Programming from Specifications
- Using Z: Specification, Refinement, and Proof
- Homotopy Type Theory
- Partial Evaluation and Automatic Program Generation
- Implementing Mathematics with The Nuprl Proof Development System
- Intuitionistic Type Theory
- Concrete Semantics
- PX: A Comuptational Logic
- Specifying Systems: The TLA+ Language and Tools for Hardware and Software Engineers
- +The Essence of ML Type Inference (Manuscript, Chapter 10 of ATTAPL)
- Static Program Analysis
- Principles of Programming Languages
- Alias Analysis for Object-Oriented Programs”
(Manuscript, chapter of
Aliasing in Object-Oriented Programming ) - Pointer Analysis
- Tree Automata Techniques and Applications
- Modeling Reactive Systems with Statecharts: The STATEMATE Approach
- +Program Logics for Certified Compilers
- Program = Proof
- Foundations of Probabilistic Programming

This portion excludes category theory, which is now its own section below.

- A Modern Formal Logic Primer
- Natural Logic (pdf)
- Algebraic Topology
- A Concise Course in Algebraic Topology
- Model Theory
- Set Theory
- An Introduction to Substructural Logics
- Mathematical Modal Logic: A View of its Evolution
- Normalization, Cut-Elimination, and the Theory of Proofs
- Logics of Time and Computation
- Mathematics of Modality
- Modal Logic and Process Algebra: A Bisimulation Perspective
- Lectures on Linear Logic
- Dynamics, Polarity, and Quantification
- Non-Well-Founded Sets
- Logic in Action
- Varieties of Lattices
- Tools and Techniques in Modal Logic (the page is in German; the download link is the actual PDF)
- +An Invitation to General Algebra and Universal Constructions
- A Concise Course in Algebraic Topology (near the bottom)
- Logic and Automata: History and Perspectives
- Topology: A Categorical Approach

- Site Reliability Engineering
- The Site Reliability Workbook
- The Architecture of Open Source Applications project books:
- Software Testing: From Theory to Practice (NOTE: Often does not load for me)

- Abstract and Concrete Categories: The Joy of Cats
- Computational Category Theory
- Toposes, Triples, and Theories
- +Topoi: The Categorical Analysis of Logic (also at Project Euclid)
- Categories, Types, and Structures
- Higher Operads, Higher Categories
- Category Theory for Computing Science [pdf] (Barr’s publications)
- *-Autonomous Categories
- Categorical Logic
- Abelian Categories
- Metric Spaces, Generalized Logic, and Closed Categories
- An introduction to fibrations, topos theory, the effective topos and modest sets
- Categorical Homotopy Theory
- Category Theory for Scientists (Manuscript)
- Categorical Algebra (technically a 1965 journal article from Bull. Amer. Math. Soc., 17(1):40–106, but up on Project Euclid.
- Higher Topos Theory: Author version, arXiv version
- Basic Concepts of Enriched Category Theory
- The online journal Theory and Applications of Categories archives electronic versions of some out of print category theory textbooks: Reprints in Theory and Applications of Categories
- Category Theory for Programmers
- Higher Categories and Homotopical Algebra author preprint
- 2-Dimensional Categories
- First-Order Categorical Logic
- Generic Figures and Their Glueings: A Constructive Approach to Functor Categories
- +Category Theory in Context

- Implementing Functional Languages: A Tutorial
- The Implementation of Functional Programming Languages
- Shared Source CLI 2.0 Internals (shelved draft)
- Smalltalk-80: The Language and its Implementation (a.k.a. “The Blue Book”)
- The Design and Implementation of Probabilistic Programming Languages

- +A Commentary on the Sixth Edition UNIX Operating System (and UNIX v6 source code)
- Distributed Systems, 3rd Edition by van Steen and Tanenbaum
- Linkers and Loaders
- Concurrency Control and Recovery in Database Systems
- Is Parallel Programming Hard, And, If So, What Can You Do About It?
- Operating Systems: Three Easy Pieces
- The TCP/IP Guide
- Notes on Theory of Distributed Systems, CPSC 465/565 (technically notes, but in practice an excellent textbook)
- +Practical File System Design with the Be File System
- Principles of Computer System Design (Authors share second half online, first half published in print by Elsevier)
- Foundations of Databases
- Security Engineering: A Guide to Building Dependable Distributed Systems
- Computer Networking
- Recent Advances in Networking, Volume 1
- Performance Evaluation Of Computer And Communication Systems
- The Network Calculus Book
- +Computer Networking: A Systems Approach
- Software Security: Principles, Policies, and Protection
- Principles of Electronic Devices
- NetBSD Internals
- Open Distributed Systems
- Foundations of Distributed Consensus and Blockchains

- Foundations of Computer Science
- Linear Programming: Foundations and Extensions
- The Design of Approximation Algorithms
- Mining of Massive Datasets
- Model-Based Machine Learning
- Foundations of Data Science
- Think Data Structures
- Think Bayes: Bayesian Statistics Made Simple
- Think Stats
- Algorithmic Game Theory
- This one’s a bit awkward to find: Click on the “Resources” tab (right of Description and Contents), and in the resulting “General Resources” side-bar that appears to the left, click on the book title. In the table that appears, click where the book title appears under the “Name” column; this is the full PDF of the book.

- Reinforcement Learning: An Introduction (also, direct PDF of author preprint of 2nd edition here)
- Reinforcement Learning: An Introduction, 2nd Edition
- Machine Learning for Data Streams: with Practical Examples in MOA
- Fairness and Machine Learning
- Deep Learning
- Algorithms Illuminated
- Seeing Theory: A Visual Introduction to Probability and Statistics
- Mathematics for Machine Learning
- The Joy of Cryptography
- Cryptography, An Introduction
- A Graduate Course in Applied Cryptography
- Neural Networks and Deep Learning
- Learn Quantum Computing using Qiskit
- Multiagent Systems: Algorithmic, Game-Theoretic, and Logical Foundations
- Dive into Deep Learning
- Discrete Mathematics: An Open Introduction, 3rd Edition
- Models Of Computation
- Graph Theory
- +Computational Complexity: A Modern Approach (draft)
- The Algorithmic Foundations of Differential Privacy
- Grammatical Inference: Learning Automata and Grammars

- Introduction to Applied Linear Algebra: Vectors, Matrices, and Least Squares
- The Causal Inference Book
- An Introduction to Statistical Learning, with Applications in R
- The Elements of Statistical Learning: Data Mining, Inference, and Prediction
- Linear Algebra Abridged (Linear Algebra Done Right, minus proofs)
- Statistical Thinking for the 21st Century
- Convex Optimization
- An Introduction to Probability Theory and its Applications
- [Numerical Linear Algebra] (https://people.maths.ox.ac.uk/trefethen/text.html)

- The Mathematics of Language (via author’s homepage)
- The Syntactic Process
- Speech and Language Processing
- Natural Language Processing
- Text Mining with R
- Natural Language Processing with Python: Analyzing Text with the Natural Language Toolkit (NLTK)
- Grammatical theory: From transformational grammar to constraint-based approaches. Fourth revised and extended edition
- This is itself an English translation of Grammatiktheorie, which is in German, and also freely available

- Topics in Parallel and Distributed Computing: Introducing Concurrency in Undergraduate Courses (preprint)

- Structure and Interpretation of Computer Programs (also: Unofficial PDF Ebook Reformatting, and SICP in Clojure)
- How to Design Classes (draft)
- How to Design Programs (2nd Edition)
- How to Design Programs (1st Edition)

While most of the books on this page are focused on more theoretical/foundational topics, sometimes you just need to learn a programming language or look at some reference on a particular language feature.

- Scala
- Programming in Scala (first edition)
- Creative Scala
- Scala Book

- OCaml
- Haskell
- +Real World Haskell
- Parallel and Concurrent Programming in Haskell (on O’Reilly Safari, but can be read without account or subscription)
- Learn You A Haskell
- Developing Web Applications with Haskell and Yesod

- Standard ML
- Scheme and LISP
- Practical Common Lisp (and PCL in Clojure)
- On Lisp (and one two three ports to Clojure)
- The Scheme Programming Language

- Erlang
- JavaScript
- Go
- Java
- Python
- Rust
- Ruby

Some of the books listed in other categories are appropriate for someone looking to get started with programming and/or computer science. I’ve duplicated those links in this section so they’re easier to find if that’s what you need.

- Structure and Interpretation of Computer Programs
- How to Design Programs (2nd Edition)
- How to Design Programs (1st Edition)
- Creative Scala

- Abstract Interpretation (Classic): Abstract Interpretation: A Unified Lattice Model for Static Analysis of Programs by Construction or Approximation of Fixpoints. Cousot and Cousot, POPL’77.
- Abstract Interpretation (Semantic): Abstracting Abstract Machines. Van Horn and Might, ICFP’10.
- Denotational Semantics: The Denotational Semantics of Programming Languages. Tennent, CACM 19(8), 1976.
- Program Synthesis: Dimensions in Program Synthesis. Gulwani, PPDP’10.
- Type Theory: Introduction to Type Theory. Herman Geuvers, notes from lecture given at Language Engineering and Rigorous
- Software Development run of ALFA summer school, 2009.

- Matt Might’s Grad Student Recommendations
- Various Books on Category Theory
- Benjamin Pierce’s Great Works in Programming Languages collection
- Karl Crary’s Classic Papers in Programming Languages and Logic course
- Patrick Cousot’s Abstract Interpretation course (readings section)
- Matthias Felleisen’s History of Programming Languages course readings
- Viktor Vafeiadis and Derek Dreyer’s course on Concurrent Program Logics
- Frank Pfenning’s course on Linear Logic
- Michael Shulman’s seminar on Homotopy Type Theory
- Bob Harper’s course (with videos) on Homotopy Type Theory