Saturday, June 30, 2007

Read-only functions in State monad

Create a State monad that some functions may be typed as only reading the state, not modifying it.

Friday, June 29, 2007

Head mirror

Filesystem which automatically keeps itself synchronized with the latest revision of a revision control system like Subversion.

Non-active embed

I wish firefox embedded objects would not accept input events unless explicitly allowed to. They would be images.

Thursday, June 28, 2007

Design for modifiability

Software you may modify is nice but software you can modify, with little effort, is better. We need ease of understanding what it does, ease of debugging and tracing, modular design such that local changes do not affect the whole. Pure functions without side effects are good.

Sunday, June 24, 2007

Two billion primes

Differences between consecutive primes (from 3) encoded as in ASCII as c=(p2-p1)/2-1 then compressed with gzip. Numbers up to 49,392,123,905 are sieved, yielding 2,094,974,026 primes (including 2). Confirmed at the Nth prime page. We used a 32-bit machine with 3GB RAM. The encoding scheme is safe, as the first gap of 512 or more happens at 304,599,508,537 (prime #11,992,433,550) (304599508537 11992433550), although multiple-of-three stepping stones could have been used if they were needed. Source and compressed data are here. Sieves are hard to write. Just download and do some addition.

Gas Mileage

Theoretical maximum gas mileage of a compact sedan suffering only air resistance.

(36 400 000 (J / L)) / (0.5 * (1.29300 (kg / (m^3))) * ((25 mph)^2) * (7.34 (ft^2))) = 1600 miles per gallon

Saturday, June 23, 2007

Bottled pure water

How toxic is pure water? It tastes bad, but can you really get sick from drinking normal amounts of it? The masses can be convinced to buy and drink anything they think is good for them. I would put two gimmicks on the packaging: electrodes so that anyone can test its electrical resistance and a pop up lid that ensures it has been sealed and pasteurized.

Wednesday, June 20, 2007

Ubuntu xmonad script

A script to download, compile, and install Xmonad on the Ubuntu LiveCD.

Tuesday, June 19, 2007

419 movie

The Nigerian 419 scam could make a good movie, or several, or perhaps a film festival or contest. It could obviously be a documentary. It could also be a thriller or tragedy told from the point of view of the victims. It could be a comedy mocking the gullible victims. It could be just a side plot device that the villain uses to gain money and power. There could be some public funding as part of awareness education.

Freenet back links

Freenet, or something like it, could implement back links. Because documents cannot be deleted, a reverse link, if accurate once, is accurate forever. This would increase the linkiness of the network and the discoverability of documents which I think is a current problem. The mechanism could be whenever a hypertext document is inserted, and/or whenever a link from one is followed, metadata is also inserted keyed on the target of all the links. Whenever a document is accessed, the client or spider may also try to retrieve all the metadata about that document.

There is plenty of opportunity for spam sadly.

Thursday, June 14, 2007

Avoiding parking tickets

Parking tickets are placed underneath a windshield wiper. Consider a shared project where lots of people put small motion sensors on their wipers which send out a radio signal when the wiper is touched while the car is off. Other cars in the area can listen for the signal and alert their owners that parking enforcement is occuring in the vicinity.

Wednesday, June 13, 2007

Hearing yourself speak

Cell phones differ from land line phones in that cell phones do not send your own voice back through your own ear as you speak. In noisy places, this results in people needlessly shouting into their cell phones in order to hear themselves speak, even though the cell microphone will pick them up fine at a lower voice. People find it psychologically unnerving to engage in a conversation where you cannot hear yourself as you speak, almost as if your words are disappearing out of your mouth. You need aural feedback that you've actually spoken something.

Internet phone with emergency cell

It seems one could easily create an internet phone device which routes emergency calls through the cell phone networks, selecting among several which ever has good coverage. Note that you do not need cell service to make an emergency cell call. All other calls are only to internet devices which use a compatible protocol.

Thursday, June 07, 2007

Can of Air

If you shake a gas-filled sealed container, you will create pressure differences.

Monday, June 04, 2007

Key obfuscation in software

Although it pains me to potentially aid the MAFIAA, here is a technique to conceal the decryption key in a software decoder. The key idea is that the key is known statically at compile time. Therefore, the key may be "encoded" structurally into the decryption algorithm itself, instead of existing as data that the algorithm, or the reverse engineer, reads. We unroll the general decryption algorithm rounds hardcoding the expanded key into each round. If we can encode at the bit level, the structural encoding consists of pruning a branch not taken depending on the hardcoded bit of the key. This straight-through code should be optimized, further concealing the original key, then obfuscated.

My company's product, Bluespec, may be unusually used to create such a structural encoding of a key. Bluespec is normally a tool for electronic hardware design, but it has a very good "understanding" of what part of a computation ought to be done statically, to be encoded in the structural layout of wires and other computational components of a chip, and what is computed at runtime by pumping electrons through that chip. But for a purely software application such as our problem, Bluespec produces Verilog which may executed by a Verilog simulator, or a cycle-accurate C++ simulator, either which may be called as the decryption routine.

Long key cipher

Does Rijndael and AES become less secure if you amputate the key expansion/key schedule step and simply replace it with a long key of appropriate length?

Suppose we wished to use a very long keyed cipher. The idea is even if the adversary were to get access to the key, it would be very awkward to transport or transmit it: a key gigabytes or terabytes in size.