This shows you the differences between two versions of the page.
Both sides previous revision Previous revision | |||
tutorial:custom_oses [2015/10/14 04:09] ultrahex [What's Available?] |
tutorial:custom_oses [2020/03/29 21:04] thepuzzlemaker [What's Available?] Add some undocumented functions/libraries available in OSes without compatibility libraries or OS-level libraries |
||
---|---|---|---|
Line 16: | Line 16: | ||
What's Available? | What's Available? | ||
----------------- | ----------------- | ||
- | There are a few libraries documented on the wiki that are in fact part of OpenOS, so when you're implementing your own operation system, those won't be at your disposal. Most notably that includes the `io`, `package` and `filesystem` libraries. For a definite reference for what's available in an init script, check the kernel. The following list isn't guaranteed to be complete and/or up-to-date! | + | There are a few libraries documented on the wiki that are in fact part of OpenOS, so when you're implementing your own operation system, those won't be at your disposal. Most notably that includes the `io`, `package` and `filesystem` libraries. For a definite reference for what's available in an init script, check the kernel or [[https://github.com/MightyPirates/OpenComputers/blob/master-MC1.12/src/main/resources/assets/opencomputers/lua/machine.lua|machine.lua script for your current OpenComputers version]]. The following list isn't guaranteed to be complete and/or up-to-date! |
```lua | ```lua | ||
Line 63: | Line 63: | ||
debug.getinfo | debug.getinfo | ||
debug.traceback | debug.traceback | ||
+ | debug.getlocal | ||
+ | debug.getupvalue | ||
math.abs | math.abs | ||
Line 140: | Line 142: | ||
computer.getArchitecture | computer.getArchitecture | ||
computer.getBootAddress | computer.getBootAddress | ||
+ | computer.getDeviceInfo | ||
+ | computer.getProgramLocations | ||
+ | computer.isRobot | ||
computer.maxEnergy | computer.maxEnergy | ||
computer.pullSignal | computer.pullSignal | ||
Line 162: | Line 167: | ||
unicode.wlen | unicode.wlen | ||
unicode.wtrunc | unicode.wtrunc | ||
+ | |||
+ | -- Lua 5.3 only: | ||
+ | coroutine.isyieldable | ||
+ | |||
+ | string.pack | ||
+ | string.unpack | ||
+ | string.packsize | ||
+ | |||
+ | table.move | ||
+ | |||
+ | math.maxinteger | ||
+ | math.mininteger | ||
+ | math.tointeger | ||
+ | math.type | ||
+ | math.ult | ||
+ | |||
+ | utf8.char | ||
+ | utf8.charpattern | ||
+ | utf8.codes | ||
+ | utf8.codepoint | ||
+ | utf8.len | ||
+ | utf8.offset | ||
``` | ``` | ||