This page provides links to essays on a variety of topics. Essays are not exercises, they don’t present a task to challenge you, but instead provide extended discussion and complete source code. Though essays are often based on exercises, they are larger, providing more space to delve more deeply into the topic at hand. New essays are added from time to time, so be sure to check back often.

Programming with Prime Numbers: Prime numbers are those integers greater than one that are divisible only by themselves and one; an integer greater than one that is not prime is composite. In this essay we examine three problems related to prime numbers: enumerating the prime numbers, determining if a given number is prime or composite, and factoring a composite number into its prime factors. Source code: C, Haskell, Java, Python, Scheme. Comments HERE.

Text File Databases: Much of the work done by computers involved reading in a file and either transforming it to some output format, perhaps changing it along the way, or summarizing it in some fashion. This essay presents a library of readers, writers, combinators and processors that provide a useful approach to such tasks. The library is written in Scheme, and relies on passing functions as parameters to other functions, so it is easily portable to other “functional” languages but difficult or impossible to port to strictly “imperative” languages. Source code: LIBRARY, TESTING. Comments HERE.

SRFI-41 Streams: Streams, sometimes called lazy lists, are a sequential data structure containing elements computed only on demand. A stream is either null or is a pair with a stream in its cdr. Since elements of a stream are computed only when accessed, streams can be infinite. Once computed, the value of a stream element is cached in case it is needed again. R5RS source code HERE. R6RS source code: streams.ss, primitive.ss, derived.ss. Testing code: R5RS, R6RS. Samples from the text HERE. Original SRFI-41 Streams web page HERE with HTML version of text HERE. Local discussion HERE.

Building a Security Camera with a Raspberry Pi: Thus tutorial describes the construction of a security camera using a Raspberry Pi single-board computer as the embedded controller. The parts cost about a hundred dollars, construction takes an hour or two, and the only on-going monthly cost is to provide an always-on internet connection with a wifi router, which you likely already have. The result is a camera that saves pictures offsite and sends an email whenever it detects motion. Comments HERE.

9 Responses to “Essays”

  1. […] have today our second essay: Text File Databases. An essay isn’t an exercise; it doesn’t present a task for you to perform, […]

  2. […] have today our third essay: SRFI-41 Streams. An essay isn’t an exercise; it doesn’t present a task for you to perform, but […]

  3. […] have today our third essay: SRFI-41 Streams. An essay isn’t an exercise; it doesn’t present a task for you to perform, but […]

  4. […] you are ready to learn more about programming with prime numbers, I modestly recommend this essay at my […]

  5. […] de factorizar números enteros. Cuando esté listo para más, le recomiendo modestamente este ensayo en mi […]

  6. […] के बीच इस एल्गोरिदम पर चर्चा करता हूं प्राइम नंबर के साथ प्रोग्रामिंग मेरे ब्लॉग पर, जिसमें जावा में […]