Skip to content

Instantly share code, notes, and snippets.

#lang racket
(require racket/stxparam
syntax/parse/define)
(define mode #f)
(define lens-view #f)
(define lens-set #f)
(define Processor-A-Lens #f)
(define Processor-C-Lens #f)
@jackfirth
jackfirth / rebellion-clients-script.rkt
Created September 10, 2019 18:10
A script that finds all packages that depend on Rebellion
#lang racket
(require net/url
rebellion/base/immutable-string
rebellion/binary/immutable-bytes)
(define/contract (get-pkgs-all-bytes)
(-> immutable-bytes?)
(bytes->immutable-bytes
(call/input-url (string->url "https://pkgs.racket-lang.org/pkgs-all")
#lang racket
(require net/url
rebellion/base/immutable-string
rebellion/binary/immutable-bytes
rebellion/collection/entry
rebellion/collection/list
rebellion/collection/multidict
rebellion/collection/multiset
rebellion/type/tuple)
@jackfirth
jackfirth / tr-clients.md
Created September 13, 2019 03:27
List of typed-racket-lib clients
  • t-test
  • GLPK
  • word
  • esc-vp21
  • math-lib
  • Quaternion
  • traces
  • irc-client
  • delay-pure
  • ebml
#lang racket
(require net/url
rebellion/base/immutable-string
rebellion/binary/immutable-bytes
rebellion/collection/entry
rebellion/collection/list
rebellion/collection/multidict
rebellion/collection/multiset
rebellion/type/record
@jackfirth
jackfirth / deprecated-main-distribution-bindings.md
Last active October 10, 2019 00:48
List of deprecated bindings in the main Racket distribution
  • racket/match
    • legacy-match-expander?
    • prop:legacy-match-expander
    • syntax-local-match-introduce
  • racket/base
    • define-struct
    • syntax-recertify
    • internal-definition-context-seal
    • identifier-remove-from-definition-context
  • syntax-local-make-delta-introducer
@jackfirth
jackfirth / racket-cleanup-regexes.md
Last active October 10, 2019 04:59
Regular expressions for finding places where Racket code can be cleaned up

File-level modules

^\(module\s

Finds files that are written in the (module ...) style instead of the #lang style. Unfortunately this also finds submodules; the search results should be filtered to only cases where the match is on the first line.

Pull request template

@jackfirth
jackfirth / report.rkt
Last active October 16, 2019 17:49 — forked from samdphillips/00-README.md
Used Rebellion in anger, take 2
#lang racket/base
(require racket/function
racket/match
racket/path
racket/sequence
rebellion/collection/entry
rebellion/collection/hash
rebellion/streaming/reducer
rebellion/streaming/transducer
@jackfirth
jackfirth / module-binding-search.rkt
Created October 19, 2019 06:28
Script for searching module bindings in a package
#lang racket/base
(require package-analysis
racket/set
rebellion/base/option
rebellion/collection/entry
rebellion/collection/multidict
rebellion/module/binding
rebellion/streaming/transducer)
@jackfirth
jackfirth / rebellion-sorting-benchmark.rkt
Last active October 26, 2019 06:38
Benchmark comparing Rebellion's sorting transducer against using `(take (sort (sequence->list seq) ...) ...)`
#lang racket
(require math/number-theory
racket/random
rebellion/base/option
rebellion/collection/entry
rebellion/collection/hash
rebellion/collection/list
rebellion/streaming/reducer
rebellion/streaming/transducer