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

ribbons

v0.0.5

Published

A robotics software development framework for Node.js: sensors, controllers and actuators.

Downloads

10

Readme

Ribbon

A robotics software development framework for Node.js.

Sensors, Controllers, Actuators - SCA.

Overview

Information flows: sensors -> controllers -> actuators

Debugging flows the other way: actuators -> controllers -> sensors

Therefore we tie the controllers to the actuators.

Logo Ideas

Ribbon Cable Wikipedia Ribbon Cable Image Modify Ribbon Farm logo so that components are connected to a breadboard via a ribbon cable

TODO

is there a way to automate the creation of components based on them being in the proper directories?

New

Create a new ribbon project:

ribbon new

Creates directory structure:

* app
  * actuators
  * controllers
  * sensors
* config
* doc
* lib
* log
* test
  * actuators
  * controllers
  * sensors

Adds /package.json with dependencies:

* vows

Install vows globally to get vows command working? Or mask it behind a ribbon command?

npm install vows -g

Generate

Generate actuators, controllers, sensors and custom objects.

$ ribbon generate
Usage: ribbon generate GENERATOR [args] [options]

...


Please choose a generator below.

Ribbon:

  actuator

  controller

  sensor

  generator

  ...

Generate a solenoid

$ ribbon generate solenoid BrakeDrum

creates:
  * app/actuators/brake.drum.js
  * test/actuators/brake.drum.test.js

Usage Notes

Remember evertything in JavaScript is an object. If you're coming from a class-based langauge you'll need to drop the duality between classes and objects and just roll with the fun.

about inheritance and 'as' function. the thought is 'as' has a nice prototype ring to it. for example, i can use an LED object as a protoype for a solenoid. actuating the solenoid is a lot like blinking a LED. so, we use Led as a Solenoid: Led.as(Solenoid);.

Sensors are Emitters.

Controllers are Listeners.

Sensors communicate with Controllers via Events.

Controllers contain Actuators and acuate them via function calls.

MVC versus SCA

In an MVC framework like Ruby on Rails there is one model, one view and one controller for each class. For example a model for people would look like

/controllers/people_controller.rb /models/person.rb /views/people/edit.html.haml /views/people/index.html.haml /views/people/new.html.haml /views/people/show.html.haml

Ribbons tries to realize some of the benefits of predictable file naming conventions and locations so that as projects grow and the teams that work on them evolve it's easier to be productive.

view -- controller -- model >-< models

Ribbons uses a model of Sensors, Controllers and Actuators. While this is helpful there isn't a 1:1:1 relationships among the components. In fact, it's often interesting to have many sensors impacting the same actuator. And likewise it's common to have multiple actuators impacted by one sensor. So, what do we do? Controllers are defined by the many sensors and actuators they control.

sensors >-< sensors >- controller -< actuator >-< actuator

Content That Inspired Ribbon

http://web.media.mit.edu/~lieber/Lieberary/OOP/Delegation/Delegation.html http://www.laputan.org/reflection/warfare.html