changed 4 years ago
Published Linked with GitHub

TempleOS, the good parts

tags: sketchdance

From A Constructive Look at TempleOS

Further inspiration:

  • xv6

  • Plan 9

  • STEPS Towards the Reinvention of Programming

  • HolyC is both the system language and the shell script

  • No built-in calculator, just use shell

  • Use shell as REPL to build programs

  • Menu file in home directory, always accessible via Ctrl-M. Edit this file to create any kind of launcher

  • Most files auto-save on exit

  • System-wide autocomplete. Hit Ctrl-F1 to get a list of completable words including filenames, symbolnames, etc. All source code is indexed and you can jump to any function from anywhere, even in the shell

  • Unified hypertext everywhere, including shell. From command line Uf('foo') will disassemble a function and each symbol will be hyperlinked to source

  • Type() displays files like cat, respecting hypertext and displaying graphics

  • In shell, Dir gives directory listing, click on any folder to go to it

  • DolDoc is the the ubiquitous hypertext system. Ctrl-T gives raw text source. Can contain text, images, 3D meshes, macros (system commands that run on click). Similar to Oberon. This replaces HTML, JSON, XML, shell scripts, sourcefiles, text files

  • A hypertext link can be to a grep-search so results like a file listing always be up to date

  • Can embed images and flowcharts in source code. Flow chart boxes can also be hyperlinked.

  • Ctrl-R can be used at any point to bring up resource editor that lets you draw things. Sprites you draw are embedded directly in ddocument and can be referred to by numbered tags

  • HolyC has no main(). Anything at top-level scope is executed as it runs through compiler

  • Every piece of code (except kernel/compiler) is JIT-compiled on demand

  • Tag a function with #help-index and it will automatically appear in the docs

  • #exe compiler directive to shell out to external commands and include their output in source code while compiling

  • Full metadata and reflection support. Any class can be enumerated to get names, etc., but can also have arbitrary metadata attached

  • last class keyword as default argument. Provides name of previous argument's type as a string

  • No ahead-of-time linker or object files

  • Symbol table accessible at runtime

  • No environment variables, just use regular variables

  • No formal build system, just compile a file

  • Hit F5 in editor to JIT-compile and run

  • Call Dbg() or use Alt-Ctrl-D to get a debugger which still runs as a full REPL

  • One call to create a window context to draw into

  • No hardware support. VGA-only. No soundcard besides PC speakers. No networking.

  • No memory protection

  • No file permissions

  • No threads, just processes

Select a repo