Readit News logoReadit News

Deleted Comment

Deleted Comment

jeltz commented on When would you ever want bubblesort? (2023)   buttondown.com/hillelwayn... · Posted by u/atan2
archargelod · 6 days ago
Terminating condition in Bubble sort is "did we swap any values during this loop"? Yes -> continue, No -> list is already sorted, exit the loop.

I don't believe that insertion/selection sort is easier to grasp. Can you type it from memory, without looking it up? Here's bubble sort:

    var swapped = true
    while swapped:
      swapped = false
      for i in 0 .. list.len-2:
        if list[i] > list[i+1]:
          swap(list[i], list[i+1])
          swapped = true

jeltz · 6 days ago
Let's see.

  for i in 1 .. list.len - 1:
    j = i - 1
    while j >= 0 and list[j] > list[j + 1]:
      swap(list[j], list[j + 1])
      j = j - 1

jeltz commented on When would you ever want bubblesort? (2023)   buttondown.com/hillelwayn... · Posted by u/atan2
zeta0134 · 6 days ago
I used bubblesort on purpose in a game project. Specifically, to sort sprites in an NES game back to front, lazily, spending as few CPU cycles as possible. Bubblesort on the very small list (a dozen objects max), and early exit after the first swap. It eventually completes, and that was just fine. It's tiny, incredibly simple, and somewhat resilient to the list changing from frame to frame as objects spawn and despawn. Each partial sort makes some progress no matter what.

A few other algorithms would have fit the bill just as well, but bubblesort is perfectly adequate, so that's what will likely ship. More complex algorithms end up losing out due to greater initial overhead or larger ROM size.

jeltz · 6 days ago
Why use it over insertion sort which is faster and easier to implement?
jeltz commented on Dollar-stores overcharge customers while promising low prices   theguardian.com/us-news/2... · Posted by u/bookofjoe
teeray · 9 days ago
Corporate fines should all be percentages of profits.
jeltz · 9 days ago
Percentage of global tärevwbue works. We know that from GDPR. But I would personally prefer prison sentences for the execs.
jeltz commented on Dollar-stores overcharge customers while promising low prices   theguardian.com/us-news/2... · Posted by u/bookofjoe
cs702 · 9 days ago
> Red Baron frozen pizzas, listed on the shelf at $5, rang up at $7.65. Bounty paper towels, shelf price $10.99, rang up at $15.50. Kellogg’s Frosted Flakes, Stouffer’s frozen meatloaf, Sprite and Pepsi, ibuprofen, Klondike Minis – shoppers were overpaying for all of them. Pedigree puppy food, listed at $12.25, rang up at $14.75.

Surely, now that this made the news, there will be an investigation into the fraudulent behavior of Dollar General and Family Dollar.

Left unsaid is that both Dollar General and Family Dollar would become unprofitable if they stop tricking customers. (Both companies typically earn only 3-4% on sales.)

jeltz · 9 days ago
It was investigated, the issue is that the fines are smaller than the profit. I would personally want to see things like this considered fraud and that it can result in prison sentences for executives and other people invovled in the decision making.
jeltz commented on Autism's confusing cousins   psychiatrymargins.com/p/a... · Posted by u/Anon84
kelseyfrog · 10 days ago
Literally false.
jeltz · 10 days ago
It is fine if you disagree with Marriam Webster, but maybe chill a bit with your attitude.
jeltz commented on Autism's confusing cousins   psychiatrymargins.com/p/a... · Posted by u/Anon84
vjvjvjvjghv · 10 days ago
I think so. If I had had somebody in my youth who taught me how to interact with people I am pretty sure I would have done much better. The worst for me was to notice that I don’t fit in and had nobody to help. It was extremely lonely and depressing. But I am also a pretty mild case and performed well in school and work. I am not sure how it would have worked with severe autism cases, for example non verbal people. That’s a different ballgame.
jeltz · 10 days ago
A common issue is that autistic children tend to have autistic parents and many autistic parents are sadly bad att helping their kids understanding social interactions.
jeltz commented on Autism's confusing cousins   psychiatrymargins.com/p/a... · Posted by u/Anon84
kelseyfrog · 10 days ago
> Normative is just the adjective form of "related to norm"

You might want to recheck the definition of normative. Yours is a non-standard usage and you will be misunderstood if you continue to use it that way.

Norm is is, Normative is ought.

> Normative: pertaining to giving directives or rules

> Synonyms: prescriptive

jeltz · 10 days ago
No. Both definitions are correct. Don't tell people to recheck without first doing so yourself.

https://www.merriam-webster.com/dictionary/normative

jeltz commented on Autism's confusing cousins   psychiatrymargins.com/p/a... · Posted by u/Anon84
treis · 10 days ago
I don't think there's much underlying relationship. True they will both impact social relationships. But it's more like how being blind or being deaf will impact social relationships. The mechanics might be the same but the cause is very different.

IMHO schizophrenia is a breakdown in the barrier between imagination and processing of reality.

Autism and the like is an inability to process social cues like a blind person might have a damaged visual cortex.

jeltz · 10 days ago
Autism is not the inability to process social cues. It seems more likely to be the difficulty to either filter or generalize sensory input.

u/jeltz

KarmaCake day7369June 30, 2010View Original