line-oriented presentation-optimized live coding in javascript
JavaScript CSS HTML
Switch branches/tags
Nothing to show
Latest commit efad207 Jun 22, 2017 @tmcw committed on GitHub Merge pull request #39 from mbostock/patch-1
Fix a few links.
Permalink
Failed to load latest commit information.
css
js Use auth token for requests as well Mar 1, 2017
local Do not get pwned Feb 19, 2013
.eslintrc.js
CNAME
LICENSE Use source code pro, license, readme. Thanks @williamscraigm Jan 31, 2013
README.md Fix a few links. Jun 20, 2017
favicon.png Moving more into modules, using CodeMirror from a module. Mar 6, 2013
index.html Add authentication, gist updates, sentry. Fixes #28 Aug 5, 2013
index.js Use auth token for requests as well Mar 1, 2017
package.json

README.md

mistakes.io

live-coding, oriented towards giving presentations about programming and showing what you mean.

Require

require functionality is powered by live-require

There is one additional 'feature' of the interface. A magic function called require will include a javascript file by URL, on the page. Here's an example.

Gists

mistakes supports loading from GitHub Gists to help you share code better. When you see a URL like http://mistakes.io/#5051892 that means it's loading the gist at https://gist.github.com/tmcw/5051892.

It works with anyone's gists. The expectation is that gists contain a single Javascript file - you can add a README too if you give it a file extension other than .js, like if you name it README.md.

Notes

There are a few 'principles' of mistakes:

Mistakes does not do magic. There is no complicated code compilation or parsing - it's just eval. See the incremental eval module, which powers this part of mistakes. What works in Javascript works in mistakes. Therefore, there's very little code - less than 200 sloc if you don't count CodeMirror, the editor component.

Local

There are three rules of presenting:

  1. Never ever rely on the internet for a presentation.
  2. Always have a VGA adapter at all times.
  3. Only present about things you're interested in.

Mistakes now helps with #1. Instead of counting on GitHub Gists for samples when giving a live presentation, clone (or download) this repository and drop Javascript files in the local/ directory. I've included equals.js in there as an example.

Then boot up a server, and go to http://localhost:3000/#yourfile.js or whatever.

Developing Locally

Clone this repo and run npm install && npm start

Building

Run

npm install
npm run build

This will build the js/bundle.js built file.

See Also