« first day (1684 days earlier)      last day (1496 days later) » 
00:00 - 20:0020:00 - 00:00

12:00 AM
RELOAD!
[rubberduck-vba/Rubberduck] 2 commits. 6 opened issues. 3 closed issues. 43 issue comments. 49 additions. 10 deletions.
 
@Comintern There are entire companies devoted to that.
 
Interesting. And glad I don't have that job.
Hmmm... trying to decide whether to dig in on "Find / List VBA Breakpoints" or "Rubberduck programming language"...
 
#VisualStudio's code analyzers are powerful, but maybe you want Roslyn to help make sure your code meets your style guide. Let @meziantou show you how to write your own analyzer: http://msft.social/J4FN52
 
@this What's the issue you see with InspectionSeverityImageSourceConverter in #4660? Is it just the transient converter use?
 
12:15 AM
We arent disposing the stream
Btw, it wasnt me who found that. The credit goes to Max
 
The ImageSource needs it, doesn't it? I think we just need to call Freeze before returning it, right?
I'm not exactly clear on when the stream gets flushed.
 
Seems wrong to keep newing it up, no?
 
I suppose I can try it and see what breaks...
Yeah, I think most of the image handling should be made static.
Giving this a go:
            using (var ms = new MemoryStream())
            {
                ((Bitmap)source).Save(ms, System.Drawing.Imaging.ImageFormat.Png);
                var image = new BitmapImage();
                image.BeginInit();
                ms.Seek(0, SeekOrigin.Begin);
                image.StreamSource = ms;
                image.EndInit();

                image.Freeze();
                return image;
            }
 
Ok, can we also avoid transient nature or cache? Seems silly to keep recreating image again and again, too.
 
Well that resulted in no images...
 
12:21 AM
fun
i think Max suggested caching in a dictionary but need to search chat history to be sure. On mobile.
 
That makes sense - I statically loaded the CE ones.
What I'm not clear on is why BitmapImage has a stream source, but isn't IDisposable.
 
Wut?
Could we avoid by not using bitmap? Use image instead?
 
Memory stream officially cannot be disposed there.
 
Huh. We were thinking it was the source of memory leaks
 
sounds like the approach is wrong then... why are we not just binding them normally?
wait lemme guess - the nodes aren't in the visual tree
we could put them in a datatemplate
with a TemplateSelector that basically switches over the type of the node
 
12:32 AM
I'm thinking we're probably fine if we just ensure that they only load once.
 
IIRC the whole "load them into bitmaps" thing was due to problems/misunderstandings of how image sources worked... we got that sorted out since, didn't we?
load once, leak once ;-)
 
For some values of "leak", I guess. If they persist for the lifetime of the application, it's just a working allocation.
What sucks is that is that pattern is wrong\unnecessary, that's a ton of changes.
That also wouldn't cover the use case of dynamic images, would it?
I mean, we don't want to constantly be re-loading from the resx file, right?
 
Cache. All the things
 
Really sounds like a TemplateSelector's job I think. Could be wrong.
 
Even if it were, no reason to re-blit the images, right?
 
12:41 AM
I do think we want to freeze them though.
 
12:57 AM
I'm not clear why we even need to load them like this
 
There is much unclearness here.
I'd just assumed the reason we were loading them that way was to prevent repeated loads.
 
unless I'm out of my mind it dates all the way back from 2014 and a SO answer about using resx images in WPF
 
I.e., an image isn't going to change, so load it and forget it.
 
we don't load any other icons like this anywhere else
 
1:00 AM
@Comintern had my upvote before that 2017 edit
so... possible!
 
The binding is a lot cleaner in most cases.
I like the idea of an image source converter.
 
> No luck yet. Did a clean install of MS Office on 2 computers, the installed RD. Still getting same behavior on both .
Is it possible that the OS is the problem? I participate in the Windows Insider Program and am running Build 18312.rs_prerelease.190104-1630.
 
1
A: Binding a value converter to the object or the type

Michael Gif the DataContext is set to your ViewModel instance, then just try the following: <Border Visibility="{Binding Converter={StaticResource BossVisibilityConverter}}"> Also, you might want to look into a DataTemplateSelector public class PersonDataTemplateSelector: DataTemplateSelector { p...

 
> No luck yet. Did a clean install of MS Office on 2 computers, then installed RD. Still getting same behavior on both .
Is it possible that the OS is the problem? I participate in the Windows Insider Program and am running Build 18312.rs_prerelease.190104-1630.
 
@Duga gosh I hope not!
 
1:06 AM
DataTemplateSelector would definitely increase the amount of xaml for some of the images.
 
I.e., in the CE the selector would need to have 20 or 30 templates to choose from.
 
but would probably perform better than a converter
and DTs can be pulled into resource dictionaries
 
Maybe - wouldn't it force a re-render of the entire template?
 
well I'm thinking of a DT just for the icon part
rest is just a node, no?
 
1:08 AM
Right.
 
ugh. something about "DT" is making me twitch... can't quite put the finger on it..
 
lol
This is my current implementation: github.com/rubberduck-vba/Rubberduck/blob/…
 
what I like about it is that the C# code would just be a pattern-matching switch, and everything else pure xaml
 
Having the converter lets me multi-bind it, which lets it respond to multiple property change notifications.
 
hmm
I honestly don't know what the best solution is
 
1:12 AM
I actually only use the passed node parameter - the rest is there just for binding.
It simplifies the back-end code in the VMs tremendously.
I have no clue what the best solution is. I went for ease of binding and code consolidation more than anything else.
 
is there a way to phrase it in such a way that it would be on-topic to ask on SO which is objectively better to use?
 
CR question?
 
maybe yeah
I havent posted on CR in ages..
 
I'm not entirely sure of the quality of the c# CRs anymore. The VBA reviews have slid a long way.
 
that would make a what, 79th post on CR?
 
1:15 AM
:-D
 
20-some more and we can get RD tag badges lol
 
That would be awesome.
The more I look at DataTemplateSelector, the more I want to abuse it instead of use it in the way it was intended...
You could switch bindings at run-time with that thing for example.
 
It's kind of exactly what it's for
combine with data triggers and styles... xaml is wonderful when it cooperates...
when it cooperates
 
Emphasis everone's apparently.
146,592 questions tagged WPF on SO right now.
 
@Comintern what's that used for?
 
1:27 AM
Recycling the TreeViewItems. Every time there's a reparse, the Declaration changes.
Binding to IsExpanded and Declaration pick up things like accessibility changes, etc.
It was the easiest way to get the damned icons out of the models.
 
hmm that's right... can't just switch on a type...
 
Yep - it needs the Declaration too.
IsExpanded is only for folders.
It managed to drag a second copy of every single ImageSource in the tree into the models.
 
1:57 AM
OMG, the sorting and filtering in the InspectionResultsViewModel is a performance nightmare.
 
kill kill kill
 
We keep 2 copies of the observable collection?
 
don't ask...
 
Where's my refactoring chainsaw...?
4
 
2:36 AM
@Comintern That's not refactoring. You're restructuring. Oh wait... Chainsaw. Definitely refactoring.
 
Do you guys have any idea what's going on here?
 
Well currently I'm fighting with VS to stop it from displaying 2 different autocompletes on top of one another.
 
@Phrancis that method looks like a constructor
 
namespace House
{
    class Outside : Location
    {
        public Outside(string name, bool hot)
            : base(name)
        {
            Hot = hot;
            Name = name;
        }

        private new string Name { get; }
        private bool Hot { get; }

        override public string Description => Hot
            ? "It's very hot here. " + base.Description
            : base.Description;
    }
}
@MathieuGuindon It's meant to be a constructor, what am I doing wrong?
 
You need to pass parameters to the base ctor.
 
2:41 AM
OH
<3
 
^
@Phrancis keep in mind that the base constructor always runs first
 
Ah OK, so if you keep inheriting from classes in a "chain" then I must pass all the arguments that are required by all the constructors along the chain
 
^ Calling base(name) doesn't seem right if you override with new string Name.
 
also if a class implements a constructor, then there's no more default parameterless constructor unless you make an explicit one
 
2:44 AM
@Comintern Should I just disregard this? ^^
 
Location has a Name property huh
 
@Phrancis No. You should make Location.Name virtual and override it instead.
If you're using the parameter, don't override it - only do that if it's different.
 
:lurks:
 
@IvenBach Doing it wrong.
:-)
 
Hm, so if Outside inherits from Location do I even need to have a Name at all in Outside?
 
2:46 AM
haha
 
@Phrancis depends what the Name is
 
@Phrancis Nope. Only if it has its own specific implementation that is different from the base class.
 
but in this case I'd suspect, you don't
 
Oh, that makes it way simpler
 
inheritance
 
2:47 AM
And that's why we have base classes.
 
That feeling when you finally #GetIt :)
 
and that's why we VBA can't have the nice things
 
Thanks guys for un-confusing me
 
@Phrancis That's why the pond is so great. We only judge the code, not the coder.
 
2:51 AM
Have a star
 
I need to be careful with the chainsaw here. I should probably leave some stuff in the VM...
Wait, wut? That compiled?
 
in Coding Projects and Factorio Heaven, Jan 11 at 21:08, by skiwi
My code works and I don't know why
 
LOL
Works might be a stretch. I forgot I broke bindings and not code.
 
Gotta lurve dem runtime error...
 
Yup. Just about as much as the 4 word error description.
> RuntimeBindingError: You f'd up.
 
3:44 AM
> 'SheetAccessedUsingStringInspection.DoGetInspectionResults' ran for 36791ms;
Ouch.
 
In fairness, this project is huge.
Are the inspection filters supposed to be mutually exclusive? I can't figure out why they're in a grouping.
 
they should be togglebuttons methinks
 
OK, that's what I thought.
 
wait they are togglebuttons, ...I missed the grouping in PR review! :/
looks at source markup
huh, they're menu items
hmm
 
4:01 AM
Fixed it.
The only thing that I don't like are the check marks when they're selected.
 
Can you make them look "pushed"?
(and put the caption in a tooltip while we're at it!)
 
Yeah, that's what I was thinking. I can use the styling from the signature button.
 
I'm not sure I like the drop-down for grouping either.
If I take the captions off, that frees up a ton of horizontal space there.
 
aye
I like that TW dead docked RHS :)
 
4:06 AM
OK, time to see how this likes a couple thousand results...
 
holds jaw in place ok
 
lol
Ooops. That took Excel down...
Think something needs to move to the UI thread...
 
well that was fast :)
tbh I doubt the logs will show much different inspection runtimes
but the UI might be noticeably more reactive
 
Yeah, the runtimes shouldn't matter much.
Although, it might be possible to yield return them at some point.
 
ooh that'd be nice
actually that's kind of a prerequesite for showing them in-module
 
4:18 AM
That's what I was thinking too.
If nothing else, it gets rid of the long wait for the slow ones.
25% dev time. 75% build time. Ugh.
O_O
FML - we're rendering two results grids.
 
[Del]
 
This is kind of fun. I do about 99% libraries and console apps at work.
 
4:40 AM
omg it happened.
How do you define real? — safesphere 23 hours ago
@Comintern I wish...
I actually voiced out loud the idea of scrapping my xaml nightmare and writing it in ...vba.
 
:-D
 
5:18 AM
OK, so the filters are damned near instantaneous with roughly ~1000 results. Next up is the grouping.
Initial load time is still pretty horrendous though.
> 2019-01-14 23:14:51.0042;TRACE-2.3.1.41782;Rubberduck.UI.Inspections.InspectionResultsViewM‌​odel;Inspections loaded in 25666ms;
I'm starting to wonder if the GroupingGrid is overkill for what we're displaying in it.
 
 
4 hours later…
 
2 hours later…
11:18 AM
> I'm developing on the Win10 Insider build, so I doubt that the OS is responsible in this case..
 
 
2 hours later…
1:22 PM
@MathieuGuindon Would you mind to add the French translation at some point? I think nobody else here is able to do that.
 
@KySoto seriously? I didn't think assembly was that bad. Kinda enjoyed it. Maybe because I got a handle on it and everyone else struggled.
@Hosch250 tracks are in use - no rust on top of the rails. Abandoned lines (or rarely used ones) are rusty on top just like on the sides.
 
I also think assembler is not that bad; it is just a bit tedious for larger programs.
 
1:43 PM
@M.Doerner oh, yeah!
 
@SonGokussj4 ping for czech translation.
@MathieuGuindon maybe remind the spanish guy, too?
I'm thinking of just merging Comintern's work on CE into the next and let people play w/ pre-release then offiicaly release 2.4 on weekend before we merge any other PRs?
 
So now that the inspection results groupings don't require N grouping grids, are there any other groupings I should add? By inspection maybe?
 
yeah, by inspection would be good. I don't think we have that and it's annoying to go through random placements
 
Any others? That's the only one that pops to mind.
 
do we have location (module/selection) already?
 
1:49 PM
I should probably scan the open issues for the window too.
We have location and severity.
 
The inspection type comes to mind.
We had that previously.
 
That's right, we did. I wonder when we lost that one.
 
It's still there in my last PR.
It was the default.
 
Huh. It isn't in the grouping drop-down in my fork.
Can you switch back to it after selecting a different grouping?
 
I have to admit that I never looked in the drop down.
I just left it on the default.
 
1:54 PM
 
Can't test right now; no RD at work.
 
First toolbar update.
Filters are now toggle buttons.
The filtering and grouping is really fast now, but the rendering time is still a bit long for my taste. Scrolling is a bit sluggish.
 
did you update the image converters there?
 
Yep.
 
any change in memory footprint?
 
1:57 PM
I haven't profiled it yet, but I don't think they were leaking anything. Everything that mattered was already static. We were needlessly churning converter objects though.
I wonder if I could get the severity counts on the toolbar ala the VS error window...
 
i was mainly curious because of previous discussions about image handling w/ inspections
 
2:17 PM
@Comintern:
 
lol
 
2:41 PM
@this Hey! How much time I have till release so I can plan my days?
 
technically it's late and I'm thinking not until this weekend.
because I want us to use the pre-rlease for a few days beofre we mkae it 2.4.0 for reals
 
Okay. I'll try to finish missing parts in 2 days and modify current mistakes by friday/saturday morning.
(then I'm out for 3 days)
Ping me day before you want me to do PR
 
:+1:
 
2:59 PM
Merge pull request #4712 from rubberduck-vba/issue-templates

Adding bug report issue template to the repository.
> I agree, let's merge this baby next week, after the 2.4 release :+1:
 
@this The CE is going to need "field testing" before it green releases.
 
hence the thought to merge it today,
let it mellow for few days more
then release 2.4 on the weekend
 
rawr
 
Mellow? The old one was mellow. :-D
 
nice!
 
3:09 PM
no it's rancid
 
@Comintern is it still wip?
 
Nope. Probably needs review though.
 
@FreeMan i dont know how to envision assembly in my head
 
@KySoto have you tried BrainFuck? it feels kinda similar, except assembly is more reaadable :)
 
@Duga how does ```suggestion work?
 
@Duga ok that worked
 
 
3:39 PM
oh FML
@Comintern ignore all these suggestions, I just realized it's using C# 7 null-equality
 
@MathieuGuindon Yeah, is is recommended because you can't override it.
 
awesome feature
 
You can override ==, so you can get some crazy results like null == null returns false, and such.
 
@MathieuGuindon i dont feel like im smart enough to wrap my head around it.
also, holy eff. the american VA has a non absolute trash user appointment schedualer
as in, i didnt have to call people and wait on the phone for 30+ minutes to schedule one!
 
3:47 PM
I still think that a comparison using == is usually more appropriate since whatever somebody overriding that operator deems equal to null should be considered unusable.
The main problem there is that most people override the operator do it wrong, us included.
The override in the SCW is borked because it is not symmetric.
If a wrapper w is wrapping a null reference you get w == null -> true and null == w -> false.
 
shouldn't we fix that?
 
I just never got around to fix it.
 
@MathieuGuindon TBH, I'm not sure it makes a difference on the tests I'm making. Do we override equals on Declarataion?
 
it doesn't strike me as something that's impossible
 
4:00 PM
Me either. Are the suggestions one commit? I want to pull the comment in and not the others.
 
@M.Doerner No, null doesn't mean "unusable". It means no value.
 
one commit per suggestion, I think
 
So is null will always mean the same thing. Then you need to do additional checks on top of that.
 
@Hosch250 Actually, no. It means the value is not known.
 
4:02 PM
is null will have the same logic as the ?. operator, while == null will not.
 
in fact some people will argue against calling null a "value"
 
@this except Mrs.Null
 
oh yeah, sucks to be her.
 
FWIW, I like the Maybe/Some monad.
And the Result monad.
 
HRESULT FTW!
 
4:16 PM
> OK, will continue to investigate. But, I don't know where else to look. But, I'll keep trying.
[rubberduck-vba/Rubberduck] build for commit d22d20f6 on unknown branch: AppVeyor build succeeded
 
4:48 PM
[rubberduck-vba/Rubberduck] build for commit d22d20f6 on unknown branch: AppVeyor build succeeded
 
0
Q: Is there a more elegant way to put this series of filters?

Nick LantaI have a ton of code blocks for autofiltering a report and applying a value to the SpecialCells(xlCellTypeVisible) range. It does the job, also quickly, but I just would like to truncate it wherever possible so I could lessen the strain during any debugging period. With P_Template.Worksheets("S...

 
@QuackExchange what's with the indentation?
 
i have to say that the diff rendering in the GH is weird AF when there's been a large amount of changes.
kind of wished they would be more "block-y"
instead of - and + interspersed
 
Indent a level on auto-filter? Thats...interesting...
@this TBH I usually either pull the branch to local or open the raw file in another tab when there've been a ton of changes.
 
5:02 PM
maybe I should do that.
 
 
2 hours later…
7:22 PM
stupid question - can XAML be partial in same way like a class?
 
XAML is basically a code-generator that creates .cs code ..in a partial class
 
user image
2
 
other than moving resources (styles, templates, etc.) into a resource dictionary, I don't think you can split a .xaml file in two just like that
 
He may not be the hero we deserve, but he's the one we got.
 
i wondered because the CodeExplorerControl.xaml seems to be a wee bit too big for its britches.
@IvenBach I think they misspelled Thanks
 
7:25 PM
@this templates & styles can be extracted and pulled into their own .xaml files
 
@this Or possibly T.Hanks?
 
feh, could be its own PR, I guess.
 
7:47 PM
@IvenBach perfect.
 
@this Agreed - the TreeView should probably be its own control for one.
 
00:00 - 20:0020:00 - 00:00

« first day (1684 days earlier)      last day (1496 days later) »