Latest Comments

§ 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:


§ 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 :

What value should k_pi_inverse be?

§ Tianxiao Jiang   said on :

Cross origin compile on coliru seems not working now, neither on 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.

§ 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)

§ Paul Watt®   said on :

One more note:
I basically create two sets of windows, one if code highlighting styles, and the other set with editing styles.
Normally the editing styled windows are hidden. Then when you press run this code, the editing windows appear, and the others are hidden.

It’s not an elegant solution because I need to duplicate the code twice. However, I am happy with how it looks.

The JS file contains the code to send to coliru to compile and receive a response.

§ fenbf   said on :

Thanks for the explanation! I’ll try to use your solution and let you know if it works on my site (based on

No, I haven’t tested any other alternatives, but coliru seems to be used quite often. So it seems it’s a good choice.

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.