manlan
08/20/2020, 6:38 PMhinst
08/21/2020, 1:54 PMjaguililla
08/21/2020, 2:14 PM--continuous
option)? Thanks!Marc Knaup
08/24/2020, 1:03 AMmanlan
08/26/2020, 3:56 AMursus
08/29/2020, 12:20 AMColton Idle
08/29/2020, 5:32 AM<option name="PACKAGES_IMPORT_LAYOUT">
<value>
<package name="" alias="false" withSubpackages="true" />
<package name="java" alias="false" withSubpackages="true" />
<package name="javax" alias="false" withSubpackages="true" />
<package name="kotlin" alias="false" withSubpackages="true" />
<package name="" alias="true" withSubpackages="true" />
</value>
</option>
Did that happen to everyone?Nikky
08/30/2020, 7:43 PMfrogger
09/15/2020, 12:38 PMjavier Aravena
09/17/2020, 12:40 AMmanlan
09/21/2020, 2:15 PMelect
09/23/2020, 8:30 AM10:27 File type 'ANSI Aware'/'Log' conflict found
File pattern '*.log' was reassigned to 'Log'
Revert to 'ANSI Aware'
Edit 'ANSI Aware'
Edit 'Log'what is this? What shall I choose?
Shawn
09/23/2020, 2:40 PMColton Idle
09/24/2020, 2:04 AMelect
09/28/2020, 10:34 AMstephanmg
09/28/2020, 2:26 PMLeoColman
09/28/2020, 7:12 PMelect
10/09/2020, 9:43 AMMarc Knaup
10/15/2020, 12:50 AMFoso
10/15/2020, 7:14 PMjose96043
10/15/2020, 9:22 PMdispatch_queue_create("background.queue", dispatch_queue_serial_t())
not sure if there is a kmm channel hereMarc Knaup
10/16/2020, 1:26 PMMarc Knaup
10/19/2020, 6:35 PMbjonnh
10/21/2020, 3:55 PMhttps://www.smbc-comics.com/comics/1535025762-20180823.png▾
ursus
10/24/2020, 1:05 PMlouiscad
10/30/2020, 9:03 PMck
10/31/2020, 5:42 PMdephinera
11/02/2020, 8:59 PMgroostav
11/02/2020, 10:57 PMfun <M, R> sendAndAwaitResponse(func: KFunction2<M, StreamObserver<R>, Unit>): suspend (request: M) -> R = { request: M -> sendAndAwaitResponse(func, request) }
// sends a message, and converts the response observer to kotlin suspension (and exception) semantics
// assumes a unary call (that is, a call with one value given to the response observer)
suspend fun <M, R> sendAndAwaitResponse(func: KFunction2<M, StreamObserver<R>, Unit>, request: M): R {
val source = RuntimeException("server replied with error on call to ${func.name} with $request")
return suspendCoroutine<R> { continuation ->
func(request, object: StreamObserver<R> {
var result: ResponseState<R> = ResponseState.NoValue
override fun onNext(value: R) {
//...
}
override fun onError(thrown: Throwable) {
//...
}
override fun onCompleted() {
//...
continuation.resumeWith(result)
}
})
}
}
// "idiomatic" usage:
sendAndAwaitResponse(grpcService::someUnaryServiceMethod)(RequestDTO.newBuilder()....)
One of the things I was hailing kotlin for is that you dont often (ever?) end up with functions-returning-lambdas as is sometimes convention in Scala --typically to help the scala type inference engine. Well here I am doing exactly that
fun <M, R> sendAndAwaitResponse(func: KFunction2<M, StreamObserver<R>, Unit>): suspend (request: M) -> R = { request: M -> sendAndAwaitResponse(func, request) }
is doing.
tl;dr kotlin > scala; if you're using grpc try the new kotlin GRPC target. Suspend funs are good.Marc Knaup
11/04/2020, 2:29 PM123.px
without a .
before the px
even if I’m not writing Kotlin code 😄Marc Knaup
11/04/2020, 2:29 PM123.px
without a .
before the px
even if I’m not writing Kotlin code 😄louiscad
11/04/2020, 3:00 PMMarc Knaup
11/04/2020, 3:01 PM