The Lounge is rated Safe For Work. If you're about to post something inappropriate for a shared office environment, then don't post it. No ads, no abuse, and no programming questions. Trolling, (political, climate, religious or whatever) will result in your account being removed.
If it works and meets performance and -ility expectations I wouldn't worry about it. It's always nice to find novel approaches that make the code smaller, cleaner, and/or faster but you could spend months on a solution that might not even exist and might mean absolutely nothing to anyone but yourself. That's time you could have poured into another project
Disclaimer: This advice is a little hypocritical as I have to actively stop myself from doing the same thing.
Unfortunately I have no idea what is acceptable because this is a tool for other people to use, not for a specific project or client.
It has competition though so anything smaller and/or faster is going to be "better", ie more desirable.
So there's that.
I have my own concerns about using this parser i generated because my CodeDomGoKit.brick.cs file is already over 500K and that's with a parser that's hand written and under 100K. Not 934K or whatever it was!
It's not a show stopper, but it's almost embarrassing for me to have build tools that are 1MB executables.
If competing with products in the market is the goal I can see the problem. Usually I try to stick to my original requirements/goals to avoid the endless cycle of "I could probably make this better" but that doesn't seem to be an option here with active competition.
Considering that, my only input would be that generated code will never be as efficient as hand-rolled. I'm running into a similar issue with a project that generates a full type-tree constructor for a given type given the data to "fill" that type tree. There are always going to be edge cases that exist in the general problem space which prevent some optimizations. You can't solve a general problem as efficiently as a specific problem.
Best of luck though! I only understand a fraction of what you post but it sounds like a really cool project
Something like that, yea. I'm creating a delegate for a type that constructs it and all of it's dependencies. I'm trying to write the data input/"parser" layer very generically so it can support a lot of cases, but the original idea related to parsing would be something like:
In this example you want to create the object based on (state, streetAddress)+ (i.e. one or more times), firstName, and lastName from the data.
You can add metadata to the items of interest, supply "parsers" for various members (based on whatever condition you want - type, member, or ID), and it uses the data to then create (possibly many) Users based on that data. Removes the need for boilerplate related to loading a domain object with parsing results or whatever your data source is (another object, database, etc). So instead of writing something like:
MatchCollection results = regex.Matches(/* some input*/);
User u = new User(results["firstName"], results["LN"]);
//this also only deals with a single address
Address a = new Address(results["street"], results["state"]);
ObjectGenerator g = new ObjectGenerator<User>().AddParser(regex);
ObjectGenerator g = new ObjectGenerator(typeof(User)).AddParser(regex);
User user = g.GenerateObject(/* some input*/);
User users = g.GenerateObjects(/* some input*/);
Not a finalized interface but that's the jist of it.
Very cool. I've been wanting to do something like that for a long time myself - a way to "bind" grammar constructs from say, an XBNF document to fields/properties in object models via metadata but i haven't found an expressive enough way to do it that isn't more work than just manually coding it. The upshot of doing that would be to get your parsed stuff directly into your final objects.
The upshot of doing that would be to get your parsed stuff directly into your final objects.
That's the goal! You nailed the main issue - that for simple single-use cases it's more work to do this than to just write the code manually. I'm attempting to make it expressive (and fast) enough to justify using with complex objects and/or multiple data source formats (XML, JSON, CSV, etc into the same object tree).
Since you seem to be the resident parsing expert, do you have any "must read" suggestions? I admittedly only know the basics but I've been interested in parsing for quite awhile since regular expressions in Perl were my introduction to programming. I got "Programming Perl" (a book I still own) as a gift over 18 years ago and after learning the basics of Perl, regular expressions were what cultivated my interest in programming.
I did a major hardware upgrade yesterday (motherboard, cpu , ram, gpu ... )
I tried re-activating but alas, it does not work (or I would not be asking).
On my device page it shows 2 devices, my old one and my current one (by motherboard model); I tought I could find the info on the old device and deactivate it (delete device) and apply it on the new device
Is there a way to get back my activation code/key from there ? I can't seem to find it.
I remember that I upgraded from Windows 8-ish when it was a free update; maybe I should hunt down my old CD/DVD of windows 8 ? Is that the way to go ?
When my son and I built his new PC last month we bought an upgrade license -- the old system was running Win 10 Home, we installed Win 10 Pro.
We replaced nearly everything -- kept only the CPU and an HDD -- and the install didn't want to accept the licence, so I eventually had to talk with a real live person at Microsoft who was able to do something with the kid's Microsoft account then zing bang it be worked.
I do computer service. I avoid hardware swaps with win 10 for this reason but had to do it for myself I forget if I actually called ms or whether it was over chat but the ran belarc advisor which served up some windows 10 data left for a bit then came back and plugged something else in and it was activated again.
Piebald is right - contact MS. Have electronic receipts handy and let them dive in and take over if necessary.
I had to do that when I changed MB, and it worked really well - the only complication was that his control software could only see my centre screen (of three) and the taskbar, start menu, etc. was on the left hand one - and wouldn't move because windows wasn't activated ... so he had to ask for an app, I open it and drag it onto the centre screen, etc. Took him a load longer than he expected, I think ...
"I have no idea what I did, but I'm taking full credit for it." - ThisOldTony
AntiTwitter: @DalekDave is now a follower!
Last Visit: 29-May-20 9:40 Last Update: 29-May-20 9:40