From 2f8a6482c1b4d91eddb129f71b2dd7507141288b Mon Sep 17 00:00:00 2001 From: Tony Garnock-Jones Date: Wed, 18 Mar 2015 16:15:23 -0400 Subject: [PATCH] Waypoints at powers of (sqrt 2) --- echo-client.rkt | 23 +++++++++++++++-------- 1 file changed, 15 insertions(+), 8 deletions(-) diff --git a/echo-client.rkt b/echo-client.rkt index 2246059..648d958 100644 --- a/echo-client.rkt +++ b/echo-client.rkt @@ -53,14 +53,21 @@ ;; We work our way through these waypoints: start with one connection, ;; then 10, then 20, etc etc until we reach the end. (define waypoints - (list 1 10 20 30 40 50 60 70 80 90 100 120 - 150 200 210 220 230 240 250 260 270 280 290 300 400 - 500 600 700 800 900 - ;; Here on up, increase by ~1.2× each time - 1000 1200 1440 1728 2073 - 2488 2985 3583 4299 5159 - 6191 7430 8916 10699 12839 - 15407 18488 22186 26623)) + (list* 1 2 5 + (let loop ((n 10)) + (if (>= n 30000) + '() + (cons (inexact->exact (truncate n)) + (loop (* n (sqrt 2))))))) + ;; (list 1 10 20 30 40 50 60 70 80 90 100 120 + ;; 150 200 210 220 230 240 250 260 270 280 290 300 400 + ;; 500 600 700 800 900 + ;; ;; Here on up, increase by ~1.2× each time + ;; 1000 1200 1440 1728 2073 + ;; 2488 2985 3583 4299 5159 + ;; 6191 7430 8916 10699 12839 + ;; 15407 18488 22186 26623) + ) ;; We exchange pings with the server for this many milliseconds before ;; moving up to the next waypoint.