Long time, no release.
When I last blogged about GNOME Crosswords, I had a design plan to improve the editing API. It’s been a busy summer since then. The crosswords team rewrote large chunks of code to implement and use this new API:
crosswords: 146 files changed, 10545 insertions(+), 4915 deletions(-) libipuz: 53 files changed, 8224 insertions(+), 961 deletions(-)
There’s now over 38KLOC between the two codebases — this is starting to look like a real application!
Editor and libpanel
The biggest change this cycle is the implementation of the new editing interface. I started changing the code five months ago, but it took a while to land. We now use libpanel from GNOME Builder to manage the information panels. Libpanel has a lot of the functionality I want, though unfortunately I’m fighting its geometry handling.
I really struggled getting the UI design for this to work, and I had a number of regrettable paths along the way. Fortunately, Niko agreed to help out with this, and showed up with some fabulous design work! I’m so much happier with the current approach, and am getting ready to implement more of his designs for the next cycle.
Behind the scenes, implementing this was a challenge. I blogged about those challenges previously, but in a nutshell, mutating a puzzle has a lot of side-effects which can leave you in an invalid state. For example, something simple like adding a block could completely change the numbering of the grid.
Federico and I fixed this by adding a number of functions to enforce heuristics and conventions. I also added ipuz_puzzle_fix_all() which will get a fully well-formed puzzle regardless of the state. It’s turned out to be a really nice design pattern.
I have now released the Editor as a separate application in flathub. You can download it here.
Acrostics
Another major feature this release is Acrostic Puzzle support. Tanmay worked on that for his GSOC project and did fabulously (details in his blog post.) The end result is gorgeous:
I had a great time mentoring Tanmay for the summer, and we’re already making plans on how to add acrostic support to the Editor.
GUADEC and GNOME Mobile
GUADEC in Latvia was a blast. Riga was fun, the countryside was surprisingly interesting, and the overall feel of the conference was lovely. As always, it was great to meet so many people, new and old.
GNOME Superstar Martin came to my Crosswords BOF in Riga and got it running on an actual mobile device. The end result was.. actually usable! It seems like all the work we did on adaptive sizing paid dividends. There are some rough corners (and Martin filed a number of bugs) but it worked surprisingly well out of the box.
I also got to meet with my other GSOC student Pratham. His work on anagrams will land next release, so we’ll have more to talk about then.
libipuz.org
The final thing mentioning is that I bought the libipuz.org domain for the library. Unfortunately the main ipuz.org site has been down all summer, I put a mirror of the ipuz spec up there so people can read it.
I also managed to reach Roy Leban by phone. He’s the original author of the ipuz spec, and was able to clarify some questions I had when interpreting it. This led me down a deep rabbit hole around the part of the spec regarding clue directions, as it required a substantial rewrite to avoid hardcoding Across/Down directions everywhere.
Finally, Pranjal showed up completely out of nowhere with an MR to add ipuz_puzzle_equal(). This was a tricky function to write, and one I’ve wanted for a really long time. This has been making all our tests so much better. Hero! Pranjal is interested in adding a sudoku loader/saver to libipuz — maybe there will be more in this space in the future.
Thanks
- Niko, for massive help with the designs for the Editor
- Tanmay, for Acrostic support
- Martin, for testing Crosswords on mobile
- Pranjal, for ipuz_puzzle_equal()
- Federico, for testing fixes and overall support
- Rosanna, for continued advice and crossword support
- Pratham, for initial anagram support
- Bart, for whatever magic he did to make libipuz.org work
- The translators, for keeping us multi-lingual
Until next time!