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!

Changes…

Today is my last day at Red Hat.

I’ve been here for almost fifteen years, and it’s been a heckuva ride. I’ve seen GNOME and the Linux desktop grow from from pretty minimal beginings to what it is today.

RHAD Labs logo
The beginning…

Looking back on it, I’m so proud of the work that the Red Hat desktop team has accomplished during this time. We absolutely moved the bar on what was possible and enabled so many things. So many technologies that are basic building blocks of the modern Linux desktop were incubated within this group. Many of the things that people take for granted didn’t start in a vacuum but started because someone stepped up to make it happen.  Just off the top of my head dbus, metacity, gtk2, aiglx, systemd, pulseaudio, pango, cairo, gconf, orbit, gio/gvfs, gnome-shell, hal, NetworkManager, evince, PolicyKit and so many more got their start here.  Along the way, we made lifelong friends and built communities around these projects, to the point where others have taken them far beyond their humble beginnings.  To me, that’s what makes Free Software so awesome, and the Free desktops in particular so special.

GNOME Love

I am looking forward to being a part of the GNOME community in the future as a civilian, though I won’t be fixing any more TreeView bugs. (-:

The team is now in Christian Schaller’s capable hands and the engineering group at Red Hat is stronger than it has ever been. I’m looking forward to watching from the sidelines to see what they do next!

GNOME 3

*tap* *tap*  Is this thing on?

I am GNOME

It’s been too long since I blogged, but this is a great reason to post. I am so proud of everyone who put this release together. Everyone worked so hard on everything, and the pride and artistry comes through in every corner of the desktop.  Kudos go to everyone involved; the engineers for their craftsmanship, the designers for their persistence and vision, the marketing team for telling such a great story, the web team for making a home we can be proud of, and everyone else who’s cared about the project and helped shape it along the way.

Having been around for every major GNOME release this is by far the smoothest dot-zero we have ever done. The commitment to excellence this time around was amazing and the enthusiasm has been infectious.  I am already excited to see what’s planned for 3.2.

Passages

  • meta: It has been a long time since I’ve written anything. Being a father has taken its toll on my free time, and I got out of the habit of writing. As has happened every time I have hit a dry spell in the past, I count on the same thing to get me started up again. I change software! This time to the WordPress instance at http://blogs.gnome.org/jrb. The old, elisp-based version I borrowed from Federico wasn’t working out for me anymore. We will see if this one does any better. I’m counting on gnome-blog to help keep it updated too. Many thanks to jdub for helping me get the old entries imported.

    I have tried to keep the visual style of the old page — namely that of a ChangeLog entry. Nevertheless, I have made concessions to the modern web. ChangeLog entries should probably do the same. (-:

  • birthdays (GNOME): GNOME is now 10! Amazing. It has definitely been a long and strange trip. Dave’s recollection of Project Bob is a good memory. I’ll add my own:

    The first time I met most of the people working on GNOME (at that time) was in Linux Expo in 1998. gnome-0.20 was just about to be released. This version featured a newly written Wanda the fish applet to play with. There was a demo machine there with someone showing off the coolest feature in in GNOME at that time, namely embeddable drawers. People were dragging them into the panel, and creating crazy shapes and figures. Naturally, it was buggy like crazy. Sopwith was sitting on the machine next to it and had logged in remotely, surreptitiously hacking on the panel, trying to fix the bugs people were hitting. When the panel (or an application) would crash, he would quickly restart them, making it seem more stable than it was.

    Looking back on it, we had know idea of what we were getting ourselves into. I am sure if we knew back then what we know now, there is no way anyone would have started writing a desktop. It sure was a lot of fun though!

  • life (Eleanor): Eleanor has grown! She is sixteen months old, and is now spending her days running around the house, terrorizing the dog. She gets into a lot of mischief, but is very, very sweet. Zana and I don’t see her changing day by day, but just this weekend we had to put another box of clothes into the attic that she had outgrown. Her hair length is stuck somewhere in the middle of her back. It gets longer as she gets taller, but never quite seems to grow.
    Eleanor and Uncle Ed
    Eleanor and Uncle Ed