Saturday, March 31, 2007
RGB Color Cube
Let a path be a function of position with respect to time. Define a path on the surface of a RGB color cube, i.e., saturated colors, whose brightness, defined as a certain linear combination of the color components, increases constantly as a function of time. Let the path start at the black corner, spiral around the surface of the cube, and end at the white corner.
Deconstructing God
Window managers
I would like to see a window manager that worked in modes like vi. In one mode, keystrokes and other input events are sent to the application with focus, in another they are sent to the window manager.
Friday, March 30, 2007
Paravirtualization
Compressed matter
Thursday, March 29, 2007
5
Sunday, March 25, 2007
gs and netpbm
gs -sDEVICE=ppmraw -sOutputFile=- -r1720x1720 -dNOPAUSE -q -dBATCH
MBTA-system_map-back.pdf | pnmdepth 65535 | pnmscale 0.5 | pnmgamma
0.5 | pnmdepth 255 | gzip >| f.gz &
gs
Got bits of this command line from pstopnm -verbose and generally do better to call gs directly than use pstopnm. pstopnm was doing some weird "translate" that made the image get clipped wrong. I suspect sign error.
Looking at gs with top, it only uses about 14 megabytes of memory even for creating very large images. This suggests it is allocating a small buffer "window", rendering to that window, emitting it, and sliding the window down, making another pass. There seems no way to make the window larger if you have memory to spare and want better performance.
Such a windowed output has the possibility of some computer-graphics tricks where the PDF is parsed into a range tree so that only the parts that are going to be in that window will be rendered.
-sDEVICE=ppmraw
You can also use png16m. ("16 million" or 24-bit color.) But pngtopnm has a bug that it tries to render the entire image at once and runs out of memory. If the png is not interlaced, it should do rows. If it is interlaced, it should buffer the compressed data in memory, create an index (possibly including zlib state) of the beginnings of each sub-image and each row in each sub-image, and then render row-by-row.
-sOutputFile=-
gs is broken for large files, so emitting a file greater than 2Gb breaks. If this happens from within pstopnm, it dies with a horribly useless error (signal #foo), but invoking gs directly gets you an error message like "file size limit exceeded". Use the png16m option above, or pipe to stdout. My shell (bash) does handle large file pipes ok (old versions of tcsh did not). Note that piping to stdout won't work quite so easily for multi-page documents.
-r1720x1720
Specify the resolution directly, rather than the output image size. I don't know if this accepts decimal points, though it ought to.
-dNOPAUSE
Don't pause at the end of the page (reading stdin).
-q
Don't emit gs introductory text. It would be bad if this got prepended to stdout.
-dBATCH
Without this option, gs gives you the "GS>" prompt at the end (which gets written to stdout), and waits for user input, e.g., quit. This option makes it quit automtically after the last page.
MBTA-system_map-back.pdf
Hey look! gs can take as input pdfs, letting you skip the sketchy pdf to ps (postscript) conversion.
| pnmdepth 65535 | pnmscale 0.5
| pnmgamma 0.5 | pnmdepth 255
Fine black-on-white detail (text) gets shaded down to grey when an image is shrunk, so change the gamma to compensate. In hopes of not losing color, we increase the depth to 16-bits during the operation.
There ought to be an pnmdepth option to do dithering.
There's a bug in pnmscalefixed: "pnmscalefixed: object too large"
| gzip > f.gz
Use gzip to prevent the uncompressed data from ever hitting disk. Disk I/O is kind of slow, and especially O (Output) slow with journaling (ext3). zcat is the opposite of gzip.
In other news, pnmcrop should have a two-pass operation where it gives output the coordinates you can feed to pnmcut. This way it does not have to buffer in memory when cropping left and right.
pnmcut (or another tool) should have a way of cutting out many rectangles all at once, say breaking an image into a 100x100 tiling.
pnmcut should exit after it's emitted the last output; no need to read the rest of the input (this might be fixed).
Friday, March 23, 2007
Tuesday, March 20, 2007
Automatic parallelization
Automatic parallelization of purely functional code is simply the problem of predicting what to speculatively start evaluating while the main sequential evaluation is going on. This prediction can be done by programmer-specified directives, theorem-proving, machine learning, and profile/trace analysis of a previous run. The prediction may be done at compile time or just-in-time with a runtime interpreter.
Even stateful code may be treated similarly if we have good knowledge of who reads and writes which components of state (the good ol' scheduling problem).
Saturday, March 17, 2007
New Mexico's Pluto
The International Astronomical Union, against whom New Mexico's legislation is directly at odds, nevertheless did not disapprove the legislation in a very enlightened way, stating that any public debate on Pluto's status increases public interest and study of astronomy. It's as if mathematicians came out in support of legislation defining the value of pi in Indiana to be 4.
Speculation on unknowns
This is an application of parallel processing not to increase performance, but to aid a programmer who might be working with unfamiliar difficult to understand code.
Static analysis can be done at compile time, but can also be done just-in-time when the values of the regular known parameters are known. It, too, may be an extra thread.
Friday, March 16, 2007
Thursday, March 15, 2007
Chess interface
Compact Disc
text (80 characters 65 lines), 100 hours of speech
aggressively compressed, 10 hours of music.
Wednesday, March 14, 2007
Journaling directories instead of partitions
Ditto for directory-level tuning of other filesystem performance parameters.
Update: LVM gets me most of what I want.
Monday, March 12, 2007
things broken about emacs
Modeline editing is pain
Deep semantic tagging (IDE-like)
Saturday, March 10, 2007
Dewey Odhner's spidrweb fractal
See more of Dewey Odhner's spidrweb fractal, a deep zoom of the Mandelbrot set.

Thursday, March 08, 2007
KVM for virtual machines
with buttons to choose which machine you want your keyboard,
video, and mouse to talk to, but actually plugs into a
single machine and chooses which Virtual Machine it's
talking to.
Wednesday, March 07, 2007
Tuesday, March 06, 2007
Ocean server farm
Monday, March 05, 2007
font-lock haskell-mode
in XEmacs on qualified identifiers like Foo.bar with a period in them:
(warning/warning) Error caught in `font-lock-pre-idle-hook': (error No such face haskell-default-face)
or the minibuffer message: "Fontifying Baz.hs... aborted.aborted."
Here is a Patch.
also, don't forget to (require 'goto-addr)
ipv6 killer app: municpal Wi-fi
Object-oriented programming deconstructed
Object-oriented programming is four things: an interface (that different class types can appear the same to a user via an interface, including that a more complex type can appear to be a simpler one), inheritance (code reuse through subclassing), function dispatch by type (many different classes might have a "run" method: the correct one is selected by the type of the object), and namespace control (managing what identifiers are visible where).
Dispatch by type has two components: static (type determined at compile time) and dynamic (at run time, the C++ idea of "virtual").
Sunday, March 04, 2007
paranoia.jpg (JPEG Image, 500x400 pixels)
this image can be (and ought to be, because of the apostrophe error) rerendered at practically any resolution, if lite-brite coordinates are known. The glow around the LEDs may be simulated with the PDE heat equation.
dabbrev-expand
One can do improve it in two ways: Given a string "abc", instead of search for the regexp /^abc.*/, one can search for /^a.*b.*c.*/ which will more rapidly narrow down among many symbols that begin with the same long prefix.
One can also search for symbols only in lexical scope. It looks challenging, though perhaps not so bad in a Lisp-like language that has been indented properly. The indentation hint is key when in the middle of development and the parentheses don't match properly yet.
