Literate Bradfield
This is me experimenting with literate programming while working through the CSI course that started in August 2022.
Notable items before diving in
- This code on Github (plus a bunch of scratch code that’s not included in this literate site)
- Physically Based Rendering Examplar of literate programming. Won an Technical Achievements Academy Award.
- srcweave Common Lisp literate programming software that I’m using for this project.
- lit-mode Emacs mode for srcweave that I’m writing concurrently with this project.
Table of Contents
- Literate Bradfield
- Ish Shell
- The main loop
- Using `ish` to execute a command
- Running a subprocess
- Build and dev tools
- Concurrent Programming
- Echo server from Chapter 11
- Concurrent echo server
- I/O Multiplexing
- Concurrent Programming in Go
- Hyphotheses about performance and bottlenecks
- The CounterService interface and 4 different implementations
- Testing and verification.
- concurrency.go
- Testing each version
- Results
- Memory allocation
- What's the largest array that you can allocate?
- Stack
- Other memory explorations.
- How fast can you allocate memory?
- Lexing and parsing text queries
- Lexing
- The tokens
- The tokenizer
- Take 2
- The real tokenizer
- The parser
- Why the above is broken.
- Trying again... this time from the top down.
- Nope! That's still wrong!
- Oh I think I figured it out.
- Parsing a pcap file
- Global header
- Packet header
- Packet data
- Parsing the Ethernet frame
- Parsing the IP Header, RFC 791
- Reliable protocol on top of UDP
- Demo
- Reliable Data Transport (rdt) package
- Stateful wrapper around UDP
- Client and server
- Rdt packet struct