Hacker Newsnew | past | comments | ask | show | jobs | submit | fingerlocks's commentslogin

Yes, But an iOS app requires a helluva lot more than just the Swift language. For example, Metal has zero support so you have to use ft=cpp and disable lsp diagnostics. And you can completely forget Xcode’s wonderful Metal debugger entirely.

Otherwise swift works just like any other clang/llvm project and the tooling is basically the same.


Yes but most people are not dropping down to Metal support unless they're doing custom effects or developing a game engine. Most apps could be developed outside of Xcode just fine.

Sometimes people add to the discussion by sharing esoteric knowledge because the uncommon aberrations are interesting.

That aside, there was a larger point I was making that was lost in the forest because you poking at a tree. iOS apps are more than Swift. Metal was one example, there are plenty of other tooling components that absolutely suck to use in vim, or just missing support entirely. Bundle management, plist files, custom build phases, code signing, asset previews, canvas previews, interface builder, profiling, and unit testing UI is a bunch of stuff that has nothing to do with swift, sucks in vim, and integral to application development.


The hilarious side effect of this is that Intune/Defender on MacOS flags the multiple copies of edge for non-compliance. Maybe this is just something that happens to MSFT employees, not sure, but I’ve had to waste many hours filing for false positive exceptions because not a single Microsoft product can figure how to use a Mach-o shared dylib path

Are you sure?

tcp_now’s maximum cannot physically reach 2^32 because the trailing zeros of that number exceeds the bit width of data type.

Therefore, tcp_now + 30000 will wrap when tcp_now is equal to 2^32 - 3000. Your inequality sign should be strict <, otherwise the result does not follow.


Yes, you are correct. Bad editing on my part.

It should be that if tcp_now gets stuck before (<) (2^32 - 30000) ms from boot, it would cause deadline timers for reaping TCP_WAIT would always be greater than tcp_now because it wouldn't wrap. If stuck at or after (>=) (2^32 - 30000), it would cause them to potentially be reaped faster they should be.

Actually looking at the code a bit more, it looks like calculate_tcp_clock() is run at least once per hour even when there's no TCP traffic or sockets open, so getting into the state where it never reaps TIME_WAIT sockets which would be hard to predict if this would happen.

It also looks like if tcp_now gets stuck, other tcp timers may have problems as well.


GP said that suspending without rebooting prevents the issue.

My uptime resets only when forced by an OS upgrade and I have never experienced this issue. This is consistent with the sleep-heals-the-stack theory.


I recently switched to LazyVim and the default config in their tutorial included all the “extras”. It transformed vim into some kind of hallucinogenic kaleidoscope of an IDE with all sorts of telescoping overlays and pop-ups with a color scheme that fits well with an 8 year old girl’s princess themed birthday party. I actually screamed a little.

Not sensible. completely insane.


Not sure about the "tutorial", but I use lazyvim as base for LSPs, snacks, neo-tree and a theme matching the rest of my desktop and it seems to be fine?

nvim has a lot of "fun" plugins that you wouldn't actually use so I think you might have ran into that.


there’s the LazyVim distro and the lazy.nvim plugin on which it was built. the latter is a bit more sensible.

I asked this same question years ago in one of those threads that was all windows people complaining about cmd+tab. No responses.

That means there are exactly two of us.


Fullscreen gang assemble!


Only integers for #defines in C-headers, enabled with a recent-ish compiler flag. Swift has a #define but it’s just an ifdef list of flags assigned to one compiler setting.

But you can bridge build setting variables using some clever xcconfig macros that combine both preprocessor systems.


I agree with you about result builders, silly feature that only exists for SwiftUI.

But a lot of what you said, except for the concurrency and property wrapper stuff, largely exists for Obj-C interop. The generated interface is more readable, and swift structs act like const C structs. It’s nice.


You’re being downvoted, but there’s an interesting point you’re trying to make. Dopamine-chasing is truly selective in the behavior and chemical sense.

There is a particular hard drug that I could be easily addicted to if it were cheaper and more accessible. Nothing else like it gives me irresistible craving for more. Not nicotine, ADHD meds or speed, benzos, and not even opioids have the same effect. So after I discovered this about myself, I went on a little journey to self test myself other possible addictions.

Social media? Nope. Video games and tv? yes. Gambling, hoarding, shopping: No. Sex: yes. Exercise: yes

I can’t rationalize any of it.


> By the way on macOS MAUI uses Catalyst as backend, not native macOS APIs.

What does this mean? Mac Catalyst is native. It’s just a thin bridge between iPhone’s UIKit and AppKit on MacOS, which are really the only two divergent frameworks in the entirety of the massive Apple SDK.


For those who have never heard of catalyst: https://developer.apple.com/documentation/uikit/mac-catalyst


It's still extremely weird. The difference between iOS UIKit and macOS AppKit is extremely small and already designed for 'cross-platform synergy', e.g. serving both macOS and iOS with mostly the same code.


It isn't really the same, exactly because of that divergence, and platform differences not covered by Catalyst.

Also they aren't the only frameworks that are divergent, although that is another discussion.


Let’s have that discussion. I’m all ears. Can you name any other pair of frameworks that provide identical functionality, but they are divergent such that each framework is mutually exclusive to its target platform?

And no just because the compass is #ifdef’d out when CoreLocation is compiled for MacOs does not count as “divergent”


OpenGL and Metal?

The various incantations of AI frameworks that have been introduced throughout the years?

SwiftUI vs UIKit vs AppKit vs Cocoa Touch vs Catalyst?

SceneKit vs RealityKit?

I understand as target platform also the various versions of macOS.


How are any of these divergent between MacOs and iOS? You still link against the same framework, and the code is nearly identical between the two except for occasional differences in the hardware limitations.

Go look at any of Apple’s sample code. Outside of UIKit/Appkit, most of their samples target both platforms simultaneously


OpenGL is still supported, and Metal has been around for 12 years.

Cocoa Touch is just the umbrella term for iOS frameworks including UIKit, and Catalyst also uses UIKit.


OpenGL isn't really supported, it limps along for existing code, nowadays depending on the OS version, it actually has Metal underneath, but not what Metal is capable of doing with the hardware.


Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: