Code Monkey home page Code Monkey logo

tesserae's Introduction

Tesserae

screenshot

What is it?

Currently, it's a spreadsheet where cells:

  1. run user Clojure code async and in parallel
  2. reactively re-run when upstream cells update
  3. can run on schedule (e.g. "every 5 seconds")
  4. can render hiccup and other UI elements like buttons etc.

Demo

Run

clojure -X:demo:dev/cljs tesserae.serve/demo

then visit http://localhost:3900

Dev

npm install

Start a clojure repl with the :dev/cljs alias. Go to tesserae.serve, load the file. Shadow-cljs should start up. Run (-main) or (mount/start) to boot up the server, db, listeners etc.

Extending Tesserae

Injecting user code into the eval context:
Custom namespaces and bindings can be added on startup using mount args.
The values of namespaces map, if they're symbols, have to be on the classpath and will automatically be required.
The values of the bindings map will be required and resolved if they are fully qualified symbols or otherwise left as their identity.

For example:

(-> (mount/with-args
      {:tesserae.db/dir          "folder-in-project-root/data/datalevin/db"
       :tesserae.eval/namespaces {'walk 'clojure.walk
                                  'my-ns {'my-fn (fn [x] (println :foo x))}}
       :tesserae.eval/bindings   {'println `println
                                  'debug   (fn [& args] (apply println ::dbg args))}})
    (mount/start))

Status

Used internally in prod at Lumber but also very alpha!

Contribute

  • improve code entering experience, e.g. by adding codemirror with clojure mode
  • cell functions and UI plugin system. Users should be able to extend Tesserae with their own code.
  • UI additions: multiple sheets, search, users, permissions... the whole shebang!

Thanks

As of this commit Tesserae is a lean 1766 LoC! This made possible largely thanks to Hyperfiddle's Electric, Borkdude's sci and Juji's Datalevin.

License

Copyright © 2023 Dennis Heihoff, Lumber LLC

tesserae's People

Contributors

booklearner avatar den1k avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.