Polyglot, document-based computing environment. Leisure is very much in flux, right now; please check the readme, below. For a taste of the new version, click the link below, but be warned that it only works in Chrome. This is a document about Leisure's EMACS connection.
JavaScript CoffeeScript CSS Emacs Lisp Makefile HTML
Latest commit ff86f61 Mar 2, 2017 Bill Burdick editor flow pic for docs
Permalink
Failed to load latest commit information.
METEOR-OLD Reintegrating Leisure into the environment Oct 12, 2015
atom-support/leisure atom fixes, code menus, ParsedCodeBlock, text src blocks, block var f… Apr 9, 2016
build declare fingertree lib, docs, remove jquery dependency Mar 2, 2017
css text alignment, floating, headline styles, caret positioning, getFile Sep 4, 2016
demo declare fingertree lib, docs, remove jquery dependency Mar 2, 2017
doc transaction and lens improvements, unit tests, DataIndexer, Wisp impr… Nov 23, 2016
elisp MUD plumbing, connection fix, data fixes, wisp fixes, logging Nov 19, 2016
font restoring theme selection Jul 26, 2015
leisure tangling; fix src mapping, code render, leisure exec & gen Jul 26, 2016
server Integrating Leisure with OT! Oct 11, 2015
src editor flow pic for docs Mar 2, 2017
test fixing name exports Nov 7, 2016
.floo floobits config May 3, 2014
.gitattributes fixed transaction model, removed spurious newline from headline rende… May 1, 2014
.gitignore Reintegrating Leisure into the environment Oct 12, 2015
.projectile fixing shadowRoot compatibility code to support new chrome versions Jul 24, 2014
ABOUT.org batching some data processing before main processing, adding to ABOUT… Aug 23, 2014
Cakefile working on eval Jun 21, 2015
LICENSE moving html updating code from collaborate to orgApi, fixing fancy re… Sep 19, 2014
Makefile experimenting with new codegen technique Jul 19, 2014
README.org error handling, env handling Aug 24, 2016
TODO.org code buttons, #+TITLE, prop inheritance, autoload, Wisp, scopes Nov 4, 2016
VIEWS.org starting reorganization Jun 21, 2015
build.sh build process, node path, starting lifts, named headlines, leisure da… Oct 29, 2015
debug.html (finally) switching to use requirejs for loading Jun 22, 2015
index.html code buttons, #+TITLE, prop inheritance, autoload, Wisp, scopes Nov 4, 2016
joinPath working on Windows/Mac build compatibility Apr 23, 2014
martini.ico collaborative code changes/fixes Jul 4, 2016
martini.png new blue martini icon Jan 22, 2014
repl add recurs, map defs, lounge setting, leisure eval, leisure loading; … Nov 24, 2015
repl.bat add recurs, map defs, lounge setting, leisure eval, leisure loading; … Nov 24, 2015
smart.json switching to meteor Apr 12, 2014
testPeer.html collaboration test code Aug 23, 2015

README.org

What is Leisure?

NOTE: LEISURE CURRENTLY ONLY RUNS IN CHROMIUM-BASED BROWSERS (LIKE CHROME).

demo/screen.png

Leisure is an open-source web-based platform for interactive editable documents in orgmode format that provides what we call Illuminated Programming. Leisure documents are:

  • modelessly editable (like Emacs!)
  • interactive
  • media-rich
  • web-based (zero install)
  • collaborative (both for editing and for applications)
  • codetime/runtime modeless (the same environment for developing and running)
  • reified: “the document is the program”
    • the program source document is also the presentation medium
    • changing the document changes the program and vice-versa (this goes for data, content, and also code)
  • introspective (documents can react to their own changes and alter themselves as they run)

Illuminated Programming is our term for application, source code, and data, all rolled up into one interactive, collboratively editable document. A Leisure document might hide its code and data and appear to be just an app or it might present the code and data along with the app(s), like this game in the old version of Leisure does, or it might be mostly a document with interactive examples in it.

Some of these ideas have been around for quite a while, Active Essays Hypercard, Mathematica, and Tiddly Wiki implement interactive documents that contain code and data, as do Emacs’ orgmode (of course) and Jupyter/iPython Notebook. Leisure is trying to add a few ideas to this field, like social coding, collaborative editing, and application collaboration.

Leisure is just a program in HTML/JS/CSS and it has a pretty simple architecture. It only needs a static HTML server for basic document operation. For collaboration, there is a small JavaScript server that can run in node.js. It’s easy to manage because it has so few requirements, which means less worry about language or library version conflicts. Documents are in orgmode format, which is a great foundation that already comes with a lot of the representational tools Leisure needs.

Leisure can also connect directly to an orgmode buffer running in Emacs or Atom. Once connected, Emacs/Atom and Leisure will mirror changes between each other.

TEAM CTHULHU has been working (somewhat) quietly on Leisure since 2011. This is a new version, we’ve been overhauling a lot of it, and we’re finally ready to talk more publicly about it.

Getting started with changing the Leisure codebase

Fetch the repo

Make sure you have coffeescript installed

  • make sure node is installed
  • make sure coffeescript is installed
    • npm install -g coffee-script

Have coffeescript compile in the background as you edit files

  • open a command prompt/terminal
  • change directories to the Leisure project
  • make coffeescript compile the files in src into build and watch them
    • coffee -cmw -o build src server
    • this is a very quick command but it won’t return because of the -w
    • the -w puts coffee in ‘watch’ mode, so it will sit there
    • it will sit there and wait for you to change files, comipling them as you do

test using a chrome profile that allows local file access

  • Run chrome with special chrome arguments
    • –allow-file-access-from-files –user-data-dir=LEISURE_DEVELOPMENT_DIR
    • LEISURE_DEVELOPMENT_DIR should start as an empty directory
      • it will contain the settings, bookmarks, etc. for your Chrome Leisure development
    • use slashes in LEISURE_DEVELOPMENT_DIR, NOT BACKSLASHES
  • Make a shortcut/alias to do this

Open Leisure

  • open the index.html file in the Leisure project with your special chrome instance

Connecting to Emacs

The emacs code lives in the Leisure repository, in the elisp directory. Soon, this will be published to Melpa but until then, for feedback purposes, you can get the emacs code by cloning the GitHub repository, adding the elisp directory to your Emacs load-path, and requiring leisure-connection-mode.

Please note, there are still bugs in the mirroring, but we may not know about all of them, so if you’re motivated to report them in GitHub, that would be nice :).

Once you have loaded the code in Emacs, you can open elisp/README.org for more instructions.

If you want to run the repl or change the Leisure language

Make sure you run npm install in the build and leisure/build directories

Packages we use

Contact

If you want to get in touch, you can email me at bill dot burdick at gmail.