thoughts…

rants and bookmarks about programming stuff…


SHARK – C++ machine learning library

SHARK is a fast, modular, feature-rich open-source C++ machine learning library. It provides methods for linear and nonlinear optimization, kernel-based learning algorithms, neural networks, and various other machine learning techniques (see the feature list below). It serves as a powerful toolbox for real world applications as well as research. Shark depends on Boost and CMake. It is compatible with Windows, Solaris, MacOS X, and Linux. Shark is licensed under GPLv3…”

http://image.diku.dk/shark/sphinx_pages/build/html/index.html

 


Common Pitfalls in Writing Lock-Free Algorithms

“Formally, a multi-threaded algorithm is considered to be lock-free if there is an upper bound on the total number of steps it must perform between successive completions of operations.
The statement is simple, but its implications are deep – at every stage, a lock-free algorithm guarantees forward progress in some finite number of operations. Deadlock is impossible…”

http://developers.memsql.com/blog/common-pitfalls-in-writing-lock-free-algorithms/

 


John Carmack’s Comments On C/C++

“John Carmack, the veteran game programmer that co-founded id Software and was the lead developer on the id Tech engine and their most popular game titles, has shared some new opinions on C/C++ programming as it pertains to the id Tech game engine…”

http://www.phoronix.com/scan.php?page=news_item&px=MTI3NDQ

http://kotaku.com/5975610/the-exceptional-beauty-of-doom-3s-source-code?post=56177550


The Unreasonable Effectiveness of C

“For years I’ve tried my damnedest to get away from C. Too simple, too many details to manage, too old and crufty, too low level. I’ve had intense and torrid love affairs with Java, C++, and Erlang. I’ve built things I’m proud of with all of them, and yet each has broken my heart. They’ve made promises they couldn’t keep, created cultures that focus on the wrong things, and made devastating tradeoffs that eventually make you suffer painfully. And I keep crawling back to C…”

http://damienkatz.net/2013/01/the_unreasonable_effectiveness_of_c.html


Concurrent Hello World in Go, Erlang and C++ (Mindroid!)

“This week I started taking a deeper look at the Go programming language since I am somewhat addicted to scalability, reliability, concurrency and message passing :-) . The first thing I always do when playing around with a new software platform is to write a concurrent “Hello World” program. The program works as follows: One active entity (e.g. thread, Erlang process, Goroutine) has to print “Hello ” and another one “World!\n” with the two active entities synchronizing with each other so that the output always is “Hello World!\n”. Here is the concurrent Hello World program in Go, Erlang and in C++ using the Mindroid framework…”

http://himmele.blogspot.de/2012/11/concurrent-hello-world-in-go-erlang.html


C++11 and Boost – Succinct Like Python

“C++11 is the new standard of C++ that was released last year. Yes, I know that is now 2012, but compilers are just now starting to catch up and implement everything, though AFAIK there is not yet a fully compliant compiler.

With a combination of C++11 and the Boost library, I think that it is possible to write code in a style that is almost as painless as in a modern dynamic language like Python. I also think that is not so well known how much C++ has changed for the better, outside the C++-community. Hence this post.

As an example, I have taken the first interesting excercise from Dive into Pythonfileinfo.py, and converted it to C++, trying to remain as faithful as possible to the original code.

fileinfo.py implements a simple MP3-metadata printer, which is built so that it will be easy to add other metadata printers in the future. For the Python code, see the previous link and for my commented C++ code see here…”

http://fendrich.se/blog/2012/10/31/c-plus-plus-11-and-boost-succinct-like-python/


Cons lists in C++

“Lisp and other functional languages have purely-functional lists; that is, lists that cannot be changed; this leads to a very different style of programming, and can save memory and time, since parts of the list can be shared among several lists; with the new std::shared_ptr in C++, implementing such a list is relatively simple.

Although lisp lists allow mixing of types (and so are equivalent to binary trees), we will implement typed lists, which allow elements of only one type, using templates. We want to provide 4 functions:

  • cons, which takes an element and a list, and produces another list, containing that element as its first element (and the passed list as the elements after the first element; notice we’re going to share this passed list).
  • car, which takes a list and returns its first element (sometimes called head).
  • cdr, which takes a list and returns another list, the list minus the first element (sometimes called tail).
  • isEmpty, which returns true if the list is empty, false otherwise…”

 

http://programminggenin.blogspot.com/2012/10/cons-lists-in-c.html

Follow

Get every new post delivered to your Inbox.

Join 514 other followers