25 Commits

Author SHA1 Message Date
Aryadev Chavali
66c5134eb5 Remove impl folder 2025-10-19 23:04:04 +01:00
Aryadev Chavali
030a289497 Some changes to how streams work, clean up alisp.org 2025-09-01 21:47:25 +01:00
Aryadev Chavali
1aa01d2a89 Merge remote-tracking branch 'origin/master' 2025-09-01 21:45:18 +01:00
Aryadev Chavali
700c3b1d1b Move implementation files into their own folder
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-09-01 21:26:01 +01:00
Aryadev Chavali
d62a11bb35 Modify main.c to better test stream 2025-08-29 20:04:21 +01:00
Aryadev Chavali
b403368d11 More tests 2025-08-29 14:53:34 +01:00
Aryadev Chavali
73736cf77c New example text and another test 2025-08-29 08:42:18 +01:00
Aryadev Chavali
29d2453288 Cleaned up bugs with stream implementation
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-29 08:28:32 +01:00
Aryadev Chavali
cc56a2ee2b Still got some failures, but a basic stream implementation
Need to fix what's going on with the example in main.c using stdin.
2025-08-28 22:55:41 +01:00
Aryadev Chavali
49a3302fd6 Split out tests into its own file
Also adjust the build system to do some more (cleaning, building,
testing, running).
2025-08-21 22:02:23 +01:00
Aryadev Chavali
0da524f5a8 Clean up tests a bit 2025-08-21 21:54:22 +01:00
Aryadev Chavali
ed37f7cd80 cons_test written 2025-08-21 21:27:01 +01:00
Aryadev Chavali
29b18bc1de Finish value constructors TODO, start container constructors TODO 2025-08-21 14:56:24 +01:00
Aryadev Chavali
742f19886c Designed tests for make_int and intern with their destructors 2025-08-21 08:35:32 +01:00
Aryadev Chavali
e9eaba12d1 Fix issues with buffer overflow when printing products of sv_copy
Happens because we have no null terminator on the string - rookie
mistake.
2025-08-21 08:34:37 +01:00
Aryadev Chavali
59946c8831 Made some tests to go through 2025-08-21 00:06:57 +01:00
Aryadev Chavali
d2bb858144 Made a little test case for vectors 2025-08-20 23:39:01 +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
Aryadev Chavali
f8c2ec86ae Test for tagging integers 2025-08-19 23:22:12 +01:00
Aryadev Chavali
6dfe3e72a1 Make sym_table_find return the c-string in question directly
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-19 23:02:07 +01:00
Aryadev Chavali
e7f4b0440c Add sanitisers to build 2025-08-19 22:55:20 +01:00
Aryadev Chavali
78aa7d6fb3 Separate out implementation to make looking at code files easier 2025-08-19 22:53:19 +01:00
Aryadev Chavali
b87a0c473a Separated out the definitions to clean up a bit
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-19 22:47:57 +01:00
Aryadev Chavali
f14a2680fd 200 line symbol table implementation and the first commit
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.
2025-08-19 22:40:50 +01:00