4 ms·
This is why I think Swift is a much better choice to replace or at least compliment Python than Rust. It has a modern, powerful type system and all the quality
by skohan 7y ago
This is why I think Swift is a much better choice to replace or at least compliment Python than Rust. It has a modern, powerful type system and all the quality of life advantages which come with it, but it manages this with a lot more usability than Rust.
A well written swift framework almost becomes a DSL for the problem domain, which is a great property for a data science tool to have.
- echelon 7y agoSwift is not fun on non-Mac platforms. It feels a lot like Google's Dart in terms of how it was positioned and advocated. Modern Rust isn't difficult to use. This is becoming a really tired meme from detractors. The compiler is incredibly helpful, non-lexical lifetimes are a thing, and unless you're doing a lot of sharing and parallelism, you can avoid many borrow checker problems until you learn RAII.
- skohan 7y agoIt's a fair criticism of Swift that it is not well supported across platforms. The story is getting better, but it is still miles behind Rust in this regard. I am a huge fan of Swift as a language, but I am very critical of the tooling. > Modern Rust isn't difficult to use. This is becoming a really tired meme from detractors. I beg to differ. I've been programming professionally for over a decade, and I have shipped projects in a variety of languages, and I can safely say that Rust has a steeper learning curve and requires more cognitive overhead to use than many other languages. I find it relatively nice to work with rust in spite of this because the tooling is so great, but it's undeniable that Rust has made tradeoffs which sacrifice ease of use in favor of safety and performance.
- MiroF 7y agoThe tooling for Swift 4 TF is not anywhere near satisfactory. I can't even seem to get it on my computer without installing XCode (and that's on an apple computer) I should be able to pull a docker image and have s4tf immediately at my fingertips
- kognate 7y agoSeems the Fast.ai forums have got you covered here. https://forums.fast.ai/t/swift-for-tensorflow-using-gpu-with-nvidia-docker/44730 https://forums.fast.ai/t/swift-for-tensorflow-using-gpu-with... describes how to do it, while not completely 'at my fingertips' it's pretty close. and Googles repo at https://github.com/google/swift-jupyter https://github.com/google/swift-jupyter has a clean setup, too.
- MiroF 7y agoI've come across that first link before, but remember I had some issues. The two problems are a. I don't have a GPU locally b. I would rather have a compiler than just a REPL/jupyter
- lreichold 7y agoNot local, but you can start using S4TF immediately via Google Colab. https://colab.research.google.com/github/tensorflow/swift/blob/master/docs/site/tutorials/raw_tensorflow_operators.ipynb https://colab.research.google.com/github/tensorflow/swift/bl...
- MiroF 7y agoif I’m going to be developing, I need a compiler, not a REPL or a notebook. Haven’t managed to find that
- skohan 7y agoThe Dockerfile in the swift-jupyter repo is a superset of what you need. You could remove the lines dealing with jupyter and you'd be left with a Docker container with the s4tf compiler. https://github.com/google/swift-jupyter/blob/master/docker/Dockerfile https://github.com/google/swift-jupyter/blob/master/docker/D...
- MiroF 7y agoThank you - I will give that a try!
- blub 7y agoThe "Rust is difficult" criticism isn't getting tired, but it must be getting tiresome for the Rust community because they don't have a good answer to it. The top level comment from an early adopter in the last Rust release thread on HN was complaining about the tedious complexity.