swift-collections
yjs
Our great sponsors
swift-collections | yjs | |
---|---|---|
10 | 53 | |
3,509 | 15,052 | |
2.4% | 4.1% | |
9.1 | 8.4 | |
2 months ago | 1 day ago | |
Swift | JavaScript | |
Apache License 2.0 | MIT |
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-collections
-
Swift outside the Apple ecosystem
I think Swift Collections is adding that soon-ish, in 1.1.
-
Dynamic sections in diffable table view data sources
Sure, those could work. But I’ve found that OrderedDictionary from the swift-collections package is really helpful in cases like this. With that, your source of truth could be OrderedDictionary. Easy constant time lookup by Section, and order is maintained.
-
Why doesn't Swift have "unpredictable order" annotations to make it explicit in the code when the order of something is not predictable (e.g., when converting a set to a list)?
It's a part of Swift's Collection package.
-
Top swift libraries and why?
Swift Collections
- Show HN: Bike – macOS Native Outliner
-
Transforming array to multidimensional array (2D)
I think it would be helpful if the data structure you ended up with was an OrderedDictionary, which you can use by importing the swift-collections package via spm. That way you can have an ordered reference to the month (key) and array of records for that month (value). Additionally if you need to access an specific month without knowing it’s index for some reason, it is more efficient.
-
Is there way to achieve this python code in swift without using a set data structure ? Also is there a not in keyword in swift ?
In that case, use Apple's OrderedSet from swift-collections
-
Map Dynamic NSDictionary to a Struct
if your ‘Dictionary’ has a lot of different keys that can vary every time, a ‘Struct’ might not be the best solution. check out ‘OrderedDictionary’ for a ‘Dictionary’ that maintains the order elements are added. https://github.com/apple/swift-collections/blob/main/Documentation/OrderedDictionary.md
-
How to sort key in a dictionary in swift ?
You should use OrderedDictionary in swift-collections for that purpose.
- Swift Collections – production grade data structures
yjs
- Show HN: Collaborate on your YC Application with CRDT-powered forms
-
Making CRDTs 98% More Efficient
One idea is just to use fewer random bits in peerIDs. Yjs (https://docs.yjs.dev/) gets away with just 32 random bits. If you compromise and use 64 random bits, then even a very popular doc with 1 million lifetime peerIDs will have a < 10^-7 lifetime probability of collision.
-
An Interactive Intro to CRDTs
I've seen it come up often in collaborative text editors.
Also see: https://github.com/yjs/yjs
-
JSON Schema Store
You are absolutely right that XML is better for document structures.
My current theory is that Yjs [0] is the new JSON+XML. It gives you both JSON and XML types in one nested structure, all with conflict free merging via incremental updates.
Also, you note the issue with XML and overlapping inline markup. Yjs has an answer for that with its text type, you can apply attributes (for styling or anything else) via arbatary ranges. They can overlap.
Obviously I'm being a little hypabolic suggesting it will replace JSON, the beauty of JSON is is simplicity, but for many systems building on Yjs or similar CRDT based serialisation systems is the future.
-
Launch HN: Tiptap (YC S23) – Toolkit for developing collaborative editors
Note: https://github.com/yjs/yjs for collaborative "document edition, and user cursors"; has WebRTC, web socket, matrix.org backend
-
Wormholers, what can CCP and wormholers do to improve J-Space?
CCP needs to revamp proto anyway, due to recent exploits... practically, nothing really prevents 'em from using some sort of CRDT's to make the state of the sig view eventually consistent (yjs lib, if we're speaking frontendian).
-
How to use Yjs with Ruby on Rails?
Yjs framework: Because it is a CRDT implementation which provides collaborative editing and offline-first capability.
-
🐑🐑🐑 EweserDB, the user-owned database 🐑🐑🐑
No problem. The database CRUD features are just helpers as an abstraction on top of yjs: https://docs.yjs.dev/. Eweser adds schemas in the form of typescript types to make using it simpler, more structured, and interoperability easier.
- Ask HN: What is new in Algorithms / Data Structures these days?
- How does Google docs send the changes done by other users in real-time?
What are some alternatives?
orgextended - Sublime Text OrgMode Extension
automerge - A JSON-like data structure (a CRDT) that can be modified concurrently by different users, and merged again automatically.
hummingbird - Lightweight, flexible HTTP server framework written in Swift
liveblocks - Liveblocks is a platform to ship collaborative features like comments, notifications, text editors in minutes instead of months.
Containers - This library provides various containers. Each container has utility functions to manipulate the data it holds. This is an abstraction as to not have to manually manage and reallocate memory.
automerge-rs - Rust implementation of automerge [Moved to: https://github.com/automerge/automerge]
shelf
crdt-woot - Implementation of collaborative editing algorithm CRDT WOOT.
Homebrew-cask - 🍻 A CLI workflow for the administration of macOS applications distributed as binaries
milkdown - 🍼 Plugin driven WYSIWYG markdown editor framework.
Motion - Animation engine for gesturally-driven user interfaces, animations, and interactions on iOS, macOS, and tvOS.
MobX - Simple, scalable state management.