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

@cicada-lang/mugda.sexp

v0.1.13

Published

An implementation of the [Mugda paper](docs/papers/termination-checking-for-a-dependently-typed-language--karl-mehltretter.pdf) by Karl Mehltretter.

Downloads

16

Readme

Mugda

An implementation of the Mugda paper by Karl Mehltretter.

The "Mu" of the name "Mugda" comes from μ-operator (mu-operator) of general recursive function.

Notes about our implementation:

  • Use S-expression as overall syntax, to expression ideas clearly.
  • Close to the paper, so that the code is easy to be reviewed with the paper.
  • Add comments about alternative ways to implement the same ideas.
  • Do not follow bad naming conventions of the paper.

Usages

Use our server

mugda-server: A server that can run mugda code.

Run a file:

curl https://mu.cic.run --data-binary @docs/tests/basic/let.test.mu

Run multiline text (bash and zsh):

curl https://mu.cic.run --data-binary @- << END

(data Nat () ()
  (zero () Nat)
  (add1 ([prev Nat]) Nat))

(fn add (-> Nat Nat Nat)
  [(x (zero)) x]
  [(x (add1 y)) (add1 (add x y))])

(add (add1 zero) (add1 zero))

END

Command line tool

Install it by the following command:

npm install -g @cicada-lang/mugda.sexp

The command line program is called mu.

open a REPL:

mu repl

or just:

mu

Run a file:

mu run docs/tests/basic/id.test.mu

Run a file and watch file change:

mu run docs/tests/basic/id.test.mu --watch

Run a URL:

mu run https://cdn.mu.cic.run/docs/tests/basic/id.test.mu

Notes

Zero arity data constructor

When using zero arity data constructor, we must write them in (). For example, zero and (zero) are the same.

But when using zero arity data constructor in pattern, we must write them in (). For example, we should not write zero but write (zero), otherwise the interpreter can not distinguish pattern variable from this zero arity data constructor.

Syntax of inductive datatype definition

The syntax of inductive datatype definition -- (data), is learnt from "The Little Typer".

Examples

TODO

Please see docs/tests/ for more examples.

Development

npm install           # Install dependencies
npm run build         # Compile `src/` to `lib/`
npm run build:watch   # Watch the compilation
npm run format        # Format the code
npm run test          # Run test
npm run test:watch    # Watch the testing

Thanks

Thank you, Karl Mehltretter, for writing this paper.

Contributions

To make a contribution, fork this project and create a pull request.

Please read the STYLE-GUIDE.md before you change the code.

Remember to add yourself to AUTHORS. Your line belongs to you, you can write a little introduction to yourself but not too long.

It is assumed that all non draft PRs are ready to be merged. If your PR is not ready to be merged yet, please make it a draft PR:

During the development of your PR, you can make use of the TODO.md file to record ideas temporarily, and this file should be clean again at the end of your development.

License

GPLv3