ultramagnetic's Avatar

ultramagnetic

@ultramagn3tic.bsky.social

Lead Developer at Scott Logic by day, Architecturally curious, techno freak by night. Creator of Higher-Kinded-J https://higher-kinded-j.github.io #higher-kinded-j #hkj #java #scala Views are frequently my own

18 Followers  |  112 Following  |  33 Posts  |  Joined: 20.01.2025  |  1.9715

Latest posts by ultramagn3tic.bsky.social on Bluesky

0 o a o
ยฉ What's New in Higher-Kinded-J 0.2.0
Massive Optics Expansion
This release dramatically expands the optics library with 6 new optic types and dozens of utility classes:
+ Fold, Getter, Setter: New fundamental optic types for read-only queries, single-element access, and write-only modifications
+ Indexed Optics: Position-aware transformations with IndexedTraversal , IndexedFold ,and IndexedLens
+ Filtered Traversals: Compose predicates directly into optic chains with filtered() and filterBy()
+ Limiting Traversals: Focus on specific portions of lists with taking() , dropping() , takingwhile() , slicing() , etc.
+ PartsOf: Transform all focused elements as a single list with operations like sorted() , reversed() , distinct()
+ Fluent API: New operator-style API with Free Monad DSL for building composable optic programs with multiple interpreters
New Functional Programming Primitives
+ FreeMonad: Build domain-specific languages (DSLs) with stack-safe execution and multiple interpreters
+ Trampoline: Stack-safe recursion support for tail-call optimization
+ Const Functor: Phantom type parameter support for advanced type-level programming
+ Alternative Type Class: Choice and failure operations for applicative functors
Enhanced Type Classes
+ Monoid: New methods ( firstOptional() , lastOptional() , maximum() , minimum() ) and instances (Long, Double)
+ Monad: Added flatMap2-5 for sequencing multiple monadic values with effectful combining functions

0 o a o ยฉ What's New in Higher-Kinded-J 0.2.0 Massive Optics Expansion This release dramatically expands the optics library with 6 new optic types and dozens of utility classes: + Fold, Getter, Setter: New fundamental optic types for read-only queries, single-element access, and write-only modifications + Indexed Optics: Position-aware transformations with IndexedTraversal , IndexedFold ,and IndexedLens + Filtered Traversals: Compose predicates directly into optic chains with filtered() and filterBy() + Limiting Traversals: Focus on specific portions of lists with taking() , dropping() , takingwhile() , slicing() , etc. + PartsOf: Transform all focused elements as a single list with operations like sorted() , reversed() , distinct() + Fluent API: New operator-style API with Free Monad DSL for building composable optic programs with multiple interpreters New Functional Programming Primitives + FreeMonad: Build domain-specific languages (DSLs) with stack-safe execution and multiple interpreters + Trampoline: Stack-safe recursion support for tail-call optimization + Const Functor: Phantom type parameter support for advanced type-level programming + Alternative Type Class: Choice and failure operations for applicative functors Enhanced Type Classes + Monoid: New methods ( firstOptional() , lastOptional() , maximum() , minimum() ) and instances (Long, Double) + Monad: Added flatMap2-5 for sequencing multiple monadic values with effectful combining functions

Six new Composable Optics and a FreeMonad DSL all in the latest #higher-kinded-j release

check it out higher-kinded-j.github.io/optics/optic...

#Java #FunctionalProgramming #Monads #Optics

21.11.2025 17:54 โ€” ๐Ÿ‘ 0    ๐Ÿ” 0    ๐Ÿ’ฌ 0    ๐Ÿ“Œ 0
Preview
Bifunctor - Higher-Kinded Types and Optics for Java Explore Higher-Kinded Types (HKTs) and Optcs in Java with the Higher-Kinded-J library. Learn about Functors, Applicatives, Monads, Transformers, practical functional patterns, and how to write cleaner, more composable Java code for your projects using Optics.

๐ŸŽ‰ New in higher-kinded-j: Bifunctor support!

Transform both sides of your data structures with bimap, first, and second operations.
โœจ Use with Either, Tuple2, Validated, and Writer
โœจ Type-safe
โœจ Law-verified
higher-kinded-j.github.io/functional/b...

#Java #FunctionalProgramming #TypeSafety

15.11.2025 12:08 โ€” ๐Ÿ‘ 4    ๐Ÿ” 2    ๐Ÿ’ฌ 0    ๐Ÿ“Œ 1
Preview
Selective - Higher-Kinded Types and Optics for Java Explore Higher-Kinded Types (HKTs) and Optcs in Java with the Higher-Kinded-J library. Learn about Functors, Applicatives, Monads, Transformers, practical functional patterns, and how to write cleaner...

๐Ÿš€ New Selective support in latest #higher-kinded-j release๐Ÿš€
Bringing the power of conditional effects to #Java use Selective with
* Either<E, *>
* Maybe
* Optional
* List
* IO
* Reader<R, *>
* Id
* Validated<E, *>
Find out more: higher-kinded-j.github.io/functional/s...

14.11.2025 09:30 โ€” ๐Ÿ‘ 1    ๐Ÿ” 1    ๐Ÿ’ฌ 0    ๐Ÿ“Œ 0

Nice post. Lots of interesting applications of this with profunctor adapter patterns.

21.09.2025 07:17 โ€” ๐Ÿ‘ 0    ๐Ÿ” 0    ๐Ÿ’ฌ 0    ๐Ÿ“Œ 0
Preview
Understanding Contramap

Understanding Contramap

blog.rhetoricalmusings.com/posts/contra...

20.09.2025 23:03 โ€” ๐Ÿ‘ 3    ๐Ÿ” 1    ๐Ÿ’ฌ 1    ๐Ÿ“Œ 1
Preview
Profunctor - Higher-Kinded Types and Optics for Java Explore Higher-Kinded Types (HKTs) and Optcs in Java with the Higher-Kinded-J library. Learn about Functors, Applicatives, Monads, Transformers, practical functional patterns, and how to write cleaner...

๐Ÿš€ New Higher-Kinded-J 0.1.8 ๐Ÿš€
โœจ Protofunctors - Transform both inputs & outputs of your functions with dimap, lmap, rmap
๐Ÿ” Protofunctor enhanced Optics - Lens, Prism, Traversal & Iso for immutable data manipulation
Checkout the hkj-book higher-kinded-j.github.io/functional/p...
#Java #FP #Optics

10.09.2025 16:11 โ€” ๐Ÿ‘ 2    ๐Ÿ” 2    ๐Ÿ’ฌ 0    ๐Ÿ“Œ 0
Post image

Original post: mastodon.scot/@Wen/1151514...

05.09.2025 22:15 โ€” ๐Ÿ‘ 0    ๐Ÿ” 0    ๐Ÿ’ฌ 0    ๐Ÿ“Œ 0
Preview
Introduction to Higher-Kinded-J - Higher-Kinded Types and Optics for Java Explore Higher-Kinded Types (HKTs) and Optcs in Java with the Higher-Kinded-J library. Learn about Functors, Applicatives, Monads, Transformers, practical functional patterns, and how to write cleaner...

๐Ÿš€ higher-kinded-j v0.1.7 is here!

โœจ Auto wither methods via @GenerateLenses
โœ… Error accumulating Validated (Applicative)
๐Ÿงฎ New Semigroup, Monoid, & Foldable interfaces
โ†”๏ธ Improved type flexibility on core interfaces

All documented in the updated hkj-book: higher-kinded-j.github.io

#Java #FP

29.08.2025 16:24 โ€” ๐Ÿ‘ 2    ๐Ÿ” 1    ๐Ÿ’ฌ 0    ๐Ÿ“Œ 0
Growing the Java Language #JVMLS
Growing the Java Language #JVMLS

#Java is getting Typeclasses. This is a super interesting talk from @briangoetz.bsky.social looks to be a huge evolutionary improvement to Java and very well thought out. Can't wait to try it! youtu.be/Gz7Or9C0TpM...

22.08.2025 10:50 โ€” ๐Ÿ‘ 4    ๐Ÿ” 1    ๐Ÿ’ฌ 0    ๐Ÿ“Œ 0
Preview
Auditing Complex Data - The Power of Optics - Higher-Kinded Types and Optics for Java Explore Higher-Kinded Types (HKTs) and Optcs in Java with the Higher-Kinded-J library. Learn about Functors, Applicatives, Monads, Transformers, practical functional patterns, and how to write cleaner...

Higher-Kinded-J
๐Ÿ” Traverse complex records with Lenses, Traversals, & Prisms, all type-safe, compile-time generated, and fully immutable in Java

Full example: higher-kinded-j.github.io/optics/audit...
Explore more: higher-kinded-j.github.io

#Java #FunctionalProgramming #Optics #Immutability #HKTs

23.07.2025 16:07 โ€” ๐Ÿ‘ 2    ๐Ÿ” 1    ๐Ÿ’ฌ 0    ๐Ÿ“Œ 0
Preview
Introduction to Higher-Kinded-J - Higher-Kinded Types and Optics for Java Explore Higher-Kinded Types (HKTs) and Optcs in Java with the Higher-Kinded-J library. Learn about Functors, Applicatives, Monads, Transformers, practical functional patterns, and how to write cleaner...

Say goodbye to verbose "copy-and-update" logic! #higher-kinded-j higher-kinded-j.github.io now has a powerful #Optics library. Generate #Lenses, #Prisms, #Isos and #Traversals with a simple annotation and perform deep, immutable updates in a single line of code. #Java #JavaDev #FP #FunctionalJava

20.07.2025 14:16 โ€” ๐Ÿ‘ 1    ๐Ÿ” 1    ๐Ÿ’ฌ 0    ๐Ÿ“Œ 0

With ADTs we are unbundling data from behaviour. Data goes in the ADTs and behavior goes in functions that operate on them. Think pattern matching vs polymorphism. Often The choice of approach is nuanced on what is mainly driving change. For types OO and operations ADT

15.07.2025 12:21 โ€” ๐Ÿ‘ 0    ๐Ÿ” 0    ๐Ÿ’ฌ 1    ๐Ÿ“Œ 0

This is great analysis of AI hype/reality/motives of the pkayers and played

29.06.2025 10:04 โ€” ๐Ÿ‘ 0    ๐Ÿ” 0    ๐Ÿ’ฌ 0    ๐Ÿ“Œ 0
Preview
GitHub - Randgalt/record-builder: Record builder generator for Java records Record builder generator for Java records. Contribute to Randgalt/record-builder development by creating an account on GitHub.

Indeed it is good to see the evolution. In the meantime i've used this in many projects to solve this builder issue records. Its really quite neat solution
github.com/Randgalt/rec...

25.06.2025 19:05 โ€” ๐Ÿ‘ 1    ๐Ÿ” 0    ๐Ÿ’ฌ 1    ๐Ÿ“Œ 0

Thats great. Let me know how you get on

21.06.2025 10:19 โ€” ๐Ÿ‘ 0    ๐Ÿ” 0    ๐Ÿ’ฌ 0    ๐Ÿ“Œ 0
Preview
Building LLMs is probably not going be a brilliant business The Netscapes of AI

Interesting thoughts.
calpaterson.com/porter.html

28.11.2024 06:15 โ€” ๐Ÿ‘ 26    ๐Ÿ” 5    ๐Ÿ’ฌ 1    ๐Ÿ“Œ 2
Preview
For Comprehension - HKJ Higher-Kinded Types for Java Explore Higher-Kinded Types (HKTs) in Java with the Higher-Kinded-J library. Learn about Functors, Applicatives, Monads, Transformers, practical functional patterns, and how to write cleaner, more composable Java code for your projects.

โœจThe new For-Comprehension in #higher-kinded-j can de-sugar complex monadic chains into a simple, sequential script.
It supports: โžก๏ธ Generators (from) โžก๏ธ Bindings (let) โžก๏ธ Guards (when) โžก๏ธ Final yield
#Java #FP #FunctionalProgramming #Monads #OpenSource #HKJ
higher-kinded-j.github.io/for_comprehe...

12.06.2025 18:01 โ€” ๐Ÿ‘ 4    ๐Ÿ” 1    ๐Ÿ’ฌ 0    ๐Ÿ“Œ 0

What sort of examples would useful? I had some ideas about potentially integrating with springs reactive webflux types and form validation. That might be a bit more practical for some users.

08.06.2025 18:06 โ€” ๐Ÿ‘ 0    ๐Ÿ” 0    ๐Ÿ’ฌ 1    ๐Ÿ“Œ 0

There is certainly boilerplate adding hkts to java and room for improvements but i think you might be surprised once you get familiar with the patterns how much they can help. Did you see the draughts game i added? If you have any suggestions as to what might help i'm really happy to here

08.06.2025 17:58 โ€” ๐Ÿ‘ 1    ๐Ÿ” 0    ๐Ÿ’ฌ 0    ๐Ÿ“Œ 0
Preview
Draughts Game - HKJ Higher-Kinded Types for Java Explore Higher-Kinded Types (HKTs) in Java with the Higher-Kinded-J library. Learn about Functors, Applicatives, Monads, Transformers, practical functional patterns, and how to write cleaner, more composable Java code for your projects.

Learn how to use the State monad and IO monad in #Java with higher-kinded types by building a playable Draughts game with the new #higher-kinded-j functional library. #fp #functional #monad #hkj higher-kinded-j.github.io/draughts.html

06.06.2025 15:50 โ€” ๐Ÿ‘ 2    ๐Ÿ” 2    ๐Ÿ’ฌ 0    ๐Ÿ“Œ 0
Preview
Algebraic Data Types and Pattern Matching with Java In this post we explore the power of Algebraic Data Types(ADT) with Pattern Matching in Java. We look at how they help us model complex business domains and how using them together gives improvements on the traditional Visitor Pattern.

I did a blog series here that covers some of these ideas. blog.scottlogic.com/2025/01/20/a... Im hoping to do some posts on the what why how of #higher-kinded-j over the coming weeks. In the meantime take a look at the order example in the project. Any feedback or questions most welcome

05.06.2025 18:50 โ€” ๐Ÿ‘ 1    ๐Ÿ” 0    ๐Ÿ’ฌ 2    ๐Ÿ“Œ 0
Preview
Higher-Kinded-J - HKJ Higher-Kinded Types for Java Explore Higher-Kinded Types (HKTs) in Java with the Higher-Kinded-J library. Learn about Functors, Applicatives, Monads, Transformers, practical functional patterns, and how to write cleaner, more com...

Higher-Kinded-J is a new functional library for #Java bringing higher-kinded types to popular monad patterns. higher-kinded-j.github.io

05.06.2025 17:38 โ€” ๐Ÿ‘ 3    ๐Ÿ” 2    ๐Ÿ’ฌ 2    ๐Ÿ“Œ 0
Responding to Real Usage ยท Poutsma Principles

New post: Responding to Real Usage

In Part 3 of Crafting Fluent APIs, I share how a conference demo led to a last-minute fix in WebClient's fluent API. Watch how people use your API, then improve it.

#Java #Spring #APIDesign #FluentAPI #tech

28.05.2025 11:02 โ€” ๐Ÿ‘ 7    ๐Ÿ” 5    ๐Ÿ’ฌ 1    ๐Ÿ“Œ 0

There is certainly an art to writing a good fluent api. An enjoyable and insightful series.

28.05.2025 22:07 โ€” ๐Ÿ‘ 1    ๐Ÿ” 0    ๐Ÿ’ฌ 1    ๐Ÿ“Œ 0
Preview
GitHub - Randgalt/record-builder: Record builder generator for Java records Record builder generator for Java records. Contribute to Randgalt/record-builder development by creating an account on GitHub.

This is a good alternative github.com/Randgalt/rec...

25.05.2025 19:34 โ€” ๐Ÿ‘ 0    ๐Ÿ” 0    ๐Ÿ’ฌ 0    ๐Ÿ“Œ 0

A most excellent commentary and thoroughly good read!

19.05.2025 09:26 โ€” ๐Ÿ‘ 0    ๐Ÿ” 0    ๐Ÿ’ฌ 1    ๐Ÿ“Œ 0
Thoughts on AI and software development - Part 2 The real forces that drive markets and decision makers

i released the 2nd post, pondering the idea of ai-based coding and its potential impact on software development. this time i discuss the forces that drive the market and decision making (might feel a bit darker and more controversial than usual): www.ufried.com/blog/ai_and_...

enjoy if you like ;)

18.05.2025 08:41 โ€” ๐Ÿ‘ 3    ๐Ÿ” 2    ๐Ÿ’ฌ 2    ๐Ÿ“Œ 0

Phantom types are an under appreciated feature in #Java. Can simulate typestate programming where an objects type changes to reflect current state, with operations available on that object depending on its current typestate. We can parametrise this using a base type and phantom type.

10.05.2025 23:40 โ€” ๐Ÿ‘ 1    ๐Ÿ” 1    ๐Ÿ’ฌ 0    ๐Ÿ“Œ 0
Preview
Recursion, Thunks and Trampolines with Java and Scala In this post we will see how Thunks and Trampolines can help solve problems by converting deep stack-based recursion into heap-based iteration helping to prevent StackOverflowErrors

In my latest post we explore how to manage deep recursion in Java and Scala using thunks and trampolines. Learn techniques that help avoid stack overflows and make recursive code more efficient. #Java #Scala #FunctionalProgramming
blog.scottlogic.com/2025/05/02/r...

02.05.2025 16:04 โ€” ๐Ÿ‘ 1    ๐Ÿ” 1    ๐Ÿ’ฌ 0    ๐Ÿ“Œ 0
Preview
Higher Kinded Types with Java and Scala In this post we will see how Higher Kinded Types types can help increase the flexibility of our code and reduce duplication.

Higher-kinded types provide abstractions allowing us to define operations once and reuse across many different data structures. In my latest post i explore how they work in #Scala and how we can simulate them ourselves using #Java blog.scottlogic.com/2025/04/11/h...

11.04.2025 10:43 โ€” ๐Ÿ‘ 4    ๐Ÿ” 2    ๐Ÿ’ฌ 0    ๐Ÿ“Œ 0

@ultramagn3tic is following 20 prominent accounts