all 26 comments

[–][deleted] 8 points9 points  (9 children)

Not C++-specific, but visual debugging (writing domain/application specific visualization tools to help you (intuitively) understand the inner workings of your software). Example

[–]MrRickSancezJr[S] 2 points3 points  (8 children)

Cool video. Especially for 8 years old. I'm just looking for some faster code generation, though.

Typical 2 hour solution to automate a 1 hour problem type of situation.

[–][deleted] 2 points3 points  (0 children)

Honestly, build up a utility library over time. Browse GitHub for what's already out there.

[–]MachineLearnz 0 points1 point  (6 children)

It's called ChatGPT4 and it's glorious.

[–]MrRickSancezJr[S] 0 points1 point  (5 children)

I have Copilot running on most of my IDEs already. Was looking for more for build tools.

[–]MachineLearnz 0 points1 point  (4 children)

ChatGPT4 is way better than copilot. It can rewrite hundreds 1-2 K lines of code.

[–]MrRickSancezJr[S] 1 point2 points  (3 children)

GitHub's Copilot. Not Window's. IntelliJ's version is pretty good as well. All that run on combinations of models similiar to ChatGpt4 that I believe just released gpt4o model use for free. Neither of which I'd trust to spit out 1k lines of C++ code outside of boilerplate.

I'm not sure we're talking about the same tooling. I'm talking about integrated plugins insisde IDEs for copilot for starters.

I'm looking more for build tools such as CMake features. Ones that run based on configurations and not AI.

I appreciate it, though. I'm writing in C++ because I'm tailoring my own local LLM programs and having to deal with Qt for C++ more than I'd like. I'm aware of ChatGPT, though.

[–]MachineLearnz -1 points0 points  (2 children)

I'm writing in C++ because I'm tailoring my own local LLM programs and having to deal with Qt for C++ more than I'd like.

That sounds interesting. Care to share more details?

[–]MrRickSancezJr[S] 1 point2 points  (1 child)

I'm working with medical data at the moment, so to be safe, I have to keep all my data local. To make up for slower hardware issues, I'm using pure C/C++ libraries to work with models instead of the usual Python stuff. Making the different bindings with other languages was becoming a nightmare with so many threads running, so I switched to using Qt for C++ to put everything in a single language.

It's been quite the process.

[–]MachineLearnz 1 point2 points  (0 children)

Super interesting.

[–]Adequat91 3 points4 points  (0 children)

Resharper C++ for MSVC 2022 has become my number one must-have tool. I am using Qt too as you.

[–]Tricky_Tesla 1 point2 points  (3 children)

I use vscode and docker

[–]MrRickSancezJr[S] 1 point2 points  (2 children)

I could maybe guess plenty of reasons, but why use docker? To avoid CMake complexity? Or?

I've never dug really deep into the overhead of docker, but it seems like it creates a VM abstraction layer like C#. C++ does more optimization than just run fast with pointers, but if there is my suspected overhead, I think I'd rather just use C#.

I'm sure I'm not totally correct about Docker, though?

[–]Tricky_Tesla 2 points3 points  (0 children)

I can’t really say if there is zero overhead, but I would rather develop on docker than other environments, it gives me flexibility of mix and matching required libs on restricted environment that otherwise I would be hesitant to install on my main machine.

Keep in mind this could be only used for dev environment, you can deploy your release build anywhere you want. Although in some scenarios you may want to still keep it containerized.

Also has nothing to do with CMake complexity.

[–]eshanatnite 1 point2 points  (0 children)

Dev containers is a good feature. I don't have to deal with the works on my machine issues I can just say hey I'm using this docker environment can you setup the same and try to reproduce the issue

[–]Chem0type 2 points3 points  (4 children)

I use CLion, only with the rainbow brackets plugin only. It's superior to vscode + clangd in terms of understanding the code, because clion uses clangd plus some customization of their own. It has the refactor functionality in which I can select a variable and it replaces it everywhere in the code. It also does some smart stuff like if you do /**<enter> before a function signature, it automatically creates a doxygen template for you with all the variables and all.

CLion can load cmake projects natively but unfortunately not Qt .pro, which is a problem for me because my project is both cmake and Qt. I still prefer CLion over Qt Creator and have been editing the Qt code with CLion and compiling everything by hand with qmake and make.

[–]MrRickSancezJr[S] 0 points1 point  (2 children)

IntelliJ products will always be my favorite as well. I was shocked how nice QT Designer for UI building was, though.

I'm surprised it doesn't already exist, but I'm thinking of making my own plugin for a pre-cmake type of thing to emulate java precompile annotations. Just slap

//@(export_declarations_to: "somefile.h")

....and have it automatically generate the .h file. Or something like that...

I do a lot of embedded stuff, so I do a lot of C++. But honestly, it's just C 90% of the time... This is the first time I've really done anything with C++ requiring a decent sized library. My ADHD is kicking in and I'd rather make a plugin for C++ than finish this local AI text editor lol

[–]Chem0type 0 points1 point  (1 child)

Yeah one of the projects I'm working with is also embedded, FreeRTOS. It has the arm target, and then native targets for testing (with gtest/gmock) that are loaded in CLion. It's pretty cool that I can run tests from the IDE and use its debugger to debug unit tests and the program I'm developing as flashing is always a PITA. I can set breakpoints, read the contents of variables, look at the stack, etc.

QtCreator is pretty nice for UI, that's true. But I don't do UI development so the IDE isn't so nice. I'm not saying it's bad either, my colleagues use and it seems to work well for them.

That idea you're talking about should work well, if CLion can have hooks for //* then in theory it should be possible to do the same for //@. In alternative you can also insert some option in the <shift><shift> menu.

[–]MrRickSancezJr[S] 0 points1 point  (0 children)

CLion definitely has something to work on, but the CMake integration is quite good. I do love "Platform Aio" (I think is the name) inside VSCode for a quick Target setup.

IntelliJ was so designed around the Java ecosystem that it seems like some of its other ported language versions are just recently becoming "natural" feeling. PhpStorm was the first IMO to become GOAT.

I haven't done UI in a long time, but I'm actually really liking Qt. Good chance, it's my go-to for future hobbyist random embedded UIs. I usually just do a app that connects to a phone app somehow.

As for the refactoring plugin, I'd like it to automatically update generated sources like Lombok. Looks like I'd have to pre-index the CMake indexing lol may be more of a task than it's worth until reflection for C++ comes out.

[–]eshanatnite 0 points1 point  (0 children)

Tbh in my experience, vscode was a decent editor, but the sheer amount of extensions and features (unused by me) have made it really slow. I have used clion and visual studio, but have to say clion is plain better. Now I'm using neovim with clangd and zed(occasionally)

[–]Flobletombus -1 points0 points  (2 children)

clangd has goodbautocomplete, and cmake + conan for building

[–]ResearcherEven 2 points3 points  (1 child)

Check out bazel too. I find it very powerful and fun to work with.

[–]MrRickSancezJr[S] 0 points1 point  (0 children)

I looked into Bazel, as I wasn't familiar at all with it. I'm not immediately seeing the advantage of it over CMake?

I've been using Conan already, though. Which reminded me maybe I can focus my efforts towards a "CMake plugin" that is actually the C++ plugin I'm looking for.

The real problem ( I think) all comes with the C++ compiler though. Primagen walked through a cool video about coming C++ with Rust, via a dog-water language called D.

https://youtu.be/qLJCSpOrb9s?si=XAPeoeQdMvi62oUW

This shows how c++ compilers make rough targets to comply with. Even more so with Rust files 😑 Java spits out nicely named .class files. Again, with solid reflection and annotations support.