pyComputer banner

pyComputer

8 devlogs
8h 18m 58s

Updated Project: I originally made this in a Python class the year before last, near the end of the class (Spring 2024).

Text-based computer (yeah it's technically not a OS nor a computer but more a kernel but with text based apps) oops. It's…

Updated Project: I originally made this in a Python class the year before last, near the end of the class (Spring 2024).

Text-based computer (yeah it’s technically not a OS nor a computer but more a kernel but with text based apps) oops. It’s a bit silly and very questionably coded haha but it really works well and is kinda adorable :D.

This project uses AI

None, duh
I used Stack Overflow and Reddit and the ancient art of Looking at Other People’s Code™

Demo Repository

Loading README...

NellowTCS

so um
i sat down thinking:

“hehe let me just add a little IDE :)”

and then
and THEN

I made… this

i think the terminal possessed me


THE IDE (aka: VSCode but it runs in a potato on a potato as a potato)

i have now built:

  • a toolbar
  • clickable buttons (??? in a terminal ??? me from a day ago didn’t even know you could do this)
  • tabs
  • syntax highlighting
  • a file tree with icons
  • a status bar
  • a help overlay
  • dialogs
  • a run panel
  • scroll logic
  • cursor logic
  • auto‑indent
  • triple‑quote string detection
  • a whole rendering engine
  • a whole input engine
  • a whole everything engine

THE FILE TREE

i made a file tree
a REAL file tree
with:

  • expand/collapse
  • icons
  • scrolling
  • depth indentation
  • selection highlighting
  • directory walking
  • ignoring __pycache__ like a civilized person

it is so cute
it is so powerful
it is so…
WHY DID I DO THIS

the editor

the editor now has:

  • line numbers
  • cursor line highlighting
  • syntax highlighting
  • auto‑indent
  • home/end logic
  • page up/down
  • horizontal scrolling
  • vertical scrolling
  • tab insertion
  • newline indentation
  • triple‑quote string parsing
  • number detection
  • keyword coloring
  • comment detection
  • a whole buffer model
  • a whole scroll model

uh yeah I don’t know why I decided to lock in so much for the IDE specifically but oh well might as well keep it /j

running your code (random guy: Blasphemy! I write my code WITHOUT running it like in the old days)

i said:

“hehe maybe i’ll add a run button :)”

and then i built:

  • a subprocess runner
  • a web‑safe exec sandbox
  • stdout/stderr capture
  • scrollback
  • color‑coded output
  • headers
  • separators
  • timeouts
  • error handling
  • environment isolation

this is not a run button
this is a terminal within a terminal within a terminal pretty much

I Am… Parity

pyodide said:

“you can’t run Python files safely”

and i said:

“watch me”

i built:

  • a stdout redirector
  • a stderr redirector
  • a fake cwd
  • a fake sys.path
  • a safe exec environment
  • a fallback for imports
  • a cleanup routine

i basically made a tiny python interpreter
inside a python interpreter
inside a browser
inside a terminal
inside my OS
inside my repo

ah my silly astounds even me sometimes

buttons

i made clickable toolbar buttons
in a TUI
in 2026
in the year of our lord ANSI /j

WHY

the question’s actually
WHY NOT

Input

i have now:

  • ctrl‑shortcuts
  • F1
  • tab focus cycling
  • alt‑tab
  • ctrl‑tab
  • shift‑tab
  • escape sequences
  • raw mode
  • web mode
  • native mode
  • keymaps
  • dialogs
  • help overlays

I think i’m ready to ship
(voices in the audience: YA THINK?!??!?!?!?!?!?)


Oh also, I added the web demo publishing thingy (sigh *GitHub Workflow to deploy the Demo)
here:
https://nellowtcs.me/pyComputer/

Attachment
Attachment
Attachment
Attachment
Attachment
Attachment
Attachment
0
NellowTCS

settings app

I said:

“haha settings app coming soon :)”

and then I blinked
and suddenly I had built:

  • a full configuration system
  • persistent JSON settings
  • a UI for editing literally everything
  • theme selection
  • username editing
  • password hashing
  • splash toggles
  • confirmation toggles
  • editor width
  • reset to defaults
  • table rendering
  • live theme switching
  • VFS integration
  • manifest updates
  • permissions
  • a whole UX flow

I implemented a full OS configuration layer because apparently that’s who I am now.

theme engine

I added:

  • retro green phosphor (the hacker aesthetic)
  • light mode (for the brave)
  • dark mode (for the sane)
  • mono (for the minimalists)
  • pastel (for the Tumblr‑coded)
  • default (for the normies)
  • custom palettes via tuiro (for the gods)

And then I made it all work:

  • in native Python
  • in the browser
  • through xterm.js
  • through CSS variables
  • through JS injection
  • through the renderer
  • through appstdlib
  • through kernel boot settings

auth cause why not

I added:

  • password hashing
  • username support
  • login prompts
  • kernel‑level auth gating
  • error messages
  • welcome messages

manifest validation

I implemented:

  • manifest validation
  • required fields
  • type checking
  • permission checking
  • entry file validation
  • error messages
  • install flow integration

Apps now have:

"name": "snake",
"version": "0.1.0",
"entry": "main.py",
"permissions": ["fs"],
"description": "A seemingly simple Snake game."

rm, cd, pyfetch, and the Shell Renaissance

I added:

  • rm with recursive mode
  • confirmation logic tied to settings
  • directory removal
  • error handling
  • cd cleanup
  • pyfetch as a built-in (neofetch clone)
  • help command updates
  • shell registry updates

The shell is now:
better

witchcraft

The browser now:

  • reads settings
  • applies themes
  • syncs with Python
  • updates xterm.js
  • updates CSS
  • updates buttons
  • doesn’t override user choice
  • exposes setWebTheme globally

what’s this? Your Kernel is evolving!

The kernel now:

  • loads settings
  • applies themes
  • handles authentication
  • respects splash toggles
  • boots with logs
  • launches shell as a process
  • integrates with scheduler
Attachment
Attachment
Attachment
Attachment
Attachment
Attachment
Attachment
Attachment
0
NellowTCS

so
i thought
“haha what if i just make a little web demo :)”
‘how bad can it be?’ famous last words

thus began
THE TWO+ HOUR DESCENT INTO MADNESS

the suffering

i have now experienced
firsthand
why people (maybe?? allegedly??)
hate pyodide

because pyodide debugging is like:

  • “why is this HTML file being imported as Python”
  • “why is sys.path like that”
  • “why is the browser pretending to be a filesystem”
  • “why is my kernel suddenly a <DOCTYPE html>
  • “why is everything a coroutine”
  • “why is nothing a coroutine”
  • “why does every error message point to wasm”
  • “why does every fix cause three new problems”
  • “why is the empty string in sys.path allowed to exist”
  • “why is the dev server serving my Python files as HTML”
  • “why is my OS bootloader being eaten by Vite”

i have seen things
i have SEEN THINGS
no sane developer should see

the breakthrough

and then
after hours of pain
after fighting the browser
after fighting pyodide
after fighting my own code
after fighting the concept of “paths” as a philosophical construct (my least favorite thing)

and then
in a burst of clarity
i built:

  • a bundler
  • a file walker
  • a JS -> Python FS injector
  • a virtual filesystem rebuilder
  • a path sanitizer
  • a web‑aware VFS
  • a terminal IO bridge
  • a bootloader rewrite
  • a shell wrapper
  • a whole demo environment

and suddenly
it worked
IT WORKED
THE WEB DEMO LIVES
THE OS BOOTS
THE SHELL RUNS
THE FILESYSTEM EXISTS

i have achieved
pyodide enlightenment

the result

after 2 hours of pure, unfiltered, uncut suffering
i now have:

  • a working web demo
  • a functioning OS in the browser!!!!!!!!!!!!!!
  • a bundled filesystem
  • a booting kernel
  • a running shell
  • and a newfound respect for anyone who has ever touched pyodide

also fun 3d logo :3

Changelog

edit: remove typo

Attachment
Attachment
Attachment
1

Comments

elioanon20
elioanon20 1 day ago

WOW

NellowTCS

so um
i sat down today thinking:

“i’ll just fix that one snake input bug :)”

and now we have:

  • OPFS
  • a theme engine
  • a widget system
  • async utilities
  • logging
  • text formatting tools
  • a matrix app
  • a fixed snake engine
  • a rewritten loader
  • a reorganized filesystem
  • and like 700 new lines of code

i think I ADHD’d (/j but maybe I have it who knows) too hard

OPFS (because why not add persistent storage at 4pm)

i added OPFS
like
actual persistent storage
with:

  • write
  • read
  • delete
  • mkdir
  • listdir
  • JSON helpers
  • a fallback for browsers
  • a whole .opfs directory

when a TUI framework has stuff most frameworks don’t smh

i added:

  • themes
  • colors
  • styles
  • presets
  • retro mode
  • widgets
  • buttons
  • listboxes
  • menus
  • dialogs
  • progress bars
  • input fields
  • text utilities
  • ANSI helpers
  • formatting tools
  • padding
  • wrapping
  • centering
  • stripping ANSI
  • highlighting

this is not a TUI

input system: Now handling chaos 200x faster!

i rewrote input.py
and now it has:

  • raw mode
  • keybindings
  • keymaps
  • history navigation
  • arrow keys
  • escape sequences
  • line editing
  • cursor movement
  • Windows fallback
  • a cleanup function
  • a whole vibe

snake no longer eats your shell input
snake is now polite
snake is now civilized
snake is now house‑trained

snake (the overengineered sequel)

i fixed the input bug
and then accidentally:

  • integrated the new input system
  • added centered overlays
  • added pad_center
  • added UI_Key support
  • cleaned up rendering
  • reorganized logic
  • made it smoother
  • made it faster
  • made it prettier

snake is now running on a custom game engine
inside a custom UI framework
inside a custom OS
inside python
inside your terminal

matrix app (because of course)

Red pill or blue pill?

Format

i formatted using Black Formatter (VSCode extension)

like a raccoon in a server room

the loader now:

  • injects src paths
  • resolves manifests
  • imports entrypoints
  • doesn’t explode (most of the time)

the kernel now:

  • launches shell as a process
  • handles shutdown
  • is slightly less confused

the VFS now:

  • resolves paths correctly
  • handles root
  • handles absolute paths
  • handles everything i throw at it

the scheduler now:

  • exists
  • chills

so

i think i might need to be stopped
or encouraged
i can’t tell which

pyComputer is now:

  • 40% OS
  • 40% TUI framework
  • 10% game engine
  • 10% “hehehehheheheheheheheheh”

and that’s probably better than most OS’s (ahem windows ahem) nowadays

0
NellowTCS

I implemented some more stuff

aforementioned stuff

  • a root filesystem
  • a usr/apps directory
  • a sys registry
  • app data folders
  • persistent history
  • a working cd command
  • a shell prompt that shows the cwd
  • apps that store files in their own directories
  • a VFS that actually respects the root
  • a registry that creates its own directory
  • and a notes app that is basically Notepad.exe but better and no AI (selling point :D)

why not FS

remember when the filesystem was “just stubs”
well
now there is:

root/
  apps/
    calculator/data/history.txt
    notes/data/*.txt
  sys/
    apps.json

like
a real directory tree
a real root
a real sys folder
a real apps folder
a real everything

the VFS now:

  • resolves paths
  • defaults to the root folder
  • creates directories
  • writes files
  • deletes files
  • moves files
  • checks existence
  • lists directories

cd

i added cd
and suddenly the shell has:

  • a working cwd
  • a dynamic prompt
  • directory validation
  • root fallback
  • actual navigation

the shell went from:

$ 

to:

[/] $ cd apps
[/apps] $ cd notes/data
[/apps/notes/data] $

it’s walking around (yes that was a filesystem pun >:3)

calculator

the calculator now:

  • stores history
  • loads history
  • writes history
  • has a data directory
  • uses math functions
  • has a menu
  • has options
  • has banners
  • has error handling
  • has safe eval

notes

  • stores each note as a separate file
  • sanitizes filenames
  • lists notes
  • views notes
  • edits notes
  • deletes notes
  • renames notes
  • shows tables
  • uses the renderer
  • uses the VFS
  • uses directories

registry

the registry:

  • has a real path
  • creates its own directory
  • loads apps
  • saves apps
  • persists apps
  • uses VFS
  • uses JSON
  • lives in /sys/apps.json

the loader

the loader now:

  • uses VFS
  • resolves paths
  • loads manifests from /usr/apps
  • imports entrypoints
  • handles sys.path
  • doesn’t explode

it’s basically a package manager’s cousin now

renderer upgrades

the renderer now has:

  • cursor movement
  • clear screen
  • clear line
  • hide/show cursor
  • bold/dim
  • colors (green, red, yellow, cyan, etc)
  • box drawing
  • box_at positioning
  • ANSI helpers
  • still uses tuiro
  • still adorable

this is no longer a renderer
this is a terminal UI toolkit hehehe

snake (i swear this was supposed to be simple)

so uhhh
i added snake

and by “added snake” i mean:

i wrote a full terminal game engine
with:

  • raw terminal mode
  • termios flag manipulation
  • a dedicated input thread
  • non‑blocking key polling
  • a tick‑based game loop
  • dynamic difficulty scaling
  • partial redraw optimization
  • overlay UI
  • pause menu
  • restart logic
  • centered modal boxes
  • ANSI cursor control
  • double‑buffer‑ish rendering
  • safe style fallbacks
  • custom coordinate transforms
  • a whole grid simulation
  • and a renderer that now behaves like a tiny ncurses clone

all of this
for a snake game
that originally printed:

snake game coming soon!

i did not “add snake”
i summoned a computational serpent ecosystem

the snake now has:

  • a head
  • a body
  • food
  • collision detection
  • speed levels
  • score
  • game over screen
  • pause screen
  • restart flow
  • a start prompt
  • a whole personality

and the funniest part?

the TODO list still says:

[ ] Snake game

because technically
i haven’t checked the box yet
since i’m still pretending this is “just the entrypoint”

this is the most overengineered “coming soon” screen in the history of computing
and i regret nothing

Attachment
Attachment
Attachment
Attachment
Attachment
Attachment
0
NellowTCS

so today i sat down thinking i’d chill and work on pyComputer a bit, nothing serious

and then suddenly pyComputer is over here like:

“hey so i have a renderer now
and a scheduler
and a process model
and a package manager
and networking
and a VFS that actually does things
and also i can clear the screen
and autocomplete commands
and run apps with banners
and show spinners
and print tables
and-”

again with the too much in one devlog
but i’m only doing like tiny changes in a lot of places, it’s not my fault i swear-

the renderer

i added tuiro
because it’s great

and now apps can have:

  • banners
  • sections
  • info boxes
  • success messages
  • error messages
  • spinners
  • steps
  • tables

realshell

the shell now has:

  • tab completion
  • readline integration
  • a clear command
  • better history
  • better behavior
  • better everything

it used to be a little guy
now it’s a little guy with features

the VFS? How about FS

remember how i said the filesystem was “just stubs”
haha
yeah
about that

i accidentally implemented:

  • path normalization
  • directory creation
  • file reading
  • file writing
  • listdir
  • exists
  • mkdir
  • remove
  • move

like
a whole VFS
a real one
not a pretend one

get scheduled

i also gave pyComputer:

  • a scheduler
  • a process model
  • coroutine‑based execution
  • state transitions
  • ready/waiting/terminated logic
  • async event loop integration

this is the part where i realized:

“oh god
i’m actually building an OS
not a toy
not a joke
a real OS
with processes
and scheduling
and i did this in like 5 minutes
why am i like this”

the package manager

i added:

  • install
  • remove
  • list
  • registry integration
  • VFS integration
  • directory copying
  • app discovery

this was supposed to be a silly extra
it’s not

the networking layer

i added:

  • GET
  • POST
  • JSON helpers
  • error handling
  • fallback behavior

i don’t even know why
i don’t have a use case yet
i just saw the file and went
“yeah sure why not”

Attachment
Attachment
Attachment
0
NellowTCS

so, me like 30 ish minutes ago:

“wow.
this thing is…
impressively unfinished.”

which is funny because
i already knew that
i made the stubs
i put the placeholders there
i wrote the comments that literally say “stub” in them

and yet I was shocked

Welp

so what did i do?
i did the normal, rational thing:

i implemented an entire OS worth of missing pieces
in twenty minutes
powered entirely by confusion and spite

apps?
added
manifests?
added
entrypoints?
added
dynamic loading?
added
shell commands?
added
filesystem skeleton?
added
settings app?

added for no reason except why not

the whole thing was basically:

  • “oh this is missing”
  • implements stub instantly
  • “oh that’s missing too”
  • implements stub instantly
  • “oh god there’s more”
  • implements everything instantly

all the stubs

apps

i had built an entire OS around the idea of apps
and then realized i had…
zero apps

so now pyComputer has:

  • calculator (actually works)
  • notes (actually writes files)
  • snake (spiritually important)
  • settings (kinda needed)

they all have manifests
they all have entrypoints
they all pretend to be real software
and somehow they run well

the loader: from decorative to functional

the loader used to be a prop
like a fake steering wheel in a kid’s ride

now it:

  • finds apps
  • reads manifests
  • imports modules
  • returns main
  • executes it

and it does all of this without bursting into flames

##the shell shells shells

the shell used to be a little guy who said “hi” and then repeated whatever you typed like a parrot

now it:

  • parses commands
  • handles quotes
  • ignores empty lines
  • catches ctrl+c
  • catches ctrl+d
  • runs apps
  • lists apps
  • lists files
  • edits files
  • reads files

filesystem skeleton because I heard it might be needed

i also added:

  • OPFS stub
  • VFS stub
  • canonical paths

because apparently an OS needs a filesystem
wild concept
never heard of it

So

pyComputer is still 99% stubs
i know it
you know it

and yet somehow
in twenty minutes
it went from:

“i boot :)”

to:

“i boot, i parse, i run apps, i save notes, i evaluate math, i list files, i edit files, i read files, i have a settings app, i have a loader, i have a shell, i have a directory structure, i have a personality, i have dreams”

Attachment
Attachment
Attachment
Attachment
Attachment
Attachment
Attachment
Attachment
1

Comments

NellowTCS
NellowTCS 5 days ago

btw if anyone was wondering, kernele was a typo on purpose

NellowTCS

okay so.
today was… a lot.

i basically walked into my repo, looked at the old python‑class files, and went
“hehe sorry guys but you’re going to the git shadow realm now”
and then i deleted EVERYTHING

anyway.

bye byee :D

i yeeted:

  • calculator
  • text editor
  • password thing
  • computer.py
  • that weird fromComputer.txt relic

all gone.
sent to git valhalla.
they served well.
they are retired now.
they can rest.

initial kernel hehe

i then proceeded to spawn an entire kernel neighborhood like:

src/kernel/
    boot.py
    io.py
    kernel.py
    loader.py
    process.py
    registry.py
    scheduler.py

each file is a tiny guy with a tiny job:

  • boot.py - dramatic theater kid who prints the logo
  • io.py - “i do input and output and i’m very stressed about it”
  • process.py - coroutine babysitter
  • scheduler.py - round‑robin gremlin doing laps
  • loader.py - app archaeologist
  • registry.py - librarian
  • kernel.py - kernel (aka the mayor)

THE FIRST ACTUAL BOOT OMG

the kernel now actually:

  • initializes subsystems
  • runs the boot sequence
  • prints fake hardware logs
  • launches the shell (or tries to 😔)
  • hands control to the scheduler
  • does not crash

actually event-ing

i replaced the fake event loop with:

await self.scheduler.run()

the scheduler is now actually… scheduling

Attachment
Attachment
0