this post was submitted on 27 Aug 2023
39 points (88.2% liked)

Programming

17024 readers
291 users here now

Welcome to the main community in programming.dev! Feel free to post anything relating to programming here!

Cross posting is strongly encouraged in the instance. If you feel your post or another person's post makes sense in another community cross post into it.

Hope you enjoy the instance!

Rules

Rules

  • Follow the programming.dev instance rules
  • Keep content related to programming in some way
  • If you're posting long videos try to add in some form of tldr for those who don't want to watch videos

Wormhole

Follow the wormhole through a path of communities !webdev@programming.dev



founded 1 year ago
MODERATORS
 

I’ve been programming for decades, though usually for myself, not as a profession. My current go-to language is Python, but I’m thinking of learning either Swift (I’m currently on the Apple ecosystem), or Rust. Which one do you think will be the best in terms of machine learning support in a couple of years and how easy is it to build MacOS/ iOS apps on Rust?

you are viewing a single comment's thread
view the rest of the comments
[–] 257m@lemmy.ml 7 points 1 year ago (2 children)

Other than having first class support on Apple's hardware Swift dosen't have much going for it. There is no killer feature in Swift, it dosen't widespread features and it only has a small niche. If you want to develop for mainly Apple devices I would say go for it as that is the niche it was designed for. Although I see from your post you want to do ML, Python for the high level stuff + C++ for the low level stuff is probably your best pick for that. May I ask what type of ML are you going for? Are you mainly using libraries like Tensorflow, Pytorch etc... or are you into the nitty gritty of building these things yourself and writing the required code for the matrix math and training algorithms.

[–] Bluetreefrog@lemmy.world 2 points 1 year ago (2 children)

I think ML is probably going to require a lot of people in the future and I'm looking to build a digital nomad skill set for the future that pays well. While I've done a postgrad subject on ML and have a STEM degree, but I'm inclined to use existing libraries as that's just easier.

[–] 257m@lemmy.ml 2 points 1 year ago* (last edited 1 year ago) (1 children)

If you want to train your neural nets you can maybe check out: https://github.com/rust-ml/linfa https://github.com/param087/swiftML (Rust seems to have more active support in terms of libraries)

If you want to integrate ML into an IOS/MacOs app: https://developer.apple.com/documentation/coreml

For userland apps Swift would be better and for training or just being generally being more useful in the future go for Rust.

At the end of the day just choose the language that is more enjoyable for you.

[–] Bluetreefrog@lemmy.world 1 points 1 year ago

Sensational answer! Thank you.

[–] exocortex@discuss.tchncs.de 1 points 1 year ago

There's a recent Rust ML framework called "burn". So maybe there's also a future for ML in Rust for you.

[–] philm@programming.dev 1 points 1 year ago

Swift is a nice language though.

But I'm obviously on team Rust^^ for various reasons (one being that you can do the whole stack in Rust (not that it's necessarily the best choice for each level, but it really composes well and with a little bit of trait-magic abstraction in the higher levels it works quite well IME)

For ML, python yes, certainly for high-level stuff at least currently. I wouldn't be so sure in the future about the lower stack though, Rust seems to gain momentum there as well (potentially replacing use-cases where currently python is dominant too).