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

runiq

v0.0.10

Published

A little scripting language interpreted by JavaScript and inspired by Lisp

Downloads

25

Readme

Runiq (WIP)

Runiq is a little Lisp-inspired scripting language that runs atop JavaScript.

Runiq is three things: (1) A syntax that makes it easy to express async algorithms as functional data structures, (2) a JavaScript-hosted parser and interpreter that can run Runiq code on most platforms, and (3) an API for DSL-building that you can use to create your own mini-languages.

Runiq is free software, released under an ISC License.

Try Runiq »

Features

  • Lisp-esque syntax
  • Runnable in Node or browser
  • Functional paradigm
  • Human-writable JSON AST
  • Async processing
  • Stepwise computation (pause & resume)
  • Code as data, data as code
  • Serializable programs & state
  • DSL builder for developers
  • Localizable
  • Macros (coming soon)

Example

Here's a sample Runiq program:

; Compute eighth Fibonacci number ;
(ycomb (lambda fn n (quote
  (if (<= n 2)
    (quote (1))
   else
    (quote (+ (ycomb fn (- n 1))
              (ycomb fn (- n 2)))))
)) 8)

And here's the AST of that same program:

["ycomb", ["lambda", "fn", "n", ["quote",
  ["if", ["<=", "n", 2],
    ["quote", [1]],
   "else",
    ["quote", ["+",
       ["ycomb", "fn", ["-", "n", 1]],
       ["ycomb", "fn", ["-", "n", 2]]]]]
]], 8]

For more, see the Runiq wiki »

Installation

Runiq may be installed via NPM:

$ npm install runiq

For more, see the Runiq wiki »

Usage

Programmatic

Here's the simplest example:

var Runiq = require('runiq');
Runiq.run("(+ 5 3)", {
  success: function(result) {
    // result will be 8
  }
});

Lower-level hooks are available.

For more, see the Runiq wiki ».

Command Line

To use the Runiq CLI, install Runiq globally...

$ npm i -g runiq

Then try this:

$ echo '(print "Hello World")' > hello.rune
$ runiq hello.rune

Or open a (feature-lacking) "REPL":

$ runiq
> (+ 1 2)

For more, see the Runiq wiki ».

API Documentation

Motivation

Runiq begain as an experiment in safely running untrusted code. I wanted to create a mini-language that could act as a sandbox, whose level of "power" I could easily customize for different users and use cases. I wanted a language where...

  • Sandbox escape would be impossible (by default)
  • Coders could gain access to language features via trust systems
  • No requirement of booting up a VM
  • Programs could run "anywhere"
  • I could pause long-running (or never-ending) programs...
  • ...and resume them without corrupting their state

Along the way I added more requirements (why not?), such as the ability for engineers to plug their own keywords into the language, and a Lisp-inspired syntax that could be approachable for beginners yet also appealing to hackers. The result is what you have here.

For more, see the Runiq wiki »

See Also

Help & Troubleshooting

Join the Runiq Slack channel.

Reporting Bugs

File bugs on GitHub Issues.

Development

To get your local setup going:

  • Clone the repo
  • npm install
  • npm run test

Contributing

Please submit pull requests!

Author

Matthew Trost

Copyright

Copyright (c) 2015-2016 Matthew Trost

License

ISC License. See LICENSE.txt.