Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

a small language for representing calculations

branch: master

Fetching latest commit…

Octocat-spinner-32-eaf2f5

Cannot retrieve the latest commit at this time

Octocat-spinner-32 examples
Octocat-spinner-32 src
Octocat-spinner-32 test
Octocat-spinner-32 Makefile
Octocat-spinner-32 README.md
Octocat-spinner-32 package.json
Octocat-spinner-32 parser.js
README.md

Numberlang

A small language for representing calculations. Targeted at implementing map projections via code injection.

It's made to look like Javascript, and actually run as Javascript, though the implementation has no official relation. It's a compact language that should be easy to implement in C++ as well.

This is meant to be the endgame of the Project It Yourself project - a way to represent arbitrary projections in a code-as-configuration way that allows for autoconfiguration.

Goals

  • Secure: no access to Javascript objects
  • Only numbers allowed: no other types
  • Tiny implementation
  • Projections with parameters, like Albers, should be represented just like any other and must state default values: but they can be curried to provide those parameters.

Possible features:

FAQ

Why not JavaScript?

Security, simplicity and guarantees. There is no good way to clean untrusted JavaScript. It's easier to implement a simple language in other targets - like C++. And this will only fail in one way.

Why not EPSG or proj4 strings?

Because they rely on everyone having shared dictionaries of implementations, and agreeing on internal implementations.

Something went wrong with that request. Please try again.