Live data from Hacker News

Swift Static Linux SDK

swift.org

81–90 of 274 posts

Re: Swift Static Linux SDK

#81

Swift 6 is amazing - I say this as a big Rust person. It seems like Swift is now its own entity outside the Apple bubble and has a few very interesting features: - An "embedded" mode that turns off reflection for kilobyte-sized binaries - An upcoming WASM target - An LSP for VSCode - Native C++ interop - Typed "throws" - Static linking on linux and the linux sdk - Porting a number of "core foundation" / foundation pr…

> - No garbage collector

ARC is a GC, and a slower one than most traditional tracing GC's.

Re: Swift Static Linux SDK

#82
post #57

Why should I use Swift instead of Rust?

The concurrency story is quite good now with Swift 6, and it’s arguably easier to handle than the borrow checker, but still very safe.

The way I view it as a Rust experienced programmer: Its kinda like if everything in your program was Arc and we didnt have the mess that are the async executors. But I might be wrong. Love rust but god that sometimes I curse the choices that were made and how slow it evolves.

Re: Swift Static Linux SDK

#83
post #2

> Additionally, a program built for a particular distribution, or even a particular major version of a particular distribution, would not necessarily run on any other distribution or in some cases even on a different major version of the same distribution. Not sure I understand that. Is it something specific to Swift, or is it exactly what is expected from using shared libraries? Say my Linux distribution distributes…

It's just classic dependency issues. I'm not familiar with swift specifics, but probably a combination of ABI instability and just plain version incompatibility from one distro to the next with your target program. My opinion is the opposite: I think the old paradigm of distros managing a giant set of system libraries is a bad one, and is how we ended up in the land of docker. Go and Rust made the right decisions her…

"vendor all the dependencies"

What does that mean?

Re: Swift Static Linux SDK

#84
post #75
post #48

Earlier quoted context omitted.

You almost caught up to Dart. - Built for embedded devices and already has RISC-V support - Already has WASM was a compilation target - Not just an LSP but amazing VSCode tooling - Native C, C++, Java, Rust and JavaScript interop and a .NET bridge is in the works it seems. - Typed "throws" - Static linking (in development) - Data-race free by default Unique features to Swift: - Distributed actors for concurrency that…

Isn’t “data-race free” in Dart achieved by just not really sharing mutable memory between isolates? Probably because the web version needs to map isolates to web workers, right?

For now but this is in the pipeline too.

https://github.com/dart-lang/language/blob/main/working/333%...

Re: Swift Static Linux SDK

#85
post #55

Earlier quoted context omitted.

It's just classic dependency issues. I'm not familiar with swift specifics, but probably a combination of ABI instability and just plain version incompatibility from one distro to the next with your target program. My opinion is the opposite: I think the old paradigm of distros managing a giant set of system libraries is a bad one, and is how we ended up in the land of docker. Go and Rust made the right decisions her…

> the disaster that's python package management, that's not where you want to end up The one where the only sane option is using distribution packages or conda and ignoring anything that the python community comes up with?

I had my Python and pip installed from distribution packages. One day I needed to build something from source, but it needed Meson...

Ok installed Meson also from my distro packages! But no, the project required a newer Meson version.

Ok let's install Meson with pip! But no, it turns out pip packages themselves can require a minimum pip version!! Go figure.

So I couldn't build that program without first pip-installing Meson, and I couldn't pip-install Meson without first pip-installing a more modern version of pip itself.

Guess how well it worked when I upgraded pip. Spoiler: not a smooth way to discover that Python packaging is a joke.

Re: Swift Static Linux SDK

#86

[flagged]

Why though? They don't fulfill the same niches. None of those languages have a data science and ML ecosystem like Python. Rust and Swift lack mature cross platform GUI frameworks etc.

Also Python is getting exciting again. 3.12 can optionally remove the GIL and add a JIT.

Re: Swift Static Linux SDK

#87

Earlier quoted context omitted.

Agreed that Swift looks quite amazing. There’s some cool talks on how they’re trying to move FoundationDB to Swift and their approach. I think the main problem, and this is a really big problem, is that based on a very shallow investigation I did a couple months back, the ecosystem for server-side stuff barely exists. And in my opinion, the ecosystem is one of the deciding factors when picking a language.

I have a slight inkling that Apple internally is using Swift for backend stuff somewhere, especially with all the ML stuff they just shipped. Word on the street is their datacenters are full of M-series chips. I could see those servers running Swift + distributed actors + mlx. The move to make swift run on Linux could be part of that work - their sysadmins, devops, and backend folks probably use Vim/VSCode and deploy…

I believe it’s confirmed that they’re doing it with Swift, buried somewhere in the ML post IIRC.

Re: Swift Static Linux SDK

#88
post #70
post #44

Earlier quoted context omitted.

I'm really interested in exploring it for building web app backends because of this. Being able to have a drag-and-drop distribution is even better.

I haven't used it yet, but I've heard really good things about Vapor as far as server side Swift goes... https://vapor.codes

Thanks. What is a "protocol server?"

Re: Swift Static Linux SDK

#89
post #55

Earlier quoted context omitted.

It's just classic dependency issues. I'm not familiar with swift specifics, but probably a combination of ABI instability and just plain version incompatibility from one distro to the next with your target program. My opinion is the opposite: I think the old paradigm of distros managing a giant set of system libraries is a bad one, and is how we ended up in the land of docker. Go and Rust made the right decisions her…

> the disaster that's python package management, that's not where you want to end up The one where the only sane option is using distribution packages or conda and ignoring anything that the python community comes up with?

Have you tried "poetry"?

Re: Swift Static Linux SDK

#90
Swift tooling has some really! Sharp! Edges!!! If you need something quick and easier than rust or have some reason to want to take your swift code and run it elsewhere I guess this is good but I don't see why you'd use it besides that.
Post reply on HN