News for hackers. Stuff that matters.
Re:C Template Library by glouwbug on Wednesday December 30, 2020 @03:35AM (#25579800)
There's this theory that humans are antennas, and that we pick up "wavelengths from above" to build and create the world we live in. Not only did we decide on the same project name and idea, but we also used the same pre-processor hacks. How surreal.

As for your pqueue implementation, the efficacy of an optimizing compiler lies in the inherent complexity of the language. I can imagine the optimization backend for gcc is simpler (and more effective) than g++, but I am not an expert on compiler internals.

Re:C Template Library by eezurr on Wednesday December 30, 2020 @10:29AM (#25582462)
Its more likely that humans are redundant. That is, it is probable in a field of millions that two people come up with the same idea and implementation. I think the birthday paradox is a similar corollary on a smaller scale.

https://en.wikipedia.org/wiki/Birthday_problem

Re:C Template Library by kzrdude on Wednesday December 30, 2020 @08:38AM (#25581549)
These kinds of macro hacks are pretty widespread, aren't they? To me, klib and its khash hash table is the most well-known implementation, see: https://github.com/attractivechaos/klib

And I've written similar things myself (hash table and vectors).

Re:C Template Library by pwdisswordfish5 on Wednesday December 30, 2020 @05:36AM (#25580522)
gcc and g++ use the same backend.
Re:C Template Library by wwweston on Wednesday December 30, 2020 @04:44AM (#25580170)
Where have you heard that theory? I've wondered about it myself, but other than some songwriter-specific conversation, I'm not sure I'm familiar with other people talking about it, and I'd like to be.
Re:C Template Library by glouwbug on Wednesday December 30, 2020 @04:57AM (#25580265)
I'm not sure where I heard it, but if you are interested in an article: https://www.sciencedaily.com/releases/2014/01/140116085105.h...
Re:C Template Library by joshuaissac on Wednesday December 30, 2020 @09:21AM (#25581892)
It sounds somewhat similar to Sheldrake's morphic resonance ideas.
Re:C Template Library by ncmncm on Wednesday December 30, 2020 @02:05PM (#25584827)
In other words, it's 100% BS; in Sheldrake's case, wholly contradicted by his own examples.