Re: [ANN] Ag 2.1 -- a scriptable anagram generator

"'Martin Eden' via lua-l" <[email protected]> Sun, 3 May 2026 16:49:07 +0200
Newsgroups gmane.comp.lang.lua.general
Message-ID <[email protected]>
Hi Andrew,

Ag's Linux screenshot displays VT-100 coloring script output.
I hope that's not actual output of your program.

I don't play word games but I like "Golly" project where you participating.

-- Martin

On 2026-05-03 03:22, Andrew Trevorrow wrote:
> Ag is a fast, scriptable anagram generator with a statically embedded
> Lua interpreter (now 5.5.0).  Ag is free, open source and runs on
> Windows, macOS and Linux.  There's also a command line version
> called agc (also scriptable).  Download link and screenshots here:
>
> https://ag1.sourceforge.net/
>
> Ag is not only good at finding anagrams.  It has powerful pattern
> matching features with a syntax that is (IMHO) a lot more readable
> than regex or LPEG or Lua's native syntax.
>
> For example, let's say you're playing Scrabble and your rack contains
> a blank and these 6 letters: AAERSU.  The following pattern will find
> all 5 to 7-letter words using those tiles that start or end with A:
>
>     ?5-7 & {aaersu?} & (a* | *a)
>
> Or maybe you're playing Wordle and want to find all 5-letter words
> with an A in the middle and W somewhere else but no N, D or T.
> Use this pattern:
>
>     ??A?? & *W* & [!NDT]5
>
> Note that spaces are ignored and letter case doesn't matter when
> entering text or patterns.  The syntax is described here:
> https://ag1.sourceforge.net/Help/patterns.html
>
> Other key features:
>
> * All Lua functions that take a file path (dofile, io.open, etc)
> support UTF-8 paths on Windows, thanks to Peter Wu's patch:
> https://github.com/Lekensteyn/lua-unicode
>
> * The agc command handles UTF-8 strings in a Windows console.
> You can enter a command like "agc -l French.lex œuvré" and see
> the correct output (assuming the code page has been set to UTF-8
> by running "chcp 65001").
>
> Some of the supplied scripts:
>
> * escape-codes.lua illustrates the ANSI escape sequences supported
> by Ag's console window.  Here's what it looks like on Linux:
> https://ag1.sourceforge.net/ag-console-linux.png
>
> * wordle.lua is a simple version of Josh Wardle's Wordle game.
> Less than 100 lines of code, but it lets you play with any of the
> supplied lexicons (English, French, German, Italian, Spanish, etc),
> including the numeric lexicons.  See some games using agc on macOS:
> https://ag1.sourceforge.net/agc-wordle.png
>
> Finally, a simplified version of Ag is now available for the iPad.
> I recently ported Ag's C++ code to pure Lua so that it runs in
> Glui, my free iPad app that runs Lua scripts.  Just use Glui's
> Download button and click the Anagrams link.
>
> Andrew Trevorrow (aka OVERT WORD WARREN)
>

-- 
You received this message because you are subscribed to the Google Groups "lua-l" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [email protected].
To view this discussion visit https://groups.google.com/d/msgid/lua-l/859abcea-0ca1-4b20-82b7-94d10b221a09%40disroot.org.