Thread overview
Which compiler/lib to choose?
Nov 16, 2007
Marcel Meyer
Nov 16, 2007
Lars Ivar Igesund
Nov 16, 2007
Kenny B
November 16, 2007
Hi,

I need to write a linux network application (think of it as a proxy, sth.
like squid but specialized) and thought about using D to learn it (/me ==
beginner) while "getting my hands dirty".

The timepressure is not that high but the program needs to perform well (throughput is important, latency shouldn't be the problem) and will still be maintained and developed in a few (whatever that means) years. Soooo...

Is it a good idea to rely on D in this case? If yes, which compiler and lib to choose? D 1.x seems "stable", D 2.x more futureproof. DMD is official, GDC works "out of the box" on my Gentoo box (at least it installs...). Phobos is official too, but Tango looks sooo nice ;-).

I appreciate highly subjective opinions and field reports!

Marcel
November 16, 2007
Marcel Meyer wrote:

> Hi,
> 
> I need to write a linux network application (think of it as a proxy, sth.
> like squid but specialized) and thought about using D to learn it (/me ==
> beginner) while "getting my hands dirty".
> 
> The timepressure is not that high but the program needs to perform well (throughput is important, latency shouldn't be the problem) and will still be maintained and developed in a few (whatever that means) years. Soooo...
> 
> Is it a good idea to rely on D in this case? If yes, which compiler and lib to choose? D 1.x seems "stable", D 2.x more futureproof. DMD is official, GDC works "out of the box" on my Gentoo box (at least it installs...). Phobos is official too, but Tango looks sooo nice ;-).
> 
> I appreciate highly subjective opinions and field reports!
> 
> Marcel

Rely on D? Should be safe enough.

Compiler? Hmm, I'd probably go for GDC on your system.

And of course Tango. Even from an "objective" POV looking at what you want to create. Both networking and other IO throughput (both necessary for a proxy) is very well catered for in Tango, and I'd say the interfaces are near perfect for what you need. We'd certainly be very interested in helping you along, just join us in #d.tango at Freenode :)

-- 
Lars Ivar Igesund
blog at http://larsivi.net
DSource, #d.tango & #D: larsivi
Dancing the Tango
November 16, 2007
Lars Ivar Igesund wrote:
> Marcel Meyer wrote:
> 
>> Hi,
>>
>> I need to write a linux network application (think of it as a proxy, sth.
>> like squid but specialized) and thought about using D to learn it (/me ==
>> beginner) while "getting my hands dirty".
>>
>> The timepressure is not that high but the program needs to perform well (throughput is important, latency shouldn't be the problem) and will still be maintained and developed in a few (whatever that means) years. Soooo...
>>
>> Is it a good idea to rely on D in this case? If yes, which compiler and lib to choose? D 1.x seems "stable", D 2.x more futureproof. DMD is official, GDC works "out of the box" on my Gentoo box (at least it installs...). Phobos is official too, but Tango looks sooo nice ;-).
>>
>> I appreciate highly subjective opinions and field reports!
>>
>> Marcel
> 
> Rely on D? Should be safe enough.
> 
> Compiler? Hmm, I'd probably go for GDC on your system.
> 
> And of course Tango. Even from an "objective" POV looking at what you want to create. Both networking and other IO throughput (both necessary for a proxy) is very well catered for in Tango, and I'd say the interfaces are near perfect for what you need. We'd certainly be very interested in helping you along, just join us in #d.tango at Freenode :)
> 

I wanna echo the reliability.

If you do go with Tango, I'd love to know your experience. I currently use GDC on my gentoo box as well -- btw, it's annoying to have to write "gcc-config 1" every time I wanna use D, but that's ok.

It works very well for me. I also write large network apps on it too current one is 13k lines). One thing I have done, is to use libowfat for my networking needs. I like it a lot. I suppose you could use libevent or the socket stuff that comes with tango instead if you desire (personally I hated the one that comes with phobos). If you want the import for libowfat, lemme know I'll email it to you.

I really recommend GDC over dmd though, because I had struct alignment issues in DMD that I no longer have. Also, I'm using gdc in 64 bit mode too, which is super sexy.

Last thing I wanna say... IMO, one of the best applications to learn from is memcached. It covers very well threading, networking, and memory management.