Tasks and bug listing for Mediator

Tasks, bugs and issues for Mediator. See: mediator.euandreh.xyz.

Register a new one: ~euandreh/mediator@lists.sr.ht.

Você também pode escrever em português.

Vous pouvez aussi écrire en français.

Table of Contents

Tasks

TODO Duplication of calls to reduce
#ce335932-dc91-4871-be14-5724e0c451ec

  • State "TODO" from [2020-10-11 Sun 08:05]

There's probably something to be abstracted away there.

TODO EDN parsing crate [0/14]
#bcaab441-c562-4baf-b2ac-fcf8e2e761f4

  • State "TODO" from [2020-10-02 Fri 13:35]

Implement the "edn" crate (under src/lib/edn/rust/), with the 3 expected artifacts: Rust library, C FFI and WASM.

Missing things to be done before calling the crate complete:

  • [ ] symbol grammar
  • [ ] number grammar
  • [ ] add description fields to EDNResult struct
  • [ ] test with quick check
  • [ ] intern symbols and keywords
  • [ ] support pretty-printing
  • [ ] handle \n same as a return
  • [ ] create builtint tagged elements: #uuid "" and #inst ""
  • [ ] allow extensible tagged elements (use a IEDNValue trait)
  • [ ] hashable version of HashMap and HashSet

After the Rust code is done, we still need to generate the bindings for the languages that we want to use:

  • [ ] TypeScript
  • [ ] Swift
  • [ ] Kotlin
  • [ ] Dart

The prototype generator is under src/lib/x-bindgen/.

TODO Unify gitignore snippets in default.nix with in .gitignore
#335a5f23-c79c-4df6-bc4b-7f19dafbfbe8

  • State "TODO" from [2020-10-02 Fri 15:06]

DONE Add better folder structure to accomodate dependencies inside the repo   sdks
#68e6f839-2df6-4f73-82e3-5aa73d33b580

  • State "DONE" from "TODO" [2020-10-02 Fri 21:24]

Everything now lives under src/, with 3 subdirectories, core/, sdks/ and libs/.

  • State "TODO" from [2020-10-02 Fri 11:46]

Right now I want to add two more "categories" of source code to the repository: "aux" and "lib". This is a bad idea, I should figure out a better way to organize this.

TODO Build SDKs using an static lib instead of a dynamic one   sdk
#b64a2a62-4ded-449d-a672-ac54b158f3b3

  • State "TODO" from [2020-10-02 Fri 08:21]

This way downstream users can include this single binary dependency that is self contained.

TODO Is the #[derive(Debug)] stripped out in release compilations?
#7cce6ced-315a-41c6-99d3-a462a7e95f03

  • State "TODO" from [2020-10-01 Thu 08:31]

DONE assert-metadata.sh: Forbid dependencies with different versions on Rust crates   dependencies
#0503f875-f32c-4988-a03d-d36174d05aed

  • State "DONE" from "TODO" [2020-10-02 Fri 11:32]

Done in commit c7fdd86a95bd6d4fea934f8a4bc6bcfa41600a29.

  • State "TODO" from [2020-09-30 Wed 19:41]

TODO Stop using FOD for Kotlin
#b5ec0772-d567-4c82-9671-251e2997b5f2

  • State "TODO" from [2020-09-30 Wed 18:01]

Use a tool like mavenix or similar to better resolve dependencies.

TODO Run Rust tests with Cargo
#1542b395-d685-46d9-88a3-bdb4cb72e794

  • State "TODO" from [2020-09-30 Wed 18:02]

Instead of naersk running them at build time, they should be ran inside the ./tests.sh file itself.

DONE Add sphinx-intl to nixpkgs upstream
#b6f62adf-db5e-4790-b101-b86ca9265a51

  • State "DONE" from "TODO" [2020-10-04 Sun 09:00]

Done in pull request #99544 on GitHub.

  • State "TODO" from [2020-09-27 Sun 14:15]

Code is available on a nixpkgs fork. All is left to do is perform the steps described in the CONTRIBUTING of the nixpkgs repo and create the pull request.

TODO FFI [3/10]
#e0003400-2e37-4f1e-9417-d43b830983b7

  • State "TODO" from [2020-09-26 Sat 19:15]

Task to track the evolution of FFI interop over SDKs.

Calling Rust from $LANGUAGE:

  • [ ] browser (TypeScript)
  • [X] Node.js (TypeScript)
  • [X] Swift
  • [ ] Kotlin
  • [X] Dart

Calling $LANGUAGE from Rust:

  • [ ] browser (TypeScript)
  • [ ] Node.js (TypeScript)
  • [ ] Swift
  • [ ] Kotlin
  • [ ] Dart

TODO Bottom-up POC [0/5]   poc
#30a2d6a5-e4d7-477f-ad4d-355ed27e52af

  • State "TODO" from [2020-09-20 Sun 18:27]
  • [ ] FFI + SDKs (with tests)
  • [ ] SQLite over FFI on SDKs (with tests)
  • [ ] WASM + SDK (with tests)
  • [ ] IndexedDB over WASM on SDK (with tests)
  • [ ] Nix

TODO Top-down POC [0/6]
#9b8b8fbd-c923-4343-8389-1906947dca0d

  • State "TODO" from [2020-09-27 Sun 18:29]

Clojure reference top-down implementation.

  • [ ] EAVT index
  • [ ] IMergeStrategy
  • [ ] AVET
  • [ ] Datalog
  • [ ] Pull
  • [ ] Full-text search

TODO Merge strategy [0/3]   poc
#f4755a97-59aa-496c-8b25-754ad80a8807

  • State "TODO" from [2020-09-20 Sun 21:31]
  • [ ] :db.conflict-resolution/none
  • [ ] :db.conflict-resolution/last-write-wins
  • [ ] :db.conflict-resolution/automerge to support commutative text editing using a binary representation of the CRDT. This is less about supporting this specific algorithm and more about putting the versatility of the building blocks to a test, and see if they are working well at the right level

TODO Remove duplicates (from capitalization) from dictionaries   docs
#2b4158bc-ad02-4fb5-ab35-bd3e86602128

TODO Add anchors to glossary terms   docs
#901af2bb-9b7c-4fa1-a50d-68cd9f7fdbc8

  • State "TODO" from [2020-09-07 Mon 15:37]

This way, one can share the link to a specific term without asking the other person to "search the glossary page for X".

One can accomplish that by going to the index, but that's hidden.

TODO A better wording for embedded   docs
#f995a42b-049e-405c-a9ef-5a551b827140

  • State "TODO" from [2020-09-20 Sun 17:09]

People usually think about embedded systems (as in Arduino) instead of client-side, local-first things.

Maybe the glossary entry is enough, but the confusion points to a need of a better word, but I couldn't find any yet.

TODO Generate language bindings instead of writing them manually [1/6]   ffi
#3c64ed93-a884-46f5-b2e4-c0afe44b2e85

  • State "TODO" from [2020-09-25 Fri 17:01]
  • [ ] browser
  • [ ] Node.js
  • [X] Swift it already knows how to read C the header directly, nothing needs to be generated
  • [ ] Kotlin
  • [ ] Dart

I didn't expect me to say this, but good job Swift. It doesn't even need something like rust-bindgen to parse header files and generate Rust Swift code, it just includes the header file. Even though Rust adds no runtime overhead to doing FFI, it does handle C at an arms length, and this shows up when a rust-bindgen tool is required.

I'm not sure if there is any internal translation for Swift, though. It doesn't seem to have, given the integration with C is so tight.

TODO Build and test isolation with Nix [6/7]   ci
#0b6d9623-56f7-47d7-b4c8-8d1ce094126d

  • State "TODO" from [2020-09-27 Sun 15:52]

Instead of using Nix just to build the environment, use it to build to enforce build isolation, like how the documentation works. Leverage tools like crate2nix and node2nix.

I worked on this a bit before, but the code for it was removed in commit 8896733493660a7bff5b1b58d9e111a4b5e9656f.

Setup $LANGUAGE with Nix:

TODO Increase Kotlin JDK version from 8   dependencies
#f4bf9bd2-4600-4d9e-aaea-8e36b0420f10

  • State "TODO" from [2020-09-27 Sun 10:33]

TODO Increate Node.js version from 10   dependencies
#c8d6e427-ae25-4b89-b39c-71b3e80ee170

  • State "TODO" from [2020-09-27 Sun 16:12]

TODO Look at spec-alpha2   poc
#2bffeee1-3fbf-4642-ab0b-afca3bca0f99

  • State "TODO" from "CANCELLED" [2020-09-27 Sun 19:09]

Now the Clojure POC became the reference implementation, so it will live much longer than I thought when closing this task.

  • State "CANCELLED" from "TODO" [2020-09-20 Sun 14:21]

I'm not working on the Clojure POC anymore.

  • State "TODO" from [2020-09-08 Tue 13:51]

It's said to have better tools for dynamic spec definition.

TODO Keep build.gradle.kts and pom.xml in sync
#793cadea-09b0-435c-b63f-15bdea2b09e7

  • State "TODO" from [2020-09-28 Mon 11:00]

Right now they have to be kept consistent manually.

Maybe read from a JSON file in build.gradle.kts and generate the pom.xml file from the same JSON file.

DONE Is having both a ffi and an api crates redundant?   bottom_up
#cf4f154a-5ebc-4e33-854f-429a57019731

  • State "DONE" from "TODO" [2020-09-30 Wed 18:46]

Yes ☺️. I can have a single crate with both cdylib and lib as crate-type=s. The =lib crate-type allows it to be importable from other Rust code directly, without going through FFI.

  • State "TODO" from [2020-09-30 Wed 18:18]

Is it better to duplicate the functions from api crate in ffi crate, or should I just stick to the ffi crate?

DONE Can the WASM API be built from the same api crate?
#cf3a7f4c-619f-428b-9851-7c0730f07f22

  • State "DONE" from "TODO" [2020-10-02 Fri 11:41]

Yes, both for "mediator" and "edn" crates. "eq" and "cli" are desktop only (FFI and Rust artifacts, no WASM build involved).

Done in commit 18fb2e052590197114ed5cc0cf286a68db9138d6.

  • State "TODO" from [2020-09-30 Wed 19:22]

As in task #cf4f154a-5ebc-4e33-854f-429a57019731, can the wasm crate be merged with the api crate?

DONE Is having both #[no_mangle] and extern "C" redundant?   bottom_up
#ebe685a1-8ed0-4d99-8b68-572cd577e9b1

  • State "DONE" from "TODO" [2020-09-30 Wed 19:30]

It isn't. Without #[no_mangle] the pub extern "C" fn foo isn't added to the generated cbindgen header file. This might be a detail about cbindgen, and I can't tell the difference yet.

  • State "TODO" from [2020-09-30 Wed 18:23]

Does the extern "C" declaration already prevents the names from being mangled?

DONE Remove duplication of metadata   repo
#5ebe4840-53bd-421c-95e0-4f67d68fd7b5

  • State "DONE" from "TODO" [2020-09-27 Sun 19:10]
  • State "TODO" from [2020-09-22 Tue 19:33]

A.K.A. "revamp assert-metadata.sh".

Project metadata is spread everywhere: every Cargo.toml file, package.json etc. Those should all come from a single place, probably metadata.json.

DONE Add english hunspell validation to the built documentation   docs
#4005a8cf-dbf6-4640-9529-3d1d5a273529

  • State "DONE" from "TODO" [2020-09-20 Sun 01:03]
  • State "TODO" from [2020-09-07 Mon 07:01]

DONE Extend existing glossary terms beyond mere stubs   docs
#a0e1266a-17cc-497b-8801-e13862903bfa

  • State "DONE" from "TODO" [2020-09-20 Sun 17:12]

Done in commit 6dcdace27caa833445bb419a45a786386b387d3d.

  • State "TODO" from [2020-09-07 Mon 16:50]

CANCELLED Add search capabilities to the tasks-and-bugs page
#1ac5fda6-da43-4103-956f-6dee25a5c56b

  • State "CANCELLED" from "TODO" [2020-09-19 Sat 19:29]

The best search is CTRL+f.

  • State "TODO" from [2020-09-08 Tue 06:58]

Pilfer syntax Guix issue tracker, and implement it as a minimalistic JavaScript visibility toggle of DOM elements.

Bugs

DONE Support tags in tasks-and-bugs
#327ad6a1-e867-4e17-9196-2a243d51c4cd

  • State "DONE" from "TODO" [2020-09-20 Sun 12:06]

Done in commit 68e2a5c63e3fa8a83fc22652c1e36e9df4492d26.

  • State "TODO" from [2020-09-08 Tue 07:12]

TODO Fix date in documentation build
#81f951f6-e669-42dc-8803-fc7613cda978

  • State "TODO" from [2020-09-20 Sun 17:17]

PDF date is set to January 1st, 1980, and ePUB errors with:

ValueError: ZIP does not support timestamps before 1980