Code

C

Code of questionable utility, perhaps?

quine.c

A simple quine in C.

CWEB

I wrote these "hello world'' programs to help me adjust to programming using CWEB.

hello.0.w [pdf]

This is the zeroth in the series.

hello.1.w [pdf]

This is the first in the series. It adds basic option parsing, help, version, and licensing information.

hello.2.w [pdf]

This is the second in the series. It adds a couple of new options, including user-definable greetings.

The CWEB code above requires the file below.

listing.tex

This TeX code (excerpts from version 3.5 of eplain.tex by Karl Berry, Steven Smith, Oleg Katsitadze, and others) provides a macro that includes the contents of a text file verbatim in plain TeX documents. It is meant to be included in the "limbo" section of CWEB files.

Go

I wrote these to help me warm up to programming with Go.

pe1.go, pe2.go, pe3.go, pe4.go, pe5.go, pe6.go

Solutions to Project Euler problems.

Python 3

I wrote these modules to help me move from Python 2 to Python 3.

fibonacci.py

Compute the nth Fibonacci or Leonardo number (or its residue modulo m) in O(log n) arithmetic operations.

prime.py

Primality testing, prime generation, integer factorization, and other elementary number theoretic functions.