]>
git.sesse.net Git - remoteglot/log
Steinar H. Gunderson [Sun, 25 Dec 2022 12:35:07 +0000 (13:35 +0100)]
chess.js: Faster and smaller attacked(). (A test perft went from ~11.5 to ~7.5 secs.)
Steinar H. Gunderson [Sat, 24 Dec 2022 23:05:49 +0000 (00:05 +0100)]
Build pieces through the DOM, not innerHTML.
Steinar H. Gunderson [Sat, 24 Dec 2022 23:02:42 +0000 (00:02 +0100)]
Evidently clearTimeout() is expensive (~3 ms used on load), so do not call it unless we must.
Steinar H. Gunderson [Sat, 24 Dec 2022 22:58:24 +0000 (23:58 +0100)]
Use innerHTML slightly less (it is costly).
Steinar H. Gunderson [Sat, 24 Dec 2022 20:03:36 +0000 (21:03 +0100)]
chess.js: Much faster disambiguation.
Steinar H. Gunderson [Sat, 24 Dec 2022 10:38:56 +0000 (11:38 +0100)]
Fix a super-long-standing bug, where making a move on the board could make us replay the game from the start.
Steinar H. Gunderson [Sat, 24 Dec 2022 10:12:16 +0000 (11:12 +0100)]
Fix leftover hover when clicking on the graph.
Steinar H. Gunderson [Sat, 24 Dec 2022 00:16:10 +0000 (01:16 +0100)]
Prune some unused CSS rules.
Steinar H. Gunderson [Sat, 24 Dec 2022 00:04:53 +0000 (01:04 +0100)]
Make sure the SVG pieces are in front of the letters.
Steinar H. Gunderson [Fri, 23 Dec 2022 23:39:57 +0000 (00:39 +0100)]
Fix min/max range for the most recent move.
Steinar H. Gunderson [Fri, 23 Dec 2022 23:27:50 +0000 (00:27 +0100)]
Use proper variable scoping everywhere.
Steinar H. Gunderson [Fri, 23 Dec 2022 23:20:13 +0000 (00:20 +0100)]
Fix highlight removals.
Steinar H. Gunderson [Fri, 23 Dec 2022 23:05:24 +0000 (00:05 +0100)]
Eat JSON parse errors in hash explores.
Steinar H. Gunderson [Fri, 23 Dec 2022 22:08:17 +0000 (23:08 +0100)]
Add a Firefox workaround for animations.
Steinar H. Gunderson [Fri, 23 Dec 2022 22:06:29 +0000 (23:06 +0100)]
Fix transitionProperty syntax.
Steinar H. Gunderson [Fri, 23 Dec 2022 20:38:39 +0000 (21:38 +0100)]
Remove the minimized chessboard.js and chess.js, which are no longer matching the full versions.
Steinar H. Gunderson [Fri, 23 Dec 2022 18:18:50 +0000 (19:18 +0100)]
Drop base64 encoding for SVGs.
This is perhaps a bit hacky... but it saves 1567 gzip bytes. :-)
Steinar H. Gunderson [Fri, 23 Dec 2022 17:42:53 +0000 (18:42 +0100)]
Remove a bunch of unneeded whitespace from the SVGs.
642 fewer gzipped bytes, for basically no cost.
Steinar H. Gunderson [Fri, 23 Dec 2022 17:42:20 +0000 (18:42 +0100)]
Various fixes for running with advanced JS optimizations, if we want to do that in the future.
Steinar H. Gunderson [Fri, 23 Dec 2022 16:27:10 +0000 (17:27 +0100)]
Don't show the copyright blurb in chessboard.css; we already have it from the JS.
Steinar H. Gunderson [Fri, 23 Dec 2022 16:25:53 +0000 (17:25 +0100)]
Make UNIX lineendings in chessboard.css.
Steinar H. Gunderson [Fri, 23 Dec 2022 16:13:11 +0000 (17:13 +0100)]
Remove jQuery!
Steinar H. Gunderson [Fri, 23 Dec 2022 16:12:50 +0000 (17:12 +0100)]
Make our own SVG sparkline, replacing jquery.sparkline.js.
Steinar H. Gunderson [Fri, 23 Dec 2022 13:36:21 +0000 (14:36 +0100)]
Fix SVG positioning when we are scrolled.
Steinar H. Gunderson [Fri, 23 Dec 2022 09:46:06 +0000 (10:46 +0100)]
Fix another jQuery-ism.
Steinar H. Gunderson [Thu, 22 Dec 2022 22:43:13 +0000 (23:43 +0100)]
Update chessboard.js copyright and version to make it clear it is a modified version.
Steinar H. Gunderson [Thu, 22 Dec 2022 22:41:54 +0000 (23:41 +0100)]
Remove some obsolete checks from chessboard.js.
Steinar H. Gunderson [Thu, 22 Dec 2022 22:33:01 +0000 (23:33 +0100)]
Get rid of some more unneeded jQuery.
Steinar H. Gunderson [Thu, 22 Dec 2022 22:32:40 +0000 (23:32 +0100)]
Remove an unused jQuery version.
Steinar H. Gunderson [Thu, 22 Dec 2022 22:24:52 +0000 (23:24 +0100)]
Remove the rest of jQuery from chessboard.js.
There are still two animations left, because we don't use them
(they both relate to spare pieces). Fixing them would be simple.
Steinar H. Gunderson [Tue, 20 Dec 2022 23:27:55 +0000 (00:27 +0100)]
Remove all jQuery from chessboard.js that does not involve animations.
Steinar H. Gunderson [Tue, 20 Dec 2022 23:53:19 +0000 (00:53 +0100)]
Develop using un-minified chessboard.js.
Steinar H. Gunderson [Tue, 20 Dec 2022 23:06:26 +0000 (00:06 +0100)]
Remove most of our jQuery usage.
This actually costs us 3 kB of (uncompressed) code in index.html,
since we still have the entire dependency on board. But the aim
is to get rid of jQuery entirely.
Steinar H. Gunderson [Tue, 20 Dec 2022 22:27:52 +0000 (23:27 +0100)]
Replace jQuery ajax() with the fetch API in all of our own code.
Steinar H. Gunderson [Wed, 2 Nov 2022 22:46:53 +0000 (23:46 +0100)]
Inline tons of stuff into the main HTML.
Steinar H. Gunderson [Wed, 2 Nov 2022 22:03:46 +0000 (23:03 +0100)]
Send the favicon through pngcrush.
Steinar H. Gunderson [Wed, 2 Nov 2022 21:58:09 +0000 (22:58 +0100)]
IE is dead.
Steinar H. Gunderson [Wed, 2 Nov 2022 21:57:45 +0000 (22:57 +0100)]
Fix a missing closing brace.
Steinar H. Gunderson [Sat, 29 Oct 2022 15:26:06 +0000 (17:26 +0200)]
Add a primitive user-selectable delay, for matching up with TV. Requested by Sigurd Egset.
Steinar H. Gunderson [Sat, 29 Oct 2022 15:14:26 +0000 (17:14 +0200)]
Move response processing down to a function.
Steinar H. Gunderson [Sat, 22 Oct 2022 11:07:37 +0000 (13:07 +0200)]
Do not show the board before we have an initial load.
Steinar H. Gunderson [Sat, 22 Oct 2022 11:04:19 +0000 (13:04 +0200)]
Make scripts renderblocking.
Steinar H. Gunderson [Thu, 20 Oct 2022 17:55:26 +0000 (19:55 +0200)]
Better imbalance pieces in dark mode.
Simply use the pieces of the opposite color and invert them;
they are made for a light background.
Steinar H. Gunderson [Thu, 20 Oct 2022 16:44:35 +0000 (18:44 +0200)]
Update copyright year.
Steinar H. Gunderson [Thu, 20 Oct 2022 16:04:27 +0000 (18:04 +0200)]
Use SVG pieces.
The PNG pieces don't look fantastic on hidpi, and the SVGs are a
bit smaller, too. This is the same Wikipedia set, just with some
(most) pieces in newer versions since they are smaller and sometimes
better aligned.
We put the SVGs directly into the .js file as base64, so that we
get zero HTTP requests for the pieces.
Steinar H. Gunderson [Sun, 31 Jul 2022 10:34:03 +0000 (12:34 +0200)]
Fix dark mode borders on mobile.
Steinar H. Gunderson [Mon, 13 Jun 2022 22:16:13 +0000 (00:16 +0200)]
Formally opt into the dark color scheme.
Steinar H. Gunderson [Fri, 5 Nov 2021 14:36:30 +0000 (15:36 +0100)]
Merge remote-tracking branch 'origin/master'
Steinar H. Gunderson [Fri, 5 Nov 2021 14:34:26 +0000 (15:34 +0100)]
Revert "Send information about lower depths to the JSON."
The entire low-PV experiment didn't go as I had hoped,
so remove it as clutter.
This reverts commit
9fc4030d9b55674b73c341c815292055fcb6f05c .
Steinar H. Gunderson [Fri, 5 Nov 2021 14:34:25 +0000 (15:34 +0100)]
Revert "Show low-depth scores."
This reverts commit
f71f5c94d093acda1b39d23cf7a71a21c6a3122b .
Steinar H. Gunderson [Fri, 5 Nov 2021 14:34:23 +0000 (15:34 +0100)]
Revert "Convert TB scores in low depth."
This reverts commit
e6680e77c571d6253140e5429213d6d06d19eb36 .
Steinar H. Gunderson [Fri, 5 Nov 2021 14:34:03 +0000 (15:34 +0100)]
Revert "Include the PV move in the low-depth analysis."
This reverts commit
b827590935f10fd11c664e513f4daf94c52cce2a .
Steinar H. Gunderson [Sun, 18 Jul 2021 14:15:16 +0000 (16:15 +0200)]
Display the best move for low-depth.
Steinar H. Gunderson [Sun, 18 Jul 2021 14:10:20 +0000 (16:10 +0200)]
Include the PV move in the low-depth analysis.
Steinar H. Gunderson [Fri, 16 Jul 2021 16:56:38 +0000 (18:56 +0200)]
Convert TB scores in low depth.
Steinar H. Gunderson [Fri, 16 Jul 2021 14:54:01 +0000 (16:54 +0200)]
Show low-depth scores.
Steinar H. Gunderson [Fri, 16 Jul 2021 14:34:24 +0000 (16:34 +0200)]
Send information about lower depths to the JSON.
Steinar H. Gunderson [Fri, 16 Jul 2021 10:47:27 +0000 (12:47 +0200)]
Move back to development version (was inadvertedly changed).
Steinar H. Gunderson [Sat, 26 Jun 2021 21:19:25 +0000 (23:19 +0200)]
Convert from grpc to grpc-js, since the former is deprecated and no longer compiles in bullseye.
Steinar H. Gunderson [Sat, 13 Feb 2021 17:50:25 +0000 (18:50 +0100)]
Fix some more TB short-form issues.
Steinar H. Gunderson [Fri, 12 Feb 2021 16:09:30 +0000 (17:09 +0100)]
Another small display fix.
Steinar H. Gunderson [Thu, 11 Feb 2021 22:16:55 +0000 (23:16 +0100)]
Fix display of splice points and tablebase wins after the last changes.
Steinar H. Gunderson [Mon, 8 Feb 2021 23:05:18 +0000 (00:05 +0100)]
Fix some corner cases around in-TB positions.
Steinar H. Gunderson [Sat, 2 Jan 2021 13:26:58 +0000 (14:26 +0100)]
Small tweaks to TB-win messaging.
Steinar H. Gunderson [Tue, 29 Dec 2020 20:16:00 +0000 (21:16 +0100)]
Mark TB-extended lines as such.
We now distinguish between “wins in M moves” (ie., reaches a tablebase
position and has a displayed mate line, but the mate is not necessarily
optimal, due to the horizon effect and DTZ making funny mates) and
“mates in M moves”. We also mark the breakoff point in the PV.
Steinar H. Gunderson [Tue, 29 Dec 2020 17:05:13 +0000 (18:05 +0100)]
Respect $fathom_cmdline.
Steinar H. Gunderson [Tue, 29 Dec 2020 16:53:28 +0000 (17:53 +0100)]
Remove obsolete book support.
Steinar H. Gunderson [Tue, 29 Dec 2020 11:16:15 +0000 (12:16 +0100)]
Force faster updates if our last output was without a PV.
This fixes an issue with the last commit, where we could end up having
a situation like:
0.000: New move arrives, engine is busy stopping
0.200: Engine still hasn't responded, we force display (with no PV)
0.201: Engine finally comes back with a PV
1.200: Display the PV
In this case, we'd be showing no PV and score for almost a second.
Fix it by starting a new 200ms timer after the PV starts coming on,
so we'd show something at 0.401 in this case (and then 1.401 etc.).
(We don't display immediately, since it's likely to be at depth 2 or so.)
Steinar H. Gunderson [Tue, 29 Dec 2020 10:38:36 +0000 (11:38 +0100)]
Small cleanup.
Steinar H. Gunderson [Mon, 28 Dec 2020 00:08:25 +0000 (01:08 +0100)]
Add some special early output when the position changes.
Steinar H. Gunderson [Sat, 28 Nov 2020 18:58:05 +0000 (19:58 +0100)]
Add a 50-move counter.
Steinar H. Gunderson [Mon, 3 Aug 2020 22:23:43 +0000 (00:23 +0200)]
Revert "Fix move highlights when collapsing/uncollapsing history."
This clears current_display_line.pv, breaking the entire concept of
following hash moves. Investigate later if we care.
This reverts commit
2ce508cfa3a480b13350e713900543e23de48c4b .
Steinar H. Gunderson [Mon, 3 Aug 2020 22:15:27 +0000 (00:15 +0200)]
Update copyright year.
Steinar H. Gunderson [Sun, 2 Aug 2020 14:56:45 +0000 (16:56 +0200)]
Fix extremely slow sparkline clicks.
Steinar H. Gunderson [Sun, 2 Aug 2020 14:56:36 +0000 (16:56 +0200)]
Fix move highlights when collapsing/uncollapsing history.
Steinar H. Gunderson [Fri, 12 Jun 2020 07:59:16 +0000 (09:59 +0200)]
Add some dark mode CSS, for the latest fads.
Steinar H. Gunderson [Tue, 28 Jan 2020 16:32:54 +0000 (17:32 +0100)]
Verify that JSON_delta does not have any strangeness.
Steinar H. Gunderson [Tue, 29 Oct 2019 08:15:44 +0000 (09:15 +0100)]
Fix an issue where Chess960 castling rights would get truncated.
Steinar H. Gunderson [Mon, 28 Oct 2019 20:20:04 +0000 (21:20 +0100)]
Fix some deep recursion.
Steinar H. Gunderson [Thu, 5 Sep 2019 20:23:12 +0000 (22:23 +0200)]
Fix a castling edge case in Chess960 positions where the kings start on the e-file and the rooks on c- or g-files.
Steinar H. Gunderson [Thu, 5 Sep 2019 19:36:07 +0000 (21:36 +0200)]
Fix a crash bug when looking at old moves with no analysis.
Steinar H. Gunderson [Thu, 5 Sep 2019 19:26:52 +0000 (21:26 +0200)]
Fix another Chess960 Chess.js issue.
Steinar H. Gunderson [Tue, 3 Sep 2019 21:06:28 +0000 (23:06 +0200)]
When something goes wrong, actually wait five seconds instead of DoSing the backend.
Steinar H. Gunderson [Tue, 3 Sep 2019 21:05:51 +0000 (23:05 +0200)]
Get jQuery over TLS.
Steinar H. Gunderson [Tue, 13 Aug 2019 20:07:45 +0000 (22:07 +0200)]
Fix a crash on short multi-PVs.
Steinar H. Gunderson [Fri, 10 May 2019 21:02:31 +0000 (23:02 +0200)]
Add support for 7-piece Fathom.
Steinar H. Gunderson [Sun, 31 Mar 2019 15:49:19 +0000 (17:49 +0200)]
Fix an incompatibility with newer Node.js.
Steinar H. Gunderson [Thu, 27 Dec 2018 18:06:08 +0000 (19:06 +0100)]
Set Threads before the other options, so that setting up the hash is faster.
Steinar H. Gunderson [Mon, 26 Nov 2018 22:50:53 +0000 (23:50 +0100)]
Fix an issue where we would lose the history after Chess960-style castling, since we wrongly had it reset the 50-move rule.
Steinar H. Gunderson [Sat, 24 Nov 2018 10:21:38 +0000 (11:21 +0100)]
Make sure analysis contempt is off; Stockfish > 9 enables it, and it gives rollercoaster scores.
Steinar H. Gunderson [Mon, 19 Nov 2018 20:22:23 +0000 (21:22 +0100)]
Fix an issue where we would sort the wrong way when browsing history.
Steinar H. Gunderson [Mon, 19 Nov 2018 19:19:51 +0000 (20:19 +0100)]
Support getting PGNs from local files.
Steinar H. Gunderson [Fri, 16 Nov 2018 11:46:53 +0000 (12:46 +0100)]
Add pickup of games from old history.
Steinar H. Gunderson [Wed, 6 Jun 2018 17:04:05 +0000 (19:04 +0200)]
Support flipped boards (no UI, you have to activate it through JS).
Steinar H. Gunderson [Wed, 6 Jun 2018 17:03:42 +0000 (19:03 +0200)]
Unbreak move chaining.
Steinar H. Gunderson [Sat, 10 Feb 2018 17:08:09 +0000 (18:08 +0100)]
Yet more Chess960 castling fixes.
Steinar H. Gunderson [Fri, 9 Feb 2018 21:00:44 +0000 (22:00 +0100)]
Yet more Chess960 castling fixes.
Steinar H. Gunderson [Fri, 9 Feb 2018 19:16:46 +0000 (20:16 +0100)]
Fix Chess960 bug when castling does not move the rook.
Steinar H. Gunderson [Fri, 9 Feb 2018 18:12:43 +0000 (19:12 +0100)]
Fix visualization of Chess960 moves where the king does not move.
Steinar H. Gunderson [Fri, 9 Feb 2018 18:12:20 +0000 (19:12 +0100)]
Fix a Chess.js issue when the king started on the c- or g-files.