August 26, 2014
On Tue, Aug 26, 2014 at 02:13:04AM +0000, Weaseldog via Digitalmars-d-learn wrote:
> Not sure how up your alley this is, but vim support for D is excellent.

I use vim for D.


T

-- 
War doesn't prove who's right, just who's left. -- BSD Games' Fortune
August 26, 2014
On Monday, 25 August 2014 at 16:46:11 UTC, Ryan wrote:
> Me: Software developer for 30 years.


> What IDE should I use? I'm not big fan of Eclipse, although if

If you are an Eclipse (CDT) user for C/C++, then you will find a very similar plugin for D, called DDT, here:

http://code.google.com/p/ddt/
August 26, 2014
On 8/26/2014 5:37 AM, Ryan wrote:

> Then I thought I'd learn dub.  Well, this is NOT going well... I did a
> git clone of gtk-d, then tried to build with dub (renamed the
> package.json to dub.json), and it told me "Conflicting package
> multi-reference".... I have no clue and I've tried removing package
> references

Any libraries you want to use that are registered in the dub registry[1] (which gtk-d is) should be added to your project's dub.json as dependencies (see [2] for an example of using gtk-d). This will cause dub to download and compile the libraries for you. You never have to pull any of them down or compile them yourself.

>
> I tried "dub remove gtk-d --version=*" but it just lists out excuses why
> it can't work... "no retrieval journal found for...", "Untracked file
> found"....
>

This command will only remove libraries that dub is managing, not anything you have downloaded outside of dub and compiled directly.


> So then I try every variation of "dub remove-local" and "dub
> remove-path" I can think of.


remove-local is the inverse of add-local, which you might use when you want to test a dub-enabled library that hasn't yet been added to the registry (such as a new but unreleased version of a registered library, or a library you are developing locally but haven't yet released). add-local tells dub to look on the local filesystem rather than through the dub registry for the library.

I haven't looked at add-/remove-path yet, so no comment on those.

[1] http://code.dlang.org/
[2] http://code.dlang.org/packages/gtk-d


---
This email is free from viruses and malware because avast! Antivirus protection is active.
http://www.avast.com

August 26, 2014
On Mon, 2014-08-25 at 17:09 +0000, Kiith-Sa via Digitalmars-d-learn
wrote:
[…]
> I don't use an IDE, but MonoD seems to be the most recommended cross-platform option. It has a wiki page here if it helps: http://wiki.dlang.org/Mono-D

I just tried following the instructions at http://wiki.dlang.org/Mono-D and for Debian Sid, it doesn't work, I cannot get a MonoD install.

Yes, Debian only has MonoDevelop 4, I downloaded MonoDevelop 5.4 from the site http://simendsjo.me/files/abothe/

-- 
Russel. ============================================================================= Dr Russel Winder      t: +44 20 7585 2200   voip: sip:russel.winder@ekiga.net 41 Buckmaster Road    m: +44 7770 465 077   xmpp: russel@winder.org.uk London SW11 1EN, UK   w: www.russel.org.uk  skype: russel_winder


August 26, 2014
On Mon, 2014-08-25 at 18:09 +0000, Kiith-Sa via Digitalmars-d-learn
wrote:
[…]
> I have no experience with GtkD, but with DUB you shouldn't need to mess with .lib files at all. DUB automatically downloads and compiles any libraries specified with dub.json, *and* links them with the compiled project.
> 
> (still, it'd be better if someone with GtkD/MonoD experience could clarify)

Dub happily downloads the GtkD source and builds the library, and then builds the application. I am happy to report that creating a working GtkD program with Dub was straightforward, It Just Worked™
-- 
Russel. ============================================================================= Dr Russel Winder      t: +44 20 7585 2200   voip: sip:russel.winder@ekiga.net 41 Buckmaster Road    m: +44 7770 465 077   xmpp: russel@winder.org.uk London SW11 1EN, UK   w: www.russel.org.uk  skype: russel_winder


August 26, 2014
On Mon, 2014-08-25 at 16:46 +0000, Ryan via Digitalmars-d-learn wrote: […]
> What Widget library should I use?  I started with GTKD, but since there are no tutorials does this mean nobody actually does this? Should I use DWT?  What about QT?

GtkD should work for you. I would have preferred Qt for portability but QtD doesn't work for me, I actually want to use QML, and GtkD just worked.

I didn't bother with an IDE to start with just used Emacs and a Shell, though I am sure VIM would do as well, Sublime Text or even Notepad ++ :-)

I created a directory with a source directory added the D source in it and then edited a Dub specification file, ran dub and it all just compiled to a working executable.

-- 
Russel. ============================================================================= Dr Russel Winder      t: +44 20 7585 2200   voip: sip:russel.winder@ekiga.net 41 Buckmaster Road    m: +44 7770 465 077   xmpp: russel@winder.org.uk London SW11 1EN, UK   w: www.russel.org.uk  skype: russel_winder


August 26, 2014
On Monday, 25 August 2014 at 16:46:11 UTC, Ryan wrote:
> What IDE should I use? I'm not big fan of Eclipse, although if I had to use it this wouldn't be a dealbreaker.  Give me something easy and lightweight, unless you've got a GUI builder (this is why I started with MonoDevelop, though this isn't working so well for me).

If you can do without all bells and whistles of a fullblown IDE, you can try geany. I really like it and do all my D (and python/shell/perl) work with geany.

http://www.geany.org/

You just install dmd (or gdc or ldc) and add it to your PATH.
You download and install geany.
You configure the build/compile settings for geany eg:
rdmd --build-only --force -debug "%f"

And there you go.

Geany is available for Windows and Linux.
August 27, 2014
Thanks again for all the responses.  I've made tremendous progress understanding the D build process.

I'm thinking I will probably create a more in depth GTK+ hello world that attempts to covers some of the current D landscape.  For instance I now understand how DMD and RDMD work and how they are different from one another. But I do not yet understand how to use DUB, or why I would choose it over one of the many other build systems such as CMakeD2, DSSS, XfBuild, Bud, RDMD, or premake4.  Especially DSSS vs DUB. Is DUB a replacement for DSSS?

I also don't understand why there are multiple code repositories and where to find what (http://code.dlang.org vs http://www.dsource.org/projects/).  I understand that Open Source is decentralized, but when you're talking about a relatively small user group like D it seems very confusing.

Last, I've been in the Java/C# world so long that I don't understand why I need to provide the source code to statically link a *.lib file.  I started exploring dynamic link libraries, and this too seems very confusing to me.  Perhaps there is a better way to do this?  Perhaps I just don't understand it well enough yet?

Next on my list is to attempt to create a Glade hello world in D.

Can I host a tutorial here on dlang.org?  If so does it belong under "How-tos" or "Articles"?




August 27, 2014
On 8/27/2014 10:25 PM, Ryan wrote:

>
>
> DSSS, XfBuild, Bud, RDMD, or premake4.  Especially DSSS vs DUB. Is DUB a
> replacement for DSSS?

You can look at it that way. It's both a package manager and build tool. DSSS was abandoned long ago. Why not other tools -- XfBuild is no longer maintained (AFAIK); Bud is long, long dead; RDMD is a build tool, but not a package manager. D support in existing C/C++ has been spotty in the past, though they may be up to date now -- but again, those are build tools and not package managers. The community has standardized around dub. You don't have to use it if you don't want to, but it will make your life easier if you do. In will eventually be bundled with DMD and will be the defacto build tool and package manager.

>
> I also don't understand why there are multiple code repositories and
> where to find what (http://code.dlang.org vs
> http://www.dsource.org/projects/).  I understand that Open Source is
> decentralized, but when you're talking about a relatively small user
> group like D it seems very confusing.

code.dlang.org is not a code repository, but a package registry. The code for each project is hosted either at github or BitBucket. The registry is where dub looks to find the dependencies you list in your dub.json file. If the package is listed in the registry, it will then follow the registered link to pull the source from github or BitBucket. You don't need to look there yourself unless you want to see what has been registered and what has been recently updated. You can also create your own locations for dub to search for packages, including locally. code.dlang.org is the default.

dsource.org is dead, dead, dead. The guy with the keys no longer maintains it. Look through the newsgroup archives here and you can find a couple of recent discussions about it. Most (all?) of the projects that are still active have moved on github or BitBucket long ago. The rest are abandoned.

>
> Last, I've been in the Java/C# world so long that I don't understand why
> I need to provide the source code to statically link a *.lib file.  I
> started exploring dynamic link libraries, and this too seems very
> confusing to me.  Perhaps there is a better way to do this?  Perhaps I
> just don't understand it well enough yet?

You don't need the source of a library to link with it, but to compile any modules that use it. During the compile step, the compiler needs to know which symbols are available and visible to the modules it is compiling, much like a C compiler needs the headers. This isn't necessary in a language like Java as all the information the compiler needs is available in the bytecode of the class files. The object file formats used by C/C++/D do not contain that information.

You can also use a stripped down version of the source, a .di file, which functions like a C header. These can be created manually or by passing the -H option to DMD (I'm unfamiliar with LDC or GDC options) during compilation.


>
> Next on my list is to attempt to create a Glade hello world in D.
>
> Can I host a tutorial here on dlang.org?  If so does it belong under
> "How-tos" or "Articles"?
>
>
>
>


---
This email is free from viruses and malware because avast! Antivirus protection is active.
http://www.avast.com

August 29, 2014
On Wed, 2014-08-27 at 13:25 +0000, Ryan via Digitalmars-d-learn wrote: […]
> I'm thinking I will probably create a more in depth GTK+ hello world that attempts to covers some of the current D landscape.

Exactly what I am doing :-)

> For instance I now understand how DMD and RDMD work and how they are different from one another. But I do not yet understand how to use DUB, or why I would choose it over one of the many other build systems such as CMakeD2, DSSS, XfBuild, Bud, RDMD, or premake4.  Especially DSSS vs DUB. Is DUB a replacement for DSSS?

Don't forget SCons, which has built in support for D as a first class language, peer with C, C++ and Fortran.

Dub is shaping up to be the One True Build system for D. Hopefully it also build C and C++, I haven't tried that.

[…]
> 
> Next on my list is to attempt to create a Glade hello world in D.

Ensure you use GTK+ 3 widgets. The new GTK+ idiom is to use an Application instance and an ApplicationWindow for the top-level window. All windows should probably use HeaderBars rather than having menus.

[…]

-- 
Russel. ============================================================================= Dr Russel Winder      t: +44 20 7585 2200   voip: sip:russel.winder@ekiga.net 41 Buckmaster Road    m: +44 7770 465 077   xmpp: russel@winder.org.uk London SW11 1EN, UK   w: www.russel.org.uk  skype: russel_winder


1 2
Next ›   Last »