George
05/27/2023, 11:19 AMHalina
05/29/2023, 7:13 AMFlow
interface and flow
builder by transforming a lambda expression.
📖 https://kt.academy/article/cc-understanding-flowPeter
05/29/2023, 2:35 PMrobstoll
05/29/2023, 7:21 PMStefan Oltmann
05/30/2023, 12:43 PMrss
05/30/2023, 3:38 PMjmfayard
05/31/2023, 6:17 AMsomeBlock { ... }
The mindset shift : You don’t configure Gradle, you program it! … in Kotlin of course
Learning to program your build takes time initially, but much better than countless spending hours debugging your build if you don’t learn Gradle
https://blog.kotlin-academy.com/weeks-of-debugging-your-build-can-save-you-hours-of-learning-gradle-348de387c12cRama Chintapalli
05/31/2023, 10:08 PMYashwant Gowla
06/02/2023, 11:59 AMRobert Jaros
06/04/2023, 6:03 AMHalina
06/05/2023, 9:42 AMAlexander Ioffe
06/05/2023, 1:01 PM// Scala Style Unapply function:
sealed trait Name
case class SimpleName(first: String, last: String) extends Name
case class FullName(first: String, middle: String, last: String) extends Name
object FirstLast {
def unapply(name: Name): Option[(String, String)] = name match {
case SimpleName(first, last) => Some(first, last)
case FullName(first, _, last) => Some(first, last)
case _ => None
}
}
val p: Person = ...
p match {
case Person(FirstLast("Joe", last), age) => ...
}
In Decomat:
object FirstLast {
operator fun get(first: Pattern0<String>, last: Pattern0<String>) =
customPattern2(first, last) { it: Name ->
on(it).match(
case(FullName[Is(), Is()])
.then { first, last -> Components2(first, last) },
case(SimpleName[Is(), Is()])
.then { first, last -> Components2(first, last) }
)
}
}
// Then use the `FirstLast` custom pattern to match and extract data
val p: Person = ...
val out =
on(p).match(
case(Person[FirstLast[Is("Joe"), Is()], Is()]).then { (first, last), age -> ... }
)
https://github.com/exoquery/decomatDamien O'Hara
06/05/2023, 1:28 PMval captured = CapturedBlock {
println("Hello!")
}
@CaptureSource
val myVal = 10
/* ... */
captured.source.text // == "println(\"Hello!\")"
sourceOf(::myVal).text // == "val myVal = 10"
https://github.com/mfwgenerics/kapshotFatih
06/07/2023, 11:09 AMPoisonedYouth
06/08/2023, 8:13 AMrss
06/08/2023, 12:58 PMDmitry Romanov [JB]
06/09/2023, 2:40 PMraulraja
06/11/2023, 5:54 PMimport com.xebia.functional.xef.auto.*
@Serializable
data class Book(val title: String, val author: String)
suspend fun AIScope.books(topic: String): List<Book> {
val prompt = buildPrompt {
+ "Give me a selection of books about the following topic:"
+ topic
}
return prompt(prompt)
}
Next items in our roadmap are modules for loading local models, and distributed inference and training.
I wanted to give a special thank you to everyone working in Kotlin Multiplatform which is enabling Xef to run in so many places with ease. 🙏Minsoo Cheong
06/12/2023, 1:31 AMMamboBryan
06/12/2023, 8:00 AMHalina
06/12/2023, 11:05 AMSam
06/12/2023, 12:05 PMSaid Shatila
06/12/2023, 4:39 PMRobert Jaros
06/15/2023, 4:45 AMAlejandro Rios
06/15/2023, 6:02 PMYashwant Gowla
06/16/2023, 3:02 PM