aTbRef—hundreds of tiny text fixes

I’ve just refreshed the whole aTbRef site (baseline unchanged) but small fixes in the hundreds: typos, misaligned link anchors, doubled words (“the the” etc.), and so on.

So apart from actual corrections, this is some long overdue polish.

Several other new data features. Firstly, a new row for action code operators that indicates the data type returned by the operator, if the type is always the same.

For operators with less certain output some suggestion is given. For instance, it is indicated that a boolean is avialbe indicating success failure.

The completion going on here is to make much cleared the primary returned data type. Feedback will indicate if this is useful at all.

At the bottom of the exported $Text of notes with inbound text [sic] links, there are a set of back-links. Some may already exist in note $Text but in many cases they don’t and this is an easier way navigate the resource with the flexibility in-app:

Note that Tinderbox text links* are used (almost?) exclusively in the main content of aTbRef. I’m sure there will be edge cases, so reports of odd behaviour are welcome.

TL;DR. Hopefully things on the public face will seem little different but better overall, but getting there has been days of copyediting work my end.

9 Likes

Oops, in the upload above, I forgot to upload the site’s root-level papges including the sitemap and search index.

Now done! Hat tip to @TomD for catching that.

1 Like

Another solid contribution from @mwra with these updates to aTbRef.

Suggestion to all users of aTbRef: please note the “Donate” button at the bottom of the page. Mark doesn’t try to sell us his expertise, since aTbRef began (lost in the mists of time :sunny: ), he generously contributes freely to all. Give Mark a handshake in return, if you can.

3 Likes

Further refinement to listing for action code operators. Where an action code operator returns a (only) a known Tinderbox data type, there is a cross-link to an aTbref article in that data type. For instance, distance() returns Number-type data so the aTbref article on it now adds this:

For operators that do not return a single know data type or have other purposes, only the $OpReturnType value is shown:

So, why do this? I think—I hope—it will aid those beginning to learn about use of action code. Knowing what Tinderbox would expect—in terms of data type—also helps when considering auto-coercion of data types. For instance, passing a List into a Set automatically de-dupes and sorts it. Or, consider max() , that returns a Number-type:

$MyList = [2;5;1;4;6;3];
// from the above list max() returns the biggest number (6) as a Number-type
$MyNumber = max($MyList); // => Number 6
$MyString= max($MyList); // => String "6", as Number coerced to String

Once you know these wrinkles, it is a bit easier, but understanding what data types are and how they differ should speed learning up a bit.

Tip: the format() and .format() operators always return a String-type, regardless of the source data type they are passed

Wondering how this conditional export works? See the “5-basic_item_operator” template in the aTbRef TBX file, which is an include form making the data table at the start of articles describing action code operators. A conditional at the head of the template checks for notes where the $OpReturnType user attribute value is of a known Tinderbox data type:

^action(
var:set vTypes = [Date;Dictionary;Integer;List;Number;Set;String];
var:boolean vAddSlug = false;
if(vTypes.contains($OpReturnType)){
   vAddSlug = true;
};
)^

At the appropriate place in the template’s code, the code for the right-hand cell of that table row is this:

<p class="attributetabletext">&nbsp;^value($OpReturnType)^^if(vAddSlug)^&nbsp;[about ^linkTo(^value($OpReturnType+"-Type Attributes")^,^value($OpReturnType)^)^ data type]^endIf^</p>

Thus the article about an operator that returns Date-type data will now auto-link to the Date-Type Attributes article, and so on for other Tinderbox defined data types.

Essentially, I’m gently increasing the hypertextual cross-connections in the aTbRef corpus, with the aim of offering the (initially) confused extra ways to look up things they don’t yet know. Just as a computer generated book index is sub-par compared to a human-made index (the former can’t understand context/nuance/inferred ideas)§, I’d be interested to see how well today’s ‘AI’ would do at the above task. It’s also a reminder that intentional hypertext is a world removed from auto-generated graphs/DAGs.

Apart from the refreshed action code pages (c.320) the TBX zip and the JSON index are also refreshed on the live site.

†. Sharp-eyed readers will spot there is no table-related HTML. This is correct, as the template uses two <div>s and CSS to make the ‘table’. It’s easier, once you know the HTML.

‡. The fact the listing is for ‘Date-Type Attributes’ is historical. These articles originated before var and function extended action code beyond passing data between attributes. Plus the articles (still) list the system attributes of that data type.

§. Duncan’s Index, A History of the (2021, Allen Lane/Penguin) features two indexes. It illustrates the difficulty of automating the task of meaningful indexing. It has a 31-page human-curated index and also part of a computer-generated index (the opening part, from ‘AA’ to ‘amusement’). comparing the two suggests the machine version would run to over twice the length length of normal index. As pertinently, it has fewer sub-heads and entries are literal string matches (no understanding of implied/inferred meaning). Using the machine-version shows many of the entities are essentially mis-detections, q.v. the entry for ‘AA’.

1 Like