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


TODO Duplication of calls to reduce

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

There's probably something to be abstracted away there.

TODO EDN parsing crate [0/14]

  • 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

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

DONE Add better folder structure to accomodate dependencies inside the repo   sdks

  • 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

  • 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?

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

DONE assert-metadata.sh: Forbid dependencies with different versions on Rust crates   dependencies

  • 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

  • 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

  • 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

  • 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]

  • 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

  • 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]

  • 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

  • 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

TODO Add anchors to glossary terms   docs

  • 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

  • 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

  • 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

  • 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

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

TODO Increate Node.js version from 10   dependencies

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

TODO Look at spec-alpha2   poc

  • 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

  • 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

  • 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?

  • 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

  • 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

  • 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

  • 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

  • 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

  • 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.


DONE Support tags in tasks-and-bugs

  • 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

  • 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