2.8 KiB
+++ date = '2015-04-01' title = 'D Language' tags = ["dlang", "linux", "web", "contributions"] +++
The D language is a recent language very similar to C++ in term of features, but with a cleaned syntax and better compile-time features.
I like the D language because it makes possible to write nice and robust applications within a very short time.
Here are some small projects I have done using D:
Served
{{< cinema path="/images/posts/served-." >}}
Served is a lightweight file-sharing web service (a bit like Google Drive) written using the web server library vibe.d.
It is designed to be quickly deployed as a web file server that can also be used to upload files to a directory. Its default configuration serves the folder given by command line and uses UNIX users/passwords (via PAM Authentification) to upload/view files respecting file permissions.
By default, the file named index.md
gets rendered atop of the file list.
More
- Source code: https://github.com/CromFr/Served
- Design:
- Bootstrap
- JQuery
- Markdown rendering with Showdown
- Interfacing D lang. with C library (PAM)
NWN2 Log web access
{{< cinema path="/images/posts/nwnlog-." >}}
The goal was to provide a common web interface to browse and search log entries written by the Neverwinter Nights 2 server La Colère d'Aurile. These entries are written in different files/databases, use different syntaxes and timestamps relative to different time zones.
The log viewer has been written to be as easy as possible to extend and maintain: If you want to add a log page, you just have to write a class. The menus, interface, search parameters, the instantiation are auto-generated at compile time.
More
- Source code: https://github.com/CromFr/NWNLogViewer
- Design
- REST API generating Json data
- Search & data-binding using AngularJS
- Much code generation using D meta-programming features
NWN2 GUI viewer
{{< cinema path="/images/posts/nwnlog-." >}}
Neverwinter Nights 2 lacks of third applications. This one renders NWN2 GUI without launching the whole game, and updates itself on file change.
It allows developers to write the XML GUI code with their favourite editor, while seeing the result in real time in another window, with extra debugging information that NWN2 doesn't provide.
Right now it has some quirks on text alignment and font handling, but the result is still close to the in-game rendering.
More
- Source code: https://github.com/CromFr/NWNGuiViewer
- Design:
- GTK 3 with GTKD wrapper for D lang.
- Hand-made XML parser
Phobos
Phobos is the standard library of the D language.
I have fixed a couple of bugs in the library, and I am looking to fix more of them in the future :).