Commit Graph

6 Commits

Author SHA1 Message Date
Aryadev Chavali
85b83d7a20 Small optimisation: don't initialise a symbol table immediately on init
Why?  This way, until we use symbols, the system doesn't generate the
table and thus grow the memory usage by a couple kb.
2025-08-21 21:53:09 +01:00
Aryadev Chavali
0f68afd9a0 Make nicer primitive functions for car/cdr
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.
2025-08-21 14:55:54 +01:00
Aryadev Chavali
13142dc7f3 refactor lisp runtime to use vec_t* instead of ivec_t*
bit nicer to look at, should have about the same painful performance
hit anyway.
2025-08-20 22:43:23 +01:00
Aryadev Chavali
55293ae396 vec -> ivec
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.
2025-08-20 22:19:14 +01:00
Aryadev Chavali
643896e2c8 rename base.h -> alisp.h
Makes more sense when you think about including it as an external
library
2025-08-20 21:24:07 +01:00
Aryadev Chavali
3074ba5bab Constructors and context -> sys
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.
2025-08-20 21:12:46 +01:00