« first day (1508 days earlier)      last day (1672 days later) » 

12:01 AM
RELOAD!
[FreezePhoenix/XtraUtils] 1 commit. 45 additions. 18 deletions.
[rubberduck-vba/Rubberduck] 8 commits. 2 opened issues. 1 closed issue. 17 issue comments. 471 additions. 67 deletions.
[Zomis/Duga] 2 commits. 128 additions. 107 deletions.
 
@this fine by me
 
12:58 AM
Ok you.likely have an email from dillon buchanan something requesting access.
 
1:14 AM
done
 
1:53 AM
Glad to see that Steven van Deursen and @ploeh are releasing a 2nd edition of Dependency Injection in .NET. Coming this October: https://www.amazon.com/dp/161729473X/ref=cm_sw_r_cp_api_5wlvBbYNV2QR9 The first edition has withstood the test of time, but I can see opportunities for updates and newer code samples.
 
 
2 hours later…
@Duga noticed that those articles didn't have a new home (at least I couldn't find and since the information seems useful, decided best to get it archived and linked @JstInCase
 
@anyone is there any chance of reviewing the mammoth USCI PR? I'm half inclined to just merge it anyway since we will need to adapt it further whe we start unifying the duplicate expression engines?
 
3:43 AM
Yes
USCI was an acronym we came up becaus ethe name....
 
4:07 AM
I need to find the type coersion stuff to check if Boolean is handled correctly. Combining bitwise Booleans with numbers in VBA is nothing like .NET.
 
4:26 AM
I suspect that will end up needing the unified expression engine using the functions from oleaut32, which is a whle another PR (or rather PRs)
 
Is VBA's bool defined the same way as oleaut?
I suspect that oleaut uses the c++ TRUE and FALSE macros.
There is a ton of weirdness around Boolean comparisons in VBA. Consider for example:
?-1 / 2 < False
True
?-1 / 2 > True
True
Bitwise is even worse, given that True will coerce to a number with all the bits set:
?CInt(True Xor 42)
-43
Or:
?42 - 43 = True
True
?42 - 44 = True
False
Or:
?CBool(1) = True
True
?1 = True
False
 
No, the point is that you need to perfomr the conversion using oleaut32 functions then perform comparison, as per the vba spec
(and i believe some of the operations for comparison or arithmeric are also defined in the oleaut32
 
You also have to do the correct coercion based on the RHS and LHS though - that's language specific.
 
AIUI, the type coercion are specified in the VBA spec, so we need to follow that
and currently neither implementation follow it to the letter
using the conversion functions in oleaut32 should help esure that our type coecion is faithful
 
Agreed. I'll have to check the VarBoolFrom* functions though - I'd just assumed that the VBA numeric representation of True was implementation specific.
 
4:43 AM
Hmm not sure. There is VARIANT_BOOL and IIRC, that is what VB uses
 
Hmmm... that would imply that it's an OLE thing as opposed to a VBA thing. Which makes me curious how many libraries actually follow that spec.
 
TBH I always though that VB is constrainted to conform to OLE, as it builds on it.
 
OK, it's spec'ed down to the level of VARENUM:
VT_BOOL A Boolean value. True is -1 and false is 0.
 
morning / evening
 
The main reason I'm curious is that we have an ODBC driver that won't write boolean fields with Variants because somebody used a > 0 test somewhere as a truthiness flag.
 
4:50 AM
VARIANT_BOOL is indeed what VBA uses internally
 
@WaynePhillipsEA morning / evening
 
And you also can see there is a VARIANT_BOOL boolVal field in the VARIANT structure as well
RE ODBC, that's a problem outside the OLE automation entirely.
ODBC conforms to the C convention of 1 = true, 0 = false and it also has its own set of data types, so you're converting everything all again over
 
Not from where I'm looking at it from... :-P
 
in fact, if you stuff a bad value (say the Windows/C version of TRUE) into a VBA Boolean, VBA won't blink initially, and you'll notice that the internals of VBA pretty much always operate on a Boolean as if it were an Integer (short). There are no real boolean operators
so then logic like 'Not SomeBoolean' don't do as you might expect
 
I suspect the implementation is just a convenient way to ensure that anyNumber & True = True.
 
4:54 AM
you can simulate this with any Win API that returns a BOOL
 
FWIW, I never compare something as true, but rather not false. It's the only safe way that works everywhere.
 
me too... that's just the C boy in me
 
@WaynePhillipsEA did you see the earlier message regarding weird case of pointer giving AV when looking at typelib?
 
just catching up yes
 
I gravitate toward letting the compiler hash it out i.e. if (x & y)
 
4:58 AM
@Comintern you're not calling the relevant release member too early by any chance?
 
@this That was an issue with combining the VARARGs and PARAMARGs into a single base class.
 
@Comintern i usually think of expression such as If foo Then as equalivant to If Not (foo = False) Then
 
I'm intending on abandoning that PR and finding a different way to do lazy name resolution.
 
so that performance gain was unsafe?
 
@this Access violation = null performance.
 
5:01 AM
you should only be getting a bad pointer if the content has been destroyed too early
 
The new implementation will likely still be a big performance gain - there are just some holes due the not being able to fully walk the tlb.
Evaluating multiple typelibs concurrently makes it incredibly difficult to do caching, especially when VARARGs or PARAMARGs refer to imported libraries.
For example, a vast majority of interfaces inherit from IDispatch in stdole, so that interface will get processed n times where n is every interface that is loaded before stdole.IDispatch.
 
Clarifying --- is the thread per typelib or per typeinfo
 
Per typelib.
 
5:18 AM
Given that the typelib has no thread safety, i would think it's only safe as long you stay within that lib, and leave the resolution of types in imported lib in a dedicated thread?
 
There's no cross-threaded access between the instances.
The caching issue is that If say, Excel imports MSO, it doesn't make sense to fully expand MSO when it encounters it because I'd just be processing the same tlb twice.
I already have to do that for interfaces (at least until the thread processing the interface from it's native library finishes it).
The implication of that is that I can't build parent-child relationships and have a distinct interface set - it winds up with duplicate objects.
For our current purposes, that's fine (if inefficient), but if we ever want to tag them with accesses or anything like that, they'll need to be merged or reconciled after all the threads return.
TTGTB
 
night!
 
6:10 AM
> This is a WIP, as I've yet to test with VB6, so do not merge. It only occurred to me afterwards that VB6 handles imports differently, so I'll probably need to push the import module from text methods into the IVbComponents implementations. Closes #4183 This PR is only for adding new Predeclared Classes. I'm undecided about how to go about implementing toggling the attribute: a dedicated UI, like the (somewhat poor) one in VB6, or waiting for AvalonEdit codepanes, and editing in place....
The implementation is aware of whether the host is Microsoft Access, and if it is, adds an Option Compare Database statement. It is unaware of the VBE's Require Variable Declaration setting, and will always add Option Explicit. It also adds a VB_EXT attribute for identifying the creator of the module.
 
6:23 AM
[rubberduck-vba/Rubberduck] build for commit a04219fa on unknown branch: AppVeyor build succeeded
> # [Codecov](https://codecov.io/gh/rubberduck-vba/Rubberduck/pull/4225?src=pr&el=h1) Report
> Merging [#4225](https://codecov.io/gh/rubberduck-vba/Rubberduck/pull/4225?src=pr&el=desc) into [next](https://codecov.io/gh/rubberduck-vba/Rubberduck/commit/0941bdcd6abbda99c9acad5f52da3ffbc7f66bc0?src=pr&el=desc) will **decrease** coverage by `0.08%`.
> The diff coverage is `1.85%`.


```diff
@@ Coverage Diff @@
## next #4225 +/- ##
========================
[rubberduck-vba/Rubberduck] build for commit a04219fa on unknown branch: 52.15% (target 0%)
 
 
4 hours later…
10:45 AM
> I've made a little project for exporting code modules/projects as single self extracting files. It occured to me that it would be nice if I could access Rubberduck'sknowledge of `'@Folder()` annotations to export only files within a certain folder. Or more generally, there are a number of bits of RD that I could use in various projects.

Are there any plans to expose some of Rubberduck in an API? I heard somewhere about thoughts of a unit testing api for use in CI, but I'm on about a Rubberd
 
 
1 hour later…
12:17 PM
> With the attributes-as-annotations approach seemingly dead in the water, Rubberduck needs a UI for inspecting and editing VB_Attributes. In VBA:

- Standard Modules and Document Modules only have their Name attributes exposed.
- Class modules expose their name and instancing attributes in the Properties Window, but not their PredeclaredId attribute.
- UserForms expose their Name attribute, but not their Instancing attribute. Nor do they expose their PredeclaredId attribute, but a UserForm
 
12:34 PM
> Since PR #3975, it is already available but relatively untested. Note that it's a separate library, so you must reference the dll "RubberduckAPI.XXX.tlb", where the "XXX" corresponds to the bitness you are using. IIRC, you need to use a pre-release as it hasn't been included in the last green release(?).

There are a number of limitations; the main one being that the parser class is indepdent of the actual parser used by the RD main plugin, meaning you can't see same state but you can run th
> I definitely am not fan of VB6's propensity to use popups gratuitously. So that approach for me is no-go. It would be only appropriate for performing mass edits.

AvalonEdit seems to be a way off but even if it is here today, a dediccated toolwindow seems to me the most useful.

I would probably start with supporting editing only an indviviudal component then look at a popup UI for mass editing after, reusing the commands created to support those operations.
> What if it worked like editing the properties for a selection of multiple controls on a UserForm, where only the shared properties are editable?
 
12:56 PM
@this any good to you documentation wise? github.com/OfficeDev/VBA-content
 
1:13 PM
This seems to be the offline version of the documentation on VBA and various housts' OM, which are still maintained by Microsoft online. Thus, those aren't in dnager of being "misplaced". Furthermore, those are more aimed at the end users of programming in VBA, rather than those developing a COM addin. Thanks for the link!
 
I'm about to go on a massive rant about "security questions" being 100% public information.
First/last name of my oldest niece. How hard is that to figure out?
Name of my teacher in 3rd grade. Seriously?
Name of best man at my wedding. Now that's just trolling.
What street did I live on in 3rd grade.
 
@Hosch250 Pro-tip: Your answers can be anything.
 
Yeah.
 
^^ i live on my answers. As long i lie consistently it works mostly. But they'd be doing us a favor if they allowed us to define the question rather than selecting from predefined Or netter yet, dont use it at all
But dont worry! They will be soon improving the security by asking for a photo fo you! How could anyone possibly fake that?!? </sarcasm>
 
1:28 PM
lol
"For purposes of password recovery, please draw a picture of yourself here:"
 
For which contexts can there be attributes in VBA? Only modules and procedures, right?
 
1:43 PM
AFAIK, yes. VB6 may have more hiding places, however.
 
@M.Doerner nope, variables can have attributes too
See 1683
 
Til
 
@Comintern I have a fake date of birth for a website once, then forgot the fake DOB and the password. The password reset procedure requires me to get the DOB correct, so now I can't reset the password. If I call them, and ask for a reset email, they require the DOB. The login is tied to my android account, so I can no longer use their service, or pay them any money for it. Stupid telephone company.
Oddly, my son has their app, and he gets the football streamed for free due to a poorly configured cookie on his phone, so long as he doesn't login, so it's not like their security is too notch to begin with.
In other news.... No, I'm not getting married.... I bought a house, with a pool!
2
 
1:59 PM
@ThunderFrame Nice.
Of course, having a pool would be useless to me, since I can't swim :)
 
@Hosch250 yeah, swimming is kind of an essential skill in Australia. They teach it in primary schools. Most of the population lives within 50km of a beach, lake or river, and the warmer climate means that many houses have pools.
 
@ThunderFrame LOL, I'm in MN.
We've almost got more water than land over here.
Except in the southern/western part of the state.
I'm two blocks from a large lake, and still don't know how.
 
But it's frozen water for half the year?
 
Yeah.
 
Never gets below 40°F here.
 
2:05 PM
You poor people.
 
2:28 PM
@PeterMTaylor that's one of the few things I've actually starred because it's relevant as opposed to amusing!
 
Regarding associating code pane and exported file contexts, can't we just do it like with the attributes, i.e. walk the attributes pass parse tree once storing module level variable declarations, and procedure declarations by name and type in a dictionary and then attach them later to the corresponding declarations?
 
@Hosch250 You could... learn
 
@FreeMan I could. In my very spare time.
Instead of writing that analyzer for @this.
 
The analyzer will save a lot of lives! So, please don't wander near a lake, mkay?
4
@M.Doerner a similar thing was suggested before but @MathieuGuindon says this doesn't work for reasons that escapes me ATM. He wrote a blog article on RD WP site detailing the problem however.
 
@this I wouldn't be surprised to find hospitals that do everything in VBA. The more sophisticated ones use Access backends instead of Excel.
 
2:36 PM
well, I suppose it will ensure that RD doesn't crash on a AV or disconnected RCW, but not just for them but for everyone so we all win
 
@this makes a very good point, @Hosch250, please stay away from water!
 
But seriously it's never too late to learn. What if you fall in when ice fishing? ;)
 
@this Never been fishing :(
 
@Hosch250 don't bother. You spend hours getting eaten alive by bugs and at best you get some fish out of the deal.
 
Yeah. I like walking/biking.
 
2:48 PM
And, from what I understand, they have some pretty good size bugs up nort'
 
@FreeMan Small compared to the south.
Just lots of mosquitos.
 
mosquitoes the size of B-29s
 
@FreeMan No.
 
No? Maybe that's just the UP, then
 
@Hosch250 I don't know, I seem to recall the mosquitos being fairly large in MN.
 
2:50 PM
I drove through MN once, so I don't really know. I'll defer to Hosch, since he's our resident resident.
 
My dad used to tell this joke about waking up in a tent to overhear 2 mosquitos discussing whether or not to eat him there or take him with them.
 
LOL.
They are annoying, but not big.
 
that's the nice thing about bears - no discussion, they just dine 'n dash.
well... dine 'n saunter...
 
Yeah, it's rare that a bear will dash in general I think.
 
Only if you're between mama and her cub...
NOT a good place to be
 
2:53 PM
And dont bother outrunning, either
 
Your only hope is a .45, and you'd better be fully loaded.
 
A) just don't. B) watch that you don't. C) carry an AR-15 just in case you do.
 
@this Yeah, I rarely dash in general either, but that would be one rare circumstance.
@FreeMan I think @Hosch250 might have a slightly more appropriate level of firepower with "C".
 
But seriously, if you do A and B properly, C shouldn't be necessary.
Like all other outdoor things.
 
Although in my limited experience with bears, they were much more interested in picking all the raisins out of an entire box of Raisin Bran.
 
2:56 PM
decided to disconnect from corporate WiFi before researching "AR-15"... :)
 
@FreeMan It's basically the US AK-47.
 
@Comintern I dunno... will a segfault take down a bear?
 
@FreeMan You need access to a port. Good luck with that.
 
Spent a fair bit of time hiking/backpacking in my youth. Always put a metal pot & spoon on the outside of the backpack, never saw any bear. Never saw much in the way of wildlife, but, considering the fact that I didn't want to get personal with any bear tonsils, it was a compromise I was willing to make.
@Comintern lol
 
@Hosch250 where the similarity is because it's the goto gun for terrorists, rather than them having similar ballistics.
I went camping once and I was in the tent with the zip closed, having just put a rubbish bag outside the tent. Not long afterwards, a bear went through the rubbish bag, just inches from me, before sauntering off, and climbing a gum tree.... It was a koala bear.
 
3:03 PM
@Hosch250 I was checking on bore size. As I first thought, the standard is .223 - not a lot of stopping power there, even after a full magazine (at least not bear stopping power). But you can swap the receiver out for a 5.56 or .458. The .458 should do the trick with several well placed shots.
 
@FreeMan Mass doesn't necessarily matter. It's momentum.
 
tell that to the bear.
I've seen deer run off after a heart shot from a 30-06. Amazing what a bit of wildlife adrenaline will do!
 
@Hosch250 Eh? Momentum is a function of both mass and velocity.
 
@Comintern Correct. A .22 with higher bullet speed can have the same momentum as a .45 with a low bullet speed.
 
just not enough room in a .223 shell for enough power for that small a mass to have enough stopping power for a grumpy mama bear. Though, I suppose it's better than nothing...
 
3:06 PM
@Comintern nor would you be surprised to learn that the entire financial system runs on VBA, Excel and PowerPoint. Bloomberg is one of the few companies ever, to have made a PowerPoint add-in.
 
TBH, I'd totally rather not end up in that situation.
 
@Hosch250 the bear one or this one?
 
@Hosch250 I guess that makes sense - the force ratio between the charge and the bullet would be the main factor.
 
Both.
 
@FreeMan too bad @Hosch250 isn't a medical graduate, or he could be our resident resident resident.
 
3:08 PM
@ThunderFrame LOL
 
TFW you are counting bison, and someone thinks you are reciting the old joke.
 
MS needs to back-port STRING_AGG as a patch to older SQL Server versions.
 
Oh, BTW, @Hosch250, nice tip on Greenshot, thanks! Only slightly overkill for a screenshot, but works a treat!
 
Huh?
Never heard of it.
 
Aren't you the one... nevermind...
@WhoeverMentionedGreenshotLastWeek, thanks for the tip!
 
3:13 PM
This and Phrancis.
 
Yup, just found that with a chat search.
 
Mainly Phrancis.
 
@Phrancis - s/Hosch250/Phrancis/ < chat message
 
3:40 PM
8 hours till vacation. Please don't let the #BusFactor be today.
 
@IvenBach Enjoy!
 
@FreeMan <intentionally-ambiguous-phrasing>I'll be spending a week with my wife 'n' daughter. I'll enjoy it as much as I can.</intentionally-ambiguous-phrasing>
 
adjoining rooms FTW! nudge, nudge, wink, wink
 
@this I read the article and I cannot see the problem.
 
Adjourning rooms FTW.
 
3:49 PM
@M.Doerner TBH, I never fully understood the problem either.
 
4:25 PM
We could even use this to prevent nuking of attributes on rewrites.
Basically, this would work as follows:
Have something between the actual rewriter and the caller to coordinate the rewrite.
If the module has a member attribute, safe all of them and register an action for the ready state change event.
Rewrite the code pane and parse.
Let the action access the attributes rewriter from the state and add all member attributes.
Then let it rewrite the attributes.
The last step would entail exporting, deleting and importing the rewritten module.
Moreover, the attribute rewriter would have to manage the corresponding code panes, which might be open.
 
@M.Doerner Manage as in hold a reference to it?
 
No
 
I don't see why that wouldn't work.
 
As in open again if it was opened and reinstate the cursor position if it was the active one.
We would remove the component from the VBE and add it again. I do not see how a code pane for the component could be held open and be redirected to the new component.
 
@M.Doerner :+1: for reinstating the cursor position!!
 
4:36 PM
Obviously, implementing this will be some work.
Moreover, already having a ModuleVariableDeclaration would be nice.
Then, the additional context would not have to be added to all declarations.
But that cleanup can probably wait for the cleanup of the declaration hierarchy.
 
4:51 PM
Hm, to make this not too annoying for multi-module rewrites, the module rewriter will have to rewrite all inside a busy action.
 
5:39 PM
RD needs an inspection for the use of Comic Sans.
 
lol
oh, you weren't joking! ugh...
Actually, it needs to be any non-fixed-pitch font, but... shudder
 
IKR?
 
some people just shouldn't be allowed that close to technology
 
6:06 PM
@Comintern and I keep hearing that Macs are for the aesthetically inclined....
 
LOL
 
6:32 PM
in general, but @this in particular:
Using VBA/Access, the best bet is to create databound forms instead of trying to MVVM?
 
7:04 PM
AC note: I believe there is intention to ensure AC doesn't pick up words in comments to try to complete While, Do, etc. However, I just typed '@Folder " and it completed the quote marks and left the cursor between them. A very handy feature to keep!
it fires as expected on '@Folder ( as well.
 
block completion and self-closing pairs are two distinct behaviors
 
just checking!
 
wife stayed at the cottage with the kids, I'm home alone for half the week... might get something done :)
 
^ You are lucky to have that producktivity.
 
7:20 PM
Public Function SQLQueryRecordset(ByVal sqlString As String) As ADODB.Recordset

  Dim recSet As ADODB.Recordset
  Set recSet = New ADODB.Recordset
  LogManager.Log TraceLevel, "SQLQueryRecordset: " & sqlString
  recSet.Open Source:=sqlString, ActiveConnection:=CStr(TempVars.Item("constring").Value)
  If Not recSet.EOF And Not recSet.BOF Then
    Set SQLQueryRecordset = recSet
  End If
  recSet.Close

End Function
^ that doesn't work because as soon as it executes recSet.Close I lose all the data, right?
Is there a way to write a function like that so I don't have to have all the little details scattered everywhere?
bah... I'm pretty sure I starred this a while back and never dug into it: github.com/retailcoder/VBTools/blob/master/SqlCommand.cls
 
@FreeMan I really need to update that code to return a disconnected recordset instead of that stupid SqlResult mess
 
drums fingers... waits patiently...
:D
If I took the time to fully understand it, I could probably do so and submit a PR.
I only seem to be interested when I need it, like, yesterday...
:/
 
8:12 PM
@MathieuGuindon wait... wife??? I thought you were engaged - when did the wedding happen???
I didn't even have a chance to get you anything...
 
The duck is out of the bag now.
@this didn't grok the idea of ResourceDictionary till you brought it up. :+1:
 
@FreeMan wife/gf/partner/queen/mother-of-dragons/whatever
 
8:27 PM
@MathieuGuindon I take it you aren't amused with your kids ATM.
 
@MathieuGuindon gotcha...
@Hosch250 As a father, I am the kids ATM...
uses the other TLA definition
 
@M.Doerner you would have to ask @MathieuGuindon for an explanation. I seem to recall suggesting doing it in one direction but he said there was a factor that I can't remember that prevent from working.
@FreeMan maybe it's time for me to get serious about solving this problem once and all.... It's a question i've been waffling on for a while
 
hey I'll be more than happy to be wrong there
 
@this mmmm.... waffles...
 
@IvenBach you're welcome
 
8:43 PM
@apsillers but failed to add their own copyright notices - this comment (and parts of your answer) suggest that it's good and common practice to litter code files with a bunch of noisy annoying and ultimately useless/redundant copyright notices. Is that what you are suggesting? Because AFAIK nobody in the project's team wants to see those. Is such a copyright notice not a deterrent for future contributors to make significant changes to existing files? Is git history not a much more reliable way of identifying who contributed what and to what extent? What's source control if not exactly this? — Mathieu Guindon 6 secs ago
Antlr4 C# target has ~900 commits, and 7 contributors.
RD has ~10K commits, and 43 contributors.
and they have this on top of every code file I checked
> // Copyright (c) Terence Parr, Sam Harwell. All Rights Reserved.
// Licensed under the BSD License. See LICENSE.txt in the project root for license information.
 
@MathieuGuindon That's not required.
You just need it on the repo.
At least, that's my understanding. Although Roslyn has that header on every file too.
 
and your own Roslyn code files have your own copyright notice?
 
Nope, they have the Roslyn copyright notice.
I had to sign an agreement to license it to them.
 
TTFN
 
Yep. Also, your original link is for a page of Michael Kaplan, it is not official documentation. I've never heard of using LCID this way (it might have been an abandoned unsupported and not fully tested option) and, as MK concludes, one should refrain from experimenting with this parameter. — Gustav 11 mins ago
 
8:54 PM
Those headers are supposed to be generated automatically, anyway.
 
@this ^ I know the localeID is undocumented, but do you have any idea how they solved the Bulgarian Locale = VbOptionCompare = 2 bug?
 
@this I don't believe the filtering has any issues. Even when I had some results with ~700 filter and group was an immediate response.
 
@FreeMan Greenshot is life
 
9:30 PM
@FreeMan GTK :)
@ThunderFrame fair enough so you’re closer or further than where you were eh? You won’t use the pool for about many months left in winter though.
 
@PeterMTaylor slightly further out. Another 2 months until settlement, so it should be warming up not long after that.
 
Ah top stuff.
@Hosch250 a passing thought...if you did taken on swimming lessons as one of your bucket list now before you die, think of all that resistance exercises you can benefit to improve your immune system from the exercises to prevent colds coming on. Just saying...
 
10:17 PM
Huh? Is there such a thing we do here...Mutation testing. my daily reading leads me here. en.m.wikipedia.org/wiki/Mutation_testing Particularly quoting “...and reject mutants by causing the behavior of the original version to differ from the mutant. This is called killing the mutant.” Brings to my mind zombie movies though.
 
10:30 PM
@Phrancis Not sure I'd go that far, but it is pretty nifty...
 
Has anyone run into a typelib that has a typedef that refers to another typedef?
I.e.
typedef [public] int64 FOO;
typedef [public] FOO BAR;
 

« first day (1508 days earlier)      last day (1672 days later) »