Jeffing Weirds Counts
-
Speaking of complex, imaginary or indescribable numbers (see Listicle)
From:All Categories - latest
From: Opening Post
And it just keeps giving, From: Side Bar WTF
For the hard of looking (and because I forgot to highlight the images before uploading). Look at the number of Post Discourse imagines I haven't read and compare it to the actual number of "replies". Now, I could accept that some sort of complex calculation is involved which took into account moved / deleted replies; but the count in the third image would seem to contradict that. Making the process, essentially, indescribable
-
Making the process, essentially, indescribable
It's describable. It's a discocalculation!
[spoiler]It's probably confused by hidden and deleted posts.[/spoiler]
-
-
-
Making the process, essentially, indescribable
In the same sense that INTERCAL is unspeakable?
-
-
@boomzilla The Post sequence is seriously buggered.
-
Yes. I unselected one of Blakey's posts and I think it unselected some other stuff. Or I missed some stuff first time around. Say Lah Vee.
-
"Lah Vee"
-
Thanks for trying at least.
The real problem is the morons shitting this stuff all over in the first place.
-
Fixed the linkage of the quote for you.
-
Thanks, didn't know it was broken
-
Well ... apart from the Discourse UI bug that the arrow points upward, even though the quoted post is below
-
Ahhh, that could be that some of the posts are in the wrong sequence.
Post:
https://what.thedailywtf.com/t/jeffing-weirds-counts/50482/4?u=looseIs / was in response to this:
https://what.thedailywtf.com/t/jeffing-weirds-counts/50482/8?u=loose
-
Hmm, Jeffing also apparently weirds the order of messages. There's stuff in here now that puts replies to messages above the thing they were replying to. That's applying the principles of Discourse to time travel, and I Don't Like It.
-
Hmm, Jeffing also apparently weirds the order of messages.
It definitely does when you miss a post or three and come back and re-Jeff. :nonchalantly_whistles:
-
Want me to fix it by jeffing some more?
-
-
Nice error ...
Edit: fixed the images
-
Is fixed, took three tries too..
They apparently dislike direct links...
-
But JeffSort is a very interesting sorting algorithm:
1 select posts 2 remove selected posts from the topic they're in and append them to the same topic 3 GOTO 1
-
But JeffSort is a very interesting sorting algorithm:
1 select posts 2 remove selected posts from the topic they're in and append them to the same topic 3 GOTO 1 ````</blockquote> That's not a classic algorithm, for it doesn't terminate within a finite time, so it must be a Discoalgorithm that terminates within a finite Discotime. And by what criteria are those posts selected in step 1? I suppose by maximum Doing It Wrong<small><sup>TM</sup></small>?
-
I just couldn't be bothered to write a proper description.
I might think of how it should work properly at home.
-
-
Well, it should give a result eventually ...
-
-
So I wrote a half-assed first attempt (in C#) at a reference implementation.
Highlights:
- unstable sort
- worst-case number of jeffings: n (when the list is reversely ordered)
- Performance is utter shit at n=10000
void Main() { var ranyakumo = new Random(); var oList = new List<int>(Enumerable.Range(1, 1000).OrderBy (x => ranyakumo.NextDouble())); // shit scramble => but hey, it works! // var oList = new List<int>(Enumerable.Range(1, 1000).Reverse()); Console.WriteLine(String.Join(",", oList.Select (x => x.ToString()))); JeffSort(oList); Console.WriteLine(String.Join(",", oList.Select (x => x.ToString()))); } // Define other methods and classes here public void JeffSort<T> (List<T> ListyList){ while(true){ // each iteration is called a "Jeffing" var done = true; var temp = new List<T>(); for(int i = ListyList.Count() - 2; i >= 0; --i){ var curComp = Comparer<T>.Default.Compare(ListyList[i], ListyList[i+1]); if(curComp > 0 || !done && curComp == 0){ // the OR-part is for instability without endangering termination done = false; temp.Insert(0,ListyList[i]); ListyList.RemoveAt(i); } } ListyList.AddRange(temp); if(done) break; } }
EDIT: Fixed a bug in the instabilitizer.
-
Did you just write a sorting algorithm that takes O(n2) memory?
-
I don't think it's quite that bad.
temp
gets thrown away after each loop iteration (modulo when GC runs) so you're only going to get up to (around) double the size of the list used for space. BFD; that's pretty common for sorting algorithms. The shortening ofListyList
won't use extra space.