CSLearning
Various notes and solutions to exercises for some computer science learning that I am trying to catch up on.
A lot of this is focused on native code, including assembly. I am unfortunately interested in Windows assembly for the time being but I am looking at Linux and M1 Mac as well.
There is also a good amount of stuff that's type theory and classical computer science - including material from Knuth's The Art of Computer Programming and the Graham/Knuth/Patashnik book Concrete Mathematics.
Requirements
To run everything you will need Windows, and in particular
- Windows 10 with Visual Studio Command Line Tools (in particular MSVC)
- WSL2 (Debian)
- PowerShell Core
- NASM (some assembly programs are actually MASM, which should be included with MSVC)
- gcc
- Chez Scheme
- Idris (1 currently, hoping to port to 2 ASAP)
- LaTeX
Much of this software (particularly GCed bits like Scheme and Idris) is safe for Linux and OSX. The table of contents below indicates with [POSIX]
which components are POSIX-compatible.
There is some assembly written for the M1 Mac ARM processor, which is poorly tested until Apple fixes an SSD issue :(
Overview / table of contents
- Anderson - Operating Systems [POSIX - almost all text, some portable C]
- Hall/Slonka - Assembly Programming and Computer Architecture for Software Engineers
- (Website for the text)
- Partially POSIX, some MASM and Windows-specific assembly. It is mostly designed for WSL.
- Learn Raytracing in one weekend (link to website)
- The Art of Computer Programming [POSIX]
- Notes and exercises are written in LaTeX
- Link to Knuth's personal page
- This project includes a homespun MIX emulator and MIXAL interpreter here
- Requirements: a C compiler (I tried to make it portable) and a POSIX terminal (I developed using Windows Terminal)
- NOTE: If you're going through TAoCP yourself then I think it's worthwhile to write your own MIX system. If you need a MIX system for another reason then you should use GNU MDK or another high-quality application
- The Graphics Programming Blackbook for x64 Windows (link to original 16-bit PDF)
- Agner Fog's technical manuals on optimizing x86 software (link to Fog's website)
- Miscellaneous
- Some introductory SSE/AVX/etc exercises [POSIX but obviously conditionally portable]
- The Graphics Programming Black Book, translated to x64 windows
- Concrete Mathematics [POSIX - the real selling point here is that it's an Idris package tested on Windows :)]4
- Some of Abdulaziz Ghuloum's work on teaching incremental compiler construction
- Main paper here.
- His compiler was in Scheme, but I translated and expanded things in Idris to explore verified compiler construction and dependently-typed manipulations of x64 assembly.
Troubleshooting
Sometimes I had issues with Windows 10 updates screwing up linkers, particularly for 64-bit NASM programs.