Re: D GUI Framework (responsive grid teaser)
On Sunday, 19 May 2019 at 21:01:33 UTC, Robert M. Münch wrote: Hi, we are currently build up our new technology stack and for this create a 2D GUI framework. https://www.dropbox.com/s/iu988snx2lqockb/Bildschirmaufnahme%202019-05-19%20um%2022.32.46.mov?dl=0 The screencast shows a responsive 40x40 grid. Layouting the grid takes about 230ms, Interesting, is each cell a separate item then? So assuming 3GHz cpu, we get 0.23*3e9/1600 = 431250 cycles per cell? That's a lot of work. Are you using some kind of iterative physics based approach since you use hundreds of thousands of computations per cell?
D GUI Framework (responsive grid teaser)
Hi, we are currently build up our new technology stack and for this create a 2D GUI framework. https://www.dropbox.com/s/iu988snx2lqockb/Bildschirmaufnahme%202019-05-19%20um%2022.32.46.mov?dl=0 The screencast shows a responsive 40x40 grid. Layouting the grid takes about 230ms, drawing it about 10ms. The mouse clicks are handled via a reactive message stream and routed to all graphical objects that are hit using a spatial-index. The application code part is about 50 lines of code, the rest is handled by the framework. With all this working now, we have all necessary building blocks working together. Next steps are to create more widgets and add a visual style system. The widgets themself are style-free and wire-frame only for debugging purposes. -- Robert M. Münch http://www.saphirion.com smarter | better | faster
Re: bool (was DConf 2019 AGM Livestream)
On Sunday, 12 May 2019 at 10:27:42 UTC, Isaac S. wrote: So mixing the concepts of true/false and numerical data is "reasonable". I'll have to remember that if I ever have a true/false test; 1's and 0's are quicker to write than T's and F's. I agree with you that bool should be kept separate from ints, but in low level programming on some RISC architectures where branching is expensive it brings significant performance benefits to do things like this: x = a*(y<3) + b*(z>5); This was a common trick for writing branch-free high performance code on SGI machines (MIPS based) in the 90s. Not that D is used for this kind of performance oriented coding, but there are use cases related to low level programming that makes it reasonable. Although a cast is a good tradeoff. (It is completely unreasonable for high level programming however.)