@@ -0,0 +1,111 @@
1++++
2+title = "Clojure Urbit Client"
3+date = "2021-10-25"
4+[taxonomies]
5+grant_type = ["Proposal"]
6+grant_category = ["App Dev - Other"]
7+[extra]
8+image = ""
9+description = "Urbit client for the Clojure programming language"
10+reward = 3
11+assignee = "~sorted-falnyd"
12+id = ""
13+completed = false
14+link = ""
15++++
16+
17+## Clojure Urbit Client
18+
19+Clojure is a functional dynamically typed lisp which runs on the JVM. It lends itself very well to designing correct, situated programs and can easily benefit from the JVM ecosystem. Being functional and immutable by default makes Clojure a good fit for building concurrent event driven systems.
20+
21+### Design
22+
23+With the end goal of an alternative, cross platform desktop client for Urbit, the steps are as follows:
24+
25+- A SSE client in Clojure
26+- An Urbit client library built on top of the SSE client
27+ - Should at least be able to programmatically communicate with chat app and query graph store
28+ - The client should also be usable from Java
29+- GUI
30+ - Why run a browser at all? Urbit is all about APIs
31+ - Will need to choose between JafaFX and SKIA
32+ - JafaFX: mature, stable, has cljfx which provides an excellent model
33+ - SKIA: up and coming framework, has native capabilities, less mature
34+ - Will run on any platform which can run Java
35+ - If one day Urbit is ported to Java, imagine the possibilities of running the GUI and server in the same process
36+
37+## Milestones
38+
39+### Milestone 1 - Create client and send/recieve messages
40+
41+Expected completion: 4 - 5 weeks
42+
43+Payment: 1 star
44+
45+- SSE client (10)
46+ - Build a fully [specification](https://html.spec.whatwg.org/multipage/server-sent-events.html) compliant SSE client (10)
47+ - Have zero external dependencies besides Clojure and JVM
48+ - Expose low-level callback-based API
49+ - Distribute to Clojars
50+- Clojure Airlock API (35-40)
51+ - Study [Urbit's API](https://urbit.org/docs/arvo/eyre/external-api-ref) (2)
52+ - Setting up a connection
53+ - Creating subscriptions
54+ - Interacting with specific applications
55+ - Design an Airlock client (3) + review + fixes (?1)
56+ - Design principles
57+ - Data driven API: send data, recieve data
58+ - Support concurrency
59+ - Build up abstractions
60+ - Event driven
61+ - Interactivity and introspection are a must
62+ - Core implementation (10)
63+ - Handle primitives such as connections, acks and subscriptions
64+ - Application level implementation (20-25)
65+ - Chat (10-15) << Start here
66+ - Notebook (5)
67+ - Index (5)
68+ - Distribute to Clojars
69+
70+### Milestone 2 - Develop and deploy GUI
71+
72+Expected completion: 5 - 6 weeks
73+
74+Payment: 2 stars
75+
76+- JVM Clojure GUI (25-30) initial phase, (20-30+) secondary phase, total (45-60)
77+ - Design and define a UI + review (3)
78+ - Prioritize programmatic abstraction and interaction. They can always enable user experience and features. e.i. correctness > features.
79+ - Prioritize usability over aesthetics: I am not a designer, but if I make something useful which works a designer can easily contribute to it.
80+ - Interactivity: UI is Clojure process, can be modified and interacted with programmatically, live.
81+ - Stateless design?
82+ - Initial implementation should already be useful
83+ - Features and functionality (tagged by order)
84+ - Log in #A
85+ - Local and remote processes #B
86+ - Basic configuration #A
87+ - Full configuration #B
88+ - Chat #A
89+ - Notebooks #B
90+ - Index #B
91+ - Group navigation #A
92+ - Background connections #B
93+ - Local cache #C
94+ - Search? #C
95+ - Media embedding #A
96+ - Links embedding #B
97+ - Markdown rendering #C
98+ - GUI layout controls #C
99+ - Log levels #A
100+ - REPL interaction #A
101+ - Keyboard and mouse navigation #B
102+ - Technology survey (2)
103+ - Seesaw (Swing)
104+ - cljfx (JavaFX)
105+ - Membrane (backend agnostic, can target mobile in future!)
106+ - SKIJA?
107+ - #A Initial implementation (15-20)
108+ - Distribution and packaging (5)
109+ - Support Windows, OSX, Linux
110+ - #B Intermediary implementation (20)
111+ - #C Bells & whistles (10+)