Catalina: Apple turns macOS into a closed platform; many audio-devs warned from the upgrade

DSP, Plugin and Host development discussion.
Post Reply New Topic
RELATED
PRODUCTS

Post

camsr wrote: Sun Nov 10, 2019 6:41 pm I prefer the white-space agnosticness of C languages. It's more enjoyable to just write something without worrying about indentation.
It's been said more than once: C is a write-only language. :lol:

Post

mystran wrote: Sun Nov 10, 2019 7:29 pm
camsr wrote: Sun Nov 10, 2019 6:41 pm It's possible to write almost anything in C without any whitespaces.
You need whitespace for the preprocessor and qualifiers and non-pointer definitions/declarations (can't think of a workaround for those; excessive parens might work)... but I think that's pretty much all of it in plain C. In C++ you also need some in nested templates, but not sure if there's anything else.
I think C could be greatly improved with losing the braces and semicolons and using the Python 2-space indent scheme. It would certainly make some of my code far more readable.

Now, if we could only get rid of header files. What a waste when the preprocessor can do one pass over the code file, followed by the compiler.
I started on Logic 5 with a PowerBook G4 550Mhz. I now have a MacBook Air M1 and it's ~165x faster! So, why is my music not proportionally better? :(

Post

syntonica wrote: Sun Nov 10, 2019 10:01 pmI think C could be greatly improved with losing the braces and semicolons and using the Python 2-space indent scheme. It would certainly make some of my code far more readable.
Making code markup part of the language syntax is just... ...meh.

Post

syntonica wrote: Sun Nov 10, 2019 10:01 pm Now, if we could only get rid of header files. What a waste when the preprocessor can do one pass over the code file, followed by the compiler.
With C++ it sometimes feels like it's instead better to just avoid source files (and with templates you basically have to do it anyway), except for stuff that's more or less independent of everything else or part of some stable module that haven't changed for a while.

The problem is that there's a minimum "critical mass" that you have to reach before the separate compilation saves you more time than the overhead of having to compile another file (and this gets worse when the file itself has to include a lot of stuff). For relatively small source files with enough dependencies that you end up having to recompile often and which themselves provides functionality that is only imported by a few other files, you can actually end up saving time (and sometimes a lot of time) by simply dumping it all into the header directly.

Post

C++ is really it's own sort of monster. I'm not horribly keen on templates to begin with. They're ugly, slow and quite pointless to me in the way I work. And with its very heavy reliance on templates, it makes the C++ compiler one of the slowest, fussiest of compilers. But I'm really speaking from the view of the programmer, i.e. me, that I have to define prototypes and then define the exact same thing in a separate file. I'd rather have a single file with my data structures defined at the top, followed by procedures, classes and methods that I only have to name once, which is pretty much every other language out there that's not in the C-family.

Maybe there could be a separate templates file? C++ would benefit in incremental compilation by not having to recompile headers every time one might be changed, but just recompiling the single file that did change. I've just started automatically cleaning and recompiling all my C++ code as I'm tired of fighting with Xcode.

Me: Xcode, please recompile my changes.
X: Done!
Me: Um, no, you didn't do anything there.
X: Yes, I did.
Me: Then why is that bug I just fixed still there?
X: Hey, man, don't blame me for your crappy code...

I realize this is more Xcode's fault more than clang, but we like or mod cons, right? Fortunately, my compile time is only a few seconds.
I started on Logic 5 with a PowerBook G4 550Mhz. I now have a MacBook Air M1 and it's ~165x faster! So, why is my music not proportionally better? :(

Post

Experiencing these sort of problems also frequently with XCode on the Mac. If you want to be sure that your code changes REALLY got applied always clean the build and rebuild completely. Then compiling takes a looong time...
And if you want to test the AU always close the host complelety. Otherwise it loads the old AU and does not apply the changes. Seems to be a caching problem.
It makes debugging a AU plugin a pain on the Mac.
It does not occur with VST.

It also happens with Visual Studio on PC. But only if you change from debug to release build or from X64 to x32.

Post Reply

Return to “DSP and Plugin Development”