Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
    mplain
    @mplain
    and it cannot download a newer one, because no internet
    how do i update the compiler offline?
    like, get a file via email and put it where?
    and where i download it from
    mplain
    @mplain
    problem solved by declaring a dependency on kotlin-stdlib in me project build
    Hermi09
    @Hermi09
    How to make a authenticated http get request in Kotlin
    Mr. Motanovici
    @Motanovici
    @Hermi09 From what I understand, you are looking for this library : OkHTTP . You can make GET/POST requests and such
    Tony Pelletier
    @tpe11etier
    Hi.. At some point the Java to Kotlin conversion stopped working. I've made sure the option is checked in preferences but it still won't come up. Any ideas?
    morganc3
    @morganc3
    test
    test
    Cody Mikol
    @codymikol
    Test
    matrixbot
    @matrixbot
    heavens007 ㅗㅑ
    Keith Matthews
    @manifolded
    My CameraX fantasy has come to a rude end. It turns out that manual exposure is only available in Camera2, so now I have to start my journey all over again. Urgh.
    At least I know some kotlin now.
    Francisco Albert Albusac
    @tatitati
    quick question about JVM
    if I have a Jar file, which has some dependencies, how does it know my application (using this jar file) where needs to find these dependencies?, I mean, are repositories included inside the Jar?
    Aleh
    @AlehGalo

    Hello to everyone
    I have an issue with Kotlin -> kapt -> mapstruct
    I have 2 data classes
    @Entity(name = "PLAN")
    @TypeDef(name = "pgsql_enum",
    typeClass = PostgreSQLEnumType::class)
    @KotlinBuilder

    data class Plan(
    @Id
    @GeneratedValue(generator = "UUID")
    @GenericGenerator(name = "UUID", strategy = "org.hibernate.id.UUIDGenerator")
    @JsonProperty("uuid")

      val uuid: UUID? = null                

    ........
    )

    @Document(collection = "plan")
    @KotlinBuilder
    data class MongoPlan(

        val uuid: String? = null

    .................)
    and mapping instructions

    @Mapper
    interface MongoPlanMapper {

    @Mappings(Mapping(target = "uuid", 
            qualifiedByName = ["uuidMapper"]))
    fun convert(plan: Plan): MongoPlan
    
    @Named("uuidMapper")
    fun uuidMapper(uuid: UUID): String =
            uuid.toString()

    }
    and I get
    Error: java:".

    Did anyone have such problems ?

    Francisco Albert Albusac
    @tatitati
    how can I know if a jar file includes all the needed third party dependencies inside? (im trying to build one)
    can I inspect the jar file and see a "dependencies" folder or something like that?
    Aleh
    @AlehGalo
    DEAD CHANNEL
    Alexander
    @stalexxx
    everybody in telegram
    pawarashish564
    @pawarashish564
    I'm working on a java compiler API to create a new extension as AutoCompiler which will solve all compile time error automatically without manually looking into the code.
    See this here https://github.com/pawarashish564/AutoCompiler new contributors are always welcomed.
    matrixbot
    @matrixbot
    Anoop So, the AsyncTask is getting deprecated in A11. What would be a proper way to call a Kotlin Coroutine from Java? I tried passing in a Continuation in to the suspend function but somehow it's not getting called. Any ideas?
    pawarashish564
    @pawarashish564
    @stalexxx link to telegram channel?
    pawarashish564
    @pawarashish564
    Hello Everyone, You must have heard the Meme about Compiler that says "If Compiler knows there's missing semicolon on Line 16, then why don't it put one there ! " . I got one idea from the meme . I started developing a tool called "Autocompiler " which will automatically solve common java errors such as missing symbols and brackets. Its on Github if you'r interested Please do contribute . https://github.com/pawarashish564/AutoCompiler
    Starlight220
    @Starlight220
    Sorry for the basic question, but is there a way to access the name of a class property at runtime? Something similar to C#'s nameof()? If named arguments are possible, is this?
    And if implemented for Kotlin/JVM, is it implemented for Kotlin/JS?
    Sunny
    @infinityat0
    A very dumb question.
    suspend fun doSomething(str: Optional<String>) {
      // Error: Suspension functions can be called only within coroutine body
      str.map { doSomethingElse() } 
    }
    
    suspend fun doSomethingElse() { }
    why does that not work while this piece of code does
    suspend fun doSomething(str: Optional<String>) {
      if (str.isPresent) {
        doSomethingElse()
      }
    }
    
    suspend fun doSomethingElse() {}
    matrixbot
    @matrixbot
    Anoop Sunny (Gitter): Because doDomethingElse() is called inside a lambda and the lambda will be called from a non-coroutine scope. Hence the error.
    RMuskovets
    @RMuskovets
    hi, can I cast Map<*, *> to Map<String, *> (when statement)?
    RMuskovets
    @RMuskovets
    fun Any?.bencoded(): String = when (this) {
        is Collection<*> ->                     this.bencoded()
        is Map<*, *>     -> (this as Map<String, *>).bencoded()
        is ByteArray     ->                     this.bencoded()
        is Boolean       ->                     this.bencoded()
        is String        ->                     this.bencoded()
        is Short         ->                     this.bencoded()
        is Char          ->                     this.bencoded()
        is Long          ->                     this.bencoded()
        is Byte          ->                     this.bencoded()
        is Int           ->                     this.bencoded()
        else             -> throw UnsupportedOperationException()
    }
    here's my method, the problem is with is Map<*, *> -> (this as Map<String, *>), IDEA complains about unchecked cast
    matrixbot
    @matrixbot
    takan any room for TeamCity ?
    Bishal Jaiswal
    @Bishalj
    Did any one used com.soywiz.korlibs.korte, i am getting error in selecting variant, can anyone help on this ?
    image.png
    Starlight220
    @Starlight220
    @RMuskovets - just an idea: why not transform the map by transforming (K, V) to (String, V) using toString()?
    Ghost
    @ghost~5f3bf8add73408ce4fec8bff
    hi
    I'm new to Gitter, wondering if anyone could help.
    Never mind
    Rishit Dagli
    @Rishit-dagli

    Hey,
    I open-sourced this repo demonstrating how you can get started with Machine Learning in Android 11 with Kotlin, all that is new. I further even explain how the code works so you can very easily get started with implementing Machine Learning in your Android apps with cool examples!

    (PS: Leave me a star if this looks good to you, helps me a lot.)

    https://github.com/Rishit-dagli/ML-with-Android-11

    Starlight220
    @Starlight220
    Is there a compiler flag to prevent implicit Type!->Type conversions? I frequently use a Java library from Kotlin code, and want to prevent any nullability errors.
    Rishit Dagli
    @Rishit-dagli
    We are all geared up for our September Event going live in 90 minutes. We will have Carlos Mota and Wajahat Karim speaking on Scoped Storage in Android and Building a Game with Jetpack Compose.
    Register now if you haven't already at https://www.meetup.com/Kotlin-Mumbai/events/273000330/
    SP
    @vyvl
    is there a way to exclude transitive dependency in kotlin main.kts script file, something like
    @file:DependsOn("org.slf4j:slf4j-simple:1.7.30", exclude = "org.slf4j:slf4j-api")
    Alfred Lopez
    @alfredlopez
    Hello, I’m getting started on Kotlin Multiplatform. What I’ve done so far, is create a Java lib with Kotlin and I would like to “port” that code to JS. Is this possible, from an existing project perspective, or do I have to do some scaffolding for the target platforms?
    I’ve followed the tutorials from JetBrains and others, but most of the examples create Kotlin Mobile projects as opposed to Multiplatform Library projects
    Sanju.log
    @modasiasanjay_twitter
    hi is there any crack version of IntelliJ Idea JAVA enterprise edition
    Alfred Lopez
    @alfredlopez
    @modasiasanjay_twitter you only need the community edition for kotlin.
    Rishit Dagli
    @Rishit-dagli
    Last Year I applied at 1 Devfest and got rejected and I have made progress this year I will be speaking at 5 Devfests! See my Devfest journey and join me for free talks on Android and ML - https://twitter.com/rishit_dagli/status/1316230949500190720?s=20
    Navid Ghahremani
    @ghahramani
    Hey guys
    I am working on a kotlin backend project and I need to use my C library in my non-native kotlin app, but couldn't find any document about it, if anyone has a good documentation about it or a project, I would really appreciate if you share
    Starlight220
    @Starlight220
    If you want to use a C library in Kotlin/JVM then the simpler solution will likely be plain old JNI. Most resources about JNI will use Java and can be easily converted to Kotlin. A quick google search found this article about JNI in Kotlin: https://medium.com/@mattmoore_io/kotlin-jni-for-native-code-835e93af7ddf
    1 reply
    matrixbot
    @matrixbot

    charlag Hey everyone! Is it okay if I ask a question?
    what do I do with CStructVar which has val attributes: kotlinx.cinterop.CArrayPointer<...some CStructVar>? It's val so I cannot assign it and pointer to structs doesn't expose anything for setting members

    c struct is here: https://developer.gnome.org/libsecret/0.18/libsecret-SecretSchema.html#SecretSchema