5afa613138
Change build workflow to also run the binary
2025-12-28 21:04:46 +03:00
61a08c1b9b
Changed flake to use flake-utils and build for all targets
2025-12-28 21:04:46 +03:00
1422f14822
Added first build workflow
2025-12-28 21:04:46 +03:00
9981c222eb
Added desugar phase for converting cond into a chain of if's
2025-12-28 21:04:45 +03:00
93ba06a6b0
Expand parser to include =, > and < as symbol characters
2025-12-28 21:04:45 +03:00
624d420afe
Separated mutually recursive definition of desugar phases
...
They do not need to be mutually recursive at all. At first I thought
they would have to be, because I thought it would be best if each phase
completely desugared the bodies of the expressions they handle, but now
I see that would probably lead to an infinite loop.
There is simply no reason to couple them so tightly.
2025-12-28 21:04:45 +03:00
d80caadc85
Added gensym, and phases in the desugar module for logical and & or
2025-12-28 21:04:45 +03:00
be0d479665
Added desugar steps to add (begin) wrappers around long lambda bodies, and rewrite internal (define) forms into letrec forms
2025-12-28 21:04:45 +03:00
4f1ad54596
Started work on the compiler, with a desugar phase
2025-12-28 21:04:45 +03:00
e10124498e
Reorganize flake again, it should be good now
2025-12-28 21:04:45 +03:00
fc44d7f195
Reorganize flake, remove unnecessary prebuild phase
2025-12-28 21:04:45 +03:00
582a0a3b86
Add merlin to the devshell, because I use emacs
2025-12-28 21:04:45 +03:00
58277ad0a3
Complete reorganization: finally at a building state again
2025-12-28 21:04:45 +03:00
adbf083c3d
Reorganized project
2025-12-28 21:04:45 +03:00
8e980a8f1b
Reorganized basically everything, making way for the compiler
2025-12-28 21:04:45 +03:00
81c349c70a
Added pretty-printing.
2025-12-28 21:04:45 +03:00
6c2ae01a80
Improved the debug print function to pretty-print lists.
2025-12-28 21:04:45 +03:00
e46938005b
Making preparations for more of the standard library
2025-12-28 21:04:45 +03:00
e2f1a55cb7
Revert "Minor changes"
...
This reverts commit 6243ace80b .
2025-12-28 21:04:45 +03:00
5b9de4d5a3
Minor changes
2025-12-28 21:04:45 +03:00
64e52cd0cf
Added more math operations, generalized and simplified existing math operations, added some list operations for the lisp lists
2025-12-28 21:04:45 +03:00
2f9501450f
Reorganized the standard library a little more, moved the initialization code for the standard environment into a function. Making way for more organization changes to come
2025-12-28 21:04:45 +03:00
a45918d203
Added type annotations for the environment module to make things clearer, switched bind_args implementation with a simpler one.
2025-12-28 21:04:45 +03:00
93723be488
Update gitignore
2025-12-28 21:04:45 +03:00
52eee92b7b
remove mistaken autosave file
2025-12-28 21:04:45 +03:00
892f47ba5f
Reorganized environment-related functions.
2025-12-28 21:04:45 +03:00
c7132325db
Added some standard functions
2025-12-28 21:04:45 +03:00
c80d5fd75f
reorganized a bit, separated bind-symbol into two operators that have different uses, def and set
2025-12-28 21:04:45 +03:00
Emin Arslan
3e53f3720f
Removed irrelevant comment
2025-12-28 21:04:45 +03:00
Emin Arslan
d0accebf73
Changed the addition and subtraction functions to be clearer
2025-12-28 21:04:45 +03:00
Emin Arslan
9b20547e84
Added def, changed naming, and added if expressions
2025-12-28 21:04:44 +03:00
Emin Arslan
dec68856f3
Evaluation is now performed properly, mimicking Common Lisp, and basic defun and defmacro definitions are provided (automatically executed on startup)
2025-12-28 21:04:44 +03:00
Emin Arslan
365595a345
Added dot syntax for lists, and proper quote syntax. LQuoted is now unused
2025-12-28 21:04:44 +03:00
Emin Arslan
df0b3178f0
Improved the repl to return to evaluation upon error. Also added an exit command
2025-12-28 21:04:44 +03:00
Emin Arslan
bb0ec74ee7
Added builtin special forms, lambda forms and bind-symbol. got rid of bind-function, as it is now unnecessary. it is now possible to create functions!
2025-12-28 21:04:44 +03:00
Emin Arslan
aaafe1c3e6
Re-organized a lot of code, changed functions so that functions capture the surrounding environment and execute in that environment
2025-12-28 21:04:44 +03:00
Emin Arslan
f9e96b1bd4
General style changes, nothing major
2025-12-28 21:04:44 +03:00
Emin Arslan
354e9b355b
Added bind-function primitive that allows us to define functions, also changed evaluation to allow for a persistent environment
2025-12-28 21:04:44 +03:00
Emin Arslan
4535d57d21
Initial state - basic lexer + parser + interpreter
2025-12-28 21:04:44 +03:00