Click photo to download arch_remix_5.zip.
The .zip contains README and md5sum.txt.
A few people have commented saying that they have tried to run RacyPy in VirtualBox and run into problems with PAE.
I’ve made a .vdi based of “WaryPy”. No PAE required.
Okay, so you have “registered an interest” or pre-ordered or even (lucky few) ordered an RPi. It’s time to get together the stuff you’ll need.
1. A screen. The most obvious choice is a TV with an HDMI input.
2. A usb mouse. If you don’t have a spare around, why not treat yourself to a new one – you’re worth it!
3. A usb keyboard. Again, you may have a spare. I’ve ordered a small one, for portability.
4. An ethernet cable. For the web!
5. An operating system. I’m still not quite sure if the Pi is going to ship with one at this early stage. There are lots of places where you can find instructions for setting up your SD card. So far Debian and Arch are available to download via the RPi site. Which brings me to:
6. An SD card. The OS images are about 2Gb. Some people have found that they don’t fit on a 2GB card. I’d get at least a 4Gb card (and it’s worth getting a high speed one – this may cost almost as much as the RPi itself).
7. A power supply. You know the thing you plug your iPod / Kindle into and then plug into the mains – that’s it. You can buy these quite cheaply if you don’t have one.
8. A cable – standard USB to micro USB (to plug into the Pi).
9. An HDMI cable. The cheap ones work just as well as the expensive ones!
10. If you can’t use ethernet, you might need a wireless dongle in order to get online. This probably means you’ll need a USB hub (there are only two USB ports on the Pi). It’s a good idea to buy a powered one, as the Pi itself won’t be able to power many USB devices.
11. Lego. To make a case for your pi
I think that’s it. So are you ready?
In the mean time, you can pretend you have an RPI by downloading and using RacyPy2!
1. Download the .iso.
2. Download and install DVD Decrypter (or use you favourite .iso burning software).
3. Right click on the .iso file and choose “Burn with DVD Decrypter.
4. Reboot your PC. It should boot from the CD, if it doesn’t do this by default, look for a message telling you what to press for boot options (often F2 or F9).
5. That’s it.
To run WaryPy in Virtual Box.
1. Download WaryPy.vdi.
2. Download and install VirtualBox.
3. Start VirtualBox. Choose “new”.
4. Follow the instructions on screen and choose “Linux” and Linux 2.6.
5. Choose “use existing hard disk” and find the .vdi file.
6. Start your new virtual machine.
Since Liz posted on the RPi homepage about this LiveCD, I’ve had a lot of hits on the blog. Quite a few people have asked about running Puppy in VirtualBox. This works really nicely and I have uploaded a .vdi file for WaryPy (this seems to be better for VB as it doesn’t need PAE).
The .iso of RacyPy is here.
1. The original version only came with Python 3 and Pygame. This one has Python 2.7.2 and 3.1.4. Both have Pygame installed which means you are ready to start learning to code whichever version you favour.
2. On the old version I had added a lot of tutorials for several programming languages. This time I have decided to keep it simple. There are lots of great materials for learning Python (you’ll find them in an archive file in my-documents). I’ve left out the others, becuase I am sure that those who want to try other programming languages will have no difficulty finding them.
3. I have included the Java Development Kit (1.7.2). This means that if you wan to learn Java too, you can compile and run Java code without needing to install anything.
4. Typing tutorial included. The nice “gtypist” program is installed, because good coding requires typing skills!
As before, there’s no need to install anything – you just put the disc in your optical drive and boot from it. You can save your work to a memory stick or onto the hard drive without doing anything at all to your existing operating system. If you want to install it, there’s lots of help on the Puppy forum.
As before, this OS is based on Racy Puppy. Racy has a very up-to-date Linux kernel. But it’s a lightweight distribution that should run nicely on quite old machines (eg it’s fine on my old Toshiba laptop with a Pentium 3 processor and 256mb of RAM). If there’s an old computer in your house that no-one uses any more, you will probably find that RacyPy runs really well on it. So you can use this system while we wait for our RPis to be delivered!
BugFix (if you haven’t got the latest version).
You may notice that Java isn’t working in Seamonkey. To fix it, click on this link and choose open with petget. I put the wrong link in the plugins folder – oops!
I am not going to try to convince you to give up on Windows or Mac Operating Systems, I just wanted to do a post about my favourite Linux distribution: Puppy Linux.
Here are some of the reasons why it is worth learning how to use Linux.
1. The Raspberry Pi will come with a Linux operating system (I think the closest thing to the RPi version is probably this: Fedora Spin LXDE). Since a lot of us may be waiting a while for our Raspberry Pis, why not get used to using Linux while you are waiting?
2. Linux is Open Source. You don’t have to pay for a Linux operating system. You don’t have to pay if you want to upgrade to a newer version. You don’t have to bother with licences, security keys, activation and so on. You are in control of what happens on your machine. Also we have this lovely mascot, Tux!
3. Linux is much less vulnerable to viruses.
4. Linux file-systems don’t fragment as much as Windows – so you don’t need to defragment your hard-drive.
5. Linux systems usually run faster than Windows. This may not be the case if you go for one of the big distributions (like Ubuntu), but if you use a lightweight version (like Puppy), you will find your machine boots and operates much faster.
6. Linux systems can bring old computers back to life. Becuase they are smaller and faster, you can put Linux distros on a machine that couldn’t cope with Windows 7 and find that you can still do all the things you want to do.
7. You can use Linux to rescue your system. If your Windows machine won’t boot and you can’t fix it (or can’t wait for someone else to) you can still get at all your files. Just boot from a Linux live cd and you can access your data and put it somewhere safe.
8. Linux is easy to use. Some people will tell you that you have to be some kind of computer genius to use Linux. This is not the case. You can use a Linux system and make it work perfectly just by using the point-and-click approach. You don’t need to go near the command line unless you want to …
9. Linux has a massive online community of well-informed, helpful, users. I would guess that every Linux distribution has its own forum. People on there will be happy to help you if you do have any problems. For instance, this is the forum for Puppy users.
Well, I hope that you will give Linux a try. In case you missed it, you can find Puppy Linux here.
Or, if you prefer, you can try my remix of Racy Puppy – set up especially for Raspberry Pi fans.
There are often times when you want to use some form of menu. Here’s one way to do it. First, I make “ans” = True so that it will satisfy the “while” condition. Then the rest of the code is inside the “while” loop. This means that when the user presses enter, “ans” will be false / empty and the program will exit. Everything else here should be familiar to you, but you may not have seen the use of triple quotations before. We use this in Python to allow us to do multi-line printing. Line returns are allowed so it’s great for this sort of thing and, of course, ASCII art.
Here’s a program that actually does something useful!
When I was learning to program, I used to enjoy writing code to help me with my homework. This is a program that allows you to input a list of numbers and then shows you the mean, median and mode.
I am publishing this now as it has been hanging around in draft form for ages. I will come back and comment on it in more detail at a later point. Hopefully the comments make it fairly easy to follow. The main thing I was pleased with was how this program shows the use of lists and tuples.
In my post on functions, I used the the example of a little program that draws a square. I didn’t say anything about the “turtle” command. It’s pretty obvious what happens though. When you use this command, Python opens a graphic window and draws things. The idea of turtle graphics began in the Logo programming language in the 1960s. The idea was that there was a virtual “turtle” which you could control with simple commands. If you have used “Scratch”, you have been using a version of Logo. I am going to use this post to review a few of the basics.
Here’s a little Scratch program that draws a square:
It’s not a very good program though. There’s no need for it to be that long, or to repeat itself so much. We can make it more elegant by using a loop.
We’ve done the same thing with 4 lines of code, instead of 9. Another advantage is that if we want to change something (the size of the square for instance), we only need to make the change once. Also, cutting down on repetition of lines of code makes it less likely that we’ll type something in wrong, and easier to put right if we do. Smart programmers are lazy – but in a good way. They write programs that are as simple and elegant as possible.
Okay, this program works, but it’s a bit dull. It just does the same thing every time we run it. But we can change that by using a variable. Let’s switch to Python now.
This is basically the same program I used in the post on functions, but now I have added the use of a variable, so that the program will draw a square the size that the user wants.
But what if I want a triangle or some other shape? Well, we can re-write the program quite simply to make it even more flexible.
Now we have a nice simple program that can draw a very wide range of different shapes. Which is nice
What is a function? Well, when we tell the Python interpreter:
we are using the function: print().
A function is something the computer knows how to do. We use functions all the time when we are programming.
It’s useful to create our own functions. If there is a specific thing that we need to do quite often in a program, we can define a function that does it. There are several advantages to this. Firstly, we don’t have to type in the code for this operation every time we need to do something. Secondly, if we need to change something about that action, we only need to change it once, in the definition of the function. Here’s an example.
This function just draws a little square. In a program this simple, there isn’t really an advantage in using a function, but as your programs become more complex, you’ll find them very useful. As you can see, we define the function at the start of the of the program. That way, when the computer comes across our call to that funtion, it will know what to do. To define a function we type: “def function_name():” After this comes an indented block of code which is what the computer will do when we call the function. We call the function by entering: “function_name()”.
Just like with the other functions we have used, we can use the bracketed part of the function call to pass information to the function. Here’s an example:
This time the function is expecting a value – “side”. So if we say “square(50)”, it will draw a square with ides 50 steps long. If we change the “main” part of the program to:
size = int(input(“How long do you want the side to be?”))
the program will ask tell the function to draw a square with lines the length that we specified.
There’s a lot more we can do with function, but hopefully this gives you the basic idea.
I am very proud to announce the birth of “RacyPy”. This is a bootable Linux Operating System with Python 3.1.4 and Pygame built in (it’s based on Racy Puppy).
Once you’ve done that, you’ll need to burn the .iso to a cd, using your favourite burning utility.
Then, you can reboot the computer. Many PCs will automatically check for a bootable CD before looking at the hard-drive, but you might have to hit a key to make the computer boot from the CD.
RacyPy will run in RAM and doesn’t do anything to your hard-drive, unless you choose to install it. When you shutdown for the first time, it will ask you to create a save file. You can have this on the hard-drive or somewhere else (eg a memory stick – you’ll need about 512Mb of space).
When you are running RacyPy, you will notice a little snake icon on the desktop. Clicking this will launch the Python IDLE. If you look in “my-documents” you’ll find tutorials for Python and other programming languages.
I hope you will give it a try – it will be a great introduction to working in Linux, as well as helping you to start coding as soon as possible.
The iso is here.
There are additional packages and some discussion over on the Murga Linux forum.