You are viewing stonetable

Adam Israel
Recent Entries 
13th-Nov-2014 12:28 am - Making OS X, Go, and Brew play happy

GO and OS X

I’m doing a little hacking with juju actions before they land in a stable release but I ran into some hurdles getting Go working with the brew-installed version. Trying to install Go packages failed with a bunch of ‘unrecognized import path’ errors. Here’s how I fixed it.


Even though you can install Go via brew, there’s more to be done to get it working. Go relies on two environment variables: GOPATH, and GOROOT. GOROOT is the path where Go is installed, and GOPATH is the directory you’ve created for your code workspace (which I’ve defaulted to $HOME/go).  We then need to tell our shell where to find these installed executable and run them first1.

cat << EOF > ~/.bash_profile
# Go go gadget Go!
GOVERSION=$(brew list go | head -n 1 | cut -d '/' -f 6)
export GOPATH=$HOME/go
export GOROOT=$(brew --prefix)/Cellar/go/$GOVERSION/libexec

Now you can run something like to have easier access to docs:

$ go get
$ godoc gofmt

    Gofmt formats Go programs. It uses tabs (width = 8) for indentation and
    blanks for alignment.

    Without an explicit path, it processes the standard input. Given a file,
    it operates on that file; given a directory, it operates on all .go
    files in that directory, recursively. (Files starting with a period are
    ignored.) By default, gofmt prints the reformatted sources to standard


    gofmt [flags] [path ...]

    The flags are:

        Do not print reformatted sources to standard output.
        If a file's formatting is different than gofmt's, print diffs
        to standard output.
        Print all (including spurious) errors.
        Do not print reformatted sources to standard output.
        If a file's formatting is different from gofmt's, print its name
        to standard output.
    -r rule
        Apply the rewrite rule to the source before reformatting.
        Try to simplify code (after applying the rewrite rule, if any).
        Do not print reformatted sources to standard output.
        If a file's formatting is different from gofmt's, overwrite it
        with gofmt's version.

    Debugging support:

    -cpuprofile filename
        Write cpu profile to the specified file.

    The rewrite rule specified with the -r flag must be a string of the

    pattern -> replacement

    Both pattern and replacement must be valid Go expressions. In the
    pattern, single-character lowercase identifiers serve as wildcards
    matching arbitrary sub-expressions; those expressions will be
    substituted for the same identifiers in the replacement.

    When gofmt reads from standard input, it accepts either a full Go
    program or a program fragment. A program fragment must be a
    syntactically valid declaration list, statement list, or expression.
    When formatting such a fragment, gofmt preserves leading indentation as
    well as leading and trailing spaces, so that individual sections of a Go
    program can be formatted by piping them through gofmt.


    To check files for unnecessary parentheses:

    gofmt -r '(a) -> a' -l *.go

    To remove the parentheses:

    gofmt -r '(a) -> a' -w *.go

    To convert the package tree from explicit slice upper bounds to implicit

    gofmt -r 'α[β:len(α)] -> α[β:]' -w $GOROOT/src/pkg

    The simplify command

    When invoked with -s gofmt will make the following source
    transformations where possible.

    An array, slice, or map composite literal of the form:
        []T{T{}, T{}}
    will be simplified to:
        []T{{}, {}}

    A slice expression of the form:
    will be simplified to:

    A range of the form:
        for x, _ = range v {...}
    will be simplified to:
        for x = range v {...}


   The implementation of -r is a bit slow.

Homebrew Gotchas

Homebrew installs the go formula with a bin/ directory, which symlinks to the go and gofmt binaries in libexec/. Other binaries, such as godoc, will be installed to libexec but are not symlinked to bin/. Adding go/$GOVERSION/libexec, instead of go/$GOVERSION/bin, to PATH makes sure we’re looking in the right place, and this setup will survive a version upgrade.

1: It would probably be better to create a script that would toggle the PATH to include/exclude my $GOPATH/bin in $PATH. I’m using this to run the latest cutting edge version of juju, but I can see the need to switch back to using the released version of juju, without having to hack my ~/.bash_profile

[Crossposted from Adam Israel. If you'd like to comment, you can do so either here or there.]

3rd-Sep-2014 05:59 pm - A brief introduction to Juju

I had some concerns about how I was going to integrate posts of a technical nature with my blog, which has been predominantly writing-oriented for several years. What I failed take into account is that many of us who write Science Fiction are armchair technologists. We look at gadgets, scientific breakthroughs and tech policy, and make conjecture about what might come next.

What I talk about is less important than how I talk about it. It’ll be interesting, or not, but no self-rejection.


In one of my previous jobs, I ran a cluster of servers responsible for serving upwards of 1.5 Billion ads/day. I had a half dozen racks of hardware sitting in a data center in Chicago. Some of those servers were from the early days, while others were a few years newer.

When business was good, we’d buy more equipment — servers, racks, switches, electricity, and bandwidth — to handle the traffic. The new business justified the fixed and recurring costs (to buy and lease hardware, and to host the equipment), locked in to a 1-3 year contract.

When business dropped off, and it inevitably did, we were still paying the bills for all of that extra hardware and the associated services.

There’s also an ebb and flow to internet traffic, an inevitable tidal force. We might serve twice as many ads after 9AM EST as we did at 3AM. So you beefed up hardware to handle the daily peaks and pay for the idle costs otherwise.

Almost everyone in the modern world today carries a cell phone. Maybe you buy the latest and greatest smartphone, at a subsidized price, and are locked into a contract, paying every month for the privilege, even for the services you never use. Or you buy your phone outright and pay as you go, only responsible for what you use.

This is where the cloud comes in. You can almost see the Jedi hand wavy motion being made when someone says, “it’s in the cloud”. What is this ethereal thing and where does it live?

The simplified version is that the cloud is simply a large cluster of computers sitting in a data center somewhere. It might be massive, power-consuming supercomputers. It could be a ton of off-the-shelf hardware stringed together. And all of that gear is pieced together with software to run virtual computers, which those companies will the lease out to people like you and me.

There’s no question that the future of business computing involves the cloud. It’s super cost-effective. In may ways, though, it’s still in its infancy.

Here’s where I get to the point, and talk about Juju.

Back when I was managing that cluster of ad servers, we’d cobbled together a mix of shell scripts using ssh and puppet to automate the deployment and management of those dozens of computers. It worked, but was far from ideal, and only worked with our hardware.

Juju is a system that lets you automate the deployment of software, via bundled instructions called Charms, to servers across multiple Clouds, like EC2, Azure, HP, Digital Ocean, or even your own hardware.

Say your awesome website is suddenly getting linked to by the Neil Gaiman and John Scalzi’s of the world, and your site is being crushed under the load. Problem?

No problem. You tell juju you want two more servers, or five or ten. A few minutes later, they’re online and so’s your website. When the slashdot effect has worn off, you can remove those extra servers. Only paying for the time use you needed them.

Scalability and affordability, in a nutshell. And juju is there to help you manage that.

TL;DR: Juju is a cloud orchestration toolkit, to aid in the deployment and manage of services across a variety of cloud providers.

[Crossposted from Adam Israel. If you'd like to comment, you can do so either here or there.]

25th-Aug-2014 09:03 pm - New job!

I am delighted — tickled, in fact — to report that as of last Monday I am employed by Canonical, the company behind Ubuntu Linux.

I’ve joined the Ecosystem Engineering team, part of Cloud Development and Operations, as a software engineer. More specifically, I’m working on Juju, the cloud orchestration tool chain. I’ll be writing charms and documentation, working on optimizations, and helping to make a cool product even cooler.


[Crossposted from Adam Israel. If you'd like to comment, you can do so either here or there.]


For the past few years, I’ve had to manually update the contact information in the header of every Scrivener project I’ve created. It was defaulting to an old email and physical address, but somehow had the correct phone number.

Scrivener can pull your contact information from the OS X application Contacts, if you add the string “(Scrivener:UseMe)” to the notes of your contact card. As it turns out, I had done that already but my card has all of my email addresses (work and home) as well as my current and past physical addresses. In that case, Scrivener just uses the first phone, email, and physical address it finds.

The solution is simple, and doubly useful if you write under a pseudonym. Create a new contact card with the information you want in your manuscript’s cover page. Don’t forget to add “(Scrivener:UseMe)” to the notes section of your new contact, and remove it from the old.

The next time you create a project in Scrivener, it will use your new contact.

[Crossposted from Adam Israel. If you'd like to comment, you can do so either here or there.]

19th-Feb-2014 12:48 pm - SFWA, Accessiblity and Diversity

There’s have been many kerfluffles involving the Science Fiction & Fantasy Writers Association (SFWA). The latest one begin when a former member began a petition over recent changes to the staff and policy of the organization’s flagship publication, the Bulletin. As a result of the current back and forth between factions, one member — a vocal minority — made the suggestion that the bar for membership should be raised. There’s a lot I could say about the current debate(s) going on, but I want to specifically address the idea of accessibility and diversity.

Membership requirements, in general, are a good thing for an organization but should be recognized for what they are: exclusion. To what degree they exclude depends on the type of organization, its goals, philosophies, etc. Billing itself as a :”professional organization for authors of science fiction, fantasy, and related genres”, one would assume the requirements are imposed to limit membership to anyone who has a professional interest in writing science fiction, fantasy, and related genres. Seems simple, but there’s always fine print.

The argument made by Brad R. Torgersen is that to be a more professional organization, SFWA needs to be more exclusionary, with the goal of eliminating “non-professional” writers, thereby raising rates enough money through dues that the organization can then use to hire administration staff and increase benefits to its members.

…impose an annual fiction writing income floor, below which members cannot fall without being placed on the inactive list, and therefore losing the ability to vote and/or participate in the org.

Anyone capable and willing to contributing $500 or even $1,000 U.S. dollars (or more) per year, is unlikely to be an amateur, or a pro-am.

I will say, flat out, this is a bad idea. It’s too exclusionary, and would decrease diversity. In fact, I would argue that SFWA should lower its membership requirements.

For active writers, there are two membership tiers: Active and Associate, both of which require prose sales at a minimum rate of $0.05/word. I would like to see a third tier, for writers who have not yet made a sale to a market able to pay those rates but have demonstrated a commitment to their craft, such as 3 sales at a semi-pro rate, or a cumulative revenue total. Give this tier some limited benefits, such as access to the forum and the bulletin, but not all of the benefits of the higher tiers. Perhaps offer it at a lower yearly rate to adjust for the different benefits.

Or, as has been pointed out to me on Twitter (thanks John and Tim), use the Romance Writers Association (RWA) as a model or inspiration for how to include “non-professional” writers.

By being less exclusionary, the organization will become more accessible to a diverse group of people across income levels, gender, orientation, social classes, etc. The organization would gain new, interesting, and previously under-represented voices in building a future.

Many writers toiling in the semi-pro ranks treat their work with the same professionalism, if not more so, than those currently qualified by SFWA definitions to call themselves such. The previous SFWA administration, under John Scalzi, and the new helmed by Steven Gould, have made great strides in improving the organization as a whole. It should be recognized just how much work it is to retrofit a monolithic steam engine with maglev. I expect the diversification will continue, but I would love to see a bigger change to allow.

[Crossposted from Adam Israel. If you'd like to comment, you can do so either here or there.]

10th-Dec-2013 01:50 pm - Hark, an update!

Hark! Inconsistent blogger has returned with news!

I am pleased to announce that I’ve sold “Aye of the Hagfish” to Goldfish Grimm’s Spicy Fiction Sushi. It should be appearing online early 2014. This will be my second appearance in the magazine (the first being Control, in their debut issue).

I’m down to one story in circulation, and no new short stories finished this year, but for good reason! I finished the first draft, first read-through, and have begun developmental edits on the novel tentatively titled (but almost guaranteed to be renamed) “Black Mirror”.

We’re settling in for a long winter here at casa de Israel-Redman. The cupboards are stocked with tea, coffee, and non-perishable foodstuffs. Candles are lit, the fireplace channel is giving us the proper ambiance, and we’re getting busy with the making of art and stuff. Come spring, we’ll come out of our self-imposed hibernation with some fun new things to show off.

[Crossposted from Adam Israel. If you'd like to comment, you can do so either here or there.]

19th-Sep-2013 04:12 pm - 111 Weeks

To be exact, it’s been 783 days since we filed for my Canadian Permanent Residence and I am happy to announce that it is official done. We have just walked out of the Immigration Centre in Windsor, Ontario, Social Insurance Number in hand.

I guess this makes me an expatriate; an American Citizen permanently living abroad, which is kind of cool. I’ve been thinking a lot about getting a tattoo to commemorate the experience. More on that later.

There’s been a lot of stress involved around this process, most notably the difficulty traveling back to the US. In a few weeks, when I have the official card in hand, I’ll be free to cross the border without fear of being turned away and having to restart the immigration process. That’s going to be a cathartic experience, finally going back to visit my family and friends.

Now that I’m all official, we can start thinking about normal, grown-up things like buying a house, and getting all of our stuff out of storage back in Illinois.

[Crossposted from Adam Israel. If you'd like to comment, you can do so either here or there.]

21st-Jun-2013 10:11 pm - Clarion Write-a-thon

It should be no surprise to anyone who knows me that the Clarion Writers Workshop is a thing near and dear to me. Attending the six-week workshop in 2010 was a milestone in my writing career. The annual write-a-thon, where writers commit to writing goals and ask friends, family,and strangers to pledge money to go towards funding the workshop.

Saying “please give money” is something I do on very rare occasion, but this is something worthwhile. The Clarion Workshop is one of very few programs in the world for writers of genre fiction. Hundreds of students apply every year but only a handful get in. The instructors are among the most experienced authors in the field. Donations go to keeping the workshop running and supplying scholarships for students in need.

The write-a-thon runs for six weeks, along side the workshop in San Diego. It’s an act of solidarity with this years class of writers and, as extra motivation, a public accountability of my goals.

This year, I will spend the write-a-thon finishing my first novel. I’ll be writing, by hand, 30,000 or so words, and transcribing the results into Scrivener along with the first 50,000. By the end, I will have a complete draft ready to be ripped apart, revised and rewritten. I’ll even blog regular progress updates, which is more than I normally manage.

If you can sponsor me, one dollar or ten, you will have my gratitude and the satisfaction of knowing you’re making a difference in the life of up and coming writers of science fiction and fantasy.


[Crossposted from Adam Israel. If you'd like to comment, you can do so either here or there.]


I’ve always liked stories about mundane things. Everyday people who might be ignored or worse, shunned — garbage men, teachers, farmers, butchers, prostitutes, factory workers — who find themselves in extraordinary circumstance and rise up to the challenge.

The annals of history are filled with stories of the famous, the successful, the victors. Finding tales about those broke their backs to make a living is harder. It’s not glamorous work. No one does it to become rich or powerful. They’re born into it, forced into it, marginalized into it. Their stories deserve to be told, too.


There’s a reason why Crossed Genres is of my favorite small presses. They have a long history of supporting diversity in it’s many forms. Their latest project is Long Hidden: Speculative Fiction From the Margins of History, and it could use your help. They’ve made their initial Kickstarter goal so the anthology, edited by Rose Fox (who I have tons and tons of respect for) and Daniel José Older (who I’m sure is equally awesome), but still have a bit to go for their stretch goals.

They are nearing the next goal, to add another 10 stories/50,000 words to the anthology. The bigger the book, the more diverse it will be. A no-brainer, right?

I think we can push it further. The third stretch goal will add original black & white art to every story, and if they make it to $50,000, the last stretch goal, they will produce a professional quality audio book.

I’m all too familiar with Kickstarter fatigue. I feel it myself. This one is from an established publisher; Bart and Kay have been around for a while and have a proven track record behind them. If you’re interested in the kind of stories they’re telling, please give them a look.

[Crossposted from Adam Israel. If you'd like to comment, you can do so either here or there.]

13th-Mar-2013 06:28 am - 9

For months, we kept the animated film “9″ (2009) on the DVR. I kept telling myself that I’d sit down and watch it on the weekend, and inevitably being too distracted to do so. We came home a few nights ago and discovered the DVR had deleted several of the oldest recordings, including 9. That made me sad, because I really did intend on watching it soon. Kind of mad, I fired up Netflix and watched it that night.

A rag doll that awakens in a post-apocalyptic future holds the key to humanity’s salvation.


[Warning: spoilers ahead.]

9 is a visually beautiful film with a haunting story of survival and redemption but at only 79 minutes, I don’t know if it had enough time to fully develop the characters to their full potential.

My first reaction after watching was that I wanted to see it again. I want to get to know the characters more. Especially the ones that had the least screen time, like 2, who first discovers 9, but it whisked away in the jaws of the cat monster a short time later. Most of the story focuses on 9, the last of the dolls to awaken.

There’s a subtlety to the storytelling, I think, that I hope will come through more in rewatching. The story of humanity’s last chance of redemption, through the journey of its destroyer’s soul, split into tiny rag doll representations, is a delightful example of my favorite kind of genre story.

It’s not a perfect movie but it was enjoyable and made me think. I set out to Twitter immediately afterwards to find someone to talk to about it. That’s a win in my book, at least.

[Crossposted from Adam Israel. If you'd like to comment, you can do so either here or there.]

This page was loaded May 28th 2015, 7:52 pm GMT.