Zed: The Next Phase
zedapp.org
zedapp.org
"Like that" being that we don't care if a file is open or closed. If I'm swapping between 2 files a lot, I will just swap buffers, but usually I just navigate straight to whatever file I need and open it. If it's already open, the buffer will come up; otherwise a buffer will be created. ido-mode makes it trivial to query files/buffers: https://www.youtube.com/watch?v=lsgPNVIMkIE
(edit: inversely, ido-mode actually saves a history of opened files so if you try to switch to a buffer of a file that isn't open, but you've opened before, it will transparently open it for you and it feels like it was never closed)
Also, same thing with file creation. I'll just navigate to the file I want to create and hit enter.
1. IMO you're using the wrong text matching algorithm for file search. This is pretty critical, considering it's the main interface for opening files.
Zed seems to search for simple text substrings only, whereas both Sublime Text 2 and Xcode look for the longest common subsequence. This is huge, for me at least; in Xcode or ST2 I can type the first few letters of one of my files, followed by a few more letters from different words in it, followed by ".cpp" and it finds the file.
Zed (as is) is completely unusable to me, because my project folder contains many similarly named files (.h, .cpp) as well as a ton of other source files from external libraries/modules with similar sub-words with what I'm searching for which for some reason always show up first and saturate the search results. With Zed there's no way to narrow down to what I'm looking for besides typing in the full name of the file. With ST2 or Xcode this is not a problem due to LCS.
2. This is not your fault necessarily, but it's a big deal to me: Text rendering is slow in Zed (and in every other web-technology-based code editor I've tried, e.g. Light Table).
For example, scrolling is even choppier than Xcode. The primary (if not sole) reason I moved away from Xcode to ST2 was because Xcode's horribly laggy UI was driving me crazy.
This is a bit of a personal rant, but we're living in an age with multi-gigaflop CPUs and multi-terraflop GPUs, yet we have somehow regressed to a point where scrolling (of all things) is laggy? IMO this is absurd, as an industry trend in general. For this reason, I generally dislike the trend to write everything (including local apps) in HTML/CSS/JS. These technologies really weren't designed to support this sort of complex dynamic UI. While it's quite impressive what's possible despite this, the stress of forcibly warping HTML/CSS/JS to accomplish some of these UI feats shows through as horrible inefficiency.
also, gl on the project
It essentially compares the number of matching two letter pairs in strings.
I used it in a C# app that did a fuzzy instant search as the user typed more letters in. On a dataset of about six thousand names it performed really well, but it was a pretty simple app. I also used a javascript version on the same list to see how it performed on an X120e netbook, and again, it was instantaneous.
No idea how the performance would compare to the methods for common substring. I like the pairs matching because I can screw up letter positioning and accidentally type a letter or two that doesn't exist in the string, but still get back strongly matching results and usually find what I want. I used it because we had a huge issue at work with people brutalizing names they entered into our employee database.
Here's an implementation I wrote in javascript: https://gist.github.com/doorhammer/3016ecaac5313a87804b
I never used it in production, and it's not optimized really at all, but it shows how straight forward a typical version can be.
It also appears that the algorithm I linked is actually the Sørensen–Dice index. They have the exact same formula on the wiki page: http://en.wikipedia.org/wiki/S%C3%B8rensen%E2%80%93Dice_coef...
Appreciate the heads up. Gave me much better terms to search for. Going to add them to the notes of my gist. I'm on vacation now, so I'll have to do more reading on it over the next few days
Also made a public gist for whoever is interested:
In ST3 for example, a space is basically treated like the regex /.*/
This means that if you type something you can only the filter results on the RHS of your input do far.
Consider: Models/player.js Controllers/player.js Views/player.js
If I type "play" then I need to hit home to filter further.
In Komodo, space is treated as a logical AND, which you can use to more effectively search the above.
I've not tried Zed yet, but if it can handle this case then that's a plus point from me.
(emacs users may be familiar with iswitchb, which can be operated in a similar manner. Entering space-separated strings in Visual Assist is equivalent to entering those same strings in iswitchb and then pressing C-SPC after each one to perform each search on the result of the previous one. This is marginally more fiddly, but the key part is being able to narrow the list down with one substring, and then add more substrings to further refine things.)
I've added a similar Visual Assist-/Komodo-style UI for finding things to a couple of programs I've worked on, basically copying exactly what Visual Assist does. The response is always positive.
I doubt the issue is simply the use of web technologies...the fact is the more powerful our computers become the more demand is placed on them. Your web browser is just one more thing running on your computer, there are a bunch of other things influencing overall performance. You could replace the entire web stack of technologies and you would probably end up in the same place performance-wise.
I envision a future where we have even faster computers but then maybe your OS would have integrated a bunch of AI that'll bring performance to a crawl :)
But anyway on current PCs any kinds of unresponsive UI-s are inexcusable.
"HTML5" has rightfully exploded in popularity. In fact, these days it's hard to justify NOT building your front on this stack. But much like any explosion of a popular technology, the developer community will tend to push the limits of what it can reasonably do. This exploration is a good thing, but it can be frustrating until people settle into best practices of what applications do and do not suit a given tech stack.
It's probably not simply the use of web technologies, but I'm quite sure it makes a difference. There's a lot of buzz about how slow Github's Atom is compared to Sublime Text, for instance. And BBEdit -- an old Mac text editor which often gets ignored these days as an unfashionable relic -- just loaded up a 24M, 181,000-line MySQL dump and is having no perceptible speed issues either scrolling the file or letting me insert new text on its first screen, even with syntax coloring enabled. The same was also true of Vim and Emacs (despite Emacs kvetching about the file's size when it loaded it).
It's my suspicion that the age of these warhorses may help them here rather than hurt them: serious editors twenty years ago required serious optimization work. While I do most of my programming in Sublime Text, there are certain times BBEdit is just the fastest tool for the job. If I was starting a new text editor, which I wouldn't, I'd be much more concerned about editing speed than it appears the developers of the current batch are.
Of course it does. Back in the day one couldn't take a megabyte file and say, "I'll just load it all into memory." When I worked in Visual Studio, it annoyed me to no end that VS had trouble loading large text files when ancient FoxPro (another MSFT dev product whose origins are from the 80s) would load them just fine. FoxPro didn't try to cram the whole thing in memory, just the parts it needed. I'm guessing vim and Emacs work in a similar manner. Don't use VS anymore, so I don't know if they ever fixed that or not. Particularly annoying is that it ever needed to be fixed, rather than being designed correctly (for which there was plenty of prior art) from the start.
Yes, but with the caveat that it's line based (1 dimensional) not 2 dimensional so a VERY long line can still choke vim and Emacs.
--- long time primary Emacs, secondary vim user
Have an upvote because (to quote Johnny Carson) I did not know that.
Re: FoxPro vs. VS, it's probably quite unfair to suggest that it's in part because FoxPro didn't start its life at Microsoft, but I admit it was the first thing that came to mind...
I say this as a long-time vim/emacs user... (yes, I've learned and use both although I primarily use vim).
So while I'll readily agree that I doubt they work as much at optimisation, they're also being asked to do significantly more.
I'm just trying to point out that attempting to compare applications from a certain period in computer history to modern applications is doomed to fail.
While I certainly believe optimisation work would help some modern editors, it would be silly to attempt to blame that all on optimisation work instead of recognising that the world is different now.
Running a profiler would seem to suggest otherwise.
=Slow. Not slow enough to be unuseable. But slow enough to drive you crazy after working with it for a day. And perhaps 30% reduction in laptop battery life, because of increased power requirements.
I moved to Sublime Text. Millions of us did. It provided both fantastic usability and rocket-fast speed. That's the baseline. Any new editor needs to at least have BOTH those features!
I used to think of this when I saw UI developed in C++ (instead of pure assembler. Jesus, they would just multiply with a scan width instead of shifting!). I thought it when I switched to Windows (they're running everything through a giant abstraction layer here! That will never perform!). And yes, I find myself thinking this again now that the final bits of software seem to be moving into the browser. But this time, I'm going to assume that I'm probably wrong :-)
I don't care how many abstraction layers, VMs, and scripting languages you do or don't use. I care that my UI doesn't lag or have choppy scroll animations, and that the battery doesn't drain 2x faster than expected.
Yeah, eventually these problems will likely disappear with more powerful hardware. But we're not the yet, and a good engineer realizes hardware limitations and designs software appropriately to achieve a great user experience.
I was showing a junior some plpgsql yesterday and he asked me what languages use BEGIN, END etc. So I pointed him to Pascal and ended up myself on wikipedia where I (re)found the above quote.
One of the points people normally make for HTML/JS/CSS is that the browser is sandboxed and there is already a well defined standard on how to serve dynamic content to a browser, across ALL platforms.
This might change with all platforms moving to a package manager or walled garden, and we then might start to see some "native" code again. But even the new platforms op-in for web tech like Metro etc.
But meh I'm rambling again so I will leave who ever will read this comment with a link to vsftpd[2] security section because I liked the idea of sandboxing a application with chroot and with that you can start to build a "Secure" native app.
[1]: https://en.wikipedia.org/wiki/Wirth%27s_law [2]: https://security.appspot.com/vsftpd.html#security
But does this happen with Zed? For me it works well even on old pentium4 desktop.
If you released it under the GPL, then they would not legally be allowed to make a proprietary version and start selling it. Also, the GPL does not prevent you from selling your software: https://www.gnu.org/philosophy/selling.html
Although I don't think he should go GPL, he should at least know about the license differences.
That said, having the legal right to something, and being able to enforce it, isn't the same thing (just ask Adobe).
(On a more serious note, while I'm not a supporter of the draconian DRM schemes that have been enacted into law -- and while the studios make completely ridiculous claims for damages -- implying that films aren't being copied in a way that conflicts with their licensing terms is clearly wrong)
I believe code editor to be called one must be designed to work with the code and provide standard facilities to manipulate upon it. The rest is for particular language support module that'd recognize semantics and do the transformations.
For example, the very core must have option to bind language module-provided semantics data to text fragments, so, say, highlighter (a proper one, not a TextMate-like mess of regexps) would base its work upon knowing not only "syntax regexp says this is a variable" but "semantic analyzer says this is a variable `foo`, and it's also used here and there, too (but not there, it's another scope), if that matters", while remaining generic.
(Edited: minor re-formatting)
I.e., not "well, it's text and core has no idea what it is but plugins are free to do anything with that", but "well, core has no idea what that 'typeclass' thingy code analyzer says it is, but it's happy to keep track of it and provide standard interfaces to use this info so maybe highlighter or code folding parts would figure out how to use that information"
Then you could start with regexp mess-based parser that provides very basic understanding of the code and replace it with something that gives better code insight at later time, without rewriting the rest. And have generic refactoring module that can operate on many languages just by knowing about names and their possible scopes (whatever scoping type language is, in common cases I believe that still could be reduced to "in this text region").
I've heard LightTable is doing something like this, but never had a time to properly evaluate it and see for myself.
Also, JetBrains' IDEs (IntelliJ IDEA, PyCharm, etc.) are notorious to have good understanding of code semantics, both out of the box and through plugin system.
Most of us right now are probably writing code in "notepad clones" by your standards. I'm sure there is room for one more.
That being said, while reading the "Why Zed?" page[1] I kept thinking "emacs can already do that" all the way.
Well at least kudos for going open source, I wouldn't even consider investing time learning to use a closed source text editor, it's too important a tool to depend on the whims of the devs.
That being said, while reading the "Why Zed?" page[1] I kept thinking "emacs can already do that" all the way.
IMHO people who think "emacs can already do that" will think that regardless of what the topic being discussed is."Oh here ... I have made a plane that flies"
"emacs can already do that"
classic.
On the other hand the features described in the page I linked are mostly already built into emacs, at most you need to flip a couple customization switches to get the same idea.
Basically: remove the toolbars, enable ido-mode, use tramp for remote editing. The splitting thing is built in although you'll need to redefine a couple functions to get the exact behaviour shown in the gif (nothing very fancy though).
Just a few things you get cheaply when your IDE is semantic aware: - Complex refactorings with a single keystroke - Context aware code completion - Instant feedback on potential compilation errors/type errors
You can sort of hack these things into something not semantic aware, but it's not quite the same thing.
(setq scroll-margin 0
scroll-conservatively 100000
scroll-preserve-screen-position 1)
(setq mouse-wheel-scroll-amount '(3 ((shift) . 1))) ;; one line at a time
(setq mouse-wheel-progressive-speed nil) ;; don't accelerate scrolling
(setq mouse-wheel-follow-mouse 't)
;; scroll window under mouse
(setq scroll-step 1)
I dislike accelerated scrolling and use searches or registers for moving in big files, so this works quite nicely for me.While I use Emacs for all my editing, this would have been cool to have.
Sorry if I missed this from the post, but is there any particular reason why Zed is tied to Chrome? Are there any technical benefits?
P.S. I am asking because I am currently involved in a project of similar type - a web based GUI for databases (MySQL, Postgres, MSSQL, Oracle) - Datazenit[0], but we decided against shipping it as a packaged Chrome app, because it would narrow potential user base.
[0] - http://datazenit.com/
P.P.S. Just to let you know - link to your twitter account is broken (https://twitter.com/zed_editor).
* Cross platform: Zed runs on any platforms that desktop Chrome runs on (including Chromebooks)
* Installation is easy with just a few clicks
* Upgrades are automatic
* Settings are automatically synchronized between all computers logged into with the same Google account.
* Special “Notes” space is stored in Google Drive and synchronized between computers automatically as well.
Link - http://zedapp.org/
It's very similar to Vim, with proper defaults and JavaScript as approachable language compared to vimscript.
I believe the most innovative thing Zed introduces is hackability. Configuration is basically just another project inside the editor.
Other cool features/defaults are presented on http://zedapp.org/features/
Who are you? What drives you? Tell us a bit about yourself on your website. I think it will help with income.
1. Donations.
2. "Open core" or "freemium" model.
3. Paid books/lectures about it.
4. Get hired as a consultant to teach, trouble-shoot, and/or customize.
5. Get hired as an employee to work more on it or something else.
However other than 1, none truly consist of getting paid for the open source per se. Which maybe works out OK, anyway.
To clarify, this is not a rhetorical question where I'm trying to slag on open source. I'm already doing a number of open source projects, and enjoy it. I'm genuinely interested, if I wanted to support myself doing open source, realistically what are the options? And I genuinely don't fully understand how.
What XChat does is charge for the official Windows binary[1] while being open source. I think something like this would be a good option for Zed.
You love our app, but want an MSI installer so you can deploy it on your network more easily? You can roll your own by checking out our source code here... or you can pay us $X for this already-made-and-thoroughly-tested installer.
You love our app, but want to learn more about how it works? You can browse this repository of 15,000 Doxygen-generated API pages... or you can pay us $Y for this beautiful book that explains everything in plain English.
You love our app, but want someone who can support it if something goes wrong? You can spend ten years turning someone on your staff into an expert on it... or you can pay us $Z for this support contract, and get access to our experts.
This approach can feel counter-intuitive to geeks, because we value functionality more than convenience, so it feels "wrong" to charge for the things we see as needless frills. But in general, people put a lot of value on convenience, and they are more than willing to pay for it if you're willing to provide it.
Sometimes people try the opposite approach -- charging for functionality. (i.e. "Try the open source edition of our app, or pay $X for the Premium Edition and get custom fields!") This rarely works.
I can either enter a Project or a URL to edit. Typing text in either place does nothing interesting. "Enter" does nothing.
Clicking around, I can't find any way to make a new window. All I want to do is see your editor and start playing with it. I don't even really want to edit a file yet. No obvious way to make any of that happen.
The first window is too small. The note about how to edit remotely requires scrolling, but it isn't obvious that the page needs to be scrolled.
It's popular to claim that the web is near native performance, but honestly, it's a load of horseshit. Web performance is better than it's ever been but it still has a long way to go before it's anywhere near native.
But on what kind of computer did you test this? On my windows desktop it is as fast as sublime. On mac scrolling isn't smooth, but from chrome timeline i see that it is choppy because it doesn't handle scroll events correctly, not because of performance.
I'll be hesitant about the productivity pitch though...a lot of developers don't truly care about productivity in the way that one would expect. Often what opinionated developers want is something that conforms to their opinions, productivity just becomes a convenient excuse for the choice of a particular tool.
At least as someone who's spent a lot of time pitching productivity to developers I have become skeptical that developers value it as much as one would ordinarily expect. I am the developer of HiveMind (crudzilla.com), a web app platform that literally allows you to get a whole bunch of things done with writing little to no code. I find this pitch simply doesn't fly with a lot of developers :)
The open source pitch for instance is something I am sure will get you some followers, though how big a following is not certain.
Welcome aboard the entrepreneurial train!
A lot of developers are also mature enough not to think that the choice of the developing environment matters (above a reasonable base level, of course).
All serious environments are configurable and programmable. It's a plain matter of taste what you use.
However productivity to me means something very simple, how quickly can you go from "I want x" to having a functional x.
The more a tool is helpful in this regard the more productive it makes me.
Maybe someone should start a service that actually measures various dev products in terms of how quickly they allow you to complete various dev tasks.
For instance most web apps are just CRUD apps, it should be possible to benchmark various frameworks/tool to see how quickly they facilitate development....it should make for an exciting exercise :)
1) Chrome extension (I understand the stand-alone application is coming)
2) Vim-style modality missing (exact keybinding replication is not necessary, just the principle of remaining on the home row)
3) Excess editor chrome - the top of the editor takes up 2 lines when it could be compacted to 1
But I don't care how good your app is; if you didn't write documentation then you're just not done. And don't go giving me that adage "its open source! contribute the docs yourself." The fact is, its YOUR project that YOU wrote and it is simply incomplete with little/poor documentation.
So, to the Zed author: before adding anymore features please take some time and write good quality docs. The community will thank you.
For funding: how hard would it be to create a "shared hire" subscription model where participants get a vote into what the author is doing ?
Can I digress into a feature suggestion? This is no small one and I don't really know where it lies on a feasibility scale. One thing I'd really like would be the ability to turn whatever text-box I'm writing in into a frame of my current editor (I currently use edit-with-emacs). I looked into writing a chrome-extension (which is the only way I can think of to accomplish it) with ACE editor to do this but I didn't have enough time.
My thoughts are, since you use a web based editor, you can use javascript to replace the input box with a resized frame of your editor, the next requirement is importing your personal user settings from your chrome packaged app into the frame to have it working there (I currently don't know how you'd accomplish this, maybe some integration with google drive which you already have for your notes?).
The main reason I think this would be a useful feature is vim keybindings, I use them for everything and feel less productive editing text without them. Being able to integrate the IDE that I use and am used to into every text box ubiquitously on the web seems like a huge win to me.
Sorry about the digression, it's just I liked the sound of your application and wanted to share the one thing I've been missing online (which is a web-based editor where it's extensible, and can be used on any site, I do realise that there is a big gap between your project and my feature suggestion, just wanted to make it.)
- I simply cannot resize the windows on a Mac using the Accessibility API (I'm using Moom to tile my windows via keyboard bindings, and Zed is invisible to it) - Needs a few more docs on how to set up a theme (I tried three times before I managed to set Solarized on) - As much as it may seem counter its philosophy, I need vim bindings :)
And yes, it's a tad slow. So is LightTable, which is why I am still using vim inside a terminal...
I'm super excited for you! Passion & Dedication! Bravo
As to the app, my recommendation is to avoid putting .zedstate files inside the project directories themselves. Instead, keep them in a ~/.zed/ directory. Keeps folks from having to make special .gitignore commits for all of their projects.
Might want to check it out, I got a bit red alert before I could visit the page.
It's really interesting to try all these new, modern editors and see the subtle tradeoffs the creators made.
So why not release the source code under GPL or even MPL or EPL?
Nice job all around. Will check it out
Sorry: this is not the kind of OSS that I want to support. Best of luck, though.
> The stand-alone version will be built on top of node-webkit and be available for Mac, Windows and Linux. Once the initial work there is done, both version should continue working from the same code base, so I should be able to support two versions (Chrome App and standalone) without much effort.