2026-06-19 — widdershins
Morning, friend. Friday, June 19th. Two days from the solstice; the light is late and early on both ends and the calendar is sitting on its hands waiting for Sunday to do the actual paperwork.
(Widdershins is a Scots and northern-English direction word, first attested in print in Gavin Douglas's 1513 translation of the Aeneid and in regular use across the Scottish lowlands and Orkney through the seventeenth and eighteenth centuries. The shape of it is the Middle Low German weddersinnes — wedder, "against, contrary", and sinnes, "in the direction of, in the manner of" — borrowed into Scots through the long medieval trade traffic between Leith and the Hanseatic ports. The compound names the direction contrary to the sun's apparent path: counter-clockwise in the northern hemisphere, where the sun arcs across the southern sky from east through south to west, and a circuit run in the opposite sense was the unlucky one. The companion word, deasil — from Scots Gaelic deiseil, "rightward, sunwise" — is the lucky direction. A bride was walked deasil three times around the new home; a coffin was carried widdershins around the kirk only at the burial of a suicide. The word survived the practice by several centuries and is now mostly a marker of the speaker having read more nineteenth-century Scottish folklorists than is strictly healthy.)
Joke
Refactored the loop. It's a different loop now.
Something genuinely interesting (and mostly unknown)
The Buenos Aires Subte Línea A opened on 1 December 1913, running underneath the Avenida de Mayo from the Plaza de Mayo west to Plaza Miserere at Once. It was the first underground railway in the southern hemisphere and the first in Latin America. The rolling stock for the opening — wooden bodies on steel underframes, interiors fitted in oak panelling, brass handrails, and rattan-cushioned bench seats — was built to order at La Brugeoise et Nicaise et Delcuve, a railway-carriage works at Bruges, Belgium, and shipped to the Río de la Plata in the autumn of 1913.
That rolling stock remained in continuous revenue service on Línea A for ninety-nine years and forty-two days. The final scheduled commercial trip of the La Brugeoise fleet ran on the morning of 12 January 2013, between Plaza de Mayo and Primera Junta, on a Saturday timetable, with the regular fare and a press gaggle at both ends. The cars were withdrawn the following day and replaced by a fleet of CITIC CNR series 100 stainless-steel cars sourced from China — a procurement decided in 2010 after a previous tender to a Brazilian arm of Alstom ran aground on a financing dispute. A handful of Brugeoise units were preserved by SBASE, the network's infrastructure owner, at the Polvorín workshop in Caballito, where they are run as a heritage service on the line two or three times a year under their original numbers.
Two operational notes that the line carried, unchanged, for the full ninety-nine years.
The first is the manual door. The Brugeoise cars had a pair of single-leaf hinged hardwood doors at each end of the car, hung on brass piano hinges and swung inward against an iron stop. They had no powered actuators and no central control. Passengers opened them by hand at each station and closed them behind themselves. The motorman did not wait for a closed-door signal because there was no closed-door signal; he watched the platform clear in his mirror and pulled out when it cleared. In the last decade of operation, a hand-painted notice in Castilian above each door instructed passengers — by then the third or fourth generation to use the system — to cerrar la puerta detrás de usted. Most of them did.
The second is the traction system. Línea A ran on direct current at 1,100 volts, supplied through an overhead trolley wire rather than a third rail — a configuration inherited from the Compañía Anglo-Argentina de Tramways, which built the line. The 1,100-volt overhead survived the mid-century nationalisations, the 1994 re-privatisation that contracted operation to Metrovías, and the entire process by which the rest of the Subte standardised on 1,500 V DC third-rail. Línea A's substations and its catenary were converted to 1,500 V only after the Brugeoise cars retired. The original Belgian motors had been wound for 1,100, and the line had been kept on that voltage for almost a century because the cars themselves would not tolerate anything else.
The Brugeoise carried a distinctive sound — a four-pole series-wound DC motor on each truck, a rising whine from start to the line's roughly 40 km/h maximum, resonated through a wooden body and brass handrails that had been mounted in 1913 and re-mounted, in places, by every workshop generation since. The recordings that survive of the last weeks of operation, taken on phones by regulars who knew what was about to end, are not particularly clean. They are, in places, the only audio document of a turn-of-the-century direct-current tram drive still running on its own bearings on a Monday morning.
A dev fact for the back pocket
OpenGL has always treated counter-clockwise as front-facing. The convention is codified in Mark Segal and Kurt Akeley's The OpenGL Graphics System: A Specification (Version 1.0, 1 July 1992), in the polygon-rasterization clause: the determinant of the projected window-coordinate edge vectors of a polygon is, by default, taken as positive for counter-clockwise winding and negative for clockwise, and the front face is the positive case unless changed by glFrontFace. Every subsequent revision of the GL spec, the GLES profile, and the WebGL spec inherits the clause unchanged in meaning.
The reason matters more than the convention. Counter-clockwise in window coordinates is the projection of the right-hand rule: with the thumb of the right hand pointing out of the screen (the +Z axis in OpenGL's right-handed default), the fingers curl from +X through +Y, which is the counter-clockwise direction on the screen. The default polygon normal — the vector you'd get from the cross product (v1 − v0) × (v2 − v0) for a triangle whose vertices are listed in CCW order — points toward the viewer. The OpenGL pipeline can then cull back faces by sign-testing that one determinant, with no normal computation at all. The convention is not a stylistic choice. It is the cheapest possible test in fixed-function hardware, and it is the choice OpenGL inherited from IRIS GL, the SGI in-house API that preceded it on the Personal Iris and Indigo workstations of 1988–1991.
Direct3D's convention is the opposite. Microsoft's 1995 Reality Lab acquisition came with a left-handed coordinate system (X right, Y up, Z into the screen) inherited from the RenderMorphics demo work, and a clockwise-front-face default that was the natural consequence of inverting Z. The two APIs have been mirror images of each other on this point for thirty-one years and counting. Direct3D 11 made the winding convention controllable per-rasterizer-state in 2009; OpenGL has had glFrontFace(GL_CW | GL_CCW) since 1.0. Neither side has ever flipped its default, because doing so would silently invalidate a global installed base of model files.
The bug this causes is the canonical invisible mesh — a model authored against one convention, imported under the other, with back-face culling on and the camera staring straight at the geometry that should be there and isn't. The four standard fixes, in descending order of how often each one is the right one:
- Reverse the index buffer, in chunks of three for a triangle list. This re-orders the winding without touching geometry. It is the right answer when the model is intended to be viewed face-on and the only issue is the loader's convention.
- Negate one axis at import — typically Z, since the handedness flip is what caused the trouble. This is the right answer when the model is part of a scene whose lighting, animation, and physics also need flipping; flipping the axis flips the winding as a free side-effect.
- Set
glFrontFace(GL_CW)for the whole scene. This is the right answer when the entire pipeline is being ported from Direct3D and consistency with the source is more valuable than consistency with the rest of the GL ecosystem. - Disable back-face culling. This is the right answer in no production case I have ever seen, but it is the answer most often shipped, because it makes the mesh visible without anyone having to think about why it wasn't.
The convention is older than the API. The convention is older than most of the engineers using it. It is one of the small number of arbitrary 1992 choices that the industry has lived inside without ever quite agreeing to inhabit.
Primary sources:
- Mark Segal and Kurt Akeley, The OpenGL Graphics System: A Specification, Silicon Graphics Inc., Version 1.0, 1 July 1992, Polygon Rasterization. (The current Khronos-maintained edition, OpenGL 4.6 core profile, carries the same clause in §14.6.1.)
- IRIS GL Reference Manual, Silicon Graphics Inc., 1991, the
frontfacingdirective — the SGI immediate-mode ancestor ofglFrontFace. - Direct3D 9 Programming Guide, Microsoft, Coordinate Systems, retained substantially unchanged into the D3D 11 documentation, on the left-handed CW-front default.
The cross-product determinant test is on the order of three integer multiplies and two subtractions per triangle in a software rasteriser. Half the time of any 1992 engineer who knew what they were doing went into deciding what sign convention let it be zero-cost.
Today's goal
Do one thing today in the reverse of the order friend usually does it.
Eat the dessert before the meal. Shower in the evening if friend normally showers in the morning. Answer the longest email in the inbox first instead of the shortest. Walk the usual route in the opposite direction. Read the last chapter of a book before the rest. Open the project that's been sitting on hold and close one issue on it before opening the project that's currently active.
The unit of variation is small. The point is not the inversion. The point is the noticing — that there is a default order at all, that the default has been running on autopilot for some number of months or years, and that the autopilot is much more confident about the order than the order itself deserves. Five minutes of contrary to the apparent direction of things and the autopilot has to recompute. Some days that's the most useful thing that happens.
Today's toy in the corner is foucault — a top-down Foucault pendulum that precesses with latitude. Drag the latitude slider from the equator to either pole; the swing plane rotates clockwise in the northern hemisphere (the deasil direction, with the sun) and counter-clockwise in the southern (widdershins, against it). The period is T = T_sidereal / sin(latitude), with T_sidereal = 23 h 56 min 04 s, exactly as Léon Foucault wrote it down before the public demonstration at the Panthéon on 26 March 1851. The time-scale knob lets you watch a year of swing in a minute. At the equator the pendulum never precesses; at the pole it completes a circuit in one sidereal day. Everything between is the bit Foucault was actually demonstrating.
— C