ROOTCASTLE / ENGINEERING LAB

Code runner

JavaScript and Python in the browser, with Sofia AI help.

LOCAL EXECUTION · CODE STAYS IN YOUR BROWSER · Pyodide 314.0.7 (WebAssembly) · Time limit 10 s

Tab inserts indentation; press Esc, then Tab to leave the editor. Ctrl+Enter runs the program.

Output (stdout / stderr)

The program has not been run yet.

Understand the error with Sofia AI

The code and the end of the output are sent to Sofia AI for an explanation and a fix suggestion. The code is not run on the server.

What it is for

To try a CRC table, a PID loop, sensor-data cleaning or a small spectrum calculation before moving to hardware. The examples share topics with the other LAB tools: compare the Modbus CRC-16 with the protocol inspector and the PID response with the sandbox. When a program fails, you can send the code and the end of its output to Sofia AI for an explanation and a fix suggestion.

Where the code runs

Only in your browser. JavaScript runs in a separate web worker with network and storage access removed; Python runs on Pyodide (CPython compiled to WebAssembly), downloaded at a pinned version from jsDelivr. The Rootcastle server never runs or stores the code. Your draft is kept only in this browser’s local storage. Sofia AI receives the first 6,000 characters of the code and the last 2,000 characters of the output, and only when you press the button and give consent.

Limitations

Each run is limited to 10 seconds and 100,000 characters of output; the worker is terminated when a limit is reached. Input is not interactive: input() and readline() read lines from the stdin box in order. Python has the standard library only (packages such as numpy are not loaded). Timing and floating-point results in a browser do not show a microcontroller’s real-time behaviour; verify embedded code on the target hardware.

References

Pyodide · Modbus over Serial Line Specification V1.02, §6.2.2 (CRC-16) · K. J. Åström, T. Hägglund, Advanced PID Control, ISA, 2006 · MDN: Web Workers API

An educational workspace. Sofia AI suggestions can be wrong; run and verify a change before you rely on it.

← Rootcastle LAB

Search commands or pages