lichess.org
Donate

Chess Web Programming: Part One

On the page of @thibault it is written "I turn coffee into bugs." and in one of articles he wrote that he makes online translations of coding lichess. If anybody knows how to get to such a translation or to watch at least in record, please share. That is the chess programming I'd like to watch and follow.
Thank you, @HollowLeaf, I successfully went through your tutorial. I appreciate very much that you explain all the details of getting Node.js and a React project set up, and how to install libraries.

Some notes:

* I got an error "npm.ps1 cannot be loaded because running scripts is disabled on this system" when trying to run `npm -v`. The solution to this problem is to relax the Windows script execution policy by running `Set-ExecutionPolicy RemoteSigned` in an administrator PowerShell (and confirming with "A"). Reference: stackoverflow.com/a/57675039/1658543 and stackoverflow.com/a/59434625/1658543.

* In the App.js, when catching the error, it is enough to just write `console.error(error.message);` because that will already print "Invalid move: ".

* For the beginners:
** To stop the dev server before running `npm install react-chessboard chess.js`, press CTRL + C in the console.
** To open a folder from within VS Code, choose "Add Folder to Workspace" in the VS Code Explorer (right-click menu).

Ok, that's all from my side. Looking forward to the next part.

@Motroskin You can reach a user's stream page – If they have one – via the streamer symbol top right on their page. For Thibault that is lichess.org/streamer/thibault.
@NHL_128 said in #3:
> Thank you, @HollowLeaf, I successfully went through your tutorial. I appreciate very much that you explain all the details of getting Node.js and a React project set up, and how to install libraries.
>
> Some notes:
>
> * I got an error "npm.ps1 cannot be loaded because running scripts is disabled on this system" when trying to run `npm -v`. The solution to this problem is to relax the Windows script execution policy by running `Set-ExecutionPolicy RemoteSigned` in an administrator PowerShell (and confirming with "A"). Reference: stackoverflow.com/a/57675039/1658543 and stackoverflow.com/a/59434625/1658543.
>
> * In the App.js, when catching the error, it is enough to just write `console.error(error.message);` because that will already print "Invalid move: ".
>
> * For the beginners:
> ** To stop the dev server before running `npm install react-chessboard chess.js`, press CTRL + C in the console.
> ** To open a folder from within VS Code, choose "Add Folder to Workspace" in the VS Code Explorer (right-click menu).
>
> Ok, that's all from my side. Looking forward to the next part.
>
> @Motroskin You can reach a user's stream page – If they have one – via the streamer symbol top right on their page. For Thibault that is lichess.org/streamer/thibault.

Thank you for the feedback and I appreciate you going through the blog. I will make these updates to the blog later today.
<Comment deleted by user>
@NHL_128 said in #3:

> @Motroskin You can reach a user's stream page – If they have one – via the streamer symbol top right on their page. For Thibault that is lichess.org/streamer/thibault.

Thank you, I see. The problem is that I can't see neither recorded videos with streams, nor scheduled items, nor a way to get notifications about the even in advance (I already subscribed, but during years never got any notifications). Do I miss something?
thanks for this walkthrough. I will read it by chunks. but you describe well the context and the possible goals. for me it would be familiarity with any web tech. while getting motivated by chess which is more inspiring than mere coding exercises.

I got to read, fast read, and I find you have made a good effort to foresee the caveats that someone entirely new and with a non-developper machine, might encounter. When explaining from expertise, and not having a clue of the audience initial condition, it might get difficult to think like that about things we might have done long ago and that are of such an obvious nature that it does not come to mind considering it might not be there in that fluke of an unlucky audience. So I appreciate the extra effort. The length is not so big now. I will try in another burst of energy from nowhere to test the procedure. I was referring to the PowerShell policy. Once changed, easy to forget.

And it can be blocking for the newbie, otherwise capable, who might give up. I also find it nice that you opened the discussion. For people trying and testing your tutorial. I would like to do so later.

I do have a question though. as I went to look at the github repository readme. How does the feature set of that chessboard and chess logic library (?, or app infrastructure?) , compare to chessground that lichess made standalone some time ago. This might not be urgent. But I like to have some sense of the wilderness ecology out there..

Your website is also appealing. I plan to look at the glossary for your explanations and take on the words. As it is not always easy to convey whether those are definitions or explanations, and how one should hold them in their mind when facing the board in own experience. So every structured take like that might be a data point to consider.
@dboing said in #9:
> thanks for this walkthrough. I will read it by chunks. but you describe well the context and the possible goals. for me it would be familiarity with any web tech. while getting motivated by chess which is more inspiring than mere coding exercises.
>
> I got to read, fast read, and I find you have made a good effort to foresee the caveats that someone entirely new and with a non-developper machine, might encounter. When explaining from expertise, and not having a clue of the audience initial condition, it might get difficult to think like that about things we might have done long ago and that are of such an obvious nature that it does not come to mind considering it might not be there in that fluke of an unlucky audience. So I appreciate the extra effort. The length is not so big now. I will try in another burst of energy from nowhere to test the procedure. I was referring to the PowerShell policy. Once changed, easy to forget.
>
> And it can be blocking for the newbie, otherwise capable, who might give up. I also find it nice that you opened the discussion. For people trying and testing your tutorial. I would like to do so later.
>
> I do have a question though. as I went to look at the github repository readme. How does the feature set of that chessboard and chess logic library (?, or app infrastructure?) , compare to chessground that lichess made standalone some time ago. This might not be urgent. But I like to have some sense of the wilderness ecology out there..
>
> Your website is also appealing. I plan to look at the glossary for your explanations and take on the words. As it is not always easy to convey whether those are definitions or explanations, and how one should hold them in their mind when facing the board in own experience. So every structured take like that might be a data point to consider.

The Power shell command was pointed out to me and I have adjusted the blog for that. I didn't notice see it when writing as it was already enabled on my machine, it was nice of the comment section to add details.

I have not explored Chessground, however the functionality looks pretty similar, there will be some slight differences, and I assume that either one will work for your development purposes. In fairness, I did not know that Chessground existed until my project was already underway, I knew I wanted to use React, and Google React and Chessboard, and liked the functionality.