Marc Knaup
08/08/2020, 5:24 PMtoString()
and alike?
That would be super helpful 🙂frank
08/08/2020, 9:33 PM1.3.2-$kotlin_version
vs 1.3.2
. Both work itJonny
08/08/2020, 10:58 PMTwoClocks
08/09/2020, 4:58 AMiseki
08/09/2020, 12:17 PMvpriscan
08/10/2020, 8:37 AMi in 1..4
is equivalent of 1 <= i && i <= 4
, but is it really on the bytecode level? Doesn't range expression generate an additional range object?marcinmoskala
08/10/2020, 9:47 AMlazy { a.makeB() }
should be the same as lazy(a::makeB)
https://blog.kotlin-academy.com/method-references-and-lambdas-in-lazy-properties-371dbbea857bChris Cordero
08/10/2020, 11:48 PMManit Chitkara
08/11/2020, 8:20 AMStavFX
08/11/2020, 6:07 PMfun <T> foo(param: T)
, but with a constructor I can’t just do <T> constructor(param: T)
There are ways I can get around this limitation, but I’m just curious if it’s possible with slightly different syntax.
(also, I don’t want to make the entire class generic to T
)Juan Medina
08/11/2020, 6:44 PMJorrit
08/12/2020, 2:20 PMclass Base() {
class Nested() {
}
}
funWithCtor(::Base) // works
funWithCtor(::Base.Nested) // doesn't work
funWithCtor(::Nested) // works if: import Outer.Nested
Hanno
08/13/2020, 9:12 AMlaht
08/13/2020, 11:21 AMkts
executable and then invoke a .kts
script with maven dependencies. I know of kscript (unix systems) and the official scripting support (needs kotlin installed). My solution requires no prior software installed and works regardless of platform. Is it valuable?ilya.gorbunov
08/13/2020, 3:15 PM2020-08-13T15:15:00Z
, a good time to announce the first milestone of kotlinx-datetime library, v0.1, has been published
https://discuss.kotlinlang.org/t/kotlinx-datetime-0-1-has-been-published/18766stanislav.erokhin
08/13/2020, 3:38 PMAndrea Giuliano
08/13/2020, 7:19 PMkevin.cianfarini
08/13/2020, 8:12 PMcommonTest
module be able to see internal
code from commonMain
? Are they part of the same compile group?nathan
08/13/2020, 8:34 PMAlex Ch
08/13/2020, 8:58 PM@ExperimentalUnsignedTypes
?Артём Гильмудинов
08/14/2020, 8:55 AMMgj
08/14/2020, 9:03 AMclass MyClass {
suspend fun <T> doStuff(): T {
return myReified<T>()
}
}
suspend inline fun <reified T> myReified(): T
What is a good workaround?dfriehs
08/14/2020, 10:09 AMAndrea Giuliano
08/14/2020, 12:41 PMsequence {
yieldAll(1..100 step 10)
}.asStream()
while in the <http://(https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.streams/kotlin.sequences.-sequence/as-stream.html|doc> it seems it’s possible?
Intellij tells me unresolved reference asStream()
Fudge
08/14/2020, 1:17 PMEugen Martynov
08/14/2020, 2:05 PMVolodymyr Galandzij
08/14/2020, 2:42 PMtypealias AndroidUri = android.net.Uri
val builder = AndroidUri.Builder()
==>
Unresolved reference: BuilderThis one works as expected:
typealias AndroidUriBuilder = android.net.Uri.Builder
val builder = AndroidUriBuilder()
Slackbot
08/14/2020, 3:42 PMTwoClocks
08/14/2020, 9:18 PMDALDEI
08/15/2020, 3:45 PMDALDEI
08/15/2020, 3:45 PMAndrea Giuliano
08/15/2020, 3:46 PMDALDEI
08/15/2020, 3:48 PMAndrea Giuliano
08/15/2020, 3:48 PMDALDEI
08/15/2020, 3:50 PMAndrea Giuliano
08/15/2020, 3:51 PMreified fun View()...
DALDEI
08/15/2020, 4:11 PMabstract class X<T:Any>() {
val x : Int = 1
abstract fun getView() : KClass<T>
}
inline fun <reified T:Any> X<T>.view() = T::class
class Y : X<StatementJob>() {
override fun getView() = view()
}
streetsofboston
08/15/2020, 4:19 PMclass MyClass private constructor(...) {
companion object {
inline operator fun <reified T> invoke(...): MyClass {
}
}
}
Then you can construct it still like this
val mc = MyClass(…)
, because it is the same as val mc = MyClass.invoke(…)
DALDEI
08/16/2020, 12:38 PM