Skip to content

Never: statically typed, embeddable functional programming language.

License

Notifications You must be signed in to change notification settings

never-lang/never

Folders and files

NameName
Last commit message
Last commit date

Latest commit

cdf5043 · May 12, 2024
May 12, 2024
May 6, 2024
May 15, 2020
Oct 9, 2019
May 11, 2024
Nov 29, 2023
Nov 29, 2023
Nov 29, 2023
Jun 15, 2018
Sep 9, 2020
Aug 23, 2021
May 26, 2018
May 12, 2024
Jun 16, 2018
Jul 19, 2018
Jul 19, 2018
Aug 16, 2020
May 15, 2020
Jun 6, 2020
Aug 6, 2020

Repository files navigation

Never - Functional Programming Language

Version Codecov

Never is a simple functional programming language. Technically it may be classified as syntactically scoped, strongly typed, call by value, functional programming language.

In practise Never offers basic data types, assignment, control flow, arrays, first order functions and some mathematical functions to make it useful to calculate expressions. Also it demonstrates how functions can be compiled, invoked and passed as parameters or results between other functions.

Getting Started

It is easy to download and compile Never language. Just clone repository and make the compiler in a few basic steps. To read more visit readthedocs.io site.

Prerequisites

Never requires basic Linux installation to be built. The following tools and libraries are needed:

  • gcc
  • glibc
  • bison / flex
  • libmath, libdl and libffi

Installing

Never can be installed in steps:

  • clone repository
  • cd never
  • mkdir build; cd build
  • cmake ..; make

asm.js wasm

To compile for asm.js or wasm targets use the following commands:

Get the latest sdk: git clone https://github.com/emscripten-core/emsdk.git

cd emsdk
./emsdk install latest
./emsdk activate latest
source ./emsdk_env.sh

Compile to native asm.js

mkdir build && cd build
emcmake cmake .. -DJS_ONLY=ON 
make

Compile to native wasm

mkdir build && cd build
emcmake cmake .. -DWASM_ONLY=ON 
make

Run

Now you should see never.js file in your build directory. You can overwrite ../never.js and open never.html, or modify never.html to load build/never.js file or load the file in JS console and run:

python -m SimpleHTTPServer 8000
# http://localhost:8000/never.html
var never = Module.cwrap('never','number',['string']);
never("func main() -> int { 123 }")

Contributing

All help is welcome! Using it, reporting bugs, spreading the word, writing code samples, blogs, submitting ideas, documentation, new features. Everyone is invited to contribute.

License

This project is licensed under the MIT License.