Proving that Android’s, Java’s and Python’s sorting algorithm is broken (and showing how to fix it)
-
They're all owned by the same conglomerate. Why reward it?
-
Not only did it get fixed in Python in a day's time, the Python devs welcomed further automated analysis of the CPython codebase :)
-
People do do that with Sony; I've seen plenty around the Net where people have said they'll never buy a VAIO or a PlayStation because of Sony BMG's spyware shenanigans.
Well, in case of the VAIO they were right if only for the wrong reasons. Bought a VAIO convertible one year ago and got rid of it in exchange for a Surface Pro three months ago.
Good lord, that Sony laptop was a piece of crap - the lighting of the keyboard was uneven (you could even see the LEDs directly under some keys), the wifi crapped out after a mere 5 meters (I had to buy a USB wifi adapter to fix that) and the whole thing kept waking from sleep even when I had it shutdown!
I mean, I'd put the whole thing into it's cover in the evening and the next morning the battery would be dead. Once I took it out before class and discovered that it was cooking itself inside the cover - the damn thing had woken and would happily heat up the inside of the cover. I made a point of keeping the outlet to the top of the cover and not closing it up completely afterward.And then there was the software. Good lord, the software. It kept reminding me to update some drivers - so I did. Then it would tell me that now there was another set of drivers to update. Upoin doing so, the first set of drivers was to be installed again. And so on and so forth. Some other drivers I had to execute manually because the updater software for some reason or other couldn't do that.
I also had to send it in for a repair because the charging port sometimes made a sound like there was an angry bee behind it, quite faint but still audible in a quiet room. They stated that they replaced the electronics behind that port but the buzzing sound remained...
... I feel a bit sorry for the poor sucker who bought that one.
The Surface, however, simply works and does exactly what I want it to. Perfect fit to my workflow - it's so much easier and faster to scribble my Physics and Chemistry drawing into OneNote instead of having to rely on not so flexible tools like ChemSketch.
-
Yeah, I had to hack around
2002. Markdown didn't exist yet. Yay!
- Hmm this is a buggy approach.
- May as well go for the overflow...
- ...oh I see, I can't _start_ a list higher than 2147483647, but it's valid to continue from there,,,
-
Wow, it's getting worse! I'm pretty sure your second line didn't overflow before.
-
Whoops.
Yeah, I just did it for s and giggles, but I was surprised that it was rendering partially outside of the preview pane.
-
-
I...I can't explain that.
-
I...I can't explain that.
-
I can only presume he had some issue with the string of
9
s partially obscuring my avatar...
-
I dunno...someone flagged you for the html badge on that post.
-
Interesting - linux/chrome wraps around on that. Linux/firefox saturates.
-
"Forget it Jake, it's undefined-behaviour-town..."
-
I dunno...someone flagged you for the html badge on that post.
Hmmm... I think you may be on to something...
-
I dunno...someone flagged you for the html badge on that post.
When did we get an HTML Breaker badge?
-
Strange things are afoot at the Circle K.
-
When @galgorah didn't remember we had a <kbd>HTML award</kbd> badge.
-
The important thing to take away from this is that I have a badge that nobody else has.
-
I'd say I was going to fix that, but I'll let the admins be admins.
-
-
But but, other people have touched that spoon...
-
Yeah I missed that. I removed the badge from you and tar.
When @galgorah didn't remember we had a <<!-- -->kbd>HTML award</<!-- -->kbd> badge.
-
Fixed by the same Tim that created timsort in the first place, no less.
I have to say that it's really really cool to finally see code verification tools applied to "real" code.
I hope some day in the far future we can have software with no bugs.
-
I have to say that it's really really cool to finally see code verification tools applied to "real" code.
I'm excited to, not the least reason of which is that I basically work in that field.I hope some day in the far future we can have software with no bugs.
That being said, I have a very firm belief that "no bugs" is effectively impossible. Some things like "this array is sorted" have a nice specification. But for actual software? Most of the time, a specification of what constitutes correct behavior will be incredibly complicated. Even if we get to the point where we can prove that a program correctly implements a specification, the specification itself will almost always be buggy (and/or incomplete).
-
-
Everyone has their 15 minutes of fame, and yours are officially over.
-
I thought I was special. *sob*
But
AndI gotdidn't even geta<kbd>HTML Award</kbd>
as a consolation prize...;~(\o/Huzzah!
-
I thought I was special. *sob*
<ins>But</ins> <del>And </del> I <ins>got</ins> <del>didn't even get</del> a
<kbd>HTML Award</kbd>
as a consolation prize... <del><tt>;~(</tt></del> <ins><tt>\o/</tt><ins>Huzzah!
Well I guess in a sort of obtuse way I owe ya. So enjoy!
-
I have to say that it's really really cool to finally see code verification tools applied to "real" code.
There's quite a bit of that going on, but it's really difficult. If you're not making safety-critical systems, the main area you see the heavy guns of verification being wheeled out is in areas like optimizing compilers, which are amazing beasts internally, but very very tricky. When someone gets it wrong, a buggy compiler ships and some poor programmer will end up staring at their code all night thinking “But I know I wrote that part right, yet it fails weirdly! Am I going crazy here?”
Even if we get to the point where we can prove that a program correctly implements a specification, the specification itself will almost always be buggy (and/or incomplete).
QFT.
About 15 years ago (my, how time passes!) one of the hot things was retrenchment, where the specification was changed in a structured way in response to the requirements of the implementation. I've no idea where that work went after that, as I left that field (to work on large-scale resource management for distributed systems), but it would seem that that sort of thing is clearly necessary. The spec is incomplete, so you need to refine it, but then you have to reevaluate whether the implementation matches it, and whether the revised spec is what the customer wants. Both parts are necessary.
-
-
Fine, maybe, but it still needs to know where %USERPROFILE% is to work out where %USERPROFILE%\Documents is.
At the risk of being Hanzo'd, no, it doesn't.
If you want to know where the Documents folder is, don't assume it's %userprofile%\documents, ask Windows with SHGetKnownFolderPath(FOLDERID_Documents, ...) (or SHGetFolderPath if you're using an older version of Windows.)
-
But but, other people have touched that spoon...
I want to know why I'm listed as the second oldest person on the emeritus badge when I was the first person with the spoon. Dammit.
-
Because you were granted the badge manually ;)
-
Because you were granted the badge manually
Is it too much to ask (yes, I'm sure it is) that they have been granted in the proper order?!
-
Paging @PJH…
-
I don't know why I didn't gripe about it earlier.
-
-
You're correct. I can't modify the database directly.
Not even a SQL UPDATE query, or manually taking away the badge from both of us and then re-granting it with different dates? sob
-
Somehow I doubt you can override the badge grant timestamp…
-
-
-
I feel like I should storm off in a huff or something,
Say hi to @lucas when you see him...
-
I didn't say leave the site. I more meant like the conversation, but you did snip out the "but whatever" which implied I wasn't going to.
-
Plus, heaven forfend we should stop griping about things.
-
-
Yeah yeah, this got explained, I accepted that.
-
Yeah yeah, this got explained, I accepted that.
I used the magic word "Hanzo'd". Reading the entire thread before posting is too much work.
-
I used the magic word "Hanzo'd". Reading the entire thread before posting is too much work.
Also, you think @blakeyrat's head would explode if I said "when he's right, he's right?" Because in this case, he's right.
-
Somehow I doubt you can override the badge grant timestamp…
Why would you think that?
Oh, you're assuming foreign keys, and consistency checks and such?
postgres:~# psql -ddiscourse psql (9.4.1, server 9.3.6) Type "help" for help. discourse=# SELECT tc.table_schema, tc.constraint_name, tc.table_name, kcu.column_name, ccu.table_name AS foreign_table_name, ccu.column_name AS foreign_column_name FROM information_schema.table_constraints tc JOIN information_schema.key_column_usage kcu ON tc.constraint_name = kcu.constraint_name JOIN information_schema.constraint_column_usage ccu ON ccu.constraint_name = tc.constraint_name WHERE constraint_type = 'FOREIGN KEY'; table_schema | constraint_name | table_name | column_name | foreign_table_name | foreign_column_name --------------+-----------------+------------+-------------+--------------------+--------------------- (0 rows)
About that...
-
Why would you think that?
Oh, you're assuming foreign keys, and consistency checks and such?
More I'm assuming no direct DB access