Latest Comments

§ Paul Watt®   said on :

Thanks for the clarification. I’ll modify my text.

§ serkan said on :

Hello,

Thank you for the article.

In the “Does it have a name?” part, lvalue expressions that doesn’t have name were described as follows;

“Examples of lvalue expressions that do not have names are string literals and function call expressions that return an rvalue reference.”

Function call expressions that return a rvalue reference are xvalue, lvalue expressions must be function call expressions that return an lvalue, not rvalue.

§ Alien426 said on :

No, it is not fixed.

It used to be a copy of the binary conversion with just the radix changed from 2 to 16.

Now you it reads:
237 / 16 224 D16 (13) (160)
224 / 16 13 E16 (14) (161)

You just put in the numbers from your (hex to dec) comment.

§ Paul Watt®   said on :

Thanks for clarifying, I understand what you were indicating.
It’s now corrected.

Thank you again.

§ Alien426 said on :

The result is correct. The calculation is not. Please fix it.

§ Paul Watt®   said on :

Thanks for double-checking my work.

However, 0xED is the correct conversion for 237 from decimal to hexadecimal. A quick way to verify this is to convert 0xED back to decimal:

0xE(14) * 16 + 0xD(13) * 1 = 224 + 13 = 237

The quotient (answer to the division) is the value that we want to fill in the place-value spot during number conversion.
The remainder is what is left and carries over to the next lower place-value column.

§ Paul Watt®   said on :

k_pi_inverse is 1/pi:

0.31830988618379067153776752674503

§ Alien426 said on :

The conversion of decimal 237 to hexadecimal is incorrect.

It should be:
237 / 16 = 14, remainder 13 -> 0xD
14 / 16 = 0, remainder 14 -> 0xE

§ Mathieu   said on :

Hello!
What value should k_pi_inverse be?
Thanks

§ Tianxiao Jiang   said on :

Cross origin compile on coliru seems not working now, neither on en.cppreference.com nor here. It was working just a few days ago. I was trying to do the same thing with coliru, any idea ?

§ Scott said on :

k_pi and k_pi_inverse not defined

§ Rolandcharcker said on :

That is fascinating post and thank you for sharing. There are things here that I didn’t think some time recently. On account of cool such a position, to the point that is extremely elegantly composed. http://www.clazwork.com/proficient-accounting-essay-topics-writer

§ Paul Watt®   said on :

@Semi Essessi

Thanks for you input.

How do you deal with rotating a model and avoid matrix multiplication?

§ Semi Essessi   said on :

i have some strong opinions about this stuff having worked a lot out for myself from nothing… vectors, matrices and trig are overkill to start with, and introducing them so early obscures the simplicity of what is actually necessary imo…

as an obvious example, generic matrix multiplication is pretty useless (and classically confusing) compared to the change of basis/coordinate system that happens to be the same operation as multiplying square matrices.

§ Troy said on :

This is probably the most thorough explanation I’ve seen on this subject. I found the tables and tips for navigating hexadecimal to be really helpful.

§ Paul Watt®   said on :

Thanks for pointing that out.
Yes, the code you mention is a mistake, I will correct it.

I adapted my implementation from the version in the proposal paper I cite, N4115. Their implementation chooses to swap the parameters. This form didn’t feel intuitive to me.

I needed the pop_back function, so the latest file I have uploaded has some additional functionality:
- pop_back
- move_item (moves items between lists)
- split (splits a list at a specified pivot point)

§ foo said on :

Is there a mistake on line 195( of the downloadable file), if not could you explain the template parameters are reversed (the line is also shown in your “One Last Tip” example above on line 20) ? Thanks

§ Zeh said on :

Nice article.

Some minor issues folowed by fixes:

“prefer the format year/month/day.”
“prefer the format day/month/year.”

“Instead of doing one thing will,”
“Instead of doing one thing well,”

§ Paul Watt®   said on :

Thank for the compliment Larry.

Someone has to count, and I’m glad you took the time to correct me.

§ Larry Constantine said on :
4 stars

Damn clever presentation! Actually the terms coupling and cohesion predate the 1974 IBM Systems Journal article (Stevens, Myers, and Constantine). They were first used and described in a more obscure paper by me in the 1968 National Symposium on Modular Programming. But who’s counting.

Great job!

–Larry Constantine (pen name, Lior Samson, author of Flight Track)

Contact / Help. ©2017 by Paul Watt; Charon adapted from work by daroz. CMS / cheap web hosting / adsense.
Design & icons by N.Design Studio. Skin by Tender Feelings / Skin Faktory.