backport some doc updates and renames

[?]
Dec 26, 2022, 8:27 AM
BSDXVB3HU5Y5FZ244FU2F577RTM6SWEHAZX3IELBVUP52CRFVDSAC

Dependencies

  • [2] R7BFYHKY move temporary file out of user directory (if possible)
  • [3] VCLH24QJ update protocol so driver shows syntax errors
  • [4] QFURHRTP rename globals to have a single uppercase letter
  • [5] NVVHJWJE a new event: receiving code changes from the driver
  • [6] 5OVKHVY6 nice way to make on.* handlers more discoverable
  • [7] WZZGVKSG a few more renames
  • [8] TBWAE64A app is now live, can communicate with driver
  • [9] LRDM35CE app running again

Change contents

  • replacement in live.lua at line 4
    [5.888][5.888:1032]()
    -- from the largest numeric prefix found, obtain a manifest
    -- load all files (which must start with a numeric prefix) from the manifest)
    [5.888]
    [5.1032]
    -- from the numeric prefix in file 'head', obtain a manifest
    -- load all files (which must start with a numeric prefix) from the manifest
  • replacement in live.lua at line 12
    [5.1238][5.1238:1306]()
    -- save the message's value to a specific, unused numeric prefix
    [5.1238]
    [5.1306]
    -- save the message's value to a new, smallest unused numeric prefix
  • edit in live.lua at line 14
    [5.1330]
    [5.1330]
    -- if there's an error, go back to the previous value of the same
    -- definition if one exists
  • replacement in live.lua at line 17
    [5.1333][5.1333:1470]()
    -- if a game encounters an error:
    -- find the previous version of the definition in the 'head' numeric prefix
    -- decrement 'head'
    [5.1333]
    [5.1470]
    -- if a game encounters a run-time error, send it to the driver and await
    -- further instructions. The app will go unresponsive in the meantime, that
    -- is expected. To shut it down cleanly, type C-q in the driver.
  • replacement in live.lua at line 150
    [4.570][5.4946:4977](),[5.4946][5.4946:4977]()
    local buf = live.receive()
    [4.570]
    [5.4977]
    local buf = live.receive_from_driver()
  • replacement in live.lua at line 160
    [5.5140][5.5140:5164]()
    function live.receive()
    [5.5140]
    [2.8]
    function live.receive_from_driver()
  • replacement in live.lua at line 175
    [5.5647][5.5647:5671]()
    function live.send(msg)
    [5.5647]
    [2.197]
    function live.send_to_driver(msg)
  • replacement in live.lua at line 208
    [5.6159][5.6159:6191]()
    local cmd = buf:match('^%S+')
    [5.6159]
    [5.6191]
    local cmd = live.get_cmd_from_buffer(buf)
  • replacement in live.lua at line 214
    [5.6312][4.610:652]()
    live.send(json.encode(Live.manifest))
    [5.6312]
    [5.6354]
    live.send_to_driver(json.encode(Live.manifest))
  • replacement in live.lua at line 230
    [5.7050][5.7050:7091]()
    live.send(live.get_binding(binding))
    [5.7050]
    [5.7091]
    live.send_to_driver(live.get_binding(binding))
  • replacement in live.lua at line 251
    [5.7983][5.7983:8024]()
    live.send('ERROR '..tostring(err))
    [5.7983]
    [5.8024]
    live.send_to_driver('ERROR '..tostring(err))
  • replacement in live.lua at line 253
    [5.8032][3.8:28]()
    live.send('ok')
    [5.8032]
    [5.8032]
    live.send_to_driver('ok')
  • edit in live.lua at line 257
    [5.8043]
    [5.8043]
    function live.get_cmd_from_buffer(buf)
    return buf:match('^%s*(%S+)')
    end
  • replacement in live.lua at line 305
    [5.10619][5.619:659]()
    live.send_run_time_error(stack_trace)
    [5.10619]
    [5.10654]
    live.send_run_time_error_to_driver(stack_trace)
  • replacement in live.lua at line 308
    [5.10675][5.10675:10700]()
    buf = live.receive()
    [5.10675]
    [5.10700]
    buf = live.receive_from_driver()