Welcome to Barricane.

We hope you will find what you are looking for.

how to generate an openssl certificate for https

I always forget how to create an openssl certificate, so here it is:

openssl genrsa -out privatekey.pem 1024 
openssl req -new -key privatekey.pem -out certrequest.csr 
openssl x509 -req -in certrequest.csr -signkey privatekey.pem -out certificate.pem
Posted on 24 November 2011.

Google V8 to annotate source with Closure JSDoc Type Expressions

I would a like a new tool to help with Javascript development, both in NodeJS and (possibly) on the browser.

What I want is to be able to run (and/or unit test) a NodeJS app (on the built-in V8). As an extra output I would like a transformed version of the source, annotated with Google Closure JSDoc Type Expressions.

I can't see any technical reason why this would not be possible.

Who will write this? It's probably a few weeks of fulltime work, or more if you don't already know the innards of V8.

Why would it be useful?

  1. It allows the flexibility of untyped development, without the maintenance burden.
  2. A developer will quickly spot any unexpected types, leading to bug fixes.

Please Google, Joyent, or Anyone Else, can you write this for us?

Thanks,

Chris.

Posted on 06 October 2011.

Ludum Dare entry, but I'll take a year to write it.

I'm going to participate the the Ludum Dare October Challenge. Unfortunately I have just 3 hours per week for game development. I don't think there's any chance of meeting the end of the month (12 hours dev), so I'm giving myself a year (150 hours).

The game will be called Anastom, pronounced anAStom, as I have the domain and am not currently using it for anything.

It has the following design constraints:

  • It must be fun.
  • It must be playable within two seconds of typing www.anastom.com
  • It must work in 80% of browsers (no WebGL, but 2D Canvas OK).
  • It must be massively multiplayer.

I have the following ideas:

  • Visibility like Roguelikes.
  • 2D side scrolling platformer, but not 'twitchy'.
  • Puzzles, like Castle Quest (BBC Micro).
  • Solo Instances for some areas, and Group Instances for others.
  • Mixture of Randomly Generated Maps and Set Pieces.
  • Old-school pixellated graphics, maybe 3x or 4x upscaled. (Quicker to design.)

Platform:

  • Client: JavaScript, with Canvas and Socket.IO.
  • Server: NodeJS (JavaScript) with Socket.IO and MySQL.

I'll blog on progress each and every Friday, to keep my motivation up.

Lets see how I do...

Posted on 30 September 2011.

The D Language is Really Practical.

I'd like to take a minute to thank Walter Bright for creating the D programming language.

I had a project, which I had previously written in Python, but which I now needed to port to a more runtime-efficient langauge (a single static executable and obfuscated source are also a bonus for a commercial product).

The standard library (for D 2.0) had all the file a directory manipulation functions I needed, easily as rich as Python and an awful lot easier to use than APR or POSIX.

I had initally attempted the port using C and the Apache Portable Runtime, but I found it hard work after years of Python and Javascript. I quickly got bogged down in memory pools, string handling and shared state.

I decided to give D a try:

  • Running D programs as scripts is as easy as adding '#!/usr/bin/dmd -run' to the top of the source file. This alson must have saved me a few hours.
  • String handling is sane, as is just about everything else in the langauge.
  • Concurrency is well thought out.
  • They've produced a 64 bit compiler, since I last looked a year ago.

There are a couple of issues:

  • I'm still trying to find a Debian Packaging or Autotools Howto for D.
  • You may start to dislike writing C/C++.

Basically, if your now mostly a script programmer and think you need to do go back to C for some lower level work, give D a try.

Posted on 06 September 2011.

Review of 'Node Web Development' by David Herron.

The folks over at Packt have sent me a copy of Node Web Development to review.

I've been using Node in production for eighteen months now, so I am not the target audience for this book, but I am now in a position to have a good overview.

It is a very clear introduction for developers who already have experience of web development.

Even for a developer who has been using Node for some time, it is a useful reference. For example, I was not up to speed on how NPM had changed since the early days, especially the node_modules search paths.

The text covers the creation of a couple of web application in Node and the use of both SQLite and MongoDB as storage back ends. Once you are familiar with async access to databases, using MySQL or Postgres is no huge leap.

There are a couple of important areas of Node development which are not covered, probably due to the short length and introductory nature of this book. These are:

SocketIO: SocketIO is one of the best developments to have been built on top of Node and it is one of the clear advantages of using Node over other languages/frameworks.

Complex async behaviour: When writing and non-trivial application in Node, a developer will soon need to coordinate the dependencies between multiple callbacks. This is one of the more interesting areas of current investigation, proposed solutions include promises, streamline and step.

All in all, a very clear introduction.

Posted on 05 September 2011.