7YXBYZ7XWVBXI67WLBOOYBXTYGPI43YZOGL7RQ357YCLHHIKKFDQC
{"panel_bounds":93,"editor_to_string":121,"on.key_release":152,"map":123,"on.mouse_release":154,"Cursor":38,"Title_font":73,"eval":155,"on.initialize":149,"on":1,"fw_parent":154,"Margin":27,"Data_title_text":76,"Font_size":28,"on.draw":108,"create_editor":94,"draw_editor_panel":140,"Code":101,"Num_panels_horizontal":23,"In":98,"Data":102,"Out":103,"on.keychord_press":153,"draw_title":110,"on.mouse_press":112,"create_editor_panel":114,"Num_panels_vertical":24,"draw_data":151,"fw_app":"bf","on.text_input":118}
eval = function(code, data)
local cp, dp = 1, data.p
while cp <= #code do
local inst = code:sub(cp,cp)
if inst == '<' then
dp = dp-1
elseif inst == '>' then
dp = dp+1
elseif inst == '+' then
if data[dp] == nil then data[dp] = 0 end
data[dp] = data[dp]+1
elseif inst == '-' then
if data[dp] == nil then data[dp] = 0 end
data[dp] = data[dp]-1
elseif inst == '[' then
if data[dp] == 0 then
cp = code:find(']', cp, --[[plain]] true)
end
elseif inst == ']' then
if data[dp] ~= 0 then
cp = rfind(code, '[' , cp, --[[plain]] true)
end
elseif inst == '.' then
Out.editor.lines[1].data = Out.editor.lines[1].data..string.char(data[dp])
Text.redraw_all(Out.editor)
--print(string.char(data[dp]))
--print(data[dp])
elseif inst == ',' then
--data[dp] = string.byte(io.read(1))
if #In.editor.lines[1].data > 0 then
data[dp] = string.byte(In.editor.lines[1].data:sub(1,1))
else
data[dp] = 0
end
In.editor.lines[1].data = In.editor.lines[1].data:sub(2)
elseif inst == '#' then
cp = code:find('\n', cp)
if cp == nil then break end
end
cp = cp+1
end
data.p = dp
end