Crosswords 0.3.3: Double Dutch

It’s time for another GNOME Crosswords release! This time we had a focus on I18N support. I also got patches from another new contributor – Philip – who added some nice improvements, dutch-language support, and a downloader.

New features include:

  • A preferences dialog to let you filter puzzle sets by language. This gives us a way to only show puzzles either in your current language or in all languages. It opens the door for puzzle sets and downloaders in different languages.
  • Translation support. We have Dutch and Spanish translations now. It would be great to see more languages available for the next release.
  • Don’t grab focus when clicking on a clue. This was a small change that had a big impact on playability.
  • Copy/Paste support for the grid.
  • Undo/Redo support for the game.
  • Use the shiny new libadwaita AboutWindow.
  • Input now works on MacOS, making it fully playable on that platform.
  • Dutch-language crosswords work with the ‘IJ’ cell.

Wait, what’s that last one???

Amazingly enough, it turns out that Dutch crosswords allow an ‘IJ’ digraph in the same cell. This is an interesting twist on the crossword, as you can add an ‘I’ and ‘J’ character independently, as well as together.

Dutch puzzle showing IJ cell
Dutch puzzle showing an ‘IJ’ cell

To support this, I added a Quirks object that can be used to modify the behavior of the game. Beyond Dutch support, I started adding support for rebus-style crosswords as a second quirk. I imagine having to add more as we add additional language support.

Fortunately, we already supported strings within answers so this wasn’t too hard to implement. However, I’m not 100% sure I got the input controls correct. If you’re a Dutch crossword solver, I’d love to hear from you. I also hooked up the quirks to the help overlay so it only shows the special input mode when you have a puzzle that needs it (or are running it in Dutch).

I also added another extension to the .ipuz implementation to specify the locale of puzzles. We use that to filter puzzles, and add the quirks.

Lessons learned:

I thought I’d write down the things that I got stuck on this cycle in the hopes it saves other people time in the future:

Recoloring SVGs

GtkImage has the really convenient ability to recolor images when the appearance changes from light to dark. As far as I can tell, that functionality isn’t exported, so to use it you have to load the svg as a symbolic icon. Despite the documentation, it’s pretty finicky to get that correct so make sure to read all the documentation carefully. In addition, GtkImage really wants the image to be icon sized. You can override that with gtk_image_set_pixel_size().

recolored locked puzzles
Thanks to Sam for the new icons, shown here recolored.

Translating keyfiles with meson

We use keyfiles (aka, .desktop files) as a config file format to define the puzzle sets. These config files have user-visible strings added to them them, and then are compiled into a gresource file. This was surprisingly hard to get translated. Some notes:

  • xgettext supports –keyword=Keyword and -kKeyword to define custom keywords to translate. Unfortunately, despite being documented otherwise, msgfmt only supports –keyword=Keyword. Don’t use -k.
  • Meson doesn’t allow you to pass the language type to xgettext for an arbitrary file. In order to force it to use the correct type, I had to name my config file puzzle.config.desktop.in, and rename it to puzzle.config post-translation.
  • There’s no way for meson to have a compile-time dependency on the po files for i18n.merge_file(). In order to test it, I had to remove the translated desktop file in order to force rebuild it after every translation change. Meson 0.64 is supposed to fix this.

What’s next?

  • I’m giving a talk at GUADEC! Come hear the details of how this game was built and some interesting facts about crosswords. Sadly, I’m scheduled at the same time as the always-popular gnome shell update, but hopefully a few people will be interested in what I have to say.
  • To fully support internationalization, we need to support other languages for the wordlist. There’s an open bug for it. The work here shouldn’t be too hard, but will require a decent amount of work to make sure we’re multi-byte clean.
  • And as always, if you are interested in writing and publishing crosswords, let me know!

Download on FLATHUB

 

Crosswords 0.3

I’m pleased to announce Crosswords 0.3. This is the first version that feels ready for public consumption. Unlike the version I announced five months ago, it is much more robust and has some key new features.

New in this version:

  • Available on flathub: After working on it out of the source tree for a long while, I finally got the flatpaks working. Download it and try it out—let me know what you think! I’d really appreciate any sort of feedback, positive or negative.

  • Puzzle Downloaders: This is a big addition. We now support external downloaders and puzzle sets. This means it’s possible to have a tool that downloads puzzles from the internet. It also lets us ship sets of puzzles for the user to solve. With a good set of puzzles, we could even host them on gnome.org. These can be distributed externally, or they can be distributed via flatpak extensions (if not installing locally). I wrapped xword-dl and puzzlepull with a downloader to add some newspaper downloaders, and I’m looking to add more original puzzles shortly.

  • Dark mode: I thought that this was the neatest feature in GNOME 42. We now support both light and dark mode and honor the system setting. CSS is also heavily used to style the app allowing for future visual modifications and customizations. I’m interested in allowing  css customization on a per-puzzle set basis.

  • Hint Button: This is a late addition. It can be used to suggest a random word that fits in the current row. It’s not super convenient, but I also don’t want to make the game too easy! We use Peter Broda’s wordlist as the basis for this.
  • .puz support: Internally we use the unencumbered .ipuz format. This is a pretty decent format and supports a wide-variety of crossword features. But there’s a lot of crosswords out there that use the .puz format and a I know people have large collections of puzzles in that format. I wrote a simple convertor to load these.

Next steps

I hope to release this a bit more frequently now that we have gotten to this stage. Next on my immediate list:

  • Revisit clue formats; empirically crossword files in the wild play a little fast-and-loose with escaping and formatting (eg. random entities and underline-escaping).
  • Write a Puzzle Set manager that will let you decide which downloaders/puzzles to show, as well as launch gnome-software to search for more.
  • Document the external Puzzle Set format to allow others to package up games.
  • Fix any bugs that are found.

I also plan to work on the Crossword editor and get that ready for a release on flathub. The amazing-looking AdwEntryRow should make parts of the design a lot cleaner.

But, no game is good without being fun! I am looking to expand the list of puzzles available. Let me know if you write crosswords and want to include them in a puzzle set.

Thanks

I couldn’t have gotten this release out without lots of help. In particular:

  • Federico, for helping to  refactor the main code and lots of great advice
  • Nick, for explaining how to get apps into flathub
  • Alexander, for his help with getting toasts working with a new behavior
  • Parker, for patiently explaining to me how the world of Crosswords worked
  • The folks on for answering questions and producing an excellent toolkit
  • And most importantly Rosanna, for testing everything and for her consistent cheering and support

Download on FLATHUB

Introducing GNOME Crosswords

GNOME Crosswords

Howdy folks! I want to announce a game for GNOME that I’ve been working on for a few months.

I’ve always enjoyed solving Crossword puzzles. It’s something I grew up doing as a kid, and we continue to do them as a family at the dinner table at night. I’ve wanted to try my hand at writing crosswords for a while, but there isn’t really a good tool available for doing so, and certainly no free software ones that work well with a recent GNOME release. I recently bought myself a lovely new Fedora-loaded Lenovo, and after it arrived, I thought I’d take a shot at writing such a tool.

Over the past four months or so I managed to get something worth releasing. The code is available here. It should build on relatively recent Linux distributions, though it does need libadwaita from git (toasts!). I also put together a flatpak file for testing here (no repo yet, as getting that set up defeated me). Once I’m more confident that the puzzles are solvable and fun I plan to publish it to flathub.

A dog's day
Non-traditional grid

Guardian cryptic No 28,605
The Guardian Daily Cryptic with reveal answers enabled

Features:

It’s still early, but it already has some fun features:

  • Puzzle Sets. The heart of the game is the Puzzle Set. It’s a collection of crossword puzzles that are tied together by a theme. Solving a puzzle unlocks more puzzles. I currently have one puzzle set (“Cats and Dogs”) with nine puzzles in it, but I have a few more puzzle sets planned. It contains mostly traditional puzzles, but I threw in a cryptic to keep people on their toes.
  • Nontraditional shapes and styles: I wanted to make something a bit little more whimsical and fun, as well as the more traditional puzzle grids. So I added support for colors and shapes as well. My son had fun doing pixel art to create some of the grids.
  • Reveal mistakes: For when you get stuck! It also supports checksums for puzzles that don’t include the solution.
  • Scalable grid: Currently the UI only exposes four sizes, but we have all the pieces to scale crosswords to different sizes.
  • Support for the .ipuz spec: This spec supports a ton of things, and I don’t support it fully yet, but most of the crossword part of the spec is included. There aren’t a ton of .ipuz files floating around, but you can use puzzlepull to download the Guardian Daily puzzle if you want to try some other examples.

Puzzle Set
The first Puzzle Set

Crossword Editor

GNOME Crosswords Editor

As part of building this app, I realized that creating grids was as big a part of the app as writing the actual game itself. To facilitate that, I started writing a crossword editor as well. It’s in the early stages, but it already has one of the most important features: a tool to create the initial grid. Making puzzles that fit well together is surprisingly hard. To make it easier, I wrote a crossword solver that quickly suggests words to fill in the grid. I’m proud of the design – it’s able to efficiently suggest options out of a list of 500K words really quickly (<1 μs on my machine). I was able to use it to build an autofill dialog that can recursively fill in a section of the puzzle when making a grid.

I still have more work to do on the editor and it’s clear that the autofill dialog isn’t a panacea, but it helped me figure out out some tricky corners. Here’s a video of the autofill dialog in action:

Thanks

I especially want to thank Rosanna and my kids for play-testing this and suggesting clues, as well as their patience while I was writing it. Thanks also to Federico for giving great advice, great code, and for being a star. Matthias for helping me relearn GTK and explaining GtkIMContext. Also, the example code in GNOME Builder was immensely helpful for getting this started.

What’s next?

There are a ton of features I’d like to add to this game. It really needs printing support, which should be relatively easy. I’d also love to see it get internationalized (and not just translated) – are crosswords in non-Latin languages a thing? And I’ve seen enough of Benjamin‘s GUADEC presentations over the years to know GTK can do something cooler than popup a dialog when you finish a crossword.

But the most important thing is that the game needs to be fun! For that, we need more puzzles and the existing puzzles need to be better. If you’re interested in joining me in creating a good set of puzzles for Linux, try the game out and let me know.

GNOME POPULUM EST

I gave a talk on the History of GNOME for GUADEC 2017. (Slides are available here, and hopefully the video feed will be posted soon.) It was a great trip down memory lane, and I really enjoyed putting this talk together. I didn’t include my final thoughts in the slide so I thought I’d include them in this post:

  1. First, we didn’t appreciate how much work this was  when we started. We have totally beaten win95, but the expectations bar has risen every year
  2. We have done a helluvalot of great work, and largely kept pace with expectations. This has been an amazing accomplishment and we should be proud of what we’ve done.
  3. The future for GNOME is more important and more promising then it has ever been

Endless and GNOME

Hello! Long time, no post.

Endless + GNOME = Love
Credit to Georges Stavracas

As you may have heard, Endless joined the GNOME Foundation Advisory Board last week.  We appreciate all the kind words of welcome we have received and are looking forward to strengthening our ties with this community. This has been a coming for a bit, and I’m looking forward for us to contribute more over the coming year!

On a personal note, this is really exciting to me. It’s been a couple years since I’ve had the pleasure of being on the Advisory Board, and I’m looking forward to working with the Board again. I’ve wanted to bring the two organizations closer for a while, and we got a glimpse of what was possible at the Design Hackfest in Rio last month.

Who we are and what we do:

Quite simply, we are trying to empower the world! Our mission is to make computing universally accessible, and to solve the barriers of cost and connectivity to the entire world. It’s a bold and ambitious goal, but we are absolutely serious about accomplishing this. There are billions of people who don’t have access to a computer, and would love to have one.

What’s that mean in practical terms? It means we are making a great computer that works at as low a price as we can make. It means constantly keeping an eye on cost while still providing a great value and experience to our users. It means that we want to provide a great OS and fantastic desktop to our users.

20160204140930
Wiring in Rocinha.

And it means that we have to think about a lot of things that many of us don’t think of: Things like connectivity, cost, and robustness are paramount in that environment, and that drives everything we do.

Endless is Hiring!

We can’t do this alone. We are looking for some great engineers to join our team. If this mission sounds great and you’re interested in working with us, let us know! We are looking for people who are passionate about bringing a great desktop to the rest of the world while developing some high-quality Free Software. We have a number of openings available:

  • Application Software Developer: Part of providing a great computer experience is to provide offline applications and content to users.
  • Cloud / Distributed Systems Architect: Help build the service that powers our offline content.
  • Kernel Engineer: We want to run on as many different types of cheap devices as possible. This job will help bring us to laptops, desktops, and all sorts of crazy ARM devices.
  • Internal Tooling Developer: We need someone to help maintain and build our internal build tools and create some new ones.
  • Software Engineer: Don’t see the job you’re looking for? We’re always looking for fantastic engineers of all types!

Feel free to mail me or ping me on IRC if you have any questions!