-
Recent Posts
Categories
Archives
- August 2016
- June 2016
- April 2016
- February 2016
- October 2015
- May 2015
- January 2015
- November 2014
- October 2014
- September 2014
- August 2014
- July 2014
- April 2014
- March 2014
- February 2014
- December 2013
- September 2013
- August 2013
- July 2013
- June 2013
- May 2013
- April 2013
- March 2013
- February 2013
- January 2013
- August 2012
- June 2012
- April 2012
- January 2012
- December 2011
- November 2011
- October 2011
- August 2011
- July 2011
- December 2010
- November 2010
- September 2010
- July 2010
- June 2010
- May 2010
- March 2010
- December 2009
- November 2009
- October 2009
- August 2009
- July 2009
- June 2009
- May 2009
- August 2008
- June 2008
- May 2008
- March 2008
- February 2008
- December 2007
- November 2007
- October 2007
- August 2007
- June 2007
- May 2007
- March 2007
- November 2006
- August 2006
- July 2006
- February 2006
- October 2005
- September 2005
- July 2005
- June 2005
- May 2005
- April 2005
- March 2005
- December 2004
- June 2004
- March 2004
- February 2004
- December 2003
- October 2003
- June 2003
Meta
Category Archives: Snippet
IEEE-754 brain teaser
Here is a small programming brain teaser for the weekend: Assume uf is an unsigned integer with 64 bits that holds the IEEE-754 representation for a binary floating point number of that size. The questions are:
Efficient XPath for Go
This week I found some time to work on another small spin-off from the juju project at Canonical, and I’m happy to make it openly available today: the xmlpath package, which implements an efficient and strict subset of the XPath … Continue reading
Posted in Design, Go, Snippet
Leave a comment
Exceptional crashes
Last week I was part of a rant with a couple of coworkers around the fact Go handles errors for expected scenarios by returning an error value instead of using exceptions or a similar mechanism. This is a rather controversial … Continue reading
Posted in Architecture, Article, C/C++, Design, Go, Python, Snippet
16 Comments
Baby feeding statistics with R
Our son Otávio was born recently. Right in the first few days, we decided to keep tight control on the feeding times for a while, as it is an intense routine pretty unlike anything else, and obviously critical for the … Continue reading
Good concurrency changes the game
A long time before I seriously got into using distributed version control systems (DVCS) such as Bazaar and Git for developing software, it was already well known to me how the mechanics of these systems worked, and why people benefited … Continue reading
Posted in Architecture, Design, Go, Project, Snippet
5 Comments
Death of goroutines under control
Certainly one of the reasons why many people are attracted to the Go language is its first-class concurrency aspects. Features like communication channels, lightweight processes (goroutines), and proper scheduling of these are not only native to the language but are … Continue reading
Posted in Architecture, Design, Erlang, Go, Project, Snippet, Test
8 Comments
Efficient algorithm for expanding circular buffers
Circular buffers are based on an algorithm well known by any developer who’s got past the “Hello world!” days. They offer a number of key characteristics with wide applicability such as constant and efficient memory use, efficient FIFO semantics, etc. … Continue reading
Vector clock support for Go
One more Go library oriented towards building distributed systems hot off the presses: govclock. This one offers full vector clock support for the Go language. Vector clocks allow recording and analyzing the inherent partial ordering of events in a distributed … Continue reading
Posted in Architecture, Cloud, Go, Project, Snippet
Leave a comment
Integrating Go with C: the ZooKeeper binding experience
ZooKeeper is a clever generic coordination server for distributed systems, and is one of the core softwares which facilitate the development of Ensemble (project for automagic IaaS deployments which we push at Canonical), so it was a natural choice to … Continue reading
Posted in Architecture, Article, C/C++, Go, Project, Snippet
3 Comments
Removing seatbelts with the Go language for mmap support
Continuing the sequence of experiments I’ve been running with the Go language, I’ve just made available a tiny but useful new package: gommap. As one would imagine, this new package provides access to low-level memory mapping for files and devices, … Continue reading
Posted in Architecture, Go, Python, Snippet
8 Comments