« first day (1621 days earlier)      last day (1559 days later) » 

3:00 PM
hmm, look again? I might have said "updated" while it was still publishing
 
now it does.
also the math is funny.
Today's 13th. It says 13 days to go.
i guess it's counting 26th midnight as the real deadline
 
morning gents
 
it's also using UTC time IIRC
heya @ThunderFrame!
@KySoto 'morning!
 
@ThunderFrame is back again!!!
Poor @IvenBach... ^
 
Hi, @ThunderFrame!
 
3:13 PM
Note that ReDim v(1) is abusing the ReDim statement as a dual runtime-declaration-and-array-resizing, which thwarts Option Explicit. I'd warmly recommend declaring Dim v() As String before the ReDim v(1). — Mathieu Guindon 17 secs ago
skipped the "Rubberduck will soon be warning you about this" part :)
 
That's not the only thing RD will take issue with...
 
A thought -- is there any difference between a Dim foo As Variant and Redim foo(...) (without the Dim)?
 
RD doesn't see foo as a declared variable with the latter
 
Of course, i was referring more to the how foo would behave in VBA
 
3:20 PM
Yes - that's the static semantic from 5.4.3.3 that I quoted yesterday.
> If the name has no matches, then the <redim-statement> is instead interpreted as a <local-variable-declaration> with a <variable-declaration-list> declaring a resizable array with the specified name and the following rules do not apply.
Oh wait. That's a no, isn't it. If the first statement with that identifier is ReDim, it's treated just like a Dim for that identifier.
 
except it's executable
which is very weird for a VBA declaration
 
In a way - it only allocates memory and sets up the SAFEARRAY struct.
Although it does have a full page of run-time semantics.
 
got one: changing the element type is illegal at compile-time if there's a Dim statement
huh wait
 
Umm, not always.
 
wait how was changing the element type legal in the first place?
 
3:24 PM
well....
you can Redim a Variant....
Public Sub doit()
    Dim foo As Variant

    ReDim foo(2) As Long
    foo(0) = 1
    foo(1) = 2

    Debug.Print foo(0), foo(1)

    ReDim foo(2) As String

    foo(0) = "abc"
    foo(1) = "def"

    Debug.Print foo(0), foo(1)
End Sub
 
ah. it needs to be declared As Variant - then anything goes
 
Change the Dim foo As Variant to Dim foo() As Variant and this code breaks down
Ditto if you change Dim foo() As String, then above is illegal.
 
^ Yep - only if it's a Variant:
 
So I guess based on the behavior above, omitting the Dim is analogous to declaring a implicit Variant declaration.
 
Sub Example()
    Dim foo()
    ReDim foo(1) As String 'Compile error
End Sub
 
3:27 PM
yeah. that's basically just Variant()
which is not the same thing as a Variant
 
^
that makes a rather strong case against using a plain Variant for arrays... if only typed arrays weren't so stupid..
 
and once you type a variable as a Variant, Option Explicit no longer can help you.
 
Makes sense though. Dimming an array is creating a SAFEARRAY. A Variant can hold a pointer to one.
@this Option Explicit != Option Strict
 
IDK if the specification says so (it's not clear to me in the quote ComIntern posted above) but if a Redim without Dim results in a implicit Variant declaration, that'd be what we should treat those variables then.
 
3:29 PM
so ReDim doesn't just resize the array... it outright re-allocates it entirely
 
@Comintern even Option Strict isn't enough.
We need Option Stop That Black Magic Voodoo Implicit Conversion Shit Like Right Now
4
 
@MathieuGuindon Always. Preserve just copies the old one.
 
and cannot change the type, either
 
@MathieuGuindon Duh...
You need to look up memory management :)
What if you have a slot A assigned to a variable, then a slot B to the array, then a slot C to another variable.
 
@Hosch250 ok, but that doesn't say it should be allowed to change the cluster width
 
3:31 PM
@Hosch250 If there were "management" involved, it would preemptively allocate a large buffer and not copy a one or two element array.
 
You can't resize B because it would go into C's memory.
You have to re-allocate it entirely.
 
^
Even Preserve does that.
 
@Comintern No, that's not how arrays work.
 
it's also inconsistent: ReDim foo(1 To 10) does not change a typed array to a Variant()
 
That's how a List works.
An array is too close to the hardware level.
It doesn't even know how many elements it has.
 
3:32 PM
@Hosch250 Ummm... wut? If I allocate a block of memory for 10K elements of size x, that's mine to do with what I please.
 
@Comintern Arrays are fixed size.
(Using C++ terminology here.)
 
Dim foo
ReDim foo(1 To 10) As String
ReDim foo(1 To 10) As Long
ReDim foo(1 To 10) As Byte
 
With an array, you allocate just enough to store the fixed number of elements.
 
@Hosch250 The SAFEARRAY stores the bounds information - the memory allocation it's pointing to isn't. You're thinking of a C array, not a COM array.
 
If you start adding new features, like an add, etc, you are higher level than an array.
@Comintern That's what I just said.
 
3:33 PM
Even so, the SAFEARRAY wraps the plain old array pointed to via the pvData
 
And VBA probably uses C "tactics" here.
 
That one would get swapped completely
 
^ in the minds of pretty much anyone that types ReDim, the mental image is "the instruction lets me change the number of clusters in the array". here it's "the instruction lets me change the size of each cluster"
 
If I allocate 1MB and point my data descriptor to it, I can safely "resize" the SAFEARRAY up to N elements where N < 1MB.
 
I suppose so but I think you're expected to use safearray functions to allocate the memory for you
 
3:35 PM
@Hosch250 Right, which is why I scare quoted "management".
You buffer arrays like that in C all the time.
 
in other news .4100 just crashed on open, twice. seems to have something to do with the VBE showing up on a different monitor than the host app
 
The documentation has always said that Redim Preserve will create a new array of the new size, then copy the old array into the new array, then deallocate the old array.
 
(or not... but moving Excel to the other monitor before hitting Alt+F11 worked)
 
In C++ and C#, we just don't use arrays. We use vectors/lists, which do the buffering for us ;)
 
@this I know. I'm saying if they were smart, it wouldn't have had to.
(at least always).
 
3:39 PM
just to confirm if it does -- doesn't look like:
 
@MathieuGuindon Did it log anything, or just bomb?
 
Sub example2()
    Dim foo() As Long

    ReDim foo(2)
    foo(0) = 1
    foo(1) = 2

    Debug.Print VarPtr(foo(0))
    Debug.Print VarPtr(foo(1))

    ReDim Preserve foo(3)

    Debug.Print VarPtr(foo(0))
    Debug.Print VarPtr(foo(1))
    Debug.Print VarPtr(foo(2))

End Sub
 
@MathieuGuindon I run the app on 1 monitor and VBE on the other about 99.99% of the time. haven't had that crash in quite a while.
 
outputs:
 322370096
 322370100
 322370216
 322370220
 322370224
so they only allocate exactly what I ask for, it seems.
 
@Comintern argh, log was destroyed when I restarted
trying a repro
 
3:40 PM
Doh!
 
VBE is likely using Integer for screen dimensions.
Which is... insufficient.
 
> Nobody's ever going to need more than 640 pixels wide!
3
 
^
 
Eh? That's all in the Win APIs.
 
hm. I think they are using C++'s int
 
3:42 PM
nope. last couple of lines seem to imply it's the COM collector...
2018-11-13 10:40:41.0516;INFO-2.2.0.4100;Rubberduck.Parsing.VBA.RubberduckParserState;RubberduckParserState (2) is invoking StateChanged (LoadingReference);
2018-11-13 10:40:41.1586;TRACE-2.2.0.4100;Rubberduck.Parsing.VBA.ComReferenceLoading.COMReferenceSynchronizerBase;Loading referenced type 'Excel'.;
2018-11-13 10:40:41.1586;TRACE-2.2.0.4100;Rubberduck.Parsing.VBA.ComReferenceLoading.COMReferenceSynchronizerBase;Loading referenced type 'stdole'.;
2018-11-13 10:40:41.1586;TRACE-2.2.0.4100;Rubberduck.Parsing.VBA.ComReferenceLoading.COMReferenceSynchronizerBase;Loading referenced type 'Offi
 
aka VB's long
 
could be a red herring though, collector doesn't log completion
 
WTF? Nothing's changed in there, has it?
 
Aside: I find it interesting that VBA is last to be examined.
 
i.e. could be whatever code runs next
 
3:43 PM
This looks nothing like the typical reference priority list.
 
@this I find that frustrating, TBH. Still think that should be single threaded.
 
attach a debugger?
 
also, I moved Excel to monitor A ...and VBE showed up there this time - multiple monitors are likely unrelated to the issue
@this I'll have to repro that at home
 
@Comintern why would it be a problem, though?
 
3:46 PM
Because it's horribly inefficient with libraries that reference each other.
In the worst case, you could end up loading the mso lib 4 or 5 times.
 
hmm.
 
stdole is probably the worst offender - everything references that.
Good thing that one is tiny though.
 
But even if you did it single-threaded, you still have to resolve everything
 
Right, but the resolver can be free threaded.
 
3:48 PM
poor choice of wording
resolve all the COM references from imported libraries
 
Oh, yeah. Single threading it lets you take better advantage of the cache.
 
That's true. The alternative would be to do two-pass
first pass only to consume the ImportLibs
and thus build a list of libraries you need to analyze
 
then in 2nd pass, actually resolve the contents of the libraries.
 
Are the imports even exposed?
 
3:50 PM
they have to be...
 
AFAICT they just point to an external GUID that gets resolved at run-time.
 
but you always get the importlib statement
without that, MIDL won't even compile the IDL file
 
It doesn't even really need to care where that GUID lives.
@this Oh, I know that, I just wasn't aware that it was available on the ITypeLib interface.
 
ah...
 
If it was, you could fairly easily determine the optimal order to load them.
 
3:52 PM
well poop, you're right.
I forgot about that completely.
For olewoo, I imported a big & ugly function to resolve all the imported references
so that olewoo could build the importlib statement when generating a IDL from the ITypeLib.
 
In the collector, it just loads whatever it runs across as needed.
 
right because i'ts going though the referenced types
when it processes the individual types
umm. which makes the 2-pass option looks awful
hopefully we won't lose too much performance when we single thread it- I know you said it's fast. Just don't know how much of it is from multi-threading.
 
You might be able to make an educated guess from the PE, but that's a bunch of bare metal code off in the deep stuff.
@this I already did a comparison with a single threaded read. It's still fast.
 
oh, ok. so why aren't we single-threaded already?
 
shrugs
The time to load would scale with the number of referenced libraries.
 
3:56 PM
but if they all reference the mso.dll
the scale might be even logarithmetic
 
I was doing 12 of them, but you could potentially bog it down with some huge ones.
Granted, I only referenced one Office application though.
 
Right. I bet the picture looks much more worse for a project that references 4 Office application than a project that refrences 12 unrelated libraries.
There's also the idea to just serialize them, since the referenced library won't normally change that often.
then you don't have to worry about resolving the referenced libraries since that'll be all in there... right?
 
Yeah, that could potentially help, although I'm not entirely sure that's the bottleneck.
The deserialization could potentially be slower due to the data contract having to associate all of the references.
 
Do you really need to re-resolve them?
Couldn't you just do a check to see if you already resolved them?
 
Hardly ever.
 
4:01 PM
Only if they updated the library. Which is pretty rare.
 
Why not?
Oh.
 
One thing we do have to watch out for are some references that automatically changes on different host.
Typically that's just two --- the VBA version and the host's library.
 
The worst case is when you open a project that has a bunch of references that aren't cached yet.
 
I mean, if something references mso.dll, do you really need to re-resolve it if it's already resolved? Or am I misunderstanding the discussion?
 
@Hosch250 This is lower level than the resolver. When the typelibs are being read, they can have arbitrary external imports, and that cache has a limited lifetime.
 
4:03 PM
Oh.
But don't we already have all that data in the declarations?
From the previous hit?
 
So currently, If I have a cached Excel ComProject, then load Word, reading the Word library later snakes off into mso and misses the cache.
It's still all in the declarations, but when it's reading the typelib it can't use those. I suppose it could if we were tracking GUIDs, but it would be pretty complicated.
 
also consider that we resolve by types, not by library
 
Hmmm.
 
so excel might have type A from mso.dll while word would have type B from mso.dll, and we wouldn't know that both are from mso.dll until too late.
 
Release date committed! November 25th will see Rubberduck v2.3.0 released... and writing #VBA code (oh, *and* #VB6 too!) will never be the same again! Feature-freeze is in effect: excluding currently open pull requests, only bugfix PRs will be merged until then.
 
4:07 PM
I thought we loaded all the types.
Remember when we'd do weekly pre-releases in my internship, and thought that was fast?
 
We can't even really care what library the forward declaration was from until the ComProject gets processed.
 
IIRC, we loaded serialized declarations at one point in time in debug, but reverted to loading via COM because it was faster.
Btw, if you want to make the COM synchronizer Single threaded, you just have to change one line in the RibberduckIocInstaller.
 
It's almost certainly much slower to deserialize now too.
 
you know guys, i wish i was a good enough programmer to be able to properly use heaventools.com/overview.htm
 
@KySoto PE Explorer rocks.
 
4:11 PM
i bet i does
i got a trial copy to try to troubleshoot why this stupid ERP software upgrade is crashing
and by software crash, i mean the macro support
every place that has macros, crashes
 
@KySoto Does the trial copy include the disassembler?
 
i look at the dll file that its crashing over and its a dll to do with sql
yes it does
 
@this I've got a project that references Access, Excel, PPT & Outlook. That should do for some pain
> Based on your organization's access policies, access to this web site ( heaventools.com/overview.htm ) has been blocked because the web category "Freeware and Shareware" is not allowed
Le sigh... ^
and I'm on their naughty list again
 
Freeware? I wish. $129.00
 
go tell IT on the mountain
 
4:26 PM
@FreeMan Christmas already?!
 
@FreeMan I'm additionally getting a This incident will be logged note. ;) (And no explanation what category of taboo I'm violating)
 
@Hosch250 Since mid-September, judging by the local retail outlets
 
Makes sense.
You know, I was getting Valentine's day ads on Spotify mid July.
 
I had an interesting discussion with HR about new articles mentioning Dick Cheney back in the day...
 
@Inarion Yeah, I use "send secure ..." in the subject line of emails to ensure it goes through the encrypted/secure server, and I get "Your email contained PHI data" responses. I never know whether that's a "Hey, our scanner actually managed to detect something this time" or if it's just a random response when using the secure server
 
4:28 PM
New articles on what?
 
Dick Cheney
 
new articles?
 
Seriously?
He's ancient...
And out of politics.
Why care about him now?
 
Shhhhh... don't tell IT that I'm looking up things with Dicks in them.
 
but his name
 
4:28 PM
^
 
Oh, LOL.
Talking about that.
You should've seen my dad's face when I mentioned the character Dick from the Internet from a comic.
 
used to work for a mid-size pharma company. nothing was blocked and, realistically, couldn't be... work for a hospital system now, darn near everything is blocked...
 
He didn't approve of the pun.
 
@Comintern When I interned part of the orientation was "be careful about what you search for" and " 'Dicks' Sporting Goods " was an example that actually occurred. #PineapplesDontThink
 
LOL.
I remember my mom installing a swearword blocker.
I promptly learned some new sensitive words.
Cockatoo, anyone?
 
4:31 PM
@IvenBach Yeah, that not a sport that HR approves of.
 
Or Tufted Titmouse?
(My family is big into birds.)
 
You know, it's funny because back in today, everyone called Nixon "tricky dick" and it wasn't the naughty thing as it would be.
 
Having technical problems while writing your thesis in LaTex will have you search for interesting combinations... (don't click on Images)
2
 
LOL.
 
@Hosch250 don't forget boobies.
 
4:32 PM
If anyone called Trump "tricky dick", it would mean something else entirely.
 
^
 
My best remembrance of Nixon is from the Simpson: "I am not a butt!"
 
@this Ah yes, the Blue-footed &c.
 
yeah
 
Reading about artificial gravity.
I wonder what the effects of, instead of your head spinning faster than your feet (real) vs the effects of your feet spinning faster than your head (artificial) would be?
Of course, the effect of real is almost non-existant because of scale.
But the artificial one would be pretty bad for at least the near future.
 
4:36 PM
Wait, wouldn't you need to be standing on your head for that to happen?
Oh wait, read that backwards.
 
@Comintern No, because artificial gravity is when you are on the inside of a spinning system being pressed against the wall.
And you stand up--and the middle spins slower.
 
Because of conservation of angular momentum, or by design?
 
No, because the smaller radius travels less distance in the same amount of time.
 
Right, but conservation of angular momentum would slow the rotation of the system as your center of mass moved closer to the center. Think spinning skaters and arms.
 
The system is designed to be able to keep itself rotating at a fixed speed.
 
4:40 PM
Or spinning in your office chair.
2
 
@IvenBach Wheeeeeeee!!!!!
 
LOL
 
Or tire swings.
 
Boss: What are you doing?
 
That's one benefit of the non-open plan office.
 
4:41 PM
I loved those to death as a kid.
 
Me: Proving the conservation of angular momentum.
 
One day got dizzy and sick from it and couldn't ride them from that point on. #SadDay
 
Boss: Work, please...
@IvenBach Got sick and dizzy many times.
 
^^ But I'm conserving energy.
 
And banged my head daily for years.
 
4:41 PM
We're always being told to conserve more energy.
 
@IvenBach Boss: You get paid for expending energy.
 
We had the tire swing under a deck lower than 5'.
 
Sounds like a bad design more than anything else.
 
TBH, I banged my head so often, I have no idea why I'm not an imbecile.
And I had carbon monoxide poisoning as a baby...
 
@Hosch250 Ok, so you're not an imbecile. But are you a moron? :p
 
4:43 PM
@this I don't know. Most people don't seem to think so...
 
@Hosch250 Sorry to hear about that.
 
it might been that you got lucky in spite of having banged your head so often.
 
I have two theories.
 
I've took few to my forehead. :\
 
A) I was a sort of Einstein. Then I just turned reasonably intelligent.
 
4:44 PM
I fell on my head a lot as a kid.
 
B) My brain was re-growing as I was learning, so it just rearranged itself into smarter ways as it healed.
@Comintern What kids don't?
 
This should be a question on the SO developer survey. "How often were you dropped on your head as a child?"
 
I think this would be an inverse logarithmic scale.
Older ones got dropped more, younger ones less.
 
@Comintern I fear for the results of that survey.
 
@IvenBach LOL.
 
4:46 PM
1.) Never, 2.) Infrequently, 3.) Occasionally, 4.) Repeatedly, 5.) Huhhhh?
 
currently, kids get dropped on their heads, but they've got so much bubble-wrap on them the effect is NULL
 
Then there was jumping on the bed.
Eventually I was too tall, and crushed my head against the ceiling.
 
Dad: Here son, take this plastic bag as a space helmet. It protects your melon. Put it on and breathe deep
Son: :Bags head: :Breathes deep: :Passes out:
Dad: Ahhh I see you're coming to. How you feel?
Son: :mumble:
Dad: Told you it'd protect your head. New get back in there soldier!
3
 
I didn't usually fall off, though, much to my parents chagrin. I think they would've like it if their warnings about falling off would've taught me my lesson.
 
No wonder I felt at home at this pond. Ya'll are just as messed up as I am.
3
 
4:48 PM
LOL.
 
@this Has it been mentioned any static code analysis to see if the first declaration is Redim and if so suggest Dim?
 
I don't think that's the problem per se. We already know there's undeclared declaration; but in fact it's "declared"...
 
5:04 PM
I just accidentally ping'd MZ-Tools on Twitter about VB6 support ~grin~
 
Let me save you the effort of waiting for a response: "You need to add COM shims."
 
(he probably isn't wrong, BTW)
 
I know
still kind of a PITA regardless
 
5:20 PM
I think it is the same as with avalon, somebody just has to start implementing it.
 
For some values of "just".
 
I'd be happy to start Avalon, but I have no idea where to start.
I don't know enough COM to know where to start, or something.
 
That's the best thing to happen to #VB6 since @MZToolsSoftware! https://twitter.com/rubberduckvba/status/1062363856884895744
 
Besides, look what happened when I started the parser multi-error thing.
It got nowhere :(
Maybe I should take another stab at that.
 
I feel an itch to do it, but I have a few things on my list I want to do get I to RD first, like caching the COM projects for user code and readding member attributes after a rewrite.
 
5:24 PM
Well, I'll try to help, if you get the basic bits down.
 
Just to keep it in perspective, I'd wager that nobody thought we'd get that far as we are today 2 years ago.
 
@Hosch250 You can start at the beginning. Or, you can start in the middle. When you don't know where to start or where you're going, it doesn't really matter, does it?
 
My internship was two years ago.
 
For the multi-error thing, we have an error listener class useful for this now.
 
It was on the books then.
 
5:25 PM
^ @FreeMan
 
@M.Doerner Oh, nice.
TBH, most of what we've done so far was on the books back in my internship.
Except for smart-completion.
 
You can add errors to it and it will throw after the parse finished.
 
That would give us similar UI we have in VS' Error List
 
Hotfix on-going at work.
Or will be sometime in the next 30 minutes.
 
I added the missing } and now looking at the changes Rubberduck.Core.csproj added all the xaml files
  <ItemGroup>
    <None Update="UI\About\AboutControl.xaml">
      <Generator>MSBuild:Compile</Generator>
    </None>
    <None Update="UI\CodeExplorer\CodeExplorerControl.xaml">
      <Generator>MSBuild:Compile</Generator>
    </None>
    <None Update="UI\CodeMetrics\CodeMetricsControl.xaml">
      <Generator>MSBuild:Compile</Generator>
    </None>
    <None Update="UI\Controls\BusyIndicator.xaml">
      <Generator>MSBuild:Compile</Generator>
    </None>
    <None Update="UI\Controls\EmptyUIRefresh.xaml">
Does that sound right?
 
5:29 PM
I don't think so.
those shouldn't be necessary - there should be somthing like **.*.xaml already in the csproj
 
This is only on my image update PR. I'm not trying to cross the streams.
 
when I pulled from yours, I didn't get that, I'm pretty sure.
I did have a merge conflict, though
 
  <!--BEGIN XAML WORKAROUND SECTION -->
  <ItemGroup>
    <Page Include="**\*.xaml">
it does have the xaml section above it though.
 
and IIR, I got rid of explicit individual items from the csproj in the merge conflict
in the csproj there should be no explicit references to any single file (with some exceptions)
Pretty sure ComIntern's version of csproj is all you need
 
I'll work on that then.
 
5:36 PM
[rubberduck-vba/Rubberduck] build for commit ec75efb7 on unknown branch: AppVeyor was unable to build non-mergeable pull request
BUILD FAILURE!
 
5:58 PM
@IvenBach were you able to build? I see you haven't pulled from the next to fix the conflict.
 

« first day (1621 days earlier)      last day (1559 days later) »