Clojure 1.12.0 is now available
Clojure 1.12.0 introduces significant updates, including the last support for Java 8 bytecode, enhanced lazy-seq handling, new library management functions, and security fixes, preparing for future Java compatibility.
Read original articleClojure 1.12.0 has been released, marking significant updates and changes. This version maintains compatibility with Java 8 bytecode, but it is noted as the last release to do so, with future versions expected to transition to a newer Java LTS release. A key enhancement in this release is the adjustment of lazy-seqs and delays to use locks instead of synchronized blocks, addressing issues with virtual thread pinning in JDK 21. Security improvements include a fix for CVE-2024-22871, and updates to Java serialization identifiers for better compatibility. New features have been introduced to facilitate interactive library management, allowing users to add libraries without restarting the JVM. Functions such as `add-lib`, `add-libs`, and `sync-deps` enable dynamic library addition during development. Additionally, the Clojure CLI now supports invoking tool functions out of process, enhancing the development experience. The release also includes updates to dependencies, specifically for `spec.alpha` and `core.specs.alpha`. Overall, Clojure 1.12.0 aims to improve usability and maintain security while preparing for future compatibility with newer Java versions.
- Clojure 1.12.0 is the last version to support Java 8 bytecode.
- Enhancements include using locks for lazy-seqs and delays to avoid thread pinning issues in JDK 21.
- New functions allow interactive library management without restarting the JVM.
- Security updates include a fix for a critical vulnerability (CVE-2024-22871).
- Dependency updates were made for `spec.alpha` and `core.specs.alpha`.
Related
Migrating from Java 8 to Java 17 II: Notable API Changes Since Java 8
The article details API changes in Java versions 9 to 17, emphasizing improvements for Java 8 migrations. Changes include null handling, performance enhancements, string improvements, switch expressions, record classes, and utility additions for developer productivity and code readability.
Why Use Clojure for Machine Learning?
Clojure's functional paradigm benefits machine learning with modular, readable, and predictable code. Leveraging JVM ensures speed and portability. Integration with Java libraries like TensorFlow and PyTorch supports deep learning. Despite being less mature, Clojure shows promise in ML projects.
Rust 1.80.0
The Rust team released Rust 1.80.0, featuring LazyCell and LazyLock types, Cargo 1.80 lint checks, exclusive ranges in patterns, and stabilized APIs, enhancing efficiency and safety in software development.
Go 1.23
Go 1.23 has been released with enhancements to the toolchain, runtime, and libraries, including the "range-over-func" feature, opt-in telemetry, and updates to the standard library for improved performance.
A Java Language Cumulative Feature Rollup
The blog post reviews new Java features since Java 8, detailing enhancements like local-variable type inference, switch expressions, and records, while also noting deprecated APIs, aiding developers in understanding Java's evolution.
- Many users appreciate the new library management functions like add-libs and sync-deps, which simplify sharing code and demos.
- There is a strong focus on the functional interface changes, which enhance interoperability with Java.
- Some users express concerns about the pace of updates and the potential for complexity in future releases.
- Several comments highlight the ongoing relevance of Clojure in the programming landscape, with users sharing their experiences and challenges.
- Questions arise about the future of spec and its integration within Clojure, indicating a desire for more clarity on this topic.
My personal favorite is add-libs
You can now write single file demos or minimal examples for issues. Really lowers the friction to share small runnable snippets with people
You can also actually use it to demo Java libraries as well without all the Java boilerplate. Just poke around in the REPL and paste code into a comment on HN or wherever and anyone can replicate your "setup" and get it running exactly the same. No need to clone a repo or anything
Still waiting on spec2, though... for now I am working around rigidity of specs by using Malli but it really isn't a first-class citizen in Clojure (mostly due to inability to check macros, and this is by design of the Clojure compiler). But you can emulate the ideas of schema/select by manipulating malli schemas as data.
The changes for functional interfaces also means we no longer have to maintain utility macros like
(defmacro ->Consumer [f]
`(reify java.util.function.Consumer
(accept [this arg#]
(~f arg#))))
and instead just pass functions directly.This release feels like it had a very different scope from previous releases, contains a lot of stuff, which is exciting to see! But I hope it doesn't end up like a hairball a few releases down from increase of pace or something.
A major problem people have at first[0] is just reading the code. AIs like ChatGPT and Claude are incredibly good at explaining existing Clojure code.
As a result, developers can onboard much, much faster.
[0] After a few weeks, reading Clojure becomes second nature and you'll forget you ever COULDN'T read it.
Related
Migrating from Java 8 to Java 17 II: Notable API Changes Since Java 8
The article details API changes in Java versions 9 to 17, emphasizing improvements for Java 8 migrations. Changes include null handling, performance enhancements, string improvements, switch expressions, record classes, and utility additions for developer productivity and code readability.
Why Use Clojure for Machine Learning?
Clojure's functional paradigm benefits machine learning with modular, readable, and predictable code. Leveraging JVM ensures speed and portability. Integration with Java libraries like TensorFlow and PyTorch supports deep learning. Despite being less mature, Clojure shows promise in ML projects.
Rust 1.80.0
The Rust team released Rust 1.80.0, featuring LazyCell and LazyLock types, Cargo 1.80 lint checks, exclusive ranges in patterns, and stabilized APIs, enhancing efficiency and safety in software development.
Go 1.23
Go 1.23 has been released with enhancements to the toolchain, runtime, and libraries, including the "range-over-func" feature, opt-in telemetry, and updates to the standard library for improved performance.
A Java Language Cumulative Feature Rollup
The blog post reviews new Java features since Java 8, detailing enhancements like local-variable type inference, switch expressions, and records, while also noting deprecated APIs, aiding developers in understanding Java's evolution.