- Outside of my research, my most time-consuming project of late is RegAssist.
- I used to work on a start-up called Ezaria.
- I wrote a web-based collaboration tool called the fileserv. The current incarnation has no security features whatsoever, so I won't post the link on the web. E-mail me if you want it.
- I've written a number of chess packages. I really like the last one, so I used it to write web-based converters for several popular chess notations.
- picp — An in-circuit serial programmer for the PIC16F74 that I designed when I was at K-State and haven't used since.
- Wrote these two small python scripts to “draw” the
Hadamard matrix (description
here) and
Hilbert space-filling curves (description here). The
programs output text PBM images. Here are JPEGs for 32×32 and
1024×1024 Hadmard matrices and the first ten steps of the
Hilbert space-filling curve (click to enlarge):
- Wrote this script to run trials of the Monty Hall game to prove to a couple of disbelieving friends that you do indeed double your chances by switching. One way to see this is to note that switching is equivalent to choosing two doors.
- I wrote this diffraction simulation based on an excellent description I read in Feynman's QED while I was taking physics lab at KSU in 2001. QED is a really beautiful theory and the Feynman's descriptions are quite accessible. This simulation has really bad complexity properties (I think it's N^5), but it's not written too badly. It can be used to generate images of slit diffraction and diffraction on a surface of some kind, but my favorite image is the diffraction pattern of two points (one on top of the other)—obviously impossible in practice—but shows once again that complex behavior can often be fully explained by simple theories. Here's a high resolution image. This is a kind of infinitesimal Moiré pattern.
- Playing around with a new tablet that was cheap and works under linux. Also playing around with SDL and ming using C and python, respectively. These forces combined to produce this (click to see the flash, but give it a second to start):
- A fairly intuitive and long (for a quine, anyway) quine written in python: quine.py. Here's a much more respectably lengthed one: quine2.py—only 150 bytes. This is still long for a python quine, but all of my python programs include the shebang, so I feel that a quine should output that as well. Here's how to test if they're quines:
$ ./quine.py | cmp quine.py
or$ ./quine.py | diff quine.py -
which both satisfyingly produce no output! - I'm a big fan of awk and sed. I keep rewriting this histogram program in awk (awk is, in my opinion, a sensible language to use for this).
Brooke wrote a Scheme program for pretty-printing parse trees, changing them from this:( "top" ( "np" ( "npb" ( "nn" ( "resumption" ) ) ) ( "pp" ( "in" ( "of" ) ) \ ( "np-a" ( "npb" ( "dt" ( "the" ) ) ( "nn" ( "session" ) ) ) ) ) ) )
to this:top np npb nn resumption pp in of np-a npb dt the nn session
Notice how siblings in the tree line up nicely and everything? I rewrote it in sed. This is NOT sensible usage of sed and it's not fast, but it can be done: crazy.sed. - I just wrote a javascript program for drawing using the mouse. Javascript really isn't suited for that kind of abuse and you'll notice your browser start to slow down after you've blotted enough. The faster you move your mouse, the larger the blot will be. Refresh the page to clear. Javascript Drawing.
- Ahh, I love python: make change in one line.
import string f = lambda y: (\ lambda a,b,x: \ b( \ reduce(\ lambda l1,l2: l1+l2, [a(x,10000, "one-hundred dollar bill"), \ a(x,5000, "fifty dollar bill"), \ a(x,2000, "twenty dollar bill"), \ a(x,1000, "ten dollar bill"), \ a(x,500, "five dollar bill"), \ a(x,100, "one dollar bill"), \ a(x,25, "quarter"), \ a(x,10, "dime"), \ a(x,5, "nickel"), \ a(x,1, "penny", "pennies")]))) \ (lambda stor,mad,s,p=False: (\ stor.__setitem__(1, stor[0] / mad), \ (stor[1] != 0 and (stor[1]==1 and \ ["a " + s] or \ ["%d "%stor[1] + (p or (s + "s"))]) \ or []), \ stor.__setitem__(0, stor[0] % mad))[1], lambda s: (\ len(s) > 0 and \ (len(s) == 1 and \ s or \ (len(s) == 2 and \ [s[0] + " and " + s[1]] \ or [string.join(s[:-1], ", ") + ", and " + s[-1]]))[0]), \ [int(y*100),0])
- Heard of Sudoku?
I wrote a sudoku solver in python once.
It's pretty good; I've never found a sudoku puzzle it couldn't solve. To run
it, just prepare a sudoku puzzle in a text file with 9 rows and 9 columns
with digits in the appropriate places and spaces for blanks. Then, convert
it to the input format for my solver by running
$ ./topuzzle.py
It should solve the puzzle (difficult ones may take 30 seconds or longer to solve, so be patient). Click on the following (difficult!) sudoku to see how the program solved it:$ ./sudoku.py 6 | 9 | 2 5 | 7 | 9 | 2 | 8 ---------------------- 4 | 3 | 7 1 | | 4 2 | 1 | 9 ---------------------- 5 | 6 | 1 | 8 | 3 6 | 5 | 4
Check out the other stuff in that directory (including examples and the animation script). - I'll post more later (when I find them).