A monthly newsletter, mostly on julia internals, digestible for casual observers. A biased, incomplete, editorialized list of what I found interesting this month, with contributions from the community.
“Internals” Fora and Core Repos (Slack/Zulip/Discourse/Github):
-
With the introduced of the new
Memory
low-level type, a lot of new compiler optimizations became possible. Particularly exciting is turningmemorynew
into an intrinsic, bringing up the possibility to stack-allocate small arrays. This would be an amazing improvement, especially for newbies frustrated by the fact that they have to use temporary tuples instead of temporary arrays in tight inner loops. -
“A Roadmap to Interfaces” - thoughts by Keno and others on the past, current, and future of supporting interfaces naturally in the language.
-
The compiler was recently restructured to do much less “internal state”-tracking (a more stackless setup), opening up the door for many possible improvements.
-
The “package extension” capabilities might become quite a bit more sophisticated as discussed in this memo. This popped up in response to extension management bottlenecks as reported by the SciML team, discussed in the previous issue of this letter.
-
The fact that we do not do the typical object-oriented language rewriting of
obj.method()
intomethod(obj)
comes up often. Given that Julia is multiple-dispatch oriented, that rewriting makes quite a bit less sense here, but we lose some nice autocompletion features. I liked this comment that describes the difficulty. -
Do we want
-f
to automatically create a new function that is the negation of a functionf
the way!f
is a new function that is the logical not off
. -
Package extensions occasionally hamper parallelism of compilation (they block the package dependants from starting to compile). That PR addresses the issue.
-
Great work on bringing more clarity and simplicity to stack traces.
-
Consideration of permitting the syntax
for else
andwhile else
. But there is a long discussion of folks wondering whether it should have a different meaning from the one in python. -
Adding an
--experimental
CLI flag to make it easier to opt into new experimental julia features. -
Now that Julia has version-specific Manifest.toml files, juliaup will be set up to take advantage of that and launch the appropriate version.
Compiler Internals:
-
“Julia as a Statically Compiled Language” by Jeff, discussing the upcoming ahead-of-time compiler mode for Julia. Related to that, check out the new
--trim
option for smaller binaries and some fun experiments community members have been doing with small binaries. Are we one step closer to Julia being a backend to other languages? -
The (julia-side, before LLVM) Compiler can become an independent package soon enough. Work started here with moving it into Base. The work continues here.
-
For a while there has been an effor to “partition” variable bindings by World-age, enabling many neat future features, including struct-aware Revise. Recently, the compiler learnt how to handle such binding partitions.
-
The optimizer might be able to call finalizers much earlier soon enough.
Garbage Collector Internals:
-
We are getting closer to having MMTk as an optional alternative garbage collection toolkit in julia.
Dustbin of History:
- For those interested in archeology, this is not the first attempt to run a julia newsletter.
In search of contributors and new maintainers (specify novice/moderate/expert and internals/domain background necessary):
-
@avik and @thecedarprince (the Co-Admins for Julia’s Participation in Google Summer of Code) are looking for new Google Summer of Code admin volunteers – low-effort and low-time commitment with a big impact on the Julia community!
-
The Center for Quantum Networks is running many bounties and minigrants on a variety of support packages for quantum information science.
-
SciML is running a large set of funded small projects – a great opportunity to contribute to the community and be paid for it.
-
ChainRules, a foundational package to the Julia autodiff effort is looking for a new primary maintainer.
Ecosystem Fora, Maintenance, and Colab Promises (Slack/Zulip/Discourse/Github):
-
Tensorial is a great new package for tensor math. Also discussed on slack, including in terms of how it compares to other Julia tools.
-
A wonderful new docstring linter for julia: CheckDoc
-
New experimental package to check that a struct is defined with inferable concrete types: CheckConcreteStructs
-
Fun workarounds for broadcast nesting and general discussion of broadcast hacks on slack.
-
Hackable belief propagation algorithm implementations in Julia: BeliefPropagation.jl
-
CodingTheory is a new package built on top of Oscar for work with classical and quantum error-correction codes.
-
Another magic trick from Lilith: having your Julia session lazily autoload commonly used packages BasicAutoloads.jl
Julia Autodiff ecosystem (enough topics for its own category this month):
-
The DifferentiationInterface.jl (DI.jl) repository has been transferred to the JuliaDiff organization to ensure continued maintenance.
-
DI.jl: A breaking release v0.6 was tagged. Thanks to recent changes, it is now possible to pass non-differentiated arguments (first constants, and soon caches/buffers) to the function, in addition to the one active argument.
-
DI.jl: Testing for StaticArrays has been drastically improved and allocations have been nearly eliminated with ForwardDiff & forward mode Enzyme for functions working on SArrays. There’s some concern how sustainable this is though, as the sensitive and fragile performance requirements for most StaticArrays use cases may be very easy to break in one or multiple backends.
-
DI.jl: Mainly for fun, we tried to interface DI with JAX in DifferentiationInterfaceJAX.jl. There is still some overhead from Julia-Python tensor conversion with DLPack.jl, any help is welcome.
-
Reactant.jl can take a Julia function, compile it in MLIR, do a plethora of optimization and autodifferentiation tricks on it, and compile it to a very wide variety of accelerators.
-
What does
compile
inReverseDiff
mean?
Notes from other ecosystems:
-
NumPy now supports a much more general data type for its arrays.
-
Useful CUDA primitives for various linear-algebra related kernels.
-
Can we get inspiration from C# for how to put mutable objects on the stack.
-
A julia slack discussion on how C# implements elegant abstractions for SIMD-accelerated arrays. Brings up related Julia work on implementing similar capabilities.
Soapboxes (blogs/talks):
-
The Julia Dispatch podcast has started as discussed on slack as well
-
@TheCedarPrince wrote about his experience at the 2024 Google Summer of Code Mentor Summit and led a talk across organizations about research software engineering across orgs
-
The Julia Optimization Days 2024 in Toulouse (France) featured a tutorial on code optimization and an introduction to autodiff. If there is community interest, those tutorials could be recorded by the author and put on the YouTube channel of the Julia language.
-
If you’re in/near France, consider presenting your optimization-related Julia work at the upcoming conference on operations research ROADEF 2025 (next February in Paris).
-
Consider subscribing to the French community newsletter (much of the shared materials are in English).
-
Consider subscribing to the community calendar to be informed of upcoming virtual meetings and talks.
-
Consider attending the triage meetings of the julia core contributors (organized on slack) – being a fly on the wall can be a great way to learn the nitty-gritty details of current priorities and development work. These are organized on the triage channel in slack. Minutes are kept.
Please feel free to post below with your own interesting finds, or in-depth explanations, or questions about these developments.
If you would like to help with the draft for next month, please drop your short, well formatted, linked notes in this shared document. Some of it might survive by the time of posting