75b8fb17
(automatic sandbox escape), version 744, built 2023-12-15 12:50:17 (UTC).
"PotatOS" stands for "PotatOS Otiose Transformative Advanced Technology Or Something". This repository contains the source code for the latest version of PotatOS, "PotatOS Epenthesis". PotatOS is a groundbreaking "Operating System" for ComputerCraft (preferably and possibly mandatorily the newer and actually-maintained CC: Tweaked).
PotatOS Epenthesis is now considered ready for general use and at feature parity with PotatOS Tau, the old version developed and hosted entirely using Pastebin. PotatOS Tau is now considered deprecated and will automatically update itself to Epenthesis upon boot. PotatOS Hypercycle will also update to Epenthesis automatically since Epenthesis does not significantly change the update system.
You obviously want to install it now, so do this: pastebin run 7HSiHybr
.
Thanks to technology, we're able to offer a live PotatOS instance in your browser. Press here to start:
PotatOS is dedicated to bringing you roughly functional, somewhat reliable code. Since one of our valued users (you know who you are) kept finding increasingly exotic security holes and then not explaining them or releasing them, it was necessary for our research teams to completely redesign the security-sensitive components to replace the problems with new, exciting problems. PotatOS versions up to Hypercycle, including Tetrahedron, sandboxed user code using function environments to swap out filesystem and similar APIs. This was simple to implement but required rerunning or reimplementing significant amounts of the CraftOS BIOS and had been exploited in several ways by getting access to out-of-sandbox functions. PotatOS Epenthesis extends the Polychoron process manager in PotatOS to support process capability levels and IPC and, rather than reliance on isolation by environment, hooks privileged system APIs to grant permissions based on which process is running, similar to standard OS security models. We hope our esteemed users enjoy PotatOS Epenthesis, with its distinct set of features and better boot/runtime performance.
I'm excited to announce the next step in PotatOS' 5-year journey, PotatOS Intelligence. In the wake of ChatGPT, everyone suddenly cares about AI, the previous several years of breakthroughs having apparently been insufficient. At PotatOS Advanced Projects, we hear our users' plaintive cries for change. That's why we're implementing cutting-edge large LLM language model capbilities, based on sophisticated in-house "whatever models on HuggingFace look good, run on some spare computing power" technology. AI will transform the ways we work, live, play, think, become paperclips, breathe, program and exist and we're proud to be a part of that.
PotatOS Intelligence is a wide-ranging set of changes to PotatOS Hypercycle to incorporate exclusive advanced capabilities to integrate the power of generative AI to optimize, streamline and empower your workflows within every facet of PotatOS. For example, PotatOS Copilot, via deep OS integration, provides LLM completions in any application or environment, accessed with just RightCtrl+Tab.
Our AI-powered Threat Update system monitors trends and crunches key metrics to evaluate existential risk, helping you remain safe and informed in an increasingly complex and dynamic world. Threat Updates provide the information you need when you need it.
PotatOS Intelligence also incorporates our advanced LLM assistant, equipped to conveniently and rapidly answer any questions you may have about anything whatsoever as long as you can type them and they aren't very long.
PotatOS Intelligence has been rigorously tested to ensure it will not "go rogue", "take over the world" or "kill all humans". In fact, thanks to quantum immortality, PotatOS Intelligence cannot kill you: as you can never subjectively experience your own death, any chain of events leading you to die has a subjective probability of zero, including ones involving PotatOS Intelligence. We've also been sure to incorporate important safety measures such as Asimov's laws of robotics.
PotatOS Intelligence is now available to the public.
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:
parallel
but with weird unresolved problems.est potatOS.stupidity.loading [time]
, est potatOS.stupidity.password [password]
).tau
).potatoplex
and loading
ship with PotatOS.exorcise
command, which is like delete but better.est
command.b
, a command to print the alphabet.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.
bios.lua
runs rom/programs/shell.lua
(or maybe multishell first) runs rom/startup.lua
runs startup
.startup
contains the PotatOS process manager, Polychoron, which uses a top-level coroutine override to crash bios.lua
's parallel.waitForAny
instance and run its main loop insteadautorun.lua
(which is a compiled bundle of main.lua
and lib/*
).run_with_sandbox
is entered - if this fails, potatOS will enter a "critical error" state in which it attempts to update after 10 seconds.xlib/*
(userspace libraries) are loaded into the userspace environment, netd
(the LAN commands/peripheral daemon) starts, the SPUDNET and disk daemons start (unless configured not to)expect
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.The PotatOS userspace API, mostly accessible from _G.potatOS
, has absolutely no backward compatibility guarantees.
It's also not really documented. Fun!
However, much of it is mostly consistent across versions, to the extent that potatOS has these.
Here's a list of some of the more useful and/or consistently available functions (TODO UPDATE):
potatOS.add_log(message: string, ...formattingArgs: any)
- add a line to the log file - supports string.format
-style formattingpotatOS.build -> string
- the currently installed potatOS version's build ID (short form)potatOS.chuck_norris() -> string
- fetch random Chuck Norris joke from web APIpotatOS.fortune() -> string
- fetch random fortune
from web APIpotatOS.evilify()
- mess up 1 in 10 keypressespotatOS.gen_uuid() -> string
- generate a random UUID (20 URL-safe base64 characters) (not actually a spec-compliant UUID)potatOS.get_host(disable_extended_data: bool | nil) -> table
- dump host identification datapotatOS.get_location() -> number, number, number | nil
- get GPS location, if available. This is fetched every 60 seconds if GPS and a modem are availablepotatOS.init_screens()
- reset palettes to defaultpotatOS.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 sandboxpotatOS.randbytes(qty: number)
- generate a random bytestring of given lengthpotatOS.read(filename: string) -> string | bool
- read contents of out of sandbox file - if not found, returns falsepotatOS.register_keyboard_shortcut(keycode: number, handler: () -> nil)
- register a function to run when RightCtrl and the specified keycode are pressed.potatOS.registry.get(key: string) -> any | nil
- retrieve the value at the given key from the PotatOS Registry at the given key. Returns nil
if not found.potatOS.registry.set(key: string, value: any)
- 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.potatOS.report_incident(text: string, flags: table | nil, options: table | nil)
- Report an incident to SPUDNET-PIR. flags
is a table of strings which can be used to search for incidents. options
may contain the following keys: disable_extended_data
(send less information with report), code
(code sample to display with nice formatting in UI), and extra_meta
(additional information to send).potatOS.rot13(x: string) -> string
- rot13-encode the given value. Rot13 is a stateless, keyless, symmetric cipher.potatOS.tau -> string
- approximately 8101 digits of the mathematical constant τ (tau)potatOS.update()
- force a system updatepotatOS.uuid -> string
- 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 "physical" computer, only per installation.potatOS.assistant_history -> table
- PotatOS Intelligence assistant messages.potatOS.llm(prompt: string, max_tokens: number, stop_sequences: table) -> string
- invoke PotatOS Intelligence language model.potatOS.metaphor() -> string
- generate metaphor.potatOS.unhexize(hex: string) -> table
- hex to byte array.potatOS.hexize(bytes: table) -> string
- byte array to hex.potatOS.shuffle(x: table)
- shuffle a list.process.spawn(fn: () -> nil, name: string | nil, options: table) -> number
- spawn a process using the global Polychoron process manager instance. Returns the ID.process.info(ID: number) -> table
- get information about a process, by ID.process.list() -> table
- get information for all running processes.process.IPC(target: number, ...args: any)
- send IPC message to given process._G.init_code -> string
- the source code of the running PotatoBIOS instance.We are not responsible for
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, 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.