Closed porky11 closed 8 years ago
On Tue, Aug 30, 2016 at 02:40:55PM -0700, Fabio Krapohl wrote:
I had some working program, then I added some working code (for creating a circle, I tested that code as a seperate program), and now the compiler just seems to do nothing, normally my computer freezes (normally I can kill the process after a few minutes, and don't have to restart) (see my code at
/porky11/planets
at github, file game.dt
I was able to get it to compile and run, with the latest version of the compiler, by commenting out the operator-macros import and changing init-circle to be like so:
(using-namespace std
(def init-circle (fn intern void ((circle (p (array-of 16 (array-of 2 float)))))
(let ((i int 0))
(for true (< i 16) (incv i)
(setf ($ ($ (@ circle) i) 0) (cosf (*' (/' (pi) 16) i)))
(setf ($ ($ (@ circle) i) 1) (sinf (*' (/' (pi) 16) i)))))
(return))))
Although it would be possible to use 'mfor' in the case above, it would require either listing the numbers 0-16 individually or writing a macro that produced the same result, hence the change to 'for'.
operator-macros has shown that there is something odd going on with procedure resolution that needs to be fixed, though, because including that import is enough to send compilation into an endless loop.
i also had tried it with mfor and had the same problem
On Wed, Aug 31, 2016 at 02:52:57PM -0700, Fabio Krapohl wrote:
i also had tried it with mfor and had the same problem
It turns out I'd forgotten to commit one of the fixes required to build the planets project. It should now build and run, when compiled using the current dale master branch.
I had some working program, then I added some working code (for creating a circle, I tested that code as a seperate program), and now the compiler just seems to do nothing, normally my computer freezes (normally I can kill the process after a few minutes, and don't have to restart) (see my code at
/porky11/planets
at github, file game.dt)