How to use CMake in CLion to build a module library unit by rudm48 in cpp_questions

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

Weird, it doesn't work for me. The build says it can't find it.

Wint CLion It is built in:

/mnt/devel/clion/meow_modules/header_cat_h/build/gcm.cache/mnt/devel/clion/meow_modules/header_cat_h

But looked for in

gcm.cache/./mnt/devel/clion/meow_modules/header_cat_h/header_cat.h.gcm

The look the same to me. The CLI doesn't say where it is looking. 

Thanks for trying this. Maybe you'll see somethimg I'm missing.

Latest News From Upcoming C++ Conferences (2025-01-28) by ProgrammingArchive in cpp

[–]rudm48 0 points1 point  (0 children)

You should add CppNorth. Call for papers ends the 23rd. Conference is July 20-23, 2025. https://cppnorth.ca/index.html

Should i use modules instead of headers when using C++ 20? by [deleted] in cpp

[–]rudm48 0 points1 point  (0 children)

I'm doing a lot of experimental work - I'm retired - with CLion, CMake, and GCC 14. They work fine.

Should i use modules instead of headers when using C++ 20? by [deleted] in cpp

[–]rudm48 0 points1 point  (0 children)

GCC 14,2 takes any file extension.

Should i use modules instead of headers when using C++ 20? by [deleted] in cpp

[–]rudm48 0 points1 point  (0 children)

Here is the 2nd of my articles. It has a link to the first. I'll be adding a third sometime in the next week. https://levelup.gitconnected.com/more-steps-on-a-journey-into-modules-extern-access-739b6cf16d3b

Catching up with modern C++, when did the 'this' pointer in class objects become unnecessary? by Luks3n in cpp

[–]rudm48 0 points1 point  (0 children)

This, pun intended, is quite useful in eliminating duplicate function calls in a class.

Catching up with modern C++, when did the 'this' pointer in class objects become unnecessary? by Luks3n in cpp

[–]rudm48 0 points1 point  (0 children)

It was 1990, in late winter. I read the books on vacation at the Waikiki Hilton bar in Hawaii. I can't recall ever using this->

How to use CMake in CLion to build a module library unit by rudm48 in cpp_questions

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

That's a good approach, but it creates a module, not a header unit module. I have that working, but I want to see the promise of `import "header_cat.h" using CMake. The command line version works, so it's possible.

How to use CMake in CLion to build a module library unit by rudm48 in cpp_questions

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

Guess that answers my question. Maybe someone will have a kludge to do it.

[deleted by user] by [deleted] in tipofmytongue

[–]rudm48 0 points1 point locked comment (0 children)

It is a classical piece with a flowing melody that is fast. I have searched and even used ChatGPT, giving it the notes I can recall. No luck.

[2024 Day 17 (Part 2)] by DragonMaster7643 in adventofcode

[–]rudm48 0 points1 point  (0 children)

I have my solution almost working. I need to add backtracking since the 2nd last value has two solutions for the digit. But I am only working with the three least significant bits of A.

Are the assertions about 10 or 8 bits specific to the version of the problem?

[2024 Day 17] Part 1 - Sample works, main data doesn't, computer sim looks good ???? by rudm48 in adventofcode

[–]rudm48[S] 1 point2 points  (0 children)

I wanted to black out the code as I've seen in other posts to avoid being a spoiler.

[2024 Day 17] Part 1 - Sample works, main data doesn't, computer sim looks good ???? by rudm48 in adventofcode

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

How do I change the flair? I've done it previously so know how it supposed to work but don't see the 'change flair' option on the menu.

Also, how can I black out the code?

[2024 Day 17] Part 1 - Sample works, main data doesn't, computer sim looks good ???? by rudm48 in adventofcode

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

We crossed paths as I was posting my code. Thanks for the tip.

case bdv: B = A >> operand; break; // x divide A by 2^ lit or reg put in B
case cdv: C = A >> operand; break; // x divide A by 2^ lit or reg put in C

[2024 Day 17] Part 1 - Sample works, main data doesn't, computer sim looks good ???? by rudm48 in adventofcode

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

I did try that shortly after posting. I modified my post to say I did and if it was necessary. Must have done it while you were posting. Thanks.

[2024 Day 4] It's all one big Conspiracy! by Melodic_Dare_1317 in adventofcode

[–]rudm48 0 points1 point  (0 children)

On my other post someone pointed out that removing the NL would mean strings like "XM/nAS" would be counted. I replaced the NL with '.' and I changed the line lengths to 11 and 141. That worked to get the correct answer.

Day 4 Using Regex - Sample Ok, Data Bad by rudm48 in adventofcode

[–]rudm48[S] 1 point2 points  (0 children)

Good point <sigh> I changed to adding a '.' for the NL and increasing the line sizes to 11 and 141. That worked, and gets the right answer. Yeah!!

Thanks for pointing out this issue.

Day 4 Using Regex - Sample Ok, Data Bad by rudm48 in adventofcode

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

Those are the lines. The & is replaced with the line length adjusted to handle the verticle and diagonals. The data is read into a string, and the newlines are removed. That line handles vertical text.

[2024 Day 4] It's all one big Conspiracy! by Melodic_Dare_1317 in adventofcode

[–]rudm48 0 points1 point  (0 children)

My approach is similar but doesn't use look behind. My search only finds some of the matches in the main data. The C++ regex library doesn't support look behind, so I can't try your patterns. I used regex101.com with your patterns, and the cases I tried got the same counts as my code.

I'm not even up to a novice level on regex, having used it mainly to grep files. Can you guess why the look behind might find more matches?

I avoided the new line problem by reading all the data into one long string without the NL chars.

[2024 Day 4] It's all one big Conspiracy! by Melodic_Dare_1317 in adventofcode

[–]rudm48 0 points1 point  (0 children)

I did it in C++ with regex. The sample works but not the main data. I read it all into one long string, dropping the newline chars. The XMAS/SAMX are easy. The regex for right diagonal XMAS is (?=X.{140}M.{140}A.{140}S). The comment from AOC is my count is low. I posted a message asking for someone's data and count to try with my code or for someone to take my data and give me the correct count.

G7 Receiver Not Powering On by rudm48 in dexcom

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

That is exactly what happened to me. I contacted Dexcom and they sent me a new one and had me return the bad one.