• P (unregistered)

    which one is faster, Bogosort or Fristsort?

  • (nodebb)

    WOW!

    I would never have thought that I would see a bogosort in the wild

    Well played sir!

    Yazeran.

    Plan: To go to Mars one day with a hammer.

  • Easy Reader Spoiler (unregistered)

    Bogosort this, motherf****r

  • Sole Purpose of VIsit (unregistered)

    I particularly like the link in the "documentation" that points to Stack Overflow ... specifically, a discussion on how to implement Fisher-Yates in Objective-C. This ain't no ordinary bogosort -- this is an argumentum ad auctaritatem bogosort!

  • Foo AKA Fooo (unregistered) in reply to Yazeran1

    Wow indeed!

    So what's next, stack sort (https://gkoberger.github.io/stacksort/)?

  • Argle (unregistered)

    To my mind, the true WTF is obj-C. Take C. Add all the features of C++ just renamed (null->nil, this->self, etc.). The one project I did with obj-C at least accommodated the previously written C++. It's ok, everyone. I've had extensive therapy since.

  • LMGTFY (unregistered)

    Apparently a "bogo" sort, is a "BOGus sOrt".

  • Simon Clarkstone (unregistered) in reply to Argle

    To my mind, the true WTF is obj-C. Take C. Add all the features of C++ just renamed (null->nil, this->self, etc.).

    From what I can tell, Objective C was invented in 1984 and C++ in 1985. Also Objective C copied all that from Smalltalk (1972). (I am assuming that the syntaxes quoted above are unchanged from the beginning of the language's life, since they are so fundamental.)

  • Argle (unregistered) in reply to Simon Clarkstone

    Invented versus released into the wild are different, of course. But which was invented first seems to be a bit fuzzy. Stroustrup was fiddling with the precursor to C++ in 1979. Obj-C was "early 80's" according to what I read. I only did one project using obj-C and that project began in C++ for Windows, then ported to Mac. I found the languages enough alike and enough different that it simply drove me nuts. I'll have to get paid a whole lot better to try that stunt again.

  • Reginald P. Smithington (unregistered)

    My favorite is actually the if(YES).

  • Reginald P. Smithington (unregistered) in reply to Reginald P. Smithington

    Oh it's a while. Either way.

  • (nodebb)

    So what was the assumption stated in _reloadTableDataAnimatedAdvanced?

  • Eric Gregory (github)

    Looks like the "NeXTSTEP" would be to rewrite this function.

    (I'll show myself out.)

  • Bobcat (unregistered) in reply to Yazeran1

    I'm guessing the implementation of the plan involves hitting random objects with the hammer until one fonds one's self on Mars?

    (Not a true random chance, as eventually someone will load you onto a hammer-resistant rocket bound for Mars, just to get rid of you.)

  • Bobcat (unregistered)

    I am genuinely and sincerely baffled as to what derangement would cause someone to code such a thing in the first place. Were they trying to pad out their line count with something that looks like it does Important Stuff?

  • (nodebb) in reply to Argle

    To my mind, the true WTF is obj-C. Take C. Add all the features of C++ just renamed

    They work very differently under the covers. C++ is faster, Obj-C is much more flexible; this is because C++ tries to avoid even the simplest forms of dynamic dispatch (which is why we ended up with template specialization) whereas Obj-C is totally built around dynamic dispatch even if you don't normally see it.

  • (nodebb) in reply to Bobcat

    Well it could be that, or just that I by education is a geologist (long time ago) and we tend to go and bang on rocks with hammers' ;-)

  • Fernando (unregistered)

    "Obj-C is a bit odd to read"

    Especially so when I have to move the horizontal scroll bar back and forth to read each line.

    It's 2019. My monitor is wider than 1024. Please stop pillarboxing these articles.

  • I Saw a Robot (unregistered)

    Of course, Apple realized that forcing people to use an esoteric language to program on their platform limited recruitment of talent, so they finally abandoned Objective C for Swift.

  • (nodebb)

    The main WTF hides a smaller one: using the diff algorithm for just checking equality. Why do something in O(n) time and O(1) space when you can go O(n^2) time and O(n) or O(n^2) space?

    Too good (bad) to believe? An Intelligently Created WTF?

  • (nodebb)

    Even the suggested solution is overworked; surely one just needs to have the old and new lists sorted and do a merge, deleting and adding as you go?

  • Neveralull (unregistered)

    I had to look up bogo sort. First thing I thought was WTF? Second thought: even evolution works faster using natural selection.

  • Gnasher729 (unregistered)

    That complete derp who is responsible for the code used sets. Sets cannot contain duplicates. So if two of the old and new strings are the same, you lose one string and if that string wasn’t the first or last string of one of the arrays, you’d loop forever. (There was actually no reason at all to use NSSet).

  • Gnasher729 (unregistered)

    Watson: No, the old and new list are not sorted. The result, if there are no duplicate strings, is an array either containing the original strings in their original order, followed by the new strings in their original order, or the new strings followed by the old strings, also both in original order.

Leave a comment on “The Bogus Animation”

Log In or post as a guest

Replying to comment #:

« Return to Article