Live data from Hacker News

Swift Static Linux SDK

swift.org

71–80 of 274 posts

Re: Swift Static Linux SDK

#71
post #48

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…

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…

> - Native C, C++, Java, Rust and JavaScript interop

dart doesn't do C++ interop

Re: Swift Static Linux SDK

#72
post #68

This static SDK is just one example of Swift's new support for user-definable platforms, timed to amplify support for embedded and WASM. Along with the move to a non-Apple GitHub organisation, it represents real progress in extending swift to other platforms. It would be interesting to see if this is used for the AI OS that they are inviting researchers to validate for security purposes.

Wasm? Care to provide source for that?

Re: Swift Static Linux SDK

#74
post #33
post #26

Earlier quoted context omitted.

Fedora and Debian do this too. That's why it sometimes takes longer for a project to be packaged - you literally have to recursively package all of the dependencies first.

Which is a feature, and not a bug: some of us want our distro maintainers to actually have a look at what they distribute.

Yes and it doesn't prevent anyone to build software separately, being written in rust or any other language.

Re: Swift Static Linux SDK

#75
post #48

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…

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?

Re: Swift Static Linux SDK

#76

Earlier quoted context omitted.

Some people want generics and ADTs in Go. If you're using go because it's 1) fast 2) expressive 3) concurrent 4) compiles natively then I think Swift is the better of the two. If you just want a very simple language, then sure, Go is there. But I don't think that's necessarily what makes Go, Go.

after using swift extensively i did not find it better of the two, in fact it is a complex keyword ridden language that seems bolted together at very many angles, each swift codebase i enter is like a new mystery to unfold because of its extremely rocky evolution

One thing that bugs me to this day is reading Swift code without an IDE can be an exercise in “let me build up a mountain of context first”, due to the way enums and types can get shortened.

It’s nice to write but a pain to review. Meanwhile if I read Rust or Go, it’s more or less what you see is what you get.

I do agree in general that it’s frustrating that Rust hasn’t kept up with some of Swift’s pushes, but then again that’s the difference when you have the richest company in the world involved.

For context, I’ve written many apps in Swift, deployed a backend in Vapor, and worked with teams who use the language. I always thought I’d get over it but it just never fully clicked.

Re: Swift Static Linux SDK

#77
post #15

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…

> Swift also took a bunch of goodies from Rust - No garbage collector - Traits via "protocol" I'd say they took them from Apple's own Objective-C additions who had those for decades before Rust (ARC and protocols).

This is correct.

Re: Swift Static Linux SDK

#78
post #15

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…

> Swift also took a bunch of goodies from Rust - No garbage collector - Traits via "protocol" I'd say they took them from Apple's own Objective-C additions who had those for decades before Rust (ARC and protocols).

Yeah, Objective-C Protocols are so old that they influenced Interfaces in Java 1.0.

Re: Swift Static Linux SDK

#79
post #19

Earlier quoted context omitted.

Why, would you care if it's a full second or even 5 seconds? Go hyped their compilation speed a lot in its early years, but unless it's C++ templates level slugginess it's not like it's that big of deal.

Compiling fast has ripple effects throughout your workflow. Having your iteration time go from 1s to 5s is a massive difference: it can mean you break out of the flow state when you restart your server to test your code.

As someone dealing with Swift everyday (and, before that, faster langs like Elixir and Typescript), I can only agree. Sometimes my incremental builds take 20-30 seconds and it feels like a huge toll. Waiting on the CI (which is a weak machine) is up to 25 minutes until the test suite has passed - a large chunk of that being compilation time. Releases take 5-10 minutes.

I really like Swift, but I’d highly appreciate faster compilation times.

Post reply on HN