v0.1.4
Pre-release
Pre-release
0.1.4 adds some major syntactical improvements, run-time speedups, compile-time speedups, and a lot of foundational improvements behind the scenes.
Optimizations:
- Eagerly calculated hashes, and switched from lists to vecs. 10-11x speedup!
- Added Solver, the next generics solver. Uses normalized rules, much more optimizable.
- New list uses the new arrays, should be much faster
User-visible language changes:
- Now two kinds of non-owning reference: borrow ref like
&Ship
and pointer ref like*Ship
. Midas will soon treat these differently. - Added break
- Added foreach
- Added basic variadic members!
- Added new functions: range(int, int), i64(i32), migrate for arrays
- Now need
sealed
on the interface to define abstract functions outside an interface - All parameters need a type.
fn do(callable)
->fn do<F>(callable F)
- Destructors:
- Now need #!DeriveStructDrop now to make custom destructors.
- Custom destructors are now called
drop
, notdestructor
.
- Syntax changes:
- Changed pack destructures from
(...)
to[...]
- Changed tuples from
[...]
to(...)
fn
is nowfunc
- Changed lambda syntax:
- (x){ x + 5 } is now x => x + 5
- (x, y){ moo(); foo(); } is now (x, y) => { moo(); foo(); }
- Changed
rules(...)
towhere ...
- Moved struct's mutability specifier to before rules
= 5;
is now just5
, like Scala and Rust- Put attributes (pure, extern, export, abstract, etc) before fn. export is now exported.
- Arrays:
- Changed making syntax, [vary *](5, {}) is now [](5, {)} or Array(...)
- We can now destroy an RSA with
() = arr;
to mirror structs.
- Changed pack destructures from
- Array semantics:
- Array<M, V, E> is now Array<M, E>, all arrays are now varying.
- Added push/pop support for arrays.
- Added .capacity() for arrays, plus an instructino for it.
- Extern boundary:
- Obviated ValeReleaseMessage, added _vasp for getting message sizes
- We no longer need artificial pointers on the extern boundary!
- Misc:
- Removed IFunction1 from builtins, its no longer needed by the compiler.
- Added i64 to string
- Made a functor struct, to give to the array instructions, since they need a 'this' object basically
Tooling changes:
- Changed how install scripts pull in stdlib project
- Merged package-unix/windows scripts into others
- Cleaned up Driver build process
- Made a Utils module to use in Driver and Tester, and it has stdlib additions
- Added census, asan, debug_output flags
- Made it move the old build directory to a random /tmp subdir
- New CI, thanks to kevin!
- Using supplied bootstrapping valec+stdlib for Driver and Tester now
- Cleaned out old scripts
- Clarified flags for Driver
- Made the scripts test the unzipped zip
- Made the scripts return 1 if they fail
- Removed valec.py from zip
- Split windows script into an install and build script, like mac and linux
- Added Driver, a.k.a. valec
- Added Tester, which runs our Midas tests now
Compiler changes:
- Rewrote most of the parser to manual recursive descent
- Added Void back in, no longer reusing empty tuples
- Fixed some Never handling bugs
- Things after Never aren't even evaluated, Hammer strips them out.
- Made Midas BlockState a linked list, so we can jump to the end of nearest loop
- Made Consecutor the only thing that could repeat expressions. Most blocks contain them now.
- Moved drop_into into builtins
- Made tuple an extern struct, using variadic members.
- Removed RawArray, it doesn't fit anymore since all RSAs are varying.
- Added an error for the rune type solver
- Separated a GlobalOptions module
- Removed astronomers specific rules
- Removed types from the astronomer rules.
- Learned: It's not always a great thing to denormalize data, it leads to inconsistency opportunities. An instance of premature optimization likely. Now I'm questioning why .ll does this.
- Added better humanizing of errors
- Added a MUCH better solver error printer
- Brought back the distinction between declaration names and imprecise names
- Made a better distinction between drop and free
- Fixed build failure counting bug in Tester
- Took out localRunes and knowableRunes from Astronomer, moved some of that logic back into astronomer.
- Learned: It's not always a great thing to pull as much logic as possible out of Templar. In this case, reducing the amount of code in Templar actually increased its complexity, ironically.
- Changed some astronomer tests into integration tests, feeding actual vale source code now.
- Learned: Unit tests have a high cost in maintaining the inputs. Perhaps unit tests only make sense on very established chunks of code.
- Moved a bunch of hardcoded functions (weaks, drop, free, array len, panic) to actual vale code.
- Removed special PackTT type.
- Added the "macro" concept, for any syntactical sugar features (or semantic sugar? like anonymous substructs, theyre kind of semantic sugar I guess?)
- Moved drop functions into macros.
- Moved anonymous substruct functionality into macros.
- Better distinction between a template name and a stamped name, see CitizenNameT vs CitizenTemplateNameT.
- Fixed types starting with _, like __Never
- Added free() functions for interfaces, which then call virtualfree(). Now, there is a normal free() function for every immutable type.
- Fixed printing exceptions twice in tests
- Added a "Location In Function" notion, so places in the code are marked by tree-shaped paths
- Made impl rules sane again, no more NMORFI!
- Changed the default namespace to __vale, for Midas
- Made the compiler spit out a different .vast per package
- Put the generated files in include/ and abi/
- Put generated .vast files into vast/, and .vpst files into vpst/
- Fixed exported mutable refs, they no longer require their members be exported too
- Using = instead of : for module mappings in the CLI
- Updated build instructions
- Added NodeEnvironment to templar for breaks too
- Made most of the expressiontemplar and nearby templars use NodeEnvironmentBox
- renamed constraint to borrow
- cleaned up precise vs imprecise names
- removed Maybe from variable uses
- Replaced builtin functions with generators
- Fixed kldc test