« first day (3161 days earlier)      last day (19 days later) » 

12:08 AM
REFRESH!
[Minesweeper] 96 Games Played. 42 Bombs Used. 12309 Moves Performed. 19 New Users
[Rubberduck] 1 Synchronizations
 
 
1 hour later…
1:18 AM
Well, we'll see what happens: github.com/dspace-group/dscom/pull/131
 
good stuff!
gosh, I already regret going with "command" for the handlers
we'll have "GUI commands" in the UI, and then "RPC commands" in the back-end, I guess
tbh I don't like "handler" either
but there needs to be an abstraction there, and ICommand.Can/Execute felt right
it got twisted a bit though, but it's still right. just.. the name bugs me.
fml I need to make class diagrams
I'm tackling this all from the wrong end... I need to be at the transport/protocol level now.
I mean I need the proxy interfaces registered
...and then somehow the automagic client proxies need to be injected into the server proxy implementations.
And that's where I need the diagram, because object lifetime starts mattering then
 
2:33 AM
what are you using to diagram?
 
visual studio
it's mostly just to keep a note of what "server" does what :)
 
2:55 AM
good - need to be accessible to all contributor
 
yep, and there's going to be a couple of those
damn, it really helps visualizing ...more than I thought lol
 
FWIW, the first diagram looks pretty. I did got a bit lost in the 2nd diagram
mainly because I'm not sure why I'm looking at.... overloads of server commands? (the 3rd column)
 
The base command abstracts away the can/execute signatures
These more specialized base classes provide the signatures needed for requests and notifications, with/without parameters
And then there's the VoidRequest that's only implemented by a few commands that are specified as requests but don't return a response
 
yes I suspected that was the case; I think I got confused because I saw lines and thought it was a flow diagram
 
nah it's showing inheritance relationships
 
Ok I now gotcha. I suspect a flow diagram may help show how it all fits together
 
3:52 AM
yeah that's just the abstract server side
the main bits of the "platform" namespace, basically
so now I want to figure out when and how to inject the dependencies into these commands and proxies
 
the upside is that we no longer need this one giant installer we currently have RD2
 
client -> RPC -> JsonRpcServer -> SomeProxy -> SomeCommand
 
looking in that installer can be ... scary.
 
lol yeah
 
anyway, it sounds like we want it to be client-driven, no?
so if we spin up a new client process, it's responsible for injecting, yeah?
 
3:56 AM
ah, that's protocol-defined: each client spins its own LSP server instance/process
yeah I really need to work on the RPC-level stuff now, this isn't going to cut it:
        private async Task SendResponseAsync(Stream stream, CancellationToken token)
        {
            using (var rpc = new JsonRpc(stream))
            {
                foreach (var type in _proxyTypes)
                {
                    rpc.AddLocalRpcTarget(type);
                }
                token.ThrowIfCancellationRequested();

                var service = GetOrCreateService();
                rpc.AddLocalRpcTarget(service, new JsonRpcTargetOptions
                {
                    MethodNameTransform = MethodNameTransform,
    public async Task StartAsync(CancellationToken serverToken)
    {
        while (!serverToken.IsCancellationRequested)
        {
            var stream = _rpcStreamFactory.CreateNew();
            await WaitForConnectionAsync(stream, serverToken);
            _ = SendResponseAsync(stream, serverToken);
        }
        serverToken.ThrowIfCancellationRequested();
    }
from what I gather, I actually need to call rpc.AddLocalRpcTarget for each server proxy so that it "listens"
so I need _proxyTypes to get me all the *Proxy interfaces
service here is the ServerProxy ...it should be supplied by _proxyTpyes
        private async Task SendResponseAsync(Stream stream, CancellationToken token)
        {
            using (var rpc = new JsonRpc(stream))
            {
                var targetOptions = new JsonRpcTargetOptions
                {
                    MethodNameTransform = MethodNameTransform,
                    EventNameTransform = EventNameTransform,
                    AllowNonPublicInvocation = false,
                    ClientRequiresNamedArguments = true,
                    DisposeOnDisconnect = true,
more like it
 
4:12 AM
Looking forward to it! For me, however, TTGB - GN!
 
'night!
 
4:41 AM
huh wtf 32 bit
 
5:03 AM
events mapped!
ok, bedtime (pushed)
hm, missing a bunch of events there... probably missing a few LspCompliant attributes...
Oh no, it's just the RubberduckSP ones, I'll need a separate query to get the LspCompliant ones
 
 
5 hours later…
9:44 AM
@MathieuGuindon C# can really do a lot of stuff VBA can't... That's all contestants basically, but generated dynamically at compile (design?) time
 
 
3 hours later…
12:58 PM
@Greedo I've put all the RPC method names in a structured/nested static class, and the RPC methods are decorated with a RubberduckSP or LspCompliant attribute that grabs that const value at design time (the consts get burned-in at compile time though)
Then at run-time I populate a static dictionary with linq and reflection, grabbing all events in the assembly and projecting their names as keys and their custom attribute's MethodName property as values.
 
Maybe I'm not following, but is that the job of a IoC?
 
The mapping between event members and their respective RPC method names?
That said I do need to setup IoC
I guess the dictionary becomes injectable after that
And yeah it would pull up the creation of the dictionary a bit earlier I think
 
@MathieuGuindon Yeah - again possibly just me not understanding but IoC essentially does that, so I would think it should be able to set up something similar without having to code it manually.
 
oh, no it's not for determining a type of proxy to inject, it's to configure the RPC path registrations
Basically instead of doing it by hand I'm using reflection and attributes
 
1:22 PM
Yeah, I wondered because IoC uses reflection to figure out what types to use for DI as well hence me asking.
 
It does belong not too far from IoC though
static dictionary initialized with reflection in a generic base class... that's a bad place to have it
(even if it's just one instance per server process)
One implication is that the C# event names must be unique in the assembly, lest the dictionary fails to be created.
 
 
10 hours later…
11:01 PM
> ArgumentException: An item with the same key has already been added.
bwahaha
of course
hm
bingo
 
11:18 PM
License question: I made that VBA a while back which ported the RD test execution, and then ported that to tB to make github.com/Greedquest/vbInvoke. Now I released that in MIT license because that's the default that gets added to a project when you save as a .twinpack and I didn't think much of it.
Now though I've been reading up on Licenses, I'm pretty sure even though the VBA I wrote isn't a direct translation of c# but more just inspired by it, vbInvoke would still be considered a derived work of RD. Which means I have to use GPL-3 right?
 
pffffffffffffffff in theory, I guess.
personally I don't mind
but yeah
 
I didn't think it would. But you chose GPL 3 for a reason. It's nice to see it spreading.
 
GPLv3 chose me lol
it was the license for the original VB6 Antlr4 grammar
 
Now if anyone uses my package they have to use it too
Oh lol, it's a virus then
 
yes
but then RD is kind of married to it, with the Smart Indenter source code under GPLv3 too
 
11:22 PM
I forgot RD would have its own dependencies
 
yeah, made me hate licenses.. thanks for reminding me lol
 
ooops
Well it's not such a bad one, I guess it stops business users from building on it
Which reduces your reach
If they're not willing to go open source. TBH it's still a bit over my head
 
same
FWIW I think it's awesome that there's RD-derivative out there written in twinBASIC and VBA
I kind of wish GPL said "derivative has to be open-source" instead of "derivative has to be GPL"
I mean as long as the source code is out there for people to read and learn from, ...that's pretty much why RD is OSS to begin with lol
 
11:45 PM
It's a tricky balance. I think if it was just GPL derivatives must be Open Source then you could make GPL -> Public Domain Dedication -> Closed Source very easily with the Public Domain package just importing the GPL package and exporting it again. Easy to game it.
 
@MathieuGuindon This is cool though :)
 
it's exhausting to think of all the nefarious ways source code and IP could get abused
 
[rubberduck-vba/Rubberduck] 1707 stars vs. [decalage2/oletools] 2319 stars
 

« first day (3161 days earlier)      last day (19 days later) »