unsuccessfull attempt at renaming terminal to io...
This commit is contained in:
@@ -128,7 +128,7 @@ handle:close()
|
|||||||
|
|
||||||
--print(require("serialize")(data, "\t"))
|
--print(require("serialize")(data, "\t"))
|
||||||
|
|
||||||
-- Halyde io doesn't support bold (CSI 1 m) but who cares
|
-- Halyde terminal doesn't support bold (CSI 1 m) but who cares
|
||||||
|
|
||||||
if data.command then
|
if data.command then
|
||||||
terminal.write("\27[1mUsage: \27[0m\n")
|
terminal.write("\27[1mUsage: \27[0m\n")
|
||||||
|
|||||||
@@ -1,15 +0,0 @@
|
|||||||
for i = 1, 100 do
|
|
||||||
profiler.start("math_work")
|
|
||||||
local x = 0
|
|
||||||
for j = 1, 200000 do x = x + math.sqrt(j) end
|
|
||||||
profiler.stop("math_work")
|
|
||||||
|
|
||||||
profiler.start("string_work")
|
|
||||||
local s = ""
|
|
||||||
for j = 1, 2000 do s = s .. tostring(j) end
|
|
||||||
profiler.stop("string_work")
|
|
||||||
end
|
|
||||||
|
|
||||||
for _, r in ipairs(profiler.results()) do
|
|
||||||
print(r.label, r.time)
|
|
||||||
end
|
|
||||||
@@ -1,6 +1,6 @@
|
|||||||
local module = {}
|
local module = {}
|
||||||
|
|
||||||
module.dependencies = { "io" }
|
module.dependencies = { "terminal" }
|
||||||
|
|
||||||
function module.check()
|
function module.check()
|
||||||
return true -- This module should always be loaded
|
return true -- This module should always be loaded
|
||||||
|
|||||||
@@ -18,7 +18,7 @@ function module.init()
|
|||||||
|
|
||||||
local component = require("component")
|
local component = require("component")
|
||||||
local gpu = component.gpu
|
local gpu = component.gpu
|
||||||
_G._PUBLIC.io = {}
|
_G._PUBLIC.terminal = {}
|
||||||
|
|
||||||
local readHistory = {}
|
local readHistory = {}
|
||||||
function _PUBLIC.terminal.getHistory(id)
|
function _PUBLIC.terminal.getHistory(id)
|
||||||
@@ -811,7 +811,7 @@ function module.init()
|
|||||||
end
|
end
|
||||||
|
|
||||||
function module.exit()
|
function module.exit()
|
||||||
_G._PUBLIC.io = nil
|
_G._PUBLIC.terminal = nil
|
||||||
end
|
end
|
||||||
|
|
||||||
return module
|
return module
|
||||||
|
|||||||
+1
-1
@@ -1,4 +1,4 @@
|
|||||||
local io = require("terminal")
|
local io = require("io")
|
||||||
local component = require("component")
|
local component = require("component")
|
||||||
if not component.isAvailable("internet") then
|
if not component.isAvailable("internet") then
|
||||||
io.stderr.write("This program requires an internet card to run.")
|
io.stderr.write("This program requires an internet card to run.")
|
||||||
|
|||||||
Reference in New Issue
Block a user