]> gitweb.factorcode.org Git - factor.git/commitdiff
zeromq.examples: cleanup wuserver example.
authorJohn Benediktsson <mrjbq7@gmail.com>
Wed, 18 Sep 2013 22:32:06 +0000 (15:32 -0700)
committerJohn Benediktsson <mrjbq7@gmail.com>
Wed, 18 Sep 2013 22:32:06 +0000 (15:32 -0700)
extra/zeromq/examples/wuserver.factor

index 28feb95c380be793f540755ed6380e78e49f22e2..5d18b06b23ec8d5ec7a684294c2aa511a366ca69 100644 (file)
@@ -10,16 +10,18 @@ IN: zeromq.examples.wuserver
         ZMQ_PUB <zmq-socket> &dispose
         dup "tcp://*:5556" zmq-bind
         dup "ipc://weather.ipc" zmq-bind
-        random-generator get now timestamp>unix-time >fixnum seed-random [
-            [ t ] [
-                dup
-                100000 random
-                215 random 80 -
-                50 random 10 +
-                "%05d %d %d" sprintf
-                >byte-array 0 zmq-send
-            ] while
-        ] with-random drop
+
+        [
+            dup
+            100000 random
+            215 random 80 -
+            50 random 10 +
+            "%05d %d %d" sprintf
+            >byte-array 0 zmq-send
+            t
+        ] loop
+
+        drop
     ] with-destructors ;
 
 MAIN: wuserver