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

pipes-lang

v1.1.0

Published

Interpreter for PIPES 2D image programming language

Downloads

6

Readme

PIPES

PIPES is a image-based 2D programming "language". It follows "pipes" and executes operations when reaching pipes with specific colors. Most operations work on the stack, but you can save and load from memory.

Features

  • Drawing programs
  • No more writing programs
  • Input characters
  • Output numbers and characters
  • Basic arithmetic operations
  • Comparisons
  • Saving and loading to/from memory

Planned

  • Better input processing
  • Custom palettes
  • Better debugging
  • Better editing (custom IDE?)

Install PIPES:

$ npm install pipes-lang -g

You can use this palette file for Paint.NET.

Usage

  Usage: pipes [options]

  Options:

    -V, --version       output the version number
    -d, --debug         Debug mode
    -s, --strict        Strict mode
    -i, --input [args]  Input arguments
    -p, --stepwise      NOT YET IMPLEMENTED! Stepwise execution
    -h, --help          output usage information

Pipes

The program will always try to go straight, then right and then left.

Pipes aren't allowed to touch the image borders!

This is the standard palette, in the future I want to make it easy to use custom palettes.

Meta Pipes

|Color|Code|Name|Meaning| |-|-|-|-| |White|0,0,0|background|is ignored| |Black|255,255,255|default pipe|guides program| |Grey|127,127,127|blockade|low priority(only enters if there's no other way)| |Green|0,255,0|entry|program starts here| |Red|255,0,0|exit|program stops here|

Stack Operation Pipes

|Color|Code|Name|Meaning| |-|-|-|-| |Blue|0,0,255|push|the only pipe that needs an parameter afterwards, pushes the following pixel color number to the stack| |Yellow|255,255,0|remove|removes the top element from the stack| |Gray|127,127,127|blockade|low priority(only enters if there's no other way)| |Spring Green|0,255,144|stack to memory|saves the second element on the stack to the adress provided by the first element, the first element is removed| |Cyan|0,225,255|memory to stack|pushes the element at the adress provided by the top element on the stack and removes the adress element| |Malibu|127,127,255|duplicate|duplicates the top element on the stack| |Electric Violet|178,0,255|swap|swaps the top two elements|

Arithmetic Pipes

|Color|Code|Name|Meaning| |-|-|-|-| |Japanese Laurel|37,127,0|add|removes E1, E2 and pushes E1+E2| |Pigment Indigo|87,0,124|subtract|removes E1, E2 and pushes E2-E1| |Cedar Wood Finish|124,24,0|multiply|removes E1, E2 and pushes E1*E2| |Orient|37,127,0|divide|removes E1, E2 and pushes E2/E1|

Control Flow Pipes

|Color|Code|Name|Meaning| |-|-|-|-| |Pumpkin Skin|168,97,11|compare|compares E2 to E1, and changes direction depending on the result. equal: straight, greater: right, less: left| |Blue Chalk|248,214,255|teleport absolute|program jumps to position x = E2 y = E1| |Baja White|255,251,214|teleport relative|program jumps on position x = x+E2 y = y+E1|

I/O Pipes

|Color|Code|Name|Meaning| |-|-|-|-| |School Bus Yellow|255,216,0|input|no effect (yet)| |Blaze Orange|255,106|output|removes the top element from the stack and prints it| |Chardonnay|255,206,127|char output|removes the top element from the stack and prints the char with the char code provided|

All the color names are only the names of the nearest named colors.

Examples

(Please tell me how I can set images to display pixelated, this is awful.)

Basic I/O

When you input "r" it will output "right", when you input "l" it will output "left, otherwise it will return "-1".