« first day (1898 days earlier)      last day (65 days later) » 

12:00 AM
RELOAD!
[rubberduck-vba/Rubberduck] 3 opened issues. 12 issue comments.
[Minesweeper] Games Played: 107, Bombs Used: 68, Moves Performed: 14408, New Users: 17
 
variant of VT_ERROR can't be converted to anything, right?
 
yup
instant type mismatch =)
a classic Excel mistake is to assume a cell doesn't contain one
 
the doc implied that it coudl be converted to uint. Go figure!
 
12:16 AM
That probably converts to an error number.
 
that's what I expected but the test failed
 
Well, it is a uint, which does not exist in VBA.
 
no, I'm testing in C#
public object Test_ObjectConversion_Error(int value, Type targetType)
{
    var err = new ErrorWrapper(value);
    return VariantConversion.VariantChangeType(err, targetType);
}
according to the marshaling docs, it'd return a uint but it did not come out that way
 
12:31 AM
fun fact: VBA and .NET do not agree
3
> Message: Expected: -657434.00001157401d
But was: -657434.00001157413d
 
ha!
@this so we're going to have "fun" with floats are we?
 
evidently....
[TestCase("1899-12-30 00:00:00", typeof(int), ExpectedResult = 0)]
[TestCase("1899-12-31 00:00:00", typeof(int), ExpectedResult = 1)]
[TestCase("1899-12-29 00:00:00", typeof(int), ExpectedResult = -1)]
[TestCase("1899-12-30 00:00:00", typeof(double), ExpectedResult = 0d)]
[TestCase("1899-12-31 00:00:00", typeof(double), ExpectedResult = 1d)]
[TestCase("1899-12-29 00:00:00", typeof(double), ExpectedResult = -1d)]
[TestCase("1899-12-30 12:00:00", typeof(double), ExpectedResult = 0.5d)]
[TestCase("1899-12-29 12:00:00", typeof(double), ExpectedResult = -1.5d)]
VBA's Date is just full of WTFs if you ask me
gimme a bunch of localized dates
oooh, no.
i just wrote tests that will break on non-English installation. :(
WHY MUST YOU TORTURE ME SO, MICROSOFT
 
12:51 AM
fuuuuuhh
 
fixed
still need non-murica-localized dates
 
Does dates vary given Window local settings? @this and the same settings plays around floats?
 
if you don't specify LCID, yes, it will use the Windows' default
for now, I moved all localization-sensitive test into a separate test that specify the LCID explicitly
blargh, stupid vs cache.
at least it's passing using LCID
[TestCase("1899-12-30 00:00:00", typeof(string), "en-US", ExpectedResult = "12:00:00 AM")]
[TestCase("1899-12-31 00:00:00", typeof(string), "en-US", ExpectedResult = "12/31/1899")]
[TestCase("1899-12-29 00:00:00", typeof(string), "en-US", ExpectedResult = "12/29/1899")]
[TestCase("1899-12-30 01:00:00", typeof(string), "en-US", ExpectedResult = "1:00:00 AM")]
[TestCase("1899-12-31 11:00:00", typeof(string), "en-US", ExpectedResult = "12/31/1899 11:00:00 AM")]
[TestCase("1899-12-29 13:00:00", typeof(string), "de-DE", ExpectedResult = "29.12.1899 13:00:00")]
 
1:45 AM
Why do I keep finding bugs in the resolver?
The last one was really suptle.
The IndesDefaultBinding passed along a dummy lExpression whenever a recursive default member resolution was used.
Because of this, we missed to generate the identifier references for the original lExpression.
 
well, there are 20 open issues for resolver. Possibly more.
 
I'll see how many of those I can close.
 
.NET really makes it inconvenient when you want to create consts for decimals or dates....
 
> Is this still an isuue.

We should now attach all member annotations above the first member to the module.
That is not exactly what is requested here, but it is more intuitive, IMHO.
> Is this still an issue?

We should now attach all member annotations above the first member to the module.
That is not exactly what is requested here, but it is more intuitive, IMHO.
> All the examples should now resolve to unbound member calls. Can we close this?
 
2:01 AM
Is there enough hate for Comic Sans?
 
 
8 hours later…
9:35 AM
@IvenBach Some say there's never enough hate for Comic Sans and it should've stopped existing a long time ago.
Say, you lot know a bit about interfacing with COM, right? On a scale of 'walk in the park' to 'try taming a hurricane instead', how hard is it to create an application exposing itself just like an Excel or Access would do? As in, ship a program with its own COM server?
 
 
4 hours later…
1:15 PM
@Mast Depends on what you want to achieve.
If all you want is just an object that you can use, having a COM-visible type in your assembly is all you need.
If you want it to have an Application object just like in Excel & Access, then you need to create an appobject. This is really a simple attribute decoration that you need to add to your IDL.
If you're wondering "what IDL? I don't have one!", then you're probably using .NET's interop to help generate a type library for your assembly. It is convenient but it also isn't very flexible. In this case, you must build the type library yourself. You can do this either by writing the IDL file yourself or customizing the type library export with help of TypeLibConverter.
Last time I checked, there was no simple attribute to use to indicate that an object should be an appobject and that is what you need if you want it to act like Excel.Application* or Access.Application.
Lastly, if you want others to find your COM application (e.g. using GetObject(, "MyProgram.MyThing")), then you need to register it in the running object table (ROT). You can use RegisterActiveObject for this.
* I said Excel.Application but in reality it's actually Excel.Globals that's the appobject. The Globals has several similarities with the Excel.Application so that it's easy to mistake one for other.
If you are going to do a lot of COM work, you should take time to be very familiar with all types & features offered in System.Runtime.InteropServices namespace. That is a good place to find everything where you can get .NET to help you with COM interop
 
Why does default member resolution have to be such a complicated thing allowing for so many subtle bugs to creep in?
 
1:59 PM
@this So that's where it all starts.
@this And that should be part of the install, or initial use.
@this Thanks.
 
for it to work, you do have to register it in the registry at the install time. the RegisterActiveObject is when you are actually running the application (e.g. called at the application's startup)
 
Oh, right
 
FWIW, Rubberduck's installer writes to the registry directly rather than using tools like regasm so we have much more flexibility over how it will install and thus be registered for other COM consumers (particularly VBA/VB6 hosts) can find it.
 
Why would other services need to find Rubberduck though?
 
we don't have an appobject so it's not an application. However, in case of VBA/VB6, they expect the registration to be in registry if you want to be able to reference the type library and create objects defined within the assemblies.
If the entries aren't there in registry, then VBA/VB6 simply can't create any objects that Rubberduck provides.
This wiki article may be helpful.
 
2:15 PM
Ah, like that
 
 
1 hour later…
3:26 PM
@KySoto By "all platforms", it means Linux, OSX, etc.
So, basically, what if WPF wasn't Windows-only.
Also, I just took a front-end dev quiz from a recruiting site.
I bombed it, but I blame the quiz for at least part of it.
It had a bunch of questions that were dependent on various browser implementations.
Like what would cause a webpage to not show in invalid HTML.
Well, a super strict browser might not show if a </p> tag was missing. Most will guess where it goes.
Or how many lines a textarea shows before it starts scrolling.
 
@23fc9a62-56de-47fb-97b4-737890 Interviews go two ways, at least now you know a bit more about them too.
 
Well...
I got my first job from this recruiting site, and most devs in the area work with them.
And it's not their quiz--it's a third-party quiz.
I've got one on C# to take later, but I'm irked now, and that's not good :D
I should do good on that one.
Also, I'm expecting an offer on Monday from another place.
 
@23fc9a62-56de-47fb-97b4-737890 Oh, that's less optimal yes.
 
Welp that's interesting.
a overloaded method that has foo(object obj) and foo(object[] objs] means the latter can't be ever reached because object[] is also an object
 
 
1 hour later…
5:02 PM
 
@this interesting, I would have thought object[] would be preferred as a more specific match. the overload resolution rules are all documented somewhere...
 
Sheldon talks Microsoft
 
I might be mistaken, I'm still investigating a bad test setup. where an array get wrapped in another array of one. :\
@IvenBach LOL. Ballmer sure as hell didn't know what he was doing.
 
5:44 PM
I would share many more Sheldon comics if I didn’t fear spamming chat too much.
 
better not tell you about bugmartini, then. >:D
 
That in 2013? Just crossed into 2008’s comic. 11 years left.
 
no. bugmartini started in 2009, it looks like.
Can someone remind me what is the preferred to take a logger into a class?
I guess I'll just use private static readonly Logger Logger = LogManager.GetCurrentClassLogger();
 
6:24 PM
If it is private, it should be _logger.
I feel kind of stupid writing tests to veryfy that array accesses on arrays returned from a recursive default member resolution resolve correctly.
 
6:54 PM
@M.Doerner why?
@M.Doerner interesting, #R says it should be Logger on the account of it being static.
 
Oh, right.
 
RE: tests - FWIW last night, I wrote a bunch of tests to assert that the behavior of VariantChangeType is not affected by the implementation that wraps it. I really didn't need to test the function itself (since it's an external function) but I do have to at least verify that all code paths leading up to it doesn't do something unexpected.
 
7:45 PM
Getting identifier references for intermediate default member accesses in a recursive default member resolution turns out to be a lot more complicated than anticipated.
The problem is not to get them, but to not break anything.
 
8:01 PM
At least we will not break these things again because I have added tests covering the fragile parts.
2
 
8:29 PM
¡Hola!
2
@this don’t. Raise events and have something else do the logging.
Just kidding, I’m the only person I know who does this.
 
8:49 PM
@RubberDuck hey look who's here! what's up?
 
RubberDuck enters Rubberduck.
user image
7
 
@MathieuGuindon not much. Had a few minutes to review some code and figured I’d pop by.
 
@Mast it’s ducks all the way down. That made my day.
 
9:35 PM
0
Q: Compare two Excel sheets by Cell Content

Miriam ListThis code is a result of a lot of help from this community. What does it do? It compares two excel sheets cell by cell and copies the differences into another excel file. I’m trying to modify the Code so it does the following: It goes to “Name” and then searches for that name is the other file...

 
 
1 hour later…
10:47 PM
Finally, after changing the method to do it, recursive default member accesses get their references without any issues.
 
> This PR aims to enhance the resolver to actually resolve default member accesses due to Let coersion and to generate identifier references for intermediate default member accesses in recursive default member resolutions.

Moreover, this PR includes a few fixes to the resolver.

So far, the identifier references for the intermediate default member accesses are generated. So, if somebody was interested to see how that is incorporated, I would appreciate any feedback.
 
11:05 PM
[rubberduck-vba/Rubberduck] build for commit 2bd4e8ac on unknown branch: AppVeyor build succeeded
 

« first day (1898 days earlier)      last day (65 days later) »