Nas Khan

  • Blog
  • About
  • Contact

Book review - Accelerando by Charles Stross

Wed 29 March 2017

I have decided to try writing short reviews here for books I am currently reading. I'll do my best to not include any spoilers.

So, the book I have just finished is Accelerando by Charles Stross. This is another of those titles that has long remained untouched on my reading list and I am glad to have finally scratched it off.

It is initially set in the first years of the 21st century in the immediate run-up to the technological singularity and proceeds to follow over time the mavericks of the uber intelligent, technologically adept and influential Macx family as they steer humanity's trajectory through this tumultouos and disruptive period.

Themes and topics explored in the book include "mind uploading", sentient animal/human AIs and their rights, distributed intelligences, the industrialisation of the solar system and beyond, viable centrally AI-planned economies, increasing cybernetic convergence, alien signals and ultra-intelligences and our attempts at contact, the psychological/social/economic/religious costs of exponential technological progress and much more.

Stross' prose is sometimes dense but always fashionable, full of information-packed metaphors of science/tech jargon. This from what I gather is one of Stross' signature strengths as a writer. Character development was well done given in my opinion given the surrounding chaos. Stross expertly conveyed the sense of being there on the cusp of the singularity and his exploration of the post-singularity world was well handled and enjoyable.

This is one of the best fictional explorations of the concept of the singularity and, while it can feel like a bit of a slog in certain parts, overall it is an intellectually rewarding, thought provoking and enjoyable read.

Learning Javascript in 2016

Tue 18 October 2016

I just came across this hilarious/outrageous piece on modern front end development! Dear Lord, what have these guys done!?!

Upgrading to Raspbian Jessie

Thu 01 September 2016

I got a nasty surprise a few days ago when I found out that Raspbian Wheezy (the OS running on my Raspberry Pi) was effectively EOLed when Jessie came out in September 2015. I had assumed that, being based on Debian, it would receive security updates until 2018. But due to shortage of resources and manpower the raspbian team have decided to move straight over to Jessie, which makes sense.

Unfortunately that means I have been running my Pi without any security updates for almost a year. Since I now use the Pi (hooked up to a large USB hard drive) as my primary home server and also have SSH access to it from the outside world this made me break out in a cold sweat. I only allow public key authentication for SSH but a year is a long time to go without security updates in the internet age for any type of server accessible over the internet. I had to get over to Jessie ASAP.

I knew that a clean installation was the recommended way to upgrade to Jessie but I did not have physical access to the Pi to do this. I also really didn't want to start from scratch and re-configure everything to the way I wanted. So the only other option was to do the upgrade remotely over SSH, something I haven't done before. After doing some googling, the process appeared to be fairly straightforward so I decided to go ahead with it. In a tmux session I effectively did the following:

# Make sure system is already updated
sudo aptitude update
sudo aptitude safe-upgrade

# Modify sources
sudo sed -i /deb/s/wheezy/jessie/g /etc/apt/sources.list
sudo sed -i /deb/s/wheezy/jessie/g /etc/apt/sources.list.d/raspi.list

# Do the upgrade
sudo aptitude update
sudo aptitude full-upgrade


It it important to run the above in a screen or tmux session in case your internet connection breaks during the upgrade process. The upgrade process took a few hours during which time I was asked to upgrade or keep certain configuration files. The process was faily straightforward and I didn't encounter any issues which is a testament to the Debian team since they have made some major changes under the hood (most importanly being the shift to systemd). After doing a reboot following the upgrade everything appeared to be running as normal.

Removing GUI

I also wanted to remove the GUI on the Pi as I always access it via the command line over SSH. Doing the following got rid of all GUI and Xorg packages:

sudo aptitude purge ~ilibx11


Booting appears to be much quicker now thanks to systemd:

pi@raspberrypi:~$ systemd-analyze time
Startup finished in 11.819s (kernel) + 36.814s (userspace) = 48.634s

Migrating to Pelican

Sat 23 July 2016

I've been considering for a while to port this site to a static site generator like Jekyll from the bottle based mini blogging/CMS engine I created a few years back to learn web development. I finally decided to make the plunge this weekend, although I decided to go with Pelican instead of Jekyll. The migration process has been much quicker and easier than expected. Half of my blog posts have been shifted over and I've re-created most of the other site content and design too. So all the major hurdles are out of the way.

Static site generators

So why move from a working solution to something new? The main reason was poor python support from my web hosting provider. I had no choice but to use CGI to get things to work (yay 1999)! This always irked me and made me feel dirty. I definitely should have done better research into the "python support" they claimed to provide.

Static site generators provide an elegant solution to this kind of problem (and have whole host of other benefits too). They effectively allow you to generate HTML pages via templates. No need to worry about databases, security holes or language support. It's just HTML/CSS/Javascript being served up by your web server (many have been using Github pages)! Further, the workflow is completely command line driven and you can write your blog posts in markdown in vim too! Understandably because of this, all the cool geek kids (and even some big companies) are doing it!

Pelican

Initially, I was considering Jekyll as that appears to be the most popular static site generator. But being a python guy I thought that there must be a decent python equivelant (Jekyll is ruby based). I set off Googling and discovered that Pelican was the most actively developed and used in the python world. It uses the jinja2 templating engine which I have experience with and generally looked sensible and simple to use. So I opted for that.

Migration

It took me a few hours of reading to understand the basics of Pelican and I was able to start moving things over. Most of the hard work was actually adapting one of the pelican themes (notmyidea-cms) to resemble my old site design and making it mobile friendly. Bit of a hacky process but it's mostly done.

Since I wasn't a very prolific blogger I'm just copy pasting my blog posts over.

Conclusion

So far I'm quite happy about making the move and I would definitely recommend bloggers who're technically inclined to explore static site generators and Pelican in particular. If you're using something like wordpress I believe there are scripts to make the migration process simpler. The documentation is good and there are plenty of tutorials on the web to help you out too.

Toshiba Chromebook 2

Sat 24 October 2015

I recently decided to purchase a chromebook as I wanted a cheap, portable laptop to browse on and do some casual development on the go. I came across the Toshiba chromebook 2 which had good reviews and was very affordable. I decided to buy the HD version.

I've had it for a few weeks now and here are some quick thoughts on it.

Hardware and specs

The laptop is slim, stylish and relatively lightweight. It is made of silver plastic and does feel a bit on the delicate side but considering the price this is acceptable in my opinion. The battery life is excellent running up to 8-9 hours. The skullcandy tuned sound is surprisingly good and listenable. The 13 inch HD is screen is excellent presenting vivid, sharp video, images and text. Unfortunately the resolution sometimes feel a bit too high as you can find yourself squinting to read text while browsing but this can be easily solved by increasing the text size.

As it is a chromebook it as a has cut-down non-standard keyboard which may initially pose issues (i.e no function keys or home/delete/insert etc.). You do get quickly used to this though. I've not fully explored the ports yet but it includes a USB 3.0, USB 2.0 and HDMI port along with a headphone socket and a SD card reader.

In terms of raw specs, it comes with 4GB RAM, 16GB SSD and an Intel Celeron N2840 CPU. This is more than ample for casual browsing, music, video and CLI based development. One of the features that particularly attracted me to this model is the absence of fans - the cooling is entirely passive. The silence is a welcome change to the constant whines of fans. And you don't have to ever worry about your system overheating due to clogged fan vents.

The 16 GB disk space is very small but I haven't encountered any issues yet as the aim is to have everything stored on the cloud (Google drive).

Chromeos and Crouton

Initially, I wanted to wipe the shipped Chromeos and put a GNU/Linux on it but then came across crouton. This is a way to run GNU/Linux alongside chromeos using the power of chroots (Chromeos is a Linux based OS like Android).

Setting up the crouton is relatively easy but you need to enable developer mode first which gives you access to developer shell. There are plenty of instructions on the net. I recommend starting with the crouton github page. I opted for to run Debian Jessie Xfce as I'm a Debian fanboy. I've not yet fully explored getting i3 running on it but it appears to be possible through some cursory googling.

What is surprising is that I've found myself spending most of my time within Chromeos. It is very usable and just works. I now usually access the crouton through a bash session ("sudo enter-chroot"). This effectively gives me the best of both worlds, I get to be within a user-friendly OS that just works with full access to a full-featured GNU/Linux environment. Kind of like the Mac but a lot cheaper!

There is also a command line SSH client which I frequently use to log into servers. I recommend installing the crosh window extension as the developer terminal that comes with chromeos swallows keypresses like ctrl-n as it runs in the browser. The crosh windows eliminates this.

Areas to improve

Unfortunately the file manager appears rudimentary and you can only access the Downloads folder in your filesystem. You cannot access CIF/Windows shares out of the box or Dropbox without third party extensions (although these are very easy to install). The Openvpn support is also a bit disappointing as the GUI doesn't support ovpn files (you can get around this by using the CLI client and some bash scripting). There also is no rdp client and I have to fire up an X session on my crouton to run the rdesktop application. Hopefully Google will address some of these issues in the future.

<< Page 2 / 3 >>

Blog Archives