« first day (1736 days earlier)      last day (1444 days later) » 

12:01 AM
RELOAD!
[banane-io/PDB] 2 opened issues.
 
@Duga out of ammo again?!?
 
[rubberduck-vba/Rubberduck] 4 commits. 4 opened issues. 16 issue comments. 302 additions. 6 deletions.
[Zomis/minesweeper-flags-client] 1 commit. 9 additions. 8 deletions.
 
12:16 AM
@mansellan votes have been refreshed, go do 40 reviews in the so queues and do 40 votes on any SE sites you want :)
or don't. Duga just tells us we can
 
 
2 hours later…
2:30 AM
right click Rubberduck.Deployment -> Properties. Build tab. This page cannot be loaded. And, uh, 2019 is at RC? MS, you might wanna fix some stuff. Also, I want my start page, and its not in Tools-Options like you say it should be.
downloads 2017
 
@FernAndr nice! just noticed the 2014-2018 at the bottom... that should probably be made dynamic and grab DateTime.Now.Year
 
@MathieuGuindon Actually, I think that's debatable. Not a lawyer, but I think the idea is to put the earliest date on, i.e. the date at which copyright is first asserted. Idea being to prevent prior art claims (needs validation)
 
@mansellan lol, I'm fully expecting a boatload of problems with 2019... inclined to stick with 2017 until 2019 is at least a year into official release - but then again I adopted C# 6 quite late
 
@MathieuGuindon Pretty disappointed tbh... I thought the preview was supposed to be almost-RTM, but I guess not.
also, not happy with them ditching the start page, especially if the tools-options omission is a recent decision. I really like the start page, the new dialog is dumbed down to "not scare newbies" according to their blog.
 
@mansellan I've no idea TBH... still there's new code being added - but you're right it would be weird to bring up the about box on Dec.31 and suddenly the year changes at midnight
 
2:38 AM
@MathieuGuindon I only say this because I recently put a (c) on a webpage and didn't know the law, so googled it.
I suspect that DateTime.Now.Year is out, because if\when RD becomes abandonware it's unjustifiable to claim copyright until the end of time...
 
Is "the law" international? RD is part USA, part Canada, part Germany, part UK, part Australia, part God-knows-where-else
 
@MathieuGuindon yeah, there's that...
 
@mansellan that's the killer argument against it =)
 
I'm sure SO has a few legal sites that can give a definitive answer :-)
 
Still, can't hurt to update to 2019
 
2:42 AM
@MathieuGuindon seems reasonable. parts of it are for sure.
each commit should be (c) to its commit date i guess?
 
I suppose so. I'd hate to have a copyright notice on every damn file though.
I'd be the first to forget to add it
 
hence thinking a range is overkill. start year should be enough iiuc.
GH history should be sufficient to prove anything newer
 
might be. the range is pretty much just for aesthetics tbh
 
^ I believe the date as a whole is too. The key thing is: "if it goes to court, can you prove creation date"?
its really just a convenience/warning
but like I say, not a lawyer.
 
I really hate thinking about legalese. My take is basically "can't we just make something cool together for the VB6/VBA folks out there"
 
2:50 AM
:+1: That's why I like MIT. Use my code. enjoy it. Profit from it. IDC, just don't try to claim it's yours, and DON'T SUE ME. FOR ANYTHING.
But I can understand why RD is and needs to be GPL.
@MathieuGuindon related: the VB6 folks don't seem to have taken to the duck just yet :-(
or if they have, they're not talking about it on the interwebs
 
the part I don't like about MIT is "take our work and make it closed-source if you like, then market it as your own and sell for profit" - the "free" and "open source" part is critically important IMO.
 
yeah, I get that. for me, i don't mind my code being used that way. If I thought I could monetise it, I wouldn't have MIT'd it. If I just wanna give something to the world, MIT all the way for me.
 
@mansellan I think we need to do something about the startup, make everything lazy-initialized. Should help adoption.
 
@MathieuGuindon don't forget, they'll only sell on the basis of what they add - the original is still there for anyone to use\fork.
@MathieuGuindon i don't follow - you think startup time is dissuading VB6 users in particular?
 
I know for a fact at least one user uninstalled because of it
 
2:57 AM
ah yes, i think that was in chat.... one user does not a trend make though...
 
Anything that interferes with normal process is an annoyance though. That's why I disable the start page in VS ;-)
 
@MathieuGuindon lol. I like the feed...
too lazy to follow all the blogs...
OK blue sky for VB6... If we can get into the debugger, we can ditch the VB6 entirely, and either make a modern IDE or hook into VS Code. And yes, I know that's a different path, and a different project. But one that RD could birth, and one that could reignite VB6.
too much?
(although, random thought... we could hook Alt-F11 and spawn VSCode-VBA instead of the VBE... #JustSaying...)
then again, it's 03:04 GMT, insomnia may be raddling my brain...
 
tired too.. gotta finish that damn script though. 'night!
 
night :-)
 
3:25 AM
confirming - if I hook kernel32's Beep, user32's MessageBeep, vbe's rtcBeep, and winmmt's PlaySound, and only the vbe's rtcBeep gets called, that's a good proof that it's not building up on kernel/user's implementation, agreed?
 
uh, sounds plausible to me. But i suspect you want someone more interned in COM to verify...
 
this isn't really COM. This is more of EasyHook.
 
yeah ino... but the pun was irresistable.
 
I kind of halfway expected that vba's Beep would be using kernel's Beep internally
 
3:41 AM
@this are you trying to implement ShowParameterQuickInfoCommand to make AC display it without beeping? :D
 
well, i did determine that it's the rtcBeep that gets called
the trouble, however is that it needs to be pumped; hooking is either unnecessary or insufficient.
For whatever reasons, I did not see the message come up in the message pump but I might be Doing It Wrong™.
 
@this the fun part is that AC is invoked straight from the msg loop - not sure what that entails for hooks
 
yeah. hooks won't get called until it's been handled
 
@this question (did a quick search, left me disappointed) - is it possible to lock a table while I'm inserting/updating it?
 
3:51 AM
i think you want OPTION (TABLOCK)
But transaction isolation should be sufficient.
TBH I never use those options, except for recompile
what are you trying to achieve?
 
I'm looking at a stupid table I need to insert & update, but the PK is bogus and determined by some "NextID" value in another table - I need to ensure the consistency of that nextid value
 
wow. pumping did work.
 
Sage normally prevents updating that data unless everyone is out of the system
 
@this - I have VS running / building on the host, and ODE installed in a VM. How can I test RD in the VM? Does the build make an installer?
 
which I'm trying to basically circumvent
 
3:53 AM
I don't think it builds the installer as part of the build
 
:-(
 
@mansellan build registers the vbe addin
 
you can take from the appveyor.yml the command to build the installer
but that implies you have InnoSetup installed
 
@MathieuGuindon on the host, sure... in a VM, not so much...
 
i'd install InnoSetup then compile it
 
3:54 AM
@this I guess I'm getting InnoSetup installed :-)
 
right, you need innosetup
 
wait
so this is a linked server?
I would bet that option won't do anything for you
 
yes, to top it all off
 
is there a thing like Sage's SQL dialect?
 
3:55 AM
maybe using native Sage SQL would
well, fun!
did you try something like this already....
 
So, cross fingers and hope nothing breaks
The good news is few users are going to be using this
 
SET TRANSACTION ISOLATION LEVEL SERIALIZABLE;

BEGIN TRANSACTION;

SELECT [PK]
FROM [SageDumbAssTable]
ORDER BY [PK] DESC;

-- do your updates....

ROLLBACK;
(aircode)
this also presumes that Sage is ACID compliant
 
@this resists urge to insert "One does not simply presume" meme
 
the best part is, to update this idiocy, I need to join on FMTSTYLE and OPTFIELD
and hope I get the right OPTID
 
loving them disvoweled names.
 
3:59 AM
or join on OPTID, and hope I'm updating the right FMTSTYLE and OPTFIELD
IKR
 
given that OPTID is the "primary key", I think you need to select on it
 
note the PK doesn't have identity specification
 
the idea is that if you select on all primary key (and also use some non-indexed column in your ORDER BY), it should place a exlcusive lock on the table
again, you're at mercy of how Sage implements their driver & comply with SQL standards....
 
not really, this is purely SQL Server stuff
the software does its thing
I'm bypassing it
(which is technically not supported, but I'm allowed because my boss said so)
 
oh I'm confused. I thought ath was a linked table
 
4:03 AM
it's a linked server
 
if this is purely SQL Server, then yes, that above should work.
 
^ that's technically where I need to go and update the "next ID"
I'm just trying to avoid the glaring concurrency issue with this design
love the PK name there
obviously named after its author
 
just so I'm clear -
dbo.GXOPT is what exactly?
the dbo makes me think it's a SQL Server thing, not a linked server, hence the question.
 
a single-record table that the software uses to determine what the "next ID" should be
 
facepalms
so you're tangoing with the software?
 
4:06 AM
yes
 
ok now that makes a bit more sense
and the tango'ing goes on from the C#, right?
 
nah I'm scripting everything in stored procs
invoking from C#
 
do you have to interact w/ the software between the stored procs calls?
 
nope. I totally ignore the software
all backend
 
Ok.
 
4:08 AM
gah
 
except the software potentially has active users while my procs are running
 
ok, i'd just try the transaction thing above
 
18>C:\My\Repos\GitHub\mansella\Rubberduck\master\Rubberduck.Deployment\Rubberduc‌​k.Deployment.csproj(71,5): error MSB3073: The command "%SystemRoot%\System32\WindowsPowerShell\v1.0\powershell.exe -ExecutionPolicy Bypass <snip> 'Rubberduck.dll|Rubberduck.API.dll'"" exited with code 1.
 
SELECT DUMMY FROM dbo.GXOPT while inside a trx?
 
I've set remotesigned
 
4:09 AM
@mansellan just go unrestricted, it's your VM :)
 
lol ok
 
declare @currentNextOptionId decimal(19,0) = (select NXOPTID from [linked server].[sage db].[dbo].[GXOPT]);
^ that would acquire the lock by just being inside a trx??
(assuming serialized isolation level)
seriously, I look at that table and I then think of the earlier conversation about devs doing stupid things with databases...
 
@MathieuGuindon nope, same issue. giving up for tonight, but i think we need to make it easier to build from a fresh install, for new contribs...
 
to be fair normally you don't need to build an installer though
 
no this is before that, just tryna get it running in the host \ office 2010 atm
 
4:16 AM
oh
 
tbf, i should re-read the wiki... might have missed something
(context - I've set up my dual-system-drive work\non-work laptop, and am just in the process of installing dev tooling on the non-work side atm)
bah, wiki followed, deployment project still not building. sounds like a tomorrow kinda problem. ttgtb.
 
'night!
 
@MathieuGuindon it should
do you have snapshot isolation?
 
how would I know?
oh shit
 
it's a database level setting
 
4:28 AM
I don't even have the OPTID in my source
I need to lookup the OPTID for existing rows... using the natural key that's not even defined or indexed
fml
 
hmm. think you have to select them all
nice, got the showintellisense working, it looks like
 
nice!!
 
probably should rename the command
 
yeah, ShowIntelliSense isn't right
ShowParameterQuickInfo would be more like it
 
should Parameter be necessary?
ctrl + i => Show Quick Info
 
4:35 AM
not really
 
so just ShowQuickInfoCommand?
 
cool i'm sure Comintern will laugh at my half-assed pumping + hooking
 
#WhateverWorks
 
^
 
4:36 AM
are you hooking+unhooking at every keypress though?
or just setting up the hook at the service level when the AC hook is enabled?
/disabling when AC hook is disabled?
 
it's in a using() within the Execute
 
also, hooking shouldn't be needed if SCP is disabled
 
    protected override void OnExecute(object parameter)
    {
        const int showIntelliSenseId = 2531;
        using (var commandBars = _vbe.CommandBars)
        {
            using (var command = commandBars.FindControl(showIntelliSenseId))
            using (HookVbaBeep())
            {
                command.Execute();
                _pumper.PumpMessages();
            }
        }
    }
I think that should cover all the cases
 
hm, the command ID might be different in VB6 though (ping @mansellan)
makes me wonder whether caching the command would be a good idea
 
hmm. FWIW, the HookVbaBeep news and return up the hook
I suppose I could cache the definition
 
4:41 AM
the only risk with caching, is leaking it on dispose
shouldn't they come from the COM safe?
basically we want to avoid making too many COM calls in that msgloop
it's not like the command has any chance of evaporating between keypresses
maybe I'm over-thinking this though
 
hmm, you mgiht be right - I only wanted to cache the definition but looking at the code again, it's creating a hook
    private LocalHook HookVbaBeep()
    {
        var processAddress = LocalHook.GetProcAddress(_vbeApi.DllName, "rtcBeep");
        var callbackDelegate = new VbaBeepDelegate(VbaBeepCallback);
        var hook = LocalHook.Create(processAddress, callbackDelegate, null);
        hook.ThreadACL.SetInclusiveACL(new[] {0});
        return hook;
    }
 
#PickYourPoison: stateful command with cached hook & commandbar item, or regenerating WM traffic at every keypress
 
5:08 AM
ok, I got GXOPTION and GXOPT updated to the best of my knowledge. I doubt the GX module even uses any transactions, so I'd be alone acquiring locks.
thanks for the help, @this - I'm shutting down
 
5:50 AM
^ Making stuff agile is easy!
> What have you learned in your past three sprint cycles and what did you do about it? (Wrong answers: “what’s a sprint cycle?,” “we are waiting to get approval from management”)
What’s a sprint cycle got me laughing.
 
 
6 hours later…
12:07 PM
> # [Codecov](https://codecov.io/gh/rubberduck-vba/Rubberduck/pull/4833?src=pr&el=h1) Report
> Merging [#4833](https://codecov.io/gh/rubberduck-vba/Rubberduck/pull/4833?src=pr&el=desc) into [next](https://codecov.io/gh/rubberduck-vba/Rubberduck/commit/1e3e615cc1426c9817e1349ac6f27ee5678fca56?src=pr&el=desc) will **decrease** coverage by `0.23%`.
> The diff coverage is `58.54%`.


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


```diff
@@ Coverage Diff @@
## next #4833 +/- ##
=========================
 
12:28 PM
0
Q: Data Scraping Using VBA

Murali KI have below code, which fetch data from a Intranet. But its taking more time to fetch data.can someone help me to modify the code to increase the performance. Thanks In Advance Note-I haven't posted URL as it is clients website. Sorry about that. Sub FetchData() Dim IE As Object Dim Doc As HT...

 
[rubberduck-vba/Rubberduck] build for commit 9e853153 on unknown branch: AppVeyor build succeeded
> # [Codecov](https://codecov.io/gh/rubberduck-vba/Rubberduck/pull/4833?src=pr&el=h1) Report
> Merging [#4833](https://codecov.io/gh/rubberduck-vba/Rubberduck/pull/4833?src=pr&el=desc) into [next](https://codecov.io/gh/rubberduck-vba/Rubberduck/commit/1e3e615cc1426c9817e1349ac6f27ee5678fca56?src=pr&el=desc) will **decrease** coverage by `<.01%`.
> The diff coverage is `47.37%`.


```diff
@@ Coverage Diff @@
## next #4833 +/- ##
=======================
> # [Codecov](https://codecov.io/gh/rubberduck-vba/Rubberduck/pull/4833?src=pr&el=h1) Report
> Merging [#4833](https://codecov.io/gh/rubberduck-vba/Rubberduck/pull/4833?src=pr&el=desc) into [next](https://codecov.io/gh/rubberduck-vba/Rubberduck/commit/1e3e615cc1426c9817e1349ac6f27ee5678fca56?src=pr&el=desc) will **decrease** coverage by `<.01%`.
> The diff coverage is `47.37%`.


```diff
@@ Coverage Diff @@
## next #4833 +/- ##
=======================
[rubberduck-vba/Rubberduck] build for commit 9e853153 on unknown branch: 64.42% (target 0%)
> # [Codecov](https://codecov.io/gh/rubberduck-vba/Rubberduck/pull/4833?src=pr&el=h1) Report
> Merging [#4833](https://codecov.io/gh/rubberduck-vba/Rubberduck/pull/4833?src=pr&el=desc) into [next](https://codecov.io/gh/rubberduck-vba/Rubberduck/commit/1e3e615cc1426c9817e1349ac6f27ee5678fca56?src=pr&el=desc) will **decrease** coverage by `<.01%`.
> The diff coverage is `47.37%`.


```diff
@@ Coverage Diff @@
## next #4833 +/- ##
=======================
 
@Duga done making up your mind, bot?
 
@QuackExchange oh look, everyone's favorite - web scraping!
 
@FreeMan IKR? Wanted to say something snarky but bit my tongue (hard).
 
12:48 PM
:guilty: hangs head in shame
In my defense, I've not yet been able to get the API working from my VBA code for one site I need to get data from, and the other doesn't have an API
 
I think the real problem is that ultimately, they are unanswerable
too much specific details to be right and not easily generalized
Did you ever try out the macro recorder software?
My guts is that those would give the best ROI for that kind of scenario.
 
1:20 PM
@this Uh... what does _pumper.PumpMessages(); do there?
 
Without it, the beep won't go through until we leave the execution
 
If that's intended to run from inside the WndProc, that's potentially re-entrant.
 
remember that we're in the message pump when we're executing the command
I knew it felt wrong but it does work?
my original approach was to find the window message that would represent the beep but alas, I failed.
 
I'm not 100% sure how that would work.
 
what I do know is the following.... if I hook the beep for the command's lifetime, it does eventually get called without the pump messages.
 
1:22 PM
The hook is also fairly heavy in the window proc.
 
Yeah, I didn't see a way to enable/disable hook quickly?
it seems I can only create hooks?
Again, I'm sure I'm doing it all wrong
 
Could we set the hook for RD's lifetime, then use an "ignore the next beep" flag?
 
what about the fakes?
we have one for the Beep. that probably shouldn't hook at the same time.
Furthermore, "ignore the next beep" might not work - we don't get beep all the time
only when it's not appropriate to display the quick info
 
I'd need to think through the fakes. The UI thread is blocking when they're set though.
 
that's why I scoped the hook like that
so that when pumping happens, the hook will have had been called before we leave the Execute method
Remember that we have another open issue about fake calling another fake (implicitly) having an unpleasant effect on the ducky.
 
1:26 PM
That makes sense, but pumping from inside the message pump seems really dangerous.
 
For one thing I was surprised that the hook did not pick up the kernel32's Beep
 
I'm guessing that it's a fairly trivial implementation.
 
I would have thunk that VBA's rtcBeep would be just call kernel32's Beep, or at least user32's MessageBeep internally
but that did not happen. Heck, PlaySound wasn't even picked up, too
and i might have had missed it but I did not see any thing in windows message suggesting that a rtcBeep was processed.
 
I could just disassemble it and see what it does.
 
should any COM calls like rtcBeep have a some kind of windows message? Or could it be done silently without going through the message pump?
I still have much to learn about message pumps.
 
1:31 PM
I would doubt it - they'd call the function in response to a message.
 
ok, it might be that i totally missed the message then
and in which case, we could just filter for that message by setting a flag
 
The message would probably be the keypress though.
 
that would be much better than hooking
hmm.
but we don't send a keypress?
we invoke the command's Execute
 
Right, but in normal function it would be running the command's proc in response to some other keypress or mouse click.
That's why I doubt it would come through the pump.
(the beep that is)
 
here's the thing.
the Execute is on a COM commandbar
and internally within that implementation, it may or may not invoke Beep
but since we're on the message pump, it can't post the COM call for Beep unless we pump.
 
1:36 PM
Right - that's why it's re-entrant.
 
that might explain why breakpoint acts a bit strangely.
 
I can either breakpoint into the Execute procedure before the pumping, OR I can breakpoint into the Beep callback and the lines after the pumping, but NOT both.
 
So you have a pile of WMs waiting on the STA queue. You pull off the top message, and basically say "I'm going to hold onto this one while the same thread processes the others".
 
but even with that odd behavior, it was enough for me to verify that both the Execute (and its request to pump) and the callback are called.
hmm. that sounds bad.
 
1:38 PM
The STA scheduler calls back into the same WndProc when you pump, but the message you pumped from is still "blocking".
 
yet, it suppresses the beep as expected...
without the pumping, it will get beeped
 
That's a classic scenario for a setting up a deadlock given the right conditions.
 
:(
 
Which you don't have control over.
 
can we do better? What choices there are if it's not dispatched as a message via the message pump for us to filter?
oh yeah, you linked that before, I think. that was a very good read but I should re-read it
 
1:41 PM
That's why my instinct was to flag it and suppress it later.
 
ok and in the scenario where no beep occurs, then what?
what will remove the flag?
 
Nope.
 
so we'll end up suppressing some beep for something else
 
Consider the scenario when the command pops a modal window.
Or creates any blocking chain of events. We're done dealing at that point with no recovery path.
 
Sorry I don't follow. The command is just displaying a hovertext tip.
and if we just have a flag to suppress the next beep, that could happen long into the future after the command has executed (and opted to not beep)
 
1:46 PM
Oh right - I wasn't clear there. I mean the pump command.
There's no way to determine what the state of the message queue is there.
 
Ok - and if the beep never goes through the message pump what are our options?
 
1:59 PM
I still think setting a hook for RD's lifespan would be an option.
 

« first day (1736 days earlier)      last day (1444 days later) »