I feel like the algorithm is maybe poorly named. At first I thought this was a tool to help with computational quantum physics.
Wave Function Collapse library in pure C
41–50 of 87 posts
Re: Wave Function Collapse library in pure C
#42Earlier quoted context omitted.
Learning something doesn't stop it being terrible. One time I ran `cmake`, and forgot to run `sudo -k` beforehand. It reconfigured my system.
That has more to do with sudo than cmake.
I had no idea that cmake would do this, after reading quite a lot of things about cmake v.s. make and how to write various makefiles for them. I posit that the C build tools are fundamentally hard to comprehend.
Re: Wave Function Collapse library in pure C
#43Re: Wave Function Collapse library in pure C
#44I wonder why the implementation is all in a header.
This is a typical idiom frequently seen in modern C and C++ codes. As https://github.com/krychu/wfc#how-to-use-the-library says, you need to define a macro in a C file in order to "expand" the actual code there. Having the code in the header gives a bit more flexibility considering the file layout. IMHO this is an awkward consequence of the missing de-facto-standard in C/C++ build systems.
Re: Wave Function Collapse library in pure C
#45Earlier quoted context omitted.
That has more to do with sudo than cmake.
This might be an unpopular opinion, but compiling a program into a local directory shouldn't try to install packages globally. `make install`, I could understand doing that. I had no idea that cmake would do this, after reading quite a lot of things about cmake v.s. make and how to write various makefiles for them. I posit that the C build tools are fundamentally hard to comprehend.
Blindly trusting it will lead to the same outcome, regardless of the programming language ecosytem.
Re: Wave Function Collapse library in pure C
#46Earlier quoted context omitted.
This might be an unpopular opinion, but compiling a program into a local directory shouldn't try to install packages globally. `make install`, I could understand doing that. I had no idea that cmake would do this, after reading quite a lot of things about cmake v.s. make and how to write various makefiles for them. I posit that the C build tools are fundamentally hard to comprehend.
Any build tool can do whatever they feel like. Blindly trusting it will lead to the same outcome, regardless of the programming language ecosytem.
Re: Wave Function Collapse library in pure C
#47Earlier quoted context omitted.
As someone who has actually studied physics (including quantum mechanics) I find this analogy extremely poor. Keeping multiple potential candidates which you gradually reduce into a single solution is a very common approach for solving a variety of problems (e.g. sudoku solver). This is not at all what makes the wave function interesting or useful in quantum mechanics. And the whole concept that you iteratively colla…
> Oh well, I guess people like the fancy name. The way "quantum leap" is used by laypeople springs to mind too; literally the opposite of what they mean (not only tiny but random).
also just reread your comment. I don't agree with the definition "small and random", it is smallest unit of measurement an arbitrary system magnitude can change
Re: Wave Function Collapse library in pure C
#48Earlier quoted context omitted.
As someone who has actually studied physics (including quantum mechanics) I find this analogy extremely poor. Keeping multiple potential candidates which you gradually reduce into a single solution is a very common approach for solving a variety of problems (e.g. sudoku solver). This is not at all what makes the wave function interesting or useful in quantum mechanics. And the whole concept that you iteratively colla…
> Oh well, I guess people like the fancy name. The way "quantum leap" is used by laypeople springs to mind too; literally the opposite of what they mean (not only tiny but random).
Re: Wave Function Collapse library in pure C
#49Reminds me of the 5-star WFC code on github: https://github.com/merrell42/model-synthesis/blob/master/src... int***** support; see https://paulmerrell.org/wp-content/uploads/2021/07/compariso... Pierre Terdiman from nvidia is doing some experiments using it, for Omniverse level generation: https://twitter.com/PierreTerdiman/status/147663502794968678...
Re: Wave Function Collapse library in pure C
#50Earlier quoted context omitted.
This is a typical idiom frequently seen in modern C and C++ codes. As https://github.com/krychu/wfc#how-to-use-the-library says, you need to define a macro in a C file in order to "expand" the actual code there. Having the code in the header gives a bit more flexibility considering the file layout. IMHO this is an awkward consequence of the missing de-facto-standard in C/C++ build systems.
All code in the header leads to a lot of duplicated work for the compiler, which means slow build times. You should avoid this unless it is absolutely necessary for performance to inline methods.