« first day (1568 days earlier)      last day (1612 days later) » 
00:00 - 19:0019:00 - 00:00

12:00 AM
bleargh ...
 
RELOAD!
 
System.ValueTuple
- NuGet Reference Version 4.5.0
- Loading version 4.0.1.0 and 4.0.2.0 conflicted and makes CodeAnalysis tests fail
 
[bruglesco/FleetCommand] 4 commits. 158 additions. 55 deletions.
[rubberduck-vba/Rubberduck] 1 opened issue. 1 closed issue. 15 issue comments.
 
12:16 AM
WTF?
Exception thrown: 'System.ArgumentException' in Rubberduck.VBEditor.dll
2018-09-20 19:15:25.0397;ERROR;Rubberduck.UI.Command.ReparseCommand;System.ArgumentException: Expected COM object, but validation failed.
   at Rubberduck.VBEditor.ComManagement.TypeLibs.TypeLibWrapper..ctor(IntPtr rawObjectPtr, Boolean isRefCountedInput) in C:\Rubberduck\Rubberduck.VBEEditor\ComManagement\TypeLibs\TypeLibs.cs:line 196
   at Rubberduck.VBEditor.ComManagement.TypeLibs.TypeLibWrapper.FromVBProject(IVBProject vbProject) in C:\Rubberduck\Rubberduck.VBEEditor\ComManagement\TypeLibs\TypeLibs.cs:line 176
^ Is that related to the command binding issue?
 
I'm not sure...
it shouldn't...
 
Got that when I was triggering a reparse from the code inspections - clicked on "Disable this inspection".
Got some of these above it:
Exception thrown: 'Microsoft.CSharp.RuntimeBinder.RuntimeBinderException' in Rubberduck.Inspections.dll
Exception thrown: 'Microsoft.CSharp.RuntimeBinder.RuntimeBinderException' in Rubberduck.Inspections.dll
Exception thrown: 'Microsoft.CSharp.RuntimeBinder.RuntimeBinderException' in Rubberduck.Inspections.dll
Exception thrown: 'Microsoft.CSharp.RuntimeBinder.RuntimeBinderException' in Rubberduck.Inspections.dll
Exception thrown: 'Microsoft.CSharp.RuntimeBinder.RuntimeBinderException' in Rubberduck.Inspections.dll
 
at this point its getting ridiculous...
I dropped System.ValueTuple from all the projects.
aaand it still blows up ...
 
12:35 AM
Grrr... did I miss a data binding converter when I merged?
 
12:56 AM
@Vogel612 BTDTGtS
IIRC it requires a specific version as it is related to..... Whatever
Has to be like, 1.0.17 or something
That made the bogus warning go away biut caused a different problem about version not matching.
@Comintern does vs agree thatnwhatever project you are passing is a COM object?
 
@this Checking now. I was trying to track down the WPF binder exceptions.
Something got ducked up in my build when I merged last.
 
Wayne used a custom check there. Cant recall why but IsComObject wouldnt have worked there
 
@puzzlepiece87 your contributions are scheduled. @FreeMan already got one of his in.
 
1:12 AM
@this I'm getting a null pointer in ValidateComObject.
 
Remembered. Are you in UI thread?
Typelib api must benused in UI thread
 
Should be.
Is the UI thread the "Main Thread"?
 
Think so, yes
Premature disposal of the project, maybe?
 
No, I can see it.
I'm not on the main thread.
Call stack:
 	Rubberduck.VBEditor.dll!Rubberduck.VBEditor.ComManagement.TypeLibsSupport.UnmanagedMemHelper.ValidateComObject(System.IntPtr comObjectPtr) Line 447	C#
 	Rubberduck.VBEditor.dll!Rubberduck.VBEditor.ComManagement.TypeLibs.TypeLibWrapper.TypeLibWrapper(System.IntPtr rawObjectPtr, bool isRefCountedInput) Line 193	C#
>	Rubberduck.VBEditor.dll!Rubberduck.VBEditor.ComManagement.TypeLibs.TypeLibWrapper.FromVBProject(Rubberduck.VBEditor.SafeComWrappers.Abstract.IVBProject vbProject) Line 176	C#
 	Rubberduck.VBEditor.dll!Rubberduck.VBEditor.ComManagement.TypeLibsAPI.VBETypeLibsAPI.CompileProject(Ru
 
Use uidispatcher
 
1:21 AM
Yep. No clue how that would have broken though. I don't think anybody's touched it recently.
 
Wayne did write a pr to ensure uidispatcher or thread check. Not sure what changed
 
1:39 AM
Methings github.com/rubberduck-vba/Rubberduck/blob/next/docs/About.md needs a revamp WRT source control.
 
@IvenBach knock yourself out :)
 
:cough cough:
@IvenBach @puzzlepiece87 Your first PR awaits!
 
[rubberduck-vba/Rubberduck] build for commit f1f9fb0f on unknown branch: AppVeyor build failed
BUILD FAILURE!
 
agh
okay, that's reasonable. A version might help when building an installer
but ... not gonna fix today.
working on RD and it's suddenly 4AM is not really making my sleeping schedule any better
Toodles!
 
1:54 AM
> This is a binding issue. Debug output:

```
Exception thrown: 'System.NullReferenceException' in Rubberduck.Core.dll
**_wrapped** was null.

The thread 0x2d5c has exited with code 0 (0x0).
System.Windows.Data Error: 17 : Cannot get 'FullMemberSignature' value (type 'String') from '' (type 'InterfaceMemberViewModel'). BindingExpression:Path=FullMemberSignature; DataItem='InterfaceMemberViewModel' (HashCode=42701800); target element is 'TextBlock' (Name=''); target property is 'Text' (typ
 
@Vogel612 Night
 
 
2 hours later…
4:12 AM
@IvenBach Not Run after running all tests usually means Inconclusive. (They should really introduce a separate bucked for it.) Most of the time it is the parser failing to parse the input code.
 
 
6 hours later…
9:43 AM
@this thanks that helped me fix it
I might be able to look into fixing the missing version in the InnoSetup with the new csproj format tonight...
 
 
2 hours later…
11:53 AM
> Just few questions....

1) Was it intentional to delete [this inspection](https://github.com/rubberduck-vba/Rubberduck/pull/4383/files#diff-813398b2cd7dbff2cb0d3307ae86463e)
2) EasyHook files were apparently deleted. Is that intentional as well? I did not see a corresponding addition; only a `PackageReference`, and I am assuming we are now referencing the files in the `packages` folder which isn't a part of the git solution; but a bit unsure why files existed inside the projects originally.
 
@this I was hoping someone would notice that... :) heat index was 102°F (about 40°C for the rest of the world).
 
@FreeMan well time has come to talk about why sea are boiling hot.
 
\o
 
12:46 PM
Hi, sorry pointer question again........this link states: If you follow a string variable’s pointer you won’t actually get the start of a string. Instead, you’ll get another pointer. If you follow that pointer you’ll get the 5th byte of a BSTR structure, a COM Unicode string buffer.
So, what is that first pointer to? The offset storing the length info?
 
Yes.
 
Yey! I might just have learnt one thing. Thank you.
 
Earlier I told you(?) that the length is at negative offset. We prefer to pass around the pointer to the address of the 1st character so that it is compatible when we pass the same pointer to a API that expects a null-terminated string.
 
You did tell me. I am just going over everything that you guys shared with me trying to get it all to sink in along with doing extra reading.
Why is it called the COM Unicode string buffer? Said 5th byte. I know it is the start of the unicode data string. Is it simply buffer because it is the start?
 
IIRC, this is a convention by Automation specifications that VB6/VBA/other programs follow; all string must be Unicode.
Buffer is usually referring to the array of characters --- that is, a contiguous range of memory where we contain the string itself. Remember that the buffer is variable size so you have to know when to stop reading.
 
12:56 PM
Ok... so the buffer is not simply the 5th byte. It is the whole data string.
 
yes. It's a common term used in C/C++
 
That makes more sense. Sorry, I can get derailed easily by semantics.
 
When you think about it, it's fairly important that the buffer be contiguous. you can come up with a different data structure where you have a piece of string here and another piece of string over there and that's totally legit. But that would be disastrous if you passed that data structure to the API which will want to do a sequential read from start to end
 
Do APIs always do sequential reads? #Newb
 
1:01 PM
Lot of them do but I would not say all of them do.
 
k
 
In fact, whenever you use an API the best favor you can do toyourself is to actually read the API documentation
 
@this Very true
 
You can't just assume that function #2 is happy with a null terminated string just because function #1 from same DLL does.
 
Why is a BSTR terminated by two null characters ? What is wrong with one?
 
1:05 PM
it's a Unicode Unicorn.
 
oh
 
in this case, it's using UCS-2 so every "character" is 2 bytes.
 
@this Got it. Though I need to google UCS-2.. <blushes>
 
so with letter "A" we have value of 0x0041
if we used only one 0x00 to terminate the string, we would terminate before we got to read the letter "A"
that's just one of many way to encode unicode. UCS-2 means that it's fixed width in 16 bits for all characters. This is different from say, UTF-8 for example where we may either use one or two characters depending on the character we actually use.
 
k
I have to profess I don't yet understand "so with letter "A" we have value of 0x0041
if we used only one 0x00 to terminate the string, we would terminate before we got to read the letter "A""
 
1:11 PM
OK - do this....
 
Basically, if the sequence "0x00" was the end of the string, what happens when we hit "0x0041"?
It sees "0x00" and stops.
 
You stop before the 41
 
Correct.
That's why we need "0x0000".
 
Dim s As String
Dim b() As Byte
Dim i As Long
Dim u As Long
Dim l As Long

s = "ABC"
b = s

l = LBound(b)
u = UBound(b)

For i = l To u
  Debug.Print Right$("0" & Hex(b(i)), 2);
Next
 
So it doesn't stop halfway through parsing a different character.
 
1:17 PM
But in "0x0041" there is no termination
 
Correct.
 
That should demonstrate how you get the hexadecimal. BTW, I need to double check myself - it's actually 0x4100
 
So, the string "A" would really be:
"0x00410x0000".
 
Aha
 
@Hosch250, I'm a bit uncertain about the endianness - since it's little-endian, I think it's actually 0x4100, not 0x0041, right?
I htink it has to be since when we mix up the Unicode with ASCII, the output usually can read only one character then stops.
 
1:19 PM
@this Probably.
 
The above code will provide output of 0x410042004300
 
@this What is this doing please other than walking a string and generating something hex-like?
 
that was in response to your earlier comment that you wasn't sure how you got 0x0041 (my mistake, 0x4100) from letter A
 
aha... so that is ABC in hex?
 
Yes.
and that is how it's laid out in the memory, basically
 
1:22 PM
because it is more compact...
And gives you some idea where a value lies?
 
no, let me back up -- why do you think programmers use hexadecimal?
 
I thought one advantage was to write down very large integers in a compact form.
The second part was something to do with hex form tells you what area of memory is concerned.
I am basically regurgitating what I read in an article earlier this week.
 
you are correct about using it as a compact way to write a large number and it is often used with memory address, yes but there's a underlying reason to both of those
 
k.....
 
at the very low level, at the hardware level, what values can a computer understand?
hint: only 2.
 
1:31 PM
0 | 1
 
right. That incidentally is base 2
hex = base 16
 
yup
a power of 2
 
so 0x410042004300 is equivalent to binary 0100 0001 0000 0000 0100 0010 0000 0000 0100 0011 0000 0000
the binary form is literally what is there in the memory or on storage
 
I'll take your word for it. I can do conversions from decimal <> binary
I have to use a converter for hex
 
we are just pretending that this bunch of 0 and 1 represent some kind of string
but that means we have to use a convention to map a string of binary to something meaningful
 
1:34 PM
yup
Ok... so one last question....
The same article states for String on allocation: The VB runtime truly creates a new copy of a string upon assignment. Both a new pointer (for the string variable) and a new BSTR structure (for the string’s value) are allocated. Then the contents of the source BSTR are copied to the destination BSTR, and the address of the new BSTR is written to the string variable’s content address.
And for deallocation: Deallocate the memory occupied by the target BSTR structure, and deallocate the pointer that constitutes the string variable itself.
So, an entire copy is made, fine. On deallocation the target (copy) is basically erased. What about the original?
 
@QHarr I'd have to see it in context, but I'd assume that it's describing marshaling behavior. The original string would be deallocated when it went out of scope.
 
@Comintern It is the String section of this: bytecomb.com/vba-internals-whats-in-a-variable
 
1:51 PM
Ah, it's talking about any assignment. The allocation part is talking about lhs = rhs. The deallocation part is only talking about lhs.
They're all deallocated the same way when they lose scope.
 
Ah..ok....
So when out of scope is that marshalling? I am getting ahead of myself here perhaps.
 
We use Hex because a byte contains 16 bits, IIRC.
And because base 32 gets kind of complicated :P
 
byte is 8 bits no?
:sighs:
 
@QHarr No, marshaling is what happens when the variable is passed outside of VBA (API calls).
 
@Comintern thanks
 
1:55 PM
[rubberduck-vba/Rubberduck] build for commit f4f7a9d4 on unknown branch: AppVeyor build failed
BUILD FAILURE!
 
morning
 
2:15 PM
> Re 1: That inspection had been removed from the csproj files, but not from the git working tree. It uses old API for inspections and refers to resources that have been removed. The move to the new csproj format (which uses globbing to include files) just surfaced that mishap.

Re 2: EasyHook (as well as NLog.Schema and possibly other NuGet Packages) pushed parts of the content they should add to the `/packages` directory to the solution content. That behaviour is apparently not supported for
 
@M.Doerner something like “unable to run test” to better indicate what happened?
 
3:03 PM
@Duga Not much info to debug with. :(
 
@BZngr Not your fault?
> Error making request with Error Code ServiceUnavailable and Http Status Code ServiceUnavailable. No further error information was returned by the service.
Not sure you can do something about it? Retry or something?
 
@Inarion Not sure how to interpret the limited message. That said, I found issues to follow up on before retry.
 
There were some issues with AppVeyor this week. So I implicitly assumed the message was referring to AV being not available.
 
3:32 PM
@QHarr en.wikipedia.org/wiki/Marshalling_(computer_science) very recently got me to grok the idea of what marshalling is.
 
3:44 PM
Update about page

With the decision to remove source control from RD the page needed to be updated to reflect this.
> With the decision to remove source control from RD the page needed to be updated to reflect this.
 
@Duga Continually stepping out of my comfort zone.
 
wew, looks like my vs 2017 issue is actually being taken seriously :)
 
@Duga "eliminates" feels a bit strong, given the only easy part is updating the git repo - updating the VBA project from the git repo is still bloody tedious
 
4:06 PM
Reduces the more appropriate word to use?
 
@IvenBach I guess, yeah
 
4:27 PM
Duck check: Is it a best/preferred practice to have all images reference in a UserControl.Resources for xaml? Then just use Source={StaticResource Foo} when an image is needed?
 
yup
then it's easier to change them later - they're all in one place, as opposed to being scattered across hundreds of lines of xaml markup
 
mkay.
 
do you guys know if i can get intellisense for vbscript in VS 2017?
 
you can't
 
4:37 PM
le sad...
 
VBScript isn't a .net language, VS doesn't handle it
 
well javascript isnt either (is it?)
but it has modules for htat
i know i saw stuff around that older versions of VS had vbscript stuff for them
 
turns out, I was wrong.. partially
3
A: How do I get Visual Studio to do vbscript syntax highlighting for .asp files?

adamboxturns out VB wasn't installed :P make sure it is in VS, go to tools -> options -> text editor -> file extension add asp as the extension and pick Visual Basic as the editor

 
@IvenBach What I meant is that they should stop putting inconclusive tests into the same bucket as other tests. Previously, I think in VS2015, the test explorer showed them as ignored; now, it is not run.
 
yeah but im not dealing with asp -_-
 
4:40 PM
Why can't they simply add an orange inconclusive group?
 
im dealing with the visual macro crap
and ive determined its probably vbscript
 
@M.Doerner I have seen inconclusive results.
 
@MathieuGuindon that post is refering to VS 2008
 
and doesn't fix intellisense either
 
But the test explorer has no separate group for them, right?
 
4:41 PM
hell i guess id be happy with syntax highlighting
part of it is, id like to start doing versioning using git lab
 
but why can't you use the VBA editor for your VBScript?
 
i can, i guess
i'd have to build the whole list of built in variables -_-
yeah, your right, i should just give in and use the vba one
 
work early-bound, have intellisense, then make everything implicit variants (VBScript doesn't support an As clause), and you got your VBScript :)
 
yep
idk if it treats recordsets the same though
 
4:44 PM
since clng(rs2(0))
works
referring to the first column of the recordset
 
why wouldn't it work?
it's an implicit default member call
the library is the same whether it's late-bound of not
 
hell, i didnt even have to tell it to move to the first record
its just wierd
 
uh, that's nothing to do w/ vbs
 
the behavior is same in vba
 
4:46 PM
FWIW the readability rules are the same too
 
literally the only difference between vbs and vba boils down to the data types (or rather the lack thereof) and the presence of WScript and a "global" procedure.
 
CLng(rs2(0)) should probably be CLng(rs2.Fields(0).Value))
 
^
don't make me wonder what it's. be explicit. I'd even prefer rs.Fields("foo").Value, in fact.
 
meh. if rs2 has only one field with one value, 0 is perfectly fine
I'd even alias it to _0 in the select
 
Sure. I was thinking for bigger recordsets where you could be a way away from the original SQL statement or in case where it's executing a stored procedure.
 
4:49 PM
the name rs2 worries me though. means there's likely a rs1 in the same scope, which means the current scope is doing gosh-too-many-things
 
Yeah.
 
think of how that procedure is going to be growing: if there's rs1 then rs2 and a nested loop or something, extending it means adding rs3 and another level of nesting
if each procedure is responsible for its own recordset, there's no need to number them
if one procedure is going to need multiple recordsets, then they deserve descriptive names
 
next time you see this from Access guy.... "You can normalize your database but you can't normalize your code?" :D
 
lol
we don't do Dim str1 As String, str2 As String, so why would we go Dim rs1 As Recordset, rs2 As Recordset?
don't get me wrong: rs is a perfectly fine name IMO - but only when it's clear that the procedure needs a recordset to do its job, and that it only needs one.
(although, there's almost always a more descriptive name for it)
I'm annoying with names, I know.
 
really DRY and 3NF has some in common.
 
4:55 PM
if it wasn't for the massive paycut, I'd probably apply to teach CS in elementary schools
 
and for record, I tend to agree. That said, I do use rs but as soon as I need rs2 in the same scope, I will go back and rename rs to rsFoo and the new one to rsBar
(sorry HN habit kicked in)
 
I just name it foos and bars
actually, I haven't needed two recordsets in the same scope for quite a while
response = MsgBox("Are You Sure?", vbYesNo)

If response = vbNo Then
    MsgBox ("OK")
    Exit Sub
End If
gosh, how many msgboxes do you need?
 
#NotEnough
i really really wish all introductory VBA wouldn't have used MsgBox
 
^
swap it for Debug.Print, teach them to use the immediate window before they even write a single procedure
 
THAT
I swear, the whole Msgbox is literally the brain-mangling that Edgser speak of.
 
5:11 PM
yeah fortunately i dont need to use any loops in this goofy script thing
just a couple of recordsets
 
> YOU CAN TRY THIS AT HOME KIDS, BUT THIS IS NOT PRODUCTION GRADE CODE
Debating whether that's a strong enough disclaimer...
 
@Vogel612 I'm reading up on git-reset and am struggling to understand the various <mode> that can be used.
 
mehhhh i guess i'll fix the dumb names
now im going to need a couple more recordsets
 
The future you'll thank you.
 
You could name one of them MehIGuessIllFixTheDumbNames.
 
5:15 PM
lol
 
naw, he will wish he could still kick me in hte face for not moving on to a C# library
 
Reminds me of a strip I saw once --- The guy's taking a philosophy exam. The question on the sheet asks Can you go back in time and kill your grandmother?. He writes, No.. He touches his scar on the right temple gingerly. Then he continues, Her kung fu is too powerful.
3
 
that elicited a genuine laugh.
it wasnt loud enough that all of everyone near me could hear, but it was a laugh
and it was genuine, like my copy of windows
but not my home copy... well it is but it isnt... its complecated
it could have been
id just have had to install vista, then upgrade to 8 pro, then upgrade to 10 pro
 
5:52 PM
> Hi Rubberduck team. I have this test case:

```
'@TestMethod
Public Sub Remainder() 'TODO Rename test
On Error GoTo TestFail

'Arrange:
Dim Dividends As Variant
Dividends = Array(1, 1, 5, 11, 10.2, 10.2, -1, -1, -5, -11, -10.2, -10.2)
Dim Divisors As Variant
Divisors = Array(1, 2, -2, 11, 0.5, -0.5, -1, -2, 2, -11, -0.5, 0.5)
Dim ExpectedRemainders As Variant
ExpectedRemainders = Array(0, 1, 1, 0, 0.2, 0.2, 0, -1, -1, 0, -0.2, -0.2)
 
6:07 PM
> `Assert` calls document a reason for a test to *fail* - if a test doens't invoke any `Assert`, then that test will pass; that's by design, and consistent with the expectations of a unit test.

By default, the `IAssert` contract will be fulfilled by `Rubberduck.AssertClass`, which has rather stiff equality rules where mismatching types are considered to not be equal. Depending on the `Variant` subtypes involved, this may be what's happening here.

We have also implemented the `IAssert` inte
> Does this change anything (assuming the `Remainder` returns `Double` array items)?

Dim ExpectedRemainders As Variant
ExpectedRemainders = Array(CDbl(0), CDbl(1), CDbl(1), CDbl(0), CDbl(0.2), CDbl(0.2), CDbl(0), CDbl(-1), CDbl(-1), CDbl(0), CDbl(-0.2), CDbl(-0.2))
 
6:34 PM
 
@IvenBach woah! What did you do!
 
???
Just took a screenshot.
 
the point is that I never got the Skipped Tests and Not Run Tests as 2 separate categories
used to be always under Not run Tests or something
 
@M.Doerner Well I'll be... I would have sworn that I had seen anything that was an inconclusive test result in its own category. #TIL
@this ^ I was expecting 4 distinct groupings. Inconclusive isn't there.
 
Yes it woudl have been lumped into one category adn we would never know which's skipped and which wsa run but indeed inconclusive
Wait, you're right
I'm conflating things again
I don't see them as 3 categories because I usually run them all
 
6:41 PM
Google honors Mr. Rogers with a doodle. :tear:
 
> That test is essentially a "poor man's data-driven test" working around lack of data-driven support for Rubberduck unit tests (#3699).

An alternative work-around could be to split it into multiple tests that explicitly cover a single case, for example:

```vb
'@TestMethod
Public Sub GivenSameDividendAndDivisor_RemainderIsZero()
Const value As Double = 10
Const expected As Double = 0
Dim actual As Double
If value = 0 Then
Assert.Inconclusive "Test is misconfi
> That test is essentially a "poor man's data-driven test" working around lack of data-driven support for Rubberduck unit tests (#3699).

An alternative work-around could be to split it into multiple tests that explicitly cover a single case, for example:

```vb
'@TestMethod
Public Sub GivenSameDividendAndDivisor_RemainderIsZero()
Const value As Double = 10
Const expected As Double = 0
Dim actual As Double
If value = 0 Then
Assert.Inconclusive "Test is misconfi
> That test is essentially a "poor man's data-driven test" working around lack of data-driven support for Rubberduck unit tests (#3699).

An alternative work-around could be to split it into multiple tests that explicitly cover a single case, for example:

```vb
'@TestMethod
Public Sub GivenSameDividendAndDivisor_RemainderIsZero()
Const value As Double = 10
Const expected As Double = 0
Dim actual As Double
If value = 0 Then
Assert.Inconclusive "Test is misconfi
> That test is essentially a "poor man's data-driven test" working around lack of data-driven support for Rubberduck unit tests (#3699).

An alternative work-around could be to split it into multiple tests that explicitly cover a single case, for example:

```vb
'@TestMethod
Public Sub GivenSameDividendAndDivisor_RemainderIsZero()
Const value As Double = 10
Const expected As Double = 0
If value = 0 Then
Assert.Inconclusive "Test is misconfigured"
Exit Sub
 
@Duga ok that was the last edit, promise.
 
6:58 PM
"--soft" -> make HEAD point to given commit. Nothing else
"--mixed" -> make HEAD point to given commit and clear staging area
"--hard" -> make HEAD point to given commit and reset everything in the working tree to that state
"--merge" / "--keep" never used those, I don't quite understand the docs either
 
legit question: is data-griven testing really a good idea in OP's case here? IMO the test suite I gave is much clearer.. but is it just me?
 
00:00 - 19:0019:00 - 00:00

« first day (1568 days earlier)      last day (1612 days later) »