119 points · by fanf2 · 9y ago · 85 comments
Really says something about Microsoft's evolution if you think about it.
I believe a prominent example is NVidia's CUDA compiler. As far as I understand this is just a modest fork of the Clang front end and a big new LLVM back end, and it's proprietary.
However Google has developed an open source alternative CUDA compiler, which is also based on Clang/LLVM: https://research.google.com/pubs/pub45226.html
Also I would have thought that Clang already has LSP support for C++, but maybe I'm wrong.
Previously they had proprietary compilers or gcc forks that they weren't that happy contributing back.
Now they can have their proprietary clang forks and don't contribute anything back.
Plenty of slideware examples at LLVM conferences.
On one side clang was great for improving the whole safety and tooling story for C and C++.
On the other side, if clang was available to Brad Cox, NeXT would never had released Objective-C to the community.
Actually the Stepstone "compiler" was a preprocessor that generated C (like cfront was for C++). Brad Cox never worked for NeXT.
The Objective C front end for gcc was written by Steve Naroff at Next. Later he and I persuaded Jobs that that front end should be merged into the official gcc tree, and so we (Cygnus) worked with NeXT to get merge them and, amazingly, produce Objective-C++ in the process.
Jobs was focused on the goal. When NeXT (and later Apple) were underdogs he was happy to embrace open standards (e.g. JPEG, MPEG, MPEG-3...) when it would help and outside proprietary standards when he thought it was needed (e.g. paid the rtf license).
References? Most of the "custom" compilers are based on some ancient version of gcc.
I haven't yet bumped into an embedded compiler that was clang-based.
> Plenty of slideware examples at LLVM conferences.
Well, the conference can obviously stop that, if they wish.
http://llvm.org/docs/CompileCudaWithLLVM.html
The team at Google published a paper in CGO 2016 detailing the optimizations they’d made to clang/LLVM. Note that “gpucc” is no longer a meaningful name: The relevant tools are now just vanilla clang/LLVM.
There is a Hello World program on that page, which looks good.
Ignoring it just because Micro$oft is attached is idiotic.
True, but to a casual observer it also sounds like something RMS might do.
- The pain of exposing language-native compiler/language AST and indexing APIs to a JavaScript IDE.
- RMS' inability to accept that GCC might need to expose an AST to external consumers, and his paranoia regarding how that might undermine his GPL-everywhere ideals.
Using JSON for local IPC -- and requiring IDE language support to funnel itself across that high-overhead IPC connection -- is fey.
For compilers, M is source languages and N is target platforms. For LSP, M is source languages and N is editors.
They both have the same downside. The more esoteric the language feature, the lower the fidelity of support in the common middle.
shipping along with your language, some kind of API that is standardized so that editors can easily add high quality IDE level features to support new languages is a great idea
that this is currently being done via a server + json over pipes or whatever is a suboptimal way to do it, I agree.
It's possible to do a lot of the nice IDE features in vim (and I'm sure emacs) today w/ all sorts of contortions, but a standard way to get this done would be amazing.
Yep, sounds like emacs. (I use emacs, but my god is it a horrible collection of half-broken hacks. Still the most useful editor going, though. If anyone wants to fund me, I'll start a project to make an editor that combines the flexibility of emacs with a rigorous, ruthless obsession with speed and correctness. :)
It instead proposes to have the language server expose the entire AST and environment that is available at each point, and have the IDE uses that for autocompletion, as this is far more powerful than what is currently doable with LSP. (Currently, the editor just transmits cursor position and content to the LSP, which then does all the highlighting, autocompletion, etc. This is not only less configurable, and less consistent, but also less usable, as often the LSP isn’t able to offer as smart autocompletions)
Many IDEs, such as the JetBrains IDEA platform, do exactly this with their language plugins.
That’s called "you can create an entirely new API that’s entirely different, but might use the same name".
That’s the issue here, LSP is so fundamentally flawed you’d have to scrap it entirely to support what is needed for a real IDE.
It's come a long way in the last few months, I'd recommend giving it a shot again.
Would be cool to have a linter that can run file-by-file as well, though that's tough for clippy as a compiler plugin it seems? Maybe just hacking it to only report on a particular file would work.
Do you mean errors next to lines? If so that works today in the RLS variant. You get a red highlight and can mouse-over for details.