George V. Reilly

More Blog Cleanup

Last weekend, I restored a number of posts that had appeared on the earlier dasBlog in­car­na­tion of this blog, but had never made it to the Acrylamid version.

I added about another 50 posts this weekend, taken from the Wayback Machine. I think that this is all the posts that are missing.

That required further fixup. I had to turn the HTML back into re­Struc­tured­Text, which I did by hand.

Some useful tips will follow in future posts.

Blog Cleanup

I started this blog 14 years ago, in February 2003, on EraBlog, a long-defunct platform. Many of my early posts expressed outrage at the imminent Iraq War. Within a couple of years, I had moved to running dasBlog on my own website, hosted at ihost.net.

I wrote a lot of posts over the next decade. With rare exception, most posts were composed offline as re­Struc­tured­Text and saved in a repository. There was no formal schema and most posts did not know their permalink.

In late 2014, I moved to the Acrylamid static blog generator and I hosted www.georgevreil­ly.com at GitHub Pages. I migrated most of the dasBlog content into a more continue.

reStructuredText Anonymous Hyperlinks

While re­search­ing yes­ter­day's post about nested markup in Re­Struc­tured­Text, I finally learned how to use anonymous hyperlinks.

Hitherto, I used one of these three forms for hyperlinks:

1. The central conceit of the fictional `Flashman Papers`_ is that Flashy
2. besieging Breda_ in 1625.
3. my club, `Freely Speaking Toastmasters <http://freelyspeaking.org/>`_.

.. _Flashman Papers:
    https://en.wikipedia.org/wiki/The_Flashman_Papers
.. _Breda: http://en.wikipedia.org/wiki/Siege_of_Breda

The first, `Flashman Papers`_, is a named hyperlink reference, which refers to an external hyperlink target, .. _Flashman Papers: URI. Note that the reference name starts with a backquote, `, and ends with backquote-underscore, `_.

The second, Breda_, is a simple reference name—the backquotes are optional, but the trailing _ is crucial.

`Freely continue.

reStructuredText Nested Markup

I use re­Struc­tured­Text for both this blog and the MetaBrite DevBlog. This blog is built with Acrylamid, while the MetaBrite blog is built with Nikola.

Yesterday I used a link (~/.pgpass) that styled the link as an inline literal; i.e., in the code font. Re­Struc­tured­Text doesn't support nested markup, but you can pull it together with a two-step sub­sti­tu­tion reference:

Here you have |optparse.OptionParser|_.

.. |optparse.OptionParser| replace:: ``optparse.OptionParser`` documentation
.. _optparse.OptionParser: http://docs.python.org/library/optparse.html

This is tedious as you have to create a pair of directives for every such link that you wish to style.

Nested inline markup has been on the todo list for 15 years—it ain't happening.

Blog 2014

My DasBlog-based blog at http://www.georgevreil­ly.com/blog/ has been out of commission for months. I've been meaning to replace it for a long time, but I only just got around to making a serious effort, as I realized that otherwise I would have no posts at all for 2014. I received only a handful of complaints about its absence; if there had been more, I would have fixed it sooner.

DasBlog is a fairly light­weight blogging engine that runs on ASP.NET. It doesn't require a database, but it does require the ability to write XML blogpost entries to the local filesystem. That's a non-standard con­fig­u­ra­tion for ASP.NET and IIS websites, which inevitably causes continue.

reStructuredText syntax highlighting

Vim has had syntax high­light­ing since version 5.0 in 1998. It quickly became in­dis­pens­able. It's hard to go back to looking at mono­chro­mat­ic source code after you've become accustomed to syntax high­light­ing.

The syntax high­light­ing is tied into Vim's support for col­orschemes, which define colors for the fun­da­men­tal syntax groups like Number, Comment, and String. The syntax high­light­ing for a particular language defines custom syntax groups for specific language features, such as cppEx­cep­tions or htmlEndTag,

The custom syntax groups are linked to the underlying fun­da­men­tal syntax groups. Hence, if you change your col­orscheme, your syntax high­light­ing is updated au­to­mat­i­cal­ly.

The re­Struc­tured­Text syntax high­light­ing in Vim 7.2 has some short­com­ings, in my opinion. For example, continue.

Dramaturgy: LaTeX

I have a long-standing fas­ci­na­tion with typography. In the late '80s and early '90s, I became quite adept with TeX and LaTeX, the well-known scientific type­set­ting system. When I was at ICPC, I think I read the TeXbook cover to cov­er—twice. I became the TeX ad­min­is­tra­tor for the CS department while I was at Brown.

And then I moved to Seattle to work for Microsoft and entered the world of Windows, and I left TeX behind for more than 15 years.

I wrote the other day that I prepared the Bloomsday scripts in XML for several years, using XSLT to generate HTML. I used to send the HTML to the continue.

reStructuredText

I hate composing anything longer than a couple of paragraphs in an online HTML editor. Specif­i­cal­ly, I hate writing posts for this blog online. I'd much rather write in Vim and upload HTML. But I don't want to compose in raw HTML either.

I use re­Struc­tured­Text (reST), an un­ob­tru­sive plaintext markup language popular in the Python world. reST can generate HTML, LaTeX, native PDF, ODF, and other formats. The picture at right shows a draft of this document in MacVim; reST is, as you can see, quite readable (though I work with a larger font). I use restview to preview the HTML locally and Pygments for syntax high­light­ing of code. Vim has its continue.