Loading...
  OR  Zero-K Name:    Password:   

Post edit history

Is this title false? [Solved by Anarchid]

To display differences between versions, select one or more edits in the list using checkboxes and click "diff selected"
Post edit history
Date Editor Before After
10/4/2017 1:58:21 PMEErankAdminAnarchid before revert after revert
10/4/2017 1:56:39 PMEErankAdminAnarchid before revert after revert
10/4/2017 1:56:11 PMEErankAdminAnarchid before revert after revert
10/4/2017 1:55:52 PMEErankAdminAnarchid before revert after revert
Before After
1 [quote] The title is in a database and I don't know off the top of my head how/if they handle string to boolean conversion. [/quote] 1 [quote] The title is in a database and I don't know off the top of my head how/if they handle string to boolean conversion. [/quote]
2 MSSQL doesn't have a boolean data type at all. However, when the title is queried from the database, it is then processed by the C# server code. 2 MSSQL doesn't have a boolean data type at all. However, when the title is queried from the database, it is then processed by the C# server code.
3 \n 3 \n
4 Now, C# does have a boolean type, and even better, has implicit casts, and has explicit string-to-boolean converters. However, this is what happens when you try an implicit cast on this string: 4 Now, C# does have a boolean type, and even better, has implicit casts, and has explicit string-to-boolean converters. However, this is what happens when you try an implicit cast on this string:
5 {{{truth.cs(9,12): error CS0029: Cannot implicitly convert type `string' to `bool'}}} 5 {{{truth.cs(9,12): error CS0029: Cannot implicitly convert type `string' to `bool'}}}
6 \n 6 \n
7 And this is what happens if you try an explicit conversion: 7 And this is what happens if you try an explicit conversion:
8 {{{[ERROR] FATAL UNHANDLED EXCEPTION: System.FormatException: String was not recognized as a valid Boolean.}}} 8 {{{[ERROR] FATAL UNHANDLED EXCEPTION: System.FormatException: String was not recognized as a valid Boolean.}}}
9 \n 9 \n
10 But let's not give up yet! After the server processes the title and renders the page, it is then sent to the browser as a bunch of HTML an Javascript. While HTML in itself doesn't have a rigid definition of truthness, javascript has boolean types, implicit casting, etc, and can trivially access the innerHTML value of the title tag. This is what Javascript gives us: 10 But let's not give up yet! After the server processes the title and renders the page, it is then sent to the browser as a bunch of HTML an Javascript. While HTML in itself doesn't have a rigid definition of truthness, javascript has boolean types, implicit casting, etc, and can trivially access the innerHTML value of the title tag. This is what Javascript gives us:
11 \n 11 \n
12 {{{ 12 {{{
13 // 1) 13 // 1)
14 "Is this title false?" === true 14 "Is this title false?" === true
15 false 15 false
16 // 2) 16 // 2)
17 "Is this title false?" === false 17 "Is this title false?" === false
18 false 18 false
19 // 3) 19 // 3)
20 "Is this title false?" == false 20 "Is this title false?" == false
21 false 21 false
22 // 4) 22 // 4)
23 !"Is this title false?" 23 !"Is this title false?"
24 false 24 false
25 }}} 25 }}}
26 \n 26 \n
27 What does this tell us? The value we are trying is: 27 What does this tell us? The value we are trying is:
28 1) not literally false. 28 1) not literally true.
29 2) not literally true. 29 2) not literally false.
30 3) not false-like 30 3) not false-like
31 4) the negation of this value is false, so it's truth-like 31 4) the negation of this value is false, so it's truth-like
32 \n 32 \n
33 As we can see, the meaning of this value has shifted wildly based on the language in which it is _read_, and in the way the question of its truth is formulated in every language. There is no rigorously correct answer: the truth-meaning of this title is nebulous, and it also depends on who's asking - so it's subjective. 33 As we can see, the meaning of this value has shifted wildly based on the language in which it is _read_, and in the way the question of its truth is formulated in every language. There is no rigorously correct answer: the truth-meaning of this title is nebulous, and it also depends on who's asking - so it's subjective.
34 \n 34 \n
35 However, we can also observe a pattern: all of the languages and systems we interrogated agree that it is definitely not what they understand by "false"; therefore the meaning of this title is both nebulous and patterned at the same time. 35 However, we can also observe a pattern: all of the languages and systems we interrogated agree that it is definitely not what they understand by "false"; therefore the meaning of this title is both nebulous and patterned at the same time.