Live data from Hacker News

Swift at Apple: Migrating the Password Monitoring Service from Java

swift.org

161–170 of 235 posts

Re: Swift at Apple: Migrating the Password Monitoring Service from Java

#161
post #41

Earlier quoted context omitted.

Swift is Apple's own language. They have all the experts from lowest to highest level . Writing a long winded report/article for fair technical evaluation of competing technologies would utter waste of time and no one would believe if answer were still Swift. > I'd assume Go was among them. ... I don't see any reason to evaluate Go at all.

> I don't see any reason to evaluate Go at all. https://devblogs.microsoft.com/typescript/typescript-native-...

Yeah, while they are at it they can also learn on how to write OS for ARM architecture from Microsoft.

Re: Swift at Apple: Migrating the Password Monitoring Service from Java

#162
post #136

Earlier quoted context omitted.

> Many other GCed languages, such as swift Swift is not garbage collected, it uses reference counting. So, memory there is freed immediately when it is no longer in scope.

Reference counting is a form of garbage collection.

[deleted]

Re: Swift at Apple: Migrating the Password Monitoring Service from Java

#163
post #158

Earlier quoted context omitted.

If Apple does not dogfood their own technology for production systems what chance do they have to tell 3rd party users that Swift is ready for prime time. Delving into Java arcana instead of getting first hand experience in developing in Swift would've been great opportunity wasted to improve Swift.

I agree if this was a brand new system. However, they chose to replace an existing system with swift. The "arcana" I mentioned is start up options easily found and safe to apply. It's about as magical as "-O2" is to C++. Sure, this may have been the right choice if the reason was to exercise swift. However, that shouldn't pretend like there was nothing to do to make Java better. The steps I described are like 1 or 2…

Apple has explicitly stating that they want to try and move as much of their stuff to Swift as possible.

I’m sure you’re right, there must’ve been ways to improve the job of deployment. But if they wanted to reduce resource usage and doing it in Swift aligned with some other company goal it would make sense they might just go straight to this.

Re: Swift at Apple: Migrating the Password Monitoring Service from Java

#164
post #56

Earlier quoted context omitted.

What areas are classes necessary assuming you’re talking about pure Swift and not iOS?

Where copying is expensive (most Swift collections are backed by classes for COW semantics). Where location stability is necessary (where you need a mutex). Resource allocation. Those are the primary examples that noncopyable types are meant to address.

Ah yes great examples, thank you for explaining.

Re: Swift at Apple: Migrating the Password Monitoring Service from Java

#165

I'm going to call it now: Swift on the backend is pointless for everyone but Apple, and trying to make it takeoff as a backend service language is as pointless as porting Xcode cross platform and trying to lure non-Apple devs into using it over say VSCode, any JetBrains IDE or Visual Studio. The choices that already serve the market are just too numerous and the existing tooling is already far greater in features, fu…

I am really curious what people's take on Hacker News is of Swift. It feels like I heard about it more five years ago. People seem to like Go, Rust is cool (I learned that one), and Python, C#, Java seem here to stay. I mean I am asking as general purpose language, not just back end.

I really like it. It feels clean to me and easy to read, but has great async and other modern features. A bit like a compiled TypeScript without all the baggage that comes from JS’s existence.

It has its issues in places, mostly the compiler, but I love getting to develop in it.

I suspect you hear less about it because it’s no longer new and the open source community doesn’t seem to care about it that much, unlike Rust.

It still seems to be viewed as “the iOS language” even though it can do more than that and is available on other platforms.

Re: Swift at Apple: Migrating the Password Monitoring Service from Java

#166
post #158

Earlier quoted context omitted.

If Apple does not dogfood their own technology for production systems what chance do they have to tell 3rd party users that Swift is ready for prime time. Delving into Java arcana instead of getting first hand experience in developing in Swift would've been great opportunity wasted to improve Swift.

I agree if this was a brand new system. However, they chose to replace an existing system with swift. The "arcana" I mentioned is start up options easily found and safe to apply. It's about as magical as "-O2" is to C++. Sure, this may have been the right choice if the reason was to exercise swift. However, that shouldn't pretend like there was nothing to do to make Java better. The steps I described are like 1 or 2…

Once Amazon CEO was asked about new competitors trying to create cloud infrastructure fast. His reply was "You cannot compress experience"

Saving few weeks or months by learning 3rd party technology instead of applying and improving first party technology would be amateurish.

> However, that shouldn't pretend like there was nothing to do to make Java better.

This seems like constant refrain that Apple or anyone choosing their own tech over someone else's owe absolute fair shot to stuff they didn't choose. This is simply not the way world works.

Yes, there are endless stories companies spending enormous resources to optimize Java stack even up to working with Core Java team at Oracle to improve on JVM innards. But those companies are just (although heavy) user of core technology rather than developer of competing one. Apple is not one of those users, they are developers.

Re: Swift at Apple: Migrating the Password Monitoring Service from Java

#167
post #144

> This feature has a server component, running on Linux-based infrastructure, that is maintained by Apple. Somewhat surprised Apple doesn’t run their services on XNU on internal Xserve-like devices (or work with or contribute to Asahi to get Linux working great natively on all Mx CPUs). A 1U Mac Studio would be killer. I doubt it’d even be a huge engineering effort given that they’ve already done most of the work for…

They are known to use cloud services from Azure (and I assume other providers).

If they’re going to run in public clouds + on prem, Linux makes sense. And if you’re doing Linux the x86-64 currently makes a ton of sense too.

As you mentioned they’d have to contribute to Asahi, which would take up resources. Even ignoring that the price/performance on Apple hardware in server workloads may not be worth it.

Even if it’s slightly better (they don’t pay retail) the fact that it’s a different setup than they run in Azure plus special work to rack them compared to bog-standard 1U PCs, etc may mean it simply isn’t worth it.

Re: Swift at Apple: Migrating the Password Monitoring Service from Java

#168
It's nice to see a success story using Vapor and knowing Apple uses Vapor themselves. As a long time Laravel user, which Vapor is inspired from, it gives me hope that Vapor has legs.

Swift was a lovely language, up until recently where it should be renamed to Swift++.

Re: Swift at Apple: Migrating the Password Monitoring Service from Java

#169
post #120

Earlier quoted context omitted.

> Java has had AOT compilation for a while, so traditional GC and its massive overhead are no longer a strict necessity. You mean it does escape analysis and stack-allocates what it can? That would definitely help, but not eliminate the GC. Or are you thinking of something else? Thinking about it more, I remember that Java also has some performance-hostile design decisions baked in (e.g. almost everything's an Object…

Java also has a lot of culture making optimization-resistant code so there’s the question of whether you’re talking about the language itself or various widespread libraries, especially if they’re old enough to have patterns designed around aesthetics or now-moot language limitations rather than performance. I’ve replaced Java code with Python a few times and each time even though we did it for maintenance (more Pyth…

    > I’ve replaced Java code with Python a few times ... while performance at least doubled
Are you saying you made Python code run twice as fast as Java code? I have written lots of both. I really struggle to make Python go fast. What am I doing wrong?

Re: Swift at Apple: Migrating the Password Monitoring Service from Java

#170

The amount of Apple hate is staggering. Replace swift with rust, And this would have 10x the upvotes and only positive hype

By now, everyone and their family knows that can get lot of updates just by including Rust in the title. It is what it is.
Post reply on HN