Chapter 5.2.4, "manipulate" memory

classic Classic list List threaded Threaded
7 messages Options
Reply | Threaded
Open this post in threaded view
|

Chapter 5.2.4, "manipulate" memory

aloha12
Chapter 5.2.4 contains the following lines:

"With that in mind, when a low-level program wants to read something from the keyboard, or write something on the screen,
the program manipulates the respective memory maps of these I/O devices."

I think "manipulates" is an imprecise wording here; it's definitely correct in the case of writing to the memory map of the screen,
but in the case of reading the keyboard input the keyboard memory map is only read and not influenced/changed in any way,
therefore "manipulates" is arguably wrong in this case. Maybe change this to "interacts with" or something similar? This would
keep the overall sentence structure intact, especially the fact that it starts with "keyboard" and "screen" and ends with "these I/O devices",
hinting to the reader that this behaviour generalizes to any I/O device.
Reply | Threaded
Open this post in threaded view
|

Re: Chapter 5.2.4, "manipulate" memory

WBahn
Administrator
I would tend to agree. Something like "interacts with" or "accesses" would probably be better.

Even in the case of writing to the screen buffer, it's debatable whether you are manipulating the memory map, which could be read as modifying the mapping itself, and not just modifying the contents of the underlying memory while the mapping remains static. In the case of the Hack where the memory mapping is fixed, there's little chance for confusion. But in general, you can have dynamic mappings and manipulating the mapping itself can be used as a programming technique. For instance, one common technique used in the days of CRT video monitors was to have have two screen buffers in which you would write to one and map the other to the display. Then you change the mapping synchronously with the vertical refresh to instantly update the image on the next scan. This made for much smoother video animations.


Reply | Threaded
Open this post in threaded view
|

Re: Chapter 5.2.4, "manipulate" memory

rleininger
Shouldn't you consult the generally accepted means to resolve questions of English semantics, a dictionary, to decide this?  A Google search produces the following, although by "manipulating"  several published dictionaries, similar results are obtained:

manipulate

[məˈnipyəˌlāt]

VERB

manipulated (past tense) · manipulated (past participle)

handle or control (a tool, mechanism, etc.), typically in a skillful manner.
"he manipulated the dials of the set"
synonyms:
operate · handle · work · control · use · employ · utilize

    alter, edit, or move (text or data) on a computer.
    "the pupils can manipulate the data or screen image"

    examine or treat (a part of the body) by feeling or moving it with the hand.
    "a system of healing based on manipulating the ligaments of the spine"
    synonyms:
    massage · rub · knead · feel · palpate

control or influence (a person or situation) cleverly, unfairly, or unscrupulously.
"the masses were deceived and manipulated by a tiny group"
synonyms:
exploit · control · influence · use/turn to one's advantage · maneuver · engineer · steer · direct · guide · twist around one's little finger · work · orchestrate · choreograph

It seems to me that the first definition closely reflects the usage of "manipulated" in the cited passage, in the sense of the  synonyms "use", "employ", or "utilize."  Clearly the data contained in the memory map registers is "manipulated" in this sense.

He manipulated the keyboard memory map register of his Hack computer to obtain the character code input by the user.
He used the keyboard memory map register of his Hack computer to obtain the character code input by the user.
He employed the keyboard memory map register of his Hack computer to obtain the character code input by the user.
He utilized the keyboard memory map register of his Hack computer to obtain the character code input by the user.

Semantic meaning - always a problem whether in English or computer languages.
Reply | Threaded
Open this post in threaded view
|

Re: Chapter 5.2.4, "manipulate" memory

WBahn
Administrator
We wouldn't say that we "handle" the memory map or that we "operate" it. So just because we might say that we "use" it doesn't ensure that we can use "manipulate".

The word "manipulate" (in this context), particularly in common parlance, strongly implies causing some kind of change or alteration.

Just because A might be given as a synonym for B doesn't mean that they are identical and interchangeable. For instance, 'shut' and 'close' are synonyms, and while in many circumstances they can be exchanged ("Please shut the door on your way out," versus "Please close the door on your way out,"), there are other instances where they aren't really interchangeable ("Please shut the lights off on your way out," versus, "Please close the lights off on your way out").

My wife makes these kinds of mistakes all the time. English is not her native language, and so she doesn't have a solid grasp of these kinds of nuances and tends to use words that are, in many cases, synonymous but not in the case she is using them. But since her ability to communicate in English (and several other languages) is far superior to my ability to communicate in her native tongue (or any of the others), my hat's off to her and I just take the time to divine what she meant versus what she said.



Reply | Threaded
Open this post in threaded view
|

Re: Chapter 5.2.4, "manipulate" memory

rleininger
I offered the synonym sentences merely to indicate that words, especially in English, and probably every other human language, are loaded with semantic range.  I certainly did not mean to imply that the meaning of the four sentences was identical, even though they seem to me to express the same general idea.  Isn't that what a synonym does?  Does any of the sentences contradict any of the others?

You are certainly right that context is very important in determining the meaning of a word.  This was one of the first things I was taught when I started studying Koine Greek.  So context, in some ways, also helps determine whether words are synonyms.

Your "light switch" example highlights this.  I would never say either of those things to get lights extinguished, but I completely understand what they mean.  I would say "Switch off the lights..." or "Turn out the lights..." (the party's over).  Or, if I was particularly annoyed, "Hey, kill those lights!"  If I wished to be more precise and more polite, I could even say, "Please manipulate the light switch to its 'off' position."  (I do realize that the last statement context is at a different level of abstraction.)

Note that it was necessary to add the implied prepositional modifier "(to) off" with the verb "shut" in order to give proper meaning to the first "ight switch" example.  This was not needed for "closing" or "shutting" the door.  Certainly, "close off the lights" is not really a meaningful statement.  In the context of "manipulating" the state of lights, "close" and "shut" are therefore not synonyms.  But I could say "close that valve" or "shut that valve", and in that context (manipulating valves), the statements are equivalent, and the words are synonyms.

In fact, I do agree that in the context of the cited textbook passage, the usage of the word "manipulate" is a bit "light".  It does almost always imply some sort of physical change on its object.  I would have most certainly used a different word.  However, it seems a bit presumptuous to criticize the semantic use of a word in someone else's published work when it does seem to somewhat fit the context in a sensible way.  To me, it makes sense, and I think I understand the idea they are trying to communicate.  If they wanted to convey a different shading of meaning, wouldn't they have used a different word?  Or perhaps their understanding of the word's meaning was exactly the idea they meant to convey.  The cited passage definitely does not say something that is patently false, which would qualify it as an erratum.

From other usage in the book (both editions), I kind of get the idea that the authors may not themselves be native (American) English speakers.

Reply | Threaded
Open this post in threaded view
|

Re: Chapter 5.2.4, "manipulate" memory

WBahn
Administrator
This post was updated on .
They aren't (native English speakers), though their English is pretty fluent. Also, the nuances of words and what is "proper diction" vary significantly by region. So it's both very possible that they used that word because it was the easiest one in their vocabulary to use or that they used it because, in their experience, it's meaning doesn't imply changing or altering something.

I suspect that most people are able to draw the correct intent from that passage, but there is the possibility that a few people could get at least somewhat tripped up by it. But that's a risk that will always exist, especially when writing a text that is going to be used in so many countries by people from so many backgrounds.

One of the things that I noted when I first read the book was how relatively error free it was, especially for a first edition. It's not perfect (nor will it or any textbook ever be), but it is a LOT closer than virtually any other text I've seen on any subject.

As an aside, your "turn off the lights" example (which is also a common way of expressing the notion where I'm from) brought another set of examples to mind. The words "turn" and "rotate" are synonyms (pretty strong ones), but it would take some head scratching for me to figure out what someone meant if they asked me to "rotate the lights" (or "rotate off the lights").

This is actually a game I play with (or perhaps on is a better description) with my daughter. I intentionally misinterpret signs or things she says based on an alternate, but usually logically valid, interpretation of the phrase, often by using a different meaning of a word than what was clearly meant. This is particularly easy to do with the spoken word because a slight change in pacing or emphasis can make all the difference. The classic example that I remember from my 8th grade English class were the two sentences, "We are going to stop and eat, John, before we take another step," and "We are going to stop and eat John before we take another step." The exercise asked which version had cannibalistic overtones.
Reply | Threaded
Open this post in threaded view
|

Re: Chapter 5.2.4, "manipulate" memory

aloha12
In reply to this post by rleininger
I am sorry if I came off as presumptuous, I did not mean to tarnish the authors' work. In fact, I think nand2tetris is quite an amazing book so far (I am only about half-way through). I do agree with you though, that it was a very minor point I was making and I see how that can be interpreted as being very nit-picky. I actually tried to take the sting out my post with the "arguably", alas the tone is not naturally transferred in a textual medium such as this forum. Maybe the fact that I noticed this minor point just goes to show how polished the book already is.

Also, cool fact about the CRTs, I did not know that, even though I'm old enough to had one of those in the living room. :)