« first day (1570 days earlier)      last day (1610 days later) » 

12:00 AM
RELOAD!
[rubberduck-vba/Rubberduck] 86 commits. 1 closed issue. 4 issue comments. 77558 additions. 35728 deletions.
 
 
3 hours later…
3:00 AM
@skiwi You already have too many tabs open. Don't give yourself another reason to leave more open.
 
 
6 hours later…
8:55 AM
@IvenBach It's just a few more
 
 
1 hour later…
10:20 AM
Sorry...quick question.... I am reading about tagSAFEARRAY structure. I thought that info about an array, in particular the bounds are stored in a struct. That struct being a SAFEARRAY. Looking at the info for that page, the typedef includes SAFEARRAYBOUND, which appears to be a struct as well. So, 1) Is this struct within a struct?
2) Is LBound making a call to lLbound in SAFEARRAYBOUND ? And UBound looking at cElements-1 (0 based?)
Sorry if poorly phrased. Struggling to get my head around this Microsoft documentation. It raises more questions than it answers.
 
 
2 hours later…
12:50 PM
1) Yes, it is one struct embedded in another. That is really not that uncommon.
2) No. The struct has no members. The LBound functions is a static function that knows where to look in a SAFEARRAY struct in order to find the lbound for the dimension specified (or for the first one if none has been specified).
More, specifically it simply reads the corresponding entry in the SAFEARRAYBOUNDS struct, which is just an array of tuples after all.
I guess it also checks the cDim field in order to verify that the dimension specified is not out of bounds.
Hm, above I meant no methods, not no members. In other words, there is nothing to call.
UBound = LBound + cElements - 1
So, it has to look up both LBound and cElements for the dimension specified.
@QHarr ^
 
1:21 PM
@M.Doerner Perfect. Thank you!
@M.Doerner Static function? Is there no end to my lack of knowledge?!
methods that can be called without having an object of that class?
 
1:41 PM
To be honest, with LBound and UBound I am not even certain that they are functions at all. It might just as well be that they are just keywords and the compiler inlines the lookup of the members of the SAFEARRAY struct.
Yep, a static function can be called without an object. You just need the type it is defined on. Note that something like this does not really exist in VBA. There, the best equivalent is a function in a standard module.
Further note that a static method cannot depend on any non-static data except the data passed in via the parameters.
Btw, you probably use static functions all the time, e.g. Right, which is an alias for a static function in VBA.String.
 
thanks
 
 
3 hours later…
4:59 PM
Hey guys, sorry I haven't been very active lately. I'm in the initial learning curve for my intern to hire job lol
aka all I've been doing is reading on applied linear regression and the usual school stuff
 
oh deary me
 
 
2 hours later…
7:31 PM
so, the VBE can render •, but not ♥
I'm going to make CodeString.PseudoCaret be '♥'
that way it won't interfere with VBA code
and all our tests will literally be "lovely"
^ seems more appropriate though
though significantly more annoying than a simple | to use in tests
 
7:49 PM
ok, going with ¦ instead
var original = $"MsgBox      (\"test{CodeString.PseudoCaret}\")".ToCodeString();
the VBE renders it as a ?
 
8:52 PM
How did you find out the heart is a useful placeholder
kind of suggestive the VBE needs lots of loving
 
9:04 PM
meh, it's not. truth is, I'd want to stick with |, but per #4373 it needs to be a character that the VBE can't render, otherwise I need to remove CodeString from every "production" code path... and that would be very annoying
 
> I'm adding a CodeString.PseudoCaret public static char, and making its value - the VBE can't render that character, so there's no chance of it interfering with anything - that should permanently fix this problem.
 
9:30 PM
@MathieuGuindon what about differentiating into a CodeString and a TestCodeString?
the latter inheriting CodeString and overwriting only the caret-related behaviour?
we shouldn't have logic dedicated to unit-testing only functionality in the production path
unless we use the caret functionality anywhere that's actually prod code...
 
@Vogel612 actually... TestCodeString would be the only thing that needs the pseudocaret stuff. good idea!!
 
oh for crying out loud microsoft.
get the SEO for the vba docs in order, this is a damn mess
 
Do I rename the extension method? "ToTestCodeString"?
this means turning the struct into a class though
or... I could extract an ICodeString interface
 
how about a factory method?
(Test)?CodeString.From(...)
 
seems heavy-handed...
oh
 
9:45 PM
no castle-windsor
 
hmm I had a FromString factory method, wasn't used, removed it
 
just poor man's factory method
 
CW wouldn't be involved either way
operators aren't inherited, so whether I make it a class or keep it a struct makes no difference: I need the implementation in both types
 
Extension methods are operators?
 
        public static bool operator ==(CodeString codeString1, CodeString codeString2) => (codeString1.Code == codeString2.Code && codeString1.CaretPosition == codeString2.CaretPosition);
        public static bool operator !=(CodeString codeString1, CodeString codeString2) => !(codeString1 == codeString2);
 
9:47 PM
hum ...
one could encapsulate that predicate into a protected readonly BiFunction<CodeString, CodeString, bool> and refer to that to make sure the implementations don't diverge
probably overkill, tho
 
mind you these are only used in tests, and could easily be replaced with calls to .Equals
I'll just drop them
hmm, using the struct through an interface will incur boxing everywhere... might as well make it a class in the first place - I'll go with inheritance.
 
hmm ... makes me wonder where we're using it and whether the boxing overhead is something we really should avoid
unrelatedly: apparently the net46 targetframework does not include the assemblies from `%ProgramFiles%\Common Files\Microsoft Shared\MSEnv\PublicAssemblies\`
 
supper time, bbl
 
that's where extensibility.dll lies...
which kinda makes it hard to build Rubberduck.Main what with IDTExtensibility2 not being available elsewhere
 
10:14 PM
aight. fixed it
I think
 
[rubberduck-vba/Rubberduck] build for commit 7f64d7c6 on unknown branch: AppVeyor was unable to build non-mergeable pull request
BUILD FAILURE!
 
ahh ... right there was that thing
 
> # [Codecov](https://codecov.io/gh/rubberduck-vba/Rubberduck/pull/4383?src=pr&el=h1) Report
> Merging [#4383](https://codecov.io/gh/rubberduck-vba/Rubberduck/pull/4383?src=pr&el=desc) into [next](https://codecov.io/gh/rubberduck-vba/Rubberduck/commit/6d4087b79e994e25ccdf31be6856ee05e25d2186?src=pr&el=desc) will **increase** coverage by `<.01%`.
> The diff coverage is `n/a`.


```diff
@@ Coverage Diff @@
## next #4383 +/- ##
==========================
[rubberduck-vba/Rubberduck] build for commit f1f9fb0f on unknown branch: 56.86% (target 0%)
 
@Duga now you give me a COVERAGE REPORT???
@Duga with that change, I'm about a third through the projects.
gotta make sure to not forget Rubberduck.Core
 
10:31 PM
[rubberduck-vba/Rubberduck] build for commit bd557d7a on unknown branch: AppVeyor was unable to build non-mergeable pull request
BUILD FAILURE!
> # [Codecov](https://codecov.io/gh/rubberduck-vba/Rubberduck/pull/4383?src=pr&el=h1) Report
> Merging [#4383](https://codecov.io/gh/rubberduck-vba/Rubberduck/pull/4383?src=pr&el=desc) into [next](https://codecov.io/gh/rubberduck-vba/Rubberduck/commit/49d5bfb9e9d3e92e4a80acdb2af68123827bbf02?src=pr&el=desc) will **decrease** coverage by `0.91%`.
> The diff coverage is `n/a`.


```diff
@@ Coverage Diff @@
## next #4383 +/- ##
==========================
> # [Codecov](https://codecov.io/gh/rubberduck-vba/Rubberduck/pull/4383?src=pr&el=h1) Report
> Merging [#4383](https://codecov.io/gh/rubberduck-vba/Rubberduck/pull/4383?src=pr&el=desc) into [next](https://codecov.io/gh/rubberduck-vba/Rubberduck/commit/49d5bfb9e9d3e92e4a80acdb2af68123827bbf02?src=pr&el=desc) will **decrease** coverage by `0.91%`.
> The diff coverage is `n/a`.


```diff
@@ Coverage Diff @@
## next #4383 +/- ##
==========================
> # [Codecov](https://codecov.io/gh/rubberduck-vba/Rubberduck/pull/4383?src=pr&el=h1) Report
> Merging [#4383](https://codecov.io/gh/rubberduck-vba/Rubberduck/pull/4383?src=pr&el=desc) into [next](https://codecov.io/gh/rubberduck-vba/Rubberduck/commit/49d5bfb9e9d3e92e4a80acdb2af68123827bbf02?src=pr&el=desc) will **decrease** coverage by `0.91%`.
> The diff coverage is `n/a`.


```diff
@@ Coverage Diff @@
## next #4383 +/- ##
==========================
[rubberduck-vba/Rubberduck] build for commit ee0d688b on unknown branch: AppVeyor build failed
BUILD FAILURE!
 
@Duga ohh... yea whoops... how did that change get into the version history?
oh well ... I'll fix it tuesday, I guess
Toodles!
 
'night!
ok, so the extension method is completely just for testing already
namespace RubberduckTests
{
    public static class CodeStringExtensions
    {
        /// <summary>
        /// Creates a code string that encapsulates the caret position, indicated by the <see cref="TestCodeString.PseudoCaret"/> character.
        /// </summary>
        /// <param name="code">The code snippet string. Use <see cref="TestCodeString.PseudoCaret"/> to indicate caret position.</param>
        /// <returns>Returns a <c>struct</c> that encapsulates a snippet of code and a cursor/caret position relative to that snippet.</returns>
there's this one too, but it has 0 references
namespace Rubberduck.Common
{
    public static class StringExtensions
    {
        public static CodeString ToCodeString(this string code)
removing
 
11:42 PM
@MathieuGuindon Why does the constructor of CodeString taking the selection explicitly special case strings with the pipe character at the selection?
That constructor should really not care about it at all.
 
yeah, clearing that up.
 
I guess that was included because test might pass the selection explicitly although the other other format was used.
 
precisely
hi @Susi!
 

« first day (1570 days earlier)      last day (1610 days later) »