about summary refs log tree commit diff stats
path: root/tangle
diff options
context:
space:
mode:
authorKartik Agaram <vc@akkartik.com>2018-06-27 21:34:40 -0700
committerKartik Agaram <vc@akkartik.com>2018-06-27 21:49:27 -0700
commit66cd241ebcf6ba072c2a54bbf6894acff42bc799 (patch)
treea1dc0c5a73d4218cb8a7ae75e63f0b6231bb0337 /tangle
parent697d1d121390483881e85f6508e5f2899cf3f137 (diff)
downloadmu-66cd241ebcf6ba072c2a54bbf6894acff42bc799.tar.gz
4276 - switching gears to subx
New plan: spend some time learning to program in machine code atop subx,
relying solely on a tiny subset of kernel-provided syscalls. Gradually
introduce helpers.

Helpers we're sure we don't need, so far:
  a) Nested expressions
  b) Garbage collection
  c) One-size-fits-all memory allocation primitive
  d) Function overloading and generics

Helpers we're sure we need, so far:
  a) Dependency-injected versions of syscalls
  b) Tangling directives
  c) Statically checked types

Workflow for a C translator from ascii to binary:
  a) run generated machine code atop subx (unit tests probably go here)
  b) emit machine code packaged as an ELF file
  c) check that the ELF binary runs natively
  d) check that the ELF binary can be unwrapped and run atop subx

This is different from a conventional compiler because the 'HLL' is
unconstrained.
It is also different from Forth given the emphasis on types.

We want a simple stack that also encourages code sharing between
programmers. Conventional languages grow monotonically complex. Forth
discourages code sharing; it is non-trivial to figure out the 'shape' of
data a strange function expects on the stack.
Diffstat (limited to 'tangle')
0 files changed, 0 insertions, 0 deletions
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