- fire when data changes
- API
- add(data)
- remove(data)
- update(data, oldData)
- code block that defines API methods that react to index changes
- API
- indexChange(newIndex, oldIndex)
- add(data)
- remove(data)
- update(data, oldData)
- multiuser
- songs
- organize patterns
- patterns
- monadic
- chain can handle runtime changes
- need a way to commit blocks
- a way to switch from the old definition to the new
- still saves changes
- has notion of “currently edited version”
- maybe allow a #+COMMITED keyword between #+BEGIN_SRC and #+END_SRC
- code between #+COMMITED and #+END_SRC is the committed code
- code between #+BEGIN_SRC and #+COMMITTED is the editing version
- data
- sorted by position value
- each pattern defines its own index
- entries are created muted – use active flag to turn on a piece of data
- data controls the song
- player state is local
- monadic
- each browser has its own player
- procedures can change the player objects
- inserting in a blank name slot should create a name keyword
- newlines don’t work properly
- make changeStructure return existing changed blocks (added or changed, not removed)
- call executeSource from editBlock instead of keyup
- keep change count in info block
- cache code in leisure block and keep change count
- edits recache code and propagate to connected clients
- initial reads recompile code with old counts
- connected clients can ignore cache updates from reads if block text hasn’t changed
add support for multiple property values
- inspector button on code scope
- highlight view under mouse
- show data, viewdef, & controller
- allow linking codeviews
Right now, properties are stored in chunks following headlines
- editor for plain and fancy modes
- customize key bindings (backspace vs. fancyBackspace, etc.)
- factor out editor into tiny extensible package
- save other people from this pain
- list difficulties
- talk about model-generation solution
base it on org text, not DOM text
- use shadow to rearrange parts, etc. like
- simplify markup for views based on chunks
- headline boilerplate
- headline content
- headline tags
- headline properties
- headline contents
- meat
- other headlines
- defs run all the time
- notebook-only blocks run only in the notebook
- HTML & CSS blocks
- integrate compilation into backend for importing – keep compiled version in Mongo
- in notebooks, newly declared js/cs variables won’t add to the scope
- use a nested eval function to access private variables
- for new code, use parser check for new variables
- if there are new variables, generate a new nested eval function
- a page refresh will probably be needed if nesting level becomes too great
- in testShadow view definition
- beginning of 2nd line (under <span>)
- record ids of data fetched in the block
- buffer up “puts”
- send puts to the server along with fetched ids
- fail if sent ids are not current ones
- should bind.cons just be a map?
- IO monad could convert values to IOs
- [(print 1) (print 2)] could print 1 and 2
- could uncomment and use asIO for this
- could fix compiler so it works in this model
- index defs that refer to empty indexes
- data index names for indexes that only contain one piece of data
- use the info record to report changes
switch from persistent-hash-trie to immutable-js
- it’s already located in 5-immutable.js
- parse code to find function names
- add properties to funcs after eval
- when a symbol is redefined, increment a version counter
- mark top-level functions with the version counter value at compile time
- when a function runs, check the version number
- if the function is out of date, recompile it
- use new name space for evaluated defs
- L_x is a function
- L$_ is the result
- this allows funcs to resolve global names in advance
- this trades off one verrsion check for all of the global name function calls
- maybe just a random URL, for now
- * Caveats slide is not parsed as a slide
- newline at end of list double NL after it is not properly rendered in fancy
- multple documents on a session
- show users’ cursors/selections
- react to adds/changes/removes of widget types in HTML blocks (preparse attributes)
- hooks for programs to react to data changes (subscriptions)
- headline property: import
- the imported doc may inject data into the headline with copy-on-write
- blocks have origin set to the document id
- when there’s a change, make a clone if there’s an origin
- delete and reinsert space
- moving forward at EOL requires two key presses
- AST buttons hork
- problems only occur with local editing, not remote
- deleting newlines should regen the HTML
- fancy deletes before or after the current block should be disallowed
- headline is immediately followed by an HTML block
- inline mode: http://ckeditor.com/demo#inline
- use advanced content filter for supported markup
- use dataProcessor to convert HTML/orgFile
- bind arrow keys in editor to move between regions
- make HTML blocks explicitly create an HTML chunk
- blank lines make paragraphs so blocks can be inline
- use contenteditable to selectively allow editing in source views, etc.
- markup is breaking
- this allows inline views to work
- meat-breaks should be paper-thin divs
- changed approach
- an inline code editor
- an inline results box view
- an inline code + results view
- shortcuts to create the two views
- put results in all at once instead of incrementally
- indexedDB reorg
- use a single db to store all Leisure data for a site
- makes it easier to toast data
- use an object store to register all DBs with expiration dates
- scan registry whenever a page opens to remove expired dbs
- use a single db to store all Leisure data for a site
- user accounts
- prevent spam on announcement
- protected files (only demo mode allows anonymous editing)
- metadocuments
- contain protection info
- user permissions
- only owners can directly edit metadocument
- prevent spam on announcement
- make trivial code block headers/footers hidden and slide out when you focus in the code
- add “index” attribute to yaml blocks
- :index names[name] numbers[number]
- format: indexName[attrName]
- indices[indexName][attrName] = [data…]
- “index” helper {{#each (index ‘cards’ player)}} … {{/each}}
- uses index on cards: :index cards[player]
- iterates over a player’s cards
- time-travel slider
- go back in time to any point in the session
- go back to checkpoints that are earlier than the session
- keep all changes on server? – could trim by checkpoint at need
- fix Leisure build process
- optimize fully applied function calls
- create main func anc call that instead of partial funcs
- don’t use reflection to record args)
- use views for everything
- slides
- code blocks
- Use GUI templates for slides
- hide/show code blocks/block comments
- switch to object.observe() for change monitoring
- cleanup observers[] and codeContexts[] when a code block disappears
- JavaScript/CoffeeScript source blocks
- Leisure “model” type (like html or svg results)
- useful in code views
- collaboration
- show users’ cursors/selections
- persistence: git
- toggle synchronizing
- document history/branches? This would require a merge tool…
- multiple documents per session (each document can function as a data channel)
- server-side code can transfer data into a document – inbox documents
- X GUI templates – HTML source block defines a new widget type
- X define handlebars helpers for input, views, etc
- X widget code blocks (like test cases)
- X draggable images
- X data
- notes
- slide clones
- code scopes
- Compilable notebooks (all Leisure source code in viewable/editable *.lorg format)
- make fancyOrg:getSelectionDescriptor line-based for better selection preservation
- collaboration service
- handle local adds/removes
- show users’ cursors/selections
- persistence: git
- Leisure could run on a server or in one of the browsers (in a WebWorker for sandboxing)
- notebook monadic environment
- print can patch the notebook
- some monads can remotely to all notebooks or just the current notebook
- notebook commands
- patch notebook
- Leisure commands
- broadcast notebook patch
- eval
- toggle synchronizing
- X each document gets local storage for user-local and user-private data
- X “:local: true” blocks are in the document, initialized for everyone, but stored locally
- X head record contains unique ID
- X reinitializes private document when it changes
- JavaScript and CoffeeScript src blocks
- Compilable notebooks
- into JavaScript module
- export data sets
- data
- query
- use datalog, like datomic?
- query
- security
- run privileged code only in a web worker
- fancy/basic mode for each slide
- notes
- Types of slides (value of “note” property)
- open slide – can contain sidebar notes (this is the default value of the note property)
- sidebar
- float
- note property changes slide presentation into floating note or sidebar note
- each slide could have a control to turn it into a note
- like a Smalltalk workspace, but a full sub-document
- Types of slides (value of “note” property)
- slide clones
- cannot contain sidebar notes
- event framework – use script tag to bind events on parent when it is displayed
- local things – only exist in your browser, not part of the shared doc, but logically part of it
- treated as part of doc for local user; code scopes index them, etc.
- local slides
- local-on-write – local slide created on editing that overrides slide
- notify user if original changes (use SHA)
- allow revert
- local properties – useful for private notes, etc
- defs in local notes should be loud
- some local slides could be shared across documents
- import shared local notes by tag
- take HTML markup out of name block and put it in CSS
- make code-names auto-create
- generate empty div for people to type a name in
- code scope – set of code boxes retrieved from doc
- as many code scopes as you want
- block/function search
- filter by tag – useful for DSL help, etc
- list of blocks/functions
- caller/callee functions
- hovering over a function should pop up a panel with a button for callers/callees
- block edit history (list of function names which can expand to editable contents)
- sort history chronologically or alphabetically
- expand this to a search box, callers, callees
- contents should be editable
- attach to
- document
- slide
- use unlabelled issues for comments, since other people can’t add labels
- fix test cases
- bug: expanded test cases will sometimes get double comment blocks added in the DOM
- bug: headline tags don’t render properly
- bug: links don’t parse right at the beginning of a section
- bug: test cases don’t preserve the expected value
- bug: sometimes the click() functions are ignored on the next/prev slide buttons
- bug: doesn’t handle empty expressions in a test case
- allow easier creation of code boxes
- allow retroactively adding code name and doc strings to existing code boxes
- doc strings (text after name) – pop up on mouse over (if mouse stays on word for a while)
- parse lorg files from command line
- list parsing: items are only under a list if they are indented past the dash
- on github save conflict, create temp branch and merge it
- hide comments button when editing a local file
- tutorial
- use private COW notes for exercises
- key bindings
- link selections in AST display and source text
- toggle button for plain/fancy on boxes? This would allow editing output
- straighten out root.currentMode and root.orgApi
- session persistence for each Leisure doc
- save selection and scroll offset of doc
- save contents and locations open code scopes
- svae contents and locations of private notes
- libraries
- copied into the document, not externally referenced
- should contain their own version and location info so you can update
- probably copied as a child of a “libraries” slide
- pluggable page elements
- ”#+BEGIN_SRC css :id steampunk” could redefine the steampunk style
- an HTML block with an id can replace the whole Leisure bar (rebind events afterwards)
- undo tree, like in emacs
- name spaces
- background Leisure execution
- run monads in a web worker
- useful for intensive Leisure code that analyzes documents, etc
- Java code generation
- Alternate code generation should speed up execution
use array values instead of function values – already getting arguments array, anyway
[value] or [null, func]
if length == 2, then it has not been memoized, yet.
- precompiled docs
- load the doc – don’t run code in the doc
- load the JS file
- [ ] full-screen app mode (for Leisure button?)
- [ ] recursive let defs don’t work
- [ ] forward references in let don’t work
- [ ] fix headline tag fancy markup; check property example
- [ ] support Ast display for let blocks
- [ ] scrub ‘: ’ out of expected value tooltips
- [ ] put code into tooltips, above expected value
- [ ] make test case creation run the code?
- [ ] doc comments -> function properties / usage hover help
- [ ] Simple pattern matching
- [ ] Make repl parse org format
- [ ] Make arrow buttons show for non-dynamic code blocks
- [ ] Simplified exprs, like in calc
- [ ] Source maps
- [ ] Make Leisure button show controls
- Runs in a browser
- You don’t need to own a computer
- No install needed
- Can use Github for storage
- ASTs
- Dynamic expressions (value sliders help)
- Test cases run when code changes
- Display partially applied functions in a way that makes sense!
- Good for books and tutorials
- code and examples all work
- better than a REPL
- REPLs are mostly read-only (except for the bottom line)
- better communication
- modify/run test cases and example code
- [ ] (DEMO) HTML in the doc can be accessible to the program
- maybe actual code reuse, because people can understand how to use your code!
- pride of ownership – you can make your source code fun to look at (imagine…)
- Reproducible research
- programs can contain their own examples and example data
- data is in the document itself
- programs can modify the document
- Get feedback from other people directly on your code
http://lindacee.hubpages.com/hub/Toasters-of-the-1920s https://www.pinterest.com/esmellaca/art-deco/
- [X] save to file & github
- [X] Saving to github/restfulgit – restfulgit not done
- [X] update qr-codes
- [X] change slide controls to page up/down
- [X] ast for myLast leaves out lines after first
- [X] Convert old slide presentation
- [X] Art deco look
- [X] Get “add comment” working
- [X] Test cases (create test case button, etc.)
- [X] Theme switch monad (in case steampunk theme doesn’t work with projector)
- [X] markup (images, links)
- [X] markup (bold, italic, underline)
- [X] markup (make bullets look nicer)
- [X] vertically center displayed HTML
- [X] parse list items
- [X] Slide view
- [X] Value sliders
- [X] Make reparsing just reshow the results, not reexecute the exprs
- [X] only execute defs on load or keypress – don’t execute dynamics except on kepress
- [X] ASTs
- [X] make results HTML-friendly
- [X] fix problem with left-right arrows when in number spans
- [X] Talk: Disclaimer
- work in progress
- some rough-cuts have already been polished (to some extent)
- Talk: Stuff to play with
- A new language (with some neat stuff)
- A new environment (with some neat stuff)
- For kids!
- For grownups!
- Maybe even jaded, expert grownups…
- [X] Talk: Crisis in the field
…current incoming students have grown up with video games and use iPhones daily. Furthermore, they now arrive from high school with incredibly weak backgrounds. We used to require calculus before beginning CS. But now we don’t require calculus at all! (Or we’d have no majors.) When they see programming, even in very high-level languages, many incoming students recoil. They really enjoy using computers and may have even installed Windows, but they don’t like building things…
– private communication from a prominent CS professor
- And yet, Minecraft is so popular…
- People even build computers inside of Minecraft, like NandToTetris…
- Programming for me is a lot like Minecraft
- Can help it be more like Minecraft for other people?
- Talk: Project Hieroglyph
I have followed the dwindling of the space program with sadness, even bitterness. Where’s my orbiting, donut-shaped space station? Where’s my fleet of colossal Nova rockets? Where’s my ticket to Mars?…
“You’re the ones who’ve been slacking off!” proclaimed Michael Crow, the President of Arizona State University, when I ran all of this by him later. He was referring, of course, to the science fiction writers. The scientists and engineers, he seemed to be saying, were ready, and looking for things to do. Time for the SF writers to start pulling their weight!
– Neal Stephenson
Stephenson has put together a project to get write stories that are, “throwbacks, in a manner of speaking, to 1950′s-style SF, in that they would depict futures in which Big Stuff Got Done”
- Talk: Dynabook
- Alan Kay’s concept from 1972
- goes back to his research in the 60s
- We already have machines powerful enough
- Maybe a special type of document can provide what’s missing…
- It needs to be free and easy to use (no install, etc.)
- What if each document was like its own computer?
- documents can contain media
- versioning can provide state
- What the document’s source was meant to be part of the document itself
- End-user multimedia document
- Interactive
- Annotated source code (maybe hidden by default)
- Editable at runtime
- These concepts aren’t that new, they just hasn’t been that accessible to people, lately
- Smalltalk – a smalltalk image is almost a document (not really linear)
- Hypercard
- EMACS, with file-local variables
- Oberon (Acme, Wily, Ober)
- Tiddlywiki
- Mathematica is probably the closest thing to Leisure out there
- It’s far from free
- HTML5 really has a lot of promise for this!
- HTML is made for documents (uh… duh?)
- You can edit HTML in a browser
- HTML documents can present a lot of different types of media
- web services can fill in the blanks
- In Stephenson’s book Diamond Age: Or, a Young Lady’s Illustrated Primer, the primer is essentially a dynabook
- Alan Kay’s concept from 1972
- [X] Talk: computing education
- fun is important
- promote building
- promote pride of ownership
- documents, not just source fies
- media embedded in documents
- each document can be like a tiny computer
- improve communication and understanding (human-human and human-computer)
- REPLs are good, but they are mostly read-only, except for the line at the bottom
- Watch expressions are good
- why can’t you have some that run /all the time/
- watch expressions are almost test cases…
- Interactive examples directly in the source
- Interact with the program directly through the source code
- Interact with the author directly through the source code
- With better understanding, people might actually reuse code
- instead of rewriting it
- promote exploration – peeking under the hood
- view ASTs
- dynamic expression results update as you type (or slide)
- dynamic test cases update as you type
- partially applied functions are completely first-class (parameters are visible and usable)
- [X] Talk: orgMode – a document-centric view of computing
- very rich /text/ documents that produce more than just nice looking text
- Leisure functions inherit block name & tags
- data storage in document
- a document can act to some extent like a Smalltalk image
- remote documents fit well with the web
- tags for code visibility, categorization
- docs can run code when loaded (def blocks – old EMACS trick)
- JavaScript orgMode parser is a separate open source project
- [ ] Talk: HTML5, contenteditable, DOM/text conversion
- [X] Talk: Github hookup
- storage
- you see other peoples’ comments in your code (Github lets you ban them, too)
- you can comment on other peoples’ code
- [X] Talk: partial application
- [ ] Talk: function advice (talk about advice names), defCase
- [ ] Talk: document storage
- [ ] Talk: future: code scopes view document as a code database
- search box lets you edit in-place
- names and tags for code blocks
- [ ] Talk: future: code google
- static inclusion (updatable subdocuments)
[Org Syntax](http://orgmode.org/worg/dev/org-syntax.html)
namespace for pattern match macros
match obj left l -> print concat[‘left ’ l] right r -> print concat[‘right ’ r] -> print concat[‘bad type: ’ either]
left and right are pattern-match macros, defined with defPattern, stored in a pattern alist
defPattern left obj | hasType obj left -> [(obj id id)] defPattern right obj | hasType obj right -> [(obj id id)]
match uses continuation pattern to build up expr:
l = obj id id
r = obj id id
.
hasType obj left
print concat[‘left ’ l]
hasType obj right
print concat[‘left ’ l]
print concat[‘bad type: ’ obj]
[]
[x y | z] x is the first item y is the second item z is the rest of the list
[|z] z is the entire list, but it must be a list (or vector, etc.)
{key:pattern key:pattern …} like {“hello”: h} keys can be any expression and are evaluated in order: {“hello”:h h:x x:y}
{x y z} same as {“x”:x “y”:y “z”:z}
Add “mark as unread” button https://github.com/rogerwang/node-webkit/wiki/Using-Node-modulesmake bs/del reach across hidden content
asciitosvg https://bitbucket.org/dhobsd/asciitosvg
JointJS library http://www.jointjs.com/
Graphdracula http://www.graphdracula.net/
Snap http://snapsvg.io/
e=equal [1]
e [1] -> true
e 1 -> function (L_b){return resolve(L_b)} – looks like it applied the false to something
make altDef take two functions, a boolean and the definition
replace string typechecks with wrappers move typecheck wrappers into a correctness.lsr file
Filters are monadic, but macros are notcreate a forwarding func that uses the given properties and reuses the old func’s type
Mark it as a forwarder so if you copy it again, you refer to the original, not the forwarder
So far, increasing the stack is OK for this- takes path and delta
- add currentDocument, ‘person1.hands.left.fingerCount’, -1
- x-tags for polyfills
- make org-based widgets
- use switch for plain/fancy
- chuck shadow and use tagged elements for file content
- flip editable content into shadow dom
- keep HTML/etc in regular dom
- use content elements to sprinkle decorations
- easier to use jquery for HTML/views/etc
- X define handlebars helpers for input, views, etc
- collaboration
- each document gets local storage for user-local and user-private data
- “:local: true” blocks are in the document, initialized for everyone, but stored locally
- head record contains unique ID
- reinitializes private document when it changes
- each document gets local storage for user-local and user-private data
- make image dragging and collaboration use data binding – maybe backbone
- only reprocess changed parts
- unreparsed can remain as-is
- store each slide separately in JS object storage
- compile JS code
- each slide gets an object id – for text and data
- each slide can be individually parsed
- text representation
- :DATA: drawer
- first line is ID
- rest of lines are YAML
- [rejected] stored by ID in a hamt
- easy functional manipulation
- handles versioning well
- functional code can manipulate internal hamt
- accumulate changes
- merge them with current data
- listener fires when data changes
- Collaboration engine
- use meteor for collaboration
- put org data structure into mongo
- Use mongo instead of textContent to switch modes
- Use change processing to handle local structural changes
- Handle node addition/removal
- make data live in src blocks with language yaml or json
- detect where changes are, to avoid rerendering/recomputing data
- use a switchboard web service, like from p2pmud, with file-patching commands
- use meteor for collaboration
(< 1) should print out as < 1, instead of
function (y) {
return booleanFor(rz(x) < rz(y));
}
Probably have to change function model to use objects instead of closures (maybe possible with debugging api?)
change caseDefs to use advice instead of options – i.e. continuation pattern uses L_baseLoadString and that calls countedRunLine countedRunLine binds each line as moandic value this strips off options, etc. use the new code that checks for invisible contentResults go after #+RESULTS:, with : at the start of each line evaluation clears out the previous : lines right underneath RESULTS, like this…
console.log('hello\nthere\n')
return 3
newline at start of hidden text should be ignored
[HTML5 Rocks article](http://www.html5rocks.com/en/tutorials/developertools/sourcemaps/)
replace type checking with preconditions
handle monads (bind the post condition check)
embedded exprs and variable defs would have a closure – resolve() can tack a property on the closure, containing the result
for the funciton wrapper, set the memo to the lambda and stick a console.log in there to see if something’s still calling the func
do (x = 1) (y = x) (print concat[x y])
add text positions to ast nodes
make world-dominating calculator unlike any ever seen!
A comment issue holds the developer comment and shows up in the source file. Any comments on the comment issue show up in the source file as well.
Issues which reference a function will also show up in the source.
handle backspace after and delete before hidden content
nextNode() & prevNode() should do the trick, I think – see if nextNode(el).prevNode(el) is el or an ancestor of it
if node.previousSibling/node.nextSibling exists and is visible, then backspace/del is OK
- code block name
- headline tags