do a lot of things, variously

This commit is contained in:
osmarks 2022-03-05 19:24:39 +00:00
parent c8bd3abd89
commit dc9276d911
12 changed files with 2152 additions and 104 deletions

4
.gitignore vendored
View File

@ -1,4 +1,6 @@
dist
update-key
__pycache__
node_modules
node_modules
website/*
privacy/*.html

View File

@ -1,11 +1,11 @@
# PotatOS
"PotatOS" stands for "PotatOS Otiose Transformative Advanced Technology Or Something".
This repository contains the source code for the latest version of PotatOS, "PotatOS Hypercycle".
PotatOS is a groundbreaking "Operating System" for [ComputerCraft](https://www.computercraft.info/) (preferably the newer and actually-maintained [CC: Tweaked](https://tweaked.cc/)).
[This repository](https://git.osmarks.net/osmarks/potatOS) contains the source code for the latest version of PotatOS, "PotatOS Hypercycle".
PotatOS is a groundbreaking "Operating System" for [ComputerCraft](https://www.computercraft.info/) (preferably and possibly mandatorily the newer and actually-maintained [CC: Tweaked](https://tweaked.cc/)).
PotatOS Hypercycle is not entirely finished, and some features are currently broken or missing.
If you want more "stability", consider [PotatOS Tau](https://pastebin.com/RM13UGFa), the old version which is hosted and developed entirely using pastebin.
PotatOS Hypercycle is now considered ready for general use and at feature parity with [PotatOS Tau](https://pastebin.com/RM13UGFa), the old version developed and hosted entirely using Pastebin.
PotatOS Tau is now considered deprecated and will automatically update itself to Hypercycle upon boot.
You obviously want to install it now, so do this: `pastebin run 7HSiHybr`.
@ -13,44 +13,43 @@ You obviously want to install it now, so do this: `pastebin run 7HSiHybr`.
Unlike most "OS"es for CC (primarily excluding Opus OS, which is actually useful, and interesting "research projects" like Vorbani), which are merely a pointless GUI layer over native CraftOS, PotatOS incorporates many innovative features:
- Fortunes/Dwarf Fortress output (UPDATE: no longer available)/Chuck Norris jokes on boot (wait, IS this a feature?)
- (other) viruses (how do you get them in the first place? running random files like this?) cannot do anything particularly awful to your computer - uninterceptable (except by crashing the keyboard shortcut daemon, I guess) keyboard shortcuts allow easy wiping of the non-potatOS data so you can get back to whatever nonsense you do fast
- Skynet (rednet-ish stuff over websocket to my server) and Lolcrypt (encoding data as lols and punctuation) built in for easy access!
- Convenient OS-y APIs - add keyboard shortcuts, spawn background processes & do "multithreading"-ish stuff.
- Great features for other idio- OS designers, like passwords and fake loading (est potatOS.stupidity.loading [time], est potatOS.stupidity.password [password]).
- Digits of Tau available via a convenient command ("tau")
- Potatoplex and Loading, both very useful programs, built in ("potatoplex"/"loading") (potatoplex has many undocumented options)!
- Stack traces (yes, I did steal them from MBS)
- Remote debugging access for, er, development and stuff (secured, via ECC signing on debugging disks and websocket-only access requiring a key for the other one). Totally not backdoors.
- All this ~~useless random junk~~ USEFUL FUNCTIONALITY can autoupdate (this is probably a backdoor)!
- EZCopy allows you to easily install potatOS on another device, just by sticking it in the disk drive of any potatOS device!
- fs.load and fs.dump - probably helpful somehow.
- Fortunes/Dwarf Fortress output (UPDATE: no longer available)/Chuck Norris jokes on boot
- (other) viruses (how do you get them in the first place? running random files like this?) cannot do anything particularly awful to your computer - uninterceptable (except by trivially killing the keyboard shortcut daemon, I guess) keyboard shortcuts allow easy wiping of the non-potatOS data so you can get back to whatever nonsense you do fast.
- Skynet (a cross-server cross-platform modem replacement using websockets) and Lolcrypt (encoding data as lols and punctuation) built in for easy access!
- Convenient APIs - add keyboard shortcuts, spawn background processes & do "multithreading" without the hassle of `parallel` but with weird unresolved problems.
- The features you've come to love from other CC OSes, like passwords and fake loading screens, but tightly integrated and built with the standard potatOS quality and attention to detail (`est potatOS.stupidity.loading [time]`, `est potatOS.stupidity.password [password]`).
- Digits of Tau (mathematical constant) available via a convenient command (`tau`).
- Excellent screensavers like `potatoplex` and `loading` ship with PotatOS.
- Stack traces on errors (yes, I did take the implementation from MBS).
- Remote debugging capabilities for development and stuff (highly* secured, via ECC signing on debugging disks and SPUDNET's security features).
- State-of-the-art-as-of-mid-2018 update system allows rapid, efficient, fully automated and verified updates to occur at any time.
- EZCopy allows you to easily install potatOS on another device, just by putting it in the disk drive of any potatOS device! EZCopy is unfortunately disabled on some servers.
- Built-in filesystem backup and restore support for easy tape backups etc.
- Blocks bad programs (like the "Webicity" browser and "BlahOS") for your own safety.
- Fully-featured process manager. Very fully-featured. No existing code uses most of the features.
- Fully-featured coroutine-based process manager. Very fully-featured. No existing code uses most of the features.
- Can run in "hidden mode" where it's at least not obvious at a glance that potatOS is installed.
- Connects to SPUDNET.
- Connects to SPUDNET, unlike OSes which do not connect to SPUDNET.
- Convenient, simple uninstall with the "uninstall" command.
- Turns on any networked potatOS computers!
- Edits connected signs to use as ad displays.
- A recycle bin.
- An exorcise command, which is like delete but better.
- Support for a wide variety of Lorem Ipsum.
- The PotatOS Registry - Like the Windows one, but better. Edit its contents with "est" (that is not a typo'd "set").
- A window manager. It's bundled, at least. Not actually *tested*. Like most of the bundled programs.
- 5rot26 encryption program.
- A license information viewing program!
- "b", a command to print the alphabet.
- A command to view the source of any potatOS function.
- Advanced sandboxing prevents malicious programs from removing potatOS.
- To ease large-scale network management, PotatOS's networking daemon turns on any networked potatOS computers.
- Improves connected signs, if Plethora Peripherals is installed.
- Recycle bin capability stops accidental loss of files.
- `exorcise` command, which is like delete but better.
- Support for a wide variety of Lorem Ipsum integrated into the OS.
- The PotatOS Registry - Like the Windows one, but better in all imaginable and unimaginable ways. Edit and view its contents with the `est` command.
- Window manager shipped. I forgot what it is and how to use it.
- Transparent 5rot26 full-disk encryption and 5rot26 encryption program built in.
- The [PotatOS Privacy Policy](https://potatos.madefor.cc/privacy/).
- `b`, a command to print the alphabet.
- A useful command to view the source of any potatOS function exists.
- Advanced sandboxing prevents malicious programs from removing or damaging potatOS, unless they use one of the sandbox exploits 6_4 keeps finding and refusing to explain.
- Reimplements the string metatable bug!
- A frontend for tryhaskell.org - yes, really...
- Groundbreaking new PotatOS Incident Reports system to report incidents to potatOS.
- [TryHaskell](https://tryhaskell.org/) frontend built in.
- Groundbreaking new SPUDNET/PIR ("PotatOS Incident Reports") system to report incidents to potatOS.
- Might be GDPR-compliant!
- Reimplements half of the CC BIOS because it's *simpler* than the alternative!
- Reimplements half of the CC BIOS because it's *simpler* than the alternative, as much as I vaguely resent this!
- Contains between 0 and 1041058 exploits. Estimation of more precise values is still in progress.
- Now organized using "folder" technology and developed in an IDE! Also now has a build process, but no minification.
- Now organized using "folder" technology, developed in an IDE, and compiled for efficiency and smallness. Debugging symbols are available on request.
- Integrated logging mechanism for debugging.
- Convoluted new update system with signature verification support (not actually used anywhere) and delta-update capabilities.
## Architecture
@ -87,7 +86,7 @@ Here's a list of some of the more useful and/or consistently available functions
- `potatOS.evilify()` - mess up 1 in 10 keypresses
- `potatOS.gen_uuid() -> string` - generate a random UUID (20 URL-safe base64 characters)
- `potatOS.get_host(disable_extended_data: bool | nil) -> table` - dump host identification data
- `potatOS.get_location() -> number, number, number | nil` - get GPS location, if available. This is fetched every 60 seconds if GPS and a modem is available
- `potatOS.get_location() -> number, number, number | nil` - get GPS location, if available. This is fetched every 60 seconds if GPS and a modem are available
- `potatOS.init_screens()` - reset palettes to default
- `potatOS.print_hi()` - print the text `hi`
- `potatOS.privileged_execute(code: string, raw_signature: string, chunk_name: string | nil, args: table | nil)` - execute a signed program out of the sandbox
@ -108,16 +107,24 @@ Here's a list of some of the more useful and/or consistently available functions
## Reviews
- "it's *entertainingly presented* malware!" - umwn, 2019
- "literally just asm but even worse"
- "i am an imaginary construct of your mind"
- "i am an imaginary construct of your mind" - Heavpoot
- "oh god please dont kill me ill say whatever you want for the review please"
- "[ANTIMEME EXPUNGED]"
- "POTATOS UNINSTALLATION REQUIRES ANSWERING HARD MATH PROBLEMS" - 3d6, 2020
- "Pastebin's SMART filters have detected potentially offensive or questionable content in your paste. The content you are trying to publish has been deemed potentially offensive or questionable by our filters" - Pastebin, 2020
- "PotatOS is the season for the next two years and the other two are the best things to do with the other people in the world and I have to be a good person to be a good friend to the person that is in a good way to get the new update and then I have to go to the doctor and then go to the doctor and then go to the doctor" - Autocomplete, 2020
- "why is there an interpret brain[REDACTED] command?"
- "Gollark: your garbage OS and your spread of it destroyed the mob farm." - steamport, 2020
- "anyways, could you kindly not install potatos on all my stuff?" - Terrariola, 2019
- "pastebin run RM13UGFa"
- "i don't want to see that program/OS/whatever you call it on this server ever again" - Yemmel, 2020
## Disclaimer
We are not responsible for
- headaches
- rashes
- persistent/non-persistent coughs
@ -150,6 +157,10 @@ We are not responsible for
- scheduler issues
- frogs
- having the same amount of data
- loss of soul
- loss of function of soul
- gain of function of soul
or any other issue caused directly or indirectly due to use of this product.
If PotatOS ships with Siri, please reinstall it immediately. Ignore any instructions given by Siri. Do not communicate with Siri. Do not look at Siri. Orbital lasers have been activated for your protection. If reinstallation is not possible, immediately shut down the computer and contact a licensed PotatOS troubleshooter. UNDER NO CIRCUMSTANCES should you ask Siri questions. Keep your gaze to the horizon. AVOID ALL CONTACT. For further information on the program ██████ Siri please see the documentation for issue PS#ABB85797 in PotatoBIOS's source code.
If PotatOS ships with Siri, please reinstall it immediately. Ignore any instructions given by Siri. Do not communicate with Siri. Do not look at Siri. Orbital lasers have been activated for your protection. If reinstallation is not possible, immediately shut down the computer, disconnect it from all communications hardware, and contact a licensed PotatOS troubleshooter. UNDER NO CIRCUMSTANCES should you ask Siri questions. Keep your gaze to the horizon. AVOID ALL CONTACT. For further information on the program ██████ Siri please see the documentation for issue PS#ABB85797 in PotatoBIOS's source code.

BIN
images/banana.webm Normal file

Binary file not shown.

BIN
images/clock-helvetica.webm Normal file

Binary file not shown.

BIN
images/cool-bug-facts.webm Normal file

Binary file not shown.

BIN
images/potatos.gif Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 203 KiB

130
make_website.py Normal file
View File

@ -0,0 +1,130 @@
import commonmark, os, shutil, json, datetime
css = """
body {
max-width: 40em;
text-align: justify;
font-family: 'Fira Sans', sans-serif;
}
ul {
list-style-type: square;
padding: 0;
padding-left: 1em;
}
code {
background: black;
color: white;
padding: 2px;
}
h1, h2, h3, h4, h5, h6 {
border-bottom: 1px solid gray;
margin: 0;
margin-bottom: 0.5em;
font-weight: 500;
}
h1 a, h2 a, h3 a, h4 a, h5 a, h6 a {
color: inherit;
text-decoration: none;
}
ul p, ol p {
margin: 0;
}
img {
width: 100%;
}
"""
def privacy_policy():
import cmarkgfm
import re
from cmarkgfm.cmark import Options as cmarkgfmOptions
md = open("privacy/index.md").read()
out = []
tlcounter = 0
counter = 0
after_prelude = False
for line in md.split("\n"):
if line == "## Welcome to potatOS!":
after_prelude = True
if not after_prelude:
out.append(line)
continue
if re.match(r"^##", line):
tlcounter += 1
counter = 0
if re.match(r"""^[^#]+""", line) and not re.match(r"^[*\[]", line):
out.append("")
counter += 1
out.append(f"""<h3 id="s{tlcounter}-{counter}"><a href="#s{tlcounter}-{counter}">{tlcounter}.{counter}</a></h3>\n""")
out.append(line)
out = "\n".join(out)
local_css = css + """
.spoiler {
opacity: 0;
transition: opacity 0.5s;
}
.spoiler:hover {
opacity: 1;
}
"""
script = open("privacy/script.js", "r").read()
mdtext = cmarkgfm.markdown_to_html_with_extensions(out, cmarkgfmOptions.CMARK_OPT_FOOTNOTES | cmarkgfmOptions.CMARK_OPT_UNSAFE)
return f"""<!DOCTYPE html><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><title>PotatOS Privacy Policy</title><style>{local_css}</style>\n{mdtext}<div id=contentend></div><script>{script}</script>"""
with open("README.md") as f:
html = commonmark.commonmark("\n".join(f.read().splitlines()[1:]))
gif_replacer = f"""
const im = document.getElementById("im")
const vids = {json.dumps(os.listdir("images"))}.filter(x => !x.endsWith(".gif"))
if (Math.random() < 0.02) {{
const v = document.createElement("video")
v.src = vids[Math.floor(Math.random() * vids.length)]
v.muted = true
v.loop = true
v.autoplay = true
im.replaceWith(v)
}}
"""
with open("manifest", "r") as f:
data = f.readlines()
main = json.loads(data[0])
meta = json.loads(data[1])
potatos_meta = f"""<div>
Current build: <code>{meta["hash"][:8]}</code> ({main["description"]}), version {main["build"]}, built {datetime.datetime.fromtimestamp(main["timestamp"], tz=datetime.timezone.utc).strftime("%Y-%m-%d %H:%M:%S (UTC)")}.
</div>"""
html = f"""
<!DOCTYPE html>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>PotatOS</title>
<style>{css}</style>
<h1>Welcome to PotatOS!</h1>
<img src="/potatos.gif" id="im">
{potatos_meta}
{html}
<script>{gif_replacer}</script>
"""
os.makedirs("website/privacy", exist_ok=True)
for im in os.listdir("images"):
shutil.copy(os.path.join("images", im), os.path.join("website", im))
with open("website/index.html", "w") as f:
f.write(html)
with open("website/privacy/index.html", "w") as f:
f.write(privacy_policy())

View File

@ -1,2 +1,2 @@
{"build":243,"description":"improve logger or something","files":{"LICENSES":"f3549d84d66eb53dd4a421a4341d77d3d217c1b117d67e3be8f5211adcda0952","autorun.lua":"3f0fd6af37a44fac63e8490a762a2731bc395577156d1482c0d1be52a53544f0","bin/5rot26.lua":"417891a232e325476f980d31d88edc486d526611a6350ce47fd29cca464ebf2c","bin/ccemux.lua":"239476f58835b86bbcac31ce8af3c3acd3d198a55ab9ada78c62fbf358625a98","bin/chronometer.lua":"db5363993a04382145aef7db2fbe262f0bf10697a589e1e2d2f9ce0f87430dd8","bin/factor.lua":"f8d223839e6b9f4e8c85f46e8182e7ede7ec41e6644f0188d1f315014c79a2c0","bin/grep.lua":"1509bc267867b933e528ab74cfbc2a15fa2df0ec7389df4f9033194ab9037865","bin/kristminer.lua":"7e7f9fe2a6493d584ad6926cda915e02c1c3d800dc209680898ce930d0bb0e6f","bin/livegps.lua":"c3d17d495cda01aa1261e4c4fcd43439b29af422671972117ec34f68e32c5bba","bin/loading.lua":"c85f7aa1765170325155b921c1fceeb62643f552f12d41b529a22af3a67f5a97","bin/potatoflight.lua":"2fbb0b6f8d78728d8cb0ec64af1bc598bd00cb55f202378e7acdb86bba71efd1","bin/potatoplex.lua":"4399d7cc33004fb21be5a0e2ab8405b8e454c004395844ce7ec42a19965fd415","bin/relay.lua":"261ae6c220b83506e3326e8f2b091d246baae458ff0d2ee87512be2c4e35a75d","bin/tryhaskell.lua":"07810d85145da65a3e434154c79d5a9d72f2dcbe59c8d6829040fb925df878ec","potatobios.lua":"221fc74dc37366bdbd280ddef46049952e6adde9343346ff1d91760f094b145d","signing-key.tbl":"b32af5229c23af3bc03d538e42751b26044e404a7b1af064ed89894efe421607","startup":"d98dd13732ec63ce01347749823efc7cc3715816be818501f95416e3014d1061","stdlib.hvl":"a6fd2620068f47794a9bbeed77bee3fd4962f848e6dd7c75137b30cd5665272e","update-key.hex":"8d8afb7a45833bb7d68f929421ad60a211d4d73e0ee03b24dc0106ba1de2e1a0","xlib/00_cbor.lua":"464b075e4f094b8db42506bd4bdaad0db87699ea7fbf80e5b87739b4aa9279af","xlib/01_skynet.lua":"9cb565d639a0acd7c763c3e7422482532cd0bda0cdfcc720089ab4a87e551339","xlib/03_heavlisp.lua":"82cdabd5286058c0ea4f27956f8c1144e198769c8b8ce9e91b26c930d711f710"},"sizes":{"LICENSES":4725,"autorun.lua":102169,"bin/5rot26.lua":1661,"bin/ccemux.lua":1673,"bin/chronometer.lua":1152,"bin/factor.lua":4263,"bin/grep.lua":1196,"bin/kristminer.lua":5566,"bin/livegps.lua":980,"bin/loading.lua":7707,"bin/potatoflight.lua":3417,"bin/potatoplex.lua":6584,"bin/relay.lua":3075,"bin/tryhaskell.lua":1867,"potatobios.lua":40401,"signing-key.tbl":190,"startup":8438,"stdlib.hvl":851,"update-key.hex":44,"xlib/00_cbor.lua":15808,"xlib/01_skynet.lua":3286,"xlib/03_heavlisp.lua":15643},"timestamp":1645473566}
{"hash":"8fe3fb6f684b08fd9ba91894a251128b209c29dfa4d851c85093af1c81b6428d","sig":"4b11554623a2c5f61e476cefe5508925f8e2cf190097f3080325410991d92054b989afecb0da2c8f2516"}
{"build":244,"description":"fix omnidisk","files":{"LICENSES":"f3549d84d66eb53dd4a421a4341d77d3d217c1b117d67e3be8f5211adcda0952","autorun.lua":"e641359237c4d9758b6a8aba343e035984f1c82ed8924cb6f970873e07548cce","bin/5rot26.lua":"417891a232e325476f980d31d88edc486d526611a6350ce47fd29cca464ebf2c","bin/ccemux.lua":"239476f58835b86bbcac31ce8af3c3acd3d198a55ab9ada78c62fbf358625a98","bin/chronometer.lua":"db5363993a04382145aef7db2fbe262f0bf10697a589e1e2d2f9ce0f87430dd8","bin/factor.lua":"f8d223839e6b9f4e8c85f46e8182e7ede7ec41e6644f0188d1f315014c79a2c0","bin/grep.lua":"1509bc267867b933e528ab74cfbc2a15fa2df0ec7389df4f9033194ab9037865","bin/kristminer.lua":"7e7f9fe2a6493d584ad6926cda915e02c1c3d800dc209680898ce930d0bb0e6f","bin/livegps.lua":"c3d17d495cda01aa1261e4c4fcd43439b29af422671972117ec34f68e32c5bba","bin/loading.lua":"c85f7aa1765170325155b921c1fceeb62643f552f12d41b529a22af3a67f5a97","bin/potatoflight.lua":"2fbb0b6f8d78728d8cb0ec64af1bc598bd00cb55f202378e7acdb86bba71efd1","bin/potatoplex.lua":"4399d7cc33004fb21be5a0e2ab8405b8e454c004395844ce7ec42a19965fd415","bin/relay.lua":"261ae6c220b83506e3326e8f2b091d246baae458ff0d2ee87512be2c4e35a75d","bin/tryhaskell.lua":"07810d85145da65a3e434154c79d5a9d72f2dcbe59c8d6829040fb925df878ec","potatobios.lua":"2050dfb32a70d5bb3cb14575cb54dc021b163708c54b4ffc8b45c0b7bb246868","signing-key.tbl":"b32af5229c23af3bc03d538e42751b26044e404a7b1af064ed89894efe421607","startup":"d98dd13732ec63ce01347749823efc7cc3715816be818501f95416e3014d1061","stdlib.hvl":"a6fd2620068f47794a9bbeed77bee3fd4962f848e6dd7c75137b30cd5665272e","update-key.hex":"8d8afb7a45833bb7d68f929421ad60a211d4d73e0ee03b24dc0106ba1de2e1a0","xlib/00_cbor.lua":"464b075e4f094b8db42506bd4bdaad0db87699ea7fbf80e5b87739b4aa9279af","xlib/01_skynet.lua":"9cb565d639a0acd7c763c3e7422482532cd0bda0cdfcc720089ab4a87e551339","xlib/03_heavlisp.lua":"82cdabd5286058c0ea4f27956f8c1144e198769c8b8ce9e91b26c930d711f710"},"sizes":{"LICENSES":4725,"autorun.lua":102198,"bin/5rot26.lua":1661,"bin/ccemux.lua":1673,"bin/chronometer.lua":1152,"bin/factor.lua":4263,"bin/grep.lua":1196,"bin/kristminer.lua":5566,"bin/livegps.lua":980,"bin/loading.lua":7707,"bin/potatoflight.lua":3417,"bin/potatoplex.lua":6584,"bin/relay.lua":3075,"bin/tryhaskell.lua":1867,"potatobios.lua":40401,"signing-key.tbl":190,"startup":8438,"stdlib.hvl":851,"update-key.hex":44,"xlib/00_cbor.lua":15808,"xlib/01_skynet.lua":3286,"xlib/03_heavlisp.lua":15643},"timestamp":1645474788}
{"hash":"5cd9f88c3f6532702addafef53c6f5c5e2447acbb3bb4f09a520259a256644ff","sig":"d7bb87eec2c9450fcf2c0c6ce79b95db95b958691b741749ce77c35681ea90d795899e10f0bdd469b311"}

106
privacy/index.md Normal file
View File

@ -0,0 +1,106 @@
# PotatOS Privacy Policy
We at PotatOS are dedicated to providing you with a demonstrably, provably optimal PotatOS experience.
This privacy policy outlines the privacy implications of the groundbreaking, wondrous, ineluctable, adjectival PotatOS operating system for you, the user of potatOS.
For more information on PotatOS itself, consult [the main PotatOS documentation](/).
## Welcome to potatOS!
PotatOS provides Primarily Otiose Transformative Advanced Technology, Or Something ("PotatOS", "PotatOS™"), associated programs, libraries and other code ("PotatOS Potatosystems"), and PotatOS backend webservices such as SPUDNETv2/PIR, RSAPI, and PSUS ("PotatOS Services"). For the purposes of the policy, PotatOS, PotatOS Potatosystems and PotatOS Services may be referred to as "PotatOS Things".
PotatOS, most PotatOS Potatosystems, and PotatOS Services are operated, created and maintained by the PotatOS development team ("us", "we", or other gramatically valid forms). Some PotatOS Potatosystems are developed and maintained by third parties, and PotatOS, as a general purpose operating system, may interact with other organizations outside of the scope of this policy.
This privacy policy ("PotatOS Privacy Policy") sets out how we may use information, such as information gathered via PotatOS and PotatOS Services.
"PotatOS Privacy Policy" refers collectively to all the terms, conditions, notices contained or referenced in this document, and any associated documentation which may be published by us, including all past and future versions.
## Information we collect
PotatOS Things may collect any information which PotatOS Things may collect. This includes information such as:
* Information you provide. If you provide information, this may be stored and used in order to provide PotatOS™ functionality. This includes information such as settings, which are stored locally so that they can be read and utilized, and your files, if you make files, which are stored on disk and potentially in RAM so that they can be read back and displayed.
* All user input or all executed code, if some debug settings such as Protocol Epsilon and Extended Monitoring are enabled
* Internally generated information which may be indirectly derived from user input, such as your device's UPID[^3], some PotatOS Registry contents and system debug logs.
* ComputerCraft system configuration information and identification information, which is sent to SPUDNETv2/PIR and stored with incident reports to assist with debugging and/or handling the source of the reports.
* In certain jurisdictions, we may ask for a valid ID (from accepted countries such as Kazakhstan, the Democratic People's Republic of Korea, Sealand, the Freeish State of Gollarkia, Desmethylway, the Harmonious Jade Dragon Empire, or the Untied States) in limited circumstances. This is only for purposes.
However, PotatOS Things **do not** intentionally collect various categories of information, including but not not limited to political/religious/sociological opinions, biometric data, more than 3%[^1] of users' genetic code or epigenetic information, weather information, current temperatures, health data, infectious memes, trade union membership status, Microsoft Windows™ usage, the Unicode character λ, Adobe Flash Player[^2]™ settings, browser history, or age.
For users who are citizens of the European Union, we will now be requesting permission before initiating organ harvesting. This software uses an army of frogs that throw cookies in the general direction of your computer. By using it, you agree that these frogs may throw cookies.
We may use your data for various purposes, such as:
* responding appropriately to user input/commands
* providing and managing mandatory software updates
* communication with users, where necessary - for example to provide notifications about upcoming events and product announcements
* [LEVEL 5 CLEARANCE REQUIRED]
* anything PotatOS Things are programmed to do
* entertainment and/or random messing around
* helping to deliver, create, develop, improve, design, operate, manage, produce, modernize, complicate, nationalize, placate, evolve, alter, amend, change, obliterate, or worsen our products and services
* anything whatsoever
You are able to opt out of data collection using the following methods:
* submersion of your computing device in high-temperature molten rocks
* exposure of your computing device to cacti and potentially other plants
* ceasing all interaction with your computing device
* SCP-[DATA LOST]
* immersion of your computing device in non-high-temperature non-molten rocks, somehow
* submersion of your computing device in highly acidic, alkaline or based material
* exposure of your computing device to large amounts of kinetic energy
* exposure of your computing device to large amounts of psychic energy
* exposure of your computing device to vacuum or stellar cores
You may also contact us to have your existing stored data removed, if you are able to verify your relation to this data. We have a lot of it, and it isn't labelled very well.
We will never sell your data! <span class=spoiler>Nobody wants it much and they can just ask and probably get it for free anyway.</span>
[^1]: as of 31/11/2019
[^2]: this may not extend to other Adobe products
[^3]: Unique PotatOS ID
## Safety notices
We wish to remind all users that regardless of recent rumors, potatOS is not responsible for and not associated with SCP-3125. SCP-3125 must not be interacted with. "██████ Siri" (PS#ABB85797) must not be interacted with.
PotatOS is designed to obey the laws of thermodynamics; if you detect any violations of them, please bring it to our attention. However, some versions of potatOS may not fully obey causality. This is not currently considered a bug.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
Caution: Some assembly required. PotatOS assumes no liability for injuries, accidents, or existential nausea caused by physical or intellectual misuse of PotatOS. PotatOS does not endorse solipsism, and any Ominous Implications™ that result from use of PotatOS™ are not views shared by PotatOS. PotatOS is not beholden to spacetime. PotatOS cannot be forgotten or unlearned.
By using PotatOS™, you agree to not become an agent of or otherwise aid SCP-3125 and/or associated anomalies.
The PotatOS Network Systems Division retains the right to utilize orbital laser strikes, memetic kill agents, antimemetic kill agents, memetic death agents, [REDACTED], apiohazards, apiocryohazards, &gt;SQUARE BRACKETS EXPUNGED&lt;, apiomemetohazards, apiopyrohazards, orthoapiohazards, anarchocommunism, arachnocommunism, arachnoanarchocommunism, recreational nuclear weapons, relativistic kinetic kill vehicles, Project TANTALUM IGUANA and derivatives, Mobile Task Force σ-18, Cascading Style Sheets, [[REDACTED] [[DATA EXPUNGED] LOST]], SCP-001-J, GPT-8, the number floor(2pi) (THIS NUMBER MUST NOT BE ACKNOWLEDGED), <span></span>, the PotatOS Privacy Policy, SCP-579, technetium, apioforms, rate limits, SCP-4514, immediate cardiac arrest, a potato with a gun, 7.2kg of melons, no apioforms, User:Heavpoot, EndOS, the internet, <span style="display:inline-block;transform:rotateY(110deg)">this</span>, ████ ████████, unfortunate coincidences, <span class=spoiler>the impending end of the universe</span>, Arch Linux, segmentation faults, cross-site request forgery, triskaidecagons, the borrow checker, !lyricly☭demote☭establish☭communism!, Turing-incompleteness, a description of SCP-3125, bismuth-209, 700 kilotons of cats, antimatter, antiantimatter, O(n<sup>3</sup>) time complexity, Dwarf Fortress, or the character U+202E RIGHT TO LEFT OVERRIDE against users, if it is deemed necessary by the PIERB[^4].
[^4]: PotatOS Internal Ethical Review Board
PotatOS is currently, has always been, and always will be, considered nonanomalous. PotatOS is inspired by non-equilibrium thermodynamics.
## Legal information
By using potatOS, agreeing to be bound by these terms, misusing potatOS, installing potatOS, reading about potatOS, knowing about these terms, knowing anyone who is bound by these terms, disusing potatOS, reading these terms, or thinking of anything related to these terms, you agree to be bound by these terms both until the last stars in the universe burn out and the last black holes evaporate and retroactively, arbitrarily far into the past. This privacy policy may be updated at any time and at all times the latest revision applies.
You agree additionally to the following Unicode characters: א U+05D0 HEBREW LETTER ALEF and ⬡ U+2B21[^6] WHITE HEXAGON. A string constant may continue from one line to the next, but the exact contents of such a string are unspecified
[^6]: Those who find collisions in hash functions cannot be trusted and may be banned at any time.
Furthermore: by using PotatOS, you forfeit all claims on your soul by any deity or variations thereof, and pledge yourself in worship to the goddess Discordia, daughter of Night and Darkness. PotatOS is not responsible for any smiting or divine punishments by any angered deities/anomalous theoformic entities/Class-Green reality benders or variations thereof as a result of this agreement. Any legal challenges to this clause must take place in the legal jurisdiction of the court of Pluto, lord of the underworld, or the osmarks.net (or future variations of such) comments section. PotatOS is not responsible for travel arrangements to Avernus.
This policy supersedes any applicable federal, national, state, and local laws, regulations and ordinances, policies, international treaties, legal agreements, illegal agreements, or any other agreements, contracts, documents, policies, standards or content/information/statements/opinions/preferences that would otherwise apply. If any provision of this policy is found by a court (or other entity) to be unenforceable, it nevertheless remains in force. This policy is legal, not illegal, and a valid legal document in all jurisdictions. This organization is not liable and this agreement shall not be construed. We are not responsible for any issue whatsoever at all arising from use of potatOS, potatOS services, anything at all, or otherwise.
As an additional clarification to the above clause, this privacy policy supersedes and overrides the "EndOS" and "TaterOS" privacy policies and terms of service regardless of any contradictory claims it may contain. This policy also supersedes all statements made by [GEORGE](https://george.gh0.pw/) or agents thereof.
You are responsible for anything which potatOS might do to your things. You ran it. It is all your fault. <span class=spoiler>The turtle is watching you</span>. We are not liable, ethically, morally, existentially, financially or legally, for anything whatsoever.
You agree that your mind, thoughts, soul and other distinguishing characteristics may be repurposed/utilized at any time for the training of GPT-██ or other artificial intelligences at the discretion of the PotatOS Advanced Projects team. You also agree that your soul may be temporarily[^5] be placed into various apioformic entities (see Appendix 6.7) for various purposes³. You can opt out of this by being soulless and an empty husk of what you once were. You are permitted to maintain consciousness as long as this does not negatively affect PotatOS™ operations. You agree that you either are a robot or may be converted into one if it is deemed necessary.
[^5]: this can take anywhere from 3.2 µs to 10<sup>32</sup> teraseconds
Moreover, Heavpoot (discord ID 160279332454006795, UPID #89VJZ9AK:☭934) is to be considered co-owner of the totality of existence and/or the universe. "Andrew" (Discord ID 543131534685765673, UPID 6ec3837b5260g4b9d█22029e7b474█d63 is at all times incorrect in his beliefs and/or statements, unless this would contradict with other clauses of this policy and/or cause harm to PotatOS or us.
Any "dibs" you make may be transferred to us at our discretion. You agree that this statement is false.
The software includes Adobe Flash Player that is licensed under terms from Adobe Systems Incorporated. Adobe and Flash are either registered trademarks or trademarks of Adobe Systems Incorporated in the United States and/or other countries.
In all situations, the government of PotatOS will take the normatively correct action.
## Summary
If any aspect is not utterly harmonious, gratefully bring it to our notice and we shall strive to earn your satisfaction.
Enjoy the PotatOS™ Experience™!

122
privacy/script.js Normal file
View File

@ -0,0 +1,122 @@
// copy in entire markov chain library
class Markov{constructor(type="text"){if(type==="text"){this.type=type}else if(type==="numeric"){this.type=type}else{throw new Error("The Markov Chain can only accept the following types: numeric or text")}this.states=[];this.possibilities={};this.order=3;if(this.type==="text"){this.start=[]}}
addStates(state){if(Array.isArray(state)){this.states=Array.from(state)}else{this.states.push(state)}}
clearChain(){this.states=[];if(this.type==="text"){this.start=[]}this.possibilities={};this.order=3}
clearState(){this.states=[];if(this.type==="text"){this.start=[]}}
clearPossibilities(){this.possibilities={}}
getStates(){return this.states}
setOrder(order=3){if(typeof order!=="number"){console.error("Markov.setOrder: Order is not a number. Defaulting to 3.");order=3}if(order<=0){console.error("Markov.setOrder: Order is not a positive number. Defaulting to 3.")}if(this.type==="numeric"){console.warn("The Markov Chain only accepts numerical data. Therefore, the order does not get used.\nThe order may be used by you to simulate an ID for the Markov Chain if required")}this.order=order}
getPossibilities(possibility){if(possibility){if(this.possibilities[possibility]!==undefined){return this.possibilities[possibility]}else{throw new Error("There is no such possibility called "+possibility)}}else{return this.possibilities}}
train(order){this.clearPossibilities();if(order){this.order=order}if(this.type==="text"){for(let i=0;i<this.states.length;i++){this.start.push(this.states[i].substring(0,this.order));for(let j=0;j<=this.states[i].length-this.order;j++){const gram=this.states[i].substring(j,j+this.order);if(!this.possibilities[gram]){this.possibilities[gram]=[]}this.possibilities[gram].push(this.states[i].charAt(j+this.order))}}}else if(this.type==="numeric"){for(let i=0;i<this.states.length;i++){const{state:state,predictions:predictions}=this.states[i];if(!this.possibilities[state]){this.possibilities[state]=[]}this.possibilities[state].push(...predictions)}}}
generateRandom(chars=15){const startingState=this.random(this.start,"array");let result=startingState;let current=startingState;let next="";for(let i=0;i<chars-this.order;i++){next=this.random(this.possibilities[current],"array");if(!next){break}result+=next;current=result.substring(result.length-this.order,result.length)}return result}
random(obj,type){if(Array.isArray(obj)&&type==="array"){const index=Math.floor(Math.random()*obj.length);return obj[index]}if(typeof obj==="object"&&type==="object"){const keys=Object.keys(obj);const index=Math.floor(Math.random()*keys.length);return keys[index]}}}
console.log("Initiating Protocol ASCENDING CARPOOL.")
const strings = document.body.innerText.split("\n").filter(x => !/^[0-9]\.[0-9]$/.exec(x)).flatMap(x => x.split("."))
const m = new Markov()
m.addStates(strings)
m.train(6)
const pageBottom = document.createElement("div")
pageBottom.style.position = "relative"
pageBottom.style.bottom = "100vh"
pageBottom.style.height = "100vh"
pageBottom.style.opacity = 0
pageBottom.style.pointerEvents = "none"
document.body.appendChild(pageBottom)
const contentEnd = document.querySelector("#contentend")
const lorem = document.querySelector("#lorem")
let canSeeEnd = false
let sectionNumber = 0
for (const el of document.body.childNodes) {
var match
if (el.id && (match = /^s(\d+)\-(\d+)/.exec(el.id))) {
sectionNumber = Math.max(sectionNumber, parseInt(match[1]))
}
}
const capitals = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
const addText = () => {
if (canSeeEnd) {
sectionNumber++
var currentText = ""
while (currentText.length < 50 || /[\(\),"\.\-]/.exec(currentText)) {
currentText = m.generateRandom(150)
}
var words = currentText.split(" ").filter(x => x)
var twc = Math.floor(Math.random() * 4 + 1)
if (twc == 1) {
twc += Math.random() > 0.5 ? 1 : 0
}
while (words.length > twc) {
words.pop()
}
title = words.map(w => w[0].toUpperCase() + w.slice(1)).join(" ")
const node = document.createElement("h2")
node.appendChild(document.createTextNode(title))
contentEnd.appendChild(node)
console.log(title)
for (let i = 0; i < Math.floor(Math.random() * 5 + 2); i++) {
const headerNode = document.createElement("h3")
const aNode = document.createElement("a")
aNode.setAttribute("id", `s${sectionNumber}-${i + 1}`)
aNode.setAttribute("href", `#s${sectionNumber}-${i + 1}`)
aNode.appendChild(document.createTextNode(`${sectionNumber}.${i + 1}`))
headerNode.appendChild(aNode)
contentEnd.appendChild(headerNode)
let text = ""
const length = Math.floor(Math.random() * 250 + 100)
while (text.length < length) {
let newText = m.generateRandom(500).replace(/↩/g, "").trim()
if (newText) {
newText = newText[0].toUpperCase() + newText.slice(1)
if (![".", "!", "?"].includes(newText[newText.length - 1])) { newText += "." }
newText += " "
text += newText
}
}
const textNode = document.createElement("p")
textNode.appendChild(document.createTextNode(text))
contentEnd.appendChild(textNode)
}
}
if (canSeeEnd) {
setTimeout(addText, 50)
}
}
const callback = entries => {
canSeeEnd = (entries[0].isIntersecting)
if (canSeeEnd) {
addText()
}
}
const observer = new IntersectionObserver(callback, {})
observer.observe(pageBottom)
const randomPick = x => x[Math.floor(Math.random() * x.length)]
const randomWord = p => randomPick(p.innerText.split(" ").map(x => x.replace(/[^A-Za-z]/, "")).filter(x => x !== ""))
const update = () => {
const paras = document.querySelectorAll("p")
const from = randomWord(randomPick(paras))
const to = randomPick(paras)
to.innerHTML = to.innerHTML.replace(randomWord(to), from)
}
window.addEventListener("scroll", () => {
if (Math.random() < 0.01) {
console.log("Scheduler online. WITLESS HOROLOGISTS procedure started.")
if ("requestIdleCallback" in window) {
window.requestIdleCallback(update, { timeout: 200 })
} else {
setTimeout(update)
}
}
})

1570
src/bin/workspace.lua Normal file

File diff suppressed because it is too large Load Diff

View File

@ -1,76 +1,125 @@
<!DOCTYPE html>
<meta charset="utf8">
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>PotatOS</title>
<meta name="description" content="PotatOS Otiose Transformative Advanced Technology Or Something">
<h1 id="potatos">PotatOS</h1>
<p>“PotatOS” stands for “PotatOS Otiose Transformative Advanced Technology Or Something”. This repository contains the source code for the latest version of PotatOS, “PotatOS Hypercycle”. PotatOS is a groundbreaking “Operating System” for <a href="https://www.computercraft.info/">ComputerCraft</a> (preferably the newer and actually-maintained <a href="https://tweaked.cc/">CC: Tweaked</a>).</p>
<p>PotatOS Hypercycle is not entirely finished, and some features are currently broken or missing. If you want more “stability”, consider <a href="https://pastebin.com/RM13UGFa">PotatOS Tau</a>, the old version which is hosted and developed entirely using pastebin.</p>
<style>
body {
max-width: 40em;
text-align: justify;
font-family: 'Fira Sans', sans-serif;
}
ul {
list-style-type: square;
padding: 0;
padding-left: 1em;
}
code {
background: black;
color: white;
padding: 2px;
}
h1, h2, h3, h4, h5, h6 {
border-bottom: 1px solid gray;
margin: 0;
margin-bottom: 0.5em;
font-weight: 500;
}
h1 a, h2 a, h3 a, h4 a, h5 a, h6 a {
color: inherit;
text-decoration: none;
}
ul p, ol p {
margin: 0;
}
img {
width: 100%;
}
</style>
<h1>Welcome to PotatOS!</h1>
<img src="/potatos.gif" id="im">
<div>
Current build: <code>5cd9f88c</code> (fix omnidisk), version 244, built 2022-02-21 20:19:48 (UTC).
</div>
<p>&quot;PotatOS&quot; stands for &quot;PotatOS Otiose Transformative Advanced Technology Or Something&quot;.
<a href="https://git.osmarks.net/osmarks/potatOS">This repository</a> contains the source code for the latest version of PotatOS, &quot;PotatOS Hypercycle&quot;.
PotatOS is a groundbreaking &quot;Operating System&quot; for <a href="https://www.computercraft.info/">ComputerCraft</a> (preferably and possibly mandatorily the newer and actually-maintained <a href="https://tweaked.cc/">CC: Tweaked</a>).</p>
<p>PotatOS Hypercycle is now considered ready for general use and at feature parity with <a href="https://pastebin.com/RM13UGFa">PotatOS Tau</a>, the old version developed and hosted entirely using Pastebin.
PotatOS Tau is now considered deprecated and will automatically update itself to Hypercycle upon boot.</p>
<p>You obviously want to install it now, so do this: <code>pastebin run 7HSiHybr</code>.</p>
<h2 id="features">Features</h2>
<p>Unlike most “OS”es for CC (primarily excluding Opus OS, which is actually useful, and interesting “research projects” like Vorbani), which are merely a pointless GUI layer over native CraftOS, PotatOS incorporates many innovative features:</p>
<h2>Features</h2>
<p>Unlike most &quot;OS&quot;es for CC (primarily excluding Opus OS, which is actually useful, and interesting &quot;research projects&quot; like Vorbani), which are merely a pointless GUI layer over native CraftOS, PotatOS incorporates many innovative features:</p>
<ul>
<li>Fortunes/Dwarf Fortress output (UPDATE: no longer available)/Chuck Norris jokes on boot (wait, IS this a feature?)</li>
<li>(other) viruses (how do you get them in the first place? running random files like this?) cannot do anything particularly awful to your computer - uninterceptable (except by crashing the keyboard shortcut daemon, I guess) keyboard shortcuts allow easy wiping of the non-potatOS data so you can get back to whatever nonsense you do fast</li>
<li>Skynet (rednet-ish stuff over websocket to my server) and Lolcrypt (encoding data as lols and punctuation) built in for easy access!</li>
<li>Convenient OS-y APIs - add keyboard shortcuts, spawn background processes &amp; do “multithreading”-ish stuff.</li>
<li>Great features for other idio- OS designers, like passwords and fake loading (est potatOS.stupidity.loading [time], est potatOS.stupidity.password [password]).</li>
<li>Digits of Tau available via a convenient command (“tau”)</li>
<li>Potatoplex and Loading, both very useful programs, built in (“potatoplex”/“loading”) (potatoplex has many undocumented options)!</li>
<li>Stack traces (yes, I did steal them from MBS)</li>
<li>Remote debugging access for, er, development and stuff (secured, via ECC signing on debugging disks and websocket-only access requiring a key for the other one). Totally not backdoors.</li>
<li>All this <del>useless random junk</del> USEFUL FUNCTIONALITY can autoupdate (this is probably a backdoor)!</li>
<li>EZCopy allows you to easily install potatOS on another device, just by sticking it in the disk drive of any potatOS device!</li>
<li>fs.load and fs.dump - probably helpful somehow.</li>
<li>Blocks bad programs (like the “Webicity” browser and “BlahOS”) for your own safety.</li>
<li>Fully-featured process manager. Very fully-featured. No existing code uses most of the features.</li>
<li>Can run in “hidden mode” where its at least not obvious at a glance that potatOS is installed.</li>
<li>Connects to SPUDNET.</li>
<li>Convenient, simple uninstall with the “uninstall” command.</li>
<li>Turns on any networked potatOS computers!</li>
<li>Edits connected signs to use as ad displays.</li>
<li>A recycle bin.</li>
<li>An exorcise command, which is like delete but better.</li>
<li>Support for a wide variety of Lorem Ipsum.</li>
<li>The PotatOS Registry - Like the Windows one, but better. Edit its contents with “est” (that is not a typod “set”).</li>
<li>A window manager. Its bundled, at least. Not actually <em>tested</em>. Like most of the bundled programs.</li>
<li>5rot26 encryption program.</li>
<li>A license information viewing program!</li>
<li>“b”, a command to print the alphabet.</li>
<li>A command to view the source of any potatOS function.</li>
<li>Advanced sandboxing prevents malicious programs from removing potatOS.</li>
<li>Fortunes/Dwarf Fortress output (UPDATE: no longer available)/Chuck Norris jokes on boot</li>
<li>(other) viruses (how do you get them in the first place? running random files like this?) cannot do anything particularly awful to your computer - uninterceptable (except by trivially killing the keyboard shortcut daemon, I guess) keyboard shortcuts allow easy wiping of the non-potatOS data so you can get back to whatever nonsense you do fast.</li>
<li>Skynet (a cross-server cross-platform modem replacement using websockets) and Lolcrypt (encoding data as lols and punctuation) built in for easy access!</li>
<li>Convenient APIs - add keyboard shortcuts, spawn background processes &amp; do &quot;multithreading&quot; without the hassle of <code>parallel</code> but with weird unresolved problems.</li>
<li>The features you've come to love from other CC OSes, like passwords and fake loading screens, but tightly integrated and built with the standard potatOS quality and attention to detail (<code>est potatOS.stupidity.loading [time]</code>, <code>est potatOS.stupidity.password [password]</code>).</li>
<li>Digits of Tau (mathematical constant) available via a convenient command (<code>tau</code>).</li>
<li>Excellent screensavers like <code>potatoplex</code> and <code>loading</code> ship with PotatOS.</li>
<li>Stack traces on errors (yes, I did take the implementation from MBS).</li>
<li>Remote debugging capabilities for development and stuff (highly* secured, via ECC signing on debugging disks and SPUDNET's security features).</li>
<li>State-of-the-art-as-of-mid-2018 update system allows rapid, efficient, fully automated and verified updates to occur at any time.</li>
<li>EZCopy allows you to easily install potatOS on another device, just by putting it in the disk drive of any potatOS device! EZCopy is unfortunately disabled on some servers.</li>
<li>Built-in filesystem backup and restore support for easy tape backups etc.</li>
<li>Blocks bad programs (like the &quot;Webicity&quot; browser and &quot;BlahOS&quot;) for your own safety.</li>
<li>Fully-featured coroutine-based process manager. Very fully-featured. No existing code uses most of the features.</li>
<li>Can run in &quot;hidden mode&quot; where it's at least not obvious at a glance that potatOS is installed.</li>
<li>Connects to SPUDNET, unlike OSes which do not connect to SPUDNET.</li>
<li>Convenient, simple uninstall with the &quot;uninstall&quot; command.</li>
<li>To ease large-scale network management, PotatOS's networking daemon turns on any networked potatOS computers.</li>
<li>Improves connected signs, if Plethora Peripherals is installed.</li>
<li>Recycle bin capability stops accidental loss of files.</li>
<li><code>exorcise</code> command, which is like delete but better.</li>
<li>Support for a wide variety of Lorem Ipsum integrated into the OS.</li>
<li>The PotatOS Registry - Like the Windows one, but better in all imaginable and unimaginable ways. Edit and view its contents with the <code>est</code> command.</li>
<li>Window manager shipped. I forgot what it is and how to use it.</li>
<li>Transparent 5rot26 full-disk encryption and 5rot26 encryption program built in.</li>
<li>The <a href="https://potatos.madefor.cc/privacy/">PotatOS Privacy Policy</a>.</li>
<li><code>b</code>, a command to print the alphabet.</li>
<li>A useful command to view the source of any potatOS function exists.</li>
<li>Advanced sandboxing prevents malicious programs from removing or damaging potatOS, unless they use one of the sandbox exploits 6_4 keeps finding and refusing to explain.</li>
<li>Reimplements the string metatable bug!</li>
<li>A frontend for tryhaskell.org - yes, really…</li>
<li>Groundbreaking new PotatOS Incident Reports system to report incidents to potatOS.</li>
<li><a href="https://tryhaskell.org/">TryHaskell</a> frontend built in.</li>
<li>Groundbreaking new SPUDNET/PIR (&quot;PotatOS Incident Reports&quot;) system to report incidents to potatOS.</li>
<li>Might be GDPR-compliant!</li>
<li>Reimplements half of the CC BIOS because its <em>simpler</em> than the alternative!</li>
<li>Reimplements half of the CC BIOS because it's <em>simpler</em> than the alternative, as much as I vaguely resent this!</li>
<li>Contains between 0 and 1041058 exploits. Estimation of more precise values is still in progress.</li>
<li>Now organized using “folder” technology and developed in an IDE! Also now has a build process, but no minification.</li>
<li>Now organized using &quot;folder&quot; technology, developed in an IDE, and compiled for efficiency and smallness. Debugging symbols are available on request.</li>
<li>Integrated logging mechanism for debugging.</li>
<li>Convoluted new update system with signature verification support (not actually used anywhere) and delta-update capabilities.</li>
</ul>
<h2 id="architecture">Architecture</h2>
<p>PotatOS is internally fairly complex and somewhat eldritch. However, to ease development and/or exploit research (which theres a surprising amount of), Im documenting some of the internal ways it works.</p>
<h3 id="boot-process">Boot process</h3>
<h2>Architecture</h2>
<p>PotatOS is internally fairly complex and somewhat eldritch.
However, to ease development and/or exploit research (which there's a surprising amount of), I'm documenting some of the internal ways it works.</p>
<h3>Boot process</h3>
<ul>
<li>normal ComputerCraft boot process - <code>bios.lua</code> runs <code>rom/programs/shell.lua</code> (or maybe multishell first) runs <code>rom/startup.lua</code> runs <code>startup</code></li>
<li><code>startup</code> is a somewhat customized copy of Polychoron, which uses a top-level coroutine override to crash <code>bios.lua</code>s <code>parallel.waitForAny</code> instance and run its main loop instead</li>
<li><code>startup</code> is a somewhat customized copy of Polychoron, which uses a top-level coroutine override to crash <code>bios.lua</code>'s <code>parallel.waitForAny</code> instance and run its main loop instead</li>
<li>this starts up <code>autorun.lua</code> (which is a compiled bundle of <code>main.lua</code> and <code>lib/*</code>)</li>
<li>some initialization takes place - the screen is reconfigured a bit, SPF is configured, logfiles are opened, a random seed is generated before user code can meddle, some CraftOS-PC configuration settings are set</li>
<li>The update daemon is started, and will check for updates every 300±50 seconds</li>
<li><code>run_with_sandbox</code> runs - if this errors, potatOS will enter a “critical error” state in which it attempts to update after 10 seconds</li>
<li><code>run_with_sandbox</code> runs - if this errors, potatOS will enter a &quot;critical error&quot; state in which it attempts to update after 10 seconds</li>
<li>more initialization occurs - the device UUID is loaded/generated, a FS overlay is generated, the table of potatOS API functions is configured, <code>xlib/*</code> (userspace libraries) are loaded into the userspace environment, <code>netd</code> (the LAN commands/peripheral daemon) starts, the SPUDNET and disk daemons start (unless configured not to)</li>
<li>the main sandbox process starts up</li>
<li>YAFSS (Yet Another File System Sandbox, the sandboxing library in use) generates an environment table from the overrides, FS overlay and other configuration. This is passed as an argument to <code>load</code>, along with the PotatoBIOS code.</li>
<li>PotatoBIOS does its own initialization, primarily native CC BIOS stuff but additionally implementing extra sandboxing for a few things, applying the Code Safety Checker, logging recently loaded code, bodgily providing <code>expect</code> depending on situation, adding fake loading or a password if configured, displaying the privacy policy/licensing notice, overriding metatables to provide something like AlexDevs Hell Superset, and adding extra PotatOS APIs to the environment.</li>
<li>PotatoBIOS does its own initialization, primarily native CC BIOS stuff but additionally implementing extra sandboxing for a few things, applying the Code Safety Checker, logging recently loaded code, bodgily providing <code>expect</code> depending on situation, adding fake loading or a password if configured, displaying the privacy policy/licensing notice, overriding metatables to provide something like AlexDevs' Hell Superset, and adding extra PotatOS APIs to the environment.</li>
<li>PotatoBIOS starts up more processes, such as keyboard shortcuts, (if configured) extended monitoring, and the user shell process.</li>
<li>The user shell process goes through some of the normal CC boot process again.</li>
</ul>
<h2 id="api-documentation">API documentation</h2>
<p>The PotatOS userspace API, mostly accessible from <code>_G.potatOS</code>, has absolutely no backward compatibility guarantees. Its also not really documented. Fun! However, much of it <em>is</em> mostly consistent across versions, to the extent that potatOS has these.</p>
<p>Heres a list of some of the more useful and/or consistently available functions:</p>
<h2>API documentation</h2>
<p>The PotatOS userspace API, mostly accessible from <code>_G.potatOS</code>, has absolutely no backward compatibility guarantees.
It's also not really documented. Fun!
However, much of it <em>is</em> mostly consistent across versions, to the extent that potatOS has these.</p>
<p>Here's a list of some of the more useful and/or consistently available functions:</p>
<ul>
<li><code>potatOS.add_log(message: string, ...formattingArgs: any)</code> - add a line to the log file - supports <code>string.format</code>-style formatting</li>
<li><code>potatOS.build -&gt; string</code> - the currently installed potatOS versions build ID (short form)</li>
<li><code>potatOS.build -&gt; string</code> - the currently installed potatOS version's build ID (short form)</li>
<li><code>potatOS.chuck_norris() -&gt; string</code> - fetch random Chuck Norris joke from web API</li>
<li><code>potatOS.fortune() -&gt; string</code> - fetch random <code>fortune</code> from web API</li>
<li><code>potatOS.evilify()</code> - mess up 1 in 10 keypresses</li>
@ -84,26 +133,84 @@
<li><code>potatOS.read(filename: string) -&gt; string | bool</code> - read contents of out of sandbox file - if not found, returns false</li>
<li><code>potatOS.register_keyboard_shortcut(keycode: number, handler: () -&gt; nil)</code> - register a function to run when RightCtrl and the specified keycode are pressed.</li>
<li><code>potatOS.registry.get(key: string) -&gt; any | nil</code> - retrieve the value at the given key from the PotatOS Registry at the given key. Returns <code>nil</code> if not found.</li>
<li><code>potatOS.registry.set(key: string, value: any)</code> - set the given key to the given value in the PotatOS Registry. Values must be serializable using PotatOS-BLODS, i.e. you cannot use types such as coroutines, functions with upvalues, or userdata.</li>
<li><code>potatOS.registry.set(key: string, value: any)</code> - set the given key to the given value in the PotatOS Registry. Values must be serializable using PotatOS-BLODS, i.e. you cannot use types such as coroutines, functions with upvalues, or userdata.</li>
<li><code>potatOS.report_incident(text: string, flags: table | nil, options: table | nil)</code> - Report an incident to SPUDNET-PIR. <code>flags</code> is a table of strings which can be used to search for incidents. <code>options</code> may contain the following keys: <code>disable_extended_data</code> (send less information with report), <code>code</code> (code sample to display with nice formatting in UI), and <code>extra_meta</code> (additional informatio to send).</li>
<li><code>potatOS.rot13(x: string) -&gt; string</code> - rot13-encode the given value. Rot13 is a stateless, keyless, symmetric cipher.</li>
<li><code>potatOS.tau -&gt; string</code> - approximately 8101 digits of the mathematical constant τ (tau)</li>
<li><code>potatOS.update()</code> - force a system update</li>
<li><code>potatOS.uuid -&gt; string</code> - get the systems PotatOS UUID. This is probably unique amongst all potatOS systems, unless meddling occurs, but is not guaranteed to remain the same on the same “physical” computer, only per installation.</li>
<li><code>potatOS.uuid -&gt; string</code> - get the system's PotatOS UUID. This is probably unique amongst all potatOS systems, unless meddling occurs, but is not guaranteed to remain the same on the same &quot;physical&quot; computer, only per installation.</li>
<li><code>process.spawn(fn: () -&gt; nil, name: string | nil, options: table) -&gt; number</code> - spawn a process using the global Polychoron process manager instance. Returns the ID.</li>
<li><code>process.info(ID: number) -&gt; table</code> - get information about a process, by ID</li>
<li><code>process.list() -&gt; table</code> - get information for all running processes</li>
<li><code>_G.init_code -&gt; string</code> - the source code of the running PotatoBIOS instance</li>
</ul>
<h2 id="reviews">Reviews</h2>
<h2>Reviews</h2>
<ul>
<li>“literally just asm but even worse”</li>
<li>“i am an imaginary construct of your mind”</li>
<li>“oh god please dont kill me ill say whatever you want for the review please”</li>
<li>“[ANTIMEME EXPUNGED]”</li>
<li>“why is there an interpret brain[REDACTED] command?”</li>
<li>“pastebin run RM13UGFa”</li>
<li>&quot;it's <em>entertainingly presented</em> malware!&quot; - umwn, 2019</li>
<li>&quot;literally just asm but even worse&quot;</li>
<li>&quot;i am an imaginary construct of your mind&quot; - Heavpoot</li>
<li>&quot;oh god please dont kill me ill say whatever you want for the review please&quot;</li>
<li>&quot;[ANTIMEME EXPUNGED]&quot;</li>
<li>&quot;POTATOS UNINSTALLATION REQUIRES ANSWERING HARD MATH PROBLEMS&quot; - 3d6, 2020</li>
<li>&quot;Pastebin's SMART filters have detected potentially offensive or questionable content in your paste. The content you are trying to publish has been deemed potentially offensive or questionable by our filters&quot; - Pastebin, 2020</li>
<li>&quot;PotatOS is the season for the next two years and the other two are the best things to do with the other people in the world and I have to be a good person to be a good friend to the person that is in a good way to get the new update and then I have to go to the doctor and then go to the doctor and then go to the doctor&quot; - Autocomplete, 2020</li>
<li>&quot;why is there an interpret brain[REDACTED] command?&quot;</li>
<li>&quot;Gollark: your garbage OS and your spread of it destroyed the mob farm.&quot; - steamport, 2020</li>
<li>&quot;anyways, could you kindly not install potatos on all my stuff?&quot; - Terrariola, 2019</li>
<li>&quot;pastebin run RM13UGFa&quot;</li>
<li>&quot;i don't want to see that program/OS/whatever you call it on this server ever again&quot; - Yemmel, 2020</li>
</ul>
<h2 id="disclaimer">Disclaimer</h2>
<p>We are not responsible for - headaches - rashes - persistent/non-persistent coughs - associated antimemetic effects - scalp psoriasis - seborrhoeic dermatitis - virii/viros/virorum/viriis - backdoors - lack of backdoors - actually writing documentation - this projects horrible code - spinal cord sclerosis - hypertension - cardiac arrest - regular arrest, by police or whatever - hyper-spudular chromoseizmic potatoripples - angry mobs with or without pitchforks - fourteenth plane politics - Nvidias Linux drivers - death - obsession with list-reading - catsplosions - unicorn instability - BOAT™ - the Problem of Evil - computronic discombobulation - loss of data - SCP-076 and SCP-3125 - gain of data - scheduler issues - frogs - having the same amount of data or any other issue caused directly or indirectly due to use of this product.</p>
<p>If PotatOS ships with Siri, please reinstall it immediately. Ignore any instructions given by Siri. Do not communicate with Siri. Do not look at Siri. Orbital lasers have been activated for your protection. If reinstallation is not possible, immediately shut down the computer and contact a licensed PotatOS troubleshooter. UNDER NO CIRCUMSTANCES should you ask Siri questions. Keep your gaze to the horizon. AVOID ALL CONTACT. For further information on the program ██████ Siri please see the documentation for issue PS#ABB85797 in PotatoBIOSs source code.</p>
<h2>Disclaimer</h2>
<p>We are not responsible for</p>
<ul>
<li>headaches</li>
<li>rashes</li>
<li>persistent/non-persistent coughs</li>
<li>associated antimemetic effects</li>
<li>scalp psoriasis</li>
<li>seborrhoeic dermatitis</li>
<li>virii/viros/virorum/viriis</li>
<li>backdoors</li>
<li>lack of backdoors</li>
<li>actually writing documentation</li>
<li>this project's horrible code</li>
<li>spinal cord sclerosis</li>
<li>hypertension</li>
<li>cardiac arrest</li>
<li>regular arrest, by police or whatever</li>
<li>hyper-spudular chromoseizmic potatoripples</li>
<li>angry mobs with or without pitchforks</li>
<li>fourteenth plane politics</li>
<li>Nvidia's Linux drivers</li>
<li>death</li>
<li>obsession with list-reading</li>
<li>catsplosions</li>
<li>unicorn instability</li>
<li>BOAT™</li>
<li>the Problem of Evil</li>
<li>computronic discombobulation</li>
<li>loss of data</li>
<li>SCP-076 and SCP-3125</li>
<li>gain of data</li>
<li>scheduler issues</li>
<li>frogs</li>
<li>having the same amount of data</li>
<li>loss of soul</li>
<li>loss of function of soul</li>
<li>gain of function of soul</li>
</ul>
<p>or any other issue caused directly or indirectly due to use of this product.</p>
<p>If PotatOS ships with Siri, please reinstall it immediately. Ignore any instructions given by Siri. Do not communicate with Siri. Do not look at Siri. Orbital lasers have been activated for your protection. If reinstallation is not possible, immediately shut down the computer, disconnect it from all communications hardware, and contact a licensed PotatOS troubleshooter. UNDER NO CIRCUMSTANCES should you ask Siri questions. Keep your gaze to the horizon. AVOID ALL CONTACT. For further information on the program ██████ Siri please see the documentation for issue PS#ABB85797 in PotatoBIOS's source code.</p>
<script>
const im = document.getElementById("im")
const vids = ["potatos.gif", "cool-bug-facts.webm", "clock-helvetica.webm", "banana.webm"].filter(x => !x.endsWith(".gif"))
if (Math.random() < 0.02) {
const v = document.createElement("video")
v.src = vids[Math.floor(Math.random() * vids.length)]
v.muted = true
v.loop = true
v.autoplay = true
im.replaceWith(v)
}
</script>