Hi,
I'd like to code a cross platform GUI app (at least Windows/Linux) to do an advanced plotting system of data which are in sqlite databases.
I had a look at the list of available GUI packages for nim. I have tested the ones that seems the most mature for the type of work required. It was a bit confusing, I tried ui, nimx, Imgui, IUP. Some of them not working just out of the box, even when doing step by step as told on web pages. It is quite sad, nim is a great language but the cross platform dream move away when trying to do GUI stuff. IMHO, there is a huge gap to do this kind of cross platform app apart from java (bad looking) and C++/Qt (not free for commercial). It could be a real game changer if there was some mature Nim GUI package easy to use and well documented to create good looking (enough for commercial apps) cross platform GUI apps.
The only GUI package that could do for me seems to be IUP, which is mature enough and good looking on both system. I didn't find any plotting package good enough for what I want to do, so may be I will try to do some wrapper to use C libs.
It is for my work, I will give it a try, but if it take too much time, I will be forced to go back to C++ (I don't like java), and my team at work is C++, so difficult to convince my team without strong arguments.
By the way, IUP is wrapped to 3.0 version, is there somewhere how to use the last 3.30 version, or at least some doc how to do the wrapper (I've read the c2nim docs but my tests where not working)?
may be https://goran.krampe.se/2014/10/16/nim-wrapping-c/ or https://blog.johnnovak.net/2018/07/07/creating-a-nim-wrapper-for-fmod/ could help!
Any suggestion to help me please?
Thanks, hope Nim will grow and become widespread.
You might want to check out wxNim which wraps WxWidgets and adds some nice macro magic on top.
For wrapping IUP I would recommend trying out Futhark
My old project, something similar to Python Notebooks couple screenshots, charts, data table and video. In these examples calculations were made with Nim integrated with UI made with Electron, Svelte and Vega. Currently project is down, the server hosting went off, and project went off with it :). Going to resurrect it and open the sources, in next 3/6 months if have free time.
I would go with Web UI, possibly with Electron. The C/Java/MacOS etc. specific GUI and bindings, I just don't see any value in using it compared to web ui that's simple, standard, universal, and works everywhere.
what more do you want?
Not to use webui.
IMHO, there is a huge gap to do this kind of cross platform app apart from java (bad looking) and C++/Qt (not free for commercial).
To be fair, it's the same across all languages.
Nobody has yet cited NiGui, which, for me, is the easiest interface and supports both Windows and Linux. I don't know how support for macOS is going. However, it leaves something to be desired in some respects.
UIng I considered using it until I found out that for Windows it will load the C++ runtime (libstdc++) and I was discouraged. To link with WinAPI you don't need to have C++. Sad.
wNim, unfortunately, although very complete, is only Windows.
nimx lacks proper documentation.
I even considered using Raylib (raygui), but I never tested it.
It has a built in designer, gpu support. ~5 seconds comp times for native Nim. Instant rebuild time for NimScript. Full bindings for both. Plus recently added automatic bindings for native Nim in NimScript (when you compile you can use right away those types in NimScript). Among many more features and more to come :-) If you are curious about it look for UMG (unreal motion graphics). Plus final app is probably way smaller than an electron aberration
Just FYI.
I've made ImGui example for showing and input my local country language with UTF-8 strings. Github page is here
My private app demo at this moment. (Sorry you could'nt read the strings of labels :-)
nim cpp -r controlgallery.nim but the compiler exits with this wxnim-master/wxnim/private/object.nim(37, 78) Error: invalid indentation
I tried to edit the code, re-enter the indentation as tab (not allowed) and as spaces (2 or 3), nothing works. I think I am missing something about nim syntax.
It might be that the "tabs" are inserted in every possible white/empty space. I've had that happen a lot back when i wrote my scripts in OneNote and copy pasted into VS Code, and from other code from websites.
There might be a whitespace/tab view/highlight setting or an extension for VS Code or others.
It's not an error in your code. There has been a very recent commit to the repo, most likely initiated by your comment:
Fix various minor things that stopped compilation
This tries to address a couple issues with compiling for 2.0.0. Unfortunately the "implicitDeref" experimental is now gone, which means that even with these changes it doesn't compile under Nim 2.0.0 (at least not the genui controlgallery demo). This will need some internal changes to make things work again.
You can still try it with nim 1.6 .
Hello.
In a later thread I already mentioned how important it is for Nim to have a GUI system that defines the language, cross-platform (like Lazarus, for example). It is a pity that I have to explain this kind of loopholes and their consequences to a group of companies that I have been advising for a short time and that have a lot of software coded with Nim.
Best regards. Antonio F.S.
There are multiple GUI library available, just pick one : https://github.com/ringabout/awesome-nim?tab=readme-ov-file#crossplatform.
There's also https://github.com/treeform/fidget and QML bindings https://github.com/status-im/nimqml
You can also create web-based GUI quite easily with Nim .
Hello.
Thank you.
However, I think there is a lot that could be learned from Gambas ( https://es.wikipedia.org/wiki/Gambas ).