eevo v0.2 release
2026-01-03
With a new year comes a new release, the first release under the new name!
With a new name comes a new look, this time in the form of a
whole new syntax. It sits on top of the previous s-expression based
syntax, but reduces the amount of parenthesis by assuming invisible
parenthesis around each line. This works the same way math notation
does, you don’t need to write (1 + 2) for top-level
expressions, you can just type 1 + 2. Indented lines
are sub-expressions of the previous level. In additional, many other
syntax shorthands were also introduced.
Next, a new fundamental data type is added: records, unordered
sets of key-value pairs. eevo provides a new core record
ENV for the current environment. The keys are the
symbols in scope, and the values are their corresponding values.
Records will eventually be the core collection data type of eevo,
subsuming lists (pairs) and functions, as well as serve as
vectors/arrays and sets (similar to lua’s tables).
There is also a new preliminary first-class type system (dependent types), where types are expressions just like any other value. These are not true dependent types yet, so a lot of work is still needed.
This is also the first version to feature tail call optimization.
After putting together this list of changes, I fully realized how many changes I made in this release. Perhaps in the future there should be smaller but more frequent releases.
Syntax
- Each line has implicit parenthesis around it,
- Indented lines are sub expressions.
- Function call can be outside parenthesis.
- Change pair separator syntax from
.to.... - Parse binary, octal, hexadecimal numbers,
- Prefixed with
0b,0o, and0xrespectively.
- Prefixed with
- Explicit symbol parsing with surrounding
~,~sym~to return symbol of any characters.
- Separate parsing of symbols and operators.
- Allow pair syntax at start of list,
(. x)becomesx,func(. rest)becomes(func . rest).
- Support digit separator in integers
1_000_000- Underscores inside number are ignored.
Syntax sugar
- Create list with square brackets
[]:[1 2 3]becomes(list 1 2 3).
- Pair syntax, colon to create list of two elements:
var: valbecomes(var val).
- Function call outside of parenthesis:
func(x y)becomes(func x y)
- Get property syntax:
var::propbecomes(var 'prop)
- Map syntax:
proc:[lst]becomes(map proc lst)
- Universal function call syntax:
x>>f(y z)becomes(f x y z)
Records
Create new record type, an unordered set of key-value pairs
inside curly braces {}. For example:
{ a: 1 b: 2 c: 3 }.
- Key and corresponding value are separated by colons,
- Key-value pairs are separated by whitespace.
- Support else in records to match any other value
- Currently keys can only be symbols (support for any value is on its way).
- Add special
ENVsymbol for current environment as a record.
Procedures
Several new procedures were added, and existing ones were renamed or reorganized.
- Rename
car,cdr,constofst,rst,Pair. - Remove
get: Replace with function calls on records andprocprops. - Change how
loadimports libraries,- Now returns single primitive, which can be
defto a symbol.
- Now returns single primitive, which can be
- Remove
nandandnor, addxor? - Change
parseto parse all expressions in string. - Change
displayto return string.- Make recursive on lists and records.
- Don’t display
Void
- Support
mapfor improper lists.
New
strfmtexit!printerrandprinterrln- Math functions:
deg,rad,gcd,factorial,half,double,*^,clamp,mean,range sys- Record functions:
records,recmerge,reckeys, andrecvalues vocabinwalk
Reorganization
- Reorganize builtin procedures into
core/andstd/folders. - Make
doa builtin special form - Move
repltoio - Move built-ins to
core.c - Split
core.evointolist.evo - Move all file reading to
io.c
CLI
- Change REPL prompt to
>>> - Rename
-cto-e - Rename
-rto-i
Tail call optimization
When a function call is the last expression in a function, reuse the current stack to evaluate the called function body instead of creating a new one. This makes tail call recursion operationally equivalent to a loop, a requirement for a functional language.
Bug fixes
- Fix reading of symbols
- Fix functions with non-list arguments
Misc
- Manage memory with a simple global bump allocator
- Needs to be lexically scoped.
- Switch to amalgamated build system
- Change language man page from section 7 to section 5, and rewrite
- Add help string
- Install stdlib to
share/tisp/pkgs/std/ - Support embedding in C++