Files
AnachronautandClaude Opus 5 eaeb473176 ls says in green what the shell will start
Directories were already blue. Something the shell will run is green now,
and it is asked by LOOKING rather than looked up.

This was priced once as needing a runnable bit in the directory entry,
set by the filesystem from a list of magic numbers it would have to be
taught - declined twice, for putting format knowledge in the filesystem
and giving two implementations a registry to keep in step.

It costs nothing of the sort any more. The shell decides what to run by
reading a file's first block, so "will this run" is a question with an
answer already, and this asks the same one the shell would: SBEX for a
program, "#!" for a script. Nothing is written down and nothing has to
agree about anything.

The price is a block read per file, which is exactly what the bit existed
to avoid: a listing of thirty seven files went from 260,593 cycles to
635,321. It is paid in ls and not in dir on purpose - dir is the listing
you audit and is built into the shell, this is the one you read and was
loaded off the disk anyway. The fast one stays fast.

plain.script is the proof on the test disk: it sits among a dozen scripts
that are green and is not one, because it is the fixture with no shebang
and the shell will not start it. The extension is decoration and the
colour is the truth, which is the whole of what running by content means,
finally visible.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01E2JrLzFvuFX9fgi1LDRjrW
2026-09-06 19:53:33 -04:00

1.3 KiB

CosmOS
> ls
greet.sbx hello.sbx Life.sbx Snake.sbx Keys.sbx
Say.sbx Where.sbx Break.sbx Grid.sbx Press.sbx
Mode.sbx Flip.sbx Sprite.sbx Depth.sbx Packages/
Pad.sbx Crash.sbx vars.script blocks.script loops.script
tune.sbx Play.sbx notes.txt Apps/ hi.script
bad.script plain.script cross.script nonl.script outer.script
inner.script loop.script hush.script aloud.script args.script
pass.script holds.script
> cd /Apps
/Apps> ls
Copy.sbx Say.sbx Where.sbx Walk.sbx ls.sbx Lander where.sh
/Apps> cd /
> ls /Packages/app.Lander
Lander.sbx splash.tune
> mkdir /empty
made
> cd /empty
/empty> ls
/empty> cd /
> ls nowhere
there is no such directory: nowhere
> exit
halted
Execution halted.
[exit 0]