Live data from Hacker News

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

github.com

51–60 of 74 posts

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

#51
post #48
post #45

This project seems to be very similar to clangd. It is also similar to YouCompleteMe, though YCM does not support LSP yet. How does Cquery compare to those projects in terms of features? In particular, should it be considered as an alternative to clangd? Could it make sense to combine efforts between clangd and Cquery?

At the moment, clangd and ycm are very similar projects; they are very limited compared to cquery. clangd and ycm support code completion, diagnostics, fixits, and goto declaration (but not definition), whereas cquery supports references, derived types, callers, etc. Basically, if the feature requires knowledge across multiple translation units, clangd/ycm do not support it. cquery is designed to support very large p…

Thanks for the explanations!

In the meantime I tried it out with VSCode on my MacBook. Works like a charm! Awesome job!!!

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

#52
post #49

Use c++ on a daily basis. I think the direction the language is going is really really troublesome. It was a mistake to follow the boost’s lead. At this point language is more or less a clusterfuck. While python peeps are saving the world here on this dark side of the world we wrestle with move semantics. Simplicity and beauty of C is long gone.

Also use c++ on a daily basis. It is a dark place, full of nooks and crannies inhabited by venomous insects that only get more dangerous with age. Also you cant declare a variable without constructing it or making it a raw pointer. Which. is. bullshit.

Edit: also, the memory issue for these types of services is a huge problem for me, since I am usually working on multiple projects at once, and when combined with all 32 of my chrome tabs, my work laptop starts to indicate some unhappiness.

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

#53
post #49

Use c++ on a daily basis. I think the direction the language is going is really really troublesome. It was a mistake to follow the boost’s lead. At this point language is more or less a clusterfuck. While python peeps are saving the world here on this dark side of the world we wrestle with move semantics. Simplicity and beauty of C is long gone.

[deleted]

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

#54
post #49

Use c++ on a daily basis. I think the direction the language is going is really really troublesome. It was a mistake to follow the boost’s lead. At this point language is more or less a clusterfuck. While python peeps are saving the world here on this dark side of the world we wrestle with move semantics. Simplicity and beauty of C is long gone.

I used to use C++ a lot for a mixture of reasons. I avoid it like the plague now, because I'm not confident that anyone completely understands the semantics of a non-trivial C++ program. Even if I did, the cognitive overhead of this stuff detracts from real programming.

> Even if I did, the cognitive overhead of this stuff detracts from real programming. You are absolutely right.And why the standard comittee dont see this is beyond me.

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

#56
post #49

Use c++ on a daily basis. I think the direction the language is going is really really troublesome. It was a mistake to follow the boost’s lead. At this point language is more or less a clusterfuck. While python peeps are saving the world here on this dark side of the world we wrestle with move semantics. Simplicity and beauty of C is long gone.

I used to use C++ a lot for a mixture of reasons. I avoid it like the plague now, because I'm not confident that anyone completely understands the semantics of a non-trivial C++ program. Even if I did, the cognitive overhead of this stuff detracts from real programming.

I have a suspicion that all non-trivial C++ programs contain undefined behaviour (e.g. not checking for or preventing overflow at every arithmetic operation involving signed integers), so trying to understand the semantics of these programs is kind of a moot point.

On the other hand, if anyone tried to formalise the semantics of C++ and prove some kind of soundness theorem they would probably find that the language definition is technically inconsistent.

Paraphrasing Feynman, if you think you understand C++ then you don't understand C++.

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

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

Hi! I see you're using compile_commands.json. How are you handling header files? I've found that header files present problems for compile_commands since a number of tools using compiler_commands (like bear) only look at the compiler commands for .c files, and don't notice that the header files should be added as well.

I know that some tools, like YCM, attempt to intelligently map a header file to it's associated .cpp/.cc/.c file to guess what the compiler commands are, but this doesn't always work.

What is the state of generating compiler_commands.json for Chromium? I remember running into this issue a few years back.

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

#59
post #49

Use c++ on a daily basis. I think the direction the language is going is really really troublesome. It was a mistake to follow the boost’s lead. At this point language is more or less a clusterfuck. While python peeps are saving the world here on this dark side of the world we wrestle with move semantics. Simplicity and beauty of C is long gone.

[deleted]

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

#60
post #52
post #49

Use c++ on a daily basis. I think the direction the language is going is really really troublesome. It was a mistake to follow the boost’s lead. At this point language is more or less a clusterfuck. While python peeps are saving the world here on this dark side of the world we wrestle with move semantics. Simplicity and beauty of C is long gone.

Also use c++ on a daily basis. It is a dark place, full of nooks and crannies inhabited by venomous insects that only get more dangerous with age. Also you cant declare a variable without constructing it or making it a raw pointer. Which. is. bullshit. Edit: also, the memory issue for these types of services is a huge problem for me, since I am usually working on multiple projects at once, and when combined with all…

You can trivially declare a variable without constructing it by wrapping it in an anonymous union.

You'll have to destroy it yourself though because the compiler can't guarantee to be able to prove that it has been constructed at the end of scope. You can wrap it in something like boost optional to get safety.

Post reply on HN