TryAPL: Difference between revisions

Jump to navigation Jump to search
976 bytes added ,  21:44, 27 June 2021
Line 29: Line 29:
=== API ===
=== API ===


[this section needs to be written]
Requests to TryAPL's backend consist of submitting a [[wikipedia:POST (HTTP)|POST]] request to https://tryapl.org/Exec containing a 4-element list <source lang=js inline>["state", size, "hash", "input"]</source> where the first three elements can use the placeholder values <source lang=js inline>""</source> or <source lang=js inline>0</source>. The server responds with a similar 4-element list <source lang=js inline>["state", size, "hash", ["lines", "of", "output"]]</source>. The first three elements are kept on the front-end and sent back with the next request, or cleared to restart with default state.
 
If the output begins with a backspace character (U+08) then the actual output only begins after the second backspace character, and the text between the two backspace characters describes the role of the text. As 27 Jun 2021, only one tag has been implemented, <source lang=js inline>"\bhelp\b"</source> for which the text is the URL of help page requested by <source lang=apl inline>]Help</source>


== In media ==
== In media ==

Navigation menu