You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The initial idea is basically a console version of Out-GridView combined with less, then I let myself get sidetracked into the formatting subsystem.
So for I have a prototype of a new way of specifying formatting that:
uses no xml (so faster startup/module loading)
uses attributes, so can be specified inline with the type to be formatted
or can, via proxy, specify formatting on another type
use code gen with dynamic sites so it's extremely fast
What I probably need the most to continue is some external motivation and some dedicated time. I have other projects I've started - a PowerShell profiler and a PowerShell script formatter, so clearly I have a problem starting projects but not finding time to move them along.
One thought I had on external motivation was to start a charity fundraiser - I'd commit to a project if the charity gets funded. I haven't worked out the charity or the funding target though.
Reacted by Keith Hill, Xiang ZHU, Patrick Meinecke, Rob Holt, Rain Sallow (/u/ta11ow) and Thomas Nieto
Reacted by Keith Hill, Xiang ZHU, Patrick Meinecke and Rob Holt
Thanks! I can not help with external motivation but I could help with the progress of these projects.
for PSMore we could continue in the PowerShell repo step by step replacing existing code.
for PowerShell script formatter we could start adding Trivia like Roslyn. Maybe RFC is right start.
for PowerShell profiler I don't know what we can do to help the project, perhaps add an API to measure script blocks that can be useful for performance dev test too. /cc Dongbo Wang (@daxian-dbw)
Trivia might make a formatter simpler to implement, but it isn't necessary. The full trivia can be synthesized from the tokens and ast. I have implemented what I think is critical to the formatter - a tree comparer so you can check the formatting won't change the semantics.
As for formatting - I'm not keen on the step by step replacement which is why I started a standalone project. At some point it will make sense to replace existing code, but that's a tricky work that isn't much fun - I speak from experience. Rewarding when it's done, but it takes motivation.
And profiling - I should talk with Dongbo Wang (@daxian-dbw) - he might be interested to pick it up.
Trivia might make a formatter simpler to implement
I think this is enough to do it. In addition, it will not only simplify but also add more features and flexibility.
If Steve Lee (@SteveL-MSFT) approves I could start RFC for trivia.
As for formatting - I'm not keen on the step by step replacement which is why I started a standalone project.
Do you want to keep this project as personal or maybe make it public like PowerShell/NextEFS?
And profiling
The same question - will the project MSFT internal or public like PowerShell/Profiler?
I think this is enough to do it. In addition, it will not only simplify but also add more features and flexibility.
If Steve Lee (@SteveL-MSFT) approves I could start RFC for trivia.
Retrofitting trivia would be, well, very non-trivial, both from a design point of view and a performance point of view. If we are talking about a new standalone parser based on the current parser, then I'd have fewer concerns, but I'm not convinced of the benefits.
Do you want to keep this project as personal or maybe make it public like PowerShell/NextEFS?
We'll see how it goes, eventually it probably makes sense to pull into the core.
The same question - will the project MSFT internal or public like PowerShell/Profiler?
Parts of profiling require changes to PowerShell Core, other parts can be external tools (no reason for MSFT internal) that might not even need any PowerShell dependencies. I pushed my wip here - the instrumentation is probably complete for in-process profiling, but there's plenty of remaining work - analyzing the profile data and support for out-of-process profiling.
Activity
lzybkr commentedon Sep 25, 2018
Status - no progress since the last commit.
The initial idea is basically a console version of
Out-GridViewcombined withless, then I let myself get sidetracked into the formatting subsystem.So for I have a prototype of a new way of specifying formatting that:
What I probably need the most to continue is some external motivation and some dedicated time. I have other projects I've started - a PowerShell profiler and a PowerShell script formatter, so clearly I have a problem starting projects but not finding time to move them along.
One thought I had on external motivation was to start a charity fundraiser - I'd commit to a project if the charity gets funded. I haven't worked out the charity or the funding target though.
iSazonov commentedon Oct 1, 2018
Thanks! I can not help with external motivation but I could help with the progress of these projects.
lzybkr commentedon Oct 1, 2018
Trivia might make a formatter simpler to implement, but it isn't necessary. The full trivia can be synthesized from the tokens and ast. I have implemented what I think is critical to the formatter - a tree comparer so you can check the formatting won't change the semantics.
As for formatting - I'm not keen on the step by step replacement which is why I started a standalone project. At some point it will make sense to replace existing code, but that's a tricky work that isn't much fun - I speak from experience. Rewarding when it's done, but it takes motivation.
And profiling - I should talk with Dongbo Wang (@daxian-dbw) - he might be interested to pick it up.
daxian-dbw commentedon Oct 1, 2018
Jason Shirk (@lzybkr) I'd love to pick up the profiler work. Will sync with you offline on it.
iSazonov commentedon Oct 2, 2018
I think this is enough to do it. In addition, it will not only simplify but also add more features and flexibility.
If Steve Lee (@SteveL-MSFT) approves I could start RFC for trivia.
Do you want to keep this project as personal or maybe make it public like PowerShell/NextEFS?
The same question - will the project MSFT internal or public like PowerShell/Profiler?
lzybkr commentedon Oct 2, 2018
Retrofitting trivia would be, well, very non-trivial, both from a design point of view and a performance point of view. If we are talking about a new standalone parser based on the current parser, then I'd have fewer concerns, but I'm not convinced of the benefits.
We'll see how it goes, eventually it probably makes sense to pull into the core.
Parts of profiling require changes to PowerShell Core, other parts can be external tools (no reason for MSFT internal) that might not even need any PowerShell dependencies. I pushed my wip here - the instrumentation is probably complete for in-process profiling, but there's plenty of remaining work - analyzing the profile data and support for out-of-process profiling.
SteveL-MSFT commentedon Oct 3, 2018
Ilya (@iSazonov) I don't see any reason not to author a RFC for trivia support
iSazonov commentedon Nov 11, 2018
Related comment from Jason
#4347 (comment)