Page 1 of 2

Irrlicht and the D Programming Language

Posted: Mon Jun 30, 2008 7:12 am
by revcompgeek
I recently started using the D programming language and I think it is awsome. I was looking to use Irrlicht for one of my projects and was looking for some help figuring out how to use it with D. I noticed that Irrlicht is compiled into a shared library, and there is a working project called Derelict that allows you to link to these shared libraries at runtime. Unfortunately this will only work on raw C functions, not C++ classes IIRC. Is there a working C wrapper somewhere or is there some better way to use Irrlicht with D?

Re: Irrlicht and the D Programming Language

Posted: Mon Jun 30, 2008 8:32 am
by rogerborg
revcompgeek wrote:I recently started using the D programming language and I think it is awsome.
It's a really neat toy language.

revcompgeek wrote:I was looking to use Irrlicht for one of my projects and was looking for some help figuring out how to use it with D. I noticed that Irrlicht is compiled into a shared library, and there is a working project called Derelict that allows you to link to these shared libraries at runtime. Unfortunately this will only work on raw C functions, not C++ classes IIRC.
Correct. D explicitly does not link with C++ libraries.

revcompgeek wrote:Is there a working C wrapper somewhere or is there some better way to use Irrlicht with D?
I'm not aware of a C wrapper, nor can I see much interest in one since D is only use for it that I can think of.

C# has many of the advantages of D, and one huge advantage: people will pay you to write things in C#.

There is an Irrlicht C# wrapper. Have you considered that instead?

Posted: Tue Jul 01, 2008 7:58 am
by The Onslaught
Yep D is a good languaje, I made a research about this languaje when it was in its early days and I was impressed.

But It seems that Microsoft is working on a language with similar characteristics, I think it is called C Omega

Posted: Tue Jul 01, 2008 8:29 am
by torleif
The Onslaught wrote:Yep D is a good languaje, I made a research about this languaje when it was in its early days and I was impressed.

But It seems that Microsoft is working on a language with similar characteristics, I think it is called C Omega
lol, nice troll

It's best to stick to industry languages, like C++ and java. I personally don't like C#, simply because of the fact it can't run on other OSs. Imagine writing a server for a game, and finding it won't run on your dedicated servers.

I wrote a game with a team of 5 for a game programming paper a while back, and C# is a great RAD. Writing in C# feels like scripting, as it really took away what makes it tick, and customizing it is like pulling teeth.

Posted: Tue Jul 01, 2008 9:11 am
by rogerborg
torleif wrote:I personally don't like C#, simply because of the fact it can't run on other OSs.
What-evah.

Posted: Tue Jul 01, 2008 9:17 am
by BlindSide
Yeah mono is great, it can even directly run the exe files generated by Visual Studio C# 2005 Express Edition, I use Mono for my server apps and so far it's been going good even when using the Microsoft generated executables.

While we're on the topic of completely pointless language bindings, how about Irrlicht for ActionScript 3? :D

Posted: Tue Jul 01, 2008 12:00 pm
by CuteAlien
I see no way yet to do that. But as there exist some other wrappers to languages like python, maybe it's worth checking out how those guys did that.

Admittably I'm also very much interested in switching to the D programming language. It's like - nearly every time I swear on some c++ shortcomings I find out it's done perfectly in D (and please don't bore me with C# guys, I'm programming the real machines here and not some virtual thingy which barely works on half the platforms).

Two things keeping me back - the language is still very much in development and so the tools have still some rather rough corners. And Irrlicht not yet working with D. I'm even regularly thinking about porting it myself, but I just can't see yet how I will find time for that beside my usual projects (also I'm unfortunately a lot more interested in using a 3D-engine than in programming my own).

Still D is luring me so much that if anyone seriously starts thinking about porting Irrlicht I will at least volunteer as tester
and maybe more. Btw. - I remember reading once that Niko also had some interest in D ...

Posted: Tue Jul 01, 2008 5:11 pm
by rogerborg
CuteAlien wrote:Admittably I'm also very much interested in switching to the D programming language. It's like - nearly every time I swear on some c++ shortcomings I find out it's done perfectly in D (and please don't bore me with C# guys, I'm programming the real machines here and not some virtual thingy which barely works on half the platforms).
Image

There we are having a nice polite conversation and you have to bring the hate. Oh snap. How much are D programmers commanding these days, you filthy hippy? :P

CuteAlien wrote:Two things keeping me back - the language is still very much in development
It seems to have been very much in development for quite some time.

CuteAlien wrote:Still D is luring me so much that if anyone seriously starts thinking about porting Irrlicht I will at least volunteer as tester and maybe more. Btw. - I remember reading once that Niko also had some interest in D ...
Don't get me wrong, I like D in principle, but it's only a casual interest. The thought of porting and maintaining a D port is way more investment than I'm prepared to make, when so few devs will be seriously interested in using it. A C wrapper (to allow Irrlicht to be used from a D app) would be far less work, both up front and in maintenance.

Posted: Tue Jul 01, 2008 5:14 pm
by Dorth
errr... I do not use nor have more than a remote interest in D... but anyone cared to go look at the dev page? The 2.0 compiler already supports partially linking with c++ and he plans to further that in the future...

Posted: Tue Jul 01, 2008 5:42 pm
by rogerborg
Hurrah, they've (partially) acknowledged the existence of the 1980s! How far in "the future" are we talking, because I have a hot tip about the end of the world in... well... let's say that we won't have to worry about the oil running out. There will be robots, and there will be probing. I'd hate to commit to D just as the stark unlubricated steel fingers start their chilly caressing.

Posted: Tue Jul 01, 2008 5:48 pm
by CuteAlien
rogerborg wrote: There we are having a nice polite conversation and you have to bring the hate.
Aw... come on - C++, C# and D in the room - that's already a small scale war in it's own right!
rogerborg wrote:
CuteAlien wrote:Two things keeping me back - the language is still very much in development
It seems to have been very much in development for quite some time.
Yeah, a long development, but 1.0 was only released last year. That's barely enough time for a serious project.
rogerborg wrote: Don't get me wrong, I like D in principle, but it's only a casual interest. The thought of porting and maintaining a D port is way more investment than I'm prepared to make, when so few devs will be seriously interested in using it.
I certainly realize that and I'm also rather careful before really investing time in a language which is somewhat less mainstream (I did write several projects in Delphi just a few years ago... lost live time). The problem is - the more I invest in my c++ codebase, the harder it will be to switch. And I'm already nearly sure that this isn't the language I still want to do in yet another 10-15 years (that's about how long I work already with it). And D fixes so many things that bother me in C++ while most of the problems it still has look rather like childhood problems which a new language always will have. But well, I probably won't do a D port as I would have to care about an 3D engine afterward and it would probably look ugly anyway as it would be written by such a D newbie.

But if anyone ports it I will most likely use it at least for smaller test-projects. I'm just curious enough to invest that time.
rogerborg wrote: A C wrapper (to allow Irrlicht to be used from a D app) would be far less work, both up front and in maintenance.
Maybe, that's why I proposed taking a look at how the other wrappers do handle that - they should have basically the same problem and seem to have it solved in some way.

Posted: Sat Feb 07, 2009 11:52 am
by cyberwan
(7 Months later ...)
Finally, has something been done in that way ? I'm very interested in the D language, but as long as there are no interesting libraries to be used with it, it is not usable.

Posted: Sat Feb 07, 2009 3:34 pm
by CuteAlien
I don't think so. I even lost some of the urge to leave c++ when I discovered the black template magic of boost.

Posted: Sun Feb 08, 2009 10:24 am
by cyberwan
CuteAlien wrote:I even lost some of the urge to leave c++ when I discovered the black template magic of boost.
Did you try Qt ? It really powers C++ up, I really feel it's easier to code Qt/C++ than C# ..

Posted: Sun Feb 08, 2009 10:52 am
by CuteAlien
I didn't use Qt so far because of it's GPL license (and I couldn't afford the proprietary one). Now that they are switching to LGPL with the next version I will probably give it another chance when I have a small project where it could be useful.