• Category Archives
  • Linux
  • 6 Posts

Working with files in the D programming language

The inspiration for this article was one written a few weeks ago entitled Working with Files in Go. In that article the author details numerous ways of interacting with files highlighting the capabilities of Go. I thought I would write a companion piece, this time detailing how to interact with files using the D programming language. Interacting with files is a fundamental task of any programming language and while such tasks are commonplace, it’s not entirely obvious how to achieve certain file related tasks using D. Hopefully this article will change that and show the simplicity and power of the D language when working with files.

More hidden treasure in the D standard library

After the success of the last article detailing hidden treasures in the D standard library, I thought I would write another highlighting why the D programming language coupled with its great standard library is surprisingly useful. The library itself is a vast beast and has been written by some exceptional programmers, so occasionally you stumble across some truly useful and well designed nuggets of code. This article shows a few more of these hidden treasures and provides examples of where they could be useful when used in your projects.

Hidden treasure in the D standard library

I’ve been using D for a number of years and i am constantly surprised by the hidden treasure i find in the standard library. I guess the reason for my surprise is that i’ve never exhaustively read the entire library documentation, i only skim it for what’s needed at any given time. I’ve promised myself i will read it thoroughly one day but until then i’ll enjoy these little discoveries. This article highlights a few of these hidden treasures which i hope you’ll enjoy learning about and will be useful for your future D projects.

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.

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.

Is ‘Linux is only free if your time has no value’ still valid?

EDIT: This is now an old post and my opinion on Linux has changed a great deal over the years. While I agree this viewpoint had some merit a few years ago, the enormous effort by the open source community to make Linux great has generally succeeded. So for the record, this article no longer represents my views on Linux and should be viewed in a historical context.

This is the part where I start getting hate mail from people, and cheerleading messages telling me to take a look at it again, because it’s so much better now. I understand. I’ll take your word for it. And when the time comes to replace the O2 I have today, maybe my next machine will run Linux. But as we all know, Linux is only free if your time has no value, and I find that my time is better spent doing things other than the endless moving-target-upgrade dance.

Jamie Zawinski

The above quote comes from a post made by a programmer called Jamie Zawinski back in1998. It’s a quote aimed squarely at the user unfriendliness of Linux and at the amount of time you need to understand and configure a computer using Linux to get stuff done. Of course this was a long time ago and Linux, in its many different guises (distros), has made a lot of progress, so is this quote still valid?