January 9 Wednesday, 5:44PM. Cargo gets a nice shout-out at around 1:08:00 in http://betweenthebrackets.libsyn.com/episode-25-denny-vrandei #

January 8 Tuesday, 6:33PM. I just added the Wikiapiary logo to the footer of ArchivesWiki#

January 7 Monday, 9:30AM. Finally figured out the weird bug in the tests for MissedPages. https://gerrit.wikimedia.org/r/c/mediawiki/extensions/MissedPages/+/481633 #

January 6 Sunday, 2:07PM. Right, for about the 4th time in the last few years, I've nuked my WordPress site and replaced it with a peculiar MediaWiki install. We'll see how long it lasts this time (till I get bored). #

January 4 Friday, 10:02AM. "only two Australian coins — the holey dollar and dump coins — have had their legal tender status removed."

—[https://www.abc.net.au/news/2019-01-04/obscure-coin-laws-that-made-a-petrol-station-refuse-service/10685290 An obscure coin law let a shop refuse service to an Adelaide mum. Here are #

January 4 Friday, 7:55AM. This (normal suburban) bus has seats that recline! Crazy. #

January 3 Thursday, 1:04PM. How have I only just learned about nvm#

December 31 Monday, 5:41PM. I'm heading out to NYE in Oakland. #

December 31 Monday, 5:41PM. No one is ever going to read anything I write on this site. Oh well. #

December 30 Sunday, 3:52AM. It should probably be called MissedPages instead. #

My coffee mug

Hello world, and welcome to my corner of the web. This is where I write words about what I'm working on, and post photographs of things I've seen.

I'm a Software Engineer at the Wikimedia Foundation, and so of course my personal website is a wiki (running on MediaWiki). In my spare time I volunteer with WikiClubWest to work on Wikimedia projects, mostly around my family's genealogy and local Western Australian history (especially to do with Fremantle). I try to keep up with issues on all the things I maintain (but usually fail).

I also try to find time to work in my workshop on various woodworking projects. Recently, that's been focused on restoring a chest of drawers and building a metalworking bench.

Travel features in my life, not because I really hugely want to go elsewhere but because I just do — and also because then I can do some more interesting mapping on OpenStreetMap.

I'm currently reading Dreaming in Code (Scott Rosenberg, 2007), and Everyman's Rules for Scientific Living (Carrie Tiffany, 2005), and Fathers of Men (E. W. Hornung, 1912).

To contact me, you can email me or find me on the Freenode IRC network (as 'samwilson'). If you want to leave a comment on this site (by creating an account), you need to know the secret code Tuart (it's not very secret, but seems to be confusing enough for most spammers).



Options should NOT have additional properties

San Francisco

I'm getting this error when compiling SVG Translate's assets with Webpack:

error  in ./assets/app.less

Module build failed (from ./node_modules/mini-css-extract-plugin/dist/loader.js):
ModuleBuildError: Module build failed (from ./node_modules/css-loader/dist/cjs.js):
ValidationError: CSS Loader Invalid Options

options should NOT have additional properties

It's come about due to trying to upgrade to css-loader version 2.1.

If I comment out all the assets in webpack.config.js, the error goes away, and comes back when I only include assets/app.less (I didn't try to narrow it down to any other files; one example should be enough).

It sounds like the options for css-loader have changed. If I dump the config for that module, I get this:

    loader: 'css-loader',
    options: { minimize: true, sourceMap: false, importLoaders: 0 }

It seems that minimize and sourceMap are not valid options; the first was removed in version 1.0.0 (which I guess SVG Translate wasn't using), and I'm not sure about the second. I'm not sure where they're coming from, I guess some Encore config somewhere; certainly it's not in SVG Translate's config.

What if I just delete them?

	delete module.exports.module.rules[1].use[1].options.minimize;
	delete module.exports.module.rules[1].use[1].options.sourceMap;

Nope, no good; same error. Oh, of course: because that's being done after the loader is being used. What if the css-loader is configured manually, earlier?

		.configureCssLoader(function ( options ) {
			delete options.minimize;
			delete options.sourceMap;
			return options;
		} )

Yup! That works. Does it work when all the other asset files are uncommented? No:

error  in ./node_modules/oojs-ui/dist/oojs-ui-wikimediaui.css

Module build failed (from ./node_modules/mini-css-extract-plugin/dist/loader.js):
ModuleParseError: Module parse failed: Maximum call stack size exceeded
You may need an appropriate loader to handle this file type.
RangeError: Maximum call stack size exceeded

If we switch to an already minified version of node_modules/oojs-ui/dist/oojs-ui-wikimediaui.css? Yes!!

So maybe things are okay now? This feels like a reasonably ugly fix, but if it works then I'm happy for now.

The result is here: https://github.com/wikimedia/svgtranslate/pull/45

Blue Bottle


I'm sitting in another Blue Bottle cafe, this time in Berkeley. These are nice places. Slightly stark, with the plywood-concrete-whiteplastic thing, but the acoustics seem fine and the tables are a good height at which to code. The coffee isn't as good as I had the other day; I'm still on the search for a decently over-roasted moka pot brew; this is as good as I've had though. I don't see why they can't serve a cup with a saucer though—I understand not having napkins, that's a good idea, but without either all I'm left with is a drippy coffee splash on the bench here.

I'm working on my silly little Log404 MediaWiki extension this morning, because I want to be able to retire my WordPress installation and do everything here in the wiki. So far, it's recording, reporting, redirecting, and deleting not-found pages, but I need it to handle redirects better and it seems there's some better way to work with query strings of the log entries. It should also be able to ignore 404s. I'm giving up for the time being on catching 'found' not-found pages such as example.org/?foo=123 which as things stand just redirects to the Main Page and is not considered a missing page. If one were migrating from a system that treated that as its own page, things wouldn't work. Perhaps it'll be enough to check for unknown query string parameters only for Main Page (because I don't suppose we should be doing it on load of every page in the wiki). That can all wait; at least so far it's going to be possible to catch e.g. example.org/2018/12/29/foo and quickly redirect it to Foo or wherever.

Does it need to store both the 404 page name and the whole query string, given that the latter always contains the title attribute? It might not be, but it might be easier to query this way... oh, and actually, given that the page title is the only thing we can redirect (i.e /Bar and /Bar?foo=123 can't be handled separately) it probably does make sense. Why then are we including the query string?

In a café in Berkeley


Is the internet a good place to start typing random thoughts? It feels like it’s probably not, because of all the “taken out of context”, “recalled in future years and laughed at”, and “what’s the point no one will see it” responses. But it also feels like random beginnings and unplanned words are the only things that will ever lead to more coherent and useful words, and that putting them out in the great wash of the online world is slightly better than hiding them away in a notebook in my own bottom drawer. I do write lots and lots of words that only I will ever see, and they’re usually pretty unpolished. I don’t think that what I put on this blog or Twitter or anywhere else is particularly good, but I do at least attempt to finish sentences and thoughts, and fix typos. Maybe that’s all I mean: that uploading ideas makes the brain follow through and express them, and in doing that there’s a surprising amount of satisfaction.

Exporting chat transcripts from Signal


I've started using Signal for some things, and it seems there is a way to export chat histories from the desktop client:

  1. Open the developer tools sidebar (ctrl-shift-i)
  2. Navigate through the 'Elements' view to the div.conversation-stack element
  3. Right click on that div and 'copy outerHtml'
  4. Past this HTML into a new file and save it somewhere

Now that file can be viewed with a web browser.

This isn't a particularly great export of course, but at least it's something.

Bentley Library

Bentley Library

Interesting discussion this morning at Bentley Library about how the Wikimedia movement can fit in to the library's programmes. Thoroughly inspiring! Am looking forward to more.

Bently Library 'Hub' sign on wall.jpg

Old code


It's really quite relaxing working on existing systems compared to building new ones. There are a bunch of old decisions that have already been made about the basic things, and maybe they're annoying decisions and might be done differently if done today, but at least they're done and one needn't figure it all out again.

Data modeling


I know I've said it before, but I really do find data modeling within MediaWiki with Cargo is great fun, and happens with the quick speed of normal wiki editing. It's a lot nicer (for the bulk of cases) than attempting to build a bespoke application. (Of course, I should preface all of this with some caveats about what can be done, but blah blah that can all be taken as read).

It's better to come at things from the other end, of say a small set of data in a spreadsheet. This can in many cases be easily ported into the MediaWiki idea by creating a single wiki page for each row of data, with each page containing a call to a single template. This template is where almost everything else is done.

One weird thing about it is that it's sort of closer to a EVA schema than a normal table, because each record can (but really shouldn't) have different attributes. This is a good thing from a point of view of tracking changes over time to the data, because changes to attribute names as well as their values are tracked in the page history. Of course, it also means that one has to do more scripting for some types of data modification, but for the most part that's not very hard.

Today the thing I'm enjoying about it is that it's perfectly easy to set up a new template and table and things for any quite small dataset. That means that data is given the structure it needs, rather than being munged into some more generic schema. (I guess this will also probably come back to bite me one day too, because I'll have separate things that don't fit together! But oh well.)

The other weird bit about Cargo is that it almost does away with the need to have categories in MediaWiki. I'm not sure if that's a good thing or not. So far I'm loving the extra flexibility I get with 'keywords' that are usually tied to mainspace pages.

Fremantle civic centre demolition


2018-10-09 Fremantle civic centre demolition jaws.JPG

I went to see the demolition of the civic building in Kings Square today. It's a bit sad to see it all coming down. Interesting to see the side of the town hall exposed, but really mostly just melancholy. Change is always a bit like that.

(These photos are also on Commons, in commons:Category:October 2018 in Fremantle.)


Retrieved from ‘https://samwilson.id.au/index.php?title=Welcome&oldid=2099