Skip to content
master
Go to file
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
src
 
 
 
 
 
 
 
 
 
 
 
 

README.md

regexp-golf-coffeescript

Regular expression golf (finding a short regexp for a set) implemented in coffeescript

See blog post @ http://www.doboism.com/blog/2014/01/19/coffeescript-regex-golf

###How to run###

Main Coffee under Node:

coffee src/main.js

In code or in the console:

regexpGolf = require('./src/regexpGolf.coffee')
Set = require('./src/set.coffee')

winners =  new Set(['fireman', 'trucker', 'samurai', 'chef'])
losers = new Set(['lawyer', 'senator', 'waiter', 'chief'])

settings = {
  randomFactor: 1
  branches: 2
  depthBranches: {}
}

console.log regexpGolf.find(winners, losers, settings)

For the browser: open browser/index.html

Test and build

Install grunt-cli and the package

sudo npm install -g grunt-cli
npm install .

grunt

About

Regular expression golf (finding a short regexp for a set) implemented in coffeescript

Resources

License

Releases

No releases published

Packages

No packages published
You can’t perform that action at this time.