yabo's People
yabo's Issues
implement array functions
something like
{
length: u8l
array: [u16l; length]
}
to make an u16l
of length
equality is not implemented
will probably be just structural equality since i feel like custom implementations would be overdoing it
implement proper parsing
error diagnostics are bad with the tree-sitter parser
implement function arguments
the types implementations is mostly there, the biggest hurdle is going to be codegen
make layout interner not leak memory
since there are btreemaps inside a bumpalo arena, they don't get deallocated.
this is not a problem right now, since we are still a batch compiler.
backtracking and panicking
calling functions and accessing optional fields with ?
and !
should result in backtracking and errors. it should also give errors when a parser can backtrack, but is not marked with ?
check for recursive layouts
right now, when encountering recursive layouts (meaning that the underlying memory representation would take infinite memory on stack, not that they reference themselves), the compiler will enter an infinitely loop and exhaust memory.
as layouting is done by abstract interpretation, one could make an symbolic token with a path on it whenever one widens.
something like this:
struct SymbolicLayout {
origin: Symbol,
subpath: EliminatorPath,
}
when running eliminators on it, the same symbol is taken, but the eliminator path is extended.
constructors would embed the symbolic token into them.
on widening, whenever there is a MultiLayout
with one variant being a symbolic layout and another one where the subpath subtracted from the constructors it is embedded in (if applicable) is a strict ancestor of the outer symbolic layout, we make an diagnostic.
this requires a separate abstract interpretation pass where function arguments to functions of the same type are merged per parser so we do not end up with infinite callsites (this in turn also requires there to be finitely many types which also has to be detected).
size inference
for the mvp size inference, static size, data-independent size and arbitrary size should be implemented
from types should be optional
that way, one can define things like
def u8(val: int ~ 0..255) = val
to basically newtype a byte, but it is also useful for regular functions which do not operate on data
if statements are not typechecked
stuff like 'x' if 3
is currently not detected by the typechecker
add comments
there are no comments...
add language documentation
maybe a tour-style guide?
module system
something like
import foo
def for[u8] *> t = foo.bar
which then includes the file at foo.yb
relatively to the current file
implement refinement type system
this is very central, but also probably somewhat hard
`if` adapters
right now, one has to do something like
{
field: u16l
let _ = field if 42
}
to backtrack on a field value, but ideally this should be
{
field: u16l if 42
}
this requires extracting the mir of the if
part of all expressions
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. ๐๐๐
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google โค๏ธ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.