aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2025-09-01Merge remote-tracking branch 'origin/master'Aryadev Chavali
2025-09-01Move implementation files into their own folderAryadev Chavali
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
2025-08-29Add printer for SV's that provides debug informationAryadev Chavali
2025-08-29Modify main.c to better test streamAryadev Chavali
2025-08-29Read an initial chunk on initialising a streamAryadev Chavali
2025-08-29make eoc also check feof on STREAM_TYPE_FILEAryadev Chavali
2025-08-29More testsAryadev Chavali
2025-08-29Fix bug where chunking overwrites previously cached resultsAryadev Chavali
2025-08-29New example text and another testAryadev Chavali
2025-08-29Fixed some more issues with streams (stdin/pipe based)Aryadev Chavali
substr didn't work properly, nor did seek. Just use the same principle as stream_next
2025-08-29Cleaned up bugs with stream implementationAryadev Chavali
Principle was that we may have read all the content from the underlying pipe (s.t. it set the EoF flag) but we haven't actually iterated the content.
2025-08-28Still got some failures, but a basic stream implementationAryadev Chavali
Need to fix what's going on with the example in main.c using stdin.
2025-08-22Made a load of tasks for a reader system, also task for BigIntegersAryadev Chavali
2025-08-21Refactor testing system, and add more testsAryadev Chavali
Couple macros to make printing nicer, use assertions instead to fail if a test doesn't work.
2025-08-21Split out tests into its own fileAryadev Chavali
Also adjust the build system to do some more (cleaning, building, testing, running).
2025-08-21Add the ability to run the executable after building it in build.shAryadev Chavali
2025-08-21Clean up tests a bitAryadev Chavali
2025-08-21Small optimisation: don't initialise a symbol table immediately on initAryadev Chavali
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-21cons_test writtenAryadev Chavali
2025-08-21Finish value constructors TODO, start container constructors TODOAryadev Chavali
2025-08-21Make nicer primitive functions for car/cdrAryadev Chavali
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-21Designed tests for make_int and intern with their destructorsAryadev Chavali
2025-08-21Fix issues with buffer overflow when printing products of sv_copyAryadev Chavali
Happens because we have no null terminator on the string - rookie mistake.
2025-08-21Some more notesAryadev Chavali
2025-08-21Made an "issue tracker" and note holderAryadev Chavali
2025-08-21Made some tests to go throughAryadev Chavali
2025-08-20Made a little test case for vectorsAryadev Chavali
2025-08-20Refactor vectors to SBO, removing inlined entirely.Aryadev Chavali
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.
2025-08-20refactor lisp runtime to use vec_t* instead of ivec_t*Aryadev Chavali
bit nicer to look at, should have about the same painful performance hit anyway.
2025-08-20Stable vector implementationAryadev Chavali
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.
2025-08-20remove parameter names in headerAryadev Chavali
2025-08-20ivec_ensure_remaining -> ivec_ensure_freeAryadev Chavali
2025-08-20vec -> ivecAryadev Chavali
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-20Use sv_t instead of raw char*Aryadev Chavali
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!
2025-08-20rename base.h -> alisp.hAryadev Chavali
Makes more sense when you think about including it as an external library
2025-08-20Constructors and context -> sysAryadev Chavali
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-20READMEAryadev Chavali
2025-08-20Basic template for a system context and constructorsAryadev Chavali
2025-08-19Test for tagging integersAryadev Chavali
2025-08-19Conses and Vectors for my tagging schemeAryadev Chavali
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.
2025-08-19Pointer tagging!Aryadev Chavali
Copied from oats, just the basics required for tagging integers or symbols.
2025-08-19Make sym_table_find return the c-string in question directlyAryadev Chavali
I think we fall into a few traps if we return an sv_t directly. Think intent is clearer by returning the c-string directly.
2025-08-19Add sanitisers to buildAryadev Chavali
2025-08-19Separate out implementation to make looking at code files easierAryadev Chavali
2025-08-19Separated out the definitions to clean up a bitAryadev Chavali
We're going to be using C to compile our Lisp eventually, so I need to have a header file for compilation to work. We can still separate out the implementation details into separate files (then generate a shared library for usage in the link stage) but we need this header file to be singular and clean.
2025-08-19200 line symbol table implementation and the first commitAryadev Chavali
Setup build system (POSIX sh), gitignore, basic C file with an implementation of something I really wanted to setup. It just hashes a snippet of lorem ipsum. Testing seems to indicate it's working. That's all it does lol. This is a really pressing matter; all my previous Lisps always just made the strings on the fly and that irked me deeply. I want a smart implementation that really tries to save memory on something as intensive as symbols.