The Official Status Thread
-
Status: Implementing bubble sort unironically in actual production code. And yes, I did consider all other options.
-
-
@HardwareGeek nope. Genuine use case. Basically a topological sort of directed acyclic graph except you don't actually have a graph, only a list of nodes and their parents, and most of the parents aren't even in the list you're sorting.
-
@Gąska Years ago I ran into some code which used a bubble sort for that very purpose. I needed to rewrite it for better this-is-not-a-directed-acyclic-graph detection, and I used:
I assume there is a good reason that won't work for you though.
-
@PleegWat I'm only sorting N out of ~100N nodes in the graph. Every "proper" topological sort I've seen requires traversing the whole graph. That said, I'm already traversing the full graph for a different (but very related) purpose, but I don't see an easy way to make it into a single pass that wouldn't make something else require multiple passes in return. The N in question will probably be no more than 2 or 3.
-
@Gąska said in The Official Status Thread:
The N in question will probably be no more than 2 or 3.
Yeah, for something like that efficiency is pretty much irrelevant.
-
@HardwareGeek no, it's very relevant. It's just that bubble sort seems most performant in this case.
-
I'm convinced that file locks for open files (or at least, having them be opt-out instead of opt-in) were the real Million Dollar Mistake.
-
@Gąska said in The Official Status Thread:
@HardwareGeek no, it's very relevant. It's just that bubble sort seems most performant in this case.
I remember reading a blog article (
) a long time back about how people tend to ignore the "n" in O(n), but it's actually important. Asymptotic complexity looks at how something performs, as n approaches infinity, but for very small bounded n, it can be quite misleading.
-
@error said in The Official Status Thread:
I'm convinced that file locks for open files (or at least, having them be opt-out instead of opt-in) were the real Million Dollar Mistake.
Build keeps choking on locked files, but it's a different locked file every time.
-
I really need a script for "kill this file with fire, let none resist you. Crush the files, see them driven before you, hear the lamentations of their women."
Filed under: KTFWFLNRYCTFSTDBYHTLOTW for short.
-
@hungrier said in The Official Status Thread:
Status: Something I ordered from the distant, exotic foreign land of the United States, has now shipped via a service called "Pitney Bowes". Apparently this is an extremely slow shipping service, since the estimated delivery date is Jan 20.
Update:
Since the package cleared customs on the 6th, Canada Post had estimated the 15th, then the19th, now the 22nd.
-
@error said in The Official Status Thread:
I'm convinced that file locks for open files (or at least, having them be opt-out instead of opt-in) were the real Million Dollar Mistake.
If files locks were opt-in, most developers wouldn't use them (out of laziness or lack of knowledge), but would still not consider that another program may also have opened "their" file. So, instead of programs complaining about not being able to open a file in use, they'd gleefully let you open it and suffer all sort of "interesting" race conditions.
Better safe than sorry.
-
@error said in The Official Status Thread:
I really need a script for "kill this file with fire, let none resist you. Crush the files, see them driven before you, hear the lamentations of their women."
So...
Polygeekery.bat
?
-
@error said in The Official Status Thread:
@error said in The Official Status Thread:
I'm convinced that file locks for open files (or at least, having them be opt-out instead of opt-in) were the real Million Dollar Mistake.
Build keeps choking on locked files, but it's a different locked file every time.
FILE LOCKS!
-
@Zerosquare said in The Official Status Thread:
@error said in The Official Status Thread:
I'm convinced that file locks for open files (or at least, having them be opt-out instead of opt-in) were the real Million Dollar Mistake.
If files locks were opt-in, most developers wouldn't use them (out of laziness or lack of knowledge), but would still not consider that another program may also have opened "their" file. So, instead of programs complaining about not being able to open a file in use, they'd gleefully let you open it and suffer all sort of "interesting" race conditions.
Better safe than sorry.
I don't run into these issues in non-Windows operating systems.
Filed under: I run into different issues! Like
.so.1
files can't be found.
-
@error TELLIGENT!!!!
Filed under: This expletive has been brought to you by Community Server.
-
@HardwareGeek said in The Official Status Thread:
@error TELLIGENT!!!!
Filed under: This expletive has been brought to you by Community Server.
That's... exactly what I'm running.
-
-
@loopback0 said in The Official Status Thread:
@error Are you.... doing.... Community Server development?
...
Yes. Professionally.
-
@error That seems like grounds for a banning.
-
For the record, I've run a dozen builds in the past hour, with the exact same codebase, and each run has had a different number of successes and failures.
-
@Gąska said in The Official Status Thread:
It's just that bubble sort seems most performant in this case.
Curious. Did you compare with insertion sort? I ask because that is usually regarded as best-in-class of the small-N sorts (with opinion divided for the ones where N is large enough for a divide-and-conquer algorithm to be needed). It tends to do fewer swaps than bubble sort, and can use a more efficient data movement pattern.
-
-
@HardwareGeek said in The Official Status Thread:
@error That seems like grounds for a banning.
I thought this site was celebrating people like me.
-
@error said in The Official Status Thread:
@error said in The Official Status Thread:
I'm convinced that file locks for open files (or at least, having them be opt-out instead of opt-in) were the real Million Dollar Mistake.
Build keeps choking on locked files, but it's a different locked file every time.
Let me guess. You've got antivirus installed on the build machines?
-
@dkf said in The Official Status Thread:
@error said in The Official Status Thread:
@error said in The Official Status Thread:
I'm convinced that file locks for open files (or at least, having them be opt-out instead of opt-in) were the real Million Dollar Mistake.
Build keeps choking on locked files, but it's a different locked file every time.
Let me guess. You've got antivirus installed on the build machines?
Yes, and I do not have access to disable or whitelist.
-
@HardwareGeek said in The Official Status Thread:
@error That seems like grounds for a banning.
That seems more like grounds for opening a bottle.
-
@dkf said in The Official Status Thread:
@Gąska said in The Official Status Thread:
It's just that bubble sort seems most performant in this case.
Curious. Did you compare with insertion sort? I ask because that is usually regarded as best-in-class of the small-N sorts (with opinion divided for the ones where N is large enough for a divide-and-conquer algorithm to be needed). It tends to do fewer swaps than bubble sort, and can use a more efficient data movement pattern.
When I was dealing with topological sort, I was not able to cheaply compare an arbitrary pair of elements.
-
Well guys, we all know @error is into BDSM. It's not that surprising he works on CS (which is also the code name of a tear gas, appropriately enough).
Now on the other hand, if he worked on Discourse, there would be reason to worry...
-
@Zerosquare said in The Official Status Thread:
Well guys, we all know @error is into BDSM. It's not that surprising he works on CS (which is also the code name of a tear gas, appropriately enough).
Now on the other hand, if he worked on Discourse, there would be reason to worry...
For the record, I also work on SAP and Oracle now.
Please kill me.
-
@error said in The Official Status Thread:
Please kill me.
No, sorry. We don't kink shame, but this is going too far.
-
@Zerosquare said in The Official Status Thread:
Now on the other hand, if he worked on Discourse, there would be reason to worry...
That'd definitely be a banning.
-
Maybe I like JS because my other points of reference are so bad.
-
@error said in The Official Status Thread:
Please kill me.
Will burning to death do? We can probably arrange that.
If not, are you by any chance a trans hooker? @Lorne-Kates hasn't been around for quite a while, but we might be able to summon him.
-
I have officially spent more time today getting the code to build than I spent writing the code.
-
========== Build: 22 succeeded, 0 failed, 1 up-to-date, 0 skipped
Filed under: 0 code changes since I started mashing Build
-
@hungrier said in The Official Status Thread:
@hungrier said in The Official Status Thread:
Status: Something I ordered from the distant, exotic foreign land of the United States, has now shipped via a service called "Pitney Bowes". Apparently this is an extremely slow shipping service, since the estimated delivery date is Jan 20.
Update:
Since the package cleared customs on the 6th, Canada Post had estimated the 15th, then the19th, now the 22nd.
Since when did Canada want to stop global warming?
-
@error said in The Official Status Thread:
For the record, I've run a dozen builds in the past hour, with the exact same codebase, and each run has had a different number of successes and failures.
Someone obviously didn't implement xkcd's random function properly.
-
@error said in The Official Status Thread:
@HardwareGeek said in The Official Status Thread:
@error That seems like grounds for a banning.
I thought this site was celebrating people like me.
Ah, another reader of the front page!
-
Lesson of the day: never trust that your clipboard contains what you think it contains
-
You accidentally shared your kinks with someone who did not want to know?
-
@Zerosquare said in The Official Status Thread:
You accidentally shared your kinks with someone who did not want to know?
Luckily I only set my git origin branch to the wrong URL. A very wrong URL.
-
@dcon said in The Official Status Thread:
@error said in The Official Status Thread:
@HardwareGeek said in The Official Status Thread:
@error That seems like grounds for a banning.
I thought this site was celebrating people like me.
Ah, another reader of the front page!
What's a "front page"?
-
First time I've seen that message. I appreciate the Amiga throwback, even if I'm frothing about the error itself.
-
@PleegWat said in The Official Status Thread:
@Gąska Years ago I ran into some code which used a bubble sort for that very purpose. I needed to rewrite it for better this-is-not-a-directed-acyclic-graph detection, and I used:
I assume there is a good reason that won't work for you though.
This is at least the second time it's come up, so I might as well ask:
I have a use case where I need a topological sorting of some constraints, but they are very likely not a DAG. In this case, I basically need to detect all cycles as equivalence sub-structures and a sorting on the sub-structures.
Is that possible with the algorithms described there and how does it affect performance? (Wikipedia says O(|V|+|E|) but that assumes it is a DAG).
I think Unixtsort
at least detects cycles and computes a consistent ordering according to the above, but I'm hazy on the details.
-
@error said in The Official Status Thread:
I appreciate the Amiga throwback
E_MISSING_FLASHING_RED_BORDER
-
-
@error said in The Official Status Thread:
I thought this site was celebrating people like me.
Celebrating != laughing at
-
@TimeBandit said in The Official Status Thread:
@error said in The Official Status Thread:
FILE LOCKS!
Don't you love Windows?
At least your files are locked in place where you left them