Simple extended attribute support for Go

This afternoon I sat down and polished up the extended attribute library I have been working on for a while. You can find the code and readme on Github.

https://github.com/davecheney/xattr

This has been tested on linux (should work under 5g, 6g and 8g) and darwin (tested under Snow Leopard).

Installation

goinstall github.com/davecheney/xattr

Documentation

godoc github.com/davecheney/xattr

Usage

A example program is provided with the source. The simplest way to compile and install it is

make -C $GOROOT/src/pkg/github.com/davecheney/xattr/example clean install

This will install it to your $GOBIN directory. If you have trouble running this example, make sure there isn’t another xattr somewhere higher in your $PATH.

Before you start

All extended attributes need a file to be associated with. In this example I’m going to create an empty file in my home directory.

touch ~/testfile

Setting an attribute

% $GOBIN/xattr -w username dave ~/testfile

Listing known attributes

% $GOBIN/xattr ~/testfile
username

Printing attribute values

% $GOBIN/xattr -p username ~/testfile
dave

Listing names and values

% $GOBIN/xattr -l ~/testfile
 username: dave

Bash trick ‘o the day

Bash supports the += operator

% echo $PATH
/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
% PATH+=:$HOME/bin
% echo $PATH
/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/home/dave/bin

A new take on artificial scarcity

P34

Sometime in the last week, not one but two of these billboards appeared in the front yards of blocks of units on a street in Ashfield. Surprisingly spartan on details, the board implies that the wizards at Brough Real Estate have made two sets of sellers, buyers and a themselves very happy, an increasingly difficult task in the current climate. Less believable is the fact these properties are directly opposite each other.

Clearly this is a ruse.

With a reported 350,000 properties on the market across the country, the question becomes, who is the audience for this call to action?

Nobody rings a bell at the top of the market

To steal a quote from Liaquat Ahamed’s Lords of Finance the best days of Australian housing bubble may be behind it. As an amateur economist and armchair property speculator I wanted to share my views on this subject.

During the 60s and 70s Ashfield, the formerly Polish, now Chinese migrant, inner west suburb of Sydney succumbed to vast swathes of development which saw the majority of Colonial and Fediterania bungalows replaced by two and three story apartment blocks. Due of their ubiquity and near identical layout, these properties provide an opportunity to study the effects of the Australian housing boom on a particular class of asset; the quintessential two bedroom flat.

Skipping forward a few decades to October 2009, it was a heady time for the Sydney housing market, and it was no different for Vendors in Ashfield. Landlords were dumping unrenovated 2 bedroom units onto the private market for $400,000 a pop. Saturday mornings saw Agents, weighed down with keys, leading platoons of eager DINKYs from inspecting to inspection. Estate agents, banks and solicitors were doing a roaring trade on the back of the dying months of the final extension of the First Home Buyers grant. Those who waited for the governments handouts to cease in the hope that the market would cool were out of luck, twelve months later I watched a 2br flat sell at auction for over $520,000.

However the present day in Ashfield reveals a different picture. The previous weekend I attended two auctions with similar outcomes. The first apartment, a ground floor flat sold for $370,000 to the first, and only bidder. The second, with rubberneckers spilling onto the stairs, was passed in at $451,000 after the vendor bid failed to push the lacklustre bidding above the reserve.

Much has been written about the Australian housing bubble, and I believe the diagnosis to be accurate. Clearly my shoulder surfing a brace of sales does not represent a trend, and more data is needed before I can say the age of the half million dollar Ashfield flat is over.

What is, however, less clear to me, is the prognosis for the price of 70 square meters of real estate in Ashfield.

  • Will the reported 350,000 properties on the Australian market drive down prices, or will they be quietly be withdrawn to await more favourable conditions ?
  • Does the US example of Federally insured non redress loans provide an accurate model for the future of the Australian property market, or should we look to Spain or Portugal for clues ?
  • Which way will interest rates move in the next few quarters ? Would raising them cause a firesale of properties, or would homeowners instead retreat further from the retail market ? Would lowering them continue to support this over inflated market, driving prices higher and with it, increased wage claims ?

 

Netgear Stora as an ARM development platform

About a week ago I posted a request for recommendations for ARM based systems that could be used for Go development. There were some great responses, including the BeagleBoard and the Guru Plug. Being impatient, and in Australia, I ended up getting a Netgear Stora which has turned out to be a great home NAS, and a capable ARM5 development system. This is the same hardware, albeit with less RAM, that ships in the ShivaPlug.

axentraserver(~/go/src) % export MAKEFLAGS=-j1
axentraserver(~/go/src) % hg identify 
546b1fc95dcc+ tip
axentraserver(~/go/src) % time ./make.bash > /dev/null
hg not installed
conflicts: 3 shift/reduce

real    10m48.889s
user    9m15.380s
sys     0m52.480s

Not too shabby, my 8g host (2.8Ghz Celeron) turns around the same build in just under 12 minutes.

Pros

  • Very good value. For less thatn $200 AUD you get a 1.2Ghz Marvel ARM5 CPU, 128mb of ram and a 1Tb Seagate 3.5″ drive (and a slot for a second drive). Online Computer have the 1Tb units for $185.
  • Very hackable. SSH is enabled out of the box, if you know the magic suffix that Netgear, and all users created via the web interface are in /etc/sudoers. The fantastic ipkg system will close the gap between the slimmed down RedHat distribution that Netgear Axentra ship and a GNU buildchain that can bootstrap Go.

Cons

  • 128mb of ram, non expandable. This actually turns out to not be a big deal. The stock install has ~75mb of RAM free while running. Turing off a few options and trimming the daemons Netgear installs can get another 10-15mb back.