From: Bruno H. <br...@cl...> - 2017-06-02 17:32:52
|
Hi all, There are a couple of wrong terms in the source code: * NESTED_IBLOCK/ITAGBODY_frame_info, nest_fun, nest_env: I'll rename "nested" to "captured". Because what it does is to move values from the stack (where they will disappear when the stack frame is unwound) to other locations (where they cannot disappear, other than being GCed). * How to call the result of capturing a stack frame? It's a simple-vector consisting of binding cells. The previous term "closure" is wrong (see [1]). I'm hesitating between - "a capture" - because of the verb "capture" above, but still a misnomer [2], - "a prison" - because it's a container for *cell*s, and contains *capture*d values. Opinions? Objections? Bruno [1] https://en.wikipedia.org/wiki/Closure_(computer_programming) [2] http://wordnetweb.princeton.edu/perl/webwn?s=capture&sub=Search+WordNet&o2=&o0=1&o8=1&o1=1&o7=&o5=&o9=&o6=&o3=&o4=&h= |
From: <Joe...@t-...> - 2017-06-06 11:33:55
|
Hi, Bruno asked: >There are a couple of wrong terms in the source code: >* How to call the result of capturing a stack frame? > It's a simple-vector consisting of binding cells. > The previous term "closure" is wrong (see [1]). > I'm hesitating between > - "a capture" - because of the verb "capture" above, > but still a misnomer [2], > - "a prison" - because it's a container for *cell*s, > and contains *capture*d values. I remember the term "display closure" from Scheme compilers / compilation techniques. The Development of Chez Scheme R. Kent Dybvig https://www.cs.indiana.edu/~dyb/pubs/hocs.pdf "While researching how other systems had coped with similar problems, I ran across a book on the implementation of Algol 60 by Brian Randell and Lawford Russell [46], which described the use of displays for speeding access to the free variables of a local function. A display is a bank of memory locations or registers, each pointing to one of the frames whose variables make up the current lexical environment. Displays weren't directly usable for my purposes, but I was able to make several adjustments and from the display model derived the notion of a display closure, a heap-allocated vector-like object holding a code pointer and the values of the free variables [16]." Regards, Jörg |
From: Bruno H. <br...@cl...> - 2017-06-06 20:38:18
|
Hi Jörg, > I remember the term "display closure" from Scheme compilers / compilation techniques. > > The Development of Chez Scheme > R. Kent Dybvig > https://www.cs.indiana.edu/~dyb/pubs/hocs.pdf > > "While researching > how other systems had coped with similar problems, I ran across > a book on the implementation of Algol 60 by Brian Randell and > Lawford Russell [46], which described the use of displays for > speeding access to the free variables of a local function. A display is > a bank of memory locations or registers, each pointing to one of the > frames whose variables make up the current lexical environment. > Displays weren't directly usable for my purposes, but I was able > to make several adjustments and from the display model derived > the notion of a display closure, a heap-allocated vector-like object > holding a code pointer and the values of the free variables [16]." Thanks for the pointer. This "display closure" is a special case of closure (since it contains a code pointer). And the "display" (what a term!) is a vector-like arrangement, whereas in clisp we have a tree/forest-like arrangement. => I won't use these terms. Bruno |
From: Sam S. <sd...@gn...> - 2017-06-06 14:26:46
|
> * Bruno Haible <oe...@py...t> [2017-06-02 19:32:43 +0200]: > > There are a couple of wrong terms in the source code: In addition to being semantically correct, an important requirement is that it should never be used anywhere in any other sense. Ideally, it should be a new term in the source tree (`grep -ri new-term .` should print nothing in the top directory). > * NESTED_IBLOCK/ITAGBODY_frame_info, nest_fun, nest_env: > I'll rename "nested" to "captured". > Because what it does is to move values from the stack > (where they will disappear when the stack frame is unwound) > to other locations (where they cannot disappear, other > than being GCed). "Capture" fails the grep test above. What you are doing is _fishing_ stuff from stack and storing it into heap - how about "haul"? It appears in the tree as LOOP-SYNTAX-OVERHAUL:REPAIR in docs and in a FIXME note in sources. > * How to call the result of capturing a stack frame? > It's a simple-vector consisting of binding cells. > The previous term "closure" is wrong (see [1]). > I'm hesitating between > - "a capture" - because of the verb "capture" above, > but still a misnomer [2], > - "a prison" - because it's a container for *cell*s, > and contains *capture*d values. gulag? kz? ;-) You store your haul in a freezer. Thanks! -- Sam Steingold (http://sds.podval.org/) on darwin Ns 10.3.1504 http://steingoldpsychology.com http://www.childpsy.net http://www.memritv.org http://no2bds.org http://mideasttruth.com http://memri.org What garlic is to food, insanity is to art. |
From: Bruno H. <br...@cl...> - 2017-06-06 20:55:15
|
Hi Sam, > What you are doing is _fishing_ stuff from stack and storing it into > heap - how about "haul"? Thanks for the suggestion. "haul" means "pulling with force" or "steal".[1][2] It doesn't fit very well with the NESTED_IBLOCK/ITAGBODY_frame_info, nest_fun, nest_env situation, IMO. > "Capture" fails the grep test above. Hardly: $ grep -ri capture src/*.{d,lisp} | wc -l 5 I think 5 random occurrences of the same word in the code are acceptable. > > * How to call the result of capturing a stack frame? > > It's a simple-vector consisting of binding cells. > > The previous term "closure" is wrong (see [1]). > > I'm hesitating between > > - "a capture" - because of the verb "capture" above, > > but still a misnomer [2], > > - "a prison" - because it's a container for *cell*s, > > and contains *capture*d values. > > gulag? kz? ;-) I'm looking for a word for a building that consists of several interconnected rows of cells. Gulags and KZs consisted of barracks, not rows. Maybe "palace" is better than "prison"? Bruno [1] https://en.wiktionary.org/wiki/haul [2] https://www.merriam-webster.com/dictionary/haul |
From: Sam S. <sd...@gn...> - 2017-06-07 19:35:52
|
Hi Bruno, > * Bruno Haible <oe...@py...t> [2017-06-06 22:55:04 +0200]: > >> What you are doing is _fishing_ stuff from stack and storing it into >> heap - how about "haul"? > > Thanks for the suggestion. > > "haul" means "pulling with force" or "steal".[1][2] And "capture" means "a seizing by force or stratagem". > It doesn't fit very well with the NESTED_IBLOCK/ITAGBODY_frame_info, > nest_fun, nest_env situation, IMO. I respectfully disagree. >> "Capture" fails the grep test above. > > Hardly: > $ grep -ri capture src/*.{d,lisp} | wc -l > 5 Don't cheat. ;-) $ grep -ri capture . | wc -l 79 > I think 5 random occurrences of the same word in the code are acceptable. I respectfully disagree. > I'm looking for a word for a building that consists of several > interconnected rows of cells. Gulags and KZs consisted of barracks, > not rows. Maybe "palace" is better than "prison"? You are looking for https://en.wiktionary.org/wiki/seiner ;-) Note that "capture" already has a meaning in the computer domain. Haul, seiner &c do not. I urge you to take the `grep -ri .` test more seriously. You are about to make the same mistake you made years ago when you commented your code in German and introduced gratuitous changes to C syntax. Thanks. -- Sam Steingold (http://sds.podval.org/) on darwin Ns 10.3.1504 http://steingoldpsychology.com http://www.childpsy.net http://think-israel.org https://ffii.org http://honestreporting.com Never argue with an idiot, listeners may not be able to tell the difference. |
From: Bruno H. <br...@cl...> - 2017-06-07 22:00:37
|
Hi Sam, > Note that "capture" already has a meaning in the computer domain. You mean, screen capture? This is far enough away from clisp's internals that it won't lead to confusion. > You are looking for https://en.wiktionary.org/wiki/seiner ;-) Hmm, still not quite there. Is there some English term for a "row of cells"? "gallery of cells"? Bruno |
From: Sam S. <sd...@gn...> - 2017-06-07 22:35:28
|
> * Bruno Haible <oe...@py...t> [2017-06-08 00:00:25 +0200]: > > This is far enough away from clisp's internals > that it won't lead to confusion. Famous last words. :-( -- Sam Steingold (http://sds.podval.org/) on darwin Ns 10.3.1504 http://steingoldpsychology.com http://www.childpsy.net http://memri.org http://islamexposedonline.com http://camera.org http://think-israel.org To iterate is human; to recurse, divine. |
From: Reini U. <rei...@gm...> - 2017-06-08 06:28:13
|
> On Jun 2, 2017, at 7:32 PM, Bruno Haible <br...@cl...> wrote: > > Hi all, > > There are a couple of wrong terms in the source code: > > * NESTED_IBLOCK/ITAGBODY_frame_info, nest_fun, nest_env: > I'll rename "nested" to "captured". > Because what it does is to move values from the stack > (where they will disappear when the stack frame is unwound) > to other locations (where they cannot disappear, other > than being GCed). > > * How to call the result of capturing a stack frame? > It's a simple-vector consisting of binding cells. > The previous term "closure" is wrong (see [1]). > I'm hesitating between > - "a capture" - because of the verb "capture" above, > but still a misnomer [2], > - "a prison" - because it's a container for *cell*s, > and contains *capture*d values. > > Opinions? Objections? nest_fun was originally Schachtelung (before 2001), then translated to nested. nested means the stacked structure of the captures. Maybe stacked is better then as nested. capture is mostly something else. even the old german description was not good. e.g. nest_fun(env) # UP: "nestet" ein FUN-Environment, d.h. schreibt alle aktiven Bindungen # aus dem Stack in neu allozierte Vektoren. => /* UP: "nests" a FUN-Environment, i.e. writes all active bindings from the Stack into freshly allocated vectors. maybe this is better: “adds a new stack frame of the fun-environment, i.e. writes all active bindings from the stack into freshly allocated vectors." > > Bruno > > [1] https://en.wikipedia.org/wiki/Closure_(computer_programming) > [2] http://wordnetweb.princeton.edu/perl/webwn?s=capture&sub=Search+WordNet&o2=&o0=1&o8=1&o1=1&o7=&o5=&o9=&o6=&o3=&o4=&h= Reini Urban ru...@cp... |