https://kotlinlang.org logo
Join the conversationJoin Slack
Channels
100daysofcode
100daysofkotlin
100daysofkotlin-2021
advent-of-code
aem
ai
alexa
algeria
algolialibraries
amsterdam
android
android-architecture
android-databinding
android-studio
androidgithubprojects
androidthings
androidx
androidx-xprocessing
anime
anko
announcements
apollo-kotlin
appintro
arabic
argentina
arkenv
arksemdevteam
armenia
arrow
arrow-contributors
arrow-meta
ass
atlanta
atm17
atrium
austin
australia
austria
awesome-kotlin
ballast
bangladesh
barcelona
bayarea
bazel
beepiz-libraries
belgium
berlin
big-data
books
boston
brazil
brikk
budapest
build
build-tools
bulgaria
bydgoszcz
cambodia
canada
carrat
carrat-dev
carrat-feed
chicago
chile
china
chucker
cincinnati-user-group
cli
clikt
cloudfoundry
cn
cobalt
code-coverage
codeforces
codemash-precompiler
codereview
codingame
codingconventions
coimbatore
collaborations
colombia
colorado
communities
competitive-programming
competitivecoding
compiler
compose
compose-android
compose-desktop
compose-hiring
compose-ios
compose-mp
compose-ui-showcase
compose-wear
compose-web
connect-audit-events
corda
cork
coroutines
couchbase
coursera
croatia
cryptography
cscenter-course-2016
cucumber-bdd
cyprus
czech
dagger
data2viz
databinding
datascience
dckotlin
debugging
decompose
decouple
denmark
deprecated
detekt
detekt-hint
dev-core
dfw
docs-revamped
dokka
domain-driven-design
doodle
dsl
dublin
dutch
eap
eclipse
ecuador
edinburgh
education
effective-kotlin
effectivekotlin
emacs
embedded-kotlin
estatik
event21-community-content
events
exposed
failgood
fb-internal-demo
feed
firebase
flow
fluid-libraries
forkhandles
forum
fosdem
fp-in-kotlin
framework-elide
freenode
french
fritz2
fuchsia
functional
funktionale
gamedev
ge-kotlin
general-advice
georgia
geospatial
german-lang
getting-started
github-workflows-kt
glance
godot-kotlin
google-io
gradle
graphic
graphkool
graphql
graphql-kotlin
graviton-browser
greece
grpc
gsoc
gui
hackathons
hacktoberfest
hamburg
hamkrest
helios
helsinki
hexagon
hibernate
hikari-cp
hire-me
hiring
hongkong
hoplite
http4k
hungary
hyderabad
image-processing
india
indonesia
inkremental
intellij
intellij-plugins
intellij-tricks
internships
introduce-yourself
io
ios
iran
israel
istanbulcoders
italian
jackson-kotlin
jadx
japanese
jasync-sql
java-to-kotlin-refactoring
javadevelopers
javafx
javalin
javascript
jdbi
jhipster-kotlin
jobsworldwide
jpa
jshdq
juul-libraries
jvm-ir-backend-feedback
jxadapter
k2-early-adopters
kaal
kafka
kakao
kalasim
kapt
karachi
karg
karlsruhe
kash_shell
kaskade
kbuild
kdbc
kgen-doc-tools
kgraphql
kinta
klaxon
klock
kloudformation
kmdc
kmm-español
kmongo
knbt
knote
koalaql
koans
kobalt
kobweb
kodein
kodex
kohesive
koin
koin-dev
komapper
kondor-json
kong
kontent
kontributors
korau
korean
korge
korim
korio
korlibs
korte
kotest
kotest-contributors
kotless
kotlick
kotlin-asia
kotlin-beam
kotlin-by-example
kotlin-csv
kotlin-data-storage
kotlin-foundation
kotlin-fuel
kotlin-in-action
kotlin-inject
kotlin-latam
kotlin-logging
kotlin-multiplatform-contest
kotlin-mumbai
kotlin-native
kotlin-pakistan
kotlin-plugin
kotlin-pune
kotlin-roadmap
kotlin-samples
kotlin-sap
kotlin-serbia
kotlin-spark
kotlin-szeged
kotlin-website
kotlinacademy
kotlinbot
kotlinconf
kotlindl
kotlinforbeginners
kotlingforbeginners
kotlinlondon
kotlinmad
kotlinprogrammers
kotlinsu
kotlintest
kotlintest-devs
kotlintlv
kotlinultimatechallenge
kotlinx-datetime
kotlinx-files
kotlinx-html
kotrix
kotson
kovenant
kprompt
kraph
krawler
kroto-plus
ksp
ktcc
ktfmt
ktlint
ktor
ktp
kubed
kug-leads
kug-torino
kvision
kweb
lambdaworld_cadiz
lanark
language-evolution
language-proposals
latvia
leakcanary
leedskotlinusergroup
lets-have-fun
libgdx
libkgd
library-development
linkeddata
lithuania
london
losangeles
lottie
love
lychee
macedonia
machinelearningbawas
madrid
malaysia
mathematics
meetkotlin
memes
meta
metro-detroit
mexico
miami
micronaut
minnesota
minutest
mirror
mockk
moko
moldova
monsterpuzzle
montreal
moonbean
morocco
motionlayout
mpapt
mu
multiplatform
mumbai
munich
mvikotlin
mvrx
myndocs-oauth2-server
naming
navigation-architecture-component
nepal
new-mexico
new-zealand
newname
nigeria
nodejs
norway
npm-publish
nyc
oceania
ohio-kotlin-users
oldenburg
oolong
opensource
orbit-mvi
osgi
otpisani
package-search
pakistan
panamá
pattern-matching
pbandk
pdx
peru
philippines
phoenix
pinoy
pocketgitclient
polish
popkorn
portugal
practical-functional-programming
proguard
prozis-android-backup
pyhsikal
python
python-contributors
quasar
random
re
react
reaktive
realm
realworldkotlin
reductor
reduks
redux
redux-kotlin
refactoring-to-kotlin
reflect
refreshversions
reports
result
rethink
revolver
rhein-main
rocksdb
romania
room
rpi-pico
rsocket
russian
russian_feed
russian-kotlinasfirst
rx
rxjava
san-diego
science
scotland
scrcast
scrimage
script
scripting
seattle
serialization
server
sg-user-group
singapore
skia-wasm-interop-temp
skrape-it
slovak
snake
sofl-user-group
southafrica
spacemacs
spain
spanish
speaking
spek
spin
splitties
spotify-mobius
spring
spring-security
squarelibraries
stackoverflow
stacks
stayhungrystayfoolish
stdlib
stlouis
strife-discord-lib
strikt
students
stuttgart
sudan
swagger-gradle-codegen
swarm
sweden
swing
swiss-user-group
switzerland
talking-kotlin
tallinn
tampa
teamcity
tegal
tempe
tensorflow
terminal
test
testing
testtestest
texas
tgbotapi
thailand
tornadofx
touchlab-tools
training
tricity-kotlin-user-group
trójmiasto
truth
tunisia
turkey
turkiye
twitter-feed
uae
udacityindia
uk
ukrainian
uniflow
unkonf
uruguay
utah
uuid
vancouver
vankotlin
vertx
videos
vienna
vietnam
vim
vkug
vuejs
web-mpp
webassembly
webrtc
wimix_sentry
wwdc
zircon
Powered by Linen
io
  • a

    altavir

    10/17/2019, 7:09 AM
    @leonid Is it possible to push nightly build of io-2 to some repository? I want to play around with it in experimental branch of the project. but if I just build it locally, I can't attach it as dependency. Also I do not know, how stable is the branch.
    e
    • 2
    • 2
  • a

    altavir

    11/20/2019, 7:06 AM
    @leonid I got really tired of bugs in old IO, so I've forked it and deplyed in our work repository. So I am now rewriting our code using io-2 and I have some comments already.
    Bytes
    interface provides input by
    input
    method. The problem is that it could leak an Input that could survive closing of parent
    Bytes
    and will be invalid. I propose to replace it with consumer function like described here: https://github.com/Kotlin/kotlinx-io/issues/71 Also
    Bytes
    has
    size
    function. I can't see a way to change size after creation, so I propose to change it to value and use
    lazy
    delegate to compute it on first call.
    e
    • 2
    • 2
  • a

    altavir

    11/21/2019, 7:30 AM
    I have been poking io-2 for some time and I came to conclusion that sooner or later we will need to introduce suspension into it in orde to read and write dynamic inputs and outputs like inputstreams and channels. So we have two solutions: either wrap everything in callbacks and then introduce binding to coroutines or make all read and write operations suspendable from the start. The actual suspension will be done during buffer fetch/flush, so it should not affect performance much. So far I think that making everything suspendable looks better.
    e
    k
    • 3
    • 13
  • a

    altavir

    11/25/2019, 2:30 PM
    If I implement Input, I need to fill Buffer. What are guarantees about Buffer state. Do I need to flip it? Can I use it from start or I need to respect current position?
    d
    • 2
    • 7
  • a

    altavir

    12/11/2019, 8:24 PM
    @Oleg Yukhnevich we just had a discussion about using rsockets for distributed control systems in #science. Multiplatform version looks promising. I can't take another project right now, but please fill free to ask questions here. I have some experience with io, coroutines and multiplatform.
    o
    • 2
    • 11
  • o

    Oleg Yukhnevich

    12/12/2019, 7:14 PM
    @Vsevolod Tolstopyatov [JB] Hi, may be you can share some info about some release dates of 0.2 version? at least, month, two, or half a year? before/after kotlin 1.4?
    v
    • 2
    • 3
  • a

    altavir

    12/20/2019, 4:51 PM
    We played a bit with my IO fork and it does not seem to work as well as expected (at least @Zelenyi regularily finds some failing test cases). I like the API, but the problem is that
    Bytes
    is not a suted to be a temporary data container due to its volatility. I still do want to be able to copy part of input to a temporary storage object which later could be read from as Input and written to output as a whole. We can certainly do it via
    ByteArray
    , but it means additional copy on any such operation. Instead I am thinking about following thing: we can add additional Binary reading operation into `Input`: By default it reads byte array of given length, but when read from a random-access entity like file or
    ByteArray
    it is overwritten by method that does not copy array, but instead creates a
    Binary
    which references initial structure and holds offset and size. Thus it could be read and written without additional copy.
    j
    • 2
    • 6
  • k

    kevin.cianfarini

    01/04/2020, 11:23 PM
    Is there a plan to support `inotify`/`FindFirstChangeNotification` in kotlinx.io?
    e
    • 2
    • 1
  • d

    Dominaezzz

    01/29/2020, 12:07 PM
    So I noticed
    Buffer
    now uses a
    ByteArray
    instead of
    CPointer<ByteVar>
    . Is
    <http://kotlinx.io|kotlinx.io>
    still going to provide an abstraction for off-heap memory or should I be looking into implementing my own?
    a
    e
    j
    • 4
    • 14
  • d

    Derek Berner

    02/03/2020, 10:42 PM
    Hi, how do we access
    <http://kotlinx.io|kotlinx.io>
    from a
    commonMain
    sourceset in a MPP project?
    a
    • 2
    • 15
  • k

    kevin.cianfarini

    02/10/2020, 5:52 PM
    is the planned
    sockets
    module going to be async? If so, is it planned for these async sockets to support TCP/IP backpressure via suspending functions?
    a
    j
    • 3
    • 15
  • a

    altavir

    02/24/2020, 8:38 AM
    @e5l I will need to revisit IO soon and will try to bring my fork more in direction of primary repository. Ther is still one important question about usage of
    Bytes
    though. Will it be possible to use bytes for multi-read operations? The major problem for me so far was that once input is called on
    Bytes
    , it becomes invalid. If this is still the case, I will still need to introduce
    Binary
    for lazy multi-read and I think that the API should be somehow changed to avoid rereading
    Bytes
    object.
    e
    j
    • 3
    • 15
  • d

    Dominaezzz

    03/11/2020, 12:00 AM
    Hi! I realise ktor doesn't need
    <http://kotlinx.io|kotlinx.io>
    anymore and there's an
    io-2
    going to be published soon, but can we get one more version of the original
    kotlinx-io
    for 1.3.70?
    e
    • 2
    • 2
  • k

    kevin.cianfarini

    03/25/2020, 6:41 PM
    I realize this is a bit far off, but I think this would be of value for people to see. Async/IO for native might be trivialized some if we bind to libevent https://github.com/libevent/libevent
    e
    j
    • 3
    • 18
  • k

    kevin.cianfarini

    04/20/2020, 2:12 PM
    Has anyone been able to use jitpack to get this since there aren't any io-2 builds?
    a
    • 2
    • 1
  • k

    kevin.cianfarini

    04/22/2020, 8:43 PM
    Since it's planned for
    Bytes
    to go internal, do we plan to have any equivalent to
    ByteString
    from okio? Input doesn't seem to entirely fit the bill
    a
    • 2
    • 24
  • a

    altavir

    04/24/2020, 8:33 AM
    @e5l There is a request for native flavor of IO library. It seems like appropriate targets are not generated unless
    idea.active
    flag is set in the system. Could you explain what does it mean?
    e
    k
    • 3
    • 12
  • s

    Shawn Witte

    10/30/2020, 8:35 PM
    So, is this library going to go into development again soon? I believe one of the main things holding it up was the serialization library work, which has now reached full 1.0 release. The io library got mentioned (very briefly) during the 1.4 event, so I know it isn't forgotten.
    d
    s
    j
    • 4
    • 6
  • a

    Andrey Martynov

    02/09/2021, 8:28 AM
    Is it alive? https://github.com/Kotlin/kotlinx-io
    o
    a
    • 3
    • 2
  • a

    altavir

    02/28/2021, 3:30 PM
    @e5l I am tired of tryitng to support my kotlinx-io fork, so I am trying to migrate to ktor-io. Some things are uggly but manageable, but I've just spent almost the whold day with the following problem: it seems that
    readBytes
    method does not actually advance the input read pointer. Is it intentional?
    e
    • 2
    • 4
  • i

    Imran/Malic

    08/27/2021, 5:19 AM
    Hi I started a small Pr to update the project dependencies to the kotlin version 1.5.30. I am only having a few question, regarding errors that came up with Annotations - I leave them below this thread 🙂
    i
    • 2
    • 4
  • i

    Imran/Malic

    01/24/2022, 1:45 PM
    Sorry if that has been asked before but is there an mpp version of a ByteBuffer? or is it just using Bytechannel ?
    d
    • 2
    • 1
  • d

    Didier Villevalois

    07/09/2022, 8:53 AM
    Hi all! I observe a lot of fragmentation and duplication of effort around buffers. As there is no standard APIs for multiplatform buffers, you have to do a lot of work if you want to share a buffer across a stack of libraries. For instance, one of my use-cases is to: (1) receive a packet from a
    ktor-network
    socket, (2) parse a message using
    google-flatbuffers
    which contains a packed scalar array, (3) that is itself fed to
    multik
    to make a multi-dimensional array of it. Along all this processing line, it is possible to have a single byte array backing multiple buffers and not have to copy any bytes. However, it is a lot of work currently because there is no standard buffer API. For instance,
    google-flatbuffers
    is defining their own Buffer API to support this no-copy principle: https://github.com/google/flatbuffers/blob/master/kotlin/flatbuffers-kotlin/src/commonMain/kotlin/com/google/flatbuffers/kotlin/Buffers.kt In the above-mentioned use-case for instance, I have to implement my own
    com.google.flatbuffers.kotlin.ReadBuffer
    above `ktor-io`'s
    <http://io.ktor.utils.io|io.ktor.utils.io>.core.ByteReadPacket
    , etc Isn't it time that people from Okio, Ktor and others get together to define a standard Buffer API and revive
    kotlinx-io
    ?? (Sorry for the kinda rant but it is a little irritating...)
    a
    o
    a
    • 4
    • 14
  • d

    Didier Villevalois

    12/21/2022, 11:45 AM
    Taken from Ktor 2023 Roadmap :
    We’re extracting the IO functionality into a separate library. This is a long-standing task that we’ve been working on gradually, and aim to finalize in 2023.
    ❤️ :kotlin-intensifies-purple: @e5l, @Oleg Yukhnevich Will this also include
    ktor-network
    ?
    d
    o
    a
    • 4
    • 4
Powered by Linen
Title
d

Didier Villevalois

12/21/2022, 11:45 AM
Taken from Ktor 2023 Roadmap :
We’re extracting the IO functionality into a separate library. This is a long-standing task that we’ve been working on gradually, and aim to finalize in 2023.
❤️ :kotlin-intensifies-purple: @e5l, @Oleg Yukhnevich Will this also include
ktor-network
?
d

Dominaezzz

12/21/2022, 12:30 PM
I wonder if this separate library will be
kotlinx-io
or
ktor-io
. I reckon it's the latter.
o

Oleg Yukhnevich

12/21/2022, 1:06 PM
I have no real insights here, sorry 😶 But AFAIK, only IO part (sync and async) will be extracted. TCP/UDP will be still in ktor-network, and I don’t think that it’s an issue
a

altavir

12/22/2022, 7:17 AM
From my point it is great. I need pure IO without network for my projects.
d

Didier Villevalois

12/22/2022, 1:36 PM
Pure IO will be helpful for most of my projects too. 😛
View count: 6