M

Mulle kybernetik

mulle-kybernetik.com · Company blog · on HN since 2010

Mulle kybernetik is a developer's site covering a cross-platform Objective-C runtime (mulle-objc), C quirks, shell scripting and old NeXT/Apple tooling.

What HN saysHN commenters link it for details on mulle-objc's design, such as its method call convention, while others dispute its dispatch speed against C++ virtual calls.
16HN people shared it
8linked it in comments
18stories submitted
342story points
1 year agolast shared
2010people per year2026

Most-shared posts

  1. 1
    The C standard library function atexit is broken
    2 people · 100 points · first shared 2019 · 99 comments on HN
  2. 2
    Intro – Modern Bash (Zsh) Scripting
    2 people · 10 points · first shared 2022 · discussion on HN
  3. 3
  4. 4
    Mulle objc a new objective c
    2 people · first shared 2016
  5. 5
    My C code works with -O3 but not with -O0
    1 people · 177 points · first shared 2020 · 159 comments on HN
  6. 6
  7. 7
    The beauty of generic header-names
    1 people · 11 points · first shared 2019 · 3 comments on HN
  8. 8
  9. 9
    Dienstag iOS App Development Postmortem
    1 people · 4 points · first shared 2014 · discussion on HN
  10. 10
    Optimizing Objective-C (2000-2004)
    1 people · 2 points · first shared 2014 · discussion on HN
  11. 11
  12. 12
  13. 13
    TWIG-like Templates in Objective-C
    1 people · 2 points · first shared 2013 · discussion on HN
  14. 14
    Mulle-bootstrap 2.0 release
    1 people · 2 points · first shared 2016 · discussion on HN
  15. 15
    Various C Compilers disappointing optimization results
    1 people · 2 points · first shared 2016 · discussion on HN

What HN people wrote when they linked it

ootachi · 2010-11-25
According to the link you posted, that's over four times slower than C++ virtual method dispatch (and note that most method calls in ordinary C++ code are not virtual). Also, IMP caching is hardly easy and is quite fiddly: see for example the benchmark code in that link as well as [1]. I highly recommend reading the tour of objc_msgSend [2]. It's very eye opening: for example, there's a cache scanning loop even in the fast case. [1]: http://www.mulle-kybernetik.com/artikel/Optimization/opti-3-imp-deluxe… [2]: http://www.friday.com/bbum/2009/12/18/objc_msgsend-part-1-the-road-map…
mulle_nat · 2023-10-20
Coincidentally, I wrote a post this week on how to make a "Amazon Music Player "app" for Linux using a custom Firefox profile: https://www.mulle-kybernetik.com/weblog/2023/amzn_music_player.html. Wrapping more websites into their own profiles is sorta tempting :)
favorited · 2017-12-09
I remembered after writing this that there's an implementation[0] that boxes up method arguments, giving everything a signature of `void objc_msgSend(void self, SEL _cmd, void *_param)`. [0]https://www.mulle-kybernetik.com/weblog/2015/mulle_objc_meta_call_conv…
timnic · 2016-11-26
spullara · 2012-07-07
"It's compiled, not interpreted." The Objective-C calls are not really compiled. They are dynamically dispatched at runtime in a very equivalent manner to an interpreter or via reflection in Java. You can read about it here: http://www.mulle-kybernetik.com/artikel/Optimization/opti-3.html Quite far from the compiled C calls also covered in the linked article.
krackers · 2024-08-23
Dyld (dynamic linker) does this I think, it's effectively similar to other relocations. Each dynamic library brings its own set of selectors (I just think of them as strings in the data section of the binary, referenced indirectly via a pointer in the objc_selrefs section of the binary which can be updated as needed) and at runtime they're uniqueified. See https://www.sealiesoftware.com/blog/archive/2009/09/01/objc_explain_Se… and https://www.mulle-kybernetik.com/weblog/2015/mulle_objc_selectors_are_… I actually can't find much authoritative discussion about this on the internet, just those two posts. But since the objc-runtime is open source, you can probably find it there. I think it might be this method? https://github.com/opensource-apple/objc4/blob/cd5e62a5597ea7a31dccef0… -- But I'm not sure what GP meant by "at compilation". I suppose the compiler could be smart by reading the selectors of any shared libraries you link against and avoid duplicates in _your_ binary, but that wouldn't work for two shared libraries that know nothing about each other nor anything mapped in via dlopen.
jmpt · 2018-04-23
No, and if you do, then I suggest you visit a doctor. Rant: Objective-C is a wonderful language, once you learn it properly. There's a lot of Swift fanboiism (is that a word?) and a lot of Objective-C hate. I have an opinion on why. The vast majority of people that used Objective-C were drawn to the success of iOS. They were developers, used to languages like Javascript, Java or C++. Coming to Objective-C, their immediate reaction was "WUTT??? Brackets!" Instead of properly learning the idioms, they fought the language on a daily basis and cursed Apple for forcing them to use a language unlike the one they were used to, in order to jump on the iOS bandwagon. These people, once Swift was released, jumped boat immediately because they never really understood Objective-C and Swift is familiar. Another group of people: the seasoned Objective-C developers, with a clue, went: "hmmm... this doesn't solve any of my real problems," but they weren't stupid and Apple was quite clear that Swift was the future. They learned Swift, got used to the bad, learned how to like the good and went along their business. Another group of people actively dislike Swift, and really enjoy Objective-C. These are considered dinosaurs and have to either hide their opinion or face hiring difficulties, or even dismissal from companies where they are currently employed. Hiring managers, usually incompetent and non-technical in nature, ask: "Do you use Swift? Do you like it?" If you want a job, you must…
pavlov · 2016-11-26
The biggest change so far seems to be a new memory management style called AAM, "Always Autorelease Mode". It's described on the compiler's Github page: https://github.com/Codeon-GmbH/mulle-clang "The transformed methods will return objects that are autoreleased. Hence the name of the mode. The net effect is, that you have a mode that is ARC-like, yet understandable and much simpler." This is like a halfway house between traditional Objective-C's "semi-manual" memory management, and the modern ARC (Automatic Reference Counting). Autorelease pools were a cornerstone of the traditional model: autoreleased objects will typically stick around until the end of the event loop cycle, which was a reasonable way to do garbage collection in mostly UI-centric Obj-C apps. ARC replaced this model with static reference tracking in the compiler: instances are freed when the compiler knows that the last reference has gone out of scope. This is obviously more memory-efficient than the autorelease pool, and that was probably a big factor in Apple's decision to go with ARC (as the primary focus of Obj-C had shifted to iOS). In summary, the Mulle compiler tries to combine the programmer ease-of-use of ARC with the simpler compiler/runtime implementation of traditional Obj-C memory management. The tradeoff is memory usage and incompatibility with some modern code that assumes an ARC compiler. Here's a list of language features that the compiler will…

Keyboard shortcuts

/Search
j kNext / previous blog
EnterOpen selected blog
vVisit the blog site
fFollow / unfollow
lSwitch grid / list view
dSwitch dark mode
g hHome
g pTop posts
g tTopics
g fFollowing
g lLiked
g yHistory
g qFAQ
EscBack / close