Redecentralize 15

Redecentralize 2015 collage from the Hi Project

I’ve been on the edges of Redecentralize for a while now.

I watched with interest when Ross started compiling the Alternative Internet list back in 2013. Even though my only contribution was to somewhat snarkily add Books to the list, it was, and remains a fascinating list of new technologies, the impact of which we won’t fully understand for a long minute yet.

A little later I sat in a downtown Geneva bar with Ira, Ross and Francis, discussing Ben Franklin and his habit of founding charter based civic institutions – the backdrop to the holy Redecentralize trinity of Privacy, Resiliance & Fun taking form.

At the tail end of 2013 – as the Snowden revelations just kept on coming, and we all started to internalise the fact that we were living in an international surveillance state of hitherto unimaginable pervasiveness – Redecentralize started to form itself into a community.

There were regular meetups in London, full of smart people who came together over a fascination with fresh developments in decentralizing tech, and a shared belief that somehow things could be different.

Although I may have turned up to the meetings – even helped to book rooms – I was only ever a tourist.

More of that later though.

Because just a few weeks ago, the Redecentralize community gathered itself in Soho, London for a full blown two day conference – pulled together from nothing in just a couple of months thanks to the heroic volunteer efforts of Ira, Blaine, Jeremy, Erika, & co.

What even is a Redecentralize?

The first thing that strikes you is the sheer breadth of the Redecentralize movement. Self hosted email, political theory, blockchains, backup, web standards, journalism, messaging apps and much more besides.

As is the case with all broad churches, this can make it hard to figure out what exactly is bringing all of these things together. Talking to people over the weekend, the two most common seemed to be curiosity and politics.

For some, Redecentralize is interesting because much of the tech is so new – and for them, the intellectual exercise is simply fascinating.

Point at a thing and then ask
“What happens if I Blockchain that?”

(Feel free to substitute Distributed Hash Table, IPFS, et cetera for Blockchain.)

For most of the rest, the motivation seems to stem from a deep unease with the way in which our societies are organised. A feeling that the individual is disenfranchised, that we are less equal, less autonomous than we should be.

Technology has a profound ability to alter these structures – to re-write the rulebook. For people searching for a way to increase autonomy and reduce inequality, decentralization technologies often feel like they have the potential to be the early building blocks.

Which is where I start to get interested – for the most part I could care less about the technical details of decentralization tech.

But, where is the button?

One of the interesting things about this space – with such a deeply philosophical-political motivation for it’s existence – was the almost complete absence of conversations operating on those levels.

Rather, we seemed to spend our time dwelling on the How, without first setting out Why. When we jump straight to the hows of technology, it makes it hard to figure out what this is for – it leaves us asking So what?

I think that’s what Ade was getting at when she exclaimed:

If we’re going to help people, we really need to stop with the fetishization of complexity and technical details.

My paraphrasing – apologies for errors therein

This is where something like Redecentralize as institution could help out redecentralization as movement.

Going beyond mapping the space of emerging decentralization technologies and popularising them to a wider audience, the value of bringing people together at events like Redecentralize 2015 is unlikely to be sharing the technical details of protocols, platforms or standards. Rather, it affords the opportunity to debate the deeper questions, to figure out what motivates us, what change we want to see in the world, and why that world might be better.

So what.

So that’s what I want to see more of at the next event.

The so what track. Which would ban acronyms, and encourage us to forge alliances with people who want to see the same changes in the world as we do.

Here’s what the schedule might look like:

  1. Autonomy – a primer: A brief history of the moral and political philosophy of autonomy, what it means for us in everyday life, and how we can achieve it.
  2. How to talk about the ethics of tech: All technology is created, and operates within an ethical famework. Sometimes explicitly, sometimes implicitly. As a collective, technologists don’t do well at talking about that context. Let’s try and find some better ways to talk about the moral choices we make when we build things.

  3. Why Decentralize?: A group exploration of when it helps to decentralize, and why. Understanding the dangers of centralization, as well as what you lose when you decentralize.
  4. Defending Decentralization: Plenty of technologies that look like they disrupt existing power structures in a way that makes us more equal have the potential to create dynamics of power just as polarised as the things they “disrupt”. How do we design social and legal governance structures that protect us against future power grabs?

Maybe that sounds like it could be your kind of thing? (Suggestions for more here very welcome!) If so, then maybe I’ll see you at Redecentralize 2016…

I’ve been doing a lot of Javascript lately, which has naturally led to a whole lot of trips down the .emacs rabbit-hole

So, here are the steps you need to turn OOTB Emacs into the perfect environment for working on Javascript:



First up, you’re going to want decent auto-completion, so install the straightforwardly named auto-complete-mode. Due to some mode-name aliasing that goes on in the Emacs23 javascript mode, You’ll need to make sure it can find the relevant Javascript dictionary so

cd path/to/auto-complete/dict
ln -s javascript-mode js-mode

and then add to your .emacs:

(add-to-list 'load-path "~/path-to/auto-complete")
; Load the default configuration
(require 'auto-complete-config)
; Make sure we can find the dictionaries
(add-to-list 'ac-dictionary-directories "~/emacs/auto-complete/dict")
; Use dictionaries by default
(setq-default ac-sources (add-to-list 'ac-sources 'ac-source-dictionary))
(global-auto-complete-mode t)
; Start auto-completion after 2 characters of a word
(setq ac-auto-start 2)
; case sensitivity is important when finding matches
(setq ac-ignore-case nil)

You now have auto-completion for all variable names in all open Javascript buffers, as well as for standard syntax words (setTimeout, parseInt, onFocus etc).


Not content with that, we’ll also want some kind of intelligent snippet package right – how many times do you really want to type all those semicolons and curly braces? Once is good for me.

The excellent Yasnippet provides this (check out the youtube demo if you’ve not come across it before)

Once you’ve got that downloaded and installed, you’ll want some Javascript snippets to load in, the ones I use, for standard Javascript and jQuery can be downloaded from here, and then the directory provided by that tarfile needs to go in yasnippet/snippets/text-mode

So for our .emacs:

(add-to-list 'load-path "~/path/to/yasnippet")
;; Load the library
(require 'yasnippet)
;; Load the snippet files themselves
(yas/load-directory "~/path/to/yasnippet/snippets/text-mode")
;; Let's have snippets in the auto-complete dropdown
(add-to-list 'ac-sources 'ac-source-yasnippet)

Syntax Checking


One of the problems with Javascript programming is that the feedback loop for syntax errors is *slow* – if you’re working with the web you have to wait for a whole pageload. So we’ll want on-the-fly error checking.

Kevin Turner originally wrote Lintnode, which runs a lighthweight node.js server that passes your file to Douglas Crockford’s JSLint to integrate with Flymake – the Emacs solution for on-the-fly syntax checking. The fork I’m currently maintaining at Github contains some enhancements such as automatic initialization and JSLint options passed from Emacs that the original has yet to merge in. Given that JSLint frequently complains about things that you might like it to er, not complain about, the ability to change the options with the lintnode-jslint-excludes variable makes this far more useable.


Install node.js and npm (The package manager for node)

Get lintnode and the dependencies

git clone
cd lintnode
npm install express connect-form haml underscore

Then we need this in our .emacs:

(add-to-list 'load-path "~/path/to/lintnode")
(require 'flymake-jslint)
;; Make sure we can find the lintnode executable
(setq lintnode-location "~/path/to/lintnode")
;; JSLint can be... opinionated
(setq lintnode-jslint-excludes (list 'nomen 'undef 'plusplus 'onevar 'white))
;; Start the server when we first open a js file and start checking
(add-hook 'js-mode-hook
          (lambda ()

Syntax errors will now be given a red background without having to leave the comfort of Emacs.

Even better, if we install the Flymake Cursor package, we get the error message in the minibuffer when the cursor is on a line with an error.

Easy Mistake!

Get the source from and then add to your .emacs:

(add-to-list 'load-path "~/emacs/minor-modes")
;; Nice Flymake minibuffer messages
(require 'flymake-cursor)


As Jesse and Magnar point out in the comments, it’s probably a better idea to not exclude ‘undef from the jslint errors, but rather to declare global variables at the top of your .js file

 /*global $ */

This way you can let jslint know about other libraries you are using, but still get the checks for undefined variables in your own code.

Code folding

Underscore outline

Especially if you’re dealing with large projects, the ability to hide portions of code can be great for maintaining focus. Emacs comes with this built in, but you have to enable it, so returning to our .emacs:

(add-hook 'js-mode-hook
          (lambda ()
            ;; Scan the file for nested code blocks
            ;; Activate the folding mode
            (hs-minor-mode t)))

This means that when your cursor is in the function…

var Foo = 42;
addFoo = function(num){
    // Let's add the meaning of life to
    // our `num` - it'll be fun!
    var meaningful;
    meaningful = num + Foo;

… and you M-x hs-hide-block, the function turns into:

Var Foo = 42;
addFoo = function(num){...};

To my taste the default keybinding of C-c @ C-h to hide blocks is somewhat perverse, so I’d recommend this in your .emacs:

;; Show-hide
(global-set-key (kbd "") 'hs-show-block)
(global-set-key (kbd "") 'hs-show-all)
(global-set-key (kbd "") 'hs-hide-block)
(global-set-key (kbd "") 'hs-hide-all)


Javascript Console

Having a REPL for the language you’re working with close to hand is basically required for me to enjoy working with it. Now that we’ve installed node.js, though, we can have us a Javascript console inside Emacs with js-comint

Once you’ve grabbed the file, your .emacs should have:

(add-to-list 'load-path "~/path/to/js-comint")
(require 'js-comint)
;; Use node as our repl
(setq inferior-js-program-command "node")
(setq inferior-js-mode-hook
      (lambda ()
        ;; We like nice colors
        ;; Deal with some prompt nonsense
        (add-to-list 'comint-preoutput-filter-functions
                     (lambda (output)
                       (replace-regexp-in-string ".*1G\.\.\..*5G" "..."
                     (replace-regexp-in-string ".*1G.*3G" ">" output))))

You can then run a Javascript REPL with M-x run-js and also send portions of files by selecting them and then running M-x send-region. Neat.

By way of conclusion

There are a few other tweaks that make my Javascripting just that little bit nicer, but they’re more personal Emacs setup than anything specific to Javascript. So, there you have it, the perfect Javascript editing environment.

Love regards etc

I’m pleased to announce the first beta ‘release’ of Pony Mode, a minor mode for working on Django projects in Emacs.

This mode provides integration with the django management commands within emacs, as well as test integration, a minor-mode with syntax highlighting for editing templates, will determine whether you are using Fabric or Buildout, as well as much more!

This mode is under active development, so please file any bugs at the Github page, and feel free to provide any feedback/feature requests etc.

Current features include:

  • Run dev server in an emacs buffer [C-c C-p r]
  • * Checks to see if runserver_plus is available
  • * If not uses in-built runserver
  • Jump to current project in browser (start server if required) [C-c C-p b]
  • Run test case at point in buffer [C-c C-p t]
  • Run tests for current app in buffer [C-c C-p t]
  • Run Syncdb on current project
  • Management commands for current project in interactive buffer
  • South integration – run south convert, schemamigration, migrate
  • Run django shell in buffer [C-c C-p s]
  • * Checks for shell_plus
  • * If not defaults to shell
  • Fabric integration [C-c C-p f]
  • Startapp and dumpdata on current project within emacs
  • Database integration with Emacs sql-mode interactive buffer [C-c C-c d
  • Django Template minor mode with syntax highlighting for django
  • template tags

  • Snippet collection for django
  • generate tags table for project
  • run manage commands in interactive buffer
  • Buildout integration
  • Generate TAGS table for project to enable quick navigation
  • Jump to template at point or from editing view [C-c C-p g t]

Grab it while it’s hot!

Popper: Rulers

It appears to me madness to base all our political efforts upon the faint hope that we shall be successful in obtaining excellent, or even competent rulers.

The Open Society & It’s Enemies – Popper