Skip to content

GigiaJ/Paradise

Repository files navigation

Paradise: A Literate CLJS-WASM Matrix Client

What is Paradise?

Intended to be both a lightweight CLJS-based Matrix client that uses the matrix-rust-sdk with WASM bindings.

Further on that, we opt to use the web-element-components which define the LOGIC for the behavior of components.

This is necessary to avoid rewriting logic that has complex implementations. Instead we should use the views described and expand on them via the lovely polymorphic options provided via ClojureScript.

As a final design choice, we opt for using .org files to generate the actual ClojureScript files. Org-mode provides a clean way to document the methods without making the ‘source’ code a mess as we will auto-tangle the files.

This allows the process to be: Org file -> CLJS -> ShadowCLJS compiles -> Vite detects change -> Browser refresh So we still maintain a crisp developer experience while adding great depth to the documentation end.

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.

Now there is one feature we use to develop with that is only usable in one editor on the planet. Org-mode. 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.

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.

Set-up

Setup is currently extremely messy. I’ve included the prebuilt generated-compat JS files.

You need not do this as the generated files are included, but if for some reason you wanted to they were generated like so:

npm i
guix shell -FNC -m manifest.scm -- sh -c "sh irust.sh && sh build-wasm-bindings.sh && sh babel.sh"

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.

1. Start the CLJS Watcher

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

npm run dev

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

About

A Matrix client

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published