I’m happy to announce ModuleMixins.jl v0.4! This package is used to compose data structures and methods from smaller components. The new release is a complete rewrite using only (compile time) method dispatch (instead of more macro heavy approach in earlier versions) and a sprinkle of macros to reduce boiler plate. This module makes some high level design easier:
- Build complex data structures from small components
- Solves the diamond dependency problem for composition
- Swap out functionality using abstract roles
- Apply methods to all parts of a composite type
- Plays nice with Revise
Examples and tutorials are found in the ModuleMixins documentation.
Cheers!
Johan Hidding
Very much OT: I saw you use a non-default way to build documentation in CarboKitten.jl, using Entangled for documentation.
What’s it gives you more/different than Literate.jl / Documenter.jl ?
Thanks for asking!
Entangled is much more powerful than Literate.jl. The approach is more or less the reverse: the Markdown is the source file and code blocks are tangled into normal Julia files. In addition, Entangled, though developed in Python, is completely agnostic to programming languages. Output can be traced back to the Markdown input through comment lines. Entangled comes with a daemon that automatically synchronizes source files with documentation and vice versa, so you can edit either. This approach remains workable with much larger projects than feasible with notebooks or Literate.jl.
Here it is combined with Documenter.jl, but it works equally well with other documentation systems: MkDocs, Quarto, typst, you name it. Also, it works really well with GenAI. Entangled uses NoWeb notation for referencing code blocks, which is a well known technique so agents have no problems with it. For instance, Claude Opus generated most of the reimplementation of ModuleMixins, so you can judge how well it works.
Disclaimer: I am also the lead developer of Entangled. Check it out at entangled.github.io.