Changing date/time in Ubuntu virtualbox

I was a bit puzzled by the fact I could not easily change the date/time in an instance of a virtualbox as used by the High Performance Scientific Computing Coursera course run by Dr. Randall J. LeVeque via Coursera.

I tried using the simple date command but I kept on being told that

date: cannot set date: Operation not permitted

I tried updating the Ubuntu distro, but no luck. Eventually I found a solution using a symlink to localtime:

$ cd /etc
$ mv localtime localtime_original
$ ln -s /usr/share/zoneinfo/Europe/London ./localtime

You will have to use the correct zone for your location. Et voilà!

Ubuntu-Desktop
Ubuntu-Desktop
Enhanced by Zemanta

Programming Language Index – version 2013

A couple of years ago I had a look at the state of the TIOBE index that ranks the most popular programming languages.

So has C# finally dethrone C++ as THE language of the year? Or has LOLCODE and Brainfuck made it into the list? Well not quite, but an interesting thing is the uptake of Objective-C taking the third place! Of course an explanation can be found in the explosion of iOS apps that are developed with that language.

The usual suspects, i.e. C and Java are still at the top, followed by Objective-C and C++. It is interesting to note that they all share a very similar structure.

Position Jan 2013 Position
Jan 2012
Delta in Position Programming Language
1 2 C
2 1 Java
3 5 Objective-C
4 4 C++
5 3 C#
6 6 PHP
7 7 (Visual) Basic
8 8 Python
9 9 Perl
10 10 JavaScript
11 12 Ruby
12 24 Visual Basic .NET
13 13 Lisp
14 14 Pascal
15 11 Delphi/Object Pascal
16 17 Ada
17 23 MATLAB
18 20 Lua
19 21 Assembly
20 72 Bash

Languages in the other top ten are pretty good candidates and should not be too much of a surprise to see PHP, VB and Python there. Nice to see that languages like Pascal and Ada are still there in the top 20. But Bash? Really? How can we explain the move from 72nd to 20th?

And after that? Well, Fortran appears in place 25th… (I know!), COBOL and SQL are there and for those that have taken the R programming language to their hearts, it makes an appearance at the 26th place. An interesting addition is the appearance of the educational language Alice at the 50th place.

Position Programming Language Ratings
21 PL/SQL 0.585%
22 Transact-SQL 0.578%
23 SAS 0.571%
24 COBOL 0.496%
25 Fortran 0.462%
26 R 0.444%
27 Scheme 0.433%
28 ABAP 0.430%
29 Logo 0.389%
30 Prolog 0.359%
31 Erlang 0.334%
32 Haskell 0.331%
33 Scala 0.319%
34 Q 0.318%
35 D 0.296%
36 RPG (OS/400) 0.291%
37 Smalltalk 0.254%
38 Forth 0.239%
39 APL 0.235%
40 NXT-G 0.233%
41 ML 0.227%
42 Common Lisp 0.206%
43 ActionScript 0.195%
44 Awk 0.192%
45 F# 0.187%
46 Scratch 0.187%
47 PL/I 0.167%
48 LabVIEW 0.165%
49 Tcl 0.159%
50 Alice 0.158%

Ada Lovelace – Sci-advent – Day 9

Ada Lovelace

Ada Lovelace. Painting by Margaret Sarah Carpenter (1793–1872)

Ada Augusta Byron, Countess of Lovelace, was the daughter of the poet George Gordon, Lord Byron. She studied mathematics at the University of London with Charles Babbage, whose analytical engines were the precursors of the modern computer. Today 10th of December, it would have been her 197th birthday. That is why Google created a doodle for her (see image below).

Ada Lovelace is today known as a mathematician and computer pioneer; she created the concept of an operating system. Supplementing her translation of an Italian article on Babbage’s analytical engine with an encoded algorithm she published the first computer program, albeit for a machine that would not be built until more than 150 years later as a historical project.

The Ada computer language was named after her.

Lovelace Doodle

MATLAB for mac in Mountain Lion without X11

Well, I have now made the move to Mountain Lion and for a bit it did look quite good, until I had the nerve of trying to start MATLAB. Now, I must admit that the version of MATLAB that I have is by no means the latest, but it does do the work (for those of you who asked, I am running 2008a). So, I realised that the final blow for X11 was given and that Mountain Lion did indeed get rid of it.

I had encountered this issue when upgrading GIMP, and at the time, everything seemed to be working fine with XQuartz. So, there was I thinking to myself “It is just a matter then of re-installing XQuartz and off we go”. How wrong was I! I installed XQuartz, downloaded from here. The first glimpse that things were not quite correct was when I had to tell manually to GIMP the location of X11. Then tried to launch MATLAB and quite quickly the following message popped up:

“X11 does not appear to be installed. X11 version 1.1.3 or greater is required. For OS X 10.5 or later, X11 is available on the OS X installation DVD. Please find and run the Optional Installs.mpkg installer.”

Great thing that Mathworks has told me that, but Apple does not do X11 anymore, so no installing from the DVD, righ?t! Worse still, unlike GIMP, there was no prompt from MATLAB to tell it the location of X11. I tried creating some symbolic links, but this did not work either. Finally, after a lot of fiddling and searching and all, I found a way to run MATLAB successfully. A solution? Oh well here it is:

  1. Install XQuartz
  2. Launch XQuartz and from the menu launch an xterm.
  3. Type the following command first:
  • $MATLAB/bin/matlab -maci

Where $MATLAB is the path to your installation. And voilà!

Incidentally, if you are having problems with the graphics in MATLAB, such as the application crashing when plotting and the like, you can type the following command before launching MATLAB as specified above:

export DYLD_LIBRARY_PATH=/System/Library/Frameworks/JavaVM.framework/Libraries

Let me know how you get on with this and should you find another alternative solution let me know!

Enjoy!