Coder Social home page Coder Social logo

moonad-archive / formality-javascript Goto Github PK

View Code? Open in Web Editor NEW
72.0 15.0 4.0 6.43 MB

An implementation of the Formality language in JavaScript

License: MIT License

JavaScript 85.37% Nix 14.63%
moonad formality interaction-nets inets lambda-calculus javascript

formality-javascript's Introduction

Formality.js

Main repository for the JavaScript implementation of the Formality language.

Documentation.

Base libraries.

You can install Formality via npm with:

$ npm i -g formality-lang

Or via nix with:

$ git clone https://gitlab.com/moonad/Formality-JavaScript.git
$ cd Formality-JavaScript
$ nix-channel add https://nixos.org/channels/nixpkgs-unstable unstable
$ nix-env -f default.nix formality-lang

It can be used from the terminal with the fm command, or as a library with require("formality-lang").

formality-javascript's People

Contributors

evaporei avatar gabriel-barrett avatar jimmyhmiller avatar johnchandlerburnham avatar lqd avatar maisamilena avatar victortaelin avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

formality-javascript's Issues

ReferenceError: TextEncoder is not defined

The setup

I went to the wiki and followed the step in "0. Installation" successfully:

>> node -v

v8.16.0

>> npm -v

6.4.1

>> fmc

Formality-Core
...
Note: fmc will automatically import any local file ending in .fmc.

>> lsb_release -a

No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 18.04.2 LTS
Release: 18.04
Codename: bionic

The hello world file main.fmc:

def main:
  "Hello, world!"

The error

>> fmc main

/home/dan/opt/npm/lib/node_modules/formality-core/fm-core.js:819
var bytes = [].slice.call(new TextEncoder("utf-8").encode(text), 0);
^

ReferenceError: TextEncoder is not defined
at text_to_term (/home/dan/opt/npm/lib/node_modules/formality-core/fm-core.js:819:33)
at parse_term (/home/dan/opt/npm/lib/node_modules/formality-core/fm-core.js:171:14)
at Object.parse (/home/dan/opt/npm/lib/node_modules/formality-core/fm-core.js:287:18)
at Object. (/home/dan/opt/npm/lib/node_modules/formality-core/main.js:57:28)
at Module._compile (module.js:653:30)
at Object.Module._extensions..js (module.js:664:10)
at Module.load (module.js:566:32)
at tryModuleLoad (module.js:506:12)
at Function.Module._load (module.js:498:3)
at Function.Module.runMain (module.js:694:10)

The error seems to appear also when called on a file that does not exist

>> fmc doesnotexist

/home/dan/opt/npm/lib/node_modules/formality-core/fm-core.js:819
var bytes = [].slice.call(new TextEncoder("utf-8").encode(text), 0);
^

ReferenceError: TextEncoder is not defined
at text_to_term (/home/dan/opt/npm/lib/node_modules/formality-core/fm-core.js:819:33)
at parse_term (/home/dan/opt/npm/lib/node_modules/formality-core/fm-core.js:171:14)
at Object.parse (/home/dan/opt/npm/lib/node_modules/formality-core/fm-core.js:287:18)
at Object. (/home/dan/opt/npm/lib/node_modules/formality-core/main.js:57:28)
at Module._compile (module.js:653:30)
at Object.Module._extensions..js (module.js:664:10)
at Module.load (module.js:566:32)
at tryModuleLoad (module.js:506:12)
at Function.Module._load (module.js:498:3)
at Function.Module.runMain (module.js:694:10)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.