The old dude was famously verbose, but this is getting a bit much:
[self.imageView addSymbolEffect:[NSSymbolRotateEffect effect] options:[NSSymbolEffectOptions optionsWithRepeatBehavior:[NSSymbolEffectOptionsRepeatBehavior behaviorPeriodicWithCount:1]]];
Comparing iOS dev with Machine Learning
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…
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
🤘🏻🔻
#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
```