Live data from Hacker News

Cquery: highly-scalable, low-latency language server for C++

github.com

31–40 of 74 posts

Re: Cquery: highly-scalable, low-latency language server for C++

#31
post #21

Author here! Wasn't quite ready to post to HN yet since cquery is still in development, and I plan to eventually publish on the vscode marketplace so using cquery should be as simple as using the existing C/C++ extension. Let me know if you have any questions.

Is there a "hello, world" example for cquery?

Re: Cquery: highly-scalable, low-latency language server for C++

#34
post #24
post #6

Wow! I consider myself lucky that I practically do not have to deal with C++, but if I were a C++ kind of person, right now I would deeply appreciate how much hard work goes into a tool like this. [1] In order to be any good, it has to be even more clever than the compiler, at least in a few ways. And I have a hunch that in the field of programming languages that are used these days, C++ is probably not the easiest o…

Although C++ has lots of warts, I still really like the language mainly thanks to the tooling around it. It has had very good IDEs for years and when I see some of the advancements in debuggers and profilers for more modern languages I feel that they are still quite behind. Note that this server is based on libclang. This is good because having a good language support means that you have to practically write a compil…

It existed, but sadly both were too early for the market.

The first one was from Lucid, after pivoting away from Lisp Machines.

https://www.dreamsongs.com/Cadillac.html

Here is a demo on YouTube.

https://youtu.be/pQQTScuApWk

IBM also tried to create a Smalltalk style repository in Visual Age for C++ v4.0, which has quite resource hungry for mid-90's PCs.

So we had to wait until the idea of compiler as library to catch on, to get those ideas back.

Re: Cquery: highly-scalable, low-latency language server for C++

#35
post #21

Author here! Wasn't quite ready to post to HN yet since cquery is still in development, and I plan to eventually publish on the vscode marketplace so using cquery should be as simple as using the existing C/C++ extension. Let me know if you have any questions.

Any plans for Cmake support?

Re: Cquery: highly-scalable, low-latency language server for C++

#36
post #28

Earlier quoted context omitted.

I saw that on Twitter but I couldn't figure out what his actual complaint was. I think I'd probably disagree but I'm still interested in knowing.

That doing all of this stuff via rpcs vs function calls is crazy I believe.

Specially from security point of view.

There is a reason why most of us learned our lesson and moved plugins out-of-process.

Performance can still be achieved via shared memory, exposing much less data from the host process.

Re: Cquery: highly-scalable, low-latency language server for C++

#37
post #35
post #21

Author here! Wasn't quite ready to post to HN yet since cquery is still in development, and I plan to eventually publish on the vscode marketplace so using cquery should be as simple as using the existing C/C++ extension. Let me know if you have any questions.

Any plans for Cmake support?

In what sense? cmake can generate compile_commands.json so projects built using cmake are supported.

Re: Cquery: highly-scalable, low-latency language server for C++

#38
post #5

Is there one similar to this but that doesn't require your code to compile under Clang? I have plenty of projects at home that don't instantly work under Clang. So far, I've never seen any C++ language server that doesn't rely on Clang unfortunately.

I remember an old project to use the Eclipse CDT C++ support via vim instead of in the Eclipse IDE: http://eclim.org/index.html

I think there is/was some attempt to do it for emacs as well.

Re: Cquery: highly-scalable, low-latency language server for C++

#39
post #6

Wow! I consider myself lucky that I practically do not have to deal with C++, but if I were a C++ kind of person, right now I would deeply appreciate how much hard work goes into a tool like this. [1] In order to be any good, it has to be even more clever than the compiler, at least in a few ways. And I have a hunch that in the field of programming languages that are used these days, C++ is probably not the easiest o…

Some advice if you do decide to learn C++: there has been a steady stream of improvements in standard C++ the past 8 years (C++11-17), and some (Bjarne Stroustroup, Herb Sutter, others) promote it as a better starting point for beginners under the name 'Modern C++'. From: https://msdn.microsoft.com/en-us/library/hh279654.aspx "[...] Over the years, features have been added to the language, together with highly-tested…

C++ as a language has certainly modernized, but its tools are still stuck in the 90's. Contrary to the increasingly bizarre rationalizations offered up by its proponents, CMake and friends are not acceptable package managers or build tools, at least to those of us who have used newer languages. I don't need a build tool assumes all projects are unique snowflakes in need of their own hand-crafted build system; I just want to get up and running quickly without sticking a bunch of maintenance into my build system.

I don't mean to dump on C++; I like the language and I take this post as a sign that things are beginning to improve, and I hope this pace of improvement accelerates. However, I have been disappointed by the head-in-the-sand attitude of some proponents.

Re: Cquery: highly-scalable, low-latency language server for C++

#40
post #13
post #9

Earlier quoted context omitted.

What are the usual culprits that prevent it from working under clang?

Clang doesn't support template void foo(int x = 0, Args&&... args) for example (default argument before variadic templates args).

Wow, I was going to guess that was illegal anyways, but cppref validates that behavior[0].

0: http://en.cppreference.com/w/cpp/language/default_arguments

Post reply on HN