Live data from Hacker News

Building a Production Server Swift App

realm.io

61–70 of 91 posts

Re: Building a Production Server Swift App

#61

Earlier quoted context omitted.

Am I missing a joke here? Interface builder, xibs and storyboards are very useful tools for even extremely large projects. Makes building and maintaining the UI extremely easy. The idea that because a tool is easy to use is somehow indicative of the skill of the person using the tool, is completely bogus. Interface builder has a lot of advanced features for setting up complicated UI. You could quite easily argue the…

I'll chime in, having done IOS apps for many years now...I have fully given up on Interface Builder and Storyboards. I build all my UI in code and find it works MUCH better and I spend much less time fighting with the UI. I used to spend half my time fighting with interface builder to get the layout right. Move one element that something else is constrained too...f' your everything. Oh, and setting up constraints in…

This.

When I was beginning iOS development I tried to learn it as well as I could because I though that everybody uses them because it's the "Apple way of doing things."

However just like you...when I had to start implementing constraints with it, it was the last time I ever touched that horror.

Re: Building a Production Server Swift App

#64
post #25

Earlier quoted context omitted.

Swift runs at the speed of C. It could be several orders of magnitude faster than ruby or python or node.

Not necessarily true https://benchmarksgame.alioth.debian.org/u64q/compare.php?la... http://benchmarksgame.alioth.debian.org/u64q/compare.php?lan...

But it is true? https://medium.com/@rymcol/benchmarks-for-the-top-server-sid...

Perfect (Swift) kills Node.js - which means it kills other stuff (like Ruby) without question. Python would be hard tho...

Re: Building a Production Server Swift App

#65
post #2

butwhy.gif i get that isomorphism is very helpful long term for larger code bases, and being able to share libraries between your ios and server/backend would be very awesome, but at what cost? there are proven server ecosystems that are going to be much less "innovation token" laiden than swift, surely?

One IDE, for all your code. (Especially useful for App projects)

Code sharing also equals error checking, across code.

One book/site/dictionary open at a time.

One style to remember, at a time.

What makes an ecosystem "proven"? Would you not buy an electric car, because the gas engine is proven?

Re: Building a Production Server Swift App

#66
post #55

Earlier quoted context omitted.

I can conclude that by looking at for example Go offers today vs effort of setting Swift web framework like Kitura. IMO it is far away from general purpose server side usage. As far as memory usage goes Swift does not color me impressed when compared to GC'd language: http://benchmarksgame.alioth.debian.org/u64q/compare.php?lan...

Adoption is not the same as appropriateness at all. As far as memory usage goes these benchmarks are completely irrelevant. They use very little memory and they measure it in a way that is unsuitable for a memory benchmark in the first place. The problem with tracing garbage collection is that it requires a lot (~50%) of spare memory at all times to give the GC time to catch up without slowing the program down too mu…

Sure, May be I am wrong and Swift will be just fine for server use cases.

Re: Building a Production Server Swift App

#67
post #47

Going to chime in a bit here... "Avoid #if os(Linux)… When you do this, you lose all help from Xcode. It can’t do syntax checking” ... That’s not correct. Jeff was seeing the effect of something else blocking this from happening. arc4random, yeah, it doesn't exist on Linux currently, but there are other options that are better anyway, like using TurnstleCrypto. For Perfect, there's also a macOS app that aside from he…

FWIW, if anyone wants to discuss, join us on our Slack channel via http://perfect.ly

My handle on that channel is, surprisingly, the same as here, @iamjono.

Re: Building a Production Server Swift App

#68
post #48

Reading about Swift on server side and looking at Swift server dev mailing list. It appears to me that most appropriate use case of Swift on server side is Apple platform where client side is already written in Swift. The server side group at Apple/IBM seems mostly looking for Swift wrappers around C/C++ core technology for sockets/http/ssl related work. This might be amply sufficient for Apple or IBM developing LOB…

What mailing list is that? I couldn't find it with a quick google search.

Re: Building a Production Server Swift App

#69
post #51

Earlier quoted context omitted.

I am iOS developer and I really wanted to say swift is headache and not a good language for Server development. I want to see how it goes but as far I know it is not flexible enough. I mean if you are building a production server you really do not want to think about language issues. Like dictionary is taking 4000ms to compile (yes it is true 4s) and compilation error message which has no link with what actual error…

Set your optimization level to -Onone & then manually set SWIFT_WHOLE_MODULE_OPTIMIZATION in user defined variables to YES. Your build times will improve greatly. Xcode only lets you do WMO & optimizations on in the normal UX. Really bad that they don't expose this :/ Also to other people thinking about swift: don't. 200-100kloc and your build times become 5-20+ minutes. The conditional compiler is not very good eith…

Thanks!! Done already all this. On developer forums apple developers said they messed with the Xcode so wating for next Xcode release. That's what I am talking about :( https://forums.developer.apple.com/thread/62737

Re: Building a Production Server Swift App

#70
post #55

Earlier quoted context omitted.

I don't see how you can conclude from any of that what the most appropriate use case for Swift on the server side is. It's just what a couple of early adopters are talking about today. For me, the case for Swift is that it is a modern language that doesn't waste half of the available memory on a tracing garbage collector. The same goes for Rust, which has even more opportunities for low level optimization where neces…

I can conclude that by looking at for example Go offers today vs effort of setting Swift web framework like Kitura. IMO it is far away from general purpose server side usage. As far as memory usage goes Swift does not color me impressed when compared to GC'd language: http://benchmarksgame.alioth.debian.org/u64q/compare.php?lan...

> I can conclude that by looking at for example Go offers today...

This is the kind of argument that used to be trotted out all the time for Java and Perl before it. If we always went by what was offered today, we'd never use anything new.

Post reply on HN