{"id":1059,"date":"2025-06-26T11:50:35","date_gmt":"2025-06-26T10:50:35","guid":{"rendered":"https:\/\/www.martyndavis.com\/?p=1059"},"modified":"2025-06-27T08:55:33","modified_gmt":"2025-06-27T07:55:33","slug":"solving-word-games-with-rust","status":"publish","type":"post","link":"https:\/\/www.martyndavis.com\/?p=1059","title":{"rendered":"Solving Word Games with Rust"},"content":{"rendered":"\r\n<p>If you enjoy word games (such as cryptic crosswords) as I do, then this is a <strong><em>really<\/em><\/strong> useful tool for you.<\/p>\r\n\r\n\r\n\r\n<p>It can be used in many ways. For example, if you&#8217;re trying to solve an anagram, you could type <code><mark class=\"has-inline-color\" style=\"background-color: rgba(0, 0, 0, 0); color: #2b9424;\">lookup GSNIGNI<\/mark><\/code> and it will give you output like this:<\/p>\r\n\r\n\r\n\r\n<pre class=\"wp-block-preformatted\">      S\r\n        G\r\n  N       G\r\n    I   N\r\n      I\r\n\r\n  _ _ _ _ _ _ _<\/pre>\r\n\r\n\r\n\r\n<p>If you have some found letters, you can add them, for example, <mark class=\"has-inline-color\" style=\"background-color: rgba(0, 0, 0, 0); color: #2b9424;\"><code>lookup GSNIGNI -f ..g...g<\/code> <\/mark>and it will show:<\/p>\r\n\r\n\r\n\r\n<pre class=\"wp-block-preformatted\">    I   N\r\n\r\n  S       I\r\n\r\n        N\r\n\r\n  _ _ G _ _ _ G<\/pre>\r\n\r\n\r\n\r\n<p>Where it becomes more clear that the answer would be &#8220;signing&#8221;.<\/p>\r\n\r\n\r\n\r\n<p>If you&#8217;re totally stuck, you could append <code>-a<\/code> to your command, i.e. <mark class=\"has-inline-color\" style=\"background-color: rgba(0, 0, 0, 0); color: #2b9424;\"><code>lookup GSNIGNI -f ..g...g -a<\/code> <\/mark>and it will show you all valid words which are anagrams of your search string which fit the &#8220;found&#8221; letters. In this case it just returns &#8220;signing&#8221;.<br \/><br \/>There are lots of other options, including straight lookup, regex searches (if you understand how to use them), definitions, and support for other word games like Wordle, Panagrams, and Spelling Bee.<\/p>\r\n\r\n\r\n\r\n<p>It&#8217;s written in Rust and the source is all available at <a href=\"https:\/\/github.com\/md81544\/lookup\">https:\/\/github.com\/md81544\/lookup<\/a><\/p>\r\n","protected":false},"excerpt":{"rendered":"<p>If you enjoy word games (such as cryptic crosswords) as I do, then this is a really useful tool for you. It can be used in many ways. For example, if you&#8217;re trying to solve an anagram, you could type lookup GSNIGNI and it will give you output like this: S G N G I &hellip; <\/p>\n<p class=\"link-more\"><a href=\"https:\/\/www.martyndavis.com\/?p=1059\" class=\"more-link\">Continue reading<span class=\"screen-reader-text\"> &#8220;Solving Word Games with Rust&#8221;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"_links":{"self":[{"href":"https:\/\/www.martyndavis.com\/index.php?rest_route=\/wp\/v2\/posts\/1059"}],"collection":[{"href":"https:\/\/www.martyndavis.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.martyndavis.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.martyndavis.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.martyndavis.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1059"}],"version-history":[{"count":7,"href":"https:\/\/www.martyndavis.com\/index.php?rest_route=\/wp\/v2\/posts\/1059\/revisions"}],"predecessor-version":[{"id":1068,"href":"https:\/\/www.martyndavis.com\/index.php?rest_route=\/wp\/v2\/posts\/1059\/revisions\/1068"}],"wp:attachment":[{"href":"https:\/\/www.martyndavis.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1059"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.martyndavis.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1059"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.martyndavis.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1059"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}