Hi and welcome to the np reference site. np is an attempt at making a small and minimal programming language for web development.

What's np?

  • a duck-typed scripting language that aims to be easy and productive to work with. It is lexically scoped, puts a big emphasis on working with lists, and provides first class functions.
  • object-oriented, but it's neither based on classes nor on prototypes. Instead, objects can implement behaviors that respond to events.
  • syntactically separates object methods from data properties, so the two never conflict.
  • enables concurrent programming without callbacks or promises, instead it adopts Lua's coroutine approach to sequentially reason about concurrency.

This is still a work in progress and the language as well as its standard libraries are not stable yet. However, there is enough substance to play around with it, and you can safely try it out in the browser by visiting the tutorial.

What are the dependencies?

I tried to use as little external frameworks and libraries as possible, and this is actually the second iteration of the language. The first one was written in Java, and while it was interesting and kind of worked, it became clear to me that I wanted to switch to a more minimal environment. So this second incarnation is written in C, loosely based on the Lua runtime which is fast, small, and easy to modify - and a lot of modifications have been made. The only dependency is libc.