by Annili · 4y ago · 0 comments
The text-storage data structure, syntax highlighting and search features are written in Rust, and the UI is written in Swift since we wanted to create a native macOS experience. The Swift and Rust code talk to each other using C FFI, and no, that doesn’t take away the safety features of both languages.
We’re using the Rope data structure for text representation, and the tree-sitter parser for syntax highlighting and some smart features like file outline, local renaming and symbol search. All other language features are powered by LSP servers (rust-analzyer and gopls).
I’d be happy to answer any questions under this comment or anywhere else in this thread.
I guess this would be possible for the VS Code market if you could get the same features in something like Tauri where you can dramatically improve the performance and binary size. But VS Code just has so many fantastic features and extensions now, and is still improving so much every month that I don't know if this will ever happen, would take an enormous talented team to catch up, and how do you do such a thing competing against a product that's completely free.
It isn't the kind of place where acting entitled because you didn't get your free lunch makes you look good. I think it would be a bit more dignified to be thankful when something is free (as in beer or otherwise), but respect that some things aren't. For exactly the same reasons most of us are here: to make a living.
I would like to say a bit more, but basically anything of value I could add to the discussion would start a flame war, so I'll have to abstain :(
(But VSCode's search functionality is annoying! Here Zas looks lovely ... But, Mac, so, no)
Shipping native platform binaries is the only reliable way to ship high quality software. Specially in 2022 with all the garbage floating around in virtual machines and "electron" bloatware.
Electron isn't the only game in the house.
Also as a hint, before you try to re-implement 30 years of VIM bindings and end up with something where everybody misses something, there's a great C library that could be of help:
Glad to see stuff like this, it brings back memories.
> Any thoughts on how you made that decision?
The reason behind that is Zas Editor started out as a fork of Xi Editor! We're also using a fork of xi-rope, though we haven't made many changes to it.
If you would like to discuss this more, DM me at twitter @ZasEditor
[1]: https://raphlinus.github.io/xi/2020/06/27/xi-retrospective.h...
Pros:
- really fast
- clean, fresh, minimal UI
Cons:
- Maybe I did something wrong, but one thing I do almost every day is rename something. Right-click a function name (or press F2), pick a better name, done. Zas seems to only rename the occurrences in the current file vs. the declaration.
- The "Open file" suggestions are not great. If I search for a file `moo.go`, one of the first suggestions is `some/folder/moo/some/more/other.go` and then further down the list somewhere it shows `moo.go`
- CMD + click on a symbol should jump to the declaration (or usages)
EDIT: we use GoLand today. Functionality-wise it is great (also builtin TypeScript/JS support is a real plus) but it is slow and hungry.
Realistically speaking, Linux (and Rust) UI is sufficiently incoherent at this point (heh shakes head "year of the desktop" for 3 decades at this point huh) I honestly don't think anything except "here's the code" would work because of the huge amount of keeping-up (unfortunately :/) necessary at this point.
If it is to stay macOS only, also a possible decision not everything needs to be cross platform, why bring Rust into the picture?
Integrating object code into Objective C or Swift is easy, commonplace, people do it all the time.
Rust can generate object code all day, you can insist on the C ABI anywhere you need to, and then you can bring in anything from cargo you want. CocoaPods is... not cargo.
If the target is to be platform specific, then reducing the amount of compiler toolchains, IDE/editor plugins, and language knowledge required across team members is a good thing.
If the purpose is to go cross platform, then it is another matter.
Then again this is a matter of opinion, feel free to disagree, I am not here to change your mind.
In this case, they can use a fast Rust backend for multiple platforms (or just one) and then use Swift to make a nice, native front-end for MacOS and other native UI languages for other platforms if they wish.
They also know Rust so if they want to use Rust, what's the problem in using it? They don't seem to have any problem with building a UI on top, it's built and looks/works fine.
Saying all this to be helpful, not snarky or nitty. It's early days and some missing polish is to be expected on the marketing side. I absolutely love that I this exists and that there's another native choice alongside Sublime (which is decently ok for Rust), I'm super excited to see it grow and once I figure out how to upgrade my Mac Pro to OSX 11 then I'll be trying it out.
Congrats to the developer and I wish the team long success.
And auto-updater tells me that I have version 1.0 and there is a new version 1.0.0 . And if I try to update, there is an update error.
It is also a bit confusing if you buy it, because you go to download and can then decide to download for trial or purchase. If you purchase, you just get a screen with the key. But no download. It is not nessasary clear, that the trial is also the main download.
And after purchasing, there is no invoice.
It would be better to get it emailed or get some prompt to record it etc.
Did you consider using ANTLR instead of tree-sitter parser? Don't know too much about tree-sitter but is seems to be a batteries included approach to building parsers?
Can you say more about this choice?