PoisonedYouth
05/09/2023, 6:55 PMAbhishek Gururani
05/11/2023, 1:48 PMVeniamin Viflyantsev
05/11/2023, 4:20 PMaltavir
05/13/2023, 6:18 AMrepo.kotlin.link
(with ios artefacts). It contains a lot of minor and major changes and new features: https://github.com/SciProgCentre/kmath/releases. Additionally there is a huge new separate KMath-based project kmath-polynomials: https://github.com/SciProgCentre/kmath-polynomial with algebras for polynomials and rational functions maintained by @Gleb Minaev. A lot of work has been done. A lot more still awaits.akuleshov7
05/13/2023, 5:17 PMFoso
05/14/2023, 6:12 PMgabfssilva
05/14/2023, 10:54 PMval pageNumberFlow = unboundedLongFlow(startsAt = 1)
val responseFlow: HttpResponse<String> =
pageNumberFlow
.map { page ->
get("<https://example.com>") {
query("page", "$page")
}
}
.sendAndHandle(bodyHandler = ofString, parallelism = 10)
.takeWhile { it.body() == "[]" }
With this, you can create a pagination flow with a parallelism factor of 10. All responses will be emitted sequentially, stopping the pagination once the first empty list arrives.
You may refer to the kdocs for more information.
- New Connector in Development #1 - Google Drive: The early version of the Google Drive connector is now available, probably with potential bugs (I have warned!). Initial implementation includes two APIs:
val serviceAccount: JsonNode = // provide your credentials here
val googleDriveApi = GoogleDriveApi(serviceAccount)
val files: Flow<GoogleDriveFile> =
googleDriveApi
.listFiles {
driveId = "x"
}
val fileContent: Flow<ByteArray> =
googleDriveApi.download(files.first().id)
- New Connector in Development #2 - GitHub API: I have kick-started the development of a GitHub API connector. The goal here is to enable the manipulation of an entire codebase using Kotlin flows.
- New Connector in Development #3 - OpenAI API: All the kids are trying it nowadays, so, why not? While still in its early stages and likely to have bugs, I imagine multiple possibilities such as streaming large amounts of data for model training and building documentation using data from other connectors.
- JSON Connector Fixes: Some issues were fixed in the JSON connector where non-trimmed string data was parsed incorrectly. Also, we've refined the function names for better readability and conciseness.
Not necessarily related to the version release, but:
- Added the first examples: Practical examples showcasing the capabilities of River-kt were added. Currently, we have three examples: JSON streaming (using Ktor as the HTTP server), downloading an CSV file from S3, parsing it, and saving each line to a PostgreSQL database via JDBC, and listening to an SQS queue and forwarding the requests to an HTTP API. More examples are in the oven.
- Issues for future development: I have filled the repository with issues to map the future development of other connectors. This will not only help us gather community feedback on the most requested connectors but also provide visibility into ongoing development.
Stay tuned for more updates, and thank you for your support!Halina
05/15/2023, 8:23 AMThiago
05/15/2023, 10:11 PMHalina
05/16/2023, 6:41 AMKoji Osugi
05/16/2023, 2:15 PMubiratansoares
05/18/2023, 10:10 AMAppComponentFactory
to have a simple, library-free DI solution. Surely not super fancy stuff, but I liked the outcome, hope it is useful 🙂
https://ubiratansoares.dev/posts/simple-android-di-context-receivers/rss
05/18/2023, 11:48 AMHalina
05/18/2023, 1:59 PMAlejandro Rios
05/18/2023, 4:34 PMPoisonedYouth
05/20/2023, 11:42 AMSomesh Kumar
05/22/2023, 6:58 AMmohamed rejeb
05/22/2023, 8:01 AMHalina
05/22/2023, 8:43 AMNorbi
05/23/2023, 9:27 AMdave
05/23/2023, 10:19 PMmikehearn
05/24/2023, 8:27 AMAlexander Ioffe
05/24/2023, 3:00 PM// Scala-equivalent
someone match {
case Customer(Name(first @ "Joe", last), Partner(id)) =>
func(first, last, id)
case Customer(Name(first @ "Jack", last), Organization("BigOrg")) =>
func(first, last)
}
// Decomat in Kotlin
on(someone).match(
case( Customer[Name[Is("Joe"), Is()], Partner[Is()]] )
.then { first, last, id -> func(first, last, id) },
case( Customer[Name[Is("Jack"), Is()], Organization[Is("BigOrg")]] )
.then { first, last -> func(first, last) }
)
Normally it takes much more code to do this sort of thing:
when(someone) {
is Customer ->
if (someone.name.first == "Joe") {
when (val aff = someone.affiliate) {
is Partner -> {
func(someone.name.first, someone.name.last, aff.id)
}
else -> fail()
}
} else if (someone.name.first == "Jack") {
when (val aff = someone.affiliate) {
is Organization -> {
if (aff.name == "BigOrg") {
func(someone.name.first, someone.name.last)
} else fail()
}
else -> fail()
}
} else fail()
}
https://github.com/exoquery/decomatgammax
05/24/2023, 3:30 PMCalvo
05/25/2023, 5:29 AMamal
05/25/2023, 3:45 PMNick
05/26/2023, 3:52 PMpurpose
property
• Unmanaged scrolling