« first day (1777 days earlier)      last day (1403 days later) » 

8:00 PM
@Vogel612 just to be sure!
^ #LateToThePartyAsUsual...
 
~sigh. 10 open issues assigned to me
 
[rubberduck-vba/Rubberduck] build for commit ca691d55 on unknown branch: AppVeyor build succeeded
> # [Codecov](https://codecov.io/gh/rubberduck-vba/Rubberduck/pull/4924?src=pr&el=h1) Report
> Merging [#4924](https://codecov.io/gh/rubberduck-vba/Rubberduck/pull/4924?src=pr&el=desc) into [next](https://codecov.io/gh/rubberduck-vba/Rubberduck/commit/63e529a2bd25f73822bcea037c83b4001b5aa800?src=pr&el=desc) will **increase** coverage by `<.01%`.
> The diff coverage is `86.32%`.


```diff
@@ Coverage Diff @@
## next #4924 +/- ##
=======================
[rubberduck-vba/Rubberduck] build for commit ca691d55 on unknown branch: 64.53% (target 0%)
 
Is there any particular penalty for using Iif() in VBA (not WorksheetFunction)?
 
@FreeMan yes.
both expressions are evaluated
 
> # [Codecov](https://codecov.io/gh/rubberduck-vba/Rubberduck/pull/4924?src=pr&el=h1) Report
> Merging [#4924](https://codecov.io/gh/rubberduck-vba/Rubberduck/pull/4924?src=pr&el=desc) into [next](https://codecov.io/gh/rubberduck-vba/Rubberduck/commit/63e529a2bd25f73822bcea037c83b4001b5aa800?src=pr&el=desc) will **increase** coverage by `<.01%`.
> The diff coverage is `86.32%`.


```diff
@@ Coverage Diff @@
## next #4924 +/- ##
=======================
 
8:11 PM
ah. I knew there was something. This is fairly simple, foo = iif(bar<0,0,bar), so it's divide by zero and invalid use of null safe.
 
@FreeMan same as any other function call :)
 
if yer stupid, it'll bite?
 
if yer givinit expressions, VBA will evaluate them before passing their respective result as arguments
IIf isn't "evaluating both expressions" - it doesn't even get to see the expressions
 
Can I not wildcard white listed identifiers?
 
@FreeMan time for you to pick up C#?
 
8:17 PM
I still get loads of Consider renaming 'Sheetxx' inspections. I can't rename these because the sheets are dropped & recreated on every execution.
@Vogel612 I'm getting my head wrapped around git. That's my first step...
TBH, I know everyone appreciates my sarcastically given title as head of QA, but I really do feel like all I do is complain about stuff. I get that finding the bugs is important, but I do want to do my share of fixing them, too.
@FreeMan OK, I could rename them, but next time I run the code, the warnings will come right back...
 
@Vogel612 You got hot a minute to help me unFCK my git folder?
 
sure
 
@FreeMan create them with a better name?
 
@MathieuGuindon I thought that code name could only be changed by hand in the VBE...
 
hmm yeah, or through the VBIDE API
 
8:21 PM
@Vogel612 I wanted to remove a file that was removed in a directory. I used git rm . -r and that wasn't the correct command. That removed everything that had already been pushed to my repo.
I have commits that I want to keep that need to be pushed. Is the correct way to stash them and pull from my repo?
 
run git checkout -- .
 
Making the resolver non-dynamic has one more positive aspect: analyzing the performance in a profiler is a lot more straight forward.
 
and now that I've stumbled & bumbled my way into the VBE API to export/import modules, I'm a certified expert in finding my way around docs to figure out how to change worksheet code names!
 
wait ... @IvenBach the working directory is now empty except for the .git folder, right?
 
@IvenBach ouch! BTDT, lost 11TB of data!!
 
8:24 PM
@Vogel612 the .git directory and the new directories that I had added and want to push to the repo.
 
what does git status say?
 
$ git status
On branch master
Your branch is ahead of 'origin/master' by 5 commits.
(use "git push" to publish your local commits)

nothing to commit, working tree clean
 
that's confusing ...
 
looking at git log I see the commits I want to push to my repo.
 
8:25 PM
if git checkout -- . does not fix it, do git reset HEAD and retry
 
Just out of curiosity - before pattern matching was a thing, would have Visit<T> worked?
 
git checkout -- . is saying to checkout everything from the index (committed&pushed repo)?
 
@this no, because we still wouldn't have known the correct closed type
@IvenBach yes
 
@MathieuGuindon patiently waits for that to hit someone's priority list and/or for him to learn 'im some C#
 
@FreeMan that's marked as [ignored], so I don't think it will hit anyone's priority list any time soon
 
8:28 PM
:barf: refusing to merge unrelated histories.
 
details... :/
I'll let you focus on Iven - much more important topic than mine...
 
@IvenBach hmm ...
aight, let's just nuke the thing
git reset --hard HEAD
you should be able to push just fine, btw.
 
will that delete the directories & files I created?
 
@IvenBach but you deleted them with rm did you not?
 
That only removed those that had already been pushed to my repo.
I still had my directories and files I'd created, committed and wanted to push.
 
8:31 PM
and checkout did not restore them?
 
git checkout -- . did restore them.
 
so what is the issue left now?
 
My branch and origin/master have somehow diverged.
$ git status
On branch master
Your branch and 'origin/master' have diverged,
and have 6 and 3 different commits each, respectively.
  (use "git pull" to merge the remote branch into yours)

nothing to commit, working tree clean
$ git pull
fatal: refusing to merge unrelated histories
 
could you graph them for me? git log --oneline --decorate --graph master origin/master
 
$ git log --oneline --decorate --graph master origin/master
* 597ae31 (HEAD -> master) Perimeter and Area practice sheet, Part2
* f664d11 Fractions practice sheet, Part1
* 72e05e1 Shapes and modifier keys post
* 493fb58 Remove Thumbs.db
* 44d1cc6 Add .gitignore file
* 9088076 Initial commit
* 8e6bf8c (origin/master) Home page images
* c0b7dcc Published blog posts
* dbada7c Initial commit
 
8:35 PM
wat
wow, wtf did you do?
 
Unlocked the easter egg?
:shrug:
I don't know what I'm looking at.
 
this looks like your origin doesn't even have anything to do with the repo you're currently in
 
what if the origin isn't the origin you think it should be?
(not sure if that is even possible)
 
origin is indeed where it should be pointing to.
 
8:38 PM
if you run git show --format=%P 9088076 I assume that it will be empty
 
Nope it's populated with lots info.
 
try git reset --unIvenBach?
 
sigh... that's because git partially ignores the format specifier
add an -s to the options, please
 
Laymans terms git has disconnected my working directory from origin? I thinks they're separate distinct things?
 
I'm trying to confirm that right now ...
note how you have two initial commits
 
8:44 PM
$ git show --format=%P -s 9088076 shows nothing
 
yea, that confirms my suspicion
there's literally no link between origin/master and master
they're completely unrelated histories
 
I'm so good at Funucking stuff up.
 
when you try to merge (and pull always includes a merge), git searches for the "merge base" between the commits you merge by going back through history
 
Since they don't have a common ancestor they are considered distinct?
 
exactly
The only way this can happen is if you didn't clone your repo from origin
instead you probably ran git init and git remote add.
Then you started working and commited some stuff
 
I don't think that's what I did.
 
> **Rubberduck version information**
Version 2.4.1.4666
OS: Microsoft Windows NT 10.0.15063.0, x64
Host Product: Microsoft Office 2016 x64
Host Version: 16.0.4822.1000
Host Executable: EXCEL.EXE

**Description**
Adding `'@Ignore ImplicitByRefModifier` to a function declaration does not work if there is a line continuation (`_`) in the declaration.

**To Reproduce**
Steps to reproduce the behavior:
1. Write a function declaration with an implicit `ByRef`
2. Edit in a line continuatio
 
voilá, histories are diverging
 
git clone will always do a pull
 
8:48 PM
mkay. I guess best option for me to then is clone my gh repo and manually move over the directories to that new one. Push to repo and see what happens.
 
and because the commit messages are all different, I don't think you inadvertently rewrote the commits
@IvenBach that would be one option. The other would be to manually merge the histories
you said your wd is clean?
 
git its saying wd is clean.
 
you could do git checkout -b fix-mess origin/master and then manually merge the histories
 
That's probably going to be harder than copying them over to a newly cloned repo.
 
that would entail running git cherry-pick 44d1cc6 493fb58 72e05e1 f664d11 597ae31
git might shout at you a bit about conflicts, which you'd need to resolve
 
8:51 PM
There's a fix-mess parameter??? How awesome is that???!?!?!?!111!/!?
 
@FreeMan there isn't
it's a branchname
 
@FreeMan It's an alias for the Iven-Done-Fucked-It-Up-AGAIN command.
 
remember git checkout -b is a shorthand for git branch && git checkout
OBTW @MathieuGuindon will you create a preview image?
for the new github feature thingy?
 
yeah sure
todo++;
 
ugh... the template recommends leaving a "40 pt border" ...
 
8:57 PM
wut
i.e. over half an inch??
 
> Yea, I assume that's because a part of the logic for ignore annotations may fall back to checking the annotation based on the module's lines as retrieved from the VBE, which only respects physical lines, not logical lines...
 
@MathieuGuindon I'm mostly miffed that they didn't use ems, (px would've been the best metric tho)
 
@Vogel612 I ran through it manually as that was easier. I do need to use cherry-pick in more than just a example scenario. Thanks for the help.
 
how was this an example scenario?
 
This wasn't. I've only ever done them as part of examples.
 
9:00 PM
oh well, cherry-picking is usually not needed for most work with git anyways
either use rebase or have a workflow that doesn't require moving commits around
 
I know it exists. Have done it as part of examples. I just knew moving them manually and adding them was simpler (for my at least) this time.
 
> Quite exactly. If there is any physical line with code in between, an annotation does not apply. This is how annotations currently work.
 
 
1 hour later…
10:22 PM
@FreeMan TBF, they probably didn't block it. They just bought a list that included it. Enterprises...
 
@Vogel612 d'oh! I should know that
 
@M.Doerner Very interesting to hear that. Contrast to the LSP approach, which (iiuc) sends keystrokes across to the server, which can then choose when to send updates. Typically, it would wait for a certain dwell time (for example to wait for the user to stop typing), then request a build.
 
@mansellan I'm trying to envision how Liskov's Substittion Principle applies. ;-)
 
10:38 PM
Heh no, Language Server Protocol. New standard that VSCode uses, and increasingly others too.
#AcronymConflict
If we were ever to do out-of-process, we should [consider/do] this.
Not that Liskov doesn't rock, ofc :-)
tl;dr - the server keeps an in-memory representation of the source code, independent from how it is represented on disk. It then uses that to service requests for symbols, documentation, locations...
oh btw 'server' in this context just means 'another process', not an actual bit of iron.
 
Makes sense.
I would point out that if we have our custom code pane, there would be no reason to not just export the attribute pass files (for VBA project) and just work with them directly and import into the VBE lazily.
hopefully importing is much quicker than exporting.
 
Yeah but OOP solves more than just that - like not eating the Office memory limit for 32-on-64...
 
is there a LSP implementation we can build on?
 
sorry, OOP - Out Of Process not Object Oriented Programming #AcronymConflict :-)
 
I figured. :)
 
10:52 PM
@this there are many implementations. Ones that we can build on, uh, maybe?
IMHO, not a problem for right now anyway, just something to consider if we decide that OOP is the way forward.
 
Even if we do the OOP way, it still can't happen without a custom code panes...
 
@MathieuGuindon do you have a view on whether going out-of-process is a good idea?
@this gah clashed. why?
could we not hook ketstrokes?
 
you really want to do IPC w/ VBIDE?!?
Yes we already do that (hooking the keystroke) - we're just doing it with a host that really does not like having its bits touched.
2
 
Why would VBE get in the way of IPC?
had to star that!
 
The real problem is that it has lot of quirks and some hacky workarounds that makes it hard for us to just do a straight implementation.
 
10:57 PM
Hook the keystoke, dispatch to a server (async) - what could go wrong (genuine question)?
@this Yes, agreed. But in theory...
 
@mansellan VBE prettifying behaviour is the smallest edge case to consider there
we want the VBE as authoritative source on what the state of the code is.
 
@Vogel612 eesh, yes. retreats to box
 
then there's stuff like the break mode
basically OOP has a host of complications
 
@Vogel612 c.f. AC
gah
 
the clear advantage is the lift of memory restrictions and an avenue for using a proper DB
 
11:00 PM
WTF is the VBE so damn unpleasant to work with...
 
because it's a product of 90s?
 
the disadvantage is that we still need something to hook into the guts of the VBE that's more than "send keystrokes to [this named pipe]"
Also OOP doesn't alleviate the mess around window messages and dockable window hosts
 
@this I think you had the right idea.. replace the damn thing outright.
 
which we can't do because of bracketed expressions
like ... [A1].Value is perfectly valid VBA (albeit clearly using an Excel host)
and completely replacing the VBE implies completely breaking any form of bracketed expression
I fear going OOP is just going to increase the communication overhead without providing enough benefits to be worth the effort
 
@Vogel612 But... the VBE must have solved for this. There isn't an Excel VBE, Access VBE, AutoCAD VBE...
 
11:04 PM
it will also complicate the setup significantly because we need to maintain a language server that behaves correctly
@mansellan yes and no... VBA SDK is the magic keyword here
 
@Vogel612 But VSCode proves that it's sufficiently efficient?
 
@mansellan VSCode doesn't deal with the VBE though...
 
56K sloc app.js file. That's way worse than any VBA module I've seen...
 
it's not "send this URL to the language server, that will parse an initial representation, then keep stuff synchronized by sending key events over"
again: we probably need the VBE as authoritative code source
which means: every parse must start from scratch (to some extent)
 
@Vogel612 mulls
 
11:07 PM
@Vogel612 You seem to be saying that even if we had a custom code pane where we work with the exported file directly, this still wouldn't fly?
I figured that with the custom code pane in control, we can just work with the exported file directly, cut out the code pane pass altogether, and simply import changes on-demand.
 
@this if we want to be able to correctly deal with bracketed expressions, bracketed identifiers and the general quirks of the VBE, I think it's impractical
not impossible, just waaaaayy too much effort
 
@Vogel612 Sorry if I'm being thick (not unusual...) The VBE is not a unicorn, therefore its special sauce must be replicable. Is the problem that too much of its operation is undocumented?
 
"undocumented" is putting it mildly ...
 
I'm not sure I follow why bracketed expression is a problem.
 
@Vogel612 well yes, but....
 
11:08 PM
@this pretty-printing around them is ... weird
 
Ah, you want the pretty-printed version
which we can't have w/ a attribute file.
 
of course. That's the canonical one
 
IIUC (unlikely), pretty-printing is a side-effect of the operation of the VBE. Hit enter, code gets compiled, which then gets round-tripped to the IDE.
 
that's my understanding as well, yes
 
So, we "just" need a p-code parser...
ANTLR... (joking!)
 
11:11 PM
if you give me a proper grammar for p-code that's host-agnostic ... sure. Why not?
though p-code is a binary format, IIRC
 
p-code has been REd, so...
(can find links if need be)
 
does ANTLR work with binary?
 
@this how would it?
 
if it follows a defined structure (e.g. uses 0x0 for end of section, whatever?
 
you don't want to parse pointered structures with a contextfree parser
@mansellan REd?
Reverseengineered T.T
 
11:13 PM
I assume that if it's serialized, it can't have pointered stuff.
 
depends.
 
Oh?
 
consider xml-references, consider file-relative pointers
 
Welp, shows how little I know about binary stuff.
Ok
 
Uhm, oblig #JustSaying - this is all much easier with VB6 :-)
because who cares about the p-code
 
11:19 PM
hmm. Does VB6 immediately emit its pretty-printing to the file?
 
@this Welp, assumed but not checked!
 
We'd have to check that. Because if we want to say that the pretty printed version is canonical, looking at the file might lead us astray
 
(and too late on a Bank Holiday to check now...)
 
bank holiday?
I thought bank runs were a thing of 18th/19th centrury....
 
Yep, Easter
uh, you don't have them?
 
11:21 PM
The joke is that if there's a "bank holiday", there has been a run on it.
 
woosh!
#IFeelDumb
 
IOW, it's not a planned holiday. They closed down to stop the crowd from driving them into ruin.
Maybe it's an Murican thing?
 
Perhaps. We had a run on Northern Rock here during the crash.
Uh, that was a UK bank. Sorta.
 
yeah I remember the news from some years ago
not sure about the usage of "bank holiday" - I've always heard of it in connection to a bank run.
 
Wow ok, that's a locale thing then. I guess the equivalent is 'public holiday'
 
11:34 PM
Yeah, #TIL - that's why my eyebrows shot up when you first mentioned bank holiday. :)
 
anyways, I'm off to bed...
 
or is that German code for running on a bank?
:D
toodles!
 
Bank holidays here happen 10 times a year. I hope runs don't!
@Vogel612 night!
 

« first day (1777 days earlier)      last day (1403 days later) »