My first adventure in D-Land
Yesterday (or rather, like 10 hours ago?) I posted about my quest for a specific language, and mentioned one of the candidates, called D which I had found appealing.
Well, because I am a quick coder (not good, but quick) I decided, after looking around for about 5 minutes, to take as my first project giving the D community a UI toolkit.
My first choice would have been Qt, of course, but D doesn't interface well (or at all) with C++, and I was not about to hack a QtC binding, because it would be unusable.
So, I looked around the web for a small multiplatform C toolkit, and I found there are very few of those left!
You have Gtk+ and ... well, almost nothing else! I found IUP though, and decided to bind it.
Since binding C libs to D is quite simple, I did it mostly by hand. And 76 files and 8872 lines of code later, here is DIUP, a D binding for IUP.
Now, how do you use it?
Get IUP, then get DC, then get D, then get DIUP, then open it, and check the examples.
The binding modules themselves are in the binding folder, so you can compile examples like this:
[ralsina@monty iupbinding]$ cd examples/elem/iupbutton/ [ralsina@monty iupbutton]$ dmd -g -I../../../binding/ iupbutton.d -L-liup -L-liupcontrols -L-L/usr/lib/iup -L-lcdiup ; gcc iupbutton.o -o iupbutton -g -lphobos -lpthread -lm -Xlinker -liup -Xlinker -liupcontrols -Xlinker -L/usr/lib/iup -Xlinker -lcdiup [ralsina@monty iupbutton]$ ls -lh iupbutton -rwxrwxr-x 1 ralsina ralsina 217K Apr 18 02:30 iupbutton
You will probably be linking a few libs too many, but don't worry yet.
The good news:
IUP works on windows and Unix.
IUP is an order of magnitude smaller than WxWidgets.
Most of it seems to be working.
The bad news:
IUP looks ugly because it's motif on unix.
IUP is pretty limited.
Someday, when I have a free afternoon, I could write a Qt backend for IUP and avoid the suckage plus porting it to OSX in the process, but...
IUP is damn hard to build. Luckily they have binaries.
Mandatory screenshot!
So, enjoy and comment!
Reading Stewart Gordons post, I just have to say that I don't deem his choice of words and phrasing bad manners - your update nevertheless is a good example thereof. If stewart is right, and you did multi-post without cross-posting, the right thing to do would be to remain silent and do better next time - and be thankful that he set your usenet manners straight without being impolite or abusive.
Maybe you had a bad day though - relax, calm down and get over it.
Kind regards, and thanks for all your work on kde!
I multiposted. To two newsgroups.
The number of extra posts generated by that was exactly the same as the number generated by Stewart Gordon's twitiness about my multiposting.
I am a cranky guy. I don't give a damn.