Jacob's Code
I mostly maintain various pieces of PLT Scheme, especially PLaneT and some work on PLT Redex, hack on a domain-specific language in progress called Topsl, and write semantic model programs in PLT Redex, but I also have use for the occasional quick hack. This page is a repository for some of those various little scraps of code. Some of them are cool libraries, some are clever little programs, and many are just 5-line scripts that do something I needed. They're provided here under the LGPL (unless otherwise stated); I provide them here mostly so that I can access them easily if I ever want to, but I hope they're useful to you.
PLT Scheme code
Libraries
[Many of these files are .plt files - to install one of them, just copy its URL, go to File -> Install .plt File ... in DrScheme, paste the URL there, and hit OK.]
- for-all.plt (or for-all.ss) - a library that provides a for-all macro that works very much like Haskell's list comprehensions.
- quasistring.plt - a library that provides "quasistrings" with interpreted subparts to PLT Scheme. Quasistring has its own page.
- gvector.plt (or gvector.ss) - a library that provides a growable-vector datatype that supports the usual vector operations plus a grow operation.
- statistics.ss - small, not-very-good statistics library. It has a few basic statistics included.
Programs
- dfa.ss - a little DFA program I wrote. Only a few lines, not much to see here.
- pfc-3.ss - a barcode generator for addresses, programmed as part of the third Programming Fun Challenge. Here is the comment where I posted the code originally.
- pfc-husi-1.ss - Scheme solution #1 to the first Programming Fun Challenge held on Hulver's Site. Here is the comment where I posted the code originally.
- pfc-husi-2.ss - Scheme solution #2 to the same challenge. Here is the comment where I posted the code originally.
- topsl - Topsl is a work-in-progress that will be a survey-generation language when it is complete. That link takes you to its sourceforge page.
- chatter.ss - a chat client/server program I wrote as an example use of PLT's units system for a class. It was written to be part of a talk, so the code may not make too much sense without it, but I think it's probably clear enough.
- magnetic.ss - magnetic poetry emulator. You give it URLs, it turns those URLs into magnetic poetry you can play with. I think it's cool. Thanks to Mike MacHenry for hacking in printing and the 'Clear' button.
- scanner.ss - the multithreaded portscanning demo application I explain in my article "Why I Like PLT Scheme".
PLT Scheme Web Server Servlets
- wordspeed.ss - a demonstration program that asks the user to click on a line in response to several words presented in random order and then produces a variety of information about the locations of those clicks. I wrote this program because I was bored and some guy at some party had said he'd be interested in it for some psychology thing. I never tracked the guy down, but I think the program is kinda cool.
- machines.tar.gz - three abstract machines (C-Machine, M-Machine, and E-Machine) that interpret MinML from Robert Harper's Programming Languages: Theory and Practice book. This bundle includes abstract interpreters in one file (machines.ss) and a servlet that illustrates their inner workings in another (show-machine.ss).
Other Stuff
- I've got some code over at PLaneT, and also I wrote PLaneT so I suppose it counts in itself.
Other Code
[Most of my for-fun programming is in Scheme. However, digging around on my hard drive I've found a couple things that might be interesting to others written in other languages.]
- pfc-husi-sml.sml - an SML version of the first Programming Fun Challenge on Hulver's Site. This version was not posted.
- pfc-husi-haskell.hs - a Haskell version of the same challenge. This one is my favorite. Here's the comment where I posted the code originally.
- meta.cc - a very small code fragment illustrating how to use C++ templates to perform calculations at compile time. This one computes the factorial function.
- gophers.hs - a solver for the Prairie Dog Town puzzle.
All programs linked on this page are copyright © 2003 Jacob B. Matthews.
The plug icon graphic used on this page supplied by FreeFoto.com.