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

slangroom-exec

v1.1.0

Published

The missing slangroom executor. We are working the .wasm transpile of the slangroom, but in the meantime this repo could be used similar to the `zencode-exec` to embed [https://dyne.org/slangroom](slangroom) into other languages.

Downloads

11

Readme

slangroom-exec

The missing slangroom executor. We are working the .wasm transpile of the slangroom, but in the meantime this repo could be used similar to the zencode-exec to embed https://dyne.org/slangroom into other languages.

slangroom-exec is a simple utility that reads from STDIN the following content

  1. conf
  2. slangroom-contract
  3. data
  4. keys
  5. extra
  6. context

separated each per new-line and encoded in base64 and outputs the slangroom execution to stoud.

💾 Install

wget https://github.com/dyne/slangroom-exec/releases/latest/download/slangroom-exec-$(uname)-$(uname -m) -O ~/.local/bin/slangroom-exec && chmod +x ~/.local/bin/slangroom-exec

check that works by running:

wget -O - https://raw.githubusercontent.com/dyne/slangroom-exec/main/test/fixtures/welcome.slex| slangroom-exec

Demo

Slangroom-exec Demo

SLangroom-EXec Format Encoder

This script is used to encode the format of the slangroom-exec command into a string that can be used in the slangroom-exec command.

The script accepts the six parameters that are used in the slangroom-exec command and encodes them into a string. The encoded string is then printed to stdout.

Usage

For each of the parameters, the script also has option flags:

-c or --conf for conf
-s or --slangroom-contract for slangroom-contract
-d or --data for data
-k or --keys for keys
-e or --extra for extra
-x or --context for context
-F or --filename lookup files based on a prefix
-h or --help to print the help message

The named convention -F option flag

When you have a suite of files if you follow the formal slangroom name convention as such:

conf: `${prefix}.conf`
slangroom-contract: `${prefix}.slang`
data: `${prefix}.data.json`
keys: `${prefix}.keys.json`
extra: `${prefix}.extra.json`
context: `${prefix}.context`

you can just run:

slangroom-exec -F prefix

STDIN

if you just pass something in /dev/stdin is interpreted as the contract. This also overwrites the --slangroom-contract option flag if passed as a duplicate.

Examples

To encode a slangroom-contract, you can run:

cat slangroom-contract.slang | slexfe

To encode parameters from a file, you can run:

slexfe -s slangroom-contract.slang

To load data and keys

slexfe -s slangroom-contract.slang  -d slangroom-contract.data.keys -k slangroom-contract.keys.json

To load many files with a correct naming convention

slexfe -F prefix