Live data from Hacker News

Apple is open sourcing Swift Build

swift.org

241–250 of 300 posts

Re: Apple is open sourcing Swift Build

#241

Earlier quoted context omitted.

That's a good point. I had in mind that there's some regret about the combination of type inference with type-based overloads, due to the search expense it adds to what ought to be straightforward parsing of long expressions.

Yeah, I think there are definitely parts of the language design / language features that are going to contribute, but when you need to parse to IR and then compile that to machine code, it seems any features you add that are nice for the developer are going to doubly hurt compile times. You see the same with ARC in swift (or the borrow checker in Rust).

I don't know about that example—when ARC was added to Objective-C back in the day, I don't remember clang feeling any slower as a result.

Re: Apple is open sourcing Swift Build

#242
post #209

Swift itself is a great piece of tech. But it is doomed to fail as a general widely adopted language unless apple makes few critical moves including open sourcing everything including XCode, providing support for 3d party IDE developers (because xcode is terrible), creating decent package manager, adopting testing as first class citizen etc. There is just no economical sense for anyone to invest in swift until all th…

And make it possible to run binaries on macOS/iOS etc without a mandatory subscription and US export controls. Without notarisation, anything made with Swift is practically unusable on Apple OSs

That obstacle and the Swift language are unrelated. The same applies to a Rust app or Electron or anything.

Re: Apple is open sourcing Swift Build

#244

Earlier quoted context omitted.

Seems lovely but headed in a Scala-like bloated direction. The "too complex" type issues were really bad last I tried. And one of my biggest gripes is the way you can extend things from anywhere else, easy to cause a mess.

Swift is getting out of hand after Chris left and Swift UI was introduced. The language has over 210 keywords… thats crazy

Keywords are a bad way to judge a language.

Re: Apple is open sourcing Swift Build

#245
post #36

I believe that this long game of Swift being "good for everything" but "better for Apple platforms" will be detrimental to the language. This does not help the language nor seems to bring more people to the ecosystem. Competitors seems to have a combination of: - Being more open-source - Have more contributors - Have a narrower scope Maybe they should consider open sourcing all the tooling (like Xcode) otherwise the…

The goal is probably rather to allow CI on the cloud. Many companies are ok with open source licenses.

No, because it calls out to tools which are not open source.

Re: Apple is open sourcing Swift Build

#246

Swift is a really cool language. But one thing that blows my mind is that if you ever encounter an "index out of range" error, the (massive) error message that you get doesn't tell you anything about where this error occurred... no line number... no nothing... let a = [1] print(a[1]) Is all you have to do to reproduce the error. The error looks something like that https://pastebin.com/MQV82SaR And gives you no useful…

The Swift REPL sucks for this. I would suggest you compile to a binary and use your normal debugging tools.

Re: Apple is open sourcing Swift Build

#247
post #152

Earlier quoted context omitted.

Swift outside of Xcode is a bit rough around the edges, I think because more attention goes into making Xcode friendly. I opened Xcode, made a new playground, and hit run, the code crashes and highlights the line where the error occurred in red. Not to excuse Swift's jankyness, just saying that the kind of default experience is more an IDE-first design compared to Go's very good unix-first design. https://monosnap.co…

I'm just curious, if I was to run my application on a linux server. How would I ever know what caused the crash? when I compile using `swiftc main.swift` and run with `./main`, the error seems even more useless. all I get is: Swift/ContiguousArrayBuffer.swift:600: Fatal error: Index out of range zsh: illegal hardware instruction ./main

You can load the coredump into GDB.

Re: Apple is open sourcing Swift Build

#248

Earlier quoted context omitted.

That's a good point. I had in mind that there's some regret about the combination of type inference with type-based overloads, due to the search expense it adds to what ought to be straightforward parsing of long expressions.

Yeah, I think there are definitely parts of the language design / language features that are going to contribute, but when you need to parse to IR and then compile that to machine code, it seems any features you add that are nice for the developer are going to doubly hurt compile times. You see the same with ARC in swift (or the borrow checker in Rust).

Parsing IR and lowering it is not the reason why compiling Swift is slow.

Re: Apple is open sourcing Swift Build

#249
post #149
post #36

I believe that this long game of Swift being "good for everything" but "better for Apple platforms" will be detrimental to the language. This does not help the language nor seems to bring more people to the ecosystem. Competitors seems to have a combination of: - Being more open-source - Have more contributors - Have a narrower scope Maybe they should consider open sourcing all the tooling (like Xcode) otherwise the…

I don't get this reaction. Apple: here, we're open-sourcing this previously closed-source Apple-specific thing that made Swift better on Apple platforms. We're moving the Apple stuff into a plugin so Windows and Linux can be equal peers to Apple in the new system. We've implemented preliminary support for Windows & Linux and plan to continue work to bring them up to parity. Hacker News: I believe that this long game…

Amen. Just knee-jerk negativity with no specific objections.

Re: Apple is open sourcing Swift Build

#250

Earlier quoted context omitted.

This, right? https://github.com/swiftlang/swift-foundation

Yeah I jumped into swift on Linux a while back having mostly used it on apple platforms and I couldn’t even tell anything was different. A few years ago I would’ve had to struggle with SwiftNIO but not nowadays. URLSession, Codable, etc. all there on Linux (not sure about Combine but Combine is stupid in the Swift 6 world IMO. Swift concurrency is better in almost every way). Swift on Linux (except NixOS) is actually…

I also have a dim view of Combine and Swift's shitty observation regime, but what does its concurrency have to do with it?
Post reply on HN