JSConf EU – Day 1

Back home now after a busy day at JSConf EU, brain is pretty melted due to a lot of good talks, so will make this a quick one.

Three things really stood out for me today.

Firstly, Cloud9 IDE. This is a browser based JavaScript IDE, and it looks fantastic. With no setup or configuration needed it lets you just start writing NodeJS directly from your browser. The lovely guys even gave me a premium account free for 1 year! I am going to sign up and start hacking away as soon as I get a chance.

Secondly, even though the Arduino talk was a bit, er, ramshackled, they did talk about the Raspberry Pi. This is a tiny (and I mean tiny) ARM box running Linux. It should be available in November some time, which will be perfect timing for a birthday present to myself!

Finally, Emscripten is very exciting. Emscripten is a compiler that takes bitcode and turns it into JavaScript. From what I understood, this is what made repl.it possible, which I saw yesterday in Hacker News and thought was so cool I bookmarked it!

As there were two tracks I did miss a bunch of talks, but I’m sure they will be availble on the website soon.

All in all, good stuff, tiring (especially as some little madam decided to wake up at 5am) but brain is now firing off with a bunch of possibilities!

JSConf.eu Tomorrow = Huzzah!

This is just a quick post as I’m off to bed for an early night’s sleep. JSConf EU is tomorrow and am one of the lucky few who have in their posession a “golden ticket” to attend. It’s  a jam-packed event starting at an unaturally early 8am! Do they know this is Berlin?! You can’t even buy breakfast at 8am on a Saturday here!

I have high hopes for the conference. Last year I didn’t even attend the main event, just the pre-party on the Friday night and still came away with a load of ideas! One conversation lead me to completely rewrite major parts of the Jabbakam system. Who knows what new thoughts will spark in my head when I actually go to the real thing?

For updates, follow me on Twitter.

NodeJS: Experiments with Processes

I’ve been hacking about with NodeJS a lot recently, and lately my attention has turned towards spawning child processes. Luckily NodeJS makes this very easy to do, and also the documentation is pretty good.

What I have been working on is having a single parent process that runs constantly in the background, and this parent is responsible for child processes which actually do the work. One thing I found particularly interesting was how the parent can handle a child crashing, and also what happens to the children when the parent is killed. Below is the culmination of my hackings, it comprises of two simple scripts, a child script, and a parent. I have committed them to my GitHub account, so feel free to clone, fork, hack or whatever.


PHP: It’s not you, it’s me

This is a minor whinge, and I apologise for that. I don’t post for weeks, and when I do: whinge; moan; complain (not that I’d particularly happy about conforming with the whinging pom sterotype).

Anyway. this is about PHP.

Frankly PHP, you’ve served me well. I remember being pried away from Perl when you were only 3. With 4 you had me, and 5 I thought it couldn’t get better. But after 13 years of you being my primary language, I’m sorry to say that I’m going to have to move on.

It’s not you, it’s me.

Yes I know you have some spangly new namespaces and finally ridding yourself of your childish toys, but that’s not enough for me anymore. I’ve been dabbling with other languages. Node, Python, Lisp, Haskell and indeed Lua* and, well, frankly they are more fun. Sure, I’ll visit, especially as Jabbakam, Live Unsigned and Doolali are all mainly written in PHP, but I’m sorry to say, and how do I put this delicately… you’re just not exciting any more.

So, whilst this is not goodbye, it is an auf wiedersehen.

To paraphrase: so long PHP, and thanks for all the fish.

* Footnote: my brand spanking new daughter is called Lua!

Testing Charm, a console based blogging application

One of my favourite blog is Motho ke motho ka botho. It’s all about Linux and getting the most out of old and low powered machines. As you probably expect, it heavily promotes console based applications – which is great for me and my continual search for lightweight efficiency (read as happily playing about with new things and possibly not getting too much done).

In the list of software is a little application called Charm. This is a console based publishing tool for (amongst others) WordPress. Well, I had to give it a go – which is exactly what I am doing right now. It is pretty simple to set up, and fortunately allowed me to switch my editor from Vim to Emacs (and start flamewares…now).

I still have to have a good poke around, I don’t know if it can schedule posts, or save as drafts etc etc, but so far it looks pretty good. I also want to test out Emacs’s Weblogger Mode, the quest for my console based utopia continues.

Live Unsigned Server Stack

Disclaimer: this post is definitely sponsored by 6sync – they bake delicious virtual servers.

As mentioned in a previous post, the Live Unsigned website is now very generously hosted by 6Sync.

This is great for a couple of reasons. Firstly, Live Unsigned has a decent server in which to grow. Secondly, and most importantly, it meant I had a blank canvas to work with to get the server exactly as I wanted it. Things like this are fun! The setup I went with in the end was Debian 6, Nginx, MySQL, PHP5.3 (with PHP-FPM), Memcache and finally postfix for the mail serving. Following is a little description of each step required.


Live Unsigned Sponsored by 6Sync

A number of weeks ago, the lovely people at 6sync were nice enough to host Live Unsigned*, in exchange for a plug or two on this blog.  To me, this seemed like a very fair exchange, also it meant that I had a nice clean server which I could set up just as I wanted so as to handle the increasing traffic Live Unsigned is getting.

Over the next few posts I’ll be outlining how I set up the server, along with any issues and gotchas, plus I’ll most probably be talking about Biscuit – 6sync’s control panel.

For all you cynics out there, don’t worry, I’ll be maintaining my editorial integrity. This blog is not going to turn into one big advert! But, I do want to say a big thanks to Mario and the 6Sync team.

* For those of you that don’t know, Live Unsigned is a weekend project that my girlfriend Elizabeth and I are running in order to keep ourselves sane!

Amazon S3: easily bulk delete buckets

With Jabbakam we save a lot of images. All these images are stored in Amazon’s S3. Recently I thought I’d delete some of the test buckets.

Not as easy as I first thought. It turns out that you have to empty buckets before you can delete them. Fair enough, but there didn’t seem to be a way to easily bulk delete hundreds of images.

After some Googling I found Robert LaThanh’s S3Nukem which looked like it would do the job. All I needed to do now was fire up an EC2 instance, install and run. The steps were as follows:

  1. Create an EC2 instance on AWS (I used Ubuntu on a medium instance)
  2. make sure it is all up-to-date
    apt-get update
    apt-get upgrade
  3. install ruby (if not already installed)
    apt-get install ruby1.8 ruby1.8-dev

    (not sure about ruby1.8-dev, but added just in case)

  4. install Ruby Gems
    apt-get install rubygems
  5. install right_aws and s3nukem
    gem install right_aws
    cd /tmp
    wget http://github.com/lathanh/s3nukem/raw/master/s3nukem --no-check-certificate
    chmod +x s3nukem
  6. run
    ./s3nukem -t 20 -a  -s

Several hours and over 15 million deleted images later it was all done and I shut down the instance.

Emacs Weekly Tip #4: Super Quick Navigation with Registers

If like me you are constantly bouncing about between different places within a file, or even between multiple buffers then you should save a lot of time by using Registers.

Registers are a handy little tool that enable you to save a snippet of information for the length of your session. This snippet of information can be either text, numbers, rectangles and even window configurations.

For the benefit of this tip, however, we’ll be saving a position within the register. It is so simple, it is actually quite silly.

When you are at a position you want to save, simply enter:

C-x r <space> q

This will save your current location into the register “q”. You can replace “q” with any single character. For some reason I always use “q”, “w”, “e”, “r” etc. but you can use whatever you want.

To remember this command, you simply need to think about saving a space in a register called q.

Jumping back to the position saved in the register is just as simple

C-x r j q

You are jumping to register q

Once you have the hang of it, it’s pretty effortless.

Soon you’ll be jumping about like a maniac!

Emacs Weekly Tip #3: Learn Org-Mode

As my aversion to all things rodent orientated increases and my use of Emacs grows so too does my use of org-mode.

Org-Mode probably doesn’t need any introduction. It can be used for pretty much any sort of organising you require, from sketching out blog posts (this article was drafted in Org-Mode before being published to WordPress) to a full productivity and GTD suite.

The Emacs tip this week isn’t about highlighting all the useful features Org-Mode has to offer, but instead it is more of a “How-to-Learn” rather than a “How-To”.