News for hackers. Stuff that matters.
Re:WWDC21 by math-dev on Monday May 24, 2021 @12:43PM (#27266556)
As a former Swift developer, WWDC always brought great joy and interest from me. Apple always showcases some nifty features (their WWDC end up becoming the de facto documentation for their API, which is a reflection of the quality of the videos and perversely the lack of quality of their documentation).

I know a lot of people complain about the 99$ developer fee each year, but Apple in my humble opinion has the hands down best APIs currently for mobile / touch systems. For example, I created my own music app within a day. And WWDC is the heart of showcasing their features for the year to come.

I don’t program for IOS anymore, but will watch from a far distance. I’m all in on linux these days!

Re:WWDC21 by allenu on Monday May 24, 2021 @12:59PM (#27266796)
I think I'm biased because I've been working in their ecosystem for a decade now, but I absolutely agree. I think they've done a generally good job of updating and deprecating APIs. The designs for their common UI components is consistent, making it easy to build things once you know the basic patterns.

The only complaint I have is when you get down to issues with layout and animations not working as expected, it's incredibly hard to debug what's causing it since it's in the "magic" part of the UI frameworks. Often, some re-shuffling of main DispatchQueue steps fixes things up.

Re:WWDC21 by sarsway on Monday May 24, 2021 @01:12PM (#27266987)
True, the APIs are usually top notch, but I really hope SwiftUI will get another revision or something. It looks good on paper, but you constantly run into things that are really weird, odd, and feel like hacks. State management is too complicated as well.
Re:WWDC21 by math-dev on Monday May 24, 2021 @01:19PM (#27267083)
The documentation of SwiftUI is poor but I was able to create mostly what I wanted from it, this was a year or so ago.

I released a SwiftUI calculator I built earlier as open source on GitHub, it may be useful for some dipping their toes into it.

I actually really enjoyed working in SwiftUI. Towards the end of my time, I started moving into a hybrid approach where I would borrow some of the concepts of CSS stylesheets and clearly separate constant parameters used in UX into their own swift files (making it easier to flip between them, eg when going from light mode to dark or from iPhone to iPad)

Link: https://github.com/ashok-khanna/RPN-31

Re:WWDC21 by read_if_gay_ on Monday May 24, 2021 @02:07PM (#27267702)
> I was able to create mostly what I wanted from it

Is "what I wanted" just the calculator app you link? Of course I don't know how much complexity went into it, but maybe the app just didn't touch on the darker corners/pitfalls of SwiftUI that I find you only run into when it comes to Core Data, fancy views, animations/transitions and so on.

Re:WWDC21 by math-dev on Monday May 24, 2021 @04:23PM (#27269257)
Core Data is a persistent storage facility so can be handled either in Swift or SwiftUI.

I wrote a reasonably valued answer on controlling animations in SwiftUI on SO, so I was happy to push the boundaries there: https://stackoverflow.com/questions/58284994/swiftui-how-to-...

The app doesn’t have any super advanced animation, but for most apps, I don’t think that is required. But that’s personal opinion.

This is a longwinded way of saying perhaps you are right and I haven’t fully appreciated more advanced UI, but at the same time many of the basics in SwiftUI cover many use cases :)

Re:WWDC21 by read_if_gay_ on Tuesday May 25, 2021 @07:40AM (#27275610)
> many of the basics in SwiftUI cover many use cases :)

Yeah, I fully agree. But I also feel like if your use case isn't covered, you're losing much of the elegance, and I hope that's just because SwiftUI isn't fully mature yet.

Sorry if I came across like I just thought your app was too basic. I was just trying to say that you might have happened to not run into any of SwiftUI's rough edges, no offense.

Regarding Core Data of course you're right that it's not directly related to SwiftUI but interfacing with it from a SwiftUI app feels very un-SwiftUI-like. I hope they have something in the pipeline for WWDC.

Re:WWDC21 by apozem on Monday May 24, 2021 @01:31PM (#27267240)
I would love to see more Mac-like views in SwiftUI. When I made my Mac app, I ended up wrapping an NSTableView to get all the Mac-native behaviors not offered by a List.
Re:WWDC21 by throwaway894345 on Monday May 24, 2021 @01:15PM (#27267029)
I'm curious to hear about people's impressions of Swift the language. I haven't used it, but I'm keeping my eye on it, especially if it ever properly makes the leap out of the Apple ecosystem and into general purpose computing (yes, I'm aware that there are efforts, but to my knowledge none have resulted in many commercially successful applications--i.e., it isn't "mainstream" yet).
Re:WWDC21 by blacktriangle on Monday May 24, 2021 @01:37PM (#27267310)
It's good, but it's not really anything special. It feels like a mixture of the good parts of Scala, Kotlin, and Rust. Unfortunately lately it's getting pulled in a weird direction by SwiftUI (property wrappers and function builders are just unnecessary). It will be interesting to see how their actor implementation plays out. For the most part though it feels very restricted with its need for Obj-C interop and I suspect it will never make the leap out of the Apple ecosystem simply because it doesn't offer enough over the aforementioned languages to be worth the trouble.
Re:WWDC21 by tictac-toe on Monday May 24, 2021 @01:52PM (#27267515)
> It feels like a mixture of the good parts of Scala, Kotlin, and Rust.

Indeed, I think at the moment it's hands down the best language available for general application programming. The problem is the lack of libraries on non-apple platforms.

Re:WWDC21 by read_if_gay_ on Monday May 24, 2021 @02:01PM (#27267639)
Property wrappers are unnecessary but sometimes they allow for very clean code. For example you can create a wrapper to persist data to UserDefaults like

@Persisted(key: “myKey”) var myInt = 42

which is a really nice way to avoid a lot of boilerplate.

Re:WWDC21 by math-dev on Monday May 24, 2021 @01:28PM (#27267208)
I will let others more qualified opine, but for me it was quite easy to use. I think Android has Kotlin, and imo Swift & Kotlin are not too different, which makes it easier for someone trying to build across two different platforms.

I like Swift’s use of generics and protocols (can’t remember if I am using the right terms), but I really didn’t like some of the more recent changes that obscured parts of the language behind unnecessarily obtuse DSLs.

That said, I think everybody enjoys what they use most, so I don’t see Swift leaving the Apple ecosystem in the near future.

These days I have been abducted by aliens, extra terrestrial beings, and program exclusively in Common Lisp, with its secret alien technology. Now THAT is a language I recommend, its simply amazing to me :)

Re:WWDC21 by throwaway894345 on Monday May 24, 2021 @01:37PM (#27267307)
> That said, I think everybody enjoys what they use most, so I don’t see Swift leaving the Apple ecosystem in the near future

FWIW I've used Python and C++ the most, and I deeply dislike them. :)

Re:WWDC21 by kitsunesoba on Monday May 24, 2021 @02:49PM (#27268223)
One of the biggest differences between Swift and Kotlin in my day to day is that breakpoints/debugging in Kotlin are glacially slow compared to the same in Swift (which itself is a fair deal more slow than debugging Objective-C). I'm not sure if this is due to JVM baggage or what, but it can make chasing down bugs in Android rather painful, slowing methods that normally run in a fraction of a second to take several minutes.
Re:WWDC21 by allenu on Monday May 24, 2021 @07:41PM (#27271015)
Speaking purely as someone who was using Objective-C before on Mac and iOS apps, it's incredibly productive. I can convert ideas into code very efficiently as the language allows you to be concise. How it compares to other modern languages, I can't comment on too much.
Re:WWDC21 by faeyanpiraat on Monday May 24, 2021 @12:53PM (#27266698)
How can you make money on linux?

Correction: I understood the original comment as developing software for linux and getting paid for it, and not using it to make web apps, doing web development is platform independent obviously..

Re:WWDC21 by math-dev on Monday May 24, 2021 @12:57PM (#27266767)
Not easy at all, but I have a day job (outside of IT). The way would be to build web apps / SaaS and also move more into B2B as consumer facing software would be better built natively for their target operating systems (Apple / Windows / etc)

I’m moving more into technical software, so I couldn’t afford more than half my potential user base saying Oh I don’t have a Mac

Re:WWDC21 by emsy on Monday May 24, 2021 @01:01PM (#27266831)
Not easy? The internet basically runs on linux
Re:WWDC21 by dylan604 on Monday May 24, 2021 @01:07PM (#27266919)
If a vendor runs a website to sell their wares that happens to run on linux, then yes it's "easy" to make money on linux. If you are a developer trying to make money on some software you've created specifically for linux, then it's a different thing entirely.
Re:WWDC21 by math-dev on Monday May 24, 2021 @01:05PM (#27266894)
Yes but for the single programmer working by himself or herself, its much more palatable to build an app for iOS / MacOS and monetize from it. I believe that is the direction of the parent comment that I replied to. Many things run on linux but they are also very big softwares run by large teams
Re:WWDC21 by hatsubai on Monday May 24, 2021 @01:34PM (#27267281)
While not exactly being what you're referring to (I believe you're solely referring to something akin to enterprise-esque application development), there are many jobs out there for those of us who build entire distros for public (and private) entities to consume. This ranges from automotive, to defense, to open source OSes like Ubuntu, SUSE, CentOS, etc.
Re:WWDC21 by shepting on Monday May 24, 2021 @01:49PM (#27267470)
I used to work at a company in the chip-design software space that built Linux-only software for $100k/user/year, so there's definitely money to be made for Linux (even if it happens to be niche software).
Re:WWDC21 by chrisseaton on Monday May 24, 2021 @01:00PM (#27266821)
> How can you make money on linux?

Doesn't the vast majority of the world's commercial software run on Linux?

Re:WWDC21 by colejohnson66 on Monday May 24, 2021 @01:32PM (#27267247)
I’m skeptic of that. Adobe, Oracle, Altium, and MANY other enterprise level software suites are Windows only.
Re:WWDC21 by chrisseaton on Monday May 24, 2021 @01:45PM (#27267423)
You mean desktop software? What proportion of software use is that? Absolutely tiny, I'd imagine.
Re:WWDC21 by CyberDildonics on Tuesday May 25, 2021 @12:01AM (#27272468)
Why would you think that?
Re:WWDC21 by chrisseaton on Tuesday May 25, 2021 @05:35AM (#27274782)
What do you think it's running on? Data centres full of Macs and Windows machines?
Re:WWDC21 by CyberDildonics on Tuesday May 25, 2021 @04:54PM (#27282509)
Why would most commercial software be on data center computers? Where do these assumptions come from?
Re:WWDC21 by chrisseaton on Tuesday May 25, 2021 @05:24PM (#27282881)
I don't understand - do you think most services are run from someone's random desktop? That's not the way it works in the real world.
Re:WWDC21 by CyberDildonics on Tuesday May 25, 2021 @05:29PM (#27282931)
To be clear, you think most commercial software runs on linux because you think most commercial software is services running in data centers?
Re:WWDC21 by chrisseaton on Tuesday May 25, 2021 @07:09PM (#27283956)
Data centres, back-office server cabinets, bank main-frames, embedded devices, POS, handled devices. Where do you think it's running? On Dell Opterons on people's desks running Windows? That's not how it's worked for decades.
Re:WWDC21 by CyberDildonics on Tuesday May 25, 2021 @10:31PM (#27285492)
Not how what worked? 95% of desktops are windows or mac, 99% of mobile are android and iOS. That is computers sold, business included. What is this hallucination that all programs are some sort of command line chron job?

https://netmarketshare.com/operating-system-market-share.asp...

Re:WWDC21 by chrisseaton on Wednesday May 26, 2021 @06:12AM (#27288498)
> 95% of desktops are windows or mac, 99% of mobile are android and iOS. That is computers sold, business included.

But that isn't where most software runs. Most people just run a browser or a couple of desktop apps locally.

The vast majority of software is embedded or in data centres, running on Linux or iOS as an exceptional case.

Think about how many services you interact with daily - how many websites, payment services, bank systems, networking systems, other online computer systems in your life. You probably interact with hundreds of such systems every day not always realising it. Compared to what... three or four desktop apps maybe?

Many poorer people don't even own a desktop or laptop at all - so they interact with zero desktop apps but still hundreds of services via their (Linux) phones.

> What is this hallucination that all programs are some sort of command line chron job?

That's literally what most programs are - services providing an API or a web UI running as a command line program in a data centre.

Re:WWDC21 by CyberDildonics on Wednesday May 26, 2021 @12:26PM (#27292528)
To recap, you made a nonsensical hyperbolic statement that is heavily contradicted by real numbers of what computers people buy and use, then say that web pages served from open source software are "running commercial software" while the computers that display and run the web page don't count. Do I have all of this right?
Re:WWDC21 by chrisseaton on Wednesday May 26, 2021 @01:07PM (#27293169)
Not sure why you're being so confrontational about this?

It's not about how many computers - it's about where most software is running - those are two different things.

> then say that web pages served from open source software are "running commercial software"

Yes websites are commercial software. I don't understand what's confusing about that? Facebook is commercial software. It runs on Linux. It makes billions of dollars. Thousands and thousands of engineers working on it are making money on Linux.

Re:WWDC21 by CyberDildonics on Wednesday May 26, 2021 @04:17PM (#27295530)
So instead of commercial software you meant internal command line scripts and instead of running on you meant serving up web pages and instead of on linux, you meant using linux and open source web servers and instead of most commercial software you meant a single company that makes money and instead of numbers you meant guesses. Seems like a bit of a stretch. Seems like you just like to make nonsense claims and backpeddle instead of admitting they are ridiculous.
Re:WWDC21 by chrisseaton on Wednesday May 26, 2021 @04:23PM (#27295609)
Sorry your comment doesn't really make sense to me.

Facebook, Google, Twitter, etc, are all examples of massive successful commercial applications running on Linux.

The original question was 'How can you make money on linux?'

The answer is these companies and more make billions, and the employees make hundreds of thousands, all writing applications on Linux. Most developers I know make money writing applications on Linux.

Re:WWDC21 by CyberDildonics on Wednesday May 26, 2021 @05:53PM (#27296581)
You originally said "most commercial software runs on linux" and when people told you that is a bold and possibly ridiculous thing to say, your response is 'these big websites make a lot of money and the people I know work on linux'.

Do you think that might not be indicative of the big picture? If you lived on the equator would you say "no one really needs a thick warm coat, no one I know has one" ?

I'm fascinated that you don't want to look beyond local anecdotes for real systemic information.

Re:WWDC21 by chrisseaton on Wednesday May 26, 2021 @06:19PM (#27296817)
Out of the top 25 websites in the world, only 2 aren’t using Linux.

96.3% of the world’s top 1 million servers run on Linux.

90% of all cloud infrastructure operates on Linux.

https://hostingtribunal.com/blog/linux-statistics/

Even at Microsoft they run most stuff on Linux.

https://www.zdnet.com/article/microsoft-developer-reveals-li...

72% of phones are running Linux.

https://gs.statcounter.com/os-market-share/mobile/worldwide

Look at any tech jobs site. How many jobs are for writing Microsoft Windows or macOS desktop or iOS phone software compared to for writing Linux applications? A tiny tiny proportion.

Re:WWDC21 by CyberDildonics on Wednesday May 26, 2021 @09:50PM (#27298444)
I was wondering when android would become "running on linux"
Re:WWDC21 by CyberDildonics on Thursday May 27, 2021 @12:10PM (#27304702)
To be clear, if you were in a meeting at work and your boss asked you how to make money programming for linux, you would say to write Android apps, and you think that no one would roll their eyes from you purposely ignoring the point of the question to say something that is pragmatically nonsense and only makes sense in an extremely warped redefinition of a question?
Re:WWDC21 by KMnO4 on Monday May 24, 2021 @01:09PM (#27266946)
Be a web developer. Web works just fine on Linux.
Re:WWDC21 by shadowgovt on Monday May 24, 2021 @02:12PM (#27267763)
As a fellow former fee-paid developer, they'll get another $99 from me for the privilege of writing software that benefits their ecosystem when they dig up my corpse and pull it from the wallet I was buried with...

... but I still agree, it's to my loss. Damn good APIs, damn good integrated user experience. I decided I didn't want to feed the beast, but it's a really good beast.

Re:WWDC21 by adamnemecek on Monday May 24, 2021 @01:06PM (#27266905)
I used to have the same opinion but I've realized that Apple APIs are for a particular type of an app. It can get very restrictive very fast.

I have since moved on to building my own GUIs with Rust.

But I that my app has different requirements than most.

Re:WWDC21 by math-dev on Monday May 24, 2021 @01:13PM (#27267009)
Yeah basically Apple funnels you into their vision and WWDC is a great predictor of the future changes in the apps on the platform.

Its part of the appeal of Apple’s ecosystem - the very high level of standardisation, although it obviously has its drawbacks as you have mentioned