« first day (644 days earlier)      last day (2536 days later) » 

00:01
RELOAD!
[Cardshifter/cardshifter.github.io] 9 commits. 87 additions. 98 deletions.
[Hosch250/Rubberduck] 1 commit. 106 additions. 55 deletions.
[retailcoder/Rubberduck] 8 commits. 73790 additions. 55414 deletions.
[rubberduck-vba/Rubberduck] 1 issue comment.
[Vannevelj/VSDiagnostics] 3 issue comments.
[Vogel612/TranslationHelper\‌​] 1 opened issue.
[Zomis/Machine-Learning] 1 opened issue.
 
5 hours later…
05:08
@Duga his only starred repo :)
 
1 hour later…
06:37
[retailcoder/Rubberduck] retailcoder pushed commit 22ee628d to TypeInfo: reinstated preprocessing
[retailcoder/Rubberduck] retailcoder pushed commit 5ed74674 to TypeInfo: removed static stuff from parser state (was a very very very bad idea) and made ParseSynchronous actually synchronous.
[retailcoder/Rubberduck] retailcoder pushed commit b71f3b92 to TypeInfo: removed VbaStandardLib, ExcelObjectModel, MsFormsLib and AdodbObjectModel.
[retailcoder/Rubberduck] retailcoder pushed commit 4767ce3f to TypeInfo: reinstated dynamic cast (fixes #1179) - 41 tests still fail, no clue why
Public Sub Foo()
    Const const1 As Integer = 9
    Goo const1
End Sub

Public Sub Goo(ByVal arg1 As Integer)
End Sub
the test fails, but the inspection actually works in the VBE. something is broken with the combination of threading, parser state and resolver. my brain hurts.
oh, and refreshing the inspections somehow leaves the previous modules' declarations in the parser state.
and the resolver running on multiple threads is REALLY hard to debug
3
did I mention, my brain hurts?
TTGTB
I have to accept the truth: the parser simply isn't thread-safe and I don't know how to make it be
 
3 hours later…
 
3 hours later…
13:21
Hi @Scorchio!
Hi - just jumped in to take a look while working on some VBA stuff :) Rubberduck is a huge help!
13:39
Thanks!
Can't wait to get 2.0 finalized :-)
what's the biggest blocker right now?
Still getting the Parser under control, right?
unrelated: the Github repo is over 50 forks now
14:22
[Vogel612/TranslationHelper]‌​ Vogel612 pushed commit 10a79821 to develop: minor changes and FIXMEs for open issues
I think I may need to overhaul the unsaved changes idea...
[Vogel612/TranslationHelper] build for commit 10a79821 on develop: The Travis CI build passed
@Scorchio just got to the office, sorry for the delay :)
I've been working on the core stuff, trying to get the parsing and resolving to work as fast as possible, on multiple threads.
the "as fast as possible" part went well
I'm dropping the "on multiple threads" part now
I hope to merge my changes into [next] tonight
15:15
1
Q: (^|)(Get|Total|Aggregated|Summary|Data|Report) - #NamingIsHard

KazThe following is the top-level procedure for aggregating, analysing and reporting my company's submitted business from 2015 - present. Reviewing the entire project is unfeasible, so I am just seeking opinions on Variable/Method naming and general readability. For reference, CLS_Data_Report is a ...

15:26
[Vogel612/TranslationHelper]‌​ Vogel612 pushed commit 0e160a92 to develop: refactored Unsaved changes dialog handling into view-specific behavior
[Vogel612/TranslationHelper] build for commit 0e160a92 on develop: The Travis CI build passed
[Vogel612/TranslationHelper]‌​ Vogel612 pushed commit db3e9685 to develop: Bound window closing listener to JavaFX controller.. it's utterly fugly
[Vogel612/TranslationHelper] build for commit db3e9685 on develop: The Travis CI build passed
15:48
hmm,... for whatever reason my coverage reports are skipped...
0
Q: If Not ComparisonIsTrue(thisPost, ComparisonOperator.Equals, goodCode) then Me.Answer

KazThis is a follow-on to a global enum for comparison operators. I wanted to pass a logical expression E.G. >= someValue as a parameter to a function, so I made an Enum and an accompanying function to analyse logical expressions. Is my approach a good way to implement this functionality in VBA? ...

[Vogel612/TranslationHelper]‌​ Vogel612 pushed commit 9096f802 to develop: Attempt to get test-coverage running again
[Vogel612/TranslationHelper] build for commit 9096f802 on develop: The Travis CI build failed
BUILD FAILURE!
I figured something like that was going to happen... crap
@Duga not my fault... yet
environment setup failed :/
16:13
[Vogel612/TranslationHelper] build for commit 9096f802 on develop: The Travis CI build passed
0
Q: Filtering Arrays by values in a specific Column

KazThe following function, as evidenced by its name KeepOrRemoveArrayRowsWhereComparisonIsTrue is probably trying to do too much. How can I better structure/refactor/split it to be cleaner whilst retaining the original intent: "Here's an array, filter it based on the values in this column"? Pub...

[Vogel612/TranslationHelper]‌​ Vogel612 pushed commit 292ba263 to develop: Fixed test
[Vogel612/TranslationHelper] build for commit 292ba263 on develop: The Travis CI build passed
[Vogel612/TranslationHelper]‌​ Vogel612 pushed commit 599b931b to develop: Fixed tests
[Vogel612/TranslationHelper] build for commit 599b931b on develop: The Travis CI build passed
[Vogel612/TranslationHelper] build for commit 599b931b on develop: First build on develop at 64.315%
16:34
finally...
coverage is back
17:05
and it dropped by a measly 20%
17:21
@RubberDuck I'm not sure why one would need Function Pointers....
17:55
> Very similar to [issue #707](https://github.com/rubberduck-vba/Rubberduck/issues/707). Consider the following add-in code used to set up an application-wide event hook:

```
Private WithEvents xlApp As Application

Private Sub Class_Initialize()
Set xlApp = Application
End Sub

Private Sub xlApp_SheetActivate(ByVal Sh As Object)
Dim win As Window
Set win = Sh.Parent.Windows(1)
win.Zoom = 80
End Sub
```
This results in "Procedure 'xlApp_SheetActivate' is never us
18:06
> If a user defined object is declared WithEvents but the class doesn't source automation events (no Event declarations), it won't compile. This would be a nice warning to have.

Similarly, if a class is consuming events from another user class, it would be nice to know if an event handler exists. Currently, this code...
```
Private WithEvents obj As SomeClass

Private Sub obj_Typo(arg As String)
Debug.Print arg
End Sub
```
...would warn that obj_Typo is never used (assuming that
> I have code in my fork, that's loading all referenced COM libraries and creating a `Declaration` object for literally *everything* referenced - including the whole entire Excel object model and its events.

If I got the events right (see [here](https://github.com/retailcoder/Rubberduck/blob/TypeInfo/Rubberduck.Parsing/Symbols/ReferencedDeclarationsCollector.cs#L288)), then built-in events from anything that can fire an event will be picked up as such, not any differently from user code.
While reading through that issue I noticed you may have problems running a Rename over With Events members
or Functions that are called from events
well if you have:
(it's supposed to be handled... I think there's maybe possibly a test for that)
@Mat'sMug okay just making sure it wasn't missed :)
18:15
same with interfaces/implementations. hmm you know what I think it's still unhandled
> So, 3 things here:

- `WithEvents` declaration of a type that isn't sourcing events (error level / compile error)
- *event is never handled* inspection
- *event is never raised* inspection

Love it! :+1:
19:05
> One of the dreary tasks that I find myself performing fairly often is converting from early binding to late binding. I like to take advantage of auto-complete when I'm writing the code, but usually want to release the finished product as late bound so I don't wind up with referencing issues.

It would be awesome to right-click the declaration line below, then Refactor->Convert to Late Bound...

```
Private Sub Example()
Dim app As Excel.Application
Set app = New Excel.Applicat
19:52
> Okay. I think this is definitely possible... both ways... once the 2.0 COM reflection code is merged into the main repo.

Here's the approach I'm thinking of:

- When reflecting COM types, keep the GUID in the `Declaration` object.
- When the resolver establishes that `app` is an `Excel.Application` object, Rubberduck knows the GUID to use.
- Once we know what GUID to use, hit the registry and locate the `CLSID` key for it; get the `ProgId` key under it and read the default value, whi
Hey @Mat'sMug, @Hosch250, @RubberDuck, I was wondering if you guys were interested in having a look at my VBA addin for Visual Studio? I can send you a VSIX, if you want.
Sure. Not now, I've got the flu.
@Hosch250 your computer might catch a virus!
:p
This is a screenshot:
Not this one.
20:06
@Rossco what's a VSIX?
@Mat'sMug Its the file extension for a VS addin
What does it do?
OMG VBA IN VISUAL STUDIO
ATM it it just syntax highlights and outlines
Need refactorings?
20:08
next step, a compiler?
Needs a crap-ton of things added.
@JeroenVannevel could extend VSD to implement the Rubberduck inspections and support.... VBA lol
@Mat'sMug a compiler would be helpful, but I'm trying to work top down, so the compiler is kind of the 'last' thing.
it's not as easy as that :P
Analyzers are integrated into MSBuild. MSBuild doesn't work with VBA
right, you'd need Roslyn to work out VBA first
20:10
I already have code that can modify the VBA code in an Excel file but the simple workaround is to semi-manually copy/paste the VBA code through the VBE
@JeroenVannevel Well, the plan is to write MSBuild tasks which perform the 'compilation'
so it's just using VS as a better text editor then
@Rossco you might just end up killing VBA
@Mat'sMug LOL.
Perhaps...
The end goal is to be able to build VBA projects without using the VBE.
Write a VBA -> MSIL compiler
The new Roslyn analyzer API will work at IL level
meaning it will be language-agnostic
20:13
@JeroenVannevel Yes, totally possible. There is a project, Bridge.Net, that cross-compiles from C# to JS
Though I'm still not quite sure how that will work. But the idea is nice
So presumably you could compile from C# to VBA.
Microsoft have done an amazing job of making VS so extensible in the versions from 2010. They are definitely pushing for it to be the industry standard editor for all languages IMO.
Anway, if anyone would like to try it out, here is a link: dropbox.com/s/c74pqpsr91x7xu8/…
cool!
It is quite buggy, it doesn't handle editing. I have a problem with async method cancellation throwing an exception.
@Rossco without using the VBE or a host application
20:19
It is my first attempt at async.
@Mat'sMug Yeah, there is no dependencies on Office
But you obviously can't run the compiled Excel/Word/Access file without Office.
wait, you build an actual Office document out of it?
Having no dependencies on Office is great because you could put your project into CI
@Mat'sMug Well, that is the plan.
Like I said, I have some code which can manipulate the VBA code inside an Excel file etc.
Just needs to be integrated.
The Office file format specification is released by Microsoft.
eh, I don't come anywhere near sourceforge
20:23
is a library which can edit Structured STorage - which is the container format that old .xls, .doc files use.
The new formats are actually zip files, which there are OSS libraries for.
I think I'm using SharpZip.
The VBA project inside the Office files contain a bunch of binary streams which are the real issue.
I digress, to use the addin, you need to open a file with extension '*.mybas'. I would save the file with VBA code in it using Notepad first before opening in VS. Since I haven't gotten the background parsing cancellation thing figured out.
I haven't figured out why I can't register the addin for the *.bas extension yet. It seems to be registered for VB.Net.
I'll be removing the multithreaded parsing/resolving, and working on the async cancellation tonight in the Rubberduck code base (in my own fork) - if you keep an eye in here you'll pick up my commits and can get some inspiration :)
Woah
> Rubberduck.Setup.1.4.3.0.exe (4.32MB) - Downloaded 2320 times.
Last updated on 2015-07-08
IIRC it was 2299 yesterday
Cool, I'm going AFK for a bit. Good luck trying the extension, no doubt you'll find more bugs! I'm also interested to know if it will run on another machine. There could be requirements in my environment that you guys don't have.
But feel free to ping me here anyway with comments. I'll respond.
eventually...
Cool, later!
Hey @ThunderFrame! Love the new avatar!!
20:56
@Rossco Yeah, I've written a compound binary decoder in VBA, in the past, but never got around to implementing the encoder. I had seen the MCDF pages.
@Rossco - But then, I found the "Microsoft APC 7.1 Object Library" which contains methods and objects for working with Streams and Storages. The APC library is what VBE uses to work with storages and streams, so it's going to be the best model to use, but it's part of the VBA SDK, so unfortunately, it's locked down unless you can provide a key to the API.
and you have a key?
I have an evaluation key
how can an API have a key? is the code encrypted with it?
It's a bit like the key on the WizHook in Access - but that key is widely available
never heard of WizHook, interesting :)
21:07
but the storage and stream parts of APC seem to work without a key. The problem is that APC and VBA gets a bit meta... I tried setting the APC 7.1 object's key property (my key is from the 6.X SDK, so I don't know if it is valid under 7.1), and VBA goes boom.
I think that's because I tried to get an APC object from a VBA host. I might get further if I work with 2 VBE's (eg. develop in Word VBE, and get an Excel VBE handle, and then reference APC from the Excel VBE, using Word.
@Mat'sMug Yeah, I found it in a local store.. I need to take a better photo.
just received a DMCA takedown notice lol
from github :O
a what?
Digital Millennium Copyright Act
wrote a decoder for jsxbin and adobe didnt like it lol
wonder how they found out
@awgaya - Probably because this search is easy github.com/…
21:17
yeah but someone must have been actively looking for it then? anyway nvm :p
21:32
@awgaya I can understand why...
22:04
@ThunderFrame Appreciate the throughts. OpenMCDF does work quite well though (I do have it working). The reason I'm more inclined to use it is because it comes in a nuget package (nuget.org/packages/OpenMcdf). That means I can deploy the entire compiler through nuget. This in turn means that a project can be built on a build server without any prerequisites (as they will all be restored through nuget).
@awgaya oh wow, my biggest fear!
The architecture is; A VSIX package which provides all the editing functionality and project capability. Then a compiler which exists as a nuget package. That is the way that Bridge.Net solved the problem.
@Rossco fair enough. Would be nice to have some C# classes that deal with storages and streams, and handles the VBA binary format of each stream.
I have written the decoder for the VBA streams.
22:09
@Mat'sMug Sounds like @Rossco has some Syntax highlighting... Is the parser designed to one day output syntax hightlighted code?
That's not the point of a Parser per se
the job of a parser is to, well, parse.
but since you get an AST out of it, you can "ab"-use that to do syntax-highlighting
you need some deeper information about declarations though
@Rossco - What do you do with the "Must not be present on write, must be ignored on read" stream content (ie. where the spec says, FU, we're not telling you everything)
LOL
Do you have a reference for one of those streams? I remember what you are talking about, I just can't remember where to start looking.
22:13
IIRC they're the ones that start with a double underscore
There are plenty of things which they are not telling. The code compression algorithm is not 100%. I've written it as per the spec and I don't get the same result as VBA when I compress it. Both mine and VBA's decompressed output is the same though.
That one is waiting on the back-burner to be solved.
Yeah, Huffman is hard to match when adaptive and there's a pre-parse. But it shouldn't matter if the decode works.
OK, I found a reference to what you mean @ThunderFrame. There are __SRP* streams in the compound file format. As I understand it, they are performance caches and can actually be removed. I'm guessing they are compiled VBA code and hence depend on the version of the VBA compiler used.
2.2.6 SRP Streams
Streams that specify an implementation-specific and version-dependent performance cache. MUST be
ignored on read. MUST NOT be present on write.
The name of each of these streams is specified by the following ABNF grammar:
SRPStreamName = "__SRP_" 1*25DIGIT
Similarly there are performance caches in each of the module streams:
PerformanceCache (variable): An array of bytes that forms an implementation-specific and
version-dependent performance cache for the VBA project. The length of PerformanceCache
MUST be seven bytes less than the size of _VBA_PROJECT Stream (section 2.3.4.1). MUST be
ignored on read. MUST not be present on write.
So you just read the data and throw it away. Then write it back without it.
actually, I think some of the content is pre-compiled stuff, but I think some of it is a parse tree that caches the object model of the project. You can see module, method and property names in there....
internal class VbaProjectStream
    {
        private const UInt16 Reserved1Sig = 0x61cc;
        private const UInt16 VersionSig = 0xffff;

        private const byte Reserved2Sig = 0x0;   // Undefined. MUST be ignored.
        private UInt16 reserved3;
        private byte[] cache;

        internal VbaProjectStream(ICFStream rawStream)
        {
            using (BinaryReader reader = new BinaryReader(new MemoryStream(rawStream.GetData()))) {
                if (reader.ReadUInt16() != Reserved1Sig)
And for the module stream:
public class ModuleStream
	{

		private ProjectModules.ModuleRecord _moduleRecord;
		private string _streamName;
		private byte[] _cache;

		private string _code;

		internal ModuleStream(ICFStream rawStream, ProjectModules.ModuleRecord moduleRecord, UInt16 codePage)
		{
			_moduleRecord = moduleRecord;
			_streamName = rawStream.Name;

			using (BinaryReader reader = new BinaryReader(new MemoryStream(rawStream.GetData()))) {
				_cache = reader.ReadBytes(moduleRecord.TextOffset);

				byte[] compressedData = reader.ReadBytes((UInt32)reader.BaseStream.Length - moduleRecord.TextOffset);
So I have a comment // Not sure if this should be written back to the file or not. which obviously shows that I'm not sure of what I should be doing AND I've chosen to do the wrong thing....
Oooops
Probably more than you wanted to know :D
Haven't touched that codebase for a while, so its probably in need of TLC. It sits at the bottom of the stack so I'm going to write it from the top down which will help to define the required API.
22:34
cool - is it on GitHub?
Do you deal with the Access special-case of streams existing in the system table?
23:04
crickets... :-(
23:47
This seems to compile VBA in Excel VBA Projects, just like an Access MDE/ACCDE.
Delphi? 90's called...
Which, it seems many commerical developers are using to protect XLSM projects.
isn't that... the same thing?
^The page has demo project available for download. Rubberduck chokes on the projects because they're unprotected, but the modules can't be viewed in the VBE. I suspect the projects have some invalid binary in the project, such that they compile and run, but the VBE can't view them. Based on 1 of the demo projects, I suspect part of that is invalid characters in the module names.
Unviewable doesn't discard the source, it only makes it unviewable. Secure+ discards the source, and (by definition) makes it unviewable.
interesting.
23:57
Unviewable, I think, allows for late binding, whereas Secure+ doesn't allow late binding, and so the "compiled file" will only work with the version of Excel that it was "compiled" under.
I still don't fully understand how you "distribute" Workbooks, and why you'd need protection of intellectual property for those
I just don't see workbooks used outside of the company they were developed under
But my point is, that users are going to have 3rd party workbooks installed, and some of those will be protected with products like the above.

« first day (644 days earlier)      last day (2536 days later) »