About OS Library in Python

Hello all,

Is there a library in kotlin similar to OS in Python?

If it exists, it can be used to write batch scripts.

it’ll be exciting

1 Like

Having a similar library in Kotlin would be great, I know there are some ongoing projects trying to bring this to kotlin. I think it is important to have Kotlin/Common support for I/O, signals, sockets and simple access to the file system.

Myself has been looking into the java.nio.ByteBuffer and similar. Currently I am working on a project that requires that, that is the reason I am actually developing one myself. :smiley: Look at GitHub - angelos-project/angelos-core: Kotlin implementation of Java NIO that is Common and Native.

I here by invite everyone to take a look and join if they want. I am also willing if possible to break ut code in separate subprojects to share with a larger coding community!

1 Like

That’s really good. I hope to finish it early

Myself, first I am interested in a common buffer similar to the java.nio.ByteBuffer, also here there is a kotlin project that seem to have gotten stuck in its development GitHub - Kotlin/kotlinx-io: Kotlin multiplatform I/O library

Hopefully people can help me evaluate this one → angelos-core/ByteBuffer.kt at master · angelos-project/angelos-core · GitHub

What exactly do you need? Kotlin-JVM relies on java standard library and all things from python are available there.

1 Like

The multiplatform io lives here: ktor/ktor-io at main · ktorio/ktor · GitHub. It is not ideal, but it has most of functionality planned for kotlinx-io.

What I don’t like is the heavy need of third party libraries on ktor/ByteBufferChannel.kt at main · ktorio/ktor · GitHub pulling in a lot of java dependencies. When developing my own I try to minimize the level of third-party dependencies to one or two classes on JVM side.

Also the ktor socket implementation seems to be too unseemly to me regarding all the design, and a lot of functions being JVM-only. My intention is to have the same for Native and Jvm while necessary not full support on JS. Everything I do is based on POSIX and JNI.

Personally I want the speed and reliability of Native too, with a shared codebase in Common for my underlying business logic.

Ktor-io is fully multiplatform. “The speed and reliability of Native” is a myth. Native compilation won’t speed up your IO a lot.

1 Like

Could you tell me how to implement Noise Protocol Framework on top of ktor for Multiplatform.

The same way you would do it on top of java.nio. Ktor-io is the prototype for kotlinx-io. It includes primitives like Input and Output for streaming processing of buffers.

It has to be Multiplatform, then how?

Check the link I’ve dropped above. It is all there.