One static binary with a web server, a reverse proxy, a repl and a formatter already inside it. What you copy to a server is a single file, and it runs on a machine with nothing else installed.
The language pulls in no third party code at all. It runs on Quark, which is quick enough to stay out of the way.
Hand written, with no parser generator and no third party code anywhere in the language. Expressions compile down to closures instead of running through an interface, and names resolve to indices while they compile, globals to slots and locals to a reusable stack, so a call allocates nothing at all.
A bytecode machine was measured too, and lost. Go has no computed goto, so every opcode leaves through the same switch and the processor sees one unpredictable branch. The numbers stay in the test suite, which is how the question stays settled.
| Strategy | Per op |
|---|---|
| Compiled closures | 2.37ns |
| Bytecode machine | 12.01ns |
| Interfaces | 13.14ns |
go test -bench Dispatch ./src/expr/ instead of taken on trust.The web module is compiled into the binary rather than fetched. Static files get clean urls and no directory listings, pages can be built by your own functions, and every server carries read, write and idle timeouts whether you ask for them or not.
import web func home(path) { return ["<h1>hello from atom</h1>"] } web.handle("/", home) web.listen(9143)
Lists and maps round-trip through tojson and fromjson without a package, a decoder or a struct to declare first. Files, strings and maths are the same story: they are builtins, so there is nothing to install before the first useful program.
var data = [name: "atom", tags: ["fast", "small"]] write("out.json", tojson(data)) var back = [fromjson(read("out.json"))] each tag in [back @ "tags"] { print([upper(tag)]) }
Static files with clean urls, or pages built by your own functions. Mime types are registered rather than guessed, and every server carries read, write and idle timeouts.
Send several domains to separate targets, with certificates from Let's Encrypt on request. It refuses to ask for one until you name the domains.
Try a statement as you type it. State carries between lines, and a block keeps taking input until you close it.
Indentation and trailing space, tidied. The check mode exits non-zero, so it drops into a pipeline without any extra glue.
Install a folder or a zip. Archives that climb out of the install directory, or expand far past their size, are refused rather than trusted.
The language depends on no third party code. What you copy to a server is a single file that runs on a machine with nothing installed.
Not a static host. The site runs on the language it documents, on the web module listed above, behind the proxy listed above it. What follows is the whole of it.
import web web.static("./site") web.notfound("404.html") web.route("/", "index.html") web.host("127.0.0.1") web.log(true) web.listen(9143)