Need Something Sorted? Sleep On It! -- Kevlin Henney
Sorting algorithms have been thoroughly studied. Kevlin Henney takes an unexpected paradigm journey into sleep sort.
Need Something Sorted? Sleep On It!
by Kevlin Henney
From the article:
A decade ago, I first presented a lightning talk entitled ‘Cool Code’. This short talk evolved into a full talk whose iterations I presented over the next half decade. The focus? Code that, for some reason or other, can be considered cool. For example, code that has played a significant role in historical events, such as the source for the Apollo Guidance Computer [Apollo]. Or code that is audacious – if not seemingly impossible – given its constraints, such as David Horne’s 1K chess [Frogley01]. There is code that is both simple and profound, such as Peter Norvig’s fits-on-a-slide spelling corrector [Norvig16]. And code that demonstrates ingenuity and humour, such as Yusuke Endoh’s Qlobe [Endoh10].
Leaving aside its content for a moment, one of the most interesting things about the talk was its...

std::move can allow the efficient transfer of resources from object to to object. Andreas Fertig reminds us that using std::move inappropriately can make code less efficient.
Is it possible to extend a value type in C++? Alf Steinbach describes how to extend enum values.
Operator overloading. Looks great. Reduces verbosity. Until it doesn’t.
Guarded Suspension applies a unique strategy to deal with mutation. It signals when it is done with its modification.
Recently, our team at Meteksan Defense is upgrading its development environment to use newer versions of many tools and programming languages. One of the more difficult transitions has been the upgrade of our C++11 code base to C++17 for our embedded applications.
I continue my journey with concurrency patterns in today's post. The Thread-Safe Interface fits very well when the critical sections are just objects.