« first day (1699 days earlier)      last day (1481 days later) » 

12:00 AM
Accounting for the annotation is a one-liner I think.
 
RELOAD!
[rubberduck-vba/Rubberduck] 3 commits. 3 opened issues. 1 closed issue. 1 issue comment. 3 additions. 3 deletions.
 
hmm but in this case, it stayed visible the whole time but lost icons anyway
 
Or "make one line longer" would probably be more accurate.
Is it reverting when you select it afterward?
 
> **Rubberduck version information**
The info below can be copy-paste-completed from the first lines of Rubberduck's Log or the About box:

Version 2.4.0.14335
OS: Microsoft Windows NT 10.0.17763.0, x64
Host Product: Microsoft Office x64
Host Version: 16.0.11231.20120
Host Executable: MSACCESS.EXE

**Description**

It appears that when adding modules to a project can cause interfaces to temporarily lose their interface icons.

**To Reproduce**

1) open a folder that contains an in
 
@Comintern no, must expand it to revert.
 
Yep, debugger doesn't hit the breakpoint if the node is collapsed.
 
confused but it's not?
or did you mean the node for the interface itself?
Just tested w/ the interface's children expanded. Still loses the icon.
 
It's a timing problem. In my test project, IsInterface is false when the tree refreshes.
Needs one of two things. Either defer rendering the TreeView until the parser state is ready, or do a second pass.
 
Would a second pass be weird? I think it would be preferred, but can already hear users' eyebrows raising
 
why can't it remember the icons it had?
 
12:14 AM
@this Because it's a binding on the Declaration, not on the VM directly.
 
I guess the correct fix would be to maek Declaration raise events to VM.
BRB, going to get me a barrel of monkeys to go w/ that can of worms...
 
I really don't like the idea of Declarations as event sources. I can hear the sucking sound of the memory leaks from here.
 
and now for something completely different... I'm a bit stumped on what is the correct architecture if I were to use MVVM patterns with a wizard-style dialog. Do I create a MVVM for each page, or do I use same model for all pages (which each will have their own VM)?
 
@MathieuGuindon Anything that's annotated could get picked up in the first pass, so it would only effect interfaces that weren't tagged. It's already doing 2 passes to update the reference usages.
 
that seems legit
Q: why are icons changing? A: add an @Interface annotation!
 
12:19 AM
but... I had it already....
 
The main reason it's working in 2 passes now is that it starts loading the Tree before references are resolved (which is apparently when the _subtypes are added).
I think that's legit. Especially if we add an inspection for InterfaceWithoutAnnotation.
 
I'm wondering if I'm missing something completely obvious because I always had the annotation....
 
@this In WinForms, I'd have the pages serve up their own controls.
@this The annotation isn't currently being checked. It's a hard "is this class implemented anywhere" check.
 
The controls aren't really the issue. It's more of how to handle the data that's being collected from each step. I don't want to tie it to a specific model that might change.
One model that encompasses all the steps might work but then that makes it unwieldy to work with each page's VM.
whereas a model per page means I have to know something about each model when we are ready to build at the end of the process.
@Comintern :blinded by the obviousness:
 
12:25 AM
@this Isn't a wizard just a structure way of collecting a common set of data? That makes me lean toward 1 VM.
Maybe with an Enum of WizardSteps that's bound to panel visibility.
 
I initially was going toward that but then thought that each page should have its own VM since it may have additional functions that are specific to this page.
BTW, I'm refactoring this wizard process - it's originally one god object
with smart UI to boot
 
The main VM could simply act as an aggregator for the steps though.
 
Hmmm.
There's other thing - not all processes are required. There's conditions, so we may not end up visiting all the pages
I kind of can see an aggregator. I guess it means that each model for each page that do get visited would need a common interface for the aggregator to work with.
 
@this Add visited pages to a collection.
You perform the aggregation of the wizard state by examining all steps that have been completed. Kind of like a builder.
 
yeah, that's what I was thinking - but the collection probably should be a collection of interfaces, so that way the aggregator doesn't have to know the details of each page's data.
Yeah. I think I do want a builder pattern here
 
12:30 AM
That sounds entirely reasonable.
So Inspection Results. Start the expanders in collapsed state? That takes advantage of the group virtualization and lets each group render lazily. The flip side is more clicking.
 
so in short, each page gets their own model + VM. The model implements a common interface that the aggregator will accept, then at end, aggregator builds using the interface., done.
Alright, thanks!
IMO, I would prefer collapsed.
Because when I'm inspecting, I will want to see which inspections is causing me grief and act accordingly.
 
Makes sense. If the IR window is docked, it kind of wants to be short and wide.
 
there is an exception, though.
If I'm using location grouping
e.g. I'm looking for problems in a particular module, I probably want them expanded.
 
There's not really a non-trivial way to have a single expander expanded if that's where you're headed. Not when they're built dynamically.
That might possibly be more code than the rest of the VM combined.
 
wowza.
 
12:34 AM
OK, gross exaggeration there.
Definitely not easy though.
 
Given the circumstances, I think a initial collapsed state is a preferable default over the "show me everything - oh wait, I can't read it all!"
because it's not often I get only 1 or 2 results.
I get in ballparks of 100s. :(
 
OK, we'll go with that for now then.
 
1:11 AM
@this Yeah, bad joke. I knew that--I've used them a few times for playing audio.
@IvenBach Have you ever nuked your NuGet cache?
 
1:51 AM
@Hosch250 A couple times, along with the RD install folder.
 
@IvenBach The one in your user directory?
 
C:\Users\ivenbach\source\repos\Rubberduck and where the Nuget packages are.
 
2:06 AM
Re #4028 - would right-click selecting be weird in the inspection results? The quick fixes are determined by the selected item, so there are a couple "dead zones" where you can get a context menu for an item half way across the window.
 
2:28 AM
“Good code is its own best documentation. As you're about to add a comment, ask yourself, 'How can I improve the code so that this comment isn't needed?' Improve the code and then document it to make it even clearer.” - Steve McConnell
2
 
2:48 AM
The only comment should be why it's done that way.
#BecauseIKnewNoBetterWayBackThen is no longer an excuse.
 
3:04 AM
@Comintern You mean the standard context menu (copy, paste, etc?)
 
No - they're quick-fixes for the selected item.
Although I could toss copy in there I guess. Paste wouldn't work.
 
@TweetingDuck I understand where this is going but I agree w/ @IvenBach - code can only tell me what they do but not the why which usually is very important and not always readily deducted from the does within the code at all times.
@Comintern Then I guess I didn't follow the question. I visualized the menu as acting on the entire row.
 
@this It's not the menus. Gimme a sec and I'll help you visualize it.
 
3:08 AM
^ Right clicking on an item gives a context menu of the available quick-fixes for it.
At least that's how I understood the issue.
 
That makes perfect sense to me.
My point was that the menu should work anywhere on the row
 
Yup. Could Ignore Once get an icon?
 
The problem is that the stupid grid has dead spots.
 
even if I've right-clicked the other columns.
(is that what you meant by dead spots?)
or is the whitespace a dead spot?
 
@MathieuGuindon Yep, I haven't added any icons yet.
 
3:10 AM
I understand dead spots as 1-2px areas that are clickable but aren't part of an item
 
I think the dead spots are mainly on where the grid lines would be if they were shown.
 
Round the borders? not sure that's worth worrying over?
 
I don't see it as a problem if you get no ctx menu for rt-clicking between two items...
 
^
 
Well, you can have the top item selected, then "miss" on the bottom item and get a context menu for something unexpected.
OK. I'll see if I can get the order right on the selection.
 
3:13 AM
Yeah, I'd rather get no context menu if this would be ambiguous
 
So, right-click drill down to select, plus enabled binding on the context menu to the selected item (not null).
 
since no ctx menu => STOP FLIP FLOPPING AND MAKE UP YOUR DARNED MIND!
should work, I think.
 
@Comintern such a click should probably make the SelectedItem null
> Rubberduck.Setup.2.4.0.4488.exe (4.03 MiB) - downloaded 162 times. Last updated on 2019-01-28
 
I think that's the default click behavior. If not I'll see what I can do.
Nope. It's tweaky. It seems to want the click dead center on the row. I'll see if I can fix that too.
 
3:27 AM
@Duga Damn you CW!
 
at one point i did considering writing the implementation for the factory
but the generics....
gonna pick yer poison.
 
@Comintern just so I'm clear -
 
Oh wait, did I misread that?
Yep. The diff view threw me off there.
 
ok, NP. I do not trust myself with things that are WTF WPF so wanted to be sure I wasn't missing something.
 
3:33 AM
It looked like this:
        private static readonly DeclarationType[] ModuleTypes =
        {
            InterfaceName = $"I{TargetDeclaration.IdentifierName}";

            Members = declarations.Where(item => item.ProjectId == TargetDeclaration.ProjectId
            Members = new ObservableCollection<InterfaceMember>(declarations.Where(item =>
 
oh yeah I see what you mean
 
@Comintern thanks for reviewing and feedback. I hope the rearchitecture makes sense.
 
NP, and it makes a ton of sense.
 
3:38 AM
just to be fair, Vogel helped add some of the sense to the nonsense I may have introduced. ;)
 
Nice.
That sentence gave me an idea for my BrainFuck IDE. I should have IntelliNonsense.
 
@Duga based on this, I am not sure it's always true everywhere but I can double-check. I'd rather be explicit at the construction, though.
lol
Since 4072 needs just a bit more work, we could just go ahead and merge the other 2 PRs?
probably start with Max's members attributes PR?
 
ctor overload or argument works too I guess - it's just that if we're setting a specific state in a ton of places, it seems like the pattern should just be explicit.
Or implied (which was my first instinct).
 
Yeah - TBH, I can't remember why I didn't do that originally.
 
I'm also go on the member attributes.
And the persistence service.
 
3:47 AM
I just checked - Max might want to address some of review comments first
 
Oh FFS. Can you fix the spelling of "Persistance"? That's my long standing mistake...
 
> To confirm, are you still seeing exceptions on exit as originally reported in the original post?
 
@Comintern Yes I can do that, though not tonight. :(
 
Oh, doesn't have to be tonight. I can do that in a separate PR too. It's been wrong for going on 5 years, another year isn't going to hurt.
 
lol
 
3:52 AM
Loving the VS spell checker, BTW.
 
yeah, earlier I used RD's rename and renamed my variable to Hightlight.
Then realized that I needed a spell checker.
 
Hmmm... RD spellchecker...
 
the trouble is that the spellchecker needs to be more like VS'
the one that you get with Word or whatever won't work very well
 
There are some NuGet packages.
 
 
5 hours later…
@this I could, but I won't be able to get to it before the end of February.
Also I really need to get a bit of a handle on cake before rewriting deployment, so there's that
 
 
1 hour later…
10:26 AM
Spotted some vba documentation on GitHub managed by MS. I note many Stack overflow labels.. Are they checking if used elsewhere? github.com/MicrosoftDocs/VBA-Docs/issues
 
 
2 hours later…
12:31 PM
@IvenBach #BecauseICan'tFindABetterWayRightNow can be when you're under pressure #ItsUglyButItWorksForNow #TechDebt
@Comintern Yes!!!!
 
12:44 PM
monking, @all! -9°F and about 30MPH winds today. Lovely!
 
@PeterMTaylor they use the SO label for issues where the OP is asking about their broken code rather than providing feedback on the documentation
In other news, I finally got my SuggestionBox bindings to work.
 
1:21 PM
A spellchecker might be nice, but not before our own code pane(s).
 
^ yup!
 
^^
 
1:47 PM
posted on January 30, 2019 by CommitStrip

 
SECURITY PEOPLE: You know how we make fun of users for not having “basic” security knowledge and blame them for not being interested in computers? This is what we sound like to everybody else. Like militant duck enthusiasts.
 
2:02 PM
@Feeds LOL, considering the temperatures...
 
@FreeMan Maybe consider moving there? It's warmer there:
 
@FreeMan It was -27 when I left for work.
My car barely started. It turned the engine 3 times, almost started 3 times, and then turned 3 more times before it started.
It was so cold that running the heater dropped the engine temperature by half on the scale thing.
 
Yes, the local news has been running stories about how it's colder here than Anchorage and the antarctic. Just wonderful... I'm warmer than @Hosch250, though, so I can't complain too much.
 
I turned it off shortly before I got to work to run the engine up to its normal temperature so hopefully have it slightly warmer when I leave, but I doubt it'll do much.
 
@Feeds the plumber's crack/crotch frame was... uncomfortable...
 
2:09 PM
Apparently parts of north dakota are colder than even the north pole.
@TweetingDuck I'm not a duck fan, but if I found ducks were surreptitiously taking nude pictures of me, I'd sure as heck do my research on them.
I'd buy a hunting license too. Pity that doesn't work with some companies I'm thinking of.
 
2:35 PM
> I have not seen the exceptions for a while now. I guess they were related to some other problem fixed in the meantime.

I will address the review comments tonight and do a test run under the debugger again.
 
What is the difference between the LL parser and the SLL parser? - The reason I'm asking is we have a VB6 code base with extensive use of the bang notation and i'm experiencing the issue described in github.com/rubberduck-vba/Rubberduck/issues/4405
 
I don't know much but I understand that LL allows backtracking whereas SLL doesn't.
 
I probably know less than @this, but the way I view it is the SLL is more eager.
 
By backtracking, it means that when it is present with several possible alternatives, it will pick one, try to match the rest of tokens according to the alternative branch.
 
It does a best-guess, and if it doesn't match, it has to try the slower, more accurate way.
 
2:44 PM
if it fails, then it will go back up, and try the other alternative.
@Hosch250 That's actually us retrying -- SLL will simply faceplant, so we catch the error and then re-parse using LL.
 
Perhaps by looking at the first child token and saying "it's most likely to be X path".
@this OK.
 
Yeah something like that.
 
Is there any way to disable the SLL parser?
 
Anyway, the bang notation is a problem more because we need to know the context about the parent that isn't interred from the parsing alone.
So I don't think disabling SLL parser helps us.
 
The SLL parser probably goes so fast it wouldn't make a difference.
It can parse a module in about 20 milliseconds.
 
2:47 PM
Lacking a counterexample, I believe the uses of bang either fall into 2 categories -- implicit default member access or evaluate member (though I think that has less to do with the bang operator and more with the bracketed expression).
 
It's our resolving passes that take a long time, usually.
 
Therefore, expressions like Forms!myForm!myControl needs to be expanded into Forms.Item("myForm").Controls("myControl").Value
 
ok... so the reason my project takes 10 minutes to parse and then crashes VB6 is the LL parser and there is nothing I can do about it for now?
 
It shouldn't crash it.
 
2:48 PM
It should just say "parser error" and the duck won't work.
 
but in order for us to know that, we need to know that the Item is a default member of the Forms interface, Controls is the default member of the Form interface, Value is the default member of the Control interface. That information we need to have in order to resolve the expression correctly. That information can't be had from parsing alone - we have to fill in the blanks from somewhere (e.g. type libraries)
@BlueEel I'm wondering - are you looking at the memory usage?
 
\o
 
yup. the VB6.exe uses about 120mb with our project open - until i start parsing at it exceeds 1gb...
 
I think that is more likely the source of the crash
 
yikes.. how many modules and referenced type libraries are we looking at?
I bet the inspection results TW is hogging a good chunk of the resources all by itself
 
2:54 PM
@BlueEel if you are also willing, please share the logs & diagnostics at the issue #3347
 
about 225 forms, classes and modules
 
@MathieuGuindon It'll hog even if it's not initially visible? In my other Access project I mentioned few days, I hit 1 GB ceiling even though I don't have it visible.
It probably has around the same number of the objects.
 
@this yes
(AFAIK)
 
1GB shouldn't be a problem for VB6.
 
Ok.
 
2:57 PM
I still think at least some windows should lazy load so we can just say "don't use X feature until we fix this.'
 
I'd suspect that it has to do with something on one of the forms. Might be better as its own issue depending on the logs.
 
1GB where 85% is our stuff isn't really ok though
 
@Comintern Unless it has same weird arbitrary ceiling that I was talking about with Access? I honestly have no idea how they did memory management back then in '97....
^
 
I'm not saying it's OK, but it shouldn't cause VB6 to crash.
VB6 should be closer in design to VS6 than it is to the VBE, and I know VS6 doesn't hit a memory cap at 1GB.
 
GTK.
Like I said, I absolutely have no idea how they did things back then.
I remember back in the old days System 6 had a settings for all applications where you could manually set the memory minimum and maximum. I guess sizing wasn't a thing back then.
 
3:06 PM
I don't know what's going on - now it doesn't crash :-S
2019-01-30 16:04:14.1680;DEBUG-2.4.0.4488;Rubberduck.Parsing.VBA.ParseCoordinator;Parsing run finished after 736,1032026s. (thread 12).;
 
Oh, that's a decimal and not a thousands separator in 736,1032026s. Whew!
 
I'll see if I can upload some logs tomorrow - it's closing time.
Thanks!
 
that would be more than 10 minutes of just parsing. We probably haven't started inspecting yet.
(right?)
 
right
 
tomorrow, verify if crashing comes from inspecting.
thanks so much for coming and sharing! We appreciate it!
 
3:09 PM
it's a fairly big project - but I think it's the bang notation that's hogging it
 
Right - that'd be another thing - maybe screenshots of how parser is resolving those expressions would be good, too.
 
that's great feedback, thanks for sharing this!
 
Give us an idea of how parser is resolving and whether it's doing it correctly or incorrectly.
I know that bang notations and bracketed expressions has been problematic for the parser.
 
"screenshots of how parser is resolving those", you mean the "status bar"? helpful indeed, but rather hard if the VBE crashes ;-)
 
Bang notations and bracketed expressions has been problematic for VBA in general...
 
3:13 PM
@BlueEel there's a checkbox in the inspection settings, checked by default, that you can uncheck to make inspections only run when you request a "refresh" from the inspection results toolwindow itself
 
@MathieuGuindon Yes. That was for the case where he did get it parsed without crashing.
 
won't help the bang notation, but should help identifying whether inspection results are contributing to that 1GB
 
@Comintern O RLY?
 
[O!RLY]
 
I wonder if the Antlr guy could help us with getting bang notation to parse with SLL
 
3:16 PM
hm. Why do we need to use LL?
 
because we want that parse tree??
 
The bracketed expressions seem like they'd be more difficult IMO.
 
No, I mean, what I said earlier was that we have no information about the context as part of parsing, so that is irrelevant to parsing?
that'd have to come in later as part of resolving.... right?
 
Is the issue with bang notation that you can use keywords after? Foo!Input or Foo!If?
 
my understanding is that the long-running "parsing run" doesn't involve the resolver passes yet
@Comintern could be. ...no idea actually.
IIUC in order to understand what makes SLL fail, you have to think like Antlr does
 
3:20 PM
@Comintern kind of implies that the part after the bang should e treated as a string literal
though I think that you'd have to bracket if there's whitespace Foo![If Input]
 
on the bright side, the parse is completing. with the original VB6 grammar from 2015, it would have blown up well before that
 
^
 
There is that.
 
so to my mind, bang notation should mean that the next token is an identifier, not a keyword.
 
yeah. I guess it's somehow ambiguous though, otherwise SLL would just zoom through.
 
3:23 PM
Right. woud have to look at the parse tree.
Anyone else want to fire up that eclipse?!
:D
 
I probably have it somewhere but I think the .g4 files are outdated. :(
even more fun considering we invoke some .NET functions now
 
thank line continuations for that
 
@BlueEel @this Let me give some background about the difference between the LL and SLL parsing mode and why the bang notation is a problem.
In each step, the SLL parser uses a finite context free automaton to determine which alternatives are viable. It then takes the first option found.
I am not completely sure about how the LL parser works. However, I think it back tracks and reverts previous decisions on subrules when it fails to resolve a grammar rule.
The problem with the bang notation is that the character ! is a type character in VBA.
 
ooooh
well there's the ambiguity
 
3:36 PM
So, when the SLL parser descends into the rule for the identifier on the left, it consumes that character as part of the identifier.
 
do we define type hints as "must be followed by a space"?
 
Won't work - ?TypeName(1!)
 
Since it is context free, it simply does not know that it will need that character in the rule one level higher.
It is the type character for Single.
 
To be clear, we're eating it by single character each? We are not eating it per token?
 
3:40 PM
That character is its own token.
We eat it token by token.
 
Alright.
 
@this For me ?TypeName(1!) returns Single in Excel's VBE's immediate window.
 
hmm. ?Forms! frmMain.Name does not seem to be legal. I get a compile error.
@M.Doerner Yes, same here - I actually typed that before Mat's question to find out what it was.
 
It's 0.4°F on my front porch now. #GettinToasty
 
Ah, I missed the context.
 
3:44 PM
I assume we did already try to constraint the type characters to require either whitespace or end of line or non-identifier characters like )?
 
not sure we did..
 
After all, we would get a compile error if we tried a&b; it'd have to be a & b.
but...
?a&*b
 0
 
So, the idea would be either to introduce a predicate checking that the next character is not a legal start character for an identifier or, maybe better, to check that the following token is not an identifier.
 
I think that seems reasonable.
 
I prefer the token version. It will be simpler to implement.
 
3:54 PM
does predicate checking require use of .NET expressions?
 
What exactly do you mean?
It requires .Net code, but no regex.
 
Start over. How do you implement a predicate check in a .g4 file?
 
{predicate code}
 
like this? singleLetter : {_input.Lt(1).Text.Length == 1 && Regex.Match(_input.Lt(1).Text, @"[a-zA-Z]").Success}? IDENTIFIER;
 
Yes
 
3:57 PM
so it is going to use .NET code in order to discover the next token.
 
Is this correct?
lExpression mandatoryLineContinuation? EXCLAMATIONPOINT mandatoryLineContinuation? unrestrictedIdentifier # dictionaryAccessExpr
I didn't think you could use a line continuation there.
 
I honestly don't know.
 
i just checked it doesn't seem to work
 
Getting the next token is the _input.Lt(1).
 
I don't think it works in either position.
 
4:00 PM
this is after prettifying:
Debug.Print Forms! _
          ; frmMain.Name
 
I think La(1) provides the token type identifier, which probably more appropriate here.
 
This is what 5.6.14 says, but I don't think that works in practice:
> dictionary-access-expression = l-expression NO-WS "!" NO-WS unrestricted-name dictionary-access-expression =/ l-expression LINE-CONTINUATION "!" NO-WS unrestricted-name dictionary-access-expression =/ l-expression LINE-CONTINUATION "!" LINE-CONTINUATION unrestricted-name
 
have you guys ever heard of Hawaiian rolls?
 
Public Sub t()
    Dim s As String


    s = forms! _
        frmMain.Name

End Sub
that is a compile error
 
i ask the question that way cuz my co worker... has never heard of hawaiian rolls
 
4:03 PM
@KySoto Yes. It's kind of like a sweet bread, more like a form of challah that isn't woven.
 
i was making sure i wasnt crazy for expecting him to know what they are
 
To be honest, I did not know.
 
@KySoto TIL.
 
-_-
 
And today he learns too.
 
4:04 PM
@M.Doerner are you in north america?
 
But I am german.
 
ahh
yeah so that makes sense
i feel like its a bit of an american thing
 
The next step is to say "today is your lucky day!" and take him to lunch with Hawaiian rolls.
 
might be in canada
i think it would be better to have my dad bake n butter some up
 
uh, when I hear hawaiian rolls, I think of those gross white fluffy thing they sell at your local grocery's bakery department.
 
4:10 PM
@Comintern depends if mandatoryLineContinuation includes a WS
@this #TIL
 
@MathieuGuindon do you have an example supporting this?
 
@KySoto they're delish!
 
+1!
they made me hungrier
 
@this uhm, not knowing that foo! _\r\nBar was illegal
 
i had 2 this morning to combat nausea from a migraine... and then nausea from the migraine meds
 
4:13 PM
just making sure there wasn't a counter example that I didn't think of.
 
mandatoryLineContinuation : LINE_CONTINUATION WS*;, but IIR doesn't the VBE prettify it to always include the space?
 
no, it chokes and claims a syntax error
 
^
VBE is kind of stupid when it comes to those single character tokens.
 
4:56 PM
Line continuations always have to include a leading space.
The leading whitespace gets consumed by the token.
 
What do you mean by "self reference"? When then project is loaded it's implicitly in scope within that project. The worksheet document objects belong to the project, not the workbook. — Comintern 16 secs ago
Any clue what OP is after there?
 
There is a situation where this is necessary to allow using a sane predicate in some rule.
 

« first day (1699 days earlier)      last day (1481 days later) »