« first day (2504 days earlier)      last day (28 days later) » 

12:02 AM
[rubberduck-vba/Rubberduck] 1 issue comment.
[Minesweeper] Games Played: 119, Bombs Used: 77, Moves Performed: 15159, New Users: 16
Which project should be the startup project?
Previously I was able to F5 and VS would be attached to Excel in debug mode allowing me to step through.
At least I can manually attach still.
12:41 AM
@IvenBach Rubberduck.Deployment
12:59 AM
2 hours later…
2:44 AM
> Close #5395
Add additional filters. Cache filter index for reuse next time dialog is shown.
3:00 AM
[rubberduck-vba/Rubberduck] build for commit 285fd79b on unknown branch: AppVeyor build succeeded
2 hours later…
5:11 AM
@MathieuGuindon Wow.
I need to catch up to everyone else and play around with twinbasic.
Yup! And then you can claim yet another programming language under your belt!
I've been feeling left behind by not knowing enough to appreciate twin basic.
@Duga @this I'm not sure how to create the unit test.
it's basically (ha ha) VBA with goodies
i.e. what VBA8 could have been if COM hadn't been abandoned for .NET
I mean, parameterized constructors and method overloads!
^ That made me want to try it.
I need to play with the generics too
5:25 AM
@IvenBach I'll have a second try with a fresh mind tomorrow to figure out the test.
Wish there was a way I could learn all these concepts faster.
5:39 AM
@IvenBach generics?
Basically everything coding related.
I can kinda-sorta make edits and updates. But I need examples to lean on. Without scaffolding to see how something is done I don't know how to create it myself.
@Duga I can convert those members to local functions.
I'll sleep on it. Night.</iven>
[rubberduck-vba/Rubberduck] build for commit e7ab5a44 on unknown branch: AppVeyor build succeeded
4 hours later…
10:39 AM
@MathieuGuindon ThunderMug?
1 hour later…
11:53 AM
@FreeMan as this was me trying to chain a member call to a New object, ....I guess that's a yes lol
@MathieuGuindon The new version with the fix already dropped so... not anymore. ;-)
12:08 PM
It's good that someone is keeping the torch held high
12:29 PM
(New Thing(a, b)).DoStuff is legal code in tB
...and New Thing(a, b).DoStuff no longer crashes VSC!
nice! nicer!!
12:42 PM
How's the MVVM port coming along?
1:07 PM
Well now that VSC works again, I can resume =)
I got the base PropertyBinding class ported over (but none of the control-specific implementations yet) and the AppContext and CommandManager ...was working on the ValidationManager when I broke it
Starting to really really want a multiple-file tB project now, hoping tB ships that update with a "move to file" refactoring
Agreed with multiple file. It's nice it's possible to have multiple Module and Class defined but scrolling becomes tiring.
in my project, i have 750+ lines of Win32 Declares (actually DeclareWide but same thing).
In contrast, I only have ~250 lines of actual code.
1:27 PM
About 1.2K lines here, ...with the types/classes alphabetically sorted (I put the Module definitions at the top)
Implemented the Public Const as Public Property Get procs in a stdmodule
@MathieuGuindon Yeah agreed. The single-file thing is a stopgap I think. Personally I don't see any value in it long term
But multiple types per file is nice
I managed to crash the LSP and corrupt the project in the process. Commenting everything out doesn't bring it back.
the VBF crew seem to be liking it too
@mansellan I'm just curious - I understand there were few other BASIC alternatives.
e.g. PowerBASIC or RealBASIC (not to be confused with RadBasic)
how come they didn't become prominent?
Not sure. My guess would be that they just didn't have the market gravity that MS had. And probably weren't fully compat with VB6, so weren't natural successors. MS were busy trying to get everyone moved over to VB.Net.
1:42 PM
See, VB.NET basically failed because it wasn't capable of porting VB6
You gonna rewrite everything all over just doesn't sell
Looks like RealBasic is now Xojo, and...
> Xojo definitely feels familiar to VB developers, but there are differences as well. A big difference is that Xojo cannot create DLLs, ActiveX controls or any kind of shared libraries. Since these are all Windows-specific technologies, they are not useful for cross-platform apps.
I guess they were wise to rename the language after all.
"This isn't basic!"
Am I a deluded fool in thinking that if you evolve VBA sufficiently you'll end up with typescript. Would I being cruel to Wayne to suggest that a fantastic opportunity for twin basic is not so much twin basic but as a front end of a translator to typescript?
Transpiling is always possible.
The real problem is the jungle.
How will you port ActiveX stuff to web browser? (hint: you shouldn't)
I believe that's the one of reasons they are having hard time keeping the object model compatible between Excel's DLL and Excel's JS API
2:00 PM
@Freeflow VBA and Typescript are different beasts. Typescipt is a slightly-less-sucky Javascript...
If the VBA code was basically functional, then you should have no problem transpiling into TypeScript. But I suspect too large % of VBA code include use of the host application OM and that isn't available in TypeScript.
@this Yep. And most of the learning curve came from .Net. If you gonna learn that, may as well learn C# as well. That's exactly the path I took.
Yep. That was around the time I realized finally that it's not really the language that matters. It's the framework around it, or as I like to call it, the jungle.
No jungle = no banana.
2:19 PM
@this RD users and readers should start somewhat decoupling these by now though ;-)
Unrelated: who is responsible for managing the mouse's state? In both Excel and Access application, you can directly access the cursor and thus change it to a hourglass/blue circle but then that complicates the process when there's multiple components....
Needs to be centralized somewhere... some Ambient Context? =)
oh, i think someone wrote about that....
Found it, thanks for the reminder!
thinking about it some more, I wonder if I really want something like a queue... each component should do AppContext.ReportBusyState and when it's done, do AppContext.PostBusyStateCompleted.... When the queue is empty, show the default cursor.
2:46 PM
The problem, though is that if a component fails to report that it's done, the queue won't be empty and the wait cursor will stay spinning.
Have the queue time out and get cleared after n seconds?
@this That's never happened before...
Maybe but thinking about it, the cursor is just a different kind of "progress bar"
@FreeMan then I bow to your obviously coding superiority
@this edits to fix sarcasm font
looking through the reusable progress bar, it kind of presupposes only one client using it, though.
maybe I'm looking for an "ambient progress bar", lol
3:03 PM
Getting With Cursor.Wait...End With to work flawlessly would be nice
yes, that would make more sense
Basically intercept and block (or revert) all cursor changes as long as the instance lives
then there's no counting to do
sets wait cursor every 10 milliseconds to override any other code calling Application.Cursor
stops looking for perf bottlenecks
that require multi-threading, though (no, Application.OnTimer doesn't count)
3:09 PM
I suppose it's safe to assume no other code interferes with cursors, or code needing cursors would use the shiny cursor API
You need to block any nested instance though
Yes the problem being solved is that there's a workflow that may use X components but not all of those may be activated/used but it may add to the time in processing. The components within the workflow should not know how they got called and may be called in different orders but if they're running, it is assumed they may take a while to run
I don't think there's nesting but they definitely are being orchestrated.
3:23 PM
That's where I might cheat and store e.g. a Boolean flag on the default instance
so any component can do With Cursor.Wait...End With but it'll be no-op if there's already a Cursor.Wait instance that's alive
Actually no, setting the cursor isn't any components' responsibility - let the orchestrator do it
but there's not a single orchestrator - there may be different orchestrators.
I think I put it in components because the orhestrator has no idea how long it'll take and component knows.
But who orchestrates the orchestrators?
but maybe that's the problem. If all orchestrators just set the mouse cursor no matter how long it took for any components then problem solved.
@MathieuGuindon the meta-orchestrators?
3:28 PM
@this yup
Says "I'm busy", even if it's just a split-second
And users get used to the little "hey it did something" visual feedback
yeah, I need to double check why I thought it was necessary to do it in components but you're right. That's orchestrator's problem, not components'.
Otherwise, the tasks/components could take a parameter that points to the "progress indicator" (passed from orchestrator), and then that keeps the cursor management centralized while still allowing individual components to do what they want
A bit like how I'm passing a ProgressIndicator to the worker method in my "reusable progress indicator" article/example
ok i'm an idiot.
the problem is actually that a component may need user input and during that time, it needs to turn off the busy state while collecting the inputs from the user then resume after the collection.
the orchestrator doesn't know about that
Good point
Passing an interface so components can pause/restore wait cursor seems sensible
(while still leaving the "ok we're busy for a while" concern to the orchestrator)
(that way the cursor can go back to "busy" at the next step if a component forgets to restore it)
it would be Access-specific, but I could do something like .CollectInput(DialogName As String) => do DoCmd.HourGlass False: DoCmd.OpenForm DialogName, WindowMode:=acDialog: DoCmd.HourGlass True
3:40 PM
Yeah... but that wouldn't be testable ;-)
but that's an implementation of the interface
yesterday, by IvenBach

We're all idiots

Aug 22 '19 at 19:34, 15 minutes total – 24 messages, 6 users, 1 star

Bookmarked Aug 22 '19 at 19:52 by Mathieu Guindon

@FreeMan see, only idiots would say an idiotic thing like "I'm an idiot" even though it's already established. ;-)
That was always Klinger's problem - only sane people would pretend to be insane in order to get out of the Army.
IDK. Didn't strike me as trying hard enough.
3:45 PM
@FreeMan Hey! I'm not an idiot. I'm a buffoon.
enough buffoonery leads to idiocy, so you're well on your way.
Buffonery, Moronery, Baboonism, Imbecily, Stupidity, Foolishness, and few more are basically just a variant of Idiocy.
4:04 PM
Here, hold mah beer!
4:23 PM
I'm looking at CodeExplorer. Is private readonly IConfigurationService<GeneralSettings> _generalSettingsProvider following a provider pattern?
Currently looking for how to persist the filter index on the dialog so it can be loaded the next time a new RD instance starts.
@IvenBach but will this be project-specific?
I don't know.
I didn't think about that. Right now trying to accomplish persisting any data.
the thing is that if it's project-specific, none of those persistence providers are appropriate
We really need to get per-project config up & running somehow
you'd need a new persistence provider
4:31 PM
So be it =)
which opens up more questions....
do we make a xy.rubberduck to accompany the xyz.xlsm/`xyz.accdb/etc.
The new persistent provider would be along the lines of private readonly IConfigurationService<IOpenFileDialog> _openFileDialogProvider?
or do we make a projects.config in the %temp%/rubberduck
@this yep
No, I'd start with a new ProjectSettings, based on the GeneralSettings, then make a new implementation of IConfigurationService<ProjectSettings>
4:33 PM
@MathieuGuindon with that approach, the user need to remember to always copy the .rubberduck file if the source file gets moved/copied or the settings is gone.
would the user want it under source control?
good point. It probably should be.
wait, no.
I guess that's why VS has .suo files
thinking best to not have it in SCC. Treat it like .suo
4:35 PM
Makes sense
deal with other settings that must be shared / made part of SCC later.
Is it correct to think about any config setting as meta data for the project?
sorta.... this is more of a metadata that's useful to Rubberduck. The project could not care less.
3 hours later…
7:14 PM
^ Stood out to me for some reason as I'm following a spiderweb of edits trying to do as suggested and implement IConfigurationService<ProjectSettings> using GeneralSettings as a guide.
looks like it
but i find it weird that it's the only one that does that. other settings don't have that check, makes me wonder why
1 hour later…
8:32 PM
> Version
OS: Microsoft Windows NT 10.0.19042.0, x64
Host Product: Microsoft Office x64
Host Version: 16.0.13901.20336
Host Executable: EXCEL.EXE

`RemoveUnusedDeclarationQuickFix` results in uncompilable code for an inspection result that only has assignment references.

Starting with:

Option Explicit

Private notUsed As Long

Public Sub Test(ByVal arg As Long)
notUsed = arg
End Sub


`notUsed` is returned as a `VariableNotUsedInspe
After adding the new ProjectSettings type I'm getting an error when invoking the Read() member on ConfigurationLoader.
Specifically it's throwing the error when _projectSettingsProvider.Read() is invoked. Following the call stack down it can't read any default values.
Checking Defaults.Default its throwing an InvalidOperationException. Ok... That means I need to supply an IDefaultSettings<T> where T is of type ProjectSettings. Now to figure out where that is provided...
@IvenBach would hav eot come from settings.settings
8:48 PM
Takes me to github.com/rubberduck-vba/Rubberduck/blob/next/… with External Code below it on call stack followed by Startup().
I'm trying to rubberduck this out loud since I'm in a dead-end with my comprehension right now.
don't worry about call stack. Look at the Settings.Settings
think it's in resources project.
may be under properties
I wonder why it's in core, not resources...
I've opened it via properties but I have no clue what to update. manpage reading time.
but anyway that's the right file
you'd need ot add a new record, one for ProjectSettings and provide some sane defaults
the XML structure is basically the serialization of the corresponding setting class
8:56 PM
I don't even know if I'm doing this correctly.
public interface IProjectSettings
    string ProjectName { get; }
    IOpenFileDialog OpenFileDialog { get; }

[XmlType(AnonymousType = true)]
public class ProjectSettings : IProjectSettings, IEquatable<ProjectSettings>
    public string ProjectName { get; set; } = "VBAProject";

    public IOpenFileDialog OpenFileDialog { get; set; } = new OpenFileDialog();

    public bool Equals(ProjectSettings other)
        return ProjectName == other.ProjectName
@IvenBach try cat man That gets you the ThunderCats.
what's dialog doing on a settings?
feel weird to see a dialog on the settings. Dialog should read off the settings, not the other way around
so something like public int DefaultFilterIndex { get; set; }
That's my first stab at getting something/anything to work.
the key thing is that a setting class has to be a serializable entity.
Pop quiz: How do you serialize an interface?
I'm not sure. It is done with a serializer. By adding the SettingsSerializeAsAttribute to the class allows it to be serialized?
> It is also tempting to compile several different different languages into the same intermediate language and use a common back end for the different front ends, thereby obtaining several compilers for one machine. However, because of subtle differences in the viewpoints of different languages, there has been only limited success in this direction.
9:04 PM
I didn't understand well enough the serialization examples I went through several months back.
@this is that a trick question?
@MathieuGuindon Isn't that what .NET is\does?
@HackSlash it's exactly what .NET does, but this book predates .net by almost two decades =)
Ok 15 years give or take
@MathieuGuindon fwiw this is also what the JVM languages do...
@Vogel612 that's Java ...and Scala... and?
9:08 PM
kotlin and clojure and groovy and ...
fair enough =)
I wonder what "common back-end" existed back then
LLVM works on the same principle
@IvenBach You can't serialize an abstract object.
In order to deserialize something, you must be able to new it up
and then populate it with all the data
@this no such thing as an abstract object in the first place
ISomething is... what? Do I new it up with Something or ThatThing?
But the point I'm making is that a setting class, being serializable should only contain primitives
strings, numbers, nothing more fancy than that
(i suppose you can have other serializable classes referenced but that's going beyond the setting class' purpose)
9:17 PM
Otherwise if you have non-primitive types those as well need to be marked with a corresponding attribute.
yes but in this situation, we want our settings class dumb simple
Yes, understood.
it's basically only a container to be used by other objects, so that hte file dilaog can take data from it. The way you have it right now is backward.
Otherwise the entire object tree needs to be serialized out.
@MathieuGuindon HTML? :)
9:19 PM
Past-Iven blindly added settings before. Now I'm trying to understand how it actually works.
I appreciate your eternal patience and instruction to help me eventually learn this. Thank you.
hmm didn't realize I was something to be learnt.
Tempted to change my userprofile to "that" so I can ride the "this" joke bandwagon
@MathieuGuindon sounds like you might be interested in 2nd edition of that Dragon book!
Yeah... I'll still read 1st ed.
It's a lovely addition to my nerd library lol
1 hour later…
10:27 PM
can I commit a git repo to 2 different upstreams?
@this what do you think is stopping you?
My uncertainty was because it's different users (my work and github account)
umm ... yea that might be a bit more complicated
but if you have them on different hosts it should work
the push mechanism relies on the underlying connection you're using and (at least for ssh) that's smart enough to associate credentials between hosts correctly
in this case, they are different.
my work is visualstudio.com, github is github
so maybe that may be OK, but I have other problems -- git thinks there's no history, so I'll start again
I have to wonder why you're trying to commit the same repo to a work-associated remote and a public remote , though..
@this what are you doing???
10:39 PM
Ok this is for PayPal - I had to make some modifications to their SDK and I am trying to push a pull request as a proposal in case they accept it
and you want a fork for work in case they don't ...
their SDK is hosted on Github, though and I don't want to make a work github account so I'm using my personal github account to host the github fork, while hosting the modified version on our work repo.
since it's their code, there is nothing secret
okay, so you have the modifications in a local repo that is cloned with your github account from their repo?
then what you probably want to do is something like this:
yes to your question
git remote add work [work repo url]
git remote add fork [github fork url]
# assuming you're on the branch with your changes
git push work HEAD:main -u
git push fork HEAD:some-nice-branchname -u
not sure how you want your commit attributed, but you should check it's attributed to the identity you want before pushing
10:53 PM
Gotcha.. will give that a try.
11:14 PM
Ok, I suck at git -- this makes me a bit uneasy:
> `warning: LF will be replaced by CRLF in blah/blah/blah.cs.
The file will have its original line endings in your working directory`
you can totally ignore that :)
check git-config's manpage for core.autocrlf to get an explanation
it's causing my diff to look bigger
this SO thread is also suggesting setting it to false
11:39 PM
@this manning.com/books/learn-git-in-a-month-of-lunches helped fill the missing pieces I needed.
I now feel much more comfortable with Git. sensei Vogel is no longer peppered with my blind-pig questions either.
hmph, great, we don't use same tab/space conventions. le sigh
[rubberduck-vba/Rubberduck]: 1318 stars vs. [decalage2/oletools]: 1505 stars

« first day (2504 days earlier)      last day (28 days later) »