https://kotlinlang.org logo
Join SlackCommunities
Powered by
# science
  • a

    altavir

    05/08/2023, 1:02 PM
    Running 100 virtual devices (5Hz event rate) with SCADA event bus together with visualization service on almost zero CPU and less than 500 Mb RAM? Achievement unlocked today with Controls-kt.
    👍 1
    • 1
    • 4
  • a

    altavir

    07/05/2023, 6:52 AM
    Hello, everybody! The first public preview of the experimental Kotlin Notebook plugin for IntelliJ IDEA is finally available! Now you can explore, prototype, visualize, and document your code – all in the same environment. Please check out the blog post for full details: https://blog.jetbrains.com/kotlin/2023/07/introducing-kotlin-notebook/ Join the #notebooks channel for staying in touch! Thread in Slack Conversation
  • a

    altavir

    07/19/2023, 7:23 PM
    @Ilya Muradyan does notebook kernel do any magic with the classpath? For some reason, I can't access ktor server package. The CIO Jar is properly added to the classpath, but I can't access it.
    i
    • 2
    • 13
  • e

    elect

    08/01/2023, 10:05 AM
    there is currently an ongoing discussion in the scijava ecosystem about which solution to target for the next dev cycle (JVM, Python, JavScript and WebAssembly). GraalVM, Kotlin Multiplatform, Rust or Julia I'm obviously rooting for Kotlin, but if someone more expert (I'm looking at you, @altavir, for example) wanna jump in, he's more than welcome to do it
    a
    • 2
    • 1
  • e

    elect

    08/01/2023, 10:07 AM
    Personally, I think this is a golden chance to get Kotlin into the Scijava community
  • a

    altavir

    09/04/2023, 1:25 PM
    An important announcement about KScience projects. Since 2019 we were hosting our projects in a JetBrains Space instance. Sadly, we were notified that we can no longer use it after September 15 because our team association with MIPT, which is under USA sanctions (though our projects are fully open source and not associated with MIPT in any way). It means a lot of additional work on infrastructure for us, but more importantly it means a disruption of supply chain for our projects. For example development artifacts were hosted in Space. We will work on replacing our tooling with simpler instruments, but it will take time. Also we do not have any funding for our projects, so we will have to prioritize other work. So, here is the summary: • Development builds (I mean maven repositories) for Plotly-kt, KMath, VisionForge, DataForge-core, Controls-kt and other projects could stop working. We will restore them in a new repository, but it will take time. • Github projects are still mirrored to https://github.com/SciProgCentre. The primary repository is at https://git.sciprog.center/kscience. Gitea does not support two-side mirroring. So there could be hiccups with synchronization. • Issue tracking will be gradually moved to https://sciprog.center/youtrack/issues/KS?u=1 (YouTrack license is frozen as well, but we have a stand-alone version). If by any chance there are people, who want to support KScience infrastructure (with all sponsor benefits), please contact me.
    🥶 1
    e
    • 2
    • 9
  • a

    altavir

    12/14/2023, 6:02 PM
    Kandy: the new Kotlin plotting library by JetBrains | The Kotlin Blog We are excited to introduce Kandy, a new Kotlin plotting library by JetBrains. It provides a new, powerful DSL for creating charts of various kinds. The first public preview version is ready for you t
    🙏 2
  • a

    altavir

    02/04/2024, 1:43 PM
    The latest dev version of plotly-kt includes a Compose-Desktop example: https://github.com/SciProgCentre/plotly.kt/tree/master/examples/compose-demo. Sadly, CEF component is still bugged as hell. If anybody wants to fix CEF integration, MRs are welcome.
  • e

    elect

    07/08/2024, 12:36 PM
    I'm porting to kotlin this code
    Copy code
    snap_descriptors_np = extract_compute_np(
        lmp,
        "bgrid",
        0,
        2,
        (nz, ny, nx, self.fingerprint_length),
        use_fp64=use_fp64,
    )
    lmp.close()
    
    # switch from x-fastest to z-fastest order (swaps 0th and 2nd dimension)
    snap_descriptors_np = snap_descriptors_np.transpose([2, 1, 0, 3])
    where
    extract_compute_np
    returns a flat doubleArray representing an ndarray of
    [nz, ny, nx, self.fingerprint_length]
    now, I have to swap the 0 and 2nd dimensions and I'm trying to do this:
    Copy code
    Array(nx) { x ->
        Array(ny) { y ->
            Array(nz) { z ->
                val ofsX = x * (ny * nz * fingerprintLength)
                val ofsY = y * (nz * fingerprintLength)
                val ofsZ = z * fingerprintLength
                DoubleArray(fingerprintLength) { doubles[ofsX + ofsY + ofsZ + it] }
            }
        }
    }
    but it looks like it's wrong, anyone spots the problem?
    g
    a
    • 3
    • 4
  • a

    Amir H. Ebrahimnezhad

    08/14/2024, 6:14 PM
    Is there anyone here interested or doing research in molecular dynamics?
  • a

    Amir H. Ebrahimnezhad

    08/14/2024, 6:16 PM
    We made a molecular dynamics simulations package, that works like a meta framework on top of applications like lamps. It's called moleKule and it's available to work with right now. I'm actually looking for some collaboration to help us make it better and bigger. Https://GitHub.com/independent-society-of-knowledge/MoleKule
  • a

    Amir H. Ebrahimnezhad

    08/14/2024, 6:21 PM
    Does Kmath have a documentation team or is there a solid plan for documenting the code?
    a
    • 2
    • 8
  • a

    altavir

    08/14/2024, 6:31 PM
    @Amir H. Ebrahimnezhad you mentioned CERN data, we put a lot of effort to create an interface to CERN ROOT.
  • a

    altavir

    08/14/2024, 6:33 PM
    As for molecule dynamics. I will look into the code later, but it is a great Idea. I have plans to implement some generic physics extension like units of measure (there is Measured - https://github.com/nacular/measured library, but I want something more specific). We currently create some of those extensions inside Controls-kt since we work on integrating physics simulations into device controls.
    a
    • 2
    • 1
  • a

    Amir H. Ebrahimnezhad

    08/14/2024, 6:34 PM
    @altavir Yea that's one of main things I want to get from that binder we talked about.
    a
    • 2
    • 5
  • a

    altavir

    08/14/2024, 6:42 PM
    CERN ROOT interop is a major issue. We have working prototype that is already working in NICA accelerator at Dubna (together with https://github.com/SciProgCentre/visionforge visualization).
  • a

    Amir H. Ebrahimnezhad

    08/14/2024, 6:44 PM
    Where's the problem?
  • a

    altavir

    08/14/2024, 6:45 PM
    It is just a quite poorly designed format. The only project that managed to read it at least partially is Uproot.
  • a

    altavir

    08/14/2024, 6:46 PM
    When binding to native libraries one can also use https://github.com/whyoleg/ffi-kotlin by @Oleg Yukhnevich. I have not tried it myself, but it should simplify things a lot.
  • a

    Amir H. Ebrahimnezhad

    08/14/2024, 6:46 PM
    We have used Jextract, Java Native Access and Kpoet for that project.
    a
    • 2
    • 6
  • a

    Amir H. Ebrahimnezhad

    08/16/2024, 6:04 PM
    # Here's a simple example provided for MoleKule, a package for molecular dynamics!
    Copy code
    fun main() {
    
        // a basket for your atoms
        val env = Environment()
    
        // add to it like any of these methods
        env.add(atomOf(AtomicMass.C, Point(0, 0, 0), 1))
        env.add(H2(Point.randomOrientation * 10))
    
        // use sequence api to your advantage, or reinvent them yourselves
        Grid3D(20, 20, 20)
            .points
            .map { it * 1.5 } // scale
    //        .map { it.rotateZ(45.toRad()) } // rotate
            .map { it + (Point.xHat * 12) } // translate
            .filter { it isInside sphereShape  } // filter
            .map { atomOf(AtomicMass.C, it,1) } // generate
            .forEach { env.add(it) } // add
    
    
        
        env.toLammpsInputFile("Hello.data")
        // visualize a bit, it helps
        KoolVisualizer()
            .withDefaultConfig()
            .addPlugin(AxisPlugin())
            .addPlugin(BoxViewerPlugin(env.enclosingBox))
            .init()
            .addEnvironment(env)
            .runAndWaitUntilExit()
    
    }
    
    val sphereShape = Sphere(Point(22,12,12), 10)
    
    
    class H2(origin: Point) : Molecule(type = 3) {
        init {
            val eps = Point.xHat * 0.3
            val h1 = Atom(origin - eps, AtomicMass.H.mass, 4)
            val h2 = Atom(origin + eps, AtomicMass.H.mass, 4)
            atoms.addAll(listOf(h1, h2))
    
            // bonds.add()
        }
    }
    a
    • 2
    • 1
  • a

    altavir

    08/21/2024, 11:58 AM
    https://doi.org/10.1134/S1547477124701358 Kotlin-multiplatform goes for big science.
    👍🏽 1
    👍 2
  • a

    Amir H. Ebrahimnezhad

    08/21/2024, 2:12 PM
    @altavir Have you developed anything regarding diagram generation in particle physics?
    a
    • 2
    • 5
  • a

    Amir H. Ebrahimnezhad

    08/21/2024, 2:18 PM
    Is it even good to do so? I'm planning to make things along the way of my project at university
  • a

    altavir

    08/21/2024, 2:19 PM
    VisionForge has a lot of experimental places in terms of API, but it is pretty stable in terms of its work.
  • a

    altavir

    10/11/2024, 6:31 PM
    @Serhii Terentiev brought to me a nice scientific project in Kotlin: https://github.com/milaboratory/mixcr. If I am not mistaken, @Bolotin Dmitriy is one of the main contributors. At least the one I could find by github userpics. Nice work.
    👍 4
    👍🏻 1
    👍🏽 1
  • a

    altavir

    01/19/2025, 11:53 AM
    DataForge version 0.10.0 has been released: https://git.sciprog.center/kscience/dataforge-core/releases/tag/v0.10.0 It is not used a lot outside SPC projects so it probably is not that interesting. But it is important stepping stone for next VisionForge release, that also includes Plotly-kt release.
  • a

    altavir

    02/04/2025, 6:30 AM
    @Adrian Trapletti I had to make a fork of https://github.com/atraplet/clarabel4j to back-port it for Java 21 since our deployment environment does not allow non-LTS JVM. It is currently private, but if there is some interest, I can make it public in future. In therory, we can do something like multi-release jar, but I am not sure it worth the effort.
    a
    • 2
    • 2
  • a

    altavir

    02/13/2025, 4:46 AM
    @Adrian Trapletti Have you tried to interface directly with Rust code with https://gitlab.com/trixnity/uniffi-kotlin-multiplatform-bindings? I have not tried it myself. But one of my guys tried and he said it works perfectly.
    a
    • 2
    • 2
  • a

    altavir

    03/21/2025, 8:41 AM
    📈 VisionForge version [0.5.0 is released](https://github.com/SciProgCentre/visionforge/releases/tag/v0.5.0) and available both on https://repo.kotlin.link and maven-central. There are not a lot of new features, but it is a huge release in terms of inner logic refactoring and simplification. It will allow faster and simpler development in future. The major external change is that [Plotly-kt](https://github.com/SciProgCentre/plotly.kt) is now part of [VisionForge](https://github.com/SciProgCentre/visionforge/tree/master/plotly-kt). Plotly plot is now inherits
    Vision
    class from VisionForge and Plotly-kt server uses
    VisionForge
    server mechanics. The package is chanced from
    plotlykt-...
    to
    plotly-kt-...
    and version now follows VisionForge versioninng. Meaning that from
    space.kscience:plotlykt-core:0.7.2
    we are going to
    space.kscience:plotly-kt-core:0.5.0
    . Notebook versions are still not fully functional because Notebooks do not work properly with Kotlin 2.x. It will be fixed in the future (as soon it is fixed in notebook kernel).