News for hackers. Stuff that matters.
Re:Swift Concurrency Roadmap by layoutIfNeeded on Friday October 30, 2020 @07:50PM (#24947919)
Yikes. Swift is becoming horribly complex and opaque. Yet another set of @shoehornedKeywords... Colored functions...

Let me ramble a bit here.

Apple’s platforms had always put users before developers, that’s why they were so successful. They’ve built the best user experience by far using nothing but a simple Smalltalk-esque language from the 80s. Look at their frameworks: CoreAudio, CoreAnimation, UIKit... Tremendously powerful, and the best in their league - in terms of possibilities, not necessarily developer experience! Others were shoving garbage-collected virtual machines in their devices, piling abstraction over abstraction, “fluent APIs” (remember those?); meanwhile Apple built an empire with this quirky dynamic language (plus some C++ under the hood), where you had to do manual reference counting as late as 2012! Developers were livid. “How am I supposed to program in this weird language?” “AutoLayout? Why can’t it be just like CSS or something??” But Apple didn’t give a shit, they knew their platform, their frameworks were the best, period. And whiny devs had to adapt to gain access to the richest cohort of users in the computing landscape.

With Swift and SwiftUI we seem to be heading towards a different future, and I’m yet to be convinced that it’s the right one.

Re:Swift Concurrency Roadmap by breakfastduck on Friday October 30, 2020 @10:09PM (#24948608)
Glad to see a mention of CoreAudio for once in a public forum.

No matter the value for money or compatibility, I will never leave macOS for windows because of it. I bought a hugely powerful windows PC in 2018 and the audio performance is awful compared to a 2011 macbook and my 2019 macbook is on another level.

Windows lack of attention to audio drivers is frankly staggering. CoreAudio 'just works'.

Re:Swift Concurrency Roadmap by pjmlp on Saturday October 31, 2020 @11:53AM (#24952436)
I never had audio issues on MS-DOS/Windows, unless we are speaking about the pre-Sound Blaster/AdLib days.

Maybe pay better attention to the sound hardware next time?

Re:Swift Concurrency Roadmap by breakfastduck on Tuesday November 03, 2020 @02:36PM (#24983128)
I have significant professional experience in audio engineering so let’s skip the petty rhetorical questions.

Windows audio drivers are so poor that they’re bypassed completely and basically all major hardware producers offer either ASIO drivers on windows or native CoreAudio drivers.

Using the same high quality external sound card, I get better performance on macOS with latency and buffer than I do on a windows machine with significantly ‘better’ hardware.

I know full well sound hardware makes a difference, and macOS and CoreAudio interfaces with said hardware significantly better than windows. There’s a reason producers of pro audio interfaces write their drivers natively for macOS and use ASIO for windows.

I’m talking about pro audio production tools here, not playing a few mp3s.

Re:Swift Concurrency Roadmap by ratww on Saturday October 31, 2020 @07:02PM (#24955922)
This really depends on your needs. For music production things are different in Windows. Due to latency, studio-level hardware vendors completely skip Microsoft's audio stack and use something that talks directly to the card called ASIO. So, you kinda need external audio hardware even if you're on-the go and wants to do some low-latency audio. Or you use hacks like Asio4all to achieve low latency. In macOS CoreAudio has low latency even if you use the built-in 3.5mm audio jack.
Re:Swift Concurrency Roadmap by breakfastduck on Tuesday November 03, 2020 @02:39PM (#24983164)
Exactly - it really is a big advantage to have that performance natively.

There’s a reason external hardware drivers are native on macOS.

Re:Swift Concurrency Roadmap by pjmlp on Saturday October 31, 2020 @03:47AM (#24949769)
What developers? Web developers trying to do native stuff, maybe.

Give me a native project over Web stuff any day of the week and I up for grabs, yet I do Web related projects since 1999.

Objective-C and Cocoa is great compared with the chaos of npm, yeoman, babel, node, deno, coffeescript, Typescript, bucklescript, angular, react, ember, dojo, prototype.js, jQuery, Vue, svelte, scss, and whatever someone comes up next month to improve their CV.

I am so happy that thanks to WebAssembly I am getting Flash back.

Re:Swift Concurrency Roadmap by icedchai on Friday October 30, 2020 @09:57PM (#24948546)
Funny, I started with iOS development in 2008. I haven't done much recently, but laying things out with UIKit always felt pretty sensible to me. CSS, not so much. CSS was always the "WTF" of development. Maybe it's better now with Flexbox.
Re:Swift Concurrency Roadmap by didibus on Saturday October 31, 2020 @02:15AM (#24949503)
It's way better now. Flexbox and Grid is a game changer for CSS compared to floats in my opinion.
Re:Swift Concurrency Roadmap by pjmlp on Saturday October 31, 2020 @03:47AM (#24949770)
Grid, an idea taken from WPF.
Re:Swift Concurrency Roadmap by novok on Friday October 30, 2020 @09:06PM (#24948262)
Autolayout vs CSS is just a trade off on what layout algo you want. Haversine layout systems tend to be more computationally inefficient than flexbox actually, but more powerful. Yes the original programming API was horrible, but that was a quirk about how apple does API review, and they were mostly expecting you to use IB to do your autolayouts, and stuff like SnapKit put a sane API on top of it soon after.

TBH Obj-C once you looked past it's ugly syntax is a better developer experience than swift today if your making large-ish apps. Today the debugger is still buggy, build times are still way slower and swift code bases create stutters in unresponsiveness inside Xcode to this day. And it was way worse back in the swift v1-3 days.

TBH I think swift could solve a lot of their build speed issues if they removed type inference beyond a very basic set and brought back fine file grained importing like you have with C and Java. You still get %95 the benefits with a couple of features that most IDEs like IntelliJ with java are shown to be NBD.

Stuff like Flutter & Kotlin Multiplatform might make a lot of this stuff moot although, and swift will be regulated as an iOS compatibility layer and a nicer looking C++

Re:Swift Concurrency Roadmap by rudedogg on Saturday October 31, 2020 @02:20AM (#24949518)
> Haversine layout systems tend to be more computationally inefficient than flexbox actually, but more powerful.

I think you meant Cassowary instead of Haversine: https://en.wikipedia.org/wiki/Cassowary_(software)

Re:Swift Concurrency Roadmap by novok on Saturday October 31, 2020 @03:27PM (#24954440)
oops, brainfart :)
Re:Swift Concurrency Roadmap by andrekandre on Friday October 30, 2020 @09:10PM (#24948284)
> With Swift and SwiftUI we seem to be heading towards a different future, and I’m yet to be convinced that it’s the right one.

i have some feelings myself, but they are badly formulated so i wont say them here...

but im curious, specificaly why do you feel this way?

Re:Swift Concurrency Roadmap by layoutIfNeeded on Saturday October 31, 2020 @09:45AM (#24951422)
They are mixing up their priorities. SwiftUI is catering to the mediocre webdev demographic, with a lot of opaque magic and language-level (!) hacks only for the sake of a “friendly” React-like API. In terms of features and performance it’s way behind UIKit, yet Apple is pushing it for the new iOS 14 home screen widgets.

It’s basically the usual story with post-Jobs Apple: catering for the masses while neglecting the pros - but this time it’s about developers instead of consumers.

Re:Swift Concurrency Roadmap by pjmlp on Saturday October 31, 2020 @11:56AM (#24952459)
Actually reactive UIs trace back to Haskell and FP reactive programming concepts.
Re:Swift Concurrency Roadmap by layoutIfNeeded on Saturday October 31, 2020 @01:06PM (#24953130)
Sure, I’m familiar with Conal Elliott’s work. But other than its “elegance”, I don’t hold reactive programming in particularly high regard, especially when implemented on top of non-pure languages. I consider FRP a “clever” technique - and while “clever” techniques make programming a fun puzzle, they can be detrimental to performance and end-user experience.

We have a finite cleverness budget; if you spend it on your code, then your product will suffer. If you build cleverness into the platform SDKs (hello SwiftUI! hello J2EE design pattern hell!), then every product on your platform will suffer.

Re:Swift Concurrency Roadmap by andrewjl on Sunday November 01, 2020 @01:53AM (#24957672)
I haven't seen any cleverness in reactive code that one wouldn't encounter in a non-reactive code base. It is true that one may need to learn new abstractions, but a more imperative coding style requires lots of glue code, much of it having inconsistent quality. You'll end up needing ramp-time no matter how you go. Building UI involves the same problems and trade-offs whether using reactive programming techniques or not.

Conal Elliott's work, while super interesting, does not cover the entirety of reactive programming. I found this[1] write-up to be helpful in defining what reactive programming is and it's value. The author is a member of the team working on Swift Concurrency.

And SwiftUI is compatible with anything from UIKit, so it actually doesn't hold anyone back who wants to try to do something non-trivial. If you watch the demos, particularly from the most recent WWDC, you'll see it actually makes quite complex behavior much more doable. Does that reduce the value of esoteric framework knowledge? Perhaps it does, but that means engineers now have more time to spend on the product not less.

[1]https://www.oreilly.com/content/why-reactive/

Re:Swift Concurrency Roadmap by pjmlp on Saturday October 31, 2020 @02:54PM (#24954193)
J2EE has stopped being a thing in 2005, and I am quite found of JEE, so I like to use my cleverness budget.

As for SwiftUI, I guess the only issue it the current state of its tooling, as I have heard it still is found lacking.

Yet if one listens to iOS podcasts everyone is raving about it.

Re:Swift Concurrency Roadmap by mpweiher on Monday November 02, 2020 @05:26AM (#24966485)
If you mean FRP by Conal Elliott, then not really, it's an almost completely different branch entirely.
Re:Swift Concurrency Roadmap by IfOnlyYouKnew on Friday October 30, 2020 @08:48PM (#24948173)
> And whiny devs had to adapt to gain access to the richest cohort of users in the computing landscape

> With Swift and SwiftUI we seem to be heading towards a different future, and I’m yet to be convinced that it’s the right one.

The more things change, the more they stay the same...

Re:Swift Concurrency Roadmap by wayneftw on Saturday October 31, 2020 @12:19AM (#24949096)
> They’ve built the best user experience by far...

...in your opinion. In the opinions of people who manage IT for the vast, vast majority of businesses around the world, where most of the serious software users exist, that title belongs to Microsoft Windows.

Apple is so overtly anti-consumer that I just can’t take opinions like this seriously. And Swift is a trash language with a shitty developer experience just like Obj-c was before it. They couldn’t even get strings right. Nobody wants it outside of Apple’s little bubble.

Re:Swift Concurrency Roadmap by marketingPro on Friday October 30, 2020 @08:46PM (#24948162)
What makes you think "They’ve built the best user experience by far"

I can't even say "best" experience let alone "by far".

Apple is notoriously anti consumer on everything from hardware to software.

I don't know what you are talking about. They had a fun signup screen when you first boot your iPhone. I have 0 ideas what you are talking about for macOS.

I think their primary reason for success was their advertising/marketing.

Re:Swift Concurrency Roadmap by Razengan on Saturday October 31, 2020 @12:49AM (#24949200)
> Apple is notoriously anti consumer on everything from hardware to software.

Yet millions of people continue to happily give them money without being forced to, unlike say Microsoft or Google that you just cannot avoid even if you don't own any of their products.

I was a Windows/PC user for most of my life before I switched to Macs and in my experience Apple has been consistently more consumer-friendly than Microsoft or Google.

In fact my first foray into the Apple ecosystem was an iPad that I bought as a gift for someone, and fell in love with it so much I wanted to develop for iOS and bought my very first Mac for that. So far nothing has made me consider switching to Microsoft or Google.

The only thing I hate about Apple is their poor documentation and lack of official support on their own forums.

Re:Swift Concurrency Roadmap by Razengan on Saturday October 31, 2020 @11:47AM (#24952383)
"if you don't own any of their products" was meant to be "any of their hardware"

As in, you can easily avoid Apple if you don't own any Apple hardware.

Not so easy with Google or Microsoft.

Re:Swift Concurrency Roadmap by marketingPro on Saturday October 31, 2020 @06:53AM (#24950407)
As someone that used both, I think you are under the psychology spell.

It's not like you could leave Apple, you are locked in.

It may be hard to put into words why you feel that way. (which is why your post never mentioned anything about quality)

As mentioned opening the iphone box and giving Apple my personal information felt fantastic. The actual performance and quality was extremely dissapointing.

Re:Swift Concurrency Roadmap by Razengan on Saturday October 31, 2020 @11:20AM (#24952127)
> As someone that used both, I think you are under the psychology spell.

One could say the same for you, but that won't get us anywhere.

> It's not like you could leave Apple, you are locked in.

I have lived most of my life without Apple and I know how to do it again.

Tell me, how do you avoid Google or Microsoft?

I was happily using GitHub before Microsoft bought it.

I was happily using YouTube before Google bought it and made it worse.

I can't avoid feeding my data to Google even if I don't use any of their services, through their Ads, Analytics etc. and who knows what kind of shadow profiles they build from just my proximity to their other users.

Now, every time I sign into YouTube I have to delete all Google cookies to avoid being automatically signed into Search.

> As mentioned opening the iphone box and giving Apple my personal information felt fantastic. The actual performance and quality was extremely dissapointing.

I've been using the iPhone since the 5S and honestly, every time I have to handle someone's Android (e.g. to show them how to do something quicker than telling them), I want to hand it back as soon as possible.

Re:Swift Concurrency Roadmap by marketingPro on Saturday October 31, 2020 @12:18PM (#24952682)
I have no idea why you are bringing up Microsoft and Google.

If you haven't taken a marketing class, I highly recommend it.