1 Introduction
1.1 Which services?
1.2 Scope
2 Names
3 AWS Keys
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#lang racket | |
(require mysterx | |
racket/date) | |
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; | |
;; | |
;; ado-sql-exec-query | |
;; | |
;; Note: This will return the rows in reverse order. If you care because you |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#lang racket | |
;; 1. Run this: | |
;; | |
;; racket bug-example.rkt | |
;; | |
;; 2. Run ApacheBench: | |
;; | |
;; $ ab -n 1000 -c 20 http://localhost:8081/ | |
;; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#lang racket | |
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; | |
;; | |
;; Scenario 1: Plain function | |
;; | |
(define (def-proc ks) | |
;; Proc that takes a dict? | |
(define (f/dict d) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#lang racket | |
(define (f/raw x) | |
#t) | |
(define (f/checked x) | |
(unless (exact-nonnegative-integer? x) | |
(error 'f/checked "blah blah")) | |
#t) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#lang racket | |
;; A term sheet is a light-weight, casual version of a contract. :) | |
;; | |
;; Seriously, `define/termsheet' takes the same form as | |
;; `define/contract', but uses the contract predicates as simple | |
;; checks. As a result, this runs much faster -- e.g. ~200x faster -- | |
;; than a normal, chaperoned wrapped procedure. | |
;; | |
;; In other words it gives the declarative convenience of |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#lang racket | |
;; This has a nested with-syntax | |
(define-syntax (good stx) | |
(syntax-case stx () | |
[(_ x ...) | |
(with-syntax ([(y ...) #'(x ...)]) | |
(with-syntax ([(z ...) (generate-temporaries #'(y ...))]) | |
#'(let ([z x] ...) | |
#t)))])) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#lang racket | |
(require (for-syntax syntax/parse racket/syntax racket/list racket/match)) | |
;; First, a syntax class to recognize function arguments: | |
(begin-for-syntax | |
(define-splicing-syntax-class argspec | |
#:description "argument" | |
#:attributes (id def kw) | |
(pattern id:id #:with kw #f #:with def #f) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#lang racket | |
(define (bytes->int32s b) | |
(for/list ([i (in-range 0 (bytes-length b) 2)]) | |
(integer-bytes->integer (subbytes b i (+ i 2)) #t))) | |
(bytes->int32s #"\206\367\3447\372\245\247\374\341]\35\334\271\352\352\3527vg\270") | |
;; => '(-2170 14308 -23046 -857 24033 -9187 -5447 -5398 30263 -18329) |
OlderNewer