opendylan
swift
Our great sponsors
opendylan | swift | |
---|---|---|
7 | 184 | |
409 | 62,187 | |
2.0% | 0.4% | |
5.0 | 10.0 | |
4 days ago | about 14 hours ago | |
Dylan | C++ | |
GNU General Public License v3.0 or later | 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.
opendylan
-
A language you feel the most productive with?
Carp, Lux and Dale are 3 I'm familiar with.There's also Dylan, though that one dropped its parentheses. But if we go by the brackets, technically, we can argue that any expression-based languages is a Lisp. I once wrote a Lisp to JS transpile whose output had more parens than the input. :)
-
CppCast: Julia
Julia is a Lisp in the same form as Dylan.
- LLVM Internals: The Bitcode Format
swift
-
Is rust overkill for most back-end apps that could be done quickly by NodeJS or PHP?
Amuse yourself, https://github.com/apple/swift/blob/main/docs/Runtime.md
- 🔮 Swift 5.8 Release: You Can Use Future Features Now
-
Understanding SwiftUI in depth
Original Returnless Expressions PR
-
Node.js is moving to a new, faster URL parser called Ada written in modern c++
There is ongoing work that you can mix Swift and C++ code more or less directly, see here.
-
Adding Union to Swift with Metaprogramming
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
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 [0].
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 [1]. 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.
[0]: https://github.com/apple/swift/blob/3b00177f768b630a8f7a1135...
[1]: https://forums.swift.org/t/a-roadmap-for-improving-swift-per...
- Why I selected Elixir and Phoenix as my main stack
-
UIKit on Windows?
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
`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/...
It's written in C++ although there is some Swift in it now [1]. The compiler doesn't depend on Foundation though.
[1] https://github.com/apple/swift/tree/main/SwiftCompilerSource...
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 - React-like GUI library for desktop, web, mobile, tui, 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