From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: *** X-Spam-Status: No, score=3.2 required=5.0 tests=BAYES_00,RATWARE_MS_HASH, RATWARE_OUTLOOK_NONAME autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 109fba,baaf5f793d03d420 X-Google-Attributes: gid109fba,public X-Google-Thread: fc89c,97188312486d4578 X-Google-Attributes: gidfc89c,public X-Google-Thread: 1014db,6154de2e240de72a X-Google-Attributes: gid1014db,public X-Google-Thread: 103376,97188312486d4578 X-Google-Attributes: gid103376,public From: "Tim Behrendsen" Subject: Re: What's the best language to start with? [was: Re: Should I learn C or Pascal?] Date: 1996/09/06 Message-ID: <01bb9bf9$61e9e0e0$87ee6fce@timpent.airshields.com> X-Deja-AN: 178886988 references: <01bb8df1$2e19d420$87ee6fce@timpent.airshields.com> <4vcac4$gm6@zeus.orl.mmc.com> <01bb8f19$9a89d820$32ee6fce@timhome2> <841797763snz@genesis.demon.co.uk> <322f864d.42836625@news.demon.co.uk> content-type: text/plain; charset=ISO-8859-1 organization: A-SIS mime-version: 1.0 newsgroups: comp.lang.c,comp.lang.c++,comp.unix.programmer,comp.lang.ada Date: 1996-09-06T00:00:00+00:00 List-Id: Bob Cousins wrote in article <322f864d.42836625@news.demon.co.uk>... > Mark Wooding wrote: > > >Lawrence Kirby wrote: > >> In article <01bb8f19$9a89d820$32ee6fce@timhome2> > >> tim@airshields.com "Tim Behrendsen" writes: > >> > >> >There is no other view than the procedural view. > >> > >> Some functional language programmers might take issue with that > >> statement. Prologgers may have a thought or two also. > > > >I've not come across a computer yet which doesn't work by fetching an > >instruction (or maybe a few at a time), doing them, and then going off > >and fetching some more. I guess you can pretend that this isn't the > >case, and maybe come up with some nice ways of presenting algorithms > >which don't depend on this, but that's not the way things work > >underneath. The One True View is that sequence of instructions; all > >else is an illusion. Maybe it's a helpful illusion, but illusion it is > >nonetheless. > > I am afraid your view is severely limited, on two counts. > > 1. It could be argued that executing a sequence of intructions is the > "illusion". It appears to you that that is what happens, but all the > CPU does is respond to a set of input signals on its pins, combines > them with states in internal registers, and produces a new set of > output pins and register states. > > The CPU is just a complex state machine. It is just an abstraction > that it executes instructions. Of course we have designed it to behave > according to our abstraction. If the CPU generated non-sensical > outputs, it would still be the same complex state machine, but we > would not regard it as executing instructions. Sounds like sequential operations to me. input signals --> [state machine] --> output pins >>>------>>> Note the time axis here >>>------>>> > In fact, executing instructions is such a useful abstraction, that in > nearly all complex processors, there is a smaller processor executing > microcode, and in even more complex ones, the embedded processor is > executing nanocode, but at the lowest level we get to a hardware state > machine. So what? At the lowest level, we have electrons flowing around, changing states of electrical subsystems such as flip/flops. This is data manipulation over time. No instantaneous algorithms occurring, here. > The abstraction can be carried upwards, so that we can regard a > functional language as evaluating functions. It does not matter that > underneath instructions are being executed, because at the very lowest > level its just electrons whizzing around silicon. We could even > implement the functional language on a non-digital computer. Yes, and even if you have gears turning, somewhere you have data transformations occurring over time. It can't be otherwise. "Speed of light" also refers to signal propagation. > 2. You either assume or mean that computer refers to a conventional > von-Neumann style digital computer. Analog computers do not execute > instructions as such, but they can be programmed and solve problems by > producing a set of outputs given a set of inputs. There was a rather > neat economic simulation which was implemented as a set of water tanks > and pipes, and it produced quite good results. Of course, it was only > implementing an abstract functional model of an economy. Again, water flows through pipes, and the measurements change over time. The pure integrator analog computer uses time as one of the inputs. > Finally, you or may not consider that the human brain is a biological > computer, and that does not appear to work by fetching instructions > and executing them. So the very concept of instructions executing in > sequence is an illusion created within our own non-digital, > non-sequential, massively parallel active memory analog computer. The human brain works (as far as anyone knows) by electrical patterns flowing through neurons. You have input from your senses which stimulates pathways in your brain, and produces changes in the memory structures, and possibly produces output through muscular manipulations. *There is no view other than the procedural view*. Everything comes down to data transformations over time. You have yet to come up with an example where this is not true, and you won't, simply because you can't eliminate the time axis. An algorithm has to have a beginning and an end, an input and an output, and in the middle is a black box known as the "procedure". -- Tim Behrendsen (tim@a-sis.com)