tyroxx / lpg Goto Github PK
View Code? Open in Web Editor NEWa new programming language with safe, static types
License: MIT License
a new programming language with safe, static types
License: MIT License
integer[0, 2]
Make it so that you can also print non string values
let a = (b < c)
We could just disallow potentially ambiguous code. This would not compile:
let a = b + c * d
This woud compile:
let a = b + (c * d)
let f = (a: int(0, 3), b: int(0, 2))
a
f(1, 2)
b
is not being used, so this program can be reduced to:
let f = (a: int(0, 3))
a
f(1)
We need a way to pass functions around, for example like this:
let run-twice = (f: function<unit>)
f()
f()
run-twice(() print("!"))
Output:
!!
Add match statements to the functionality of LPG and the documentation
let f = (first: array<let Element, let FirstLength>,
second: array<let Element, let SecondLength>)
requires integer-equals(first.length, second.length)
//...
//compiles:
f({}, {})
//does not compile because the precondition is not fulfilled:
f({}, {1})
A function should be able to call itself if it is defined like this:
let f = ()
f()
interface printable
print(): string-ref
impl printable for string-ref
print()
return this
impl printable for integer<let Min, let Max>
print()
return integer-to-string(this)
let print = (printed: printable): unit
printed.print()
TODO: Implement bitshift and bitwise operations.
no sharing of mutable data, just fork/join
and for other two-state enums
Add documentation on how to build the project under Windows.
let a : type-of(2) = 2
Constant folding currently happens during initial type checking of the AST, but we are missing an optimization pass that can be run after other optimization passes.
The type of a string literal should know its length, for example like this:
let a : string-ref<int<3, 3>> = "abc"
let sqlite = import sqlite
Currently reallocate array reallocates the array every time maybe a more memory efficient thing would be good.
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.