Skip to content

Latest commit

 

History

3,311 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Paradise: A Literate CLJS Multi-Protocol Chat Client

What is Paradise?

Initially designed as a modular Matrix client that used the matrix-rust-sdk with WASM bindings. It has evolved to leverage the very same modularity to go further and support other protocols through dynamically loaded pre-compiled engines.

Highlights

Since plugins can modify the UI or engine (or any thread namespace) at runtime, pre-compiled engines can even remove or add UI features relevant to the specific protocol by targeting the FQN of the method.

Every named method (and technically anonymous) is target-able by plugins. So effectively everything is modifiable.

To prevent performance bottlenecks, we provide a custom virtual list implementation that enables offloading the rendering specific workload (not painting obviously) to a separate thread with a virtual dom. We then measure using Pretext to provide the main thread the measurements. This keeps the timeline smooth.

iOS, Android, Web, and Desktop apps exist. Aiming to provide full functionality regardless of platform. Plugins work on all platforms as the app is effectively still a web app with a few native modifications. Plugins themselves are runtime scripts, so they don’t violate any TOS with Google Play Store or Apple App Store.

Designed with org in mind, but the scope is messy. Currently engines need a proper binding layer and elegant documentation per protocol… This existed for Matrix, but will need to be cleaned up as the move to support multiple engines continues.

Still, a tangler is supplied so that the source code can be clean. TODO for making the VS Code plugin, and docs on creating that exist in the Tangler org file itself. Emacs and Org-mode are very nice, and I recommend at least checking out Spacemacs.

It isn’t practical to remake all of org-mode, but it might be worthwhile to build out tangling of .org files for VS Code or as a Clojure program embedded in the project. We don’t want to limit the options of those who would help improve on Paradise.

So with all that in mind our build process looks a bit like this: Org file -> CLJS file -> ShadowCLJS compiles - (Compiler modifications like lifting anonymous functions and registering existing functions) - normal CLJS compilation via Google Closure -> Vite detects change -> Browser refresh -> Plugins registered and evaluated using Small Clojure Interpreter

So we still maintain a crisp developer experience while adding great depth to the documentation end. Documentation on the more complex bits exists in multiple places, so we’ll avoid repeating here in the README.

Main goals for the client include creating a reusable base that can be built on top of and extended easily. Expanding on that we can then try to build out a full feature client. For the most part these will be React-based Reagent components in Hiccup. I feel we’ve accomplished proof that an easy to modify ClojureScript client with all the runtime behaviors we want across all the platforms we sought. It is likely soon time to create a proper roadmap for the future for the project for visibility. That’ll be linked here when that does exist.

Why Paradise?

Often, as time has passed, the internet has become less free and more walled. It is an unfortunate situation to see more and more information hidden behind the pay walls of corporations. That our data and privacy might be owned by others. If we can help capture even a sliver of that experience people associate with the premium of closed-source solutions, then maybe in our own way we might aid in reversing the degradation of the online experience.

The name stems from Sir Robert Hall II’s novel Ultra-85 and the music album of the same name. The novel itself isn’t life-changing, but it conveys ideas similar to the situation we find ourselves in. We are trapped in an artificial space station that is non-free, corporate-owned platforms whose name could be seen as analogous to Babel. So we must make our way to Paradise. Many individuals have set out on creating or finding Paradise, but the goal for this project is to provide people perhaps a small slice of paradise.

A goal for Paradise is modularity on any device you choice to use. As an extra, I’d like the core to be modular as well so that it isn’t inherently locked to being a Matrix client. Instead it should be agnostic of protocol.

Set-up

Engines are pre-compiled and provide their dependencies for us… so for Matrix the rust-sdk is left up to the relevant engine. This means our actual build process and run process is rather straight-forward.

npm i

Running involves two terminal windows or running both commands together at the moment. No release build for shadow-cljs quite yet.

Development Workflow

To develop Paradise, you need to run the ClojureScript compiler and the Vite asset server simultaneously. If you’re making changes to the repo, then it is advised to use the tangler provided too. The commands for these are:

1. Start ShadowCLJS/Vite

This handles the compilation of the .cljs files and provides the REPL.

npm run notangle

2. Start ShadowCLJS/Vite/Tangler

npm run dev

This initializes the following commands: ShadowCLJS npx shadow-cljs watch app Vite npx vite Org Tangler (if not notangle) npx nbb src/utils/tangler.cljs

About

A chat client for everyone

Topics

Resources

Stars

17 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages