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!.
Malli
October 1-15
Alpha is out, FINALLY: https://twitter.com/ikitommi/status/1314254607846191104
Done stuff
- #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/
Ongoing
- working on declarative utils for schemas, fixes also #281
Misc
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.
October 16-31
Fixing things of the alpha, helping people adopting, small stuff.
Done stuff
- #282 - revisited how references work and how
malli.util
work with them. - #283 - declarative schema transformations
- #289 - fix :sequential decoding with empty sequence
- Adopted reitit to use malli, with 3 patch releases
0.5.8
,0.5.9
&0.5.10
Ongoing
- helping people adopt malli, small fixes and examples
- design and prototyping on the Functional Schema Bundle (much bigger than expected):
- full clj-kondo integration: https://github.com/metosin/malli/issues/268
- support schema defn syntax: https://github.com/metosin/malli/issues/125
- sequence/regex schemas: https://github.com/metosin/malli/issues/180
Misc
no misc now.
Practicalli
October 1-15
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 handler-helper
namespace.
Practicalli Clojure
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.
Screencasts
- 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
Practicalli Spacemacs
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
October 16-31
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
Practicalli Clojure
Reviewed the Introduction and Getting Started sections, improving the flow and providing a solid introduction to Clojure.
New sections
- 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.
Practicalli clojure-deps-edn
Updates and fixes to the user level configuration for Clojure CLI projects
- Add
:middleware/cider-clj
and:middleware/cider-clj-refactor
aliases 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
deps-deploy
(#3)
Practicalli Spacemacs
New content:
Updated content:
- Line numbers - visual, relative and absolute styles
- Repeating searches and scrolling through search pattern history
Cider issue
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 issue
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 issue
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.
Clj-kondo/babashka/sci
October 1-15
Here is an overview of the work I did per project.
Babashka
- Ensure ns map exists for namespaces used only “code” vars babashka/babashka.pods#20. This fixes compatibility with bootleg.
- Support
java.io.file.FileVisitor
andjava.io.FilenameFilter
withreify
#600. Nice side effect: this makes babashka compatible with the fs library. - Add classes
java.util.zip.ZipInputStream
andjava.util.zip.ZipEntry
. This makes babashka compatible with glam, a work in progress package manager. - Documentation updates for
--uberscript
: - Sending mail, experimented with drewr/postal #599
- Fix
System/exit
in REPL #606 - Review PR for babashka/babashka.nrepl#28
Sci
- Add
lazy-cat
#427
Clj-kondo
- Review PR and making additional changes for
clj-kondo#1016: config
for ignoring unused
:as
binding - 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
contains?
#1021 - 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
(or)
#1023 - Base Docker image on Ubuntu latest #1026
Misc
- deps.clj v0.0.10 Parity with Clojure Tools 1.10.1.697
- Glam, a work in progress package manager https://github.com/borkdude/glam
- Carve:
- :silent option
- updated deps
- deprecate question mark in options
- Jet: support
take-while
anddrop-while
#69
October 16-31
Here is an overview of the work I did per project. These two weeks mostly were spent on babashka and sci.
Babashka
- pod-babashka-lanterna: a pod for creating TUI apps
- babashka/process: a Clojure library for working with
java.lang.Process
pprint/print-table
should write tosci/out
#611- add
lazy-cat
#605 - Fix
System/exit
in REPL #605 - Review PR babashka.nrepl#28
- Review PR feature flag
- Add
transit+json
format support to pods babashka/pods#21 - Fix pod destroy function #615
- Bind
*file*
in nREPL server babashka/babashka.nrepl#31 - Add portal example
- Import should return class #610
- Support
clojure.java.io/Coercions
protocol #601 - Add
clojure.pprint/write
#607 - Add socket support to pods babashka/pods#2
- Partial support for multiple classes in
reify
#603 - Add image-viewer example
Sci
- Add
bound?
borkdude/sci#430 - Support
map->
constructor on defrecords borkdude/sci#431 - Add
*print-namespace-maps*
borkdude/sci#428
Misc
- 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.
Datahike
October 1-15
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.
Tuple Support
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.
October 16-31
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.
Tuple Support
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.