about summary refs log tree commit diff stats
path: root/store_plan_proj
diff options
context:
space:
mode:
authorNeil Ray <ray@tilde.institute>2020-11-15 06:55:37 -0500
committerNeil Ray <ray@tilde.institute>2020-11-15 06:55:37 -0500
commit24b972496d68c6c3feac55f6ee0c3e350a7f2c2a (patch)
tree4923295def21aa8a6507fbc930f1a07d48786878 /store_plan_proj
parentfae4f91948b5aa655b67b578c0dd4b01ef10f319 (diff)
downloadprep_html-master.tar.gz
usual updates to plan & project HEAD master
Diffstat (limited to 'store_plan_proj')
-rw-r--r--store_plan_proj/.project2
1 files changed, 2 insertions, 0 deletions
diff --git a/store_plan_proj/.project b/store_plan_proj/.project
index 6559bd0..d83afab 100644
--- a/store_plan_proj/.project
+++ b/store_plan_proj/.project
@@ -1,3 +1,5 @@
  - explore the tilde/gemini/gopher realms
 
+Status:
+ - learning to emulate GPT-3
 
#n92'>92 93 94 95 96 97 98 99
# Check our support for fake file systems in scenarios.

scenario read-from-fake-file [
  local-scope
  assume-resources [
    [a] <- [
      |xyz|
    ]
  ]
  contents:&:source:char <- start-reading resources, [a]
  1:char/raw <- read contents
  2:char/raw <- read contents
  3:char/raw <- read contents
  4:char/raw <- read contents
  _, 5:bool/raw <- read contents
  memory-should-contain [
    1 <- 120  # x
    2 <- 121  # y
    3 <- 122  # z
    4 <- 10  # newline
    5 <- 1  # eof
  ]
]

scenario write-to-new-fake-file [
  local-scope
  assume-resources [
  ]
  sink:&:sink:char, writer:num/routine <- start-writing resources, [a]
  sink <- write sink, 120/x
  sink <- write sink, 121/y
  close sink
  wait-for-routine writer
  contents-read-back:text <- slurp resources, [a]
  10:bool/raw <- equal contents-read-back, [xy]
  memory-should-contain [
    10 <- 1  # file contents read back exactly match what was written
  ]
]

scenario write-to-new-fake-file-2 [
  local-scope
  assume-resources [
    [a] <- [
      |abc|
    ]
  ]
  sink:&:sink:char, writer:num/routine <- start-writing resources, [b]
  sink <- write sink, 120/x
  sink <- write sink, 121/y
  close sink
  wait-for-routine writer
  contents-read-back:text <- slurp resources, [b]
  10:bool/raw <- equal contents-read-back, [xy]
  memory-should-contain [
    10 <- 1  # file contents read back exactly match what was written
  ]
]

scenario write-to-fake-file-that-exists [
  local-scope
  assume-resources [
    [a] <- []
  ]
  sink:&:sink:char, writer:num/routine <- start-writing resources, [a]
  sink <- write sink, 120/x
  sink <- write sink, 121/y
  close sink
  wait-for-routine writer
  contents-read-back:text <- slurp resources, [a]
  10:bool/raw <- equal contents-read-back, [xy]
  memory-should-contain [
    10 <- 1  # file contents read back exactly match what was written
  ]
]

scenario write-to-existing-file-preserves-other-files [
  local-scope
  assume-resources [
    [a] <- []
    [b] <- [
      |bcd|
    ]
  ]
  sink:&:sink:char, writer:num/routine <- start-writing resources, [a]
  sink <- write sink, 120/x
  sink <- write sink, 121/y
  close sink
  wait-for-routine writer
  contents-read-back:text <- slurp resources, [a]
  10:bool/raw <- equal contents-read-back, [xy]
  other-file-contents:text <- slurp resources, [b]
  11:bool/raw <- equal other-file-contents, [bcd
]
  memory-should-contain [
    10 <- 1  # file contents read back exactly match what was written
    11 <- 1  # other files also continue to persist unchanged
  ]
]