Farzad Pezeshkpour
04/01/2025, 3:03 PMassertEquals(Person.address.city, Person.address.city)
If these could be cached (perhaps by using by lazy
in the generated companion properties), they can actually be used as keys in the indexes of my database, which would make expressions like this elegant and efficient:
people.find(Person.address.city eq "Oslo")
Youssef Shoaib [MOD]
04/01/2025, 4:41 PMFarzad Pezeshkpour
04/01/2025, 4:42 PMFarzad Pezeshkpour
04/01/2025, 4:44 PMFarzad Pezeshkpour
04/01/2025, 4:47 PMby lazy
values. there's quite a bit of learning curve, but perhaps I could make a PR? I don't know how much effort it would besimon.vergauwen
04/02/2025, 7:09 AMcopy
code or similar. Or, it generates hardcoded optics for the compositions and caches them in a top-level val
.
It seems to be mostly a time related issue that this hasn't been pushed further. Any contributions would be awesome! π There is also #C8UK6RTHU if you have any questions, or topics/issues you'd like to discuss.Alejandro Serrano.Mena
04/02/2025, 8:22 AMget()
, but indeed we could try for them to "save" their value by using some kind of lazy
β’ to have structural equality we may need to give a "key" to every lens (or have some special Keyed
interface for those). For properties we can use the KProperty
itself, but for things like every
it's a bit more convoluted. Still, something worth tryingFarzad Pezeshkpour
04/02/2025, 9:40 AMid
property per PLens
and (b) use of by lazy
I wrote an embarrassingly simple Optics module that works for my use-case. It's inside my (currently private) multimodule project. After work, I can split it out with some example code to show what I mean. The code was done in haste and is ... very ugly lolFarzad Pezeshkpour
04/02/2025, 11:37 AMAlejandro Serrano.Mena
04/02/2025, 11:38 AMFarzad Pezeshkpour
04/02/2025, 11:39 AMFarzad Pezeshkpour
04/02/2025, 11:42 AMAlejandro Serrano.Mena
04/02/2025, 11:43 AMFarzad Pezeshkpour
04/02/2025, 11:44 AMFarzad Pezeshkpour
04/03/2025, 6:34 AMsimon.vergauwen
04/03/2025, 6:37 AMsimon.vergauwen
04/03/2025, 6:38 AMKDoctor works on MacOS only.-.- sorry, not sure for Linux π
Farzad Pezeshkpour
04/03/2025, 6:39 AMkotlin.native.ignoreDisabledTargets=true
as recommended by the gradle output. Currently getting
Could not determine the dependencies of task ':arrow-annotations:dokkaGenerateModuleHtml'.
I'll keep working through the issues to see if I can get a working build. Will let you know how it goes.Farzad Pezeshkpour
04/03/2025, 6:39 AMsimon.vergauwen
04/03/2025, 6:41 AMCould not determine the dependencies of task 'arrow annotationsdokkaGenerateModuleHtml'.π€― Try a
./gradlew --stop
in between to kill any deamons...Farzad Pezeshkpour
04/03/2025, 6:46 AMFarzad Pezeshkpour
04/03/2025, 6:46 AMFarzad Pezeshkpour
04/03/2025, 6:54 AMFarzad Pezeshkpour
04/03/2025, 7:09 AM./gradlew compileKotlinJvm
Farzad Pezeshkpour
04/03/2025, 7:15 AMFarzad Pezeshkpour
04/03/2025, 7:28 AMFarzad Pezeshkpour
04/03/2025, 9:01 AM