digitalmars.D.announce - Call D code from C#
- anthony (15/15) Jan 09 2014 Hi to all here,
- anthony (2/2) Jan 09 2014 Oopss...I think I posted on the wrong section of the forum and I
- John Colvin (7/23) Jan 09 2014 C# should be able to call any D functions declared with extern(C)
- anthony (3/3) Jan 09 2014 Thanks for the (ultra fast) reply!
- evilrat (4/7) Jan 09 2014 why unfortunately? using this in visual studio allows me debug
- bearophile (4/7) Jan 09 2014 Is QtD not good enough?
- anthonyb (2/2) Jan 09 2014 QtD does not seem to be actively developed and i want something
- Adam D. Ruppe (3/4) Jan 09 2014 When I tried it, a while ago, it was completely unusable - random
- anthonyb (5/9) Jan 09 2014 Which i a real shame...If D was able to access a UI like Qt, it
- tc (37/41) Jan 09 2014 I'm from C# world and this is exactly what will make a huge
- Rikki Cattermole (12/61) Jan 09 2014 I would be interested to know what you think about my web service
- Rory McGuire (3/10) Jan 10 2014 gtk has a web based backend available.
- Rikki Cattermole (2/3) Jan 10 2014 Awesome didn't know that thanks!
- Jacob Carlborg (4/9) Jan 09 2014 Have a look at DWT: https://github.com/d-widget-toolkit/dwt
- TC (15/16) Jan 10 2014 I looked at it and on the first sight it seems as a wrapper
- anthonyb (3/6) Jan 11 2014 C++ remains the best tool for that job (Qt 5.x). And
- Paulo Pinto (7/13) Jan 11 2014 It will, but not in the direction most people would like.
- Xavier Bigand (13/27) Jan 11 2014 I work every day on an application written in C++ with Qt and QML. The
- Paulo Pinto (8/38) Jan 11 2014 Thanks for sharing the information. At work I do mostly JVM/.NET stuff.
- Jacob Carlborg (12/26) Jan 11 2014 It's quite a lot more than a wrapper. It's its own GUI toolkit. But yes,...
- Jim Hewes (18/28) Jan 12 2014 I agree UI is an issue. It's kind of a showstopper for me. If I were
- MGW (2/2) Jan 17 2014 I'm testing with the ability to connect to Qt
- Radu (4/20) Jan 09 2014 You can expose D code as COM objects and use them from C# this
- anthonyb (1/4) Jan 09 2014
- Jacob Carlborg (4/7) Jan 09 2014 Have a look at DWT: https://github.com/d-widget-toolkit/dwt
- Dejan Lekic (6/22) Jan 09 2014 May I ask why is GtkD not an option? Do not get me wrong, I am
Hi to all here, (another one here that wants to desperately use D in his work environment!) UI libraries. I discovered VisualD and I settled on using it, it is really awesome! The only problem that concerns me is the lack of a UI library to use with the language. GTK+ is not an option for me. Qt is but I do not see any way to use it from D. I am thinking about using D for the business logic of my programs follow, some hint... ? Thanks a lot for any help ! anthony
Jan 09 2014
Oopss...I think I posted on the wrong section of the forum and I do not see a way to put it on the correct one... :(
Jan 09 2014
On Thursday, 9 January 2014 at 15:58:20 UTC, anthony wrote:Hi to all here, (another one here that wants to desperately use D in his work environment!) UI libraries. I discovered VisualD and I settled on using it, it is really awesome! The only problem that concerns me is the lack of a UI library to use with the language. GTK+ is not an option for me. Qt is but I do not see any way to use it from D. I am thinking about using D for the business logic of my UI stuff. follow, some hint... ? Thanks a lot for any help ! anthonyPInvoke tool just like you would for C. Be aware that you will need to initialise the D runtime (core.runtime.rt_init). Also, loading multiple shared libs / dlls will cause pain.
Jan 09 2014
Thanks for the (ultra fast) reply! I has that coming that P/Invoke is the only way, unfortunately. Are you aware of any other problems using this technique ?
Jan 09 2014
On Thursday, 9 January 2014 at 16:09:11 UTC, anthony wrote:Thanks for the (ultra fast) reply! I has that coming that P/Invoke is the only way, unfortunately. Are you aware of any other problems using this technique ?why unfortunately? using this in visual studio allows me debug complex than testing stuff though.
Jan 09 2014
anthony:The only problem that concerns me is the lack of a UI library to use with the language. GTK+ is not an option for me. Qt is but I do not see any way to use it from D.Is QtD not good enough? Bye, bearophile
Jan 09 2014
QtD does not seem to be actively developed and i want something that is somewhat "future safe", if you can say that about our job!
Jan 09 2014
On Thursday, 9 January 2014 at 16:15:23 UTC, bearophile wrote:Is QtD not good enough?When I tried it, a while ago, it was completely unusable - random runtime crashes.
Jan 09 2014
On Thursday, 9 January 2014 at 17:56:46 UTC, Adam D. Ruppe wrote:On Thursday, 9 January 2014 at 16:15:23 UTC, bearophile wrote:Which i a real shame...If D was able to access a UI like Qt, it would give a tremendous push to the language. Not being able to use easily some UI from D is holding back many people. I think Qt is the only reason some people prefer C++ even now.Is QtD not good enough?When I tried it, a while ago, it was completely unusable - random runtime crashes.
Jan 09 2014
Which i a real shame...If D was able to access a UI like Qt, it would give a tremendous push to the language. Not being able to use easily some UI from D is holding back many people. I think Qt is the only reason some people prefer C++ even now.difference. Have a nice portable language with a nice portable UI toolkit. I would like to learn Qt, but for me C++ is a no go (I'm too much used to GC world simplicity/productivity). I like D, but i think much work is still needed to make it usable by masses. Still newb and learning, but for now what I observed that D is a for many usecases. But I also observed from forum here: - no good UI capability - yes I really consider Qt as a must - not yet supported on arm/android/iOS,WP - why many Raspberry PI hackers are using python?? Would not this be a nice playground for D? - bad performance of GC (everyone arguing about this, specially for games) - small library (as compared to what you can do with standard java, .Net libs, this is just true) So what is actually a target audience of this language? I think that today its perfect for some backends, business layer logic infrastructure. For games? Well for some simple 2D/3D sure, but because of lacking GC its limited. Web development? Vibe.d is nice, but I think we need to have some complete framework to compete with ruby on rails, django for python, etc. Multiplatform UI apps? Without Qt, I'm not convinced. I like a progress the comunity is making (GDC, LDC2, vibe.d, dub, ...). If just there is a better GC, arm and mobile platforms support, decent UI framework as QT is, I think that that will make a huge step for D to be usable for a much wider userbase. I really dont get, why people should write portable UI apps in something like C or C++ if D is around. GC? I don't care about it in UI, it helps to make things implemented fast so for me its a must and performance critical blocks should be handled by backend anyway..
Jan 09 2014
On Thursday, 9 January 2014 at 22:09:14 UTC, tc wrote:I would be interested to know what you think about my web service framework so far[0]. Blog post about why I did it here[1]. I was trying to sort our UI issues with DOOGLE[2]. But the latest talk about a new UI system basically killed my want to work on it altogether. It would have enabled building a GUI app and then very simply building it for a web as well. Without changing much code. Don't think any GUI toolkit exists that can do that. [0] https://github.com/rikkimax/Cmsed [1] http://alphaglosined.blogspot.com/2014/01/creating-competing-web-service.html [2] https://github.com/rikkimax/DOOGLEWhich i a real shame...If D was able to access a UI like Qt, it would give a tremendous push to the language. Not being able to use easily some UI from D is holding back many people. I think Qt is the only reason some people prefer C++ even now.difference. Have a nice portable language with a nice portable UI toolkit. I would like to learn Qt, but for me C++ is a no go (I'm too much used to GC world simplicity/productivity). I like D, but i think much work is still needed to make it usable by masses. Still newb and learning, but for now what I observed that D is a for many usecases. But I also observed from forum here: - no good UI capability - yes I really consider Qt as a must - not yet supported on arm/android/iOS,WP - why many Raspberry PI hackers are using python?? Would not this be a nice playground for D? - bad performance of GC (everyone arguing about this, specially for games) - small library (as compared to what you can do with standard java, .Net libs, this is just true) So what is actually a target audience of this language? I think that today its perfect for some backends, business layer logic infrastructure. For games? Well for some simple 2D/3D sure, but because of lacking GC its limited. Web development? Vibe.d is nice, but I think we need to have some complete framework to compete with ruby on rails, django for python, etc. Multiplatform UI apps? Without Qt, I'm not convinced. I like a progress the comunity is making (GDC, LDC2, vibe.d, dub, ...). If just there is a better GC, arm and mobile platforms support, decent UI framework as QT is, I think that that will make a huge step for D to be usable for a much wider userbase. I really dont get, why people should write portable UI apps in something like C or C++ if D is around. GC? I don't care about it in UI, it helps to make things implemented fast so for me its a must and performance critical blocks should be handled by backend anyway..
Jan 09 2014
gtk has a web based backend available. On Fri, Jan 10, 2014 at 7:31 AM, Rikki Cattermole <alphaglosined gmail.com>wrote:... It would have enabled building a GUI app and then very simply building it for a web as well. Without changing much code. Don't think any GUI toolkit exists that can do that. [0] https://github.com/rikkimax/Cmsed [1] http://alphaglosined.blogspot.com/2014/01/creating- competing-web-service.html [2] https://github.com/rikkimax/DOOGLE
Jan 10 2014
On Friday, 10 January 2014 at 15:02:18 UTC, Rory McGuire wrote:gtk has a web based backend available.Awesome didn't know that thanks!
Jan 10 2014
On 2014-01-09 23:09, tc wrote:difference. Have a nice portable language with a nice portable UI toolkit. I would like to learn Qt, but for me C++ is a no go (I'm too much used to GC world simplicity/productivity).Have a look at DWT: https://github.com/d-widget-toolkit/dwt -- /Jacob Carlborg
Jan 09 2014
Have a look at DWT: https://github.com/d-widget-toolkit/dwtI looked at it and on the first sight it seems as a wrapper around GTK on linux side and native windows toolkit on windows. In this case I would probably rather use gtkd directly and hope for fewer problems. (but both should be tried and decided after that, DWT seems to be more OOP friendly so easier to use). If I understand it correctly, its backed up with GTK2 on linux? (SWT seems to get GTK3 support in october 2013, but don't know if its already released). My point is, that GTKD, DWT are for sure pretty usable. But they lack modern features and portability and if I will be in position to choose UI framework for multiplatform business app, I will end up with Qt 5.x for sure. It seems that D is advancing to be ARM ready, wouldn't it be nice to be able to write UI apps for Android, iOS, WinRT, whatever in D?
Jan 10 2014
On Friday, 10 January 2014 at 21:50:50 UTC, TC wrote:they lack modern features and portability and if I will be in position to choose UI framework for multiplatform business app, I will end up with Qt 5.x for sure.C++ remains the best tool for that job (Qt 5.x). And unfortunately, i do not have many hopes that it will change soon.
Jan 11 2014
Am 11.01.2014 14:30, schrieb anthonyb:On Friday, 10 January 2014 at 21:50:50 UTC, TC wrote:It will, but not in the direction most people would like. From what I can get from Qt conference videos since version 5 came out, QML is the way to go, with just performance critical parts still done in C++. -- Paulothey lack modern features and portability and if I will be in position to choose UI framework for multiplatform business app, I will end up with Qt 5.x for sure.C++ remains the best tool for that job (Qt 5.x). And unfortunately, i do not have many hopes that it will change soon.
Jan 11 2014
Le 11/01/2014 18:23, Paulo Pinto a écrit :Am 11.01.2014 14:30, schrieb anthonyb:I work every day on an application written in C++ with Qt and QML. The core of the application is written in C++ without Qt and only the GUI is in QML, some additionnal wrappers are necessary to inject data of the core application in QML. We have no performance issues with QML. Saddly for the moment I can't talk more about this application since it was not already released, but it's typically an application where performances are critical. Like with every script languages you need to do things with carefulness and avoid to put application logic in it. It's our experience give us the idea to do something similar in D, cause a lot of things can be better than with Qt and C++.On Friday, 10 January 2014 at 21:50:50 UTC, TC wrote:It will, but not in the direction most people would like. From what I can get from Qt conference videos since version 5 came out, QML is the way to go, with just performance critical parts still done in C++. -- Paulothey lack modern features and portability and if I will be in position to choose UI framework for multiplatform business app, I will end up with Qt 5.x for sure.C++ remains the best tool for that job (Qt 5.x). And unfortunately, i do not have many hopes that it will change soon.
Jan 11 2014
On 11.01.2014 19:33, Xavier Bigand wrote:Le 11/01/2014 18:23, Paulo Pinto a écrit :Thanks for sharing the information. At work I do mostly JVM/.NET stuff. Since 2006 I don't do any C++ at work, except when porting stuff to the former platforms. I just use Qt/C++ occasionally on hobby projects, so it is good to know from someone with experience on them, how the real situation is. -- PauloAm 11.01.2014 14:30, schrieb anthonyb:I work every day on an application written in C++ with Qt and QML. The core of the application is written in C++ without Qt and only the GUI is in QML, some additionnal wrappers are necessary to inject data of the core application in QML. We have no performance issues with QML. Saddly for the moment I can't talk more about this application since it was not already released, but it's typically an application where performances are critical. Like with every script languages you need to do things with carefulness and avoid to put application logic in it. It's our experience give us the idea to do something similar in D, cause a lot of things can be better than with Qt and C++.On Friday, 10 January 2014 at 21:50:50 UTC, TC wrote:It will, but not in the direction most people would like. From what I can get from Qt conference videos since version 5 came out, QML is the way to go, with just performance critical parts still done in C++. -- Paulothey lack modern features and portability and if I will be in position to choose UI framework for multiplatform business app, I will end up with Qt 5.x for sure.C++ remains the best tool for that job (Qt 5.x). And unfortunately, i do not have many hopes that it will change soon.
Jan 11 2014
On 2014-01-10 22:50, TC wrote:I looked at it and on the first sight it seems as a wrapper around GTK on linux side and native windows toolkit on windows. In this case I would probably rather use gtkd directly and hope for fewer problems. (but both should be tried and decided after that, DWT seems to be more OOP friendly so easier to use).It's quite a lot more than a wrapper. It's its own GUI toolkit. But yes, on Linux it uses GTK+.If I understand it correctly, its backed up with GTK2 on linux? (SWT seems to get GTK3 support in october 2013, but don't know if its already released).Yes, it uses GTK+. DWT is quite an old port, 3.4 to be exact.My point is, that GTKD, DWT are for sure pretty usable. But they lack modern features and portability and if I will be in position to choose UI framework for multiplatform business app, I will end up with Qt 5.x for sure.What do you mean lack portability? I'm currently working on the Mac OS X port.It seems that D is advancing to be ARM ready, wouldn't it be nice to be able to write UI apps for Android, iOS, WinRT, whatever in D?Yeah, of course. The advantage of DWT is that is uses the native toolkit on each platform (Linux doesn't really have one). No additional libraries are required except for the system libraries. -- /Jacob Carlborg
Jan 11 2014
On 1/9/2014 10:38 AM, anthonyb wrote:On Thursday, 9 January 2014 at 17:56:46 UTC, Adam D. Ruppe wrote:I agree UI is an issue. It's kind of a showstopper for me. If I were writing programs for other programmers it wouldn't matter as much, but I write them for normal people and so it has to have a GUI. I realize the first priority is having a standard library, but UI is right up there. I always run into two problems with volunteer open source projects. One, it was probably abandoned some years ago because the developers lost interest and it no longer works. Two, you have to first install the developer's three or four favorite tools before you can build it, some of which may have their own dependencies. Coming from the Windows side this is annoying. I'd prefer to use wxWidgets. Not long ago I spent a day trying to get it to work by just pulling the code into a Visual Studio project (with Visual D) and fixing compilation errors. I got the sample program to run which was encouraging, but it crashed after exit in what looked like the GC so I gave up for now. JimOn Thursday, 9 January 2014 at 16:15:23 UTC, bearophile wrote:Which i a real shame...If D was able to access a UI like Qt, it would give a tremendous push to the language. Not being able to use easily some UI from D is holding back many people. I think Qt is the only reason some people prefer C++ even now.Is QtD not good enough?When I tried it, a while ago, it was completely unusable - random runtime crashes.
Jan 12 2014
I'm testing with the ability to connect to Qt https://github.com/MGWL/QtE-Qt_for_Dlang_and_Forth
Jan 17 2014
On Thursday, 9 January 2014 at 15:58:20 UTC, anthony wrote:Hi to all here, (another one here that wants to desperately use D in his work environment!) UI libraries. I discovered VisualD and I settled on using it, it is really awesome! The only problem that concerns me is the lack of a UI library to use with the language. GTK+ is not an option for me. Qt is but I do not see any way to use it from D. I am thinking about using D for the business logic of my UI stuff. follow, some hint... ? Thanks a lot for any help ! anthonyway. http://dlang.org/dll.html#com
Jan 09 2014
Hhmm...It sounds interesting! Looking at it right now... Thanks!way. http://dlang.org/dll.html#com
Jan 09 2014
On 2014-01-09 16:58, anthony wrote:The only problem that concerns me is the lack of a UI library to use with the language. GTK+ is not an option for me. Qt is but I do not see any way to use it from D.Have a look at DWT: https://github.com/d-widget-toolkit/dwt -- /Jacob Carlborg
Jan 09 2014
On Thursday, 9 January 2014 at 15:58:20 UTC, anthony wrote:Hi to all here, (another one here that wants to desperately use D in his work environment!) UI libraries. I discovered VisualD and I settled on using it, it is really awesome! The only problem that concerns me is the lack of a UI library to use with the language. GTK+ is not an option for me. Qt is but I do not see any way to use it from D. I am thinking about using D for the business logic of my UI stuff. follow, some hint... ? Thanks a lot for any help ! anthonyMay I ask why is GtkD not an option? Do not get me wrong, I am not a GTK advocate, I am myself a FLTK user/developer. However, GTK would probably be my second choice after FLTK, if I ever had to chose another GUI toolkit for my C++ projects.
Jan 09 2014
May I ask why is GtkD not an option? Do not get me wrong, I am not a GTK advocate, I am myself a FLTK user/developer. However, GTK would probably be my second choice after FLTK, if I ever had to chose another GUI toolkit for my C++ projects.Look at this comparison: http://bit.ly/KFbLbs In short, QT has much more to offer and was built with OOP in mind. Its more portable. QtQuick. MVC, MVVM patterns. But unfortunatelly much harder to use with D :( Even Ubuntu's Unity is being rewriten to Qt (from GTK). I think that something like SIP (for python) is needed to make the bindings possible and maintainable. Don't know if swig will be enough alone?
Jan 09 2014
Hi Dejan, GTK is not an option for me mainly because I do not like the way programs written with appears on the screen. It is a little...ugly! Qt does a lot better in that field, it also has (QT) better documentation, better tools etc etc. This is why I first looked for Qt binding for D. On Thursday, 9 January 2014 at 21:29:36 UTC, Dejan Lekic wrote:On Thursday, 9 January 2014 at 15:58:20 UTC, anthony wrote:Hi to all here, (another one here that wants to desperately use D in his work environment!) and UI libraries. I discovered VisualD and I settled on using it, it is really awesome! The only problem that concerns me is the lack of a UI library to use with the language. GTK+ is not an option for me. Qt is but I do not see any way to use it from D. I am thinking about using D for the business logic of my UI stuff. follow, some hint... ? Thanks a lot for any help ! anthonyMay I ask why is GtkD not an option? Do not get me wrong, I am not a GTK advocate, I am myself a FLTK user/developer. However, GTK would probably be my second choice after FLTK, if I ever had to chose another GUI toolkit for my C++ projects.
Jan 10 2014
On Friday, 10 January 2014 at 09:54:27 UTC, anthony wrote:Hi Dejan, GTK is not an option for me mainly because I do not like the way programs written with appears on the screen. It is a little...ugly! Qt does a lot better in that field, it also has (QT) better documentation, better tools etc etc. This is why I first looked for Qt binding for D.isn't they actually has same method for building ui visuals? i mean by using CSS-like styles, so it is just style, not the Gtk or Qt itself...
Jan 10 2014
On Friday, 10 January 2014 at 12:55:35 UTC, evilrat wrote:On Friday, 10 January 2014 at 09:54:27 UTC, anthony wrote:Yes and there are styles available to make Qt and GTK apps look relatively uniform.Hi Dejan, GTK is not an option for me mainly because I do not like the way programs written with appears on the screen. It is a little...ugly! Qt does a lot better in that field, it also has (QT) better documentation, better tools etc etc. This is why I first looked for Qt binding for D.isn't they actually has same method for building ui visuals? i mean by using CSS-like styles, so it is just style, not the Gtk or Qt itself...
Jan 10 2014