« first day (2806 days earlier)      last day (374 days later) » 

00:00
REFRESH!
[Minesweeper] 93 Games Played. 62 Bombs Used. 13390 Moves Performed. 20 New Users
[rubberduck-vba/Rubberduck] 1 issues opened
[Zomis/Duga] 1 issues closed
 
5 hours later…
05:18
it's weird seeing all the features spelled out like that... damn there's a lot!
 
4 hours later…
08:51
@MathieuGuindon There is a reason the codebase is as imposing as it is...
 
4 hours later…
13:21
@MathieuGuindon noice!
 
5 hours later…
18:32
@this Oof. This is new to me. So the rule is to always treat booleans as the evaluation If Not MakeSense Then unless it's a compiler directive? Then you must explicitly evaluate the boolean against it's constant? I certainly need an inspection for this because that's a bizarre quirk.
Normally, If I saw If Win64 = 0 I would assume it's a mistake and change it to If Not Win64
Is it because Win64 is not boolean?
```
?Not True = Not 1
True
?Not False = Not 1
True
```
No, you can get it with regular booleans, too. You even can get a dirty boolean, too.
For that reason, the safest way to evaluate a boolean is always against the false value, never against True because that's just one of truthy values.
you can write If x Then or conversely, If x = False Then
```
?VarType(Win64)
0
?TypeName(Win64)
Empty
```
I'm not sure how I've not run in to this issue enough for it to be a problem.
@HackSlash --- Win64 is a conditional compilation directive. It doesn't exist in VBA.
picture the compilation directives as existing at a level above VBA. Before you evaluate the VBA code, you must first evaluate the directives which then gives you a VBA codebase for you to then compile --- if you are familiar with C preprocessor, it's the same concept.
IIRC, all conditional directives are integers.
but the important thing is that the expressions that's used by the VBA predecessor is basically the same as VBA itself --- If 1 = True Then will fail because they aren't equal.
18:53
`?cint(True)`
`-1 `
As I said before, everyone agrees on what is false. But not everyone agrees on what is true.
That is quite a metaphor for life. #VBA-Philosophy
Unfortunately it' s not unique to VBA.
Or programming
19:09
In case you hadn't noticed, code fences don't work here. :) There's a `Fixed Font` button over there ---> that appears when you have a `CrLf` in your entered text.
One clickie does the code fencing for you.
`Shift Enter` will give you a `CrLf` if you're hand typing.
No other formatting tricks in fixed font, though.
@this if only...
The irony is that in C APIs it's quite common to interpret 0 as "success" and anything else a failure.
if they had defined the BOOL so that TRUE was 0 and FALSE was <>0, we wouldn't be in this situation.
But I guess whoever decided that 1 was a "good enough" for the TRUE value had a very loose sense of what is truth.
19:45
Not only that, does anyone think of defining project-level precompiler constants as THING = -1? I know I don't!
20:04
gonna wonder about those who came up with the notion that True ought to be -1... :-)
"you know what? We should be extra sure and flip all those other bits to 1."
 
1 hour later…
21:18
Boolean is supposed to be a single bit. A lot of extra work was done to make that false.
Why use a bool when an int will do?
a signed int... to hold a single bit of data...
 
2 hours later…
23:18
Processors work better with bits when they're grouped into bytes, so we got 00000000 00000000 00000000 00000000 for 0, and the exact binary opposite for Not 0. Makes total sense, no?
@HackSlash that's ... not actually how booleans work
Which part? The single bit? Or the way VBA stores them?
It just so happens that a single bit is sufficient to encode the information, but using any number other than 0 as true and 0 as false also implements a boolean semantic
ie: the premise that a boolean is supposed to be a single bit is not correct
and there are boolean algebras over sets that have more than two members
Another really easy to understand boolean algebra is over the Powerset of a given set, using union as or, intersection as and and complement as not
so given S = { a, b }, the boolean values are {}, { a }, { b }, { a, b }
and suddenly you need at least two bits to define the boolean :D
4.12 Boolean conversions [conv.bool]

1 A prvalue of arithmetic, unscoped enumeration, pointer, or pointer to member type can be converted to a prvalue of type bool. A zero value, null pointer value, or null member pointer value is converted to false; any other value is converted to true. A prvalue of type std::nullptr_t can be converted to a prvalue of type bool; the resulting value is false.
23:45
[rubberduck-vba/Rubberduck] 1516 stars vs. [decalage2/oletools] 1937 stars

« first day (2806 days earlier)      last day (374 days later) »