Repository navigation
fb_objects()
-
objectsthe content of the objects input (the JSON text the meclib graphic writes)
Returns the object list as a Maxima list, the same as STACK's stackjson_parse(objects), but much faster. stackjson_parse() needs time that grows with the square of the length of the text: about 1.2 s for a sketch of 25 objects, and that in every PRT that reads the sketch. fb_objects() reads the text in one pass (0.02 s for the same sketch).
Use it in place of stackjson_parse(objects) in the feedback variables:
obj: fb_objects(objects);
Strings, numbers, true, false, null and nested lists are read like stackjson_parse() does; a text with JSON objects ({...}), which meclib does not write, is passed on to stackjson_parse().
For tryout use the Meclib Workbench. It requires a local clone of this repository and a local Maxima installation. The workbench includes a rich editor for STACK questions with fast preview including CAStext and Mathjax rendering.
For older versions of Meclib you can use jsfiddle for tryout.
In order to try code snippets in jsfiddle,
- copy the code from the wiki page to the clipboard
- follow the link for the JSXGraph version you want to try
- Replace the code in the HTML section (contents of
<p id="init">) with the content of the clipboard
The remaining jsfiddle pages don't seem to work any more (as of 04/26)