technology from back to front

Archive for June, 2013

One thing and one thing only

Package dependencies appear in many ways, some more surprising than others. Let’s see what we’ve recently dug up in the trenches.

Read more…

by
Frank Shearar
on
30/06/13

Tail calls in functional languages aren’t always a good fit.

Recently I’ve started playing with Haskell a little more seriously, and I’ve been toying with the idea of using it to calculate approximated percentiles over streams of numerical data, as found in the histograms from Coda Hale’s well known metrics library. The first step in this process is picking out a representative sample of the input data, as described in the paper Random Sampling with a Reservoir. But in the course of writing the code, I learnt a couple of things that seemed to be worth sharing.

Read more…

by
Ceri Storey
on

Managing multiple GitHub repositories

We all know GitHub is a fantastic way to collaborate on software. It has a fairly basic issue tracker, but it serves most purposes well enough. But if your code base is spread across several repositories, it can be difficult to know how you’re doing, from a management perspective. Octoherder can help with that.

Read more…

by
Frank Shearar
on
27/06/13

NuGet: Fetch missing or out of date packages on build

NuGet is a package manager for the .NET world. At its core is an API that will take a set of assemblies that you are interested in and download any that are new to a specified folder. There is then a Visual Studio plug-in that uses a convention-based approach to adding new packages to your project. It creates a folder called “packages” in your solution, and a packages.config file in each project that makes use of NuGet. When you use the GUI to add a new package to a project, it updates the config file, and then pulls down the binaries and adds them to the project.

And of course, if the binaries are missing at build time it looks at that config file and pulls them down again. Wait, it doesn’t do that? Not only does it not do that, it’s not at all clear (to me at least) how to even trigger a refresh of the binaries manually.

This is because using NuGet and then committing the binaries to your source control is the developers’ recommended way of using NuGet. Which is Not Good.

Anyway, it’s an easy fix. Add this line to the “Pre-build event command line” for each project that makes use of NuGet. (Oh, and make sure that NuGet is on your PATH)

nuget install $(ProjectDir)\packages.config -OutputDirectory $(SolutionDir)\packages

And you’re away!

The “Pre-build event command line” option can be found in project properties in the “Build Events” tab.

by
Martin Eden
on
03/06/13

Search

Categories

You are currently browsing the LShift Ltd. blog archives for June, 2013.

Feeds

Archives

2000-14 LShift Ltd, 1st Floor, Hoxton Point, 6 Rufus Street, London, N1 6PE, UK+44 (0)20 7729 7060   Contact us