191 points · by aerique · 13y ago · 79 comments
And I'd think that CodeMirror is the obvious thing to hook this into, for the rest of us as well.
In fact i have been an "texteditor-only" type in the past, but coding C# in Visual Studio has really been a revelation for me.
The fact that application X is "just a text editor" is not a justification for X having poor editing functions. In fact, you'd expect a specialized text editor to have better editing functions that an IDE, since an IDE can have other selling points, such as an integrated build system, a version manager, a profiler or a debugger, whereas an editor can only impress you solely by its usability for...well, editing.
Though ternjs's developer created CodeMirror, the platform would be agnostic of editor and could easily be ported to that.
Re the indiegogo campaign: I think you should consider adding an extra supporter tier between 25 USD and 1000 USD. The 200 USD tier of CoffeeScript Redux http://www.kickstarter.com/projects/michaelficarra/make-a-be... brought in over 20% of the total amount pledged.
As for CoffeeScript support -- the only major piece missing there is an error-tolerant CoffeeScript parser. Given that, one could simply run the CoffeeScript compiler over code, and analyze the output. There'd be some shuffling with source maps needed to translate source locations in the various representations of the code, but that's a solved problem. Well, and of course you might see some translation artifacts. The CS output code is semantically close to the input, but there are differences.
The closest I've seen to something that works well is IntelliJ IDEA 12, when working with ActionScript, Closure annotated JS (JsDoc'ed libraries), or by comparison, the Dart editor.
With IntelliJ 12, if you're looking at a library with enough JsDoc on functions, the type inferencing seems to be a lot more accurate. Find Usages, Go to Definition, code-assist, all seem to be more pleasurable to use.
I don't like Flash, but ActionScript3 in IntelliJ is as close to the Java/C#/et al experience you'll get with respect to accuracy of assist. Probably wouldn't hard to port this over to JSX or Typescript which have similar syntax.
Slightly related, I'm working on a feature where it distinguishes wild guesses from probably correct information by showing a different icon in the completion list.
And M-./find usages is very useful too, even when it is not perfect.
I pledged, and hope you will get enough funds together.
So when you have a function like: def foobarize(f): return f.something *2; then it will know what types f might have when foobarize is called. Now when you go back into the editor, it can give you a hint about it.
Other than that, it uses some type hints from docstrings (you can tell it type foo is YourClass and it will complete based on that) and light type guessing.
P.S. Works fine on Chromium Version 24.0.1312.56 Ubuntu 12.04 x64
I do wonder how it will compare to Eclipse Orion's JavaScript content assist which is using Esprima as parser.
http://contraptionsforprogramming.blogspot.nl/2012/02/better...
It compares very favorably. The Orion approach, as I understand it (I only did some quick messing around with scripted, am not an expert) is very local, whereas Tern tries to do whole-program analysis. This should allow it to pick up much more information.
The one exception is requirejs-style dependencies. Those, if you give Tern some information on where to look, it will resolve and automatically include. I'll do something similar for node.js-style require calls in the future.
I suppose you're not doing live type feedback? Given a test suite for the code being edited, that would seem like a natural thing to do.
Disclaimer: I liked it enough to buy a personal license :), but am not affiliated with the folks who make and sell it.
Repeated by reloading the page. Same result.
FireFox / MacOS.
[You'll need to hard-refresh to get the fixed code.]
Hopefully, that will happen. Sounds very cool though, as my IDE, sublime text, is rather underpowered in the intelligence department I'm afraid.
I could imagine it applying .tmLanguage scopes to words in the document, where you could colorize different variables according to type (I would opt for different background shades, myself). Then, mixed type colors (prompting you to click it and see what Tern says) when you can't know. Damn, that would be helpful.
> The funding goal is computed to allow me to work for three months at about half the income I make with my usual consulting work. (The other half is made up in the satisfaction of building the thing I want to build.) In addition, I'll spend some of it to engage a Vim expert to help me build the Vim plug-in in a way that fits the culture for that editor.
Definitely chipping in.
Very odd model... take your code.
Sure it might be a trust issue, and it might be better to release the code first and then ask for money, but as it looks this guy has a good reputation in the community so i dont see too much of a problem.
Either build your closed source business, or try to earn from an open source product to pay the bills.
1) What is the current state of the source code? It could be a mess.
2) The value of open source is mostly in continued developments, support, community, not just in releasing the code itself.
3) If you have this mindset, who guarantees me that tomorrow you'll write plugins that are closed and ask again for money to release?
Starting up a project with a crowd funding does not make it impossible to later fund continued maintenance by selling support and such. It is a way in which I'm safeguarding my initial investment.
In short, I still fail to see the problem.
Does it harm you in some way?
If it works, it works. If it doesn't, it doesn't. And either way, we've learned something. There's one one approach or set of approaches that are blessed and known to work 100% of the time.
I was more than happy to support it given the fine work that he's done in the past and how easy it has been to get answers from him about CodeMirror.
If this helps him produce more software or release some of what he's already written, then great. I'd rather he do this than get a more traditional job and have the fruits of his labor locked up.
But either way... what's the harm in trying a different approach? What's the harm in (potentially) giving him the opportunity to continue doing what he enjoys and does well?
If you don't want to give him that opportunity, that's fine. But there's little need to cast aspersions, right?
I think it's an excellent model. I hope it makes the target, so he doesn't have to go the closed source route with it. And I hope more people do things this way.
Even if he doesn't continue developing it (leaving it to others to do so) or if he wants to write closed source plug ins, so what? That's not what the 10k is for. If he wants to make a big enhancement to it in a year and crowd fund that, I say go for it.