Main reason to have this at all is to make char-by-char reading
feasible. This occurs at `stream_chunk`, and previously if we passed
in STDIN for `stream_init_file`, STDIN will only terminate once
STREAM_DEFAULT_CHUNK number of characters have been fed into the pipe.
This isn't desirable for STDIN (we really want to read char-by-char
for expressions), nor would it necessarily be desirable in network
applications. So any stream marked STREAM_TYPE_PIPE will only chunk
character-by-character rather than genuine chunks.
main.c and test.c generate binary executables so they can stay in the
main folder, but the rest can go into their own dedicated folder to
make it look nicer
If it isn't a CONS, we return NIL instead of failing. This way, we
can use it in our general iteration functions. Eventually the actual
runtime would use this as well. The macros are mostly for internal
use to do assignment etc.
Avoid 2 levels of indirection, and having to allocate twice for small
payloads, by having an inlined array on the vector directly!
Beautiful and simple.
Required a bit of refactoring around the board, but overall the result
makes me feel happier.
Stable vectors will be used in the lisp runtime to implement actual
vectors, instead of using the disgusting lvec trick. This way we at
least can get attributes about the vector through one pointer hop.
I'm going to implement a normal stable vector instead of an inline
vector so we have both options for use. I think that's smarter than
just sticking to one.
We're storing them as sv_t's anyway, we're fucked with regards to
indirection. Thus, let's be nice to ourselves, and deal with the
structures. We get the size of the structure for free anyway!
We can register memory we've allocated onto the heap into a ~sys_t~
instance for examination (read: garbage collection) later. We can
also add items to the symbol table it has internally.
Unfortunately, due to how vectors are implemented, pointers to them
are unstable. We need to box them one more time (therefore adding a
level of indirection) in order to stabilise them. This is annoying
but currently necessary.
Even if we implemented vectors as {u64, u64, ptr} instead of {u64,
u64, bytes...}, we'd still have the same problem at access - two
levels of indirection. I guess size and capacity checks would be one
level of indirection which is nice at least, but we're already screwed
at the point of doing lookup either way.