« first day (1501 days earlier)      last day (1679 days later) » 
00:00 - 14:0014:00 - 00:00

2:00 PM
@Hosch250 but the point is that in order for that to have been a problem, it had to allow arbitrary code execution from remote source in the first place. Why not simply disallow it OOB?
 
because help desks need VNC?
 
@Hosch250 In Linux, I get a prominent update notification that there is a critical security patch. I need to be able to install those updates. Nobody else. When an automatic Windows update breaks my system, that is no different than any other malware.
 
@MathieuGuindon then make user's consent mandatory.
 
@Comintern and the Linux user will install them.. Windows users, not so sure.
should be opt-in anyway
 
@MathieuGuindon Probably because they're conditioned that an update will break their software.
 
2:04 PM
> Allow Windows to hijack this machine and update whenever the F it likes and reboot when you're in the middle of something? Y/N
 
I want a single checkbox in the Windows installer that says "I am an IT professional and am capable of maintaining my system".
 
@MathieuGuindon N => Ha ha, we were only kidding. Of course we are going to do whatever. Rebooting now
 
> That's good feedback, thank you.
 
@this No, not "from remote source".
 
2:07 PM
@this most people will click yes until the problem they're trying to solve is fixed. Facebook exploited the consent mechanisms. Alerts and opt-outs are likely to be ignored by most users
 
@MathieuGuindon Windows users don't even know how to close Excel, much less Vim...
 
@Hosch250 then from where? It must have had some access somehow.
 
@this From the local machine.
Malware was a thing before the internet.
 
@Hosch250 again that implies I allowed it to be downloaded or placed it there.
 
@this No it doesn't.
 
2:08 PM
@Hosch250 You're eating your cake and having it.
 
It implied something else put it there--like your malicious coworker, or the network.
 
@Hosch250 because I granted them access.
Don't grant access, no go. Simple as that.
 
@this Actually no, because they sat in the cubicle next to you and you were in the rest room.
 
Then I get what I deserve. In some places like banks, the rule is that they must lock the workstation before leaving.
 
@Hosch250 or you plugged in a malicious USB cable. It wasn't a USB drive, you thought, so how can it hurt me, but there was a microchip embedded in the connector.
 
2:10 PM
if you want a safe computer, buy a brick
 
@MathieuGuindon If you want a brick, buy my daughter's Lenovo
 
worst piece of IT equipment I've ever experienced. And corporate types rave about them - I just don't get it. Even the Ctrl key isn't in the right place - that alone is enough to make me avoid them.
 
@ThunderFrame perhaps the "corporate types" are PHBs?
In which case, it's the best thing you can get them.
 
PHB? Philosopher?
 
2:14 PM
Pointy-haired boss
 
bwahaha
 
I always find it sobering when I witness the lack of IT understanding of the average office worker/graduate, let alone the average person.
 
@ThunderFrame and this is why Windows updates, and why we can't have nice things :)
 
@MathieuGuindon that
 
The auto industry mostly got it right. I have airbags, seat belts (opt-in BTW), and other safety features, but my car has yet to come to a screeching halt on its own because I didn't fill the windshield washer tank.
 
2:20 PM
careful what you wish for. soon it'll come to a screeching halt on its own because a frog is crossing the street
 
@Comintern that's yet to come
 
This is why I don't drive a Tesla. (that and the fact that I'd be bankrupt afterwards)
 
@MathieuGuindon ironically, better that everyone's in a driverless car than driving themselves. At least here, they are awful drivers.
yakking on cell, drinking starbuck, screaming at the kids behind, riding the shoulder, and cursing at the jerk who cut them off (and the jerk is doing exactly the same things)
Nope, not safe.
 
@Comintern they did throw in some airbags to save your life, but they also included some shrapnel and arranged for it to target you head, in the event of usage. You didn't ask for that feature, but sometimes the bonuses are a nice surprise
 
That reminds me - I need to check my recall status. LOL
 
2:24 PM
@this Yeah, until the car goes "Ooops, got an update" while driving on the freeway.
 
...and that reminds me that I need to get the transmission software updated.
 
@Hosch250 Ha! At least it's not same thing as a general purpose OS, so it will have much less issues and more incentives from outside to get it right, so they don't get blamed for having assembled 100,000 metal murderers.
 
@this LOL - I'll try to remember that when the Cyberdyne Motors dealership opens in my city.
 
@this "much less issues". You are setting records for the funniest thing I've heard all year.
General purpose OSes are as secure as you will get. Because billions of consumer dollars are at stake with general purpose attacks.
They've been under attack for decades.
 
@Comintern it's all right. They made a little boo-hoo the first time but came through with Arnie who indirectly saves the humanity, so it all evens out.
@Hosch250 I'm glad to hear that I'm funny. :)
@Hosch250 That's a non sequitur, though. The point still remains that it's vulnerable because it runs code from untrusted source. A device that runs without any internet connection or remote access is much more secure simply because there's no access.
 
2:37 PM
@this Are you F**** kidding me?
First of all, auto-driving cars DO have internet access.
 
@Hosch250 Big mistake.
 
Heck, most non-auto-driving cars have internet access now.
 
The point being, if you want to have a secured device, especially one that's going to be responsible for human lives, you better not connect it to internet.
 
The whole concept of auto-driving cars is that they share information with each other and a centralized DB.
 
@Hosch250 That's news. Last time I read, it was them working independently, watching the road.
 
2:40 PM
Second, let me know when random Joe slips a USB cable in there in the parking lot and connects to it to install something. Only evidence is a broken window, or maybe your door was unlocked or your window cracked....
@this Nope.
Also, look up the Fiat recall from a few years back. Someone hijacked the whole car, from brakes to gas to ignition to seatbelt. And found all other Fiat's on the road to by figuring out its network system.
The only safe car is one from the 90s or so or older.
Probably early 2000s too, but at this point, those are mostly junk.
(Of course, that kind of safe doesn't mean safe in accidents :P)
 
@Hosch250 While that is always a possibility, that's pretty small in comparison to hijacking a whole network of cars. If you want to avoid that, then you have to not allow access to the critical components, ever. You can't plug in all possible holes but you can disable the access entirely.
You cannot hack an unreachable system, right?
 
@this I just said, there's a broken window. Maybe they steal a trifle just to make it look like a theft rather than an attack.
There are far too many possibilities for me to be comfortable with this.
Heck, this would be totally awesome for kidnapping adults. Lock the doors, disable the locks, drive away.
When the cops come, get into a high-speed chase.
 
@Hosch250 if that's the only way to hack a car, then that's better than being able to hack a car by logging into a terminal 1000 miles away, right?
Of course it's not as good as one that has no computer to hack at all. :)
 
2:57 PM
bah. and how do you patch bugs in the software of the car then?
the issue is not that cars shouldn't be connected at all, the issue is that currently the incentives for securing access to cars is skewed and that even with cars, physical access is a one-hit KO for any and all security measures in place
 
FWIW, my car has far more physical access by strangers than my laptop.
I park outside both at home and at work.
 
@Vogel612 the same way you patch firmware for non-internet-connected devices; usb cables or usb drive. That requires physical access. The hard part is ensuring that you don't connect directly to a computer that might itself be compromised.
@Hosch250 True. If it's going to be a thing, people would have to be "trained" to suspect compromise of the software in event of a break-in.
 
3:12 PM
> Reopening the issue because I don't think it is fixed even in latest `next`...

Given this line:

```
Dim prop As DAO.Property|
```

Typing `enter` yields:

```
Dim prop As DAO.Property
|
End Property
```
 
@this An unreachable car does me no good what-so-ever.
 
3:43 PM
@this They don't even suspect compromise in the event of a breakin on their PC. What makes you think they well for a car?
They'll be "well, it starts, so I guess it is OK."...
 
I always lock my PC out of habit, but for some reason I can never remember to shut my sunroof...
 
@Comintern if the Immediate Window has unrestricted access to private variables and members, and it also has its own project, and thereby a TypeLib and a GUID, I wonder whether it's possible to add a reference to the Immediate Window project using References.AddFromGuid, and then any VBA project can automate the unrestricted access, and perhaps other Immediate Windows goodies?
 
@ThunderFrame IIRC, VBA projects don't get a GUID. They're all Guid.Empty
 
3:58 PM
@this hmm, maybe it isn't exposed via the TypeLib, but I remember seeing a GUID in the binary offsets from the TV_ITEM lParams.
 
@ThunderFrame O_O
 
@ThunderFrame 0_0 O_O !!
 
@this but then, it could have been any old GUID, and not necessarily a "Project" GUID
@FreeMan o_O 0-()!l|1 - hows' that fot a font fail?
 
I really need to fire up the Immediate Window typelib and see if I can abuse it.
2
If it has an event source, you might hear me cheering when I find it...
 
@ThunderFrame indeed! ?
@Comintern You can abuse, but isn't it @ThunderFrame's job to weaponize?
 
4:07 PM
@Inarion by the way, the Source Code Pro font has a dotted 0, which I've always found a little irksome, but I just found a fork of Source Code Pro called Office Code Pro that uses a Slashed 0. I'm yet to install it, but it might become my new favorite.
 
@FreeMan @ThunderFrame excels at weaponizing the VBA syntax.
2
 
Indeed!
 
I particularly enjoy the ones where it breaks the VBE's syntax highlighter.
 
@FreeMan I hold no illusions of exclusivity on dangerous ideas. @Comintern comes up with some pretty spirited efforts.
@Comintern minor syntax highlighter bug, but On Error Goto -1 highlights the - as a keyword, but not the 1
 
@ThunderFrame Does that function correctly with a negative line number?
 
4:11 PM
-1 is a feature
-1 is not a line number unless you enter it as hex
Sep 20 '16 at 0:05, by ThunderFrame
19
Q: Difference between 'on error goto 0' and 'on error goto -1' -- VBA

sterlingalstonCan anyone find the difference between 'On error goto -1' and 'on error goto 0' in VBA? I've tried google and msdn, but I've had no luck.

 
Bonjour/Good afternoon. So I thought I was losing my marbles lately, which is odd since I thought I had none left. But today I finally realized it's RD that's losing my breakpoints (F9) when I use Refactor to change variable names. Is there a way to prevent this?
 
@ThunderFrame That's what I was referring to, but this doesn't work (unhandled error):
Sub Foo()
-1
    Debug.Print Erl
    If Erl = -1 Then
        Exit Sub
    End If
    On Error GoTo -1
    Debug.Print 1 / 0
End Sub
This one overflows Erl:
Sub Foo()
-1
    On Error Resume Next
    Debug.Print 1 / 0
    Debug.Print Erl '65535
End Sub
 
@spinjector Oooh, that's gonna be a #fun one.
 
hehe
 
#workingOnIt
#slowly
 
4:21 PM
I haven't looked into the VBIDE about this topic yet to see if "breakpointed" lines are listed somewhere. If so, RD could remember them, and then "re-F9" them after refactoring. I'd happily take a stab at this myself, but I have yet to create the Visual Studio setup needed to start pulling and hacking. I code all day long and when I get home my brain hurts and I just want to eat, drink, and be merry, lol.
 
thing is, nothing in the VBIDE API lets us "re-F9"
or know whether there's a breakpoint anywhere for that matter
 
...that we know of...
2
 
Boo.
 
mind you, nothing in the VBIDE API was giving us an abstract syntax tree either..
 
Hell, the VBIDE can't even tell you it's window handles.
 
4:24 PM
Hrrmmm...what about API calls to the code window and read the text and color..? Maybe it's RTF or something..?
Yea its funny when you get into the the code module objects, and it's all just raw text and referred to by line numbers. One would think it would be a bit more complex than that.
 
Problem with that is that the control for code panes is completely custom drawn. Check it out in spy++ sometime - there is simply nothing in the client area of the window.
 
Blergh. It would figure.
 
"So we're going to give you an API to make add-ins for our wonderful IDE"
"Oh but you won't have any handle on anything remotely useful for anything"
that said, losing breakpoints is one thing - we're also losing member attributes for the same reason (i.e. because we rewrite the whole module at once), and that has me more worried - because it can turn working code into broken code
 
RD 4 should offer an extended API. Something like "Rubberduck Visual Basic for Applications Extensibility Objects"
 
AUE API
"Actually Useful Extensibility API"
 
4:29 PM
Or even better, "Rubberduck Visual Basic for Applications Sensibility Objects".
 
I wonder if anyone's ever done an *** OLE pun.
 
haha i like that one =-D
 
4:42 PM
@MathieuGuindon we could collect the bookmarks, by executing NextBookmark enough times that we iterate them all, and remember each line location, but that's intrusive for a large number of bookmarks. There's no equivalent for iterating breakpoints, but given the weird breaking on non-existent breakpoints behavior, it makes me wonder whether breakpoints become part of the p-code somehow. In which case, we might eventually be able to identify them.
 
idea: replace all breakpoints with Debug.Assert False
and now we know where they are!
</badidea>
 
Lol
@MathieuGuindon breakpoints != breakage points
 
#If IsDebugging Then
    Debug.Assert False
#End If
 
@ThunderFrame How do you inspect the instance pointer?
 
^ and now you can toggle them! see, not heavy-handed at all!
 
4:47 PM
But what if that's what a breakpoint is: insert a p-code instruction for Stop at that line?
 
@ThunderFrame IIUC it pretty much has to be pretty much exactly that
but we don't have the p-code do we?
 
@IvenBach ObjPtr(myclassInstance) gives you the pointer. The property and method pointers are arranged immediately after that.
 
@MathieuGuindon Wayne does.
:P
 
@Hosch250 I meant the mere mortals that we are though
 
@MathieuGuindon oh yes we do, the TypeLib can be cast to IPersistStorage and we can call the Save method. In that stream, is the live p-code followed by the compressed source code.
 
4:51 PM
@ThunderFrame I can do `?objptr(varName) and get the pointer. How do I see/view the pointers?
I'm missing the blatantly obvious.
 
@ThunderFrame hmm... so identifying breakpoints is just a matter of identifying the opcode for one?
for some values of "just"
 
I am reading the link you provided. If it's in there I've not gotten to that part.
 
Download HxD (a few hex editor) and open the Excel memory space. Goto the Address returned by ObjPtr and you'll see the next blocks of 4 bytes showing you the pointers to each member.
 
@MathieuGuindon That sounds like the basis for being able to continue a heavy debugging session from one day to the next. I smell a feature request...
or, even better, being able to save sets of breakpoints!
 
So, in simple terms, if your object pointer is 240, then memory address 244 contains the pointer for the instance's first member, and 248 the address for the second nember, etc. Depending upon the member/offset, instances can share the same pointers for members, as the state variables are kept in later addresses. So dic1.Add and dic2.Add have different object pointers for the dic1 and dic2 instances, they both share the same pointer for the Add method.
@MathieuGuindon I think so, assuming our assumptions about a breakpoint being something similar to a Stop opcode hold
 
5:02 PM
have a module with 2 members, DoSomething1 and DoSomething2, each with a single instruction; get the offset for DoSomething1, the offset for DoSomething2 - now you know the byte content of DoSomething1; add a breakpoint, collect the bytes again, compare
 
@ThunderFrame If this is the case, couldn't we eventually decouple the parser from the code panes entirely?
 
@IvenBach once you have the object pointer, add 4, and use CioyMemory to read the 32-bit value from that address, then the next, and so on. Then, armed with a member pointer, you can CopyMemory again to get the member's machine instructions
 
How do I open Excel's memory space?
 
@Comintern but then we have the problem of writing back to the panes...
 
@MathieuGuindon You're right. We should probably just get rid of them.
 
5:03 PM
@Comintern I really don't know. Wayne undoubtedly does, but it may be one of the secrets he's unwilling to divulge
 
@Comintern also, navigating: how do we know where in the code pane foo is?
 
@MathieuGuindon We pick a random spot.
 
we need a bugfix sprint, a 2.3 release, and then get the ball seriously rolling with Avalon
sprint/marathon
 
@IvenBach programmatically, from within Excel: using CooyMemory. Using a visual tool: use a good hex editor. But be aware, all you're going to get are a series of bytes. You need to be able to interpret those bytes to know what they're doing, or even where they end.
 
@MathieuGuindon meh. we need continuous bugfixing.
and I don't have the mental capacity left to do it, usually :(
I can move some pieces around, but that's about it, usually
 
5:06 PM
Same here. I spend my non-work computer time mindlessly playing video games :(
I have trouble even working through simplish bugs on my checkers game.
 
relatedly: TCP is ridiculously complicated once you get down to the details
 
food o'clock, bbl
 
@Vogel612 You studying that? It was one of my favorite classes in college.
 
@Comintern oops, sorry, I misread, I thought you were talking about decoupling the RD codepane from the debugger. But can we extract the source code from the IPersistStorage? Yes, we can. Can we inject into it? I have no idea.
 
@Hosch250 I kinda skipped all of my lectures this semester, because I knew the basics of it from my apprenticeship
 
5:07 PM
LOL.
 
that may have been a mistake, but I'm not sure how big a mistake it was
I'm just doing the assignment right now
 
Read the book, and you'll be fine.
If you have time, that is.
 
Uni exams are the first time I've been running low on time to complete
 
@ThunderFrame I would imagine that it would have to read it when it compiled. I can't imagine it does that from the code pane.
 
I don't think I'll ever need knowledge of how signals are transmitted on the wire, though. It helps to know the basics.
But I'm reasonably happy with the protocol-level abstraction
and it's probably more than most programmers ever get to use anyways, soo...
 
5:11 PM
@Vogel612 Sequenced electrical pulses carefully coordinated so they don't interfere with each other.
 
@Comintern the last time the VBE interprets the codepane is when you finish editing a line. Unless you open a project from different VBA version or bitness, then VBE will reinterpret the source code lines. Otherwise, once a line is entered, it is converted to p-code, and then everything is p-code until runtime, at which point is compiles to excode and runs in the VM
 
@Hosch250 AIUI it's a bit more complicated than that. Because you may be channel-multiplexing
 
@Vogel612 That's part of the careful coordination part :)
 
so what you need is various sinus waves to overlay onto one another to create rectangular waves
 
@ThunderFrame LOL @ "hotness" :)
 
5:12 PM
Yeah, we covered that just a bit. It was cool.
 
the physics of that is pretty cool and it's also used in quantum computing (from my limited understanding)
 
@FreeMan IKR, bitness != hotness
@Vogel612 chirality and all that jazz?
 
@ThunderFrame unless you're a bit hot?
 
apparently I'm one of today's lucky 10k
 
@Vogel612 Did you just win a trip to Nigeria?
 
5:16 PM
nope. i'm wikipedia-holing myself for chirality
 
@Comintern the IPersistStorage is the same format that is saved to disk inside the vbProject binary inside the host document. The format is: p-code headers (including identifier tables, etc), then p-code, then the compressed source. You can actually open the disk copy, remove all of the text, and then open the project and it will run just fine.
@Comintern a cast to IPersistStorage gives us the live p-code and compressed source-code. We can decompress the source-code quite easily. Wayne makes out that decoding the p-code is quite easy, but it's undocumented unless you're an Anti-Virus company with an NDA with MS. Because you can imagine the fun a Blackhat can have by making the source code look benign, but the p-code is evil.
But, for breakpoints at least, assuming they're stored in p-code, all we need to do is establish the opcode and determine the line (still a challenge), and we should be close.
 
@ThunderFrame Wasn't there a VB6 decompiler project out there somewhere?
:smack self (again) for never learning ASM:
 
There's a p-code interpreter in GitHub, but it's a WIP
And this is a semi decompiler for VB6 github.com/VBGAMER45/Semi-VB-Decompiler
This is the p-code one github.com/bontchev/pcodedmp
@Comintern IKR
 
Rubberduck.Reflection.Emit(byte[] pCode)
 
5:35 PM
@ThunderFrame I'm looking at stuff I don't understand. Don't have the time to figure it out right now. I am still interested in how the offset works and how to read where other members are.
 
A virtual method table (VMT), virtual function table, virtual call table, dispatch table, vtable, or vftable is a mechanism used in a programming language to support dynamic dispatch (or run-time method binding). Whenever a class defines a virtual function (or method), most compilers add a hidden member variable to the class which points to an array of pointers to (virtual) functions called the virtual method table. These pointers are used at runtime to invoke the appropriate function implementations, because at compile time it may not yet be known if the base function is to be called or a derived...
 
Thx @Comintern. I'll be occupied with ThunderFrame's link for a while. I feel like I might be able to grok vTable stuff this time around. Be ready for questions when I do get to reading.
 
5:58 PM
@IvenBach The article earlier is helpful, but you have to read through the whole thing to stitch together the valuable pieces. I can't offer any shortcuts - indeed, all I can offer is a second, even longer thread, that is again necessary to read in it's entirity - vbforums.com/…
and this is useful too - vbforums.com/…
 
Thanks. If I can understand the content I'm willing to put effort into learning. I'm just a little slower than most at learning things.
 
there really isn't very much information out there about the layout of an instance in memory. I still don't understand how exactly interfaces are laid out.
 
At least you have that.
I still don't understand what I don't understand.
If you know what I mean.
 
@IvenBach you're attempting to understand pointer arithmetics and memory layouting
 
there are some smart guys on that site. here's hoping once RD penetrates the VB6 space, we'll get some contributions from them. I suspect they're unaware of some of the tricks RD is now using to access hidden detail.
 
6:02 PM
and that's royally complicated
 
there's things that you could make educated guesses about if you could put fully defined memory layout semantics onto the things you're looking at
But I'm not aware of any public documentation of said memory layouts
There's some guesses to be ventured that you're probably dealing with something that's similar to C++
but even that isn't really guaranteed, because C++ is dark magic
 
@Vogel612 there aren't that many people that need to know memory layout, compared to the number needing to know about COM, interop, compiler opportunities etc.
 
yeap
which means the little documentation available on it is usually rather arcane
 
@Vogel612 or empirical/academic
or all 3
 
6:23 PM
@ThunderFrame I always thought they were sequential from top to bottom of each module.
 
Occam's razor agrees
 
@Vogel612 Is that because everything has to be handled?
 
@Comintern no, public variables and properties before methods, and private public makes a difference too. the 2nd vbforums link probably explains it best, with post #37 in that thread being very detailed.
 
@IvenBach do elaborate?
 
No garbage collection, memory allocation, not sure what else. Everything needs to be done by the programmer. There's little to no abstraction? I'm vague on C++ stuff.
 
6:29 PM
yes, no, maybe
you can write your own garbage collector, though basically implies you're writing an abstraction over the usual memory allocator
memory allocation can be hidden in C++, it does support using new
there also is some basic rules about destructors, which free the memory previously used by the object
but you can also go full C and do most of what you allocate with malloc and free
that's not considered idiomatic c++ anymore, though.
 
I should reread those threads, and try to write up something more cohesive, and with a more robust example. I'm afraid that might still be full of holes and errors, but maybe I could get Wayne and others to check it - gah, if only I had the time....
 
@ThunderFrame Ahhhh... I thought you were talking about the user code vtables.
 
@Vogel612 Thanks. Each time I hear the same information it's making more sense. Long road ahead, but not as long as it was yesterday.
 
6:55 PM
3 different versions of a workbook need to at some point be reconciled into 1. #HHCIB :tear:
 
7:44 PM
@QHarr Pretty neat with the xlTrail addin. That is very much needed to keep myself form FUBARing too much.
Duck check: Can Git be made to work with a local repo IE on a network?
 
Yes.
 
Must Will carve out more time to learn how.
 
8:01 PM
@IvenBach Glad it was useful.
 
Seeing the ability to drill down into the worksheet/module was something I want for my own addins.
 
8:49 PM
I've succeeded in having a co-worker use RD.
3
It saddens me though that he had a parse error because of non-compileable code.
He must learn of Alt, D, L.
He asked me 'Do you know git?'. It was an odd experience being the expert imposter and teaching him about git.
 
9:20 PM
>
I have a VBA project and trying to take advantage of rubberduck features. However, it seems that rubberduck doesn't handle one of the end-ifs in the following function.

Error Context reads as : mismatched input 'End If' expecting PABS, ANY, ARRAY, CBOOL, CBYTE, CCUR, ...}

I have also isolated only the function below into a blank/new workbook and same error happens with rubberduck. The source of issue seems to be a commented header line for if condition over line break "_" character !
 
Duck check: What's a docker based system?
I've read en.wikipedia.org/wiki/Docker_(software) but still need a higher level explanation.
 
9:42 PM
> Just to be clear, I'm assuming that the lines with `'<======================= Actual Cause of Error` and `'<======================= RubberDuck Error Line` are not actually in the code when you get the parser error.

In this code:
```
' _
If InStr(name, "_") > 0 Then
returnMessage = returnMessage & "_ "
foundInvalidChar = True
End If
```
The `End If` **_is_** the error line - the comment has a line continuation, so the `If` statement below it is part of the
 
git-school.github.io/visualizing-git helped me grok a lot better how git works. I hope someone else can get use from it.
 
10:04 PM
 
-1
Q: Macro to clear cells that do not appear in a master list

TardisgxThe macro below clears cells that do not match any cell in comparison to a range (a master list). It works on small file but is too slow to work for files with large ranges. Sub REMOVEINV() Application.Calculation = xlCalculationManual Application.ScreenUpdating =False Application.DisplayStatus...

 
11:03 PM
> The problem is here:

```
for (var i = 0; i < parameters.Count; i++)
{
parametersAreByRef[i] = parametersAreByRef[i] &&
!IsUsedAsByRefParam(declarations, parameters[i]) &&
((VBAParser.ArgContext) parameters[i].Context).BYVAL() == null &&
!parameters[i].References.Any(reference => r
> The problem is here:

```
for (var i = 0; i < parameters.Count; i++)
{
parametersAreByRef[i] = parametersAreByRef[i] &&
!IsUsedAsByRefParam(declarations, parameters[i]) &&
((VBAParser.ArgContext) parameters[i].Context).BYVAL() == null &&
!parameters[i].References.Any(reference => reference.IsAssignment);
}
```

Note that the indexing of the `parameters` `List` is bounded by the condition of the
 
11:16 PM
> Noticed this when I was trying to find failing cases for #3906.

If you have a `Sub` with no body and a single `ByRef` parameter...

```
Private Sub foo(bar As String)
'Do nothing
End Sub
```
...it triggers a `ProcedureCanBeWrittenAsFunctionInspection`. I **_could_** re-write it as a `Function`, but I can't find any use case for that, and that would be a `NonReturningFunctionInspection`.

Note that this doesn't match with the description, which states "...is assigned a new val
 
@Vogel612 Duck check: git reset ... is for whenever everything has been done locally. git revert ... is for when it's been pushed to a repo and others may have used it?
I want to make sure I've grok'd correctly and all ducks are in a row.
 
> I agree with the proposal to not return an inspection result here. After all, this code should also the ParameterCanBeMadeByVal inspection, which provides the more useful suggestion here.
> I agree with the proposal to not return an inspection result here. After all, this code should also trigger the ParameterCanBeMadeByVal inspection, which provides the more useful suggestion here.
 
11:35 PM
git reset basically means everything from the point I reset to has never haopebed, with the variations of whether the working directory and index get reset as well (depending on whether you have a hard, normal or soft reset.)
So, never do that to something already published.
You are rewriting the history with this.
 
C0<C1<C2<C3...<CN and if I were to do git reset C2 anything after C2 is "Poof" gone?
 
Basically, yes.
If you do a soft reset, the files will not change, just the git history will.
 
Seck. I'm testing revert so I don't ask a derpy question.
@M.Doerner Didn't know that.
 
However, I would need to look up the exact differences for the hard, normal and soft reset.
I always get confused regarding reset and rebate.
 
But for C0<C1<C2<C3...<CN and doing git revert C2 there would be only a single revert which includes all the changes no 'undo' everything from C3 and after.
 
11:40 PM
I always get confused regarding reset and rebase.
 
@IvenBach In general, if you get in a situation where you are considering using reset or revert, the better strategy is to pull a second local from upstream, set the upstream of the messed up local to the new one, and then cherry-pick commits into that.
 
IIRC, revert c2 simply adds a commit undoing the changes from c2.
 
I'm just learning about cherry-pick
 
@M.Doerner Yes. I don't think it flattens the revert in the history though.
 
I like my git gui for cherry picking. Makes it easier.
Correct, you just get a new commit.
So, if you want to get rid of your last commit you have not pushed yet, use reset.
 
11:44 PM
@Comintern ^ I need kindergarten visuals.
Is that what you were saying?
 
Pretty much.
 
Mkay. I don't want to misunderstand.
 
It depends on how much trouble you've gotten yourself into though. If it's the last commit, I usually just revert it.
 
I see why git is used. Very flexible and easy to understand.
 
00:00 - 14:0014:00 - 00:00

« first day (1501 days earlier)      last day (1679 days later) »