D Version Manager 0.3.0

Jacob Carlborg has announced a new version of DVM, a tool which allows you to download and manage different versions of the D compilers. Previously, it was only available for Mac and Linux, but the latest version includes support for Windows courtesy of Nick Sabalausky. Currently, only DMD is supported. Now that’s it’s available for Windows, I’m considering giving it a try. But, I’ve got my own method of running different DMD versions that I’ve been using so long it will be a hard habit to break.

New stuff from the DVM changelog:

* Added an option for installing the latest compiler
* Better compatibility between different shell implementations
* Added Windows support. Thanks to Nick Sabalausky
* Added a “list” command for listing installed compilers
* Added a “uninstall” command for uninstalling compilers

DustMite

When you’ve found a DMD bug in your thousands-of-lines programs and want to submit a bug report, your first step is always to reduce it to the minimal test case possible. Without a minimal example, nothing is going to be done about it. But paring your code down can be a bear of a job. Enter DustMite, a tool that will reduce your code to something Walter will be happy with. From the newsgroup announcement:

Inspired by Tigris Delta and the “Want to help DMD bugfixing? Write a simple utility” thread from digitalmars.D.learn. I hope the DMD development team will find this useful.

Advantages over Tigris delta:

* Easy to use (takes only two arguments, no need to fiddle with levels)
* Readable output (comments and indentation are preserved)
* Native support for multiple files (accepts a path to an entire directory for input)
* Written for D
* Written in D
* Not written in Perl
* Can recognize constructs such as try/catch, function invariants (in/out/body)
* Only 440 lines of source code

If you’ve never used delta: this is a tool which attempts to shrink files by deleting fragments iteratively, as long as the file satisfies a user-specified condition (for example, a specific error message when passed through the compiler).

Usage:

1. Formulate a condition command, which should exit with a status code of 0 when DustMite is on the right track, and anything else otherwise.
Example: dmd test.d 2>&1 | grep -qF “Assertion failed”
2. Place all the files that dustmite is to minimize in a new directory.
3. If you’d like to test your condition command, don’t forget to clean up temporary files afterwards.
4. Run: dustmite path/to/directory test-command
5. After a while, dustmite will finish working and create path/to/directory.reduced

profileD

If you want to profile your D app with DMD’s built-in profiler, reading the output can be hard on the eyes. profileD to the rescue!

profileD is a GTK2 GUI to display dmd’s profiling information in a sorted table with readable (demangled) function names. Its purpose is to help finding which functions to optimize in a program in order to actually make it run significantly faster.

Goldie Parsing System 0.5

Nick has announced a new version of Goldie, a set of parsing tools compatible with the GOLD Parser Builder. This latest release focuses on speed. From the announcement:

== New in v0.5: ==

- Improved lexing/parsing speed by about 5x-6x.

- Small additional speedup lexing languages with large character sets
(such as Unicode).

- GRMC: Grammar Compiler: Supports {All Valid} character set.

- GRMC: Grammar Compiler: Complex grammars are compiled to CGT up to
about 4x-8x faster.

- GRMC: Grammar Compiler: Verbose (-v) flag shows each step and amount
of time taken.

- Parse Anything: No more unhandled exception when parsing a source with
an error.

- Fixed to work with DMD 2.053 (still works with 2.052, too).

D Version Manager 0.2.0

Jacob Carlborg has announce version 0.2.0 of D Version Manager. DVM is a tool for Linux/Mac that allows you to manage different versions of the D compilers. From the web page:

DVM allows you to easily download and install D compilers and manage different versions of the compilers. When you switch D compiler with the “use” command the compiler will only be available in the current shell. This allows you to have one version of the compiler in one shell and another version in another shell. For example, have a D1 version in one shell and a D2 version in another.

Next time I boot into Linux I’ll see about giving this a go. Windows users, like me, can just do what I do and use batch files linked to different console shortcuts. If I haven’t posted already how to set that up, I’ll write something up on it soonish.