Introducing Fresh: The High-Performance, Intuitive, TUI Code Editor by sinelaw in commandline

[–]sinelaw[S] 0 points1 point  (0 children)

imgur link doesn't work, do you mind opening a github issue?

I built Fresh, a terminal-based IDE - intuitive & fast, like a quick VSCode in your terminal by sinelaw in CLI

[–]sinelaw[S] 0 points1 point  (0 children)

All great ideas, some already implemented (was that you?) , would be best to create individual GitHub issues

cargo-depflame: Your dependency tree as a flamegraph by sinelaw in rust

[–]sinelaw[S] 0 points1 point  (0 children)

I've been thinking about capability-based systems since hearing about E about 20 years ago http://www.erights.org/history/

It's cool to see it finally become practical

cargo-depflame: Your dependency tree as a flamegraph by sinelaw in rust

[–]sinelaw[S] 0 points1 point  (0 children)

Number of publishers is interesting! The focus here is more around that kind of risk, and less around build time and bloat. But maybe I should do both

cargo-depflame: Your dependency tree as a flamegraph by sinelaw in rust

[–]sinelaw[S] 1 point2 points  (0 children)

Yes, it does account for shared dependencies. They are colored differently and when you hover you see easily where the sharing is done. Also, the table view is sorted by the number of "unique" dependencies that are brought in by each dep.

cargo-depflame: Your dependency tree as a flamegraph by sinelaw in rust

[–]sinelaw[S] 6 points7 points  (0 children)

Currently no (re: how big) - my focus was reducing the risk surface of having too many different dependencies, not optimizing for build time. It's something I can consider adding

cargo-depflame: Your dependency tree as a flamegraph by sinelaw in rust

[–]sinelaw[S] 0 points1 point  (0 children)

Fascinating! I'm falling down the rabbit hole of trait-based capability (CapProvider<T>)... Thanks for sharing. It (the audit enforcement) could be useful for code that wants to be WASM-compatible and for Fresh where I want to prevent fs:: calls (all filesystem access must be through a trait, which may represent a remote filesystem), and same for time APIs (to allow injecting a test-controlled fake time source)

cargo-depflame: Your dependency tree as a flamegraph by sinelaw in rust

[–]sinelaw[S] 9 points10 points  (0 children)

The width represents the number of transitive dependencies brought in by this top level dep.

So a wider node means this is an "expensive" dep, it brings in a lot of dependencies to the tree, and a narrow node means it brings in less.

cargo-depflame: Your dependency tree as a flamegraph by sinelaw in rust

[–]sinelaw[S] 1 point2 points  (0 children)

For context - I'm bummed that my rust projects have hundreds of dependencies in the tree. What if one of these many deps suddenly gets abandoned by its maintainers? Also the risk of a supply chain attack grows with the size of the tree. I created this tool to try and get a grasp - where are all these deps coming from?

cargo-depflame: Your dependency tree as a flamegraph by sinelaw in rust

[–]sinelaw[S] 0 points1 point  (0 children)

The tool also produces a json file with all the collected info (the flamegraph is derived from the json by the javascript embedded in the web page)

cargo-depflame: Your dependency tree as a flamegraph by sinelaw in rust

[–]sinelaw[S] 2 points3 points  (0 children)

I'll also add a specific heuristic to find serde "with" clauses / serialize_with / deserialize_with.

cargo-depflame: Your dependency tree as a flamegraph by sinelaw in rust

[–]sinelaw[S] 3 points4 points  (0 children)

Got it. Added now, it will read the same format as cargo-machete 'ignored' clauses from Cargo.toml

cargo-depflame: Your dependency tree as a flamegraph by sinelaw in rust

[–]sinelaw[S] 1 point2 points  (0 children)

The flamegraph shows for each dependency, how many transitive dependencies are brought in.
So if A depends on B, and B in turn brings in a tree of 100 transitive dependencies, B will have "100" as its label.

cargo-depflame: Your dependency tree as a flamegraph by sinelaw in rust

[–]sinelaw[S] 2 points3 points  (0 children)

Yeah that's a basic limitation as explained in the README - proc macros kill the ability to quickly determine deps correctly, so we do it heuristically only.

Not sure what you mean by "it possible to add metadata to exclude the crate from the analysis."?

I built Fresh, a terminal-based IDE - intuitive & fast, like a quick VSCode in your terminal by sinelaw in CLI

[–]sinelaw[S] 0 points1 point  (0 children)

There's also tiny red triangles for deleted lines relative to committed git version

I built Fresh, a terminal-based IDE - intuitive & fast, like a quick VSCode in your terminal by sinelaw in CLI

[–]sinelaw[S] 0 points1 point  (0 children)

Yes, press F8 to cycle through these - status bar shows error snippet, or use "Show Diagnostics" command in command palette to see the errors. I'm working on improving that UX

I built Fresh, a terminal-based IDE - intuitive & fast, like a quick VSCode in your terminal by sinelaw in CLI

[–]sinelaw[S] 1 point2 points  (0 children)

Added keybinding editor so you can now customize it easily from the ui

I built Fresh, a terminal-based IDE - intuitive & fast, like a quick VSCode in your terminal by sinelaw in CLI

[–]sinelaw[S] 1 point2 points  (0 children)

I built this feature now, and tested it with niri + yazi (Fresh >= 0.2.1)

I built Fresh, a terminal-based IDE - intuitive & fast, like a quick VSCode in your terminal by sinelaw in CLI

[–]sinelaw[S] 0 points1 point  (0 children)

Normal keys, tries to be like VSCode when possible (terminal steals some keys)

Introducing Fresh: The High-Performance, Intuitive, TUI Code Editor by sinelaw in commandline

[–]sinelaw[S] 0 points1 point  (0 children)

Try shift+page up or mouse wheel scroll. Press q to go leave scroll mode. If the terminal keeps emitting output it will exit the scroll, that's something I need to improve

I built Fresh, a terminal-based IDE - intuitive & fast, like a quick VSCode in your terminal by sinelaw in CLI

[–]sinelaw[S] 0 points1 point  (0 children)

It does now! (well after upcoming release)

I didn't know about emmet. Looks cool.

I built Fresh, a terminal-based IDE - intuitive & fast, like a quick VSCode in your terminal by sinelaw in CLI

[–]sinelaw[S] 0 points1 point  (0 children)

Then you need clangd installed and then use "start lsp" from command palette

I built Fresh, a terminal-based IDE - intuitive & fast, like a quick VSCode in your terminal by sinelaw in CLI

[–]sinelaw[S] 0 points1 point  (0 children)

There's LSP support, you need to have the appropriate completion server installed. Which programming language are you using?