Live data from Hacker News

Swift is Open Source

swift.org

441–450 of 458 posts

Re: Swift is Open Source

#442

There's one thing I can't understand about Apple's approach, and that is their pathnames. As good as Swift is, putting it by default in asinine paths like "/Library/Developer/Toolchains/swift-latest.xctoolchain/usr/bin" doesn't help anybody (and a ton of stuff in OS X is like this). A more Unixy way to do this would be /opt/swift-3.0/bin, where /opt/swift is a symlink to /opt/swift-3.0. Even Apple used to limit the p…

The paths are cumbersome, but I wouldn't call them asinine. Apple's toolchains are versioned by SDK. That's why they have xcrun, so you can do things like:

  # xcrun --sdk iphoneos clang [...]
On my system, clang's path is even worse than your example:

  # xcrun --sdk iphoneos --find clang
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang

You're not supposed to remember those paths. Xcode and xcrun remembers them for you.

Apple doesn't touch the base OS folders for non-OS software, which is why stuff goes into /Library and /Applications. Besides, (Apple has never used /opt, and doesn't even document it, last I checked: "man hier" doesn't mention it.)

Re: Swift is Open Source

#443
post #434

Earlier quoted context omitted.

Yup. I really think it was worth it though, it taught us a lot about how to make the language.

Mind, are you not worried at all that it may have taught you a lot... about how to make a language for writing compilers in? (paraphrasing Chris Lattner)

That is indeed a concern, I agree with Chris here.

The solution we had, though, is Servo. It being developed alongside as well meant we had another significant, non-compiler project, which guided us out of that trap.

Re: Swift is Open Source

#444

Earlier quoted context omitted.

In what way? I've recently started writing in Swift and I find it to be less powerful than Kotlin. One such feature that's missing: extension expressions. Allows things like `let` and `with` from the kotlin stdlib

What exactly are extension expressions, do you mean extension methods? If so, Swift does support them. I actually miss interface extensions in Kotlin, but thats a java cross compatibility issue.

look at the signature for `with`

    inline fun  with(receiver: T, f: T.() -> R): R 
it takes a lambda that is scoped to the receiver type `T`. This means the lambda runs in the scope of whatever is passed in as a receiver.

    with(list) {
      add(item)
      add(item)
    }
This essentially lets you create DSLs for whatever.

Another thing that's bit me in butt recently is that `Protocol`s aren't concrete types, unlike an `interface` in Java/Kotlin.

Re: Swift is Open Source

#445
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 abilit…

> 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.

I think you need to reevaluate the standards to which you hold people you know nothing about. GitHub is a free platform that anyone can post on, regardless of academic pedigree. Further, having specialized knowledge and being a troll are not mutually exclusive qualities. The humor of early hacker culture may have been more witty but it was nonetheless a means for programmers to take themselves less seriously [1].

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

Maybe that's a sign you should get over yourself.

[1] http://www.catb.org/jargon/html/

Re: Swift is Open Source

#446

I still remember max howel tweet[1] in which he publicly said that we was rejected by Google. Looking at his linkedin profile[2] , he was later hired by Apple in August 2015. Now he is biggest[3] contributed to Swift package manager. It is good to see that the person who has lot of experience in handing Apple and package system is handing this stuff. I guess, things happens for good. [1] https://twitter.com/mxcl/stat…

Highly qualified people get rejected by google's interview process all the time, so people shouldn't take it personally if they get rejected. google is willing to miss out on good people occasionally because they believe they can't fix the problem w/o mistakenly hiring more mediocre/bad people.

Fully agree. I seriously don't understand the statistical illiteracy[1] that drives people to take every instance of a (perceived) false positive or false negative as a sign of an entire system's unsuitability. I guess a lot of people just have problems with the concept of a counterfactual. Note that this doesn't apply to people's reactions to their _own_ experiences, since it's completely reasonable to have a bit of an emotional reaction to something like getting rejected.

[1] I couldn't think of a better way to put this, but it's not quite the right term, since you don't need any education in statistics to understand how irrational these reactions are.

Re: Swift is Open Source

#447

Earlier quoted context omitted.

For android, we already have kotlin ( https://kotlinlang.org/ ), which is very similar to Swift and has 100% interoperability with java.

Better alternative is Groovy: https://jaxenter.com/groovy-is-the-swift-alternative-for-and...

> Groovy creator Guillaume Laforge blogged that, “an acquainted Groovy eye would immediately notice the inspiration the Swift designers took from Groovy.”

Guillaume Laforge is NOT the creator of the Groovy Language, James Strachan is. And Swift did not take inspiration from Groovy.

What else is inaccurate in the article? 6 months after it was written, Pivotal voted against Groovy's diversion into static typing and Android development by retrenching Laforge and the programmer working on it.

Re: Swift is Open Source

#448

I would love to see Swift for Android programing. I'm already using Kotlin, a language very close to Swift, for programming our Android apps. But I find Swift niftier than Kotlin.

If you want Swift on Android, have a look at Eclipse Xtend: http://futurice.com/blog/android-development-has-its-own-swi...

Re: Swift is Open Source

#449
post #386

Super excited! I will totally be exploring Swift for quantitative work. Julia has been great so far, but a lack of good IDE tooling is making a large codebase difficult to navigate and keep clean. Python has even less type safety than Julia. Swift has a REPL! Go doesn't, and its lack of generics makes writing most algorithms very limited (there isn't even a matrix 32 library, just 64 bit). Java has horrible native in…

Have you looked into F#? It's been open source for a while and there is a very good ecosystem that exists already for it. Plus the language itself is a pleasure to use.

No, I haven't looked into it much. I've been hesitant to commit too much to the CLR family, but maybe with MS's new stance on open source, I'll give it a second look. I'm also more interested now in languages that can deploy on mobile, so as alternatives to Julia, I'm actively looking into Swift, Go, or just plain C++. Xamarin is pretty compelling but I'm considering options before being locked into a fairly expensive vendor.

Re: Swift is Open Source

#450
post #335

Earlier quoted context omitted.

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 abilit…

Whenever I pictured the kind of person who posted reaction gifs to a thread, I imagined some 14 year old kid trying to be cool. Now, seeing this on github, I can only spend a few minutes clicking on the gif-poster's names and taking a glance at their code to see if they are actually mentally retarded or 14, and leave mystified and horrified.

I'll take people who post reaction gifs over people who use "retarded" as an insult.
Post reply on HN