« first day (362 days earlier)      last day (2818 days later) » 
00:00 - 16:0016:00 - 00:00

12:00 AM
Nice job duckies!
 
RELOAD!
[Cardshifter/Cardshifter] 2 commits. 5 opened issues. 1 closed issue. 10 issue comments.
[retailcoder/Rubberduck] 17 commits. 7 opened issues. 3 closed issues. 10 issue comments.
[Zomis/Duga] 1 issue comment.
[Zomis/Duga] 1 closed issue.
[Zomis/Rubberduck] 2 commits.
 
@Duga it feels really weird to see that...
 
Weird, guess it's that language translation eh?
 
Who do I have to pay to get VSDiagnostics in there as well?
 
@Phrancis yes, it is
@JeroenVannevel probably @Mat'sMug or @RubberDuck.
 
12:13 AM
You just have to add a hook @JeroenVannevel. Right @SimonAndréForsberg? I don't remember how to do it.
 
oooooh that sounds like a lot of work
 
I don't mind if you add it to the room's feed.
It's not.
I mean, your project is oddly on topic in here...
 
Yeah. I built this for you
so you could get some standards up in rubberduck
got the hook information handy?
 
@JeroenVannevel http://stats.zomis.net/GithubHookSEChatService/hook?roomId=14929
 
What's the secret?
 
12:16 AM
No secret
use application/json
 
[Vannevelj/VSDiagnostics] Ping: Non-blocking is better than blocking.
2
 
Hello duga
3
 
12:35 AM
It is so damn easy to write unfathomable linq.
 
12:50 AM
How do you ping a repo?
So, I have the check working on most references.
Notably, it crashes on certain types, specifically classes.
I don't know why, but when I try to enumerate the enumerable, it crashes with an NRE.
I have it in a try-catch for now, but I've got to find out why it crashes.
 
all-in on declaration.Context being null on classes.. or something like that
damn my laptop is slow
 
[Vannevelj/VSDiagnostics] Vannevelj pushed commit 30bb23a6 to issue6: Added initial tests and analyzer skeleton
 
Nope, I check that in the LINQ call.
 
[Vannevelj/VSDiagnostics] Vannevelj pushed commit b52b74ec to issue6: Implemented the analyzer
[Vannevelj/VSDiagnostics] Vannevelj pushed commit acdebde8 to issue6: Implementing code fix
 
It doesn't crash until I try to enumerate the enumerable.
 
12:56 AM
@JeroenVannevel issue6? and you're going to gives us pointers on naming?
2
 
Merge branch 'master' into issue6

Conflicts:
VSDiagnostics/VSDiagnostics/VSDiagnostics.Test/VSDiagnostics.Test.csproj
VSDiagnostics/VSDiagnostics/VSDiagnostics/VSDiagnostics.csproj
 
oh my god duga shut up
 
[Vannevelj/VSDiagnostics] Vannevelj pushed commit 72716401 to issue6: Now properly changes the fields to property naming conventions
[Vannevelj/VSDiagnostics] Vannevelj created pull request #81: Issue6 to merge issue6 into master
 
@Mat'sMug What more do you need?! It's all information you want
 
I ...guess
@Hosch250 that should be expected of a Linq query
 
12:57 AM
Hmm.
 
what's the query exactly?
 
an enumerable that isn't materialized doesn't actually do anything
 
I mean, I do this:
 
I bet you're using Single or First
 
potentialDeclarations = _declarations.Items.Where(item => item.Project.Equals(reference.Declaration.Project)
                                         && ((item.Context != null
                                         && item.Context.Start.Line <= reference.Selection.StartLine
                                         && item.Context.Stop.Line >= reference.Selection.EndLine)
                                         || (item.Selection.StartLine <= reference.Selection.StartLine
                                         && item.Selection.EndLine >= reference.Selection.EndLine)));
 
12:58 AM
@JeroenVannevel that wouldn't be an NPE
 
Oh. I missed that part of the convo
Oh boy. Those brackets make it hard
 
My code keeps running until I hit this:
 
item.Project would be null for item => item.IsBuiltIn
 
foreach (var item in potentialDeclarations)
That's it!
Because the highlight was on the query.
But the crash was on the foreach.
 
because the foreach is iterating the IEnumerable and thus materializing the query
 
1:01 AM
Yeah, it worked :)
Trouble is, it didn't catch the call to the class:
 
remember, => defines an anonymous method, it doesn't run until you iterate the results
 
Dim thisFoo As thisFoo
Set thisFoo = New thisFoo
Oh, ok.
 
I swear this laptop will suffer when I replace it
 
The nice thing is, it does work on this:
Public Sub Foo( _
               ByVal _
               Var1 _
               As _
               Integer _
               , _
               ByVal Var2 As String, ByVal Var3 As Byte, _
               Optional ByVal Var4 As Object, Optional ByVal Var5 As Date, _
               Optional ByVal Var6 As Long)

               Dim test As Integer


End Sub

Public Sub Goo(ByVal Var1 As Integer, ByVal Var2 As String, ByVal VarXYZ As Byte, ByVal Var4 As Object, ByVal Var5 As Date, ByVal Var6 As Long, ByVal Var7 As Double)
It will warn me if I try to rename Foo to "test", "x", or "Goo"
 
awesome
 
1:03 AM
Lol, I have tons of code for different test cases in there.
 
and I think you earn a badge with the Var1 parameter if you run code inspections
 
Yeah, I do.
 
lol
 
I had to test it, though...
Talking about inspections, can you check my Generic Project Name inspection?
It works the first time, but after that it doesn't return anything.
 
pulling your 2000 commits
 
1:05 AM
I've checked it N times...
Hold on, I've got one more.
 
got 'em
 
[retailcoder/Rubberduck] Hosch250 pushed commit df87cc95 to next: Rename warns for certain references
 
No you don't - there it is.
 
got it
what is?
 
NVM, I forgot to check something.
 
1:10 AM
@JeroenVannevel you might want to turn off a few of the events that get reported. Lol
 
Drat, I accidentally deleted some of my code.
Pushing again.
 
Yeah, I'll look into that configuration in a bit
After I've fixed these 5 problems popping up
 
[retailcoder/Rubberduck] Hosch250 pushed commit 58558501 to next: Here you go...
> Just kidding, this is still a problem apparently.
[Vannevelj/VSDiagnostics] Vannevelj pushed commit aaff4549 to issue6: Removed pointless check
[Vannevelj/VSDiagnostics] Vannevelj synchronized pull request #81: Issue6
[Vannevelj/VSDiagnostics] Vannevelj pushed commit 30bb23a6 to master: Added initial tests and analyzer skeleton
[Vannevelj/VSDiagnostics] Vannevelj pushed commit b52b74ec to master: Implemented the analyzer
[Vannevelj/VSDiagnostics] Vannevelj pushed commit acdebde8 to master: Implementing code fix
Merge branch 'master' into issue6

Conflicts:
VSDiagnostics/VSDiagnostics/VSDiagnostics.Test/VSDiagnostics.Test.csproj
VSDiagnostics/VSDiagnostics/VSDiagnostics/VSDiagnostics.csproj
[Vannevelj/VSDiagnostics] Vannevelj pushed commit 72716401 to master: Now properly changes the fields to property naming conventions
[Vannevelj/VSDiagnostics] Vannevelj pushed commit aaff4549 to master: Removed pointless check
Merge pull request #81 from Vannevelj/issue6

Implements #6
[Vannevelj/VSDiagnostics] Vannevelj deleted branch issue6
 
Be quiet duga
 
1:21 AM
It's been enough of you
 
^^ agreed
 
She should be a lot quieter now
 
testing the project name inspection
then I need to work on those issues
 
I'll help if you want, as soon as I get this working.
 
the project inspection is too meta for the base class
 
we need to rethink how code inspections work
 
I'm going to cry
no more issues either
 
the Declaration API could simplify them beyond recognition
@JeroenVannevel well, you wanted a feed, no?
 
Certainly is a feed
 
chat.stackexchange.com/… >> 4365 messages found
ugh
naming and cache invalidation, right
weird. whether I rename the project or not, the issue is gone until something changes in one of the modules and something actually gets reparsed
 
1:39 AM
I can't find the issue.
That is what I was talking about.
You mean even when the project is renamed, it fires?
 
better: if I do rename it, it's gone when it refreshes, and then it comes back after 2nd refresh
#FML
 
I have absolutely no idea what is going on here.
 
BTW the quickfix name is hard-coded:
            return new Dictionary<string, Action>
            {
                { "Rename Project", RenameProject }
            };
fixed
 
I thought it might have something to do with that.
 
not at all. I mean, with the hard-coded string?
 
1:52 AM
No, that return.
 
I think it's strictly related to the parser and the caching of declarations going on
 
Oh.
 
17 mins ago, by Mat's Mug
naming and cache invalidation, right
the caching relies on the project reference, but disregards its name
...
and it just so happens that, in order to fix this...
        public override bool Equals(object obj)
        {
            try
            {
                var other = (QualifiedModuleName)obj;
                if (other.Component == null)
                {
                    return other.ProjectName == ProjectName && other.ComponentName == ComponentName;
                }

                var result = other.Project == Project
                    && other.ComponentName == ComponentName
                    && other._contentHashCode == _contentHashCode;
this is the code that needs to change
 
[retailcoder/Rubberduck] Hosch250 pushed commit a32e2bc5 to next: Rename prompt works now (AFIAK)
 
Oh.
 
1:56 AM
more precisely
            var result = other.Project == Project
                && other.ComponentName == ComponentName
                && other._contentHashCode == _contentHashCode;
in QualifiedModuleName.cs
            var result = other.Project == Project
                && other.ProjectName == ProjectName
                && other.ComponentName == ComponentName
                && other._contentHashCode == _contentHashCode;
 
OK.
 
because...
            VBComponentParseResult cachedValue;
            var name = new QualifiedModuleName(component); // already a performance hit
            if (ParseResultCache.TryGetValue(name, out cachedValue))
            {
                cached = true;
                return cachedValue;
            }
 
Are you going to push?
I see.
 
I'm going to test it first ;)
 
I've never implemented caching, so I've not many ideas about how it works.
 
1:58 AM
I'll tell you a secret
I've never implemented caching before that either
 
OK :)
 
and it works
 
I'm sure I could do it after appropriate research, but I can't discuss it to any level of knowledge.
 
beautifully
 
Until we break it by renaming something ;)
Just ribbing you, it does work nice.
 
IssuesOpen--;
 
[retailcoder/Rubberduck] retailcoder pushed commit 50312409 to next: fixed localized DeclarationType string in rename dialog
[retailcoder/Rubberduck] retailcoder pushed commit ef92ae17 to next: QualifiedModuleName now accounts for project name, not just project reference; this fixes parse result caching issues when renaming a project.
 
@JeroenVannevel aren't we just as annoying? ;-)
 
Ugh, spammers
You don't see me doing that
 
@JeroenVannevel You should subscribe to get emails on RD.
 
2:02 AM
hahaha
 
You could sit there all day deleting emails periodically ;)
 
lol
Reminds me of my facebook email folder
 
I turned my email subscription off.
 
reminds me that I need to check .... HOLY CARP!!
 
Wow.
Talking about that, I need to follow Shog9.
 
^^ that's a painful one @Hosch250
but hey, go for it ;-)
 
Following Shog9?
 
no, replacing Tokens.resx usages with public static consts
 
The first thing is to create the file to replace them with.
 
@JeroenVannevel right, public static const?
 
2:06 AM
sí señor
 
I'll use an array so I can iterate over it.
 
in a public static class
 
Yup.
 
.. An array?
 
@Hosch250 do we ever iterate them?
 
2:06 AM
Yes.
 
where?
 
No arrays
 
            Tokens.ResourceManager.IgnoreCase = true;

            OkButton.Enabled = (NewName != Target.IdentifierName)
                               && char.IsLetter(NewName.FirstOrDefault())
                               && Tokens.ResourceManager.GetString(NewName) == null;

            Tokens.ResourceManager.IgnoreCase = false;
 
This isn't iterating?
 
In the rename validator.
OK, how else am I going to check a name against all values?
 
2:08 AM
oh
 
That gets any matching string in the .resx ignoring the case.
 
right
reflection?
 
I've never done reflection, and I've heard it can be dangerous, but sure...
 
Reflection would be the way if you really want to iterate it
but I'm still not sure why this is needed at all
can you link the github page?
 
@JeroenVannevel sí señor
 
2:10 AM
Tokens.resx contains pretty much every reserved keyword; here we're validating the NewName and ensuring one can't rename an identifier to a reserved keyword
 
Where should I create the file?
Exactly where Tokens.resx is?
 
@Hosch250 this is how the VbaStandardLib class creates an IEnumerable<Declaration> to expose to the rest of Rubberduck:
                var nestedTypes = typeof(VbaStandardLib).GetNestedTypes(BindingFlags.NonPublic);
                var fields = nestedTypes.SelectMany(t => t.GetFields());
                var values = fields.Select(f => f.GetValue(null));
                _standardLibDeclarations = values.Cast<Declaration>();
@Hosch250 Ctrl+T, "Tokens"; Alt+Shit+L
 
Yeah, I found it.
@Mat'sMug So, use that instead?
 
well not that, but something like that
 
Why not that?
Then, I should be able to do standardLibDeclarations.Contains(...).
 
2:14 AM
because that's a bunch of Declaration objects.. you're going to have strings
 
Oh, I see.
 
and you're not going to need nested types
 
Then how will I get fields?
 
off the top of my head..
 
var strings = this.GetType().GetFields().Select(field => field.GetValue).ToList();
 
2:18 AM
OK.
 
typeof(ClassNameYouUsed).GetFields(BindingFlags.Public | BindingFlags.Instance);
 
Thanks.
 
yeah, better avoid this in a static context
 
then loop over those fields, call field.GetValue(null) as string
See if it's null
or use an .OfType<string> somewhere
 
@JeroenVannevel btw do you see any itchy spot with that reflection code above?
other than it's declaring intermediate variables for no real reason?
 
2:22 AM
BindingFlags.NonPublic won't give public nested types I think
I don't know if that's the reason
if it isn't, just use the | operator
 
the nested types are private on purpose ;)
 
I'm used to combining Public and Instance but I haven't really bothered to look into the specifics of why. You might need to group a few things to get all the kinds you want
GetFields()will only return the public fields. Not internal/private etc, also not sure if meant to be. I would prefer to do that explicitly though
 
Please tell me you used T4 for that
 
...
I used Ctrl+C/Ctrl+V a lot
and Ctrl+H too
and MSDN
 
2:27 AM
You could just write a template to generate most of the boilerplate for you. You would still have to specify the separate values of course, but at least you'd be focused on just the values
It would read easier too, since you wouldn't have to scroll that much
I was actually going to write about that subject sometime soon
 
That didn't work, @Mat'sMug.
 
@Hosch250 what didn't?
 
It says something about type can't be inferred from usage, but it doesn't let me specify IEnumerable<string> either
@Mat'sMug This.
 
hey, that was chat-code ;)
 
Oh.
OK.
I guess I need to read about reflection.
 
2:30 AM
4
Q: How can I find all the public fields of an object in C#?

junkforceI'm constructing a method to take in an ArrayList(presumably full of objects) and then list all the fields(and their values) for each object in the ArrayList. Currently my code is as follows: public static void ListArrayListMembers(ArrayList list) { foreach (Object obj in list) ...

 
in The 2nd Monitor, Dec 8 '14 at 22:50, by Jeroen Vannevel
But using reflection also makes you look 1337 as fuck so it's a tradeoff between performance and e-penis
 
Asking for a flag?
 
2 stars actually
 
That's already 6 months ago?!
 
still cracks me up
ok. cigarette, coffee refill, and then issues
 
2:33 AM
yeah and I'm off to bed
I have to start studying for my exam tomorrow (later today)
 
I'm doing dishes.
And, I still couldn't get reflection working.
Need to read about it.
Got any articles?
 
Thanks, I'm off now.
 
later!
'night @JeroenVannevel
 
3:15 AM
> @ckuhn203 given the below code, I believe this issue is the same as #581, related to test discovery more than anything else:

foreach (var module in modules)
{
RunModuleInitialize(module.Key.QualifiedModuleName);

foreach (var test in module)
{
if (tests.Contains(test))
{
RunMethodInitialize(test.QualifiedMemberName.QualifiedModuleName);
 
3:39 AM
ok I got a repro on Sub TestInitialize2() being picked up as a test method
 
3:56 AM
dang
ModuleInitialize2
TestInitialize2
TestMethod1
TestCleanup2
ModuleCleanup2
ModuleInitialize2
TestInitialize2
TestMethod2
TestCleanup2
ModuleCleanup2
 
4:08 AM
oh crap
            var modules = tests.GroupBy(t => t.QualifiedMemberName);
bingo
ModuleInitialize
TestInitialize
TestModule1_TestMethod1
TestCleanup
TestInitialize
TestModule1_TestMethod2
TestCleanup
ModuleCleanup
ModuleInitialize2
TestInitialize2
TestModule2_TestMethod1
TestCleanup2
TestInitialize2
TestModule2_TestMethod2
TestCleanup2
ModuleCleanup2
how the F did that slip through
..and went unnoticed until now?
 
[retailcoder/Rubberduck] retailcoder pushed commit f5412836 to next: Fixes #579 & #581
> Well this is dumb. `modules` in the above snippet, was defined as follows:

var modules = tests.GroupBy(t => t.QualifiedMemberName);

Obviously this line is *screaming* "**I'm a bug!!**" just by the names involved; this is obviously the fix:

var modules = tests.GroupBy(t => t.QualifiedMemberName.QualifiedModuleName);

And the new output:

> ModuleInitialize
TestInitialize
TestModule1_TestMethod1
TestCleanup
TestInitialize
TestModule1_TestMethod2
TestCleanup
ModuleClea
> I had no repro on this one, but `ProjectTestExtensions.IsTestMethod(Member)` is now implemented as follows:

private static bool IsTestMethod(Member member)
{
var isIgnoredMethod = member.HasAttribute<TestInitializeAttribute>()
|| member.HasAttribute<TestCleanupAttribute>()
|| member.HasAttribute<ModuleInitializeAttribute>()
|| member.HasAttribute<ModuleCleanupAttribu
 
4:37 AM
> Fixed. This was caused by `Member.TryParse` using `string.StartsWith` to locate the signature line and the attribute on the line above.

var signature = body.FirstOrDefault(line => Keywords.Any(line.StartsWith));

Fix:

var signature = body.FirstOrDefault(line => Keywords.Any(line.Trim().StartsWith));

And..

var attributes = MemberAttribute.GetAttributes(body.Take(signatureLineIndex)
.Where(line => line.StartsWith("
 
@Mat'sMug Still around?
I figured out why the reflection wouldn't work - it can't access the internal class VbaStandardLib
 
good stuff
 
4:55 AM
Night.
 
'night!
all bugs are gone
3
 
 
8 hours later…
12:38 PM
Monking all
 
Monking!
 
12:58 PM
morning
 
I'm starting to think there are a lot of people out there who confuse for
 
1:18 PM
monkin' ducks!
@Mat'sMug Does this mean that 1.4 is near?
 
@RubberDuck happy birthday!
3
 
Thanks @Mat.
 
@FreeMan 1.4 is not releasing without source control
 
Q: What does one get a rubber duck for his birthday?
A: Ernie!
 
lol
Worst. Joke. Ever.
2
 
1:33 PM
@Mat'sMug I'm good with that. Will there be an interim release with all the and bugs squashed?
@RubberDuck Thank you, thank you very much! I'll be here all week, don't forget to tip your waitress.
2
 
I might drop an unofficial build on dropbox for you :)
 
1:49 PM
Happy birthday ;)
 
@Duga That was a nice break from RD. Break's over I guess.
@JeroenVannevel Thanks!
 
2:07 PM
@Mat'sMug I'm happy to break things randomly test for you
2
 
2:30 PM
@Mat'sMug I suppose I could test out my new mad VS/Git skillz to pull and build it myself!
 
@FreeMan ya man!
 
2:45 PM
@JeroenVannevel I handn't thought about nested classes. Good call. github.com/Vannevelj/VSDiagnostics/pull/83/files#r31629692
 
Yeah, neither have I until now. I'll have to look at the other analyzers and see if any of them might be affected by it
could you push that onto a separate branch rather than a PR to master considering the code fix isn't there yet?
 
I'm not sure I know how to do that. It's sitting in a separate branch in my fork though...
 
I think you can just push that local branch
push to origin/autoproperties
 
I'll try that. Then I've got to go get ready for my interview.
 
Good luck!
Keep your phone out to the chatroom, we'll help with interview questions
2
 
2:57 PM
lol
 
@RubberDuck prayers said.
 
@JeroenVannevel permission denied.
 
I'll probably have to make you a collaborator
 
Will work on those notes when I have a minute. Worst case, you have something you can pull in and work with.
Configure me as a remote and pull it into yours would probably be easiest.
 
3:00 PM
^ that's easier
Don't draw penises on the ReadMe
 
cough I wasn't going to, but now that you mention it...
 
@JeroenVannevel are those flash-ass context popups localized?
 
Nope
It would be annoying to develop while having those as a localized resource
and until the benefits outweigh the costs (aka: the product is popular enough), I'm not going to annoy myself
 
the more you wait, the greater the "cost" of localizing
#define popular_enough: 50 // downloads
?
 
There's very little localization anyway: the title, the description and the action message. That's all
Until people come ask me for translations
 
3:07 PM
might as well have them in resource strings from the start
nobody asked me to translate RD. I asked myself
 
I was going to create an issue lol
just sayin' - the faster you ditch hard-coded UI strings, the easier it will be in the future.. and the less of them will fall into the cracks and turn into localization bugs
 
See how I did that? Anticipating customer actions!
 
cough
 
but yeah, maybe
 
3:11 PM
besides it's not YAGNI, it's SRP: hard-coded UI strings are, well, hard-coded constants that don't belong where you put them
 
So many more issues to implement
So little time
mm I don't know, I quite like how each diagnostic is really just one or two files: an analyzer file and optionally a code fix file
It feels.. modular
Adding a new diagnostic is a matter of adding two files to the project and it just works
 
3:31 PM
@JeroenVannevel for some values of just. ;)
 
00:00 - 16:0016:00 - 00:00

« first day (362 days earlier)      last day (2818 days later) »