A reminder that "For sale: baby shoes, never worn" isn't the shortest horror story ever written, it's actually "Specifies a tri-state Boolean value" written by the esteemed author Microsoft .NET Documentation.

Context: https://learn.microsoft.com/en-us/dotnet/api/microsoft.office.core.msotristate

Note that there are actually 5 values, not three. Also True is -1, and the value that equals 1 isn't supported.

MsoTriState Enum (Microsoft.Office.Core)

Specifies a tri-state Boolean value.

I just need a third reply here to say how much I appreciate the sheer simplicity and insanity of this documentation page - almost every single word provided ask more questions than it answers
@mdiluz Whenever I seem MS's docs I'm happy I'm not programming for Windows (at least not with MS's tech). They should really get a clue from e.g. Qt how to make decent docs (although there are some rough parts even there...)

@mdiluz My gateway into AI was using Claude to try to figure out MS's XML configuration files for their now deprecated Azure B2C identity provider. Their documentation is really bad.

https://claude.ai/share/97c73874-6981-4ebc-b473-19f5bdddd1bd

MsoTriState enum in Microsoft.Office.Core

Shared via Claude, an AI assistant from Anthropic

@astrashe @mdiluz i wonder if historians ever say things like "there isn't enough documentation of ancient mesopotamian property law, so i had AI make some up for me"
AI-driven enhancement of historical documents - International Journal on Digital Libraries

Historical documents from Late Antiquity to the early Middle Ages often suffer from degraded image quality due to aging, inadequate preservation, and environmental factors, presenting significant challenges for paleographical analysis. These documents contain crucial graphical symbols representing administrative, economic, and cultural information, which are time-consuming and error-prone to interpret manually. This research investigates image processing algorithms and deep learning models for enhancing these historical documents. Using image processing techniques, we improve symbol readability and visibility, while our deep learning approach aids in reconstructing degraded content and identifying patterns. This work contributes to improving the quality of historical document analysis, particularly for graphical symbol interpretation in paleographical studies.

SpringerLink

@cmsdengl @ratsnakegames

Oh, gods… 😵

@yenndc @cmsdengl AI-based image upscaling/denoising etc is not the same thing as just generating text/images wholesale, though

@ratsnakegames

True, but it's not a long way from using generative AI to do the upscaling — and from there we've kind of let the vampire into the house…

… With due apologies to vampires.

Personally, I sure hope it won't go there, but my expectations aren't high.

@yenndc
@ratsnakegames
As long as its non-destructive, historians in the future will be able to go, "Dipshits in the early 21st century got this completely wrong thanks to trusting bad tools."

@ratsnakegames @yenndc

It's the same slippery slope. Images today, words tomorrow

@cmsdengl @yenndc the distinction here is not "images/words", it's "extraction of information/generation of 'information'".

I still definitely have concerns about taking the output of upscalers etc at face value, but slippery slopes are a fallacy.

@mdiluz there's only two "supported" values so how is this even a tristate boolean

@ratsnakegames @mdiluz Everybody knows that the three real Boolean values are True, False, and FileNotFound.

https://thedailywtf.com/articles/What_Is_Truth_0x3f_

What Is Truth?

The problem with "logic" is that it makes things out to be nothing but simple dualities. Proponents of logic want us to believe that everything is true or false, black or white, yes or no, paper or plastic, etc. Thankfully, there are some among us, like Mark Harrison's colleague, who are not afraid to stand up to these logic advocates and shout "no, I will not succumb to your false dichotomies!" Today, I think we all should salute those few brave people ...

The Daily WTF
@mdiluz "Look closer. I think you'll find that there are 5 values."
@mdiluz what the fuck did I just read? The more often I look at the linked table the more I feel my brain melt 🤣
Ah. MS Office. That makes more sense now.
@mdiluz wait a second if the only supported values are true and false and in .NET enums are never null, is the third value not supported or is there no third value in the tri state bool?
@hellpie the third value is your confusion
@mdiluz in this house we call that quantum-ready computing
It's really quite simple. There are three states: true, false and .. unsupported. This removes the need for a rational number representation to express things about Microsoft Office that are not entirely true, and nor are they entirely false.
@mdiluz Hot take: True being –1 is the only good decision they made with that type.
@steve yeah, can't argue there
@mdiluz I suspect that -1 == TRUE dates from the old VARIANT_BOOL type way back in OLE, which has the same encoding. Old APIs leave a long shadow!
@kbm0 @mdiluz
It's much older, true was -1 all the way back in 8 bit BASIC (e.g. Commodore 64).
@leeloo @mdiluz It makes sense because then logical NOT is then the same as inverting all the bits in the word. The safe convention used in C is usually to stick to testing for (value) or (!value), ie. (value != false) or (value == false). Never check for (value == true). Having a tristate value really complicates things.
@kbm0 @mdiluz
Just as you can AND -1 with any non-zero value without getting 0/false.

@leeloo BASIC simply didn't distinguish between logical and bitwise operators; as a side effect, there is no short-circuiting of logical expressions

Visual Basic 5 was one of my starter languages and in retrospect, I understand why Dijkstra hated BASIC so much that he considered programming students with previous exposure to the language damaged beyond healing: it teaches you all sorts of wrong lessons on what's possible in programming and how to achieve it. The one serious Visual Basic book, Hardcore Visual Basic, was mostly about how to implement bog standard computer science concepts in a language that was completely hostile to... programming. If I remember correctly, among other things it explained the concept of short-circuiting logical expressions, and how to implement them manually

@leeloo I guess that the punchline is that the choice to adopt BASIC as the Office scripting language resulted in trace amounts of BASIC surviving all the way to the most recent versions of .NET

@mdiluz

The beauty (in my eyes) is the fact that only two out of the five states are actually supported.

Somebody signed off on that, presumably on a Friday afternoon. 🤷‍♂️

@mdiluz looking at the table of fields, my hand moved to turn my phone upside down as that just felt like the correct way of reading it…
@mdiluz I like how it is a tristate boolean, with 5 values, 3 of which are not supported, so in the end it is still just true and false (which is not a tristate, but at least it's boolean)
@smol_entity @mdiluz oh gods, it's a boolean with the worst truthy value
I... don't like that. Dislike. Heavily dislike.
@austinkelmore.com one can dislike art, but that doesn't stop it being art.
@mdiluz the troolean dates back to at least win32 though :)
@mdiluz
"a tri-state boolean" is not a sequence of words I expected to read in my lifetime.
@jannem
Its not as uncommon as you might think. Maybe its uncommon in programming, but it is quite common in electronics. Tri state buffers can output a 1, a 0, or 'nothing' which lets other components determine the logic level.
@mdiluz
@nekayee @mdiluz
"Boolean" tends to imply two states only though.
@mdiluz @aslakr it’s not that scary once you find out it is just T or F in NY, NJ, or CT.
@mdiluz Compile a Karnaugh map and you'll use three possibilities for each binary value, to optimize an output 😜
@mdiluz
This reads like a note you find in a lab in a sci-fi horror game.
@mdiluz Not true. We’ve had baby shoes never worn because when I got them the baby wasn’t yet born and when they were the shoes were for the wrong season.
@burningTyger the horror there is realising the seasons change and so does the ever progressing flow of time taking us on an unavoidable path towards death
@mdiluz
Isn't the real tri-state booelean already defined as True/False/FileNotFound ?
@snaggen Came here to make the same joke but you beat me to it! 😆
@e_nomem And when I read more comments it seems even I was beaten 😀
@mdiluz There should be a concept of troolean logic, with True, False and Unknown states
@acb many languages have a nullable bool, I spose

@acb

There is a real (and serious) True/False/Unknown logic system; it's usually called ternary and has actual uses.

There are actually several, if one's a little pedant, depending on how exactly one defines the interactions; it's usually refers tho just one of a few of them, and one in particular is much more common than the others.

Microsoft's… is not any of them, though.

@mdiluz at least it doesn't include FILE_NOT_FOUND
@mdiluz bool? my "beloved"
@mdiluz :throwing-hands-up-crying: but the 2nd one is 3 bytes longer…
@mdiluz "True; false. Null. Indeterminate. Don't care." For those who enjoy rising tension.
@mdiluz baby shoes is meant to be the shortest sad story, but "we use claude now!" is both shorter and sadder

@mdiluz did they update the page? It just says "Specifies a tri-state value" now. But the date in the footer didn't change. 🤔

Edit: Actually never mind. Turns out there's a *second* MsoTriState enum with the same values but different documentation.

@rhoot

… that just manages to make it worse yet…

Which is admittedly quite a feat, but not one to be proud of.