chiark / gitweb /
otter.git
3 years agoactix: experiments: A test example program for playing with
Ian Jackson [Sun, 6 Mar 2022 13:07:39 +0000 (13:07 +0000)]
actix: experiments: A test example program for playing with

C&P from Actix docs.  Not adding to copyright/licence tracking since
I am going to remove this again.

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
3 years agoactix: Add some initial dependencies
Ian Jackson [Sun, 6 Mar 2022 13:05:19 +0000 (13:05 +0000)]
actix: Add some initial dependencies

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
3 years agoTera templates: Add entry for rendering error to InternalError
Ian Jackson [Sun, 27 Mar 2022 19:05:42 +0000 (20:05 +0100)]
Tera templates: Add entry for rendering error to InternalError

Template rendering errors during web page rendering were previously
handled by Rocket.  We are going to have to deal with them ourselves.

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
3 years agoTera templates: Adjust syntax by moving imports to top
Ian Jackson [Sat, 26 Mar 2022 15:17:07 +0000 (15:17 +0000)]
Tera templates: Adjust syntax by moving imports to top

We are going to switch to a newer Tera which wants these at the top.
Empirically, we get a syntax error without this change.  The
requirementr doesn't seem to be documented, though.

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
3 years agoImport serde::de::Error trait
Ian Jackson [Fri, 25 Mar 2022 23:23:01 +0000 (23:23 +0000)]
Import serde::de::Error trait

Will be usweful for actix error conversion.

3 years agoAdd IpAddress helper trait
Ian Jackson [Thu, 24 Mar 2022 00:15:29 +0000 (00:15 +0000)]
Add IpAddress helper trait

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
3 years agoIntroduce InvalidAbbrevPresentationLayout error type
Ian Jackson [Sat, 26 Mar 2022 00:32:52 +0000 (00:32 +0000)]
Introduce InvalidAbbrevPresentationLayout error type

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
3 years agoMake AbbrevPresentationLayout and Parse be Debug
Ian Jackson [Sat, 26 Mar 2022 19:45:34 +0000 (19:45 +0000)]
Make AbbrevPresentationLayout and Parse be Debug

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
3 years agosession URL: PresentationLayout is mandatory
Ian Jackson [Sun, 27 Mar 2022 00:40:14 +0000 (00:40 +0000)]
session URL: PresentationLayout is mandatory

These requests come from
  xhr_post_then('/_/session/' + layout
in script.ts, which gets layout via global-info and ultimately from
LoadingRenderContext, which contains a PresentationLayout, not an
Option.

git grep for "/session" reveals one in apitest, but that one is
hardcoded to use /Portrait.

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
3 years agoDrop an unused type alias
Ian Jackson [Sat, 26 Mar 2022 12:02:21 +0000 (12:02 +0000)]
Drop an unused type alias

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
3 years agoMove DEFKEY_FLIP to where it ought to be used, and use it
Ian Jackson [Sat, 26 Mar 2022 12:02:07 +0000 (12:02 +0000)]
Move DEFKEY_FLIP to where it ought to be used, and use it

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
3 years agosse: Remove a now-redundant loop
Ian Jackson [Sun, 11 Jul 2021 22:49:36 +0000 (23:49 +0100)]
sse: Remove a now-redundant loop

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
3 years agosse: Return from read() impl immediately after cv return
Ian Jackson [Sun, 11 Jul 2021 22:47:25 +0000 (23:47 +0100)]
sse: Return from read() impl immediately after cv return

This is going to make it easier to work with a condvar wait which
disposes of the mutex guard.

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
3 years agosse: Move to daemon
Ian Jackson [Sun, 11 Jul 2021 10:56:37 +0000 (11:56 +0100)]
sse: Move to daemon

We might perhaps be going to want this to use some macros from
our web framework.

(Commit originally intended for Rocket 0.5 branch.)

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
3 years agosse: Introduce BufForRead
Ian Jackson [Mon, 21 Jun 2021 01:13:27 +0000 (02:13 +0100)]
sse: Introduce BufForRead

This abstracts away the &mut u8 and orig_buf from Updatereader.

This will be helpful when UpdateReader becomes AsyncRead rather than
Read.

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
3 years agoDoucment current nightly tested version
Ian Jackson [Sat, 19 Mar 2022 16:00:18 +0000 (16:00 +0000)]
Doucment current nightly tested version

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
3 years agowasm: No not use wee-alloc. It has bugs and seems unmaintained
Ian Jackson [Sun, 6 Mar 2022 14:16:17 +0000 (14:16 +0000)]
wasm: No not use wee-alloc.  It has bugs and seems unmaintained

3 years agomiri: Skip digest read and write tests
Ian Jackson [Sun, 6 Mar 2022 14:01:55 +0000 (14:01 +0000)]
miri: Skip digest read and write tests

We don't have any unsafe here, and these end up using inline asm.

3 years agocargo: upgrade inventory
Ian Jackson [Sun, 6 Mar 2022 12:54:36 +0000 (12:54 +0000)]
cargo: upgrade inventory

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
3 years agocli: Make SubcommandProperties const-default, not just default
Ian Jackson [Sun, 6 Mar 2022 12:51:47 +0000 (12:51 +0000)]
cli: Make SubcommandProperties const-default, not just default

inventory 0.2 is going to want this.

3 years agocargo: upgrade usvg
Ian Jackson [Sun, 6 Mar 2022 12:37:21 +0000 (12:37 +0000)]
cargo: upgrade usvg

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
3 years agocargo: upgrade thirtyfour_sync x11rb
Ian Jackson [Sun, 6 Mar 2022 12:27:41 +0000 (12:27 +0000)]
cargo: upgrade thirtyfour_sync x11rb

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
3 years agocargo: upgrade derive-into-owned rmp-serde enum-map
Ian Jackson [Sun, 6 Mar 2022 12:25:56 +0000 (12:25 +0000)]
cargo: upgrade derive-into-owned rmp-serde enum-map

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
3 years agocargo: upgrade chrono-tz parking_lot mio directories ron
Ian Jackson [Sun, 6 Mar 2022 12:22:40 +0000 (12:22 +0000)]
cargo: upgrade chrono-tz parking_lot mio directories ron

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
3 years agocargo: upgrade digest sha2
Ian Jackson [Sun, 6 Mar 2022 12:20:29 +0000 (12:20 +0000)]
cargo: upgrade digest sha2

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
3 years agocargo: upgrade console nix flexi_logger image
Ian Jackson [Sun, 6 Mar 2022 12:16:24 +0000 (12:16 +0000)]
cargo: upgrade console nix flexi_logger image

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
3 years agocargo: upgrade strum
Ian Jackson [Sun, 6 Mar 2022 12:12:22 +0000 (12:12 +0000)]
cargo: upgrade strum

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
3 years agostrum: Drop a commented-out dependency
Ian Jackson [Sun, 6 Mar 2022 12:12:12 +0000 (12:12 +0000)]
strum: Drop a commented-out dependency

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
3 years agocargo: update
Ian Jackson [Sun, 6 Mar 2022 12:08:58 +0000 (12:08 +0000)]
cargo: update

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
3 years agocmdlistener: Fix an error message
Ian Jackson [Sun, 6 Mar 2022 12:06:23 +0000 (12:06 +0000)]
cmdlistener: Fix an error message

3 years agowdriver: Add an allow for a field there fore debug
Ian Jackson [Sun, 6 Mar 2022 11:51:31 +0000 (11:51 +0000)]
wdriver: Add an allow for a field there fore debug

3 years agowdriver: Expose contents of WPiece
Ian Jackson [Sun, 6 Mar 2022 11:49:37 +0000 (11:49 +0000)]
wdriver: Expose contents of WPiece

These ought to have been pub.  As it happens we only used them here in
this module so we didn't notice - except that the JsV is just there in
case and happens not to be used.

3 years agowdriver: Remove an unused field
Ian Jackson [Sun, 6 Mar 2022 11:48:18 +0000 (11:48 +0000)]
wdriver: Remove an unused field

This was just here for possible use in error messages but we use name
instead.

3 years agowdriver: Add an allow for a field used only for its Drop behaviour
Ian Jackson [Sun, 6 Mar 2022 11:46:38 +0000 (11:46 +0000)]
wdriver: Add an allow for a field used only for its Drop behaviour

3 years agoutils: Replace a deprecated call
Ian Jackson [Sun, 6 Mar 2022 11:44:09 +0000 (11:44 +0000)]
utils: Replace a deprecated call

3 years agozcoord: Make MutateReturn take self parameter
Ian Jackson [Sun, 6 Mar 2022 11:37:25 +0000 (11:37 +0000)]
zcoord: Make MutateReturn take self parameter

This avoids a warning about IteratorCore::mr being dead code.

3 years agobuild fixes for more recent nightly
Ian Jackson [Tue, 14 Sep 2021 23:09:28 +0000 (00:09 +0100)]
build fixes for more recent nightly

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
3 years agoMakefile: don't override environment's SPHINXBUILD or NAILING_CARGO
Ian Jackson [Tue, 14 Sep 2021 23:06:39 +0000 (00:06 +0100)]
Makefile: don't override environment's SPHINXBUILD or NAILING_CARGO

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
3 years agoDo not leak in log piece identity of face-down cards
Ian Jackson [Wed, 28 Jul 2021 18:18:31 +0000 (19:18 +0100)]
Do not leak in log piece identity of face-down cards

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
3 years agoCargo.toml: Update all versions to 0.7.3 otter-0.7.3
Ian Jackson [Sun, 25 Jul 2021 22:54:10 +0000 (23:54 +0100)]
Cargo.toml: Update all versions to 0.7.3

Commit made automatically by update-versions.

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
3 years agoCHANGELOG: Document fix to make-release
Ian Jackson [Sun, 25 Jul 2021 22:52:51 +0000 (23:52 +0100)]
CHANGELOG: Document fix to make-release

cargo packages may have been wrong, so re-tag rather than trying to
recover by hand.

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
3 years agomake-release: Rely on nailing-cargo's new preclean function
Ian Jackson [Sun, 25 Jul 2021 22:50:58 +0000 (23:50 +0100)]
make-release: Rely on nailing-cargo's new preclean function

Our find rune was buggy and caused the publish of 0.7.2 to fail.

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
3 years agoCHANGELOG: Set date of today's release otter-0.7.2
Ian Jackson [Sun, 25 Jul 2021 22:29:13 +0000 (23:29 +0100)]
CHANGELOG: Set date of today's release

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
3 years agodocs: Drop a now-stabilised feature declaration
Ian Jackson [Sun, 25 Jul 2021 21:35:44 +0000 (22:35 +0100)]
docs: Drop a now-stabilised feature declaration

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
3 years agodocs: Document that we need miri for testing
Ian Jackson [Sun, 25 Jul 2021 21:31:25 +0000 (22:31 +0100)]
docs: Document that we need miri for testing

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
3 years agodocs: Note testing with latest nightly
Ian Jackson [Sun, 25 Jul 2021 21:30:19 +0000 (22:30 +0100)]
docs: Note testing with latest nightly

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
3 years agocargo: update to thirtyfour_sync 0.25
Ian Jackson [Sun, 25 Jul 2021 21:27:09 +0000 (22:27 +0100)]
cargo: update to thirtyfour_sync 0.25

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
3 years agocargo update
Ian Jackson [Sun, 25 Jul 2021 21:24:39 +0000 (22:24 +0100)]
cargo update

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
3 years agoCHANGELOG: minor adjustments
Ian Jackson [Wed, 21 Jul 2021 20:45:34 +0000 (21:45 +0100)]
CHANGELOG: minor adjustments

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
3 years agoCHANGELOG: document changes since last attempt
Ian Jackson [Wed, 21 Jul 2021 20:29:40 +0000 (21:29 +0100)]
CHANGELOG: document changes since last attempt

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
3 years agojs test: synch: wait for api queue empty
Ian Jackson [Wed, 21 Jul 2021 20:09:47 +0000 (21:09 +0100)]
js test: synch: wait for api queue empty

Otheerwise we can lose a race, if we somehow keep the browser JS
environment and the Otter game server busy enough that the browser
doesn't manage to empty its api queue.

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
3 years agojs test: call test_update_hook on api queue empty
Ian Jackson [Wed, 21 Jul 2021 20:06:48 +0000 (21:06 +0100)]
js test: call test_update_hook on api queue empty

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
3 years agojs test: rename test_update_hook from gen_update_hook
Ian Jackson [Wed, 21 Jul 2021 19:41:36 +0000 (20:41 +0100)]
js test: rename test_update_hook from gen_update_hook

We're going to use it for something else too.

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
3 years agoautolower: Test that it works when claiming a hand
Ian Jackson [Wed, 21 Jul 2021 18:20:52 +0000 (19:20 +0100)]
autolower: Test that it works when claiming a hand

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
3 years agoautolower: Prep for test by raising the hand we are about to claim
Ian Jackson [Wed, 21 Jul 2021 18:16:57 +0000 (19:16 +0100)]
autolower: Prep for test by raising the hand we are about to claim

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
3 years agowdt: Get rid of many redundant .release calls
Ian Jackson [Wed, 21 Jul 2021 17:42:38 +0000 (18:42 +0100)]
wdt: Get rid of many redundant .release calls

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
3 years agowdt: Get rid of many open-coded key_up/key_down pairs
Ian Jackson [Wed, 21 Jul 2021 17:35:40 +0000 (18:35 +0100)]
wdt: Get rid of many open-coded key_up/key_down pairs

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
3 years agoautolower: Call piece_make_heavy when pinning
Ian Jackson [Wed, 21 Jul 2021 17:25:27 +0000 (18:25 +0100)]
autolower: Call piece_make_heavy when pinning

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
3 years agoapi: Prep for calling make_piece_heavy
Ian Jackson [Wed, 21 Jul 2021 17:24:32 +0000 (18:24 +0100)]
api: Prep for calling make_piece_heavy

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
3 years agoautolower: Call piece_make_heavy in create_occultation
Ian Jackson [Wed, 21 Jul 2021 17:20:14 +0000 (18:20 +0100)]
autolower: Call piece_make_heavy in create_occultation

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
3 years agocreate_occultation: Pass PUOs_Simple_Modify witness at all callers
Ian Jackson [Tue, 20 Jul 2021 19:58:41 +0000 (20:58 +0100)]
create_occultation: Pass PUOs_Simple_Modify witness at all callers

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
3 years agoautolower: Tolerate empty test module without warning
Ian Jackson [Wed, 21 Jul 2021 19:38:44 +0000 (20:38 +0100)]
autolower: Tolerate empty test module without warning

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
3 years agoautolower: Introduce facility (no callers yet)
Ian Jackson [Wed, 21 Jul 2021 17:16:22 +0000 (18:16 +0100)]
autolower: Introduce facility (no callers yet)

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
3 years agoglobal: Provide an escape hatch for tests
Ian Jackson [Wed, 21 Jul 2021 17:15:07 +0000 (18:15 +0100)]
global: Provide an escape hatch for tests

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
3 years agogamestate: Fix botched comment
Ian Jackson [Tue, 20 Jul 2021 20:23:07 +0000 (21:23 +0100)]
gamestate: Fix botched comment

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
3 years agojst-lower: Check that we only do funky stuff if needed
Ian Jackson [Mon, 19 Jul 2021 01:56:36 +0000 (02:56 +0100)]
jst-lower: Check that we only do funky stuff if needed

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
3 years agolowering: Only do clashing Z heavy when needed
Ian Jackson [Mon, 19 Jul 2021 02:23:20 +0000 (03:23 +0100)]
lowering: Only do clashing Z heavy when needed

If there are no pieces Q to insert, we con't need to worry about this,
because it'll just be an empty ignored plan entry.

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
3 years agolowering: Do not construct range iter for empty plan entries
Ian Jackson [Mon, 19 Jul 2021 23:44:04 +0000 (00:44 +0100)]
lowering: Do not construct range iter for empty plan entries

We are going to want to let these have malformed reanges.

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
3 years agolowering: Get state transition right for non-heavy targets
Ian Jackson [Mon, 19 Jul 2021 02:05:59 +0000 (03:05 +0100)]
lowering: Get state transition right for non-heavy targets

We would go into state B if we found any target.  But that's not
right: the chart says to disregard heavy targets, and indeed we don't
want to stack other things below them.

This can lead q_z_top legitimately being null on exit from the walk
loop, if there are no pieces in B or Z.  We still need a q_z_top: we
can't leave it open, because we want to make sure we only lower
pieces, not raise them.  So we choose the lowest piece in Q, or,
failing that, P.

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
3 years agojst-lower: Trap add_log_message to print to somewhere we can see
Ian Jackson [Mon, 19 Jul 2021 02:22:53 +0000 (03:22 +0100)]
jst-lower: Trap add_log_message to print to somewhere we can see

Otherwise, we just get an exception printed by nodejs which doesn't
actually include the message.

What we do here is print it to console.log where it will end up in
stderr, and *also* print a version to the machine-readable output
parsed by jst-lower.rs.

Currently jst-lower.rs bails on seeing it, which means these kind of
log messages are still fatal errors.  This is what we want - we don't
have any test cases that expect them.

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
3 years agojst-lower: Fix comments for new z level regiem
Ian Jackson [Mon, 19 Jul 2021 01:41:51 +0000 (02:41 +0100)]
jst-lower: Fix comments for new z level regiem

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
3 years agojst-lower: Add only-z-same stress tests
Ian Jackson [Mon, 19 Jul 2021 01:39:53 +0000 (02:39 +0100)]
jst-lower: Add only-z-same stress tests

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
3 years agojst-lower: Prepare for only-z-same stress tests
Ian Jackson [Mon, 19 Jul 2021 01:39:13 +0000 (02:39 +0100)]
jst-lower: Prepare for only-z-same stress tests

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
3 years agojst-lower: Restore longer non-z-clash tests
Ian Jackson [Mon, 19 Jul 2021 01:35:05 +0000 (02:35 +0100)]
jst-lower: Restore longer non-z-clash tests

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
3 years agojst-lower: Reduce exhaustive test size
Ian Jackson [Mon, 19 Jul 2021 01:11:31 +0000 (02:11 +0100)]
jst-lower: Reduce exhaustive test size

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
3 years agojst-lower: Test identical ZCoord values
Ian Jackson [Mon, 19 Jul 2021 01:11:17 +0000 (02:11 +0100)]
jst-lower: Test identical ZCoord values

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
3 years agolowering: Cope when there are heavy pieces with clashing z coords
Ian Jackson [Mon, 19 Jul 2021 01:26:24 +0000 (02:26 +0100)]
lowering: Cope when there are heavy pieces with clashing z coords

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
3 years agolowering: Clarify a comment
Ian Jackson [Mon, 19 Jul 2021 17:51:16 +0000 (18:51 +0100)]
lowering: Clarify a comment

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
3 years agojst-lower: Fix a debug output format
Ian Jackson [Mon, 19 Jul 2021 01:34:52 +0000 (02:34 +0100)]
jst-lower: Fix a debug output format

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
3 years agojst-lower: Show ZUpdate mode in debug dump
Ian Jackson [Mon, 19 Jul 2021 01:10:41 +0000 (02:10 +0100)]
jst-lower: Show ZUpdate mode in debug dump

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
3 years agojst-lower: Provide ZUpdateSpec::GOnly
Ian Jackson [Mon, 19 Jul 2021 17:56:42 +0000 (18:56 +0100)]
jst-lower: Provide ZUpdateSpec::GOnly

Not currently used.

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
3 years agojst-lower: Fix some output formatting
Ian Jackson [Sun, 18 Jul 2021 23:01:16 +0000 (00:01 +0100)]
jst-lower: Fix some output formatting

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
3 years agojst-lower: Prep for other ZUS
Ian Jackson [Sun, 18 Jul 2021 22:55:06 +0000 (23:55 +0100)]
jst-lower: Prep for other ZUS

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
3 years agojst-lower: Test cawe from a recent game where we experienced bug
Ian Jackson [Fri, 16 Jul 2021 19:19:55 +0000 (20:19 +0100)]
jst-lower: Test cawe from a recent game where we experienced bug

This used to produce
  Z coordinate range has end equal to start, cannot iterate
but it was fixed in
  zcoord: Fix some more edge case bugs in range algorithm
  6d84e4c7dda0bc89ad229de5a03b3b50e551506f

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
3 years agojstest: Copy zlevels from game into jst-lower
Ian Jackson [Sun, 18 Jul 2021 20:45:38 +0000 (21:45 +0100)]
jstest: Copy zlevels from game into jst-lower

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
3 years agojst-lower: Move ZUS into StartPieceSpec
Ian Jackson [Sun, 18 Jul 2021 20:43:00 +0000 (21:43 +0100)]
jst-lower: Move ZUS into StartPieceSpec

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
3 years agojstest: Pass lastg to ZUpdateSpec::next
Ian Jackson [Sun, 18 Jul 2021 20:57:40 +0000 (21:57 +0100)]
jstest: Pass lastg to ZUpdateSpec::next

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
3 years agojst-lower: Introduce ZLevel::show
Ian Jackson [Sun, 18 Jul 2021 20:39:33 +0000 (21:39 +0100)]
jst-lower: Introduce ZLevel::show

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
3 years agojst-lower: Make ZUpdateSpec an enum, not a trait
Ian Jackson [Sun, 18 Jul 2021 19:52:42 +0000 (20:52 +0100)]
jst-lower: Make ZUpdateSpec an enum, not a trait

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
3 years agojst-lower: Plumb zg through to many places
Ian Jackson [Sun, 18 Jul 2021 19:37:01 +0000 (20:37 +0100)]
jst-lower: Plumb zg through to many places

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
3 years agojst-lower: Introduce ZUpdateSpec
Ian Jackson [Sat, 17 Jul 2021 11:38:45 +0000 (12:38 +0100)]
jst-lower: Introduce ZUpdateSpec

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
3 years agozcoord: Fix docs for some_range
Ian Jackson [Sat, 17 Jul 2021 11:37:26 +0000 (12:37 +0100)]
zcoord: Fix docs for some_range

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
3 years agozcoord tests: Test some bad ranges
Ian Jackson [Sat, 17 Jul 2021 11:34:56 +0000 (12:34 +0100)]
zcoord tests: Test some bad ranges

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
3 years agozcoord tests: Introduce It::new()
Ian Jackson [Sat, 17 Jul 2021 11:28:27 +0000 (12:28 +0100)]
zcoord tests: Introduce It::new()

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
3 years agozcoord tests: Use mk in range tests
Ian Jackson [Sat, 17 Jul 2021 11:24:20 +0000 (12:24 +0100)]
zcoord tests: Use mk in range tests

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
3 years agozcoord tests: Rename zc (from bf)
Ian Jackson [Sat, 17 Jul 2021 11:22:57 +0000 (12:22 +0100)]
zcoord tests: Rename zc (from bf)

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
3 years agozcoord: Add a test for range carry/borrow edge case
Ian Jackson [Sat, 17 Jul 2021 11:21:38 +0000 (12:21 +0100)]
zcoord: Add a test for range carry/borrow edge case

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
3 years agozcoord: Fix some more edge case bugs in range algorithm
Ian Jackson [Sat, 17 Jul 2021 11:21:35 +0000 (12:21 +0100)]
zcoord: Fix some more edge case bugs in range algorithm

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
3 years agozcoord: Add a test for range carry/borrow
Ian Jackson [Fri, 16 Jul 2021 19:42:33 +0000 (20:42 +0100)]
zcoord: Add a test for range carry/borrow

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
3 years agozcoord: Fix typo in comment
Ian Jackson [Sat, 17 Jul 2021 13:10:19 +0000 (14:10 +0100)]
zcoord: Fix typo in comment

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>