Live data from Hacker News

Tern – Intelligent JavaScript editing

ternjs.net

61–70 of 82 posts

Re: Tern – Intelligent JavaScript editing

#61
post #60

This is really great work. I'd love to see it for VIM.

Looks like VIM is one of his first priorities. From the indiegogo page:

> 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.

Re: Tern – Intelligent JavaScript editing

#62

I find most of these attempts to code-completion in JS to be annoying, like bad speech recognition, if the accuracy is poor, it becomes frustrating. Not to knock their attempt, but I find that if codeassist isn't like 98% accurate, it often becomes more work to step through all of the wrong entries and not find what I want, then to just type it out. The closest I've seen to something that works well is IntelliJ IDEA…

I disagree, I believe TypeScript/VisualStudio provides a closer experience than AS/IntelliJ. The inference and refactoring work quite well. And they are in their infancy, generics are coming very soon.

Can you give an example of where AS/IJ fail and TS/VS succeeds? IntelliJ's started supporting TS recently and will likely improve. Their whole brand is multilanguage support and they support more languages than any other IDEA. For example, WebStorm 6 added TypeScript, CoffeeScript, and Dart.

Re: Tern – Intelligent JavaScript editing

#63

To be clear the author of this IS the author of code mirror! That should be in large bold letters on that first page (it is on the crowd sourcing page). My first thought was "really? this is just code mirror with added cleverness, sort of lame to profit from it" - totally different story when it's the author adding value to something he has already contributed to the community. In that case this is the "premium" plan…

That "added cleverness" is a big story in itself. Linking it with an editor is trivial. If you never tried to do static analysis on a dynamic language like JS you can't really appreciate just how smart Tern is (or wants to be).

Re: Tern – Intelligent JavaScript editing

#64
post #49
post #26

Earlier quoted context omitted.

I know. I was blown away by VS when I was researching what others were doing in this space. Their approach is also very clever -- there's an interesting talk about it at http://channel9.msdn.com/Events/TechEd/NorthAmerica/2012/DEV...

Care to mention what you found clever in their approach?

They basically run the scripts, instrumenting their Chakra JS engine to automatically abort overlong loops and overdeep recursion, and preventing all side effects outside of the DOM/JS runtime. And then use the actual types that occur in this run to do the completion. Plus, I guess, some added tricks that the talk doesn't go into, but which are necessary to make sure execution actually reaches the part of the program where you are trying to complete something.

Re: Tern – Intelligent JavaScript editing

#65
post #64
post #49

Earlier quoted context omitted.

Care to mention what you found clever in their approach?

They basically run the scripts, instrumenting their Chakra JS engine to automatically abort overlong loops and overdeep recursion, and preventing all side effects outside of the DOM/JS runtime. And then use the actual types that occur in this run to do the completion. Plus, I guess, some added tricks that the talk doesn't go into, but which are necessary to make sure execution actually reaches the part of the program…

Does it ever get the types wrong? Just curious, I assume one wouldn't want to see the kind of code where VS gets the types wrong.

Re: Tern – Intelligent JavaScript editing

#66
post #32
post #30

Earlier quoted context omitted.

Interesting. Their 200 dollar tier is basically my 'all backers' tier (name in a readme file). But I can probably come up with something slightly more valuable to offer at ~250€. 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 m…

a signed copy of your book? :}

I don't know Marijn's hourly rate, but perhaps one or two hours face-to-face on Skype?

Re: Tern – Intelligent JavaScript editing

#67
post #59

To be clear the author of this IS the author of code mirror! That should be in large bold letters on that first page (it is on the crowd sourcing page). My first thought was "really? this is just code mirror with added cleverness, sort of lame to profit from it" - totally different story when it's the author adding value to something he has already contributed to the community. In that case this is the "premium" plan…

Note that Tern's core is editor-independent. I made the demo on top of CodeMirror, obviously, since I know it very well. But the meat of this project does not have anything to with the editor that's used to interact with it.

Still, I wouldn't be shy about the fact that you did CodeMirror. It makes a huge difference to me....you are a known quantity and convinces me that this is a solid project.

And I'd think that CodeMirror is the obvious thing to hook this into, for the rest of us as well.

Re: Tern – Intelligent JavaScript editing

#68
post #36
post #35

Earlier quoted context omitted.

What do you mean?

I mean that from my point of view "gimme money if you want that open sourced" is very bad approach. 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 mind…

So don't donate. I think its awesome that he's doing it, and the fact that he did CodeMirror open source should count for something.

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.

Re: Tern – Intelligent JavaScript editing

#69
post #48
post #47

Earlier quoted context omitted.

The point is, this is not a model at all IMHO, since a model requires the ability to work in the long run. So you know wrote code for 1 month, and you want to be crowdsourced. Ok, what's the plan for the continued development of the project? Code as it is is worth zero without bugfixes, evolution, and a community.

A) I have written some software B) I'm debating whether to take the OSS or commercial route, since I do need money to live C) I have a reputation for maintaining software in a serious way So I'm asking people "If this is worth 10k to you, let's go the open-source route". So far, it looks as if it is worth that to people. Unless I'll turn around and act like a complete bandit, destroying my reputation, the model works…

I am puzzled by his hostility too. I hope you or others following your model don't worry too much about it. I'm chipping in.

I wish you luck in meeting the goal (it looks likely you will) and look forward to using what you've produced. I love CodeMirror, btw.

Re: Tern – Intelligent JavaScript editing

#70
post #48

Earlier quoted context omitted.

A) I have written some software B) I'm debating whether to take the OSS or commercial route, since I do need money to live C) I have a reputation for maintaining software in a serious way So I'm asking people "If this is worth 10k to you, let's go the open-source route". So far, it looks as if it is worth that to people. Unless I'll turn around and act like a complete bandit, destroying my reputation, the model works…

I agree with antirez point of vue. To write a software is one thing, you can be crowd funded for that, no problem. What Antirez is saying, as far as I understand it, is that your software is not valuable if you don't have a sustainable model in the long run. You'll still have to pay your bill the day the software will be released open source. In that perspective, crowd funding might not be a solution. So in the end,…

I think both have valid points, but in such a way that Marijn is right.

I did start cool open source projects without crowd-funding. It happened at certain points in my life when I didn't really need extra-money (or when I had sufficient free time — essentially the same thing). It is possible.

Today? I'm not sure I could start anything substantial today without funding. My life is not the same as it was 3 years ago. Things change, and somehow paying the bills gradually becomes harder each day than it was the day before—I don't know why life has to suck this way, but so it happens.

There's quite a narrow frame in everyone's life when one can start major free projects without any income — and I'm probably approaching the end of it. Kudos to Marijn for he manages to do so well, and still provide free tools of outstanding quality! (and in case you didn't notice, the demo is quite impressive — the thing is alive, not vaporware).

On the Antirez side now, it's true that a project without a community is as good as dead (he also mentions evolution and bugfixes, but a community is a prerequisite for that). I certainly have projects that could benefit enormously from having a community — but it just didn't happen, for some reason. (OK, I know why: Emacs and Lisp are Just Not Popular).

Tern is not likely to suffer from lacking a community, because it happens that JS is the most popular language on the planet and Tern solves a Hard Problem. You could think of Tern as the smarter big brother of JSLint. JSLint employs brute-force to find potential mistakes, while Tern employs smartness to help you find real semantic errors, or to improve the way you write code. It's unique. I don't think it'll suffer from lacking community—au contraire, I hope the community won't be as invasive as to murder this project by bringing into it tons of "I'd like my code to look that way" features — but then again, I trust Marijn for being able to trim down feature requests and leave in only what's meaningful, rather than particular use cases; and for particular use cases he will totally be able to make a living by providing custom support and development and this will eventually raise the quality of the project on the whole.

Post reply on HN