delete experimental REPL
[?]
May 17, 2022, 1:42 AM
VXORMHME4X64HL6AC7BVYMSYEAYASG6RENGUZ7PEIZ4YQJ7ZHBIQCDependencies
- [2]
FBDRL6LHdelete points or shapes - [3]
5TIFKJ7Shandle space key - [4]
WDWXNW7Vslightly strange way to move points - [5]
R5QXEHUIsomebody stop me - [6]
H7OEU6WPexperimental approach to combining keyboard and mouse while drawing - [7]
2C7CTIQYmake space for multiple kinds of width - [8]
3XD6M3CFrefactor - [9]
RSZD5A7Gforgot to add json.lua - [10]
GVOFXXITdelete drawing using backspace - [11]
7RN3AETYbugfix: text sometimes getting colored like drawing borders - [12]
D2GCFTTTclean up repl functionality - [13]
6PUNJS5Bbackspace - [14]
JCSLDGAHbeginnings of support for multiple shapes - [15]
7Q4B6M2Desc to cancel a shape mid-click - [16]
O2UFJ6G3switch from freehand to just straight lines - [17]
T4FRZSYLdelete an ancient, unused file - [18]
6LJZN727handle chords - [19]
WAZVXUV2simplest possible way to straighten strokes - [20]
OTIBCAUJlove2d scaffold - [21]
XX7G2FFJintermingle freehand line drawings with text - [22]
G77XIN7Mselecting a stroke - [23]
IZZVOCLBconfirm that we have access to all of the love API - [24]
YKRF5V3Zstarting to load/save - [25]
KCIM5UTVrevert: back to freehand - [26]
HWPK4SMPnew mode: manhattan - [27]
JVRL5TWLstore device-independent coordinates inside drawings - [28]
QU7NHFOVshow cursor - [29]
ICIIP4DBslightly better default sizing of drawings
Change contents
- file deletion: repl.lua
-- beginnings of a replfunction eval(buf)local f = load('return '..buf, 'REPL')if f thenreturn run(f)endlocal f, err = load(buf, 'REPL')if f thenreturn run(f)elsereturn {err}endend-- you could perform parse and run separately-- usually because there's a side-effect like drawing that you want to control the timing offunction parse_into_exec_payload(buf)local f = load('return '..buf, 'REPL')if f thenexec_payload = freturnendlocal f, err = load(buf, 'REPL')if f thenexec_payload = freturnelsereturn {err}endend-- based on https://github.com/hoelzro/lua-replfunction run(f)local success, results = gather_results(xpcall(f, function(...) return debug.traceback() end))return resultsendfunction gather_results(success, ...)local n = select('#', ...)return success, { n = n, ... }end - edit in main.lua at line 3
require 'repl' - edit in main.lua at line 47
exec_payload = nil - edit in main.lua at line 155[3.1357]→[3.22:23](∅→∅),[3.190]→[3.22:23](∅→∅),[3.23]→[3.944:969](∅→∅),[3.969]→[3.23:46](∅→∅),[3.23]→[3.23:46](∅→∅),[3.46]→[3.970:992](∅→∅),[3.992]→[3.76:82](∅→∅),[3.76]→[3.76:82](∅→∅)
-- display side effectif exec_payload thenrun(exec_payload)end - edit in main.lua at line 507[3.314]→[3.225:254](∅→∅),[3.555]→[3.225:254](∅→∅),[3.254]→[3.993:1063](∅→∅),[3.1063]→[2.419:448](∅→∅),[2.448]→[3.1092:1135](∅→∅),[3.1092]→[3.1092:1135](∅→∅)
elseif chord == 'C-r' thenlines[#lines+1] = eval(lines[#lines])[1]lines[#lines+1] = ''elseif chord == 'C-x' thenparse_into_exec_payload(lines[#lines])