google / google/clojure-turtle

event loop discrepancies between CLJ and CLJS

Abierto
#19 1 comentario 0 reacciones 0 asignados Ver en GitHub
intermediate
Lenguaje dominante
Clojure
Estrellas
424
Forks
32
Métricas de merge de PR
Sin PR fusionados en 30 d

Descripción

Based on work for issue #6, we have a `wait` fn that does what you would expect. But only in the CLJS REPL, and only when you try to mix wait and turtle commands, all of the waiting happens first, and all of the rendering happens at the end. As an example, see the difference in the following at the CLJS REPL:

``` clojure
(do (wait 3000) (forward 30) (wait 3000))
```

``` clojure
clojure-turtle.core=> (do (wait 3000) (println "hello") (wait 3000))
```

Perhaps the issue is due to how the rendering event loop in either Processing.js or the CLJS version of Quil is implemented. But for whatever reason, the issue is happening. It would be great to identify the problem and fix it if possible.

Guía de contribución

Abrir la guía de contribución

Línea de trabajo

Reproduce los dos ejemplos de wait-and-render en la CLJS REPL y compáralos con el comportamiento de Clojure. Inspecciona el bucle de eventos de renderizado en Processing.js o la versión CLJS de Quil; se considera terminado cuando los waits y el renderizado de la tortuga se producen en la secuencia esperada, en lugar de renderizarse solo al final.

Escrito por el modelo de indexación a partir del texto del issue.

Evaluación

Stack tecnológico
clojure
Área
computer-graphics
Tipo de issue
Error
Dificultad
4/5
Tiempo estimado
3-5 días
Estado de actividad
Estancado
Claridad
Bastante claro
Aptitud para principiantes
30/100

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.