Skip to content

Latest commit

 

History

History
189 lines (137 loc) · 8.86 KB

words.md

File metadata and controls

189 lines (137 loc) · 8.86 KB

Problems

  • Alignment for the left and right panes isn't totally clear, and it's often pretty confusing because you're not mentally totally sure which input corresponds to which output.

    • I've played around with highlighting the cell pair for the most recent output, but it's confusing in its own right (you might be editing some other cell but your attention would be constantly pulled toward the previous one)
    • Maybe revive some of the weird shapes or color indicators, I can't think of something that makes sense though
  • Highlighting the current cell— the color bar on the left is perhaps too subtle and I've caught myself confused as to which cell is currently active.

    • I've played around with putting a background or inset-box-shadow, and it kind of works, though I'm not sure.
  • Sticking the focused output card in the right spot. This really shouldn't be too hard but I haven't done it yet.

  • It's really weird when the output card is blank. Hide it or fill it with something.

Inspirational Quotes

  • The most effective debugging tool is still careful thought, coupled with judiciously placed print statements.
    • Brian Kernighan "Unix for Beginners" (1979)

What's cool?

  • 2Panez

    • A two-pane layout doesn't waste screen space and helps alleviate excessive scrolling
    • It cleanly separates input and output
  • Command Palette

    • Quickly access any action without needing to memorize lots of keybindings or cluttering the interface with persistent toolbars and menus
  • Automatic Instrumentation

    • Fire off any batch task using an ordinary for loop and it'll visually report on progress
  • Semicolon Logging Semantics

    • Just like in Matlab, statements which aren't terminated in semicolons are logged
    • Logs are placed in context right where they're created
  • The Future Now: ES6 and ES7 with Babel

    • Code is automatically transpiled to support the latest proposed features
    • Interactive await, call it from a function and we'll automatically wrap the entire cell.
  • NPM In the Browser

    • Try out javascript libraries simply by calling require, Carbide comes with a tiny clone of NPM that will recursively resolve dependencies and unpack tarballs from the NPM API.
  • Code Completion with Tern.JS

    • Autocomplete methods and function names with the tern static type inference engine
    • Also supports stuff within NPM modules.
  • Graphical Manipulation

    • Make any variable adjustable with a graphical slider by wrapping calling Manipulate.Slider()
  • Interactive Graphics with D3

    • Woooo

Design Decisions:

  • Separation of input and output
    • Mathematica and IPython

TODO:

  • Switch from the deprecated gzip-js project to https://github.com/nodeca/pako

  • Find a way to activate both brace folding and indent based code folding for codemirror so that we can have an aggressive cell collapse

  • Manipulate

This should be analogous to Mathematica's Manipulate[] IJulia's @manipulate (in Interact.jl)

In this case, you'll call a function like Interact() and it'll return some numeric value which can be adjusted interactively. The cell will automatically execute again whenever this input is manipulated and change the corresponding output value.

Interact's first argument would be the default value, followed by a min and max. For example, var x = Interact(42, 0, 100)

Perhaps it should accept string arguments as well, and give the user a choice with a nice pill button var option = Interact("Freedom", "Slavery"). Maybe it should be more extensible (an interact namespace, e.g. Interact.Slider(5))

  • The actual capacity to run commands

    • NodeJS
    • In a WebWorker (run browserify inside browserify?)
    • Through Jupyter
  • Interactive Output

    • Standard Text Output
    • console.*
      • Object inspection
    • Images (multiple images per cell)
    • SVG
    • HTML
    • D3 Interactive Graphs
      • Investigate
    • ReactJS
      • Maybe we could do something to make this a bit more self-hosting (i.e. developing carbide within itself)
  • Different Cell Types

    • Markdown
    • LaTeX/KaTeX integration
  • Adding Files

    • it should be as easy as dragging and dropping a file from the desktop to import it as a buffer (kind of similar to Matlab)
  • Sublime/Atom-style Command Palette

    • Currently it's just a sort of filler

Completed:

  • Collapse cells

    • There's still a lot of room for improvement, frankly the current interface for collapsing cells leaves a lot to be desired
  • Experiment with cell/output alignment

    • Drawing two-way merge style connector curves
    • Padding on either side for perpetual alignment
    • The current idea for how the cell inputs and outputs will be aligned is a relatively simple one (I pretty quickly moved away from the two-way merge style because it seemed like a lot of unnecessary complexity for a small payout, but I think there's definitely value in revisiting that concept later). Basically the output is sized according to the height of its input, so they're always perfectly aligned. The most recently run cell has its output in a floating overlay which allows contents to spill beyond the typical confines of the cell boundary. But when that cell loses focus, all that's left is a preview which is sized to be however large the input box was.
  • CodeMirror integration

    • Experiment with annotating CodeMirror inline with named function arguments and other documentation
    • There's some autocomplete style predictive text stuff and a somewhat working TernJS integration
      • It's only somewhat working because it seems that NodeJS function declarations seem to be scoped to a single cell
  • Drag to reorder input cells

  • Resizable two pane layout

    • Double click on median to restore default size (40%-60% split)
  • Insert cells before and after other cells

    • Click on a bar which is in between the cells or use the keybindings (Cmd-J/Cmd-K)
  • Inject profiling code to automatically (a la Adobe's Theseus) to automatically display progress bar for code execution

Inspiration (in no particular order):

Cool things I've discovered along the way:

On the shoulders of giants