« first day (2085 days earlier)      last day (1095 days later) » 
00:00 - 20:0020:00 - 00:00

8:01 PM
HALP!!!11one1! FML how do you make the text in an answer box for CR to be left aligned? I accidentaly hotkeyed and can't get it to revert back.
 
@Cyril I dont' think it'll have a bas extension
 
@this and Mat... Good subject and body...
 
I think it get a random file name with maybe .tmp
 
ahh, was thinking it did a literal Export of the module, which would be a .bas
had nothing in the past 10 mintues in that folder, so nothing appears to be related to that (the %temp% folder; saw nothing at all in the RD folder within)
 
@IvenBach try turning it off then on? (honestly have no idea you could align text in SE...)
just to be sure - did the %temp% have any randomly named folder?
it might be within that folder [citation needed].
 
8:03 PM
@IvenBach Keep calm and refresh fixes it. Still don't know what hotkey caused it though...
 
@IvenBach hm? didn't know you could make it anything other than left aligned?
@Duga 9!
 
@Cyril yes, we clean up our temp files
 
Ducky: Pooper scooper included
 
@this in digging through the available subfolders, i have a few that look like registry-Key names, where they contian .dll and .dll.mui files ; i think mat just resolved that question, so that's something
 
8:10 PM
That's why I said [citation needed] - I didn't remember off the cuff how we were handling the temp files. I have another process in my project (not RD) where I do use a temporary folder so that when I'm done, I just sink that folder, done.
 
        /// <summary>
        /// Exports the component to the folder. The file name matches the component name and file extension is based on the component's type.
        /// </summary>
        /// <param name="folder">Destination folder for the resulting source file.</param>
        /// <param name="tempFile">True if a unique temp file name should be generated. WARNING: filenames generated with this flag are not persisted.</param>
        /// <param name="specialCaseDocumentModules">If reimport of a document file is required later, it has to receive special treatment.</param>
 
yeah, still need a IO layer.
 
> //TODO: this entire thign
 
^
 
"//TODO: this entire thign needs to be reworked. IO is not the class' concern."
 
8:11 PM
lol
 
LOL that's funny; everyone's saying to redo it at once.
 
and all I meant to point out was Path.Combine(folder, Path.GetRandomFileName()) :)
 
FGITW, CR style.
@MathieuGuindon We haven't reached that part yet.
 
8:13 PM
You know, we welcome PRs. hint, hints
 
But taking a look at that function, why would you possibly want to do that?
 
Mainly because VBIDE
 
VBIDE thrives on random file names?
 
LOL, no. More like it thrives on hiding crucial attributes from the source code, making rewriting a painful endeavor. The only way to get the source code with attributes is to export it then import it.
 
It definitely seems to thrive on obfuscation.
 
8:14 PM
We need the attributes in order to safely re-write the code without losing it.
 
At least, that's what I think when dealing with VBA half the time.
 
Yeah, We really need a custom pane so that we can deal with files directly and none of that blob-in-a-magic-container
 
This feels like using a file as a mutex flag, fixing the wrong problem but you do it because that's how it works.
 
It's also because of that, the git integration is much more complicated than it should be.
Huh? I don't follow. Mutex what?
 
Oh, nvm, a question we had on CR recently.
 
8:17 PM
Oh okay.
 
@Mat If you think this Q is fixed (it looks fixed, kind-of), feel free to hammer it open.
 
@this that's AvalonMentions++;
@Mast thanks :)
(done)
 
@this where does the purchase request go?
or public relation... whatever is chosen as the initialism
as in, where to input*
 
on JitHub
 
Please send me your purchase request and I'll process it for you.
 
8:23 PM
@MathieuGuindon ...this MFer...
 
@this oh, I have a list, hold on...
 
i'll gust jo right to it
 
8:34 PM
tryinj to put in the issue report for that and i have no idea what my jithub info is... will have to try it at home
 
@Mast basically we ExportAsSourceFile for two reasons: first is if the user asked for it, second is if the parsing engine asked for it. If it's the parser exporting code files, we don't care about the filename, and we only need the file so we can parse the attributes in it and then delete it (it's not getting imported back)... so Path.GetRandomFileName is perfect here.
 
Can I copy my config file from one computer to another?
 
THx
 
you can even import parts of it
 
8:38 PM
wha?....
 
(there's an import/export button on each page of the settings dialog)
 
it's jsut a XML file....
 
cool!
Seems like that would be a way to make sure both computers are set up the same
 
indeed
 
Pretty nice feeling to see previously Red tests go green then all that's left are the ones I've marked "Not Implemented" (Assert.Inconclusive)... and there's only three... LOL
 
8:54 PM
just finished fixing that module that was giving me crap... compiled and had a bug in one of the modules... apparently the one that was "removed" earlier was still there and renamed to the name of the refactored term and wasn't visible until I compiled? not sure what in the world happened there
 
@MathieuGuindon @Duga Can you add the log file for the failure?
 
and yes, i have closed the isntance of excel in the interim from havig that problem
 
@M.Doerner the whole thing or just the stack trace?
 
i think i just need a break from re-writing code
 
> Adding the logged stack trace from my repro:

```
2020-02-20 10:59:28.1631;TRACE-2.5.0.5338;Rubberduck.Common.LogLevelHelper;
Rubberduck version 2.5.0.5338 loading:
Operating System: Microsoft Windows NT 6.1.7601 Service Pack 1 x64
Host Product: Microsoft Office x64
Host Version: 16.0.12430.20264
Host Executable: EXCEL.EXE;
2020-02-20 11:00:11.0691;WARN-2.5.0.5338;Rubberduck.Parsing.VBA.ReferenceManagement.CompilationPasses.TypeAnnotationPass;Failed to resolve type VBE;
2020-02-
 
8:59 PM
@Duga @M.Doerner added the RD log .txt file from the .zip as well
 
@MathieuGuindon Why not always use the same hardcoded filename?
I mean, I get why you're exporting the file. It's a workaround. But why the random file name?
You can ignore the file name and still have it always the same.
Would make debugging easier as well I'd imagine...
 
0
Q: Data entry of Information

Zack E Couple of items to make note of first: I inherited this code I am still working through naming cells that I feel need to be named. This code below was re-factored once with help from @TinMan on This Post All of the code below works and I dont have any real performance issues w...

 
9:15 PM
@Mast it wouldn't necessarily be just one file. It could be several files, and there could be multiple projects with same module names, etc. etc.
If one wanted to avoid the random name, I think one would need to create a folder, %temp\{$ProjectId} then stuff the files using module names in that folder.
But then that introduces new problems
 
What's wrong with that?
 
IDK, it's a temp file, and we don't need to care about the file name... not seeing what's wrong with using the framework to generate a filename for us when we don't care what the file name is going to be
 
the ProjectId isn't guaranteed to be stable all the time. It could change
 
@this and nothing says it's a legal folder name either
 
good point. Module name could be an illegal filename, too
which mean we'd need to come up with a scheme to convert names.... ugh.
 
9:18 PM
Right.
So it's basically the lesser evil.
 
To address the specific point about logging - it shouldn't be hard to log that a random file name was created for {ProjectId}:{ProjectName}.{ModuleName}
 
we should probably log temp file creation and deletion anyway
 
^
all more the reasons why we need to abstract all those silly IO out
 
FTR I blame VBComponents.Export
 
lol
 
9:20 PM
Coming to a rubberduck near you: A virtual filesystem to manage your components!
 
I mean, at that level we're just wrapping the VBIDE API
 
^
The only alternative is to hijack the storage streams.
 
laughs in C++
 
CansofWormsInABarrelOfMonkeys++;
@MathieuGuindon eew. I wonder if we can just do it in Rust instead.
 
sure, let's bring another tech to the RD stack!
 
9:22 PM
#NoProblemo
RubberOctopus
 
...that said Rust might actually bring back RubberDuck (Chris) home
 
Yeah, I see he is getting into it lately.
and I know for a fact Rust has COM crates
(I've been looking at it myself for building a very small .exe)
 
In Public Sub Foo(Optional ByVal Bar as Variant) the word Optional isn't a keyword. What do I call it?
 
@MathieuGuindon That's equivalent to shooting yourself in the foot, tomorrow.
 
I can't find it in the documentation.
 
9:32 PM
@IvenBach Why is it not a keyword?
> You can specify that a procedure parameter is optional and no argument has to be supplied for it when the procedure is called. Optional parameters are indicated by the Optional keyword in the procedure definition.
 
That's a .NET/VB page. Do they have one for VBA?
 
@IvenBach of course it's a keyword. ...call it a token if you like, it's still a keyword :)
@Mast that's assuming I can still find foot.h tomorrow!
 
#Words I meant to use 'Statement'.
 
@IvenBach the statement here is Sub
although, "statement" is a bit vague and under-defined IMO
"if statement", "sub statement"
 
@IvenBach Sure.
 
9:35 PM
:derp: docs.microsoft.com/en-us/office/vba/language/reference/… has it. Why didn't I think of that right away?
 
> Optional arguments are preceded by the Optional keyword in the procedure definition. You can also specify a default value for the optional argument in the procedure definition. For example:
Still a keyword.
@MathieuGuindon Oh, something will probably break between now and then.
 
Yep. I'll forever struggle with my pedantry over this stuff. TYVM.
 
laughs in C ...damn, you're right.
reboots, laughs in C# ok fixed
 
@MathieuGuindon You really had to, didn't you? Now half the universe is undefined.
Including half your foot, half your gun and half the bullet.
 
ha! I just pulled a what's-his-name-purple-face-guy-in-avengers
 
9:38 PM
Thanos?
 
ah, yes
 
@Duga I think I might have a look tomorrow. However, today I am completely drunk due to Karneval in Cologne.
 
@M.Doerner cheers!
 
@MathieuGuindon AKA Purple Shrek
 
in a Power Ranger blue-face-badguy suit
 
9:47 PM
Purple Bruce Willis with wrinkles.
 
omg can't unsee it now lol
 
@MathieuGuindon Have fun during your next marathon :-)
 
10:07 PM
where can I learn about using FakesProvider?
nevermind. Looked at the items... pretty self explanatory.
 
'@TestMethod
Public Sub TestMethod1()
    On Error GoTo TestFail

    Fakes.MsgBox.Returns 42
    Debug.Print MsgBox("Flabbergasted yet?", vbYesNo, "Rubberduck") 'prints 42

    With Fakes.MsgBox.Verify
        .Parameter "prompt", "Flabbergasted yet?"
        .Parameter "buttons", vbYesNo
        .Parameter "title", "Rubberduck"
    End With
TestExit:
    Exit Sub
TestFail:
    Assert.Fail "Test raised an error: #" & Err.Number & " - " & Err.Description
End Sub
 
nice...
thanks Mat
 
using the Fakes API will setup hooks during test execution, hijacking internal VBA functions. You can specify per-invocation return values for functions, and then Verify whether each invocation was made with the specified parameter values
(above is just an example, you wouldn't normally invoke the faked method in the test itself)
note: a call to Verify is an assertion that can make the test fail
 
10:47 PM
why do so many people think it's totally cool to handroll their security system? </rant>
 
@this because they are squarely on idiot peak around security
 
I suppose but it's scary how many there are.
 
If I account for bias, I might be able to implement a given security scheme without terribly obvious flaws.
 
I'm sure I can. It's the unobvious flaws that worries me.
But 99% of time, it's breakable because it amounts to placing a huge, heavy duty steel padlock on a screen door.
 
Writing up good answers takes while. I now understand why Mug you only get an article or 2 out each month...
 
10:53 PM
The padlock ain't the problem. It's the screen door...
 
11:05 PM
dunno, honestly
if you have something that you write a custom security scheme for (or actually go and implement your own flavor of an existing one), then you probably have at least some kind of threat model
Heya @IvenBach did you see my pull request comments on your two oldest PRs?
just to make sure they're not getting lost :)
 
mumble mumble :downcast-eyes: think so mumble. Lemme check.
 
11:37 PM
@Vogel612 Rather than if (...) { ... } else { ... } simplify component.ExportAsSourceFile(path)?
 
yea, because that will invoke component.Export for the non-special modules
might need an additional isTempFile: false, but that should be pretty obvious, I think
 
Optional parameter defaults to false.
 
nice, I wasn't sure off the top of my head now.
 
I'm amazed at how all you big ducks remember this stuff...
 
I only knew because you actually edited the method in the same PR.
 
11:41 PM
Still have to read the documentation every time.
 
I was originally going to suggest rewriting Export such that it delegates to ExportAsSourceFile
but that makes no sense, because it's the other way round already
Honestly I'm not sold on the idea that VBComponent should expose Export at all ...
@IvenBach my memory is ... weird like that.
 
I'm starting to do that with VBA documentation. C# and RD I don't code in often enough.
 
2 mins ago, by Vogel612
I only knew because you actually edited the method in the same PR.
 
Don't show me the truth. Let me bask in your glow and be in awe of your apparent remarkable ability to remember every nuanced detail.
 
no
I don't want glorification ... It's a sucky position to be in
 
11:45 PM
Vogel.IsPineapple evaluates to False. Duly noted.
 
sigh. WPF is way too fickle.
 
00:00 - 20:0020:00 - 00:00

« first day (2085 days earlier)      last day (1095 days later) »