Tagged as "raart"

ASCII progress bar in Chez Scheme

As an impatient person, I typically use progress bars for any code that takes more than a few minutes to run. In a previous post, I wrote about creating ASCII progress bars in R and Racket.

ASCII progress bar in R and Racket

In a previous post, I used GUI toolkits to make progress bars in R and Racket. However, I usually prefer the ASCII progress bars of the progress package in R.

A simple microbenchmarking function in Racket

In a previous post, I wrote a function to perform repeated timings of untyped and typed versions of the same Racket functions. #lang racket (require math) (define (time-apply-cpu-old proc lst reps) (define out (for/list ([i (in-range reps)]) (define-values (results cpu-time real-time gc-time) (time-apply proc lst)) cpu-time)) (displayln (string-append "min: " (number->string (apply min out)) " mean: " (number->string (round (mean out))) " max: " (number->string (apply max out)) " function: " (symbol->string (object-name proc))))) time-apply-cpu-old is a wrapper function for time-apply from racket/base that runs time-apply repeatedly and prints the min, mean, and max cpu time.