Live data from Hacker News

Swift Numerics

swift.org

21–30 of 46 posts

Re: Swift Numerics

#21
post #11

Does anyone use Swift (in production) for backend services not related at all to the Apple ecosystem? It seems like a better Golang to me, but the tooling space only targets Apple stuff.

The issue with swift on the server currently is that it’s an entirely different compilation toolchain to that run on MacOS and iOS, so the language has different bugs than those that exist for app development, and gets less attention from swift developers. If you want to take a stab at server side swift, I’d recommend looking at the swift port of Netty that Apple released called swift-nio (after the name “swetty” was…

The NIO version of Swift gRPC is currently at v1.0.0-alpha.6. Hopefully we'll see a 1.0 version soon.

Swift gRPC repo: https://github.com/grpc/grpc-swift

Re: Swift Numerics

#22
post #21

Earlier quoted context omitted.

The issue with swift on the server currently is that it’s an entirely different compilation toolchain to that run on MacOS and iOS, so the language has different bugs than those that exist for app development, and gets less attention from swift developers. If you want to take a stab at server side swift, I’d recommend looking at the swift port of Netty that Apple released called swift-nio (after the name “swetty” was…

The NIO version of Swift gRPC is currently at v1.0.0-alpha.6. Hopefully we'll see a 1.0 version soon. Swift gRPC repo: https://github.com/grpc/grpc-swift

This post on the Swift forums gives a good overview of Swift gRPC: https://forums.swift.org/t/discussion-grpc-swift/29584

Re: Swift Numerics

#23
post #20
post #12

Earlier quoted context omitted.

> JVM issues stop the world GC (my car ran you over because of a random unpredictable pause!) its bytecode is object-oriented impossible at the moment to do CUDA style GPU programming without horrible JNI calls > F# on .net core can be distributed without installing a runtime nor does garbage collection limit its expressiveness F# has two big crippling factors: (1) the .NET at the end of its name and (2) functional p…

Is Swift's GC real-time, then? I thought it's just normal refcounting with unbounded stop times.

Swift has no GC, just ARC (automatic refcounting).

Re: Swift Numerics

#24
post #11

Does anyone use Swift (in production) for backend services not related at all to the Apple ecosystem? It seems like a better Golang to me, but the tooling space only targets Apple stuff.

I recently tried to use Swift for a UDP server that was meant to run on Linux. I quickly realized the Network Framework is for iOS/MacOS/iPadOS only. I ended up using Go and I'm happy with it. I really wanted to do full stack Swift though. Just so I could become better at the language.

Honestly that's no different than realizing that AVFoundation or CoreGraphics is Apple-platform-only...

Network.framework is an Objective-C framework (I'm honestly surprised I don't seen any C++ symbols in the binary) – it was never supposed to be a cross-platform framework.

SwiftNIO is the official base of the OSS Swift cross-platform networking toolchain. It's the equivalent of Java's Jetty package.

Re: Swift Numerics

#25
post #11

Does anyone use Swift (in production) for backend services not related at all to the Apple ecosystem? It seems like a better Golang to me, but the tooling space only targets Apple stuff.

I recently tried to use Swift for a UDP server that was meant to run on Linux. I quickly realized the Network Framework is for iOS/MacOS/iPadOS only. I ended up using Go and I'm happy with it. I really wanted to do full stack Swift though. Just so I could become better at the language.

[deleted]

Re: Swift Numerics

#26
post #20

Earlier quoted context omitted.

Is Swift's GC real-time, then? I thought it's just normal refcounting with unbounded stop times.

Swift has no GC, just ARC (automatic refcounting).

Swift has a GC, what it doesn't have is a tracing GC.

Re: Swift Numerics

#27

Earlier quoted context omitted.

I recently tried to use Swift for a UDP server that was meant to run on Linux. I quickly realized the Network Framework is for iOS/MacOS/iPadOS only. I ended up using Go and I'm happy with it. I really wanted to do full stack Swift though. Just so I could become better at the language.

Honestly that's no different than realizing that AVFoundation or CoreGraphics is Apple-platform-only... Network.framework is an Objective-C framework (I'm honestly surprised I don't seen any C++ symbols in the binary) – it was never supposed to be a cross-platform framework. SwiftNIO is the official base of the OSS Swift cross-platform networking toolchain. It's the equivalent of Java's Jetty package.

Netty, not Jetty.

Re: Swift Numerics

#29
post #3

Really looking forward to ShapedArray. Eventually a lot of what one might do with Python may be available in Swift.

You can already use Julia language for more "native" experience and more computational syntax.

Re: Swift Numerics

#30
post #12
post #5

Earlier quoted context omitted.

Thanks, it is a well written article. The only part which tarnishes an otherwise excellent article is the language comparisons portion. Such things are best avoided as they almost always reflect the biases of or where the author has the most experience. As you acknowledge, you were unfair to Julia. Julia has excellent support for general purpose programming. It has support for multiple dispatch, a quite powerful orga…

> JVM issues stop the world GC (my car ran you over because of a random unpredictable pause!) its bytecode is object-oriented impossible at the moment to do CUDA style GPU programming without horrible JNI calls > F# on .net core can be distributed without installing a runtime nor does garbage collection limit its expressiveness F# has two big crippling factors: (1) the .NET at the end of its name and (2) functional p…

For what it's worth, Neanderthal in Clojure gives very smooth access to CUDA:

https://neanderthal.uncomplicate.org/

Post reply on HN