Chapter 8. Exploring the Wide World of D

Anyone learning a new programming language benefits tremendously when the language has an active and vibrant community. Learning resources such as blog posts, articles, and books help speed up the process; software such as build tools and IDEs make it easier to get new projects off the ground; libraries and language bindings reduce the amount of new code that needs to be written. D has been around long enough now that an ever-maturing ecosystem has grown up around it, making it easier than ever to jump in and start writing D programs.

In this chapter, we're going to take a tour of that ecosystem. We'll look at online resources that can be used to keep up with D's development, and you will learn more about the language, some of the tools that aid in building and debugging, a few of the text editor and IDE plugins many D users rely on, and some of the popular third-party libraries and bindings used in D programs. We're also going to dig more deeply into DMD command line options and you will learn how to add third-party dependencies to a DUB project. By the end of this chapter, you'll have a good idea of the sort of resources that are available and where to go to find more of them. The layout of this chapter is as follows:

  • Online resources: A sampling of websites for enhancing your D knowledge and keeping up with D development.
  • Editors and IDEs: An overview of some of the options available to D programmers.
  • Tools and utilities: Software that can aid with different aspects of development with D, including a closer look at DMD.
  • Libraries: An overview of the DUB package repository, how to use it, and how to register new packages, plus a peek at two collections of bindings to popular C libraries.

Online resources

A handful of online resources, like the forums and the #D IRC channel at freenode.net, were introduced in Chapter 1, How to Get a D in Programming, and links to the D documentation have been sprinkled throughout the book. http://dlang.org/ should be located prominently in your bookmark list. Not only is it the gateway to the language reference and standard library documentation, but also to the official compiler releases, the forums, and the issue tracker. Additionally, there are sections in the sidebar where other useful resources can be found, such as articles on specific D topics (templates, arrays, floating point, and so on). It's also the host of a couple of subdomains we haven't yet discussed, one of which belongs to the DWiki, our first stop in this section. The following are a handful of resources any beginning D programmer should find helpful:

DWiki

The DWiki at http://wiki.dlang.org/ is a portal to a wealth of D resources. Most of the items covered in this chapter are linked somewhere from this wiki. Tools, libraries, tutorials, books, videos, and more can be found there. A section titled Core Development lists a number of links for those interested in following the development of D itself. Some sections of the wiki are more current than others, but these days there are changes and updates on a near-daily basis. One page that may be worth keeping an eye on is at http://wiki.dlang.org/Jobs, which is a list of current job openings for D programmers.

Planet D

Planet D is an aggregator of D-related blog feeds. It doesn't cover every D-related blog post in existence, only those sites that have registered with the service, but it's still a useful stream to point your feed reader toward. A number of active D community members write blog posts now and again about the projects they're working on, things they like or dislike about the language, and new tricks they've discovered. These blogs are a great way to hear about new projects or learn things about the language that can help make you a better D programmer. Planet D lives at http://planet.dsource.org/.

reddit and StackOverflow

Not everyone using D makes use of the official forums for help and project announcements. Two alternatives are reddit and StackOverflow.

The d_language subreddit at https://www.reddit.com/r/d_language/ isn't as active as others, but people do announce projects and post questions there now and again. Additional D-related posts can be found at https://www.reddit.com/r/programming/. Personally, I've found the former to occasionally be a source for learning of projects I might not otherwise have heard of, and the latter to be a place for spirited discussion about D.

There are a number of questions about D at StackOverflow, a visit to which may prove fruitful when you encounter your own D-related issues. A quick search may yield a solution. You can always see an up-to-date list of D-related questions at http://stackoverflow.com/questions/tagged/d.

This Week in D

Adam Ruppe maintains a blog with weekly updates on the latest goings-on in the world of D. He highlights the biggest forum discussions, the latest GitHub statistics, and often has a Tip of the Week or an interview with someone from the D community. For those who are too busy to keep up with all of the forum activity, this is a timesaver. You can find This Week in D at http://arsdnet.net/this-week-in-d/.

This Week in D

DConf

DConf is an annual D-centric conference that first launched in 2013. The conference consists of three days of presentations, mingling, and discussions about the language and how to make it better. While it's certainly nice to be able to attend the conference in person, it's sometimes live-streamed so that those who are unable to attend can still participate. More importantly, presentation slides and videos are linked directly from the DConf site at http://dconf.org/. They are available for any given year. To find them, click on the year of the conference in the menu bar at the top of the page and then on the Schedule menu item. From there, you'll find links to a summary of each presentation, where further links lead to the slides and videos.

DConf

Note

The first D conference was actually held in 2007 in Seattle, though it wasn't called DConf. Some of the slides are still available at http://d.puremagic.com/conference2007/index.html. The videos have since been archived on YouTube by Brad Roberts. I've created a playlist for anyone interested at https://www.youtube.com/playlist?list=PLz50A_by6eUdcH4yL06c_XrHiIHWJNGLC.

DSource

A long time ago, in a galaxy far, far away, there was a website that offered free project hosting for open source D projects. It was maintained by a volunteer from the D community and served on a box provided by his employer. That was then. Today, DSource is a graveyard of old D projects dating from the D1 era. In a perfect world, there would be no reason to even mention it in a modern book about D2. Unfortunately, the internet is not a perfect world.

A handful of long-lived projects that used to be hosted at DSource are still alive and well at GitHub (and most of those have a message on the project's wiki page at DSource indicating such). A persistent source of confusion for new D users, however, is that old pages referring to the old projects at DSource still pop up in search results now and again. Some of those confused new users manage to find their way to the forums or the #D channel, but there's no way to know how many turned away, thinking D is a dead or dying language, citing DSource as the evidence for it.

Though DSource sat abandoned for a very long time, another D user was ultimately able to contact the right people in order to move the entire site to his own server and take over its maintenance. It now exists in archive mode; no updates can be made to any of the projects, no posts made on the forums, no comments posted in Trac, and so on. While some in the D community would like to see it gone, there are others who see value in keeping it around as an archive of D's history.

The site is included here for two reasons. First, and most importantly, so that when DSource shows up in your search results for anything related to modern D, you can safely ignore it. The second is to let you know that there is a potential treasure trove of D history available for you to peruse. Given that most of the projects on DSource were written with D1, it can help anyone interested in observing how the language has changed and, perhaps, get some perspective on why some features are the way they are. Moreover, there is still some useful code there that could be put to good use with a bit of work to make it compatible with modern D.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.117.11.247