Using the Standard C++ Library in a Functional style. The standard C++ library offers a number of algorithms that have nearly exact analogues in functional languages, and are used in almost the same way. In particular std::accumulate and std::transform are powerful, and very general, algorithms. In functional programming literature, accumulate is usually referred to as …

Functional Programming in C++ Part 1

Introduction C++ is known to be a multi-paradigmed language. This is often construedto mean you can program in both a procedural and and object orientedstyle. This is too limiting a view. C++, particularly with modernlibrary support, is more than capable of supporting programming inthe functional style. Even without modern libraries like boost, orstd::tr1, the Standard …

Monads, REST and C++ Template Metaprogramming

OK, with that title, I’m sure to please almost no one. If you want to know how to do REST-ful programming in Haskell, or tie REST to C++, move along, there’s nothing to see here. The connection isn’t at the implementation level. Which is the whole point.So what do REST, Monads and (successful) Template Metaprogramming …

Types and Programming Languages: Chapter 4

I’m working through Types and Programming Languages, by Benjamin Pierce.I’m up to somewhere around chapter 13, References, but it’s starting not to make sense. Which means it’s time to back up and do more of the work, instead of just nodding as though I really understand it.One of the things he does is build typecheckers …

Solaris network install using Linux DHCP server

This weekend’s tech project was getting an old Sun Ultra 5 up and running with a new version of Solaris, in this case Solaris Nevada b33, so I can play with toys like opensolaris, dtrace, zfs,etc.This particular machine doesn’t have a cdrom, so in order to get things working I had to do a network …