Live data from Hacker News

Swift for TensorFlow Shuts Down

github.com

161–170 of 432 posts

Re: Swift for TensorFlow Shuts Down

#161
post #129

Earlier quoted context omitted.

>there's nothing stopping you from composing things in Python. In Julia you can compose a custom distribution, with a bayesian model with an ODE with a neural network with unit number types with custom Julia written CUDA kernels and multithreading. Edit: That are not designed specifically to work with each other Can python even hope to do a fraction of that, still be fast and differentiate through everything?

I'm fairly certain everything you said is possible except for custom CUDA kernels in pure Python. You'd have to write the kernel in C++ and use it in your TensorFlow/PyTorch code. [0][1] [0]: https://www.tensorflow.org/guide/create_op [1]: https://pytorch.org/tutorials/advanced/cpp_extension.html

It's definitely not possible. These have to be rewritten with the specific autodiff /ML framework in mind.

Even then, you're not going to have fast custom types to be used on the GPU without dropping into C++

Re: Swift for TensorFlow Shuts Down

#162

I love Swift and it's potential for use cases beyond just iOS ecosystem, but I think Apple never fostered or encouraged the open source community to involve in its development. It's another classic example where it's simply not enough to open source something, you have to really allow and encourage the developers to contribute to increase the adoption.

I'm excited about a few projects bringing Swift to other platforms. SwiftWasm is surprisingly painless to get working [1]. Tokamak is an early stage SwiftUI-compatible framework for building web apps [2]. It also has the goal of supporting other native platforms and to that end there is early work on a GTK backend. I have no affiliation with these projects, though I would like to contribute to them at some point.

[1] https://swiftwasm.org/

[2] https://github.com/TokamakUI/Tokamak

Re: Swift for TensorFlow Shuts Down

#163

Earlier quoted context omitted.

I'm a little bit confused by this comment. Obj-C is, in a lot of ways, the _higher_ level language on Apple systems now, and most of what I would consider "systems" programming on macOS and iOS is in C, assembly, and C++.

Probably right, but ObjC inherits C (and ObjC++ inherits C++), so you get all that low-level goodness, as well as the SmallTalk stuff.

You can more or less write C in Swift as well, though. Some pointer operations get more verbose, but the standard library also makes some stuff easier. The only thing that's really missing is a nice fixed-size array syntax (they get imported from C as tuples, which is not ideal).

Re: Swift for TensorFlow Shuts Down

#164
post #129

Earlier quoted context omitted.

>there's nothing stopping you from composing things in Python. In Julia you can compose a custom distribution, with a bayesian model with an ODE with a neural network with unit number types with custom Julia written CUDA kernels and multithreading. Edit: That are not designed specifically to work with each other Can python even hope to do a fraction of that, still be fast and differentiate through everything?

The outcome is more important than the code. While that sounds very elegant, what does it actually add?

https://www.reddit.com/r/Julia/comments/keuumi/bayesian_neur...

See the paper.

It allows for the ecosystem to have a combinatorial explosion of possibilities as each domain expert works on their own package.

I can't foresee every application, but the emergence is the point. This is just a crazy example to show the bounds of what's possible.

Re: Swift for TensorFlow Shuts Down

#165
post #29

Swift compared to Python was getting way too complex. Why would anyone learn Swift for data science when Python will do?

I mean, python doesn't do it very well at all.

that's not say I would use Swift, but I'd choose Julia any day over Python.

Re: Swift for TensorFlow Shuts Down

#166
post #132

Earlier quoted context omitted.

>If you find yourself writing a simulation, and you need to optimize away billions of function calls, you can use the C++ API provided by TensorFlow. I prefer to just use Julia and get that for free. Also can write custom cuda kernels in pure Julia. And differentiate through arbitrary julia code, compose libraries that know nothing about each other etc

Sure, that's fine. But I'm assuming GGP is talking about TensorFlow, since that's what this post is about. If you don't need TensorFlow, then this whole conversation is kinda moot, and you can use whatever you like.

Nobody needs tensorflow. That's just a kludge around the fact that python is terrible for ML.

Re: Swift for TensorFlow Shuts Down

#167
post #131

Earlier quoted context omitted.

If you look closely at how that data was collected, what it's actually measuring is whether a binary links against the ObjC runtime library, which will be the case if a binary transitively depends on any ObjC framework, so even if all new frameworks and executables were written in Swift, we would still expect to see the number presented in that post to continue to grow until most or all of the important frameworks us…

Fair criticism. I'm not sure why the author didn't try to detect the use of objc_msg functions, for example. So the ObjC binaries may be overcounted a bit. Still, the test for Swift binaries seems accurate, and if you look at iOS 13.1 vs 14.0, for example, according to the chart there was an increase of 157 Swift binaries and 446 Objective-C binaries. If we assume there are 157 "false positives" in the ObjC binaries,…

Swift frameworks that use ObjC system libraries will still use objc_msgSend.

Re: Swift for TensorFlow Shuts Down

#168
post #106

Earlier quoted context omitted.

It doesn’t solve the issue of JS but NestJS feels like a more robust way to make a server in JS - and the docs are great.

Thanks, I don't really need large framework for full blown app though.

Swift and UIKit are already a much larger API than any node framework in existence.

Re: Swift for TensorFlow Shuts Down

#169
post #51

Earlier quoted context omitted.

> Swift now being a 100% Apple-sponsored & owned project again makes me a bit nervous. Are you nervous about a language that is designed and supported by the largest and most successful company in the world? > very niche market of 100% native mobile development That "niche" is at least 1.5 billion devices. Devices bought by the 1.5 billion richest people in the world because they like them, not because their employer…

The Uber engineering disaster story from 2 months ago seems to suggest that Apple lacks dogfooding Swift internally: https://news.ycombinator.com/item?id=25373462

iOS doesn't come as 100mb cellular downloads, so that isn't really the same kind of issue. There are many reports about showing how it's slowly coming into wider spread use at Apple.

For me the lesson is that just because a new technology/language is out doesn't mean you should jump on it. Things need time to mature, and if you're Uber, you can't risk having half of your income rely on something new. Compilers, linkers, and programming languages (and databases and OS kernels) take years to mature. Hell, just earlier this week was a post about diagnosing a 21 year old bug in the Linux networking stack for rsync of all things.

I'm quite shocked that enough experienced people felt that level of confidence. In earlier versions of Swift I personally experience slow compiles and that was on a not terribly large code base -- no where near Uber. That alone should have been a big clue of the state of things.

Re: Swift for TensorFlow Shuts Down

#170
post #51

Earlier quoted context omitted.

> Swift now being a 100% Apple-sponsored & owned project again makes me a bit nervous. Are you nervous about a language that is designed and supported by the largest and most successful company in the world? > very niche market of 100% native mobile development That "niche" is at least 1.5 billion devices. Devices bought by the 1.5 billion richest people in the world because they like them, not because their employer…

> Are you nervous about a language that is designed and supported by the largest and most successful company in the world? Yes, I am. The concentration of power between facebook and google for ML frameworks is worrying enough, but to their credit, they have so far been very open and collaborative and are giving a lot back to the ML community in terms of research Apple on the other hand is the dictionary definition of…

This is so bizarre to me.

What possible future are you trying to ward off here? Swift is an open-source project, it's self-evidently in Apple's interest for as many people as possible to use it.

Be concrete, please. What scares you about using an open-source language which is mostly developed by Apple? Do you have the same paranoia about clang? If not, why not, what's the difference?

Post reply on HN