I have gone around the houses a little with my psion. Building a distribution isn't the easiest thing in the world and here were the approaches I tried and have now rejected. First tho' a quick note to say that I looked at just using the excellent stuff on OpenPsion.org. The trouble is that it uses the unsupported wookie release of Debian. This is a 2.4 kernel, an initrd and a pre-built filesystem using the deb packages with some serious cleaning up. I really could do with a 'supported' distribution because I want to install some packages that the original author didn't think of.
First I tried to create an arm-architecture environment under qemu, and use this to compile a 2.6 kernel, uclibc, busybox, etc. There were a few problems with this, the biggest was the Mac compatibility. I never managed to compile qemu on the Mac properly - possbily a bug, possibly my fault - but it was taking me too long to solve. Then I downloaded the Q binary. This was better, but there were issues with the scsi device and again it was taking too long. On Windows it was better - I installed the binary qemu and created a debian basic install, but given I don't use windows at home it would detract too much from my work to do the whole thing at work. Also, I touched on the problem that setting up networking at work would have somehow been too hard. This confused me because the debian installer worked fine, however I was disallowed from enabling network bridging (work policy) when I tried post-install. So it should never have worked.. weird.
So I tried (at work again - naughty) to use the buildroot product from the uclibc/busybox guys under cygwin. Seems this is broken in a number of ways. There is some patchs that are required to fix an undefined reference to _libintl_gettext. I downloaded the patchs from the mailing list but they wouldn't patch properly - patch rejected them. I did a bit more digging and found that cygwin has some case insensitivity that will silently break an include somewhere in buildroot - I think there are two '.s' files with the same name other than capitalisation. Solution that was suggested was to compile on a linux box for comparison purposes. Not a solution I can really work with.
I then revisited the idea of just using the Debian etch install. The vanilla install is HUGE! Far too many megs for me to use. However, I could follow the method used by the OpenPsion guys. I could use ar to unzip the deb archives and manually (with scripts similar to those on OpenPsion) remove the stuff I don't need. The downside is that I will have to use glibc (bigger than I need really) but other than that, everything is binary and ready to go. I just need to cross-compile a kernel (perhaps re-use the config from OpenPsion's 2.4 kernel) and think about the initrd. Perhaps if I compile-in all the hardware support I won't need an initrd and can just boot into the root fs.
So cross-compile time
Wednesday, November 28, 2007
Tuesday, November 06, 2007
What I did last night
I made first steps into creating an emulation environment for compiling stuff for my psion. I have a PC and a Mac available, but I will probably use my mac most for this. So I downloaded this rather nifty UI called Q for Qeum. I have a psion ready to go, now I just need a linux distro so I can start compiling stuff for the machine. This link should be useful I think (alongside the one int he previous post.
In other news, chapter 1 of my kids book is well under way. Content is probably halfway through. Just remains to write a couple more illustrative examples and some explanitory text for them.
In other news, chapter 1 of my kids book is well under way. Content is probably halfway through. Just remains to write a couple more illustrative examples and some explanitory text for them.
Monday, October 29, 2007
Linux on my Psion 5MX
I have seen openpsion but this is all debian based and I want to be meaner with the resources I allocate.
So, I'll cross compile myself a kernel, uclibc with toolchain and busybox. This should form a basic system (I think). Anything I've forgotten I'll work out as I go.
Then I want to try to get a graphical environment going. X seems like overkill (even if I just use a DirectFB driver), so I'm currently thinking that GTK on DirectFB might do the job.
GTK on DirectFB has several advantages, for example WxWidgets runs on GTK directly, so I can do some ruby GUI work (using WxRuby, possibly). AbiWord might be useful for word processing (tho' I'm not holding my breath here). So this has my book covered.
I believe there are also GTK based PIM's around, although this is more to do with confidence in the community than actual research!
The final thing I want to do with my psion is work on a parallel language. I think I would choose ANTLR to produce a parser/lexer in C and access this through Objective C (I have a religion that forbids me from touching C++ - call me a 'born again OO coder').
Obviously resources are massively constrained - 256Meg HD, 16Meg memory, 36Mhz processor. But, and let's get real here, I used to code on a 486SX33 (slower) with less memory and less HD (at university). Linux was perfectly happy and X11 was just fine. I'm going to be more stingy than before so I should gain some extra space and possibly a little bit extra processor resource. Here's hoping!
So, I'll cross compile myself a kernel, uclibc with toolchain and busybox. This should form a basic system (I think). Anything I've forgotten I'll work out as I go.
Then I want to try to get a graphical environment going. X seems like overkill (even if I just use a DirectFB driver), so I'm currently thinking that GTK on DirectFB might do the job.
GTK on DirectFB has several advantages, for example WxWidgets runs on GTK directly, so I can do some ruby GUI work (using WxRuby, possibly). AbiWord might be useful for word processing (tho' I'm not holding my breath here). So this has my book covered.
I believe there are also GTK based PIM's around, although this is more to do with confidence in the community than actual research!
The final thing I want to do with my psion is work on a parallel language. I think I would choose ANTLR to produce a parser/lexer in C and access this through Objective C (I have a religion that forbids me from touching C++ - call me a 'born again OO coder').
Obviously resources are massively constrained - 256Meg HD, 16Meg memory, 36Mhz processor. But, and let's get real here, I used to code on a 486SX33 (slower) with less memory and less HD (at university). Linux was perfectly happy and X11 was just fine. I'm going to be more stingy than before so I should gain some extra space and possibly a little bit extra processor resource. Here's hoping!
Baby book
As I said earlier, I am writing a book for kids to entice some of them into the world of coding. I think I can get quite far quite quickly - kids have no pre-concieved ideas about what is hard and so won't be put off when I start talking about objects, double buffering, threading and network communications.
What language to choose?
I'm not going to write it in Java, C (or derivatives), etc - it takes too much work to do small things: lots of code, creating files, compilation, shared lib mgt, etc. Java, et al are fine for enterprise level, heavyweight or just professional coding, but not for kids to scratch together little scripty examples. I think I'm saying I want a scripting language, so what other ones are out there?
I have a friend willing to do the artwork. I think making it visually appealing will be practically as important at the content. Or in other words, I don't think it would work if either are wrong.
What other issues will I meet? It's always good to look to another's experiences. I found this excellent introduction from Chris Pine, so I an awaiting a copy of his book from Amazon.
What language to choose?
I'm not going to write it in Java, C (or derivatives), etc - it takes too much work to do small things: lots of code, creating files, compilation, shared lib mgt, etc. Java, et al are fine for enterprise level, heavyweight or just professional coding, but not for kids to scratch together little scripty examples. I think I'm saying I want a scripting language, so what other ones are out there?
- I first thought javascript (ECMAScript really) would be a nice language, but the commandline versions of javascript I have found (on the JVM so I can re-use AWT, etc) have broken scoping rules (Rhino and FESI).
- Groovy appears to have intentionally broken scoping rules, but that's a conversation for me and a Groovy friend of mine. It's worth noting here that this is as 'far out' of the mainstream as I'm willing to go. I want a recognisably 'real' language. Groovy is right on that boundary for me.
- Lisp of some form might be nice, but I just feel some of the OO implementations are a bit of a cludge. My experience of lisp (scheme, ELisp and CLisp) was that you start from a long way back (by modern standards).
- Perl? Just no, ok?
- Python I just don't like - the whitespace thing just stops me every time. This, I know, is my fault. However, I'm aware that it offers nothing over ruby so ruby wins here.
- Smalltalk was designed to be a OO, scripty, teaching language. Here is where I think I reject it. I am not after a teaching language, I want a 'real' language that can be used for teaching, one where it is a happy accident that it is suitable for learning to code. Have you opened an smalltalk environment ever? Squeak was the one I tried. Holey moley, was it offputtingly busy?! What I objected to was the mental leap reaquired to 'see' the code behind the pretty UI. Perhaps I'm too oldschool in this respect, but I see code as a distinct artifact. Mixing it into the graphical system is interesting, but I think this confuses the issue too much.
I have a friend willing to do the artwork. I think making it visually appealing will be practically as important at the content. Or in other words, I don't think it would work if either are wrong.
What other issues will I meet? It's always good to look to another's experiences. I found this excellent introduction from Chris Pine, so I an awaiting a copy of his book from Amazon.
Projects
My book is running first in my mind - a book for baby geeks. Age group will probably be 10 to 12ish, give or take. I'm hoping a precosious 7yr old might enjoy it too. I probably picked up my first coding book at about 11, but there seems to be very few, if any options available today. I am choosing Ruby I think. More in a later blog.
Second project is to make my psion into a useable linux machine. I do need to get the flexi fixed first, but then off we go. I want this machine for bacis PIM stuff, writing my book and doing the next thing on the list:
Last: write a computer language and VM for a massiavely parallel system. I've blogged before that I believe this is the way things will be and I want a playground where I can test my thoughts (before the hardware catches up). I should spend some time to identify the issues with the other options (like ERLang, Occam (pi) and more traditional threading models an POSIX threads, java, etc.).
Second project is to make my psion into a useable linux machine. I do need to get the flexi fixed first, but then off we go. I want this machine for bacis PIM stuff, writing my book and doing the next thing on the list:
Last: write a computer language and VM for a massiavely parallel system. I've blogged before that I believe this is the way things will be and I want a playground where I can test my thoughts (before the hardware catches up). I should spend some time to identify the issues with the other options (like ERLang, Occam (pi) and more traditional threading models an POSIX threads, java, etc.).
Thursday, October 04, 2007
Parallelisation
From the SICP book, I took the cue to go write a processor.
Ok, I wrote a piece of code that has discreet modules for executing a machine-code of sorts. As I have written before, coders will need to think differently in the not too distant future, so I thought I'd write a little language that could support massive parallelization. The more I thought and experimented (with ANTLR mostly) I found that writing just the language with no real execution environment was hard, and really weird!
I was trying to create just the programmer's mental model with no real silicon support (I'm talking 100 processors, not just "quad core bibble inside" dung ding dung ding). So, the answer is a virtual machine! This way I have as much silicon support as I want (it's virtual silicon after all) and I have something to execute my code. One day, maybe there will be a real mega processor machine, but until that I can play with the ideas without the encumbrance of contemporary languages and libraries. I can also (to varying degrees I suspect) exploit the hard work that went into the libraries of that language I am writing my VM in.
I'm using Java for a number of reasons. I will just deal with performance first. I DON'T CARE! This is my playground. I'll deal with performance when it's an issue. I even reserve the right to re-write everything, because this incarnation is only to allow me to explore some ideas!
I'm using Java because I know it quite well. It's higher level than C, allowing me to think in bigger terms than malloc, pointers etc. It's supported on everything. It's not a crusty old lisp machine where everyone argues about continuation passing and nods sagely about first class functions but no-one ever acknowledges that the libs suck and the non-existent syntax (or sugar as some would call it) makes life just tedious. It's not C++ (thank god). It's not tied to a certain OS manufacturer. It doesn't have the syntax (half ton of aspratame I think) that Perl does. It's not experimental like Ruby, Python or [insert name-on-rails here]. It's not dead like Pascal (or Delphi - who was Borland trying to fool?), Smalltalk, Ada, Eiffel, ML (and random derivatives - Ocaml, anyone). The only thing not to like about Java is that it is the business solution of the day. That is to say, it solves many management issues (politics, time/cost, etc) but goes halfway to solving the technical ones (concise definition of 'what I mean').
Enough about Java - I'm writing the next erlang, so step 4 turned out to be "write a virtual machine". I think steps 1-3 were all "go round in circles until you're dizzy reading well regarded texts and coding totally insufficient things". (For those in the know, view manger was my first step). I think step 5 will be to revisit step 3 with the benefit of a VM (syntax and semantic definitions).
Ok, I wrote a piece of code that has discreet modules for executing a machine-code of sorts. As I have written before, coders will need to think differently in the not too distant future, so I thought I'd write a little language that could support massive parallelization. The more I thought and experimented (with ANTLR mostly) I found that writing just the language with no real execution environment was hard, and really weird!
I was trying to create just the programmer's mental model with no real silicon support (I'm talking 100 processors, not just "quad core bibble inside" dung ding dung ding). So, the answer is a virtual machine! This way I have as much silicon support as I want (it's virtual silicon after all) and I have something to execute my code. One day, maybe there will be a real mega processor machine, but until that I can play with the ideas without the encumbrance of contemporary languages and libraries. I can also (to varying degrees I suspect) exploit the hard work that went into the libraries of that language I am writing my VM in.
I'm using Java for a number of reasons. I will just deal with performance first. I DON'T CARE! This is my playground. I'll deal with performance when it's an issue. I even reserve the right to re-write everything, because this incarnation is only to allow me to explore some ideas!
I'm using Java because I know it quite well. It's higher level than C, allowing me to think in bigger terms than malloc, pointers etc. It's supported on everything. It's not a crusty old lisp machine where everyone argues about continuation passing and nods sagely about first class functions but no-one ever acknowledges that the libs suck and the non-existent syntax (or sugar as some would call it) makes life just tedious. It's not C++ (thank god). It's not tied to a certain OS manufacturer. It doesn't have the syntax (half ton of aspratame I think) that Perl does. It's not experimental like Ruby, Python or [insert name-on-rails here]. It's not dead like Pascal (or Delphi - who was Borland trying to fool?), Smalltalk, Ada, Eiffel, ML (and random derivatives - Ocaml, anyone). The only thing not to like about Java is that it is the business solution of the day. That is to say, it solves many management issues (politics, time/cost, etc) but goes halfway to solving the technical ones (concise definition of 'what I mean').
Enough about Java - I'm writing the next erlang, so step 4 turned out to be "write a virtual machine". I think steps 1-3 were all "go round in circles until you're dizzy reading well regarded texts and coding totally insufficient things". (For those in the know, view manger was my first step). I think step 5 will be to revisit step 3 with the benefit of a VM (syntax and semantic definitions).
Monday, September 17, 2007
Code is data is code (yet again!)
Right, I have previously described the distinction between code and data as purely convenience. In reality, there isn't a difference. However, we can get much more convenient than simply code/data, and most rigorously specified software solutions do. I have held up configuration data and reference data as more obvious examples of the crossover between data and code. However, these convenience names are also excellent examples of why the course-grained data/code split is fundamentally useless.
Let me also here, bring in several strands of computer systems development. Firstly, the user's mental model vs the system model. Logical model vs data model. Ref data, Config and business information.
I'll deal with this over the next few weeks.. first:
Config: the stuff in the code that needs to be changed for each deployment or machine.
Ref data: the libraries of the language that users use, but these libs will grow and change from time to time during the system's lifetime.
Logical model: the raw structure of the language of the user.
Physical model: how the computer implements the logical model.
Documentation is a whole 'nother can of worms here - layers of proof that the models above are accurately generated. Variously these are artifacts to show that that the user's language is understood and interpreted correctly such that the physical model cn always support the user.
How much easier if we always generated systems on the basis of writing a computer language.. Because a computer language is someone's implementation of a programmer's mental model (by a programmer) there is a necessity of rigor that often lacks in lesser systems.
Let me also here, bring in several strands of computer systems development. Firstly, the user's mental model vs the system model. Logical model vs data model. Ref data, Config and business information.
I'll deal with this over the next few weeks.. first:
Config: the stuff in the code that needs to be changed for each deployment or machine.
Ref data: the libraries of the language that users use, but these libs will grow and change from time to time during the system's lifetime.
Logical model: the raw structure of the language of the user.
Physical model: how the computer implements the logical model.
Documentation is a whole 'nother can of worms here - layers of proof that the models above are accurately generated. Variously these are artifacts to show that that the user's language is understood and interpreted correctly such that the physical model cn always support the user.
How much easier if we always generated systems on the basis of writing a computer language.. Because a computer language is someone's implementation of a programmer's mental model (by a programmer) there is a necessity of rigor that often lacks in lesser systems.
Thursday, June 28, 2007
Love/Hate - Mgt/Tech
This is an insight from a while ago. First, tho', to all my manager friends (who, coincidentally, are all excellent managers): please don't be indignant until you've read this.
Historically techies and managers have always been opposed to each other. See Dilbert for an example of this meme's entrance into pop-culture. I think the two views are a little like this:
Now, I've worked in a company with (practically) no management, by design. The idea being that techies don't like management, so we won't have any. The, 'freedom of freefall', was often referred to. I didn't get on with it at all, and with a little distance between me and it now, I can think of reasons why.
I'm a techie, so I make a crap manager. I think about the perfect solution, and the best technical answers. I don't like administration or politics - too floppy, no real answers. I think managers see things completely diametrically opposite from this. Admin and politics are the 'game' and there is no such thing as a perfect solution - only one that is on time, within budget (or close enough given the 'game').
So, managers need techies to answer their problems - obviously. Techies also need managers to keep the admin and politics flowing while they formulate the answer. Techies need to be reigned in to budget and time constraints, but managers need to be reigned into the realities of answering the question.
Managers need techies as much as techies need managers..
I just thank god there are people willing to be management for me.
Historically techies and managers have always been opposed to each other. See Dilbert for an example of this meme's entrance into pop-culture. I think the two views are a little like this:
- Managers see techies waste money by doing things in a roundabaout way. The solution to most problems can be solved in some much simpler way.
- Techies see managers as demanding corners be cut to deliver to a timetable which sould never have been rigidly set in the first place.
- Techies think managers don't have enough technical knowledge (little knowledge is dangerous, etc).
- Managers think techies live in some other-world where time/money don't matter.
Now, I've worked in a company with (practically) no management, by design. The idea being that techies don't like management, so we won't have any. The, 'freedom of freefall', was often referred to. I didn't get on with it at all, and with a little distance between me and it now, I can think of reasons why.
I'm a techie, so I make a crap manager. I think about the perfect solution, and the best technical answers. I don't like administration or politics - too floppy, no real answers. I think managers see things completely diametrically opposite from this. Admin and politics are the 'game' and there is no such thing as a perfect solution - only one that is on time, within budget (or close enough given the 'game').
So, managers need techies to answer their problems - obviously. Techies also need managers to keep the admin and politics flowing while they formulate the answer. Techies need to be reigned in to budget and time constraints, but managers need to be reigned into the realities of answering the question.
Managers need techies as much as techies need managers..
I just thank god there are people willing to be management for me.
Monday, June 25, 2007
OO Typing
What is typing? Other than being a fundamental part of OO methods, it feels quite badly understood. I have two intentions here: to analyse the existing definitions and to define my interpretation.
Typing can be static, dynamic, strong or weak..
Ok, this was as far as I got.. I started in June and it's now October..
I don't think this is a lack of understanding on my part - simply that typing is so very fundamental to human thought. This basic-ness means we are trying to grasp the very core of human thought. Take one well oiled eel!..
A type is a pattern (by human standards). This is the nugget which links humans to typing in computing. Strong typing is boldly saying that one particular thesis is correct. It is a strong limitation of the field of possibilities, which is not a necessarily negative thing.
On the positive side there are a number of pre-judgements we can make (or a compiler might make) about some code. This can lead to efficiencies in code production and execution. However it generally tightly binds pieces of code together.
On the negative side, it strongly limits the ability of a piece of code to react in unfamiliar environments. This is the same as saying, "it generally tightly binds pieces of code together".
The reason I prefer stronger typing is that a piece of code can know what it is dealing with. The execution environment can know quickly if a call is incompatible or some coercion is necessary. Hmm, I need more thought because coding for the silicon is letting the tail wag the dog (these days).
Typing can be static, dynamic, strong or weak..
Ok, this was as far as I got.. I started in June and it's now October..
I don't think this is a lack of understanding on my part - simply that typing is so very fundamental to human thought. This basic-ness means we are trying to grasp the very core of human thought. Take one well oiled eel!..
A type is a pattern (by human standards). This is the nugget which links humans to typing in computing. Strong typing is boldly saying that one particular thesis is correct. It is a strong limitation of the field of possibilities, which is not a necessarily negative thing.
On the positive side there are a number of pre-judgements we can make (or a compiler might make) about some code. This can lead to efficiencies in code production and execution. However it generally tightly binds pieces of code together.
On the negative side, it strongly limits the ability of a piece of code to react in unfamiliar environments. This is the same as saying, "it generally tightly binds pieces of code together".
The reason I prefer stronger typing is that a piece of code can know what it is dealing with. The execution environment can know quickly if a call is incompatible or some coercion is necessary. Hmm, I need more thought because coding for the silicon is letting the tail wag the dog (these days).
Thursday, May 24, 2007
Parallelisation
I recently posted that massively parallel processor are on the way and that we (as programmers) will have to think differently to write code for these environments. I posted that we will need to think in terms of tiny nuggets of program that interact in some simple way.
This in itself is not hugely clever - expose a simple message-passing system, perhaps make a nod towards PI-calculus, maybe make compile-time restrictions on code size and message complexity. Hmm, a kinda SOA at the machine-code level.. grid computing anyone?
I think that moving away from the separation between 'data' and 'code' might help somewhat, and this bit is clever! It would mean that, once suitably transformed, a users data can be expressed in terms of it's interpretive ability. A new service can be created because we know that the user has recorded the position of a telelphone port, or changed the value of the price of a share in some company. Now our 'real' coders are really writing interpreters. They are writing programs that interpret the data into machine-executable processes. Of course, the implication is that we are creating a program that is writing itself at execution time... oh boy!
This in itself is not hugely clever - expose a simple message-passing system, perhaps make a nod towards PI-calculus, maybe make compile-time restrictions on code size and message complexity. Hmm, a kinda SOA at the machine-code level.. grid computing anyone?
I think that moving away from the separation between 'data' and 'code' might help somewhat, and this bit is clever! It would mean that, once suitably transformed, a users data can be expressed in terms of it's interpretive ability. A new service can be created because we know that the user has recorded the position of a telelphone port, or changed the value of the price of a share in some company. Now our 'real' coders are really writing interpreters. They are writing programs that interpret the data into machine-executable processes. Of course, the implication is that we are creating a program that is writing itself at execution time... oh boy!
What happened?
I'm not happy! What happened to good code? What happened to efficient programs? What happened to squeezing the last dribble of performance out of that computer?
Why is my PC is starting to creak even though it has 2G memory, a superfast HT P4, SATA, a mega gfx card, etc. I remember (whistful reminiscence ensues, cue scratchy violin music and sepia, soft focus imagery) a P166 with 16Meg and a 1G IDE HD playing Quake and Duke Nukem. I remember programming image manipulation programs and virtual reality services that barely tickled it. I remember... when I was a lad, you had to solder your own processor to the motherboard and blow an EEPROM with a basic BIOS. Actually, that last bit is true - I feel like I'm one of the last of a dying breed!
So, what about this? Here's some possibilities:
The Von Neumann bottleneck is probably biting our butts. Not just memory though, as more use is made of the HD in modern OS's. More generally, the data comes out of the processor at a huge rate on knots. The first thing it hits is a thing which we shall call a north-bridge. This generally does AGP (where applicable), PCI and the memory bus. The data-transfer across this piece of silicon would have to be huge - an error, or sub-optimal bit of this would certainly have a big effect. Peripheral devices, such as USB, HD control, serial and parallel interfaces are then bundled into a south-bridge. More often than not, this sits on the PCI bus. So, paged memory in the OS has to pass through the north-bridge, across the PCI bus and through the south-bridge on it's way to the HD. Plenty of scope here for bottlenecks.
Onboard gfx with shared memory is, imho, the biggest pile of pap on the planet! Every screen refresh, the card has to request all it's memory from main memory. Now, dear reader, re-read the previous paragraph! Not only is the memory bus being used for normal processor operations (remember that a processor can easily fill this bus) but you're whapping a screenful of information across the bus 60times per second. Nuts!
Bloatware screws things too. When a simple web-browser can hog 100megs of memory, we have to think to ourselves that something is wrong. Pushing this amount of data around cannot be necessary and would certainly have an effect on performance. But more fundamentally, when the OS has a lot in memory it will generally page more and hence have to traverse between the memory and the HD more.
So... an answer? Hmm, difficult!
Certainly the next big thing on the horizon is big, multi-processor machines. IBM's recent T-FLOP 80-core processor was an early example of what is to come. In order to utilise this, programs will have to be written differently. parallelisation will become the watch-word. We will have to think in terms of tiny, interacting nuggets that can run in parallel, rather than monolithic, synchronous programs. I think will then help with the memory bottleneck, but I'll investigate this later.
Why is my PC is starting to creak even though it has 2G memory, a superfast HT P4, SATA, a mega gfx card, etc. I remember (whistful reminiscence ensues, cue scratchy violin music and sepia, soft focus imagery) a P166 with 16Meg and a 1G IDE HD playing Quake and Duke Nukem. I remember programming image manipulation programs and virtual reality services that barely tickled it. I remember... when I was a lad, you had to solder your own processor to the motherboard and blow an EEPROM with a basic BIOS. Actually, that last bit is true - I feel like I'm one of the last of a dying breed!
So, what about this? Here's some possibilities:
The Von Neumann bottleneck is probably biting our butts. Not just memory though, as more use is made of the HD in modern OS's. More generally, the data comes out of the processor at a huge rate on knots. The first thing it hits is a thing which we shall call a north-bridge. This generally does AGP (where applicable), PCI and the memory bus. The data-transfer across this piece of silicon would have to be huge - an error, or sub-optimal bit of this would certainly have a big effect. Peripheral devices, such as USB, HD control, serial and parallel interfaces are then bundled into a south-bridge. More often than not, this sits on the PCI bus. So, paged memory in the OS has to pass through the north-bridge, across the PCI bus and through the south-bridge on it's way to the HD. Plenty of scope here for bottlenecks.
Onboard gfx with shared memory is, imho, the biggest pile of pap on the planet! Every screen refresh, the card has to request all it's memory from main memory. Now, dear reader, re-read the previous paragraph! Not only is the memory bus being used for normal processor operations (remember that a processor can easily fill this bus) but you're whapping a screenful of information across the bus 60times per second. Nuts!
Bloatware screws things too. When a simple web-browser can hog 100megs of memory, we have to think to ourselves that something is wrong. Pushing this amount of data around cannot be necessary and would certainly have an effect on performance. But more fundamentally, when the OS has a lot in memory it will generally page more and hence have to traverse between the memory and the HD more.
So... an answer? Hmm, difficult!
Certainly the next big thing on the horizon is big, multi-processor machines. IBM's recent T-FLOP 80-core processor was an early example of what is to come. In order to utilise this, programs will have to be written differently. parallelisation will become the watch-word. We will have to think in terms of tiny, interacting nuggets that can run in parallel, rather than monolithic, synchronous programs. I think will then help with the memory bottleneck, but I'll investigate this later.
Tuesday, April 17, 2007
Is Java so bad?
I'm back on the old java trail now, although it regularly feels more like a trial. Now, why is this? I used to really like this language. It was my weapon of choice!
Java is C on acid. C was ok, in it's day. It needed the Java treatment (although I understand that Objective C was already there long before). So there's that funny C-syntax. I'm not sure what might be better as a syntax, but I'm not alone thinking that Java often feels laboured.
Java has grown HUGE. Good god, has it grown!? Oak was it's original name, perhaps Ivy has become a more apt name? It's large and twisty with big hard API's born out of committies and focus groups. All pushed about by entities with hidden agendas (but we'll come to that).
Java is ill defined. Partly because of it's size, but also a couple of omissions and mistakes. Inner classes and anonymous classes are generally bad news. Threading became a nightmare (when half the API got depricated). Dates.. oh lord, don't get me started. There are all kinds of holes in J2EE, and then we get onto 3rd party libs.
Java is clearly a corporate technology. A large corporate owns it (whatever their protestations). Large corporates have the largest voices inside the JCP. The JCP itself seems to have the image of design-by-committie.
Java has a lot of 'frameworks'. J2EE is an easy target because it is a big network of frameworks. But also look at the 3rd party offerings. Mostly they're frameworks, often big, complex ones!
Java seems to breed spaghetti. I have no clue why this might be. I was recently on the sidelines of a large project that was a huge tight network of about a Gig of source. The current one is at risk of going the same way (evolution without strong refactoring exercises).
Don't get me wrong. Java is a useful tool that earns me my daily crust. It's not the worst and certainly better than most. It's relatively productive and generally easy to be expressive whilst using it. I guess I'm interested in how it might be improved upon. Thoughts?
Java is C on acid. C was ok, in it's day. It needed the Java treatment (although I understand that Objective C was already there long before). So there's that funny C-syntax. I'm not sure what might be better as a syntax, but I'm not alone thinking that Java often feels laboured.
Java has grown HUGE. Good god, has it grown!? Oak was it's original name, perhaps Ivy has become a more apt name? It's large and twisty with big hard API's born out of committies and focus groups. All pushed about by entities with hidden agendas (but we'll come to that).
Java is ill defined. Partly because of it's size, but also a couple of omissions and mistakes. Inner classes and anonymous classes are generally bad news. Threading became a nightmare (when half the API got depricated). Dates.. oh lord, don't get me started. There are all kinds of holes in J2EE, and then we get onto 3rd party libs.
Java is clearly a corporate technology. A large corporate owns it (whatever their protestations). Large corporates have the largest voices inside the JCP. The JCP itself seems to have the image of design-by-committie.
Java has a lot of 'frameworks'. J2EE is an easy target because it is a big network of frameworks. But also look at the 3rd party offerings. Mostly they're frameworks, often big, complex ones!
Java seems to breed spaghetti. I have no clue why this might be. I was recently on the sidelines of a large project that was a huge tight network of about a Gig of source. The current one is at risk of going the same way (evolution without strong refactoring exercises).
Don't get me wrong. Java is a useful tool that earns me my daily crust. It's not the worst and certainly better than most. It's relatively productive and generally easy to be expressive whilst using it. I guess I'm interested in how it might be improved upon. Thoughts?
Monday, January 08, 2007
4 P's
It occurred to me last night to characterise mechanical/electrical computer systems by 4 P's:
Purpose,
People,
Place,
Processes,
and an extra one: Processors although this is more of an implementational detail than a part of the character of a computer system.
I considered these aspects with reference to whether the system has one or many of each. So let's dig into the history a little as I remember it.
Computer systems started out as glorified calculators, code crackers. This was a single purpose. They were used by one person at a time who had to be present at the computer. They did only one task at a time and were in fact only a single processor (with little in the way of peripheral I/O). I think this is the simplest form of computer: each of the P's is singular.
Moving forward in history, there have been systems that have made some of these P's plural with varying levels of success. Mainframes allowed many purposes in many processes and many people. Desktop PC's seem to be a backwards step in many ways: they started off as general purpose, but limited to one process for one person. Then something changed. Desktop computing added multiple processes - badly at first, but slowly becoming much better. Multiple people has yet to be adopted in a complete way, but systems such as desktop Unix installations have done better than most. Also, the place factor has become much better supported. I find myself able to log into a limited set of computers that give me *basically* the same experience. I can even take my usual laptop to another location and have nearly the same experience. Infact, I can log into almost any computer and have access to some of my usual experience if I keep my pen-drive with me (having said that, I am more experienced than most users and know how to use a range of different environments relatively effectively).
So what's next? Well, as I see it, someone somewhere will make good on Sun's promise that, 'the network is the computer', but also support times when the network is unavailable. This should make all of these P's plural in all cases. General purpose computing can be supported better with the introduction of byte-code compiled, interpreted environments. This could help make multiple processes safer too with strong sandboxing of processes against eachother. The operation of the system within the context of multiple people needs to be strongly addressed, especially when the system deals with multiple places, multiple processes and multiple processors. I have talked about security before, Unix systems appear to be the closest to what I have in mind.
In conclusion, I think it is possible to specify a system that could start along the path of pluralising these 4 or 5 P's. I think this would be a sensible next step in the evolution of computing history. Moreover, a focus on pluralising these P's should fix problems with current systems and add flexibility to the whole computing experience.
Purpose,
People,
Place,
Processes,
and an extra one: Processors although this is more of an implementational detail than a part of the character of a computer system.
I considered these aspects with reference to whether the system has one or many of each. So let's dig into the history a little as I remember it.
Computer systems started out as glorified calculators, code crackers. This was a single purpose. They were used by one person at a time who had to be present at the computer. They did only one task at a time and were in fact only a single processor (with little in the way of peripheral I/O). I think this is the simplest form of computer: each of the P's is singular.
Moving forward in history, there have been systems that have made some of these P's plural with varying levels of success. Mainframes allowed many purposes in many processes and many people. Desktop PC's seem to be a backwards step in many ways: they started off as general purpose, but limited to one process for one person. Then something changed. Desktop computing added multiple processes - badly at first, but slowly becoming much better. Multiple people has yet to be adopted in a complete way, but systems such as desktop Unix installations have done better than most. Also, the place factor has become much better supported. I find myself able to log into a limited set of computers that give me *basically* the same experience. I can even take my usual laptop to another location and have nearly the same experience. Infact, I can log into almost any computer and have access to some of my usual experience if I keep my pen-drive with me (having said that, I am more experienced than most users and know how to use a range of different environments relatively effectively).
So what's next? Well, as I see it, someone somewhere will make good on Sun's promise that, 'the network is the computer', but also support times when the network is unavailable. This should make all of these P's plural in all cases. General purpose computing can be supported better with the introduction of byte-code compiled, interpreted environments. This could help make multiple processes safer too with strong sandboxing of processes against eachother. The operation of the system within the context of multiple people needs to be strongly addressed, especially when the system deals with multiple places, multiple processes and multiple processors. I have talked about security before, Unix systems appear to be the closest to what I have in mind.
In conclusion, I think it is possible to specify a system that could start along the path of pluralising these 4 or 5 P's. I think this would be a sensible next step in the evolution of computing history. Moreover, a focus on pluralising these P's should fix problems with current systems and add flexibility to the whole computing experience.
Subscribe to:
Posts (Atom)