Aryadev Chavali
3d0e373862
test_lisp_api: added sym_unique_test
2026-02-05 05:34:54 +00:00
Aryadev Chavali
0e8cdd7507
test_lisp_api: sym_test -> sym_fresh_test
2026-02-05 05:34:39 +00:00
Aryadev Chavali
4d693c8a92
test_lisp_api: int_test -> smi_test, added smi_oob_test
2026-02-05 05:24:34 +00:00
Aryadev Chavali
1c88253b3c
tests: fix size of LISP_API_SUITE tests
2026-02-05 05:23:38 +00:00
Aryadev Chavali
de6fcd17ee
Makefile: added mode flag for full logs
...
MODE=full will initialise a debug build with all logs, including test
logs. Otherwise, MODE=debug just sets up standard debug build with
main logs but no testing logs. MODE=release optimises and strips all
logs.
2026-02-05 05:17:25 +00:00
Aryadev Chavali
91264d96e4
test: Added definition to make default testing less verbose
...
TEST_VERBOSE is a preprocesser directive which TEST is dependent on.
By default it is 0, in which case TEST simply fails if the condition
is not true. Otherwise, a full log (as done previously) is made.
2026-02-05 05:16:11 +00:00
Aryadev Chavali
d88d7f7f23
tests: c23 allows you to inline stack allocated arrays in struct decls
2026-02-05 05:10:19 +00:00
Aryadev Chavali
16be3392b0
tests: slight cleanliness
2026-02-05 05:10:12 +00:00
Aryadev Chavali
2705ef9bb7
tests: Meaningful and pretty logging for tests
2026-02-05 04:56:11 +00:00
Aryadev Chavali
45ef1fa01a
tests: Added string view suite
...
sv_copy is the only function, but we may have others later.
2026-02-05 04:48:42 +00:00
Aryadev Chavali
9095b118fd
tests: split of symtable testing into its own suite
...
makes sense to be there, not in the lisp API
2026-02-05 04:48:42 +00:00
Aryadev Chavali
40ef094b68
alisp.org: Remove notes and overview
...
Not needed with what we're doing currently. I'll make proper
documentation when I'm done.
2026-02-05 04:35:54 +00:00
Aryadev Chavali
656226c050
alisp.org: make a backlog for tasks
2026-02-05 04:35:47 +00:00
Aryadev Chavali
edb2f5c5c8
dir-locals: run testing, then examples for default compile-command
...
By default we should test all our code for regressions. I'm always
running the examples anyway to test new features, so we should have
that recipe run afterwards.
If a test fails, that's first priority to fix.
If an example fails, time to continue working.
2026-02-05 04:34:29 +00:00
Aryadev Chavali
118a25055c
main: the beginnings of alisp.out
...
We've started composing the stuff we've made so far I/O wise,
initialising a stream based off user command line input. We even
allow stdin!
2026-02-05 04:32:48 +00:00
Aryadev Chavali
e7d3bca4d7
stream: fix bug with stream_next; return the next character
...
It seems we'd return the previously peeked character when
stream_next'ing, when really we should be sending the updated
character.
2026-02-05 04:29:07 +00:00
Aryadev Chavali
10d6876de4
reader: implement read_err_to_cstr
2026-02-05 04:07:59 +00:00
Aryadev Chavali
75daad53ea
reader: add a few more read errors and read_err_to_cstr
2026-02-05 04:06:27 +00:00
Aryadev Chavali
1e451c57e8
stream: stream_line_col: get the line/column of stream currently
...
Best part is that this should only use cached data, so no chunking
required.
2026-02-05 04:04:54 +00:00
Aryadev Chavali
d14f015c38
stream: use the nonexistent errors in stream_init_*
2026-02-05 04:04:54 +00:00
Aryadev Chavali
26e545a732
stream: Rearranged STREAM_ERR to be nonzero positive
...
I don't know why I was thinking about having valid positive values for
STREAM_ERR. Doesn't make sense.
2026-02-05 04:04:54 +00:00
Aryadev Chavali
169a165cfc
stream: added stream_err_to_cstr
...
Simple routine, not really much to explain here.
2026-02-05 04:04:54 +00:00
Aryadev Chavali
438a494ac7
lisp: sys_cleanup -> sys_free
2026-02-05 04:04:54 +00:00
Aryadev Chavali
068e4aa9f0
Makefile: added -Werror to general flags
...
May as well remove all warnings if possible, though in most cases this
is just to ensure I catch everything and deal with it.
2026-02-05 04:04:54 +00:00
Aryadev Chavali
271e0bff9b
Makefile: added examples recipe to run examples
2026-02-05 04:04:54 +00:00
Aryadev Chavali
010895331d
examples: Added an example for hello world
2026-02-05 04:04:54 +00:00
Aryadev Chavali
6a75c1d9d4
Makefile: added VERBOSE_LOGS=1 declaration to DFLAGS for debug build
2026-02-05 04:04:54 +00:00
Aryadev Chavali
01b695eb6a
base: implement LOG macro which only prints if VERBOSE_LOGS = 1
...
This allows us to make builds that don't have verbose logging, whether
they're debug or not.
We could have release builds that have verbose logging.
2026-02-05 04:04:54 +00:00
Aryadev Chavali
500661d68e
LICENSE: Unlicense -> GPL Version 2
2026-02-05 04:04:54 +00:00
Aryadev Chavali
ea2f745f1e
Split out tests a bit, made a stronger API for running the full test suite
2026-02-04 20:44:04 +00:00
Aryadev Chavali
0681bb4314
Not worth the trouble
...
You're telling me Ubuntu doesn't have a version of GCC with C23
standard?? Really???
2026-02-04 20:09:32 +00:00
Aryadev Chavali
2839da55db
Update compiler choice in Makefile
C/C++ CI / build (push) Has been cancelled
2026-02-04 20:08:28 +00:00
Aryadev Chavali
d4612fa0ef
Merge remote-tracking branch 'github/master'
C/C++ CI / build (push) Has been cancelled
2026-02-04 20:08:18 +00:00
oreodave
5de0e33fb3
Update C/C++ workflow to use debug and release modes
2026-02-04 20:07:10 +00:00
Aryadev Chavali
2d7adf595f
Add testing to build system
...
Generate a testing executable, and provide a recipe for running it.
2026-02-04 20:06:38 +00:00
Aryadev Chavali
ce7185f923
Split off testing API into header, separate from source
...
This is so I could generate new test units using the same API.
2026-02-04 20:06:04 +00:00
Aryadev Chavali
52a56c27f6
Add tag.h to alisp.h
2026-02-04 20:05:53 +00:00
Aryadev Chavali
270d4a4d6a
Adjust README
2026-02-04 19:40:48 +00:00
Aryadev Chavali
7892c03e35
Clean up buildsystem
2026-02-04 19:39:02 +00:00
Aryadev Chavali
7fe8576c05
Move sys.c into lisp.c
2026-02-04 19:38:09 +00:00
Aryadev Chavali
7aae45e9c4
Move everything to src/ folder
2026-02-04 19:31:11 +00:00
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
698b2b96b1
vec: switch to pointer to u8 instead of void pointer for vec_data
...
No issues with indexing this by byte, right?
2026-02-03 18:55:46 +00:00
Aryadev Chavali
0162dcc709
Switch to Makefile for build system
2026-02-03 18:55:13 +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
Aryadev Chavali
bb55895e94
Test program to read all whitespace delimited tokens in a text file
2026-01-21 09:27:59 +00:00