Our great sponsors
|over 1 year ago||6 days ago|
|GNU General Public License v3.0 only||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.
11 projects | news.ycombinator.com | 7 Mar 2022
> I was thinking about Simple Dynamic Strings but I like this better.
Oh! here's my chance to plug https://github.com/alcover/stricks ! It follows the same principle as SDS (i.e user-facing type is char*) but is much faster (see bench) and frankly nicer to read through.
Not as feature complete, though.
Speeding past Redis/SDS strings
Mine is also variable (see https://github.com/alcover/stricks/blob/main/src/stx.c). Maybe they switch more often that necessary ?
The threads were very interesting. I got back to work and it's time to talk speed ! https://github.com/alcover/stricks#speed
Show HN: Stricks, managed C strings library
2 projects | news.ycombinator.com | 25 Mar 2021
Is rust overkill for most back-end apps that could be done quickly by NodeJS or PHP?
8 projects | reddit.com/r/rust | 18 Mar 2023
Amuse yourself, https://github.com/apple/swift/blob/main/docs/Runtime.md
🔮 Swift 5.8 Release: You Can Use Future Features Now
2 projects | reddit.com/r/swift | 13 Mar 2023
Understanding SwiftUI in depth
2 projects | dev.to | 9 Feb 2023
Original Returnless Expressions PR
Node.js is moving to a new, faster URL parser called Ada written in modern c++
2 projects | reddit.com/r/cpp | 8 Feb 2023
There is ongoing work that you can mix Swift and C++ code more or less directly, see here.
Adding Union to Swift with Metaprogramming
4 projects | dev.to | 2 Feb 2023
The Swift community came up with a couple of implementations of Either — a generic enum that carries one of 2 types associated with it (here, here, and here). There has been a discussion about adding Either to the Standard Library. Still, it seems we’re not going to have it in the foreseeable future because adding disjunctions (logical XORs) in type constraints is a commonly rejected evolution proposal. Funny enough, Apple has an internal implementation of Either in their standard library, but they are not sharing it with us ¯\_(ツ)_/¯
Swift Achieved Dynamic Linking Where Rust Couldn't
10 projects | news.ycombinator.com | 29 Jan 2023
They are exactly the same except for when they're not.
(On 64-bit) Rust very naively has two 64-bit integers for the strong and weak count, Swift packs them into only one. Swift also packs in several extra flags for various things .
These flags mean that retain/release (increment/decrement) is actually an atomic compare-and-swap instead of a fetch-add. Allegedly performance issues with this were fixed by the hardware team, just, optimizing CASes better.
Swift also has to interop with ObjC "weak" pointers which have move constructors because their address is registered with a global map which is used to null them out when all strong counts go away, but I don't think this changes the design much when not using them.
Swift ARC is built into the language and a huge amount of the compiler's energy is dedicated to optimizing it. This is why it's part of the calling convention (+1/+0), why there are special getter/setter modes with different ARC semantics, why many stdlib functions are annotated with "this has such-and-such semantics" and so on.
Swift ARC is also very pervasive, as basic collections are all ARC-based CoW, all classes are ARC, and I think existentials and implicit boxes also go through ARC for uniformity?
ARC is also why historically Swift gave itself fairly extreme leniency on running destructors "early" based on actual use . Eliminating a useless +1 can be the difference between O(n) and O(n^2) once CoW gets involved!
By contrast in Rust it's "just" a library type which you have to clone/drop (increment/decrement) manually. It doesn't do anything particularly special, but it's very predictable. The existence of borrows in Rust lets you manually do +0 semantics without having to rely on the compiler noticing the optimization opportunity, although you do need to convince the borrow checker it's correct.
Why I selected Elixir and Phoenix as my main stack
36 projects | dev.to | 21 Jan 2023
UIKit on Windows?
2 projects | reddit.com/r/swift | 13 Jan 2023
Note that the screenshot you shared is from an old (and AFAICT abandoned) port of Swift based upon MinGW. You should look to https://swift.org for the official releases for Windows which are more current.
Apple Announces Full Swift Rewrite of the Foundation Framework
5 projects | news.ycombinator.com | 11 Jan 2023
`Array` is defined in the Swift standard library, but the compiler knows about the type directly, and also recognizes various @_semantics("array.blah") annotations that appear in the standard library source code.
https://github.com/apple/swift/blob/main/stdlib/public/core/...5 projects | news.ycombinator.com | 11 Jan 2023
It's written in C++ although there is some Swift in it now . The compiler doesn't depend on Foundation though.
What are some alternatives?
solidity - Solidity, the Smart Contract Programming Language
cpp-lazy - C++11/14/17/20 library for lazy evaluation
Elixir - Elixir is a dynamic, functional language designed for building scalable and maintainable applications
tree-sitter - An incremental parsing system for programming tools
hummingbird - Hummingbird compiles trained ML models into tensor computation for faster inference.
swift-evolution - This maintains proposals for changes and user-visible enhancements to the Swift Programming Language.
lobster - The Lobster Programming Language
dioxus - Friendly React-like GUI library for desktop, web, mobile, and more.
rust - Empowering everyone to build reliable and efficient software.
Enzyme.jl - Julia bindings for the Enzyme automatic differentiator
BigInt - Arbitrary-precision arithmetic in pure Swift
range-v3 - Range library for C++14/17/20, basis for C++20's std::ranges