Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

evanup

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

evanup - npm Package Compare versions

Comparing version 0.1.2 to 0.1.3

lib/lang/cmd.d.ts

2

cmd.js
#!/usr/bin/env node
require("./lib/cmd.js");
require("./lib/lang/cmd.js");
{
"name": "evanup",
"version": "0.1.2",
"version": "0.1.3",
"description": "a vaguely lispy language in the context of javascript",

@@ -12,22 +12,18 @@ "repository": {

},
"main": "lib/index.js",
"typings": "lib/index",
"main": "lib/lang/index.js",
"typings": "lib/lang/index",
"scripts": {
"test": "npm run build && tape lib/test/*.js lib/**/test/*.js | tap-diff",
"test-watch": "npm run build && npm run watch & tape-watch lib/test/*.js lib/**/test/*.js -p tap-diff",
"karma": "karma start --log-level error",
"test-diff": "tape lib/**/test/*.js | tap-diff",
"test": "tape lib/**/test/*.js",
"test-watch": "npm run watch & tape-watch lib/**/test/*.js -p tap-diff",
"karma": "karma start --log-level info",
"karma-watch": "WATCH=true karma start --log-level error",
"clean": "rm -fr lib && rm -f public/bundle.js",
"build": "npm run clean && tsc",
"prepublish": "npm run test && npm run build && npm run build-r2",
"watch": "npm run clean && tsc --watch",
"build-ide": "NODE_ENV=production browserify -p tsify -r ud/noop:ud src/ide/main.tsx | uglifyjs -c > public/bundle.js",
"watch-ide-hmr": "watchify src/ide/main.tsx -p browserify-hmr -p [ tsify --sourceMap ] -o public/bundle.js -dv",
"watch-ide-hmr": "watchify src/ide/main.tsx -p [ tsify --sourceMap ] -p browserify-hmr -r chloride/browser:chloride -o public/bundle.js -dv",
"watch-ide": "watchify src/ide/main.tsx -p [ tsify --sourceMap ] -r ud/noop:ud -r chloride/browser:chloride -o public/bundle.js -dv",
"build-ide": "NODE_ENV=production browserify -p tsify -r ud/noop:ud -r chloride/browser:chloride src/ide/main.tsx | bundle-collapser | uglifyjs -cm > public/bundle.js",
"ide-hmr": "npm run clean && ecstatic -p 8070 public & npm run watch-ide-hmr",
"watch-ide": "watchify src/ide/main.tsx -p [ tsify --sourceMap ] -r ud/noop:ud -o public/bundle.js -dv",
"ide": "npm run clean && ecstatic -p 8070 public & npm run watch-ide",
"build-r2": "NODE_ENV=production browserify -p tsify -r chloride/browser:chloride src/r2/main.tsx | bundle-collapser | uglifyjs -cm > public/bundle.js",
"watch-r2": "watchify src/r2/main.tsx -p [ tsify --sourceMap ] -r chloride/browser:chloride -o public/bundle.js -dv",
"r2": "npm run clean && npm run start & npm run watch-r2",
"start": "ecstatic -p 8070 public"
"ide": "npm run clean && ecstatic -p 8070 public & npm run watch-ide"
},

@@ -74,3 +70,2 @@ "contributors": [

"karma-browserify": "^5.1.0",
"karma-chrome-launcher": "^2.0.0",
"karma-jsdom-launcher": "^5.0.0",

@@ -103,3 +98,3 @@ "karma-tap": "^3.1.1",

"tslint": "^4.4.2",
"typescript": "^2.1.4",
"typescript": "^2.2.1",
"ud": "^3.1.0",

@@ -116,11 +111,10 @@ "uglify-js": "mishoo/UglifyJS2#harmony",

"includePaths": [
"src/r2/",
"src/ide/editor/",
"src/ide/",
"src/"
"src/editor/"
]
}
]
],
"brfs"
]
}
}

@@ -1,38 +0,85 @@

# Evan: EValuation of Abstract Nodes
# evan\up [wip]
A vaguely Lispy language in the context of JavaScript.
<todo-description>
The Evan language is implemented by means of an *evaluator*, which transforms *any* JSON into a JavaScript value. Often, this is again JSON but it can also be React DOM elements which are then rendered into a browser.
Visit [evanup.io](https://evanup.io) to see it in action.
The evaluation is in principle functional, in the sense that evaluating the same piece of JSON leads to the same result.
```
npm install evanup
```
Also, the evaluation is wired to happen incremental (using [mobx](https://github.com/mobxjs/mobx)), so (small) changes to the JSON input should only require a partial re-evaluation for better performance.
[![build status](https://app.wercker.com/status/c007ef99033cffce90bc5fe5efae10d1/s/master "build status")](https://app.wercker.com/project/byKey/c007ef99033cffce90bc5fe5efae10d1)
[![NPM version](https://badge.fury.io/js/evanup.svg)](http://badge.fury.io/js/evanup)
# Development
<todo-retro-80s-logo>
The main goal of the *Evan programming language* is to bootstrap a working, functional-style general purpose programming language which nestles comfortably in the JavaScript-world, complete with tools like an IDE.
# Evan
It also ports selected virtues of a number of existing languages (most notably: Lisp) to the context of JavaScript.
Evan's language constructs (aka *semantics types*, or *sTypes* for short) are structurally described in [description.json](./description.json) file.
The IDE should (eventually) be implemented as an Evan program itself, making it meta-circular.
As an example, a `binary operation` definition looks like this:
To get started with development, clone this repository and run `npm install` or `yarn`, or whatever :)
```json
"binary operation": {
"properties": {
"operator": { "type": "string" },
"left": { "type": "any" },
"right": { "type": "any" }
}
}
```
# NPM scripts
and here is an excerpt from an Evan _program_ that uses this definition:
Type `npm run NAME` to execute any of the commands below:
```
"body": {
"$sType": "if-then-else",
"condition": {
"$sType": "binary operation",
"operator": "<",
"left": {
"$sType": "value reference",
"name": "n"
},
"right": 2
}
```
| name | description
| ------------- | -------------
| `test` | run evaluator & meta-model generation tests
| `test-watch` | run evaluator & meta-model generation tests in watch-mode
| `clean` | clean build artifacts
| `build` | transpile `ts(x)`'s to `lib/` dir
| `watch` | transpile `ts(x)`'s to `lib/` in watch-mode
| `karma` | run browser tests in jsdom
| `karma-watch` | run browser tests in watch-mode
| `build-ide` | build ide browser bundle
| `watch-ide` | build ide browser bundle in watch-mode
| `ide` | start a development server at [http://localhost:8070](http://localhost:8070) and run `watch-ide` in parallel
For Evan, JSON is chosen as the concrete syntax- because it is a very well-known and supported format, [and it's true.](https://www.youtube.com/watch?v=ELD2AwFN9Nc)
But, of course, *writing* a program in JSON is tedious, uncomfortable and unproductive: after all, we'd be writing ASTs in a verbose form.
# evanup.io
Enter [evanup.io!](https://evanup.io), evanup is a peer to peer, decentralized webrtc client / projectional editor for building evan programs with friends in real-time.
It's built on top of [many](https://github.com/mobxjs/mobx) [amazing](https://github.com/mafintosh/hyperlog) [technologies](https://github.com/Starcounter-Jack/JSON-Patch), which one of them happens to be _Evan_ evaluator itself.
# Execution == Evaluation
Evan "works" by providing the *evaluator* with *any* JSON input, and optionally an object table (external-objects).
The evaluator then tree-transforms this JSON according to the following rules:
* Objects which have a string-valued property `$sType` are processed by their respective evaluation function.
* This evaluation *never* throws but returns something sensible: either an issue object or `undefined` (which corresponds loosely to e.g. Scala's `None`).
* The individual evaluation functions determine whether recursion into sub-values of sTyped objects happen.
* All other values (so also objects which are not "sTyped") are returned as-is.
## On type checking
* Evaluation does (some) type checking - which obviously happens at runtime.
* A separate type checker (once it exists) mimics the evaluator but computes and checks typing statically: this should help the developer beyond what's reasonable in terms of unit tests.
* Evan is not statically typed, but could at some point become optionally-typed.
# external Objects
_External Objects_ is Evan's way of interfacing with things outside any Evan program on its own. It's nothing more than a map/dictionary of names to objects, which expose functions. Using the semantics type `object-function invocation`, you can interact with functions on these objects.
# Development
To get started with development, clone this repository and run `npm install` or `yarn`.
<todo>
# Usage

@@ -50,17 +97,4 @@

# Documentation
* [What's been added recently](./docs/updates.md)
* [How to contribute](./docs/contributing.md)
* [TODOs that form a short-term roadmap of sorts](./docs/todo.md)
* [A primordial design](./docs/design.md)
* [The _External Objects_ mechanism](./docs/external-objects.md)
# About the name
As you've probably already noticed, the "Evan" acronym is awkward. That's because is retrofitted to the name of Meinte's first-born :)
# License
MIT
mit

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc