close
The Wayback Machine - https://web.archive.org/web/20200907123148/https://github.com/Hakerh400/esolangs
Skip to content
master
Go to file
Code

Latest commit

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
 
 
src
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

readme.md

Esolangs

Image

This is a collection of interpreters for esoteric programming languages.

Number of languages: 60

How to install

First install Node.js version 14.8.0 or newer, then run:

npm i @hakerh400/esolangs

It will create folder node_modules and @hakerh400/esolangs inside it.

How to run

CLI

To run this program as a console application, open command line, navigate to the node_modules/@hakerh400/esolangs directory and type:

node index <language> <source> <input> <output>
  • <language> - the ID (not the name) of the esoteric language you want to use. For the list of supported languages and their IDs see esolangs.json.
  • <source> - path to the file containing the source code of the program you want to run.
  • <input> - path to the file containing program's standard input.
  • <output> - path to the file which the program's output will be written into. The file will be overwritten if exists.

For output-only languages the <input> parameter should be omitted.

For languages that support interactive mode (see api.md for details) you can
replace <input> <output> with --interactive flag. The standard input and output will be used instead of files.

If any error occurs, it will be written to the console and the output file will not be created.

API

Example of using @hakerh400/esolangs in a Node.js application:

'use strict';

const esolangs = require('@hakerh400/esolangs');

const lang = 'brainfuck';
const source = '+[-->-[>>+>-----<<]<--<---]>-.>>>+.>>..+++[.>]<<<<.+++.------.<<-.>>>>+.';
const input = '';
const output = esolangs.run(lang, source, input);

console.log(output.toString());

For the full API documentation, see api.md.

Contributing

See contributing.md.

Mirrors

About

Collection of interpreters for esoteric programming languages

Topics

Resources

License

Packages

No packages published
You can’t perform that action at this time.