Code Monkey home page Code Monkey logo

rmutt.js's Introduction

Build Status Coverage Status dependencies Status devDependencies Status

rmutt.js

rmutt.js is a transpiled language for generating random strings from context-sensitive grammars.

That may sound a bit dry but can actually result in a tremendous amount of fun and several practical and not so practical applications. Any application where random combinations of symbols can provoke amusing, aesthetic or inspirational effects, can be implemented with relative ease using rmutt.js.

rmutt.js is a reimplementation of the C project rmutt by Joe Futrelle.

Read more about it:

Possible application domains


rmutt.js's People

Contributors

rstuven avatar greenkeeperio-bot avatar

Stargazers

Rhea Myers avatar lagleki avatar  avatar Klemen Slavič avatar Joey Carr avatar Stephen avatar Niemes avatar Ramon Blanquer avatar  avatar Jessica Claire Edwards avatar James Walker avatar Daniel Hurley avatar Eaton avatar Javier Honduvilla Coto avatar Javier Arce avatar Mikhail Sedletsky avatar Pavlos Touboulidis avatar

Watchers

 avatar James Cloos avatar Oxomoxo avatar Daniel Hurley avatar Joey Carr avatar  avatar

rmutt.js's Issues

Suspected ID conflict with choice rules in included files

This is a really neat project; thanks for your work on it. I think I've discovered a repeatable issue to do with ID assignment for choosers: the grammar 'test.rm':

https://gist.github.com/danielghurley/2bb2e7fda7b992e42289#file-test-rm
https://gist.github.com/danielghurley/d605305ef43c4373a20d#file-first_include-rm

has one rule with a choice defined in the main text, and two more rules with choices defined in 'first_include.rm'. When you run it:

rmutt text.rm

should expand to text which always finishes with either 'first main option' or 'second main option', but occasionally it returns nothing on the third line. From inspection of the transpiled code:

https://gist.github.com/danielghurley/d39e278b1b44c3f09332#file-test_transpiled-txt

It looks like 'main_rule' (l916) and 'third_include_rule' (l1908) have the same ID, and I think this is a problem. The behaviour above doesn't occur if third_include_rule has the same number of possible choices (2) as 'main_rule'.

From inspection of the pegjs code, I think maybe nextId is not being incremented correctly during transpilation, and that means occasionally the chooser will return an index which is out of bounds for the array of choices. I am happy to try and fix this and submit a PR but I don't know much CoffeeScript or pegjs right now.

Single file version for browser

Use case: To use the tool in a browser based environment, e.g. because setting up node is not feasible or because one wants to provide a live-editing version etc. it may be useful to have a file which can be used via in a <script src="…

Credit Joe Futrelle

I'm the original author of the C version of rmutt, could you credit me in the docs and link to the rmutt github repository at joefutrelle/rmutt? Thanks.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.