Irrlicht and the D Programming Language

Discuss about anything related to the Irrlicht Engine, or read announcements about any significant features or usage changes.
revcompgeek
Posts: 1
Joined: Mon Jun 30, 2008 6:54 am

Irrlicht and the D Programming Language

Post 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?
D > C++ > C
rogerborg
Admin
Posts: 3590
Joined: Mon Oct 09, 2006 9:36 am
Location: Scotland - gonnae no slag aff mah Engleesh
Contact:

Re: Irrlicht and the D Programming Language

Post 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?
Please upload candidate patches to the tracker.
Need help now? IRC to #irrlicht on irc.freenode.net
How To Ask Questions The Smart Way
The Onslaught
Posts: 41
Joined: Mon Jan 29, 2007 3:33 pm

Post 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
After reading this sentence you will realize you have wasted 5 seconds of your life
torleif
Posts: 188
Joined: Mon Jun 30, 2008 4:53 am

Post 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.
rogerborg
Admin
Posts: 3590
Joined: Mon Oct 09, 2006 9:36 am
Location: Scotland - gonnae no slag aff mah Engleesh
Contact:

Post by rogerborg »

torleif wrote:I personally don't like C#, simply because of the fact it can't run on other OSs.
What-evah.
Please upload candidate patches to the tracker.
Need help now? IRC to #irrlicht on irc.freenode.net
How To Ask Questions The Smart Way
BlindSide
Admin
Posts: 2821
Joined: Thu Dec 08, 2005 9:09 am
Location: NZ!

Post 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
ShadowMapping for Irrlicht!: Get it here
Need help? Come on the IRC!: #irrlicht on irc://irc.freenode.net
CuteAlien
Admin
Posts: 9687
Joined: Mon Mar 06, 2006 2:25 pm
Location: Tübingen, Germany
Contact:

Post 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 ...
IRC: #irrlicht on irc.libera.chat
Code snippet repository: https://github.com/mzeilfelder/irr-playground-micha
Free racer made with Irrlicht: http://www.irrgheist.com/hcraftsource.htm
rogerborg
Admin
Posts: 3590
Joined: Mon Oct 09, 2006 9:36 am
Location: Scotland - gonnae no slag aff mah Engleesh
Contact:

Post 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.
Please upload candidate patches to the tracker.
Need help now? IRC to #irrlicht on irc.freenode.net
How To Ask Questions The Smart Way
Dorth
Posts: 931
Joined: Sat May 26, 2007 11:03 pm

Post 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...
rogerborg
Admin
Posts: 3590
Joined: Mon Oct 09, 2006 9:36 am
Location: Scotland - gonnae no slag aff mah Engleesh
Contact:

Post 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.
Last edited by rogerborg on Tue Jul 01, 2008 5:48 pm, edited 1 time in total.
Please upload candidate patches to the tracker.
Need help now? IRC to #irrlicht on irc.freenode.net
How To Ask Questions The Smart Way
CuteAlien
Admin
Posts: 9687
Joined: Mon Mar 06, 2006 2:25 pm
Location: Tübingen, Germany
Contact:

Post 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.
IRC: #irrlicht on irc.libera.chat
Code snippet repository: https://github.com/mzeilfelder/irr-playground-micha
Free racer made with Irrlicht: http://www.irrgheist.com/hcraftsource.htm
cyberwan
Posts: 40
Joined: Mon May 14, 2007 12:18 pm
Location: Rennes, France

Post 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.
CuteAlien
Admin
Posts: 9687
Joined: Mon Mar 06, 2006 2:25 pm
Location: Tübingen, Germany
Contact:

Post 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.
IRC: #irrlicht on irc.libera.chat
Code snippet repository: https://github.com/mzeilfelder/irr-playground-micha
Free racer made with Irrlicht: http://www.irrgheist.com/hcraftsource.htm
cyberwan
Posts: 40
Joined: Mon May 14, 2007 12:18 pm
Location: Rennes, France

Post 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# ..
CuteAlien
Admin
Posts: 9687
Joined: Mon Mar 06, 2006 2:25 pm
Location: Tübingen, Germany
Contact:

Post 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.
IRC: #irrlicht on irc.libera.chat
Code snippet repository: https://github.com/mzeilfelder/irr-playground-micha
Free racer made with Irrlicht: http://www.irrgheist.com/hcraftsource.htm
Post Reply