May 25, 2007
307
Two days spent rafting on the Guadalupe River.
No internet.
- 295 new Email messages
- 39 new papers submitted to hep-th
- 195 new trackback spammer IP addresses added to the tarpit
I need to get out more.
May 21, 2007
Froissart Follies
I’ve been meaning, for some time, to write something about string scattering at high energies. There’s an excellent review by Veneziano and a recent paper by Giddings, Gross and Maharana.
But, I have to get something off my chest, first.
May 20, 2007
Rewrite Magic
When you deal with the levels of trackback spam that we do, your defences have to be pretty fine-tuned. I’ve mentioned that I redirect trackback spammers to a tarpit. Here I’d like to explain one of the neat mod_rewrite
tricks involved.
I maintain a DBM database of trackback-spammer IP addresses. How the database is populated is a closely-guarded secret. Suffice to say that it consists of key/value pairs, where the key is an IP address and the value is the relative URL of a tarpit CGI script.
The first thing to do was to move the trackback CGI script out of the way:
% mv mt-tb.cgi hidden-tb.cgi
Then, in the server-config section of my httpd.conf
file, I added a RewriteMap
directive
RewriteEngine on ... RewriteMap tb_spammers dbm:/file/path/to/the/database
Finally, in the Directory-config section for my MovableType installation, I placed
RewriteEngine on ... RewriteCond %{REQUEST_URI} mt-tb\.cgi(.*) RewriteRule .* ${tb_spammers:%{REMOTE_ADDR}|hidden-tb.cgi%1} [L]
Legitimate trackbacks are redirected to the trackback script. Spammers are redirected to the tarpit.
The advantage of using a database are several
- No need to restart the server when IP addresses are added/deleted.
- It can handle a large number of IP addresses with equanimity.
- Lookup results are cached in-core until the
mtime
of the database changes or the server is restarted. So this method is much faster than any of the alternatives.
mod_rewrite
is an incredibly powerful tool. RewriteMap
makes it even more powerful, by letting you interface with external databases or programs. In my case, it helps me keep the trackback spammers on a short leash.
May 6, 2007
So much for Unicode!
Unicode is supposed to cover all of the alphabets in the known universe (Klingon almost made the cut). But, if you look at mathematical scripts, you’ll see a glaring omission. Sure there are Blackboard Bold (𝔹, 𝕓, 𝟛, ℾ, ℽ) and Fraktur (𝕭, 𝖇, 𝔅 𝔟) and Calligraphic (𝓑, 𝓫, ℬ, 𝒷) letters.
But how about what is, perhaps, the most commonly-used variant in High Energy Physics: slashed letters? As in the Dirac operator or the fermion propagator
Nope. Not there in Unicode. Which means there’s no MathML markup to produce them either.
Shocking.
Well, no solution is perfect, but the above are produced by overstriking two existing Unicode characters. The result is a little crude, but acceptable.
The (new) itex syntax is
\slash{D}
which produces
<mrow><mpadded width="0.125em"><mo>/</mo></mpadded><mi>D</mi></mrow>
If the MathML experts out there think there’s a better solution, I’d love to hear it.
In the meantime, users can enjoy itex2MML 1.2.2.
Update:
Poking around, it occurs to me that another viable alternative to U+FF0F is U+29F8:and
Anyone have a strong preference?
May 3, 2007
Boltzmann Entropy
This semester, I’ve been teaching a Physics for non-Science majors (mostly Business School students) class.
Towards the end of the semester, we turned to Thermodynamics and, in particular, the subject of Entropy. The textbook had a discussion of ideal gases and of heat engines and whatnot. But, somewhere along the line, they made a totally mysterious leap to Boltzmann’s definition of Entropy. As important as Boltzmann’s insight is, it was presented in a fashion totally disconnected from Thermodynamics, or anything else that came before.
So, equipped with the Ideal Gas Law, and a little baby kinetic theory, I decided to see if I could present the argument leading to Boltzmann’s definition. I think I mostly succeeded. Herewith is a, somewhat fancied-up, version of the argument.
May 2, 2007
SVG Redux
In a previous post, I announced support for inline SVG in posts and comments on the blogs I host here on Golem. Unfortunately, to be compatible with the built-in copy of the W3C Validator, the SVG had to adhere to the idiotic restrictions of the W3C profile for XHTML+MathML+SVG. Which was a problem, if you wanted to avail yourself of GUI tools, like Inkscape or to reuse much of the SVG that’s available on the 'net.
Sam Ruby suggested some code to convert Namespace well-formed XHTML+MathML+SVG into the format demanded by the W3C Validator. I added a couple of tweaks, and rolled the result into a MovableType plugin.
So, now, you don’t need to add completely superfluous svg:
prefixes to your SVG code. The plugin will handle the conversions necessary to keep the W3C Validator happy.
1 These restrictions are the result of letting the limitations of your conformance-checking tool dictate how your Specification gets written, rather than the other way around. As long as a compound document is Namespace well-formed, there shouldn’t be any further restrictions on how, precisely, the SVG, MathML and XHTML namespaces are declared.