« first day (1476 days earlier)      last day (1704 days later) » 

12:01 AM
RELOAD!
 
Home time. Maybe another look at the permissive assert class will bring some insight.
 
[banane-io/PDB] 1 commit. 2251 additions. 3454 deletions.
[Cardshifter/Cardshifter] 10 commits. 832 additions. 258 deletions.
[rubberduck-vba/Rubberduck] 2 closed issues. 26 issue comments.
 
 
3 hours later…
3:15 AM
 
 
4 hours later…
7:12 AM
@awgaya also late to the show too. 42 not far behind @FreeMan with an accent. :)
 
 
4 hours later…
11:06 AM
Hi guys. Quick question - Can you go to the VBEditor and Check Tools>Options>Format? What is the font that you are using?
Is it Courier New Western? (After 5 minutes playing with fonts I cannot remember what was the standard one)
 
11:33 AM
@Vityata I'm not of much use here - I changed my VBE's font to Consolas as I quite like it for coding purposes. ;)
A quick look at a remote PC's VBE tells me that you are correct: Courier New (Western) seems to be standard.
 
@awgaya old enough that I have to work it out based on my birth year.... 45
@Inarion I used to like Consolas, but have since moved to Source Code Pro (it's on Google fonts too)
 
@Vityata yup. reminds me of 1998 =)
Tried Comic Sans once. #NeverAgain
 
11:49 AM
@MathieuGuindon Try Impact, and all of your code becomes a meme
Impact:
17 hours ago, by Tweeting Duck
"So uh, what do we do tonight, brain?"
 
@ThunderFrame That one looks nice as well (as far as I can tell from a cursory look). :)
 
@Inarion it's optimized for code, not just for monospaced. They take care with 1, i and l, and also with 0 and O, among other things
 
@ThunderFrame LOL!
 
@MathieuGuindon @Inarion - thanks guys, I guess it is indeed "Courier New Western" :)
 
On Consolas, I don't have problems telling 0 from O, but the sequence iIl1 looks somewhat ambiguous.
Hm, I'd like to give it a try, but I guess I'd need to go through our IT with that... (Privileges and such)
 
12:06 PM
@Inarion yep, fonts are programs, so virus threats. it would be nice to bundle some open source fonts with RD, so users get a great IDE and some fonts to make it look even better, without any admin rights required.
 
Also, wow. I didn't know about Google Fonts. That site is awesome!
Can a software bring its own fonts without requiring admin rights?
And I guess that will happen (at the earliest) when RD gets its own Code pane?
 
@Inarion you can embed them in your webpages. try it out here typecast.com
@Inarion yes, i think so. the program can use them, even if they're not installed
@Inarion I guess we could use custom fonts in the ToolWindows, but for code, yes, we need the AvalonEdit codepane
 
@ThunderFrame I guess it's similar to embedding them in .pdf files? These files can then be properly printed even from machines that don't have that specific font installed.
@ThunderFrame And the code is where the font will matter the most (as far as I'm concerned)
 
@Inarion IIRC Bloomberg doesn't install any fonts, but instead uses font resources. Printing is just sending the postscript to the printer, so yes, you can print the fonts from that program... you just can't use those fonts in other programs, like you can with an installed font
@Inarion that, and emojis in inspection texts
 
So, I'll be recording a podcast interview (in French) about Rubberduck and the VBE with Montreal MVPs Mario Cardinal and Guy Barrette, on the evening of July 2nd.
 
12:22 PM
@ThunderFrame Emojis? The Warning and Info symbols?
 
@Inarion grumpy-face
 
😎
 
@MathieuGuindon webcam cost-per-interview is dropping fast!
 
@ThunderFrame Not sure, if you're kidding. Is that a thing? I've not used inspections very extensively, but I certainly don't know of any grumpy-face that is triggered by my bad code.
 
@Inarion I'm kidding, but emojis might be a way of being more honest about an inspection: Variable a is a 💩 name.
 
12:29 PM
lol
 
@ThunderFrame Haha, I agree! :D
Although I dread to think of how much time it would @MathieuGuindon cost to write a variable name suitability evaluation engine (VaNSEE?)...
 
@Inarion it's already in RD!
 
That ^
 
Btw. that almost sounds like Wanze in German.
 
Mat and Comintern and a few others provided specs, and I wrote it.
We had some additional features in mind (including allowing the user to specify how to match against the provided pattern), but we never did that.
 
12:36 PM
@ThunderFrame "That's a poop name" seems to me like it requires at least a bit of human subjectivity to get right, doesn't it? ;)
 
For example, we were considering allowing regex, startswith, endswith, case-sensitive, and case-insensitive matching.
@Inarion IIRC, it's short names and vowel-less names that trigger it.
 
@Inarion single-letter variable names are definitely poop
@Hosch250 also number suffixed IIRC
 
Yep.
 
@ThunderFrame Except for loop counters I guess. But I agree. Not very readable, if you've been away from that piece of code for more than an hour.
 
@Inarion We allow exceptions.
I decided on my next series of blog posts, if I ever get around to writing them.
SOLID anti-patterns.
Like one-class = one-method, and stuff.
One of the archs at work thinks that. It's going to be fun to challenge him.
 
12:43 PM
On that topic: Is the usage of bang(!)-notation generally discouraged? Or even outright banned? (Not serious on the latter)
 
> We received a feature-request via mail:

> Hi. I really like the Indenting function, but there's a feature I'd like.
>
> I'd like to set my own text I want indented. For instance, I often indent the code within the "On Error" block like this:
>
> On Error Resume Next
> ActiveSheet.ShowAllData
> On Error GoTo 0
>
>
> In Rubberduck I'd like to go to a field called "Indent Lines Beginning With:" and add "On Error Resume Next", then go to a field called "Outden
 
@Inarion generally discouraged, because it has no proper compile-time checking. It also uses default members
 
we prefer to make stuff explicit, that includes use of default members
 
@Vogel612 Thanks. I wasn't heavily using it but the Duck just dug up a couple of instances in some rather old code of mine.
I also seem to remember that @MathieuGuindon wrote about it in a blog post.
 
12:48 PM
> I think @retailcoder has been itching to treat OERN as an indented block. It seems this is the only "block" that needs to be added. It would certainly be easier to just add this case, rather than having user-specified indentation syntax rules.
 
One additional downside to bang notation: You can't store the field names in variables. Or rather: You can't use bang notation when you want to store field names in variables. (That is, unless I'm missing something.)
 
sounds about right
 
1:38 PM
Hey pond, the Ducky is misbehaving.
The autofix for "Move declaration to smaller scope" breaks in certain scenarios.
It doesn't seem to like one-line if statements. If the first occurence of a too broadly scoped variable is as such If ImGoingToBreak = vbNullString Then ImGoingToBreak = "Don't autofix me, please!" then the autofix will move the declaration like this:
 
put up a MCVE in a bug report. That way, they can create regression tests for it.
 
If ImGoingToBreak = vbNullString Then Dim ImGoingToBreak As String
    ImGoingToBreak = "Don't autofix me, please!"
 
hmm ... seems like the first usage isn't correctly recognized there
 
The open issues don't seem to reflect this specific case. So I guess I should open a new one?
 
@Inarion does that compile? I've always been under the impression that despite Dim statements not being executable, the compiler still requires declarations to precede first use
 
1:48 PM
> With AutoComplete having a setting (enabled by default) to treat OERN...OEG0 as a block (and thus applying default indent accordingly), the AC's indenting would be undone by Smart Indenter - we do need an indenter setting for that, and AC needs to use indenter settings to determine whether or not to indent OERN...OEG0 "block" bodies.

While they would definitely be flexible, I don't think allowing user-defined blocks in indenter settings would be useful though. I'd prefer adjusting the inden
 
@MathieuGuindon probably not, no. even if it does: that's not really relevant. it's breaking code either way
 
Just thinking - for the initial VB6 release, would it be worth popping up a messagebox on launch if VB6 host detected, saying "warning - experimental feature. Please ensure that any critical code is backed up before proceeding"? (or similar)
 
oh, I misread the MCVE
 
@mansellan yea, that seems like a smart move
 
ok coolio, will raise
 
1:50 PM
@Inarion yeah definitely put that in an issue :) thanks!
 
@MathieuGuindon Nope, the line is bright red. :) New issue coming up shortly.
 
> VB6 is milestoned for v2.3, however it will likely be a while before it's decently stable. In the interim we should pop a message box on launch when VB6 host is detected, warning that VB6 is experimental and to ensure that any critical code used with it is adequately backed up first (exact wording TBD)
> Consider (or try it yourself) the following MCVE:

```
Option Explicit

Private TooBigAScopeForMe As String
Private ImGoingToBreak As String
Private IllBeFine As String

Public Sub SmallerScope()

TooBigAScopeForMe = "Give my declaration back!"
Debug.Print TooBigAScopeForMe

End Sub

Public Sub AnotherSmallScopeRightHere()

If ImGoingToBreak = vbNullString Then ImGoingToBreak = "Don't autofix me, please!"
Debug.Print ImGoingToBreak

End Sub
 
There it is.
Funny thing is, when I inserted the code markdown, the form broke. My cursor disappeared and continued to be invisible. (I was still able to enter text, I just had to guess the cursor position.) :D
 
TBH, for me personally, I'd love that the Move Closer to Usage factored in the blocks, not just the one-line If statement.
'Meh
Do Until .EOF
  Dim Result As Boolean
  If Result = .Fields("Something").Value Then
    Exit Do
  End If
  .MoveNext
Loop

'Better
Dim Result As Boolean
Do Until .EOF
  If Result = .Fields("Something").Value Then
    Exit Do
  End If
  .MoveNext
Loop
 
2:01 PM
It really doesn't make a difference but it looks better in the 2nd form, at least to my eyes.
 
not impossible, but definitely harder
 
> If I used RD in VB6 I'd want to be able to dismiss that warning once and for all after seeing it once... a `MessageBox` can't do that.

Can we make an `IMessageBox` implementation that brings up our own custom WinForms dialog? We could amend the returned enum value with a flag that contains the "don't show this message again" state... and then we'd need to figure out a way to make the interface expose a method for that, which the standard/current implementation could just ignore, forwarding
 
@Duga I can see the "import legacy Smart Indenter settings" prompt use that implementation too
 
@MathieuGuindon does it have to be a winform?
 
2:08 PM
> From [Nikita B's Code Review](https://codereview.stackexchange.com/a/196810/23788):

> I double-checked that on my current R# version (which is a bit out of date), and R# **removes both braces if you hit backspace when cursor is in the middle. But it only removes last brace, if you hit delete.** Which is probably what I do nowadays, when I want a single opening brace. I type subconsciously, so its hard to tell for sure. :)

So given `"|"` and <kbd>DEL</kbd>, we want to end up with `"|`. An
 
if you just used a WPF, then it can be made totally generic. Similar to what we'll do in refactoring dialog refactor.
 
@this the dialog itself, yes. the actual UI could very well be a WPF UserControl
 
> Good point, my only concern would be that if we implement "do not show again" in the general case, there should really be a way of resetting any flags set in the past (probably sits in settings somewhere).

Maybe not essential for this, just thinking it forward.
 
I think that'll be for the best. The winform implementation detail should be all abstracted out
That way you can do something like Prompt<T>
 
2:09 PM
I agree. everything is WPF anyway
 
and specify the WPF you want with the T
 
we could have one with a collapsible "more info" section at the bottom, too
 
Exactly. In the refactoring dialog refactor, the winform dialog can be resized accordingly
 
I did try to automate it but I found that WPF PreferredSize property doesn't really work (nor did its other Size stuff)
so for now it's manually specified in the derived implementation.
 
2:12 PM
that's because we're embedding our WPF in WinForms
(I think)
 
hm, let me check -
hmm, maybe I need to assign the WPF after I obtain the size. I may try that.
but i'm apparently reading from the elementhost, not from the WPF (the usercontrol).
ah yes I remember now - WPF and WinForms uses completely different units of measurement for their sizing, so I can't just read WPF's size and apply to Winform's stuff.
so I have to first assign the WPF to the elementhost, then try to infer the preferred size. But I've found that to be.... wonky.
 
I'd have the WinForms dialog size determined by hard-coded values in the WPF UserControl
 
hm but what about the units?
 
what about the units?
 
I'd have to convert it. And surprisingly, this is apparently hard to get a straight answer.
 
2:21 PM
you don't derive the size from the WPF control size
you have the WPF control say OnResizeParent(new Size(320,200));
the WPF element host is docked in the WF dialog, so would automatically scale to fit
 
Hmm.
but which Size is that?
0
Q: How to correctly convert System.Drawing.Point to System.Windows.Point?

user1943928First, I didn't find any answer so far. The article here on this site does not answer my question: Converter of System.Drawing.Point' to 'System.Windows.Point In the above article, one suggests to convert like this: //convert System.Drawing.Point dp = …; return new System.Windows....

^ this illustrates the problem w/ converting between the sizes in two worlds.
 
the WinForms size
Point is irrelevant
conversion is irrelevant
 
yes it is - I was looking for the Size originally but that came in my search
 
if this was all WinForms, you'd say "okay form, we're expanding. resize to new Size(320,480)"
or "okay form, we're collapsing. resize to new Size(320,200)"
 
the problem is that WPF Size(320,200) might be nothing like WinForms Size(320,200) and thus is too small/big, whatever.
 
2:26 PM
...
 
I want to abstract that out, so that if I have WPF Size(320, 200) and it looks just right in the WPF designer, the WF dialog will be just that big.
 
the WF designer does a good job at previewing and trial-and-error tweaking... I don't see what the problem is
 
Ideally, we shouldn't have to specify the WF size at all.
no, not WF designer. It's busted
WPF
 
I see where you're coming from, but at the end of the day WPF in the VBE is smoke & mirrors. We're doing WinForms.
the hWnd is a WinForms dialog, not a WPF window
 
For now, the PR has the derived classes specify the min width/height of the WinForm dialog
OBTW, all are resizable, so you can expand as you like.
 
2:30 PM
hmm
 
what I'd like is to abstract that min width/height from the ideal size that we specify in the WPF XAML code. IOW, we should be able to work exclusively in the WPF designer and never ever need to look at a WF designer.
 
IIRC the controlboxes are/were hiding the "maximize" button. needs to be reinstated then.
 
(not that we have a choice. It'll be broken if you try to preview for any derived dialogs. Only the base will work)
does that make sense, though? It's a dialog.
 
if it can be resized, it should be maximizeable.
that's why dialogs weren't resizeable
 
I suppose so. I can add that when I work on that PR.
for majority of the case, nobody'll need to resize dialogs but for 2 refactoring (and soon to be 3 {EM} ), resizing would help
 
2:34 PM
IMO dialogs shouldn't be resizeable though. they should be sized to look right with how they're designed. although... with "preview" boxes I can see resizing being useful.
 
In the EncapsulateField refactoring it came out wrong for some code
 
TBH refactorings need a "common dialog" featuring a preview pane and a content container, with the individual refactoring UIs being UserControls injected there
and poof, unified UI
 
Those are WPF's concerns, not WF's concerns.
 
indeed
just thinking out loud here while silently typing
 
LOL
with WF, all we care about is providing a container, sizing & positioning it well and keeping it open until we're done with what we need to do.
 
2:38 PM
yup
 
i got the containing and positioning the way I want it. I only want to get sizing completely automated - that would eliminate the need to provide a implementation for some refactorings that don't need it and allow them to use the DialogBase directly.
well there's also the caption but that can be solved, I think.
 
[rubberduck-vba/Rubberduck] Vogel612 pushed commit c45bba82 to next: Update IMessageBox Api for Confirmation, see #4042
[rubberduck-vba/Rubberduck] Vogel612 pushed commit 02a58606 to next: Drop ConfirmYesNo without optional argument
[rubberduck-vba/Rubberduck] Vogel612 pushed commit 114589e2 to next: Drop Once-Used NotifyError
Merge pull request #4044 from Vogel612/windows-forms-purge

Follow Up to 4006
[rubberduck-vba/Rubberduck] IvenBach pushed commit 2dc3a81c to next: Closes #4106
 
@MathieuGuindon how's the status on your internet at home?
 
[rubberduck-vba/Rubberduck] IvenBach pushed commit 093cdc98 to next: Correct typo
[rubberduck-vba/Rubberduck] IvenBach pushed commit d5ddd9ef to next: Restore original wording sans typo
 
2:46 PM
I kinda want to get #4082 merged
 
[rubberduck-vba/Rubberduck] IvenBach pushed commit a9710e75 to next: Incorporate feedback clarification
Merge pull request #4114 from IvenBach/Issue4106_Spelling

Clarify fix all occurrences
 
That's the "About version unification"
 
@Vogel612 temp-fixed, I meant to push commits to that PR yesterday and got hijacked by RL
 
cool :)
 
2:51 PM
Exemplary repro right there
 
> Consider
```
Option Explicit

Public Enum LogLevel
TraceLevel = 0
DebugLevel
InfoLevel
WarnLevel
ErrorLevel
FatalLevel
End Enum

Public Function LogLevelToString(ByVal level As LogLevel) As String

Select Case level

Case LogLevel.DebugLevel
' Reachable (as per inspection results)
LogLevelToString = "DEBUG"

Case LogLevel.ErrorLevel
' Unreachable (as per inspection results)
LogLev
 
What happened to @Duga? Has she left us?
 
@Inarion she's a little busy right now, it seems :)
 
2:56 PM
@Inarion rolling rate-limit for chat-messages means she needs to back off longer after a burst of messages
 
[rubberduck-vba/Rubberduck] mansellan pushed commit 1addfaee to next: Closes #4097
[rubberduck-vba/Rubberduck] mansellan pushed commit 91364e28 to next: Refactored IModuleExporter to a higher level ISourceCodeHandler abstraction, with concrete implementations for VBA and VB6
[rubberduck-vba/Rubberduck] mansellan pushed commit 9570fa90 to next: Removed file deletion
[rubberduck-vba/Rubberduck] mansellan pushed commit 4428f607 to next: Moved ApplicationConstants from Rubberduck.Core to Rubberduck.Resources
[rubberduck-vba/Rubberduck] mansellan pushed commit b4fee199 to next: Added using block
[rubberduck-vba/Rubberduck] mansellan pushed commit a6cdf6b2 to next: Added extra xml docs to enum VBEKind
[rubberduck-vba/Rubberduck] mansellan pushed commit 49b04cfa to next: Merge branch 'next' of github.com/rubberduck-vba/Rubberduck into 4097
Merge pull request #4098 from mansellan/4097

VB6 - Do not delete source files during attributes parse
 
@MathieuGuindon I see. Hope she does not overwork herself. :)
@Vogel612 Is Duga actually posting more frequently than users in here? Or is she active in more than one room and the post counts get added together?
 
Duga is active in at least four rooms
here, the 2nd monitor, her playground an in the coding projects room
 
IIRC Duga is the most active chat user, no?
 
2:59 PM
[rubberduck-vba/Rubberduck] build for commit bcd87f23 on next: AppVeyor build succeeded
 
@MathieuGuindon nope.
 
[rubberduck-vba/Rubberduck] build for commit bcd87f23 on next: 52.64% (target 0%)
 
only on fourth place, actually
 
"only" ...network-wide?
 
Personally, I'm more impressed that she managed to get some reputations.
 
23
Q: Simon, Mat's Mug, what's the (rating) difference?

DugaThis is a part of the code for the almighty bot @Duga (That's me!). Every evening, 15 minutes before "RELOAD" (00:00 UTC), I post the reputation differences for some Code Review users. Example output is: Mat's Mug vs. Simon Forsberg: 2728 diff. Year: +3618. Quarter: +885. Month: +648. Week:...

 
1. Smoke Detector
2. Cerberus
3. Journeyman Geek
and the top three humans probably not bots are all mods.
 
> Good catch, @Vogel612 ; it does not persist with explicit values given:
```
Public Enum LogLevel
TraceLevel = 0
DebugLevel = 1
InfoLevel = 2
WarnLevel = 3
ErrorLevel = 4
FatalLevel = 5
End Enum
```
This does not trigger the inspection. I guess that narrows down the list of possible culprits?
 
She'll pass Journeyman Geek soon enough, I bet.
 
3:03 PM
And Cerberus. Smokey might be a bit harder.
 
JMG has 40k messages ahead as of now
and Cerberus has a whopping 150k ahead
 
pretty sure he has long ago passed the journeyman.
 
@Vogel612 Yeah, but both of those have probably posted longer than her.
 
probably, yea
interestingly the Mug is on page 1 of active chat users, Hosch, you are on page 2 and I am on page 5.
 
Used to talk a blue streak. Got that curbed after I got in trouble for airing family skeletons.
Now I just chat a blue streak.
Now, if I was a mod, that would be a great pun ;)
Have to go for a bit. TTYL.
 
3:07 PM
@Duga @Inarion yea that helps narrow it down. also it's a workaround, so that reduces the priority a bit :)
ahhh. that's what I'm doing when I see egregiously bad code.
muttering a blue streak
 
> The problem here is that a sameLineStatement currently is a blockStmt but should be a mainBlockStmt. (Statement labels can only appear at the start of a line.)
[rubberduck-vba/Rubberduck] build for commit 6bd90889 on next: AppVeyor build succeeded
[rubberduck-vba/Rubberduck] build for commit 6bd90889 on next: 52.65% (target 0%)
 
3:32 PM
hmm. I know this was already reported but the issue w/ AC auto-completing when there's something that ends in Type or Property is really annoying me.
 
well not just that. I can't use the inellisense - AC hijacks the completion and leaves me with a broken unfinished code
 
[rubberduck-vba/Rubberduck] build for commit 3489486a on next: AppVeyor build succeeded
[rubberduck-vba/Rubberduck] build for commit 3489486a on next: 52.63% (target 0%)
 
e.g. With foo.GetSo with intellisense showing GetSomething, either tab/enter, and I end up with just With foo.GetSo ... End With, not With foo.GetSomething....End With
 
3:40 PM
@this So, in some scopes we can't eat the keypress.
The solution is to set up proper error handling for the parser and parse on keypress.
Then only resolve when we need to (maybe rate-limit the inspection refresh based on time since keypress, or something?)
 
the solution is to somehow detect that intellisense is shown, and let the TAB keypress through if that's the case
or double it up nah
 
Or replace intellisense.
 
3:55 PM
intellisense works w/ both tab/enter
 
so we would need to let both keys through or something like that.
 
@MathieuGuindon <homer_into_hedge.gif> — stevvve ♦ 27 secs ago
yeah
the question is, to we get a WM message in the codepane hook when intellisense shows up?
 
@MathieuGuindon Have a badge.
 
oh nice! thanks!
 
3:59 PM
i don't think you need that
I think doubling up works
 
no, it doesn't
 

« first day (1476 days earlier)      last day (1704 days later) »