Codeproject has a chess program (Won't beat Magnus Carlsen, but without advanced enough for me). Written in c#.

Documentation and source code/compiled program on https://www.codeproject.com/Articles/36112/Chess-Program-in-C

pibbuR

EDIT: Yepp, it beat me. Despite my (in nobody else's view) well thought of (1/2 a move ahead) tactics.
That's quite the project to make alone! WPF is one of the framework I liked most, but unfortunately not very portable.

If you prefer C++, Stockfish is quite good (sources on evil GitHub). It doesn't have a GUI, so you have to install one (Arena, Scid vs PC, ...), make your own - for ex. using Qt - or play through web-based interfaces like Lichess or Chess.com. I must say I haven't found a very good GUI last time I looked; they all require some getting used to.

The latest versions (I think 14 & 15) got more complicated with neural net algorithms.

It must be very good because ChessBase used it as a base for Fritz and Houdini; they even got sued for it 2 years ago or so.
 

"To my horror, I realized this bug report has been open for more than 20 years, and still hasn't been fixed." Because it was "a minor 'cosmetic' issue not causing crashes," there was a good chance nobody would fix it—"Unless I do it myself,"

pibbuR who currenty is bugged by a rhinovirus.
 
Last edited:

"To my horror, I realized this bug report has been open for more than 20 years, and still hasn't been fixed." Because it was "a minor 'cosmetic' issue not causing crashes," there was a good chance nobody would fix it—"Unless I do it myself,"
I've seen that so many times. Even from the other side (from the developer's side), where it's probably more uncomfortable. Maybe not 20-year-old bugs though.

pibbuR who currenty is bugged by a rhiovirus.
Nothing like a good, old-fashioned grog to patch that sort of virus. :D
 

pibbuR who considers his projects open source but not available from the outside.
I have the impression many projects have found a good equilibrium in the form of an open-source project with a steering committee or by being driven/owned by a company. For example, programming languages like Python, Kotlin, Rust, or Javascript.

Steering committees aren't always very quick to make decisions, though.
 
I had to do some Cobol in a comparative programming language course as an undergrad... what a crappy language. Was used by banks/governments etc for years and I think there is still quite a large legacy code base...with few people who still know it?

The reason I remember it is because I accidentally deleted my home directory instead of running the cobol compiler ;-) - its my favorite "beware ye story!" I tell to new students. The compiler was called "rmcobol" and had a "-r" flag... so I typed "rm cobol -r *" (or something similar - accidentally inserting a space in compiler name) and the rm (unix delete) command worked and deleted my entire current directory and all sub-directories (which happen to be the home dir). I still remember pressing return, being prompted and just saying 'yes' ...and then instantly realizing "oh shhhhhhhhhh!t'. Fortunately the sys admin was very kind and we did daily backups, so I only lost that day's work. This was before cloud solutions and unix was pretty light on the hand-holding.

Maybe this is why I loathe cobol.
 
Sometimes, I have the impression that the Rust compiler hates me more than all the mobs in Elden Ring. And there's no I-frames in Rust...

Anyway, that led me to an interesting realization. I needed a simple tree structure to store data for a lexer generator (tool to build a compiler). In any normal language, you'd store the data in each node, along with pointers to the children. But mixing pointers and mutability is complicated in Rust, so I tried another approach and stored all the nodes in a vector (their size increases automatically, so it's easy), using indices to reference the children instead of pointers (*). A quick test showed me that there was at least a x2 speedup vs pointers.

It makes sense, since the locations are contiguous: there's a cache effect that doesn't work well with pointers. If the data are shuffled enough so that successive nodes are far apart in the array, the performance advantage disappears, though it's hard to compare both approaches in that case, since I can't control where nodes are stored in memory with the pointer solution.

(*) I don't need to delete nodes. There are a few tricks if you need to do that with this approach, so it would still be fine.
 
About the need for more safety in C++ and the complexity of changing existing solutions:


A lot of the so-called ‘safe’ languages outsource all the low-level stuff to C or C++


"Thou shalt learn to code" (CodeProject).

pibbuR who prefers the Holy C++.
 
Last edited:
Some (interesting?) projects found on CodeProject:

using Python;

using C;


pibbuR who may or may not try the second one.
 

Anyone here having experience with it?

select * from watchers w where w.id='pibbuR'
Some. It's a light database library that is usually good for small applications that don't need intensive queries.

Unlike MySQL, Maria, and other server-based database engines, it's a complete library and not only the client side. So you have to provide the engine with the application, and no other program can access the database file at the same time, which is the main limitation. It can work in a multithread application, however.

It's the default engine for Android apps. Google also provides an API for their own cloud database, so it's usual for professional applications to use both the API (for cloud storage) and SQLite (to cache all or some of the data locally for quick access and in case of network failure), and abstract both of them in an additional layer, called 'repository'.
 
I am using SQLite in my game engine, it is a really nice way to provide a local in memory database, that can be very quickly saved to disk as well if needed.
 
g9x0qh869owb1.jpg


pibbuR who has one question:; Where's the fun in that?