« first day (1895 days earlier)      last day (1285 days later) » 
00:00 - 23:0023:00 - 00:00

12:00 AM
RELOAD!
[rubberduck-vba/Rubberduck] 4 opened issues. 3 closed issues. 13 issue comments.
[Minesweeper] Games Played: 151, Bombs Used: 95, Moves Performed: 21539, New Users: 17
 
 
1 hour later…
1:13 AM
I think I have missed a bit....what is PE?
 
@Malachi Project Explorer - the built-in VBE toolwindow
 
oh, gotcha
lol
ttqwagh
 
 
2 hours later…
2:59 AM
 
 
3 hours later…
6:27 AM
@this sheldoncomics.com/archive/061217.html that duck is my kindred interwebs Aminal. So much wisdom.
 
 
1 hour later…
 
2 hours later…
 
1 hour later…
11:44 AM
 
 
1:53 PM
> .NET Core 3.0 launches at .NET Conf 2019 September 23-25, a free, virtual developer event.
 
only ~9 months after it was originally slated to release. :)
 
Well, about 6 from what I heard.
 
maybe my memory's off. I thought they originally planned to do it in start of year, then pushed it to 2nd qtr then oops, no, sometime later this year
 
Might be. I don't follow as closely as I used to.
What I heard was first-quarter, then late second quarter was possible, but third-quarter was likely.
By the time they actually did Build conference, it was pushed out.
 
2:58 PM
poor guy
That isnt the issue and unfortunately, my suggestion to define the Code Name of the sheet was denied. — Zack E 5 mins ago
cant create a variable and then set it because boss said so.
 
3:19 PM
3
A: Why are there so many Hungarian family names that have a pejorative tone?

Jos I'm interested to hear about the situation in other cultures. I'm Dutch. There are phone books full of weird Dutch family names. Such as Naaktgeboren (Born naked), Windzak (Windbag), Palingdood (Dead eel) and many many more. How did this came to be? When the French took over the Batavian r...

Best practical-joke backfire ever.
 
3:48 PM
1
A: Sending object array to variant works before August roll out of Version 1808 (Build 10730.20370), but fails after update

M1chaelTo fix, change the ByVal to ByRef in the function: Public Sub RunMe() Dim wksTestArray() As Worksheet MsgBox SendArrayToFunction(wksTestArray()) End Sub Public Function SendArrayToFunction(ByRef vntArray As Variant) As Boolean SendArrayToFunction = True End Function

 
hot damn, just got +725 rep from best answering XD
then again 700 of it was getting "trusted" status on 7 sites
 
apparently the latest n' greatest update will break every piece of VBA code that's passing an array to a ByVal Variant parameter... I wonder if RD should start warning about known-to-be arrays being passed to a ByVal Variant parameter, or if it's just a bug they introduced...
#BugOrFeature
@KySoto lol
 
@MathieuGuindon from Microsoft update? Link?
 
just above...
 
blinded by obvious Ahhhh!
 
3:52 PM
:)
 
Seems a major bug
Microsoft aren't supposed to ship breaking update like that.... right? RIGHT?
 
indeed
@this riiiiiiiiight..
 
assuming they do fix it, one might just wait and not update until someone at MSFT do something about it
 
now the question is, if nobody's touching VBA itself, how the heck does an Office update change how VBA wraps arrays into a variant?
 
hrm....
 
3:56 PM
surely that can't be host-specific!?!?
 
hmm if i byval any arrays, i probably do it because of RD
well array passed to a regular variant anyway
 
aye, and it shouldn't be a problem
 
I rarely use arrays myself. Too painful.
 
I pretty much always pass them As Variant ...ByVal
 
yup.. 'Optional ByVal argParameters As Variant'
 
4:00 PM
now I know a bit more about Excel model, I can see why arrays matters more there.
In Access, I found it easier to just use recordsets directly
 
makes sense
 
As for the question why it'd break - it might not be necessarily that they changed something about the VBA
 
the main reason i use arrays as parameters is for when im creating a parameter array
 
but broke the assumption within a library (e.g. didn't release a pointer that should be or something)
 
4:01 PM
would have to check if it's host-specific or not, though.
 
everything is such a house of cards
 
*crosses fingers that it only affects mac's
 
Note that he also says it is only a problem with an unallocated array.
 
aah, missed that
 
@MathieuGuindon didn't you just describe COM? ;-)
 
4:03 PM
yup
 
Got me wondering - what does .NET do that it doesn't run into problems COM has? It obviously does a better job of hiding all the tedious memory management than COM does (not that COM tried to hide it in first place), but oh boy, you better get it right or it'll just crash.
 
GC, for one
 
Obviously but my point is how do you test the GC itself?
and cover all edge cases
 
carefully :)
 
LOL, thanks, mister obvious. :D
One thing's for sure that .NET did that COM didn't is that they didn't ask people to implement memory management themselves. However, you'd have to stay inside .NET's walled garden whereas COM is supposed to work with any languages, so it can't manage the memory for you in any language.
 
4:16 PM
well technically .NET is the framework and runtime that does the memory management: .NET languages just build on top of it
"in any .NET language"
that said you can still do unsafe things
 
yep
and in that case, the walled garden is no longer safe.
it's a lie to think that just because it's in a block labeled unsafe and it works fine when executing code in that block doesn't mean that it did something very bad to something somewhere else
We see that all time in RD even though we have zero unsafe nor fixed blocks in the codebase.
I do truly worry about kids who grows up on only the managed languages, never have seen unmanaged code work, and getting their first AV.
 
@this not zero
 
the typelib api should have some unsafe code, the hooks as well, right?
 
@MathieuGuindon I'm pretty sure it's zero. The key is that we use Marshal to do all that work.
My point was that even if we did, it's wrong to think that unsafe-ness stays within that block. It doesn't. The fact that our code doesn't contain any unsafe and still can get AVs proves that point.
 
hmm ... interesting. The TypeLib API has methods named Unsafe, but no unsafe blocks.
 
4:23 PM
Nope. As I said, all accesses to unsafe stuff are via Marshal
 
@this then it used to be not-zero
 
Oh? I didn't know that we used to have unsafe.
 
yeah, in some of the COM reflection code
 
Using Marshal makes it convenient for us because we don't have to add the switch to the compiler --- wasn't there other issues with enabling unsafe code?
 
looks like it's gone now
 
4:26 PM
@Vogel612 you will also note that Wayne mention that some operations we do might be faster if we used unsafe but he avoids it by creating the addressable variables to "safely" cast between unmanaged and managed stuff.
But IMO, naming various methods as unsafe is correct. We are actually manipulating unmanaged memory.
 
5:01 PM
@this AV still means AppVoyer?
 
Access violation
 
mkay
 
If all you did was within the managed language's world, you'd ordinarily never see one.
(providing that the managed language itself isn't flawed in some way, of course)
 
5:16 PM
@M.Doerner or anti virus. or audio visual. #ItDepends :-)
sorry, lame joke...
 
as a saying in real estate goes, "context, context, context"
 
The alternativ name is segmentation fault (segfault) and they might cause a general protection fault (GPF).
 
related saying: "a text without context becomes a pretext for prooftext"
 
aka blue screen of death (BSOD), when it happens deep enough
 
5:19 PM
@M.Doerner I thought GPF and segfault were the one and same, just different names on different OSes?
 
I'm thinking it's dependent on who writes the error message
 
lol, true.
like Guru Meditation Code, I guess.
 
From what I have seen, what a segfault is on a Linux system is a bit unclear, either a memory access to not owned memory or only those found and reported by the system.
A GPF on a windows system is clearly only a caught AV.
However, in practice, the distinction is really mood.
 
@M.Doerner so, GPF is more calmed and reserved compared to segfault which is obviously more accusative and combative. ;-)
(I think you meant to say moot, not mood)
 
You there Mug? I need to rubberduck the idea of using a proxy out.
TLDR = I have to import the same source data into two different workbooks and use it.
I have a working solution which uses the code behind for the worksheet to provide the functionality I need for extracting the data.
The issue with that is it has dependencies which barf when I copy the worksheet.
I think I need a proxy layer between the data and the usage of it.
Data <-- DataSheetProxy <-- ClassNeedingData <-- CodeAccessingClasses <-- EntrySub
 
5:39 PM
Sounds like a plan!
 
Now to actually implement it. :scurries-off:
 
FWIW - if worksheets are yours to control and it's used internally, you might cut out lot of code by making a data connection. Just a thought in case it applies.
 
One Workbook will be used internally, the other by a partner/client.
 
In which case you could just query the data, then transform it into a range to break the data connection.
 
It needs to be stand alone.
 
5:49 PM
It'd be after you transform it into a range?
 
You mean have the table/range internal to the workbook?
If so I already have that.
 
no, for the other workbook where you need the data exported, use data connection (temporarily) to populate that workbook.
(or maybe I'm not understanding the problem in which case, point & laugh at me. ;-) )
 
I'm trying to find a legit use case for this, beyond "toying with win32 api"
@MathieuGuindon In this instance, it is to improve my API/project's interface. I am creating a wrapper for the SetTimer API, and would still like to give the opportunity for users to pass a TIMERPROC callback directly. A second level abstraction will use a command class/ an event source to make things more VBA-idiomatic. For maximum flexibility I'd like to expose the raw workings though, and one aspect of my wrapper API is that it allows a synchronous first call to the TIMERPROC, so I'm looking for the best (least Windows-update-breakable) way to do that. Mac support was dropped from the start — Greedo 13 mins ago
 
I'm just trying to get ahead of the curve when I get the request of "We need this to also work with the upcoming code cycle too." IE two different data sets that need to remain distinct.
 
6:25 PM
> Events are basically callbacks, but without running with scissors^H^H^H^H^H^H^H^H^Hpointers.
lol
 
The question got deleted afterward. :\ Not sure if offense was taken.
I did think that was a good question to ask. I know I have wondered that before and needed to be pulled down to reality.
 
6:42 PM
@MathieuGuindon And usage of proxies allows the Provider Pattern to be used?
 
the provider pattern?
I suppose, yeah. damn there's too many patterns.
 
Unfortunately we use that lot in RD code
 
7:00 PM
@MathieuGuindon i died man, that's perfect.
 
hrm.... I can't do ctor injection since VBA-landia doesn't have them.
 
Actually, I think we do that in very few places.
The only place I can think of from the top of my head is the instantiation of annotation objects.
 
@IvenBach factories
 
That was my next thought.
 
^^
Personally, I went the static factory way.
 
7:02 PM
Give the factory enough info to new up what I need and use that for method injection.
 
\o mind if I ask for some advice re code review here? @MathieuGuindon
or any other code review regulars (if present)
 
@IvenBach We were thinking about the correct thing but using the wrong #Words. Big surprise...
 
Apart from the initialization code, nothing outside the factory modules is allowed to call code inside those modules.
What I do is to set up a method Initialize_Properties and then call that from my factory module for that interface.
The exception are factories for simple data containers without logic.
I know that @MathieuGuindon uses factory methods on predeclaredId classes, but I do not really like that because I have not found any way to properly hide them.
 
> I'm not the best at GitHub, but didn't @IvenBach close this back in Oct '18 with a PR that specifically fixed it?
 
@M.Doerner I don't like having a "factory module" that can create anything and its mother though. I guess we can meet in the middle and use a dedicated SomethingFactory class?
@QHarr what's up?
@Duga importing an existing module doesn't add the @Folder annotation. adding a new module does though
 
7:14 PM
What is decribed as a provider in the article seems very much like a scaled down service locator.
Basically, it is a factory gone wrong.
I do not think that factories are too bad. You really need them sometimes.
 
In the article, he talks about a very specific kind of class he calls a provider.
 
and it's not DI'd. I think most of our providers are DI'd.
 
It is even static in the article.
 
The only exception I know of is with the Main project which we cannot use DL and therefore we do have to use SL.
 
7:19 PM
Most of ours are rather factories with another name.
 
(VbeProvider in this case)
 
Why do we even use that?
It is only ever used inside Extension.
 
in other projects it is DI'd as normal.
I think there is one project that also uses it but I can't recall at the moment.
Test engine, I want to say.
 
We could just create an instance and save it in a variable on Extension.
 
I think that is already the case.
it is passed into the container as a singleton.
 
7:21 PM
No, it is static.
 
0
Q: Clean up code that transfers data from DB2 Server to Excel

Zack EThe code below is functional and works as expected, but I imagine there is a better way to test for the error that I am testing for . The scenario is that data is transferred between two different servers throughout the year, so I built in an error handler that checks to see if the connection to...

 
Oh, now I looked at the references to VbeRuntime, there are lots.
The fakes seem to use it.
 
Yes, I was at wrong level.
 
Is it necessary that they have a default constructor?
 
I was actually thinking of the VbeRuntime which is provided by VbeProvider indirectly here.
I believe so because they are used in VBA code
 
7:26 PM
That explains why we need the static.
This is a bit annoying.
 
and I have the same problem with VbeEvents
I have in my mind to borrow the idea from Wayne's PR and create a new class VBIDEExtensions or something, and tie its lifetime to the original vbe instance, and get the related classes from that.
 
@this Heh, a couple of them are mine (providers for the root VBE and AddIn objects). Had to use that pattern as a factory would have needed access to all the concrete types, which would have created circular dependencies. With a provider, you can delegate that to another assembly.
 
Right I remember that problem
I don't think there's anything wrong with those providers, actually.
 
DI not in the loop because its too early, before resolution.
 
It's mainly the VbeProvider and VbeEvents that I do not like very much.
 
7:33 PM
ah yeah
hadn't seen those till now
 
Having a provider in the main assembly is not really a problem. Nothing but the setup process should be able to use it.
 
Perhaps but the problem will become worse with the mocking provider and possibly API library
 
it looks like to me a lot of those are just called provider, but not using the pattern. some of them look to be strategy-pattern....
To me the provider pattern is CanProvideFor and Provide methods. IIUC.
There used to be something very similar in the Enterprise Library (is that still a thing?)
 
i think they've shuffled things since.
 
Heh, just googled CanProvideFor (no spaces), very few hits. Maybe I did misunderstand the pattern... Hey, maybe I invented a new one! ;-)
 
7:46 PM
I do vaguely recall a MSDN article about provider last year (or before?)
but MSFT being MSFT....
out with old, in with new!
 
@this yuck. EntLib was old school MS bloatyness at its worst. I don't miss it one iota.
 
#ProTip: If it contains "enterprise" in the name.... run away! Run as if devil was on your heel!
 
> No. That PR was closed due to age/staleness.. I never got back around to completing it.
 
@Duga gee, this guy who closed the PR is hypocrite.
4 months old and he's calling it old?!
 
7:50 PM
lol
 
Hm, I found another bug in the resolver.
 
@this Is that when the flavor begins to mature?
mumble mumble. I'm getting consistent OLE issues with Excel when running unit tests... Will sync with next when I can and retest.
 
I guess so? That guy like dem 6 months+ old PRs.
 
In all fairness that PR was knowingly more than past-Iven could handle. I'd stand a lot better chance at it now. :shakes-fist-at-nothing-in-partuclar: were it not for upcoming University I'd give it the old college try.
It could be a last minute PR fling.
 
it's always good to try something that you can't handle - otherwise you'll never learn to handle it
 
8:00 PM
@this Does the same thinking hold true WRT my wife?
 
Nobody rides a horse without ever having fallen out.
 
Christopher Reeve, Lucy Lawless, etc...
 
I am currently coding up several different ways of achieving the same end goal i.e. to check if some files are available during a certain window and download if so.
I am using it as a case study to explore synchronous versus async versus multiprocessing versus threading.
As each will be a piece of code in and of itself how would I go about posting them to code review? I was thinking one at a time as I complete them and incorporating
feedback from earlier code review answers to later postings where applicable. Just not sure if that is considered bad form?
 
@QHarr if feedback from the first post would be applicable to subsequent posts, I'd just post one, get the feedback, apply/refactor/enhance, and then post another one (linking to the first one if appropriate)
 
8:15 PM
@this Can you remind me of the url to the HTML version of the VBA specification?
 
@MathieuGuindon That was my thinking. It doesn't matter that it is for the same goal? I would hope not as the approaches are substantially different. I would have thought people might be pissed if I didn't take on board feedback from prior questions though (where applicable!)
 
thx
 
I usually google like ms-vbal <term I want to find>
 
Peronally, I always use the PDF version.
 
8:17 PM
which usually get me good hits within the specs.
 
Oh, I have never realised that the HTML verion is on the same page.
 
@QHarr I mean apply/refactor/enhance all of them were applicable, not just the one you posted :)
 
:derp: Must. Start. Using. CodeExplorer. More. It shows access modifiers.
 
@IvenBach need a PR to make CE load from type lib API. That would be a huge win.
 
^^
at this point any PR that leverages the type lib API is a huge win :)
 
8:21 PM
lol, yeah
all it needs is a bit of reviewing love. ;-)
 
I've not warped wrapped my understanding around the implications yet.
 
@this I'm hoping to have a few hours tonight for this
 
reading type lib is much much faster (we're talking milliseconds), so we'd be able to insta-populate the CE list without requiring a parse.
Mind you, we still need the parse for all the extra goodies
but for the simple navigation, it should suffice
 
eh, without a parse we get a PE-equivalent CE
 
@MathieuGuindon :+1:
 
8:23 PM
wait no, we get an enhanced one either way - type lib gives us the public members, no?
 
@MathieuGuindon I still think it'd be better than PE because we can still have search + show access modifiers.
Yep
(and private, too)
 
it's the folder that's the hard part.
 
hard part not happening without a parse
 
pretty much, yeah.
the real hard part is figuring how to backfill the existing CE nodes with declaration once parsing has finished.
or maybe it's not worthwhile to backfill - maybe just reload CE once parse finishes.
 
8:26 PM
I think the simplest would be to just toss out the typelib nodes
 
yeah
 
@this :drool:
 
@IvenBach "AppVoyer" - surreptitiously watching your apps from behind the bush.
3
 
@MathieuGuindon do we require @Folder be in the declaration section?
 
@MathieuGuindon understood. Thank you.
 
8:36 PM
@this yes
@FreeMan lol, I thought exactly the same thing ...kept it to myself though ;0)
 
@this More precisely, it has to be above the first module body element.
That is our requirement on all module annotations.
 
well, we can use VBIDE API
it is simple enough to be regex'd without parsing, no?
 
probably, but... #CanOfWormsWarning
 
yeah. I think if it remains only for folder support it might be Okish
 
8:52 PM
Just to mention it, the @Folder annotation can be outside the declaration section because the VBE is a bit stupid about that.
 
we can use ProcOfLine for the first element to avoid that.
 
More and more resolver bugs I find.
 
@M.Doerner all around arrays and default members?
 
Good you reminded me of the ignored tests.
Yes
The first one I found today was that default member and array accesses on dictionary access expressions were not resolved correctly.
Now, I found out that we do not resolve named arguments of default members correctly.
There is actually an issue for that.
So, if I get it to work, I can close one more issue.
 
Great!
(and sorry about finding more bugs)
 
9:08 PM
It is a good thing.
Now that I actually know how things work in the resolver.
I think I also know what I have to do to fix the named aruments for the default members.
 
Nice. That makes you one of privileged few. I only have a very vague notion of what is happening in the resolver.
 
Maybe I will find some time and motivation to write a short overview in the wiki.
2
 
so, no not host-specific and apparently they touched oleaut32.dll there
apparently because of security, I guess.
 
I'm considering just closing my PR - I don't know what I'm doing and I'm just breaking things
@this oh, yikes
 
I think your PR will be in conflict with Wayne's PR since we changed several things, including a small change to the ComProject
and besides, we need the data in the Declaration, rather than inspections so that you don't need to access typelib API from inspections. IMO, the access to typelib API should be limited to Com*** which can be then picked up by the parser/resolver.
 
9:27 PM
like I said, I don't know what I'm doing and it's breaking things :)
 
actually now you know since I just told you. :)
you always can re-try in a fresh PR with hopefully much simpler & robust type lib API
 
9:59 PM
Mug. Your article about there is no worksheet. Just saved me so much headache.
 
@this closed. I'll reimplement the simple inspection in a new small PR
@this eh, see that's the resolver part I'm breaking ...typelib api isn't the issue - not breaking the resolver is =)
 
@this The (ignored) test you introduced for #3937 actually failed already when getting the expected because the ParentScope was wrong.
 
Ok, I tried - and failed. Sorry but this code needs to burn and be essentially rewritten. First thing to do is to de-tangle the ForEach variables. Don't use loop variables for anything other than iterating the loops: don't reuse them after the loop finished, the reference held is a residual pointer to whatever the last iteration was at. Without running the code I'm not seeing how the exit condition can even be met. I wish I could post an answer, but this code needs serious attention. Fix the foreach variable reuse, then qualify all Range calls; that'll be a good start. — Mathieu Guindon 1 min ago
How is that not an infinite loop???
TTGH
 
10:40 PM
0
Q: Working Excel VBA code runs and finishes, but gives "not responding" while waiting, could use a speed boost

WhitMy code below works, but I'm sure could use some help to speed it up. I'm using an adodb connection with sql to get info and put it in a userform. Any suggestions would be appreciated. Sub Booked_Loans_To_Review() Dim conn As ADODB.Connection Dim rs As ADODB.Recordset Dim SQLStr As String Dim d...

 
Variable reuse is like condom reuse... I falls into the category of #JustBecauseYouCan.
 
00:00 - 23:0023:00 - 00:00

« first day (1895 days earlier)      last day (1285 days later) »