I have just shipped a version with threading support:
Basically an example of using background threads in Rust, in this case together with the egui user interface. Not much tested, so it might contain errors, and there is much room for improvements.
Yes, I created the Nim version in 2015 when I had started learning Nim. That time the Nim version was not only an exercise for the language for me, but as well for the GTK bindings which I created. In October of last year, I finally decided to learn Rust, and needed again some exercise. So I created first an gtk-rs version, then an egui one without threading, and now this with threading support. Rating the two languages is difficult, and might be unfair from my side. I wrote a Nim beginner book some years ago, but stopped using Nim a year ago. My general conclusion is, that Rust can in most cases replace Nim. Rust might look not that elegant as Nim, but is still much nicer than C++. And it is nice that in the Rust world all just works, and we have so many libraries, tools, documentation, and books. And smart and friendly people in the community. I am currently reading "Programming Rust" of Jim Blandy -- really a good and detailed book. For me the largest disadvantage of Rust is, that Rust is difficult as first languages for children. Most people interested in CS at all start early, maybe with 12 or 14 years, but I would not recommend kids to start with Rust. So they might start with C and Python? I have no real advice. Another point of Rust is, that Rust is not optimal for fast prototyping. In a new, unknown area, I actually might start with Nim, and later port to Rust. But perhaps, after some years, when I have much more experience with Rust, prototyping might get easier and faster.
Jim Blandy's book is one of the best rust books.
It's not an easy language.
It goes a bit overboard with certain things - no globals, integer casting, maligning linked lists...
Not sure what is a best first language to learn programming in. Good to be exposed to several languages - but also good to learn one language really well.
In my 1st term in university they taught us Pascal - not used it since, but recently read Niklaus Wirth's classic (Algorithms + Datastructures = Programs). Holds up pretty well - easy to learn Pascal even if only reason is to follow the book.
Wirth died this year - jan 1st - wonder what he got up to.
In my first year at university, we used Pascal as well. But I used Modula-2, and later Oberon on the Amiga computer. Later I tried for a short period ETH Oberon, the language and OS. But switched to Ruby soon. I think my Pascal/Modula/Oberon history was the reason, why I have used Nim for nine years. In 2014, I intended actually to start learning Rust, but then discovered Nimrod, which was later renamed to just Nim. Nim looks like a modern Pascal version with significant whitespace. For people who never heard of the Nim language, here is a short overview, which I created with GPT-4 a year ago: https://nimprogramming.com/
Great job on integrating threading into your game! Threading in Rust can be tricky but adds a lot of potential for performance boosts. It's normal to encounter some bugs in new features, but it's all part of the learning process. Personally, when I need a break, I often find myself playing spider solitaire online βit's a relaxing way to pass the time and give my mind a break from coding. Have you considered what enhancements you might want to make next? Maybe refining the UI or adding more advanced AI capabilities could be interesting avenues to explore.
Have you considered what enhancements you might want to make next?
Actually, I would like to create a Xilem GUI. Egui, and some of the other mature Rust GUIs are fine, but I think Xilem might offer very good performance, and get very popular soon. Mr. Raph Levien and his coworkers have spent a lot of time on Xilem, and the performance of the Vello drawing tool is great. But I was not yet able to create a chess GUI with Xilem: The calc.rs example does not allow to increase the font size, and for the custom_widget.rs example, I was not able to center the text. So I think I have to wait at least for the end of this year before trying Xilem again.
Another interesting point is to make parts of the engine parallel, e.g. with Rayon. My initial feeling was, that I could make at least the move generation parallel, but it seems that the code segments are to tiny to benefit from spanning more tasks. Parallel chess engines are generally difficult.
For other simple enhancements, I would like to add loading and saving games, setting up positions, add random noise to the position evaluation, allow move suggestions, display the full move-chain for the move which the engine has selected. But all that is not very interesting, I think I will at least wait with that until Xilem is ready.