I'm happy the old vibes of the internet are still alive: https://fuckingblocksyntax.com #objc
How Do I Declare A Block in Objective-C?

The old dude was famously verbose, but this is getting a bit much:

[self.imageView addSymbolEffect:[NSSymbolRotateEffect effect] options:[NSSymbolEffectOptions optionsWithRepeatBehavior:[NSSymbolEffectOptionsRepeatBehavior behaviorPeriodicWithCount:1]]];

#ObjC

Comparing iOS dev with Machine Learning

#ios #swift #objc #ml #machinelearning

Oh hi, haven't seen this one in a while...

objc_setAssociatedObject(x, &y, z, OBJC_ASSOCIATION_RETAIN);

#objc #swift

I asked GitHub Copilot to provide a simple example Swift source code file along other necessities integrated in the C++/Objective-C++ codebase of the Nextcloud desktop client to consider the long term migration of Objective-C++ code to Swift.

No, thanks. 🫣 That looks even more inconvenient to maintain. I feel a bit sick now. 😅 That bridging is anything but straightforward…

#Swift #ObjC #CPP #Nextcloud

It's interesting just how close Objective-C 1.0/1.1 was to JavaScript. A lot of the gritty code just copy-paste and works, as long as you remember to turn [foo message:bar] into foo.message(bar) and change ls.count to ls.length (which tripped me a few times). The object model's different, but you'll never notice in normal work.

Once the whip-me-beat-me C++ freaks started littering Obj-C with a bunch of type-shit, it got harder.
#objectivec #objc #javascript

back in my early industry days when i was porting the adventure game studio (AGS) engine and games to mac/ios, i developed a healthy hatred of Objective-C which was used as interface glue between the engine code and macOS/ios

i had been working with C/C++ for a long time, and had made the mistake of assuming all programming syntax was essentially C-like in structure

suddenly having to deal with obj-c syntax was like stepping into an alien spaceship:

@interface ClassName : SuperclassName {
// instance variables
}
+ classMethod1;
(param1_type)param1_varName;

- (return_type)instanceMethod1With1Parameter:(param1_type)param1_varName;
@end

i could sort of grok out what i needed to do by changing a few variables and ctrl-c ctrl-v the methods i needed, but the overall experience was so difficult that i was glad when i never had to touch it again

over a decade later, i am *so* impressed by what obj-C was attempting. after doing a lot of NeXTStep reading, i finally understand what it was trying to do: add smalltalk-80 message-passing and object orientedness to C. the changes to the syntax (like using the + and - to indicate class vs. instance methods) are actually pretty cool!

sad that i dismissed something so fascinating in the early days just because i was more worried about getting a project done on time than actually learning how it worked

#programming #smallTalk #objC

@sgharms Apple still develops #macOS more than #GNUstep ever evolved. Problem is I don't like the direction it's going. I don't want a network request for every app that I open.
But GNUstep won't help. It's just a POC, not able to deliver meaningful software anymore.
In case you want to develop #ObjC on living systems, try @objfw on literally any OS out there. In case you want a system where ObjC really is used to develop current applications, try #MorphOS.

 🤘🏻🔻

#Metal  + #glfw with #cpp code only.
Had to avoid #objc because my custom build system can't deal with that yet (and I didn't feel like changing that).

What a pain to get it to compile.

BUT

It's using the exact same shader as my #Vulkan    #HelloTriangle thanks to #Slang ❤️

AND

```
$ wc -l src/main.cpp src/shaders/hello_triangle.slang
134 src/main.cpp
40 src/shaders/hello_triangle.slang
164 total 
```

Folks I just accidentally waded into #multithreaded #programming in #c / #objc I did an untutored swing at it and I have multiple half made bowls of spaghetti. Any canonical books or references on getting oriented here. I’m pretty lost.