Live data from Hacker News

Show HN: Fresh – A new terminal editor built in Rust

sinelaw.github.io

141–150 of 158 posts

Re: Show HN: Fresh – A new terminal editor built in Rust

#141
post #106
post #98

Earlier quoted context omitted.

npm is certainly not something everyone has.

Not everyone it's a web developer. Sysadmin and system programmers (and older millenials) don't care and don't want to install anything related to NPM.

I am certainly one of the cane-waving "older millenials".

Re: Show HN: Fresh – A new terminal editor built in Rust

#142
post #20

Earlier quoted context omitted.

Thing is… who is regularly running `npm update` or `cargo update` to keep local software up to date? I wouldn’t, because I might be in a repo and it starts upgrading all my local dependencies, and I’m not gonna add a text editor as a dev dependency. I’ll happily take the binary, or a tar.gz with the binary in it, though. (Btw I love how it’s following the old DOS aesthetic)

The npm distribution here is just the binary, you run npm install again and it upgrades to the latest binary. That's convenient

https://github.com/mitsuhiko/self-replace

Re: Show HN: Fresh – A new terminal editor built in Rust

#143
post #78

Dear Santa, this year I don’t need gadgets - all I want is a Borland Turbo Vision–style console text editor with windows, tabs, and syntax highlighting. I promise to be good and keep my code compiling.

How 'bout the editor that ships with Lazarus?

Isn't that just Scintilla-based? It's a bit outdated these days, e.g. missing LSP support.

Re: Show HN: Fresh – A new terminal editor built in Rust

#144

How complete is the LSP feature support? Could we also get support for tree-sitter parsers and DAP (Debug Adapter Protocol) for an integrated debugging experience, just like the old Turbo and "Quick" text-mode IDEs?

LSP is working but requires polish. Go to definition, completion suggestions, inlay type hints and symbol highlighting are all working (probably not as pretty as they should) Tree-sitter is supported and used internally for a subset of languages for syntax highlighting (other languages use textmate grammars). What exactly do you mean by support for tree-sitter parsers? I wasn't aware of Debug Adapter Protocol! I'll t…

You may want to take a look at Lapce too https://lap.dev/lapce (a Rust-native graphical editor that seems to be aiming for rough feature parity with VsCode) for a better overall view of what seems to be missing still wrt. both LSP support and overall UX. For example, it does not seem that support for showing "Code Lenses" is included in Fresh, so there is e.g. no Run or Debug option when hovering the pointer or cursor on the program main function or the like; also I didn't find a way of bringing up LSP-sourced documentation on an identifier (this should probably be bound to F1, just like the old Turbo or Qbasic).

It's a great start of course, but even just documenting anything that's clearly still missing would be helpful.

Re: Show HN: Fresh – A new terminal editor built in Rust

#145

Interesting license choice, would why did you choose version 2 instead of 3?

Honestly it reflects on my, uh, experience - I still think of GPLv3 as a "new" license. I don't have a particular reason. Maybe I should switch.

I'd strongly encourage MIT/Apache2 over GPL, unless you believe that you're writing something that has a real likelihood to to be monetized and want to specifically prevent that problem.

A very real example of that is that Ratatui (MIT license) and Codex (Apache2). I feel comfortable reading and using code and ideas from either side and have them influence the design of the other side [1][2]. I don't feel comfortable in the same way reading any GPL licensed code (2 or 3) due to the inherent legal risk that entails.

Your personal views on software freedoms definitely trump my personal opinion as a developer here, so I'm not too stressed if you disagree with this. A solid amount of crates in the rust ecosystem are MIT or Apache 2 (or both), and I really encourage authors of new libs, apps, to choose the same licenses for giving back in the same spirit.

[1]: https://github.com/openai/codex/blob/main/codex-rs/tui/src/c...

[2]: https://github.com/ratatui/ratatui/pull/2241

Re: Show HN: Fresh – A new terminal editor built in Rust

#147
post #98

Earlier quoted context omitted.

I get the frustration, but I think the npm option actually makes sense here. A lot of users who’d benefit from a fast Rust tool aren’t Rust developers and won’t have Cargo installed. Shipping it through npm lowers the barrier while still giving everyone the performance benefits. It’s not a knock on Cargo, just a way to make the tool more accessible.

npm is certainly not something everyone has.

It is something some of us avoid.

Re: Show HN: Fresh – A new terminal editor built in Rust

#148
post #78

Dear Santa, this year I don’t need gadgets - all I want is a Borland Turbo Vision–style console text editor with windows, tabs, and syntax highlighting. I promise to be good and keep my code compiling.

In that case, that editor better have a debugger as easy to use as the one in Turbo Pascal and Turbo C++.

Thanks Santa.

Re: Show HN: Fresh – A new terminal editor built in Rust

#149
post #146

If you are doing TUI, you can't miss Kakoune and Helix as popular editors. Add them to your comparison benchmarks.

Kakoune and helix are modal editors. They're largely based on a text selection mode (like the `v` and `V` commands in vim) with commands acting on the selected text, so they're somewhat more intuitive than vi or vim, but the notion of distinct 'modes' is still key to the workflow. Fresh is a mode-free editor; much like nano, Emacs or the new Rust-based MS Edit.

Re: Show HN: Fresh – A new terminal editor built in Rust

#150
post #103

Earlier quoted context omitted.

Can't it be packaged as a binary/whatever that would install without either cargo or npm?

You can use: cargo install fresh-editor Or you can use npm Or you can download release binary packages from Github releases. The problem is which option to make more prominent / first

Okay, in my case I like the binary from GitHub, and it's also more likely to end up in Homebrew.
Post reply on HN