Thread overview
SDL and a 'proper' forum
Sep 02, 2006
Daniel White
Sep 02, 2006
Derek Parnell
Sep 04, 2006
Daniel White
Sep 04, 2006
mike
Sep 02, 2006
xycos
Sep 02, 2006
Johan Granberg
Sep 02, 2006
MatthiasM
Sep 02, 2006
Kristian
Sep 02, 2006
BCS
September 02, 2006
Hi all,
I'm a relative newbie to C/C++, but I am interested in learning D
because of its supposed merits over the aforementioned.

I am interested to know how easily I can use libraries such as the graphics libraries SDL and GTK/QT.

Rather than an IDE, I would prefer to use my own text editor such as EditPlus to compile. Do I have to worry about things like using a makefile, or don't headers exist in D? It would be nice for an approach where all the info is self-contained in each file, and I can just 'include' other .d files easily in that same file (no headers). However, if so, how does the compiler intelligently know not to recompile already compiled files?

Finally, it would be nice for this site to operate a 'normal' forum like phpBB. You can split the forum into topics, and there can be threads and such. How about it?

Cheers, Daniel
http://www.skytopia.com
September 02, 2006
On Sat, 2 Sep 2006 00:46:23 +0000 (UTC), Daniel White wrote:

> Hi all,
> I'm a relative newbie to C/C++, but I am interested in learning D
> because of its supposed merits over the aforementioned.


Welcome. There is much knowledge here, so feel free to call upon it.

> I am interested to know how easily I can use libraries such as the graphics libraries SDL and GTK/QT.

There are projects around these tools. Check out http://www.dsource.org/

> Rather than an IDE, I would prefer to use my own text editor such as EditPlus to compile.

Me too ;-)

> Do I have to worry about things like using a
> makefile, or don't headers exist in D? It would be nice for an
> approach where all the info is self-contained in each file, and I can
> just 'include' other .d files easily in that same file (no headers).
> However, if so, how does the compiler intelligently know not to
> recompile already compiled files?

The D compiler, as supplied by DigitalMars, does not have this facility. To use DMD, you need to explicitly specify each of the files you need compiling and linking.

However, there is a tool that I'm supporting that does the 'intelligence' aspect. You can check it out at http://www.dsource.org/projects/build for details. But in essence, once you have it you just enter


  build <mainfile>

at the command line prompt.


> Finally, it would be nice for this site to operate a 'normal' forum like phpBB. You can split the forum into topics, and there can be threads and such. How about it?

Your normal is my abnormal ;-) If you use a half-decent newsreader tool it can have 'topics' and 'threads' and many more things that web-based forums seem to lack. In my opinion, phpBB and the like are useful for people who avoid sophistication. ;-)

-- 
Derek Parnell
Melbourne, Australia
"Down with mediocrity!"
September 02, 2006
On Sat, 2 Sep 2006 00:46:23 +0000 (UTC),
Daniel White <twinbee40@skytopia.com> wrote in message
news:edak8v$308$1@digitaldaemon.com

> Hi all,
> I'm a relative newbie to C/C++, but I am interested in learning D
> because of its supposed merits over the aforementioned.
> 
> I am interested to know how easily I can use libraries such as the graphics libraries SDL and GTK/QT.
> 
> Rather than an IDE, I would prefer to use my own text editor such as EditPlus to compile. Do I have to worry about things like using a makefile, or don't headers exist in D? It would be nice for an approach where all the info is self-contained in each file, and I can just 'include' other .d files easily in that same file (no headers). However, if so, how does the compiler intelligently know not to recompile already compiled files?
> 
> Finally, it would be nice for this site to operate a 'normal' forum like phpBB. You can split the forum into topics, and there can be threads and such. How about it?
> 
> Cheers, Daniel
> http://www.skytopia.com

Hello, Daniel. I'm a bit of a newbie myself, but here goes:

1. Check out DerelictSDL: http://www.dsource.org/projects/derelict. I'm not sure about GTK/QT, but you might be able to port over the headers; see http://www.digitalmars.com/d/htomodule.html. Someone else probably already has, though.

2. No, you don't need header files; and you can do without a makefile by using the build utility: http://www.dsource.org/projects/build.

3. You can get a newsreader that collapses everything into a topic.; I'm sure they're availible for Linux.

Good luck,
Best of wishes,
Robert Fraser
September 02, 2006
xycos wrote:
> 1. Check out DerelictSDL: http://www.dsource.org/projects/derelict. I'm not sure about GTK/QT, but you might be able to port over the
> headers; see http://www.digitalmars.com/d/htomodule.html. Someone else
> probably already has, though.

If you don't like the dynamic loading approach of derelict you can find other bindings here http://www.algonet.se/~afb/d/

If you come from the c++ world remember to compile and link the bindings files they don't work like headers.

> 3. You can get a newsreader that collapses everything into a topic.;
> I'm sure they're availible for Linux.

I recommend thunderbird, it is not ideal but it works on every platform.
September 02, 2006
Daniel White wrote:
> 
> Finally, it would be nice for this site to operate a 'normal' forum
> like phpBB. You can split the forum into topics, and there can be
> threads and such. How about it?

PLEASE NO forum. I am reading about 20 newsgroups every day. There is nothing more annoying than having to visit 20 different web sites, all running a different forum software, all with different design and different search options. With a news server, I have the choice of dozens of newsreaders that I configure any way *I* like, not the way some admin forces onto me.

If this was a forum, I'd be long gone.

 Matthias
September 02, 2006
On Sat, 02 Sep 2006 19:55:48 +0300, MatthiasM <dm@matthiasm.com> wrote:

> Daniel White wrote:
>>  Finally, it would be nice for this site to operate a 'normal' forum
>> like phpBB. You can split the forum into topics, and there can be
>> threads and such. How about it?
>
> PLEASE NO forum. I am reading about 20 newsgroups every day. There is nothing more annoying than having to visit 20 different web sites, all running a different forum software, all with different design and different search options. With a news server, I have the choice of dozens of newsreaders that I configure any way *I* like, not the way some admin forces onto me.
>
> If this was a forum, I'd be long gone.
>
>   Matthias

Yep. Newsgroup are so much easier to use (read+post).
(I'am using Opera, and it handles newgroups very nicely.)
September 02, 2006
MatthiasM wrote:
> Daniel White wrote:
> 
>>
>> Finally, it would be nice for this site to operate a 'normal' forum
>> like phpBB. You can split the forum into topics, and there can be
>> threads and such. How about it?
> 
> 
> PLEASE NO forum. I am reading about 20 newsgroups every day. There is nothing more annoying than having to visit 20 different web sites, all running a different forum software, all with different design and different search options. With a news server, I have the choice of dozens of newsreaders that I configure any way *I* like, not the way some admin forces onto me.
> 
> If this was a forum, I'd be long gone.
> 
>  Matthias

Same here.

I wonder if there is any way to get the "look and feal" of a formum out of a newsgroup? The archived posts sort of do it.
September 04, 2006
Hi there,

Thanks Derek and everyone else for your replies.

>> Rather than an IDE, I would prefer to use my own text editor such as EditPlus to compile.

>Me too ;-)

Hehe. It's the small things that count sometimes. A shame I can't have the best of both worlds though, as IDEs can have useful stuff like quick navigation to functions.


> Do I have to worry about things like using a
> makefile, or don't headers exist in D? It would be nice for an
> approach where all the info is self-contained in each file, and I can
> just 'include' other .d files easily in that same file (no headers).
> However, if so, how does the compiler intelligently know not to
> recompile already compiled files?

The D compiler, as supplied by DigitalMars, does not have this facility.
To
use DMD, you need to explicitly specify each of the files you need
compiling and linking.

>However, there is a tool that I'm supporting that does the
'intelligence'
>aspect. You can check it out at http://www.dsource.org/projects/build
for
>details. But in essence, once you have it you just enter
>
>
> build <mainfile>
>
>at the command line prompt.

Excellent! That's just the kind of thing I was hoping for. Is it
possible
to forget having to declare function headers above all the functions
like
one usually does in C?


>> Finally, it would be nice for this site to operate a 'normal' forum like phpBB. You can split the forum into topics, and there can be threads and such. How about it?

>Your normal is my abnormal ;-)

Lol, I suppose I should consider myself lucky that I can even post at all ;)

Seriously though, you may have just converted me. However, not everyone
will
be like us. We may be losing people to the language because of this.
However,
rather than add a separate forum, so people have a choice (and
thus split the community), this is what I propose:

Why can't there be a 'database' of comments, each which can be fed to
a newsreader like you have, and also to a dynamic forum generated by the
web site (like phpBB style). This way, we get the best of all worlds -
each
person gets their choice of forum interface, and we all get the game
messages, so there's no community split.

> In my opinion, phpBB and the like are useful for people who avoid sophistication. ;-)

Lol :P (quickly and quietly takes the forum from his own site down ;)

Cheers, Daniel
www.skytopia.com
September 04, 2006
Am 04.09.2006, 03:53 Uhr, schrieb Daniel White <twinbee40@skytopia.com>:

> Excellent! That's just the kind of thing I was hoping for. Is it
> possible
> to forget having to declare function headers above all the functions
> like
> one usually does in C?

Hi!

You don't have to declare functions before using them:

' void bar()
' {
'     foo(); // this works just nicely in D
' }
'
' void foo()
' {
'     doStuff();
' }

That's one of the reasons why I switched from C++ to D (and this is also one of the reasons why after converting some C++ stuff to D I had about 30-40% less LOC).

Also you don't have to write those

' void MyClass::doStuff()

things and go hunting for implementations of member functions ("Where'd I put that function? In the header file or in the cpp file? Did I make it inline or not?") :-)

Declaration and implementation are always in the same spot and don't need to appear before the actual usage in the code.

-Mike

-- 
Erstellt mit Operas revolutionärem E-Mail-Modul: http://www.opera.com/mail/