diff --git a/extra/opengl/opengl.factor b/extra/opengl/opengl.factor index ab9ae38ac1..ee58a4e345 100755 --- a/extra/opengl/opengl.factor +++ b/extra/opengl/opengl.factor @@ -87,7 +87,7 @@ MACRO: all-enabled-client-state ( seq quot -- ) : adjust-points [ [ 1 + 0.5 * ] map ] bi@ ; -: scale-points 2array flip [ v* ] with map [ v+ ] with map ; +: scale-points zip [ v* ] with map [ v+ ] with map ; : circle-points ( loc dim steps -- points ) circle-steps unit-circle adjust-points scale-points ; diff --git a/extra/webapps/counter/counter.factor b/extra/webapps/counter/counter.factor index 37b4c8e5e1..3cc1eb567b 100644 --- a/extra/webapps/counter/counter.factor +++ b/extra/webapps/counter/counter.factor @@ -1,5 +1,6 @@ USING: math kernel accessors http.server http.server.actions -http.server.sessions http.server.templating.fhtml locals ; +http.server.sessions http.server.templating +http.server.templating.fhtml locals ; IN: webapps.counter SYMBOL: count @@ -15,11 +16,11 @@ M: counter-app init-session* "" f ] >>display ; +: counter-template ( -- template ) + "resource:extra/webapps/counter/counter.fhtml" ; + : ( -- action ) - [ - "text/html" - "resource:extra/webapps/counter/counter.fhtml" >>body - ] >>display ; + [ counter-template serve-template ] >>display ; : ( -- responder ) counter-app new-dispatcher