No description
- Rust 93.9%
- Assembly 3.2%
- Nix 2.9%
| src | ||
| .gitignore | ||
| Cargo.lock | ||
| Cargo.toml | ||
| flake.lock | ||
| flake.nix | ||
| input.yx | ||
| kernel.S | ||
| README.md | ||
Oryx
Functional, dynamic, garbage collected,AOT compiled s-expr programming language with some Scheme influences.
Goals:
- Expressive.
- Fairly fast.
- No dependency on C or C compilers.
- Minimal dependencies on outside tools (linkers, assemblers, etc.).
- Expansive but modular standard library.
- Tend towards bleeding-edge, fun, clean solutions vs. broader compatibility.
- Tend towards ideological purity and doing things "cleanly" and "neatly" rather than necessarily the fastest way.
Currently it depends on as for assembling the entry stub and uses Boehm GC.
(this all said, this is my first foray into compiler and language design)
TODO
- Parser errors are mediocre (split lexer and parser i feel)
- pack short strings, i remember a talk about this
- Type checking/a type system in any capacity lol
- not sure what im doing wrong to get like no dead code removal, unused fuctions survive compilation
- distinction between pure and impure functions? if that can be done?
Notes
per scheme functions must have one value like
(defun (main))
(defun (main) ())
are both invalid. but a quoted empty list is ok
'()
- code assumes pointers are 64 bit
Special forms / primitives / builtins / whatever
Perhaps, everything truthy except ()?
lambdaletdefinequotequasiquote(```)unquote(,)condcaseandorconscar(asfirst)cdr(asrest)+,-,<,>,=,*,/eq?
Don't need:
- if
- write, make syscall or something
(defmacro if (test then &optional else)
`(conditional (,test ,then) (t ,else)))