Say we want to modify the docs of errortrace
, which is bundled with
the main distribution. I assume the system is a Unix.
- Install Racket from a binary as a local distribution, so you don't have to use sudo/root.
#lang racket/base | |
(require racket/future | |
racket/flonum) | |
;;; Author: Laurent Orseau https://github.com/Metaxal | |
;;; License: [Apache License, Version 2.0](http://www.apache.org/licenses/LICENSE-2.0) or | |
;;; [MIT license](http://opensource.org/licenses/MIT) at your option. | |
;;; | |
;;; Based on the docs for racket/future, | |
;;; with one future per cpu |
#lang racket/base | |
(require quickscript | |
fmt ; needs to be installed first | |
racket/class) | |
;;; Author: Laurent Orseau | |
;;; License: [Apache License, Version 2.0](http://www.apache.org/licenses/LICENSE-2.0) or | |
;;; [MIT license](http://opensource.org/licenses/MIT) at your option. | |
(script-help-string "Format the selection or the whole program using `fmt`") |
#lang racket | |
#| | |
Save this file to "server-worker.rkt" | |
then run | |
$ time racket server-worker.rkt | |
Then toggle the commented expression in `read-msg` and again | |
$ time racket server-worker.rkt |
Say we want to modify the docs of errortrace
, which is bundled with
the main distribution. I assume the system is a Unix.
#lang racket | |
;; Allows for improper lists | |
(define (my-andmap proc l1 l2) | |
(let loop ([l1 l1] [l2 l2]) | |
(cond [(and (null? l1) (null? l2)) #t] | |
[(or (null? l1) (null? l2)) | |
(error "Lists must have the same length" (length l1) (length l2))] | |
[(and (pair? l1) (pair? l2)) | |
(and (proc (car l1) (car l2)) |
#lang racket/base | |
(require quickscript | |
racket/list | |
racket/class | |
framework | |
racket/gui/base) | |
;;; Author: Laurent Orseau https://github.com/Metaxal | |
;;; License: [Apache License, Version 2.0](http://www.apache.org/licenses/LICENSE-2.0) or |
#lang racket/base | |
;;; Author: Laurent Orseau https://github.com/Metaxal | |
;;; License: [Apache License, Version 2.0](http://www.apache.org/licenses/LICENSE-2.0) or | |
;;; [MIT license](http://opensource.org/licenses/MIT) at your option. | |
;;; Requires `commonmark` | |
(require quickscript | |
commonmark |
#lang racket | |
(require plot) | |
(define (tlayout low high) | |
(list | |
; major ticks: tick is shown with label | |
(pre-tick pi #t) | |
(pre-tick (sqrt 2) #t) | |
(pre-tick 0.5 #t) | |
; minor ticks: tick is shown, but without label |
#lang racket/base | |
(require quickscript | |
racket/gui/base | |
racket/class | |
racket/list | |
search-list-box) | |
(provide (except-out (all-defined-out) | |
search-list-box-filter)) |
#lang racket/base | |
;;; License: [Apache License, Version 2.0](http://www.apache.org/licenses/LICENSE-2.0) or | |
;;; [MIT license](http://opensource.org/licenses/MIT) at your option. | |
(require quickscript | |
racket/string | |
racket/list | |
racket/class) |