• Monthly Archives
  • July 2013
  • 22 Posts

Templates in D explained

Let’s get one thing straight from the outset, template metaprogramming scares the hell out of most developers! I have no idea why, probably because it simply sounds scary? Whatever the reason, many developers shy away from even learning about such techniques, let alone use them. This is such a shame because templates offer a superb tool for programming at a higher level of abstraction which is something that can aid in better program design.

Even though many programming languages support template metaprogramming this article is about using templates in D. D is one of the best languages i have ever used and the more i use it the more i realise it’s getting everything just right. Hopefully this article will remove the above fear and educate developers on what can be achieved.

Forget currying, use partial application

I’m currently reading more about advanced JavaScript design patterns and an interesting concept i’ve come across a lot is Currying and Partial Application. For years i’ve used partial application but not known its name or how it can be used to its fullest, so it was a pleasant surprise to read more and fully understand it. Currying on the other hand is partial application’s more serious cousin and something i’ve never really used. Here follows the differences and why they may or may not be useful.

Piracy will always occur until attitudes and service improve

In modern terms Piracy is the act of obtaining something while not paying for it. This is usually content that can be distributed digitally such as software and with the birth of the internet this allows anyone at any time to obtain those goods. But wait, isn’t that a good thing? Anyone, anywhere in the entire world being able to get a copy of your software? Of course this needs to be limited to paying consumers but what if the pirates provide a better service than the commercial entity that owns the content? If the distribution network and infrastructure is there why the hell not use it to distribute your digital goods?

Fear of contributing to open source software

I’m currently considering contributing to an open source software project and while i feel i could make a worthwhile effort i’ve always had fears about doing so. In this article i’ll explain these fears perhaps because other developers may feel the same. Then later, i’ll try and come up with some solutions. So lets get started listing the main issues i have.

Vim – The only text editor you’ll ever need

Text editors are a huge topic of discussion and argument in the software world and every developer has their favorite. I’ve seen so many flame wars erupting all over the net about this subject that i sometimes dare not bring it up. Well, not wanting to shy away from an argument i’m going to make the case for the Vim text editor and explain why it’s so awesome.

The D programming language by Walter Bright

This is a good introduction to the D programming language by none other than the author himself. I’m a big fan of D and thought i would share this to educate any other interested developers.

The D Programming Language combines modeling power, modern convenience, and native efficiency into one powerful language. D embodies many new ideas in programming languages along with traditional proven techniques. Filmed at Lang.NEXT 2012, a cross-industry conference for programming language designers and implementers on the Microsoft Campus in Redmond, Washington. With three days of talks, panels and discussion on leading programming language work from industry and research, Lang.NEXT is the place to learn, share ideas and engage with fellow programming language design experts and enthusiasts. Native, functional, imperative, object oriented, static, dynamic, managed, interpreted… It’s a programming language geek fest.

Cross-platform GUI programming using D and Gtk+

I’ve recently been playing with D and realized it’s an awesome language capable of any task. I’ve also had a few ideas for native applications that i want to realize so i decided to explore the feasibility of building these using D.

Using D presents a little problem though, there is no standard GUI library! Don’t worry there are many third party GUI libraries available, one of these is GTK+ and luckily there are D bindings available to make using this library easy. Well, i say ‘easy’ (in inverted commas) because the installation and usage of these bindings is not very well documented, hence, this post. The actual procedure for installing and using them is actually quite easy once you know what to do, so lets start. I’ve separated the following instructions into Windows and Linux sections.