USING: accessors arrays command-line io io.encodings.binary io.servers kernel math.parser namespaces prettyprint random ranges sequences strings ; IN: string-server : serve-string ( -- ) 10,000,000 100,000,000 over random CHAR: a CHAR: z [a..b] random [ 2dup 2array . flush ] with-global write flush ; : ( port -- server ) utf8 swap >>insecure "string.server" >>name [ serve-string ] >>handler ; : string-server-main ( -- ) command-line get [ 1239 ] [ first string>number ] if-empty start-server wait-for-server ; MAIN: string-server-main ! 100 >array [ drop "127.0.0.1" 1239 binary [ read-contents [ all-eq? ] [ length ] bi 2array ] with-client ] parallel-map