Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Do you still work on GI for Nim? #2

Open
StefanSalewski opened this issue May 11, 2017 · 3 comments
Open

Do you still work on GI for Nim? #2

StefanSalewski opened this issue May 11, 2017 · 3 comments

Comments

@StefanSalewski
Copy link

Well, github indicates some activity again, after a long break...

Indeed I was nearly sure that you lost interest in GTK3, maybe even in Nim.

You know my c2nim bindings for GTK 3,20. Early this year I started with GI myself -- that was the time I looked at your project -- was never able to compile it, and understanding your code was not that easy.

So I started from scratch -- first goal was understanding GI at all and generating low level bindings similar to c2nim. Result was

https://github.com/StefanSalewski/nim-gi

Last weekend I started working on it again. Have already done some fixes, and renamed all the low level types with a 00 postfix for now, so that the clean symbols like "Button" are available for the high level data types. My main inspiration for high level is Araqs LibUI, but that seems to be tiny. And his approach with two modules, a low level one and a high level one does not work well for GTK3. Unfortunately no one is really interested in GTK3 -- so I hesitate to ask questions in Nim Forum or IRC. For GTK people situation is not better -- GI is nearly unmaintained, I noticed many bugs, and finally found the GI buglist with hundreds of entries.

Well, you did great work with GI already, I will look at it again. When it should compile again it is much easier to inspect -- I have my own editor with good nimsuggest support:
https://github.com/ngtk3/NEd

@jdmansour
Copy link
Owner

jdmansour commented May 15, 2017 via email

@StefanSalewski
Copy link
Author

PS: Your name sounds German, is that right?

Yes, and I have some background in physics too, see ssalewski.de :-)

With the converters that is a known problem, Araq do not like converters too much at all. Currently I do not know if we really need many converters for GTK3. My initially idea was indeed using a lot of converters, but then Araq suggested the idea of delegates, which he has dropped again. Time is of course a problem for me also, and motivation is not that great, because I don't think that many people will ever use the high level Nim GTK bindings. But the gobject introspection worked really not bad, and the high level interface stuff is a good playground to learn more about Nim's macros. So I think I will continue the project. I know that you have already real high level callback support working, that is really nice. I still have to think about that a bit, and I still have to read some more about the goobject side, i.e. the toggle references as described in https://mail.gnome.org/archives/gtk-devel-list/2005-April/msg00095.html

Best regards,

Stefan Salewski

@StefanSalewski
Copy link
Author

My high level Nim bindings are now online:

https://github.com/StefanSalewski/gintro

The first tests seems to work well, and I wrote a very basic tutorial in the github README. I was able to fully avoid converters, but to provide type safe signal connect too. Of course there is still much testing and improving necessary.

Repository owner deleted a comment from uday7981 Feb 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants