| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
| |
|
|
|
|
| |
Fix CI. How does it work on my Mac without explicitly including errno?
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
- New plan
Primitives:
$open-file-for-reading
$open-file-for-writing
$read-from-file
$write-to-file
$close-file
The '$' prefix indicates that none of these are intended to be used
directly since they rely on type-system-busting numbers. Also that they
are just temporary hacks depending on primitives provided by the host
system. A putative 'Mu machine' would have very different primitives.
Testable interfaces:
- start-reading: starts a routine to read from a file and returns the
source where the contents will become available.
- start-writing: starts a routine to write to a file and returns the
sink where the contents can be provided.
Both operate on the real file-system if the first 'filesystem'
ingredient is 0.
Once you start them up you can read/write/close the channel as usual.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
I don't know why this took so long to gel. I just needed to copy my
approach to screen management:
1. primitives layer (C++): simple, non-testable, non-safe operations.
2. wrappers layer (Mu): wrap operations with dependency-injected
versions that can take a fake file system.
3. scenario layer (C++): implement assume-filesystem that constructs a
fake file system.
4. scenario test layer (Mu): test out assume-filesystem in a test.
This commit implements step 1.
|
|
|