Live data from Hacker News

Swift is Open Source

swift.org

311–320 of 458 posts

Re: Swift is Open Source

#311
post #112

Github repo is live now. https://github.com/apple/swift First ever commit found here https://github.com/apple/swift/commit/afc81c1855bf711315b8e5...

It's really interesting that they decided to retain the full history! It also gives away some information about the initial contributors and the timeframe of when they started.

I love it. I've never taken a compiler class so going through and reading all the commits since day one is really fascinating. It's easy to see exactly how the language and structure of the code base came to be. Super cool in my book.

Re: Swift is Open Source

#312
post #142

What kind of trolling is that ? >I think we should use GPL v3 instead. https://github.com/apple/swift/pull/17

That issue changed my view of GitHub, and related things. I'd seen a few animated gifs in other threads this past week, but it didn't really sink in until this.

I used to hold scientists and programmers to a different standard than most normal people, because it seemed like a certain level of advanced understanding was necessary to build anything functional in those fields. But I've since realized that special ability does not carry over into all areas of life.

It feels like seeing a ghost. I'm embarrassed to be registered with GitHub, and also to be human.

Re: Swift is Open Source

#313
post #120

Am I the only one who finds it odd that while pushing two high level but performant languages (Objective-C and Swift) Apple wrote their Swift compiler in C++?

Why would Apple write a Swift compiler in Objective-C, a language that it is in the process of phasing out in favor if Swift? And of course it is not possible to write a Swift compiler in Swift before the language exists. So no, not odd at all. Quite logical actually.

Objective-C bridges to and from Swift easily, so it would be easily to incrementally replace Objective-C code with Swift code. Since C++ doesn't interact with Swift at all, it would either have to be wrapped in C/Objective-C, or the entire compiler would need to be rewritten at once.

That being said, C++ is probably a better choice, because dynamic dispatch sucks and there's better platform support.

Re: Swift is Open Source

#314
post #301
post #65

I wonder if Apple is positionning it as a competitor to Google's Go? They are hinting at a usage beyond just iOS and OS X.

I would think Google should be more worried than Apple at this point, since Swift works on iOS but Go support in Android is second-class. In fact, there are significant efforts to run Swift on Android which places it at least on par with Go there (and, obviously, ahead on iOS).

I actually don't get the attraction of running Go on Android. I see it as a systems language.

IMHO, Dart is a much more interesting applications language. And it will soon run on iOS (see http://flutter.io)

Re: Swift is Open Source

#315

Earlier quoted context omitted.

I was half-thinking the same, but types and sets feel interchangeable on an intuitive level in such cases. Having both `: String` and `: String` seems to suggest that they are the same type, which they are not. `nameMe(_)` is a function type, while `name` is a "plain value", so to speak. I think that using arrows more clearly indicates that it's a mapping from something to something else -- in the case of Swift, I gu…

Point well received. BTW Fat arrow looks more appealing than simple arrow. All the other pieces look very well designed.

The single-line arrow has both precedent in set theory, type theory, and mathematical logic.

Re: Swift is Open Source

#316

Great news! Coding in Swift is fantastic and I would love to see it coming to more platforms, maybe even on servers. It could become a serious Javascript competitor due to its elegant syntax, the type safety and speed.

I completely agree. I want to be able to write the core of an application once, and then add on a UI for every platform I deploy it on (Windows, OS X, Linux, iOS, Android, etc.). Currently, the only real options for doing this are C/C++, and that's just no fun to do. I'd love to have a higher level like Swift that can be easily ported between platforms and connected to whatever development language/environment that i…

You can do this with rust and go already by cross compiling which they both make easier than C++ makes it.

Re: Swift is Open Source

#317

Earlier quoted context omitted.

It looks like they used an automated tool to add copyright notices to files in the repository. Probably were required to do that by legal. So it's not 100% faithful history, but close.

This raises some interesting legal questions. If I start a git repo and only add a license in the Nth commit, does that license apply retroactively to a checkout of the first N-1 commits? What if I start out with one license but I change it in the Nth commit? If someone clones the git repo with the Nth commit in it and then checks out an earlier commit, which license applies? (For simplicity, assume I am the only aut…

You can retroactively make a license more open, but you cannot retroactively make it more closed.

Re: Swift is Open Source

#318
post #294

Happy to see that my collection of Swift compiler crashes (see https://github.com/practicalswift/swift-compiler-crashes ) has been part of the official Swift repo since September 2014: https://github.com/apple/swift/commit/e5ca8be1a090335d401cd1... :-) A previous HN thread about the swift-compiler-crashes project: https://news.ycombinator.com/item?id=9020206

Wow, congratulations, that's really cool! Speaking of errors, I remember receiving the "Expression was too complex to be solved in reasonable time" error when I was first implementing Catmull-Rom splines for calculating flight paths in a game that I developed. I translated that to, "The math is making the room spin up in here." Definitely the "coolest" error I've hit working with Swift.

I recognized the name Catmull from Steve Jobs biographies... lo and behold you're talking about the Pixar President Edwin Catmull.

Re: Swift is Open Source

#319
I find the number of typo PRs to be amusing. Makes me wonder if there's a mass effort to slog through commented code just to jump into the contributor list.

Correct spelling is certainly good, but the interesting phenomenon is getting a PR merged in a high-profile project - however slight the change - as a badge of cool.

https://github.com/apple/swift/pulls?utf8=%E2%9C%93&q=is%3Ap...

Re: Swift is Open Source

#320
Initial commit was made 4,5 ago... Is it normal it takes so long for a language to become Open Source?

commit 18844bc65229786b96b89a9fc7739c0fc897905e

Author: Chris Lattner

AuthorDate: Sat Jul 17 23:50:59 2010 +0000

Commit: Chris Lattner

CommitDate: Sat Jul 17 23:50:59 2010 +0000

    initial swift test
Post reply on HN