Re: RosAsm

From: Beth (BethStone21_at_hotmail.NOSPICEDHAM.com)
Date: 04/30/04


Date: Fri, 30 Apr 2004 15:55:28 +0100

The Wannabee wrote:
> Hi Beth :-) This has become a nice day. Code gets written and life
is good.

Cool; Nature of life, Wannabe...sometimes great, sometimes boring,
sometimes awful...kind of like one long sine wave...it goes up, it
comes down, it goes up and it comes down...note that, with a sine
wave, it spends more of its time in the boring old middle than any of
the interesting extremes...which seems to sum up life pretty well, I
think... so, if in one of the "low" ditches at any point, wait around
for the cycle to change and it'll go boring then get exciting then go
boring again then get depressing then go boring then get
exciting...and so on...just wait around long enough and it'll all go
through the cycle...that's why it's always good to have a hobby or
important job of some kind...something to do in those boring parts
while you wait around for the exciting bits ;)...

"The grand old Duke of York
He had a pair of trousers...
And when they were up, they were up...
And when they were down, they were down...
And when they were only half-way up...
...he was arrested"

[ One of Spike Milligan's many versions of the popular rhyme ]

> What you are trying to implement would be extremly nice, if
possible. But
> it seems to me an AWFUL complicated task. But if you get it right,
you
> will probably go down in history. Instant compilation... But I guess
it
> would be close to impossible to implement it fast enough ??? At
least
> using conventional thinking? I guess you have been thinking about it
for a
> while....And with that slightly alien mind of yours, you found a way
?

Oh dear, that "conventional thinking" of yours has really overly
complicated the task, hasn't it? For no particular reason...

Trust me, brain surgery is _still_ more impressive...actually, filing
papers in an office efficiently is probably still more impressive than
this...really, calm down a little...it's not about "saving the
universe from the forces of evil" or anything quite so drastic...

I mean - pardon if I giggle - "go down in history"? What? Like all
those "famous" people who invented compilers and word processors and
stuff? Heck, I'll even give you an _easy_ one...without using the 'Net
to "cheat" (as you can find the answer to practically _anything_ when
you consult the "Hitchhiker's Guide to the Galaxy" there...I'm
disappointed that Google have forgotten the big "Don't Panic!" sign at
the top of their search engine, where much of the 'Net adventures
begin ;), that is...without looking it up, I'll give some of the
easiest names to drop: Who is attributed with the invention of the
GUI? Who came up with the "killer app" of spreadsheets? Perhaps the
easiest of them all...complete the list: Steve Jobs, Wozniak, ...and
what is it a list of?

Heck, other than other geeky programmers - and not even all of them -
who knows who Abrash or Wozniak or Knuth are? Minor "gods" to
programmers (well, probably not VB programmers...they don't know
enough and aren't really programmers, are they? No offence...just
telling it like it is ;) but complete and utter _nobodies_ to everyone
else...

"Go down in history"? Oh, that's a good one..."unsung heroes",
Wannabee...all those millions who couldn't get anywhere without a
GUI...and effectively _NONE_ of them know that it's Douglas Engelbart
that they must thank (answer to one of the questions above, by the
way...but no reading down here and "cheating" or it doesn't count
;)...

I Hope Rene already knows this, as I wouldn't want to see him too
terribly disappointed or anything...indeed, as Rene likes to think of
himself as a "warrior" then let's put it in similar terms...we all get
spiritually buried next to the tomb of the "unknown soldier"...just
like all those great camera and lighting and sound experts in
movies...all those names passing by at the end of movies, TV and
computer games...no-one ever reads those, you know...or how about the
_actual_ musical genius who played the keyboard (and simultaneously
played the bass on the lower keys :) for "the Doors"? Nah, no-one reme
mbers who he was because Jim Morrison was the one who swore on TV and
pulled out his private parts...same thing, say, with a "spiritual
clone" of Jim in the also late Micheal Hutchence of INXS...the
keyboard player is the one who actually writes all the music, you
know...who's he? No-one knows because he's the "really boring one" who
hides in the corner...who actually writes all of Wacko Jacko and
Madonna's hits? Because, basically, they are only singers...Madonna's
"Justify my Love", for example, was actually written Lenny Kravitz
(this one is only obvious because, being a singer himself, he provides
the backing vocals, if you listen real, real carefully ;)...and you
can always spot a song from Prince because of his trademark use of "2"
and "4" rather than the words "to" and "for" (plus, the sex-mad nutter
only writes songs for women too)...hence, "Nothing compares 2
U"..."Slave 4 U"...and so forth...mind you, he did "Manic Monday" too
but there's no word in that to abbreviate with a number...

And, of course, Eminem _IS_ Dr.Dre, really...I actually find all this
"what a role model Eminem is to the kids for dragging himself from the
gutters" by Bush and others offensive..._DRE_ picked up Eminem for his
record label and provides all the music because he's the actual
musical genius here...and Dre came from a worse neighbourhood...and -
_against_ people refusing to play his "black music" (mind you, with
bands called things like "Niggers With Attitude" and "Public Enemy",
he was delibrately _provoking_ them to get annoyed, for sure ;) - Dre
really _did_ drag himself from the gutters by his own talent and work
alone...and it's Dre who's now so successful that he's _able_ to have
his _own record label_ to pick up "mere rappers" like Eminem and have
them rap on top of _Dre's_ music...Dr.Dre who uses his label to
promote and help his "brothers" off the streets too, kind of like a
"musical charity" or something...Eminem was actually a kind of
"mistake"...he only heard a tape of him and thought he "must" be black
from the rapping...but, not actually being racist (just wanting to
help out those who had been like he was originally to make something
of themselves), he thought "why not? A good white rapper...it's a
novel gimmick...and, though white, he was living in a ghetto and
that's _really_ what I'm trying to pick up these artists to save them
from, whatever the skin colour"...an _actual_ self-made success from
far harsher circumstances to entrepreneurship that he uses to foster
new talent and "save" people from the ghettos with...not only a
"self-made success" but one with a "social conscience" to try to help
and promote _others_ to do as he did by giving them the "breaks" that
he probably never had and just had to constantly fight and fight to
get where he is...and Dre writes all the music for Eminem so what they
are praising is a large part Dre too, though they don't mention his
name...and Eminem is where he is because Dre listened to his tape and
gave him that "break"...he didn't do even half as much fighting to get
where he is as Dre did...

But, indeed, "they forgot about Dre"...because, dare we say, he's a
black man...and because he did it "fighting the powers that be" all
the way along...and because he uses his success for some _social_ good
in fostering new, young talent from the ghettos...so, they have said
nothing about all the black artists like Dre, who really did fight and
use their talent alone to make a success of themselves...but once one
_WHITE_ artist makes it as a rapper, then our Conservatives can't wait
to pour praise on the "self-made success"...when the black rappers
talked about guns and violence and stuff, it was a "terrible influence
on the children"...but Eminem can sing exactly the same things - he
even has some extra "quirks" of seriously misogynistic lyrics - has
his "terrible influence on the children" conveniently ignored...nope,
he's a _role model_ because he's _white_...

"Elvis was a hero to most...
Elvis was a hero to most...
Elvis was a hero to most...
But _he never meant *** to me_...
You see, straight up racist that sucker was
Simple and plain...
Mother*** him and John Wayne...
'Cause I'm Black and I'm _proud_
I'm ready and hyped plus I'm amped
_MOST OF MY HEROES DON'T APPEAR ON NO STAMPS_
Sample a look back...you look and find
Nothing but 'rednecks' for 400 years, if you check"

[ "Fight the Power", Public Enemy ]

"Unknown soldiers", the lot of them...but, arguably, in some cases,
they get the best deal of all...their music and stuff promoted to the
world and get to go along on "tours" and make all that money (being
songwriters, they'd usually get the bigger share of the money ;) and
live the "pop star" excesses but never have to suffer the tabloids
insulting them or people banging on their door or "stalker" fans
because no-one actually knows who they are...the fact that they "hide
in a corner" might be quite _delibrate_ and NOT to do with "just being
shy" or anything ;)...

> Its
> interessting, if you could find a way to sort of "flip all coins at
once"?
> Like electrons moving current ?

No, they are still just flipped one by one...it's merely a case of
"timing", is all...

> I mean, you would have to come up with
> some very clever way of updating the program, say when one changes a
> variable that many others are dependent on it? Or expand some memory
> somewhere. Maybe you could do it by simply making it ABSOLUTELY
ABSTRACT ?

Well, again, you're - for no particular reason - going to an
extreme...a touch of abstraction comes in useful but "ABSOLUTELY"?
Heck, you don't even really know what you mean by "absolutely
abstract", do you? It sounds clever but what on Earth could even mean
by that? You just don't really know, do you? Perhaps an
"extrapolation" and "speculation" one step too far there, Wannabee...

NEWSFLASH!: _Everything_ inside a computer is _already_ "absolutely
abstract" (zeroes and ones, bits and bytes, etc. ;), in case you
hadn't noticed that yet...

But, yes, to do a reasonable implementation, you would, for example,
treat references to other program objects symbolically...and, yes,
programming languages _do_ do that already...as I say, it's all just
merely a case of "timing" throughout..._keep_ those references
symbolic all the way through until the last minute...so, you add some
code which "moves" the symbolic data variable further down in the
code...right, so the address has changed...but the _symbolism_
hasn't...hence, delibrately _DON'T_ have the program think in
"address" terms until the very last minute - when it _must_ convert to
"addresses" for the final executable - and things can move around
memory all they like, doesn't effect any of the _symbolic_ references
one bit...

Oh - and to help aid your comprehension of the idea perhaps a little
better - note that there's _NO_ particular reason why instructions
need be stored in their final order as in the executable...so long as
you can recreate the necessarily "final order" of instructions and
data when you're putting that executable together, you can store them
all in any old order...so, similar to files on a file system, making
one file bigger doesn't mean you have to push every single byte
thereafter further down in the hard drive (imagine doing that with a
120GB hard drive, almost full to capacity, and making just a 4KB
change to a file right at the start...oh dear, hours and hours waiting
for it all to be shuffled along - like running "defrag", really - to
shift it all 4KB further along...nah, doesn't work that way, does it?
Yes, _exactly because_ it would be a _REALLY STUPID_ way to implement
things ;)...if you make a file right at the start of a hard drive
bigger by a few KBs, then do you have to sit around all day long
waiting for the OS to shuffle every single byte of every single file
thereafter that many KBs further along? Then why do it with
instructions in memory? Use something similar to a "file system" to
index all the instruction sequences ("sequences" is an important word
here for keeping it efficient and, yeah, a "defrag" as we go along to
re-consolidate instructions back into "sequences" is a good way to
keep it RAM efficient and still speedy :) in memory...what does the
"final linking" process do? "Walk the tree" to put it all into the EXE
file in the right order, basically, and _THEN_ the "symbolic" stuff
can be turned into "final offsets"...but this is only for compiling
the final executable, mind you...development still works from the
"file system" stuff instead...creating an executable isn't looked at
as being the "end product" of a series of "phases" in the same
way...it's just what you do to "publish" your program in a form
suitable for "delivery" to other machines...you could also call the
"executable" a "distributable" from this perspective, if that helps
you switch your thinking to that right wavelength...

Most compiler theory is still based on the notion that you only have
32KB of RAM for the compiler _and_ the code...so it's all about
storing it compactly and making "multiple passes" so that you try to
process things as much "in place" as possible so you don't need much
memory for processing...and so on and so forth...well, time to
re-evaluate those presumptions...RAM sizes are on the order of 256MB,
512MB, 1GB and so on (enough to store the entire Library of Congress
as plain text?!! Which is why I still maintain it's _scandalous_ that
Windows takes as much memory as it does ;)...we also have _virtual
memory_ too, so you needn't have all of it in physical memory, anyway
(nice, if you can, speeds things along but not 100% necessary except
for the "speed" thing...and with 120GB hard drives, then no need to
worry too much about that running out too quickly ;)...yet compiler
theory is still thinking in terms of "isn't 32KB a lot of RAM? We're
so lucky to have that 16KB expansion pack!" from decades ago in the
general way it approaches this situation...

Just a case of: "timing", "lateral thinking" and "ignoring silly old
presumptions and theories from times past, re-evaluating the problem
from first principles for the typical modern situation that this is
actually happening in"...no magic, no clever formulae, no "theory of
relativity"...the universe, unfortunately, will NOT be "saved" by any
of this and it's not at all "extreme" or "heroic" (sorry if that
shatters any illusions :)...just lateral thinking and taking a 100%
_pragmatic_ approach to the problem ("the theory says..."? Yeah, well,
the "theory" is _ancient_...it's _right_, mind you, of course...but
it's _ancient_...just needs "tweaking" for the modern situation...you
know, all the places where that "theory" made _compromises_ because of
lesser RAM, lesser processing power, etc. can now simply be undone, as
that's not needed anymore...for example, "multiple pass"...why?
"compile then link then"...why? Imagine this applied to a word
processor like Word...the very, very first word processors weren't
WYSIWYG and, yeah, spell checking required you to actually press a
"spell check" button to initiate it...but would anyone - in this day
and age - now accept the idea of a word processor where - a bit like
editing raw HTML files in Notepad - you couldn't see what the output
would look like but would include "tags" to change font sizes and so
forth...and then when you wanted to look at the output, you'd have to
pass it through the "word processor compiler" to get a "printer
file"...then you would "link" your printer file with your "printer
configuration driver" before you're able to send it to the printer to
see what the output looked like...oh dear! Made a mistake with one of
the tags...okay, time to go back to the "source code" and edit the
tags a little...then "compile" it to another "printer file", "link" it
with the "printer configuration driver" and print off the new
version...hmmm, better but that font at the bottom could do with being
bigger...right, back to the "source code", "compile" it to a "printer
file", "link" the "printer file" with the "printer configuration
driver" and print it off once more...you getting the picture here?
Other applications moved on...but programming tools have amusingly
_gone absolutely NOWHERE_ since they were originally invented...hence,
all I'm really talking about is thinking of a programming tool as a
kind of modern "word processor", just for program code...it _ain't_
"special" - everything is still just ones and zeroes - so all the
ideas elsewhere are often _valid_ here too :)...

> Just wildly speculating, but if all things sort of was dereferenced,
if
> even possible, so that say an expanding table could be moved, and
> expanded, without data getting screwed up somewhere else...I guess
if you
> had an idea, that was really good, and new, then maybe you wouldnt
like to
> share it ? I would love to hear your thoughts... my email, is valid
if you
> want to send a few words.

Nope, "open source", me...I'm sure Randy, Rene and others will
confirm, there may be some "fame" from such things (doesn't
particularly interest me...I see "fame" as more of a _problem_ than a
solution...who wants people constantly banging on their door? People
walking up to you as if they've known you all your life and you've
never met them before (woah! Way too spooky and frightening! ;)? As
George Micheal jokes in his song "Star People", fame is for people who
were screwed up by parents that ignored them and hated them that they
"just want to be Loved" and will take _any_ kind of "Love" from anyone
so long as they are standing in the spotlight, receiving "glowing
praise"...yes, however actually _fake_ it all is when the tabloids
destroy them the very next day - yeah, exactly..."fair weather
friends" is putting it far too mildly - for wearing the wrong colour
dress to the award ceremony ("What was Christina A-gorilla thinking
when she donned that dreadful pinstripe and fur combination?"...on the
other hand, "Didn't Nicole Kidman look a total dream wearing that
scuba diving outfit? What outfit can't she pull off?"...oh, the very
next "fashion supplement" just reverses the insults and praise...then
back around the "cycle" we go on and on ;)...I may have my
psychological flaws here and there - to which Annie will, no doubt,
gladly enlighten you about - but this particular one is NOT one of
them ;) but - certainly not with ASM, for sure - no "great fortune" to
be made...

The "reward" to me would be going to a website, downloading a tool
and - wow! - it's NOT brain-dead, limited, broken, slow and / or
comletely unuseable!! Woo-hoo!! That means I can actually _program_
things properly...nice and comfortably and fast and
efficiently...woo-hoo!! That's "reward" enough for me...I mentioned it
before, Love is its _own_ "reward"...everything is slightly better,
everyone's just slightly happier than they were before and I get to
sit back and enjoy that all...nope, not just in "hippy good vibes" but
pragmatically...if I was "right" then others will copy...all my good
ideas show up in other tools, which _I_ then use myself...I'm helping
_myself_ out by helping others...for every "newbie" I may "enlighten",
they might just possibly be the one who adds something fantastically
useful onto Linux one day...might be the one who knocks Microsoft off
their perch...might be the one who cures world hunger (and, again, its
_own reward_...no need to send these places "aid" anymore from tax
money because they can look after themselves now they've been
"liberated" by being taught _how to fish_ rather than just being given
a fish every day...and when they are all living comfortably there,
then they will be in a position to be the programmer who _helps me_
right back with _their_ "mad idea"...with education, with comfortable
surroundings like us, with all the problems of simply eating and
getting by every day removed...well, consider this: How many Edisons
and Einsteins and Shakespeares and so forth have been left to _starve
to death_ in an empty field somewhere? Yes, the list delibrately has
famous people from different (original) nationalities, just to show
that there's NOTHING about nationality to dictate this...the only
connection is that they had societies that permitted them _freedom_ to
explore their fields (Einstein's family had to switch nationalities,
due to the Nazis, to American to get that freedom once again...which
also has to make people question the complete nonsense about
"refugees", "asylum seekers" and "immigrants"...especially in America
(and also Oz) because you're _ALL_ immigrants of some kind, if you
ain't a Native American (or Aborigine)...yeah, they only come to
"steal", never to "contribute"...sorry, complete Jackson Pollocks
because coming to a country _negative_ to their presence and oweing
them absolutely nothing is usually the _very motive_ to "contribute",
while our own young kids sit fat on a couch eating pizza, _refusing_
work that isn't "good enough" because they have dreams of being pop
stars or something ;), to get education about the things they needed
to know about, etc...._that_ will reward us all...far more than any
silly "enforced slavery" by maintaining an unpayable "debt"...the
"humanity" angle is very important that those who campaign about these
things perhaps don't point out the _pragmatic (and, yeah, "selfish")
benefits_ enough...you know, a bit like my "environmentalism" case,
after all this time, has never mentioned "maintaining rainforest
biodiversity" or "aren't trees and animals pretty?" even
once...there's actually _no need to do so_...because the simple
pragmatics and _selfish_ case is good enough to make the point without
demanding anyone has the slightest bit of "humanity" or "compassion"
at all...if you do happen to have those things, then that's
great...but, well, history shows one clear thing...if you're depending
on people "being nice" just because "being nice" is a "really nice
thing to be doing" then you'll _fail_...it's not that people can't be
nice or anything...but, so often, they find it impossible to get
passed that first "what's in it for me?" question...not totally their
fault as it _IS_ drummed into us all from birth to think and behave
like that...such as the automatic presumption you have here, in fact,
that I'd want to automatically "keep it all secret" to slap "patents"
and "copyright" on it to make "fame and fortune"...oh, come on, that
just _wouldn't happen_ for some minor software idea here and there,
even if I _wanted_ to do that...I'm a versatile "multi-tasker",
anyway...there's plenty of ways to make "fame and fortune" around...my
worry, quite seriously, is doing something _WORTH DOING_...and I'd
perfectly happy with "enough" that just lets me carry on doing what I
want to do...the rest is "fool's gold"...though it's so drummed into
everyone, I'm sure I'll _NEVER_ be able to convince anyone...I'd only
go for "fame and fortune" should it permit me to _DO SOMETHING
USEFUL_...otherwise, really, who wants the _hassle_ and _problems_ of
it all? Strange people bothering you: "please give me a million pounds
for my 'dream' to write and direct movies" over and over...

"A heart that's full up like a landfill
A job that slowly kills you
Bruises that won't heal

You look so tired and unhappy
Bring down the government!
They don't, they don't speak for us

I'll take a quiet life
A handshake of carbon monoxide

No alarms and no surprises
No alarms and no surprises
No alarms and no surprises
Silent, silent

This is my final fit, my final bellyache with...

No alarms and no surprises
No alarms and no surprises
No alarms and no surprises...please!

Such a pretty house, such a pretty garden...

No alarms and no surprises (let me out of here)
No alarms and no surprises (let me out of here!!)
No alarms and no surprises please (LET ME OUT OF HERE!!)"

[ "No Surprises", Radiohead ;) ]

Yup, no alarms...and no surprises...nothing that will "go down in
history", I assure you...just a case of "timing", "lateral thinking"
and "first principles", is all...

Indeed, _IF_ you're going to shift every single byte of every single
file on your hard drive just to accomodate a 4KB expansion of one file
at the start then, yeah, it'll take _forever_..."speed" would be so
_crucial_...

On the other hand, use a "file system"...and "cache" most of your
operations in RAM, anyway, to just "lazily" write it out...only
re-write those pages that have changed rather than the entire file
every single time ("incremental")...do it all on IRQ and DMA
("parallelism")...then, heck, it happens seemingly "instantly" because
it does very little and does it all "in the background", anyway, while
you're doing something else...

Well, just think the same way but do it for something else...store it
in a kind of "file system"...cache most of your operations in RAM,
anyway, to just "lazily" write it out to the file...only re-write
those parts that have been changed, as they are changed in the
editor - "type time assembly" - than re-compiling the entire file over
and over again from scratch ("incremental compilation")...do it all
"in the background" between keystrokes (there's an abundence of time
going to waste here...what's your computer _doing right now_ while you
read this? Most applications are "blocked" on a "GetMessage" and it's
probably mostly sitting inside the "idle task", issuing a HLT
instruction, waiting for something to happen...you can confirm this by
loading up task manager and going to the "processes" page and
scrolling until you see "System Idle Process"...it'll probably be
something like 98% or whatever...oh, and the other 2%? Well, move up
to "Task Manager" itself and it's taking around 2% to constantly
monitor the system to display the task list and plot the graph on the
"performance" tab...most processes, you'll note, have "00" percent for
their "CPU time"...oh, obviously, select the "CPU time" column...I
can't remember if that's actually a default column for task manager
because, as you might expect, I've altered them to what's useful for
me to know about...so, if you don't see it, then "select columns"
under the view menu is where you tell it what stats you actually want
to see :)...

While in the "system idle process", it's doing _NOTHING_, as the word
"idle" strongly suggests (well, it's possible that Microsoft may sneak
one or two small "admin" tasks in there from time to time but nothing
substantial or at all time consuming...if following "theory" 100%,
then it does _nothing_ and should do _nothing_...if you need some
small "admin", then start up a low priority process to do that...in
fact, looking at the "task manager" list then there's something
labelled "system" just about "system idle process"..._that_ is
probably where the "small admin tasks" really get done ;)...in fact,
for saving power and keeping the CPU cool, it'll probably issue a
"HLT" instruction (look that up in the Intel manuals, if you don't
know it already...it's really an "OS instruction" for this kind of
"take a rest, CPU" thing so it's possible you've not really looked at
it from only writing applications :)...modern OSes - that follow good
design - make applications "block" when they can't proceed...they
aren't scheduled any processor time until some other action "unblocks"
them...so, for example, an application hits "GetMessage", which is a
"blocking" API...that is, if there's no message, then it _waits_ for
one to appear...well, no sense literally sitting in a loop "polling"
for that message...instead, it "blocks" the application...just stops
giving it CPU time...BUT when the OS has a message to pass to the
application, then it "unblocks" it, gives it CPU time again and then
passes back the message from the API for that whole "TranslateMessage"
and "DispatchMessage" thing...

Did you hear about the SETI ("Search for Extra-Terrestrials
Initiative" or something like that..."alien hunters", in other words
;) screen saver? Well, one thing to do to look for "aliens" is to
simply scan all the radio frequencies looking for "unnatural patterns"
that suggest some kind of signal...after all, our TV signals from the
1950s and stuff are flying passed other solar systems out there right
this very moment...so, let's see if we can pick up any "alien TV" over
here, right? But, well, goodness knows where it'll be coming from,
what it'll be like or frequency it'll appear at...hence, SETI just
ploughes through it _ALL_ mostly indiscrimantly...it's a _massive_
amount of data to search through...but then someone had a simple and
cunning idea...how many machines are just sitting idle connected to
the internet out there? Just sitting around making some ball-shape
turn into a cone for a 3D OpenGL screen saver? Instead, put them to
good use...hence, a simple "screen saver" that grabs a chunk of the
data, processes it and sends back the results...good old "immense
parallelism" being the basic idea...if enough people out there are
interested enough to install the screen saver and help out with
"looking for aliens" then the sheer volume of processing power from
tons of people "signing up" is totally _non-trivial_ and very
significant...better yet, it's all "voluntary" so it's all free and no
need to buy 27 massive supercomputers the size of aircraft hangars to
get a similar amount of "power"...and it doesn't effect anyone because
the second you wiggle your mouse, the screen saver - as usual - just
stops doing what is was doing and gets back to your work (a touch of
"redundency" here and there, it's true...in that if you don't send
word back to the main computer for a long period, it'll just have to
assume you're never coming back to it - the screen-saver might have
been uninstalled - and then sends out that same chunk of data to
another machine...but this is common in "parallel" solutions...using
parallelism, you gain a whole lot more "power" overall and then
_accept_ that some "redundency" may occur...though the "redundent"
parts would be strictly unnecessary were this all running perfectly,
you tolerate them...the basic idea is that using parallelism is "six
hundred steps forward" in "power", while the "redundency" that
sometimes turns up when things aren't going 100% smoothly is only "one
or two steps back"...it's still a massive win _forwards_...those -
like the insane "managers" at the NHS who don't seem to understand
this point - who get worried by the "redundency" and then run scared
back to "centralised non-parallel" solutions are shooting themselves
in the foot...kind of like: you make millions running your own
business...one day, you actually lose some money because a "plan" of
yours didn't work out..."right! That's it! Doesn't work! It's all a
failure! Time to close down the business! Time to fire everyone! Time
to go into retirement!"...all because you lose, ooh, $500 but,
overall, you've made $500 _million_ dollars with your business...it's
flawed logic...you tolerate "redundency" here and there - it's really
very minor in the grand scheme of things - as you would tolerate some
"losses" here and there because, overall, you're "winning"
big-time...running back to "centralised non-parallel" solutions
because, ooh, the solar panel had a touch of "redundency" in it? Well,
you'd never do well in business with such an "overly cautious"
attitude and an inability to see the "wider picture" ;)...

Anyway, anyway...tons and tons of time there "in between
keystrokes"...plus, bringing "incremental" into it all, changes what's
expected...when you press the "compile" button, you sit there waiting
for it to compile the whole thing from scratch (even when you press
"make" instead, then it's only "incremental" at the _file
level_...skips _files_ which ain't changed but even if it's just one
byte changed in the file, then _the whole thing_ is re-compiled from
scratch ;)...

Well, just change your perspective on the matter and you'll find more
than enough time...what the compiler has to do is _incrementally_
process the change of a _single keystroke_ in the time between
keystrokes (which is massive in computing terms because us humans are
just so terribly slow ;)...yes, _ONE KEYSTROKE_...that's all...hardly
complicated or "too time consuming", really, is it?

Hence, I hit "M" and it starts looking up identifiers and keywords
starting with "M" in the internal tables...I hit "y" and then it
refines the search of "M" words that have "y" as the second
character...I hit "F" and it refines it even further..._BEFORE_ I've
even hit space or return (perhaps even after only one or two
characters :), it's worked out that I'm typing "MyFunction", which is
a subroutine defined elsewhere..._IF_ what I type isn't in the tables
then it's _still_ found its way to the right place to _insert_ a new
identifier into the tables...and, anyway, it worked out that
"MyFunction" was a new identifier by the time I hit the "u" key, as no
other identifier starts with "MyFu" in the tables so it has plenty of
time to deal with it all...if the "MyFunction" I'm typing is a
"reference" to something then pop that into the table...if I'm hitting
the delete key and it wipes out a reference, then just remove that
_one_ reference as we're going along...

Do the entire thing "on-the-fly" with each _individual_ keystroke (no,
don't worry about thrashing the disk file or anything...it's "cached"
and "write combining" and "lazily" written to disk and all that other
stuff...it's all really happening in RAM and then it "DMAs" - a
"parallel" operation - the changes in the background at appropriate
times...if you really insist, keep the whole thing in RAM until "save"
or "run" is selected in the menu..."lazily written" enough for you?
;)...yup, the internal structure is _radically different_ to support
this (that's what I was talking about with C's code, Frank...this
method is "depth first", so to speak, if the traditional method is to
be considered "breadth first" ;)...but think about exactly what is
happening...we're not only doing the compilation _in parallel_ so that
it's compiling at the same time as you're typing away...it's also
_spreading out_ the processing...that is, when you hit "compile", it
has to rush from the start to the finish as fast as it possibly
can...it's a big "race" to the finish line from the "starter's gun" of
hitting the "compile" button...but think about when you hit that
"compile" button and RosAsm manages to compile your program in 0.5
seconds, say...now, you actually took around an hour to type in that
code...so, we're asking this "incremental compiler" to do 0.5 seconds
worth of work in _an hour_ (it can be _7200 times slower_ - in words,
seven thousand two hundred times slower...because it's tempting to
think I might have hit one too many zeroes or something there as it's
so significantly large ;) - than RosAsm at processing things and
_still_ make it in on time as apparently "equal in speed" to
RosAsm...of course, even the worst, worst implementation in
VisualBASIC by Microsoft is not going to be any near as bad as 7200
times slower so, sorry, _always_ going to kick your arse with almost
arrogant ease ;)...yeah, you're NOT even causing it to break even a
single drop of sweat here...indeed, far from your "impossible task"
you were imagining, we've just taken a slightly different perspective
on the problem and turned into "pathetically trivial"...in fact, you
kind of have to strain not to just laugh out loud at the "impossible
task" nonsense ideas of "conventional thinking"...

All I'm doing is noticing that in one hour's worth of simple text
editing, your machine will spend a far from non-trivial amount of time
just sitting in that "system idle process" (if this is your foreground
task and nothing else is taking up any time - everything but the
editor is "blocked" on a "GetMessage" - then every time you're not
pressing or releasing a key, the application will hit "GetMessage" and
_block_...the "system idle process" is delibrately given the lowest
possible priority (literally zero, while no other task is ever allowed
to be that low...note that the priority is listed as "N/A" under task
manager...it doesn't apply because the priority of the "idle" process
is "the lowest possible" by definition...it _only_ runs when there is
absolutely _nothing_ else for the computer to be doing at that point
in time ;)...so, it hits "GetMessage" and it falls into the "system
idle process"...which issues a "HLT" instruction that puts the CPU to
_sleep_...and only an IRQ or similar wakes it back up...an IRQ like,
well, pressing or releasing the next key...then it processes that
quickly via the "window procedure" - add a character to a buffer,
write the character to the screen and then goes back to sleep again...

So, want to work it out? What's your "words per minute"? What's your
CPU clock speed (multiplied by 60 as that's normally "per second" and
we need it to match up with the "per minute" of the other
measurement...hence, 1GHz = 1 billion times a second, x60 is 60
billion times a second...and, of course, on modern machines, it's
possible for it to be doing _more than one instruction_ per clock tick
that this is actually _more_, if it were only possible to convert to
"millions of instructions per second", as was the old measurement
before things went "parallel" to render those units slightly
meaningless...but, hey, I'll _cripple_ my results and _treat it_ as if
we meant "60 billion instructions per second"...actually, let's half
it, just to be "fair" and show absolutely no bias whatsoever because
what I have got to worry about with even "30 billion instructions per
second"? Especially when 1Ghz is actually "slow" these days and people
have 2GHz and 3GHz machines quite typically, which is always just
getting faster and faster all the time :)? Let's say you can manage,
ooh, _115_ words per minute (figure taken off a website where a legal
secretary is _bragging_ about how fast they can type to try to get
work...again, though, if you want to "cheat", feel free to even
_double_ this figure to impossible speeds...I really don't care
because, as you'll probably beginning to realise, the "leeway" is
massive that even major "cheating" would not change the conclusion one
iota ;)...

And we're talking about an hour's worth of editing (in which you're
NOT spending all of that time just typing and typing...if you stop to
think or read over old code, then that "system idle process" gets
99.99999% of CPU time - not 100% only because the scheduler still pops
in periodically and adjusts the "clock" and that kind of minor "admin"
stuff here and there - so you're just throwing extra computing time
away...also, Windows is bloody dreadful...it wastes time all over the
place...it's not very efficient or well-written at all, as you've no
doubt noticed...but I'm still going to happily use it as the OS for
the example...

Oh, yeah, when you type something and make a typo and press backspace
then, yup, it'll process it and then "undo" that processing...which is
logically redundent, if it had only waited to see if they'd press
backspace or not...but, like I was saying above, we simply _don't
care_...still not any kind of "problem" with completing things with
plenty of time to spare...so, feel free to play some MP3 files or
something as you type away...

And, as we're "incremental" here and literally working at a _per
character_ level, then, tell me, how much "damage" can you do in a
single keystroke to the "dependencies"? Note, we just "cascade"
through the dependencies until it all resolved...now, it _IS_ possible
to be really sneaky and create a "synthetic" file - like the ones Rene
complains about because he's worked his algorithm for biasing "typical
use" as faster that, yes, "certain conditions" (which also apply
here...in fact, probably more so with my method :) can create
"unrepresentative" results - where it's all designed to "cascade"
throughout a file from pressing a single keystroke (but, well, you'd
have to _try hard_ to set that up ;)...yeah, that could happen...but,
then, you know what'll happen if given that kind of file? It'll revert
to, ooh, working as fast as all the other tools do quite
normally...you're forcing it into a "race" from start to finish, like
all the others do naturally...so, this is annoying but, then again,
it's a "worse case" that, ummm, matches the "best case" of the
traditional methods...I think I can live with such a "worst
case"...especially when actually setting up the conditions to make
that happen would be very, very, very "synthetic" indeed...nothing
"normal" or "natural" would come anywhere near causing a "total
cascade failure", to give it a Star-Trek sounding name there...I mean,
look at what you typically write...how much "damage" could a single
keystroke actually do, if you're not _delibrately_ trying to cause
trouble? And the processing, remember, is "spread out" so it'll be
working on the problem that a _line_ causes, as that line is being
typed in...and, even if you did get that "worst case" then it'll
compile as RosAsm does in 0.5 seconds...note that the whole thing is
"background process" so you could still type away...it'll just be
"delayed" trying to catch up with you...and, at some point, you've got
to stop typing and it'll "catch up"...continually causing a "total
cascade failure" with every single keystroke and keeping this up for
an hour or something? Impossible...it'll always eventually "catch
up"...just a case that in such a "worst case" - which matches "best
case" for everything else - then it'll be "delayed" in the feedback
that it provides...oh, that's "feedback" that no other tools even
attempts to even deliver, of course...like I say, what do I care? My
"worst case" (which is highly, highly unlikely :) here still kicks
arse out of the "best case" of everything else...

Also, one other little thing to note is that it'll work in a slightly
different manner on another score too...you open your "project file"
when you start up the IDE editor and then make your changes and then
close the file at the end of the "session"...what's so "special"
there? Well, the files _stay open_ during the "session"...and, as you
work away, things like the "symbol table" are stored away in the
"project file" and so forth...this is all part of the "incremental"
stuff...it means that when you continue the project the next day then
it just opens the file, grabs the symbol tables and other stuff so
that you can immediately carry on as before...it's just a file so if
you make this available to others then there's no need for any
"initial compilation" to compose up all the tables (though, if this
happens, it happens as quickly as an ordinary "compile" with any other
tool ;)...basically, this is kind of like "pre-compiled headers" but
applied to the whole thing...it's a "for completeness" thing in making
it totally "incremental" that _only_ in between keystrokes does it
process anything and, unlike the other tools that always re-process an
entire file over and over again, we never process anything twice...if
you're compiling someone else's code (e.g. you didn't type it so no
"type time" in which to do the processing) and the "pre-compiled" file
isn't provided, then, yup, it reverts to acting more or less exactly
like a traditional compiler...so, sorry, unless they provide you the
"pre-compiled" files then I can't help you speed up compiling the
Linux kernels, people...it's designed with _development_ in mind and
isn't quite so "miraculous" when it comes to simply compiling someone
else's code from source code without any kind of "changes" applied...

"Give me a place to stand, and I will move the Earth"
[ Archimedes ]

The problem of the "place to stand" has been graciously solved by the
hardware people over the years...they've landed ordinary people on the
Moon, so to speak, which provides a "place to stand"...so, it is now
possible to quite easily "move the Earth" using a simple lever
mechanism...kind of apt, I suppose...it was actually looking at and
using a RISC Acorn "Archimedes" machine where, trying to ponder and
understand the "RISC" concept, I started thinking in these kinds of
directions...indeed, "many small" often kicks the arse out of "one
big", even if that contradicts some people's "egoes" and "conventional
thinking"...

Beth :)


Quantcast