Code explorer for the Unison language. Inspired by haskell-code-explorer.
See it live here.
Heavily WIP.
In addition to lots of minor issues there are three serious enough to mention here:
-
Back button support / URL entrypoints into app (issue #5)
-
Notify the user when the websocket disconnects (issue #4)
-
Auto-reconnect for a certain amount of time (issue #6)
unison-code-explorer
is built on concur-replica.
Similar to phoenix-liveview, concur-replica
let's your write web UIs without any custom JavaScript. It does this by keeping a VDOM on the server for each user and sending updates to the user's browser over a websocket.
It's important to note that this is only a good fit under a the following conditions:
-
Instant user feedback isn't required (fine for CRUD apps, not fine for AAA games. replica has client side prediction built-in for text but nothing else.)
-
Offline use not required
-
Not too animation heavy (since with this strategy animation is a bandwidth hog)
-
Your server can handle it
That sounds like a lot, but if you don't have any of those restrictions I think concur-replica
is incredibly promising. You can do everything in a single language, don't have to write any JS, and have amazing concurrency primatives like green threads and STM at your fingertips. And since UI code is so annoying to test the type system really shines. Overall it's just fun.
-
stack install
-
cd
to a directory containing a.unison
codebase. -
unison-code-explorer
-
Visit
localhost:8080
in your web browser.
See the REAMDE in the ./static-docs-generator package.
Formatting with Ormolu is a bonus (use ./bin/format to hit the whole codebase).
UCE.Code
is responsible for reading the Unison code from the filesystem and getting it into a format that's easy for the UI to consume.
UCE.UI
is the only part of the code that knows about concur-replica
.
UCE
pulls them together.