not quite minimalistic enough  

2018-10-20

Internationales Format

https://www.deutschlandfunk.de/y.807.de.html?dram:article_id=431030

Und manchmal erscheint ihr neben ihrer Tochter auch noch ihre gro├če Schwester Adelheid, oder wie?

2018-10-18

A matter of interpretation

You know, Google, one of these things is far more likely to be what I was looking for than the other.

Nice try, though.

2018-10-13

Yes. Another one.

Let’s have another (little) Python packaging rant. It’s been a while.

I just made a mistake. I thought I had told my deployment software to remove a Python installation, when I had actually only removed one third-party package that I had repackaged as MSI. Then I deleted the whole installation directory (which I believed had only leftover bits).

Oops. How do I clean this up?

Well, let’s just install the whole thing again, from the original – shudder – burn bundle.

Won’t work. Takes but a second, then claims success. No wonder, all the metadata is still there; for the bundle it looks like all its little constituent parts are already installed.

So we uninstall the bundle? Error 1603.

So we repair it? Gets up to pip (having done nothing to the actual file system), then fails, “no installation detected”. You don’t say.

Fix? Download the whole set of MSIs, install them in an order that works, uninstall them in reverse order, then install the bundle and uninstall it again.

Ceterum censeo: This mess would have been avoided had I thought before typing. OTOH, it also would have been avoided by using MSI as the distribution package format because then a repair installation would have actually worked.

2018-10-04

Weltschmerz

Currently converting a Django project that was using ZPT via Chameleon to Django’s own template language.

No, I don’t think this is a good idea.

Unfortunately, Django’s developers make it increasingly difficult to generate XHTML, and recent versions have essentially made it impossible without rewriting a good bit of the framework itself.

For some reason, the Django project has decided to embark upon a crusade against XHTML, and my poor little ZPTs are its victims.

Honestly now. Which is better?

This:

<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:tal="http://xml.zope.org/namespaces/tal"
      xmlns:metal="http://xml.zope.org/namespaces/metal">
...
<body>
<h1 tal:content="section"/>
<p tal:repeat="item items" tal:content="item.label"/>
...

Or this:

<!DOCTYPE html>
<html>
...
<body>
<h1>{{ section }}</h1>
{% for item in items %}
<p>{{i item.label }}</p>
{% endfor %}
...

When done adequately, ZPT are well-formed XML. When done correctly, they are valid XHTML (the templates themselves, not just [but also!] their output).

Django templates, on the other hand, are line noise when done completely wrong, and still line noise when done “right”.