scizzorz / mask Goto Github PK
View Code? Open in Web Editor NEWA programming language, revisited in Rust.
License: MIT License
A programming language, revisited in Rust.
License: MIT License
From here:
The first argument to require() is a string name. picotool finds the file that goes with the string name using a library lookup path. This is a semicolon-delimited (;) list of filesystem path patterns, where each pattern uses a question mark (?) where the string name would go.
eg: (*local).cur =5
--> .cur = 5
ie, x :: null
should remove the metatable of x
rather than setting it to the object null
Right now the lexer can't fail, even in weird cases like forbidden characters and unclosed strings. That's not right.
Right now, you need to do this funky thing:
f = fn(...)
...
f = f :: whatever
but I think something like this might be more fun:
f = fn(...) :: whatever
...
Seriously, caches can be annoying when you're changing the compiler internals. I think Python might use -b
for this?
Maybe with the :
or @
sigil or something. I dunno.
The groundwork is in the parser right now, but it doesn't do much.
Or something... hmm.
Rust's match
blocks have some neato features, like range matching and stuff. Is there a way to make an operator that can work like that?
~Rust:
match x {
0 => ...
1..9 => ...
10 | 20 | 30 | 40 | 50 | 60 | 70 | 80 | 90 => ...
_ => ...
}
Python:
if x == 0: ...
elif 1 <= x <= 9: ...
elif x in (10, 20, 30, 40, 50, 60, 70, 80, 90): ...
else: ...
Mask:
if x ? 0: ...
elif x ? 1..9: ...
elif x ? [10, 20, 30, 40, 50, 60, 70, 80, 90]: ...
DUNNO.
semck
needs to do some transformation here.
And correspond panic statements.
Ehh something like this:
x = ["zero", "one", "two", age=5, [3] = "three"]
Where the first set of things are 0-indexed per usual, but once you go to a Mask-style kwarg, you can't go back.
ie, instead of just a panic message
eg return, break, continue, panics
Some way to break out of multiple loops? Possibly even 'break' out of an if block?!
Something like this:
x = 'x'
y = 'y'
s = scope
x = 'hello'
print(x) # 'hello'
print(y) # 'y'
print(x) # 'x'
print(s.x) # 'hello'
And then maybe borrow the initial supertable assignment from the #33?
s = scope :: some_other_table
...
Also, rename ExecuteErrorKind::Exception
-> ::Panic
Whoaaaa this is where the prelude / builtins can goooo
How is this gonna work
I don't think -
works right now.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.