Threads for austinz

  1. 3

    How does Objective C figure in? I’d already heard that lauded as OO C done “right”.

    1. 8

      Objective-C is pretty great.

      It makes relatively few syntactical additions to C: square brackets to denote method invocations, plus a bunch of keywords and some literal syntax all prefixed by @. It’s quite dynamic; the runtime API is quite powerful. It’s also a superset of C in a way C++ isn’t; any valid C source is valid Objective-C source as well, and any C API is trivially accessible from an Objective-C program.

      However, it’s got some issues that have probably stood in the way of wider adoption. At this point it’s quite firmly tied in many developers’ minds to Apple’s Cocoa ecosystem and macOS/iOS application development, even though OpenStep/GNUstep exist. Its dynamism is both a blessing and a curse: for example, method swizzling (changing out the implementation of a method at runtime) can easily be misused, and the same message-sending mechanism used to invoke methods (which enables much of this dynamism) is somewhat slower than vtable-based dynamic dispatch (although not by all that much). Its abstractions aren’t zero-cost: there’s no easy way to opt your classes out of support for reflection or reference counting. Finally, although the popular Objective-C mantra is “use classes when performance doesn’t matter, C when it does”, converting code dependent upon Objective-C objects/classes/protocols to use C static dispatch instead is non-trivial.

      Anyways, I wish more people would give it a try for things other than Apple platform app development (since it really does have quite a bit to offer, especially in its most modern incarnation), but at this point that seems unlikely.

      1. 3

        Yes and even on OSX it’s becoming less relevant for a lot of new developers and existing use cases as a result of Swift (which I’m rather fond of truth be told).

        1. 1

          I recall being very excited about Objective C when I first heard about it, after Apple had eaten NeXT but before OSX had actually been released. I was particularly excited when I heard that early versions were literally a preprocessor/macro language on top of C (and that unlike C++, which started out the same way, modern ObjC still could be used that way).

          Unfortunately, actually reading the OpenStep specs for the ObjC standard library, it looked pretty dissapointing – particularly with regard to strings, which seemed to be thin wrappers over normal null-terminated C strings. (It was more than ten years ago that I last even glanced at Objective C, and I was looking at NeXTSTeP-era specs, so you’ll have to forgive me if I mischaracterize the current state of the art.)

          I recall reading something about Objective C’s message passing working transparently over a LAN to machines with different architecture, and some kind of multiarch binary format being experimented with, back at NeXT or maybe even before NeXT took over primary development on ObjC. However, I haven’t been able to confirm it! Maybe somebody here remembers the feature & can tell me why nobody uses it / it’s forgotten / gone (or that I’m confusing it with some feature of Smalltalk or something).

          1. 2

            I think you’re thinking of Distributed Objects. I can’t find Apple’s documentation on it anymore, but Mike Ash wrote a pretty comprehensive blog post about it which might be of interest.

            1. 1

              Yeah, I’m pretty sure this is what I was thinking of. Thanks!

              If I was trying to solve the problem mentioned in the post, I would probably have a remote-host-to-local pointer map with holes, and page stuff in and out of the network. It’d be slow in extreme cases, but it wouldn’t require the app developer to care. (Of course, every host would need information about which other hosts had copies, so they could be marked stale on write. And you’d have to override pointer ops with a heavier-weight piece of managed-pointer code. Too slow for 1993, but probably fine on a modern mac.)

            2. 1

              I recall reading something about Objective C’s message passing working transparently over a LAN to machines with different architecture, and some kind of multiarch binary format being experimented with, back at NeXT or maybe even before NeXT took over primary development on ObjC. However, I haven’t been able to confirm it!

              This brings to mind the meme of ‘software agents running at arbitrary locations on the network” that was popular in the 90’s that also begat java rmi and related c++ stuff from sun. None of that ever played out in practice (see: java applets). But some think there could be a resurgence with webassembly.

              1. 1

                It’s surprising to me that it never played out, and it’s surprising to me that applets and similar client-server stuff was considered part of it.

                I would expect that distributed computation via message-passing in a heterogenous network would be seen as obviously desirable, even by suits. But, I obviously have a really poor mental model of suits!

        1. 3

          Thank you so much for everything you’ve done, jcs. It means a lot to me and to many other people that there’s a tech news aggregator we can visit, with a community we’re comfortable enough to participate in and learn from.

          1. 7

            I appreciate the effort that was put into the article, but this web site has always rubbed me the wrong way. I’m not sure why: maybe it’s the stick-figure cartoons. Maybe it’s the vague sense of condescension I get from the various asides. Maybe it’s the juxtaposition of the well-researched background material with the uncritical, creepily subservient acceptance of everything Elon Musk says and (supposedly) believes.

            1. 1

              swift-evolution is this really strange mixture of the core team making assumptions about long-term design decisions and plans that won’t be publicly reviewed for months or years, and the core team being strangely indifferent about a lot of things people have really strong opinions about.

              1. 2

                I wish supported domain based filtering, so I could hide anything written by this clown or by Uncle Bob.

                1. 1

                  Thank you for this resource! Lists of curated/“canonical” resources are often a good thing, especially for novices to a field or subfield who don’t have the technical discernment yet to know what is garbage and what is good.

                  1. 16

                    I think what most impresses me about this meta-blog, besides it being funny, is that whoever is writing it has kept it up for five months so far (23 weekly “issues”), and is not skimping on actually reading the comments (at least for a few I spot-checked, the pithy summaries really do summarize the comments). I could see myself finding it funny to start a blog like this, but I doubt I’d have the dedication to hate-read / hate-summarize HN as an ongoing, months-long project. Maybe the author can’t help reading HN regularly, and writing this is their therapy.

                    1. 5

                      I don’t think hate is a requirement here. There’s lots of worthwhile stuff to read on HN, but at the same time it can be quite a bizarre and hilarious spectacle to behold. These summaries are just a humorously cynical take on it.

                      1. 2

                        There are quite a number of good articles, but most of the discussion is better skipped (except for those who want to amuse or horrify themselves).

                    1. 2

                      These are really mean-spirited (if funny), but given that Hacker News is Hacker News I can’t bring myself to feel bad.

                      1. 1

                        I wonder how Rust traits and Swift protocols stack up to Haskell typeclasses. Swift protocols support a Self same-type constraint (point 1), and types can retroactively pick up conformance to protocols through extensions (point 2). I haven’t fully grokked point 3 yet, but it seems like Swift would need some level of higher-kinded types support (e.g. Self<A>) to properly emulate the CanFail example.

                        1. 6

                          It’s funny how the amount of bullshit in a programming blog seems to scale in proportion to the number of social media sharing buttons on each page.

                          First, you’re too shy to share your code because it’s crap.

                          Putting your code on a GitHub repo doesn’t mean it’s not crap, though. There’s a lot of open source code of marginal quality out there. Conversely, to play devil’s advocate, if you know you’re crap, at least you have a chance of wanting to improve.

                          The second possible cause is that you work from nine till five, for food, without passion.

                          Ceteris paribus, I would rather hire a completely passionless programmer who meets her deadlines and consistently produces quality code, than a programmer full of passion whose business outcomes are strictly inferior. When programmers talk about passion, they usually mean passion. When people hiring talk about passion, they almost always mean “susceptibility to exploitation”.

                          It is a common practice to pay higher rates to those who live in more expensive countries. When I’m getting resumes from San Francisco programmers, their rates are $70+ per hour… [complaining about expensive devs]

                          Guess what? Software engineers know this too, that’s why many of the best ones either emigrate to countries that pay more to developers or work at big multinationals that compensate better.

                          First, if you’re not asking anything [on SO], you are not growing.

                          Because clearly I don’t have coworkers to talk to, or official documentation to consult, or the wherewithal to solve my own problems by doing my own research (especially given the fact that the chances that my question is truly unique are vanishingly small). Where does this guy think the answers on Stack Overflow come from in the first place? Creation ex nihilo?

                          Second, if you’re not answering, you simply have nothing to say.

                          The negative incentives regarding answering substantiative SO questions (rather than farming upvotes) have been addressed by other commentators.

                          My point is that the “years of experience” argument should be used very carefully.

                          I guess even a broken clock is right twice a day. Thumbs up.

                          It is a real exam taken in a certification center…

                          Spare me the nonsense and just ask me for my SAT/GRE scores already, will you?

                          BTW, some software developers even file patents in their names—why can’t you do this?

                          This is clearly what the industry needs. More software patents!

                          My experience tells me that the bigger the company and the higher the position in it—the further away you stay from the source code and from real technical decisions

                          BSc, MSc, PhD… do we care? Not really.

                          Spending 4 years qualifying for and getting a degree was far more of ‘taking a risk’/‘putting skin in the game’ than paying a few hundred dollars for some garbage certification that high schoolers compete for and pass for fun.

                          1. 1

                            My personal opinion is that proficiency in performing simple algebraic manipulations demonstrates some minimal level of the sort of abstract thinking ability necessary to build complex software. I don’t know if there is any data backing this idea up, though, or how we might go about testing it.

                            1. 1

                              Games are so different from every other field of software out there that I’d be loathe to draw overarching comparisons. AFAIK, nobody is asking game developers to drop everything in the name of typesafe, ‘correct’ code (although there might be an argument to make when it comes to netcode, especially when real money is at stake and/or cheating would ruin the enjoyment of others).

                              1. 3

                                I’ve spent the last 5 years in game development after 13 years in finance, and really, there’s very little that’s different between a game and a trading system. You have small pockets of intense, focused math; problems with modeling, caching, naming, and meaning; a giant never-finished bag of support tools and processes; and fewer resources and less time than you would ideally hope for. You have situations in which the non-technical are dictating the technical timeline. And you’re always hoping that something will be the magic bullet that buys you that breathing room for polish, so you’re always keeping your head up.

                                1. 2

                                  I suspect that your company was a lot more concerned about the integrity of its customers' data, the correctness of the transactions you carried out, and about uptime, than seems to be the norm with respect to the equivalent metrics in the video game industry.

                                  1. 2

                                    Well you might suspect so, but everywhere I go I see dedicated, engaged, hard working game professionals, working on deep problems of scale, bandwidth, latency and state management. The failures you see in the industry are largely due to external third party publishers making calculated cost benefit decisions.

                              1. 1

                                I’m 99% sure Armstrong wasn’t thinking about #includes when he made his statement about the banana in the jungle. What a dumpster fire of an article.

                                1. 37

                                  I like functional languages as the next dev, but I don’t think this article gives fair criticisms.

                                  (Also, for fuck’s sake, it’s the “Diamond Inheritance Problem”, not the “Triangle Inheritance Problem”, that fucking hack.)

                                  The contrived example of the array class claims that the author must know how the base class is implemented, but frankly the methods on the derived class shouldn’t have been explicitly calling the super’s methods anyways–at least not in the case of the addAl, which could’ve worked by simply calling add instead of super.add. The whole claim of “but but but you have to know about the super class” is only broken because, well, they decided to explicitly link to the super class. It should be obvious that implementing addAll in the derived class in ignorance of the add method in that same class is sloppy design.

                                  The entire tags section meant to debunk inheritance is another weird strawman. There is always a good argument to be made for composition over inheritance, but such arguments should be made by appealing to actual code samples instead of messy desks.

                                  The entire critique of encapsulation is basically nonsensical to me–again, actual code would’ve clarified things. The weird rambling about references and resources doesn’t really parse for me: if the argument was meant to be that referential transparency is more performant or safer in concurrent environment then let’s have that discussion, but generic FUD about pointers and references is just not really that great.

                                  The entire polymorphism “argument” is a picture of the three stooges, and then a rambling anecdote (again, without code) about how this somehow meant that polymorphism is over.

                                  Just, ugh. And then the author (probably to shill his Elm Facebook group, so he can get a book deal or resume boost) says that -=~ functional programming ~=- is somehow the answer, again without explaining exactly how this is the case–or even giving broad strokes!

                                  In the words of Billy Madison…

                                  Mr. Scalfani, what you’ve just scribbled is one of the most insanely idiotic things I’ve ever read. At no point in your rambling, incoherent blog post was there anything that could even be considered a rational thought. Everyone in this forum is now a worse developer for having experienced it. I award you no points, and may Kay have mercy on your soul!

                                  1. 6

                                    The vacuousness of this article is another data point supporting my belief that “software architect” is a largely meaningless title.

                                  1. 1

                                    Burned out on Swift open-source stuff. Going back to personal projects. I’ve been kicking around ideas for a lightweight modern web forum built using Clojure for the past month or so; will probably start on that this week. I’ve also been doing research into stack machines and would like to build a simple stack machine interpreter for my Clojure-on-Swift project. (I was a little disappointed to learn that the stack isn’t used for managing local variables :).

                                    Non-technical: learning to draw (thanks to eevee’s wonderful article on the topic for encouragement), being outside on my bike as often as I can during the summer, playing through the RTS game Homeworld: Deserts of Kharak very slowly (one mission per week).

                                    1. 52
                                      • Me: Oh boy, a small browser!
                                      • “Small Browser”: ‘Ōryōki is built with Electron on top of Chromium.’
                                      • Me: Nope. close tab
                                      1. 16
                                        -Ōryōki [応量器] is a small, thin container for the web.
                                        +Ōryōki [応量器] is an experimental web browser with a thin interface.

                                        – 10 hours ago, via GitHub ?

                                        1. 4

                                          The funniest/saddest part is that they bring this huge, advanced cross-platform component and the download is OSX only!

                                          I’ll spend the rest of my days with the Handmade Network guys (, they are onto something…

                                          1. 2

                                            Imagine what a large browser built atop this illustrious stack would look like!

                                            1. 9

                                              Vivaldi, basically.

                                          1. 2

                                            Technical: a bunch of open-source hobby projects, contributing to Swift. I have a bunch of ideas for electrical engineering and 3D printing related projects I want to make progress on, but have been too busy lately…

                                            Non-technical: drawing, learning Chinese, playing the piano, riding my bike, trying to cook (badly), science fiction worldbuilding, trying to keep my cheapo bonsai and succulents alive, faffing around on the Internet, video games…

                                            I would like to start weightlifting again, and to take a few classes at The Crucible ( Maybe we can organize a group, if anyone else in the Bay Area is ever interested.

                                            1. 18

                                              Civ. I can stop any time I want. scratches unexplained sores

                                              1. 3

                                                I am both eagerly anticipating and utterly terrified of the day when Civ 6 comes out.

                                              1. 5

                                                This is a great series of writeups, especially since there’s so little first-party information on APFS right now.

                                                The intentional de-emphasis of data integrity features is immensely disappointing. “Buy expensive parts and hope they don’t error often enough for our users to notice” is not an acceptable strategy.

                                                1. 2

                                                  Isn’t it all about percentages? If they are sure the failure rate for the other components besides the file system is low enough it makes sense to skip integrity checks here.

                                                  I find it more interesting that they are so sure in the first place. How did they come to that conclusion? Can eg iOS devices detect and report bit rot?

                                                  1. 2

                                                    Can eg iOS devices detect and report bit rot?

                                                    I think flash is good at that.

                                                1. 2

                                                  Swift 3 is pretty light on new language features, and focuses mostly on interop, the new API naming conventions, and the ecosystem of supporting open-source libraries (Foundation, libdispatch, and the package manager).

                                                  For anyone who’s interested, a rough roadmap of post-3.0 improvements to the type system can be found here.