A list of amazingly usefull linux commands

20.11.2011 Leave a comment
Categories: Uncategorized

Algorithm is not

30.09.2011 Leave a comment

A presentation about maze generating algorithms found on HN. Not only it covers a number of graph theory algorithms but also is notable for interesting slide-based navigation. Canvas is used to illustrate how different approaches work. The html page is surprisingly concise and nifty.

Categories: Uncategorized

Steve Yegge on Properties design pattern

26.07.2011 Leave a comment

I have read Steve Yegge’s blog entry on Properties pattern. He claims that the pattern is sometimes called Prototype pattern, but the Prototype lacks flexibility which makes Steve’s idea cool. Essentially it’s like objects without a class. If it is also possible to store functions (lambda expressions?) in the properties so that not only values but also behavior is flexible then possibilities are endless. JavaScript seems to have extensive support for this entire way of design, maybe it’s a way to properly learn it?

Article also mentions a gnu perfect hash implementation.

Categories: Uncategorized

Resource Acquisition Is Initialization

06.05.2011 Leave a comment

Short but to-the-point presentation about how to properly manage resources in C++ and Java can be found here.  In summary:

  • In C++ use destructors, you will get safe and succinct code;
  • In Java use the Dispose pattern (a try/finally block right after creating each resource), you will get safe and ugly code.

Also nice quote: “if PHP gets something right before your language does, you should reassess your life goals.”

Categories: Uncategorized

Common errors in 64 bit programs

31.03.2011 Leave a comment

A collection of common errors C++ resulting mostly from recompiling them from 32 to 64 bit, brought to you by Intel, can be found here.

Categories: Uncategorized

Parallelism versus concurrency

27.03.2011 Leave a comment

As ISO C++ Committee is adding lambda expressions to the language, Robert Harper from Carnegie Mellon University argues that functional programming can hide concurrency complexities from the programmer and allow the runtime environment to take care of them. This seems like the right thing to do – in the runtime the number of available processors is known and if the algorithm can be changed then to take advantage of it, it’s a good thing.

I wonder how one can write a compiler which implements this idea – should all tasks be represented as “batches of work” with known input and output parameters and known graph of dependencies between them? That could lead to even better optimization at processor scheduler level. Instead of distributing processor time between all threads (some of which can be waiting for something) it could start the “batch of work”/thread when it has all data needed to perform it’s computation.

Categories: Uncategorized

C++0x final draft is approved

27.03.2011 Leave a comment

Bjarne Stroustrup maintains a FAQ on the matter here. Some of the features include:

  • auto keyword to deduct a type from an initializer at compile time, especially useful in template programming;
  • range for statement;
  • calling a constructor from another constructor’s initializing list (no more init() functions!);
  • Lamba expressions – syntax seems rather obscure;
  • unique_ptr and shared_ptr – improved auto_ptr and counting pointer, respectively;
  • Interface for garbage collection – it is now possible to declare an object reachable or say that a memory region contains no pointers;
  • threads and locking mechanisms (at last!), including atomic operations;
  • regular expressions.
Categories: Uncategorized