Announcing Wikis World, a Mastodon server for wiki enthusiasts

Recently mastodon.technology announced it was shutting down at the end of the year. It's been a great home for my postings and a bunch of people I follow. My mastodon.technology handle was even printed in my college newspaper (normally reporters' Twitter handles were used).

To fill the gap, Taavi and I have launched wikis.world, a Mastodon server for wiki enthusiasts. Please reach out to one of us for an invite!

You can follow me as @legoktm@wikis.world.


Originally our plan was to self-host Mastodon and recruit a team of volunteers to share sysadmin duties, but we didn't get enough volunteers (pretty understandable!). Nemo suggested using a hosting service like masto.host, which is exactly what we ended up doing. Once we had the domain name, it was pretty straightforward to get set up and start customizing.

Our plan is to apply for a "Rapid" grant to cover the cost of the domain name and hosting.

Looking forward I'm expecting another influx of people joining the Fediverse as Elon Musk's acquisition of Twitter continues. Hopefully Wikis World can be a good starting point for all of our friends who are involved in wikis and need a place to start!


A short Scribunto sprint

I recently did a short sprint on Scribunto, the MediaWiki extension that powers templates written in Lua. It's a very stable extension that doesn't see very many changes but given how useful it is to making most wikis work, I thought it could use some love.

Patches written:

Revived patches:

Reviewed patches:

Bug triage and review:

This was definitely fun and has given me some ideas of other improvements that can be made. But I'm most likely going to switch focus to something else that needs some love.


Introducing mwseaql, a crate for MediaWiki SQL query building

I've published a new crate, mwseaql, which provides typed definitions of MediaWiki's SQL tables for use with the sea_query query builder.

It's a pretty simple implementation, there's a small Python script that parses MediaWiki's JSON schema file and outputs Rust structs.

Here's an example of it in use from my new rfa-voting-history tool:

use mwseaql::{Actor, Page, Revision};
use sea_query::{Expr, MysqlQueryBuilder, Order, Query};

let query = Query::select()
    .distinct()
    .column(Page::Title)
    .from(Revision::Table)
    .inner_join(
        Page::Table,
        Expr::tbl(Revision::Table, Revision::Page)
            .equals(Page::Table, Page::Id),
    )
    .inner_join(
        Actor::Table,
        Expr::tbl(Revision::Table, Revision::Actor)
            .equals(Actor::Table, Actor::Id),
    )
    .and_where(Expr::col(Page::Namespace).eq(4))
    .and_where(Expr::col(Page::Title).like("Requests_for_adminship/%"))
    .and_where(Expr::col(Actor::Name).eq(name))
    .order_by(Revision::Timestamp, Order::Desc)
    .to_string(MysqlQueryBuilder);

In MySQL this translates to:

SELECT
    DISTINCT `page_title`
FROM
    `revision`
    INNER JOIN `page` ON `revision`.`rev_page` = `page`.`page_id`
    INNER JOIN `actor` ON `revision`.`rev_actor` = `actor`.`actor_id`
WHERE
    `page_namespace` = 4
    AND `page_title` LIKE 'Requests_for_adminship/%'
    AND `actor_name` = 'Legoktm'
ORDER BY
       `rev_timestamp` DESC

It's really nice having type definitions for all the tables and columns. My initial impression was that the function calls were harder to read than plain SQL, but it's very quickly growing on me.

I'm also interested in what it means to have SQL queries in a more easily parsable format. Recently there was a schema change to the templatelinks table that basically required everyone (see Magnus's toot) to adjust their queries (example). What if we could have a macro/function that wraps each query and applies these types of migrations at compile/run time? Some let query = fix_my_query(query) type function that automatically adds the correct join and updates columns based on whatever schema changes were made in MediaWiki (as much as is technically possible to automate).

Lots of possibilities to consider! And mwseaql is just one of the components that make up the bigger mwbot-rs project.

If this works interests you, we're always looking for more contributors, please reach out, either on-wiki or in the #wikimedia-rust:libera.chat room (Matrix or IRC).



Board Election results, next steps

Unfortunately, I didn't make it onto the Wikimedia Foundation board, you can see the full results. In the first round I was behind by ~280 votes, which is pretty close considering nearly 6,000 votes were cast!

I already said it, but I'm really thankful to everyone who supported me, whether you campaigned for me or just cast a vote. If there's anything I can do to help you out, you know how to find me :-)

What's next? First, it's time for me to get back to work, I only have a 4-month backlog of bugs and patches to get through. And then continuing to agitate for change to make the WMF and Wikimedia a better place.

P.S. I'm also planning to be much more involved with the awesome people in Wikimedia New York City in the coming year.