1,693 karma · joined March 16, 2010
web: https://www.thanassis.space
CV: https://www.thanassis.space/cv.pdf
Actually, that's exactly what you are seeing - by pulling the middle sample down to the bottom every time you click, the "spring-like" pull of the sample to the left and the sample to the right (see the Theory section) trigger additional waves that propagate, reflect on the walls, and interfere with the original one.
The code "pulls" the middle sample down, to the bottom of the window, and then the simulation runs.
As for the 2D simulation, you were right - I just pushed a version with more contrast.
Thanks for the feedback!
Code updated.
The correlation with my program's results is clear (the coefficients are my last column) - any references as to why?
:-)
The article is just an example of the notions used, and how objdump can be used to enforce them. Linux is used simply for demonstration purposes.
In your average PC with Linux/x86, it is clear that you fear neither stack nor heap error - you just restart the app :-)
Developing safety-critical code is governed by extensive guidelines (like DO178-B) which dictate lots of things, not just about code (process of development, testing, etc)
Indeed.
As for the reasoning: couldn't have said it better myself.
And remember, this is just a hack I did - I wanted to show people the things one can do with objdump. From the article:
"This kind of functionality is usually part of far more mature tools than... quickly-hacked Python scripts. Don't use this to send your spaceship in orbit :-)"
If one moves a step further, and compares how ZFS handles bad sectors (checksums, auto-healing, etc) with how the black-box of NTFS works... Yikes.
C++: sh -c "time ./bin.release/score4 o53 y43 -debug" Depth 7, placing on 0, score:2 Depth 7, placing on 1, score:8 Depth 7, placing on 2, score:8 Depth 7, placing on 3, score:8 Depth 7, placing on 4, score:8 Depth 7, placing on 5, score:8 Depth 7, placing on 6, score:2 5
Your Haskell code:
sh -c "time ./score4.bin o53 y43 -debug" Depth 7, placing on 0, score 0 Depth 7, placing on 1, score 8 Depth 7, placing on 2, score 8 Depth 7, placing on 3, score 8 Depth 7, placing on 4, score 8 Depth 7, placing on 5, score 8 Depth 7, placing on 6, score 0 5
I'll try to see why your code miscalculates on the two borders, but I don't speak Haskell so don't expect much :-)
I also replaced the sort with a fold... and there was no speed improvement (the lists are so small it made no difference).
Oh well, what can you do? :-)
- You are right about measuring the startup time of the binaries with "time"; but in this case, where the execution time for F# is measured in the order of ten seconds, the comparisons are still valid and useful, especially in the context of seeing what kind of an impact switching to imperative-style has (10->8, 1.7->1.4, etc)
- Passing the whole board as arguments has little (if any) effect on the execution time: e.g. you can see for yourself that if you pass NO arguments (i.e. clean board) the time ratios between languages remain the same. In a game like Score4, the human has to think anyway - and you can see that using C++, even the nasty cmd-line interface leads to response times of less than a second.
- About F# exceptions: in the absence of "break"... can I do anything else to abort a loop early?
Thanks for your feedback, much appreciated.
Blushing :-) Glad you enjoyed it, hope you have a chance to look at the GPL code, too.
As for my negative conclusions... I wouldn't describe them as "negative", just "objective". Some algorithms are easily adapted to CUDA, and you get an easy win of 10-40x. Others need a lot more work to offer speed gains, and finally, there are some that are simply hopeless (you have to redesign them from scratch).
I did (http://www.tapeditor.com)