News for hackers. Stuff that matters.
Re:Twitter for Mac is incapable of accepting certain letters... by userbinator on Wednesday October 30, 2019 @09:32PM (#21404861)
Every time I see things like this, it makes me feel glad I chose Win32 (actually Win16, not that it matters all that much...) as my first platform to start learning to write GUI apps for, and didn't switch over to the Apple side of things after that; the "move fast and break things" mentality was already somewhat noticeable in Apple back then, whereas Microsoft (the "old MS", not the "new MS") was more concerned with "protecting your investment in the platform". In my experience, core functionality bugs like this just don't occur with Windows, probably because there's far less rewrite-churn[1].

I know Windows has had various UI frameworks come and go over the years, but they're all fundamentally layers on top of the underlying stable Win32. For Mac I'd not really dug into how to write GUIs, but I know there's things like Carbon, Cocoa, etc., and those seem to be the base itself, and change significantly or are even entirely removed at the whim of Apple. Is there any stable GUI API on the Mac at all?

There's also this, which is frankly quite terrifying: https://news.ycombinator.com/item?id=11638367

[1] https://news.ycombinator.com/item?id=21174947

Re:Twitter for Mac is incapable of accepting certain letters... by saagarjha on Thursday October 31, 2019 @03:28AM (#21406423)
> There are many places which look unimplemented, with only stub functions present.

Note that the open source releases often get things scrubbed or ifdef'd out of them.

> There's also this, which is frankly quite terrifying

I fail to see your point.

Re:Twitter for Mac is incapable of accepting certain letters... by userbinator on Thursday October 31, 2019 @07:36AM (#21407621)
Note that the open source releases often get things scrubbed or ifdef'd out of them.

I mean things like TODO comments, not deliberate censorship.

I fail to see your point.

You don't notice anything wrong with the insane complexity to do almost nothing? A similar near-nothing app would be 1/10th the size on Windows, if not smaller.

Re:Twitter for Mac is incapable of accepting certain letters... by saagarjha on Thursday October 31, 2019 @07:52AM (#21407701)
I see nothing wrong with that app, since it’s purposefully convoluted. Apple’s application frameworks are written in and meant to be accessed through Objective-C so trying to write an app in C is going to require a lot of hacks and additional complexity. A simple application can be written in under a dozen lines of Swift or Objective-C code. (For an idea of how insane what you linked is, consider trying to use a C++ library from C: you’d need to hand-mangle the function names, and if you want to pass in parameters that were C++ objects you’d need to lay out their vtables and fields correctly, and…you get my point. It’s not anywhere near representative of what the normal development experience would be like.)
Re:Twitter for Mac is incapable of accepting certain letters... by userbinator on Friday November 01, 2019 @07:40AM (#21417755)
It's not "purposefully convoluted", and I'm not talking about "normal development experience", but rather the larger amount of non-essential complexity it shows; and as anyone should be aware, complexity is always an opportunity for bugs, regardless of whether it's something you would see or write or even be aware of in the "normal development experience". Combine that with Apple's attitude of constant churn and it's not hard to see how bugs can multiply easily.

Using a C++ library from C is not hard because objects map to structures in a straightforward manner (and in fact early C++ compilers were C++ to C translators), and you would need to use structures anyway, unless the library was obtusely designed with nonessential complexity. That's how the Win32 API works too (with the exception of the bloated COM stuff.)

Re:Twitter for Mac is incapable of accepting certain letters... by shaki-dora on Wednesday October 30, 2019 @10:11PM (#21405051)
Cocoa and the Foundation framework have been around longer than MacOS / OS X, i. e. more than 20 years. How many different concepts has Microsoft called ".NET" since then?
Re:Twitter for Mac is incapable of accepting certain letters... by umanwizard on Thursday October 31, 2019 @08:46AM (#21408113)
Regardless of the flavor of the month, the difference is Microsoft is still supporting most of their old frameworks. You can still go write an MFC app today, for example. (VB6 is a major unfortunate exception, I will admit).