swift-evolution
okio
Our great sponsors
swift-evolution | okio | |
---|---|---|
124 | 15 | |
14,939 | 8,640 | |
0.8% | 0.5% | |
9.7 | 8.9 | |
7 days ago | 10 days ago | |
Markdown | Kotlin | |
Apache License 2.0 | Apache License 2.0 |
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
swift-evolution
-
Byte-Sized Swift: Building Tiny Games for the Playdate
[A Vision for Embedded Swift](https://github.com/apple/swift-evolution/blob/main/visions/e...) has the details on this new build mode and is quite interesting.
> Effectively, there will be two bottom layers of Swift, and the lower one, “non-allocating” Embedded Swift, will necessarily be a more restricted compilation mode (e.g. classes will be disallowed as they fundamentally require heap allocations) and likely to be used only in very specialized use cases. “Allocating” Embedded Swift should allow classes and other language facilities that rely on the heap (e.g. indirect enums).
Also, this seems to maybe hint at the Swift runtime eventually being reimplemented in non-allocating Embedded Swift rather than the C++ (?) that it uses now:
> The Swift runtime APIs will be provided as an implementation that’s optimized for small codesize and will be available as a static library in the toolchain for common CPU architectures. Interestingly, it’s possible to write that implementation in “non-allocating” Baremetal Swift.
-
Borrow Checking Without Lifetimes
I may be out of my depth here as I've only casually used Rust, but this seems similar to Swift's proposed lifetime dependencies[1]. They're not in the type system formally so maybe they're closer to poloneius work
[1]: https://github.com/apple/swift-evolution/blob/3055becc53a3c3...
-
Functional Ownership Through Fractional Uniqueness
Swift recently adopted a region-based approach for safe concurrency that builds on Milano et al’s ideas: https://github.com/apple/swift-evolution/blob/main/proposals...
-
Crafting Self-Evident Code with D
No, it's not. Refcounting CAN be a garbage collection algorithm, but in Swift it's deterministic and done at compile time. Not to mention recently added support for non-copyable types that enforces unique ownership: https://github.com/apple/swift-evolution/blob/main/proposals...
-
Swift Ownership Manifesto
> It's super easy to cause its type check to timeout, which is something I haven't seen when using Rust.
Yeah, the operator overloading design makes it too easy to construct an exponential search space.
> For instance, Swift doesn't have the orphan rule, so it's possible that 2 packages implement the same protocol for the same type, and when this happens currently there are no solutions;
There's now a warning about this: https://github.com/apple/swift-evolution/blob/main/proposals.... What other solutions can there be other than making it a hard error? It seems like an inherent drawback of typeclasses over first-class modules.
> there is this strange design decision that classes and structs should be different things and each have their own set of random limitations
structs in Swift are the same as structs in Rust, and a class is a heap-allocated reference counted box, like an Arc>.
> and there is SwiftUI, which hacks on the syntax itself, making statements no longer mean what they are supposed to mean
Result builders are a language feature and not part of SwiftUI: https://github.com/apple/swift-evolution/blob/main/proposals...
Just last week owning and borrowing parameters got accepted as well. https://github.com/apple/swift-evolution/blob/main/proposals...
It’s been the focus for a while especially after the concurrency work. It’s probably the final major feature before Swift 6
Swift 5.9 dropped at WWDC, and with it came with noncopyable value types:
https://github.com/apple/swift-evolution/blob/main/proposals...
as well as a way to explicitly move types:
https://github.com/apple/swift-evolution/blob/main/proposals...
I haven’t read either in-depth, though!
-
SwiftData
They actually can figure that out, though [0]. I hope this can solve some of it because their deployment model is the dumbest fucking thing. I'm glad they figured out how to backport async/await, it's just impossible to use in a serious library otherwise.
[0] https://github.com/apple/swift-evolution/blob/main/proposals...
-
Is there a web site I can go to if I want to find the SwiftUI roadmap?
https://www.swift.org/swift-evolution/ is where the discussion and planning of the evolution of Swift takes place.
- Experienced developers, would you recommend learning backend rather than doing side projects in iOS?
okio
-
Is it a good idea to use Google Guava library for Android development?
I am involved in the development of Android application which is a rather "thick" mobile client for a Web service. It heavily communicates with the server but also has a lot of inner logic too. So, I decided to use some features of Google Guava library to simplify development process. Here is a list of features I'm very interested in: immutable collections, base utils, collection extensions, functional programming sugar and idioms (common.collect and common.base), primitives utilities (common.primitives), hashing utilities (common.hash), concurrent utils (futures and AsyncFunction). Things I don't want to use in Android: common.cache (see question below), common.eventbus (we have better Android specific libs for this, such as Otto), common.io (we can use okio for Android now).
-
Why tools have Kotlin native to work with bytes?
Yeah Kotlin's own standard library is a lot smaller than Java's currently so you'll need to use something third-party for this. Okio is a popular option https://square.github.io/okio/ it has a Buffer type which is pretty similar to Java's ByteBuffer
-
can I access and manipulate the iOS filesystem with kotlin multiplatform?
Use okio, it is Multiplatform now. I use this for my own library KStore
-
Windows Central: "Microsoft to merge Surface Pro X ARM and Surface Pro 9 Intel versions under one product line"
For networking, file IO, and streams in general, there's Korio and for Java; for just networking, there's LiteNetLib for C#; for what looks like data streams in general, there's Okio also for Java; and Tokio for multi-threaded IO in Rust.
-
Porting C++ code to Kotlin (ISO 15765-2)
Okio is nice for input/output streams, and sockets.
-
Kotlin/native: library for file io?
Sounds like you want https://square.github.io/okio/
Try OKIO: https://github.com/square/okio/
- Are there any libraries well suited to the manipulation of bits, bytes and byte arrays used in packet communication?
-
Kotlin Team AMA #3: Ask Us Anything
On JVM, there is plenty of existing solution already on for multiplatform uses I'd suggest checking amazing Okio library by Square, that seems to cover most of basic use-cases.
- 60% of school apps are sending student data with third parties without consent
What are some alternatives?
OkHttp - Square’s meticulous HTTP client for the JVM, Android, and GraalVM.
kotlinx.coroutines - Library support for Kotlin coroutines
compose-multiplatform - Compose Multiplatform, a modern UI framework for Kotlin that makes building performant and beautiful user interfaces easy and enjoyable.
foundationdb - FoundationDB - the open source, distributed, transactional key-value store
kotlinx-datetime - KotlinX multiplatform date/time library
kotlinx-io - Kotlin multiplatform I/O library
kotlinx-nodejs - Kotlin external declarations for using the Node.js API from Kotlin code targeting JavaScript
PeopleInSpace - Kotlin Multiplatform project with SwiftUI, Jetpack Compose, Compose for Wear, Compose for Desktop, Compose for Web and Kotlin/JS + React clients along with Ktor backend.
kotlin-wrappers - Kotlin wrappers for popular JavaScript libraries
swift - The Swift Programming Language
swift-algorithms - Commonly used sequence and collection algorithms for Swift
kotlinx.serialization - Kotlin multiplatform / multi-format serialization