std::async, and copies – gotcha!

Disclaimer: I love C++11! It’s the best thing that happened to C++ since I’m using it (mid-90’s). I’ve been hoping for lambda‘s in C++ since I discovered and started using Lisp. Elisions and move semantics – together with unique and shared pointers – pretty much free you from thinking about memory management! It’s just amazing! Check out “Going Native” talks on YouTube, incl. amazing talks by the likes of Stroustrup, Sutter, Lavavej, et al.

If you don’t want to read my rant, here’s the point – function objects are objects – they can get copied, unless you specify otherwise, so beware that you’re working on a copy, or pass std::ref.

Continue reading

Why is Lisp so great?, part 1

There are many books and texts about Lisp on the net, so I’ll leave out the “common” stuff, and I’ll try to show in this article one aspect of what makes Lisp the “most hackable” language out there.

If you think that tuples in .Net4 are awesome, or that F# is innovative, then you can stop here. This article is not for you… Seriously, don’t waste your time…

If, on the other hand, you ever wondered why your favourite language does not have this and this feature, ever wanted to hack the compiler (and/or really did), or found yourself writing bunch of a very similar code and spent days thinking of a way to refactor the code despite the limitations of the language at hand, then Lisp is The language for you.

Continue reading

Creating a Virtual Network with VirtualBox

VirtualBox sure is a great virtualization tool; not yet at the level of VMWare, but it’s getting very close, and esp. for basic day-to-day programming, when all you need is an “alien” test/development system, it’s a very adequate tool to use, and rivals VMWare’s performance quite nicely, and it’s free as in beer.

Continue reading