Error flow is still klunky. We'll need to implement the output region for that.
WR2WMEPEKNFAB4CAUBVFBACAJJSX2VX5B2VHKKSNTJSJBIIXFVZQC map = function(arr, f)local result = {}for _, x in ipairs(arr) dotable.insert(result, f(x))endreturn resultend
draw_canvas = function()if Canvas == nil then return endlove.graphics.setBlendMode('alpha', 'premultiplied')love.graphics.setColor(1,1,1,1)love.graphics.draw(Canvas, 0,0)love.graphics.setBlendMode('alpha')end
Canvas = nil
local buf = table.concat(map(Editor_state.lines, function(line) return line.data end), '\n')Canvas = love.graphics.newCanvas()love.graphics.setCanvas(Canvas)love.graphics.push('all')love.graphics.setBackgroundColor(1,1,1)love.graphics.setColor(0,0,0)local status, result = live.eval(buf)if not status thenprint(result)endlove.graphics.pop()love.graphics.setCanvas()