Live data from Hacker News

Swift is Open Source

swift.org

181–190 of 458 posts

Re: Swift is Open Source

#181
Doesn't work in x86, ubuntu 15.10, bash: /home/user/Descargas/swift-2.2-SNAPSHOT-2015-12-01-b-ubuntu15.10/usr/bin/swift: no puede ejecutar el archivo binario: Formato de ejecutable incorrecto

Pentium(R) Dual-Core CPU T4500 @ 2.30GHz × 2

Re: Swift is Open Source

#182
post #145
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++?

It is not odd for anyone with background in compiler development. By using C++ they could ramp up the compiler much faster and rely all improvements done to LLVM. Eventually if the language succeeds in the market at large, they can decide to bootstrap it. Although I am a fan of bootstrapping, I also see a good value to expend development resources elsewhere until a language reaches wider adoption.

Not to mention, bootstrapping in a language that's not stable yet can be.... quite a pain.

Re: Swift is Open Source

#183

What was the design decision that required function declaration to be : func hello(name: String) -> String { } rather than, func hello(name: String) : String { }

It seems pretty consistent with functions in a set-notation sense, with functions that map a tuple of stuff to something else. The mapping being indicated by an arrow instead of a colon.

The functional mapping also makes sense. Thanks for the pointer.

Re: Swift is Open Source

#184
post #95

Earlier quoted context omitted.

I'm much more thrilled about Swift the about Go. Sure Go has a head start in server-side department, but from what I know of Swift I'd much rather write webapps in it then in Go. Many webapps have a kind of "highlevelness" to them, and Swift nicely addresses that with it's features. Go is somehow on a kind of feature diet that's just not my cup of tea. And in terms of low-high-level-ness it I put it somewhere in betw…

Swift gives you nice syntax and Go provides you good abstraction for concurrency(channel and goroutines).

Honestly, there are some libraries for swift which are shockingly authentic clones of go's channel + routine syntax. Abstractions like that are not swifts problem.

Edit: also, look at https://github.com/apple/swift-corelibs-libdispatch so those libraries should be portable.

Re: Swift is Open Source

#187

What was the design decision that required function declaration to be : func hello(name: String) -> String { } rather than, func hello(name: String) : String { }

Rust is using similar declaration: fn hello(name: str) -> str { }

Re: Swift is Open Source

#188

Testing the binaries on ubuntu decompressed to to $HOME/swift and trying to execute swift: Welcome to Swift version 2.2-dev (LLVM 46be9ff861, Clang 4deb154edc, Swift 778f82939c). Type :help for assistance. 1> help opening import file for module 'SwiftShims': No such file or directory 1> I could not find any mention to environment variables that could be used to override default locations, like SWIFT_LIBRARY_PATH or s…

Type ":help". That is, type help. The : is used to differentiate between commands to the repl and swift code.

Thanks I didn't noticed the colon, my fault.

But even after copying all to the default location /usr it still doesn't work:

swift swifthello.swift

:0: error: opening import file for module 'SwiftShims': No such file or directory

Also

swift -I/usr/lib/swift swifthello.swift

:0: error: opening import file for module 'Swift': No such file or directory

Re: Swift is Open Source

#189

Earlier quoted context omitted.

Aside from the hilarious description of Oracle [t=2107], it's worth watching "The Rise and Development of illumos" [1] as it discusses some consequences of signing away copyright on your contributions to an open source project. [1] https://www.youtube.com/watch?v=-zRN7XLCRhc

Can you or someone summarize the salient points, for someone who doesn't have time to watch an hour-long video?

It's a good watch. Don't skip it.
Post reply on HN