I've never heard this referred to as "Wave Function Collapse" before. Isn't this just constraint satisfaction being solved via backtracking? Like this is the standard way of solving the N-queens problem. Make a random choice, propagate the constraints, and repeat, backtracking if you reach a contradiction. https://en.wikipedia.org/wiki/Backtracking
Wave Function Collapse library in pure C
61–70 of 87 posts
Re: Wave Function Collapse library in pure C
#62Earlier quoted context omitted.
Any build tool can do whatever they feel like. Blindly trusting it will lead to the same outcome, regardless of the programming language ecosytem.
Sure, but should it? Do you really want nasal demons from your build tool?
Re: Wave Function Collapse library in pure C
#63Earlier 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.
This is a sad idom followed in C and C++ libraries that cannot be bothered to learn build tools, dealing with C and C++ as if they were scripting languages.
The fact that one has to learn complex build tools (and often multiple ones), is the sad thing here. Luckily there are also unity builds, which are extremely handy in many contexts, because they are so fast and easy to use between different platforms without having to deal with annoying external tools.
Re: Wave Function Collapse library in pure C
#64Earlier quoted context omitted.
Have you ever tried using a unity build?
Another nonsense, no I haven't ever bothered with it. A hack designed by those that cannot be bothered to modularize a build with binary libraries.
Re: Wave Function Collapse library in pure C
#65Earlier quoted context omitted.
eli5 int*** support;
Whats the matter? Never used 3+ levels of indirection on a variable before? /s
Re: Wave Function Collapse library in pure C
#66Earlier quoted context omitted.
In which case, where does the Born rule come from?
https://en.wikipedia.org/wiki/Gleason%27s_theorem
Re: Wave Function Collapse library in pure C
#67Earlier quoted context omitted.
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.
That work will be done by the preprocessor and should be fairly quick given it doesn't compile the duplicated code and only removes it.
Re: Wave Function Collapse library in pure C
#68Earlier quoted context omitted.
> btw. Wave function collapse in quantum physics is completely speculative phenomenon. There is only apparent wave function collapse. To be more precise, the Born rule non-linear adjustment of the wave function to a single real value after a measurement is strictly necessary for QM to match experiments. Whether this should be interpreted as a physical phenomenon of wave function collapse, or as entanglement with the…
Adjustment is just cutting interference terms from equation. Mathematically apparent wave function collapse is caused by quantum decoherence. Wave-function collapse as a priori process is just speculation. Finding that it actually happens would be new physics.
Sure, in MWI the wave function of the universe never collapses, but something similar still happens for "parts" of the universal wave function.
Re: Wave Function Collapse library in pure C
#69Earlier 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.
How is it more flexible exactly? I hate this idiom every time I come across it. I like to look at the header file to see the interface and important documentation, and this just obscures it. Depending on your compiler it can make debugging a huge pain as well.
Re: Wave Function Collapse library in pure C
#70Earlier quoted context omitted.
Huh. I can't believe I missed this. Thanks.
In quantum computing the consequence of the theorem (as I understand it) is that once you have asked every yes/no question there is to ask about the state, the state has collapsed.