Click here to Skip to main content
15,898,992 members

Welcome to the Lounge

   

For discussing anything related to a software developer's life but is not for programming questions. Got a programming question?

The Lounge is rated Safe For Work. If you're about to post something inappropriate for a shared office environment, then don't post it. No ads, no abuse, and no programming questions. Trolling, (political, climate, religious or whatever) will result in your account being removed.

 
Newscrypto..damn... Pin
abmv30-May-21 21:21
professionalabmv30-May-21 21:21 
GeneralRecruiters always overpromising PinPopular
honey the codewitch30-May-21 16:28
mvahoney the codewitch30-May-21 16:28 
GeneralRe: Recruiters always overpromising Pin
Mike Hankey30-May-21 16:36
mveMike Hankey30-May-21 16:36 
JokeRe: Recruiters always overpromising PinPopular
Daniel Pfeffer30-May-21 19:16
professionalDaniel Pfeffer30-May-21 19:16 
GeneralRe: Recruiters always overpromising Pin
Mike Hankey31-May-21 2:11
mveMike Hankey31-May-21 2:11 
GeneralRe: Recruiters always overpromising Pin
glennPattonWork331-May-21 5:28
professionalglennPattonWork331-May-21 5:28 
GeneralRe: Recruiters always overpromising Pin
Roger Wright1-Jun-21 15:30
professionalRoger Wright1-Jun-21 15:30 
QuestionLeveling up Pin
honey the codewitch30-May-21 6:29
mvahoney the codewitch30-May-21 6:29 
I taught myself C++14 and C++17 by writing one core piece of code - my pixel template.

To this day, it's some of the code I'm the most proud of. The things it can do at compile time are pretty impressive.

C++
// fetch the predefined red color
const auto col = bmpa_color::red;
// set the alpha channel to half
col.channelr<channel_name::A>(.5);


This for example, sets the alpha channel to make a red color half transparent. It does so in a pixel binary format that is completely arbitrary and user defined, and does so entirely at compile time, yielding a color value with the appropriate binary footprint. All of the bit shifting and other nonsense that makes this possible is all computed by the compiler.

I tried writing an article (actually two, really) on it but I fear it wasn't well understood by people.

C++ template arcana is bloody hard to teach. The only way I could learn it well is practice practice practice until I could intuit the syntax because trying to remember all the rules by rote is extremely difficult if not impossible, at least for my mind.

Accelerated C++ by Andrew Koenig and Barbara Moo is still the best book to introduce people to generic programming in C++ in my opinion, but it doesn't teach the newest features, nor does it teach super complicated constructs.

So for starters, just so I can have something to refer people like my buddy to when he wants to learn this stuff, do any of you C++ devs out there have a book to recommend on generic programming with particular emphasis on metaprogramming, type lists and the like?

Also, are there any really useful tricks out there you've learned regarding this type of coding?
Real programmers use butterflies

AnswerRe: Leveling up Pin
Greg Utas30-May-21 7:04
professionalGreg Utas30-May-21 7:04 
GeneralRe: Leveling up Pin
honey the codewitch30-May-21 7:14
mvahoney the codewitch30-May-21 7:14 
GeneralRe: Leveling up Pin
Greg Utas30-May-21 7:25
professionalGreg Utas30-May-21 7:25 
GeneralRe: Leveling up Pin
Joe Woodbury30-May-21 10:15
professionalJoe Woodbury30-May-21 10:15 
GeneralRe: Leveling up Pin
honey the codewitch30-May-21 11:47
mvahoney the codewitch30-May-21 11:47 
AnswerRe: Leveling up Pin
Mircea Neacsu30-May-21 13:56
Mircea Neacsu30-May-21 13:56 
GeneralRe: Leveling up Pin
honey the codewitch30-May-21 14:23
mvahoney the codewitch30-May-21 14:23 
AnswerRe: Leveling up Pin
Jon McKee30-May-21 14:39
professionalJon McKee30-May-21 14:39 
GeneralRe: Leveling up Pin
honey the codewitch30-May-21 14:44
mvahoney the codewitch30-May-21 14:44 
AnswerRe: Leveling up Pin
Kenneth Haugland30-May-21 21:49
mvaKenneth Haugland30-May-21 21:49 
GeneralRe: Leveling up Pin
honey the codewitch31-May-21 3:06
mvahoney the codewitch31-May-21 3:06 
GeneralRe: Leveling up Pin
Kenneth Haugland31-May-21 3:22
mvaKenneth Haugland31-May-21 3:22 
GeneralRe: Leveling up Pin
honey the codewitch31-May-21 4:23
mvahoney the codewitch31-May-21 4:23 
AnswerRe: Leveling up Pin
Sander Rossel31-May-21 1:11
professionalSander Rossel31-May-21 1:11 
GeneralRe: Leveling up Pin
honey the codewitch31-May-21 3:09
mvahoney the codewitch31-May-21 3:09 
GeneralRe: Leveling up Pin
Sander Rossel31-May-21 3:40
professionalSander Rossel31-May-21 3:40 
GeneralRe: Leveling up Pin
honey the codewitch31-May-21 4:20
mvahoney the codewitch31-May-21 4:20 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.


Straw Poll

Were you affected by the geomagnetic storms this past weekend?
Communication disruptions, electrified pipes, random unexplained blue-screens in Windows - the list of effects is terrifying.
  Results   441 votes