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
52 lines
1.3 KiB
Plaintext
52 lines
1.3 KiB
Plaintext
CosmOS
|
|
> Say before Flip
|
|
it says: before Flip
|
|
> Flip
|
|
A screen is drawn where you cannot see it. A key shows it, another comes back.
|
|
> Say after Flip
|
|
it says: after Flip
|
|
> dir
|
|
greet.sbx 211
|
|
hello.sbx 53
|
|
Life.sbx 1396
|
|
Snake.sbx 2164
|
|
Keys.sbx 664
|
|
Say.sbx 156
|
|
Where.sbx 827
|
|
Break.sbx 149
|
|
Grid.sbx 571
|
|
Press.sbx 872
|
|
Mode.sbx 48
|
|
Flip.sbx 173
|
|
Sprite.sbx 442
|
|
Depth.sbx 672
|
|
Packages <dir>
|
|
Pad.sbx 264
|
|
Crash.sbx 632
|
|
vars.script 50
|
|
blocks.script 343
|
|
loops.script 272
|
|
tune.sbx 318
|
|
Play.sbx 2526
|
|
notes.txt 21
|
|
Apps <dir>
|
|
hi.script 121
|
|
bad.script 45
|
|
plain.script 24
|
|
cross.script 280
|
|
nonl.script 38
|
|
outer.script 376
|
|
inner.script 44
|
|
loop.script 35
|
|
hush.script 42
|
|
aloud.script 59
|
|
args.script 64
|
|
pass.script 20
|
|
holds.script 87
|
|
35 files, 2 directories
|
|
47 of 64 entries, 1889 blocks free
|
|
> exit
|
|
halted
|
|
Execution halted.
|
|
[exit 0]
|