about summary refs log tree commit diff stats
path: root/life.tlv
diff options
context:
space:
mode:
Diffstat (limited to 'life.tlv')
-rw-r--r--life.tlv48
1 files changed, 0 insertions, 48 deletions
diff --git a/life.tlv b/life.tlv
index 7567697..22293ea 100644
--- a/life.tlv
+++ b/life.tlv
@@ -333,54 +333,6 @@
     >              'test_check_screen')
     >end
 - __teliva_timestamp: original
-  start_reading:
-    >-- primitive for reading files from a file system (or, later, network)
-    >-- returns a channel or nil on error
-    >-- read lines from the channel using :recv()
-    >-- recv() on the channel will indicate end of file.
-    >function start_reading(fs, filename)
-    >  local result = task.Channel:new()
-    >  local infile = io.open(filename)
-    >  if infile == nil then return nil end
-    >  task.spawn(reading_task, infile, result)
-    >  return result
-    >end
-    >
-    >function reading_task(infile, chanout)
-    >  for line in infile:lines() do
-    >    chanout:send(line)
-    >  end
-    >  chanout:send(nil)  -- eof
-    >end
-- __teliva_timestamp: original
-  start_writing:
-    >-- primitive for writing files to a file system (or, later, network)
-    >-- returns a channel or nil on error
-    >-- write to the channel using :send()
-    >-- indicate you're done writing by calling :close()
-    >-- file will not be externally visible until :close()
-    >function start_writing(fs, filename)
-    >  local result = task.Channel:new()
-    >  local initial_filename = os.tmpname()
-    >  local outfile = io.open(initial_filename, 'w')
-    >  if outfile == nil then return nil end
-    >  result.close = function()
-    >    result:send(nil)  -- end of file
-    >    outfile:close()
-    >    os.rename(initial_filename, filename)
-    >  end
-    >  task.spawn(writing_task, outfile, result)
-    >  return result
-    >end
-    >
-    >function writing_task(outfile, chanin)
-    >  while true do
-    >    local line = chanin:recv()
-    >    if line == nil then break end  -- end of file
-    >    outfile:write(line)
-    >  end
-    >end
-- __teliva_timestamp: original
   grid:
     >-- main data structure
     >grid = {}
ision' href='/akkartik/mu/blame/cpp/034exclusive_container?h=main&id=30ab02977063217dcf16028d897a3e8cb0d9cff9'>^
afa42503 ^

5f98a10c ^
88be3dbc ^
69f3fb0a ^

bc643692 ^


afa42503 ^
69f3fb0a ^




c6034af3 ^
72d5d018 ^
69f3fb0a ^
0acfaaef ^
ac0e9db5 ^


69f3fb0a ^




6ea73c22 ^
7284d503 ^
dd994cda ^






363be37f ^
dd994cda ^
88be3dbc ^
dd994cda ^
bc643692 ^


afa42503 ^
dd994cda ^


88be3dbc ^
dd994cda ^
bc643692 ^


afa42503 ^
dd994cda ^


6ea73c22 ^


363be37f ^
96bb317f ^
dd994cda ^
96bb317f ^
5f98a10c ^
e4630643 ^

96bb317f ^

72d5d018 ^
f8aa4b17 ^
18e626df ^

96bb317f ^
5f98a10c ^
eefde1b9 ^

96bb317f ^



c6034af3 ^

96bb317f ^

5f98a10c ^
eefde1b9 ^

ac0e9db5 ^
0487a30e ^
ac0e9db5 ^
0487a30e ^
dd994cda ^

0487a30e ^
dd994cda ^
cfb142b9 ^
827898fc ^
dd994cda ^

b98d3876 ^















72d5d018 ^
b98d3876 ^
02a55f71 ^








bc643692 ^


02a55f71 ^




2eab85b3 ^





c6034af3 ^


72d5d018 ^
2eab85b3 ^


























1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190