Very few other languages support direct C++ interop.
I think we should not advertize C++ interop. too loud.
C++ with its classes and template is really hard. Can Nim use C++ libs like Boost, CGAL, Qt out of the box? I dont think so, and I think onl C++ itself can use these libs unrestricted. (Some years ago I had to call CGAL and Boost functions from Ruby -- well it is possible using plain C interfaces and fixed template parameters, but it is not easy and very restricted.)
C++ with its classes and template is really hard. Can Nim use C++ libs like Boost, CGAL, Qt out of the box?
I'm pretty sure it can.
We have wrapped a header-only C++ template-only bigint library: https://github.com/status-im/nim-ttmath.
More benefits of the macro system:
i.e. I think Nim is the best language to provide custom focused DSL.
Beyond the macro system, I'm not aware of any other languages with the complete package of:
which allows enforcing several constraints at compile-time.
In terms of breadth, Nim allows getting as close-to-metal as C when needed but as high-level as Python in case where tight control over OS resources (memory, file descriptor, sockets, ...) is not needed. The fact that the GC is tunable (we can swap implementation between deferred reference counting, mark-and-sweep, boehm) and also decided per type (only ref objects are GC-ed, plain object and ptr object are not) makes Nim very flexible.
Nim macros in particular allow manipulating the syntax tree to write custom DSL's
How about adding a sinatra-like web framework (Jester) as an example of DSL?with things like Electron you can turn this mess into a "desktop" application
Couldn't agree more. It is a mess indeed! I have hard time stomaching the overhead of these frameworks. I am looking at the list of Electron apps on my desktop - Slack, VSCode, GitHub desktop, etc... - every one of them clocks at 150M+ just for the app itself, not accounting for additional tooling.
I know there are a couple of projects that give Nim easy ways to develop desktop UIs
It's a matter of perspective of course, but I probably have a different (perhaps spoiled?) definition of "easy"... I'd love to see a tutorial on how to develop a non-trivial desktop app (i.e. not a tic-tac-toe game) with WxNim or UI, or any other framework. So far I have trouble figuring out very simple tasks in these frameworks, i.e. how to make main window non-resizeable, or placed in the middle of the screen on app startup, or how to define keyboard shortcuts to do cut-and-paste in multiline controls, etc... I don't have technical chops to dig into C code of the underlying binding library to figure out how the whole thing works together. When I build software (usually medium complexity tools for specific business purpose), I prefer to stay at a higher level of abstraction.
Here is a screenshot of a web demo program I did for one of my previous employers:
This little site is written mostly in Nim (Jester) and was built to help sales engineering team demo and sell REST Weather API product, which my tool hits on the backend. The engineer would show the site to the prospect and then walk them through the relevant parts of Nim code that calls the backend API. Since the code looks very clean, much like python, it was very easy for the technical audience to understand, even if they had never seen a line of Nim code before. And "production" deployment was a breeze - git clone, compile new version, stop service, copy one binary, start service - all automated with a single shell script that runs in less than 10 seconds! Take that, Node. The short of it is that Nim was a pleasure to use for such a project. The language core, standard library (os, asyncdispatch, json, strutils, etc) and Jester is where it needs to be in terms of my definition of easy. The desktop is not quite there yet.
@Araq, and everyone who contributed, one more thing - congrats on 1.0! It's a fantastic milestone. You've built something truly amazing here and hoping you opened some champagne to celebrate!
Writing a good GUI framework that can do gpu accelerated rendering and call to native APIs is a huge task
I am out of my depth here, so please help me understand this better. Why do I need to worry about GPU acceleration to render a button or a checkbox in Nim? If a Nim wrapper library is calling let's say a native OS primitive for such interface elements, won't the OS take care of GPU acceleration and such for me. From Nim's perspective, there should be no need to meddle in low level details. Or am I thinking about this wrong?
Just to be clear, I am not talking about creating a crazy complex interface here. It's more along the lines of something similar to this:
And probably more that I missed (my apologies!). I guess settling for a "standard" solution would be nice, but how to do that without offending anybody... :-)