October 2020 Monthly Update
By Alyssa Parado
Here are the updates from our Q3 projects. They are finishing in the middle of November, so there will be one more short update next month. Don’t forget that applications are open for our next funding round, apply today!.
Alpha is out, FINALLY: https://twitter.com/ikitommi/status/1314254607846191104
- #265 - fix sequential explain
- #272 - big bowl of stuff in, shipping the alpha out
- #276 - explicitly disabling sci & sci options
- #278 - better configuration for default-value-transformer
- Wrote a blog post: https://www.metosin.fi/blog/malli/
4 weeks to go. Will focus on solving real-world issues that people face when adopting the library, update the libs using Malli and try to get some of the larger issues solved.
Fixing things of the alpha, helping people adopting, small stuff.
- #282 - revisited how references work and how
malli.utilwork with them.
- #283 - declarative schema transformations
- #289 - fix :sequential decoding with empty sequence
- Adopted reitit to use malli, with 3 patch releases
- helping people adopt malli, small fixes and examples
- design and prototyping on the Functional Schema Bundle (much bigger than expected):
no misc now.
Creating more recorded video content around REPL driven development of high quality, improving speed of editing with Blender.org as well as better script writing and delivery practice.
Represented Clojure at the JVMWars 2020 online meetup, giving a short presentation which included a brief demo of REPL driven development.
Practicalli Study Group
Refactored the data-access code into
practicalli.data.* namespaces to make each namespace have a specific aim. Identified generic functions to reduce repetition in the code.
Added unit test fixture (setup/teardown) to create and delete the H2 database on the fly, using functions in the
New sections and Pages:
New page on the use of test selectors to organise tests and run test suites more effectively. Included examples for LambdaIsland kaocha, Spacemacs, Cider and Cognitect labs test runners.
New page on fixtures for unit tests, with example fixture functions and configuration on when to run fixtures for testing.
- Clojure REPL driven development with Rebel Readline
- Clojure projects with the REPL
- Clojure REPL driven development - a simple example
Updated Cognitect REBL install procedure, local maven install no longer required.
Updated Conjure configuration and documentation
Screencast Video Editing
Learned how to use Blender.org for Video editing which proved to be much more efficient that previous tools used. This will help produce a higher quality of videos for the new series on Clojure CLI tools and REPL driven development.
Practicalli Clojure deps.edn configuration
Minor updates to the practicalli/clojure-deps-edn user level configuration for Clojure CLI tools. This configuration is also recommended by seancorfield/dot-clojure personal configuration
- inspect/rebl - link added to updated install requirements
- updated library versions for: clj-new and depstar update
- title and alias sub-section in mini table of contents
- merge project related aliases into one section
Changes to the practicalli/spacemacs.d configuration for Spacemacs.
- renamed Git branch to live (update your remote urls)
- recommending Emacs 27.1 as its the current stable version and it supports ligatures (stylized character pairs).
- added unicode ligature support (no need for ligature configuration in dotspacemacs/user-config as it built into the unicode layer)
- Switched to using Fira code font as this has ligature support
- Updated the doom modeline theme for a nice minimal look without loosing any important information
- Added font rendering optimizations
Several custom snippets added to the practicalli/spacemacs.d: deprecated and design journal banners, rich code block with clj-kondo ignore duplicate
A range of updates, new content and tool reviews and testing. Helping lots of students on Exercism in the last week.
Practicalli Study Group
Getting back to some important basics of Clojure, walking through several Exercism.io coding challenges (to support mentoring efforts there).
- 089 - Code challenges - Regular Expressions to solve Bob challenge on Exercism.io
- 088 - Code challenges - Encoding and decoding
- 087 - Clojure CLI tools - Practicalli Clojure deps.edn configuration and a tour of community tools
Reviewed the Introduction and Getting Started sections, improving the flow and providing a solid introduction to Clojure.
- Using Clojure CLI tools - common tasks - with accompanying broadcast
- Community Tools providing a detailed guide to tools built on Clojure CLI.
- Code Analysis - install and configuring clj-kondo
- Neovim and Conjure install guide
- Neovim and Conjure user guide
Updated Clojure CLI tools version used with CircleCI and updating scripts to use -M flag with aliases.
Evaluated Spacevim to see if it should be added to the recommended Clojure aware editors. An issue was found running the Clojure CLI tools REPL on Linux, along with a quick fix. Although the configuration of vim packages is excellent and a very impressive overall experience. the Clojure environment is very basic and would welcome modernizing. Ideally adding Conjure to SpaceVim would produce an excellent development experience.
Updates and fixes to the user level configuration for Clojure CLI projects
:middleware/cider-clj-refactoraliases to allow connections to a running REPL from Cider (and should also work for Calva).
- practicalli/live middleware/clojure-clj-refactor: add documentation
- Clojure CLI config precedence - added graphic
- Added Common development tasks
- kaocha test runner: fix for 1.0.700 release
- Update group-id of
- Line numbers - visual, relative and absolute styles
- Repeating searches and scrolling through search pattern history
Investigated bug with Emacs Cider and the new Clojure CLI tools
-M alias flag. Cider modeled Clojure CLI tools support on the approach for Leiningen and this resulted in the -A alias flag occurring out of position. The clojure command does work this way, only since the
-M flag has been introduced that the issue became visible. The fix organises the arguments in the correct position
- Issue: Clojure CLI command parameters order incorrect
- PR: jack-in: move Clojure-cli parameter global-opts after -Sdeps
Hacking on CIDER live broadcast to evolve the way cider-jack-in manages aliases. Covers basic elisp print line style debugging and how to hack on the live Cider code running in Emacs.
Clojure CLI support for other tools
Reviewed Clojure CLI support for other Clojure aware editors recommended and raised issues and fixes.
Calva only seems to allow the use of
-A flag when using its jack-in feature, so issue #826 raised for awareness of the change in Clojure CLI tools.
Spacevim fails to run the REPL using Command Line tools on Unix systems, picking up the wrong executable name. Suggested a quick hack to fix the issue to help the community create a suitable fix in vimscript.
Here is an overview of the work I did per project.
- Ensure ns map exists for namespaces used only “code” vars babashka/babashka.pods#20. This fixes compatibility with bootleg.
reify#600. Nice side effect: this makes babashka compatible with the fs library.
- Add classes
java.util.zip.ZipEntry. This makes babashka compatible with glam, a work in progress package manager.
- Documentation updates for
- Sending mail, experimented with drewr/postal #599
System/exitin REPL #606
- Review PR for babashka/babashka.nrepl#28
- Review PR and making additional changes for
for ignoring unused
- Support ignore hint on unused binding #1017
- Support ignore hint in ns form #1031
- Support require in top-level do #1018
- Support quote in require #1019
- Type warning for
- Predicate functions for hooks api #1006
- Fix memory leak in long running process #1036
- Shadowed var linter #646
- Review PR and making additional changes for clj-kondo/config#7
- Support reader conditionals in ignore hint #1022
- Don’t warn about redundant let and do in hook-generated code #1038
- Fix format string false positive #1007
- Parse failure in
- Base Docker image on Ubuntu latest #1026
- deps.clj v0.0.10 Parity with Clojure Tools 188.8.131.527
- Glam, a work in progress package manager https://github.com/borkdude/glam
- :silent option
- updated deps
- deprecate question mark in options
- Jet: support
Here is an overview of the work I did per project. These two weeks mostly were spent on babashka and sci.
- pod-babashka-lanterna: a pod for creating TUI apps
- babashka/process: a Clojure library for working with
pprint/print-tableshould write to
System/exitin REPL #605
- Review PR babashka.nrepl#28
- Review PR feature flag
transit+jsonformat support to pods babashka/pods#21
- Fix pod destroy function #615
*file*in nREPL server babashka/babashka.nrepl#31
- Add portal example
- Import should return class #610
- Add socket support to pods babashka/pods#2
- Partial support for multiple classes in
- Add image-viewer example
map->constructor on defrecords borkdude/sci#431
- Rewrite-edn: a tool to rewrite EDN files while preserving whitespace and comments
- puget-cli: a CLI to pprint and colorize EDN output
- clojure-lantera: an updated version of the original repository.
In this iteration Konrad was on his yearly vacation, so the focus was primarily on API docs, Datomic compatibility, tuple support, and upsert optimizations.
API and Datomic Compatibility
The api namespace of Datahike is updated to match the signatures of Datomic, among them the ability to pass queries as string and to transact lazy sequences. Besides that the namespace has now more examples and is ready to be released onto cljdoc for a complete documentation of the Datahike API. The next step is to implement missing functionality from the Datomic client API including asynchronous behavior and further harmonize the returning values of Datahike with the ones of Datomic.
During the last period, further progress has been made towards adding ‘tuples’ to Datahike. It is now possible to declare the three types of tuples (homogeneous, heterogeneous and composite) in a Datahike schema. As a result Datahike will not only check the conformity of the declaration but also the validity of a tuple related transaction at transaction time. In addition, transacting and querying homogeneous and heterogeneous is also done. Finally, what remains to be done is composite tuples transaction and querying. Work into this direction has started. Currently, as a first step, the design of an algorithm for supporting composite tuples transaction has been undertaken.
Beyond Clojurists Together Tasks
We have continued and finished the work on improving upsert operations support in Datahike. This is expected to have a significant impact on transaction speed. Further work was done on the implementation of a garbage collector for hitchhiker-tree based backends. Design and implementation on attribute references and test refactoring was continued.
This iteration included extensive work on the API docs and Datomic compatibility, as well as progress on the tuple support.
API and Datomic Compatibility
We continued work on the Datomic API compatibility and finished most of the adjustments and documentation with the pull request #240. Part of that PR was to get the cljdoc api-docs working, which can now be seen on cljdoc. Other parts of the Datomic API were the compatibility of the pull-api, unit-testing the examples in the api-docs and comparing the return values between Datahike and Datomic. It was also investigated if we can offer a query that is returning a lazy sequence but this is only possible with breaking changes and will possibly be part of future iterations when async support is on the verge of completion. The support of returning vectors - like Datomic does - is basically the same issue and needs a rewrite of the query engine and therefore a breaking change that needs further investigation and should be aligned with coming changes. Besides that we made further progress moving to Clojure CLI tools. In the coming weeks work will be spent on bug fixing seek-datoms, preparing remote communication with empty protocols and move the listen function to the api namespace.
The work on tuple is gearing towards its end. During the last period, the focus was on the implementation of composite tuples. This stage has just been reached and the first few tuples have been transacted into a Datahike instance. What remains to be done is adding more tests, bug fixing and making the artifact more bullet-proof.
Beyond Clojurists Together Tasks
We continued on our work on the ClojureScript port with now a first simple round trip with only core db functions. Additionally we started updating our benchmark suite. The work on the upsert functionality was also continued, and testing and review for the attribute references feature was extended.