npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

@naanlang/naan

v1.4.1

Published

Naan™ software platform

Downloads

104

Readme

Naan

Naan is an async-first software platform for rapid development.

Release:

     Naan for NPM version 1.4.1+1
     Copyright (c) 2017-2024 Zulch Laboratories, Inc.

Features

  • Naan runs in NodeJS and web browsers using JavaScript
  • Based on an asynchronous LISP-2 engine with persistent execution
  • The default Lingo™ surface language provides familiar Algol-style braces syntax
  • Fiber-based concurrent execution without async or await declarations
  • Provides tuples, objects, closures, macros, lexical and dynamic binding
  • Module and package support with namespaces and write-protect isolation
  • Preserves referential integrity when communicating among workers or hosts
  • Plugin architecture enables alternate languages and functionality
  • Custom language syntax can be added through simplified dialect extensions
  • Integrates transparently with all existing JavaScript libraries
  • Can save and reload running program state across page loads or lambda invocations
  • Lightweight and efficient

Installation

Please ensure you have a recent version of node.js. The minimum is v16.20.2

For use everywhere as a command line app:

sudo npm install @naanlang/naan -g

For use as a library in the current project:

sudo npm install @naanlang/naan

Command line execution

naan [options] [source file] [arguments]

With no arguments Naan runs as an interactive REPL using the node.js terminal.
It can also evaluate an expression or execute a source file.

Command line usage
-e <expression>             evaluate an expression
-i, --interactive           use REPL with -e or [source file]
--version                   print Naan version
--buildno                   print Naan version with build number
-h, --help                  print usage information

Naan prints the results of evaluating each expression with the REPL, but not by default with an expression or source file. The interactive flag overrides this to print the result of each expression in all cases.

Example shell commands

Define a function, call it, and return the length of the base-10 result. First recursive and then tail recursive:

% naan -e "function fact(x){if x>0 x*fact(x-1) else 1}(1000).length"
2568
% naan -e "function factr(x,a){if x>0 factr(x-1,x*a) else a}(10000,1).length"
35660

Fetch your public IP from a website (NodeJS version 18 or later):

% naan -e "new(await(await((js.g||js.w).fetch('https://api.ipify.org/?format=json')).1.json()).1)"
{ ip: "64.205.147.202" }
Shell scripting

When installed globally, Naan can be used for shell scripts with the Shebang mechanism. For example, copy the following text to a file named helloworld:

#!/usr/bin/env naan
printline("Hello World")

Now make it executable with chmod:

chmod a+x helloworld

For More Information

www.naanlang.org has tutorials, explanations, and how-to articles.
The NaanIDE installation includes reference documentation.
Please email Richard Zulch with questions and comments.

Dependencies:

We gratefully acknowledge these software packages used with Naan: