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 🙏

© 2026 – Pkg Stats / Ryan Hefner

mirandaort

v0.83.0

Published

Miranda lazy functional programming interpreter (native C, npm CLI wrapper)

Readme

Miranda

Mira is the Miranda lazy functional programming system (interpreter).

Prerequisites

You need typical Unix build tools:

| Tool | Purpose | |------|---------| | GCC or Clang | C compiler (macOS Xcode Command Line Tools provide gcc/clang) | | GNU Make | Build driver (make) | | strip | Optional size reduction step (usual on Unix) | | Node.js 18+ | Optional — runs npm scripts at the repo root (npm run compile, npm start) |

Optional, only if you regenerate the parser from rules.y:

  • Berkeley Yacc (byacc) — GNU Bison/yacc is not interoperable here. Install with Homebrew (brew install byacc), then align the Makefile’s YACC line with byacc if needed.

Fresh checkouts normally build using the bundled y.tab.c / y.tab.h, so byacc is not required until you edit rules.y.

Install from npm

Requires Node.js 18+, gcc/clang, and GNU make (same as building from source). The package compiles the native mira binary on install.

npm install -g mirandaort
mira -version
mira                    # interactive session
mira -exec script.m     # run script (must define main)

Local project install:

npm install mirandaort
npx mira -version

Published package: mirandaort on npm. Miranda Studio (studio/) is not included in the npm package.

Installation (step by step)

1. Get the sources

Clone or unpack the archive, then enter the project directory:

cd /path/to/miranda

2. (Recommended) Refresh build state on this machine

This removes old objects, removes generated Miranda bytecode cached under miralib/ and miralib/ex/, and refreshes .host:

make cleanup

3. Build

make

This produces:

  • mira — the interpreter
  • miralib/menudriver — helper used by the standard library layout
  • Precompiled library pieces (e.g. miralib/prelude, miralib/stdenv) and examples under miralib/ex/ via ./mira -make …

Inspect the top of the Makefile if you must change compiler or flags (CC, CFLAGS).

npm workflow (alternative to make / ./mira)

From the repository root you can build and run the interpreter with npm scripts. This does not start Miranda Studio (studio/ is optional and separate).

npm run compile    # bootstrap + build ./mira (same result as step 3 above)
npm start          # interactive Miranda session
npm run version    # print interpreter version
npm run exec -- miralib/ex/fib.m   # run a script (requires main = …)

npm run compile creates missing bootstrap files (miralib/.version, fdate, .host) before calling make. If make warns about miralib/prelude not found, the C interpreter may still build; you need the full standard library tree for example bytecode and %include modules.

Reset build state with npm run clean (same as make cleanup).

4. Run

From the repository root:

./mira

That starts interactive Miranda (see the original README for /e, /man, etc.). Example scripts:

./mira miralib/ex/fib.m

Print version:

./mira -version

Run a one-shot script via stdin (-exec):

echo 'main = "hello"' | ./mira -exec /dev/stdin

By default mira looks for the library beside the current layout (miralib under this tree). Override with MIRALIB only if your layout differs:

MIRALIB=/path/to/miralib ./mira …

5. (Optional) System-wide install — root only

Adjust BIN, LIB, and MAN at the top of the Makefile, then as root:

sudo make install

This copies mira, miralib, and mira.1 into /usr/bin, /usr/lib, and /usr/share/man/man1 or the paths you configured.

6. (Optional) Release tarball — root only

sudo make release

Creates a ./usr/ tree under the repo and a .tgz suitable for unpacking at / on a machine of the same architecture (details in README).

Troubleshooting

  • make cleanup chmod errors — run from a writable clone; scripts call chmod/unprotect against miralib/.
  • Optimisation / GC instability — the garbage collector can break under aggressive optimisation; edit CFLAGS (try no -O or a different compiler), as explained in README.
  • byacc: command not found — only affects rebuilding from rules.y; install Berkeley yacc or rely on shipped y.tab.c/y.tab.h.

For platform-specific tweaks and #ifdef-style patching, keep using the authoritative plain-text README (maintainer instructions).

Miranda Studio (Node UI)

A small React + Vite + Monaco Editor IDE in studio/ shells out to the compiled mira binary (no JavaScript interpreter):

  1. Build the core system first: make in the repository root.
  2. Install and run the web app:
cd studio
npm install
npm run dev

Open the URL Vite prints (default http://127.0.0.1:5173). Use Run or ⌘↵ / Ctrl+Enter to evaluate the script; main must be defined (same as mira -exec). Use Add library to insert %include <studio/…> lines; add-on modules live under miralib/studio/ (same resolution rules as %include <ex/…>).

Production:

cd studio
npm install
npm run build
NODE_ENV=production npm start

The API listens on 127.0.0.1:4987 by default. Override with MIRANDA_STUDIO_PORT. Long runs are stopped after MIRA_TIMEOUT_MS (default 30000).