Commit Graph

6 Commits

Author SHA1 Message Date
Aryadev Chavali
7f8412fe5a Split alisp.h into several header files, in /include folder. 2026-02-04 19:31:11 +00:00
Aryadev Chavali
27108aa811 Update license formats for all source code 2026-02-03 19:02:47 +00:00
Aryadev Chavali
6ec0108566 vec: is_inlined -> not_inlined
If you allocate a vector on the stack and default initialise
it (i.e. {0}), then by default "is_inlined" = 0.  This is bad, as
technically speaking we should expect the vector to attempt to use
it's small inline buffer for vector operations before going onto the
heap - this will mess up our functions.  So here I adjust the name to
make default stack based allocation a bit easier.
2026-01-22 16:37:58 +00:00
Aryadev Chavali
865ab22fdc Make VEC_GET take an index along with the type
Since most use cases require indexing the data directly, and the macro
implies you're retrieving data from it, may as well take the index.

If you wanted a pointer to that data, &VEC_GET(vec, index, type) works
just fine.
2026-01-21 09:48:29 +00:00
Aryadev Chavali
8c190e955d Make conses a vector, add VEC_SIZE macro
Easier to iterate through, O(1) amortized registering just like the
Linked List.

VEC_SIZE just makes it easier to iterate through a vector of specially
typed elements.
2026-01-21 09:45:36 +00:00
Aryadev Chavali
2ec1dfa083 Move some stuff around for cleanliness 2026-01-21 09:33:35 +00:00