On Sat, 14 Oct 2017 07:15 am, Peter J. Holzer wrote: > On 2017-10-13 15:11, alister <alister.w...@ntlworld.com> wrote: >> On Sat, 14 Oct 2017 01:48:44 +1300, Gregory Ewing wrote: >>> Steve D'Aprano wrote: >>>> I wasn't questioning where the data came from, but how the compiler can >>>> write to READ ONLY MEMORY which might not even be in the same continent >>>> as the compiler that generated the code. >>> >>> I thought it would be fairly obvious that by "put it in read-only >>> memory" I meant "arrange for it to be in a location that is read-only at >>> run time". Obviously it can't be read-only at *compile* time, just as a >>> physical ROM can't be read-only at manufacture time. >> >> oh yes it can >> in the past for large quantitys the data in a ROM chip was part of the >> chip etching mask (unless you consider a blank silicon wafer to be >> "Programmable" by the etching process)rather than prom which used >> programmable fuses or prom which could be erased by UV light (assuming >> the chip was fitted with a window otherwise it was known as one time >> programmable EPROM) > > He didn't say "programmable". He said that the is "not read-only".
In context, we are talking about a computer program (the compiler) writing data to memory. When we talk about programs writing data to memory, only certain types of actions are included, and a distant factory etching silicon chips is not usually one of them. The question is, does the process of manufacturing a silicon chip count as *writing*? I don't think so. Not every side-effect should be described as writing: if the compiler's output was fed into a robot that used it to assemble a car, I'm sure you would not want to say that the compiler wrote a car. That would be a misuse of language. I think the idea of writing a ROM chip is equally a misuse of language. Your example of writing on paper is a good one, but it argues *against* your position, not for it. If you compile some code, then take a hex dump and print it out: gcc program.c xxd a.out | lp would you describe the process as "the compiler writes to the piece of paper"? I don't think that is justified. The compiler isn't writing to the paper, the printer is printing to the paper. I would accept the description "lp writes to the printer", but that's as far as it goes. Instead of using a printer, perhaps you pipe the output to less and then spend the next hour laboriously hand-writing the hex dump out. (Perhaps you lost a bet, or you are playing a game of Truth Or Dare.) Do you still want to claim that the compiler did the writing? If you email the hex dump to a person on the other side of the world, who then post-processes the file in some unknown fashion, and passes the processed file to another machine, which uses that as input to an industrial process which etches wafers of silicon and manufacturers a ROM chip, do you still think it is reasonable to describe it as the *compiler* doing *writing*? I maintain the choice of words is wrong on both counts: the compiler is not the entity doing the work, and the work of manufacturing a ROM chip should not be described as writing. -- Steve “Cheer up,” they said, “things could be worse.” So I cheered up, and sure enough, things got worse. -- https://mail.python.org/mailman/listinfo/python-list