i think for obj-c specifically (can’t speak to other langs) i’ve had a great experience. it does make little mistakes but ai oriented approach makes it faster/easier to find areas of interest to analyze or experiment with.
obj-c sendmsg use makes it more similar to understanding minified JS than decompiling static c because it literally calls many methods by string name.
Claude is pretty good at turning (dis)assembly into Objective-C. i went exploring these systems looking for the secrets of glass icon rendering. i used ipsw to unpack all the class metadata in relevant system private frameworks. for each class, i extracted class header/interface, and a assembly file per method in the header. i wrote a ruby script to shell out to claude cli with a custom system prompt to give me readable-ish obj-c. It struggled with some patterns but with code as string-dispatch method-call-heavy as obj-c there’s lots of good hints for the ai.
i learned a lot about lldb debugging when i went spelunking through system service process memory. eventually i got too distracted learning about runtime introspection in Swift and obj-c and ended up building a dynamic object explorer/debugger instead of accomplishing my original goal. obj-c runtime dynamism is fascinating. it’s like, “what if we make C as dynamic as Ruby”. you can invent new classes at runtime, swap method implementations, create a new class that extends a specific existing object. you can even change what class an object is.
Swift is a lot less dynamic and a lot less introspectable at runtime :-(
(there is a swift reflection api called Mirror but i struggled to do anything interesting with it)
Im talking the fundamental language framework. 'Everything is an object' and method calls are actually message passing are the two reasons that objc and ruby are actually smalltalks.
I’ve tried to explain this before and unless you’re steeped in late binding, encapsulation, and message passing, the details are lost on most people (it seems including modern language designers).
For the GP, in most languages the dot or arrow operator is field access. If that field is a function reference, parenthesis are used to invoke it.
From outside of the object, neither Ruby or Objective-C allow direct access to object fields or functions. The dot operator sends the object a message that be bound to anything, and even rebound at runtime for specific instances. There is no difference between access and property and calling a function - it’s all messages. Smalltalk and Objective-C (before dot operators) don’t even have different syntax for data fields and functions calls. Ruby’s no arg messages are similar.
Most of the time that distinction doesn’t matter. But writing things like wrappers and proxies becomes trivial. A object can forward any message it receives, and if it sees on it wants to intercept, it can do that easily. Most of the time modifying existing programs and frameworks can be as easy as rebinding some logic to something that wasn’t part of the original program.
This comes at the cost of some runtime performance, and possibly some complexity. The elegance outweighs those, imho.
>The dot operator sends the object a message that be bound to anything
Modern obj-c "dot notation" + properties + synthesized ivars add a lot of syntactic sugar that make things more confusing, if you go back to original obj-c where it was just ivars and explicit getters/setters, things are a lot easier to understand.
most apps i use are not AI clone-able yet with AI’s current faculties. i’m not going to switch to an ai vibe code of Google Photos, Tailscale/Mulvadd VPN, or YouTube. For those three apps, i pay for cloud infrastructure. sure, you can say with enough AI i could vibe code a Tailscale backend system, but it sounds like it would take more tokens than my $20/mo ChatGPT plan PLUS a mountain of cloud provider bills and such to host my backend.
i do pay for some premium apps that run entirely on device, like Halide Camera. But there again, is my $20/mo tokens enough to clone a high quality image processing app, to such a degree i will trust it to capture precious memories effectively? ehh.
well the library ecosystem, developer tooling, and gradual typing support for lua is far ahead of what’s available for vimscript. in my experience lua is #2 behind javascript/typescript’s #1 when it comes to scripting language LSP stuff. both python and ruby suffer from a profusion of alternative type checkers and whatnot that cause pain and fragmentation when it comes to tooling.
it’s pretty great to have my vimconfig give red squiggle in editor if i’m doing it wrong before i save & reload.
but i’ve not followed vim9 script as its evolved perhaps there’s a good type checker for it at this point?
even before neovim, there were vim extensions written in lua so it feels gravity of lua code has been considerable for a long time.
to me vim9script feels like perl5/raku split - evolution too late to grow new users, a remnant for a niche that will fade to oblivion slowly over the next 10 years.
With vim9, just like C and perl, the focus is to write small programs. And you don't need a typechecker if your program is only a few hundreds lines. And locality of behavior is at most one screen tall. For scripting languages, I'd rather a good documentation system (vim, emacs,..) than having a full lsp client in the background.
well the lua setup has enough type checker going on that’s it’s really useful, besides language familiarity i honestly don’t miss much; there’s great docs and autocomplete for the lua stuff built in to the lazynvim distro.
i’ve written probably north of a million lines of production js, maybe around 100,000 lines of production ruby, and about 300 lines of production lua. lua is a fun language and i think a much better fit than JS for technical reasons (who has a js engine that is both fast and embeds well? nobody), but i am certainly more productive in those other languages where i have more experience.
lua array index starting at 1 gets me at least once whenever i sit down to write a library for my nvim or wezterm.
I can put things in a box that uses spooky electromagnetic waves to tickle water molecules to the point that they get hot and maybe boil off, given the chance? Sounds like magic to me
if you have eslint you might as well just write custom rules and get actual syntax aware linting rather than relying on more brittle regex rules. claude et al are very good at getting a lint rule started, with a bit of setup you can make testing lint rules easy. we have a zillion custom rules at notion, most are pretty targeted “forbid deprecated method X besides circumstance Y” kind of things
obj-c sendmsg use makes it more similar to understanding minified JS than decompiling static c because it literally calls many methods by string name.
reply