Follow Slashdot stories on Twitter

 



Forgot your password?
typodupeerror
×
User Journal

Journal Journal: Compilin' makes me feel good

I do like compiling stuff, because it gives me the feeling of being a proper geek, rather than a wannabe. Entirely illusory, of course, since I have only the faintest idea what the messages actually mean.

Currently, I have two machines at work on the go. One (koala) is building the 2.4.21 kernel. The other (starfish) is compiling up its new Gentoo distribution. There's also a machine at home (newuk) which is a Sun Ultra 10, currently rebuilding its entire collection of programs, because I think I managed to compile some for the wrong architecture in a cross-compiling experiment which failed.

The cunning plan is that starfish, although a fairly weeny dual P2 machine, is going to be a test bed for user mode-linux. Because of 'historical issues' at work, all the websites that we do have UNIX paths hardcoded into their PHP, such that they all have to live as subdirectories of a given folder. Also, some are PHP2 (sad but true), and some are PHP4. This makes developing a bit of a hassle. We recently figured out that storing sites in CVS was a good idea, but unfortunately everyone shares the same check-out sandbox which ain't ideal. The plan is that if each developer had their own Linux machine, they could each have their own checkout area.

So far, so good, except that this would appear to call for twice the number of development machines as we have at present, and then they'll all need keeping up to date with the same versions of Apache, PHP etc. But, with user-mode linux, hopefully each developer can have their own virtual machine. And each virtual machine will mount the partition containing the relevant programs over NFS, and so the actual disc images ought to be fairly small.

This has the additional bonus that we then have two gentoo machines, and I can persuade them both to use distcc for compilation.

For my next trick, I intent to figure out how to build an Intel to Sparc cross-compiler on my ix86 machines at home, thus allowing me to compile stuff on my Sun box reasonably quickly. And then, I shall turn my attention to the Sun IPX box sitting on my bedroom floor, which is being obstinate. Hopefully, I can use the Ultra 10 to compile up all of its software, get it on there somehow (NFS?) and have 5 Gentoo linux boxes to play with :-)

User Journal

Journal Journal: Starlogo

First journal entry in this exciting journal system! I've only just noticed it... has it been going for a while? Anyway, my excitement for today, apart from some Dirk Gently-esque manipulation of a sofa to get it out of one room and into another has been looking at Starlogo.

I was thinking about writing some nice Java applets in preparation for a career in physics teaching, which would enable the visualisation of the motion of charged particles in fields. I mentioned this to a friend, and he drew my attention to 'Starlogo' (see http://education.mit.edu/starlogo/).

It seems to be a multithreaded version of Logo, in which you have many turtles instead of just the one, and you essentially write code which describes their behaviour and responses to their environment. It's intended as a tool to aid understanding of decentralised systems, where each part of a system obeys simple local rules, but the macroscopic result is fairly complex behaviour.

Regrettably, I've only had chance to look at it briefly today before the sofa intervened, but it comes with several interesting demonstrations which I had fun playing with.

For example, there's a simulation of waves on a string - the string is represented by a line of turtles which all behave as if they're connected to the adjacent turtles by springs, and are constrained to move up and down only. At one end, the turtle is fixed (e.g. the string is tied to something), at the other there's a 'driving' turtle which moves up and down sinusoidally, and there are widgets which allow you to change the speed and amplitude. Therefore, you can watch the way waves move along the string and reflect from the boundary. By setting the parameters correctly, you can create standing waves.

There's a traffic simulation - turtles move along a 'road', speeding up when there's nothing immediately in front of them and slowing down when there is. We see that for 'cars' obeying these sort of rules, traffic jams arise spontaneously, with no apparent cause. When sitting in a large queue of traffic, I've often wanted to fly above in a helicopter and view the large scale dynamics of the queue - with this, you can do just that :-)

There's a simulation which demonstrates the normal distribution. It's a replica of those machines one finds in science museums and the like where there's a big triangle of pegs, with the apex at the top, and buckets at the bottom. Balls (turtles) are dropped in at the top and fall down, randomly bouncing left or right at each peg. We see that the pattern they fall in the buckets at the bottom is a normal distribution.

This looks like a really useful educational tool - I think one could get an insight into many physical phenomena by playing with it. Of course the samples all have source code and cover a wide range of applications, so it ought to be easy to learn and experiment. When I have more free time, I'll devote some time to getting to know it, and maybe write some more about it.

Slashdot Top Deals

Neutrinos have bad breadth.

Working...