5 ms·
is anybody doing anything with swift outside of iphone or mac app development? I recall there was some effort to make it something more than that but I think t
by VWWHFSfQ 5y ago
is anybody doing anything with swift outside of iphone or mac app development? I recall there was some effort to make it something more than that but I think that's been mostly abandoned at this point since there are so many much better languages already
- boboguitar 5y agoThere was a large effort to bring it into machine learning in place of python, but the team that was over that was restructured and it looks dead.
- ksec 5y agoIBM tried to make it work for web and server. Google tried to use it for ML. Both were abandoned.
- gh123man 5y agoI am! I'm building a complete backend in Swift for an app i'm working on. It's actually been really great so far. I develop on my mac in xcode and deploy on linux via docker. See: https://vapor.codes/ https://vapor.codes/ I'm a little bias because I really like Swift as a language but Vapor is growing and there are lots of plugins to fill the gaps.
- gregkerzhner 5y agoI love Swift too, but dislike Xcode enough to where I wouldn't use it unless I was doing iOS. Even in a medium sized project basic functionality like syntax highlighting or clicking into functions is unreliable. You get used to it being an iOS dev, but switching into something like Intellij is a sobering wake up call where that stuff just works.
- syspec 5y agoTry AppCode from intelli-j, it's also cross platform
- gh123man 5y agoIndeed you are right. XCode absolute induces some stockholm syndrome as an iOS dev. Maybe anecdotal, but I do find swiftPM based projects to have far fewer issues than cocoapod + Cocoa based apps. I'd love to see sourcekit-lsp (the swift lsp) to further develop. Though last time I checked it wasn't exactly usable day to day.
- mmargerum 5y agoYou can use emacs + lsp along with the Xcode lsp server. works great and is way more stable the XCode. I just use XCode for storyboard editing. (add-to-list 'exec-path "/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin") (use-package lsp-sourcekit :ensure t :after lsp-mode :config (setq lsp-sourcekit-executable "/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/sourcekit-lsp")) (use-package swift-mode :hook (swift-mode . (lambda () (lsp))))
- liuliu 5y agoI wrote about my unconventional use of Swift on Linux (i.e. not a web app) a few months ago: https://liuliu.me/eyes/data-science-setup-with-swift-in-2021/ https://liuliu.me/eyes/data-science-setup-with-swift-in-2021...
- michaelbrave 5y ago"There are dozens of us" but seriously, there is some interest from users but most projects done by companies have been abandoned, SwiftUI feels almost like a language divergence, which is frustrating. I'll list what I know about but it's by no means comprehensive. The good news is that server side on Linux is still working well, Vapor 4 is solid, growing and looks like it has a bright future and Perfect is still going too, though Perfect seems disjointed from the main community. IBM's Kitura and involvement with Swift is over though. Server side seems like it's best future right now, since it's more performant than Javascript and uses less cycles, which can have a lot of cost benefits. Static site generation looks good too, Publish by John Sundell being the most famous (https://github.com/JohnSundell/Publish https://github.com/JohnSundell/Publish) but a lot of others have started springing up lately. "Swift for Tensorflow" by Google has been shut down. Though that was mostly Google giving advice on how to evolve Swift to work better for ML. It's a shame too, since it felt like Fast.Ai was adopting it and starting to teach it at one point, so the shutdown felt a bit premature, but this is Google after all, shutting things down is what they do. Swift 5.0+ seems to have stabilized the language quite a bit too(ABI Stability and other things), which is a good thing, as hopefully the tutorials/docs from now on should remain more consistent. The built in package manager "Swift Package Manager" seems to be working better too, though there are still a lot of complaints/missing features, but on the whole I like it. Swift on Linux seems to be officially supported by more flavors of Linux than it used to be. Meanwhile Swift on Windows works right now but I wouldn't use it in production yet, it throws errors that are the sort that if you ask anyone they will answer "that's normal, ignore that". Some have even gotten modern Swift to run on older MacOS's leveraging LLVM. Swift WASM seems to have had a big update with Swift 5.4 https://forums.swift.org/t/swiftwasm-5-4-0-has-been-released/51753 https://forums.swift.org/t/swiftwasm-5-4-0-has-been-released... though I've not yet tried it having given up on Swift WASM about a year ago. Youtuber Stega's Gate(https://www.youtube.com/channel/UCBXFkK2B4w9856wBJfCGufg https://www.youtube.com/channel/UCBXFkK2B4w9856wBJfCGufg) is building a cross platform game engine in swift. IntelliJ has a decent alternative to Xcode now too, using Clion with an app made by them(though it's still not as integrated as Xcode, nothing would be). Getting it to run on android is technically possible, but the workaround it too much, but that's mostly on Google actually, since the support for writing things in C for Android is so depreciated it's a joke. The Docs are still terrible though, have been to my knowledge since 3.0 became outdated. That said the official books are alright and there are tutorial communities that are pretty good too, but it's shameful that the docs should be that useless. So yeah, Swift is nearly viable for non Mac things, but there aren't much for libraries outside of backend. Some are tinkering and making cool stuff, but at times it's difficult when even the non app related programming tutorials for those are like "let's do it on MacOS using Xcode".All of that said, it's my favorite language, I want it to have a community similar to Rust's but I don't think Apple supports it the right way for that happen, they seem ok with it staying inside their ecosystem, like they are ok if the community does stuff outside of it, but they aren't helping it or encouraging it, is the general feeling. Ironically I was recommended to Swift initially because of the community that it had at the time, the caveat being "if you want to make apps for Apple's ecosystem", which isn't terrible, but it's not what I want. I'll probably give up on it if it doesn't change in the next year or so and go all in on Rust is likely what will happen, but again it's a shame.