I am creating a chess interface client for the Internet Chess Club server hosted on Ubuntu Linux using the Nim ecosystem.
Since I'm new to Nim, I'd like feedback on what libraries to use for my requirements. These are the requirements:
1- TCP/IP client connection to server
2- No GC being used during code development
3- Main app window contains multiple windows and widgets (e.g. consoles, popups, scrolling data, graphs, tabbed windows,, treeviews)
4- One of the windows contained within the main app window will have a 2D chess board with chess pieces that can be dragged and dropped with sprite movement.
What should I use to accomplish this?
I don't think you understand what "real-time responses ... across the internet" means. The timing of a chess interface is measured by human perception, which is a much longer time than what real-time systems require.
What is the maximum delay that your system can tolerate, and what do you think is the maximum delay that GC could cause in your program? Your requirement should be in terms of those.
P.S.
"I need real-time responses when playing chess across the internet"
Since this is a chess client that displays moves received via the internet, it's hard to see how you "need" such a thing, since the user won't be able to discern whether a delay is caused by the GC or by network traffic (assuming that GC delays in a chess client are discernible at all, which I doubt). And in any case, if you force garbage collection immediately after a received move is displayed, then all the time collecting will occur while the user's brain is detecting and processing the freshly displayed move, which takes much much longer than the garbage collection.
"and on another project I need the same response for robotics work"
Well, Araq might have responded differently if you had said you're building a robot, rather than an internet chess client. (And again you said "during development", and that may be what he found bizarre.)
Finally, you may want to watch this video: https://www.youtube.com/watch?v=aUJcYTnPWCg
When one minute chess is played, one minute for both sides to complete a game or lose on time, it is imperative that the GC not pause the app; so yeah, real-time; same with robotics so a biped will not fall due to GC.
I am definitely not expert, but I did see that manual handling of memory allocation does require one to code differently than when using a GC. Why the beef here?!; hence, "during development" is a valid statement unless you can prove that my statement is false; which I would gladly accept.
Not withstanding the "real-time" and "during development" issues, I appreciate your pointers on Nim; sure I can look at all the libs, but this is why I'm asking those that may already have experience on what these libs truly offer. Maybe I'm asking too much?!
When one minute chess is played, one minute for both sides to complete a game or lose on time, it is imperative that the GC not pause the app
You might want to read what I wrote. GC would only pause, for miniscule amount of time, while the human is reacting to the new move on the board, so this pause is completely free. This is a fact, whether you grasp it or not.
I don't know "Internet Chess Club server" but I guess you have to speak its network protocol. So either find and wrap a client already build or build it yourself via nims asyncnet module.
For the gui part I would tackle this with a combination of gtk (gintro module) which displays the advanced gui stuff and a gl context where I would use sfml to render the chess board with its sprites. I've never combined gtk and sfml in nim though, but this is the way I would go.
Real-time for an internet application? I'm as skeptical as @jibal. Stop treating the GC as some big baddie and just write your app. It's far more likely you'll get bored of your project than run into any performance problems related to the GC.
For completeness, regarding your questions:
I supposed that you are concerned about Blitz and sudden death when times run out.
Chess is nowhere near requiring real-time like audio work (a desync is immediately heard) or high-frequency trading and Nim is being used for those.
Actually for audio you might want to watch the NimConf video where someone asked the exact same question: https://www.youtube.com/watch?v=ruT7sbs5O-Q&list=PLxLdEZg8DRwTIEzUpfaIcBqhsj09mLWHx&index=7&t=0s The gist is that they do use the GC, but only when starting a context for a single pool allocation and then that is reused multiple times across the context lifetime, and then collected at the context end.