<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head>
<body>
<p>Hi Lukas,</p>
<p>Can you suggest how to format the acronym meaning for each
function name?</p>
<p>For example, for the `h/0` function: I can put it at the end of
the description:</p>
<p>> Gives a brief help text for functions in the dbg module. The
available items can be listed with <span class="code">dbg:h/0.
`h` stands for *h*elp.<br>
</span></p>
<p><span class="code">Or at the beginning:</span></p>
<p><span class="code">> </span><span class="code"><span
class="code"><span class="code">`h` stands for *h*elp. </span></span>Gives
a brief help text for functions in the dbg module. The available
items can be listed with <span class="code">dbg:h/0. <br>
</span></span></p>
<p><span class="code"><span class="code">The description for the
help function is short, but some of the other functions have
long descriptions with lots of details. Putting the acronym
explanation at the bottom might result in most people missing
it.</span></span></p>
<p><span class="code"><span class="code">Thoughts?</span></span></p>
<p><span class="code"><span class="code">Trevor<br>
</span></span></p>
<div class="moz-cite-prefix">On 8/10/21 9:32 PM, Trevor Brown wrote:<br>
</div>
<blockquote type="cite"
cite="mid:0c736bc3-376f-1e27-7a76-fd50d95eb73d@stratus3d.com">
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<p>I am working on a pull request now to add this information to
the docs and possibly dbg:h/0.</p>
<p>Even if we aren't completely correct on the meaning of the
acronyms, I think explaining them in the docs will help make the
API less esoteric. I came across someone who didn't know what
the tpl function name stood for and assumed it meant tuple.
That's one of the things that prompted me to look into this.</p>
<p>Trevor<br>
</p>
<div class="moz-cite-prefix">On 8/10/21 2:58 AM, Lukas Larsson
wrote:<br>
</div>
<blockquote type="cite"
cite="mid:CAP3zBqPkEMYT4QG_mgvtz7-b+fFS2NV7aq_64wU0FTTUHOn8Gw@mail.gmail.com">
<meta http-equiv="content-type" content="text/html;
charset=UTF-8">
<div dir="ltr">
<div>Hello!</div>
<br>
<div class="gmail_quote">
<div dir="ltr" class="gmail_attr">On Sun, Aug 8, 2021 at
8:42 AM Trevor Brown <<a
href="mailto:admin@stratus3d.com" moz-do-not-send="true">admin@stratus3d.com</a>>
wrote:<br>
</div>
<blockquote class="gmail_quote" style="margin:0px 0px 0px
0.8ex;border-left:1px solid
rgb(204,204,204);padding-left:1ex">Hi, I've used the dbg
module a fair bit over the years, and I am curious<br>
about the names of the functions. Looking at the list of
functions, I<br>
came up with what I think each function name means:<br>
<br>
The function names are all acronyms (except for the ones
that clearly<br>
aren't like `get_tracer/0` and `stop/0`) and stand for the
following:<br>
<br>
* `c` stands for *c*lear<br>
</blockquote>
<div><br>
</div>
<div>I believe that the solitary `c` stands for *c*all.</div>
<div> </div>
<blockquote class="gmail_quote" style="margin:0px 0px 0px
0.8ex;border-left:1px solid
rgb(204,204,204);padding-left:1ex"> * `cn` stands for
*c*lear *n*ode<br>
* `ctp` stands for *c*lear *t*race *p*attern<br>
* `ctpe` stands for *c*lear *t*race *p*attern *e*vent<br>
* `ctpg` stands for *c*lear *t*race *p*attern *g*lobal<br>
* `ctpl` stands for *c*lear *t*race *p*attern *l*ocal<br>
* `dtp` stands for *d*elete *t*race *p*attern (not sure if
it's delete,<br>
drop, discard, etc...)<br>
</blockquote>
<div><br>
</div>
<div>If you type "dbg:h(dtp)" it prints: </div>
<div><br>
</div>
<div>dtp() -> ok<br>
- Deletes all saved match_spec's.<br>
dtp(N) -> ok<br>
- Deletes a specific saved match_spec.<br>
</div>
<div><br>
</div>
<div>So it is `delete`, just as you guessed.</div>
<div> </div>
<blockquote class="gmail_quote" style="margin:0px 0px 0px
0.8ex;border-left:1px solid
rgb(204,204,204);padding-left:1ex"> * `wtp` stands for
*w*rite *t*race *p*attern<br>
* `rtp` stands for *r*ead *t*race *p*attern<br>
* `n` stands for *n*ode<br>
* `i` stands for *i*nformation<br>
* `p` stands for *p*rocess<br>
* `tp` stands for *t*race *p*attern (implicitly global)<br>
* `tpl` stands for *t*race *p*attern *l*ocal<br>
* `h` stands for *h*elp<br>
* `ln` stands for *l*ist *n*odes<br>
* `ltp` stands for *l*ist *t*race *p*atterns<br>
<br>
Can anyone confirm if I am correct here? And if so,
reference any docs<br>
explaining this? I personally find that understanding the
acronyms makes<br>
the functions easier to remember, so it's a shame the
official docs<br>
don't explain this if I am correct.<br>
</blockquote>
<div><br>
</div>
<div>I use the same words to describe the acronyms as you
have done. I believe the person that designed the dbg API
has left the Erlang world for the time being, so if we are
incorrect we may never know.</div>
<div><br>
</div>
<div>If you want to create a PR that adds the names that you
have proposed into the documentation I think that it could
be a good starting point in making the words behind the
acronyms official.</div>
<div><br>
</div>
<blockquote class="gmail_quote" style="margin:0px 0px 0px
0.8ex;border-left:1px solid
rgb(204,204,204);padding-left:1ex"> <br>
Also, I've always assumed the module name stood for debug,
but is that<br>
true? I haven't found any docs on that either.<br>
</blockquote>
<div><br>
</div>
<div>I believe that you are correct, but I do not know for
sure.</div>
</div>
</div>
</blockquote>
</blockquote>
</body>
</html>