Joshua noticed this post over at the Reinvigorated programmer about the best programming language book ever written and the benchmark by which any programming language book is measured. I am of course talking about Kernighan & Ritchie’s “The C Programming Language“.
Saw this post, “Hello from a libc free world” and thought that you guys might find it interesting given that we are using C to implement emulations of simple historical hardware systems and translations of the machine code that would have run on it. The post starts with the question, why is a simple Hello World program, like the following, still 11Kb in size:
The remainder of the article delves into the intermediate assembly code generated by gcc and investigates how we can make Hello World as small as possible and actually avoid using the standar library when it is not needed.
In the same vein, this tutorial on creating “really teensy ELF executables for Linux” deals with producing the smallest ELF executables on Linux and demonstrates how hand-coding the assembly in the executable is still the best way to make sure that the only code in your executable is the code that you intended to be there.
Just to prove to you that shell scripts do come in handy as a way to save time and make a boring job into somethin more fun, here is a little script called wikify.sh that I used today to manipulate a file containing a list of papers into an unordered list for inserting into a wiki page.
The papers were of the following form:
ito2008digital.youth.pdf
and I wanted them to be like this instead:
* [[ito2008digital.youth]]
Which involves cutting of the .pdf ending and putting two whitespaces a star and double square brackets around the filename.
Because there were more than a thousand papers in the list I obviously didn’t want to do this by hand, which would have been both time consuming and boring, instead I used this:
For those of you looking for an easier way to install Ubuntu you can try the Wubi Ubuntu Installer which promises to make dual booting an Ubuntu machine as non-invasive as using a virtualised machine yet as responsive as using a native install. Supposedly Wubi creates a file on the harddisk that to Linux appears to be a regular filesystem, and to windows appears to be a regular file located at c:\ubuntu\disks\root.disk so you can essentially run Ubuntu without having to create a partition for your Linux install to live in. Installing and uninstalling is therefore almost as simple as installing and deleting a regular windows program.
Many of you will have realised that I am not the biggest fan of virtualising the desktop, running a Linux virtualised under Windows just feels abhorent to me, so anything that supports you in getting Ubuntu up and running with the least amount of blood, sweat and tears is a good thing.
If anybody tries this out, please tell me how you get on.
I found a couple of articles over at the Linux Journal that will give you a bit more understanding of the wonders of quoting in Bash. The first article will probably be of more use to you as it deals with the basic of quotes in scripts whereas the second article deals more with the intricacies of quoting within scripts, in their example, scripting interaction with a MySQL database.
To get you in the mood for thinking about the development and history of computing, here is an article from the BBC about Alan Turing, an important figure in the development of both early computer hardware and computational science, and the ACE computer, the Automatic Computing Engine.
Simon has now finished with the lecture series on Linux, the Shell, Bash Scripting, and C Programming. Iain will take over lectures from monday morning and will begin with an introduction to computer hardware and architectures.