The only primitives are numbers:
byte
short
int
,long
,double
float
and their unsigned alternatives...
Also, bool
(simple layer over numbers), array
and map
.
options { | |
prefix: 'MyAmazingCalculatorGrammar', | |
mixins: { | |
ExampleMixin: 'example_mixin.dart' | |
} | |
} | |
lexer { | |
// Tags for grouping tokens separately, i.e. comments | |
// ==UserScript== | |
// @name New Userscript | |
// @namespace http://tampermonkey.net/ | |
// @version 0.1 | |
// @description Turns your grades on Jupiter Ed to A's. | |
// @author Tobe O | |
// @match https://*.jupitered.com/* | |
// @require https://code.jquery.com/jquery-3.1.1.slim.min.js | |
// @require https://cdnjs.cloudflare.com/ajax/libs/mousetrap/1.6.0/mousetrap.min.js | |
// @grant none |
import 'dart:convert'; | |
import 'dart:io'; | |
main() async { | |
var client = new HttpClient(); | |
List<Cookies> sessionCookies = []; // Store our cookies here | |
// Let's login | |
var rq = await client.openUrl('POST', 'http://foo.com/login'); | |
rq.write('username=foo&password=bar'); |
// http://stackoverflow.com/questions/43519368/promise-practical-self-implement/43519600?noredirect=1#comment74092616_43519600 | |
function Promises(cb) { | |
if (cb) { | |
cb(Promises.prototype.resolve.bind(this), Promises.prototype.reject.bind(this)); | |
} | |
} | |
Promises.prototype.resolve = function(value) { | |
if (this.callback) this.callback(value); |
<!DOCTYPE html> | |
<html> | |
... | |
<body> | |
<script src="main.g.dart" type="application/dart"></script> | |
<script src="packages/browser/dart.js" type="text/javascript"></script> | |
</body> | |
</html> |
The only primitives are numbers:
byte
short
int
,long
,double
float
and their unsigned alternatives...Also, bool
(simple layer over numbers), array
and map
.
// See, now it's starting to look presentable. | |
def main ( | |
set x2 ( | |
for n in range(1, 100) ( | |
mul(n, 2) | |
) | |
) | |
set sum ( |
An ecosystem with complete conformity. At all times. Always. No doubt. Easy-to-write documentation.
For example, every asynchronous operation is either a Promise (one-time only), or a Stream (continuously fires events). There should be an official client API for consuming services over HTTP, etc.
import <http/client> as http
import <json> as json
The idea: Create frontend apps extremely quickly.
It's usually ridiculous tedious to create a frontend, because not only do you have to write code three times, but things like admin panels are very repetitive.
To combat this: