November 18, 2004
On Thu, 18 Nov 2004 18:02:47 +0100, Anders F Björklund wrote:

> John Reimer wrote:
>> Also std.loader works on both linux and win32
> 
> And Mac OS X! ("darwin")
> 


That's good to know!  Yes, Mac OS X also then. :D


> GTK+ still sucks on Mac, though, but there is some progress:
> http://gtk-osx.sourceforge.net/ (Carbon)
> http://gtk-quartz.sourceforge.net/ (Cocoa)
> 
> Meanwhile the X11 version works, if you run the X11 server... http://www.apple.com/macosx/features/x11/
> 
> --anders


Great!


November 18, 2004
Mathias Bierschenk schrieb am Thu, 18 Nov 2004 17:20:30 +0100:
> Ah, by the way: As already mentioned, I come from the C programming
> language and always considered C++ as too difficult. Now that I start with
> D it seems to make sense to learn something about object oriented
> programming. But the tutorial at dsource.org doesn't cover the basics
> about object orientation with D (or I didn't find them?), and the official
> D documentation is not suitable for beginners.
> Do I have to learn C++ first, anyway? ;-)

Maybe you should read a Java tutorial.
If you use one source file per D-class, D's basic object orientated
features are very similar to Java. Of course you'll miss struct and
templates/mixins this way, but Java should provide you with some
knowledge in "object oriented programming".

Thomas
November 18, 2004
On Thu, 18 Nov 2004 17:05:40 +0000, Ant wrote:

> In article <pan.2004.11.19.16.49.58.678433@yahoo.com>, John Reimer says...
>>
>>On Thu, 18 Nov 2004 16:11:21 +0000, Ant wrote:
>>
>><snip>
>>
>>Are the windows Gtk+ libraries dll's?  If they are, you could simply do
>>what what Derelict and the mango icu port do:  runtime dynamic loading of
>>the function names from the dlls (using std.loader).  That way the
>>user doesn't even have to think about compile time linkage and gtk+
>>packages. You would just have to ensure that the dll's were installed.
> 
> thanks, I'll look at that.
> 
> Ant


And if you don't like the synesis license that's still in std.loader (and
phobos, in general), it shouldn't be too difficult to role your own
 version of the module.
 :-P


November 18, 2004
In article <pan.2004.11.18.18.00.56.261484@yahoo.com>, John Reimer says...
>
>On Thu, 18 Nov 2004 17:05:40 +0000, Ant wrote:
>
>> In article <pan.2004.11.19.16.49.58.678433@yahoo.com>, John Reimer says...
>>>
>>>
>>> (using std.loader).
>> 
>> thanks, I'll look at that.
>> 
>> Ant
>
>
>And if you don't like the synesis license that's still in std.loader (and
>phobos, in general),

Oh:( I can't look at code with that license :(
I wouldn't mind using it if it was documented externally...

> it shouldn't be too difficult to role your own
> version of the module.

I'm not sure about that, I don't know the first thing about it.
any pointers? I remember Matthew saying it was very simple and fast to
do it.

Walter, when will the license be explicitly changed on the source code?

Ant


November 18, 2004
On Thu, 18 Nov 2004 18:30:04 +0000, Ant wrote:

<snip>

> I'm not sure about that, I don't know the first thing about it.
> any pointers? I remember Matthew saying it was very simple and fast to
> do it.
> 

Well, just to clarify, Derelict uses std.loader for interfacing with both win32 and linux shared libraries.

In Mango's ICU, Kris has implemented support for win32 only, since
that's the system he works on; I may try to get the Linux
side of it worked out.  Mango ICU actually does not use std.loader, so
for DUI on windows, you probably should look at how Mango does it (it's
quite simple, thankfully).  He makes use of only two win32 calls:
LoadLibraryA() and GetProcAddress().  See his nifty FunctionLoader class
in

http://svn.dsource.org/svn/projects/mango/trunk/mango/icu/ICU.d

Examples of how he uses that class can be found in the other ICU modules.  You should be able to use it very similarly in DUI.  If you can do the same in your project, I think DUI will start looking very attractive to people.

Later,

John
November 18, 2004
In article <pan.2004.11.18.19.47.31.302185@yahoo.com>, John Reimer says...
>
>On Thu, 18 Nov 2004 18:30:04 +0000, Ant wrote:
>
><snip>
>
>> I'm not sure about that, I don't know the first thing about it.
>> any pointers? I remember Matthew saying it was very simple and fast to
>> do it.
>> 
>
>Well, just to clarify, Derelict uses std.loader for interfacing with both win32 and linux shared libraries.
>
>In Mango's ICU, Kris has implemented support for win32 only, since
>that's the system he works on; I may try to get the Linux
>side of it worked out.  Mango ICU actually does not use std.loader, so
>for DUI on windows, you probably should look at how Mango does it (it's
>quite simple, thankfully).  He makes use of only two win32 calls:
>LoadLibraryA() and GetProcAddress().  See his nifty FunctionLoader class
>in
>
>http://svn.dsource.org/svn/projects/mango/trunk/mango/icu/ICU.d
>
>Examples of how he uses that class can be found in the other ICU modules.  You should be able to use it very similarly in DUI.  If you can do the same in your project, I think DUI will start looking very attractive to people.

thanks again.

I'm waiting for this also to make leds modular instead of monolitic,
I thought I needed shared libs for that.
leds original design should allow for easy conversion.

Ant


November 18, 2004
"Mathias Bierschenk" <Mathias.Bierschenk@web.de> wrote in message news:opshn40gpu9gaiaw@dialin-212-144-051-146.arcor-ip.net...
> The main point of my post was that it's a pity that currently D is less
> cross-platform than C/C++. On the other hand, it's great to hear that work
> on D and its GUI libraries still goes on.
> I decided to give D a try for my Morris project. I start with the engine
> stuff on the commandline, and then see what's available for GUI
> programming. Could take some time anyway... ;-)
> Ah, by the way: As already mentioned, I come from the C programming
> language and always considered C++ as too difficult. Now that I start with
> D it seems to make sense to learn something about object oriented
> programming. But the tutorial at dsource.org doesn't cover the basics
> about object orientation with D (or I didn't find them?), and the official
> D documentation is not suitable for beginners.
> Do I have to learn C++ first, anyway? ;-)

I utterly failed to grok OOP from reading Bjarne's early C++ book. I didn't "get it" until I read a tutorial on Smalltalk. The problem with learning the fundamental concepts of OOP from C++ is that C++ has too many alternatives and complications thrown in.


November 19, 2004
"Walter" <newshound@digitalmars.com> wrote in message news:cng0lv$1fmq$1@digitaldaemon.com...
> > * debugging has improved, but has a ways to go
> In what way?

As of dmd 0.105, I find it difficult to debug char[] (aka strings)
I've been using a Visual Studio 98 workaround from (I think?) "Arcane
Jill" (thx ... who has been mia lately?)

#  char[] myVar = "Local Variable";  // Visible indirectly
#               // len is (int)myVar
#               // char is (char*)((int)(myVar >>32))
#  char* p = "Pointer";              // Visible to debugger
#  debug char* _dbgMyVar = myVar;  // Visible to debugger

> > * phobos library seems more than adequate for my usage, but there
are
> > so many ng complaints (and inferences that it will be overhauled)
that
> > I'm reluctant to use it in depth
>
> I use it in depth <g>.

Not having a C.S. degree, the "inner pragmatist" in me tends to be bewildered at the ng complaints ... I'm mostly quite impressed with phobos.

> > * difficult for this newbie to use external C libraries because of linkage issues unless DMC used
>
> Why not use DMC? DMC is a well used and popular C compiler.

Mea culpa. I haven't put the effort into gaining sufficient makefile proficiency to be able to integrate D code with "foreign" libs (e.g. mysql, sqlite, lzo, 7-zip, etc.). I admit to being an example of "a poor craftsman blames his tools -- anon?" http://www.dsource.org/forums/viewtopic.php?t=380

> D is good for any project you'd consider using C or C++ for.
Sometimes using
> a particular existing library may dictate what language you use, but
other
> than that, why?


<alert comment="uninformed and/or lazy whining from D zealot">
A hint ... starts with "G", ends with "I", and rhymes with gooey <g>

My "niche" is small freeware gui apps that work reasonably well on obsolete "dinosaur" computers (Pentium-233 or slower, VGA resolution or laptop, slow hard drive, etc.) ... which tends to make the app simple enough for non-techies ... and fast to use. a'la "The Zen of Palm Programming"

My observation is that the various D gui library projects are typically in a "broken" state due to dmd and/or phobos changes. My impression is that a project that depends on a D gui library is a "Poster Child" for being on the "Bleeding Edge". <g> For now the POC uses Win32 api calls for the "advanced" treeview and listview widgets.

Granted, if this stuff was easy, I suppose it wouldn't pay so well.
<g>
</alert>


November 19, 2004
> I utterly failed to grok OOP from reading Bjarne's early C++ book. I
didn't
> "get it" until I read a tutorial on Smalltalk. The problem with learning
the
> fundamental concepts of OOP from C++ is that C++ has too many alternatives and complications thrown in.
>
A very good book was "Object-Oriented Programming" by Peter Coad and Jill Nicola, this book gave examples in both Smalltalk and C++ for all the examples and I would say is still one of the best C++ OOP books around.

Zz


November 19, 2004
Lynn Allan wrote:
> "Walter" <newshound@digitalmars.com> wrote in message
> news:cng0lv$1fmq$1@digitaldaemon.com...
> 
>>>* phobos library seems more than adequate for my usage, but there
> 
> are
> 
>>>so many ng complaints (and inferences that it will be overhauled)
> 
> that
> 
>>>I'm reluctant to use it in depth
>>
>>I use it in depth <g>.
> 
> 
> Not having a C.S. degree, the "inner pragmatist" in me tends to be
> bewildered at the ng complaints ... I'm mostly quite impressed with
> phobos.

I took a C.S. class once. Does that buy me any credibility? :)

I think Phobos is good.  I just think there needs to be more in it (which will likely improve over time). We have to start somewhere, so I don't mean to whine about Phobos's completeness.

I think a lot of the complaints about Phobos are based on issues of style and opinion. If you had 10 different people design a standard library, you'd get 10 different results. Phobos's critics are the 9 other people. ;)

-- 
Justin (a/k/a jcc7)
http://jcc_7.tripod.com/d/