
One-Page Chess [video] - todsacerdoti
https://danielbmarkham.locals.com/post/110651/technical-tuesdays-follow-up-one-page-chess-done-for-now
======
woko
The webpage is weird. For these interested, it seems to be about:

[https://github.com/DanielBMarkham/OnePageChess](https://github.com/DanielBMarkham/OnePageChess)

~~~
cmehdy
Seems like a very non-conflictual kind of chess game:
[https://i.imgur.com/nXBxI5v.gifv](https://i.imgur.com/nXBxI5v.gifv)

~~~
drdeca
To remove a piece, select a piece, and then press the delete key on your
keyboard.

------
spankalee
I recently made a <chess-board> custom HTML element that should make this kind
of thing really easy to build: [https://justinfagnani.github.io/chessboard-
element/](https://justinfagnani.github.io/chessboard-element/)

You can specify a board, the current position, and other options right in
markup, like:

    
    
        <chess-board
            draggable-pieces
            position="8/R7/8/8/k1K5/8/8/8">
        </chess-board>
    

So it should be very easy to encode the position in a URL. You could also have
more than one board for teaching moves.

------
ericsoderstrom
In his intro he says he was surprised that he couldn't find any existing ways
to do this.

Lichess definitely allows you to share positions via url. E.g.
[https://lichess.org/editor/rnbqkbnr/1p1p1ppp/p3p3/8/3NP3/8/P...](https://lichess.org/editor/rnbqkbnr/1p1p1ppp/p3p3/8/3NP3/8/PPP2PPP/RNBQKB1R_w_KQkq_-_0_1)

Cool project allthesame

------
pwinnski
It's a video of an opinionated guy explaining his design of a Static SPA Chess
app.

I like it! It's fun to see someone with some expertise and opinions talk for a
while.

------
29athrowaway
Refreshing to see something without so many dependencies.

------
malkia
Seems like longest chess game is about less than 300 turns, there are 64
cells, and even if you don't know chess, and even without efficiently coded
there are max of 128bits per turn (a lot of them not valid, and probably space
that can be explored better) - e.g. it feels like not only the current
position, but the history can be recorded in small amount of data in an URL.

~~~
malkia
For example, instead of using 64-bits for specifying from where the chess
figure was moved, it can be the enumeration of the first chess figure for the
given player, starting from top/down - so since there are max of 16 figures -
it's only 16 bits. So this goes to 64+16 bits only per move. I guess you can
go further...

~~~
malkia
actually the final position is given by the type of figure - queen, king, etc.
- and they have limited positions possible (not all 64) - even queen would
have at the best - how many? like 27-28 possible - so 16+28 bits only now per
move, and it can go lower. Replaying these moves should be almost instant (not
much really)

~~~
recursivecaveat
You can get under one byte per move actually. There are less than 256 moves
possible from any given chess position, so you just have an algorithm to order
them, and index into that. You can do even better with variable length
compression and move ordering. Here's a post from lichess about their system:
[https://lichess.org/blog/Wqa7GiAAAOIpBLoY/developer-
update-2...](https://lichess.org/blog/Wqa7GiAAAOIpBLoY/developer-
update-275-improved-game-compression)

------
pavel_lishin
Ah, yes, a popup asking me if I like what I'm seeing from the "DanielBMarkham
Community" the second the page loads, before I get a chance to even understand
what the question means. This is definitely a very good pattern that
definitely didn't make me immediately click back.

[https://imgur.com/lxKSA9I](https://imgur.com/lxKSA9I)

~~~
DanielBMarkham
I've tried several platforms for blogging over the years. This latest one
promises to let me own the content, no ads, and I can set up a subscription
program for folks who want to participate more. I thought about 2 bucks a
month. It would be an experiment to see if when people pay they tend to argue
less and post less low-effort stuff. I suspect this is the case, but it'll be
interesting playing around with the idea.

~~~
pavel_lishin
Maybe you own the content, and maybe there's no ads, but it sure looks like
you don't get to _control_ the content - and a popup is obnoxious whether it's
selling you diet pills, or the ability to do exactly the thing you're doing.

~~~
DanielBMarkham
Thanks for engaging. I'm perfectly happy switching to something new. I've only
been on this place for six weeks or so. But I'm a bit conflicted about
options.

Looking at the front page of HN on any given day, a significant portion of the
top comments are not about the material, but about the site itself: the fonts
are too big, the layout is hard-to-read, it's a paywall, Medium has gone to
crap, the site shouldn't be trusted, the load times are too long, the page is
too heavy, and so on. (You have to know what I'm talking about here)

I'm a coder, so I can (and have) put content in all kinds of places. I could
give you a detailed list of a dozen or so that I've tried, from plain html/js
on my own server to Git Pages and this current experiment. The problem is that
I have _yet_ to use any of these where I didn't get some sort of meta comment
like yours.

I believe, and I hope I'm wrong, that the _control_ issue you mention is never
going to go away. It's just going to be an issue of what trade-offs people are
willing to make for ease-of-use. Yeah, I could drop web pages and multi-media
content on AWS and set up my own membership and streaming services. Then I
could get into multi-format streaming, SAML, CDN configuration, and a hundred
other technical issues that I'd love to play with, but have nothing at all
with trying to create some kind of useful content out of my career experiences
so far.

So thanks, and I agree, but I'm still kind of at a loss at what to do. If more
people complain I'll send the admins an email. I could leave, but to where?
Meh.

EDIT: If I wasn't clear enough, I don't like the popup either.

~~~
pavel_lishin
Yeah. I'm sorry that today it's my turn to bother you with nitpicking, without
offering any good solutions. For what it's worth, my "blog" with its single
post is hosted on my own domain, on a server I pay for. It works for me, but I
have zero readers, and don't plan on dealing with traffic spikes!

If it's any consolation, I would argue that font choice is a matter of taste,
whereas a popup is always rude.

