simon-git: tilings (main): Simon Tatham

Commits to Tartarus hosted VCS tartarus-commits at lists.tartarus.org
Mon Jul 15 20:34:05 BST 2024


TL;DR:
  c5d6ec9 SVG: permit scaling the blobs.
  9af52a9 Polygon: factor out labelpos() into a function.
  d6c80cf SVG: method to return the bounds.
  0c299af SVG: method to add extra client-specified text.
  ff6c0bc Coordinate finder: class to generate random output.
  94cb4b0 Allow passing user-defined parameters to a .tl file.
  b55a0a2 Make the Spectre 9-hex naming configurable.
  fe20053 Tolerate multiple layers containing the same tile name.
  162d251 Verbose mode for adjmatcher generation.
  9f75188 Add the other version of HHTPFFF.
  bbd9ea3 Add the other Spectre H7/H8 tiling.
  56a07b5 Give draw.Rectangle a bounds() method.

Repository:     https://git.tartarus.org/simon/tilings.git
On the web:     https://git.tartarus.org/?p=simon/tilings.git
Branch updated: main
Committer:      Simon Tatham <anakin at pobox.com>
Date:           2024-07-15 20:34:05

commit c5d6ec93ad296184f6ae1a993a6c4836e4ec0048
web diff https://git.tartarus.org/?p=simon/tilings.git;a=commitdiff;h=c5d6ec93ad296184f6ae1a993a6c4836e4ec0048;hp=fa3be1395f5cbac2ff129df6433efa1c917a1ad5
Author: Simon Tatham <anakin at pobox.com>
Date:   Thu Jul 4 12:48:11 2024 +0100

    SVG: permit scaling the blobs.

 svg.py | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

commit 9af52a903f74ef5bdd5ca4bdddf948fa2df4df95
web diff https://git.tartarus.org/?p=simon/tilings.git;a=commitdiff;h=9af52a903f74ef5bdd5ca4bdddf948fa2df4df95;hp=c5d6ec93ad296184f6ae1a993a6c4836e4ec0048
Author: Simon Tatham <anakin at pobox.com>
Date:   Thu Jul 4 12:48:18 2024 +0100

    Polygon: factor out labelpos() into a function.
    
    I still haven't written a _good_ implementation of this, but now at
    least client code can override it conveniently.

 util.sage | 9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)

commit d6c80cf96c69d57296ce6f70043a445c8ba17fc8
web diff https://git.tartarus.org/?p=simon/tilings.git;a=commitdiff;h=d6c80cf96c69d57296ce6f70043a445c8ba17fc8;hp=9af52a903f74ef5bdd5ca4bdddf948fa2df4df95
Author: Simon Tatham <anakin at pobox.com>
Date:   Mon Jul 8 21:15:39 2024 +0100

    SVG: method to return the bounds.

 svg.py | 4 ++++
 1 file changed, 4 insertions(+)

commit 0c299af48ce7b66777f6d6fd9892decf0756e5b1
web diff https://git.tartarus.org/?p=simon/tilings.git;a=commitdiff;h=0c299af48ce7b66777f6d6fd9892decf0756e5b1;hp=d6c80cf96c69d57296ce6f70043a445c8ba17fc8
Author: Simon Tatham <anakin at pobox.com>
Date:   Mon Jul 8 21:15:54 2024 +0100

    SVG: method to add extra client-specified text.

 svg.py | 15 ++++++++++++---
 1 file changed, 12 insertions(+), 3 deletions(-)

commit ff6c0bcd4512d00a4b3e0321350cdc47a85a7e13
web diff https://git.tartarus.org/?p=simon/tilings.git;a=commitdiff;h=ff6c0bcd4512d00a4b3e0321350cdc47a85a7e13;hp=0c299af48ce7b66777f6d6fd9892decf0756e5b1
Author: Simon Tatham <anakin at pobox.com>
Date:   Mon Jul 8 21:16:15 2024 +0100

    Coordinate finder: class to generate random output.
    
    This allows you to generate random tiling patches just like
    RandomAddressContext, but the choice of parent tile at each step is
    made according to the choices available in the CoordinateNFA (or
    rather, its determinisation). So you get random patches, subject to
    the constraint that they have to be consistent with whatever piece of
    tiling the CoordinateFinder walked around before you started.

 finder.sage | 46 ++++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 46 insertions(+)

commit 94cb4b04322b327e7e24d06a8c0f45526a000bc7
web diff https://git.tartarus.org/?p=simon/tilings.git;a=commitdiff;h=94cb4b04322b327e7e24d06a8c0f45526a000bc7;hp=ff6c0bcd4512d00a4b3e0321350cdc47a85a7e13
Author: Simon Tatham <anakin at pobox.com>
Date:   Thu Jul 11 07:19:36 2024 +0100

    Allow passing user-defined parameters to a .tl file.
    
    This lets me define .tl files that describe multiple tilings in one,
    or describe the same tiling by different names, or that kind of thing,
    without gratuitous code reuse.

 tilingdef.sage | 3 ++-
 toplevel.sage  | 7 ++++++-
 2 files changed, 8 insertions(+), 2 deletions(-)

commit b55a0a2d645cf4f0a53b78d7345c83c30d203ef0
web diff https://git.tartarus.org/?p=simon/tilings.git;a=commitdiff;h=b55a0a2d645cf4f0a53b78d7345c83c30d203ef0;hp=94cb4b04322b327e7e24d06a8c0f45526a000bc7
Author: Simon Tatham <anakin at pobox.com>
Date:   Thu Jul 11 07:20:23 2024 +0100

    Make the Spectre 9-hex naming configurable.
    
    The original discoverers' Spectre paper used Greek letters for the hex
    types. I unilaterally adopted Latin equivalents, via the LaTeX 'babel'
    mapping, to make it easier to use them as C identifiers. Now I have a
    parameter system, I don't have to make a decision any more in this
    code base: I can allow a user of spectre9.tl to choose which naming
    system they like. The same goes for spectre-h7h8-9.tl.
    
    Those two files were inconsistent, and by default, they still
    are (though I may revisit that at a later point). But now you can set
    '--param alphabet latin' or '--param alphabet greek' on either one,
    and get consistent output of whichever kind you prefer.

 spectre-h7h8-9.tl |  67 ++++++++++---------
 spectre9.tl       | 192 ++++++++++++++++++++++++++++--------------------------
 2 files changed, 137 insertions(+), 122 deletions(-)

commit fe20053f2b644b8875bbb25f1f595ea10837820e
web diff https://git.tartarus.org/?p=simon/tilings.git;a=commitdiff;h=fe20053f2b644b8875bbb25f1f595ea10837820e;hp=b55a0a2d645cf4f0a53b78d7345c83c30d203ef0
Author: Simon Tatham <anakin at pobox.com>
Date:   Thu Jul 11 07:19:06 2024 +0100

    Tolerate multiple layers containing the same tile name.
    
    This _almost_ came up in the h7h8 tiling definitions, and I ended up
    having to define 'spectre' and 'Spectre' separately, which was a bit
    awkward.
    
    The problem is that there was a single permitted_parents() dict,
    mapping each tile to its possible (parent, index) pairs, regardless of
    which layer the tile was occupying. Now 'permitted_parents' is a dict
    living in a particular Expansion object, and everything that needs to
    know it is looking it up there.

 analysis.sage   | 18 ------------------
 recursive.sage  |  8 +++++---
 tilingdef.sage  |  4 ++++
 toplevel.sage   | 10 ++++++----
 transducer.sage | 10 +++++-----
 5 files changed, 20 insertions(+), 30 deletions(-)

commit 162d251ad9071c78cca76ecebf57ef302e0073a4
web diff https://git.tartarus.org/?p=simon/tilings.git;a=commitdiff;h=162d251ad9071c78cca76ecebf57ef302e0073a4;hp=fe20053f2b644b8875bbb25f1f595ea10837820e
Author: Simon Tatham <anakin at pobox.com>
Date:   Thu Jul 11 08:22:06 2024 +0100

    Verbose mode for adjmatcher generation.
    
    Now, if the recogniser doesn't seem to be converging, I have half a
    chance of finding out why not, by seeing what input is still
    stubbornly unaccepted, and trying to work out by myself what ought to
    happen to that input.
    
    These diagnostics treat the actual DFA-construction mechanism as a
    black box, because I haven't yet found a way in which _that_ is
    unreliable. They just log each (input, output) pair of the input
    corpus as it's generated by the recursive algorithm, and after each
    recursion depth, if there's still an unaccepted input, they say what
    it is.

 toplevel.sage   |  4 ++--
 transducer.sage | 21 +++++++++++++++------
 2 files changed, 17 insertions(+), 8 deletions(-)

commit 9f75188b7bb92eeb6347fe4079ceb1f5792ec378
web diff https://git.tartarus.org/?p=simon/tilings.git;a=commitdiff;h=9f75188b7bb92eeb6347fe4079ceb1f5792ec378;hp=162d251ad9071c78cca76ecebf57ef302e0073a4
Author: Simon Tatham <anakin at pobox.com>
Date:   Fri Jul 12 12:42:59 2024 +0100

    Add the other version of HHTPFFF.
    
    I dithered for ages about which I preferred: the one that's easy to
    match up directly to 10-hex, or the one that looks more like
    hats-htpf? I should have both around.

 hats-hhtpfff-nicer.tl | 281 ++++++++++++++++++++++++++++++++++++++++++++++++++
 toplevel.sage         |   1 +
 2 files changed, 282 insertions(+)

commit bbd9ea33164b21e19aeef58538ab9c85c442cf39
web diff https://git.tartarus.org/?p=simon/tilings.git;a=commitdiff;h=bbd9ea33164b21e19aeef58538ab9c85c442cf39;hp=9f75188b7bb92eeb6347fe4079ceb1f5792ec378
Author: Simon Tatham <anakin at pobox.com>
Date:   Mon Jul 15 20:22:21 2024 +0100

    Add the other Spectre H7/H8 tiling.
    
    Like the hat case, there are two different ways you can fuse the skew
    Spectre with a neighbour. The paper shows one of them; this is the
    other. It still generates a working adjacency matcher.
    
    I don't know of anyone actually using this (unlike the alternative hat
    H7/H8 system, which is useful because the 10-hex system corresponds to
    that rather than the paper's version). But for completeness, it's
    here, and in the self-test collection.

 spectre-h7h8b.tl | 119 +++++++++++++++++++++++++++++++++++++++++++++++++++++++
 toplevel.sage    |   1 +
 2 files changed, 120 insertions(+)

commit 56a07b5144c5342ef46a1fb0e93c79648394d08b
web diff https://git.tartarus.org/?p=simon/tilings.git;a=commitdiff;h=56a07b5144c5342ef46a1fb0e93c79648394d08b;hp=bbd9ea33164b21e19aeef58538ab9c85c442cf39
Author: Simon Tatham <anakin at pobox.com>
Date:   Mon Jul 15 20:30:52 2024 +0100

    Give draw.Rectangle a bounds() method.
    
    If you put the bounds in, you should be able to take them out
    again. (But of course this doesn't work for UnboundedTargetArea.)

 draw.sage | 3 +++
 1 file changed, 3 insertions(+)



More information about the tartarus-commits mailing list