blob_id
stringlengths
40
40
directory_id
stringlengths
40
40
path
stringlengths
3
171
content_id
stringlengths
40
40
detected_licenses
listlengths
0
8
license_type
stringclasses
2 values
repo_name
stringlengths
6
82
snapshot_id
stringlengths
40
40
revision_id
stringlengths
40
40
branch_name
stringclasses
13 values
visit_date
timestamp[ns]
revision_date
timestamp[ns]
committer_date
timestamp[ns]
github_id
int64
1.59k
594M
star_events_count
int64
0
77.1k
fork_events_count
int64
0
33.7k
gha_license_id
stringclasses
12 values
gha_event_created_at
timestamp[ns]
gha_created_at
timestamp[ns]
gha_language
stringclasses
46 values
src_encoding
stringclasses
14 values
language
stringclasses
2 values
is_vendor
bool
2 classes
is_generated
bool
1 class
length_bytes
int64
4
7.87M
extension
stringclasses
101 values
filename
stringlengths
2
149
content
stringlengths
4
7.87M
has_macro_def
bool
2 classes
54c6d62b60cff39e5c0882f6a894ebe218439a64
ea68eff7f1911274a733a0aca2908d44ccf6f883
/workflow-petri-nets/aakbqb.rkt
14a3091dd54027902487e25e7bf7685e7f19f5e2
[]
no_license
rfindler/395-2017
ab66f5bccb25f3ae9448a3936e325662bcbc5d63
8bee3e47f686eee34da5b599941ff9ee4c7c5aa2
refs/heads/master
2021-01-12T02:31:49.401651
2017-03-06T16:44:45
2017-03-06T16:44:45
78,056,377
4
4
null
2017-02-28T20:40:54
2017-01-04T21:58:09
Racket
UTF-8
Racket
false
false
534
rkt
aakbqb.rkt
#lang s-exp "lang.rkt" #:draw "dot" #:places start middle/await middle/final good bad #:transitions a a* b1 b2 else1 else2 else3 #:arcs p:start -> t:a p:start -> t:b p:start -> t:else1 t:a -> p:middle/await p:middle/await -> t:a* p:middle/await -> t:else2 p:middle/await -> t:b1 t:a* -> p:middle/await t:b1 -> p:middle/final p:middle/final -> t:b2 p:middle/final -> t:else3 t:b2 -> p:good t:b -> p:good t:else1 -> p:bad t:else2 -> p:bad t:else3 -> p:bad #:initials 1 * start 0 * good 0 * bad 0 * middle/await 0 * middle/final
false
e2515eebf0bf9e1506cae795d0a8c652b18a7176
8a4fa6b86242f9176b5df4b2a428b2564ccaf0d8
/demos/good_demos/error-demo.rkt
9063206251c7881a7d311257aa374a22631e55e3
[]
no_license
dyoo/racket_tracer
07c5fa20634a27998b943ad8dcfd4a38e9193320
d5d4c170311dc06a491c65d39f5111e2cf4abe0d
refs/heads/master
2021-01-20T22:40:17.028584
2011-08-25T15:23:49
2011-08-25T15:23:49
1,937,637
1
0
null
null
null
null
UTF-8
Racket
false
false
398
rkt
error-demo.rkt
#lang planet tracer/tracer (define (fib x) (cond [(= x 0) (rest x)] [(= x 1) x] [#t (+ (fib (- x 1)) (fib (- x 2)))])) (check-expect (fib 2) 1) #| (check-within (fib 1) 0 1) (check-within (fib 1) 0 0) (check-error (fib 1)) (check-expect (fib 1) 2) (check-member-of 1 1 2 3 4) (check-member-of 5 1 2 3 4) (check-range 3 2 5) (check-range 2 3 5) (check-range 5 2 3) |#
false
f1c9c3b58a1d82bd3aeec4045b2bffde75124b57
8e0de54f99232e2e414bb3f34f584bdb7f89dafa
/dealer.rkt
fa1f62e8bfd3fb1ac75b5ec814993c5719b81838
[]
no_license
mfelleisen/take5
d7818c27a4c9f56090063a67e4a473eccdd1096c
f74a573087841ab701c30aed6824b450cf6948df
refs/heads/master
2021-01-10T06:34:15.202668
2016-03-06T03:25:16
2016-03-06T03:25:16
53,235,188
2
0
null
null
null
null
UTF-8
Racket
false
false
5,426
rkt
dealer.rkt
#lang racket ;; the dealer and supervisor of the deck (require "player.rkt" "basics.rkt" "utility.rkt") (types Player Name Bulls) (provide (type Dealer [Instance Dealer%]) (type Dealer% (Class ;; -> Result play-game)) (type Result [Listof [List Name Bulls]]) ;; [Listof Player] -> Dealer ;; create a dealer object that connects the players with the deck ;; and places the player's chosen cards create-dealer) ;; --------------------------------------------------------------------------------------------------- (require "deck.rkt" "stack.rkt" "card.rkt" "card-pool.rkt") (module+ test (require rackunit)) (types Deck CardPool Card) ;; Note to self: the types for the below descriptions are used out of scope for now ;; in a file-module they come back into scope (define-local-member-name ;; fields: internal% ;; [Listof [Instance Internal%]] internals ;; methods: ;; N -> Result ;; project internals to a list of player names and scores, ;; sorted in increasing order for the latter present-results ;; -> Boolean ;; has any of the internals of this dealer collected more than SIXTYSIX bull points any-player-done? ;; -> Void ;; effect: run one complete round of the game for this dealer and its players play-round ;; CardPool -> Void ;; effect: hand each player the cards for one round deal-cards ;; Deck -> Void ;; effect: run one complete turn of a round game for this dealer, its players, & current deck play-turn ;; Deck [Listof [List Internal Card]] -> Void ;; effect: place each player's designed card on this dealer's stacks (from the deck) ;; assume: the second argument are pairs of cards and players, sorted in the order to be placed place-cards) (define (create-dealer players) (new dealer% [players players])) (define dealer% (class object% (init-field ;; [Listof Player] players) (super-new) ;; --------------------------------------------------------------------------------------------- ;; representing players for the dealer (types Player%) (define-type Internal (Class (init-field ;; Player ;; the external player that this internal representation wraps player) ;; N ;; the number of bulls that this wrapped player lost (field [my-bulls N]) ;; -> N ;; retrieve my-bulls from this wrapped player bulls ;; N -> Void ;; add n to this wrapped player's bulls add-score)) (field [internal% (class player% (init-field player) (super-new [n (send player name)]) (field [my-bulls 0]) (define/public (bulls) my-bulls) (define/public (add-score n) (set! my-bulls (+ my-bulls n))))]) ;; --------------------------------------------------------------------------------------------- ;; running a game ;; [Listof Internal] (field [internals (for/list ((p players)) (new internal% [player p]))]) (define/public (play-game (shuffle values) (faces (lambda () MIN-BULL))) (displayln '(welcome to 6 takes!)) (displayln `(configuration ,(configuration))) (define n (length players)) (when (> (+ (* n HAND) STACKS) FACE) (error 'play-game "cannot play with ~a players; more cards needed" n)) (let play-game ([i 1]) (play-round shuffle faces) (if (any-player-done?) (present-results i) (play-game (+ i 1))))) (define/public (present-results i) (define sorted (sort internals < #:key (lambda (i) (send i bulls)))) `((after round ,i) ,(for/list ([p sorted]) `(,(send p name) ,(send p bulls))))) (define/public (any-player-done?) (for/or ((p internals)) (> (send p bulls) SIXTYSIX))) (define/public (play-round shuffle faces) (define card-pool (create-card-pool shuffle faces)) (define deck (create-deck card-pool)) (deal-cards card-pool) (for ((p HAND)) (play-turn deck))) (define/public (deal-cards card-pool) (for ((p internals)) (send p start-round (send card-pool draw-hand)))) (define/public (play-turn deck) (define played-cards (for/list ((p internals)) (list p (send p start-turn deck)))) (define sorted-played-cards (sort played-cards < #:key (compose card-face second))) (place-cards deck sorted-played-cards)) (define/public (place-cards deck sorted-player-cards) (for ((p+c sorted-player-cards)) (define player (first p+c)) (define card (second p+c)) (cond [(send deck larger-than-some-top-of-stacks? card) (define closest-fit-stack (send deck fit card)) (cond [(< (length closest-fit-stack) FIVE) (send deck push card)] [(= (length closest-fit-stack) FIVE) (define bulls (send deck replace closest-fit-stack card)) (send player add-score bulls)])] [else ;; the tops of all stacks have larger face values than card (define chosen-stack (send player choose deck)) (define bulls (send deck replace chosen-stack card)) (send player add-score bulls)])))))
false
f23b1284ba811b10b0cada846befb508366ca863
6858cbebface7beec57e60b19621120da5020a48
/17/1/2/3.rkt
3222d059ab99318d5b5d44ef6058d8b975dbe1df
[]
no_license
ponyatov/PLAI
a68b712d9ef85a283e35f9688068b392d3d51cb2
6bb25422c68c4c7717b6f0d3ceb026a520e7a0a2
refs/heads/master
2020-09-17T01:52:52.066085
2017-03-28T07:07:30
2017-03-28T07:07:30
66,084,244
2
0
null
null
null
null
UTF-8
Racket
false
false
25
rkt
3.rkt
(let ([x 5]) ((f 3) x))
false
d16cc4aad0ade595924a44dcdfd1043f49140030
c4efe9f6416f989524fafb128525a0a71272f680
/racket/samuel/game-states/host-multiplayer.rkt
1391218051969154ba885c36915d01b7771c96e6
[]
no_license
drautb/sketchbook
dcc6eb586ffe739ee21ab74aa6b045073d38fc6b
12255fc3cc5c2cbccbc174333c76c339d9846d67
refs/heads/master
2023-07-27T10:05:40.737633
2023-07-25T19:18:32
2023-07-25T19:18:32
28,785,534
4
3
null
2023-03-07T03:15:24
2015-01-04T20:46:06
C++
UTF-8
Racket
false
false
3,365
rkt
host-multiplayer.rkt
#lang racket (require racket/draw "../defines.rkt" "../draw.rkt" "../network.rkt" "../state-machine.rkt") (provide (all-defined-out)) ;; Game state for a hosted multplayer mode ;; The host acts as the game server, so it ticks everything. ;; It also sends the world state to the client, so it can update its view. (define host-multiplayer (new (class* object% (game-state-interface<%>) (super-new) (define listening-socket (udp-open-socket)) (define sending-socket (udp-open-socket)) (define client-host null) (define current-world null) (define last-network-update 0) (define recvd-msg (make-bytes 4096)) (define/public (on-enter) (unless (udp-bound? listening-socket) (udp-bind! listening-socket #f HOST-PORT)) (set! current-world (new-world #f))) (define/public (on-tick game) (let* ([sam (world-sam current-world)] [delta (game-time-delta game)]) (unless (sam-is-hit? sam (world-arrows current-world)) (tick-world current-world delta))) (let ([packet (receive-packet listening-socket)]) (when packet (let ([cmd (packet-data packet)] [nephite (first (world-nephites current-world))]) (cond [(cmd-join-host cmd) (set! client-host (symbol->string (cmd-join-host cmd)))] [(cmd-new-x-vel cmd) (set-sprite-x-vel! nephite (cmd-new-x-vel cmd))] [(cmd-fire-arrow cmd) (fire-arrow current-world nephite)] [else (void)])))) (unless (or (null? client-host) (< (- (current-milliseconds) last-network-update) NETWORK-UPDATE-INTERVAL-MS)) (set! last-network-update (current-milliseconds)) (send-packet sending-socket client-host CLIENT-PORT current-world))) (define/public (on-exit) (void)) (define/public (on-char game event) (let ([key-code (send event get-key-code)] [sam (world-sam current-world)]) (cond [(eq? key-code 'escape) (send (game-state-machine game) pop)] [(eq? key-code 'left) (set-sprite-x-vel! sam (- SAM-X-VEL))] [(eq? key-code 'right) (set-sprite-x-vel! sam SAM-X-VEL)] [(eq? key-code 'release) (when (or (and (eq? (send event get-key-release-code) 'left) (eq? (sprite-x-vel sam) (- SAM-X-VEL))) (and (eq? (send event get-key-release-code) 'right) (eq? (sprite-x-vel sam) SAM-X-VEL))) (set-sprite-x-vel! sam 0))] [else (void)]))) (define/public (on-mouse game event) (void)) (define/public (on-draw game canvas dc) (draw-world dc current-world)))))
false
dd616fba96d0c2733f5e2813713602886d1cfa1f
13c17f215ca8a0dd84f1c3e7971f83596dbfd539
/serialize.rkt
664380f05e51fe5555e87ea7d394619db4b49822
[ "MIT" ]
permissive
dev001hajipro/sandbox_racket
df37d233fcb74bdc39a81a8d2c3fbf09011d1e84
69f9ea61e5a7ca739079cb10774ba85cd7a52e67
refs/heads/master
2020-03-30T10:56:10.816719
2018-10-15T21:05:45
2018-10-15T21:05:45
151,144,617
0
0
null
null
null
null
UTF-8
Racket
false
false
206
rkt
serialize.rkt
#lang racket (require racket/serialize) (struct post (title body)) (define BLOG (list (post "first" "hello") (post "apple" "orange"))) (serializable? #t) (serializable? BLOG)
false
5ff219f30f1c39a265c332475c95caaf8ac21f0c
49bef55e6e2ce9d3e64e55e71496be8f4fc7f4f3
/rb/sections/cellular-automata.scrbl
185f1063adba515682290d19e969bc0168f87a91
[]
no_license
brittAnderson/compNeuroIntro420
13dad04726c1bf3b75a494bc221c0c56f52a060f
ad4211f433c22f647b1bf2e30561106178b777ab
refs/heads/racket-book
2023-08-10T18:34:48.611363
2023-07-28T15:59:50
2023-07-28T15:59:50
78,282,622
26
97
null
2023-07-22T19:50:59
2017-01-07T14:10:01
JavaScript
UTF-8
Racket
false
false
7,412
scrbl
cellular-automata.scrbl
#lang scribble/book @(require scribble/base scribble-math/dollar scribble/example scribble/manual symalg scriblib/figure scribble/core scribble/html-properties) @(define ca-eval (let ([eval (make-base-eval)]) (eval '(begin (require "./code/ca.rkt"))) eval)) @title{Introduction to Linear Algebra and Neural Networks} @section{Linear Algebra Goals} Our goal for the next few lessons is to come to understand @itemlist[@item{What is a neural network?} @item{What mathematics are needed to build a neural network?} @item{How can neural networks help us understand cognition?}] As a first illustration of some of the key ideas we will execute a simple cellular automata rule. What I hope to emphasize through this exercise is that whenever you can get the computer to do a repetitive task do so. It will do it much better than you. And even if it takes you days to get the program right for many task you will quickly save the time in the long run. Second, we are using a simple rule (as you will shortly see). But even though the rule is local it yields impressive global structure. And very slight tweaks in this local rule can lead to large macroscopic changes. While the variation in our rule is very limited the array of behaviors we can observe is vast. @margin-note*{Match these features to facts about neurons. Extend them to what you believe will be their application in neural networks.} @section{Drawing Cellular Automata} This activity has several stages. For the first stage make sure you can load the file @hyperlink{"./../code/ca.rkt"} into Dr Racket and that it runs. Next, pick a number between 0 and 255 inclusive. In your interactive window use the function @tt{rule-tester} to generate the input-output pairing for your rule like so. @examples[#:label "Testing Rule 22" #:eval ca-eval (rule-tester 22 test-set)] Use your rule and a piece of graph paper to implement your rule. Color a single black square in the middle of the top row. Then moving down one row and working left to right implement your rule by coloring in the appropriate square. @figure[ "fig:grid-automata" @elem{Nearest Neighbors in the Grid} @elem{@image[#:scale 1.0]{./images/grid.png}}] For example, if the boxes 1, 2, and 3 were 'w, 'w, and 'b I could color the square with the question mark black. Then I would move one to the right and square 2 would become my new number 1 and so on. Complete several rows following your rule. What you have probably noticed is that this is tedious and mistake prone, but your rule is a good example of a function. A function can be conceived as a set of pairs. The first element of the pair is the input, and the second element of the pair is the output. Functions require that each input element be unique. Implementing your rule makes you the metaphorical neuron deciding whether or not to fire (color the square black) based on the input you receive from neighboring neurons. Having learned how tedious and error prone this process explore some of the other rules using the functions in @tt{ca.rkt}. The simplest method is to use the function @tt{d-r-a <some-rule-number>}. You can adjust the size and scale with various optional arguments and even print it to a file if you find one you like. Here is one of my favorites as a demonstration. @examples[#:label "Rule 110" #:eval ca-eval (d-r-a 110 #:num-rows 100 #:num-cols 100 #:scale 3)] What are the lessons learned from this exercise? @itemlist[#:style 'ordered @item{Repetitive actions are hard. We (humans) make mistakes following even simple rules for a large number of repeated steps. Better to let the computer do it since that is where its strengths lie.} @item{Complex global patterns can emerge from local actions. Each neuron is only responding to its immediate right and left yet global structures emerge.} @item{These characteristics seem similar to brain activity. Each neuron in the brain is just one of many. Whether a neuron spikes or not is a consequence of its own state and its inputs (like the neighbors in the grid example).} @item{From each neuron making a local computation, global patterns of complex activity can emerge.} @item{Maybe by programming something similar to this system we can get insights into brain activity.}] @subsection{Comments on the programmatic implementation} The code in @tt{ca.rkt} involves a lot of looping. I used @italic{for} loops extensively, though sometimes these were @tt{for/fold} variants. We need to inch along the columns and down the rows. The plotting used the built in functionality of @bold{racket} for generating pictures as output. The potentially more tricky part was going from a number (in decimal) to a binary representation that had the right number of places occupied. I ended going back and forth between strings and lists to get what I wanted. This was undoubtedly a kludge, but there is a slogan to first get it working, and then make it better. Trying to be too perfect and too elegant can cost you time in the long run. It is often easier to revise a functioning program then write one from the start. Initially I did not have all the testing code, because I was adapting code I had written in the past. However, when things did not work it turned out I went faster by slowing down and writing code that allowed me to inspect the state of my various variables, and individually try out the small functions on test input. @section{More Lessons from Cellular Automata} Cellular automata demonstrate some basic lessons that we will make use of when thinking about neural networks. One of these points is that there may be simple representations for complex entities. If we can find the right language for representation we may get concision and repeatability as by-products. This is demonstrated by the @hyperlink["https://plato.stanford.edu/entries/cellular-automata/supplement.html"]{naming convention for the rules of cellular automata}. In emphasizing that local decisions can produce interesting global effects it may be interesting to examine other similar uses of the cellular automata idea. One famous and visually pleasing one is the @hyperlink["https://en.wikipedia.org/wiki/Conway%27s_Game_of_Life"]{Game of Life}. The analogy of automata to simple neurons may be deeper than at first it appears. Some very famous thinkers connected the two. One of the most brilliant people of all time, John von Neumann, was working on a book about automata and the brain at the time of his death. I have linked to a commentary in case you are interested in reading further see @hyperlink["http://www.ams.org/bull/1958-64-03/S0002-9904-1958-10214-1/S0002-9904-1958-10214-1.pdf"]{Claude Shannon (pdf)} as well as to a pdf @hyperlink["https://complexityexplorer.s3.amazonaws.com/supplemental_materials/5.6+Artificial+Life/The+Computer+and+The+Brain_text.pdf"]{copy} of the book: @hyperlink["https://ocul-wtl.primo.exlibrisgroup.com/permalink/01OCUL_WTL/vk29fk/alma994863683505162"]{The Computer and the Brain}). A contemporary mathematician and the inventor of the Mathematica software system also believes that cellular automata may be a theory of everything. See what Stephen Wolfram @hyperlink["http://www.wolframscience.com"]{thinks}.
false
974ba76903af973303a39e63d3aef715667941e1
8a3ecae10d8cb1d0b3daeb7dce09c182d83cdd79
/syntax-warn-base/warn/private/syntax-srcloc.rkt
093c3bd63568619a3c3ec03480d8a4be75daa1b1
[ "MIT" ]
permissive
jackfirth/syntax-warn
2b6c3d7b684d3b3f705a738dc693a8882b3756f1
f17fdd3179aeab8e5275a24e7d091d3ca42960a9
refs/heads/master
2020-12-24T06:46:55.112588
2019-12-07T05:06:04
2019-12-07T05:06:04
56,571,931
8
6
null
2017-08-16T21:07:10
2016-04-19T06:47:10
Racket
UTF-8
Racket
false
false
6,144
rkt
syntax-srcloc.rkt
#lang racket/base (require racket/contract/base "syntax-srcloc-data.rkt") (provide (all-from-out "syntax-srcloc-data.rkt") (contract-out [tree/c (-> contract? contract?)] [tree-map (-> (tree/c any/c) procedure? (tree/c any/c))] [syntax-srcloc (-> syntax? srcloc?)] [syntax-complete-srcloc (-> syntax? complete-srcloc?)] [syntax-complete-srcloc-tree (-> syntax? (tree/c complete-srcloc?))])) (require racket/list racket/match syntax/srcloc syntax/parse/define "list.rkt") (module+ test (require racket/function rackunit)) (define (tree/c item/c) (or/c empty? (recursive-contract (cons/c item/c (listof (tree/c item/c)))))) (module+ test (test-case "tree/c" (define (x-tree? v) (with-handlers ([exn:fail:contract? (const #f)]) (invariant-assertion (tree/c 'x) v) #t)) (check-pred x-tree? '()) (check-pred x-tree? '(x)) (check-pred x-tree? '(x () () ())) (check-pred x-tree? '(x (x (x)) () (x () (x) ()))) (define (not-x-tree? v) (not (x-tree? v))) (check-pred not-x-tree? '(a)) (check-pred not-x-tree? '(x x)) (check-pred not-x-tree? '(x () x)))) (define (tree-map a-tree f) (match a-tree [(list) (list)] [(cons v children) (define (recur child) (tree-map child f)) (cons (f v) (map recur children))])) (module+ test (test-case "tree-map" (check-equal? (tree-map '(1 (2) (3 (4) (5)) (6)) add1) '(2 (3) (4 (5) (6)) (7))))) (define (syntax-srcloc stx) (build-source-location stx)) (define (syntax-complete-srcloc-tree stx) (cons (syntax-complete-srcloc stx) (map syntax-complete-srcloc-tree (or (syntax->list stx) '())))) (define (syntax-complete-srcloc stx) (check-syntax-srcloc-complete stx) (define datum (syntax-e stx)) (cond [(pair? datum) (syntax-complete-srcloc/pair stx)] [(vector? datum) (syntax-complete-srcloc/vector stx)] [(box? datum) (syntax-complete-srcloc/box stx)] [(hash? datum) (syntax-complete-srcloc/hash stx)] [else (syntax-complete-srcloc/single-line stx)])) (define (syntax-complete-srcloc/single-line stx) (define-srcloc-values (source pos line col span) stx) (complete-srcloc #:source source #:position pos #:position-span span #:line line #:line-span 0 #:column col #:column-end (+ col span))) (define (syntax-complete-srcloc/pair stx) (define incomplete-parentloc (build-source-location stx)) (define child-srclocs (map syntax-complete-srcloc (list*->list (syntax-e stx)))) (check-child-srclocs-valid stx child-srclocs incomplete-parentloc) (define firstloc (first child-srclocs)) (define lastloc (last child-srclocs)) (define source (complete-srcloc-source firstloc)) (define position (srcloc-position incomplete-parentloc)) (define position-span (add1 (- (complete-srcloc-position-end lastloc) position))) (define line (srcloc-line incomplete-parentloc)) (define line-span (- (complete-srcloc-line-end lastloc) line)) (define column (srcloc-column incomplete-parentloc)) (define column-end (add1 (complete-srcloc-column-end lastloc))) (complete-srcloc #:source source #:position position #:position-span position-span #:line line #:line-span line-span #:column column #:column-end column-end)) (define (syntax-complete-srcloc/vector stx) #f) (define (syntax-complete-srcloc/box stx) #f) (define (syntax-complete-srcloc/hash stx) #f) (define-simple-macro (define-srcloc-values (source:id pos:id line:id col:id span:id) source-location:expr) (define-values (source pos line col span) (let ([loc source-location]) (values (source-location-source loc) (source-location-position loc) (source-location-line loc) (source-location-column loc) (source-location-span loc))))) (define (check-syntax-srcloc-complete stx) (define loc (build-source-location stx)) (define (check-field name getter) (unless (getter loc) (raise-arguments-error 'syntax-complete-srcloc "syntax source location is incomplete" "syntax" stx "location" loc "missing" name))) (check-field "source" srcloc-source) (check-field "position" srcloc-position) (check-field "line" srcloc-line) (check-field "column" srcloc-column) (check-field "span" srcloc-span)) (define (check-child-srclocs-valid stx locs incomplete-parentloc) (define (check-child-field-after loc field-name field-getter field-baseline) (define field-value (field-getter loc)) (unless (< field-baseline field-value) (raise-arguments-error 'syntax-complete-srcloc (format "child has ~a not after parent ~a" field-name field-name) "syntax" stx (format "parent ~a" field-name) field-baseline (format "child ~a" field-name) field-value))) (define (check-child-field-not-before loc field-name field-getter field-baseline) (define field-value (field-getter loc)) (unless (<= field-baseline field-value) (raise-arguments-error 'syntax-complete-srcloc (format "child has ~a before parent ~a" field-name field-name) "syntax" stx (format "parent ~a" field-name) field-baseline (format "child ~a" field-name) field-value))) (for/fold ([position (srcloc-position incomplete-parentloc)] [line (srcloc-line incomplete-parentloc)] [column (srcloc-column incomplete-parentloc)]) ([loc locs]) (check-child-field-after loc "position" complete-srcloc-position position) (check-child-field-not-before loc "line" complete-srcloc-line line) (when (equal? line (complete-srcloc-line loc)) (check-child-field-after loc "column" complete-srcloc-column column)) (values (complete-srcloc-position loc) (complete-srcloc-line loc) (complete-srcloc-column loc))) (void))
false
9c2d122a80238285fb4d6e9dd6fbbd4f04c53c8b
9dc77b822eb96cd03ec549a3a71e81f640350276
/module/binding.scrbl
d8b0900b165a65fe10c6851f529a3bd5b2186116
[ "Apache-2.0" ]
permissive
jackfirth/rebellion
42eadaee1d0270ad0007055cad1e0d6f9d14b5d2
69dce215e231e62889389bc40be11f5b4387b304
refs/heads/master
2023-03-09T19:44:29.168895
2023-02-23T05:39:33
2023-02-23T05:39:33
155,018,201
88
21
Apache-2.0
2023-09-07T03:44:59
2018-10-27T23:18:52
Racket
UTF-8
Racket
false
false
1,785
scrbl
binding.scrbl
#lang scribble/manual @(require (for-label racket/base racket/contract/base racket/set rebellion/module/binding rebellion/module/phase) (submod rebellion/private/scribble-evaluator-factory doc) scribble/example) @(define make-evaluator (make-module-sharing-evaluator-factory #:public (list 'rebellion/module/binding) #:private (list 'racket/base))) @title{Module Bindings} @defmodule[rebellion/module/binding] @defproc[(module-binding? [v any/c]) boolean?] @defproc[(module-binding [source module-path?] [phase execution-phase?] [name symbol?]) module-binding?] @defproc[(module-binding-source [binding module-binding?]) module-path?] @defproc[(module-binding-phase [binding module-binding?]) phase?] @defproc[(module-binding-name [binding module-binding?]) symbol?] @defproc[(module-bindings [mod module-path?]) (set/c module-binding?)]{ Returns the set of bindings currently defined by @racket[mod], including both provided bindings and internal bindings. @(examples #:eval (make-evaluator) #:once (module-bindings 'racket/vector))} @defproc[(module-provided-bindings [mod module-path?]) (set/c module-binding?)]{ Returns the set of bindings currently defined and exported by @racket[mod] with @racket[provide]. @(examples #:eval (make-evaluator) #:once (module-provided-bindings 'racket/vector))} @defproc[(module-internal-bindings [mod module-path?]) (set/c module-binding?)]{ Returns the set of bindings currently defined by @racket[mod] but @emph{not} provided. @(examples #:eval (make-evaluator) #:once (module-internal-bindings 'racket/vector))}
false
e308c1adc96ddd9baaabcc32c2bac03bbd06abe3
4b1178b66f1a666fdd78db634a380e9496b8285f
/slv2/lv2.rkt
7260d978448c7fa02a080df9cff436a86a90cadb
[ "BSD-2-Clause" ]
permissive
jbclements/rai
51cf5181466c151f8d3543f8d0f56e29fe7f34d0
89bce2e4a938e2914a43b7117923c683c54fd27b
refs/heads/master
2021-01-12T21:27:34.982852
2013-12-28T20:36:20
2013-12-28T20:36:20
null
0
0
null
null
null
null
UTF-8
Racket
false
false
1,128
rkt
lv2.rkt
#lang racket/base ;; Core LV2 independent of libslv2. (require ffi/unsafe) (provide (all-defined-out)) (define _lv2_features (_or-null (_cpointer 'LV2Features))) (define _lv2_handle (_cpointer 'LV2_Handle)) ;; The type of this is defined in the metadata. ;; audio : array of floats ;; control : single float (define _lv2_port_data (_cpointer 'port_data)) (define-cstruct _lv2_descriptor ([URI _string/utf-8] ;; You probably want to use slv2_plugin_instantiate instead. [instantiate (_fun _lv2_descriptor-pointer _double ;; sample rate _string/utf-8 ;; bundle path _lv2_features ;; features -> _lv2_handle)] [connect_port (_fun _lv2_handle _uint _lv2_port_data -> _void)] [activate (_fun _lv2_handle -> _void)] [run (_fun _lv2_handle _uint -> _void)] [deactivate (_fun _lv2_handle -> _void)] [cleanup (_fun _lv2_handle -> _void)] [extension_data (_fun _lv2_handle _string/utf-8 -> _bytes)] ))
false
f72d95a610a6bf74cc1eeea3fb2fdae87f51cb16
0ee5fbea334ed3da43a3ed00b026def54e5953d9
/change.rkt
881c646a954a9c697f4274286211df4a9d11e94e
[]
no_license
franciscocontrerasca/racket-samples
9fe353e715cc4a68e9f74cd744f5845e88be8877
7193740d2acc5c85af4616d4712654a976f8288f
refs/heads/master
2021-01-18T03:32:58.313919
2015-11-13T15:59:59
2015-11-13T15:59:59
null
0
0
null
null
null
null
UTF-8
Racket
false
false
584
rkt
change.rkt
#!/usr/bin/env racket #lang racket ; This module contains an unoptimized example of the solution of calculating ; the loose change of a given amount, this file has a python file companion (define (change n coins [current-coin (if (empty? coins) empty (car coins))]) (cond [(null? current-coin) (raise 'failed #t)] [(= (- n current-coin) 0) (cons current-coin empty)] [(< (- n current-coin) 0) (change n (cdr coins))] [else (cons current-coin (change (- n current-coin) coins))])) (let ([coins '(100 50 20 10 5 1 0.5)]) (change (read) coins) )
false
73b5d59f36ae631887b7f61f2882e66be7c7667d
425f519523e5b040a1db8e4eaca7d0320ac55313
/src/with-warmup/fib.rkt
9852b531dc296173183d25e75f079c29806018a3
[]
no_license
cderici/pycket-performance
f30390f7ec66ec61135eefd0e863e9f51131ca7b
8cac7d69b55381c07a90e919c4c25eb397b99442
refs/heads/master
2020-03-27T05:04:50.495274
2019-02-13T02:00:46
2019-02-13T02:00:53
145,992,592
2
0
null
null
null
null
UTF-8
Racket
false
false
440
rkt
fib.rkt
;;; FIB -- A classic benchmark, computes fib(35) inefficiently. #lang racket/base #;(require "both.rkt" "conf.rkt") (require "conf.rkt") (define outer 100) ;20) ;(define fib-iters 1) ;25) (define (fib n) (if (< n 2) n (+ (fib (- n 1)) (fib (- n 2))))) (define (main) (do ([i 1 (add1 i)]) ((> i outer) (void)) (time (do ([i 1 (add1 i)]) ((> i fib-iters) (void)) (fib 35))))) (main)
false
0c268d33472713150e769d9523df69952962a153
b08b7e3160ae9947b6046123acad8f59152375c3
/Programming Language Detection/Experiment-2/Dataset/Train/Racket/narcissistic-decimal-number-1.rkt
6ba1a79f37edffbcbd03b0dbd9aff737076a34f2
[]
no_license
dlaststark/machine-learning-projects
efb0a28c664419275e87eb612c89054164fe1eb0
eaa0c96d4d1c15934d63035b837636a6d11736e3
refs/heads/master
2022-12-06T08:36:09.867677
2022-11-20T13:17:25
2022-11-20T13:17:25
246,379,103
9
5
null
null
null
null
UTF-8
Racket
false
false
2,885
rkt
narcissistic-decimal-number-1.rkt
;; OEIS: A005188 defines these as positive numbers, so I will follow that definition in the function ;; definitions. ;; ;; 0: assuming it is represented as the single digit 0 (and not an empty string, which is not the ;; usual convention for 0 in decimal), is not: sum(0^0), which is 1. 0^0 is a strange one, ;; wolfram alpha calls returns 0^0 as indeterminate -- so I will defer to the brains behind OEIS ;; on the definition here, rather than copy what I'm seeing in some of the results here #lang racket ;; Included for the serious efficientcy gains we get from fxvectors vs. general vectors. ;; ;; We also use fx+/fx- etc. As it stands, they do a check for fixnumness, for safety. ;; We can link them in as "unsafe" operations (see the documentation on racket/fixnum); ;; but we get a result from this program quickly enough for my tastes. (require racket/fixnum) ; uses a precalculated (fx)vector of powers -- caller provided, please. (define (sub-narcissitic? N powered-digits) (let loop ((n N) (target N)) (cond [(fx> 0 target) #f] [(fx= 0 target) (fx= 0 n)] [(fx= 0 n) #f] [else (loop (fxquotient n 10) (fx- target (fxvector-ref powered-digits (fxremainder n 10))))]))) ; Can be used as standalone, since it doesn't require caller to care about things like order of ; magnitude etc. However, it *is* slow, since it regenerates the powered-digits vector every time. (define (narcissitic? n) ; n is +ve (define oom+1 (fx+ 1 (order-of-magnitude n))) (define powered-digits (for/fxvector ((i 10)) (expt i oom+1))) (sub-narcissitic? n powered-digits)) ;; next m primes > z (define (next-narcissitics z m) ; naming convention following math/number-theory's next-primes (let-values ([(i l) (for*/fold ((i (fx+ 1 z)) (l empty)) ((oom (in-naturals)) (dgts^oom (in-value (for/fxvector ((i 10)) (expt i (add1 oom))))) (n (in-range (expt 10 oom) (expt 10 (add1 oom)))) #:when (sub-narcissitic? n dgts^oom) ; everyone else uses ^C to break... ; that's a bit of a manual process, don't you think? #:final (= (fx+ 1 (length l)) m)) (values (+ i 1) (append l (list n))))]) l)) ; we only want the list (module+ main (next-narcissitics 0 25) ; here's another list... depending on whether you believe sloane or wolfram :-) (cons 0 (next-narcissitics 0 25))) (module+ test (require rackunit) ; example given at head of task (check-true (narcissitic? 153)) ; rip off the first 12 (and 0, since Armstrong numbers seem to be postivie) from ; http://oeis.org/A005188 for testing (check-equal? (for/list ((i (in-range 12)) (n (sequence-filter narcissitic? (in-naturals 1)))) n) '(1 2 3 4 5 6 7 8 9 153 370 371)) (check-equal? (next-narcissitics 0 12) '(1 2 3 4 5 6 7 8 9 153 370 371)))
false
fa30fc794877cb1bd69d13307c28d59d315fbeb1
2bb711eecf3d1844eb209c39e71dea21c9c13f5c
/test/unbound/lra/fib.rkt
89b650ef61f7d9f4762361f969d2f6d879e1924b
[ "BSD-2-Clause" ]
permissive
dvvrd/rosette
861b0c4d1430a02ffe26c6db63fd45c3be4f04ba
82468bf97d65bde9795d82599e89b516819a648a
refs/heads/master
2021-01-11T12:26:01.125551
2017-01-25T22:24:27
2017-01-25T22:24:37
76,679,540
2
0
null
2016-12-16T19:23:08
2016-12-16T19:23:07
null
UTF-8
Racket
false
false
461
rkt
fib.rkt
#lang rosette/unbound (require rackunit rackunit/text-ui rosette/lib/roseunit) (current-bitwidth #f) (define-symbolic m integer?) (define/unbound (fib n) (~> integer? integer?) (if (< n 2) 1 (+ (fib (- n 1)) (fib (- n 2))))) (define fib-tests (test-suite+ "[unbound] Tests for lra/fib.rkt" (check-unsat (verify/unbound (assert (> (fib m) 0)))) (check-sat (verify/unbound (assert (> (fib m) 1)))))) (time (run-tests fib-tests))
false
a68d3f71d669adcfbcc2f7f14a9fe69f09329bac
ea4a41b03c6d95c956655af36a8e955620714e7e
/tests/functions_test_1.rkt
144fc3ba0ea674a02123a6c324ddfa760f84d4ff
[ "MIT" ]
permissive
IUCompilerCourse/public-student-support-code
9932dec1499261370c554690cee983d569838597
58c425df47b304895725434b441d625d2711131f
refs/heads/master
2023-08-13T07:29:56.236860
2023-06-05T18:05:29
2023-06-05T18:05:29
145,449,207
141
70
MIT
2023-08-23T01:16:47
2018-08-20T17:26:01
Racket
UTF-8
Racket
false
false
50
rkt
functions_test_1.rkt
(define (id [x : Integer]) : Integer x) (id 42)
false
a68c9070f88e3da76140674b2908b4c8184b1153
554db83ea2a7f7e79d678d2dd4b53a12c6c07c90
/scribblings/dynamic-xml.scrbl
3ba1b4f3b427fe3466505b7ad03f631b9eddb53d
[ "MIT" ]
permissive
zyrolasting/dynamic-xml
1e4a42da2d8bdee7d3b33c50b928eded567b5953
0e41c5b26fd0780604d0ecdc27d1e2c40faceb97
refs/heads/master
2021-05-28T19:37:07.813407
2020-05-05T23:19:25
2020-05-05T23:19:25
254,278,408
0
0
null
null
null
null
UTF-8
Racket
false
false
3,185
scrbl
dynamic-xml.scrbl
#lang scribble/manual @require[@for-label[racket/base racket/contract dynamic-xml xml]] @title{Translate X-Expressions to Keyword Procedure Applications} @author{Sage Gerard} @defmodule[dynamic-xml] This small library provides the means to apply keyword procedures using X-expressions. This is useful for XML-based document processors that either want to support custom elements, or transform existing elements. @bold{Beware:} While I mention the @racket[xexpr?] predicate below, my contracts don't actually use it. The cost of checking element trees add up quickly, so I don't impose it. @section{Reference} @defproc[(apply-xexpr-element [x xexpr?] [#:recurse? recurse? boolean? #t] [lookup (-> symbol? procedure?) make-xexpr-proc]) xexpr?]{ Let this element be bound to @racketfont{E}: @racketblock[ '(p ((id "my-paragraph") (class "colorized")) (b "I am bold") "and I am bland.") ] @racket[(apply-xexpr-element E #:recurse? #f)] is equivalent to the following expression: @racketblock[ ((lookup 'p) #:id "my-paragraph" #:class "colorized" '(b ((style "color: #f00")) "I am bold") "and I am bland.") ] When @racket[#:recurse?] is set to a true value, then the same treatment applies to all descendent elements. @racketblock[ ((lookup 'p) #:id "my-paragraph" #:class "colorized" ((lookup 'b) #:style "color: #f00" "I am bold") "and I am bland.")] @racket[(apply-xexpr-element #:recurse? #t E make-xexpr-proc)] will return an X-expression equivalent to @racket[E], except attributes will match the @racket[keyword<?] ordering imposed by an internal use of @racket[keyword-apply], and empty attribute lists will be removed from the output. To adjust the latter behavior, bind @racket[lookup] to a different use of @racket[make-xexpr-proc]. } @defproc[(make-xexpr-proc [t symbol?] [#:always-show-attrs? show-attrs any/c #f]) procedure?]{ Returns a procedure that creates X-expressions with tag @racket[t]. Keyword arguments turn into the attribute list of the output element. Formal arguments turn into children of said element. If the element has no attributes, then no attribute list will appear in the output X-expression unless @racket[show-attrs] is a true value. @racketinput[ ((make-xexpr-proc 'script) #:type "text/javascript" "function foo() { return 1 + 1; }") ] @racketresult[ '(script ((type "text/javascript")) "function foo() { return 1 + 1; }") ] @racketinput[ ((make-xexpr-proc #:always-show-attrs? #t 'p) "hi") ] @racketresult[ '(p () "hi") ] } @defproc[(kwargs->attributes [kws (listof keyword?)] [kw-args list?]) list?]{ A helper procedure that translates keyword arguments into an X-expression attribute list. The attributes follow the order of @racket[kws] and @racket[kw-args]. @racketinput[(kwargs->attributes '(#:id #:style) '("ID" "color: #fff"))] @racketresult['((id "ID") (style "color: #fff"))] }
false
d67f85234ae7ab6e91d576db8c94c3a7612adfd7
25a6efe766d07c52c1994585af7d7f347553bf54
/gui-lib/mrlib/private/aligned-pasteboard/tests/insertion-without-display.rkt
d6e82fbc7f8faa431b1d6ec73dd7afa625799ad8
[ "MIT", "Apache-2.0", "LicenseRef-scancode-unknown-license-reference" ]
permissive
racket/gui
520ff8f4ae5704210822204aa7cd4b74dd4f3eef
d01d166149787e2d94176d3046764b35c7c0a876
refs/heads/master
2023-08-25T15:24:17.693905
2023-08-10T16:45:35
2023-08-10T16:45:35
27,413,435
72
96
NOASSERTION
2023-09-14T17:09:52
2014-12-02T03:35:22
Racket
UTF-8
Racket
false
false
207
rkt
insertion-without-display.rkt
#lang racket/gui (require mrlib/aligned-pasteboard) (with-handlers ([exn? (lambda (x) #f)]) (send (new pasteboard%) insert (new aligned-editor-snip% [editor (new horizontal-pasteboard%)])) #t)
false
16a0b178426bd9d80937bfd59b6f0a690ed64b1a
f987ad08fe780a03168e72efce172ea86ad5e6c0
/plai-lib/tests/gc/other-mutators/begin.rkt
c56132526137b91543280a1d8e5f74d7e5ef6481
[ "LicenseRef-scancode-unknown-license-reference", "MIT", "Apache-2.0" ]
permissive
racket/plai
a76573fdd29b648e04f8adabcdc8fb1f6825d036
ae42bcb581ab02dcb9ddaea98d5ecded589c8d47
refs/heads/master
2023-08-18T18:41:24.326877
2022-10-03T02:10:02
2022-10-03T02:10:14
27,412,198
11
12
NOASSERTION
2022-07-08T19:16:11
2014-12-02T02:58:30
Racket
UTF-8
Racket
false
false
145
rkt
begin.rkt
#lang plai/mutator (allocator-setup "../good-collectors/good-collector.rkt" 6) (define (go) (let ([obj 'z]) 2 3 (symbol? obj))) (go)
false
01189562e9924dd4da6bc70e18f5e8521d9c6efb
453869ca6ccd4c055aa7ba5b09c1b2deccd5fe0c
/tests/basic/protect-out.rkt
2f9ae07ed16410f1c66fd5827c2744fd66ad3de2
[ "MIT" ]
permissive
racketscript/racketscript
52d1b67470aaecfd2606e96910c7dea0d98377c1
bff853c802b0073d08043f850108a57981d9f826
refs/heads/master
2023-09-04T09:14:10.131529
2023-09-02T16:33:53
2023-09-02T16:33:53
52,491,211
328
16
MIT
2023-09-02T16:33:55
2016-02-25T02:38:38
Racket
UTF-8
Racket
false
false
106
rkt
protect-out.rkt
#lang racket/base (define (f x) x) (define-for-syntax (f1 x) x) (provide (protect-out f (for-meta 1 f1)))
false
9ddeee904cfc975bd48f8db410e1ed79b5ba2fb9
17126876cd4ff4847ff7c1fbe42471544323b16d
/beautiful-racket-demo/hdl-tst-demo/expander.rkt
fce15259653c9fd0ab676ff302baa9f561b97ca8
[ "MIT" ]
permissive
zenspider/beautiful-racket
a9994ebbea0842bc09941dc6d161fd527a7f4923
1fe93f59a2466c8f4842f17d10c1841609cb0705
refs/heads/master
2020-06-18T11:47:08.444886
2019-07-04T23:21:02
2019-07-04T23:21:02
196,293,969
1
0
NOASSERTION
2019-07-11T00:47:46
2019-07-11T00:47:46
null
UTF-8
Racket
false
false
3,163
rkt
expander.rkt
#lang br/quicklang (require (for-syntax racket/string) rackunit racket/file) (provide #%module-begin (all-defined-out)) (define (print-cell val fmt) (match-define (list _ radix-letter number-strings) (regexp-match #px"^%(.)(.*)$" fmt)) ; like %B1.16.1 (match-define (list left-margin width right-margin) (map string->number (string-split number-strings "."))) (cond [(number? val) (define radix (case radix-letter [("B") 2])) (string-append (make-string left-margin #\space) (~r val #:min-width width #:pad-string "0" #:base radix) (make-string right-margin #\space))] [(string? val) (~a val #:min-width (+ left-margin width right-margin) #:pad-string " " #:align 'center)] [else (error 'unknown-value)])) (define (print-line output-filename cells) (with-output-to-file output-filename (λ () (printf (format "~a\n" (string-join cells "|" #:before-first "|" #:after-last "|")))) #:mode 'text #:exists 'append)) (module+ test (require rackunit) (define a 123) (check-equal? (print-cell a "%B1.16.1") " 0000000001111011 ") (check-equal? (print-cell "out" "%B1.16.1") " out ") (check-equal? (print-cell "out" "%B3.1.3") " out ") (check-equal? (print-cell "in" "%B3.1.3") " in ")) (define-for-syntax chip-prefix #f) (define-macro (program EXPR ...) (with-shared-id (compare-files) #'(begin EXPR ... (compare-files)))) (define-macro (load-expr CHIPFILE-STRING) (set! chip-prefix (string-replace (syntax->datum #'CHIPFILE-STRING) ".hdl" "")) (with-pattern ([CHIPFILE.RKT (format-string "~a.rkt" #'CHIPFILE-STRING)]) #'(require CHIPFILE.RKT))) (define-macro (output-file-expr OUTPUT-FILE-STRING) (with-shared-id (output-file output-filename) #'(begin (define output-filename OUTPUT-FILE-STRING) (with-output-to-file output-filename (λ () (printf "")) #:mode 'text #:exists 'replace)))) (define-macro (compare-to-expr COMPARE-FILE-STRING) (with-shared-id (compare-files output-filename) #'(define (compare-files) (check-equal? (file->lines output-filename) (file->lines COMPARE-FILE-STRING))))) (define-macro (output-list-expr (COL-NAME FORMAT-SPEC) ...) (with-shared-id (eval-result eval-chip output output-filename) (with-pattern ([(COL-ID ...) (suffix-ids #'(COL-NAME ...) "")] [(CHIP-COL-ID ...) (prefix-ids chip-prefix "-" #'(COL-NAME ...))]) #'(begin (define (output COL-ID ...) (print-line output-filename (map print-cell (list COL-ID ...) (list FORMAT-SPEC ...)))) (define eval-result #f) (define (eval-chip) (list (CHIP-COL-ID) ...)) (output COL-NAME ...))))) (define-macro (set-expr IN-BUS IN-VAL) (with-pattern ([CHIP-IN-BUS-ID-WRITE (prefix-id chip-prefix "-" (suffix-id #'IN-BUS "-write"))]) #'(CHIP-IN-BUS-ID-WRITE IN-VAL))) (define-macro (eval-expr) (with-shared-id (eval-result eval-chip) #'(set! eval-result (eval-chip)))) (define-macro (output-expr) (with-shared-id (output eval-result) #'(apply output eval-result)))
false
5793235265581a2cae36bea2e76dc2ae54292040
627680558b42ab91471b477467187c3f24b99082
/chapters/evaluation/evaluation.scrbl
4b15b7370dea669c8d31a04e03eb5650f0414521
[]
no_license
bfetscher/dissertation
2a579aa919d6173a211560e20630b3920d108412
148d7f9bb21ce29b705522f7f4967d63bffc67cd
refs/heads/master
2021-01-12T12:57:45.507113
2016-10-06T06:54:21
2016-10-06T06:54:21
70,130,350
0
1
null
2016-10-06T14:01:38
2016-10-06T06:58:19
Racket
UTF-8
Racket
false
false
19,290
scrbl
evaluation.scrbl
#lang scribble/base @(require scriblib/figure scribble/manual scriblib/footnote slideshow/pict racket/math "../common.rkt" "../util.rkt" "../../results/plot-points.rkt" "../../results/plot-lines.rkt" "../../results/ghc-data.rkt") @title[#:tag "sec:evaluation"]{Evaluation} This chapter reports on two studies. In the first, all of the generators described in this dissertation are evaluated using the Redex benchmark. The second study compares the derivation generator of @secref["sec:semantics"] to a similar generator that is the best-known hand-tuned typed term generator. @section[#:tag "sec:benchmark-eval"]{The Redex Benchmark} This section details a comparison of all of Redex's approaches to generation on the Redex benchmark. This includes the the three grammar-based generators of @secref["sec:grammar"] (the ad-hoc recursive generator, in-order enumeration, and random selection from an enumeration) and the derivation generator of @secref["sec:semantics"]. The generators were compared using the Redex Benchmark of chapter 6. For a single test run, we pair a generator with a model and its soundness property, and then repeatedly generate test cases using the generator, testing them with the soundness property. We track the intervals between instances where the test case causes the soundness property to fail. For this study, each run continued for either 24 hours or until the uncertainty in the average interval between such counterexamples became acceptably small. The enumerations described in @secref["sec:enum"] were used to build two generators, one that just chooses terms in the order induced by the natural numbers (referred to below as in-order), and one that selects a random natural and uses that to index into the enumeration (referred to as random idnexing). To pick a random natural number to index into the enumeration, first an exponent @raw-latex{$i$} in base 2 is chosen from the geometric distribution and then an integer that is between @raw-latex{$2^{i-1}$} and @raw-latex{$2^i$} is picked uniformly at random. This process is repeated three times and then the largest is chosen, which helps make sure that the numbers are not always small. This distribution is used because it does not have a fixed mean. That is, if you take the mean of some number of samples and then add more samples and take the mean again, the mean of the new numbers is likely to be larger than from the mean of the old. This is a good property to have when indexing into our enumerations to avoid biasing indices towards a small size. The random indexing results are sensitive to the probability of picking the zero exponent from the geometric distribution. Because this method is the worst performing method, benchmark-specific numbers were empirically chosen in an attempt to maximize the success of the random enumeration method. Even with this artificial help, this method was still worse, overall, than the other three. All of the other generators except in-order enumeration have some parameter controlling the maximum size of generated terms. The ad-hoc random generator, which is based on the method of recursively unfolding non-terminals, is parameterized over the depth at which it attempts to stop unfolding non-terminals. A value of 5 was chosen for this depth since that seemed to be the most successful. This produces terms of a similar size to those of the random enumeration method, although the distribution is different. The derivation generator is similarly parameterized over the depth at which it attempts to begin finishing off the derivation, or where it begins to prefer less-recursive premises. Values that produced terms of a similar size to the ad-hoc generator were chosen, except in cases where this caused too many search failures, in which case a smaller depth was used. The depths used range from 3 to 5. Each generator was applied to all of the bugs in the benchmark, with the exception of the derivation generator, which isn't able to handle the @bold{let-poly} model. For reasons that have to do with the way Redex handles variable freshness, the typing judgment for this model is written using an explicit continuation and all recursive judgments have only one premise. Because of this, the heuristics that the derivation generator uses fail when applied to this model. This causes a runaway search process that is eventually terminated by constraints Redex imposes and deemed a failure. Thus there are 7 bugs that the derivation generator could not be tested on. There are 50 bugs total in the benchmark, for a total of 193 bug/generator pairs in this study. For each of the bug and generator combinations, a script is run that repeatedly asks for terms and checks to see if they falsify the model's correctness property. As soon as it finds a counterexample to the property, it reports the amount of time it has been running. The script was run in two rounds. The first round ran all 193 bug and generator combinations until either 24 hours elapsed or the standard error in the average became less than 10% of the average. Then all of the bugs where the 95% confidence interval was greater than 50% of the average and where at least one counterexample was found were run for an additional 8 days. All of the final averages have an 95% confidence interval that is less than 50% of the average. Two identical 64 core AMD machines with Opteron 6274s running at 2,200 MHz with a 2 MB L2 were used cache to run the benchmarks. Each machine has 64 gigabytes of memory. The script typically runs each model/bug combination sequentially, although multiple different combinations are run in parallel and, for the bugs that ran for more than 24 hours, tests are in parallel. We used version 6.2.900.4 (from git on August 15, 2015) of Racket, of which Redex is a part. @figure["fig:points" @list{Benchmark results for all generators on all bugs. Error bars show 95% confidence intervals.} @(rotate (plot-points 24hr-all) (- (/ pi 2)))] @Figure-ref["fig:points"] summarizes the results of the comparison on a per-bug basis. The y-axis is time in seconds, and for each bug the average time it took each generator to find a counterexample is plotted. The bugs are arranged along the x-axis, sorted by the average time over all generators to find the bug. The error bars represent 95% confidence intervals in the average, and in all cases where the averages differ significantly the errors are small enough to clearly differentiate the averages. The three blank columns on the right are bugs that no generator was able to find. The vertical scale is logarithmic, and the average time ranges from a tenth of a second to several hours, an extremely wide range in the rarity of counterexamples. @figure["fig:lines" @list{Random testing performance of all four generators, on models where all generators apply.} @(line-plot/directory 24hr)] To depict more clearly the relative testing effectiveness of the generation methods, the same data is plotted slightly differently in @figure-ref["fig:lines"]. Here the time in seconds is shown on the x-axis (the y-axis from @figure-ref["fig:points"], again on a log scale), and the total number of bugs found for each point in time on the y-axis. This plot only includes bugs to which all generators can be applied, to avoid having this aspect of the benchmark's composition unduly affect the comparison. (Therefore, @bold{let-poly} is excluded since the derivation generator cannot handle it.) This plot makes it clear that the derivation generator is much more effective when it applies, finding more bugs more quickly at almost every time scale. In fact, an order of magnitude or more on the time scale separates it and the next-best generator for almost the entire plot. While the derivation generator is more effective when it is used, it cannot be used with every Redex model, unlike the other generators. There are three broad categories of models to which it may not apply. First, the language may not have a type system, or the type system's implementation might use constructs that the generator fundamentally cannot handle (like escaping to Racket code to run arbitrary computation). Second, the generator currently cannot handle ellipses (aka repetition or Kleene star). And finally, some judgment forms thwart its termination heuristics. Specifically, the heuristics make the assumptions that the cost of completing the derivation is proportional to the size of the goal stack, and that terminal nodes in the search space are uniformly distributed. Typically these are safe assumptions, but not always; as noted already, the @bold{let-poly} model breaks them. @figure["fig:lines-enum" @list{Random testing performance of ad-hoc and enumeration generators on all models.} @(line-plot/directory 24hr-enum)] @Figure-ref["fig:lines-enum"] shows the testing performance on all bugs in the benchmark for the generators that are able to attempt all of them. This reveals that the ad hoc generator is better than the best enumeration strategy after 22 minutes. Before that time, the in-order enumeration strategy is the best approach, and often by a significant margin. Random indexing into an enumeration is never the best strategy. @section[#:tag "sec:ghc"]{Testing GHC: A Comparison With a Specialized Generator} In this section, the derivation generator developed in this work for Redex is compared to a specialized generator of typed terms. The specialized generator was designed to be used for differential testing of GHC, and generates terms for a specific variant of the lambda calculus with polymorphic constants, chosen to be close to the compiler's intermediate language. The generator is implemented using QuickCheck@~cite[QuickCheck], and is able to leverage its extensive support for writing random test case generators. Writing a generator for well-typed terms in this context required significant effort, essentially implementing a function from types to terms in QuickCheck. The effort yielded significant benefit, however, as implementing the entire generator from the ground up provided many opportunities for specialized optimizations, such as variations of type rules that are more likely to succeed, or varying the frequency with which different constants are chosen. @citet[palka-diss] discusses the details. @(define table-head (list @bold{Generator} @bold{Terms/Ctrex.} @bold{Gen. Time (s)} @bold{Check Time (s)} @bold{Time/Ctrex. (s)})) Implementing this language in Redex was easy: the formal description in @citet[palka-diss] was ported directly into Redex with little difficulty. Once a type system is defined in Redex, the derivation generator can be immediately used to generate well-typed terms. Such an automatically derived generator is likely to make some performance tradeoffs versus a specialized one, and this comparison provided an excellent opportunity to investigate those. The generators were compared by testing two of the properties used in @citet[palka-diss], and using same baseline version of the GHC (7.3.20111013) that was used there. @bold{Property 1} checks whether turning on optimization influences the strictness of the compiled Haskell code. The property fails if the compiled function is less strict with optimization turned on. @bold{Property 2} observes the order of evaluation, and fails if optimized code has a different order of evaluation compared to unoptimized code. Counterexamples from the first property demonstrate erroneous behavior of the compiler, as the strictness of Haskell expressions should not be influenced by optimization. In contrast, changing the order of evaluation is allowed for a Haskell compiler to some extent, so counterexamples from the second property usually demonstrate interesting cases of the compiler behavior, rather than bugs. @figure["fig:table" @list{Comparison of the derivation generator and a hand-written typed term generator. ∞ indicates runs where no counterexamples were found. Runs marked with * found only one counterexample, which gives low confidence to their figures. }]{ @centered{ @tabular[#:sep @hspace[1] (cons table-head (append (cons (cons @bold{Property 1} (build-list 4 (λ (_) ""))) (make-table table-prop1-data)) (cons (cons @bold{Property 2} (build-list 4 (λ (_) ""))) (make-table table-prop2-data))))] }} @Figure-ref["fig:table"] summarizes the results of the comparison of the two generators. Each row represents a run of one of the generators, with a few varying parameters. @citet[palka-diss]'s generator as is referred to as ``hand-written.'' It takes a size parameter, which was varied over 50, 70, and 90 for each property. ``Redex poly'' is the initial implementation of this system in the Redex, the direct translation of the language from @citet[palka-diss]. The Redex generator takes a depth parameter, which we vary over 6, 7, 8, and, in one case, 10. The depths are chosen so that both generators target terms of similar size.@note{Although it is possible to generate terms of larger depth, the runtime increases quickly with the depth. One possible explanation is that well-typed terms become very sparse as term size increases. @citet[counting-lambdas] show how scarce well-typed terms are even for simple types. Polymorphism seems to exacerbate this problem.} (@Figure-ref["fig:size-hists"] compares generated terms at targets of size 90 and depth 8). ``Redex non-poly'' is a modified version of the initial implementation, the details of which are discussed below. The columns show approximately how many tries it took to find a counterexample, the average time to generate a term, the average time to check a term, and finally the average time per counterexample over the entire run. Note that the goal type of terms used to test the two properties differs, which may affect generation time for otherwise identical generators. A generator based on the initial Redex implementation was able to find counterexamples for only one of the properties, and did so and at significantly slower rate than the hand-written generator. The hand-written generator performed best when targeting a size of 90, the largest, on both properties. Likewise, Redex was only able to find counterexamples when targeting the largest depth on property one. There, the hand-written generator was able to find a counterexample every 12K terms, about once every 260 seconds. The Redex generator both found counterexamples much less frequently, at one in 4000K, and generated terms several orders of magnitude more slowly. Property two was more difficult for the hand-written generator, and the first try in Redex was unable to find any counterexamples there. @figure["fig:size-hists" @list{Histograms of the sizes (number of internal nodes) of terms produced by the different runs. The vertical scale of each plot is one twentieth of the total number of terms in that run.}]{ @centered[(hists-pict 260 530)]} Comparing the test cases from both generators, we found that Redex was producing significantly smaller terms than the hand-written generator. The left two histograms in @figure-ref["fig:size-hists"] compare the size distributions, which show that most of the terms made by the hand-written generator are larger than almost all of the terms that Redex produced (most of which are clumped below a size of 25). The majority of counterexamples produced with the hand-written generator fell in this larger range. Digging deeper, it seemed that Redex's generator was backtracking an excessive amount. This directly affects the speed at which terms are generated, and it also causes the generator to fail more often because the search limits discussed in @secref["sec:search"] are exceeded. Finally, it skews the distribution toward smaller terms because these failures become more likely as the size of the search space expands. A reasonable hypothesis is that the backtracking was caused by making doomed choices when instantiating polymorphic types and only discovering that much later in the search, causing it to get stuck in expensive backtracking cycles. The hand-written generator avoids such problems by encoding model-specific knowledge in heuristics. A variant Redex model was created to test this hypothesis, identical to the first except with a pre-instantiated set of constants, and removing all other polymorphism. The 40 most common instantiations of constants were selected from a set of counterexamples to both models generated by the hand-written generator. Runs based on this model are referred to as ``Redex non-poly'' in both @figure-ref["fig:table"] and @figure-ref["fig:size-hists"]. As @figure-ref["fig:size-hists"] shows, we get a much better size distribution with the non-polymorphic model, comparable to the hand-written generator's distribution. A look at the second column of @figure-ref["fig:table"] shows that this model produces terms much faster than the first try in Redex, though still slower than the hand-written generator. This model's counterexample rate is especially interesting. For property one, it ranges from one in 500K terms at depth 6 to, astonishingly, one in 320 at depth 8, providing more evidence that larger terms make better test cases. This success rate is also much better than that of the hand-written generator, and in fact, it was this model that was most effective on property 1, finding a counterexample approximately every 30 seconds, significantly faster than the hand-written generator. Thus, it is interesting that it did much worse on property 2, only finding a counterexample once every 4000K terms, and at very large time intervals. The reason for this discrepancy remains unknown. Overall, the derivation generator is not competitive with the hand-tuned generator when it has to cope with polymorphism. Polymorphism is problematic because it requires the generator to make parallel choices that must match up, but where the generator does not discover that those choices must match until much later in the derivation. Because the choice point is far from the place where the constraint is discovered, the generator spends much of its time backtracking. The improvement in generation speed for the Redex generator when removing polymorphism provides evidence for the explanation of what makes generating these terms difficult. The ease with which this language could be implemented in Redex, and as a result, conduct this experiment, speaks to the value of a general-purpose generator, and of lightweight semantics tools.
false
4f8ffb58aee57b868a9ef2efefe337b4d8be8975
b08b7e3160ae9947b6046123acad8f59152375c3
/Programming Language Detection/Experiment-2/Dataset/Train/Racket/strip-comments-from-a-string.rkt
6fc1c44aaaaebcf0ce815c8afc14eb4ee924642c
[]
no_license
dlaststark/machine-learning-projects
efb0a28c664419275e87eb612c89054164fe1eb0
eaa0c96d4d1c15934d63035b837636a6d11736e3
refs/heads/master
2022-12-06T08:36:09.867677
2022-11-20T13:17:25
2022-11-20T13:17:25
246,379,103
9
5
null
null
null
null
UTF-8
Racket
false
false
567
rkt
strip-comments-from-a-string.rkt
#lang at-exp racket (define comment-start-rx "[;#]") (define text @~a{apples, pears # and bananas apples, pears ; and bananas }) (define (strip-comments text [rx comment-start-rx]) (string-join (for/list ([line (string-split text "\n")]) (string-trim line (pregexp (~a "\\s*" rx ".*")) #:left? #f)) "\n")) ;; Alternatively, do it in a single regexp operation (define (strip-comments2 text [rx comment-start-rx]) (regexp-replace* (pregexp (~a "(?m:\\s*" rx ".*)")) text "")) (strip-comments2 text) ; -> "apples, pears\napples, pears"
false
72f5ddaef5f4f2c8936a0977d2f0d4302ad0d0ad
bb6ddf239800c00988a29263947f9dc2b03b0a22
/solutions/exercise-5.29.rkt
823b67f05fe90cf33fb1a426f18b0446164e695d
[]
no_license
aboots/EOPL-Exercises
f81b5965f3b17f52557ffe97c0e0a9e40ec7b5b0
11667f1e84a1a3e300c2182630b56db3e3d9246a
refs/heads/master
2022-05-31T21:29:23.752438
2018-10-05T06:38:55
2018-10-05T06:38:55
null
0
0
null
null
null
null
UTF-8
Racket
false
false
300
rkt
exercise-5.29.rkt
#lang eopl (define n1 'uninitialized) (define a 'uninitialized) (define (fact-iter-acc) (if (zero? n1) a (begin (set! a (* n1 a)) (set! n1 (- n1 1)) (fact-iter-acc)))) (define (fact-iter n) (set! n1 n) (set! a 1) (fact-iter-acc)) (provide fact-iter)
false
85b2a4951657281412b93546220911662119fe19
1b3782a6d5242fdade7345d3e9157a8af0c4a417
/progs/binary-tree.2.rkt
dabd4a8f285cdd57dbbb2157adf9cbce3f4f401b
[]
no_license
zcc101/dpc
bb75d383f8ff6129d01d1cf33c89f7559143d24f
54455932b8494f64f5c9a53d481968b22a15748f
refs/heads/master
2023-03-15T10:53:55.608180
2017-11-29T21:57:42
2017-11-29T21:57:42
null
0
0
null
null
null
null
UTF-8
Racket
false
false
1,142
rkt
binary-tree.2.rkt
#lang class/1 ; A BT is one of: ; - (new leaf% Number) ; - (new node% Number BT BT) (define-interface bt<%> [double count]) (define-class bt% (define/public (double n) (new node% n this this))) (define-class leaf% (super bt%) (implements bt<%>) (fields number) ; -> Number ; count the number of numbers in this leaf (define/public (count) 1)) (define-class node% (super bt%) (implements bt<%>) (fields number left right) ; -> Number ; count the number of numbers in this node (define/public (count) (+ 1 (send (field left) count) (send (field right) count)))) (define ex1 (new leaf% 7)) (define ex2 (new node% 6 (new leaf% 8) (new node% 4 (new leaf% 3) (new leaf% 2)))) (define ex3 (new node% 8 (new leaf% 2) (new leaf% 1))) (check-expect (send ex1 count) 1) (check-expect (send ex2 count) 5) (check-expect (send ex3 count) 3) (check-expect (send ex1 double 5) (new node% 5 ex1 ex1)) (check-expect (send ex3 double 0) (new node% 0 ex3 ex3))
false
00543b01e99d5e41f4b2f38eb5d1ee53599f01fa
98fd12cbf428dda4c673987ff64ace5e558874c4
/paip/will/faster-miniKanren/numbers.rkt
d79c96863d66290b8d10a2ca21d7f08f833f1ef7
[ "MIT", "Unlicense" ]
permissive
CompSciCabal/SMRTYPRTY
397645d909ff1c3d1517b44a1bb0173195b0616e
a8e2c5049199635fecce7b7f70a2225cda6558d8
refs/heads/master
2021-12-30T04:50:30.599471
2021-12-27T23:50:16
2021-12-27T23:50:16
13,666,108
66
11
Unlicense
2019-05-13T03:45:42
2013-10-18T01:26:44
Racket
UTF-8
Racket
false
false
110
rkt
numbers.rkt
#lang racket (require "main.rkt") (include "numbers.scm") (provide (except-out (all-defined-out) appendo))
false
7b441cabe1341fa4a2bec29d6c787b81f042ec74
4f8e3d5bb35d87afbce203adc55433debbbee954
/qb-xml.rkt
3419c8223f7fefd59a4dff9a1e5c7027e389eb6a
[]
no_license
gallerx/lambda
6ad37f61d50c43b1fa617b394486ffdead5517c9
5397b9de5949d767264ac85261529e9718d59fb0
refs/heads/master
2021-01-10T11:14:08.772078
2015-11-16T20:53:20
2015-11-16T20:53:20
46,204,658
0
0
null
null
null
null
UTF-8
Racket
false
false
29,546
rkt
qb-xml.rkt
#lang racket/base #| -------------------------------------------------------------------------------------- module: qb-xml.rkt Converts x-expressions of qb-xexpr.rkt into functions of arity 1 which generate xml when provided with a message-id (or arity 0 when no mutation of .qbw file is required) -------------------------------------------------------------------------------------- |# (require xml racket/contract racket/list (prefix-in GUID: GUID.rkt") "tll-common.rkt" "anaphora.rkt" "qb-common.rkt" (only-in "tree.rkt" de-tree) (prefix-in XEXPR: "qb-xexpr.rkt")) (provide delete-account delete-customer delete-item/sales-tax delete-item/inventory delete-item/non-inventory delete-item/service delete-item/discount delete-item/subtotal delete-vendor delete-invoice delete-item-receipt delete-journal-entry delete-credit-memo query-account query-account-by-list-id query-customer query-item query-vendor query-vendor-type query-sales-tax-code query-currency query-customers-for-private-data query-accounts-for-private-data query-items-for-private-data query-item/sales-tax-for-private-data query-item/discount-for-private-data query-item/subtotal-for-private-data query-item/service-for-private-data query-item/non-inventory-for-private-data query-item/inventory-for-private-data query-vendors-for-private-data query-vendors-for-private-data-by-currency query-invoices-for-private-data query-item-receipts-for-private-data query-bills-for-private-data query-credit-memos-for-private-data query-invoice query-item-receipt query-credit-memo query-accounts query-item-receipts query-journal-entrys insert-account insert-customer insert-item/sales-tax insert-item/inventory insert-item/non-inventory insert-item/service insert-item/discount insert-item/subtotal insert-vendor insert-invoice insert-invoice-ex insert-item-receipts insert-item-receipts-ex insert-journal-entry make-journal-line insert-credit-memo insert-credit-memo-ex insert-data-ext-def delete-data-ext-def add-private-data modify-private-data status-check clear-recovery-data clear-all-recovery-data) (define-values (delete-account delete-customer delete-item/sales-tax delete-item/inventory delete-item/non-inventory delete-item/service delete-item/discount delete-item/subtotal delete-vendor delete-invoice delete-item-receipt delete-journal-entry delete-credit-memo) (apply values (map (λ (fn) (contract (-> qbid/c (-> msgset-id/c xml?)) (λ (object-id) (λ (msgset-id) (process-outbound-xexpr ((message-set msgset-id) (make-payload (fn object-id)))))) "anonymous-fn" "society")) (list XEXPR:account-delete XEXPR:customer-delete XEXPR:item-sales-tax-delete XEXPR:item-inventory-delete XEXPR:item-non-inventory-delete XEXPR:item-service-delete XEXPR:item-discount-delete XEXPR:item-subtotal-delete XEXPR:vendor-delete XEXPR:invoice-delete XEXPR:item-receipt-delete XEXPR:journal-entry-delete XEXPR:credit-memo-delete)))) ;pure-query message => no msgset-id => don't store unnessary recovery data in company file (define-values (query-accounts-for-private-data query-accounts query-customers-for-private-data query-items-for-private-data query-item/sales-tax-for-private-data query-item/discount-for-private-data query-item/subtotal-for-private-data query-item/service-for-private-data query-item/non-inventory-for-private-data query-item/inventory-for-private-data query-vendors-for-private-data query-invoices-for-private-data query-item-receipts-for-private-data query-item-receipts query-bills-for-private-data query-journal-entrys query-credit-memos-for-private-data) (apply values (map (λ (fn) (contract (-> xml?) (λ _ (process-outbound-xexpr ((message-set) (make-payload (fn))))) "anonymous-fn" "society")) (list XEXPR:account-query-for-private-data XEXPR:accounts-query XEXPR:customer-query-for-private-data XEXPR:item-query-for-private-data XEXPR:item/sales-tax-query-for-private-data XEXPR:item/discount-query-for-private-data XEXPR:item/subtotal-query-for-private-data XEXPR:item/service-query-for-private-data XEXPR:item/non-inventory-query-for-private-data XEXPR:item/inventory-query-for-private-data XEXPR:vendor-query-for-private-data XEXPR:invoice-query-for-private-data XEXPR:item-receipt-query-for-private-data XEXPR:item-receipts-query XEXPR:bill-query-for-private-data XEXPR:journal-entrys-query XEXPR:credit-memo-query-for-private-data)))) ;pure-query message => no msgset-id => don't store unnessary recovery data in company file ;will reuse for query-by-list-id's as well since its just passing string (define-values (query-account ;uses full-name query-account-by-list-id ;uses list-id query-customer ;uses full-name query-item ;uses full-name query-vendor ;uses full-name query-vendor-type ;uses full-name query-sales-tax-code ;uses full-name query-currency ;uses full-name query-vendors-for-private-data-by-currency ; uses full-name query-invoice ;uses txn-id query-item-receipt ;uses txn-id query-credit-memo) ;uses txn-id (apply values (map (λ (fn) (contract (-> string? xml?) (λ (full-name) (process-outbound-xexpr ((message-set) (make-payload (fn full-name))))) "anonymous-fn" "society")) (list XEXPR:account-query XEXPR:account-query-by-list-id XEXPR:customer-query XEXPR:item-query XEXPR:vendor-query XEXPR:vendor-type-query XEXPR:sales-tax-code-query XEXPR:currency-query XEXPR:vendor-query-for-private-data-by-currency XEXPR:invoice-query XEXPR:item-receipt-query XEXPR:credit-memo-query)))) #| ----------------------------------------------------------------------------------------------- Name: message-set Note: We use CONTINUE-ON-ERROR In practice, we restrict file mutations (add,update, delete) to one message per group so can use control flow to signal that file-mutation failed. Notes: See table 31-2 QB-SDK Programmers Guide page 410 We use following permutations of new-id old-id NewID OldID Behavior x null If new, Execute request and store state for the message ID. If repeated, status check x x old = new, status check. We use this version of a status check null x clear state null CLR-ALL-MSG-SETS clears all state. null null don't store recovery info. Use for queries or non-mutating messages (do they exist, besides queries?) The CLR-ALL permutation is why we need to specify contract for old as string? instead of msgset-id/c ----------------------------------------------------------------------------------------------- |# (define/contract (message-set [new-id null] #:old-id [old-id null] #:on-error [on-error CONTINUE-ON-ERROR]) (->* () ((or/c msgset-id/c null?) #:old-id (or/c string? null?) #:on-error (or/c CONTINUE-ON-ERROR STOP-ON-ERROR)) (-> (listof xexpr?) xexpr?)) (λ (payload) `(QBXML ,(append `(QBXMLMsgsRq ,(cond [(and (null? old-id) (null? new-id)) `((onError ,on-error))] ;both null-> don't want to store recovery info [(null? old-id) `((newMessageSetID ,new-id)(onError ,on-error))] ;new only, see above table [(null? new-id) `((oldMessageSetID ,old-id)(onError ,on-error))] ;old only, see above table [else `((newMessageSetID ,new-id)(oldMessageSetID ,old-id)(onError ,on-error))])) ;both non-null payload)))) ;each arg is a (-> integer? xexpr?) -> (listof xexpr?) (define-syntax-rule (make-payload args ...) (map (λ (arg ordinal) (arg ordinal)) (list args ...) (build-list (length (list args ...)) values))) ;used for insert-item-receipts. the de-tree coerces return value into a list of xexpr?. (begine as a (listof (listof xexpr?) ;assumes two sub expressions (i.e. first, second)in each pair (define/contract (make-payload* args) (-> (listof (-> integer? (listof xexpr?))) (listof xexpr?)) (de-tree (map (λ (arg ordinal) (arg ordinal)) args (build-list (length args) values)))) #| ---------------------------------------------------------------------------------------------------------- Returns the xml ---------------------------------------------------------------------------------------------------------- |# (define/contract (process-outbound-xexpr xexpr) (-> xexpr? xml?) (string-append QBXML-PREAMBLE (xexpr->string xexpr))) (define-syntax-rule (prepare-xml/recovery body ...) (λ (msgset-id) (process-outbound-xexpr ((message-set msgset-id) (make-payload body ...))))) (define/contract (prepare-xml/recovery* body) (-> (listof (-> integer? (listof xexpr?))) (-> msgset-id/c xml?)) (λ (msgset-id) (process-outbound-xexpr ((message-set msgset-id) (make-payload* body))))) (define/contract (insert-customer name ship-tos) (-> string? (listof ship-to?) (-> msgset-id/c xml?)) (prepare-xml/recovery (XEXPR:customer-add name ship-tos))) (define/contract (insert-account name type #:parent [parent null] #:currency [currency null]) (->* (string? qb-account-type/c) (#:parent qbid-or-fresh/c #:currency qbid-or-fresh/c) (-> msgset-id/c string?)) (prepare-xml/recovery (XEXPR:account-add name type #:parent parent #:currency currency))) ;non-neg two sigs because we have the well known OUTSIDE NEXUS rate that applies 0.0% tax (define/contract (insert-item/sales-tax name desc tax-vendor rate) (-> string? string? qbid/c !negative-real/c (-> msgset-id/c xml?)) (prepare-xml/recovery (XEXPR:item-sales-tax-add name desc tax-vendor rate))) (define/contract (insert-item/inventory name income-acc expense-acc accrual-acc sales-tax-code charge-customer?) (-> string? qbid/c qbid/c qbid/c qbid/c boolean? (-> msgset-id/c xml?)) (prepare-xml/recovery (XEXPR:item-inventory-add name income-acc expense-acc accrual-acc sales-tax-code charge-customer?))) (define/contract (insert-item/non-inventory name credit-acc sales-tax-code) (-> string? qbid/c qbid/c (-> msgset-id/c xml?)) (prepare-xml/recovery (XEXPR:item-non-inventory-add name credit-acc sales-tax-code))) (define/contract (insert-item/service name credit-acc sales-tax-code) (-> string? qbid/c qbid/c (-> msgset-id/c xml?)) (prepare-xml/recovery (XEXPR:item-service-add name credit-acc sales-tax-code))) (define/contract (insert-item/discount name credit-acc sales-tax-code pct-discount) (-> string? qbid/c qbid/c !neg-two-sigs/c (-> msgset-id/c xml?)) (prepare-xml/recovery (XEXPR:item-discount-add name credit-acc sales-tax-code pct-discount))) (define/contract (insert-item/subtotal name) (-> string? (-> msgset-id/c xml?)) (prepare-xml/recovery (XEXPR:item-subtotal-add name))) (define/contract (insert-vendor name vendor-type #:currency [currency null]) (->* (string? qbid/c) (#:currency qbid-or-fresh/c) (-> msgset-id/c xml?)) (prepare-xml/recovery (XEXPR:vendor-add name vendor-type #:currency currency))) #| ----------------------------------------------------------------------------------------------------------- insert invoice: If this parameter is not passed to QB, QB will use the default sales tax set up in Company Preferences For this reason, we will explicitly create and pass an "Outside Nexus" Sales Tax Item with zero rate. (other option would be to use a null parameter). Note the Outside-Nexus item will still need to be linked to the NY Sales Tax Payable Vendor ----------------------------------------------------------------------------------------------------------- |# (define/contract (insert-invoice customer date sales-tax-jurisdiction invoice-lines) (-> qbid/c qb-date/c qbid/c (listof xexpr?) (-> msgset-id/c xml?)) (prepare-xml/recovery (XEXPR:invoice-add customer date sales-tax-jurisdiction invoice-lines))) (define/contract (insert-invoice-ex customer date sales-tax-jurisdiction bill-to ship-to invoice-lines) (-> qbid/c qb-date/c qbid/c ship-to? ship-to? (listof xexpr?) (-> msgset-id/c xml?)) (prepare-xml/recovery (XEXPR:invoice-add-ex customer date sales-tax-jurisdiction bill-to ship-to invoice-lines))) ;passthrough (provide (rename-out [XEXPR:invoice-line-add/discount insert-invoice-line/discount] [XEXPR:invoice-line-add/subtotal insert-invoice-line/subtotal] [XEXPR:invoice-line-add/inventory insert-invoice-line/inventory] [XEXPR:invoice-line-add/non-inventory insert-invoice-line/non-inventory] [XEXPR:invoice-line-add/service insert-invoice-line/service])) #| ----------------------------------------------------------------------------------------------- Name: insert-item-receipts Discussion: unique in that it produced function which generates two messages (listof xexpr?) The first message is an insert-item-receipt The second message is ------------------------------------------------------------------------------------------------ |# (define-syntax-rule (insert-item-receipts plt date (vendor ref-number fx-rate items) ...) (prepare-xml/recovery* (list (XEXPR:item-receipt-add plt vendor date ref-number fx-rate items) ...))) (require racket/match) ;use the special prepare-xml/recovery* to accept a list of (define/contract (insert-item-receipts-ex plt ir-args) (-> pkid/c (listof (list/c qbid/c string? +fx/c (listof xexpr?))) (-> msgset-id/c xml?)) (awith (map (λ (ir) (match ir ;destructuring bind [(list vendor-id ref-number fx-rate items) (XEXPR:item-receipt-add plt vendor-id (qb-date) ref-number fx-rate items)])) ir-args) (prepare-xml/recovery* it))) ;Passthrough (provide (rename-out [XEXPR:item-receipt-line-add/subtotal insert-item-receipt-line/subtotal] [XEXPR:item-receipt-line-add/non-inventory insert-item-receipt-line/non-inventory] [XEXPR:item-receipt-line-add/service insert-item-receipt-line/service])) ;(insert-item-receipt "8399124-12521" "2015-08-21" "cheese" (list (insert-item-receipt-line/subtotal "help"))) #| ----------------------------------------------------------------------------------------------------------- insert-journal-entry: If this parameter is not passed to QB, QB will use the default sales tax set up in Company Preferences For this reason, we will explicitly create and pass an "Outside Nexus" Sales Tax Item with zero rate. (other option would be to use a null parameter). Note the Outside-Nexus item will still need to be linked to the NY Sales Tax Payable Vendor ----------------------------------------------------------------------------------------------------------- |# (define/contract (insert-journal-entry date ref journal-lines) (-> qb-date/c string? (listof xexpr?) (-> msgset-id/c xml?)) (prepare-xml/recovery (XEXPR:journal-entry-add date ref journal-lines))) (define/contract (make-journal-line dc) (-> DC/c (->* (qbid/c two-sigs/c) (#:entity qbid-or-fresh/c) xexpr?)) (XEXPR:journal-line-helper dc)) #| ----------------------------------------------------------------------------------------------------------- insert credit-memo: If this parameter is not passed to QB, QB will use the default sales tax set up in Company Preferences For this reason, we will explicitly create and pass an "Outside Nexus" Sales Tax Item with zero rate. (other option would be to use a null parameter). Note the Outside-Nexus item will still need to be linked to the NY Sales Tax Payable Vendor ----------------------------------------------------------------------------------------------------------- |# (define/contract (insert-credit-memo customer date sales-tax-jurisdiction credit-memo-lines) (-> qbid/c qb-date/c qbid/c (listof xexpr?) (-> msgset-id/c xml?)) (prepare-xml/recovery (XEXPR:credit-memo-add customer date sales-tax-jurisdiction credit-memo-lines))) (define/contract (insert-credit-memo-ex customer date sales-tax-jurisdiction bill-to ship-to credit-memo-lines) (-> qbid/c qb-date/c qbid/c ship-to? ship-to? (listof xexpr?) (-> msgset-id/c xml?)) (prepare-xml/recovery (XEXPR:credit-memo-add-ex customer date sales-tax-jurisdiction bill-to ship-to credit-memo-lines))) ;passthrough (provide (rename-out [XEXPR:credit-memo-line-add/discount insert-credit-memo-line/discount] [XEXPR:credit-memo-line-add/subtotal insert-credit-memo-line/subtotal] [XEXPR:credit-memo-line-add/inventory insert-credit-memo-line/inventory] [XEXPR:credit-memo-line-add/non-inventory insert-credit-memo-line/non-inventory] [XEXPR:credit-memo-line-add/service insert-credit-memo-line/service])) #| ------------------------------------------------------------------------- Start recovery messages. See p410, table 31-2 QB SDK Programmer Guide clear-recovery-data: clears the recovery Name: clear-recovery-data Notes: Implemented ref. table 31-2 on page 410 QB-SDK Programmer Guide Notes: Setting #:old-id & new id to same value (msgset-id) results in QB deleting error recovery info for that msgset-id, which is desired ------------------------------------------------------------------------- |# (define/contract (clear-recovery-data msgset-id) (-> msgset-id/c xml?) (process-outbound-xexpr ((message-set #:old-id msgset-id) null))) (define/contract (clear-all-recovery-data) (-> xml?) (process-outbound-xexpr ((message-set #:old-id CLR-ALL-MSG-SETS) null))) (define/contract (status-check msgset-id) (-> msgset-id/c xml?) (process-outbound-xexpr ((message-set msgset-id #:old-id msgset-id) null))) #| -------------------------------------------------------------------------------------------------------- Private Data Definition and Mutation Messages -------------------------------------------------------------------------------------------------------- |# (define/contract (insert-data-ext-def) (-> (-> msgset-id/c xml?)) (prepare-xml/recovery (XEXPR:data-ext-def-add OWNER-GUID DATA-EXTENSION-NAME))) (define/contract (add-private-data obj-type obj-id value) (-> qb-obj-type/c qbid/c string? (-> msgset-id/c xml?)) (prepare-xml/recovery (XEXPR:data-ext-add obj-type obj-id value))) (define/contract (modify-private-data obj-type obj-id value) (-> qb-obj-type/c qbid/c string? (-> msgset-id/c xml?)) (prepare-xml/recovery (XEXPR:data-ext-mod obj-type obj-id value))) (define/contract (delete-data-ext-def) (-> (-> msgset-id/c xml?)) (prepare-xml/recovery (XEXPR:data-ext-def-delete OWNER-GUID DATA-EXTENSION-NAME))) (require rackunit rackunit/text-ui) (define internals (test-suite "Tests for qb-xexpr" (let ((m1 (GUID:GUID-23)) (m2 (GUID:GUID-23))) ;permutations of msgset parameters (test-equal? "good with non-null new id, non-null old-id" `(QBXML (QBXMLMsgsRq ((newMessageSetID ,m1)(oldMessageSetID ,m2)(onError ,CONTINUE-ON-ERROR)))) ((message-set m1 #:old-id m2) null)) (test-equal? "good with non-null new id, null old-id" `(QBXML (QBXMLMsgsRq ((newMessageSetID ,m1) (onError ,CONTINUE-ON-ERROR)))) ((message-set m1) null)) (test-equal? "good with null new id, non-null old-id" `(QBXML (QBXMLMsgsRq ((oldMessageSetID ,m2) (onError ,CONTINUE-ON-ERROR)))) ((message-set #:old-id m2) null)) (test-equal? "good with null new id,null old-id" `(QBXML (QBXMLMsgsRq ((onError ,CONTINUE-ON-ERROR)))) ((message-set) null)) (test-equal? "expected" (string-append "<?xml version=\"1.0\" ?><?qbxml version=\"13.0\" ?>" "<QBXML><QBXMLMsgsRq newMessageSetID=\"woohoo\" onError=\"continueOnError\"><xml>0</xml></QBXMLMsgsRq></QBXML>") ((prepare-xml/recovery (λ (num) `(xml ,(number->string num)))) "woohoo")) (awith (string-append "<?xml version=\"1.0\" ?><?qbxml version=\"13.0\" ?>" "<QBXML><QBXMLMsgsRq newMessageSetID=\"cheese\" onError=\"continueOnError\">" "<VendorAddRq requestID=\"0\">" "<VendorAdd><Name>NY</Name><VendorTypeRef><ListID>Tax agency</ListID></VendorTypeRef></VendorAdd>" "</VendorAddRq><VendorAddRq requestID=\"1\">" "<VendorAdd><Name>CT</Name><VendorTypeRef><ListID>Tax agency</ListID></VendorTypeRef></VendorAdd>" "</VendorAddRq></QBXMLMsgsRq></QBXML>") (test-equal? "multi messages with prepare/xml" it ((prepare-xml/recovery (XEXPR:vendor-add "NY" QB/TAX-AGENCY #:currency null) (XEXPR:vendor-add "CT" QB/TAX-AGENCY #:currency null)) "cheese"))) (test-equal? "multi messages with prepare-xml/recovery* only works with item-receipt-adds!!! - change date x 2 to fix error" "<?xml version=\"1.0\" ?><?qbxml version=\"13.0\" ?><QBXML><QBXMLMsgsRq newMessageSetID=\"cheese\" onError=\"continueOnError\"><ItemReceiptAddRq requestID=\"0\"><ItemReceiptAdd defMacro=\"TxnID:0\"><VendorRef><ListID>a542Y</ListID></VendorRef><TxnDate>2015-11-07</TxnDate><RefNumber>wookie</RefNumber><ExchangeRate>0.500000</ExchangeRate></ItemReceiptAdd></ItemReceiptAddRq><DataExtAddRq requestID=\"10000\"><DataExtAdd><OwnerID>{4918EE0D-6342-4B07-17F4-8743D2AE268B}</OwnerID><DataExtName>BLPKID6</DataExtName><TxnDataExtType>ItemReceipt</TxnDataExtType><TxnID useMacro=\"TxnID:0\"></TxnID><DataExtValue>pl:1.0|fake</DataExtValue></DataExtAdd></DataExtAddRq><ItemReceiptAddRq requestID=\"1\"><ItemReceiptAdd defMacro=\"TxnID:1\"><VendorRef><ListID>c253F</ListID></VendorRef><TxnDate>2015-11-07</TxnDate><RefNumber>eqoker</RefNumber><ExchangeRate>0.800000</ExchangeRate></ItemReceiptAdd></ItemReceiptAddRq><DataExtAddRq requestID=\"10001\"><DataExtAdd><OwnerID>{4918EE0D-6342-4B07-17F4-8743D2AE268B}</OwnerID><DataExtName>BLPKID6</DataExtName><TxnDataExtType>ItemReceipt</TxnDataExtType><TxnID useMacro=\"TxnID:1\"></TxnID><DataExtValue>pl:2.1|fake</DataExtValue></DataExtAdd></DataExtAddRq></QBXMLMsgsRq></QBXML>" ((prepare-xml/recovery* `(,(XEXPR:item-receipt-add 1 "a542Y" (qb-date) "wookie" 0.50000 null) ,(XEXPR:item-receipt-add 2 "c253F" (qb-date) "eqoker" 0.80000 null))) "cheese")) (test-equal? "two xexpressions returned from two functions" '((xml "0") (xml "1")) (make-payload (λ (x) `(xml ,(number->string x))) (λ (x) `(xml ,(number->string x))))) (test-equal? "expected" '(JournalDebitLine (AccountRef (ListID "mee")) (Amount "12.24") (EntityRef (ListID "cheese"))) ((make-journal-line +1) "mee" 12.24 #:entity "cheese")) (test-equal? "expected" '(JournalCreditLine (AccountRef (ListID "mee")) (Amount "12.24") (EntityRef (ListID "cheese"))) ((make-journal-line -1) "mee" 12.24 #:entity "cheese")) )))
true
bf49818360b4db85d871f454c680b30b10494136
b7699d6bac5f1ebd886baae60bc80f206bb75191
/if_and_macros.rkt
f9bee92cd11a46a01d56cec53dab6a56f8d1eedb
[]
no_license
omenlabs/racket-fizzbuzz
b111a71d4e46a1a670692cf8b9b2c75bbb32f061
96dec1ff8d0171d89d592a078853e252c50e241b
refs/heads/master
2021-01-23T16:17:43.528149
2017-06-04T06:07:20
2017-06-04T06:07:20
93,289,429
1
0
null
null
null
null
UTF-8
Racket
false
false
748
rkt
if_and_macros.rkt
#lang racket (define (my-if test truth falseness) (cond [test truth] [else falseness])) ;; This works fine (printf "Calling displayln on the result of my-if:~n~n") (displayln (my-if (eq? 1 3) "one is three" "one is not three")) ;; But if we invert the printing (printf "~nInverting by passing displayln as my-if args:~n~n") (my-if (eq? 1 3) (displayln "one is three") (displayln "one is not three")) (printf "~nMacro my-macro-if with displayln args:~n~n") ;; So macro (define-syntax my-macro-if (syntax-rules () [(_ test-expr true-expr false-expr) (cond (test-expr true-expr) (else false-expr))])) (my-macro-if (eq? 1 3) (displayln "one is three") (displayln "one is not three"))
true
c56ddb8e6d6c867f79f8a0bb0c7fe5a45dab2737
898dceae75025bb8eebb83f6139fa16e3590eb70
/sem1/hw/AA-asg22.rkt
129202454cd894d6362e88b1a8a00d421aa1956a
[]
no_license
atamis/prog-hw
7616271bd4e595fe864edb9b8c87c17315b311b8
3defb8211a5f28030f32d6bb3334763b2a14fec2
refs/heads/master
2020-05-30T22:17:28.245217
2013-01-14T18:42:20
2013-01-14T18:42:20
2,291,884
0
0
null
null
null
null
UTF-8
Racket
false
false
5,350
rkt
AA-asg22.rkt
;; The first three lines of this file were inserted by DrRacket. They record metadata ;; about the language level of this file in a form that our tools can easily process. #reader(lib "htdp-beginner-reader.ss" "lang")((modname AA-asg22) (read-case-sensitive #t) (teachpacks ()) (htdp-settings #(#t constructor repeating-decimal #f #t none #f ()))) ;; Prog 1 Asg #22: Conditionals ; Andrew Amis ; 11.7.11 ; http://fellowhuman.com/gbk/2011/11/07/prog-1-asg-22-cond-and-def-by-choices/ ; Exercises 15.5.6, 15.8.3, and 15.8.5. ; Exercises 17.1.2 and 17.1.6. (require picturing-programs) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; 15.5.6 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; card-refund number -> number ; Returns the refund a credit card company might give you. (define (card-refund money) (cond [(<= money 500) (* 0.0025 money)] [(<= money 1500) (+ (card-refund 500) (* 0.005 (- money 500)))] [(<= money 2500) (+ (card-refund 1500) (* 0.005 (- money 1500)))] [else (+ (card-refund 2500) (* 0.01 (- money 2500)))])) (check-within (card-refund 400) 1 0.1) (check-within (card-refund 1400) 5.75 0.1) (check-within (card-refund 2500) 11.25 0.1) (check-within (card-refund 10000) 86.25 0.1) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; 15.8.3 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; big? (number | string) -> boolean. ; Returns true if the number is at least 1000 and for strings, at least 10 ; character long. (define (big? x) (cond [(string? x) (>= (string-length x) 10)] [(number? x) (>= x 100)] [else (error "Argument was neither a number nor a string")])) (check-expect (big? 10) false) (check-expect (big? 100) true) (check-expect (big? 200) true) (check-expect (big? "nope") false) (check-expect (big? "This is a test") true) (check-expect (big? "1234567890") true) (check-error (big? false) "Argument was neither a number nor a string") ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; 15.8.5 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; convert->number : (number | string) -> number ; Converts a string or a number to a number. (define (convert->number x) (cond [(number? x) x] [(string? x) (string->number x)] (else (error "Argument was neither a number nor a string")))) (check-expect (convert->number 1) 1) (check-expect (convert->number "3") 3) (check-error (convert->number false) "Argument was neither a number nor a string") ;; smart-add : (number | string) (number | string) -> number ; Adds the 2 arguments together, ensuring they are numbers by converting them. (define (smart-add x1 x2) (+ (convert->number x1) (convert->number x2))) (check-expect (smart-add 1 1) 2) (check-expect (smart-add 1 "1") 2) (check-expect (smart-add "1" "1") 2) (check-expect (smart-add "12" "14") 26) (check-error (smart-add false 2) "Argument was neither a number nor a string") (check-error (smart-add 2 true) "Argument was neither a number nor a string") ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; 17.1.2 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; correct-image : number -> image ; Returns the image that goes with the number. Like a hash-map, only a function. ; Expects a number between 1 and 3 (define (correct-image n) (cond [(= n 1) (square 20 'solid 'red)] [(= n 2) (square 20 'solid 'green)] [(= n 3) (square 20 'solid 'blue)] [else (error "Argument wasn't between 1 and 3")])) (check-expect (correct-image 1) (square 20 'solid 'red)) (check-expect (correct-image 2) (square 20 'solid 'green)) (check-expect (correct-image 3) (square 20 'solid 'blue)) (check-error (correct-image 4) "Argument wasn't between 1 and 3") ;; slideshow-animate : number -> image ; Runs a slideshow. (define (slideshow-animate w) (correct-image (add1 (remainder w 3)))) (check-expect (slideshow-animate 0) (correct-image 1)) (check-expect (slideshow-animate 1) (correct-image 2)) (check-expect (slideshow-animate 2) (correct-image 3)) (check-expect (slideshow-animate 3) (correct-image 1)) #;(big-bang 0 (on-tick add1 0.1) ; When 0.01, this produces interesting colors. (to-draw slideshow-animate)) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; 17.1.6 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ; A light-color is any of the strings "green", "yellow", or "red". (define radius 30) ; Radius of the traffic lights ; change-light : light-color -> light-color (define (change-light color) ; color light-color (cond [(string=? color "green") "yellow"] [(string=? color "yellow") "red"] [(string=? color "red") "green"])) (check-expect (change-light "green") "yellow") (check-expect (change-light "yellow") "red") (check-expect (change-light "red") "green") ;; draw-tl : light-color light-color -> image ; Draws a single traffic light. (define (draw-tl lc target-lc) (circle radius 'solid (if (string=? lc target-lc) lc "black"))) (check-expect (draw-tl "green" "green") (circle 30 'solid "green")) (check-expect (draw-tl "red" "green") (circle 30 'solid "black")) ; show-light : light-color -> image (define (show-light color) ; color light-color (above (draw-tl color "red") (draw-tl color "yellow") (draw-tl color "green"))) (big-bang "red" (check-with string?) (on-draw show-light) (on-tick change-light 5))
false
7e165f0d234c1f17a358918897af982126c8e6f3
5633f66a941b418cf6c18724a78de36de82ac73c
/share/a6-bosco.rkt
987a5b58a416ea5fd48105ccc6ae8e74d8907284
[]
no_license
zvbchenko/Racket_Compiler
d21c546c05bedf8c0855be4fdb81343cff2c8b81
ab3968381895aa0d54b26427d1b0a2291c77a755
refs/heads/main
2023-07-13T07:59:19.641353
2021-08-17T18:36:57
2021-08-17T18:36:57
397,353,022
0
0
null
null
null
null
UTF-8
Racket
false
false
16,018
rkt
a6-bosco.rkt
#lang racket (require racket/set "util.rkt" "a7-graph-lib.rkt" "a7-compiler-lib.rkt" ) (provide ;uncover-locals ; undead-analysis ;conflict-analysis ;pre-assign-frame-variables ;assign-frames ;assign-registers ) ; Exercise 3 ; Block-lang-v6 -> Block-locals-lang-v6 (define (uncover-locals p) (define (to-tail-list tail) (match tail [`(begin ,s ... ,t) tail] [_ (list tail)])) ; Statement/Tail Locals -> Locals ; Uncover locals in a given statement (define (uncover-locals-statement s locals) (match s [`(set! ,aloc ,triv) (add-local aloc (add-local triv locals))] [`(set! ,aloc1 (,binop ,aloc2 ,opand)) (add-local aloc1 (add-local aloc2 (add-local opand locals)))] [`(jump ,trg ,aloc ...) (foldl add-local (add-local trg locals) aloc)] [`(if (,cmp ,aloc ,opand) ,tail1 ,tail2) (let* ([new-locals (add-local aloc (add-local opand locals))] [new-locals-tail1 (foldl uncover-locals-statement new-locals (to-tail-list tail1))] [new-locals-tail2 (foldl uncover-locals-statement new-locals-tail1 (to-tail-list tail2))]) new-locals-tail2) ] [`(return-point ,label ,tail) (uncover-locals-statement tail locals)] [`(begin ,s ...) (foldl uncover-locals-statement locals s)] [_ locals])) ; Aloc Locals -> Locals ; Add an aloc to given locals (define (add-local aloc locals) (if (and (not (label? aloc)) (not (rloc? aloc)) (aloc? aloc) (not (member aloc locals))) (cons aloc locals) locals)) ; Block -> Block ; Update block with locals info (define (uncover-locals-block b) (match b [`(define ,label ,info ,tail) (append (list 'define) (list label) (list (info-set info 'locals (foldl uncover-locals-statement empty (to-tail-list tail)))) (list tail)) ])) (match p [`(module ,b ...) (append (list 'module) (map uncover-locals-block b))])) ; Exercise 5 (define (conflict-analysis p) ; Vertex Vertex Graph -> Graph ; Return a new graph with an edge from from to to if to is not a neighbor of from (define (add-directed-conflict from to conflict-graph) (if (or (not (contain-vertex conflict-graph from)) (eq? from to) (member to (get-neighbors conflict-graph from))) conflict-graph (add-directed-edge conflict-graph from to))) ; Vertex Vertex Graph -> Graph ; Return a new graph with edges from a to b and from b to a if they do not already exist (define (add-conflict a b conflict-graph) (add-directed-conflict b a (add-directed-conflict a b conflict-graph))) ; Undead-set-tree Statement Conflict-graph -> Conflict-graph ; Update given conflict graph for the given statement and its undead-set-tree (define (conflict-analysis-stmt ust s conflict-graph) (match s [`(set! ,loc ,_) (for/fold ([conflict-graph^ (safe-add-vertex conflict-graph loc)]) ([u-loc ust]) (add-conflict loc u-loc conflict-graph^))] [`(return-point ,_ ,tail) (conflict-analysis-tail (second ust) tail conflict-graph)])) ; Undead-set-tree Tail Conflict-graph -> Conflict-graph ; Update given conflict graph for the given tail and its undead-set-tree (define (conflict-analysis-tail ust t conflict-graph) (match t [`(begin ,ss ... ,tail) (let* ([usts (reverse (rest (reverse ust)))] [tail-ust (last ust)] [conflict-graph^ (for/fold ([conflict-graph^ conflict-graph]) ([ust^ usts] [s ss]) (conflict-analysis-stmt ust^ s conflict-graph^))]) (conflict-analysis-tail tail-ust tail conflict-graph^))] [`(if (,cmp ,loc ,opand) ,tail1 ,tail2) (conflict-analysis-tail (third ust) tail2 (conflict-analysis-tail (second ust) tail1 conflict-graph))] [_ conflict-graph])) ; Block -> Block ; Return a block with new Info (define (conflict-analysis-block b) (match b [`(define ,label ,info ,tail) (let ([conflicts (conflict-analysis-tail (info-ref info 'undead-out) tail (new-graph))]) (append (list 'define) (list label) (list (info-set info 'conflicts conflicts)) (list tail)))])) (match p [`(module ,b ...) (append (list 'module) (map conflict-analysis-block b))])) ; Exercise 6 (define (pre-assign-frame-variables p) ; Block -> Block ; Return a block with new Info (define (pre-assign-frame-variables-block b gcua) (match b [`(define ,label ,info ,tail) (let ([assignment (localize-assignment (info-ref info 'call-undead) gcua)]) (append (list 'define) (list label) (list (info-set info 'assignment assignment)) (list tail)))])) ; Block -> Conflict-graph (define (get-conflict-graph b) (match b [`(define ,label ,info ,tail) (info-ref info 'conflicts)])) ; (listof Block) -> Conflict-graph ; Return one global conflict graph for all the given blocks (define (get-global-conflict-graph bs) (define (remove-duplicate conflict graph) (info-set graph (first conflict) (set->list (list->set (second conflict))))) (foldr remove-duplicate '() (merge-conflicts (map get-conflict-graph bs)))) ; Block -> Call-undead ; Return locals of a block (define (get-call-undead b) (match b [`(define ,label ,info ,tail) (info-ref info 'call-undead)])) ; (listof Block) -> Call-undead ; Return one global Call-undead for all the given blocks (define (get-global-call-undead bs) (for/fold ([global-call-undead '()]) ([b bs]) (set->list (list->set (append global-call-undead (get-call-undead b)))))) (define (safe-dict-ref dict key) (if (member key (dict-keys dict)) (dict-ref dict key) empty)) ;; (listof fvar) -> fvar (define (produce-non-conflict-fvar conflict-fvars) (define (helper indices n) (cond [(empty? indices) n] [(= (first indices) n) (helper (rest indices) (+ n 1))] [else n])) (let ([indices (set->list (list->set (map fvar->index conflict-fvars)))]) (make-fvar (helper indices 0)))) ; Conflict-graph Call-undead -> Assignment (define (produce-global-call-undead-assignment gcg gcu) (for/fold ([assignment '()]) ([cu gcu]) (let* ([conflict-alocs (filter aloc? (info-ref gcg cu))] [conflict-fvars (for/fold ([conflict-fvars '()]) ([aloc conflict-alocs]) (append conflict-fvars (safe-dict-ref assignment aloc)))] [conflict-fvars^ (append (filter fvar? (info-ref gcg cu)) conflict-fvars)] [fvar (produce-non-conflict-fvar conflict-fvars^)]) (cons (list cu fvar) assignment)))) (match p [`(module ,bs ...) (let ([gcua (produce-global-call-undead-assignment (get-global-conflict-graph bs) (get-global-call-undead bs))]) (append (list 'module) (for/list ([b bs]) (pre-assign-frame-variables-block b gcua))))])) ; Exercise 7 (define (assign-frames p) ; Block -> Block ; Return a block with new Info (define (assign-frames-block b) (match b [`(define ,label ,info ,tail) (let ([call-undeads (info-ref info 'call-undead)]) (if (empty? call-undeads) `(define ,label ,(clean-up-info info) ,tail) (let* ([assignment (info-ref info 'assignment)] [fvars (for/list ([cu call-undeads]) (info-ref assignment cu))] [n (add1 (get-max-index fvars))]) `(define ,label ,(assign-frames-info info n) ,(assign-frames-tail tail n)))))])) ; Tail Number -> Tail (define (assign-frames-tail t n) (match t [`(begin ,ss ... ,tail) (append (list 'begin) (for/fold ([ss^ '()]) ([s (for/list ([s ss]) (assign-frames-stmt s n))]) (append ss^ s)) (list (assign-frames-tail tail n)))] [`(if ,cmp-stmt ,tail1 ,tail2) (append (list 'if) (list cmp-stmt) (list (assign-frames-tail tail1 n)) (list (assign-frames-tail tail2 n)))] [_ t])) ;; Info Number -> Info (define (assign-frames-info info n) (let* ([new-frames (info-ref info 'new-frames)] [assignment (info-ref info 'assignment)] [assignment^ (for/fold ([assignment^ assignment]) ([new-frame new-frames]) (assign-fvar assignment^ new-frame n))] [info^ (info-set info 'assignment assignment^)]) (clean-up-info info^))) ;; Assignment New-frame Number -> Assignment (define (assign-fvar assignment new-frame n) (if (empty? new-frame) assignment (let* ([fvar (make-fvar n)] [assignment^ (info-set assignment (first new-frame) fvar)]) (assign-fvar assignment^ (rest new-frame) (add1 n))))) ;; Info -> Info (define (clean-up-info info) (let* ([locals (info-ref info 'locals)] [undead-out (info-ref info 'undead-out)] [conflicts (info-ref info 'conflicts)] [assignment (info-ref info 'assignment)] [locals^ (remove* (dict-keys assignment) locals)] [info^ (info-set '() 'locals locals^)] [info^2 (info-set info^ 'undead-out undead-out)] [info^3 (info-set info^2 'conflicts conflicts)] [info^4 (info-set info^3 'assignment assignment)]) info^4)) ;; Assignment New-frame (list of Fvar) Number -> Number Assignment (define (assign-fvar-to-new-frame assignment new-frame conflict-fvars n) (let ([fvar (make-fvar n)]) (if (member fvar conflict-fvars) (assign-fvar-to-new-frame assignment new-frame conflict-fvars (add1 n)) (values n (info-set assignment new-frame fvar))))) ; Stmt Number -> (listof Stmt) (define (assign-frames-stmt stmt n) (match stmt [`(return-point ,label ,tail) (let ([fbp (current-frame-base-pointer-register)] [offset (* n word-size-bytes)] [tail^ (assign-frames-tail tail n)]) (list `(set! ,fbp (+ ,fbp ,offset)) `(return-point ,label ,tail^) `(set! ,fbp (- ,fbp ,offset))))] [_ (list stmt)])) (define (get-max-index fvars) (let ([indices (map fvar->index fvars)]) ((for/fold ([func max]) ([index indices]) (curry func index))))) (define (safe-dict-ref dict key) (if (member key (dict-keys dict)) (dict-ref dict key) empty)) ;; (listof fvar) -> fvar (define (produce-non-conflict-fvar conflict-fvars) (define (helper indices n) (cond [(empty? indices) n] [(= (first indices) n) (helper (rest indices) (+ n 1))] [else n])) (let ([indices (set->list (list->set (map fvar->index conflict-fvars)))]) (make-fvar (helper indices 0)))) ; Conflict-graph Call-undead -> Assignment (define (produce-global-call-undead-assignment gcg gcu) (for/fold ([assignment '()]) ([cu gcu]) (let* ([conflict-alocs (filter aloc? (info-ref gcg cu))] [conflict-fvars (for/fold ([conflict-fvars '()]) ([aloc conflict-alocs]) (append conflict-fvars (safe-dict-ref assignment aloc)))] [conflict-fvars^ (append (filter fvar? (info-ref gcg cu)) conflict-fvars)] [fvar (produce-non-conflict-fvar conflict-fvars^)]) (cons (list cu fvar) assignment)))) (match p [`(module ,bs ...) (append (list 'module) (for/list ([b bs]) (assign-frames-block b)))])) ; Exercise 8 (define (assign-registers p) ; Block -> Block ; Return a block with new Info (define (assign-registers-block b global-assignment) (match b [`(define ,label ,info ,tail) (let* ([locals (info-ref info 'locals)] [assignment (info-ref info 'assignment)] [global-assigned-alocs (dict-keys global-assignment)] [assigned-locals (set->list (set-intersect (list->set locals) (list->set global-assigned-alocs)))] [assignment^ (append assignment (localize-assignment assigned-locals global-assignment))] [info^ (info-set info 'assignment assignment^)] [info^2 (info-set info^ 'locals (remove* assigned-locals locals))]) `(define ,label ,info^2 ,tail))])) ; Block -> Conflict-graph (define (get-conflict-graph b) (match b [`(define ,label ,info ,tail) (info-ref info 'conflicts)])) ; (listof Block) -> Conflict-graph ; Return one global conflict graph for all the given blocks (define (get-global-conflict-graph bs) (define (remove-duplicate conflict graph) (info-set graph (first conflict) (set->list (list->set (second conflict))))) (foldr remove-duplicate '() (merge-conflicts (map get-conflict-graph bs)))) (define (safe-dict-ref dict key) (if (member key (dict-keys dict)) (dict-ref dict key) empty)) ; Conflict-graph Assignment -> Assignment (define (produce-global-assignment conflicts assignment) (for/fold ([assignment^ assignment]) ([conflict (sort conflicts conflict-<)]) (let* ([aloc (first conflict)] [conflict-alocs (filter aloc? (second conflict))] [conflict-rlocs (for/fold ([conflict-rlocs '()]) ([conflict-aloc conflict-alocs]) (append conflict-rlocs (safe-dict-ref assignment^ conflict-aloc)))] [conflict-rlocs^ (append conflict-rlocs (filter rloc? (info-ref conflicts aloc)))] [rloc (produce-non-conflict-rloc conflict-rlocs^)]) (if (rloc? rloc) (cons (list aloc rloc) assignment^) assignment^)))) ; Conflict Conflict -> Boolean (define (conflict-< conflict1 conflict2) (< (length (second conflict1)) (length (second conflict2)))) ; (listof rloc) -> False or rloc (define (produce-non-conflict-rloc conflict-rlocs) (let ([available-rlocs (remove* conflict-rlocs (current-assignable-registers))]) (if (empty? available-rlocs) #f (first available-rlocs)))) ; Block -> Assignment (define (get-assignment b) (match b [`(define ,label ,info ,tail) (info-ref info 'assignment)])) ; (listof Block) -> Assignment (define (get-global-assignment bs) (for/fold ([global-assignment '()]) ([assignment (map get-assignment bs)]) (append global-assignment assignment))) (match p [`(module ,bs ...) (let* ([assignment (get-global-assignment bs)] [conflicts (get-global-conflict-graph bs)] [assignment^ (produce-global-assignment conflicts assignment)]) (append (list 'module) (for/list ([b bs]) (assign-registers-block b assignment^))))]))
false
4f77c2af563f67218310c3f607fe92afafe0d120
f1e530da5c62986635c3a24ee2b7d5c0fc8cff5f
/plasma.rkt
342736e625feb13f43d1a7d9e06f0ba2900bfc6d
[]
no_license
david-vanderson/warp
3172892fc2d19ae9e2f19fa026e2d7cdf4e59a86
cdc1d0bd942780fb5360dc6a34a2a06cf9518408
refs/heads/master
2021-01-23T09:30:16.887310
2018-09-30T03:52:59
2018-09-30T03:52:59
20,066,539
24
1
null
null
null
null
UTF-8
Racket
false
false
2,037
rkt
plasma.rkt
#lang racket/base (require mode-lambda mode-lambda/static) (require "defs.rkt" "utils.rkt" "draw-utils.rkt") (provide (all-defined-out)) (define PLASMA_LIFE 3000) ; ms after which plasma starts fading (define PLASMA_FADE 2.0) ; energy loss per second after PLASMA_LIFE (define (plasma-setup-pre! sd) (add-sprite!/file sd 'plasma (build-path IMAGEDIR "plasma.png"))) (define PLASMA_SPRITE_IDX #f) (define PLASMA_SPRITE_SIZE #f) (define (plasma-setup-post! csd) (set! PLASMA_SPRITE_IDX (sprite-idx csd 'plasma)) (define w (sprite-width csd PLASMA_SPRITE_IDX)) (define h (sprite-height csd PLASMA_SPRITE_IDX)) (set! PLASMA_SPRITE_SIZE (max w h))) (define (plasma-damage space p) (plasma-energy space p)) (define (plasma-energy space p) (- (plasma-e p) (* (max 0.0 (- (obj-age space p) PLASMA_LIFE)) (/ PLASMA_FADE 1000.0)))) (define (plasma-energy->radius e) (* 2.0 (sqrt (max 1.0 e)))) (define (plasma-radius space p) (plasma-energy->radius (plasma-energy space p))) (define (plasma-dead? space p) ((plasma-energy space p) . < . 1)) (define (reduce-plasma! space p damage) (define changes '()) (define pr (plasma-radius space p)) (set-plasma-e! p (- (plasma-e p) damage)) (when (plasma-dead? space p) (set-obj-alive?! p #f) (when (client?) (define e (effect (next-id) (space-time space) #t 1.0 (posvel (space-time space) (obj-x p) (obj-y p) 0.0 0.0 0.0 0.0) pr 300)) (append! changes (chadd e #f)))) changes) (define (draw-plasma csd center scale p space fowa layer-ships) (define cycle 1000.0) (define t (modulo (obj-age space p) cycle)) (define rot (* 2pi (/ t cycle))) (define-values (x y) (obj->screen p center scale)) ; add 1 to plasma radius for the transparent pixel border (define size (/ (* (* 2.0 (+ 1.0 (plasma-radius space p))) scale) PLASMA_SPRITE_SIZE)) (sprite x y PLASMA_SPRITE_IDX #:layer layer-ships #:a fowa #:theta (exact->inexact (- rot)) #:m size))
false
823f581c79f8994dd92ac074e241e093b4924fee
ec65ae8f1c9326112386326bd6aa1eb5ebfad708
/parsack-test/tests/parsack/example-tests/csv-parser-basic-tests.rkt
2132aa9921b9efe4d2c1c0ca8b86646c99c55271
[ "LicenseRef-scancode-unknown-license-reference", "MIT" ]
permissive
stchang/parsack
84d3b90a17b51c8dc507efa865a481c6b21e5b66
57b21873e8e3eb7ffbdfa253251c3c27a66723b1
refs/heads/master
2022-12-12T02:47:51.709492
2022-07-11T00:48:34
2022-07-12T15:56:35
11,594,281
44
9
MIT
2022-12-03T03:52:37
2013-07-22T22:46:20
Racket
UTF-8
Racket
false
false
2,784
rkt
csv-parser-basic-tests.rkt
#lang racket (require parsack tests/parsack/test-utils parsack/examples/csv-parser-basic rackunit racket/runtime-path) (check-parsing ($cellContent "abc") "abc" "") (check-parsing ($cellContent "abc\n") "abc" "\n") (check-parsing ($cellContent "abc,") "abc" ",") (check-empty-parsing ($cellContent "\n") "\n") (check-empty-parsing ($cellContent ",") ",") (check-parse-error ((>> (char #\,) $cellContent) "abc") (fmt-err-msg 1 1 1 "a" (list ","))) (check-parse-error ((>> (char #\,) $cellContent) "\nabc") (fmt-err-msg 1 1 1 "\n" (list ","))) (check-parse-error ((>> (char #\a) (char #\,)) "abc") (fmt-err-msg 1 2 2 "b" (list ","))) (check-parse-error ((>> (char #\newline) (char #\,)) "\na") (fmt-err-msg 2 1 2 "a" (list ","))) (check-parsing ((>> (char #\,) $cellContent) ",abc") "abc" "") (check-empty-parsing ($remainingCells "abc") "abc") (check-parsings ($cells "abc,def") "abc" "def" "") (check-parsings ($cells "abc,def,ghi\n") "abc" "def" "ghi" "\n") (check-parsings ($cells "abc,,ghi\n") "abc" "" "ghi" "\n") (check-parsings ($cells "abc,,ghi") "abc" "" "ghi" "") (check-parsings ($line "abc,def\nghi") "abc" "def" "ghi") ; TODO: merge problem? (check-parse-error ($line "abc") (fmt-err-msg 1 4 4 "end of input" (list "," "end-of-line"))) (check-empty-parsing ($csv "") "") (check-parse-error ($csv "abc") (fmt-err-msg 1 4 4 "end of input" (list "," "end-of-line"))) (check-line-parsings ($csv "abc,def\nghi,jkl\n") ("abc" "def") ("ghi" "jkl") "") ;; csv example from RWH: http://book.realworldhaskell.org/read/using-parsec.html (define-runtime-path csv-example "csv-example") (check-line-parsings ($csv (with-input-from-file csv-example port->string)) ("\"Product\"" "\"Price\"") ("\"O'Reilly Socks\"" "10") ("\"Shirt with \"\"Haskell\"\" text\"" "20") ("\"Shirt" " \"\"O'Reilly\"\" version\"" "20") ("\"Haskell Caps\"" "15") "") ;; all Real World Haskell tests (check-empty-parsing ($csv "") "") (check-parse-error ($csv "hi") (fmt-err-msg 1 3 3 "end of input" (list "," "end-of-line"))) (check-line-parsings ($csv "hi\n") ("hi") "") (check-line-parsings ($csv "line1\nline2\nline3\n") ("line1") ("line2") ("line3") "") (check-line-parsings ($csv "cell1,cell2,cell3\n") ("cell1" "cell2" "cell3") "") (check-line-parsings ($csv "l1c1,l1c2\nl2c1,l2c2\n") ("l1c1" "l1c2") ("l2c1" "l2c2") "") (check-line-parsings ($csv "Hi,\n\n,Hello\n") ("Hi" "") ("") ("" "Hello") "") (check-line-parsings ($csv "line1\r\nline2\nline3\n\rline4\rline5\n") ("line1") ("line2") ("line3") ("line4") ("line5") "") (check-parse-error ($csv "line1") (fmt-err-msg 1 6 6 "end of input" (list "," "end-of-line")))
false
ca5da51ecb82a8afeee4090404e6bec807c6e64e
ad02382778cb309adab4878c95614df65c36cb5b
/info.rkt
6083cb9f1375deadc0e90a4dcd7fd68ca0afe4d0
[]
no_license
dgoffredo/xsd-gc
c6fbb9aeb73f94d2b11d43782728b821a408ae4d
75e0b3b33ff3dae7e5f996d9c61df10a5ec2be26
refs/heads/master
2020-03-24T16:18:10.717228
2019-02-07T16:20:24
2019-02-07T16:20:24
142,819,675
1
0
null
null
null
null
UTF-8
Racket
false
false
346
rkt
info.rkt
#lang info (define name "xsd-gc") (define deps '("racket" "threading-lib")) (define raco-commands '(("xsd-gc" ; command (submod xsd-gc/tool main) ; module path "remove unused types from an XML schema" ; description #f))) ; prominence (#f -> hide)
false
346b7c48d1e1a9115419c25bfb6b564e72ef7f7b
5a19631a10bab15dafa5353bfb2faa454e5be6b9
/Brasilia_2013/defs.rkt
a800a704b6c5a11ebb7c01656cf051c88e804044
[]
no_license
amkhlv/talks
3d14256dbf58c9c5534fdca585bad0055cf31371
04ab693beffb4c132fd83577b28c6472fd27bd34
refs/heads/master
2021-09-08T07:40:54.579550
2021-09-04T17:50:50
2021-09-04T17:50:50
14,686,398
0
0
null
null
null
null
UTF-8
Racket
false
false
1,981
rkt
defs.rkt
(module defs racket ; --------------------------------------------------------------------------------------------------- ; it is possible to define new functions: (require racket scribble/core scribble/base scribble/html-properties) (require (planet amkhlv/bystroTeX/common) (planet amkhlv/bystroTeX/slides)) (provide label) (define (label s) (elemtag s (number-for-formula s))) (provide ref) (define (ref s) (elemref s (ref-formula s))) (provide red) (define (red . x) (apply clr (cons "red" x))) (provide green) (define (green . x) (apply clr (cons "green" x))) (provide greenbox-style) (define (greenbox-style more) (bystro-elemstyle (string-append "border-style:solid;border-color:#00aa00;" more))) (provide redbox-style) (define (redbox-style more) (bystro-elemstyle (string-append "border-style:solid;border-color:#aa0000;" more))) (provide greenbox) (define (greenbox more . x) (elem #:style (greenbox-style more) x)) (provide redbox) (define (redbox more . x) (elem #:style (redbox-style more) x)) (provide greenbox-wide) (define (greenbox-wide more . x) (nested #:style (greenbox-style more) x)) (provide redbox-wide) (define (redbox-wide more . x) (nested #:style (redbox-style more) x)) (provide hrule) (define (hrule) (element (make-style #f (list (alt-tag "hr"))) "")) (provide leftbar) (define (leftbar . x) (para #:style (bystro-elemstyle "border-left-style:solid;border-color:green;padding-left:12px;") x)) ; some more definitions: (require racket/dict) (init-counter exercise) (init-counter theorem) (provide ex-num ex-ref th-num th-ref) (define (ex-num label) (elemtag label (number->string (exercise-next label)))) (define (ex-ref label) (elemref label (string-append "Exercise " (number->string (exercise-number label))))) (define (th-num label) (elemtag label (number->string (theorem-next label)))) (define (th-ref label) (elemref label (string-append "Theorem " (number->string (theorem-number label))))) )
false
f6ff9ac5da3386af736b8c0cd022fa8d9b00d0cd
bb8ed340cdea5018648df48b8b2e1f2b457c7981
/reverse-dll.rkt
d342fe6e59f4ce9d448e78f0604f3ae5a4fea3c6
[]
no_license
vkz/warm-up
ebe33416bdcd0b36a28c62aca3097fd1d3d741ff
b019db47873d01d6b37d0a394a6e88021f4ae1bd
refs/heads/master
2021-01-19T17:42:01.452269
2013-11-02T00:21:38
2013-11-02T00:21:38
null
0
0
null
null
null
null
UTF-8
Racket
false
false
3,362
rkt
reverse-dll.rkt
#lang racket ;; reversing doubly-linked lists ;; based on Jay McCarthy's ;; Source: http://jeapostrophe.github.io/2012-03-31-siq-reve-post.html ;; Wiki: http://en.wikipedia.org/wiki/Doubly_linked_list (require rackunit racket/list) ;; DLL implementation ;; ================== (struct node (last element next) #:transparent #:mutable) (struct dll (head tail) #:transparent #:mutable) (define (make-dll) (dll #f #f)) (define ((make-dll-cons! dll-head node set-node-last! dll-tail set-dll-tail! set-dll-head!) e l) (define head (dll-head l)) (define new (node #f e head)) (when head (set-node-last! head new)) (unless (dll-tail l) (set-dll-tail! l head)) ;I think Jay has a mistake here (set-dll-head! l new)) (define dll-cons! (make-dll-cons! dll-head node set-node-last! dll-tail set-dll-tail! set-dll-head!)) (define dll-snoc! (make-dll-cons! dll-tail (lambda (last e next) (node next e last)) set-node-next! dll-head set-dll-head! set-dll-tail!)) (define (make-dll-fold dll-head node-next) (define (dll-fold cons empty node) (if node (cons (node-element node) (dll-fold cons empty (node-next node))) empty)) (lambda (cons empty list) (dll-fold cons empty (dll-head list)))) (define dll-fold (make-dll-fold dll-head node-next)) (define dll-rfold (make-dll-fold dll-tail node-last)) ;; Naive dll reversing O(n) ;; =================== (define (dll-naive-reverse! l) (define head (dll-head l)) (let loop ([last #f] [current (dll-head l)]) (when last (set-node-last! last current)) (when current (define next (node-next current)) (set-node-next! current last) (loop current next))) (set-dll-head! l (dll-tail l)) (set-dll-tail! l head)) ;; delayed dll reversing O(1) ;; ===================== (struct rdll (reversed? dll) #:transparent #:mutable) ;; just reversing the flag (define (rdll-reverse! l) (set-rdll-reversed?! l (not (rdll-reversed? l)))) (define (make-rdll) (rdll #f (make-dll))) (define-syntax-rule (define-rdll (id arg ... rl) reversed-dll normal-dll) (define (id arg ... rl) (define l (rdll-dll rl)) (if (rdll-reversed? rl) (reversed-dll arg ... l) (normal-dll arg ... l)))) (define-rdll (rdll-cons! e rl) dll-snoc! dll-cons!) (define-rdll (rdll-snoc! e rl) dll-cons! dll-snoc!) (define-rdll (rdll-fold cons empty rl) dll-rfold dll-fold) (define-rdll (rdll-rfold cons empty rl) dll-fold dll-rfold) ;; Testing ;; ======= (define (dll-test make-dll dll-cons! dll-snoc! dll-fold dll-rfold dll-reverse!) (define c123 (make-dll)) (dll-cons! 2 c123) (dll-cons! 1 c123) (dll-snoc! 3 c123) (check-equal? (dll-fold cons empty c123) '(1 2 3)) (check-equal? (dll-rfold cons empty c123) '(3 2 1)) (dll-reverse! c123) (check-equal? (dll-fold cons empty c123) '(3 2 1)) (check-equal? (dll-rfold cons empty c123) '(1 2 3)) (dll-cons! 4 c123) (dll-reverse! c123) (dll-cons! 0 c123) (check-equal? (dll-fold cons empty c123) '(0 1 2 3 4)) (check-equal? (dll-rfold cons empty c123) '(4 3 2 1 0))) (dll-test make-dll dll-cons! dll-snoc! dll-fold dll-rfold dll-naive-reverse!) (dll-test make-rdll rdll-cons! rdll-snoc! rdll-fold rdll-rfold rdll-reverse!)
true
de6ca77e80506788e55a34daeec2287d7ea84cab
82c76c05fc8ca096f2744a7423d411561b25d9bd
/typed-racket-test/optimizer/missed-optimizations/regexp.rkt
e89bf8811a9c898ac9915ad8eb3aef10137f3901
[ "MIT", "Apache-2.0", "LicenseRef-scancode-unknown-license-reference" ]
permissive
racket/typed-racket
2cde60da289399d74e945b8f86fbda662520e1ef
f3e42b3aba6ef84b01fc25d0a9ef48cd9d16a554
refs/heads/master
2023-09-01T23:26:03.765739
2023-08-09T01:22:36
2023-08-09T01:22:36
27,412,259
571
131
NOASSERTION
2023-08-09T01:22:41
2014-12-02T03:00:29
Racket
UTF-8
Racket
false
false
385
rkt
regexp.rkt
#;#; #<<END TR info: regexp.rkt 2:14 "foo" -- non-regexp pattern TR info: regexp.rkt 3:14 #"foo" -- non-regexp pattern END #<<END '("foo") '(#"foo") '("foo") '(#"foo") END #lang typed/racket #reader typed-racket-test/optimizer/reset-port (regexp-match "foo" "foo") (regexp-match #"foo" #"foo") (regexp-match (regexp "foo") "foo") ; ok (regexp-match (byte-regexp #"foo") #"foo") ; ok
false
4d3ae474fe6b17d111b31c00264a3e211c358724
f9d7d9fa5c4129d7f5f9dde67b5a418f5c0371d3
/x11/info.rkt
1eef557497b35c02719b2badc6d4d55859a17fbc
[]
no_license
kazzmir/x11-racket
20f96394df9997b9b681f405492b9d0ac41df845
97c4a75872cfd2882c8895bba88b87a4ad12be0e
refs/heads/master
2021-07-16T04:13:17.708464
2021-03-10T15:22:41
2021-03-10T15:22:41
6,407,498
8
1
null
2013-08-14T03:43:00
2012-10-26T17:14:33
Racket
UTF-8
Racket
false
false
244
rkt
info.rkt
#lang setup/infotab (define name "X11") (define blurb (list "Bindings to the X11 library")) (define categories '(media)) (define version "1.0") (define doc.txt "doc.txt") (define primary-file "x11.rkt") (define release-notes '("Racketize"))
false
e832a6fc9f54eaafe8ce6a4d3bf6074c83c45e48
af481467d7c536538137aaca427abf9e8ddba33d
/algorithms/dijkstra/dijkstraMcCarthy.rkt
0f5fa86ceac553a2c3ab90a316496ca6e7dd5449
[]
no_license
ArnulfoPerez/racket
a770f8048982a13b470fa2eb37136296b41cd041
5e1029d0d35170d4c5bfa2d89728d289edadf252
refs/heads/master
2022-09-09T04:18:56.276676
2020-05-29T00:12:42
2020-05-29T00:12:42
254,758,994
0
0
null
null
null
null
UTF-8
Racket
false
false
1,398
rkt
dijkstraMcCarthy.rkt
#lang racket (require (planet jaymccarthy/dijkstra:1:1)) (define-struct edge (end weight)) (define-struct graph (adj)) (define (create-graph) (make-graph (make-hasheq))) (define (graph-add! g start end [weight 0]) (hash-update! (graph-adj g) start (lambda (old) (list* (make-edge end weight) old)) empty)) (define (graph-shortest-path g src [stop? (lambda (n) #f)]) (shortest-path (lambda (n) (hash-ref (graph-adj g) n empty)) edge-weight edge-end src stop?)) (define g (create-graph)) (graph-add! g 1 2 4) (graph-add! g 1 4 1) (graph-add! g 2 1 74) (graph-add! g 2 3 2) (graph-add! g 2 5 12) (graph-add! g 3 2 12) (graph-add! g 3 10 12) (graph-add! g 3 6 74) (graph-add! g 4 7 22) (graph-add! g 4 5 32) (graph-add! g 5 8 33) (graph-add! g 5 4 66) (graph-add! g 5 6 76) (graph-add! g 6 10 21) (graph-add! g 6 9 11) (graph-add! g 7 3 12) (graph-add! g 7 8 10) (graph-add! g 8 7 2) (graph-add! g 8 9 72) (graph-add! g 9 10 7) (graph-add! g 9 6 31) (graph-add! g 9 8 18) (graph-add! g 10 6 8) (define-values (dist1 prev1) (graph-shortest-path g 1)) (shortest-path-to prev1 10) (hash-ref dist1 10) (define-values (dist2 prev2) (graph-shortest-path g 1 (lambda (n) (= n 10)))) (shortest-path-to prev2 10) (hash-ref dist2 10)
false
887954d5742aab2f12053f4fa37ee8dc63117fee
2b1821134bb02ec32f71ddbc63980d6e9c169b65
/lisp/racket/SPD/7/hp-family-tree.rkt
142ae9a8971f8dcc6a886c9230aef641dcd5bc52
[]
no_license
mdssjc/study
a52f8fd6eb1f97db0ad523131f45d5caf914f01b
2ca51a968e254a01900bffdec76f1ead2acc8912
refs/heads/master
2023-04-04T18:24:06.091047
2023-03-17T00:55:50
2023-03-17T00:55:50
39,316,435
3
1
null
2023-03-04T00:50:33
2015-07-18T23:53:39
Java
UTF-8
Racket
false
false
6,868
rkt
hp-family-tree.rkt
;; The first three lines of this file were inserted by DrRacket. They record metadata ;; about the language level of this file in a form that our tools can easily process. #reader(lib "htdp-beginner-abbr-reader.ss" "lang")((modname hp-family-tree) (read-case-sensitive #t) (teachpacks ((lib "batch-io.rkt" "teachpack" "2htdp"))) (htdp-settings #(#t constructor repeating-decimal #f #t none #f ((lib "batch-io.rkt" "teachpack" "2htdp")) #f))) ;; hp-family-tree.rkt ;; Mutual Reference P3 - HP Family Tree ;; Represent information about descendant family trees from Harry ;; Potter and design functions that operate on them. ;; In this problem set you will represent information about descendant family ;; trees from Harry Potter and design functions that operate on those trees. ;; ;; To make your task much easier we suggest two things: ;; - you only need a DESCENDANT family tree ;; - read through this entire problem set carefully to see what information ;; the functions below are going to need. Design your data definitions to ;; only represent that information. ;; - you can find all the information you need by looking at the individual ;; character pages like the one we point you to for Arthur Weasley. ;; PROBLEM 1: ;; ;; Design a data definition that represents a family tree from the ;; Harry Potter wiki, which contains all necessary information for the ;; other problems. You will use this data definition throughout the ;; rest of the homework. (define-struct family (name patronus wand descendant)) ;; Family is (make-family String String String ListofFamily) ;; interp. a family is represented by name, patronus, wand and yours descendants ;; ListofFamily is one of: ;; - empty ;; - (cons Family ListofFamily) ;; interp. a list with the descendants #; (define (fn-for-f f) (... (family-name f) (family-patronus f) (family-wand f) (fn-for-lof (family-descendant f)))) #; (define (fn-for-lof lof) (cond [(empty? lof) (...)] [else (... (fn-for-f (first lof)) (fn-for-lof (rest lof)))])) ;; PROBLEM 2: ;; ;; Define a constant named ARTHUR that represents the descendant family tree for ;; Arthur Weasley. You can find all the infomation you need by starting ;; at: http://harrypotter.wikia.com/wiki/Arthur_Weasley. ;; ;; You must include all of Arthur's children and these grandchildren: Lily, ;; Victoire, Albus, James. ;; ;; ;; Note that on the Potter wiki you will find a lot of information. But for some ;; people some of the information may be missing. Enter that information with a ;; special value of "" (the empty string) meaning it is not present. Don't forget ;; this special value when writing your interp. (define F1 (make-family "Victoire" "Bill" "" empty)) (define F2 (make-family "Bill" "Arthur" "Unknown" (list F1))) (define F3 (make-family "Charlie" "Arthur" "Unknown" empty)) (define F4 (make-family "Percy" "Arthur" "Unknown" empty)) (define F5 (make-family "Fred" "Arthur" "Unknown" empty)) (define F6 (make-family "George" "Arthur" "Unknown" empty)) (define F7 (make-family "Ron" "Arthur" "AWC" empty)) (define F8 (make-family "James" "Ginny" "" empty)) (define F9 (make-family "Albus" "Ginny" "Unknown" empty)) (define F10 (make-family "Lily" "Ginny" "" empty)) (define LOF1 (list F8 F9 F10)) (define F11 (make-family "Ginny" "Arthur" "Unknown" LOF1)) (define LOF2 (list F2 F3 F4 F5 F6 F7 F11)) (define ARTHUR (make-family "Arthur" "Stag" "Unknown" LOF2)) ;; PROBLEM 3: ;; ;; Design a function that produces a pair list (i.e. list of two-element lists) ;; of every person in the tree and his or her patronus. For example, assuming ;; that HARRY is a tree representing Harry Potter and that he has no children ;; (even though we know he does) the result would be: (list (list "Harry" "Stag")). ;; ;; You must use ARTHUR as one of your examples. ;; Family -> Listof Listof String ;; ListofFamily -> Listof Listof String ;; produces a pair list (i.e. list of two-element lists) of every person in the tree and his or her patronus (check-expect (pair--family F1) (list (list "Victoire" "Bill"))) (check-expect (pair--lof empty) empty) (check-expect (pair--family F11) (list (list "Ginny" "Arthur") (list "James" "Ginny") (list "Albus" "Ginny") (list "Lily" "Ginny"))) (check-expect (pair--lof LOF1) (list (list "James" "Ginny") (list "Albus" "Ginny") (list "Lily" "Ginny"))) (check-expect (pair--family ARTHUR) (append (list (list "Arthur" "Stag") (list "Bill" "Arthur") (list "Victoire" "Bill") (list "Charlie" "Arthur") (list "Percy" "Arthur") (list "Fred" "Arthur") (list "George" "Arthur") (list "Ron" "Arthur")) (pair--family F11))) ;(define (pair--family f) empty) ; Stubs ;(define (pair--lof lof) empty) (define (pair--family f) (cons (list (family-name f) (family-patronus f)) (pair--lof (family-descendant f)))) (define (pair--lof lof) (cond [(empty? lof) empty] [else (append (pair--family (first lof)) (pair--lof (rest lof)))])) ;; PROBLEM 4: ;; ;; Design a function that produces the names of all descendants of a given person ;; whose wands are made of a given material. ;; ;; You must use ARTHUR as one of your examples. ;; ;; Family String -> ListofString ;; ListofFamily String -> ListofString ;; produces the names of all descendants of a given person whose wands are made of a given material (check-expect (names--family F1 "") (list "Victoire")) (check-expect (names--family F1 "Ore") empty) (check-expect (names--lof empty "") empty) (check-expect (names--lof LOF1 "Unknown") (list "Albus")) (check-expect (names--lof LOF1 "") (list "James" "Lily")) (check-expect (names--lof LOF1 "Ore") empty) (check-expect (names--family ARTHUR "Ore") empty) (check-expect (names--family ARTHUR "Unknown") (list "Arthur" "Bill" "Charlie" "Percy" "Fred" "George" "Ginny" "Albus")) ;(define (names--family f s) empty) ; Stubs ;(define (names--lof lof s) empty) (define (names--family f s) (if (string=? (family-wand f) s) (cons (family-name f) (names--lof (family-descendant f) s)) (names--lof (family-descendant f) s))) (define (names--lof lof s) (cond [(empty? lof) empty] [else (append (names--family (first lof) s) (names--lof (rest lof) s))]))
false
23062dd9089715d5c0a5cfc52ca9c8eb3343c77e
6a517ffeb246b6f87e4a2c88b67ceb727205e3b6
/run.rkt
cd4e7d32aa68eb5c9a9cfae04ac72965af8c5e90
[]
no_license
LiberalArtist/ecmascript
5fea8352f3152f64801d9433f7574518da2ae4ee
69fcfa42856ea799ff9d9d63a60eaf1b1783fe50
refs/heads/master
2020-07-01T01:12:31.808023
2019-02-13T00:42:35
2019-02-13T00:42:35
null
0
0
null
null
null
null
UTF-8
Racket
false
false
204
rkt
run.rkt
#lang racket/base (require racket/cmdline racket/port (prefix-in ecma: "eval.rkt")) (provide main) (define (main file) (ecma:eval (call-with-input-file file port->string)))
false
038bc15b0cca219c3b257f429bcbdd22a3a8c56e
1335ef22e0c7a074fb85cedd91d43518f0a960d7
/Assignments/Assignment3/a3.6.3_dep.rkt
af088b718f9a7af2b5e41e8cf808bc338c645d87
[]
no_license
zhengguan/Scheme
55d35fbf40790fd22cd98876dba484e5bd59ad99
e27eedd2531c18a9b23134dc889a4ed1a0cd22c9
refs/heads/master
2021-01-13T04:58:50.945397
2014-12-19T05:24:36
2014-12-19T05:24:36
29,330,341
1
0
null
2015-01-16T03:12:28
2015-01-16T03:12:28
null
UTF-8
Racket
false
false
1,751
rkt
a3.6.3_dep.rkt
#lang racket (require C311/pmatch) ;; <-- important (require C311/trace) (trace-define value-of (lambda (exp env) (pmatch exp (`,n (guard (number? n)) n) (`,x (guard (symbol? x)) (unbox (env x))) (`,b (guard (boolean? b)) b) (`(zero? ,n-exp) (zero? (value-of n-exp env))) (`(* ,x ,y) (* (value-of x env) (value-of y env))) (`(sub1 ,x) (sub1 (value-of x env))) (`(let ((,x ,val)) ,body) (value-of body (lambda (y) (if (eqv? y x) (box (value-of val env)) (env y))))) (`(if ,test-exp ,then-exp ,else-exp) (if (value-of test-exp env) (value-of then-exp env) (value-of else-exp env))) (`(lambda (,x) ,body) (lambda (a) (value-of body (lambda (y) (if (eqv? y x) a (env y)))))) (`(,rator ,rand) ((value-of rator env) (box (value-of rand env)))) (`(begin2 ,arg1 ,arg2) (begin (value-of arg1 env) (value-of arg2 env))) (`(set! ,x ,valexp) (begin (set-box! (env x) (value-of valexp env)) (value-of x env)))))) ;;(`(set! ,x ,valexp) (if (env x) (set-box! (env x) (value-of valexp env)) #f))))) ;;(begin (set-box! (env x) (value-of valexp env)) (value-of x env)))))) ;;------------------------------------------------------------------------------------------------------------------------------------------- ;;Test cases (value-of '((lambda (f) ((lambda (g) ((lambda (z) (begin2 (g z) z)) 55)) (lambda (y) (f y)))) (lambda (x) (set! x 44))) (lambda (y) (error 'value-of "unbound variable ~s" y))) ;(test "set!-6" (value-of '((lambda (y) (let ((x (begin2 (set! y 7) 8))) (begin2 (set! y 3) ((lambda (z) y) x)))) 4) (lambda (y) (error 'value-of "unbound variable ~s" y))) ;3) ;(test "set!-4" (value-of '(let ((a 3)) (begin2 (begin2 a (set! a 4)) a)) (lambda (y) (error 'value-of "unbound variable ~s" y))) ;4)
false
92eabe659d3a063fe893fde74e47cfebcb456626
990ca336351cbb01ec98228d454345d326d0e4f9
/forms-lib/private/form.rkt
4df140787e31b4537eabc580d57567a3e4eed84a
[ "BSD-3-Clause" ]
permissive
Bogdanp/racket-forms
d64189d855048e68409f9f66de5285996a68f6da
8fca1d8533cd2d36978bdb411e7d9843c681b5c5
refs/heads/master
2023-07-22T16:17:53.002419
2023-07-09T11:07:01
2023-07-09T11:07:01
166,269,447
6
2
null
2021-06-16T08:51:23
2019-01-17T17:43:35
Racket
UTF-8
Racket
false
false
4,192
rkt
form.rkt
#lang racket/base (require (for-syntax racket/base syntax/parse) racket/contract/base racket/hash racket/match racket/string web-server/http "contract.rkt" (submod "contract.rkt" internal) (submod "prim.rkt" unsafe)) (provide form* (contract-out [struct form ([constructor any/c] [children (listof (cons/c symbol? (or/c formlet/c form?)))])] [form-validate (-> form? bindings/c res/c)] [form-process (->* (form? bindings/c) (#:defaults bindings/c #:submitted? boolean?) validation-result/c)] [form-run (->* (form? request?) (#:defaults bindings/c #:submit-methods (listof bytes?)) validation-result/c)])) (struct form (constructor children) #:transparent) (define-syntax (form* stx) (syntax-parse stx [(_ ([name:id f:expr] ...) e:expr ...+) #'(form (lambda (name ...) e ...) (list (cons 'name f) ...))])) (define (validate f bindings namespace) (define-values (results errors) (for/fold ([results null] [errors null]) ([child (in-list (form-children f))]) (define name (car child)) (define formlet (cdr child)) (define res (cond [(form? formlet) (define form-namespace (string-append namespace (symbol->string name) ".")) (validate formlet bindings form-namespace)] [else (define full-name (string-append namespace (symbol->string name))) (define binding (hash-ref bindings full-name #f)) (formlet binding)])) (cond [(ok? res) (values (cons (cdr res) results) errors)] [else (values results (cons (cons name (cdr res)) errors))]))) (cond [(null? errors) (define res (apply (form-constructor f) (reverse results))) (cond [(ok? res) res] [(err? res) res] [else (ok res)])] [else (err (reverse errors))])) (define (form-lookup f full-name) (define names (map string->symbol (string-split full-name "."))) (for/fold ([formlet #f] [subform f] #:result formlet) ([name (in-list names)] #:when subform) (match (assq name (form-children subform)) [#f (values #f #f)] [(cons _ (? form? subform)) (values #f subform)] [(cons _ formlet) (values formlet #f)]))) (module+ internal (provide form-lookup)) (define (form-validate f bindings) (validate f bindings "")) (define (combine/key/keep-newer _k1 _k2 v) v) (define (form-process f bindings #:defaults [defaults (hash)] #:submitted? [submitted? #t]) (define normalized-defaults (for/fold ([defaults (hash)]) ([(name value) defaults]) (hash-set defaults name (cond [(string? value) (binding:form (string->bytes/utf-8 name) (string->bytes/utf-8 value))] [(bytes? value) (binding:form (string->bytes/utf-8 name) value)] [else value])))) (define all-bindings (hash-union normalized-defaults bindings #:combine/key combine/key/keep-newer)) (define ((make-widget-renderer errors) name widget) (when (not (form-lookup f name)) (raise-user-error 'render-widget "Invalid formlet name ~v." name)) (define binding (hash-ref all-bindings name #f)) (widget name binding errors)) (cond [submitted? (define res (form-validate f bindings)) (if (ok? res) (list 'passed (cdr res) (make-widget-renderer null)) (list 'failed (cdr res) (make-widget-renderer (cdr res))))] [else (list 'pending #f (make-widget-renderer null))])) (define (form-run f request #:defaults [defaults (hash)] #:submit-methods [submit-methods '(#"DELETE" #"PATCH" #"POST" #"PUT")]) (define submitted? (member (request-method request) submit-methods)) (define bindings (for/fold ([bindings (hash)]) ([binding (request-bindings/raw request)]) (hash-set bindings (bytes->string/utf-8 (binding-id binding)) binding))) (form-process f bindings #:defaults defaults #:submitted? submitted?))
true
e28b8c8168d9c654720ae1b26c27a21b6e3effbf
37858e0ed3bfe331ad7f7db424bd77bf372a7a59
/book/2ed/10_1-impl/4-interface/call-with-fresh.rkt
749867c259408f55514bff4d8d0920fc471be502
[]
no_license
chansey97/the-reasoned-schemer
ecb6f6a128ff0ca078a45e097ddf320cd13e81bf
a6310920dde856c6c98fbecec702be0fbc4414a7
refs/heads/main
2023-05-13T16:23:07.738206
2021-06-02T22:24:51
2021-06-02T22:24:51
364,944,122
0
0
null
null
null
null
UTF-8
Racket
false
false
142
rkt
call-with-fresh.rkt
#lang racket (require "../1-substitution/var.rkt") (provide (all-defined-out)) ;; 10.90 (define (call/fresh name f) (f (var name)))
false
f28a60560ca440672c98f36212d87758cb66420a
3e9f044c5014959ce0e915fe1177d19f93d238ed
/racket/com-spacetimecat/analyze/outline.rkt
9c4cda0985107c0d4332cc48a339b6bfa8c93b7f
[ "MIT", "LicenseRef-scancode-warranty-disclaimer", "Apache-2.0", "LicenseRef-scancode-public-domain", "CC0-1.0", "BSD-2-Clause" ]
permissive
edom/work
5e15c311dd49eb55fafbff3455cae505fa51643a
df55868caa436efc631e145a43e833220b8da1d0
refs/heads/master
2022-10-10T22:25:11.652701
2020-02-26T19:42:08
2020-02-26T19:44:58
138,504,284
0
1
NOASSERTION
2022-10-06T01:38:07
2018-06-24T18:03:16
TeX
UTF-8
Racket
false
false
9,300
rkt
outline.rkt
#lang s-exp "lang.rkt" (require "../racket/list.rkt" racket/match "read.rkt" "outline-syntax.rkt" (for-syntax "outline-syntax.rkt") ) (provide outline-node/c outline-node-list/c compute-file-outline compute-file-outline-1 outline-node-type outline-node-target outline-node-children ) ;; -------------------- Version 0. ;; Deprecated. Use compute-file-outline-1 instead. ;; The shape of the return value is Parts: ;; ;; Parts ::= (Part ...) ;; Part ::= Type Children ;; Type ::= (module Id Init) ;; | (require Spec) ;; | (provide Spec) ;; | (variable Id) ;; | (procedure Id) ;; | (parameter Id) ;; | (transformer Id) ;; | (class Super) ;; | (define-class Id Super) ;; Children ::= Parts ;; ;; This is only an approximation. ;; This is the 20% effort that works for 80% Racket programs. ;; ;; We don't use #:literals because it requires computing the bindings ;; which requires fully-expanding the module. (define outline-type/c any/c) (define outline-target/c (or/c syntax? #f)) (define outline-node/c (list/c outline-type/c outline-target/c [recursive-contract outline-node-list/c] )) (define outline-node-list/c (listof [recursive-contract outline-node/c])) (define (outline-node-type x) (list-ref x 0)) (define (outline-node-target x) (list-ref x 1)) (define (outline-node-children x) (list-ref x 2)) ;; Design Notes: 2019-10-16: ;; ;; I think outlining should be done after the bindings are computed ;; (after the requires are resolved) but before the defines are expanded. ;; This is because, for example, the exact expansion of racket/class's class form ;; is an internal detail that we should avoid depending on. ;; ;; Modules with side effects greatly complicate reasoning. ;; But the majority of Racket modules do not have side effects when required. ;; Thus we assume that modules do not have side effects when they are required. ;; ;; Modules should not have side effects when they required. ;; Let application writers initialize the global variables of C libraries explicitly in their main methods, ;; not in module require/visit/load time. ;; See compute-module-outline for the return value. (define (compute-file-outline path) (compute-module-outline (read-module-from-file path))) (define (compute-file-outline-1 path) (whittle-top (read-module-from-file path))) (define/contract (compute-module-outline stx) (-> syntax? outline-node-list/c) (define (d stx) (syntax->datum stx)) (define (loop stx) ;; Each case produces a list of parts. (syntax-parse stx #:datum-literals ( module #%module-begin require provide begin begin-for-syntax define-syntax class class* ) [ (module Id:id Init (#%module-begin Body ...)) `([ ,(d #'(module Id Init)) ,#'Id ,(loop #'(begin Body ...)) ]) ] [ (begin) '() ] [ (begin Body1 Body2 ...) `( ,@(loop #'Body1) ,@(loop #'(begin Body2 ...)) ) ] [ (begin-for-syntax Body ...) (loop #'(begin Body ...)) ] [ (require . Specs) (map (λ s -> `([require ,(d s)] ,s [])) (syntax->list #'Specs))] [ (provide . Specs) (map (λ s -> `([provide ,(d s)] ,s [])) (syntax->list #'Specs))] ;; TODO: lambda [ (_:define$ (Id:id . Params) Body ...) `([ ,(d #'(procedure Id)) ,#'Id ( ,@(map (λ p -> `([parameter ,(d p)] ,p [])) (syntax->list #'Params)) ,@(loop #'(begin Body ...)) ) ]) ] [ form:define-class-form$ `([ ,(d #'(define-class form.id form.super)) ,#'form.id ,(loop #'(form.body ...)) ]) ] [ (_:define$ Id:id Init) `([ ,(d #'(variable Id)) ,#'Id ,(loop #'Init) ]) ] [ (_:define$ Id:id Init) `([ (variable ,(d #'Id)) ,#'Id ,(loop #'Init) ]) ] [ (class Super:expr Body ...) `([ (class ,(d #'Super)) ,#'Super ,(loop #'(begin Body ...)) ]) ] [ (class* Super:expr _Ifaces:expr Body ...) `([ (class ,(d #'Super)) ,#'Super ,(loop #'(begin Body ...)) ]) ] [ (Expr ...) (loop #'(begin Expr ...))] [ _ '()] ) ) (loop stx) ) ;; -------------------- Version 1. ;; ($outline Type Id Unexpanded-Children) ;; Only for template. ;; The syntax-source/position of Id is the definition site. (define $outline #f) (define $literal #f) (define _interpret #f) (define _expand #f) (define _nothing #f) (struct Node (phase site type children) #:prefab) (define/contract (whittle-top stx) (-> syntax? Node?) (define p0 0) (syntax-parse stx #:datum-literals (module #%module-begin) [(module Id:id Init (#%module-begin . Body)) (Node p0 #'Id (list 'module #'Id #'Init) (whittle-body p0 #'Body))])) (define/contract (whittle-body phase stx) (-> integer? syntax? (listof Node?)) (list-append-map (λ s -> (whittle-form phase s)) (syntax->list stx))) (define/contract (whittle-form p0 stx) (-> integer? syntax? (listof Node?)) (define p1 (+ p0 1)) (define/contract (proc node) (-> (or/c Node? #f) (listof Node?)) (match node [(Node phase site type children) (list (Node phase site (syntax->datum type) children ))] [#f '()])) (syntax-parse stx #:datum-literals ( require provide begin begin-for-syntax define-syntax define-for-syntax class class* ) [(begin . Body) (whittle-body p0 #'Body)] [(begin-for-syntax . Body) (whittle-body p1 #'Body)] [(require Spec ...) (list-append-map (λ f -> (proc (whittle-form-1 p0 f))) (syntax->list #'((require Spec) ...)))] [(provide Spec ...) (list-append-map (λ f -> (proc (whittle-form-1 p0 f))) (syntax->list #'((provide Spec) ...)))] [thing (proc (whittle-form-1 p0 #'thing))])) (define (whittle-form-1 p0 stx) (define p1 (+ p0 1)) (syntax-parse stx #:datum-literals ( require provide begin begin-for-syntax define-syntax define-for-syntax class class* ) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; (bind-phase defn-site node-type children) [(require Spec) (Node p0 #'Spec #'(require Spec) '())] [(provide Spec) (Node p0 #'Spec #'(provide Spec) '())] [form:define-class-form$ (Node p0 #'form.id #'(define form.id (class form.super)) (whittle-body p0 #'(form.body ...)))] [(define-for-syntax (Id:id . Params) . Body) (Node p1 #'Id #'(define Id (procedure Params)) (whittle-body p1 #'Body))] [(_:define$ Id:id Init) (Node p1 #'Id #'(define Id variable) (whittle-body p1 #'(Init)))] [(_:define$ (Id:id . Params) . Body) (Node p0 #'Id #'(define Id (procedure Params)) (whittle-body p0 #'Body))] [(_:define$ Id:id Init) (Node p0 #'Id #'(define Id variable) (whittle-body p0 #'(Init)))] [(define-syntax (Id:id . Params) . Body) (Node p0 #'Id #'(define Id (transformer-procedure Params)) (whittle-body p1 #'Body))] [(define-syntax Id:id . Body) (Node p0 #'Id #'(define Id transformer-variable) (whittle-body p1 #'Body))] [(class Super:expr . Body) (Node p0 #'Super #'(class Super) (whittle-body p0 #'Body))] [(class* Super:expr _Ifaces:expr . Body) (Node p0 #'Super #'(class Super) (whittle-body p0 #'Body))] [_ #f])) (define (outline-syntax->datum lst) (define (f1 stx) (match (syntax->list stx) [(list phase site type children) (list phase (syntax-source site) (syntax-position site) (syntax->datum type) (outline-syntax->datum children)) ])) #f)
true
023153948fef2aa9808ea4b769004b5e9fd6ba85
a04aa7f5f70e1c2c30cbcf0c643dbd1d1617dffd
/Final_exam_17/Pascal.rkt
7fc3356747fe97545e24f7605a8c7b1ad140057b
[]
no_license
Lizhmq/SICP
66b201926821e40cda8dfe3fdc77bf7cc3b488f7
c54a830dddc1146f9bd60c0a0106a77957d98fa8
refs/heads/master
2020-03-11T20:16:09.744976
2018-06-16T05:49:20
2018-06-16T05:49:20
130,232,057
1
0
null
null
null
null
UTF-8
Racket
false
false
670
rkt
Pascal.rkt
#lang racket (define (pascal n) (define (my-display lst) (if (null? lst) (newline) (begin (display (car lst)) (display " ") (my-display (cdr lst))))) (define (generate last-lst) (if (null? (cdr last-lst)) (list 1) (cons (+ (car last-lst) (cadr last-lst)) (generate (cdr last-lst))))) (if (= n 1) (begin (displayln 1) (list 1)) (let* ((last-lst (pascal (- n 1))) (res (generate (cons 0 last-lst)))) (my-display res) res))) (define (loop) (define a (read)) (cond ((eq? a eof) (void)) (else (pascal a) (loop)))) (loop)
false
a9404ceb51863f790691ad8ea16f3f9645130dac
daefa90afaaffa35dd6815542ee3921d4db60103
/termination/flattened-parameter.rkt
054f73f7215e72e9d7808eb2de7dcb9b0cea7e2e
[]
no_license
philnguyen/termination
6d8fc518dfd267fd75f2aff29123ba7f62f1e265
1d05c1bf8e9bd59d2fbaaa213b490fd8e59644bd
refs/heads/master
2020-03-07T08:33:46.951853
2019-05-30T02:28:47
2019-05-30T02:28:47
127,381,963
0
1
null
2018-05-21T19:57:33
2018-03-30T04:37:01
Racket
UTF-8
Racket
false
false
673
rkt
flattened-parameter.rkt
#lang typed/racket/base (provide define-parameter) (require (for-syntax racket/base racket/syntax syntax/parse) syntax/parse/define) (define-syntax define-parameter (syntax-parser [(_ x:id (~literal :) T e) (with-syntax ([with-x (format-id #'x "with-~a" #'x)]) #'(begin (define key ((inst make-continuation-mark-key T) 'x)) (define x (let ([default : T e]) (λ () (continuation-mark-set-first #f key default)))) (define-syntax-rule (with-x new-x body (... ...)) (with-continuation-mark key new-x (let () body (... ...))))))]))
true
17f6ddf365f1783a305c9638587982db33dcfb2d
b08b7e3160ae9947b6046123acad8f59152375c3
/Programming Language Detection/Experiment-2/Dataset/Train/Racket/sorting-algorithms-bead-sort.rkt
45e1744941ec33fdf468e804243675954efef585
[]
no_license
dlaststark/machine-learning-projects
efb0a28c664419275e87eb612c89054164fe1eb0
eaa0c96d4d1c15934d63035b837636a6d11736e3
refs/heads/master
2022-12-06T08:36:09.867677
2022-11-20T13:17:25
2022-11-20T13:17:25
246,379,103
9
5
null
null
null
null
UTF-8
Racket
false
false
341
rkt
sorting-algorithms-bead-sort.rkt
#lang racket (require rackunit) (define (columns lst) (match (filter (λ (l) (not (empty? l))) lst) ['() '()] [l (cons (map car l) (columns (map cdr l)))])) (define (bead-sort lst) (map length (columns (columns (map (λ (n) (make-list n 1)) lst))))) ;; unit test (check-equal? (bead-sort '(5 3 1 7 4 1 1)) '(7 5 4 3 1 1 1))
false
114803cb0b464fab4819c053402f3c9564843b0c
ca308b30ee025012b997bb8a6106eca1568e4403
/analysis-trees/permsort-cycle-candidate-post.rkt
c0e512ece66fbe621fe3df13f19a2364421231ae
[ "MIT" ]
permissive
v-nys/cclp
178d603c6980922d0fe3f13ee283da61809e0a99
c20b33972fdc3b1f0509dd6b9e4ece4f5f3192b3
refs/heads/master
2022-02-18T07:12:28.750665
2017-10-30T06:55:45
2017-10-30T06:55:45
64,598,287
1
0
null
null
null
null
UTF-8
Racket
false
false
98
rkt
permsort-cycle-candidate-post.rkt
#lang cclp/at (.10.perm(g6,a3),ord([g5|a3]) {} select(a1,[g1|g2],a2) -> {a1/g3, a2/g4} (.!CY 5))
false
c87555278fb79531137fc8c1412d998665d72ce3
592ccef7c8ad9503717b2a6dff714ca233bc7317
/docs-src/guide-assert.scrbl
534128ac549bf83c0c38304fc56df0648c183d45
[ "Apache-2.0" ]
permissive
Thegaram/reach-lang
8d68183b02bfdc4af3026139dee25c0a3e856662
4fdc83d9b9cfce4002fa47d58d2bcf497783f0ee
refs/heads/master
2023-02-25T00:10:31.744099
2021-01-26T22:41:38
2021-01-26T22:41:38
333,350,309
1
0
Apache-2.0
2021-01-27T08:17:28
2021-01-27T08:17:27
null
UTF-8
Racket
false
false
2,576
scrbl
guide-assert.scrbl
#lang scribble/manual @(require "lib.rkt") @title[#:version reach-vers #:tag "guide-assert"]{How and what to verify} Reach's verification engine ensures that invariants about the state of a program assumed by programmers are held by all possible executions of the program. At a high-level, the goal of a programmer getting started with verification is to write down @emph{every single assumption they have} into the program in the form of @reachin{assert} statements. For example, if a value, @reachin{x} is assumed to be smaller than 20, then the programmer should always include @reachin{assert(x < 20);} in the program. This is not to help the verification engine prove later properties, but is to give the verification engine assumptions that it can attempt to falsify so the programmer can learn if their assumptions are correct. At a low-level, the programmer should see the verification engine as tool to prevent test regressions by encoding tests directly into the program in the form of assertions. For example, suppose that during development and testing, a programmer observes an erroneous state where the variable @reachin{y} is assigned to the value @reachin{41}, then the programmer should insert @reachin{assert(y != 41);} in to the program. The programmer should insert this check @emph{before} they fix the problem in the code. This will ensure that all future versions of the program will also be protected from these problems. These high- and low-level perspectives on assertions apply to individual code fragments, like the body of an @reachin{only} statement, as well as entire functions. For example, if a programmer expects a unary function over integers, @reachin{f}, to always return a number between @reachin{0} and @reachin{50}, then they should write @reachin{assert(f(forall(UInt)) <= 50);} in their program. Similarly, the unit tests for a function that a developer would normally write in a test suite, should instead be written as a series of assertions in the module that defines a function. If you'd like to continue learning about verification, we recommend reading about @link["https://duckduckgo.com/?q=property-based+testing"]{"property-based testing"}. Although most resources on the topic will refer to dynamic, random tools, like @link["https://en.wikipedia.org/wiki/QuickCheck"]{QuickCheck}, the strategies used transfer automatically to a formally verified context, like Reach. If you'd like to continue reading about verification in Reach specifically, read @seclink["guide-loop-invs"]{the guide section on loop invariants}.
false
64cf97af34c97387c2c6ba74d1a9a3593c8cd7cd
4919215f2fe595838a86d14926c10717f69784e4
/lessons/Review-Contracts/lesson/lesson.scrbl
77efc17b6f612be3721cb59f6cf26a61bcdeaabd
[]
no_license
Emmay/curr
0bae4ab456a06a9d25fbca05a25aedfd5457819b
dce9cede1e471b0d12ae12d3121da900e43a3304
refs/heads/master
2021-01-18T08:47:20.267308
2013-07-15T12:23:41
2013-07-15T12:23:41
null
0
0
null
null
null
null
UTF-8
Racket
false
false
785
scrbl
lesson.scrbl
#lang curr/lib @declare-tags[group pedagogy selftaught] @lesson[#:title "Contracts" #:duration "20 minutes"]{ @itemlist/splicing[@item{It's important for us to keep track of how our functions work - in Bootstrap 1 you also learned about Contracts. Every contract has three parts...@tag[pedagogy]{raise your hand if you know what they are.}} @item{@tag[pedagogy]{That's right! }Name, Domain and Range!} @pedagogy{@item{Review contracts for +, -, *, etc, making sure that students write them down in their workbooks.} @item{Review contracts for image-producing functions like circle, triangle, rectangle, star, etc, making sure that students write them down in their workbooks.}} ;@tag[selftaught]{@item{write contracts or something}} ]}
false
aca97a79f9f9490e973b426296112243c433fdd4
6a515f8840c857c280c99fb6a57c38deca8cea70
/base.rkt
aef352092516b140b90b4ff55e09ae3835c32e4f
[ "Apache-2.0" ]
permissive
jackfirth/racket-fixture
dfb1db8dd954e06e4904ac65010f6c7ec6da87bf
fafde5528ad6491cd9e87c078f9838eabc524a87
refs/heads/master
2021-06-28T11:30:05.400251
2017-09-19T03:29:59
2017-09-19T03:29:59
97,995,431
6
0
null
2017-09-19T03:30:00
2017-07-22T00:11:03
Racket
UTF-8
Racket
false
false
2,073
rkt
base.rkt
#lang racket/base (require racket/contract/base) (provide define-fixture (contract-out [fixture (->* (symbol? disposable?) (#:info-proc (-> any/c any/c)) fixture?)] [fixture? predicate/c] [fixture-initialized? (-> fixture? boolean?)] [fixture-name (-> fixture? symbol?)] [fixture-value (-> (and/c fixture? fixture-initialized?) any/c)] [fixture-info (-> (and/c fixture? fixture-initialized?) any/c)] [call/fixture (-> fixture? (-> any) any)])) (require (for-syntax racket/base racket/syntax) disposable syntax/parse/define) (struct fixture (name disp info-proc param init-param) #:constructor-name make-fixture #:omit-define-syntaxes) (define (fixture name disp #:info-proc [info-proc values]) (make-fixture name disp info-proc (make-parameter #f) (make-parameter #f))) (define (fixture-initialized? fix) ((fixture-init-param fix))) (define (fixture-value fix) ((fixture-param fix))) (define (fixture-info fix) ((fixture-info-proc fix) (fixture-value fix))) (define (call/fixture fix thnk) (with-disposable ([v (fixture-disp fix)]) (parameterize ([(fixture-param fix) v] [(fixture-init-param fix) #t]) (thnk)))) (begin-for-syntax (define (format-accessor id-stx) (format-id id-stx "current-~a" (syntax-e id-stx) #:source id-stx))) (define-simple-macro (define-fixture id:id disp (~alt (~optional (~seq #:info-proc info-proc) #:defaults ([info-proc.c #'values])) (~optional (~seq #:accessor-name accessor-id) #:defaults ([accessor-id (format-accessor #'id)]))) ...) #:declare disp (expr/c #'disposable? #:name "disposable argument") #:declare info-proc (expr/c #'(-> any/c any/c) #:name "info-proc argument") (begin (define id (fixture 'id disp.c #:info-proc info-proc.c)) (define (accessor-id) (unless (fixture-initialized? id) (raise-argument-error 'accessor-id "fixture not initialized" "fixture" id)) (fixture-value id))))
true
61f6f4b53c4aa3651cfaef358e774f71b6e202c6
ed2cfb6bbed32ff5dfe376d0b1036aeb116ad9f7
/tests/planet2/tests-checksums.rkt
f3e032fc393041d26da628244cc61347f4e3af49
[]
no_license
jeapostrophe/galaxy
c1474fecd23b6a24d26039088eeda109691595d5
6bfa46d01ece8645d1752472c589748dad0c5bd8
refs/heads/master
2016-09-05T17:47:16.658215
2013-10-31T01:32:39
2013-10-31T01:32:39
3,250,570
1
0
null
null
null
null
UTF-8
Racket
false
false
3,005
rkt
tests-checksums.rkt
#lang racket/base (require rackunit racket/system unstable/debug racket/match (for-syntax racket/base syntax/parse) racket/file racket/runtime-path racket/path racket/list planet2/util "shelly.rkt" "util.rkt") (pkg-tests (shelly-begin (initialize-indexes) (shelly-case "checksums" $ "test -f test-pkgs/planet2-test1.zip" $ "cp -f test-pkgs/planet2-test1.zip test-pkgs/planet2-test1-bad-checksum.zip" $ "test -f test-pkgs/planet2-test1-conflict.zip.CHECKSUM" $ "cp -f test-pkgs/planet2-test1-conflict.zip.CHECKSUM test-pkgs/planet2-test1-bad-checksum.zip.CHECKSUM" (with-fake-root (shelly-case "checksums are checked if present (local)" $ "racket -e '(require planet2-test1)'" =exit> 1 $ "raco pkg install test-pkgs/planet2-test1-bad-checksum.zip" =exit> 1 $ "racket -e '(require planet2-test1)'" =exit> 1)) $ "cp -f test-pkgs/planet2-test1.zip test-pkgs/planet2-test1-no-checksum.zip" (shelly-install* "checksums are ignored if missing by default (local)" "test-pkgs/planet2-test1-no-checksum.zip" "planet2-test1-no-checksum") (with-fake-root (shelly-case "checksums are checked (remote, indexed)" (hash-set! *index-ht-1* "planet2-test1" (hasheq 'checksum (file->string "test-pkgs/planet2-test1-bad-checksum.zip.CHECKSUM") 'source "http://localhost:9999/planet2-test1-bad-checksum.zip")) $ "raco pkg config --set indexes http://localhost:9990 http://localhost:9991" $ "racket -e '(require planet2-test1)'" =exit> 1 $ "raco pkg install planet2-test1" =exit> 1 $ "racket -e '(require planet2-test1)'" =exit> 1)) (with-fake-root (shelly-case "checksums are checked (remote)" $ "racket -e '(require planet2-test1)'" =exit> 1 $ "raco pkg install http://localhost:9999/planet2-test1-bad-checksum.zip" =exit> 1 $ "racket -e '(require planet2-test1)'" =exit> 1)) (with-fake-root (shelly-case "checksums are required by default remotely (remote)" $ "racket -e '(require planet2-test1)'" =exit> 1 $ "raco pkg install http://localhost:9999/planet2-test1-no-checksum.zip" =exit> 1 $ "racket -e '(require planet2-test1)'" =exit> 1)) (shelly-install* "but, bad checksums can be ignored (local)" "--ignore-checksums test-pkgs/planet2-test1-bad-checksum.zip" "planet2-test1-bad-checksum") (shelly-install* "but, bad checksums can be ignored (remote)" "--ignore-checksums http://localhost:9999/planet2-test1-bad-checksum.zip" "planet2-test1-bad-checksum") (shelly-install* "but, checksums can be missing if ignored (remote)" "--ignore-checksums http://localhost:9999/planet2-test1-no-checksum.zip" "planet2-test1-no-checksum"))))
false
d08220f4bcb86a200865618a23f6080a2e32d114
d2fc383d46303bc47223f4e4d59ed925e9b446ce
/courses/2012/fall/330/notes/2-16h.rkt
552135d8fff98562d17aa6fd659b858a314a712f
[]
no_license
jeapostrophe/jeapostrophe.github.com
ce0507abc0bf3de1c513955f234e8f39b60e4d05
48ae350248f33f6ce27be3ce24473e2bd225f6b5
refs/heads/master
2022-09-29T07:38:27.529951
2022-09-22T10:12:04
2022-09-22T10:12:04
3,734,650
14
5
null
2022-03-25T14:33:29
2012-03-16T01:13:09
HTML
UTF-8
Racket
false
false
5,014
rkt
2-16h.rkt
#lang lazy (define print-only-errors #t) (define (test l r) (if (equal? l r) (if print-only-errors (void) (printf "Test Passed~n")) (printf "Test Failed.~nActual: ~S ~nExpected: ~S~n" l r))) (define (take-while ? l) (cond [(empty? l) empty] [(? (first l)) (cons (first l) (take-while ? (rest l)))] [else ;; filter would be .... (take-while ? (rest l)) empty])) (test (take-while odd? (list 1 2 3 4 5)) (list 1)) (test (take-while even? (list 1 2 3 4 5)) empty) (test (take-while even? empty) empty) (define nats (cons 0 (map add1 nats))) (test (take-while even? nats) (list 0)) (test (take 10 (take-while number? nats)) (list 0 1 2 3 4 5 6 7 8 9)) (define (build-infinite-list f) (map f nats)) (define (check-bil f) (for ([n (in-range 100)]) (define i (random 1000)) (test (list-ref (build-infinite-list f) i) (f i)))) (check-bil add1) (check-bil number->string) (check-bil list) (define (divides n x) (zero? (modulo n x))) (define (prime?-like n possible-factors) (not (or (= n 1) (ormap (λ (x) (divides n x)) (take-while (λ (x) (<= x (integer-sqrt n))) possible-factors))))) (define (prime? n) (prime?-like n (rest (rest nats)))) (test (prime? 1) #f) (test (prime? 2) #t) (test (prime? 3) #t) (test (prime? 6) #f) (test (prime? 1993) #t) (define primes (filter prime? (rest nats))) (test (take 10 primes) (list 2 3 5 7 11 13 17 19 23 29)) (define (prime?/fast n) (prime?-like n primes/fast)) (define primes/fast (cons 2 (filter prime?/fast (list-tail nats 3)))) ;; "normal function recursion"... your base case is at the end... INDUCTION ;; "lazy data recursion"... your base case is at the beginning... CO-INDUCTION (test (prime?/fast 1) #f) (test (prime?/fast 2) #t) (test (prime?/fast 3) #t) (test (prime?/fast 6) #f) (test (prime?/fast 1993) #t) (test (take 10 primes/fast) (list 2 3 5 7 11 13 17 19 23 29)) (define (web-server initial-state read-request handle) (define (loop current-state) (define req (read-request)) (define new-state (handle current-state req)) (loop new-state)) (loop initial-state)) (define (unfold f a) (cons a (unfold f (f a)))) (define (web-server-2.0 initial-state read-request handle) (unfold initial-state (λ (last-state) (handle last-state (read-request))))) ;; Coq ;; 401R... 430 ;; "primes" ;; (time ;; (! (list-ref primes 10000))) ;; "primes/fast" ;; (time ;; (! (list-ref primes/fast 10000))) (define (build-vector num f) (apply vector (build-list num f))) (define (build-table rows cols f) (build-vector rows (λ (r) (build-vector cols (λ (c) (f r c)))))) (define (check-table f) (for ([n (in-range 100)]) (define rows (random 100)) (define cols (random 100)) (define i (random rows)) (define j (random cols)) (test (vector-ref (vector-ref (build-table rows cols f) i) j) (f i j)))) (check-table +) (check-table cons) (check-table -) (define (lcs-length s1 s2) (define s1-len (string-length s1)) (define s2-len (string-length s2)) (define (table-ref i j) (if (or (negative? i) (negative? j)) 0 (vector-ref (vector-ref ze-table i) j))) (define ze-table (build-table s1-len s2-len (λ (s1-i s2-j) (if (char=? (string-ref s1 s1-i) (string-ref s2 s2-j)) (+ 1 (table-ref (sub1 s1-i) (sub1 s2-j))) (max (table-ref s1-i (sub1 s2-j)) (table-ref (sub1 s1-i) s2-j)))))) (table-ref (sub1 s1-len) (sub1 s2-len))) (test (lcs-length "Artist" "Artsy") 4) (test (lcs-length "The artist is very artsy." "An artsy artist oftens arts.") 16) (define (lcs s1 s2) (define s1-len (string-length s1)) (define s2-len (string-length s2)) (define (table-ref i j) (if (or (negative? i) (negative? j)) "" (vector-ref (vector-ref ze-table i) j))) (define ze-table (build-table s1-len s2-len (λ (s1-i s2-j) (if (char=? (string-ref s1 s1-i) (string-ref s2 s2-j)) (string-append (table-ref (sub1 s1-i) (sub1 s2-j)) (string (string-ref s1 s1-i))) (string-max (table-ref s1-i (sub1 s2-j)) (table-ref (sub1 s1-i) s2-j)))))) (table-ref (sub1 s1-len) (sub1 s2-len))) (define (string-max s1 s2) (if (> (string-length s1) (string-length s2)) s1 s2)) (test (lcs "Artist" "Artsy") "Arts") (test (lcs "The artist is very artsy." "An artsy artist oftens arts.") " artstis e arts.") (test (lcs "Jay McCarthy" "Benjamin Hansen") "a a")
false
d63b8943b0b087bd2deb1736ec934b552c60f71a
c01a4c8a6cee08088b26e2a2545cc0e32aba897b
/contrib/medikanren/test-web-server.rkt
81d78adfb3a11e17896169bffb744d70896fde1f
[ "MIT" ]
permissive
webyrd/mediKanren
c8d25238db8afbaf8c3c06733dd29eb2d7dbf7e7
b3615c7ed09d176e31ee42595986cc49ab36e54f
refs/heads/master
2023-08-18T00:37:17.512011
2023-08-16T00:53:29
2023-08-16T00:53:29
111,135,120
311
48
MIT
2023-08-04T14:25:49
2017-11-17T18:03:59
Racket
UTF-8
Racket
false
false
2,540
rkt
test-web-server.rkt
#lang racket (require net/http-client) (define (read/string s) (with-input-from-string s (lambda () (read)))) (define (write/string datum) (with-output-to-string (lambda () (write datum)))) (define (pretty/string datum) (with-output-to-string (lambda () (pretty-print datum)))) (define (query sdatum) (define-values (bstatus headers in) (http-sendrecv "localhost" "/query" #:port 8000 #:ssl? #f #:version "1.1" #:method "POST" #:data (write/string sdatum))) (define status (bytes->string/utf-8 bstatus)) (define response (port->string in)) (close-input-port in) (cond ((string-suffix? status "200 OK") (read/string response)) (else (printf "~a\n" response) (error "Query failed:" status (map bytes->string/utf-8 headers) response)))) (define (decreases? p) (member (cddr p) '("negatively_regulates" "prevents" "treats" "disrupts" "increases_degradation_of" "decreases_activity_of" "decreases_expression_of"))) (define (increases? p) (member (cddr p) '("positively_regulates" "produces" "causes" "causes_condition" "causally_related_to" "contributes_to" "gene_associated_with_condition" "gene_mutations_contribute_to" "decreases_degradation_of" "increases_activity_of" "increases_expression_of"))) (define SP (map (lambda (cp) (define c (car cp)) (define pS (cadr cp)) (list c (filter decreases? pS) #f)) (take (query '(concept #t #f 0 #f ("imatin"))) 1))) (define OP (map (lambda (cp) (define c (car cp)) (define pO (caddr cp)) (list c #f (filter increases? pO))) (take (query '(concept #f #t 0 #f ("asthma"))) 1))) (displayln "Imatinib:") (pretty-print SP) (newline) (displayln "Asthma:") (pretty-print OP) (define X (query `(X ,SP ,OP))) (define x-bcr (car (filter (lambda (x) (equal? (cadddr (car x)) "BCR gene")) X))) (newline) (displayln 'X:) (pretty-print (car x-bcr)) (newline) (displayln 'S-edges:) (pretty-print (cadr x-bcr)) (newline) (displayln 'O-edges:) (pretty-print (caddr x-bcr))
false
f6f2951820e28edc65d76e5b4fef86c5da13bfc5
b5fd58730639328d23a7b4d8df459f8fe1f2ea86
/28/test.rkt
f43305d9ba1c1a3a216055a5b421b91ed89fe739
[]
no_license
jlowder/matasano
002a0c2a5655fc3f257d2d0e858ff21036bed179
4158349b11991059ac37e8930f91e12b9351a297
refs/heads/master
2021-01-20T14:02:23.167231
2017-05-07T17:18:22
2017-05-07T17:18:22
90,547,856
0
0
null
null
null
null
UTF-8
Racket
false
false
1,443
rkt
test.rkt
#lang racket (require "sha1.rkt") (require "auth.rkt") (require "../1/base64.rkt") (require "../2/xor.rkt") (define message #"But you seem like clean and virtuous boys.") (define signature (authenticate message)) (printf "Using message ~s~%" message) (printf "Authenticated signature is ~a~%" (bytes->hex signature)) (printf "signature is ~a~%" (cond [(validate signature message) "valid"] [else "invalid"])) (define mucked-sig (xor-bytes (bytes-append (make-bytes (- (bytes-length signature) 1) 0) (bytes 1)) signature)) (printf "changing one bit in the signature: ~a~%" (bytes->hex mucked-sig)) (printf "checking mucked signature with valid message: ~a~%" (cond [(validate mucked-sig message) "valid"] [else "invalid"])) (define mucked-message (xor-bytes (bytes-append (make-bytes (- (bytes-length message) 1) 0) (bytes 1)) message)) (printf "changing one bit in the message: ~s~%" mucked-message) (printf "checking valid signature against mucked message: ~a~%" (cond [(validate signature mucked-message) "valid"] [else "invalid"])) (define mymac (sha1 message)) (printf "trying to fabricate a MAC: ~a~%" (bytes->hex mymac)) (printf "checking my faked MAC: ~a~%" (cond [(validate mymac message) "valid"] [else "invalid"]))
false
2d4f0f9a9f9ebd667fe36b1b844c63f3f423ca47
5bbc152058cea0c50b84216be04650fa8837a94b
/experimental/postmortem/experiments/all-sorted-variations/lnm.rktd
adf88fa899e30fcb3358ff0ea09bd23ee39e9fdb
[]
no_license
nuprl/gradual-typing-performance
2abd696cc90b05f19ee0432fb47ca7fab4b65808
35442b3221299a9cadba6810573007736b0d65d4
refs/heads/master
2021-01-18T15:10:01.739413
2018-12-15T18:44:28
2018-12-15T18:44:28
27,730,565
11
3
null
2018-12-01T13:54:08
2014-12-08T19:15:22
Racket
UTF-8
Racket
false
false
2,085
rktd
lnm.rktd
;; lnm ;; === ;; Variation Runtime (ms) Overhead (vs. untyped) Compiles without adaptor? (1=Yes) ( (100100 49358.57 1.14 1) (100110 49153.47 1.13 1) (101010 49034.90 1.13 1) (100000 48959.80 1.13 1) (101100 48915.57 1.13 1) (101110 48875.73 1.12 1) (100010 48853.90 1.12 1) (101000 48674.13 1.12 1) (000010 43494.43 1.00 1) (000000 43468.27 1.00 1) (001100 43428.97 1.00 1) (001000 43354.83 1.00 1) (000110 43269.07 1.00 1) (001110 43229.63 0.99 1) (000100 43000.63 0.99 1) (001010 42951.17 0.99 1) (111110 36884.47 0.85 0) (110110 36672.97 0.84 1) (111010 36661.07 0.84 0) (111100 36526.90 0.84 0) (110010 36501.23 0.84 1) (110100 36496.73 0.84 1) (110000 36417.10 0.84 1) (111000 36196.13 0.83 0) (010110 32875.17 0.76 1) (010010 32860.37 0.76 1) (011110 32834.20 0.76 0) (011010 32814.70 0.75 0) (011000 32726.37 0.75 0) (011100 32611.10 0.75 0) (010100 32600.83 0.75 1) (010000 32466.03 0.75 1) (100111 17052.70 0.39 1) (100101 17028.67 0.39 1) (100011 17001.80 0.39 1) (101001 16976.93 0.39 1) (101011 16948.03 0.39 1) (101111 16947.67 0.39 1) (101101 16938.80 0.39 1) (100001 16929.83 0.39 1) (111101 13819.73 0.32 1) (000011 12859.57 0.30 1) (001111 12827.87 0.30 1) (000101 12811.90 0.29 1) (000111 12809.83 0.29 1) (001011 12806.20 0.29 1) (000001 12786.70 0.29 1) (001001 12762.33 0.29 1) (001101 12759.87 0.29 1) (110111 12524.57 0.29 1) (110011 12440.43 0.29 1) (110001 12398.63 0.29 1) (111111 12379.93 0.28 1) (111011 12367.53 0.28 1) (110101 12350.40 0.28 1) (111001 12335.23 0.28 1) (010011 9802.90 0.23 1) (011111 9790.07 0.23 1) (010111 9752.00 0.22 1) (011011 9748.50 0.22 1) (010101 9728.57 0.22 1) (011001 9721.83 0.22 1) (010001 9717.83 0.22 1) (011101 9687.50 0.22 1) )
false
986960736a6c55f49b437d728b05ea7495c77462
16eb81c19bb81bf3e46664989ef4f33a9165bd11
/examples/paper-other.rkt
cc5dd324ea06f0ea02ff669bfcb09dd8346470f0
[ "Apache-2.0" ]
permissive
videolang/typed-video
4fefee5d8bb51a8ff7fe1abf80af6eed290aca5e
8e07fa76d7231b1f386456ad54be2411b79e4d06
refs/heads/master
2021-03-27T11:03:34.830622
2018-05-01T18:28:10
2018-05-01T19:27:12
81,873,708
2
2
null
null
null
null
UTF-8
Racket
false
false
634
rkt
paper-other.rkt
#lang typed/video (require turnstile/rackunit-typechecking) (check-type (color "green") : Producer) (check-type (color "blue" #:length 2) : (Producer 2)) (check-not-type (color "blue" #:length 2) : (Producer 3)) (check-type (clip "vid.mp4" #:start 100 #:end 103) : (Producer (- 103 100))) (check-type (clip "vid.mp4" #:start 100 #:end 103) : (Producer 3)) (check-not-type (clip "vid.mp4" #:start 100 #:end 103) : (Producer 4)) (check-type (playlist (color "green") (color "blue" #:length 2) (clip "vid.mp4" #:start 100 #:end 103)) : Producer) (color "green") (color "blue" #:length 2) (clip "vid.mp4" #:start 100 #:end 103)
false
e94f8a0b0855bd6f450dfd764a5d126dbf712957
90e8ce5b57282417bfed6dfd3768577cac764072
/website.rkt
a756687d73c86343ff18bc98314c0be5cd66abcb
[]
no_license
SIFMANOW/sifmanow.github.io
782d569b27d412a368c15ad298d9c27b87de1b4f
366f0ecfc975f35661188796df18010075a2f1a8
refs/heads/master
2020-12-03T19:40:28.723892
2020-01-21T00:48:18
2020-01-21T00:48:18
231,458,350
0
0
null
null
null
null
UTF-8
Racket
false
false
10,455
rkt
website.rkt
#!/usr/bin/env racket #lang at-exp racket/base (require racket/class racket/file racket/pretty syntax/parse/define scribble/html/html (prefix-in html: scribble/html/extra) racket/format racket/dict racket/runtime-path racket/path racket/splicing (except-in scribble/html/lang read read-syntax) web-server/servlet-env web-server/dispatchers/dispatch pkg pkg/lib (prefix-in pict: pict) (for-syntax racket/base racket/list racket/string racket/dict)) (provide (except-out (all-from-out scribble/html/lang) #%module-begin) (all-from-out racket/format) (rename-out [-module-begin #%module-begin]) read read-syntax get-info page make-id ref-id project-root-dir) (define (header #:rest [rest '()] . v) @head{ @meta[charset: "utf-8"] @meta[http-equiv: "X-UA-Compatible" content: "IE=edge"] @meta[name: "viewport" 'content: "width=device-width, initial-scale=1"] @link[rel: "stylesheet" type: "text/css" href: "/css/custom.css"] @;@link[rel: "shortcut icon" href: "logo/tiny.png" type: "image/x-icon"] @link[rel: "stylesheet" href: "https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/css/bootstrap.min.css" integrity: "sha384-ggOyR0iXCbMQv3Xipma34MD+dH/1fQ784/j6cY/iJTQUOhcWr7x9JvoRxT2MZw1T" crossorigin: "anonymous"] @script[src: "https://code.jquery.com/jquery-3.3.1.slim.min.js" integrity: "sha384-q8i/X+965DzO0rT7abK41JStQIAqVgRVzpbzo5smXKp4YfRvH+8abtTE1Pi6jizo" crossorigin: "anonymous"] @script[src: "https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.7/umd/popper.min.js" integrity:"sha384-UO2eT0CpHqdSJQ6hJty5KVphtPhzWj9WO1clHTMGa3JDZwrnQq4sF86dIHNDz0W1" crossorigin: "anonymous"] @script[src: "https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/js/bootstrap.min.js" integrity: "sha384-JjSmVgyd0p3pXB1rRibZUAYoIIy6OrQ6VrjIEaFf/nJGzIxFDsf4x0xIM+B07jRM" crossorigin: "anonymous"] @title[v]{ - SIF MA NOW} @rest}) (define (navbar . current-page) @html:header{ @element["nav" class: "navbar navbar-expand-sm navbar-light bg-light"]{ @a[class: "navbar-brand" href: (build-path "/" (car (dict-ref html-navbar-file-table "Home")))]{ @img[src: "res/cropped-SIF-Logo-Cross-LOW-RES.jpg" alt: "logo"]} @ul[class: "navbar-nav"]{ @(for/list ([title-pair (in-list html-navbar-file-table)]) (define cur-page (equal? (car title-pair) (car current-page))) (define subs (caddr title-pair)) @li[class: @~a{nav-item @(if cur-page "active" "") @(if (null? subs) "" "dropdown")}]{ @a[class: @~a{nav-link @(if (null? subs) "" "dropdown-toggle")} href: (if (or cur-page (not (null? subs))) "#" (build-path "/" (cadr title-pair))) @(unless (null? subs) data-toggle:) @(unless (null? subs) "dropdown") (car title-pair)] @(unless (null? subs) @div[class: "dropdown-menu"]{ @(for/list ([item (in-list subs)]) @a[class: "dropdown-item" href: (build-path "/" (cdr item)) (car item)])})})}}}) (define (footer #:rest [rest '()] . v) (list* @html:footer[class: "container"]{ @div[class: "copyright"]{ @p[style: "float:left"]{Copyright © 2019}}} ;@script[src: "/js/bootstrap.min.js"] rest)) (define (page #:title title #:header-rest [header-rest '()] #:footer-rest [footer-rest '()] #:container? [container? #t] . content) (list @doctype{html} @html[lang: "en"]{ @header[#:rest header-rest]{@title} @body[id: "pn-top"]{ @navbar[title] @(if container? @div[class: "container"]{@html:main[role: "main"]{@content}} @html:main[role: "main"]{@content}) @footer[#:rest footer-rest]}})) ;; =================================================================================================== ;; Each entry in the file table is: ;; (Pair Name (Pair Path (Listof (Pair Subname AnchorPath)))) (module files-mod racket (provide file-table) (define file-table '(("Home" "index.scrbl") ("Who we are" "about.scrbl") ("Gallery" "gallery.scrbl") ("SIF/SCS" "sif.scrbl" ("What do the experts say?" . "experts") ("SIF/SCSs in the news" . "news") ("SIFMA NOW in the news" . "sifma") ("Videos" . "videos")) ("Latest Updates" "updates.scrbl") ("Contact Us" "contact.scrbl")))) (require 'files-mod (for-syntax 'files-mod)) (define-runtime-path-list files (map car (dict-values file-table))) (define html-navbar-file-table (for/list ([(f v) (in-dict file-table)]) (define path (path-replace-suffix (car v) ".html")) (list f path (for/list ([(k* v*) (in-dict (cdr v))]) (cons k* (format "~a#~a" path v*)))))) ;; =================================================================================================== ;; Assumes Racket 7, with minimal backwards support for v6.10+ (define-syntax (-module-begin stx) (syntax-parse stx [(_ body ...) (if (string-prefix? (version) "6.1") ;; Old version of racket, make a best effort attempt. #'(#%module-begin (define orig-url-roots (url-roots)) (url-roots '(("" "/" abs))) body ... (url-roots orig-url-roots)) #'(#%module-begin (require racket/splicing) (splicing-parameterize ([url-roots '(("" "/" abs))]) body ...)))])) (module reader syntax/module-reader #:read scribble:read-inside #:read-syntax scribble:read-syntax-inside #:whole-body-readers? #t #:info reader-info #:language `(submod ,(build-path this-dir "website.rkt") lang) (require (prefix-in scribble: scribble/reader) (only-in scribble/base/reader scribble-base-reader-info) (only-in racket/runtime-path define-runtime-path) (for-syntax (only-in racket/base #%datum))) (define base-reader-info (scribble-base-reader-info)) (define (reader-info key defvalue default) (case key [(drracket:default-filters) (cons '("Scribble HTML" "*.shtml") (or (base-reader-info key defvalue default) '()))] [(drracket:default-extension) "shtml"] [else (base-reader-info key defvalue default)])) (define-runtime-path this-dir ".")) (require 'reader) ;; =================================================================================================== (define-runtime-path project-root-dir ".") (define (preview!) (serve/servlet (lambda (_) (next-dispatcher)) #:servlet-path "/index.html" #:extra-files-paths (list project-root-dir) #:port (integer-bytes->integer #"LA" #f) #:listen-ip #f #:launch-browser? #t)) (define (build!) ;; Make bldres dir (make-directory* (build-path project-root-dir "bldres")) ;; Build HTML files (for ([f (in-list files)]) (unless (equal? (path-get-extension f) #".html") (with-output-to-file (path-replace-suffix f ".html") #:exists 'replace (lambda () (dynamic-require f 0))))) ;; Build Images (for ([i (in-directory (build-path project-root-dir "res"))]) (define img (pict:scale-to-fit (pict:bitmap i) 300 300)) (define type (case (path-get-extension i) [(#".jpg" #".jpeg") 'jpeg] [(#".png") 'png])) (define save-location (build-path project-root-dir "bldres" (file-name-from-path i))) (send (pict:pict->bitmap img) save-file save-location type))) ;; =================================================================================================== (define (make-id) (symbol->string (gensym))) (define (ref-id id) (format "#~a" id)) ;; =================================================================================================== (module deps racket (provide (all-defined-out)) (require pkg pkg/lib) (define deps '("sml" "markdown")) (define (install-deps [check-update? #t]) (for ([i (in-list deps)]) (cond [(hash-has-key? (installed-pkg-table) i) (when check-update? (pkg-update-command #:deps 'search-auto i #:no-setup #t))] [else (pkg-install-command #:deps 'search-auto i #:no-setup #t)])))) (require 'deps (for-syntax 'deps)) ;; =================================================================================================== (module* main #f (begin-for-syntax (with-handlers* ([exn:fail? (λ (e) (log-warning "build-deps: ~a" e))]) (install-deps #f))) (require racket/cmdline) (void (command-line #:program "Leif Andersen Website" #:once-each [("-d" "--deps") "Install the required deps to build the website" (install-deps)] [("-b" "--build") "Build Website" (build!)] [("-p" "--preview") "Preview Website" (preview!)] ))) ;; =================================================================================================== (module* lang racket (require (submod "..") (prefix-in pict: pict) racket/class racket/file racket/path markdown) (provide (all-from-out (submod "..")) (all-from-out pict) (all-from-out racket/class) (all-from-out racket/file) (all-from-out racket/path) youtube markdown) (define (markdown . str) (literal (map xexpr->string (parse-markdown (apply string-append str))))) (define (youtube url) @iframe[width: "560" height: "315" src: (format "https://www.youtube-nocookie.com/embed/~a" url) frameborder: "0" allow: "accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture" allowfullscreen: #t]))
true
cec75ddb029639aadd980e8e17dafa72f75ca573
1c2209c90f3a026361465e9e7d7a291394a77fc6
/sxml/lazy-ssax.rkt
823fea51d7aebf90f50ef863afcf48bd05d8414d
[]
no_license
jbclements/sxml
2c1d1b06cdf40187c2141d47ae472ad2708cd456
5d1d65561b7bf5059456934c34a5c5f257de4416
refs/heads/master
2023-03-11T23:57:19.065847
2023-03-03T05:56:52
2023-03-03T05:56:52
1,371,026
30
10
null
2023-03-03T05:56:53
2011-02-15T20:23:20
Racket
UTF-8
Racket
false
false
8,281
rkt
lazy-ssax.rkt
#lang racket/base (require racket/promise srfi/13/string "ssax/parse-error.rkt" "ssax/SSAX-code.rkt" "lazy-xpath.rkt") (provide (all-defined-out)) ;; A specialized lazy XML->SXML parser ; Is heavily based on continuations ;------------------------------------------------- ; Preliminary helper functions ; A helper that forces all descendants of a given node or a nodeset (define (lazy:force-descendants node) (cond ((lazy:promise? node) ; force it (lazy:force-descendants (force node))) ((pair? node) ; not null (for-each lazy:force-descendants node)) (else ; null or not pair #t ; nothing to be done ))) ; Returns the list containing of all members of the argument list except ; for the last member (define (lazy:except-last lst) (if (or (null? lst) ; this shouldn't happen (null? (cdr lst))) '() (cons (car lst) (lazy:except-last (cdr lst))))) ;------------------------------------------------- ; ; Returns the common part of the seed (define (lazy:seed-common seed) ((if (null? (cdr seed)) ; a short seed car caddr) seed)) ; A monad-like handler ; Replaces the common part of the seed (define (lazy:replace-common seed new-common) (if (null? (cdr seed)) ; a short seed (list new-common) (list (car seed) (cadr seed) new-common (cadddr seed)))) ; Produces a lazy SXML document, which corresponds to reading a source ; document in a stream-wise fashion (define (lazy:xml->sxml port namespace-prefix-assig) (let ((namespaces (map (lambda (el) (list* #f (car el) (ssax:uri-string->symbol (cdr el)))) namespace-prefix-assig)) (RES-NAME->SXML (lambda (res-name) (string->symbol (string-append (symbol->string (car res-name)) ":" (symbol->string (cdr res-name))))))) ((lambda (result) ; We assume that nobody follows the document element (if (null? namespace-prefix-assig) (cons '*TOP* (lazy:except-last result)) (cons '*TOP* (cons `(@@ (*NAMESPACES* ,@(map (lambda (ns) (list (car ns) (cdr ns))) namespace-prefix-assig))) (lazy:except-last result))))) (call-with-current-continuation ; we grab the continuation to escape from parsing (lambda (result-k) ; seed ::= (list result-k state-k common-seed level) ; result-k - continuation on what to do with the current result portion ; state-k - continuation to return to SSAX state on this level of XML ; tree hierarchy ; common-seed - general seed information ; level - level of a current node in a tree hierarchy ((ssax:make-parser NEW-LEVEL-SEED (lambda (elem-gi attributes namespaces expected-content seed) ;(pp (cons elem-gi (cadddr seed))) (if (or (null? (cdr seed)) ; short seed (> (cadddr seed) 3)) ; deep level (list '()) ; work like a conventional SSAX parser (let ((attrs (attlist-fold (lambda (attr accum) (cons (list (if (symbol? (car attr)) (car attr) (RES-NAME->SXML (car attr))) (cdr attr)) accum)) '() attributes))) (call-with-current-continuation (lambda (new-level-k) ; how to parse next ((car seed) ; return the result (let ((elem-content ; A promise to continue parsing (call-with-current-continuation ; where to put the result (lambda (elem-k) (new-level-k (list ; now form a seed elem-k ; what to do with result new-level-k ; SSAX state on this level '() ; common-seed is empty (+ (cadddr seed) 1) ; increase level )))))) (append ; Previous string content (ssax:reverse-collect-str-drop-ws (caddr seed)) (list (cons (if (symbol? elem-gi) elem-gi (RES-NAME->SXML elem-gi)) (if (null? attrs) elem-content (cons (cons '@ attrs) elem-content))) ; The following siblings of this element (delay (call-with-current-continuation ; where to put the result (lambda (foll-k) ; First we force the parsing of the current element (lazy:force-descendants elem-content) ; Than continue parsing ((cadr seed) ; recover the parent level of nesting (list foll-k ; what to do with result (cadr seed) '() ; common-seed is empty (cadddr seed) ; the same level for siblings )))))))))))))) FINISH-ELEMENT (lambda (elem-gi attributes namespaces parent-seed seed) (if (null? (cdr seed)) ; a short seed (let ((common (ssax:reverse-collect-str-drop-ws (lazy:seed-common seed))) (attrs (attlist-fold (lambda (attr accum) (cons (list (if (symbol? (car attr)) (car attr) (RES-NAME->SXML (car attr))) (cdr attr)) accum)) '() attributes))) (lazy:replace-common parent-seed (cons (cons (if (symbol? elem-gi) elem-gi (RES-NAME->SXML elem-gi)) (if (null? attrs) common (cons (cons '@ attrs) common))) (lazy:seed-common parent-seed)))) ; Otherwise - just return the remaining character content ((car seed) ; continuation (ssax:reverse-collect-str-drop-ws (lazy:seed-common seed))))) CHAR-DATA-HANDLER (lambda (string1 string2 seed) ;(pp (list string1 string2 seed)) (lazy:replace-common seed (if (string-null? string2) (cons string1 (lazy:seed-common seed)) (list* string2 string1 (lazy:seed-common seed))))) DOCTYPE (lambda (port docname systemid internal-subset? seed) (when internal-subset? (ssax:warn port "Internal DTD subset is not currently handled ") (ssax:skip-internal-dtd port)) (ssax:warn port "DOCTYPE DECL " docname " " systemid " found and skipped") (values #f '() namespaces seed)) UNDECL-ROOT (lambda (elem-gi seed) (values #f '() namespaces seed)) PI ((*DEFAULT* . (lambda (port pi-tag seed) (lazy:replace-common seed (cons (list '*PI* pi-tag (ssax:read-pi-body-as-string port)) (lazy:seed-common seed)))))) ) port (list ; form initial seed result-k ; put the result (lambda (seed) ; dummy top-level parser state that produces '() ((car seed) ; where to put the result nodeset '())) '() 1 ; level for the document element )))))))
false
f82e8f9092ba8c19f46323d84c0b51ab2b9c4a91
537789710941e25231118476eb2c56ae0b745307
/ssh/tamer/message.rkt
035632183fd84fee0383118ddde4ca2e37fa3a06
[]
no_license
wargrey/lambda-shell
33d6df40baecdbbd32050d51c0b4d718e96094a9
ce1feb24abb102dc74f98154ec2a92a3cd02a17e
refs/heads/master
2023-08-16T22:44:29.151325
2023-08-11T05:34:08
2023-08-11T05:34:08
138,468,042
0
1
null
null
null
null
UTF-8
Racket
false
false
407
rkt
message.rkt
#lang typed/racket/base (provide (all-defined-out)) (provide (all-from-out "../message.rkt")) (require "../message.rkt") ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; (define ssh-message : (-> SSH-Message (Values Bytes SSH-Message)) (lambda [self] (define payload (ssh-message->bytes self)) (values payload (ssh-bytes->message* payload))))
false
561a5e5d22d10091b6a8c1158795f58cb09f33eb
ddcff224727303b32b9d80fa4a2ebc1292eb403d
/3. Modularity, Objects, and State/3.3/3.17.rkt
bf1d478ba1fbf2f86df712182f484d4ded282224
[]
no_license
belamenso/sicp
348808d69af6aff95b0dc5b0f1f3984694700872
b01ea405e8ebf77842ae6a71bb72aef64a7009ad
refs/heads/master
2020-03-22T02:01:55.138878
2018-07-25T13:59:18
2018-07-25T13:59:18
139,345,220
1
0
null
null
null
null
UTF-8
Racket
false
false
763
rkt
3.17.rkt
#lang sicp (define (count-distinct-pairs x) (define visited-list '()) (define (unvisited? x) (not (memq x visited-list))) (let traverse ([x x]) (if (not (pair? x)) 0 (begin (set! visited-list (cons x visited-list)) (+ 1 (if (unvisited? (car x)) (traverse (car x)) 0) (if (unvisited? (cdr x)) (traverse (cdr x)) 0)))))) ; 3 (define easy '(1 2 3)) (count-distinct-pairs easy) ; 4 (define a '(2 3)) (define b (cons a (cdr a))) (count-distinct-pairs b) ; 7 (define x '(1)) (define y (cons x x)) (define z (cons y y)) (count-distinct-pairs z) ; cycle (define p '(1 2 3)) (set-cdr! (cddr p) p) (count-distinct-pairs p)
false
e2af25b271c37dbf3d1c4a27b39420a819635c1a
d17943098180a308ae17ad96208402e49364708f
/save-measurement.rkt
3bb59cc148b8bde8daf84d58adfca01868b016fd
[]
no_license
dyoo/benchmark
b3f4f39714cc51e1f0bc176bc2fa973240cd09c0
5576fda204529e5754f6e1cc8ec8eee073e2952c
refs/heads/master
2020-12-24T14:54:11.354541
2012-03-02T19:40:48
2012-03-02T19:40:48
1,483,546
1
0
null
null
null
null
UTF-8
Racket
false
false
1,467
rkt
save-measurement.rkt
#lang racket/base (require "measurement-struct.rkt" "get-host-info.rkt" racket/match racket/runtime-path racket/list racket/date) (provide save-measurement!) (define-runtime-path measurements-path "data/measurements") (define (measurement->sexp a-measurement) (match a-measurement [(struct measurement (current-seconds platform program time output)) (let ([date (seconds->date current-seconds)]) `((current-date ,current-seconds ,(date->string (seconds->date current-seconds)) (year ,(date-year date)) (month ,(date-month date)) (day ,(date-day date)) (second ,(date-second date)) (minute ,(date-minute date)) (hour ,(date-hour date)) (week-day ,(date-week-day date)) (year-day ,(date-year-day date)) (dst? ,(date-dst? date)) (time-zone-offset ,(date-time-zone-offset date))) (host-name ,(second (lookup-host-name))) (program ,program) (platform ,platform) (time ,time) (output , output)))])) (define (save-measurement! a-measurement) (call-with-output-file measurements-path (lambda (op) (write (measurement->sexp a-measurement) op) (newline op)) #:exists 'append))
false
dbcf2ea6e073d45e652c34e547cf707dd275b100
5bbc152058cea0c50b84216be04650fa8837a94b
/experimental/micro/tetris/typed/bset-blocks-row.rkt
6cec335e87840c9651fd2476989abcca3c0e7007
[]
no_license
nuprl/gradual-typing-performance
2abd696cc90b05f19ee0432fb47ca7fab4b65808
35442b3221299a9cadba6810573007736b0d65d4
refs/heads/master
2021-01-18T15:10:01.739413
2018-12-15T18:44:28
2018-12-15T18:44:28
27,730,565
11
3
null
2018-12-01T13:54:08
2014-12-08T19:15:22
Racket
UTF-8
Racket
false
false
325
rkt
bset-blocks-row.rkt
#lang typed/racket/base (provide blocks-row) (require "data-block-adapted.rkt") ;; ============================================================================= ;; Return the set of blocks in the given row. (: blocks-row (-> BSet Real BSet)) (define (blocks-row bs i) (filter (λ: ([b : Block]) (= i (block-y b))) bs))
false
d58468b92d2824ad4adcbb80ba45fa14f2e45c86
fc90b5a3938850c61bdd83719a1d90270752c0bb
/web-server-lib/web-server/dispatch/pattern.rkt
ac724e3217f5d18c6517b367f3f57130ad977e41
[ "MIT", "Apache-2.0", "LicenseRef-scancode-unknown-license-reference" ]
permissive
racket/web-server
cccdf9b26d7b908701d7d05568dc6ed3ae9e705b
e321f8425e539d22412d4f7763532b3f3a65c95e
refs/heads/master
2023-08-21T18:55:50.892735
2023-07-11T02:53:24
2023-07-11T02:53:24
27,431,252
91
42
NOASSERTION
2023-09-02T15:19:40
2014-12-02T12:20:26
Racket
UTF-8
Racket
false
false
2,688
rkt
pattern.rkt
#lang racket/base (require racket/list racket/contract) ; A dispatch pattern is either ; - a string ; - a bidi match expander ; - ... (define (...? stx) (eq? '... (syntax->datum stx))) (define (string-syntax? stx) (string? (syntax->datum stx))) (define (dispatch-pattern? stx) (define (dispatch/no-...? stx) (syntax-case stx () [() #t] [((bidi arg ...) . rest-stx) (dispatch/...? #'rest-stx)] [(string . rest-stx) (string-syntax? #'string) (dispatch/no-...? #'rest-stx)])) (define (dispatch/...? stx) (syntax-case stx () [() #t] [((bidi arg ...) . rest-stx) (dispatch/...? #'rest-stx)] [(string . rest-stx) (string-syntax? #'string) (dispatch/no-...? #'rest-stx)] [((... ...) . rest-stx) (dispatch/no-...? #'rest-stx)])) (dispatch/no-...? stx)) (define (dispatch-pattern/ids? stx) (define (dispatch/no-...? stx) (syntax-case stx () [() #t] [((bidi arg ... id) . rest-stx) (identifier? #'id) (dispatch/...? #'rest-stx)] [(string . rest-stx) (string-syntax? #'string) (dispatch/no-...? #'rest-stx)])) (define (dispatch/...? stx) (syntax-case stx () [() #t] [((bidi arg ... id) . rest-stx) (identifier? #'id) (dispatch/...? #'rest-stx)] [(string . rest-stx) (string-syntax? #'string) (dispatch/no-...? #'rest-stx)] [((... ...) . rest-stx) (dispatch/no-...? #'rest-stx)])) (dispatch/no-...? stx)) (define (dispatch-pattern-not-... stx) (filter (compose not ...?) (syntax->list stx))) (define (dispatch-pattern-next-...? stx) (let loop ([l (syntax->list stx)]) (cond [(empty? l) empty] [(empty? (rest l)) (list #f)] [(...? (second l)) (list* #t (loop (rest (rest l))))] [else (list* #f (loop (rest l)))]))) (define (dispatch-pattern->dispatch-pattern/ids pps) (map (lambda (pp ppi) (cond [(string-syntax? pp) pp] [(...? pp) pp] [else (with-syntax ([(bidi-id arg ...) pp] [id ppi]) (syntax/loc pp (bidi-id arg ... id)))])) (syntax->list pps) (generate-temporaries pps))) (provide/contract [string-syntax? (syntax? . -> . boolean?)] [dispatch-pattern-next-...? (syntax? . -> . (listof boolean?))] [dispatch-pattern-not-... (syntax? . -> . (listof syntax?))] [dispatch-pattern->dispatch-pattern/ids (syntax? . -> . (listof syntax?))] [dispatch-pattern? (syntax? . -> . boolean?)] [dispatch-pattern/ids? (syntax? . -> . boolean?)])
false
501ee61f210b936fe26268385050a6ae44b374c7
0bd832b9b372ee7d4877e99b68536c15a7f7c9c9
/sets.rkt
1ec83323fbadff5d79a51c82ff582ba586dd6dad
[]
no_license
jwilliamson1/schemer
eff9c10bcbcdea9110a44c80769a0334119b3da4
c2f9743392652664f1ff5687819f040e724c8436
refs/heads/master
2022-01-06T14:52:10.638822
2021-12-31T21:32:22
2021-12-31T21:32:22
75,143,723
0
0
null
2020-11-11T13:11:47
2016-11-30T02:37:55
Racket
UTF-8
Racket
false
false
4,365
rkt
sets.rkt
#lang racket ; ;(define (element-of-set? x set) ; (cond ((null? set) #f) ; ((equal? x (car set)) #t) ; (else (element-of-set? x (cdr set))))) ; ;(define (adjoin-set x set) ; (if (element-of-set? x set) ; set ; (cons x set))) ; ;(define (intersection-set set1 set2) ; (cond ((or (null? set1) (null? set2)) ; '()) ; ((element-of-set? (car set1) set2) ; (cons (car set1) ; (intersection-set (cdr set1) ; set2))) ; (else (intersection-set (cdr set1) ; set2)))) ; ;(define (union-set set1 set2) ; (cond ((null? set1)set2) ; ((element-of-set? (car set1) set2) ; (union-set (cdr set1) set2)) ; (else (cons (car set1) ; (union-set (cdr set1) ; set2))))) ;(element-of-set? 1 '(1 2 3)) ;(union-set '(10 3 5)'(1 2 3)) (define set1 '(4 9 8 6 43 4)) (define set2 '(10 6 4 89 2 3 5 43 4)) ;9 8 10 6 4 89 2 5 43 4 (define (element-of-set?* x set) (cond ((null? set) #f) ((equal? x (car set)) #t) (else (element-of-set?* x (cdr set))))) (element-of-set?* 4 '(9 8 6 43 4 4)) ;O(n) but potential worse due to more elements (define (adjoin-set* x set) (cons x set)) ;O(1) vs O(n) (adjoin-set* 5 set1) (define (intersection-set* set1 set2) (cond((or(null? set1)(null? set2)) '()) ((element-of-set?* (car set1) set2) (cons (car set1) (intersection-set* (cdr set1) set2))) (else (intersection-set* (cdr set1) set2)))) (intersection-set* set1 set2) ;O(n^2) (define(union-set* set1 set2) (append set1 set2)) (union-set* set1 set2) ;O(n) (define (adjoin-set x set) (cond((null? set)(list x)) ((< x (car set))(cons x set)) ((= x (car set))set) (else (cons (car set)(adjoin-set x (cdr set)))))) (displayln "test adjoin-set") (adjoin-set 3 '(1 2 4)) (adjoin-set 3 '(1 2 5)) (adjoin-set 6 '(1 2 5)) (adjoin-set 1 '(1 2 5)) (adjoin-set 1 '(2 3 4)) (adjoin-set 2 '(2 3 4)) (adjoin-set 1 '(3 4 5)) (adjoin-set 2 '(3 4 5)) (adjoin-set 2 '()) ;(define (union-set set1 set2) ; (cond((null? set1)set2) ; (else (union-set (cdr set1)(adjoin-set (car set1)set2))))) ;still O(n^2) just slightly better ;(define (union-set set1 set2) ; (if ; (let ((x1 (car set1))(x2 (car set2))) ; (cond((= x1 x2) ; (cons x1 (union-set (cdr set1)(cdr set2)))) ; ((and(< x1 x2)(or(null? (cdr set1))(< x2 (cadr set2)))) ; (cons x1 (cons x2 (union-set (cdr set1)(cdr) (define (union-set set1 set2) (cond((null? set1)set2) ((null? set2)set1) (else (let ((x1 (car set1))(x2 (car set2))) (cond((= x1 x2) (cons x1 (union-set (cdr set1)(cdr set2)))) ((and(< x1 x2)) (cons x1 (union-set (cdr set1) set2))) ((and(> x1 x2)) (cons x2 (union-set set1 (cdr set2))))))))) (displayln "test union-set") (union-set '(1 3 5 8)'(2 4 6 7)) (union-set '(1 3 5)'(1 2 3 4 5 6)) (union-set '(1 2 3 4 5 6)'(2 4 6)) (union-set '(1 2 3)'(4 5 6)) (union-set '(2 3 4 5 6)'(1 2 3 7)) (define (disjoin set1 set2) ;numbers that are not in both sets (cond((null? set1)set2) ((null? set2)set1) (else (let((x1 (car set1))(x2 (car set2))) (cond((= x1 x2) (disjoin (cdr set1)(cdr set2))) ((< x1 x2) (cons x1(disjoin(cdr set1)set2))) (else(cons x2(disjoin set1 (cdr set2))))))))) (disjoin '(1 2 3)'(1 3 4)) (disjoin '(1 2 3 6)'(1 3 4)) (disjoin '(1 2 3 6)'(1 3 4 5 7)) (define(difference set1 set2) ;only the numbers from the first set not in the second (cond((null? set1)'()) ((null? set2)set1) (else (let((x1 (car set1))(x2 (car set2))) (cond((= x1 x2) (difference (cdr set1)(cdr set2))) ((< x1 x2) (cons x1(difference(cdr set1)set2))) (else(difference set1 (cdr set2)))))))) (difference '(1 2 3)'(1 3 4)) (difference '(1 2 3 6)'(1 3 4)) (difference '(1 2 3 5 6)'(1 3 4 5 7)) (difference '(1 2 3 5 6 7)'(1 3 4 7)) (append '() (list 1) '() (list 2))
false
cc3eca22830d293f1f61c6e5ff65107ba603f193
9a5aea56de921f6defc0ba1d793f5d250ad9af23
/test_runner.rkt
fe15a9039370104679787ae8ddb2fc0da117d64e
[ "Apache-2.0" ]
permissive
wwall/elmlisp
1f702f9e47132463ff124c91de9c786a9b163157
9fcf9873b5e0962e2abaff4f4fcc7e74bb723d48
refs/heads/master
2023-06-15T18:22:47.109337
2017-08-12T20:09:53
2017-08-12T20:10:09
null
0
0
null
null
null
null
UTF-8
Racket
false
false
2,192
rkt
test_runner.rkt
#lang racket (require threading "src/compile.rkt") (define (with-color color string) (format "~a~a~a" color string "\033[0m")) (define (red string) (with-color "\033[31m" string)) (define (green string) (with-color "\033[32m" string)) (define (list-files directory) (~>> directory (directory-list) (map path->string))) (define (test-names files suffix) (~>> files (filter (lambda (file) (string-suffix? file suffix))) (map (lambda (file) (string-trim file suffix #:right? #t))))) (define (trim string) (string-trim string #:repeat? #t)) (define (output-exists test files suffix) (member (format "~a~a" test suffix) files)) (define (throw-output-doesnt-exist test) (raise-user-error (red (format "ERROR: Test '~a' doesn't have an output file." test)))) (define (throw-output-doesnt-match test expected-output actual-output) (raise-user-error (red (format "FAILURE: Test '~a' didn't pass:\n\nExpected:\n~a\n\nActual:\n~a\n" test expected-output actual-output)))) (define (test-output test directory input-suffix output-suffix) (let* ([input (file->string (format "~a/~a~a" directory test input-suffix))] [expected-output (trim (file->string (format "~a/~a~a" directory test output-suffix)))] [actual-output (trim (compile input))]) (when (not (equal? expected-output actual-output)) (throw-output-doesnt-match test expected-output actual-output)))) (define (run-tests directory input-suffix output-suffix) (let* ([files (list-files directory)] [tests (test-names files input-suffix)]) (for ([test tests]) (when (not (output-exists test files output-suffix)) (throw-output-doesnt-exist test)) (test-output test directory input-suffix output-suffix)))) ; ---------------------------------------------------------------- (define examples-directory "./examples") (define tests-directory "./tests") (run-tests "./tests" ".in" ".out") (run-tests "./examples" ".ell" ".elm") (displayln (green "All tests passed."))
false
787d5a3348a2bf24fa1d3fde591b729fe5ec45d9
871bba62f634277e3d7276de2ff937ee2108bc6e
/src/Word-Search/images.rkt
e5e07cf7e0aad8869ad02cf8dae1d353b26c3732
[]
no_license
shubhamgupta107/Secure-Local-Interactive-Platform-in-DrRacket
155d0b18a1eb958e1a2964f3c51b20d3db1e04b1
715cb5b27dbe861451a1a8a94fb6bb60e7dcc827
refs/heads/master
2022-09-21T07:48:01.850652
2020-05-28T07:09:30
2020-05-28T07:09:30
184,908,314
0
0
null
null
null
null
UTF-8
Racket
false
false
5,487
rkt
images.rkt
#lang racket (require 2htdp/image) (provide (all-defined-out)) (define vacant (bitmap "images/null.png")) (define background (bitmap "images/background.png")) (define congratulations (bitmap "images/Congratulations.png")) (define gameover (bitmap "images/Gameover.png")) (define wordsearch (bitmap "images/Wordsearch.png")) (define welcome-background (bitmap "images/welcome-background.png")) (define a_press (bitmap "images/A_press.png")) (define b_press (bitmap "images/B_press.png")) (define c_press (bitmap "images/C_press.png")) (define d_press (bitmap "images/D_press.png")) (define e_press (bitmap "images/E_press.png")) (define f_press (bitmap "images/F_press.png")) (define g_press (bitmap "images/G_press.png")) (define h_press (bitmap "images/H_press.png")) (define i_press (bitmap "images/I_press.png")) (define j_press (bitmap "images/J_press.png")) (define k_press (bitmap "images/K_press.png")) (define l_press (bitmap "images/L_press.png")) (define m_press (bitmap "images/M_press.png")) (define n_press (bitmap "images/N_press.png")) (define o_press (bitmap "images/O_press.png")) (define p_press (bitmap "images/P_press.png")) (define q_press (bitmap "images/Q_press.png")) (define r_press (bitmap "images/R_press.png")) (define s_press (bitmap "images/S_press.png")) (define t_press (bitmap "images/T_press.png")) (define u_press (bitmap "images/U_press.png")) (define v_press (bitmap "images/V_press.png")) (define w_press (bitmap "images/W_press.png")) (define x_press (bitmap "images/X_press.png")) (define y_press (bitmap "images/Y_press.png")) (define z_press (bitmap "images/Z_press.png")) (define retry_press (bitmap "images/RETRY_press.png")) (define next_press (bitmap "images/NEXT_press.png")) (define quit_press (bitmap "images/QUIT_press.png")) (define play-levels_press (bitmap "images/Play_levels_press.png")) (define create-level_press (bitmap "images/Create-level_press.png")) (define a_normal (bitmap "images/A_normal.png")) (define b_normal (bitmap "images/B_normal.png")) (define c_normal (bitmap "images/C_normal.png")) (define d_normal (bitmap "images/D_normal.png")) (define e_normal (bitmap "images/E_normal.png")) (define f_normal (bitmap "images/F_normal.png")) (define g_normal (bitmap "images/G_normal.png")) (define h_normal (bitmap "images/H_normal.png")) (define i_normal (bitmap "images/I_normal.png")) (define j_normal (bitmap "images/J_normal.png")) (define k_normal (bitmap "images/K_normal.png")) (define l_normal (bitmap "images/L_normal.png")) (define m_normal (bitmap "images/M_normal.png")) (define n_normal (bitmap "images/N_normal.png")) (define o_normal (bitmap "images/O_normal.png")) (define p_normal (bitmap "images/P_normal.png")) (define q_normal (bitmap "images/Q_normal.png")) (define r_normal (bitmap "images/R_normal.png")) (define s_normal (bitmap "images/S_normal.png")) (define t_normal (bitmap "images/T_normal.png")) (define u_normal (bitmap "images/U_normal.png")) (define v_normal (bitmap "images/V_normal.png")) (define w_normal (bitmap "images/W_normal.png")) (define x_normal (bitmap "images/X_normal.png")) (define y_normal (bitmap "images/Y_normal.png")) (define z_normal (bitmap "images/Z_normal.png")) (define retry_normal (bitmap "images/RETRY_normal.png")) (define next_normal (bitmap "images/NEXT_normal.png")) (define quit_normal (bitmap "images/QUIT_normal.png")) (define play-levels_normal (bitmap "images/Play_levels_normal.png")) (define create-level_normal (bitmap "images/Create-level_normal.png")) (define a_hover (bitmap "images/A_hover.png")) (define b_hover (bitmap "images/B_hover.png")) (define c_hover (bitmap "images/C_hover.png")) (define d_hover (bitmap "images/D_hover.png")) (define e_hover (bitmap "images/E_hover.png")) (define f_hover (bitmap "images/F_hover.png")) (define g_hover (bitmap "images/G_hover.png")) (define h_hover (bitmap "images/H_hover.png")) (define i_hover (bitmap "images/I_hover.png")) (define j_hover (bitmap "images/J_hover.png")) (define k_hover (bitmap "images/K_hover.png")) (define l_hover (bitmap "images/L_hover.png")) (define m_hover (bitmap "images/M_hover.png")) (define n_hover (bitmap "images/N_hover.png")) (define o_hover (bitmap "images/O_hover.png")) (define p_hover (bitmap "images/P_hover.png")) (define q_hover (bitmap "images/Q_hover.png")) (define r_hover (bitmap "images/R_hover.png")) (define s_hover (bitmap "images/S_hover.png")) (define t_hover (bitmap "images/T_hover.png")) (define u_hover (bitmap "images/U_hover.png")) (define v_hover (bitmap "images/V_hover.png")) (define w_hover (bitmap "images/W_hover.png")) (define x_hover (bitmap "images/X_hover.png")) (define y_hover (bitmap "images/Y_hover.png")) (define z_hover (bitmap "images/Z_hover.png")) (define retry_hover (bitmap "images/RETRY_hover.png")) (define next_hover (bitmap "images/NEXT_hover.png")) (define quit_hover (bitmap "images/QUIT_hover.png")) (define play-levels_hover (bitmap "images/Play_levels_hover.png")) (define create-level_hover (bitmap "images/Create-level_hover.png")) (define back_press (bitmap "images/Back_press.png")) (define back_hover (bitmap "images/Back_hover.png")) (define back_normal (bitmap "images/Back_normal.png")) (define play_press (bitmap "images/Play_press.png")) (define play_hover (bitmap "images/Play_hover.png")) (define play_normal (bitmap "images/Play_normal.png")) (define timer (bitmap "images/Timer.png")) (define word-box (bitmap "images/word-box.png")) (define solution (bitmap "images/Solution.png"))
false
3d3bc4cf19b13d0b381708ce040ed8b701e05d6b
b32bda6953611ec7c6f21b3aadedca8f5f9970d5
/lens/private/compound/main.rkt
f6367be88bf08cb9ea61b15eb8473e5daafc0dd0
[ "MIT" ]
permissive
gitter-badger/lens
9ff08188e50d88920123fae18e84e4c82ccd2dea
f5db2bb660b7649613fb49567f7fba3299c07342
refs/heads/master
2020-12-28T23:35:03.837006
2015-12-04T22:56:08
2015-12-04T22:56:08
47,433,473
0
0
null
2015-12-04T23:12:38
2015-12-04T23:12:38
null
UTF-8
Racket
false
false
126
rkt
main.rkt
#lang reprovide "compose.rkt" "identity.rkt" "join-hash.rkt" "join-list.rkt" "join-string.rkt" "join-vector.rkt" "thrush.rkt"
false
7acd623995f635fc1f0ad44e22905dfe73164c7c
5bbc152058cea0c50b84216be04650fa8837a94b
/experimental/postmortem/experiments/adaptor/many-adaptor/gregor/both/datetime-adapted.rkt
77530d781ce7a2db3ff3504958ceec404f0f8459
[]
no_license
nuprl/gradual-typing-performance
2abd696cc90b05f19ee0432fb47ca7fab4b65808
35442b3221299a9cadba6810573007736b0d65d4
refs/heads/master
2021-01-18T15:10:01.739413
2018-12-15T18:44:28
2018-12-15T18:44:28
27,730,565
11
3
null
2018-12-01T13:54:08
2014-12-08T19:15:22
Racket
UTF-8
Racket
false
false
1,177
rkt
datetime-adapted.rkt
#lang typed/racket/base (require benchmark-util "core-adapter.rkt" "date-adapted.rkt" "time-adapted.rkt" ) (require/typed/check "datetime.rkt" [#:struct DateTime ([date : Date] [time : Time] [jd : Exact-Rational])] ( datetime (->* (Natural) (Month Natural Natural Natural Natural Natural) DateTime)) ( datetime->date (-> DateTime Date)) ( datetime->time (-> DateTime Time)) ( datetime->jd (-> DateTime Exact-Rational)) ( datetime->posix (-> DateTime Exact-Rational)) ( date+time->datetime (-> Date Time DateTime)) ( jd->datetime (-> Exact-Rational DateTime)) ( posix->datetime (-> Exact-Rational DateTime)) ( datetime->iso8601 (-> DateTime String)) ( datetime-add-nanoseconds (-> DateTime Integer DateTime)) ( datetime-add-seconds (-> DateTime Integer DateTime)) ( datetime=? (-> DateTime DateTime Boolean)) ( datetime<? (-> DateTime DateTime Boolean)) ( datetime<=? (-> DateTime DateTime Boolean)) ) (provide datetime datetime->date datetime->time datetime->jd datetime->posix date+time->datetime jd->datetime posix->datetime datetime->iso8601 datetime-add-nanoseconds datetime-add-seconds datetime=? datetime<? datetime<=? (struct-out DateTime) )
false
366948311bd3b799c3df69a64c7a7f0f2880867a
24338514b3f72c6e6994c953a3f3d840b060b441
/cur-lib/cur/curnel/racket-impl/runtime.rkt
720649b5a623a11a94062913d5e419fa9f74be03
[ "BSD-2-Clause" ]
permissive
graydon/cur
4efcaec7648e2bf6d077e9f41cd2b8ce72fa9047
246c8e06e245e6e09bbc471c84d69a9654ac2b0e
refs/heads/master
2020-04-24T20:49:55.940710
2018-10-03T23:06:33
2018-10-03T23:06:33
172,257,266
1
0
BSD-2-Clause
2019-02-23T19:53:23
2019-02-23T19:53:23
null
UTF-8
Racket
false
false
10,466
rkt
runtime.rkt
#lang racket/base (require (only-in racket/list drop) (only-in racket/struct struct->list) (for-syntax racket/base syntax/parse)) (provide #%plain-app #%plain-lambda quote cur-Type cur-Π cur-apply cur-λ cur-elim (struct-out constant) prop:parameter-count parameter-count-ref prop:dispatch dispatch-ref prop:recursive-index-ls recursive-index-ls-ref) #| Cur is implemented by type-checking macro expansion into Racket run-time terms. TODO: Shouldn't these be curnel-terms, not run-time terms? Maybe not, if we're calling the Surface language core "Curnel" The run-time terms are either: 1. A Racket identifier x, as long as the binding x at one phase higher is bound to an identifier-info. 2. A transparent struct inheriting from constant, as described below. 3. The struct (cur-Type i), where i is a natural number 4. The struct (cur-Π t f), where t is a run-time term and f is a run-time term. 5. The struct (cur-λ t f), where t is a run-time term and f is a run-time term. 6. A plain application (#%plain-app cur-apply rator rand) of a run-time term to a run-time term. 7. A plain application (#%plain-app cur-elim target motive method-ls), where elim is the function defined below, target is a run-time term, motive is a run-time term, and method-ls is a list of run-time terms. Any module that requires a Racket library, rather than a Cur library, is considered unsafe. Cur does not guarantee that requiring such modules with succeed, and if it succeeds Cur does not guarantee that it will run, and if it runs Cur does not guarnatee safety. |# ; The run-time representation of univeres. (cur-Type i), where i is a Nat. ; NB: Separate extra-constructor-name makes identifying constructor with free-identifier=? easier. (struct Type (i) #:transparent #:extra-constructor-name cur-Type) ; The run-time representation of Π types. (cur-Π t f), where is a type and f is a procedure that computes ; the result type given an argument. (struct Π (t f) #:extra-constructor-name cur-Π) ; The run-time representation of an application is a Racket plain application. ; (#%plain-app cur-apply e1 e2) (define (cur-apply rator rand) (rator rand)) ; The run-time representation of a function. (cur-λ t f), where t is a type and f is a procedure that ; computer the result type given an argument of type t. (struct λ (t f) #:property prop:procedure 1 #:extra-constructor-name cur-λ) ; The parameter-count property is natural number representing the number of fields that are parameters. (define-values (prop:parameter-count parameter-count? parameter-count-ref) (make-struct-type-property 'parameter-count)) ; The dispatch property is a box containing a curried Racket procedure. ; The procedure accepts a list of length equal to the number of fields the associated constant has, ; then a target, and returns the ith element based on which constructor the target is constructed ; from. ; NB: Currently must be in a box, since the procedure can only be generated after all constant ; structs are defined. Since the constant structs must have the property, the box must exist but be ; initalized later. (define-values (prop:dispatch dispatch? dispatch-ref) (make-struct-type-property 'dispatch)) ; The recursive-index-ls property is a list of natural numbers, representing which fields of the ; constant are recursive. (define-values (prop:recursive-index-ls recursive-index-ls? recursive-index-ls-ref) (make-struct-type-property 'recursive-index-ls)) (begin-for-syntax (provide (struct-out constant-info) (struct-out identifier-info)) (struct identifier-info (type delta-def)) ;; TODO PERF: Could use vectors instead of lists; since we store the count anyway... or maybe we won't ;; need to by storing param and index decls separately. (struct constant-info identifier-info (param-count param-name-ls param-ann-ls index-name-ls index-ann-ls constructor-count constructor-ls constructor-index recursive-index-ls))) ; A Cur identifier is any identifier that is bound at phase j to a runtime term and bound at phase j+1 ; to an identifier-info. ; An inductive type is a transparent struct that inherits constant, and has ; prop:parameter-count. ; The sturct should have a constructor D that is not bound in the transformer environment, but is bound ; as a constructor at phase j and is bound to a constant-info as phase j+1. ; ; A constructor is a transparent struct that inherits constant, and has ; prop:parameter-count, prop:dispatch, and prop:recursive-index-ls. ; The struct should have a constructor c that is not bound in the transformer environment, but is bound ; as a constructor at phase j and is bound to a constant-info as phase j+1. ; The type of the constant must be an inductive type, possibly applied to dependent indices. ; TODO: ; Currently, inductive types and constants are treated as uninterpreted functions. Eventually, I'd ; like to make them more like records and give the functional nature as a macro. This is backwards ; incompatible and requires care. ; The constant-info-type-constr would be a procedure that takes one argument for every argument to the ; inductive type, and produces a runtime term as a syntax object representing the type of the ; inductive type. ; This requires some alternative type for constant identifier, used when e.g. typing a data declaration ; and adding the identifier to a context. This would be similar to the Πᵤ type I've used in my other work. (struct constant () #:transparent) ;; Target must a constructor, and method-ls must be a list of methods of length equal to the number of ;; constructs for the inductive type of target. (define (cur-elim target _ . method-ls) (define fields-to-drop (parameter-count-ref target)) (define dispatch ((unbox (dispatch-ref target)) method-ls)) (let loop ([e target]) (let* ([method (dispatch e)] [args (drop (struct->list e) fields-to-drop)] [r-arg-ls (recursive-index-ls-ref e)] [r-args (for/list ([x args] [i (in-naturals fields-to-drop)] ;; TODO PERF: memq, in a loop, over numbers #:when (memq i r-arg-ls)) ;; TODO PERF: CBV; eager eval of recursive arguments. Is there a better way? (loop x))]) ;; NB: the method is curried, so ... ;; TODO PERF: attempt to uncurry elim methods? (for/fold ([app method]) ([a (append args r-args)]) (app a))))) ; Syntax classes for matching cur run-time terms. ; These classes only do shallow pattern matching, since we assume all run-time terms were ; type-checked. (begin-for-syntax (require "stxutils.rkt") (provide cur-runtime-identifier ; cur-runtime-constant cur-runtime-universe cur-runtime-pi cur-runtime-lambda cur-runtime-app cur-runtime-elim cur-runtime-term ; make-cur-runtime-constant make-cur-runtime-universe make-cur-runtime-pi make-cur-runtime-lambda make-cur-runtime-app make-cur-runtime-elim cur-runtime-identifier? ; cur-runtime-constant? cur-runtime-universe? cur-runtime-pi? cur-runtime-lambda? cur-runtime-app? cur-runtime-elim? cur-runtime-term? cur-runtime-literals) (define-syntax-class/pred cur-runtime-identifier #:commit (pattern name:id)) (define-literal-set cur-runtime-literals (cur-Type cur-Π cur-λ cur-apply cur-elim)) (define cur-runtime-literal? (literal-set->predicate cur-runtime-literals)) ;; For future #;(define-syntax-class/pred cur-runtime-constant #:attributes (name (rand-ls 1)) #:literals (#%plain-app) (pattern (#%plain-app name:id rand-ls ...) #:when (not (cur-runtime-literal? #'name)) ;; NB: We could double check, but since we're assuming all runtime terms are well-typed, ;; we need not bother. Also lets us avoid this annoying format-id hack. #;(let ([v (syntax-local-value (format-id #'name "constant:~a" #'name) (lambda () #f))]) (and v (free-identifier=? #'constant (sixth (extract-struct-info v))))))) #;(define (make-cur-runtime-constant syn name rand-ls) (quasisyntax/loc syn (#%plain-app #,name #,@rand-ls))) (define-syntax-class/pred cur-runtime-universe #:attributes (level-syn level) #:literals (#%plain-app quote cur-Type) #:commit (pattern (#%plain-app cur-Type (quote level-syn)) #:attr level (syntax->datum #'level-syn))) ;; Takes a syntax object matching a natrual number, returns a cur-runtime-universe? (define (make-cur-runtime-universe syn i) (quasisyntax/loc syn (#%plain-app cur-Type '#,i))) (define-syntax-class/pred cur-runtime-pi #:attributes (name ann result) #:literals (#%plain-app #%plain-lambda cur-Π) #:commit (pattern (#%plain-app cur-Π ann (#%plain-lambda (name) result)))) ;; Takes a cur-runtime-term as ann and result, an identifer as name. (define (make-cur-runtime-pi syn ann name result) (quasisyntax/loc syn (#%plain-app cur-Π #,ann (#%plain-lambda (#,name) #,result)))) (define-syntax-class/pred cur-runtime-lambda #:attributes (name ann body) #:literals (#%plain-app #%plain-lambda cur-λ) #:commit (pattern (#%plain-app cur-λ ann (#%plain-lambda (name) body)))) (define (make-cur-runtime-lambda syn ann name body) (quasisyntax/loc syn (#%plain-app cur-λ #,ann (#%plain-lambda (#,name) #,body)))) (define-syntax-class/pred cur-runtime-app #:attributes (rator rand) #:literals (#%plain-app cur-apply) #:commit (pattern (#%plain-app cur-apply rator rand))) (define (make-cur-runtime-app syn rator rand) (quasisyntax/loc syn (#%plain-app cur-apply #,rator #,rand))) (define-syntax-class/pred cur-runtime-elim #:attributes (target motive (method-ls 1)) #:literals (#%plain-app cur-elim) #:commit (pattern (#%plain-app cur-elim target motive method-ls ...))) (define (make-cur-runtime-elim syn target motive method-ls) (quasisyntax/loc syn (#%plain-app cur-elim #,target #,motive #,@method-ls))) (define-syntax-class/pred cur-runtime-term #:commit (pattern e:cur-runtime-identifier) ;(pattern e:cur-runtime-constant) (pattern e:cur-runtime-universe) (pattern e:cur-runtime-pi) (pattern e:cur-runtime-lambda) (pattern e:cur-runtime-app) (pattern e:cur-runtime-elim)))
true
4b6f4b3c6a8dbfeb61e8c3c5c751a043ab527139
8efc1131fab877289b587ce705016a74f28b3df6
/03.02.scrbl
40462794f5f46c0910343fdf82c95085b2b0e835
[]
no_license
Langeeker/RacketGuideInChineseForScribble
ed484638c4e9ce0ccfa2fc7a6b303b8735eb0ddb
4fb07d376a2391f62e411b825eb825e3388ae411
refs/heads/master
2023-04-18T04:37:01.206383
2018-02-20T15:33:02
2018-02-20T15:33:02
null
0
0
null
null
null
null
UTF-8
Racket
false
false
4,150
scrbl
03.02.scrbl
;03.02.scrbl ;3.2 数值(Number) #lang scribble/doc @(require scribble/manual scribble/eval "guide-utils.rkt") @title[#:tag "numbers"]{数值(Number)} Racket的@deftech{数值(number)}可以是精确的也可以是不精确的: @itemize[ @item{一个@defterm{精确}的数字是: @itemize[ @item{一个任意大的或小的整数,比如:@racket[5],@racket[99999999999999999]或@racket[-17];} @item{一个有理数,即精确的两个任意小的或大的整数比,比如:@racket[1/2],@racket[99999999999999999/2]或@racket[-3/4];} @item{一个复数,带有精确的实部和虚部(即虚部不为零),比如:@racket[1+2i]或@racket[1/2+3/4i]。}]} @item{一个 @defterm{不精确}的数字是: @itemize[ @item{一个数的一个IEEE浮点表示,比如:@racket[2.0]或@racket[3.14e87],其中IEEE无穷大和非数书写为:@racket[+inf.0],@racket[-inf.0]和@racket[+nan.0](或@racketvalfont{-nan.0});} @item{一个带有实部和虚部配对的复数的IEEE浮点表示,比如:@racket[2.0+3.0i]或@racket[-inf.0+nan.0i];一种特殊情况是,一个不精确的复数可以有一个精确的零实部和一个不精确的虚部。}]}] 对一个小数点或指数的说明符进行不精确数字打印,对整数和分数进行精确数字打印。用同样的约定申请读入数值常数,但@litchar{#e}或@litchar{#i}可以前缀数值以解析一个精确的或不精确的数值。前缀@litchar{#b}、@litchar{#o}和@litchar{#x}指定二进制、八进制和十六进制数值的解释。 @examples[ 0.5 (eval:alts @#,racketvalfont{#e0.5} 1/2) (eval:alts @#,racketvalfont{#x03BB} #x03BB)] 计算涉及到精确的数值产生不精确的结果,这样的情况对数据造成一种污染。注意,然而,Racket没有提供"不精确的布尔值",所以对不精确的数字的比较分支计算却能产生精确的结果。@racket[exact->inexact]和@racket[inexact->exact]程序在两种类型的数值之间转换。 @examples[ (/ 1 2) (/ 1 2.0) (if (= 3.0 2.999) 1 2) (inexact->exact 0.1)] 当精确的结果需要表达实际的非有理数数值,不精确的结果也由像@racket[sqrt]、@racket[log]和@racket[sin]这样的程序产生。Racket只能代表有理数和有理数配对的复数。 @examples[ (code:line (sin 0) (code:comment @#,t{有理数...})) (code:line (sin 1/2) (code:comment @#,t{非有理数...}))] 在性能方面,小整数的计算通常是最快的,其中“小”意味着这个数字比有符号数值的机器字长要小一点。具有非常大的精确整数或非整精确数的计算要比不精确数的计算代价要高昂得多。 @def+int[ (define (sigma f a b) (if (= a b) 0 (+ (f a) (sigma f (+ a 1) b)))) (time (round (sigma (lambda (x) (/ 1 x)) 1 2000))) (time (round (sigma (lambda (x) (/ 1.0 x)) 1 2000)))] 在针对通常的@racket[number?]的加法中,@deftech{整数类(integer)}、@deftech{有理数类(rational)}、@deftech{实类(real)}(总是有理数)和复数都以通常的方式定义,并被程序 @racket[integer?]、@racket[rational?]、@racket[real?]和@racket[complex?]所识别。一些数学过程只接受实数,但大多数实现了对复数的标准扩展。 @examples[ (integer? 5) (complex? 5) (integer? 5.0) (integer? 1+2i) (complex? 1+2i) (complex? 1.0+2.0i) (abs -5) (abs -5+2i) (sin -5+2i)] @racket[=]过程比较数值相等的数值。如果给定不精确和精确的数字进行比较,它实际上会在比较之前将不精确数字转换为精确数字。@racket[eqv?](乃至 @racket[equal?])程序,相反,程序比较既是精确数而且数值上相等的数值。 @examples[ (= 1 1.0) (eqv? 1 1.0)] 当心涉及不精确的数字比较,由于其性质会有令人惊讶的行为。即使是简单的不精确的数字也许并不意味着你能想到他们的意思;例如,当一个二进制IEEE浮点数可以表示为@racket[1/2]精确数,它只能近似于@racket[1/10]: @examples[ (= 1/2 0.5) (= 1/10 0.1) (inexact->exact 0.1)]
false
77264316990f721b3683785526ff5b6136579dd5
8935203857f7aec86e067c77d84b64aa06c2d99a
/lang/syntax.rkt
a38aabb139a64033e8fb3c75c7b406c69679805e
[]
no_license
julian-becker/rince
83004c0fc4003eca3080b8cba2dacc9ed2224cb6
9367f6613ae306d1761ef05764ee7418962f9869
refs/heads/master
2020-05-24T03:23:56.965471
2019-03-28T10:46:12
2019-03-28T10:46:12
null
0
0
null
null
null
null
UTF-8
Racket
false
false
2,371
rkt
syntax.rkt
#lang turnstile/base (extends "scope.rkt" #:prefix base:) (require (prefix-in r: (only-in racket/base void)) racket/stxparam) (provide empty-statement break continue do for if while) (define-syntax-rule (empty-statement) (#%plain-app r:void)) (define-syntax-parameter break (λ (stx) (raise-syntax-error #f "invalid use" stx))) (define-syntax-parameter continue (λ (stx) (raise-syntax-error #f "invalid use" stx))) ; TODO: check predicate types are scalar (define-typed-syntax if [(_ predicate consequent) ≫ [⊢ predicate ≫ predicate- ⇒ τ_pred] -------- [≻ (if predicate consequent (empty-statement))]] [(_ predicate consequent alternate) ≫ [⊢ predicate ≫ predicate- ⇒ τ_pred] -------- [≻ (begin (when (zero? predicate-) (goto else)) consequent (goto endif) #:label else alternate #:label endif)]]) ; TODO: switch (define-typed-syntax (while pred body) ≫ [⊢ pred ≫ pred- ⇒ τ_pred] -------- [≻ (begin #:label loop (when (zero? pred-) (goto end)) (syntax-parameterize ([break (syntax-rules () [(_) (goto end)])] [continue (syntax-rules () [(_) (goto loop)])]) body) (goto loop) #:label end)]) (define-typed-syntax (do body pred) ≫ [⊢ pred ≫ pred- ⇒ τ_pred] -------- [≻ (begin #:label loop (syntax-parameterize ([break (syntax-rules () [(_) (goto end)])] [continue (syntax-rules () [(_) (goto cont)])]) body) #:label cont (unless (zero? pred-) (goto loop)) #:label end)]) (define-typed-syntax for [(_ (() pred step) body) ≫ -------- [≻ (for ((empty-statement) pred step) body)]] [(_ (init () step) body) ≫ -------- [≻ (for (init (base:#%datum . 1) step) body)]] [(_ (init pred ()) body) ≫ -------- [≻ (for (init pred (empty-statement)) body)]] [(_ (init pred step) body) ≫ [⊢ pred ≫ pred- ⇒ τ_pred] -------- [≻ (block init #:label loop (when (zero? pred-) (goto end)) (syntax-parameterize ([break (syntax-rules () [(_) (goto end)])] [continue (syntax-rules () [(_) (goto cont)])]) body) #:label cont step (goto loop) #:label end)]])
true
2c6428ed7f5c4a759f3f031f834cfa37685a07b9
099418d7d7ca2211dfbecd0b879d84c703d1b964
/whalesong/js/world/geo.rkt
ca6a12678714e335f398fe7bc6aa8567a591b04d
[]
no_license
vishesh/whalesong
f6edd848fc666993d68983618f9941dd298c1edd
507dad908d1f15bf8fe25dd98c2b47445df9cac5
refs/heads/master
2021-01-12T21:36:54.312489
2015-08-19T19:28:25
2015-08-19T20:34:55
34,933,778
3
0
null
2015-05-02T03:04:54
2015-05-02T03:04:54
null
UTF-8
Racket
false
false
866
rkt
geo.rkt
#lang s-exp "../../lang/base.rkt" (require "../../js.rkt") (require "../../js/world.rkt") (provide on-geo) (define setup-geo (js-function->procedure "function(locationCallback) { return navigator.geolocation.watchPosition( function(evt) { var coords = evt.coords; locationCallback(plt.runtime.makeFloat(coords.latitude), plt.runtime.makeFloat(coords.longitude)); })}")) (define shutdown-geo (js-function->procedure "function(watchId) { navigator.geolocation.clearWatch(watchId); }")) ;; A new event handler type for geolocation: ;; ;; Use it as any other world handler: ;; ;; (big-bang ... ;; [on-geo (lambda (world view lat lng) ;; ...)] ;; ;; ...) (define on-geo (make-world-event-handler setup-geo shutdown-geo))
false
6fe049bb1820ab38d6cdd8b677b3029910cf5e42
f05faa71d7fef7301d30fb8c752f726c8b8c77d4
/src/exercises/ex-2.29.rkt
c5f42293623d0011432b410729b1989e25441ad7
[]
no_license
yamad/sicp
c9e8a53799f0ca6f02b47acd23189b2ca91fe419
11e3a59f41ed411814411e80f17606e49ba1545a
refs/heads/master
2021-01-21T09:53:44.834639
2017-02-27T19:32:23
2017-02-27T19:32:23
83,348,438
1
0
null
null
null
null
UTF-8
Racket
false
false
1,807
rkt
ex-2.29.rkt
#lang racket ;; exercise 2.29 (define (make-mobile left right) (list left right)) (define (make-branch length structure) (list length structure)) (define left-branch car) (define right-branch cadr) (define branch-length car) (define branch-structure cadr) (define mobile? list?) (define (total-weight mobile) (+ (branch-weight (left-branch mobile)) (branch-weight (right-branch mobile)))) (define (mobile-balanced? mobile) (let ((l (left-branch mobile)) (r (right-branch mobile))) (and (eq? (branch-torque l) (branch-torque r)) (branch-balanced? l) (branch-balanced? r)))) (define (branch-weight branch) (let ((bs (branch-structure branch))) (if (mobile? bs) (total-weight bs) bs))) (define (branch-torque branch) (* (branch-length branch) (branch-weight branch))) (define (branch-balanced? branch) (let ((bs (branch-structure branch))) (if (mobile? bs) (mobile-balanced? bs) #t))) (define a (make-mobile (make-branch 2 3) (make-branch 2 3))) (define b (make-mobile (make-branch 2 3) (make-branch 4 5))) (define c (make-mobile (make-branch 5 a) (make-branch 3 b))) (define d (make-mobile (make-branch 10 a) (make-branch 12 5))) (total-weight a) "-->" 6 (total-weight b) "-->" 8 (total-weight c) "-->" 14 (total-weight d) "-->" 11 (mobile-balanced? a) (mobile-balanced? b) (mobile-balanced? c) (mobile-balanced? d) ;; if constructors were changed to be: ; ;; (define (make-mobile left right) ;; (cons left right)) ;; (define (make-branch length structure) ;; (cons length structure)) ;; then only the following changes are needed: ; ;; (define right-branch cdr) ;; (define branch-structure cdr)
false
1fa1d19483d80519fb8ccf4d97a28595b2210aa8
300cc032d81929bcfe93246e3f835b52af86a281
/chapter2/exer2.31.rkt
3029ce456657aaec91228b278c22229cc79752dd
[]
no_license
dannyvi/eopl-practice
995aa243c11b0c1daa79c8f8e7521d371b63008d
e5b6d86da18d336e715b740f2c15cfa64f888fcb
refs/heads/master
2020-04-16T09:13:18.386137
2019-03-02T10:06:10
2019-03-02T10:06:10
165,456,239
0
0
null
null
null
null
UTF-8
Racket
false
false
1,172
rkt
exer2.31.rkt
;; Prefix-list ::= (Prefix-exp) ;; Prefix-exp ::= Int ;; ::= - Prefix-exp Prefix-exp ;; (define-datatype prefix-exp prefix-exp? (const-exp (num integer?)) (diff-exp (operand1 prefix-exp?) (operand2 prefix-exp?))) (define parse-prefix-exp (λ (datum) (cond [(number? datum) (const-exp datum)] [(eqv? (car datum) '-) (let ((lst (accum-second (accum-first (cdr datum))))) (diff-exp (car lst) (cadr lst)))]))) (define accum-first (λ (datum) (cond [(number? (car datum)) (cons (const-exp (car datum)) (cdr datum))] [(eqv? (car datum) '-) (let ((lst (accum-second (accum-first (cdr datum))))) (cons (diff-exp (car lst) (cadr lst)) (cddr lst)))]))) (define accum-second (λ (datum) (let ((first-exp (car datum)) (rests (cdr datum))) (cond [(number? (car rests)) (cons first-exp (cons (const-exp (car rests)) (cdr rests)))] [(eqv? (car rests) '-) (let ((lst (accum-second (accum-first (cdr rests))))) (cons first-exp (cons (diff-exp (car lst) (cadr lst)) (cddr lst))))]))))
false
9452c16d092d9b26ae6099e896514c3a5d12fa5b
c0be09e5e66dc4d8704ae29adc198da031cc2117
/stress.rkt
d328ac0428bb0a463600ca344ab7bf536496d10f
[]
no_license
DuttonIndustrial/racket-test
504dcb5a4feb918df1175a902bcb4163c91c343d
201bc47195a798bc0ec237340d2216b046beec8a
refs/heads/master
2021-05-27T23:20:53.430737
2013-01-26T21:18:29
2013-01-26T21:18:29
null
0
0
null
null
null
null
UTF-8
Racket
false
false
928
rkt
stress.rkt
#lang racket/base (require (for-syntax racket/base syntax/parse) "test-api.rkt" "testing.rkt" "registry.rkt") (provide define-stress-test stress-test? stress-desired-run-time) (define (stress-desired-run-time time) (test-log 'desired-runtime time)) (struct stress-test test ()) (register-test-type 'stress "A stress test usually attempts to measure performance under load. Typically the test is considered pass if it runs longer than a specified duration of time." stress-test?) (define-syntax (define-stress-test stx) (syntax-parse stx [(_ name code ...) #`(begin (define name (stress-test 'name #,(path->string (syntax-source stx) ) #,(syntax-line stx) (λ () code ...))) (register-test name))]))
true
e92ff896c434f38a7f646650dc0df253913cca2e
9dc77b822eb96cd03ec549a3a71e81f640350276
/private/printer-markup.rkt
3e0e58be2b09ffe9bf07e987c995fbfe3970797e
[ "Apache-2.0" ]
permissive
jackfirth/rebellion
42eadaee1d0270ad0007055cad1e0d6f9d14b5d2
69dce215e231e62889389bc40be11f5b4387b304
refs/heads/master
2023-03-09T19:44:29.168895
2023-02-23T05:39:33
2023-02-23T05:39:33
155,018,201
88
21
Apache-2.0
2023-09-07T03:44:59
2018-10-27T23:18:52
Racket
UTF-8
Racket
false
false
10,956
rkt
printer-markup.rkt
#lang racket/base (require racket/contract/base) (provide (contract-out [sequence-markup? predicate/c] [sequence-markup (->* ((sequence/c any/c)) (#:indentation exact-nonnegative-integer? #:prefix any/c #:suffix any/c #:inline-separator any/c) sequence-markup?)] [inline-sequence-markup? predicate/c] [inline-sequence-markup (->* ((sequence/c any/c)) (#:prefix any/c #:suffix any/c #:separator any/c) inline-sequence-markup?)] [mode-sensitive-markup? predicate/c] [mode-sensitive-markup (-> #:written-form any/c #:displayed-form any/c #:unquoted-printed-form any/c #:quoted-printed-form any/c mode-sensitive-markup?)] [make-constructor-style-printer-with-markup (-> symbol? (-> any/c (sequence/c any/c)) custom-write-function/c)])) (require racket/pretty racket/sequence rebellion/custom-write rebellion/private/guarded-block) ;@---------------------------------------------------------------------------------------------------- (define default-element-indentation 2) (struct sequence-markup (elements indentation prefix suffix inline-separator) #:omit-define-syntaxes #:constructor-name constructor:sequence-markup #:transparent #:guard (λ (elements indentation prefix suffix inline-separator _) (values (sequence->list elements) indentation prefix suffix inline-separator)) #:methods gen:custom-write [(define/guard (write-proc this out mode) (define elements (sequence-markup-elements this)) (define indentation (sequence-markup-indentation this)) (define prefix (sequence-markup-prefix this)) (define suffix (sequence-markup-suffix this)) (define inline-separator (sequence-markup-inline-separator this)) (define inline (inline-sequence-markup elements #:prefix prefix #:suffix suffix #:separator inline-separator)) (guard (pretty-printing-with-finite-columns?) else (custom-write inline out mode)) (unless (try-pretty-print-single-line inline out mode) (define multiline (multiline-sequence-markup elements #:indentation indentation #:prefix prefix #:suffix suffix)) (custom-write multiline out mode)))]) (define (sequence-markup elements #:indentation [indentation default-element-indentation] #:prefix [prefix (unquoted-printing-string "")] #:suffix [suffix (unquoted-printing-string "")] #:inline-separator [inline-separator (unquoted-printing-string " ")]) (constructor:sequence-markup elements indentation prefix suffix inline-separator)) (struct inline-sequence-markup (elements prefix suffix separator) #:omit-define-syntaxes #:constructor-name constructor:inline-sequence-markup #:transparent #:guard (λ (elements prefix suffix separator _) (values (sequence->list elements) prefix suffix separator)) #:methods gen:custom-write [(define (write-proc this out mode) (define (recur x) (custom-write x out mode #:recursive? #true)) (define elements (inline-sequence-markup-elements this)) (define last-element-index (sub1 (length elements))) (define prefix (inline-sequence-markup-prefix this)) (define suffix (inline-sequence-markup-suffix this)) (define separator (inline-sequence-markup-separator this)) (for ([element (in-list elements)] [i (in-naturals)]) (cond [(zero? i) (recur prefix) (recur element)] [(equal? i last-element-index) (recur separator) (recur element) (recur suffix)] [else (recur separator) (recur element)])))]) (define (inline-sequence-markup elements #:prefix [prefix (unquoted-printing-string "")] #:suffix [suffix (unquoted-printing-string "")] #:separator [separator (unquoted-printing-string " ")]) (constructor:inline-sequence-markup elements prefix suffix separator)) (struct multiline-sequence-markup (elements indentation prefix suffix) #:omit-define-syntaxes #:constructor-name constructor:multiline-sequence-markup #:transparent #:guard (λ (elements indentation prefix suffix _) (values (sequence->list elements) indentation prefix suffix)) #:methods gen:custom-write [(define (write-proc this out mode) (define (recur x) (custom-write x out mode #:recursive? #true)) (define leading-indentation-amount (+ (port-next-column out) (multiline-sequence-markup-indentation this))) (define leading-spaces (make-string leading-indentation-amount #\space)) (define elements (multiline-sequence-markup-elements this)) (define last-element-index (sub1 (length elements))) (define prefix (multiline-sequence-markup-prefix this)) (define suffix (multiline-sequence-markup-suffix this)) (for ([element (in-list elements)] [i (in-naturals)]) (cond [(zero? i) (recur prefix) (recur element)] [(equal? i last-element-index) (pretty-print-newline out (pretty-print-columns)) (write-string leading-spaces out) (recur element) (recur suffix)] [else (pretty-print-newline out (pretty-print-columns)) (write-string leading-spaces out) (recur element)])))]) (define (multiline-sequence-markup elements #:indentation [indentation default-element-indentation] #:prefix [prefix (unquoted-printing-string "")] #:suffix [suffix (unquoted-printing-string "")]) (constructor:multiline-sequence-markup elements indentation prefix suffix)) (struct mode-sensitive-markup (written-form displayed-form unquoted-printed-form quoted-printed-form) #:omit-define-syntaxes #:constructor-name constructor:mode-sensitive-markup #:transparent #:methods gen:custom-write [(define (write-proc this out mode) (define chosen-form (case mode [(#true) (mode-sensitive-markup-written-form this)] [(#false) (mode-sensitive-markup-displayed-form this)] [(0) (mode-sensitive-markup-unquoted-printed-form this)] [(1) (mode-sensitive-markup-quoted-printed-form this)])) (custom-write chosen-form out mode #:recursive? #true))]) (define (mode-sensitive-markup #:written-form written-form #:displayed-form displayed-form #:unquoted-printed-form unquoted-printed-form #:quoted-printed-form quoted-printed-form) (constructor:mode-sensitive-markup written-form displayed-form unquoted-printed-form quoted-printed-form)) (define (unreadable-object-markup printed-string written-string) (define printed-form (unquoted-printing-string printed-string)) (define unreadable-form (unquoted-printing-string written-string)) (mode-sensitive-markup #:written-form unreadable-form #:displayed-form unreadable-form #:unquoted-printed-form printed-form #:quoted-printed-form unreadable-form)) (define constructor-style-opening-delimiter (unreadable-object-markup "(" "#<")) (define constructor-style-closing-delimiter (unreadable-object-markup ")" ">")) (define constructor-style-type-name-suffix (unreadable-object-markup "" ":")) (define (constructor-style-markup type-name contents) (define type-name-markup (inline-sequence-markup (list (unquoted-printing-string (symbol->string type-name)) constructor-style-type-name-suffix) #:separator (unquoted-printing-string ""))) (sequence-markup (sequence-append (list type-name-markup) contents) #:prefix constructor-style-opening-delimiter #:suffix constructor-style-closing-delimiter)) (define ((make-constructor-style-printer-with-markup type-name get-contents) this out mode) (define markup (constructor-style-markup type-name (get-contents this))) (custom-write markup out mode)) (define (pretty-printing-with-finite-columns?) (and (pretty-printing) (integer? (pretty-print-columns)))) ;; Any OutputPort PrintMode -> Boolean ;; Tries to print `v` to the output port on a single line. If `v` takes up more than one line, nothing ;; is printed to `out` and false is returned. If printing succeeds, true is returned. (define (try-pretty-print-single-line v out mode) (let/ec escape (define (on-overflow) ;; We have to cancel the port before escaping instead of after escaping because the ;; tentative-port variable isn't in scope outside the let/ec expression. (tentative-pretty-print-port-cancel tentative-port) ;; We have to escape because make-tentative-pretty-print-output-port calls the overflow thunk ;; *each time* the content exceeds the column limit; it doesn't actually *stop* printing. The ;; only way to stop the print operation while inside the overflow thunk is to escape from the ;; thunk with a continuation jump. (escape #false)) (define tentative-port (make-tentative-pretty-print-output-port out (pretty-print-columns) on-overflow)) ;; If this exceeds the column width, the on-overflow thunk is called which aborts out using the ;; escape continuation. (custom-write v tentative-port mode) ;; If evaluation reaches this point, printing v did not exceed the column limit and we can commit ;; the tentative port's output, sending it to the original port. (tentative-pretty-print-port-transfer tentative-port out) #true)) (define (custom-write v out mode #:recursive? [recursive? #false]) (if recursive? (case mode [(#t) (write v out)] [(#f) (display v out)] [(0 1) (print v out mode)]) ((custom-write-accessor v) v out mode))) (define (port-next-column out) (define-values (unused-line col unused-pos) (port-next-location out)) col) (module+ main (pretty-print (sequence-markup (list "foo" "bar" "baz"))) (pretty-print (sequence-markup (list "foo" "bar" "baz") #:prefix (unquoted-printing-string "[") #:suffix (unquoted-printing-string "]") #:inline-separator (unquoted-printing-string ", "))) (pretty-print (constructor-style-markup 'list (list "foo" "bar" "baz"))) (pretty-print (sequence-markup (list "fooooooooooooooooooooooooooooooooo" "baaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaar" "baaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaz"))) (pretty-print (constructor-style-markup 'multiset (list "fooooooooooooooooooooooooooooooooo" "baaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaar" "baaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaz"))))
true
f18b6e21f6f4fe41427a19d40e082bf981ba7edb
99db0175a634772c2e32687bd28b2d8ca3ba8c0f
/examples/gambling/zd-lottery.rkt
7edd0cfcef55840e158fddd1459fcef87e6326ae
[]
no_license
nau/bitml-compiler
5e6b7373828607de03d9c2c65906784db893d8f0
2d4da73db70bf8d443e456bc78588a7b427c52d5
refs/heads/master
2020-05-22T18:03:10.640036
2019-05-13T15:20:36
2019-05-13T15:20:36
null
0
0
null
null
null
null
UTF-8
Racket
false
false
853
rkt
zd-lottery.rkt
#lang bitml (debug-mode) (participant "A" "029c5f6f5ef0095f547799cb7861488b9f4282140d59a6289fbc90c70209c1cced") (participant "B" "022c3afb0b654d3c2b0e2ffdcf941eaf9b6c2f6fcf14672f86f7647fa7b817af30") (contract (pre (deposit "A" 1 "txA@0")(secret "A" a "7249ab836ec75abf7756aec7528812a86a9f23df") (deposit "B" 1 "txB@0")(secret "B" b "de81500d472e6356185374ac8dc9a60b528b4a67")) (choice (revealif (b) (pred (between b 0 1)) (choice (revealif (a b) (pred (= a b)) (withdraw "A")) (revealif (a b) (pred (!= a b)) (withdraw "B")) (after 10 (withdraw "B")))) (after 10 (withdraw "A"))) (check-liquid) #;(check "A" has-at-least 1 (strategy "A" (do-reveal a))))
false
228a7653e2e4d55954f7545aec26594e064768e0
59bc8c1cf296f49909f6282ab9034908b391b26c
/src/vm-interpreter/vm.rkt
e2eb7e98c379f2003bfa0e57af0857c4df082bad
[]
no_license
gunther-bachmann/6510
cba8a2f28866f2121a35df9d61edecef67b37094
0086e646a5e1f1862f30b5a5f694d163f6236dd1
refs/heads/master
2023-07-27T17:09:44.464179
2023-07-16T17:41:19
2023-07-16T17:41:19
188,591,223
0
0
null
null
null
null
UTF-8
Racket
false
false
18,871
rkt
vm.rkt
#lang racket (require data/pvector) (require (only-in data/collection set-nth nth)) (module+ test #| require test utils |# (require "../6510-test-utils.rkt")) ;; memory of memory pages (struct memory (pages count) #:guard (struct-guard/c pvector? nonnegative-integer?)) ;; generic page (struct page ()) ;; unallocated page will always eq? nil-page (define nil-page (page)) ;; page of 256 byte values (struct byte-page page (data) #:guard (struct-guard/c pvector?)) ;; generic cell type (struct cell (ref-count) ;; ref-count is only kept on cells in the heap, cells on the stack do not have ref-counts! #:transparent #:guard (struct-guard/c byte?)) ;; when putting a cell-ref on the stack, the heap-cell ref-count is incremented, ;; when popping a cell-ref from the stack, the heap-cell ref-count is decremented, ;; when putting a cell-value on the stack no ref-count needs adjustments ;; reference to a cell (struct cell-reference cell () #:transparent) (struct cell-nil-reference cell-reference () #:transparent #:guard (struct-guard/c byte?)) ;; single instance (define nil-reference (cell-nil-reference 0)) (define/contract (nil-ref? a-val-ref) (-> cell-reference? boolean?) (eq? a-val-ref nil-reference)) (module+ test #| nil |# (check-true (nil-ref? nil-reference) "only the defined nil-reference is nil") (check-false (nil-ref? (cell-nil-reference 0)) "another instance of cell-nil-reference is not nil!")) ;; reference to an allocated cell on the heap (struct cell-bound-reference cell-reference (page-no index) #:guard (struct-guard/c byte? nonnegative-integer? byte?)) ;; byte cell (struct byte-cell cell (byte) #:transparent #:guard (struct-guard/c byte? byte?)) ;; int-cell (can store values > 256 but definitely < 65535 to allow for type tag bits in the 16 bit) ;; char-cell = special byte cell? ;; boolean-cell = special byte cell? ;; native-array-ref-cell is special cell-reference (type-info anywhere?) ;; string-cell = special native-array-ref-cell? ;; symbol-cell = special native-array-ref-cell? ;; function/code-ref cell is special cell-reference (type-info anywhere?) ;; float-cell = special cell-reference (type-info anywhere) ;; stack of cells to be operated on (struct eval-stack (cells) #:guard (struct-guard/c (listof cell?))) ;; reference into memory (struct byte-mem-reference (page-no index) #:transparent #:guard (struct-guard/c nonnegative-integer? byte?)) (define/contract (inc-byte-mem-ref a-byte-mem-ref (delta 1)) (->* (byte-mem-reference?) (integer?) byte-mem-reference?) (define page-no (byte-mem-reference-page-no a-byte-mem-ref)) (define new-index-unmodified (+ (byte-mem-reference-index a-byte-mem-ref) delta)) (define new-page-no (cond ((< new-index-unmodified 0) (sub1 page-no)) ((> new-index-unmodified #xff) (add1 page-no)) (#t page-no))) (byte-mem-reference new-page-no (bitwise-and #xff new-index-unmodified))) (module+ test #| inc-pc |# (check-equal? (byte-mem-reference-page-no (inc-byte-mem-ref (byte-mem-reference 5 255) 1)) 6) (check-equal? (byte-mem-reference-index (inc-byte-mem-ref (byte-mem-reference 5 255) 1)) 0) (check-equal? (byte-mem-reference-page-no (inc-byte-mem-ref (byte-mem-reference 5 255) 2)) 6) (check-equal? (byte-mem-reference-index (inc-byte-mem-ref (byte-mem-reference 5 255) 2)) 1) (check-equal? (byte-mem-reference-page-no (inc-byte-mem-ref (byte-mem-reference 5 254) 1)) 5) (check-equal? (byte-mem-reference-index (inc-byte-mem-ref (byte-mem-reference 5 254) 1)) 255) (check-equal? (byte-mem-reference-page-no (inc-byte-mem-ref (byte-mem-reference 5 0) -1)) 4) (check-equal? (byte-mem-reference-index (inc-byte-mem-ref (byte-mem-reference 5 0) -1)) 255) (check-equal? (byte-mem-reference-page-no (inc-byte-mem-ref (byte-mem-reference 5 0) -2)) 4) (check-equal? (byte-mem-reference-index (inc-byte-mem-ref (byte-mem-reference 5 0) -2)) 254) (check-equal? (byte-mem-reference-page-no (inc-byte-mem-ref (byte-mem-reference 5 1) -1)) 5) (check-equal? (byte-mem-reference-index (inc-byte-mem-ref (byte-mem-reference 5 1) -1)) 0)) ;; c-tor (define (make-byte-page) (byte-page (make-pvector 256 0))) ;; write BYTE into A-BYTE-PAGE at INDEX (define/contract (write-byte-into-page a-byte-page index byte) (-> byte-page? byte? byte? byte-page?) (byte-page (set-nth (byte-page-data a-byte-page) index byte))) (define/contract (write-bytes-into-page a-byte-page index bytes) (-> byte-page? byte? (listof byte?) byte-page?) (if (empty? bytes) a-byte-page (write-bytes-into-page (write-byte-into-page a-byte-page index (car bytes)) (add1 index) (cdr bytes)))) (define/contract (memory-set-page mem page-no a-page) (-> memory? nonnegative-integer? page? memory?) (memory (set-nth (memory-pages mem) page-no a-page) (memory-count mem))) ;; write bytes (even over page borders) (define/contract (write-bytes-into-memory mem mem-ref bytes) (-> memory? byte-mem-reference? (listof byte?) memory?) (if (empty? bytes) mem (write-bytes-into-memory (memory-set-page mem (byte-mem-reference-page-no mem-ref) (write-byte-into-page (get-memory-page mem (byte-mem-reference-page-no mem-ref)) (byte-mem-reference-index mem-ref) (car bytes))) (inc-byte-mem-ref mem-ref) (cdr bytes)))) (module+ test #| write-bytes-into-memory |# (define mem-written-over-two-pages (write-bytes-into-memory (alloc-memory-page (alloc-memory-page (make-memory 3) 0 (make-byte-page)) 1 (make-byte-page)) (byte-mem-reference 0 254) '(1 2 3 4))) (check-equal? (read-byte-from-page (get-memory-page mem-written-over-two-pages 0) 254) 1) (check-equal? (read-byte-from-page (get-memory-page mem-written-over-two-pages 0) 255) 2) (check-equal? (read-byte-from-page (get-memory-page mem-written-over-two-pages 1) 0) 3) (check-equal? (read-byte-from-page (get-memory-page mem-written-over-two-pages 1) 1) 4)) ;; read byte from A-BYTE-PAGE at INDEX (define/contract (read-byte-from-page a-byte-page index) (-> byte-page? byte? byte?) (nth (byte-page-data a-byte-page) index)) ;; write BYTE into A-BYTE-PAGE at INDEX (define/contract (write-byte-cell-into-page a-byte-page index a-byte-cell) (-> byte-page? byte? byte-cell? byte-page?) (write-byte-into-page a-byte-page index (byte-cell-byte a-byte-cell))) ;; read byte from A-BYTE-PAGE at INDEX (define/contract (read-byte-cell-from-page a-byte-page index) (-> byte-page? byte? byte-cell?) (byte-cell 0 (read-byte-from-page a-byte-page index))) (module+ test #| write-byte, read-byte |# (check-equal? (read-byte-from-page (write-byte-into-page (make-byte-page) 5 #x20) 5) #x20 "written byte can be read from byte-page")) ;; make/init a memory of TOTAL-PAGE-NO (define (make-memory total-page-no) (-> nonnegative-integer? memory?) (memory (make-pvector total-page-no nil-page) total-page-no)) ;; get the page at NO from the memory (define (get-memory-page memory no) (-> memory? nonnegative-integer? page?) (nth (memory-pages memory) no)) ;; free the page at NO of the memory (define (free-memory-page a-memory no) (-> memory? nonnegative-integer? memory?) (memory-set-page a-memory no nil-page)) ;; allocate this PAGE at NO on the memory (define (alloc-memory-page a-memory no page) (-> memory? nonnegative-integer? page? memory?) (unless (eq? (get-memory-page a-memory no) nil-page) (raise-user-error "cannot (re)allocate, page already allocated")) (memory-set-page a-memory no page)) (module+ test #| allocate, get, free-memory-page |# (check-true (byte-page? (get-memory-page (alloc-memory-page (make-memory 256) #xC0 (make-byte-page)) #xC0)) "allocating a byte page ensures that get will return this byte page") (check-eq? (get-memory-page (make-memory 256) #xC0) nil-page "unallocated pages eq nil-page") (check-eq? (get-memory-page (free-memory-page (alloc-memory-page (make-memory 256) #xC0 (make-byte-page)) #xC0) #xC0) nil-page "allocated, then freed pages eq nil-page (again)")) ;; write A-cell into A-cell-REF using/within A-memory (define/contract (write-into-cell-ref a-memory a-cell-ref a-cell) (-> memory? cell-bound-reference? cell? memory?) (define vpage (get-memory-page a-memory (cell-bound-reference-page-no a-cell-ref))) (cond ((and (byte-cell? a-cell) (byte-page? vpage)) (memory-set-page a-memory (cell-bound-reference-page-no a-cell-ref) (write-byte-into-page vpage (cell-bound-reference-index a-cell-ref) (byte-cell-byte a-cell)))) (#t (raise-user-error "memory page not matching cell or unknown implementation")))) ;; push A-cell onto A-eval-stack (define/contract (push-cell a-eval-stack a-cell) (-> eval-stack? cell? eval-stack?) (eval-stack (cons a-cell (eval-stack-cells a-eval-stack)))) ;; write the top of A-eval-stack into A-cell-REF using/within A-memory (define/contract (tos-cell-into a-memory a-eval-stack a-cell-ref) (-> memory? eval-stack? cell-bound-reference? memory?) (write-into-cell-ref a-memory a-cell-ref (car (eval-stack-cells a-eval-stack)))) ;; pop the top from A-eval-stack (define/contract (pop-cell a-eval-stack) (-> eval-stack? eval-stack?) (eval-stack (cdr (eval-stack-cells a-eval-stack)))) ;; get the cell of the top of A-eval-stack (define/contract (top-of-stack-cell a-eval-stack) (-> eval-stack? cell?) (car (eval-stack-cells a-eval-stack))) (module+ test #| push-cell, pop-cell, top-of-stack-cell, pop-cell-into |# (check-equal? (byte-cell-byte (top-of-stack-cell (push-cell (eval-stack '()) (byte-cell 0 #xCD)))) #xCD) (check-equal? (byte-cell-byte (top-of-stack-cell (push-cell (push-cell (eval-stack '()) (byte-cell 0 #xCD)) (byte-cell 0 #x23)))) #x23) (check-equal? (byte-cell-byte (top-of-stack-cell (pop-cell (push-cell (push-cell (eval-stack '()) (byte-cell 0 #xCD)) (byte-cell 0 #x23))))) #xCD)) (module+ test #| write-into-cell-ref |# (check-equal? (read-byte-from-page (get-memory-page (write-into-cell-ref (alloc-memory-page (make-memory 2) 1 (make-byte-page)) (cell-bound-reference 0 1 100) (byte-cell 0 #x37)) 1) 100) #x37)) ;; skeleton definitions (without implementation ;; dereference A-cell-REFERENCE (define (dereference-cell a-memory a-cell-reference) (-> memory? cell-bound-reference? cell?) (define page (get-memory-page a-memory (cell-bound-reference-page-no a-cell-reference))) (cond ((byte-page? page) (read-byte-cell-from-page page (cell-bound-reference-index a-cell-reference))) (#t (raise-user-error "unknown memory page type")))) (module+ test #| dereference-cell |# (check-equal? (byte-cell-byte (dereference-cell (write-into-cell-ref (alloc-memory-page (make-memory 2) 1 (make-byte-page)) (cell-bound-reference 0 1 100) (byte-cell 0 #x37)) (cell-bound-reference 0 1 100))) #x37)) (define/contract (deref-pc a-mem a-pc (rel 0)) (->* (memory? byte-mem-reference?) (integer?) byte?) (define real-pc (inc-byte-mem-ref a-pc rel)) (define page (get-memory-page a-mem (byte-mem-reference-page-no real-pc))) (nth (byte-page-data page) (byte-mem-reference-index real-pc))) (module+ test #| deref-pc |# (check-equal? (deref-pc (alloc-memory-page (make-memory 10) 5 (write-bytes-into-page (make-byte-page) 2 '(#x21 #x4e #xc3))) (byte-mem-reference 5 3)) #x4e) (check-equal? (deref-pc (alloc-memory-page (make-memory 10) 5 (write-bytes-into-page (make-byte-page) 2 '(#x21 #x4e #xc3))) (byte-mem-reference 5 3) 1) #xc3) (check-equal? (deref-pc (alloc-memory-page (make-memory 10) 5 (write-bytes-into-page (make-byte-page) 2 '(#x21 #x4e #xc3))) (byte-mem-reference 5 3) -1) #x21)) (struct env (map-stack) #:guard (struct-guard/c (listof hash?))) (define/contract (env-push-frame an-env a-map) (-> env? hash? env?) (env (cons a-map (env-map-stack an-env)))) (define/contract (env-pop-frame an-env) (-> env? env?) (env (cdr (env-map-stack an-env)))) (define/contract (env-resolve an-env key) (-> env? any/c cell?) (if (empty? (env-map-stack an-env)) nil-reference (let ((top-frame (car (env-map-stack an-env)))) (cond ((hash-has-key? top-frame key) (hash-ref top-frame key)) (#t (env-resolve (env (cdr (env-map-stack an-env))) key)))))) (module+ test #| env |# (check-eq? (env-resolve (env '()) 'unknown-key) nil-reference) (check-true (nil-ref? (env-resolve (env '()) 'unknown-key))) (check-equal? (byte-cell-byte (env-resolve (env-push-frame (env '()) (hash 'some-key (byte-cell 0 #x3e))) 'some-key)) #x3e) (check-equal? (byte-cell-byte (env-resolve (env-push-frame (env-push-frame (env '()) (hash 'some-key (byte-cell 0 #x73))) (hash 'some-key (byte-cell 0 #x3e))) 'some-key)) #x3e "second frame shadows key with its cell") (check-equal? (byte-cell-byte (env-resolve (env-pop-frame (env-push-frame (env-push-frame (env '()) (hash 'some-key (byte-cell 0 #x73))) (hash 'some-key (byte-cell 0 #x3e)))) 'some-key)) #x73 "some key is no longer shadowed by second frame (since it is popped)")) (struct call-stack (code-references) #:guard (struct-guard/c (listof byte-mem-reference?))) (define/contract (call-stack-push-pc a-call-stack a-pc) (-> call-stack? byte-mem-reference? call-stack?) (call-stack (cons a-pc (call-stack-code-references a-call-stack)))) (define/contract (call-stack-pop a-call-stack a-pc) (-> call-stack? byte-mem-reference? call-stack?) (call-stack (cdr (call-stack-code-references a-call-stack)))) (define/contract (call-stack-get-return a-call-stack) (-> call-stack? byte-mem-reference?) (car (call-stack-code-references a-call-stack))) (struct vm-state (eval-stack ;; cell stack call-stack ;; stack with return addresses memory ;; pages env ;; nested environments of int|key->cell (references) pc) ;; current program counter (index into memory) #:guard (struct-guard/c eval-stack? call-stack? memory? env? byte-mem-reference?)) (define vm-op-codes (hash #x00 'break ;; no operand #x01 'push_b ;; byte cell #x02 'pop ;; #x03 'add)) ;; pop 2 cells, add them, then push (define vm-code-ops (apply hash (flatten (map (lambda (pair) (list (cdr pair) (car pair))) (hash->list vm-op-codes))))) (define/contract (vm-interpret-push_b a-vm) (-> vm-state? vm-state?) (struct-copy vm-state a-vm [eval-stack (push-cell (vm-state-eval-stack a-vm) (byte-cell 0 (deref-pc (vm-state-memory a-vm) (vm-state-pc a-vm) 1)))] [pc (inc-byte-mem-ref (vm-state-pc a-vm) 2)])) (define/contract (vm-interpret-pop a-vm) (-> vm-state? vm-state?) (struct-copy vm-state a-vm [eval-stack (pop-cell (vm-state-eval-stack a-vm))] [pc (inc-byte-mem-ref (vm-state-pc a-vm))])) (define/contract (vm-interpret-add a-vm) (-> vm-state? vm-state?) (define val-a (top-of-stack-cell (vm-state-eval-stack a-vm))) (define stack1 (pop-cell (vm-state-eval-stack a-vm))) (define val-b (top-of-stack-cell stack1)) (define stack2 (pop-cell stack1)) (define result (bitwise-and #xff (+ (byte-cell-byte val-a) (byte-cell-byte val-b)))) (struct-copy vm-state a-vm [eval-stack (push-cell stack2 (byte-cell 0 result))] [pc (inc-byte-mem-ref (vm-state-pc a-vm))])) ;; create a virtual machine with just page 0 being allocated as byte page (define/contract (make-vm) (-> vm-state?) (vm-state (eval-stack '()) (call-stack '()) (alloc-memory-page (make-memory #xff) 0 (make-byte-page)) (env '()) (byte-mem-reference 0 0))) ;; load the given code into the vm (define/contract (load-initial-code a-vm bytes (mem-ref (byte-mem-reference 0 0))) (->* (vm-state? (listof (or/c symbol? byte?))) (byte-mem-reference?) vm-state?) (define real-bytes (map (lambda (b-or-s) (cond ((symbol? b-or-s) (hash-ref vm-code-ops b-or-s)) (#t b-or-s))) bytes)) (struct-copy vm-state a-vm [memory (write-bytes-into-memory (vm-state-memory a-vm) mem-ref real-bytes)] [pc mem-ref])) ;; run the current vm until a break instruction is encountered (define/contract (run-vm a-vm) (-> vm-state? vm-state?) (define instruction (deref-pc (vm-state-memory a-vm) (vm-state-pc a-vm))) (define instruction-symbol (hash-ref vm-op-codes instruction)) (cond ((eq? 'break instruction-symbol) a-vm) ((eq? 'push_b instruction-symbol) (run-vm (vm-interpret-push_b a-vm))) ((eq? 'pop instruction-symbol) (run-vm (vm-interpret-pop a-vm))) ((eq? 'add instruction-symbol) (run-vm (vm-interpret-add a-vm))) (#t (raise-user-error "unknown opcode ~a" instruction-symbol)))) (module+ test #| vm |# (check-equal? (byte-cell-byte (top-of-stack-cell (vm-state-eval-stack (run-vm (load-initial-code (make-vm) '(push_b #x10 push_b #x12 add break) (byte-mem-reference 0 2)))))) #x22))
false
14dbc9e5faf8b11c86fcf54347fd78d947374d52
22ea683dd151d634c63f73fc459b7f48af6d9dba
/custom-syntax-format/tests/custom-syntax-format/example-forms.rkt
b179974d7be3f4fb230643e7bbf657ae1e339b63
[ "Apache-2.0", "MIT" ]
permissive
shhyou/racket-formatting
c069200668938a3ce002fb3f4a00f0547928d754
7f02ea9c92e92d2235abacca06650f4b4bf8cb32
refs/heads/main
2023-07-30T18:20:12.899496
2021-09-17T17:44:32
2021-09-17T17:44:32
null
0
0
null
null
null
null
UTF-8
Racket
false
false
7,991
rkt
example-forms.rkt
#lang at-exp racket/base (require rackunit custom-syntax-format/syntax custom-syntax-format/example-forms) (provide (all-defined-out)) (define my-cond-stx.1 #'(my-cond (#f "false") [(< 10 5) "a"] (#t "b") (else #f) )) (define my-cond-expected.1 @string-append{ (my-cond [#f "false"] [(< 10 5) "a"] [#t "b"] [else #f]) }) (module+ test (check-equal? (racket-format my-cond-stx.1) my-cond-expected.1)) (define my-cond-stx.2 #'(my-cond ((my-cond ((not #f) 'is-true))) (else #f))) (define my-cond-expected.2 @string-append{ (my-cond [(my-cond [(not #f) 'is-true])] [else #f]) }) (module+ test (check-equal? (racket-format my-cond-stx.2) my-cond-expected.2)) (define my-cond-stx.3 #'(my-cond (#t "ans1" "answer2" 'answer3 (hash 'answer4 #t)) (else #t))) (define my-cond-expected.3 @string-append{ (my-cond [#t "ans1" "answer2" 'answer3 (hash 'answer4 #t)] [else #t]) }) (module+ test (check-equal? (racket-format my-cond-stx.3) my-cond-expected.3)) (define my-cond-stx.4 #'(my-cond ((+ 5 3) 'ok) (else #t))) (define my-cond-expected.4 @string-append{ (my-cond [(+ 5 3) 'ok] [else #t]) }) (module+ test (check-equal? (racket-format my-cond-stx.4) my-cond-expected.4)) (define my-cond-stx.5 #'(my-cond ((+ 5 3) 'ok) (else #t))) (define my-cond-expected.5 @string-append{ (my-cond [(+ 5 3) 'ok] [else #t]) }) (module+ test (check-equal? (racket-format my-cond-stx.5) my-cond-expected.5)) (define my-cond-stx.6 #'(my-cond ( "Q" 'ok) (else #t))) (define my-cond-expected.6 @string-append{ (my-cond ["Q" 'ok] [else #t]) }) (module+ test (check-equal? (racket-format my-cond-stx.6) my-cond-expected.6)) (define my-cond-stx.7 #'(my-cond (#f "false") [(< 10 5) "a"] (#t "b") (else #f) )) (define my-cond-expected.7 @string-append{ (my-cond [#f "false"] [(< 10 5) "a"] [#t "b"] [else #f]) }) (module+ test (check-equal? (racket-format my-cond-stx.7) my-cond-expected.7)) (define my-cond-stx.8 #'(my-cond ((> 2 1) #t) (#f 'false))) (define my-cond-expected.8 @string-append{ (my-cond [(> 2 1) #t] [#f 'false]) }) (module+ test (check-equal? (racket-format my-cond-stx.8) my-cond-expected.8)) (define my-let-stx.1 #'(my-let ([a 10] [b 5] [c 20]) (+ a b c))) (define my-let-expected.1 @string-append{ (my-let ([a 10] [b 5] [c 20]) (+ a b c)) }) (module+ test (check-equal? (racket-format my-let-stx.1) my-let-expected.1)) (define my-let-stx.2 #'(my-let ([a 10] [b 5] [c 20]) (+ a b c))) (define my-let-expected.2 @string-append{ (my-let ([a 10] [b 5] [c 20]) (+ a b c)) }) (module+ test (check-equal? (racket-format my-let-stx.2) my-let-expected.2)) (define my-let-stx.3 #'(my-let ([a 10] [b 5] [c (* 7 3)]) (+ a b c))) (define my-let-expected.3 @string-append{ (my-let ([a 10] [b 5] [c (* 7 3)]) (+ a b c)) }) (module+ test (check-equal? (racket-format my-let-stx.3) my-let-expected.3)) (define my-let-stx.4 #'(my-let ([a 10] [b 5] [c (* 7 3)]) (+ a b c))) (define my-let-expected.4 @string-append{ (my-let ([a 10] [b 5] [c (* 7 3)]) (+ a b c)) }) (module+ test (check-equal? (racket-format my-let-stx.4) my-let-expected.4)) (define my-arrow-star-stx.0 #'(my:->* ( ) number?)) (define my-arrow-star-expected.0 @string-append{ (my:->* () number?) }) (module+ test (check-equal? (racket-format my-arrow-star-stx.0) my-arrow-star-expected.0)) (define (is-odd-number? value) (and (integer? value) (odd? value))) (define my-arrow-star-stx.0.5 #'(my:->* ( ) is-odd-number?)) (define my-arrow-star-expected.0.5 @string-append{ (my:->* () is-odd-number?) }) (module+ test (check-equal? (racket-format my-arrow-star-stx.0.5) my-arrow-star-expected.0.5)) (define my-arrow-star-stx.1 #'(my:->* ( ) any)) (define my-arrow-star-expected.1 @string-append{ (my:->* () any) }) (module+ test (check-equal? (racket-format my-arrow-star-stx.1) my-arrow-star-expected.1)) (define my-arrow-star-stx.2 #'(my:->* (number? (or/c #f (listof string?))) (values number? string?))) (define my-arrow-star-expected.2 @string-append{ (my:->* (number? (or/c #f (listof string?))) (values number? string?)) }) (module+ test (check-equal? (racket-format my-arrow-star-stx.2) my-arrow-star-expected.2)) (define my-arrow-star-stx.3 #'(my:->* ( (my:->* (boolean?) any) ) (values any/c))) (define my-arrow-star-expected.3 @string-append{ (my:->* ((my:->* (boolean?) any)) (values any/c)) }) (module+ test (check-equal? (racket-format my-arrow-star-stx.3) my-arrow-star-expected.3)) (define my-arrow-star-stx.4 #'(my:->* (number? (-> any)) ((or/c #f (listof string?)) (-> any)) (values number? string?))) (define my-arrow-star-expected.4 @string-append{ (my:->* (number? (-> any)) ((or/c #f (listof string?)) (-> any)) (values number? string?)) }) (module+ test (check-equal? (racket-format my-arrow-star-stx.4) my-arrow-star-expected.4)) (define my-arrow-stx.0 #'(my:-> integer? integer? boolean?)) (define my-arrow-expected.0 @string-append{ (my:-> integer? integer? boolean?) }) (module+ test (check-equal? (racket-format my-arrow-stx.0) my-arrow-expected.0)) (define my-arrow-stx.1 #'(my:-> integer? (values any/c boolean?))) (define my-arrow-expected.1 @string-append{ (my:-> integer? (values any/c boolean?)) }) #| (module+ test (check-equal? (racket-format my-arrow-stx.1) my-arrow-expected.1)) |# (define my-arrow-stx.2 #'(my:-> (or/c 'apple 'orange 'pear 'cherry 'lemon 'pineapple) integer?)) (define my-arrow-expected.2 @string-append{ (my:-> (or/c 'apple 'orange 'pear 'cherry 'lemon 'pineapple) integer?) }) #| (module+ test (check-equal? (racket-format my-arrow-stx.2) my-arrow-expected.2)) |# (define my-arrow-stx.3 #'(my:-> (my:-> (or/c 'apple 'orange 'pear 'cherry 'lemon 'pineapple) integer?) integer?)) (define my-arrow-expected.3 @string-append{ (my:-> (my:-> (or/c 'apple 'orange 'pear 'cherry 'lemon 'pineapple) integer?) integer?) }) #| (module+ test (check-equal? (racket-format my-arrow-stx.3) my-arrow-expected.3)) |# (define my-arrow-stx.4 #'(my:-> string? (or/c 'apple 'orange) (or/c 'lemon 'pineapple) integer?)) (define my-arrow-expected.4 @string-append{ (my:-> string? (or/c 'apple 'orange) (or/c 'lemon 'pineapple) integer?) }) #| (module+ test (check-equal? (racket-format my-arrow-stx.4) my-arrow-expected.4)) |#
false
01bc02d05f9ea195d1310ee024f419aa2b9d94f3
36b67d891de05fc7712423acbff5c5256f1dd94d
/info.rkt
d9cdf58188086822a71479076133ab2612b57524
[ "Apache-2.0" ]
permissive
jackfirth/db-connect
ccc98aaf37ab3875d86cb11c1b48d388469068b3
3620a35069e01ed90bab56c95b77e11863b08078
refs/heads/master
2021-01-12T04:18:57.567837
2017-03-05T01:42:09
2017-03-05T01:42:09
77,583,309
0
0
null
2017-03-05T01:42:10
2016-12-29T04:44:32
Racket
UTF-8
Racket
false
false
446
rkt
info.rkt
#lang info (define collection "db") (define scribblings '(("scribblings/main.scrbl" () (library) "db-connect"))) (define deps '("db-lib" "mock" ("base" #:version "6.5"))) (define build-deps '("retry" "db-doc" "mock-rackunit" "racket-doc" "rackunit-lib" "scribble-lib" "scribble-text-lib"))
false
d0e79d5da16e20c015667516fdfd441fb2ffe7a0
3484de8607a395837bdf1f3d2d2b26bc26469971
/provide.rkt
b029acc23166c33a50d678fae0f01a9576dda1b9
[]
no_license
greghendershott/bluebox
66cdce7f591ffc3a6ee82eb134cf43c3b5f378c1
761c4d4ce034af65024edfb0c02c04d948ce535b
refs/heads/master
2016-09-07T17:59:24.374123
2015-12-05T17:07:37
2015-12-05T17:07:37
22,863,057
2
0
null
null
null
null
UTF-8
Racket
false
false
1,127
rkt
provide.rkt
#lang racket (define-syntax-rule (define-define id) (define (id) 0)) (define-define dd) (define-syntax-rule (d/p/c (id arg ...) contract e ...) (begin (define (id arg ...) e ...) (provide (contract-out [id contract])))) (d/p/c (dpc x) (-> any/c any) #t) (define (f x) "Here's an optional doc string. It can be multiple lines, of course." 0) (define (fd x [d0 0]) 0) (provide fd) (define (kw a b c [d0 0] [d1 1] #:kw kw) (+ 1 0)) (provide kw) (define (-r x) 0) (provide (rename-out [-r r])) (define/contract (dc x #:kw kw) (-> integer? #:kw integer? any) 0) (provide dc) (define (pc) 0) (provide (contract-out [pc (-> any)])) (define (-pcr) 0) (provide (contract-out [rename -pcr pcr (-> any)])) (define/contract (rest x . xs) (->* (integer?) () #:rest integer? integer?) 0) (define/contract (foo r0 r1 #:kw kw [opt0 (list 0)] #:kwopt [kwopt (list 1)]) (->* (integer? string? #:kw boolean?) (list? #:kwopt list?) integer?) 0) (define (bar [x 0]) 0)
true
e5b709cc14d5b26bb59dfa73e852a223d441c536
6d4b064fb5dd57dd6cbdfe2d27c1103faa05b8f6
/closure-to-define.rkt
9ab413b77edfc4253665b9c23740f7a04c4d76b7
[]
no_license
KasoLu/mtr
6321734dce0d932371d34a5a687e98915541728b
f3ba7cac85820c4d8d6722eae29fe2dd38fbcdb1
refs/heads/master
2022-11-28T13:11:41.276572
2020-01-20T10:33:05
2020-01-20T10:34:51
286,476,293
1
0
null
null
null
null
UTF-8
Racket
false
false
2,210
rkt
closure-to-define.rkt
#lang racket (provide (rename-out [ast:pgm closure-to-define])) (require "helper.rkt") (define ast:pgm (match-lambda [`(program ,pi . ,def+) (parameterize ([$def-rcd/cur (list)] [$fv*-rcd/cur (list)]) (let ([f+ (map define->name def+)]) (let ([def+ (map (curry ast:def f+) def+)]) `(program ,pi ,@(append ($def-rcd/cur) def+)))))])) (define ast:def (lambda (f+ def) (match def [`(define (,f . ,v*) ,e) (let ([clsp (gensym 'clsp)]) `(define (,f ,clsp . ,v*) ,(ast:exp f+ v* clsp e)))]))) (define ast:exp (lambda (f+ v* clsp expr) (let ([recur (curry ast:exp f+ v* clsp)]) (match expr [`(typed ,(? symbol? v) ,t) (if (memq v f+) `(vector (typed (fun-ref ,v) _)) (let ([expr (if (proc-type? t) `(typed ,v (Vector ...)) expr)]) (begin (unless (memq v v*) ($fv*-rcd/add expr)) expr)))] [`(lambda ,v* ,eb) (parameterize ([$fv*-rcd/cur (list)]) (let ([lmd (gensym 'lmd)] [clsp (gensym 'clsp)]) (let ([eb (ast:exp f+ v* clsp eb)] [fv* ($fv*-rcd/cur)]) ($def-rcd/add `(define (,lmd ,clsp . ,v*) ,(expand-fv* fv* clsp eb))) `(vector (typed (fun-ref ,lmd) _) . ,(reverse fv*)))))] [`(let ([,v ,ee]) ,eb) `(let ([,v ,(recur ee)]) ,(ast:exp f+ (cons v v*) clsp eb))] [`(app ,e1 . ,e*) (let ([fun (gensym 'fun)]) `(let ([,fun ,(recur e1)]) (app (vector-ref (typed ,fun (Vector ...)) 0) (typed ,fun (Vector ...)) . ,(map recur e*))))] [`(,op . ,e*) `(,op . ,(map recur e*))] [_(% expr)])))) (define $fv*-rcd/cur (make-parameter (void))) (define $fv*-rcd/add (lambda (fv) ($fv*-rcd/cur (cons fv ($fv*-rcd/cur))))) (define $def-rcd/cur (make-parameter (void))) (define $def-rcd/add (lambda (def) ($def-rcd/cur (cons def ($def-rcd/cur))))) (define expand-fv* (lambda (fv* clsp expr) (if (empty? fv*) expr (expand-fv* (cdr fv*) clsp `(let ([,(typed->expr (car fv*)) (vector-ref ,clsp ,(length fv*))]) ,(% expr))))))
false
5ca2d0d3fefcdfe009f95947b790525fa7561388
d17943098180a308ae17ad96208402e49364708f
/platforms/js-vm/private/bootstrap/autos.rkt
5179b5798cc30a06b16b819c94a5d4428e232157
[]
no_license
dyoo/benchmark
b3f4f39714cc51e1f0bc176bc2fa973240cd09c0
5576fda204529e5754f6e1cc8ec8eee073e2952c
refs/heads/master
2020-12-24T14:54:11.354541
2012-03-02T19:40:48
2012-03-02T19:40:48
1,483,546
1
0
null
null
null
null
UTF-8
Racket
false
false
2,084
rkt
autos.rkt
#lang s-exp "../lang/wescheme.rkt" (provide make-auto auto? auto-model auto-hp auto-rims auto-color auto-cost car1 paint-job turbo-charge draw-auto) ; an auto is a (make-auto String Number Number String Number) (define-struct auto (model hp rims color cost)) ; define your cars here (define car1 (make-auto "M5" 480 22 "black" 50000)) ; expensive?: Auto -> Boolean ; does the car cost more than $30,000? ; cool? : Auto -> Boolean ; is the car the right color, with enough horsepower? ; paint-job : Auto String -> Auto ; produce an identical car with a new color (define (paint-job a color) (make-auto (auto-model a) (auto-hp a) (auto-rims a) color (auto-cost a))) ; turbo-charge: Auto -> Auto ; add another 20HP to the Auto (define (turbo-charge a) (make-auto (auto-model a) (+ (auto-hp a) 20) (auto-rims a) (auto-color a) (auto-cost a))) ;; test (EXAMPLE (paint-job car1 "purple") (make-auto "M5" 480 22 "purple" 50000)) ;;----------------------- ; draw-car: Auto -> Scene (define (draw-auto a) (place-image (rectangle 130 50 "solid" (auto-color a)) 130 50 (place-image (circle (auto-rims a) "solid" "silver") 210 110 (place-image (circle (auto-rims a) "solid" "silver") 90 110 (place-image (circle 30 "solid" "black") 210 110 (place-image (circle 30 "solid" "black") 90 110 (place-image (rectangle 220 60 "solid" (auto-color a)) 150 90 (empty-scene 300 150))))))))
false
0390efa7c89859fd5970a98cea4d5e1b3fa097cb
f19259628cd30021f354f1326e946e1fb9dfa701
/src/variable.rkt
f32144826be51bb7b69debc1c5e6cebee26845bb
[]
no_license
anthonyquizon/ckanren
1cfd6b65894e8f174a45848a98ca4bf612f418c7
53b69e3ef2d95ae74714cfe15f077914ce298c8e
refs/heads/master
2021-07-23T13:49:08.318957
2017-10-27T01:08:38
2017-10-27T01:08:38
null
0
0
null
null
null
null
UTF-8
Racket
false
false
954
rkt
variable.rkt
#lang racket (require (prefix-in u: "./util.rkt")) (provide var var? any/var? any-relevant/var? recover/vars (rename-out [eq-var? eq?]) ext/vars) (define (var dummy) (vector dummy)) (define (var? x) (vector? x)) (define (eq-var? x1 x2) (= (vector-ref x1 0) (vector-ref x2 0))) (define (any/var? t) (cond [(var? t) #t] [(pair? t) (or (any/var? (car t)) (any/var? (cdr t)))] [else #f])) (define (any-relevant/var? t x*) (cond [(var? t) (memq t x*)] [(pair? t) (or (any-relevant/var? (car t) x*) (any-relevant/var? (cdr t) x*))] [else #f])) (define (recover/vars p) (cond [(null? p) '()] [else (let [(x (u:lhs (car p))) (v (u:rhs (car p))) (r (recover/vars (cdr p)))] (cond [(var? v) (ext/vars v (ext/vars x r))] [else (ext/vars x r)]))])) (define (ext/vars x r) (cond [(memq x r) r] [else (cons x r)]))
false
2e67640d2b9b3dabb08ecee4740972c92ecd55bc
a2ea4dbcc000a056c5a69ef175aec6eafd90226e
/entish-lib/main.rkt
9a970a0f81f9400b20198ca3f8f31c49d240c8d5
[]
no_license
jarnaldich/entish
fe9b77fe7d0a35c2c9e65d9cd5e02a26703aa364
bfcd8472c495546bd29bf17ad64265c9e32e3f86
refs/heads/master
2021-07-25T15:19:03.551189
2021-06-23T09:38:59
2021-06-23T09:38:59
2,417,601
0
0
null
null
null
null
UTF-8
Racket
false
false
236
rkt
main.rkt
#lang racket/base ;; Require looks for a main.rkt module in a collection, so this is the default expected import (require "builtins.rkt" "macros.rkt") (provide (all-from-out "macros.rkt" "builtins.rkt"))
false
de7dea2cae0e4e85dfce30d1682297bec2b1b20b
631764b5f40576a6857e7d31d207a5ece7ccba43
/Scheme/Lists-And-Multiple-Arguments/min-max.rkt
371680fd6e91009c7a21d821b36281710f464c5a
[]
no_license
Ralitsa-Vuntsova/fp
ea37a40aaf3c42a70a1abc5fdb6736b875393543
7cca3819079de98108c70aed4d79f42c1fc294cc
refs/heads/main
2023-06-07T03:24:18.405190
2021-06-28T15:59:34
2021-06-28T15:59:34
381,085,860
0
0
null
null
null
null
UTF-8
Racket
false
false
82
rkt
min-max.rkt
(define (minimum lst) (apply min lst)) (define (maximum lst) (apply max lst))
false
f4668c8e3fc798970f9f94133907b5900f8ec2e8
127fa2b7f986461986422f170702231de671f81f
/db-source.rkt
5a8973f54880ea891eeef3892c73abb0a948ded5
[]
no_license
leanthonyrn/racket-db
4dc22189f44a57d28fd2536a6f5968f49b2da6e2
acaae9bfce685bd44e2a057c4864136edb22867c
refs/heads/master
2021-01-22T13:42:12.572470
2011-07-28T17:09:00
2011-07-28T17:09:00
32,238,081
0
0
null
null
null
null
UTF-8
Racket
false
false
15,129
rkt
db-source.rkt
#lang racket (require syntax/parse (for-syntax syntax/parse)) (require rackunit) (require rackunit/text-ui) (require "hash-remaps.rkt") (require "db-data.rkt") (require (for-syntax "stx-classes.rkt")) (provide (all-defined-out)) (define-namespace-anchor current) ;; macros (define-syntax to-string (syntax-rules () [(_ vals ...) (with-output-to-string (λ () (display vals) ...))])) ; ; ; ; ; ;; ;;;;; ;;;;; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ;;;; ; ; ;;; ; ; ; ; ; ; ; ; ;;; ;;; ;;; ;;;;; ; ; ; ; ;; query ;; --------------------------------------------------------------------------------------------------- (define-syntax (query-mac stx) (syntax-parse stx #:literals (select join) [(_ db (select (whats ...) from)) #'(select db (list whats ...) from (const #t))] [(_ db (select (whats ...) from w:whn)) #'(select db (list whats ...) from w.func)] [(_ db (join (from1 from2) in)) #'(join db from1 from1 in (const #t))] [(_ db (join (from1 from2) in w:whn)) #'(join db from1 from1 in (attribute w.func))])) ;; Database [Listof fieldnames] tablename [Record -> Any] -> Query ;; queries the DB for selected info (define (select db whats from when) (define tbl (hash-ref (database-raw db) from)) (query (for/list ([rcrd (table-raw tbl)] #:when (when rcrd)) (record (make-hash (for/list ([(key val) (record-raw rcrd)] #:when (or (empty? whats) (member key whats))) (cons key val))))))) ;; Database [Listof Tablenames] Fieldname [Record -> Any] -> Query ;; joins two tables in the DB (define (join db from1 from2 on when) (define v1 (table-raw (hash-ref (database-raw db) from1))) (define v2 (table-raw (hash-ref (database-raw db) from2))) (query (for*/list ([r1 v1] [r2 v2] #:when (and (equal? (hash-ref (record-raw r1) on) (hash-ref (record-raw r2) on)) (and (when r1) (when r2)))) (let ([r2/1 (hash-copy (record-raw r2))]) (hash-remove! r2/1 on) (record (hash!-append (record-raw r1) r2/1)))))) ;; hash hash -> hash ;; appends two hashes (define (hash!-append h1 h2) (define ret (hash-copy h1)) (for ([(key val) h2]) (hash-set! ret key val))) ;; effect (insert,delete, create) ;; --------------------------------------------------------------------------------------------------- (define-syntax (effect stx) (syntax-parse stx #:literals (insert #;delete create drop #;update) [(_ db (create name (fields ...))) #'(create db name (list fields ...))] [(_ db (drop table)) #'(drop db table)] [(_ db (insert (values ...) table-name)) #'(insert db table-name (list values ...))])) ;; update ;; Database TableName [Listof values] -> (void) ;; inserts a record in to the given table with the given values (define (insert db tbl values) (let* ([tbl (hash-ref (database-raw db) tbl)] [l (table-raw tbl)]) (set-table-raw! tbl (cons (record (make-hash (for/list ([fname (table-fields tbl)] [v values]) (cons fname v)))) l)))) ;; delete ;; Database TableName [listof symbols] -> (void) ;; creates a new table in db with the corresponding tables (define (create db tbl-name fields) (hash-set! (database-raw db) tbl-name (table fields (list)))) ;; Database TableName -> (void) ;; drops the given table (define (drop db tbl-name) (hash-remove! (database-raw db) tbl-name)) ; ; ; ; ; ;;; ;;; ; ;; ; ; ; ; ; ; ; ; ;;;;; ;;; ; ;;;;; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ;;;; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ;;; ;;; ;;;;; ;;;;; ;;;;; ; ; ; ; ;; making/updating a DB ;; --------------------------------------------------------------------------------------------------- ;; PathString -> Database ;; creates a new unsaved database (define (make-empty-database path) (database path (make-hash))) ;; PathString -> Database ;; loads a database (define (load-database path) (with-handlers ([exn:fail:filesystem? (λ (e) e)]) (database path (string->value (port->string (open-input-file path)))))) ;; String -> Datum ;; reads and converts a string (define (string->value str) (parameterize ([current-namespace (namespace-anchor->namespace current)]) (eval (read (open-input-string str))))) ;; saving a DB ;; --------------------------------------------------------------------------------------------------- ;; database -> (void) ;; writes a database (define (save-database db) (with-output-to-file (database-name db) (λ () (display (serialize db))) #:exists 'replace)) ;; database -> string ;; converts the database to a string that when used as the arg to (eval (read (string->port str))) would result in the same raw db (define (serialize db) (to-string `(make-hash "(list" ,@(for/list ([(tbl-name raw-tbl) (database-raw db)]) (string-append "(cons" "\"" (to-string tbl-name) "\"" (serialize-table raw-tbl) ")")) ")"))) ;; table -> string ;; converts the table to a string that when used as the arg to (eval (read (string->port str))) would result in the same raw table (define (serialize-table tbl) (to-string `(table "'",(table-fields tbl) "(list",@(for/list ([rec (table-raw tbl)]) (serialize-record rec))")"))) ;; record -> string ;; converts the record to a string that when used as the arg to (eval (read (string->port str))) would result in the same raw record (define (serialize-record rec) (to-string `(record (make-hash "'" ,(for/list ([(field-name value) (record-raw rec)]) (cons field-name (serialize-datum value))))))) ;; datum -> string ;; converts a datum to a read-friendly string (define (serialize-datum dtm) (with-output-to-string (λ () (print dtm)))) ; ; ; ; ; ;;;;;;; ;;;;;; ;;; ; ;;;;;;; ;;; ; ; ; ; ; ; ; ; ;; ; ; ; ; ;; ; ; ; ; ; ; ; ; ; ;;; ;;;; ; ;;;; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ;; ; ; ;; ; ; ;;; ;;;;;; ; ;;; ;;; ; ;;; ; ; ; ; (define queryable (make-empty-database "")) (effect queryable (create 'test1 ('a 'b))) (effect queryable (insert (1 'me) 'test1)) (effect queryable (insert (2 'you) 'test1)) (effect queryable (insert (3 'you) 'test1)) (effect queryable (insert (4 'me) 'test1)) (effect queryable (create 'test2 ('a 'c))) (effect queryable (insert (1 'you) 'test2)) (effect queryable (insert (2 'me) 'test2)) (effect queryable (insert (3 'me) 'test2)) (effect queryable (insert (4 'you) 'test2)) (define-test-suite --querying ;; select (check-equal? (select queryable '() 'test1 (const #t)) (query (table-raw (hash-ref (database-raw queryable) 'test1)))) (check-equal? (query-mac queryable (select () 'test1)) (query (table-raw (hash-ref (database-raw queryable) 'test1)))) (check-equal? (select queryable '(a) 'test1 (const #t)) (query (list (record (make-hash (list (cons 'a 4)))) (record (make-hash (list (cons 'a 3)))) (record (make-hash (list (cons 'a 2)))) (record (make-hash (list (cons 'a 1))))))) (check-equal? (query-mac queryable (select ('a) 'test1)) (query (list (record (make-hash (list (cons 'a 4)))) (record (make-hash (list (cons 'a 3)))) (record (make-hash (list (cons 'a 2)))) (record (make-hash (list (cons 'a 1))))))) (check-equal? (select queryable '(a) 'test1 (λ (r) (= (hash-ref (record-raw r) 'a) 4))) (query (list (record (make-hash (list (cons 'a 4))))))) (check-equal? (query-mac queryable (select ('a) 'test1 ('a (λ (a) (= a 4))))) (query (list (record (make-hash (list (cons 'a 4))))))) ) (define-test-suite --effecting ;; create (let ([db (make-empty-database "")]) (create db 'test '(oh hai there)) (check-equal? db (database "" (make-hash (list (cons 'test (table '(oh hai there) (list)))))))) (let ([db (make-empty-database "")]) (effect db (create 'test ('oh 'hai 'there))) (check-equal? db (database "" (make-hash (list (cons 'test (table '(oh hai there) (list)))))))) ;; drop (let ([db (make-empty-database "")]) (create db 'test '(oh hai there)) (check-equal? db (database "" (make-hash (list (cons 'test (table '(oh hai there) (list))))))) (drop db 'test) (check-equal? db (make-empty-database ""))) (let ([db (make-empty-database "")]) (create db 'test '(oh hai there)) (check-equal? db (database "" (make-hash (list (cons 'test (table '(oh hai there) (list))))))) (effect db (drop 'test)) (check-equal? db (make-empty-database ""))) ;; insert (let ([db (make-empty-database "")]) (create db 'test '(oh hai there)) (check-equal? db (database "" (make-hash (list (cons 'test (table '(oh hai there) (list))))))) (insert db 'test '(1 2 3)) (check-equal? db (database "" (make-hash (list (cons 'test (table '(oh hai there) (list (record (make-hash (list (cons 'oh 1) (cons 'hai 2) (cons 'there 3)))))))))))) (let ([db (make-empty-database "")]) (create db 'test '(oh hai there)) (check-equal? db (database "" (make-hash (list (cons 'test (table '(oh hai there) (list))))))) (effect db (insert (1 2 3) 'test)) (check-equal? db (database "" (make-hash (list (cons 'test (table '(oh hai there) (list (record (make-hash (list (cons 'oh 1) (cons 'hai 2) (cons 'there 3)))))))))))) ) (define-test-suite --loading ;; string->value (check-equal? (string->value "(cons 1 2)") (cons 1 2)) (check-equal? (string->value "1") 1) (check-exn exn:fail:read? (λ () (string->value "(cons 1 2"))) (check-equal? (string->value "(database \"\" (make-hash))") (database "" (make-hash))) ) (define-test-suite --serialize ;; serialize (check-equal? (string->value (serialize (database "" (make-hash)))) (make-hash (list))) (check-equal? (string->value (serialize (database "" (make-hash (list (cons "test" (table '(name id) (list)))))))) (make-hash (list (cons "test" (table '(name id) (list)))))) (check-equal? (string->value (serialize (database "" (make-hash (list (cons "test" (table '(name id) (list (record (make-hash (list (cons 'name "spencer") (cons 'id "000532210")))))))))))) (make-hash (list (cons "test" (table '(name id) (list (record (make-hash (list (cons 'name "spencer") (cons 'id "000532210")))))))))) ;; serialize-table (check-equal? (string->value (serialize-table (table '(name id) (list)))) (table '(name id) (list))) (check-equal? (string->value (serialize-table (table '(name id) (list (record (make-hash (list (cons 'name "spencer") (cons 'id "000532210")))))))) (table '(name id) (list (record (make-hash (list (cons 'name "spencer") (cons 'id "000532210"))))))) ;; serialize-record (check-equal? (string->value (serialize-record (record (make-hash (list (cons 'name "spencer") (cons 'id "000532210")))))) (record (make-hash (list (cons 'name "spencer") (cons 'id "000532210"))))) ;; serialize-datum (check-equal? (string->value (serialize-datum "spencer")) "spencer") (check-equal? (string->value (serialize-datum 1223)) 1223) (check-equal? (string->value (serialize-datum #f)) #f) (check-equal? (string->value (serialize-datum 'yes?)) 'yes?) ) (run-tests --querying) (run-tests --effecting) (run-tests --loading) (run-tests --serialize)
true
1c417b733059514ee9b2860cad2732aadf8d44fe
c83b277957534624cfae99573ffa30c1e879c4bc
/unlike-assets-lib/unlike-assets/reactive.rkt
a775377a35c9e05f737b6a6f7496a1a38c3842fe
[ "MIT" ]
permissive
pmatos/unlike-assets
f8cdef05f9b0f8bb6c5dc247738ca2c1bd374075
7179aca2b7a265bb65e6450d1972d2c3f9c0e3d3
refs/heads/master
2022-04-25T09:15:34.992993
2020-04-12T06:26:06
2020-04-12T06:26:06
257,580,137
0
0
MIT
2020-04-21T11:56:08
2020-04-21T11:56:07
null
UTF-8
Racket
false
false
205
rkt
reactive.rkt
#lang racket/base (require "private/reactive/system.rkt" "private/reactive/assets.rkt") (provide (all-from-out "private/reactive/system.rkt" "private/reactive/assets.rkt"))
false
091f3103c3b57855191e7548c8a3da2b54883329
5bbc152058cea0c50b84216be04650fa8837a94b
/experimental/micro/tetris/typed/consts-block-size.rkt
df18765b49911ab54027df3d3cf3eac8c9fe6dab
[]
no_license
nuprl/gradual-typing-performance
2abd696cc90b05f19ee0432fb47ca7fab4b65808
35442b3221299a9cadba6810573007736b0d65d4
refs/heads/master
2021-01-18T15:10:01.739413
2018-12-15T18:44:28
2018-12-15T18:44:28
27,730,565
11
3
null
2018-12-01T13:54:08
2014-12-08T19:15:22
Racket
UTF-8
Racket
false
false
175
rkt
consts-block-size.rkt
#lang typed/racket/base (provide block-size) ;; ============================================================================= (: block-size Integer) (define block-size 20)
false
4f2c88e2cf1f7e07875d9d6c0af649e30485093e
27f487627bbb5e5fef40478f6914840187646a3c
/sinbad/util.rkt
217c420d1b9882b306662efe1a542b381de92ad0
[ "MIT" ]
permissive
berry-cs/sinbad-rkt
7e9e4984647a97871e45f4fc2ad5b35b3ab2b165
44b3e0881514bbfb7cc91780262968748b9f92eb
refs/heads/master
2021-03-27T20:49:37.376055
2020-01-30T02:07:04
2020-01-30T02:07:04
106,448,521
1
0
MIT
2018-06-27T20:14:23
2017-10-10T17:21:39
Racket
UTF-8
Racket
false
false
5,302
rkt
util.rkt
#lang racket (require file/gunzip net/url "ftp-fetch.rkt") (provide smells-like-url? smells-like-gzip? smells-like-zip? create-input raw-create-input) (module+ test (require rackunit)) ;; Determine if the given path seems like a URL (define (smells-like-url? p) ;; Currently, only things that start off http:// ;; https:// or ftp:// are treated as URLs. (or (is-http-url? p) (is-ftp-url? p))) (module+ test (check-equal? (is-http-url? "https://www.noaa.gov/hi.txt") true) (check-equal? (is-http-url? "http://web.com/hi.txt") true) (check-equal? (is-http-url? "https://data.berry.edu/long/path-something/x.csv") true) (check-equal? (is-http-url? "ftp://www.noaa.gov/hi.txt") false) (check-equal? (is-http-url? "file:data.berry.edu/long/path-something/x.csv") false) (check-equal? (is-ftp-url? "https://www.noaa.gov/hi.txt") false) (check-equal? (is-ftp-url? "http://web.com/hi.txt") false) (check-equal? (is-ftp-url? "https://data.berry.edu/long/path-something/x.csv") false) (check-equal? (is-ftp-url? "ftp://www.noaa.gov/hi.txt") true) (check-equal? (is-ftp-url? "file:data.berry.edu/long/path-something/x.csv") false)) (define (is-http-url? p) (and (regexp-match url-regexp p) (member (url-scheme (string->url p)) '("http" "https")) true)) (define (is-ftp-url? p) (and (regexp-match url-regexp p) (member (url-scheme (string->url p)) '("ftp")) true)) (define (smells-like-gzip? p) (and (string? p) (string-contains? p ".gz"))) (define (smells-like-zip? p) (and (string? p) (string-contains? p ".zip"))) (define (create-input path) (first (raw-create-input path))) #| Returns a triple, ( fp, real_name, enc ), containing a file-type object for the given path, an alternate name for the resource, and an encoding. If the path is a normal file, produces a file-object for that file. If the path is a URL, makes a request to that URL and returns an input stream to read the response. In the process of processing the response from the URL, if a name for the file is found (e.g. in a Content-Disposition header), that is produced as real_name. Otherwise real_name is returned as #f. If an encoding is determined from the URL response headers, it is included, otherwise the third element of the triple is #f. |# (define (raw-create-input path) (define charset (box #f)) (define local-name (box #f)) (define (location-header hdrs) (define re #px"^[Ll]ocation:\\s+(.*)$") (second (regexp-match re (findf (lambda (line) (regexp-match re line)) hdrs)))) (define (get-port+headers/follow-redirects path) (define-values (ip hdrs) (get-pure-port/headers (string->url path) (list "User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_10_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/60.0.3112.113 Safari/537.36") #:status? #t)) (define hdr-lines (string-split hdrs #px"[\r\n]")) (define code (string->number (second (regexp-match #px"^\\S+ (\\d+) " (first hdr-lines))))) (cond [(member code '(301 302 307 308)) (get-port+headers/follow-redirects (location-header hdr-lines))] [else (values ip hdrs)])) (define fp (cond [(or (not path) (not (string? path))) #f] [(is-ftp-url? path) (define local-file-path (ftp-fetch path)) (open-input-file local-file-path)] [(is-http-url? path) (define-values (ip hdrs) (get-port+headers/follow-redirects path)) (for ([h (string-split hdrs #px"[\r\n]")]) (define R1 (regexp-match #px"^[Cc]ontent-[Dd]isposition.*filename=\"?([^\\s\"]*)\"?" h)) (define R2 (regexp-match #px"^Content-Type:.*charset=\"?([^\\s\"]*)\"?" h)) (when R1 (set-box! local-name (second R1))) (when R2 (set-box! charset (second R2)))) ip] [(string-prefix? path "wss:") #f] [else (open-input-file (expand-user-path path))])) (define final-fp (cond [(or (smells-like-gzip? path) (and (string? (unbox local-name)) (smells-like-gzip? (unbox local-name)))) (define ubp (open-output-bytes)) (gunzip-through-ports fp ubp) (define unzipped-bytes-port (open-input-bytes (get-output-bytes ubp))) (close-input-port fp) ; is this safe here? unzipped-bytes-port] [else fp])) (list final-fp (unbox local-name) (unbox charset))) #; (module+ test ; content disposition header... (check-equal? (second (raw-create-input "http://api.worldbank.org/v2/en/country/per?downloadformat=csv")) "API_PER_DS2_en_csv_v2.zip") ; only one file in the zip... (check-equal? (second (raw-create-input "http://api.worldbank.org/v2/en/indicator/SP.POP.TOTL?downloadformat=xml")) "API_SP.POP.TOTL_DS2_en_xml_v2.zip") ; gzipped input... (check-equal? (read (create-input "https://www1.ncdc.noaa.gov/pub/data/swdi/stormevents/csvfiles/StormEvents_details-ftp_v1.0_d1950_c20170120.csv.gz")) 'BEGIN_YEARMONTH))
false
95b072d4f5e4b55a16907a7d5fcb9698eccb145f
ef61a036fd7e4220dc71860053e6625cf1496b1f
/HTDP2e/01-fixed-size-data/ch-02-functions-and-programs/ex-027-give-name-to-constans.rkt
9d7c60e5a93dc1fe04b7e5513f8e687320fda0f9
[]
no_license
lgwarda/racket-stuff
adb934d90858fa05f72d41c29cc66012e275931c
936811af04e679d7fefddc0ef04c5336578d1c29
refs/heads/master
2023-01-28T15:58:04.479919
2020-12-09T10:36:02
2020-12-09T10:36:02
249,515,050
0
0
null
null
null
null
UTF-8
Racket
false
false
1,195
rkt
ex-027-give-name-to-constans.rkt
;; The first three lines of this file were inserted by DrRacket. They record metadata ;; about the language level of this file in a form that our tools can easily process. #reader(lib "htdp-beginner-reader.ss" "lang")((modname ex-027-give-name-to-constans) (read-case-sensitive #t) (teachpacks ((lib "image.rkt" "teachpack" "2htdp") (lib "universe.rkt" "teachpack" "2htdp"))) (htdp-settings #(#t constructor repeating-decimal #f #t none #f ((lib "image.rkt" "teachpack" "2htdp") (lib "universe.rkt" "teachpack" "2htdp")) #f))) ; constans: (define AVG-ATTENDENCE 120) (define BASE-TICKET-PRICE 5.0) (define ATTENDEE-SWING 15) (define PRICE-VARIANCE 0.1) (define FIXED-COSTS 180.0) (define VARIABLE-COSTS 0.04) ; the number of attendees depends on the ticket price (define (attendees ticket-price) (- AVG-ATTENDENCE (* (- ticket-price BASE-TICKET-PRICE) (/ ATTENDEE-SWING PRICE-VARIANCE)))) ; revenue depends on ticket sales (define (revenue ticket-price) (* ticket-price (attendees ticket-price))) (define (cost ticket-price) (+ FIXED-COSTS (* VARIABLE-COSTS (attendees ticket-price)))) (define (profit ticket-price) (- (revenue ticket-price) (cost ticket-price)))
false
47cd6a5a2a9154742e5d89e22768d192d1cfb1f9
d29c2c4061ea24d57d29b8fce493d116f3876bc0
/tests/test-assign-2.rkt
8be395bbb23ddca35f2c459029bf23bc6352382e
[]
no_license
jbejam/magnolisp
d7b28e273550ff0df884ecd73fb3f7ce78957d21
191d529486e688e5dda2be677ad8fe3b654e0d4f
refs/heads/master
2021-01-16T19:37:23.477945
2016-10-01T16:02:42
2016-10-01T16:02:42
null
0
0
null
null
null
null
UTF-8
Racket
false
false
192
rkt
test-assign-2.rkt
#lang magnolisp (typedef int #:: (foreign)) (define (f x y) #:: (export [type (-> int int int)]) (let ([x y] [y x]) (set!-values (x y) (values y x)) x)) (f 5 5) (f 5 6) (f 6 5)
false
3caea129676f48ff80073a35eef0da70e706e813
662e55de9b4213323395102bd50fb22b30eaf957
/dissertation/scrbl/jfp-2019/data/7.8.0.5/tetris-2020-08-26.rktd
330bbce0771df01fc0615b25252a50eb8196cc05
[]
no_license
bennn/dissertation
3000f2e6e34cc208ee0a5cb47715c93a645eba11
779bfe6f8fee19092849b7e2cfc476df33e9357b
refs/heads/master
2023-03-01T11:28:29.151909
2021-02-11T19:52:37
2021-02-11T19:52:37
267,969,820
7
1
null
null
null
null
UTF-8
Racket
false
false
190,538
rktd
tetris-2020-08-26.rktd
#lang gtp-measure/output/typed-untyped ("000000000" ("cpu time: 823 real time: 825 gc time: 4" "cpu time: 830 real time: 831 gc time: 4" "cpu time: 826 real time: 827 gc time: 3" "cpu time: 830 real time: 826 gc time: 3" "cpu time: 844 real time: 842 gc time: 6" "cpu time: 830 real time: 828 gc time: 4" "cpu time: 827 real time: 827 gc time: 3" "cpu time: 823 real time: 824 gc time: 4")) ("000000001" ("cpu time: 893 real time: 889 gc time: 43" "cpu time: 887 real time: 888 gc time: 37" "cpu time: 887 real time: 885 gc time: 40" "cpu time: 890 real time: 886 gc time: 40" "cpu time: 897 real time: 895 gc time: 47" "cpu time: 890 real time: 889 gc time: 40" "cpu time: 884 real time: 885 gc time: 40" "cpu time: 893 real time: 892 gc time: 43")) ("000000010" ("cpu time: 873 real time: 870 gc time: 40" "cpu time: 876 real time: 875 gc time: 40" "cpu time: 870 real time: 872 gc time: 40" "cpu time: 873 real time: 874 gc time: 40" "cpu time: 870 real time: 870 gc time: 40" "cpu time: 873 real time: 872 gc time: 40" "cpu time: 877 real time: 876 gc time: 37" "cpu time: 873 real time: 872 gc time: 40")) ("000000011" ("cpu time: 900 real time: 898 gc time: 40" "cpu time: 887 real time: 887 gc time: 40" "cpu time: 887 real time: 885 gc time: 40" "cpu time: 893 real time: 888 gc time: 40" "cpu time: 894 real time: 893 gc time: 43" "cpu time: 890 real time: 889 gc time: 40" "cpu time: 887 real time: 887 gc time: 40" "cpu time: 890 real time: 892 gc time: 37")) ("000000100" ("cpu time: 883 real time: 882 gc time: 50" "cpu time: 887 real time: 882 gc time: 43" "cpu time: 870 real time: 871 gc time: 43" "cpu time: 874 real time: 871 gc time: 43" "cpu time: 893 real time: 893 gc time: 43" "cpu time: 877 real time: 873 gc time: 40" "cpu time: 884 real time: 881 gc time: 40" "cpu time: 873 real time: 872 gc time: 44")) ("000000101" ("cpu time: 906 real time: 907 gc time: 50" "cpu time: 897 real time: 896 gc time: 43" "cpu time: 896 real time: 899 gc time: 40" "cpu time: 906 real time: 906 gc time: 40" "cpu time: 900 real time: 897 gc time: 43" "cpu time: 900 real time: 900 gc time: 44" "cpu time: 907 real time: 907 gc time: 50" "cpu time: 906 real time: 908 gc time: 40")) ("000000110" ("cpu time: 896 real time: 897 gc time: 44" "cpu time: 887 real time: 884 gc time: 40" "cpu time: 896 real time: 897 gc time: 50" "cpu time: 893 real time: 892 gc time: 40" "cpu time: 890 real time: 890 gc time: 43" "cpu time: 890 real time: 887 gc time: 43" "cpu time: 890 real time: 889 gc time: 40" "cpu time: 890 real time: 891 gc time: 43")) ("000000111" ("cpu time: 903 real time: 900 gc time: 44" "cpu time: 904 real time: 902 gc time: 43" "cpu time: 910 real time: 911 gc time: 43" "cpu time: 907 real time: 905 gc time: 50" "cpu time: 907 real time: 903 gc time: 40" "cpu time: 900 real time: 900 gc time: 43" "cpu time: 906 real time: 907 gc time: 44" "cpu time: 896 real time: 900 gc time: 40")) ("000001000" ("cpu time: 943 real time: 942 gc time: 40" "cpu time: 930 real time: 929 gc time: 37" "cpu time: 927 real time: 925 gc time: 40" "cpu time: 927 real time: 926 gc time: 43" "cpu time: 927 real time: 924 gc time: 40" "cpu time: 933 real time: 934 gc time: 46" "cpu time: 927 real time: 927 gc time: 40" "cpu time: 934 real time: 929 gc time: 40")) ("000001001" ("cpu time: 943 real time: 944 gc time: 40" "cpu time: 943 real time: 942 gc time: 40" "cpu time: 950 real time: 946 gc time: 47" "cpu time: 946 real time: 944 gc time: 40" "cpu time: 946 real time: 943 gc time: 44" "cpu time: 943 real time: 942 gc time: 40" "cpu time: 953 real time: 949 gc time: 47" "cpu time: 946 real time: 943 gc time: 40")) ("000001010" ("cpu time: 937 real time: 938 gc time: 40" "cpu time: 950 real time: 948 gc time: 43" "cpu time: 950 real time: 947 gc time: 40" "cpu time: 950 real time: 953 gc time: 50" "cpu time: 940 real time: 939 gc time: 44" "cpu time: 937 real time: 934 gc time: 40" "cpu time: 937 real time: 938 gc time: 40" "cpu time: 933 real time: 935 gc time: 40")) ("000001011" ("cpu time: 950 real time: 948 gc time: 40" "cpu time: 946 real time: 945 gc time: 36" "cpu time: 947 real time: 948 gc time: 44" "cpu time: 950 real time: 947 gc time: 40" "cpu time: 947 real time: 944 gc time: 40" "cpu time: 957 real time: 955 gc time: 40" "cpu time: 947 real time: 945 gc time: 40" "cpu time: 947 real time: 946 gc time: 40")) ("000001100" ("cpu time: 940 real time: 939 gc time: 43" "cpu time: 944 real time: 939 gc time: 44" "cpu time: 967 real time: 965 gc time: 43" "cpu time: 943 real time: 942 gc time: 43" "cpu time: 936 real time: 940 gc time: 40" "cpu time: 946 real time: 947 gc time: 43" "cpu time: 940 real time: 939 gc time: 44" "cpu time: 940 real time: 938 gc time: 40")) ("000001101" ("cpu time: 970 real time: 970 gc time: 40" "cpu time: 953 real time: 953 gc time: 40" "cpu time: 967 real time: 968 gc time: 40" "cpu time: 953 real time: 955 gc time: 43" "cpu time: 956 real time: 956 gc time: 44" "cpu time: 960 real time: 958 gc time: 40" "cpu time: 960 real time: 960 gc time: 43" "cpu time: 974 real time: 972 gc time: 44")) ("000001110" ("cpu time: 963 real time: 961 gc time: 43" "cpu time: 950 real time: 950 gc time: 44" "cpu time: 957 real time: 956 gc time: 43" "cpu time: 957 real time: 958 gc time: 43" "cpu time: 953 real time: 953 gc time: 43" "cpu time: 953 real time: 952 gc time: 47" "cpu time: 963 real time: 961 gc time: 47" "cpu time: 970 real time: 967 gc time: 43")) ("000001111" ("cpu time: 1000 real time: 999 gc time: 40" "cpu time: 956 real time: 957 gc time: 40" "cpu time: 956 real time: 958 gc time: 40" "cpu time: 960 real time: 958 gc time: 43" "cpu time: 970 real time: 967 gc time: 53" "cpu time: 957 real time: 957 gc time: 40" "cpu time: 960 real time: 957 gc time: 43" "cpu time: 960 real time: 959 gc time: 46")) ("000010000" ("cpu time: 5063 real time: 5061 gc time: 63" "cpu time: 5094 real time: 5092 gc time: 61" "cpu time: 5080 real time: 5077 gc time: 60" "cpu time: 5066 real time: 5067 gc time: 63" "cpu time: 5070 real time: 5068 gc time: 63" "cpu time: 5057 real time: 5056 gc time: 63" "cpu time: 5093 real time: 5094 gc time: 63" "cpu time: 5100 real time: 5099 gc time: 66")) ("000010001" ("cpu time: 5040 real time: 5043 gc time: 40" "cpu time: 5050 real time: 5050 gc time: 44" "cpu time: 5134 real time: 5134 gc time: 40" "cpu time: 5090 real time: 5089 gc time: 40" "cpu time: 5047 real time: 5045 gc time: 52" "cpu time: 5047 real time: 5047 gc time: 40" "cpu time: 5173 real time: 5174 gc time: 40" "cpu time: 5073 real time: 5074 gc time: 40")) ("000010010" ("cpu time: 5123 real time: 5124 gc time: 40" "cpu time: 5113 real time: 5111 gc time: 44" "cpu time: 5107 real time: 5109 gc time: 40" "cpu time: 5167 real time: 5166 gc time: 43" "cpu time: 5110 real time: 5108 gc time: 40" "cpu time: 5050 real time: 5051 gc time: 40" "cpu time: 5120 real time: 5119 gc time: 40" "cpu time: 5143 real time: 5144 gc time: 40")) ("000010011" ("cpu time: 5103 real time: 5103 gc time: 40" "cpu time: 5110 real time: 5110 gc time: 40" "cpu time: 5060 real time: 5058 gc time: 50" "cpu time: 5100 real time: 5095 gc time: 43" "cpu time: 5070 real time: 5068 gc time: 40" "cpu time: 5090 real time: 5089 gc time: 37" "cpu time: 5067 real time: 5064 gc time: 40" "cpu time: 5113 real time: 5110 gc time: 40")) ("000010100" ("cpu time: 5090 real time: 5091 gc time: 43" "cpu time: 5154 real time: 5153 gc time: 40" "cpu time: 5274 real time: 5271 gc time: 44" "cpu time: 5040 real time: 5038 gc time: 40" "cpu time: 5124 real time: 5123 gc time: 47" "cpu time: 5050 real time: 5050 gc time: 40" "cpu time: 5120 real time: 5119 gc time: 43" "cpu time: 5116 real time: 5117 gc time: 40")) ("000010101" ("cpu time: 5053 real time: 5052 gc time: 43" "cpu time: 5033 real time: 5033 gc time: 44" "cpu time: 5030 real time: 5029 gc time: 40" "cpu time: 5024 real time: 5019 gc time: 43" "cpu time: 5090 real time: 5087 gc time: 47" "cpu time: 5047 real time: 5047 gc time: 40" "cpu time: 5040 real time: 5041 gc time: 44" "cpu time: 5124 real time: 5123 gc time: 44")) ("000010110" ("cpu time: 5050 real time: 5050 gc time: 40" "cpu time: 5003 real time: 5002 gc time: 43" "cpu time: 5117 real time: 5115 gc time: 43" "cpu time: 5050 real time: 5050 gc time: 40" "cpu time: 5327 real time: 5325 gc time: 44" "cpu time: 5100 real time: 5097 gc time: 43" "cpu time: 5040 real time: 5038 gc time: 44" "cpu time: 5020 real time: 5019 gc time: 40")) ("000010111" ("cpu time: 5153 real time: 5152 gc time: 43" "cpu time: 5117 real time: 5118 gc time: 44" "cpu time: 5010 real time: 5010 gc time: 40" "cpu time: 5173 real time: 5171 gc time: 44" "cpu time: 5006 real time: 5007 gc time: 44" "cpu time: 5033 real time: 5034 gc time: 40" "cpu time: 5037 real time: 5035 gc time: 43" "cpu time: 5057 real time: 5057 gc time: 43")) ("000011000" ("cpu time: 5117 real time: 5114 gc time: 47" "cpu time: 5113 real time: 5114 gc time: 40" "cpu time: 5130 real time: 5129 gc time: 43" "cpu time: 5110 real time: 5111 gc time: 40" "cpu time: 5177 real time: 5178 gc time: 36" "cpu time: 5110 real time: 5105 gc time: 40" "cpu time: 9696 real time: 9693 gc time: 40" "cpu time: 5230 real time: 5228 gc time: 44")) ("000011001" ("cpu time: 5090 real time: 5088 gc time: 40" "cpu time: 5107 real time: 5106 gc time: 40" "cpu time: 5093 real time: 5091 gc time: 40" "cpu time: 5100 real time: 5102 gc time: 43" "cpu time: 5090 real time: 5086 gc time: 40" "cpu time: 5077 real time: 5078 gc time: 40" "cpu time: 5080 real time: 5080 gc time: 37" "cpu time: 5087 real time: 5089 gc time: 40")) ("000011010" ("cpu time: 5150 real time: 5147 gc time: 40" "cpu time: 5234 real time: 5233 gc time: 40" "cpu time: 5130 real time: 5128 gc time: 40" "cpu time: 5140 real time: 5139 gc time: 40" "cpu time: 5140 real time: 5137 gc time: 43" "cpu time: 5150 real time: 5147 gc time: 37" "cpu time: 5224 real time: 5223 gc time: 40" "cpu time: 5130 real time: 5130 gc time: 43")) ("000011011" ("cpu time: 5157 real time: 5156 gc time: 40" "cpu time: 5104 real time: 5102 gc time: 37" "cpu time: 5107 real time: 5104 gc time: 40" "cpu time: 5327 real time: 5327 gc time: 40" "cpu time: 5136 real time: 5136 gc time: 40" "cpu time: 5130 real time: 5129 gc time: 40" "cpu time: 5154 real time: 5150 gc time: 44" "cpu time: 5170 real time: 5168 gc time: 43")) ("000011100" ("cpu time: 5120 real time: 5120 gc time: 40" "cpu time: 5110 real time: 5110 gc time: 43" "cpu time: 5137 real time: 5137 gc time: 44" "cpu time: 5253 real time: 5248 gc time: 43" "cpu time: 5150 real time: 5148 gc time: 44" "cpu time: 5137 real time: 5137 gc time: 43" "cpu time: 5130 real time: 5129 gc time: 46" "cpu time: 5087 real time: 5088 gc time: 43")) ("000011101" ("cpu time: 5110 real time: 5110 gc time: 44" "cpu time: 5070 real time: 5068 gc time: 43" "cpu time: 5087 real time: 5083 gc time: 43" "cpu time: 5113 real time: 5113 gc time: 40" "cpu time: 5160 real time: 5159 gc time: 43" "cpu time: 5143 real time: 5142 gc time: 40" "cpu time: 5100 real time: 5100 gc time: 44" "cpu time: 5070 real time: 5067 gc time: 43")) ("000011110" ("cpu time: 5080 real time: 5077 gc time: 44" "cpu time: 5084 real time: 5081 gc time: 43" "cpu time: 5056 real time: 5053 gc time: 46" "cpu time: 5110 real time: 5111 gc time: 40" "cpu time: 5063 real time: 5066 gc time: 40" "cpu time: 5144 real time: 5138 gc time: 43" "cpu time: 5116 real time: 5119 gc time: 40" "cpu time: 5203 real time: 5201 gc time: 43")) ("000011111" ("cpu time: 5103 real time: 5105 gc time: 43" "cpu time: 5127 real time: 5127 gc time: 43" "cpu time: 5050 real time: 5048 gc time: 40" "cpu time: 5177 real time: 5175 gc time: 40" "cpu time: 5063 real time: 5062 gc time: 47" "cpu time: 5073 real time: 5071 gc time: 43" "cpu time: 5067 real time: 5065 gc time: 40" "cpu time: 5100 real time: 5101 gc time: 40")) ("000100000" ("cpu time: 883 real time: 881 gc time: 60" "cpu time: 883 real time: 885 gc time: 60" "cpu time: 904 real time: 901 gc time: 60" "cpu time: 880 real time: 881 gc time: 56" "cpu time: 890 real time: 889 gc time: 64" "cpu time: 880 real time: 880 gc time: 60" "cpu time: 886 real time: 885 gc time: 56" "cpu time: 883 real time: 882 gc time: 63")) ("000100001" ("cpu time: 893 real time: 893 gc time: 47" "cpu time: 887 real time: 884 gc time: 44" "cpu time: 887 real time: 885 gc time: 43" "cpu time: 890 real time: 887 gc time: 40" "cpu time: 884 real time: 884 gc time: 40" "cpu time: 896 real time: 896 gc time: 40" "cpu time: 907 real time: 904 gc time: 44" "cpu time: 890 real time: 887 gc time: 40")) ("000100010" ("cpu time: 884 real time: 883 gc time: 50" "cpu time: 874 real time: 873 gc time: 40" "cpu time: 874 real time: 873 gc time: 40" "cpu time: 874 real time: 873 gc time: 40" "cpu time: 897 real time: 893 gc time: 44" "cpu time: 894 real time: 893 gc time: 50" "cpu time: 883 real time: 882 gc time: 50" "cpu time: 880 real time: 880 gc time: 46")) ("000100011" ("cpu time: 897 real time: 895 gc time: 44" "cpu time: 897 real time: 895 gc time: 40" "cpu time: 887 real time: 889 gc time: 40" "cpu time: 900 real time: 899 gc time: 50" "cpu time: 890 real time: 891 gc time: 40" "cpu time: 890 real time: 890 gc time: 40" "cpu time: 890 real time: 889 gc time: 40" "cpu time: 890 real time: 892 gc time: 40")) ("000100100" ("cpu time: 877 real time: 874 gc time: 37" "cpu time: 883 real time: 882 gc time: 40" "cpu time: 876 real time: 877 gc time: 44" "cpu time: 883 real time: 884 gc time: 54" "cpu time: 900 real time: 901 gc time: 46" "cpu time: 893 real time: 891 gc time: 43" "cpu time: 890 real time: 891 gc time: 40" "cpu time: 877 real time: 877 gc time: 40")) ("000100101" ("cpu time: 887 real time: 889 gc time: 40" "cpu time: 897 real time: 893 gc time: 40" "cpu time: 900 real time: 901 gc time: 40" "cpu time: 893 real time: 894 gc time: 40" "cpu time: 894 real time: 894 gc time: 43" "cpu time: 900 real time: 897 gc time: 43" "cpu time: 890 real time: 890 gc time: 40" "cpu time: 897 real time: 895 gc time: 43")) ("000100110" ("cpu time: 887 real time: 888 gc time: 40" "cpu time: 913 real time: 909 gc time: 40" "cpu time: 890 real time: 891 gc time: 44" "cpu time: 887 real time: 889 gc time: 40" "cpu time: 886 real time: 888 gc time: 44" "cpu time: 893 real time: 892 gc time: 40" "cpu time: 893 real time: 893 gc time: 44" "cpu time: 894 real time: 894 gc time: 43")) ("000100111" ("cpu time: 900 real time: 900 gc time: 44" "cpu time: 897 real time: 896 gc time: 47" "cpu time: 910 real time: 907 gc time: 44" "cpu time: 906 real time: 905 gc time: 40" "cpu time: 907 real time: 908 gc time: 50" "cpu time: 903 real time: 901 gc time: 43" "cpu time: 897 real time: 898 gc time: 40" "cpu time: 900 real time: 900 gc time: 43")) ("000101000" ("cpu time: 927 real time: 926 gc time: 40" "cpu time: 926 real time: 925 gc time: 40" "cpu time: 930 real time: 928 gc time: 40" "cpu time: 943 real time: 944 gc time: 40" "cpu time: 923 real time: 923 gc time: 40" "cpu time: 930 real time: 931 gc time: 40" "cpu time: 937 real time: 932 gc time: 46" "cpu time: 1026 real time: 1028 gc time: 40")) ("000101001" ("cpu time: 940 real time: 937 gc time: 40" "cpu time: 957 real time: 954 gc time: 40" "cpu time: 957 real time: 955 gc time: 40" "cpu time: 940 real time: 940 gc time: 40" "cpu time: 944 real time: 943 gc time: 40" "cpu time: 940 real time: 942 gc time: 40" "cpu time: 950 real time: 948 gc time: 46" "cpu time: 940 real time: 940 gc time: 40")) ("000101010" ("cpu time: 940 real time: 938 gc time: 40" "cpu time: 940 real time: 936 gc time: 40" "cpu time: 947 real time: 946 gc time: 54" "cpu time: 940 real time: 937 gc time: 40" "cpu time: 940 real time: 939 gc time: 40" "cpu time: 937 real time: 938 gc time: 40" "cpu time: 937 real time: 936 gc time: 44" "cpu time: 1027 real time: 1027 gc time: 40")) ("000101011" ("cpu time: 950 real time: 948 gc time: 40" "cpu time: 950 real time: 948 gc time: 40" "cpu time: 957 real time: 956 gc time: 47" "cpu time: 953 real time: 949 gc time: 40" "cpu time: 947 real time: 946 gc time: 40" "cpu time: 957 real time: 955 gc time: 40" "cpu time: 950 real time: 949 gc time: 40" "cpu time: 963 real time: 965 gc time: 40")) ("000101100" ("cpu time: 940 real time: 941 gc time: 43" "cpu time: 947 real time: 945 gc time: 44" "cpu time: 940 real time: 937 gc time: 43" "cpu time: 944 real time: 940 gc time: 44" "cpu time: 954 real time: 950 gc time: 40" "cpu time: 940 real time: 940 gc time: 40" "cpu time: 946 real time: 945 gc time: 40" "cpu time: 943 real time: 944 gc time: 47")) ("000101101" ("cpu time: 950 real time: 949 gc time: 40" "cpu time: 950 real time: 952 gc time: 40" "cpu time: 957 real time: 952 gc time: 40" "cpu time: 970 real time: 967 gc time: 43" "cpu time: 953 real time: 951 gc time: 44" "cpu time: 947 real time: 946 gc time: 40" "cpu time: 957 real time: 954 gc time: 49" "cpu time: 963 real time: 964 gc time: 43")) ("000101110" ("cpu time: 950 real time: 949 gc time: 40" "cpu time: 970 real time: 970 gc time: 43" "cpu time: 957 real time: 956 gc time: 43" "cpu time: 960 real time: 956 gc time: 46" "cpu time: 954 real time: 953 gc time: 43" "cpu time: 950 real time: 949 gc time: 40" "cpu time: 964 real time: 961 gc time: 44" "cpu time: 970 real time: 973 gc time: 40")) ("000101111" ("cpu time: 967 real time: 966 gc time: 50" "cpu time: 960 real time: 958 gc time: 43" "cpu time: 963 real time: 962 gc time: 43" "cpu time: 957 real time: 956 gc time: 43" "cpu time: 993 real time: 991 gc time: 43" "cpu time: 953 real time: 954 gc time: 43" "cpu time: 957 real time: 958 gc time: 43" "cpu time: 957 real time: 955 gc time: 40")) ("000110000" ("cpu time: 5110 real time: 5109 gc time: 67" "cpu time: 5063 real time: 5061 gc time: 60" "cpu time: 5086 real time: 5083 gc time: 63" "cpu time: 5083 real time: 5082 gc time: 63" "cpu time: 5080 real time: 5079 gc time: 63" "cpu time: 5117 real time: 5110 gc time: 57" "cpu time: 5063 real time: 5062 gc time: 60" "cpu time: 5057 real time: 5058 gc time: 56")) ("000110001" ("cpu time: 5044 real time: 5043 gc time: 40" "cpu time: 5057 real time: 5053 gc time: 40" "cpu time: 5994 real time: 5992 gc time: 40" "cpu time: 5024 real time: 5023 gc time: 37" "cpu time: 5194 real time: 5193 gc time: 47" "cpu time: 5064 real time: 5058 gc time: 44" "cpu time: 5020 real time: 5022 gc time: 44" "cpu time: 5100 real time: 5100 gc time: 40")) ("000110010" ("cpu time: 5110 real time: 5107 gc time: 44" "cpu time: 5060 real time: 5060 gc time: 40" "cpu time: 5060 real time: 5058 gc time: 40" "cpu time: 5070 real time: 5071 gc time: 40" "cpu time: 5070 real time: 5069 gc time: 40" "cpu time: 5067 real time: 5067 gc time: 40" "cpu time: 5150 real time: 5146 gc time: 50" "cpu time: 5054 real time: 5055 gc time: 40")) ("000110011" ("cpu time: 5060 real time: 5059 gc time: 40" "cpu time: 5087 real time: 5086 gc time: 37" "cpu time: 5097 real time: 5093 gc time: 43" "cpu time: 5073 real time: 5071 gc time: 43" "cpu time: 5170 real time: 5169 gc time: 40" "cpu time: 5094 real time: 5093 gc time: 36" "cpu time: 5100 real time: 5097 gc time: 40" "cpu time: 5060 real time: 5057 gc time: 40")) ("000110100" ("cpu time: 5303 real time: 5302 gc time: 43" "cpu time: 5027 real time: 5029 gc time: 43" "cpu time: 5026 real time: 5028 gc time: 44" "cpu time: 5020 real time: 5023 gc time: 40" "cpu time: 5097 real time: 5096 gc time: 44" "cpu time: 5223 real time: 5223 gc time: 43" "cpu time: 5110 real time: 5111 gc time: 40" "cpu time: 5273 real time: 5272 gc time: 43")) ("000110101" ("cpu time: 5037 real time: 5036 gc time: 40" "cpu time: 5080 real time: 5079 gc time: 40" "cpu time: 5057 real time: 5058 gc time: 50" "cpu time: 5047 real time: 5048 gc time: 40" "cpu time: 5080 real time: 5079 gc time: 40" "cpu time: 5047 real time: 5048 gc time: 43" "cpu time: 5000 real time: 4999 gc time: 44" "cpu time: 5044 real time: 5041 gc time: 44")) ("000110110" ("cpu time: 5013 real time: 5013 gc time: 43" "cpu time: 5043 real time: 5043 gc time: 40" "cpu time: 5010 real time: 5009 gc time: 43" "cpu time: 5026 real time: 5026 gc time: 43" "cpu time: 5126 real time: 5124 gc time: 43" "cpu time: 5030 real time: 5032 gc time: 40" "cpu time: 5020 real time: 5019 gc time: 40" "cpu time: 5023 real time: 5022 gc time: 43")) ("000110111" ("cpu time: 5014 real time: 5013 gc time: 48" "cpu time: 5023 real time: 5023 gc time: 44" "cpu time: 5040 real time: 5041 gc time: 44" "cpu time: 5067 real time: 5066 gc time: 40" "cpu time: 5030 real time: 5028 gc time: 43" "cpu time: 5010 real time: 5011 gc time: 40" "cpu time: 5020 real time: 5021 gc time: 43" "cpu time: 5036 real time: 5038 gc time: 40")) ("000111000" ("cpu time: 5190 real time: 5186 gc time: 40" "cpu time: 5100 real time: 5099 gc time: 40" "cpu time: 9560 real time: 9557 gc time: 40" "cpu time: 5210 real time: 5210 gc time: 37" "cpu time: 5323 real time: 5323 gc time: 40" "cpu time: 5123 real time: 5120 gc time: 43" "cpu time: 5126 real time: 5126 gc time: 40" "cpu time: 5153 real time: 5153 gc time: 40")) ("000111001" ("cpu time: 5170 real time: 5167 gc time: 43" "cpu time: 5097 real time: 5098 gc time: 40" "cpu time: 5084 real time: 5080 gc time: 40" "cpu time: 5090 real time: 5088 gc time: 40" "cpu time: 5117 real time: 5117 gc time: 40" "cpu time: 5200 real time: 5202 gc time: 43" "cpu time: 5093 real time: 5092 gc time: 44" "cpu time: 5146 real time: 5146 gc time: 46")) ("000111010" ("cpu time: 5180 real time: 5178 gc time: 40" "cpu time: 5140 real time: 5139 gc time: 44" "cpu time: 5153 real time: 5151 gc time: 40" "cpu time: 5147 real time: 5145 gc time: 40" "cpu time: 5124 real time: 5125 gc time: 40" "cpu time: 5120 real time: 5121 gc time: 40" "cpu time: 5180 real time: 5181 gc time: 40" "cpu time: 5110 real time: 5111 gc time: 44")) ("000111011" ("cpu time: 5373 real time: 5371 gc time: 40" "cpu time: 5140 real time: 5138 gc time: 40" "cpu time: 5100 real time: 5100 gc time: 43" "cpu time: 5100 real time: 5097 gc time: 40" "cpu time: 5100 real time: 5098 gc time: 44" "cpu time: 5097 real time: 5096 gc time: 40" "cpu time: 5133 real time: 5129 gc time: 44" "cpu time: 5180 real time: 5179 gc time: 43")) ("000111100" ("cpu time: 5086 real time: 5089 gc time: 47" "cpu time: 5103 real time: 5101 gc time: 43" "cpu time: 5120 real time: 5123 gc time: 40" "cpu time: 5100 real time: 5098 gc time: 44" "cpu time: 5116 real time: 5118 gc time: 40" "cpu time: 5273 real time: 5273 gc time: 43" "cpu time: 5097 real time: 5096 gc time: 43" "cpu time: 5156 real time: 5156 gc time: 44")) ("000111101" ("cpu time: 5196 real time: 5198 gc time: 40" "cpu time: 5083 real time: 5082 gc time: 47" "cpu time: 5153 real time: 5154 gc time: 43" "cpu time: 5183 real time: 5184 gc time: 43" "cpu time: 5114 real time: 5115 gc time: 40" "cpu time: 5200 real time: 5198 gc time: 40" "cpu time: 5103 real time: 5105 gc time: 40" "cpu time: 5230 real time: 5229 gc time: 43")) ("000111110" ("cpu time: 5224 real time: 5222 gc time: 43" "cpu time: 5200 real time: 5201 gc time: 48" "cpu time: 5090 real time: 5087 gc time: 40" "cpu time: 5184 real time: 5183 gc time: 40" "cpu time: 5087 real time: 5086 gc time: 49" "cpu time: 5114 real time: 5111 gc time: 43" "cpu time: 5067 real time: 5064 gc time: 43" "cpu time: 5277 real time: 5274 gc time: 43")) ("000111111" ("cpu time: 5283 real time: 5283 gc time: 44" "cpu time: 5050 real time: 5050 gc time: 43" "cpu time: 5073 real time: 5070 gc time: 43" "cpu time: 5093 real time: 5095 gc time: 43" "cpu time: 5127 real time: 5126 gc time: 40" "cpu time: 5163 real time: 5159 gc time: 43" "cpu time: 5153 real time: 5150 gc time: 44" "cpu time: 5086 real time: 5085 gc time: 43")) ("001000000" ("cpu time: 5470 real time: 5467 gc time: 46" "cpu time: 5513 real time: 5511 gc time: 50" "cpu time: 5467 real time: 5464 gc time: 68" "cpu time: 5487 real time: 5482 gc time: 43" "cpu time: 5474 real time: 5466 gc time: 50" "cpu time: 5480 real time: 5478 gc time: 47" "cpu time: 5460 real time: 5455 gc time: 63" "cpu time: 5486 real time: 5484 gc time: 43")) ("001000001" ("cpu time: 5604 real time: 5600 gc time: 55" "cpu time: 5550 real time: 5549 gc time: 57" "cpu time: 5620 real time: 5615 gc time: 58" "cpu time: 5620 real time: 5617 gc time: 48" "cpu time: 5583 real time: 5578 gc time: 49" "cpu time: 5643 real time: 5638 gc time: 67" "cpu time: 5550 real time: 5545 gc time: 50" "cpu time: 5583 real time: 5582 gc time: 55")) ("001000010" ("cpu time: 5474 real time: 5472 gc time: 60" "cpu time: 5597 real time: 5593 gc time: 49" "cpu time: 5500 real time: 5498 gc time: 50" "cpu time: 5490 real time: 5486 gc time: 61" "cpu time: 5656 real time: 5654 gc time: 52" "cpu time: 5547 real time: 5545 gc time: 46" "cpu time: 5550 real time: 5542 gc time: 48" "cpu time: 5526 real time: 5522 gc time: 61")) ("001000011" ("cpu time: 5694 real time: 5691 gc time: 46" "cpu time: 5543 real time: 5540 gc time: 57" "cpu time: 5600 real time: 5599 gc time: 43" "cpu time: 5583 real time: 5579 gc time: 52" "cpu time: 5583 real time: 5578 gc time: 47" "cpu time: 5584 real time: 5582 gc time: 67" "cpu time: 5586 real time: 5586 gc time: 52" "cpu time: 5643 real time: 5641 gc time: 68")) ("001000100" ("cpu time: 5513 real time: 5509 gc time: 65" "cpu time: 5473 real time: 5467 gc time: 58" "cpu time: 5483 real time: 5481 gc time: 50" "cpu time: 5543 real time: 5542 gc time: 53" "cpu time: 5480 real time: 5475 gc time: 58" "cpu time: 5533 real time: 5530 gc time: 44" "cpu time: 5467 real time: 5464 gc time: 53" "cpu time: 5527 real time: 5520 gc time: 50")) ("001000101" ("cpu time: 5587 real time: 5581 gc time: 59" "cpu time: 5617 real time: 5615 gc time: 52" "cpu time: 5553 real time: 5552 gc time: 44" "cpu time: 5587 real time: 5584 gc time: 55" "cpu time: 5550 real time: 5546 gc time: 47" "cpu time: 5673 real time: 5669 gc time: 58" "cpu time: 5556 real time: 5553 gc time: 44" "cpu time: 5704 real time: 5695 gc time: 50")) ("001000110" ("cpu time: 5523 real time: 5521 gc time: 53" "cpu time: 5523 real time: 5521 gc time: 43" "cpu time: 5540 real time: 5537 gc time: 44" "cpu time: 5520 real time: 5514 gc time: 51" "cpu time: 5526 real time: 5523 gc time: 47" "cpu time: 5526 real time: 5522 gc time: 47" "cpu time: 5540 real time: 5537 gc time: 58" "cpu time: 5627 real time: 5621 gc time: 55")) ("001000111" ("cpu time: 5563 real time: 5562 gc time: 46" "cpu time: 5577 real time: 5575 gc time: 53" "cpu time: 5563 real time: 5556 gc time: 67" "cpu time: 5583 real time: 5581 gc time: 56" "cpu time: 5593 real time: 5589 gc time: 60" "cpu time: 5554 real time: 5553 gc time: 65" "cpu time: 5623 real time: 5622 gc time: 46" "cpu time: 5553 real time: 5553 gc time: 53")) ("001001000" ("cpu time: 5324 real time: 5316 gc time: 52" "cpu time: 5340 real time: 5339 gc time: 69" "cpu time: 5397 real time: 5394 gc time: 77" "cpu time: 5437 real time: 5433 gc time: 37" "cpu time: 5347 real time: 5344 gc time: 83" "cpu time: 5326 real time: 5324 gc time: 57" "cpu time: 5360 real time: 5357 gc time: 53" "cpu time: 5344 real time: 5342 gc time: 63")) ("001001001" ("cpu time: 5390 real time: 5386 gc time: 63" "cpu time: 5590 real time: 5586 gc time: 53" "cpu time: 5414 real time: 5410 gc time: 53" "cpu time: 5397 real time: 5397 gc time: 50" "cpu time: 5380 real time: 5374 gc time: 48" "cpu time: 5367 real time: 5366 gc time: 43" "cpu time: 5440 real time: 5441 gc time: 40" "cpu time: 5570 real time: 5569 gc time: 47")) ("001001010" ("cpu time: 5307 real time: 5304 gc time: 47" "cpu time: 5297 real time: 5295 gc time: 58" "cpu time: 5453 real time: 5450 gc time: 53" "cpu time: 5387 real time: 5384 gc time: 57" "cpu time: 5347 real time: 5345 gc time: 44" "cpu time: 5330 real time: 5326 gc time: 46" "cpu time: 5420 real time: 5417 gc time: 60" "cpu time: 5410 real time: 5406 gc time: 60")) ("001001011" ("cpu time: 5453 real time: 5449 gc time: 43" "cpu time: 5387 real time: 5383 gc time: 50" "cpu time: 5380 real time: 5377 gc time: 56" "cpu time: 5397 real time: 5391 gc time: 56" "cpu time: 5363 real time: 5361 gc time: 46" "cpu time: 5523 real time: 5521 gc time: 40" "cpu time: 5383 real time: 5382 gc time: 51" "cpu time: 5466 real time: 5463 gc time: 47")) ("001001100" ("cpu time: 5337 real time: 5332 gc time: 53" "cpu time: 5293 real time: 5290 gc time: 43" "cpu time: 5314 real time: 5313 gc time: 53" "cpu time: 5317 real time: 5314 gc time: 57" "cpu time: 5310 real time: 5306 gc time: 63" "cpu time: 5287 real time: 5284 gc time: 56" "cpu time: 5310 real time: 5304 gc time: 61" "cpu time: 5333 real time: 5331 gc time: 50")) ("001001101" ("cpu time: 5380 real time: 5377 gc time: 57" "cpu time: 5407 real time: 5405 gc time: 53" "cpu time: 5363 real time: 5361 gc time: 57" "cpu time: 5360 real time: 5354 gc time: 50" "cpu time: 5360 real time: 5358 gc time: 58" "cpu time: 5330 real time: 5328 gc time: 40" "cpu time: 5343 real time: 5341 gc time: 48" "cpu time: 5390 real time: 5386 gc time: 62")) ("001001110" ("cpu time: 5337 real time: 5328 gc time: 46" "cpu time: 5334 real time: 5333 gc time: 64" "cpu time: 5427 real time: 5421 gc time: 46" "cpu time: 5343 real time: 5338 gc time: 46" "cpu time: 5326 real time: 5323 gc time: 48" "cpu time: 5357 real time: 5355 gc time: 43" "cpu time: 6313 real time: 6311 gc time: 52" "cpu time: 5476 real time: 5473 gc time: 47")) ("001001111" ("cpu time: 5387 real time: 5383 gc time: 43" "cpu time: 5380 real time: 5375 gc time: 40" "cpu time: 5383 real time: 5381 gc time: 43" "cpu time: 5373 real time: 5369 gc time: 54" "cpu time: 5374 real time: 5370 gc time: 62" "cpu time: 5466 real time: 5462 gc time: 70" "cpu time: 5403 real time: 5401 gc time: 50" "cpu time: 5420 real time: 5416 gc time: 46")) ("001010000" ("cpu time: 9567 real time: 9566 gc time: 66" "cpu time: 9787 real time: 9786 gc time: 40" "cpu time: 9407 real time: 9406 gc time: 40" "cpu time: 9380 real time: 9379 gc time: 63" "cpu time: 9370 real time: 9369 gc time: 77" "cpu time: 9390 real time: 9390 gc time: 46" "cpu time: 9400 real time: 9399 gc time: 63" "cpu time: 9573 real time: 9570 gc time: 77")) ("001010001" ("cpu time: 9424 real time: 9422 gc time: 47" "cpu time: 9387 real time: 9386 gc time: 44" "cpu time: 9587 real time: 9586 gc time: 63" "cpu time: 10686 real time: 10686 gc time: 46" "cpu time: 9590 real time: 9588 gc time: 63" "cpu time: 9460 real time: 9459 gc time: 55" "cpu time: 9420 real time: 9418 gc time: 40" "cpu time: 9470 real time: 9471 gc time: 37")) ("001010010" ("cpu time: 9410 real time: 9408 gc time: 59" "cpu time: 9403 real time: 9403 gc time: 46" "cpu time: 9443 real time: 9441 gc time: 57" "cpu time: 9524 real time: 9523 gc time: 65" "cpu time: 9517 real time: 9517 gc time: 64" "cpu time: 9514 real time: 9512 gc time: 48" "cpu time: 9537 real time: 9534 gc time: 53" "cpu time: 9420 real time: 9419 gc time: 44")) ("001010011" ("cpu time: 9753 real time: 9754 gc time: 53" "cpu time: 9450 real time: 9447 gc time: 54" "cpu time: 9473 real time: 9472 gc time: 36" "cpu time: 9423 real time: 9425 gc time: 57" "cpu time: 9530 real time: 9527 gc time: 53" "cpu time: 9443 real time: 9444 gc time: 66" "cpu time: 9477 real time: 9474 gc time: 46" "cpu time: 9486 real time: 9484 gc time: 60")) ("001010100" ("cpu time: 9403 real time: 9401 gc time: 53" "cpu time: 9293 real time: 9292 gc time: 40" "cpu time: 9286 real time: 9286 gc time: 56" "cpu time: 10334 real time: 10332 gc time: 53" "cpu time: 9296 real time: 9295 gc time: 56" "cpu time: 9327 real time: 9322 gc time: 47" "cpu time: 10327 real time: 10325 gc time: 50" "cpu time: 9337 real time: 9336 gc time: 58")) ("001010101" ("cpu time: 9456 real time: 9454 gc time: 54" "cpu time: 9470 real time: 9468 gc time: 58" "cpu time: 9443 real time: 9439 gc time: 60" "cpu time: 9510 real time: 9509 gc time: 40" "cpu time: 9630 real time: 9628 gc time: 60" "cpu time: 9503 real time: 9500 gc time: 50" "cpu time: 9487 real time: 9485 gc time: 47" "cpu time: 9423 real time: 9420 gc time: 43")) ("001010110" ("cpu time: 9700 real time: 9698 gc time: 40" "cpu time: 9357 real time: 9352 gc time: 53" "cpu time: 9577 real time: 9576 gc time: 43" "cpu time: 9346 real time: 9343 gc time: 49" "cpu time: 9443 real time: 9443 gc time: 40" "cpu time: 9473 real time: 9470 gc time: 50" "cpu time: 9404 real time: 9403 gc time: 43" "cpu time: 9633 real time: 9632 gc time: 59")) ("001010111" ("cpu time: 9467 real time: 9465 gc time: 61" "cpu time: 9373 real time: 9373 gc time: 62" "cpu time: 11240 real time: 11241 gc time: 50" "cpu time: 9376 real time: 9372 gc time: 58" "cpu time: 9387 real time: 9386 gc time: 53" "cpu time: 10174 real time: 10171 gc time: 50" "cpu time: 9390 real time: 9387 gc time: 47" "cpu time: 9410 real time: 9406 gc time: 51")) ("001011000" ("cpu time: 9263 real time: 9264 gc time: 40" "cpu time: 9250 real time: 9246 gc time: 46" "cpu time: 9307 real time: 9303 gc time: 49" "cpu time: 9223 real time: 9222 gc time: 40" "cpu time: 9364 real time: 9363 gc time: 50" "cpu time: 9407 real time: 9405 gc time: 51" "cpu time: 9247 real time: 9248 gc time: 56" "cpu time: 9260 real time: 9258 gc time: 56")) ("001011001" ("cpu time: 9300 real time: 9300 gc time: 40" "cpu time: 9337 real time: 9336 gc time: 64" "cpu time: 9384 real time: 9379 gc time: 46" "cpu time: 9353 real time: 9354 gc time: 127" "cpu time: 9334 real time: 9334 gc time: 40" "cpu time: 9320 real time: 9318 gc time: 56" "cpu time: 9450 real time: 9447 gc time: 69" "cpu time: 9323 real time: 9320 gc time: 40")) ("001011010" ("cpu time: 9407 real time: 9404 gc time: 48" "cpu time: 9343 real time: 9342 gc time: 66" "cpu time: 9287 real time: 9286 gc time: 50" "cpu time: 9410 real time: 9409 gc time: 40" "cpu time: 9330 real time: 9327 gc time: 46" "cpu time: 9243 real time: 9242 gc time: 57" "cpu time: 9273 real time: 9272 gc time: 57" "cpu time: 9567 real time: 9565 gc time: 56")) ("001011011" ("cpu time: 9327 real time: 9324 gc time: 47" "cpu time: 9284 real time: 9280 gc time: 58" "cpu time: 9320 real time: 9320 gc time: 40" "cpu time: 9373 real time: 9372 gc time: 54" "cpu time: 9423 real time: 9421 gc time: 44" "cpu time: 9340 real time: 9340 gc time: 49" "cpu time: 9333 real time: 9329 gc time: 57" "cpu time: 14693 real time: 14692 gc time: 55")) ("001011100" ("cpu time: 9153 real time: 9147 gc time: 44" "cpu time: 9600 real time: 9596 gc time: 40" "cpu time: 9220 real time: 9217 gc time: 50" "cpu time: 9193 real time: 9190 gc time: 43" "cpu time: 9140 real time: 9141 gc time: 60" "cpu time: 9150 real time: 9149 gc time: 44" "cpu time: 9127 real time: 9125 gc time: 66" "cpu time: 9167 real time: 9169 gc time: 58")) ("001011101" ("cpu time: 9253 real time: 9251 gc time: 43" "cpu time: 9180 real time: 9182 gc time: 46" "cpu time: 11083 real time: 11083 gc time: 66" "cpu time: 9254 real time: 9250 gc time: 53" "cpu time: 9153 real time: 9152 gc time: 47" "cpu time: 9226 real time: 9221 gc time: 59" "cpu time: 9186 real time: 9183 gc time: 43" "cpu time: 9247 real time: 9248 gc time: 50")) ("001011110" ("cpu time: 9243 real time: 9242 gc time: 43" "cpu time: 9313 real time: 9311 gc time: 52" "cpu time: 9364 real time: 9365 gc time: 40" "cpu time: 9233 real time: 9234 gc time: 43" "cpu time: 9223 real time: 9223 gc time: 64" "cpu time: 9347 real time: 9343 gc time: 61" "cpu time: 9423 real time: 9422 gc time: 47" "cpu time: 9400 real time: 9394 gc time: 50")) ("001011111" ("cpu time: 9203 real time: 9202 gc time: 47" "cpu time: 9237 real time: 9237 gc time: 50" "cpu time: 9233 real time: 9233 gc time: 50" "cpu time: 9224 real time: 9220 gc time: 53" "cpu time: 9424 real time: 9422 gc time: 50" "cpu time: 9400 real time: 9399 gc time: 48" "cpu time: 9220 real time: 9217 gc time: 67" "cpu time: 9230 real time: 9230 gc time: 56")) ("001100000" ("cpu time: 5777 real time: 5772 gc time: 67" "cpu time: 5470 real time: 5467 gc time: 41" "cpu time: 5513 real time: 5510 gc time: 63" "cpu time: 5510 real time: 5505 gc time: 43" "cpu time: 5450 real time: 5446 gc time: 46" "cpu time: 5543 real time: 5539 gc time: 50" "cpu time: 5687 real time: 5681 gc time: 53" "cpu time: 5503 real time: 5501 gc time: 66")) ("001100001" ("cpu time: 5560 real time: 5556 gc time: 55" "cpu time: 5574 real time: 5573 gc time: 55" "cpu time: 5590 real time: 5586 gc time: 58" "cpu time: 5534 real time: 5530 gc time: 54" "cpu time: 5543 real time: 5543 gc time: 60" "cpu time: 5607 real time: 5608 gc time: 50" "cpu time: 5550 real time: 5548 gc time: 72" "cpu time: 5614 real time: 5612 gc time: 63")) ("001100010" ("cpu time: 5473 real time: 5471 gc time: 47" "cpu time: 5500 real time: 5497 gc time: 46" "cpu time: 5423 real time: 5424 gc time: 54" "cpu time: 5557 real time: 5555 gc time: 43" "cpu time: 5460 real time: 5456 gc time: 51" "cpu time: 5464 real time: 5458 gc time: 47" "cpu time: 5496 real time: 5494 gc time: 43" "cpu time: 5473 real time: 5469 gc time: 62")) ("001100011" ("cpu time: 5834 real time: 5829 gc time: 50" "cpu time: 5540 real time: 5536 gc time: 40" "cpu time: 5650 real time: 5648 gc time: 47" "cpu time: 5520 real time: 5518 gc time: 54" "cpu time: 5567 real time: 5563 gc time: 43" "cpu time: 5576 real time: 5575 gc time: 57" "cpu time: 5577 real time: 5576 gc time: 50" "cpu time: 5596 real time: 5593 gc time: 47")) ("001100100" ("cpu time: 5503 real time: 5500 gc time: 70" "cpu time: 5474 real time: 5468 gc time: 53" "cpu time: 5520 real time: 5517 gc time: 46" "cpu time: 5530 real time: 5530 gc time: 59" "cpu time: 5490 real time: 5487 gc time: 47" "cpu time: 5500 real time: 5495 gc time: 46" "cpu time: 5473 real time: 5467 gc time: 58" "cpu time: 5547 real time: 5544 gc time: 64")) ("001100101" ("cpu time: 5543 real time: 5538 gc time: 58" "cpu time: 5600 real time: 5592 gc time: 57" "cpu time: 5534 real time: 5527 gc time: 53" "cpu time: 5543 real time: 5542 gc time: 64" "cpu time: 5563 real time: 5555 gc time: 49" "cpu time: 5553 real time: 5550 gc time: 63" "cpu time: 5573 real time: 5571 gc time: 67" "cpu time: 5527 real time: 5525 gc time: 44")) ("001100110" ("cpu time: 5533 real time: 5528 gc time: 67" "cpu time: 5510 real time: 5507 gc time: 44" "cpu time: 5513 real time: 5511 gc time: 59" "cpu time: 5530 real time: 5526 gc time: 52" "cpu time: 5654 real time: 5651 gc time: 50" "cpu time: 5486 real time: 5483 gc time: 52" "cpu time: 5553 real time: 5550 gc time: 74" "cpu time: 5500 real time: 5497 gc time: 54")) ("001100111" ("cpu time: 5623 real time: 5620 gc time: 64" "cpu time: 5593 real time: 5589 gc time: 53" "cpu time: 5613 real time: 5608 gc time: 55" "cpu time: 5597 real time: 5591 gc time: 46" "cpu time: 5606 real time: 5604 gc time: 44" "cpu time: 5550 real time: 5545 gc time: 43" "cpu time: 5626 real time: 5622 gc time: 48" "cpu time: 5560 real time: 5555 gc time: 46")) ("001101000" ("cpu time: 5280 real time: 5277 gc time: 70" "cpu time: 5343 real time: 5340 gc time: 76" "cpu time: 5430 real time: 5429 gc time: 56" "cpu time: 5403 real time: 5402 gc time: 60" "cpu time: 5437 real time: 5433 gc time: 56" "cpu time: 5393 real time: 5390 gc time: 43" "cpu time: 5300 real time: 5298 gc time: 60" "cpu time: 5293 real time: 5292 gc time: 50")) ("001101001" ("cpu time: 5330 real time: 5326 gc time: 63" "cpu time: 5417 real time: 5414 gc time: 53" "cpu time: 5440 real time: 5437 gc time: 61" "cpu time: 5367 real time: 5361 gc time: 47" "cpu time: 5373 real time: 5367 gc time: 61" "cpu time: 5350 real time: 5344 gc time: 54" "cpu time: 5374 real time: 5370 gc time: 53" "cpu time: 5413 real time: 5411 gc time: 51")) ("001101010" ("cpu time: 5287 real time: 5282 gc time: 57" "cpu time: 5283 real time: 5280 gc time: 64" "cpu time: 5286 real time: 5285 gc time: 60" "cpu time: 5243 real time: 5237 gc time: 47" "cpu time: 5314 real time: 5312 gc time: 68" "cpu time: 5287 real time: 5282 gc time: 50" "cpu time: 5297 real time: 5296 gc time: 40" "cpu time: 5257 real time: 5254 gc time: 47")) ("001101011" ("cpu time: 5370 real time: 5367 gc time: 44" "cpu time: 5490 real time: 5484 gc time: 63" "cpu time: 5370 real time: 5368 gc time: 44" "cpu time: 5447 real time: 5444 gc time: 52" "cpu time: 5500 real time: 5494 gc time: 55" "cpu time: 5394 real time: 5390 gc time: 46" "cpu time: 5434 real time: 5431 gc time: 49" "cpu time: 5494 real time: 5493 gc time: 57")) ("001101100" ("cpu time: 5407 real time: 5402 gc time: 46" "cpu time: 5326 real time: 5326 gc time: 52" "cpu time: 5307 real time: 5302 gc time: 60" "cpu time: 5326 real time: 5321 gc time: 53" "cpu time: 5293 real time: 5290 gc time: 51" "cpu time: 5363 real time: 5361 gc time: 79" "cpu time: 5343 real time: 5341 gc time: 58" "cpu time: 5320 real time: 5317 gc time: 54")) ("001101101" ("cpu time: 5400 real time: 5398 gc time: 56" "cpu time: 5356 real time: 5350 gc time: 44" "cpu time: 5410 real time: 5407 gc time: 56" "cpu time: 5397 real time: 5389 gc time: 43" "cpu time: 5367 real time: 5360 gc time: 53" "cpu time: 5417 real time: 5416 gc time: 47" "cpu time: 5486 real time: 5483 gc time: 55" "cpu time: 5397 real time: 5394 gc time: 46")) ("001101110" ("cpu time: 5394 real time: 5391 gc time: 46" "cpu time: 5343 real time: 5339 gc time: 57" "cpu time: 5323 real time: 5319 gc time: 55" "cpu time: 5323 real time: 5321 gc time: 58" "cpu time: 5313 real time: 5313 gc time: 40" "cpu time: 5323 real time: 5320 gc time: 48" "cpu time: 5310 real time: 5310 gc time: 68" "cpu time: 5343 real time: 5338 gc time: 46")) ("001101111" ("cpu time: 5383 real time: 5378 gc time: 48" "cpu time: 5390 real time: 5388 gc time: 56" "cpu time: 5440 real time: 5440 gc time: 53" "cpu time: 5416 real time: 5413 gc time: 44" "cpu time: 5383 real time: 5381 gc time: 60" "cpu time: 5387 real time: 5383 gc time: 56" "cpu time: 5440 real time: 5438 gc time: 49" "cpu time: 5447 real time: 5444 gc time: 50")) ("001110000" ("cpu time: 9417 real time: 9417 gc time: 62" "cpu time: 9454 real time: 9451 gc time: 70" "cpu time: 9384 real time: 9381 gc time: 56" "cpu time: 9377 real time: 9372 gc time: 47" "cpu time: 9400 real time: 9397 gc time: 51" "cpu time: 9356 real time: 9353 gc time: 56" "cpu time: 9393 real time: 9392 gc time: 59" "cpu time: 9366 real time: 9367 gc time: 56")) ("001110001" ("cpu time: 9457 real time: 9453 gc time: 46" "cpu time: 9414 real time: 9411 gc time: 40" "cpu time: 9413 real time: 9409 gc time: 56" "cpu time: 9444 real time: 9441 gc time: 50" "cpu time: 9447 real time: 9445 gc time: 54" "cpu time: 9386 real time: 9384 gc time: 43" "cpu time: 9504 real time: 9498 gc time: 51" "cpu time: 9490 real time: 9487 gc time: 61")) ("001110010" ("cpu time: 9400 real time: 9400 gc time: 66" "cpu time: 9440 real time: 9438 gc time: 47" "cpu time: 9446 real time: 9446 gc time: 54" "cpu time: 9400 real time: 9396 gc time: 50" "cpu time: 9464 real time: 9460 gc time: 59" "cpu time: 9393 real time: 9391 gc time: 53" "cpu time: 9400 real time: 9398 gc time: 53" "cpu time: 9427 real time: 9427 gc time: 50")) ("001110011" ("cpu time: 9610 real time: 9608 gc time: 54" "cpu time: 9484 real time: 9483 gc time: 53" "cpu time: 9463 real time: 9463 gc time: 48" "cpu time: 9480 real time: 9481 gc time: 51" "cpu time: 9440 real time: 9438 gc time: 44" "cpu time: 9440 real time: 9441 gc time: 56" "cpu time: 9520 real time: 9517 gc time: 60" "cpu time: 9480 real time: 9477 gc time: 43")) ("001110100" ("cpu time: 9373 real time: 9369 gc time: 51" "cpu time: 9440 real time: 9441 gc time: 53" "cpu time: 9416 real time: 9413 gc time: 49" "cpu time: 9356 real time: 9355 gc time: 44" "cpu time: 9310 real time: 9306 gc time: 46" "cpu time: 9307 real time: 9305 gc time: 47" "cpu time: 9340 real time: 9337 gc time: 53" "cpu time: 9340 real time: 9336 gc time: 50")) ("001110101" ("cpu time: 9380 real time: 9377 gc time: 54" "cpu time: 9383 real time: 9384 gc time: 62" "cpu time: 9410 real time: 9409 gc time: 43" "cpu time: 9466 real time: 9463 gc time: 44" "cpu time: 9457 real time: 9457 gc time: 54" "cpu time: 9433 real time: 9428 gc time: 52" "cpu time: 9377 real time: 9376 gc time: 48" "cpu time: 13156 real time: 13156 gc time: 53")) ("001110110" ("cpu time: 9340 real time: 9339 gc time: 56" "cpu time: 9323 real time: 9319 gc time: 65" "cpu time: 9393 real time: 9393 gc time: 53" "cpu time: 9353 real time: 9351 gc time: 43" "cpu time: 9350 real time: 9345 gc time: 47" "cpu time: 9336 real time: 9333 gc time: 62" "cpu time: 9390 real time: 9389 gc time: 67" "cpu time: 9450 real time: 9447 gc time: 52")) ("001110111" ("cpu time: 9517 real time: 9515 gc time: 60" "cpu time: 9413 real time: 9411 gc time: 46" "cpu time: 9577 real time: 9576 gc time: 46" "cpu time: 9353 real time: 9351 gc time: 56" "cpu time: 9530 real time: 9530 gc time: 63" "cpu time: 9370 real time: 9368 gc time: 66" "cpu time: 9517 real time: 9514 gc time: 61" "cpu time: 9453 real time: 9451 gc time: 50")) ("001111000" ("cpu time: 9290 real time: 9289 gc time: 50" "cpu time: 9200 real time: 9198 gc time: 47" "cpu time: 9230 real time: 9229 gc time: 57" "cpu time: 9320 real time: 9317 gc time: 43" "cpu time: 9340 real time: 9338 gc time: 40" "cpu time: 9464 real time: 9464 gc time: 57" "cpu time: 9196 real time: 9198 gc time: 43" "cpu time: 9337 real time: 9336 gc time: 52")) ("001111001" ("cpu time: 9236 real time: 9234 gc time: 50" "cpu time: 9280 real time: 9280 gc time: 54" "cpu time: 9423 real time: 9417 gc time: 40" "cpu time: 9303 real time: 9300 gc time: 47" "cpu time: 9234 real time: 9233 gc time: 66" "cpu time: 9283 real time: 9283 gc time: 43" "cpu time: 9257 real time: 9254 gc time: 50" "cpu time: 9340 real time: 9337 gc time: 48")) ("001111010" ("cpu time: 9367 real time: 9367 gc time: 60" "cpu time: 9277 real time: 9276 gc time: 68" "cpu time: 9217 real time: 9216 gc time: 53" "cpu time: 9257 real time: 9254 gc time: 50" "cpu time: 9233 real time: 9234 gc time: 60" "cpu time: 9330 real time: 9330 gc time: 52" "cpu time: 9247 real time: 9245 gc time: 56" "cpu time: 9423 real time: 9419 gc time: 66")) ("001111011" ("cpu time: 9260 real time: 9257 gc time: 60" "cpu time: 9284 real time: 9282 gc time: 57" "cpu time: 9390 real time: 9390 gc time: 63" "cpu time: 9334 real time: 9333 gc time: 53" "cpu time: 9334 real time: 9331 gc time: 55" "cpu time: 9304 real time: 9301 gc time: 43" "cpu time: 9287 real time: 9282 gc time: 53" "cpu time: 9367 real time: 9367 gc time: 70")) ("001111100" ("cpu time: 9463 real time: 9463 gc time: 79" "cpu time: 9110 real time: 9111 gc time: 50" "cpu time: 9116 real time: 9110 gc time: 43" "cpu time: 9280 real time: 9280 gc time: 56" "cpu time: 9247 real time: 9247 gc time: 49" "cpu time: 9113 real time: 9111 gc time: 50" "cpu time: 9116 real time: 9117 gc time: 43" "cpu time: 9210 real time: 9207 gc time: 62")) ("001111101" ("cpu time: 9176 real time: 9178 gc time: 66" "cpu time: 9196 real time: 9196 gc time: 40" "cpu time: 9210 real time: 9208 gc time: 50" "cpu time: 9236 real time: 9233 gc time: 52" "cpu time: 9390 real time: 9388 gc time: 67" "cpu time: 9200 real time: 9196 gc time: 57" "cpu time: 9187 real time: 9183 gc time: 87" "cpu time: 9213 real time: 9213 gc time: 53")) ("001111110" ("cpu time: 9166 real time: 9163 gc time: 50" "cpu time: 9154 real time: 9152 gc time: 43" "cpu time: 9280 real time: 9275 gc time: 47" "cpu time: 9266 real time: 9265 gc time: 56" "cpu time: 9373 real time: 9370 gc time: 44" "cpu time: 9167 real time: 9164 gc time: 50" "cpu time: 9146 real time: 9147 gc time: 40" "cpu time: 9313 real time: 9312 gc time: 57")) ("001111111" ("cpu time: 9216 real time: 9213 gc time: 49" "cpu time: 9236 real time: 9237 gc time: 68" "cpu time: 9267 real time: 9267 gc time: 51" "cpu time: 9253 real time: 9256 gc time: 46" "cpu time: 9246 real time: 9246 gc time: 47" "cpu time: 9267 real time: 9264 gc time: 62" "cpu time: 9254 real time: 9253 gc time: 57" "cpu time: 9247 real time: 9245 gc time: 40")) ("010000000" ("cpu time: 6397 real time: 6397 gc time: 54" "cpu time: 6380 real time: 6377 gc time: 54" "cpu time: 6333 real time: 6333 gc time: 47" "cpu time: 6320 real time: 6320 gc time: 46" "cpu time: 6426 real time: 6423 gc time: 72" "cpu time: 6337 real time: 6332 gc time: 40" "cpu time: 6467 real time: 6466 gc time: 40" "cpu time: 6466 real time: 6465 gc time: 49")) ("010000001" ("cpu time: 6460 real time: 6456 gc time: 43" "cpu time: 6393 real time: 6393 gc time: 44" "cpu time: 6407 real time: 6406 gc time: 50" "cpu time: 6387 real time: 6386 gc time: 43" "cpu time: 6626 real time: 6629 gc time: 44" "cpu time: 6424 real time: 6420 gc time: 47" "cpu time: 6470 real time: 6468 gc time: 47" "cpu time: 6440 real time: 6437 gc time: 40")) ("010000010" ("cpu time: 6443 real time: 6442 gc time: 60" "cpu time: 6297 real time: 6293 gc time: 40" "cpu time: 6337 real time: 6331 gc time: 49" "cpu time: 6330 real time: 6332 gc time: 40" "cpu time: 6336 real time: 6332 gc time: 40" "cpu time: 6337 real time: 6331 gc time: 53" "cpu time: 6370 real time: 6367 gc time: 54" "cpu time: 6337 real time: 6337 gc time: 50")) ("010000011" ("cpu time: 6340 real time: 6338 gc time: 59" "cpu time: 6383 real time: 6382 gc time: 40" "cpu time: 6290 real time: 6290 gc time: 47" "cpu time: 6347 real time: 6347 gc time: 43" "cpu time: 6317 real time: 6315 gc time: 43" "cpu time: 6320 real time: 6317 gc time: 46" "cpu time: 6370 real time: 6365 gc time: 54" "cpu time: 6360 real time: 6361 gc time: 36")) ("010000100" ("cpu time: 6423 real time: 6422 gc time: 59" "cpu time: 6437 real time: 6435 gc time: 64" "cpu time: 6463 real time: 6461 gc time: 58" "cpu time: 6417 real time: 6413 gc time: 46" "cpu time: 6470 real time: 6467 gc time: 44" "cpu time: 6423 real time: 6418 gc time: 52" "cpu time: 6416 real time: 6415 gc time: 43" "cpu time: 6420 real time: 6417 gc time: 49")) ("010000101" ("cpu time: 6553 real time: 6551 gc time: 43" "cpu time: 6434 real time: 6433 gc time: 44" "cpu time: 6450 real time: 6451 gc time: 53" "cpu time: 7534 real time: 7533 gc time: 40" "cpu time: 6477 real time: 6476 gc time: 50" "cpu time: 6520 real time: 6521 gc time: 50" "cpu time: 6810 real time: 6806 gc time: 43" "cpu time: 6537 real time: 6536 gc time: 61")) ("010000110" ("cpu time: 6343 real time: 6340 gc time: 43" "cpu time: 6367 real time: 6364 gc time: 44" "cpu time: 6364 real time: 6359 gc time: 47" "cpu time: 6273 real time: 6270 gc time: 44" "cpu time: 6304 real time: 6302 gc time: 50" "cpu time: 6280 real time: 6276 gc time: 46" "cpu time: 6470 real time: 6466 gc time: 50" "cpu time: 6367 real time: 6365 gc time: 43")) ("010000111" ("cpu time: 6343 real time: 6340 gc time: 43" "cpu time: 6300 real time: 6296 gc time: 56" "cpu time: 6453 real time: 6453 gc time: 46" "cpu time: 6453 real time: 6453 gc time: 73" "cpu time: 6317 real time: 6313 gc time: 68" "cpu time: 6333 real time: 6335 gc time: 50" "cpu time: 6347 real time: 6345 gc time: 53" "cpu time: 6387 real time: 6385 gc time: 55")) ("010001000" ("cpu time: 6483 real time: 6483 gc time: 37" "cpu time: 6437 real time: 6435 gc time: 40" "cpu time: 6400 real time: 6399 gc time: 46" "cpu time: 6640 real time: 6636 gc time: 44" "cpu time: 6403 real time: 6402 gc time: 40" "cpu time: 6467 real time: 6466 gc time: 40" "cpu time: 6413 real time: 6410 gc time: 40" "cpu time: 6413 real time: 6408 gc time: 40")) ("010001001" ("cpu time: 6486 real time: 6485 gc time: 44" "cpu time: 6503 real time: 6498 gc time: 53" "cpu time: 6703 real time: 6699 gc time: 49" "cpu time: 6520 real time: 6517 gc time: 64" "cpu time: 6467 real time: 6465 gc time: 46" "cpu time: 6490 real time: 6487 gc time: 56" "cpu time: 6647 real time: 6647 gc time: 54" "cpu time: 6516 real time: 6513 gc time: 47")) ("010001010" ("cpu time: 6520 real time: 6520 gc time: 42" "cpu time: 6383 real time: 6377 gc time: 40" "cpu time: 6434 real time: 6432 gc time: 48" "cpu time: 6444 real time: 6442 gc time: 41" "cpu time: 6390 real time: 6389 gc time: 47" "cpu time: 6407 real time: 6405 gc time: 40" "cpu time: 6447 real time: 6445 gc time: 43" "cpu time: 6414 real time: 6413 gc time: 40")) ("010001011" ("cpu time: 6353 real time: 6352 gc time: 40" "cpu time: 6520 real time: 6518 gc time: 65" "cpu time: 6344 real time: 6343 gc time: 56" "cpu time: 6587 real time: 6586 gc time: 53" "cpu time: 6377 real time: 6373 gc time: 66" "cpu time: 6400 real time: 6400 gc time: 50" "cpu time: 6553 real time: 6552 gc time: 49" "cpu time: 6377 real time: 6374 gc time: 56")) ("010001100" ("cpu time: 6487 real time: 6482 gc time: 75" "cpu time: 6550 real time: 6547 gc time: 43" "cpu time: 6490 real time: 6487 gc time: 50" "cpu time: 6500 real time: 6499 gc time: 50" "cpu time: 6577 real time: 6575 gc time: 53" "cpu time: 6480 real time: 6474 gc time: 54" "cpu time: 6543 real time: 6543 gc time: 54" "cpu time: 6567 real time: 6567 gc time: 40")) ("010001101" ("cpu time: 6597 real time: 6592 gc time: 46" "cpu time: 6550 real time: 6548 gc time: 56" "cpu time: 6507 real time: 6507 gc time: 47" "cpu time: 6533 real time: 6532 gc time: 40" "cpu time: 6510 real time: 6510 gc time: 53" "cpu time: 6550 real time: 6544 gc time: 46" "cpu time: 6554 real time: 6553 gc time: 40" "cpu time: 6587 real time: 6589 gc time: 54")) ("010001110" ("cpu time: 6550 real time: 6547 gc time: 50" "cpu time: 8480 real time: 8479 gc time: 72" "cpu time: 6373 real time: 6369 gc time: 56" "cpu time: 6476 real time: 6472 gc time: 43" "cpu time: 6443 real time: 6440 gc time: 49" "cpu time: 8613 real time: 8614 gc time: 47" "cpu time: 6377 real time: 6377 gc time: 43" "cpu time: 6446 real time: 6445 gc time: 47")) ("010001111" ("cpu time: 6440 real time: 6436 gc time: 46" "cpu time: 6380 real time: 6378 gc time: 43" "cpu time: 6453 real time: 6449 gc time: 43" "cpu time: 6527 real time: 6524 gc time: 60" "cpu time: 6357 real time: 6353 gc time: 43" "cpu time: 6424 real time: 6423 gc time: 43" "cpu time: 6447 real time: 6444 gc time: 44" "cpu time: 6417 real time: 6416 gc time: 44")) ("010010000" ("cpu time: 4373 real time: 4374 gc time: 40" "cpu time: 4393 real time: 4392 gc time: 40" "cpu time: 4370 real time: 4369 gc time: 44" "cpu time: 4383 real time: 4380 gc time: 40" "cpu time: 4383 real time: 4382 gc time: 40" "cpu time: 4390 real time: 4390 gc time: 43" "cpu time: 4380 real time: 4381 gc time: 40" "cpu time: 4410 real time: 4410 gc time: 40")) ("010010001" ("cpu time: 4374 real time: 4371 gc time: 40" "cpu time: 4374 real time: 4372 gc time: 40" "cpu time: 4390 real time: 4392 gc time: 40" "cpu time: 4377 real time: 4374 gc time: 40" "cpu time: 4370 real time: 4369 gc time: 40" "cpu time: 4366 real time: 4366 gc time: 40" "cpu time: 4390 real time: 4387 gc time: 43" "cpu time: 4370 real time: 4367 gc time: 40")) ("010010010" ("cpu time: 4324 real time: 4325 gc time: 40" "cpu time: 4336 real time: 4335 gc time: 40" "cpu time: 4344 real time: 4346 gc time: 37" "cpu time: 4333 real time: 4334 gc time: 43" "cpu time: 4390 real time: 4389 gc time: 40" "cpu time: 4347 real time: 4346 gc time: 40" "cpu time: 4323 real time: 4322 gc time: 40" "cpu time: 4336 real time: 4335 gc time: 40")) ("010010011" ("cpu time: 4374 real time: 4372 gc time: 40" "cpu time: 4360 real time: 4357 gc time: 40" "cpu time: 4340 real time: 4338 gc time: 43" "cpu time: 4357 real time: 4355 gc time: 44" "cpu time: 4363 real time: 4361 gc time: 40" "cpu time: 4350 real time: 4350 gc time: 40" "cpu time: 4354 real time: 4355 gc time: 40" "cpu time: 4350 real time: 4351 gc time: 40")) ("010010100" ("cpu time: 4340 real time: 4338 gc time: 43" "cpu time: 4363 real time: 4361 gc time: 40" "cpu time: 4330 real time: 4332 gc time: 40" "cpu time: 4354 real time: 4351 gc time: 43" "cpu time: 4317 real time: 4317 gc time: 43" "cpu time: 4344 real time: 4341 gc time: 46" "cpu time: 4347 real time: 4349 gc time: 43" "cpu time: 4380 real time: 4381 gc time: 40")) ("010010101" ("cpu time: 4303 real time: 4304 gc time: 44" "cpu time: 4303 real time: 4303 gc time: 43" "cpu time: 4293 real time: 4293 gc time: 40" "cpu time: 4284 real time: 4283 gc time: 40" "cpu time: 4317 real time: 4316 gc time: 43" "cpu time: 4330 real time: 4328 gc time: 43" "cpu time: 4297 real time: 4295 gc time: 44" "cpu time: 4293 real time: 4292 gc time: 40")) ("010010110" ("cpu time: 3284 real time: 3284 gc time: 44" "cpu time: 3320 real time: 3318 gc time: 40" "cpu time: 3313 real time: 3309 gc time: 44" "cpu time: 3266 real time: 3268 gc time: 44" "cpu time: 3273 real time: 3273 gc time: 47" "cpu time: 3320 real time: 3316 gc time: 46" "cpu time: 3373 real time: 3374 gc time: 40" "cpu time: 3323 real time: 3323 gc time: 43")) ("010010111" ("cpu time: 3250 real time: 3252 gc time: 43" "cpu time: 3260 real time: 3259 gc time: 43" "cpu time: 3280 real time: 3280 gc time: 40" "cpu time: 3263 real time: 3264 gc time: 40" "cpu time: 3253 real time: 3256 gc time: 40" "cpu time: 3270 real time: 3269 gc time: 43" "cpu time: 3283 real time: 3282 gc time: 40" "cpu time: 3336 real time: 3338 gc time: 40")) ("010011000" ("cpu time: 4464 real time: 4462 gc time: 40" "cpu time: 4453 real time: 4448 gc time: 46" "cpu time: 4527 real time: 4525 gc time: 47" "cpu time: 4460 real time: 4461 gc time: 43" "cpu time: 4433 real time: 4433 gc time: 40" "cpu time: 4444 real time: 4443 gc time: 40" "cpu time: 4450 real time: 4445 gc time: 40" "cpu time: 4456 real time: 4456 gc time: 43")) ("010011001" ("cpu time: 4443 real time: 4442 gc time: 40" "cpu time: 4470 real time: 4472 gc time: 44" "cpu time: 4434 real time: 4434 gc time: 43" "cpu time: 4433 real time: 4431 gc time: 40" "cpu time: 4430 real time: 4434 gc time: 37" "cpu time: 4454 real time: 4452 gc time: 43" "cpu time: 4437 real time: 4436 gc time: 37" "cpu time: 4420 real time: 4421 gc time: 43")) ("010011010" ("cpu time: 4620 real time: 4622 gc time: 40" "cpu time: 4377 real time: 4376 gc time: 40" "cpu time: 4493 real time: 4490 gc time: 40" "cpu time: 4507 real time: 4506 gc time: 40" "cpu time: 4390 real time: 4386 gc time: 43" "cpu time: 4387 real time: 4384 gc time: 47" "cpu time: 4390 real time: 4391 gc time: 40" "cpu time: 4397 real time: 4394 gc time: 40")) ("010011011" ("cpu time: 4420 real time: 4422 gc time: 40" "cpu time: 4430 real time: 4428 gc time: 40" "cpu time: 4434 real time: 4433 gc time: 50" "cpu time: 4437 real time: 4437 gc time: 40" "cpu time: 4413 real time: 4412 gc time: 40" "cpu time: 4437 real time: 4436 gc time: 43" "cpu time: 4440 real time: 4439 gc time: 43" "cpu time: 4437 real time: 4437 gc time: 40")) ("010011100" ("cpu time: 4393 real time: 4394 gc time: 44" "cpu time: 4403 real time: 4404 gc time: 44" "cpu time: 4380 real time: 4380 gc time: 40" "cpu time: 4390 real time: 4391 gc time: 40" "cpu time: 4410 real time: 4410 gc time: 43" "cpu time: 4410 real time: 4410 gc time: 43" "cpu time: 4406 real time: 4407 gc time: 44" "cpu time: 4444 real time: 4445 gc time: 44")) ("010011101" ("cpu time: 4350 real time: 4346 gc time: 44" "cpu time: 4383 real time: 4382 gc time: 43" "cpu time: 4333 real time: 4335 gc time: 40" "cpu time: 4356 real time: 4355 gc time: 43" "cpu time: 4430 real time: 4429 gc time: 43" "cpu time: 4336 real time: 4332 gc time: 43" "cpu time: 4360 real time: 4359 gc time: 40" "cpu time: 4390 real time: 4390 gc time: 40")) ("010011110" ("cpu time: 3497 real time: 3493 gc time: 44" "cpu time: 3350 real time: 3352 gc time: 43" "cpu time: 3336 real time: 3335 gc time: 43" "cpu time: 4614 real time: 4614 gc time: 43" "cpu time: 3363 real time: 3364 gc time: 50" "cpu time: 3333 real time: 3333 gc time: 43" "cpu time: 3350 real time: 3348 gc time: 43" "cpu time: 3330 real time: 3331 gc time: 43")) ("010011111" ("cpu time: 3323 real time: 3318 gc time: 47" "cpu time: 3320 real time: 3322 gc time: 43" "cpu time: 3310 real time: 3308 gc time: 43" "cpu time: 3300 real time: 3302 gc time: 43" "cpu time: 3317 real time: 3319 gc time: 43" "cpu time: 3310 real time: 3310 gc time: 40" "cpu time: 3324 real time: 3321 gc time: 40" "cpu time: 3330 real time: 3328 gc time: 40")) ("010100000" ("cpu time: 6457 real time: 6456 gc time: 44" "cpu time: 6330 real time: 6328 gc time: 49" "cpu time: 6343 real time: 6341 gc time: 44" "cpu time: 6360 real time: 6355 gc time: 56" "cpu time: 6350 real time: 6350 gc time: 63" "cpu time: 6400 real time: 6398 gc time: 50" "cpu time: 6334 real time: 6332 gc time: 43" "cpu time: 6330 real time: 6329 gc time: 40")) ("010100001" ("cpu time: 6430 real time: 6428 gc time: 50" "cpu time: 6556 real time: 6554 gc time: 56" "cpu time: 6403 real time: 6402 gc time: 46" "cpu time: 6463 real time: 6460 gc time: 40" "cpu time: 6397 real time: 6393 gc time: 50" "cpu time: 6430 real time: 6426 gc time: 43" "cpu time: 6424 real time: 6422 gc time: 49" "cpu time: 6673 real time: 6675 gc time: 57")) ("010100010" ("cpu time: 6304 real time: 6301 gc time: 57" "cpu time: 6290 real time: 6289 gc time: 47" "cpu time: 6323 real time: 6320 gc time: 56" "cpu time: 6404 real time: 6401 gc time: 46" "cpu time: 6330 real time: 6328 gc time: 53" "cpu time: 6340 real time: 6338 gc time: 58" "cpu time: 6356 real time: 6355 gc time: 52" "cpu time: 6323 real time: 6322 gc time: 63")) ("010100011" ("cpu time: 6276 real time: 6275 gc time: 40" "cpu time: 6350 real time: 6347 gc time: 57" "cpu time: 6334 real time: 6332 gc time: 50" "cpu time: 6323 real time: 6319 gc time: 40" "cpu time: 6303 real time: 6301 gc time: 40" "cpu time: 6327 real time: 6326 gc time: 43" "cpu time: 6293 real time: 6291 gc time: 46" "cpu time: 6563 real time: 6559 gc time: 53")) ("010100100" ("cpu time: 6317 real time: 6315 gc time: 43" "cpu time: 6330 real time: 6327 gc time: 43" "cpu time: 6353 real time: 6355 gc time: 61" "cpu time: 6354 real time: 6352 gc time: 57" "cpu time: 6307 real time: 6307 gc time: 52" "cpu time: 6343 real time: 6342 gc time: 54" "cpu time: 6320 real time: 6319 gc time: 57" "cpu time: 6317 real time: 6315 gc time: 40")) ("010100101" ("cpu time: 6457 real time: 6458 gc time: 43" "cpu time: 6467 real time: 6463 gc time: 50" "cpu time: 6446 real time: 6443 gc time: 43" "cpu time: 6470 real time: 6470 gc time: 44" "cpu time: 6513 real time: 6510 gc time: 53" "cpu time: 6457 real time: 6458 gc time: 63" "cpu time: 6483 real time: 6481 gc time: 64" "cpu time: 6473 real time: 6472 gc time: 40")) ("010100110" ("cpu time: 6323 real time: 6324 gc time: 56" "cpu time: 6630 real time: 6629 gc time: 43" "cpu time: 6326 real time: 6323 gc time: 43" "cpu time: 6370 real time: 6366 gc time: 53" "cpu time: 6420 real time: 6419 gc time: 51" "cpu time: 6314 real time: 6314 gc time: 58" "cpu time: 6250 real time: 6251 gc time: 43" "cpu time: 6430 real time: 6428 gc time: 47")) ("010100111" ("cpu time: 6324 real time: 6323 gc time: 60" "cpu time: 6480 real time: 6476 gc time: 53" "cpu time: 6346 real time: 6342 gc time: 43" "cpu time: 6387 real time: 6384 gc time: 60" "cpu time: 6317 real time: 6316 gc time: 56" "cpu time: 6260 real time: 6259 gc time: 52" "cpu time: 6316 real time: 6311 gc time: 53" "cpu time: 6397 real time: 6393 gc time: 47")) ("010101000" ("cpu time: 6457 real time: 6455 gc time: 60" "cpu time: 6410 real time: 6408 gc time: 44" "cpu time: 6417 real time: 6412 gc time: 40" "cpu time: 6420 real time: 6418 gc time: 40" "cpu time: 6417 real time: 6413 gc time: 56" "cpu time: 6456 real time: 6453 gc time: 53" "cpu time: 6403 real time: 6404 gc time: 36" "cpu time: 6397 real time: 6395 gc time: 56")) ("010101001" ("cpu time: 6460 real time: 6456 gc time: 50" "cpu time: 6477 real time: 6472 gc time: 46" "cpu time: 6477 real time: 6472 gc time: 53" "cpu time: 6527 real time: 6523 gc time: 40" "cpu time: 6566 real time: 6564 gc time: 47" "cpu time: 6494 real time: 6492 gc time: 40" "cpu time: 6480 real time: 6480 gc time: 49" "cpu time: 6486 real time: 6484 gc time: 43")) ("010101010" ("cpu time: 6380 real time: 6377 gc time: 40" "cpu time: 6397 real time: 6394 gc time: 50" "cpu time: 6434 real time: 6433 gc time: 40" "cpu time: 6406 real time: 6404 gc time: 40" "cpu time: 6440 real time: 6439 gc time: 40" "cpu time: 6410 real time: 6409 gc time: 43" "cpu time: 6473 real time: 6470 gc time: 43" "cpu time: 6424 real time: 6425 gc time: 47")) ("010101011" ("cpu time: 6373 real time: 6369 gc time: 40" "cpu time: 6447 real time: 6444 gc time: 57" "cpu time: 6420 real time: 6421 gc time: 56" "cpu time: 6353 real time: 6350 gc time: 49" "cpu time: 6383 real time: 6378 gc time: 43" "cpu time: 6460 real time: 6456 gc time: 48" "cpu time: 6390 real time: 6389 gc time: 47" "cpu time: 6410 real time: 6409 gc time: 59")) ("010101100" ("cpu time: 6437 real time: 6435 gc time: 47" "cpu time: 6394 real time: 6389 gc time: 50" "cpu time: 6383 real time: 6383 gc time: 53" "cpu time: 6417 real time: 6416 gc time: 43" "cpu time: 6460 real time: 6460 gc time: 47" "cpu time: 6414 real time: 6415 gc time: 51" "cpu time: 6400 real time: 6396 gc time: 67" "cpu time: 6404 real time: 6402 gc time: 50")) ("010101101" ("cpu time: 6597 real time: 6597 gc time: 53" "cpu time: 6524 real time: 6522 gc time: 46" "cpu time: 6543 real time: 6546 gc time: 43" "cpu time: 6546 real time: 6545 gc time: 58" "cpu time: 6534 real time: 6534 gc time: 50" "cpu time: 6497 real time: 6494 gc time: 43" "cpu time: 6580 real time: 6582 gc time: 54" "cpu time: 6616 real time: 6616 gc time: 43")) ("010101110" ("cpu time: 6473 real time: 6474 gc time: 50" "cpu time: 6480 real time: 6476 gc time: 43" "cpu time: 6524 real time: 6520 gc time: 54" "cpu time: 6373 real time: 6370 gc time: 60" "cpu time: 6417 real time: 6414 gc time: 52" "cpu time: 6520 real time: 6521 gc time: 50" "cpu time: 6380 real time: 6380 gc time: 53" "cpu time: 6370 real time: 6369 gc time: 60")) ("010101111" ("cpu time: 6400 real time: 6399 gc time: 44" "cpu time: 6450 real time: 6447 gc time: 53" "cpu time: 6370 real time: 6369 gc time: 43" "cpu time: 6410 real time: 6410 gc time: 47" "cpu time: 6423 real time: 6425 gc time: 43" "cpu time: 6477 real time: 6475 gc time: 44" "cpu time: 6640 real time: 6641 gc time: 56" "cpu time: 6480 real time: 6480 gc time: 43")) ("010110000" ("cpu time: 4407 real time: 4405 gc time: 50" "cpu time: 4373 real time: 4370 gc time: 43" "cpu time: 4400 real time: 4398 gc time: 44" "cpu time: 4377 real time: 4374 gc time: 43" "cpu time: 4400 real time: 4400 gc time: 43" "cpu time: 4387 real time: 4383 gc time: 40" "cpu time: 4460 real time: 4459 gc time: 51" "cpu time: 4387 real time: 4388 gc time: 40")) ("010110001" ("cpu time: 4403 real time: 4403 gc time: 40" "cpu time: 4440 real time: 4441 gc time: 43" "cpu time: 4397 real time: 4393 gc time: 44" "cpu time: 4497 real time: 4497 gc time: 40" "cpu time: 4377 real time: 4374 gc time: 40" "cpu time: 4384 real time: 4382 gc time: 40" "cpu time: 4370 real time: 4369 gc time: 43" "cpu time: 4370 real time: 4368 gc time: 40")) ("010110010" ("cpu time: 4406 real time: 4405 gc time: 40" "cpu time: 4343 real time: 4340 gc time: 40" "cpu time: 4323 real time: 4325 gc time: 43" "cpu time: 4333 real time: 4331 gc time: 40" "cpu time: 4327 real time: 4331 gc time: 40" "cpu time: 4343 real time: 4340 gc time: 40" "cpu time: 4323 real time: 4323 gc time: 40" "cpu time: 4330 real time: 4328 gc time: 40")) ("010110011" ("cpu time: 4357 real time: 4358 gc time: 40" "cpu time: 4340 real time: 4341 gc time: 40" "cpu time: 4344 real time: 4342 gc time: 40" "cpu time: 4334 real time: 4335 gc time: 40" "cpu time: 4377 real time: 4371 gc time: 43" "cpu time: 4344 real time: 4343 gc time: 40" "cpu time: 4520 real time: 4515 gc time: 43" "cpu time: 4357 real time: 4357 gc time: 40")) ("010110100" ("cpu time: 4330 real time: 4329 gc time: 43" "cpu time: 4333 real time: 4333 gc time: 43" "cpu time: 4334 real time: 4331 gc time: 40" "cpu time: 4330 real time: 4332 gc time: 43" "cpu time: 4336 real time: 4336 gc time: 40" "cpu time: 4354 real time: 4354 gc time: 43" "cpu time: 4537 real time: 4535 gc time: 40" "cpu time: 4340 real time: 4341 gc time: 40")) ("010110101" ("cpu time: 4334 real time: 4330 gc time: 40" "cpu time: 4330 real time: 4329 gc time: 40" "cpu time: 4316 real time: 4314 gc time: 43" "cpu time: 4320 real time: 4318 gc time: 44" "cpu time: 4320 real time: 4318 gc time: 44" "cpu time: 4327 real time: 4325 gc time: 40" "cpu time: 4357 real time: 4354 gc time: 43" "cpu time: 4333 real time: 4330 gc time: 44")) ("010110110" ("cpu time: 3296 real time: 3299 gc time: 44" "cpu time: 3376 real time: 3374 gc time: 43" "cpu time: 3277 real time: 3278 gc time: 46" "cpu time: 3313 real time: 3313 gc time: 43" "cpu time: 4513 real time: 4513 gc time: 44" "cpu time: 3280 real time: 3278 gc time: 44" "cpu time: 3263 real time: 3264 gc time: 40" "cpu time: 3284 real time: 3283 gc time: 40")) ("010110111" ("cpu time: 3303 real time: 3304 gc time: 40" "cpu time: 3350 real time: 3349 gc time: 43" "cpu time: 3407 real time: 3405 gc time: 44" "cpu time: 3280 real time: 3283 gc time: 40" "cpu time: 3307 real time: 3305 gc time: 43" "cpu time: 3293 real time: 3291 gc time: 40" "cpu time: 3290 real time: 3286 gc time: 43" "cpu time: 3326 real time: 3325 gc time: 43")) ("010111000" ("cpu time: 4480 real time: 4480 gc time: 40" "cpu time: 4563 real time: 4563 gc time: 40" "cpu time: 4457 real time: 4456 gc time: 40" "cpu time: 4460 real time: 4457 gc time: 40" "cpu time: 4437 real time: 4438 gc time: 40" "cpu time: 4440 real time: 4437 gc time: 40" "cpu time: 4447 real time: 4446 gc time: 43" "cpu time: 4450 real time: 4448 gc time: 40")) ("010111001" ("cpu time: 4420 real time: 4421 gc time: 40" "cpu time: 4440 real time: 4440 gc time: 43" "cpu time: 4484 real time: 4483 gc time: 40" "cpu time: 4440 real time: 4440 gc time: 36" "cpu time: 4430 real time: 4429 gc time: 53" "cpu time: 4427 real time: 4426 gc time: 40" "cpu time: 4470 real time: 4471 gc time: 40" "cpu time: 4420 real time: 4421 gc time: 40")) ("010111010" ("cpu time: 4387 real time: 4384 gc time: 40" "cpu time: 4404 real time: 4402 gc time: 47" "cpu time: 4417 real time: 4416 gc time: 40" "cpu time: 4387 real time: 4387 gc time: 40" "cpu time: 4413 real time: 4411 gc time: 40" "cpu time: 4397 real time: 4397 gc time: 40" "cpu time: 4386 real time: 4388 gc time: 40" "cpu time: 4433 real time: 4435 gc time: 44")) ("010111011" ("cpu time: 4427 real time: 4426 gc time: 40" "cpu time: 4406 real time: 4405 gc time: 40" "cpu time: 4470 real time: 4468 gc time: 40" "cpu time: 4437 real time: 4435 gc time: 44" "cpu time: 4510 real time: 4509 gc time: 37" "cpu time: 4404 real time: 4404 gc time: 44" "cpu time: 4453 real time: 4453 gc time: 40" "cpu time: 4430 real time: 4427 gc time: 40")) ("010111100" ("cpu time: 4406 real time: 4406 gc time: 44" "cpu time: 4397 real time: 4395 gc time: 40" "cpu time: 4400 real time: 4399 gc time: 43" "cpu time: 4437 real time: 4438 gc time: 40" "cpu time: 4413 real time: 4414 gc time: 44" "cpu time: 4396 real time: 4394 gc time: 43" "cpu time: 4404 real time: 4403 gc time: 47" "cpu time: 4390 real time: 4390 gc time: 43")) ("010111101" ("cpu time: 4357 real time: 4355 gc time: 44" "cpu time: 4397 real time: 4396 gc time: 46" "cpu time: 4400 real time: 4395 gc time: 43" "cpu time: 4380 real time: 4380 gc time: 43" "cpu time: 4397 real time: 4397 gc time: 50" "cpu time: 4366 real time: 4365 gc time: 43" "cpu time: 4370 real time: 4367 gc time: 36" "cpu time: 4370 real time: 4371 gc time: 43")) ("010111110" ("cpu time: 3347 real time: 3345 gc time: 40" "cpu time: 3377 real time: 3376 gc time: 43" "cpu time: 3347 real time: 3347 gc time: 43" "cpu time: 3350 real time: 3349 gc time: 43" "cpu time: 3326 real time: 3329 gc time: 44" "cpu time: 3373 real time: 3374 gc time: 43" "cpu time: 3350 real time: 3350 gc time: 43" "cpu time: 3353 real time: 3355 gc time: 40")) ("010111111" ("cpu time: 3344 real time: 3344 gc time: 40" "cpu time: 3333 real time: 3336 gc time: 40" "cpu time: 3337 real time: 3336 gc time: 44" "cpu time: 3460 real time: 3459 gc time: 43" "cpu time: 3363 real time: 3363 gc time: 40" "cpu time: 3330 real time: 3330 gc time: 40" "cpu time: 3357 real time: 3358 gc time: 43" "cpu time: 3433 real time: 3432 gc time: 43")) ("011000000" ("cpu time: 4076 real time: 4071 gc time: 49" "cpu time: 4107 real time: 4103 gc time: 50" "cpu time: 4060 real time: 4059 gc time: 57" "cpu time: 4090 real time: 4087 gc time: 40" "cpu time: 4096 real time: 4099 gc time: 37" "cpu time: 4123 real time: 4120 gc time: 49" "cpu time: 4080 real time: 4076 gc time: 43" "cpu time: 4107 real time: 4102 gc time: 61")) ("011000001" ("cpu time: 4077 real time: 4076 gc time: 60" "cpu time: 4103 real time: 4099 gc time: 50" "cpu time: 4096 real time: 4095 gc time: 49" "cpu time: 4090 real time: 4086 gc time: 50" "cpu time: 4136 real time: 4130 gc time: 40" "cpu time: 4207 real time: 4204 gc time: 62" "cpu time: 4093 real time: 4089 gc time: 53" "cpu time: 4147 real time: 4145 gc time: 60")) ("011000010" ("cpu time: 4070 real time: 4068 gc time: 57" "cpu time: 4143 real time: 4139 gc time: 62" "cpu time: 4130 real time: 4131 gc time: 50" "cpu time: 4087 real time: 4084 gc time: 40" "cpu time: 4127 real time: 4125 gc time: 53" "cpu time: 4093 real time: 4092 gc time: 57" "cpu time: 4080 real time: 4079 gc time: 47" "cpu time: 4090 real time: 4088 gc time: 50")) ("011000011" ("cpu time: 4114 real time: 4109 gc time: 52" "cpu time: 4087 real time: 4085 gc time: 54" "cpu time: 4130 real time: 4127 gc time: 44" "cpu time: 4120 real time: 4117 gc time: 43" "cpu time: 4100 real time: 4100 gc time: 43" "cpu time: 4204 real time: 4200 gc time: 46" "cpu time: 4134 real time: 4130 gc time: 47" "cpu time: 4090 real time: 4085 gc time: 50")) ("011000100" ("cpu time: 4200 real time: 4196 gc time: 46" "cpu time: 4106 real time: 4105 gc time: 51" "cpu time: 4160 real time: 4154 gc time: 46" "cpu time: 4087 real time: 4084 gc time: 47" "cpu time: 4117 real time: 4114 gc time: 55" "cpu time: 4130 real time: 4128 gc time: 44" "cpu time: 4127 real time: 4125 gc time: 44" "cpu time: 4170 real time: 4166 gc time: 54")) ("011000101" ("cpu time: 4157 real time: 4156 gc time: 40" "cpu time: 4103 real time: 4101 gc time: 74" "cpu time: 4137 real time: 4134 gc time: 65" "cpu time: 4167 real time: 4163 gc time: 43" "cpu time: 4170 real time: 4168 gc time: 56" "cpu time: 4120 real time: 4115 gc time: 43" "cpu time: 4110 real time: 4111 gc time: 47" "cpu time: 4133 real time: 4133 gc time: 54")) ("011000110" ("cpu time: 4107 real time: 4105 gc time: 61" "cpu time: 4070 real time: 4066 gc time: 58" "cpu time: 4090 real time: 4087 gc time: 43" "cpu time: 4080 real time: 4078 gc time: 50" "cpu time: 4074 real time: 4071 gc time: 60" "cpu time: 4083 real time: 4082 gc time: 57" "cpu time: 4096 real time: 4092 gc time: 59" "cpu time: 4076 real time: 4073 gc time: 64")) ("011000111" ("cpu time: 4080 real time: 4075 gc time: 61" "cpu time: 4140 real time: 4137 gc time: 44" "cpu time: 4113 real time: 4112 gc time: 50" "cpu time: 4103 real time: 4098 gc time: 40" "cpu time: 4073 real time: 4073 gc time: 50" "cpu time: 4080 real time: 4078 gc time: 44" "cpu time: 4080 real time: 4075 gc time: 54" "cpu time: 4103 real time: 4100 gc time: 49")) ("011001000" ("cpu time: 4024 real time: 4023 gc time: 53" "cpu time: 4000 real time: 3997 gc time: 50" "cpu time: 3907 real time: 3904 gc time: 58" "cpu time: 3930 real time: 3926 gc time: 43" "cpu time: 3910 real time: 3906 gc time: 61" "cpu time: 3907 real time: 3904 gc time: 65" "cpu time: 3923 real time: 3919 gc time: 47" "cpu time: 3907 real time: 3907 gc time: 43")) ("011001001" ("cpu time: 3950 real time: 3947 gc time: 65" "cpu time: 3927 real time: 3926 gc time: 59" "cpu time: 3936 real time: 3934 gc time: 37" "cpu time: 3903 real time: 3901 gc time: 51" "cpu time: 3920 real time: 3917 gc time: 59" "cpu time: 3936 real time: 3933 gc time: 53" "cpu time: 3917 real time: 3915 gc time: 53" "cpu time: 3910 real time: 3905 gc time: 57")) ("011001010" ("cpu time: 3934 real time: 3933 gc time: 46" "cpu time: 3937 real time: 3931 gc time: 43" "cpu time: 3913 real time: 3909 gc time: 50" "cpu time: 3983 real time: 3979 gc time: 46" "cpu time: 3903 real time: 3901 gc time: 47" "cpu time: 3894 real time: 3891 gc time: 50" "cpu time: 3887 real time: 3887 gc time: 40" "cpu time: 3960 real time: 3959 gc time: 44")) ("011001011" ("cpu time: 3913 real time: 3911 gc time: 49" "cpu time: 3943 real time: 3937 gc time: 44" "cpu time: 3890 real time: 3888 gc time: 40" "cpu time: 3927 real time: 3924 gc time: 46" "cpu time: 3927 real time: 3924 gc time: 40" "cpu time: 4000 real time: 3995 gc time: 43" "cpu time: 3917 real time: 3915 gc time: 51" "cpu time: 3920 real time: 3918 gc time: 60")) ("011001100" ("cpu time: 3940 real time: 3937 gc time: 54" "cpu time: 3963 real time: 3961 gc time: 58" "cpu time: 3940 real time: 3934 gc time: 44" "cpu time: 3936 real time: 3936 gc time: 46" "cpu time: 3930 real time: 3928 gc time: 52" "cpu time: 3917 real time: 3910 gc time: 53" "cpu time: 3990 real time: 3986 gc time: 50" "cpu time: 3950 real time: 3950 gc time: 40")) ("011001101" ("cpu time: 4023 real time: 4020 gc time: 47" "cpu time: 3970 real time: 3967 gc time: 56" "cpu time: 3936 real time: 3936 gc time: 43" "cpu time: 6723 real time: 6721 gc time: 43" "cpu time: 3920 real time: 3917 gc time: 55" "cpu time: 4030 real time: 4027 gc time: 43" "cpu time: 3960 real time: 3959 gc time: 46" "cpu time: 3940 real time: 3938 gc time: 62")) ("011001110" ("cpu time: 3897 real time: 3894 gc time: 53" "cpu time: 3890 real time: 3887 gc time: 51" "cpu time: 4136 real time: 4139 gc time: 40" "cpu time: 3944 real time: 3940 gc time: 64" "cpu time: 3910 real time: 3908 gc time: 43" "cpu time: 3910 real time: 3905 gc time: 53" "cpu time: 3913 real time: 3906 gc time: 44" "cpu time: 3936 real time: 3932 gc time: 53")) ("011001111" ("cpu time: 3907 real time: 3904 gc time: 51" "cpu time: 3917 real time: 3914 gc time: 43" "cpu time: 3906 real time: 3902 gc time: 47" "cpu time: 3890 real time: 3887 gc time: 47" "cpu time: 3883 real time: 3880 gc time: 55" "cpu time: 3917 real time: 3915 gc time: 40" "cpu time: 3887 real time: 3882 gc time: 52" "cpu time: 3907 real time: 3902 gc time: 57")) ("011010000" ("cpu time: 950 real time: 949 gc time: 43" "cpu time: 947 real time: 948 gc time: 47" "cpu time: 940 real time: 939 gc time: 44" "cpu time: 933 real time: 936 gc time: 40" "cpu time: 937 real time: 937 gc time: 40" "cpu time: 940 real time: 938 gc time: 40" "cpu time: 947 real time: 947 gc time: 47" "cpu time: 933 real time: 936 gc time: 37")) ("011010001" ("cpu time: 953 real time: 953 gc time: 40" "cpu time: 947 real time: 943 gc time: 47" "cpu time: 937 real time: 935 gc time: 40" "cpu time: 980 real time: 979 gc time: 40" "cpu time: 934 real time: 935 gc time: 40" "cpu time: 937 real time: 936 gc time: 40" "cpu time: 944 real time: 941 gc time: 40" "cpu time: 936 real time: 935 gc time: 44")) ("011010010" ("cpu time: 947 real time: 945 gc time: 40" "cpu time: 936 real time: 935 gc time: 40" "cpu time: 937 real time: 936 gc time: 44" "cpu time: 936 real time: 935 gc time: 40" "cpu time: 940 real time: 941 gc time: 47" "cpu time: 933 real time: 934 gc time: 40" "cpu time: 950 real time: 949 gc time: 43" "cpu time: 937 real time: 934 gc time: 44")) ("011010011" ("cpu time: 970 real time: 972 gc time: 40" "cpu time: 924 real time: 925 gc time: 37" "cpu time: 930 real time: 926 gc time: 40" "cpu time: 947 real time: 946 gc time: 50" "cpu time: 927 real time: 926 gc time: 43" "cpu time: 926 real time: 928 gc time: 40" "cpu time: 934 real time: 933 gc time: 50" "cpu time: 930 real time: 927 gc time: 43")) ("011010100" ("cpu time: 930 real time: 933 gc time: 43" "cpu time: 937 real time: 937 gc time: 44" "cpu time: 930 real time: 933 gc time: 43" "cpu time: 937 real time: 938 gc time: 46" "cpu time: 930 real time: 930 gc time: 40" "cpu time: 943 real time: 943 gc time: 50" "cpu time: 937 real time: 933 gc time: 43" "cpu time: 937 real time: 932 gc time: 44")) ("011010101" ("cpu time: 963 real time: 963 gc time: 43" "cpu time: 963 real time: 963 gc time: 43" "cpu time: 963 real time: 960 gc time: 43" "cpu time: 983 real time: 981 gc time: 50" "cpu time: 960 real time: 960 gc time: 40" "cpu time: 963 real time: 962 gc time: 40" "cpu time: 963 real time: 960 gc time: 43" "cpu time: 957 real time: 957 gc time: 40")) ("011010110" ("cpu time: 933 real time: 930 gc time: 40" "cpu time: 933 real time: 932 gc time: 44" "cpu time: 930 real time: 929 gc time: 43" "cpu time: 937 real time: 933 gc time: 43" "cpu time: 934 real time: 929 gc time: 44" "cpu time: 934 real time: 929 gc time: 40" "cpu time: 933 real time: 934 gc time: 43" "cpu time: 933 real time: 932 gc time: 43")) ("011010111" ("cpu time: 930 real time: 929 gc time: 43" "cpu time: 924 real time: 922 gc time: 43" "cpu time: 927 real time: 923 gc time: 43" "cpu time: 926 real time: 925 gc time: 40" "cpu time: 923 real time: 921 gc time: 44" "cpu time: 924 real time: 925 gc time: 43" "cpu time: 930 real time: 932 gc time: 40" "cpu time: 920 real time: 921 gc time: 43")) ("011011000" ("cpu time: 797 real time: 799 gc time: 47" "cpu time: 797 real time: 795 gc time: 37" "cpu time: 797 real time: 797 gc time: 37" "cpu time: 800 real time: 797 gc time: 40" "cpu time: 807 real time: 806 gc time: 50" "cpu time: 796 real time: 797 gc time: 40" "cpu time: 813 real time: 810 gc time: 40" "cpu time: 796 real time: 796 gc time: 40")) ("011011001" ("cpu time: 800 real time: 800 gc time: 50" "cpu time: 794 real time: 792 gc time: 43" "cpu time: 800 real time: 797 gc time: 50" "cpu time: 793 real time: 793 gc time: 43" "cpu time: 790 real time: 792 gc time: 40" "cpu time: 793 real time: 792 gc time: 40" "cpu time: 796 real time: 794 gc time: 40" "cpu time: 794 real time: 794 gc time: 40")) ("011011010" ("cpu time: 797 real time: 797 gc time: 40" "cpu time: 793 real time: 796 gc time: 40" "cpu time: 803 real time: 801 gc time: 40" "cpu time: 837 real time: 835 gc time: 40" "cpu time: 800 real time: 797 gc time: 40" "cpu time: 807 real time: 804 gc time: 50" "cpu time: 797 real time: 794 gc time: 40" "cpu time: 793 real time: 794 gc time: 40")) ("011011011" ("cpu time: 777 real time: 777 gc time: 40" "cpu time: 776 real time: 777 gc time: 40" "cpu time: 780 real time: 779 gc time: 40" "cpu time: 820 real time: 819 gc time: 43" "cpu time: 787 real time: 786 gc time: 40" "cpu time: 790 real time: 788 gc time: 40" "cpu time: 784 real time: 784 gc time: 50" "cpu time: 780 real time: 777 gc time: 43")) ("011011100" ("cpu time: 800 real time: 798 gc time: 44" "cpu time: 794 real time: 793 gc time: 43" "cpu time: 796 real time: 794 gc time: 44" "cpu time: 803 real time: 799 gc time: 47" "cpu time: 796 real time: 797 gc time: 40" "cpu time: 810 real time: 808 gc time: 54" "cpu time: 793 real time: 793 gc time: 43" "cpu time: 794 real time: 794 gc time: 43")) ("011011101" ("cpu time: 816 real time: 815 gc time: 40" "cpu time: 817 real time: 814 gc time: 40" "cpu time: 817 real time: 816 gc time: 43" "cpu time: 813 real time: 813 gc time: 44" "cpu time: 820 real time: 816 gc time: 44" "cpu time: 816 real time: 818 gc time: 40" "cpu time: 843 real time: 844 gc time: 40" "cpu time: 814 real time: 815 gc time: 40")) ("011011110" ("cpu time: 790 real time: 790 gc time: 40" "cpu time: 794 real time: 790 gc time: 40" "cpu time: 793 real time: 792 gc time: 44" "cpu time: 790 real time: 790 gc time: 43" "cpu time: 793 real time: 792 gc time: 44" "cpu time: 793 real time: 792 gc time: 43" "cpu time: 794 real time: 791 gc time: 43" "cpu time: 796 real time: 799 gc time: 47")) ("011011111" ("cpu time: 773 real time: 771 gc time: 44" "cpu time: 770 real time: 769 gc time: 40" "cpu time: 773 real time: 770 gc time: 43" "cpu time: 774 real time: 773 gc time: 43" "cpu time: 773 real time: 769 gc time: 40" "cpu time: 770 real time: 770 gc time: 40" "cpu time: 783 real time: 782 gc time: 53" "cpu time: 770 real time: 770 gc time: 44")) ("011100000" ("cpu time: 4120 real time: 4116 gc time: 60" "cpu time: 4130 real time: 4126 gc time: 44" "cpu time: 4106 real time: 4103 gc time: 40" "cpu time: 4117 real time: 4109 gc time: 46" "cpu time: 4120 real time: 4118 gc time: 53" "cpu time: 4106 real time: 4104 gc time: 47" "cpu time: 4117 real time: 4111 gc time: 40" "cpu time: 4096 real time: 4094 gc time: 59")) ("011100001" ("cpu time: 4117 real time: 4116 gc time: 46" "cpu time: 4127 real time: 4120 gc time: 52" "cpu time: 4074 real time: 4072 gc time: 49" "cpu time: 4097 real time: 4094 gc time: 60" "cpu time: 4117 real time: 4115 gc time: 40" "cpu time: 4120 real time: 4117 gc time: 44" "cpu time: 4130 real time: 4126 gc time: 54" "cpu time: 4134 real time: 4131 gc time: 40")) ("011100010" ("cpu time: 4073 real time: 4073 gc time: 53" "cpu time: 4103 real time: 4098 gc time: 55" "cpu time: 4096 real time: 4093 gc time: 40" "cpu time: 4080 real time: 4075 gc time: 44" "cpu time: 4080 real time: 4077 gc time: 43" "cpu time: 4100 real time: 4095 gc time: 43" "cpu time: 4077 real time: 4075 gc time: 52" "cpu time: 4106 real time: 4102 gc time: 43")) ("011100011" ("cpu time: 4116 real time: 4112 gc time: 43" "cpu time: 4284 real time: 4280 gc time: 49" "cpu time: 4107 real time: 4106 gc time: 43" "cpu time: 4100 real time: 4092 gc time: 43" "cpu time: 4090 real time: 4086 gc time: 47" "cpu time: 4114 real time: 4110 gc time: 40" "cpu time: 4100 real time: 4096 gc time: 44" "cpu time: 4306 real time: 4304 gc time: 43")) ("011100100" ("cpu time: 4134 real time: 4131 gc time: 40" "cpu time: 4223 real time: 4219 gc time: 44" "cpu time: 4053 real time: 4049 gc time: 56" "cpu time: 4070 real time: 4067 gc time: 46" "cpu time: 4083 real time: 4080 gc time: 49" "cpu time: 4110 real time: 4106 gc time: 54" "cpu time: 4063 real time: 4062 gc time: 47" "cpu time: 4140 real time: 4138 gc time: 65")) ("011100101" ("cpu time: 4187 real time: 4185 gc time: 50" "cpu time: 4170 real time: 4166 gc time: 44" "cpu time: 4180 real time: 4176 gc time: 47" "cpu time: 4193 real time: 4188 gc time: 47" "cpu time: 4160 real time: 4160 gc time: 47" "cpu time: 6954 real time: 6950 gc time: 47" "cpu time: 4117 real time: 4113 gc time: 43" "cpu time: 4120 real time: 4116 gc time: 44")) ("011100110" ("cpu time: 6040 real time: 6038 gc time: 43" "cpu time: 4083 real time: 4082 gc time: 48" "cpu time: 4120 real time: 4115 gc time: 58" "cpu time: 4100 real time: 4099 gc time: 47" "cpu time: 4086 real time: 4084 gc time: 47" "cpu time: 4103 real time: 4102 gc time: 43" "cpu time: 4093 real time: 4093 gc time: 51" "cpu time: 4090 real time: 4090 gc time: 44")) ("011100111" ("cpu time: 4080 real time: 4074 gc time: 48" "cpu time: 4106 real time: 4109 gc time: 53" "cpu time: 4066 real time: 4066 gc time: 43" "cpu time: 4100 real time: 4097 gc time: 56" "cpu time: 4124 real time: 4122 gc time: 46" "cpu time: 4090 real time: 4088 gc time: 51" "cpu time: 4090 real time: 4089 gc time: 43" "cpu time: 4120 real time: 4116 gc time: 47")) ("011101000" ("cpu time: 3937 real time: 3933 gc time: 55" "cpu time: 3966 real time: 3964 gc time: 53" "cpu time: 3927 real time: 3923 gc time: 59" "cpu time: 3947 real time: 3942 gc time: 51" "cpu time: 3943 real time: 3942 gc time: 40" "cpu time: 4020 real time: 4019 gc time: 53" "cpu time: 4147 real time: 4145 gc time: 52" "cpu time: 3950 real time: 3946 gc time: 54")) ("011101001" ("cpu time: 4000 real time: 3999 gc time: 40" "cpu time: 3917 real time: 3915 gc time: 40" "cpu time: 4014 real time: 4008 gc time: 40" "cpu time: 3974 real time: 3969 gc time: 51" "cpu time: 3933 real time: 3928 gc time: 54" "cpu time: 3940 real time: 3935 gc time: 46" "cpu time: 3920 real time: 3913 gc time: 65" "cpu time: 3934 real time: 3928 gc time: 49")) ("011101010" ("cpu time: 3910 real time: 3909 gc time: 40" "cpu time: 3913 real time: 3908 gc time: 44" "cpu time: 3904 real time: 3898 gc time: 43" "cpu time: 3930 real time: 3927 gc time: 55" "cpu time: 3937 real time: 3933 gc time: 52" "cpu time: 3990 real time: 3985 gc time: 46" "cpu time: 3933 real time: 3932 gc time: 40" "cpu time: 3934 real time: 3930 gc time: 40")) ("011101011" ("cpu time: 3930 real time: 3923 gc time: 53" "cpu time: 3910 real time: 3907 gc time: 53" "cpu time: 3910 real time: 3909 gc time: 40" "cpu time: 3947 real time: 3945 gc time: 40" "cpu time: 3933 real time: 3931 gc time: 46" "cpu time: 3957 real time: 3951 gc time: 40" "cpu time: 3904 real time: 3902 gc time: 44" "cpu time: 3926 real time: 3922 gc time: 66")) ("011101100" ("cpu time: 3934 real time: 3929 gc time: 43" "cpu time: 3914 real time: 3909 gc time: 46" "cpu time: 3920 real time: 3919 gc time: 50" "cpu time: 3907 real time: 3905 gc time: 68" "cpu time: 3897 real time: 3891 gc time: 43" "cpu time: 3920 real time: 3918 gc time: 54" "cpu time: 3903 real time: 3901 gc time: 40" "cpu time: 3916 real time: 3913 gc time: 50")) ("011101101" ("cpu time: 3940 real time: 3938 gc time: 52" "cpu time: 3973 real time: 3971 gc time: 54" "cpu time: 3990 real time: 3984 gc time: 46" "cpu time: 3930 real time: 3925 gc time: 44" "cpu time: 3946 real time: 3943 gc time: 50" "cpu time: 3964 real time: 3958 gc time: 40" "cpu time: 3944 real time: 3941 gc time: 44" "cpu time: 3993 real time: 3993 gc time: 57")) ("011101110" ("cpu time: 3926 real time: 3925 gc time: 57" "cpu time: 3890 real time: 3887 gc time: 44" "cpu time: 4020 real time: 4016 gc time: 54" "cpu time: 3940 real time: 3933 gc time: 49" "cpu time: 3913 real time: 3912 gc time: 52" "cpu time: 3930 real time: 3926 gc time: 43" "cpu time: 3930 real time: 3927 gc time: 52" "cpu time: 3930 real time: 3926 gc time: 49")) ("011101111" ("cpu time: 3907 real time: 3903 gc time: 43" "cpu time: 3943 real time: 3941 gc time: 43" "cpu time: 3910 real time: 3908 gc time: 56" "cpu time: 3886 real time: 3886 gc time: 43" "cpu time: 3903 real time: 3902 gc time: 49" "cpu time: 3906 real time: 3899 gc time: 43" "cpu time: 3936 real time: 3931 gc time: 43" "cpu time: 3917 real time: 3913 gc time: 51")) ("011110000" ("cpu time: 944 real time: 939 gc time: 43" "cpu time: 940 real time: 939 gc time: 44" "cpu time: 950 real time: 947 gc time: 40" "cpu time: 940 real time: 940 gc time: 40" "cpu time: 947 real time: 944 gc time: 44" "cpu time: 940 real time: 939 gc time: 40" "cpu time: 950 real time: 947 gc time: 40" "cpu time: 940 real time: 940 gc time: 40")) ("011110001" ("cpu time: 936 real time: 936 gc time: 40" "cpu time: 933 real time: 934 gc time: 40" "cpu time: 936 real time: 936 gc time: 40" "cpu time: 937 real time: 936 gc time: 40" "cpu time: 940 real time: 935 gc time: 40" "cpu time: 937 real time: 936 gc time: 40" "cpu time: 933 real time: 939 gc time: 40" "cpu time: 937 real time: 936 gc time: 40")) ("011110010" ("cpu time: 940 real time: 938 gc time: 40" "cpu time: 937 real time: 935 gc time: 40" "cpu time: 950 real time: 947 gc time: 40" "cpu time: 947 real time: 945 gc time: 40" "cpu time: 937 real time: 936 gc time: 40" "cpu time: 937 real time: 935 gc time: 40" "cpu time: 936 real time: 935 gc time: 40" "cpu time: 950 real time: 946 gc time: 47")) ("011110011" ("cpu time: 933 real time: 933 gc time: 40" "cpu time: 936 real time: 934 gc time: 40" "cpu time: 930 real time: 928 gc time: 40" "cpu time: 930 real time: 931 gc time: 43" "cpu time: 930 real time: 930 gc time: 40" "cpu time: 930 real time: 928 gc time: 40" "cpu time: 953 real time: 951 gc time: 50" "cpu time: 927 real time: 928 gc time: 40")) ("011110100" ("cpu time: 943 real time: 941 gc time: 50" "cpu time: 930 real time: 930 gc time: 40" "cpu time: 933 real time: 930 gc time: 40" "cpu time: 934 real time: 932 gc time: 44" "cpu time: 930 real time: 929 gc time: 40" "cpu time: 927 real time: 930 gc time: 43" "cpu time: 930 real time: 931 gc time: 40" "cpu time: 934 real time: 932 gc time: 44")) ("011110101" ("cpu time: 947 real time: 945 gc time: 43" "cpu time: 937 real time: 938 gc time: 50" "cpu time: 946 real time: 949 gc time: 44" "cpu time: 933 real time: 934 gc time: 44" "cpu time: 937 real time: 937 gc time: 54" "cpu time: 977 real time: 976 gc time: 40" "cpu time: 937 real time: 936 gc time: 50" "cpu time: 943 real time: 943 gc time: 54")) ("011110110" ("cpu time: 930 real time: 930 gc time: 48" "cpu time: 933 real time: 930 gc time: 40" "cpu time: 930 real time: 931 gc time: 40" "cpu time: 927 real time: 930 gc time: 40" "cpu time: 930 real time: 930 gc time: 44" "cpu time: 930 real time: 929 gc time: 44" "cpu time: 936 real time: 937 gc time: 43" "cpu time: 934 real time: 934 gc time: 40")) ("011110111" ("cpu time: 920 real time: 919 gc time: 40" "cpu time: 924 real time: 923 gc time: 40" "cpu time: 924 real time: 923 gc time: 43" "cpu time: 933 real time: 929 gc time: 50" "cpu time: 917 real time: 917 gc time: 40" "cpu time: 920 real time: 919 gc time: 43" "cpu time: 923 real time: 919 gc time: 43" "cpu time: 920 real time: 918 gc time: 43")) ("011111000" ("cpu time: 796 real time: 798 gc time: 40" "cpu time: 800 real time: 797 gc time: 40" "cpu time: 807 real time: 804 gc time: 40" "cpu time: 797 real time: 797 gc time: 44" "cpu time: 797 real time: 797 gc time: 40" "cpu time: 796 real time: 798 gc time: 40" "cpu time: 797 real time: 797 gc time: 37" "cpu time: 797 real time: 798 gc time: 40")) ("011111001" ("cpu time: 790 real time: 790 gc time: 36" "cpu time: 790 real time: 791 gc time: 40" "cpu time: 790 real time: 791 gc time: 40" "cpu time: 790 real time: 789 gc time: 43" "cpu time: 837 real time: 833 gc time: 40" "cpu time: 793 real time: 791 gc time: 40" "cpu time: 793 real time: 792 gc time: 40" "cpu time: 800 real time: 798 gc time: 46")) ("011111010" ("cpu time: 800 real time: 797 gc time: 40" "cpu time: 797 real time: 796 gc time: 40" "cpu time: 796 real time: 797 gc time: 47" "cpu time: 797 real time: 796 gc time: 43" "cpu time: 797 real time: 796 gc time: 40" "cpu time: 800 real time: 797 gc time: 40" "cpu time: 797 real time: 796 gc time: 40" "cpu time: 800 real time: 796 gc time: 40")) ("011111011" ("cpu time: 780 real time: 780 gc time: 40" "cpu time: 784 real time: 780 gc time: 43" "cpu time: 827 real time: 829 gc time: 40" "cpu time: 783 real time: 783 gc time: 50" "cpu time: 783 real time: 780 gc time: 40" "cpu time: 780 real time: 780 gc time: 40" "cpu time: 780 real time: 781 gc time: 40" "cpu time: 783 real time: 780 gc time: 40")) ("011111100" ("cpu time: 806 real time: 807 gc time: 43" "cpu time: 790 real time: 790 gc time: 43" "cpu time: 800 real time: 800 gc time: 50" "cpu time: 794 real time: 791 gc time: 43" "cpu time: 790 real time: 791 gc time: 40" "cpu time: 793 real time: 793 gc time: 43" "cpu time: 790 real time: 791 gc time: 43" "cpu time: 790 real time: 790 gc time: 43")) ("011111101" ("cpu time: 783 real time: 785 gc time: 43" "cpu time: 793 real time: 791 gc time: 40" "cpu time: 783 real time: 784 gc time: 40" "cpu time: 790 real time: 790 gc time: 40" "cpu time: 783 real time: 784 gc time: 43" "cpu time: 790 real time: 788 gc time: 40" "cpu time: 783 real time: 783 gc time: 40" "cpu time: 790 real time: 791 gc time: 54")) ("011111110" ("cpu time: 794 real time: 791 gc time: 43" "cpu time: 793 real time: 793 gc time: 44" "cpu time: 796 real time: 796 gc time: 44" "cpu time: 797 real time: 799 gc time: 50" "cpu time: 793 real time: 792 gc time: 47" "cpu time: 867 real time: 868 gc time: 43" "cpu time: 790 real time: 790 gc time: 40" "cpu time: 830 real time: 831 gc time: 44")) ("011111111" ("cpu time: 783 real time: 784 gc time: 43" "cpu time: 773 real time: 770 gc time: 43" "cpu time: 770 real time: 772 gc time: 40" "cpu time: 766 real time: 769 gc time: 40" "cpu time: 817 real time: 816 gc time: 47" "cpu time: 770 real time: 772 gc time: 40" "cpu time: 770 real time: 771 gc time: 40" "cpu time: 780 real time: 779 gc time: 50")) ("100000000" ("cpu time: 870 real time: 870 gc time: 40" "cpu time: 873 real time: 872 gc time: 50" "cpu time: 880 real time: 877 gc time: 40" "cpu time: 867 real time: 864 gc time: 40" "cpu time: 863 real time: 863 gc time: 40" "cpu time: 863 real time: 864 gc time: 40" "cpu time: 867 real time: 865 gc time: 40" "cpu time: 863 real time: 865 gc time: 40")) ("100000001" ("cpu time: 883 real time: 882 gc time: 40" "cpu time: 907 real time: 907 gc time: 47" "cpu time: 887 real time: 884 gc time: 43" "cpu time: 884 real time: 884 gc time: 40" "cpu time: 883 real time: 884 gc time: 40" "cpu time: 886 real time: 887 gc time: 40" "cpu time: 887 real time: 885 gc time: 43" "cpu time: 903 real time: 903 gc time: 40")) ("100000010" ("cpu time: 880 real time: 878 gc time: 43" "cpu time: 880 real time: 878 gc time: 40" "cpu time: 883 real time: 884 gc time: 40" "cpu time: 883 real time: 882 gc time: 43" "cpu time: 883 real time: 883 gc time: 40" "cpu time: 927 real time: 928 gc time: 40" "cpu time: 880 real time: 876 gc time: 43" "cpu time: 880 real time: 878 gc time: 44")) ("100000011" ("cpu time: 896 real time: 893 gc time: 40" "cpu time: 890 real time: 890 gc time: 40" "cpu time: 900 real time: 897 gc time: 40" "cpu time: 893 real time: 895 gc time: 50" "cpu time: 897 real time: 894 gc time: 50" "cpu time: 907 real time: 905 gc time: 40" "cpu time: 890 real time: 893 gc time: 40" "cpu time: 886 real time: 888 gc time: 43")) ("100000100" ("cpu time: 876 real time: 875 gc time: 40" "cpu time: 877 real time: 874 gc time: 40" "cpu time: 870 real time: 872 gc time: 40" "cpu time: 877 real time: 873 gc time: 43" "cpu time: 876 real time: 877 gc time: 44" "cpu time: 876 real time: 875 gc time: 40" "cpu time: 877 real time: 874 gc time: 43" "cpu time: 884 real time: 884 gc time: 53")) ("100000101" ("cpu time: 893 real time: 895 gc time: 44" "cpu time: 894 real time: 893 gc time: 44" "cpu time: 893 real time: 894 gc time: 43" "cpu time: 893 real time: 893 gc time: 40" "cpu time: 917 real time: 910 gc time: 47" "cpu time: 890 real time: 893 gc time: 44" "cpu time: 893 real time: 893 gc time: 40" "cpu time: 897 real time: 894 gc time: 44")) ("100000110" ("cpu time: 887 real time: 885 gc time: 40" "cpu time: 900 real time: 896 gc time: 44" "cpu time: 893 real time: 895 gc time: 44" "cpu time: 893 real time: 893 gc time: 44" "cpu time: 897 real time: 897 gc time: 53" "cpu time: 907 real time: 904 gc time: 43" "cpu time: 890 real time: 893 gc time: 43" "cpu time: 894 real time: 893 gc time: 40")) ("100000111" ("cpu time: 910 real time: 905 gc time: 50" "cpu time: 896 real time: 899 gc time: 44" "cpu time: 896 real time: 897 gc time: 40" "cpu time: 920 real time: 916 gc time: 43" "cpu time: 900 real time: 897 gc time: 40" "cpu time: 910 real time: 910 gc time: 50" "cpu time: 904 real time: 898 gc time: 43" "cpu time: 900 real time: 898 gc time: 44")) ("100001000" ("cpu time: 933 real time: 933 gc time: 43" "cpu time: 946 real time: 947 gc time: 43" "cpu time: 936 real time: 934 gc time: 40" "cpu time: 937 real time: 936 gc time: 40" "cpu time: 934 real time: 931 gc time: 43" "cpu time: 933 real time: 931 gc time: 44" "cpu time: 936 real time: 932 gc time: 40" "cpu time: 940 real time: 940 gc time: 50")) ("100001001" ("cpu time: 940 real time: 939 gc time: 40" "cpu time: 940 real time: 938 gc time: 40" "cpu time: 947 real time: 945 gc time: 40" "cpu time: 940 real time: 939 gc time: 40" "cpu time: 950 real time: 949 gc time: 50" "cpu time: 940 real time: 938 gc time: 40" "cpu time: 947 real time: 942 gc time: 40" "cpu time: 936 real time: 938 gc time: 40")) ("100001010" ("cpu time: 940 real time: 939 gc time: 37" "cpu time: 953 real time: 951 gc time: 47" "cpu time: 943 real time: 942 gc time: 40" "cpu time: 953 real time: 952 gc time: 40" "cpu time: 943 real time: 943 gc time: 40" "cpu time: 943 real time: 941 gc time: 40" "cpu time: 937 real time: 939 gc time: 37" "cpu time: 940 real time: 941 gc time: 40")) ("100001011" ("cpu time: 944 real time: 941 gc time: 40" "cpu time: 940 real time: 942 gc time: 40" "cpu time: 957 real time: 956 gc time: 47" "cpu time: 940 real time: 941 gc time: 40" "cpu time: 960 real time: 958 gc time: 47" "cpu time: 954 real time: 952 gc time: 47" "cpu time: 957 real time: 959 gc time: 40" "cpu time: 940 real time: 942 gc time: 43")) ("100001100" ("cpu time: 940 real time: 938 gc time: 43" "cpu time: 943 real time: 940 gc time: 43" "cpu time: 937 real time: 937 gc time: 40" "cpu time: 950 real time: 948 gc time: 43" "cpu time: 943 real time: 942 gc time: 43" "cpu time: 943 real time: 944 gc time: 43" "cpu time: 936 real time: 938 gc time: 40" "cpu time: 937 real time: 936 gc time: 40")) ("100001101" ("cpu time: 957 real time: 954 gc time: 50" "cpu time: 950 real time: 949 gc time: 44" "cpu time: 946 real time: 948 gc time: 44" "cpu time: 960 real time: 956 gc time: 50" "cpu time: 946 real time: 947 gc time: 40" "cpu time: 957 real time: 955 gc time: 44" "cpu time: 963 real time: 959 gc time: 53" "cpu time: 953 real time: 952 gc time: 46")) ("100001110" ("cpu time: 950 real time: 951 gc time: 43" "cpu time: 953 real time: 952 gc time: 43" "cpu time: 1023 real time: 1025 gc time: 43" "cpu time: 976 real time: 977 gc time: 43" "cpu time: 953 real time: 953 gc time: 43" "cpu time: 963 real time: 958 gc time: 47" "cpu time: 953 real time: 954 gc time: 43" "cpu time: 963 real time: 964 gc time: 50")) ("100001111" ("cpu time: 970 real time: 968 gc time: 53" "cpu time: 974 real time: 972 gc time: 44" "cpu time: 964 real time: 962 gc time: 44" "cpu time: 963 real time: 961 gc time: 43" "cpu time: 956 real time: 953 gc time: 40" "cpu time: 960 real time: 957 gc time: 44" "cpu time: 973 real time: 973 gc time: 50" "cpu time: 970 real time: 968 gc time: 44")) ("100010000" ("cpu time: 5067 real time: 5069 gc time: 43" "cpu time: 5383 real time: 5383 gc time: 40" "cpu time: 5063 real time: 5065 gc time: 40" "cpu time: 5260 real time: 5258 gc time: 40" "cpu time: 5037 real time: 5038 gc time: 40" "cpu time: 5143 real time: 5145 gc time: 40" "cpu time: 5330 real time: 5329 gc time: 40" "cpu time: 5197 real time: 5197 gc time: 43")) ("100010001" ("cpu time: 5113 real time: 5109 gc time: 40" "cpu time: 5053 real time: 5054 gc time: 40" "cpu time: 5047 real time: 5044 gc time: 43" "cpu time: 5054 real time: 5053 gc time: 40" "cpu time: 5060 real time: 5058 gc time: 44" "cpu time: 5063 real time: 5061 gc time: 43" "cpu time: 5060 real time: 5060 gc time: 40" "cpu time: 5123 real time: 5124 gc time: 40")) ("100010010" ("cpu time: 5057 real time: 5057 gc time: 43" "cpu time: 5086 real time: 5085 gc time: 40" "cpu time: 5117 real time: 5117 gc time: 40" "cpu time: 5114 real time: 5114 gc time: 40" "cpu time: 5107 real time: 5105 gc time: 40" "cpu time: 5083 real time: 5081 gc time: 44" "cpu time: 5053 real time: 5051 gc time: 40" "cpu time: 5050 real time: 5048 gc time: 40")) ("100010011" ("cpu time: 5140 real time: 5136 gc time: 40" "cpu time: 5060 real time: 5056 gc time: 40" "cpu time: 5186 real time: 5183 gc time: 43" "cpu time: 5030 real time: 5030 gc time: 37" "cpu time: 5087 real time: 5084 gc time: 44" "cpu time: 5057 real time: 5057 gc time: 40" "cpu time: 5113 real time: 5113 gc time: 40" "cpu time: 5090 real time: 5087 gc time: 43")) ("100010100" ("cpu time: 5140 real time: 5140 gc time: 43" "cpu time: 5086 real time: 5087 gc time: 40" "cpu time: 5077 real time: 5074 gc time: 43" "cpu time: 5517 real time: 5516 gc time: 43" "cpu time: 5126 real time: 5128 gc time: 43" "cpu time: 5177 real time: 5175 gc time: 43" "cpu time: 5046 real time: 5052 gc time: 43" "cpu time: 5120 real time: 5121 gc time: 40")) ("100010101" ("cpu time: 5083 real time: 5081 gc time: 43" "cpu time: 5026 real time: 5027 gc time: 40" "cpu time: 5020 real time: 5018 gc time: 43" "cpu time: 5074 real time: 5072 gc time: 46" "cpu time: 5053 real time: 5052 gc time: 40" "cpu time: 5024 real time: 5024 gc time: 40" "cpu time: 5086 real time: 5087 gc time: 40" "cpu time: 5044 real time: 5042 gc time: 40")) ("100010110" ("cpu time: 5003 real time: 5001 gc time: 43" "cpu time: 5110 real time: 5109 gc time: 44" "cpu time: 5154 real time: 5154 gc time: 40" "cpu time: 5010 real time: 5008 gc time: 40" "cpu time: 4996 real time: 4997 gc time: 40" "cpu time: 5050 real time: 5045 gc time: 47" "cpu time: 4993 real time: 4993 gc time: 44" "cpu time: 5024 real time: 5021 gc time: 43")) ("100010111" ("cpu time: 5003 real time: 5006 gc time: 43" "cpu time: 5047 real time: 5046 gc time: 40" "cpu time: 5020 real time: 5020 gc time: 44" "cpu time: 5004 real time: 5003 gc time: 44" "cpu time: 5030 real time: 5026 gc time: 40" "cpu time: 5036 real time: 5037 gc time: 43" "cpu time: 5016 real time: 5015 gc time: 40" "cpu time: 5106 real time: 5107 gc time: 44")) ("100011000" ("cpu time: 5093 real time: 5092 gc time: 37" "cpu time: 5097 real time: 5098 gc time: 41" "cpu time: 5140 real time: 5141 gc time: 43" "cpu time: 5103 real time: 5104 gc time: 37" "cpu time: 5093 real time: 5092 gc time: 40" "cpu time: 5130 real time: 5127 gc time: 40" "cpu time: 5426 real time: 5427 gc time: 40" "cpu time: 5113 real time: 5112 gc time: 40")) ("100011001" ("cpu time: 5100 real time: 5097 gc time: 43" "cpu time: 5090 real time: 5085 gc time: 40" "cpu time: 5087 real time: 5084 gc time: 40" "cpu time: 5133 real time: 5130 gc time: 40" "cpu time: 5113 real time: 5113 gc time: 40" "cpu time: 5383 real time: 5381 gc time: 53" "cpu time: 5136 real time: 5137 gc time: 40" "cpu time: 5093 real time: 5093 gc time: 40")) ("100011010" ("cpu time: 5207 real time: 5203 gc time: 40" "cpu time: 5093 real time: 5091 gc time: 40" "cpu time: 5127 real time: 5126 gc time: 40" "cpu time: 5124 real time: 5123 gc time: 40" "cpu time: 5240 real time: 5239 gc time: 40" "cpu time: 5140 real time: 5137 gc time: 41" "cpu time: 5167 real time: 5165 gc time: 43" "cpu time: 5110 real time: 5109 gc time: 40")) ("100011011" ("cpu time: 5103 real time: 5102 gc time: 50" "cpu time: 5127 real time: 5125 gc time: 43" "cpu time: 5180 real time: 5177 gc time: 40" "cpu time: 5103 real time: 5104 gc time: 40" "cpu time: 5100 real time: 5099 gc time: 40" "cpu time: 5093 real time: 5090 gc time: 40" "cpu time: 5100 real time: 5100 gc time: 44" "cpu time: 5127 real time: 5126 gc time: 40")) ("100011100" ("cpu time: 5124 real time: 5122 gc time: 43" "cpu time: 5130 real time: 5129 gc time: 44" "cpu time: 5110 real time: 5111 gc time: 40" "cpu time: 5200 real time: 5197 gc time: 43" "cpu time: 5113 real time: 5114 gc time: 40" "cpu time: 5167 real time: 5165 gc time: 44" "cpu time: 5096 real time: 5097 gc time: 40" "cpu time: 5107 real time: 5106 gc time: 40")) ("100011101" ("cpu time: 5097 real time: 5094 gc time: 43" "cpu time: 5084 real time: 5085 gc time: 40" "cpu time: 5073 real time: 5071 gc time: 40" "cpu time: 5187 real time: 5187 gc time: 40" "cpu time: 5154 real time: 5156 gc time: 40" "cpu time: 5233 real time: 5232 gc time: 40" "cpu time: 5083 real time: 5081 gc time: 43" "cpu time: 5080 real time: 5079 gc time: 40")) ("100011110" ("cpu time: 5077 real time: 5078 gc time: 40" "cpu time: 5067 real time: 5069 gc time: 40" "cpu time: 5256 real time: 5253 gc time: 43" "cpu time: 5067 real time: 5066 gc time: 47" "cpu time: 5080 real time: 5080 gc time: 44" "cpu time: 5056 real time: 5056 gc time: 43" "cpu time: 5144 real time: 5141 gc time: 43" "cpu time: 5076 real time: 5073 gc time: 40")) ("100011111" ("cpu time: 5130 real time: 5128 gc time: 44" "cpu time: 5087 real time: 5086 gc time: 44" "cpu time: 5050 real time: 5048 gc time: 40" "cpu time: 5080 real time: 5082 gc time: 40" "cpu time: 5074 real time: 5073 gc time: 44" "cpu time: 5100 real time: 5098 gc time: 43" "cpu time: 5113 real time: 5110 gc time: 46" "cpu time: 5044 real time: 5045 gc time: 40")) ("100100000" ("cpu time: 867 real time: 868 gc time: 40" "cpu time: 890 real time: 888 gc time: 50" "cpu time: 870 real time: 872 gc time: 47" "cpu time: 867 real time: 867 gc time: 40" "cpu time: 864 real time: 863 gc time: 40" "cpu time: 867 real time: 866 gc time: 40" "cpu time: 867 real time: 864 gc time: 40" "cpu time: 867 real time: 869 gc time: 43")) ("100100001" ("cpu time: 890 real time: 889 gc time: 43" "cpu time: 890 real time: 888 gc time: 40" "cpu time: 886 real time: 885 gc time: 44" "cpu time: 894 real time: 889 gc time: 40" "cpu time: 914 real time: 912 gc time: 47" "cpu time: 890 real time: 887 gc time: 43" "cpu time: 887 real time: 887 gc time: 40" "cpu time: 890 real time: 889 gc time: 40")) ("100100010" ("cpu time: 884 real time: 881 gc time: 40" "cpu time: 874 real time: 875 gc time: 40" "cpu time: 880 real time: 880 gc time: 46" "cpu time: 897 real time: 892 gc time: 40" "cpu time: 894 real time: 896 gc time: 47" "cpu time: 876 real time: 877 gc time: 40" "cpu time: 880 real time: 878 gc time: 40" "cpu time: 883 real time: 880 gc time: 40")) ("100100011" ("cpu time: 900 real time: 900 gc time: 47" "cpu time: 904 real time: 902 gc time: 40" "cpu time: 890 real time: 893 gc time: 47" "cpu time: 890 real time: 889 gc time: 43" "cpu time: 897 real time: 895 gc time: 44" "cpu time: 893 real time: 891 gc time: 43" "cpu time: 907 real time: 908 gc time: 44" "cpu time: 897 real time: 893 gc time: 44")) ("100100100" ("cpu time: 877 real time: 876 gc time: 40" "cpu time: 880 real time: 877 gc time: 40" "cpu time: 887 real time: 885 gc time: 44" "cpu time: 880 real time: 881 gc time: 43" "cpu time: 884 real time: 880 gc time: 44" "cpu time: 876 real time: 876 gc time: 40" "cpu time: 894 real time: 892 gc time: 40" "cpu time: 883 real time: 879 gc time: 40")) ("100100101" ("cpu time: 910 real time: 908 gc time: 40" "cpu time: 920 real time: 917 gc time: 43" "cpu time: 920 real time: 920 gc time: 50" "cpu time: 890 real time: 892 gc time: 40" "cpu time: 897 real time: 897 gc time: 44" "cpu time: 896 real time: 893 gc time: 43" "cpu time: 896 real time: 893 gc time: 40" "cpu time: 897 real time: 893 gc time: 44")) ("100100110" ("cpu time: 890 real time: 890 gc time: 43" "cpu time: 890 real time: 891 gc time: 43" "cpu time: 893 real time: 892 gc time: 44" "cpu time: 906 real time: 904 gc time: 43" "cpu time: 890 real time: 889 gc time: 43" "cpu time: 903 real time: 903 gc time: 50" "cpu time: 890 real time: 890 gc time: 43" "cpu time: 890 real time: 890 gc time: 40")) ("100100111" ("cpu time: 903 real time: 900 gc time: 40" "cpu time: 907 real time: 908 gc time: 43" "cpu time: 900 real time: 897 gc time: 44" "cpu time: 900 real time: 901 gc time: 40" "cpu time: 906 real time: 904 gc time: 43" "cpu time: 900 real time: 899 gc time: 43" "cpu time: 913 real time: 911 gc time: 53" "cpu time: 900 real time: 900 gc time: 40")) ("100101000" ("cpu time: 943 real time: 938 gc time: 43" "cpu time: 927 real time: 928 gc time: 40" "cpu time: 926 real time: 926 gc time: 40" "cpu time: 927 real time: 927 gc time: 40" "cpu time: 980 real time: 980 gc time: 40" "cpu time: 930 real time: 929 gc time: 40" "cpu time: 927 real time: 925 gc time: 40" "cpu time: 927 real time: 927 gc time: 40")) ("100101001" ("cpu time: 950 real time: 946 gc time: 44" "cpu time: 947 real time: 948 gc time: 44" "cpu time: 950 real time: 948 gc time: 44" "cpu time: 960 real time: 958 gc time: 50" "cpu time: 960 real time: 957 gc time: 46" "cpu time: 946 real time: 947 gc time: 43" "cpu time: 946 real time: 944 gc time: 40" "cpu time: 950 real time: 948 gc time: 43")) ("100101010" ("cpu time: 940 real time: 938 gc time: 40" "cpu time: 944 real time: 945 gc time: 41" "cpu time: 963 real time: 965 gc time: 46" "cpu time: 940 real time: 938 gc time: 40" "cpu time: 944 real time: 944 gc time: 40" "cpu time: 956 real time: 956 gc time: 40" "cpu time: 940 real time: 938 gc time: 40" "cpu time: 950 real time: 949 gc time: 40")) ("100101011" ("cpu time: 950 real time: 948 gc time: 40" "cpu time: 950 real time: 951 gc time: 40" "cpu time: 950 real time: 949 gc time: 40" "cpu time: 950 real time: 950 gc time: 40" "cpu time: 950 real time: 949 gc time: 40" "cpu time: 950 real time: 947 gc time: 40" "cpu time: 954 real time: 951 gc time: 40" "cpu time: 953 real time: 950 gc time: 47")) ("100101100" ("cpu time: 947 real time: 946 gc time: 44" "cpu time: 944 real time: 941 gc time: 48" "cpu time: 953 real time: 949 gc time: 46" "cpu time: 940 real time: 939 gc time: 40" "cpu time: 940 real time: 941 gc time: 43" "cpu time: 950 real time: 947 gc time: 50" "cpu time: 940 real time: 939 gc time: 40" "cpu time: 957 real time: 955 gc time: 40")) ("100101101" ("cpu time: 953 real time: 951 gc time: 46" "cpu time: 964 real time: 963 gc time: 44" "cpu time: 953 real time: 951 gc time: 43" "cpu time: 947 real time: 946 gc time: 43" "cpu time: 974 real time: 972 gc time: 43" "cpu time: 950 real time: 949 gc time: 43" "cpu time: 963 real time: 959 gc time: 43" "cpu time: 950 real time: 949 gc time: 40")) ("100101110" ("cpu time: 970 real time: 969 gc time: 44" "cpu time: 963 real time: 964 gc time: 50" "cpu time: 953 real time: 952 gc time: 40" "cpu time: 987 real time: 983 gc time: 40" "cpu time: 950 real time: 950 gc time: 43" "cpu time: 980 real time: 978 gc time: 44" "cpu time: 953 real time: 952 gc time: 44" "cpu time: 950 real time: 950 gc time: 43")) ("100101111" ("cpu time: 956 real time: 955 gc time: 43" "cpu time: 950 real time: 952 gc time: 44" "cpu time: 956 real time: 955 gc time: 43" "cpu time: 973 real time: 970 gc time: 43" "cpu time: 953 real time: 954 gc time: 40" "cpu time: 957 real time: 955 gc time: 44" "cpu time: 960 real time: 958 gc time: 40" "cpu time: 963 real time: 964 gc time: 43")) ("100110000" ("cpu time: 5080 real time: 5080 gc time: 40" "cpu time: 5090 real time: 5089 gc time: 40" "cpu time: 5020 real time: 5019 gc time: 40" "cpu time: 5056 real time: 5054 gc time: 44" "cpu time: 5020 real time: 5022 gc time: 40" "cpu time: 5010 real time: 5013 gc time: 40" "cpu time: 5043 real time: 5040 gc time: 44" "cpu time: 5070 real time: 5068 gc time: 40")) ("100110001" ("cpu time: 5117 real time: 5117 gc time: 40" "cpu time: 5060 real time: 5057 gc time: 40" "cpu time: 5030 real time: 5028 gc time: 40" "cpu time: 5074 real time: 5072 gc time: 43" "cpu time: 5086 real time: 5083 gc time: 40" "cpu time: 5020 real time: 5019 gc time: 43" "cpu time: 5050 real time: 5047 gc time: 40" "cpu time: 5170 real time: 5169 gc time: 44")) ("100110010" ("cpu time: 5093 real time: 5091 gc time: 43" "cpu time: 5113 real time: 5112 gc time: 40" "cpu time: 5067 real time: 5067 gc time: 40" "cpu time: 5134 real time: 5135 gc time: 43" "cpu time: 5064 real time: 5062 gc time: 40" "cpu time: 5347 real time: 5346 gc time: 43" "cpu time: 5054 real time: 5053 gc time: 44" "cpu time: 5083 real time: 5081 gc time: 40")) ("100110011" ("cpu time: 5137 real time: 5136 gc time: 44" "cpu time: 5050 real time: 5053 gc time: 40" "cpu time: 5103 real time: 5100 gc time: 40" "cpu time: 5127 real time: 5127 gc time: 40" "cpu time: 5077 real time: 5075 gc time: 43" "cpu time: 5137 real time: 5134 gc time: 40" "cpu time: 5066 real time: 5061 gc time: 46" "cpu time: 5167 real time: 5164 gc time: 36")) ("100110100" ("cpu time: 5026 real time: 5023 gc time: 44" "cpu time: 5027 real time: 5023 gc time: 43" "cpu time: 5057 real time: 5055 gc time: 40" "cpu time: 5053 real time: 5053 gc time: 40" "cpu time: 5057 real time: 5056 gc time: 40" "cpu time: 5073 real time: 5073 gc time: 43" "cpu time: 5037 real time: 5037 gc time: 44" "cpu time: 5024 real time: 5022 gc time: 40")) ("100110101" ("cpu time: 5043 real time: 5040 gc time: 40" "cpu time: 5064 real time: 5058 gc time: 43" "cpu time: 5130 real time: 5126 gc time: 40" "cpu time: 5033 real time: 5033 gc time: 43" "cpu time: 5040 real time: 5038 gc time: 44" "cpu time: 5036 real time: 5037 gc time: 40" "cpu time: 5140 real time: 5138 gc time: 40" "cpu time: 5087 real time: 5086 gc time: 43")) ("100110110" ("cpu time: 5013 real time: 5016 gc time: 43" "cpu time: 5037 real time: 5034 gc time: 40" "cpu time: 5023 real time: 5023 gc time: 43" "cpu time: 5060 real time: 5059 gc time: 43" "cpu time: 5023 real time: 5020 gc time: 44" "cpu time: 5074 real time: 5070 gc time: 47" "cpu time: 5010 real time: 5007 gc time: 43" "cpu time: 5040 real time: 5039 gc time: 46")) ("100110111" ("cpu time: 5003 real time: 5004 gc time: 40" "cpu time: 5004 real time: 5003 gc time: 44" "cpu time: 5040 real time: 5039 gc time: 40" "cpu time: 5030 real time: 5027 gc time: 43" "cpu time: 4997 real time: 4999 gc time: 40" "cpu time: 5040 real time: 5036 gc time: 40" "cpu time: 4993 real time: 4992 gc time: 40" "cpu time: 5036 real time: 5038 gc time: 40")) ("100111000" ("cpu time: 5133 real time: 5134 gc time: 40" "cpu time: 5087 real time: 5086 gc time: 40" "cpu time: 5150 real time: 5147 gc time: 44" "cpu time: 5107 real time: 5107 gc time: 43" "cpu time: 5097 real time: 5095 gc time: 40" "cpu time: 5127 real time: 5124 gc time: 43" "cpu time: 5126 real time: 5123 gc time: 40" "cpu time: 5366 real time: 5366 gc time: 40")) ("100111001" ("cpu time: 5114 real time: 5115 gc time: 40" "cpu time: 5377 real time: 5377 gc time: 40" "cpu time: 5114 real time: 5112 gc time: 40" "cpu time: 5083 real time: 5085 gc time: 36" "cpu time: 5093 real time: 5091 gc time: 40" "cpu time: 5114 real time: 5113 gc time: 40" "cpu time: 5083 real time: 5082 gc time: 40" "cpu time: 5113 real time: 5112 gc time: 44")) ("100111010" ("cpu time: 5120 real time: 5118 gc time: 40" "cpu time: 5110 real time: 5109 gc time: 40" "cpu time: 5146 real time: 5145 gc time: 40" "cpu time: 5217 real time: 5215 gc time: 40" "cpu time: 5134 real time: 5134 gc time: 43" "cpu time: 5100 real time: 5100 gc time: 40" "cpu time: 5100 real time: 5099 gc time: 40" "cpu time: 5230 real time: 5228 gc time: 40")) ("100111011" ("cpu time: 5723 real time: 5723 gc time: 40" "cpu time: 5137 real time: 5134 gc time: 40" "cpu time: 5123 real time: 5125 gc time: 40" "cpu time: 5126 real time: 5127 gc time: 40" "cpu time: 5150 real time: 5149 gc time: 40" "cpu time: 5080 real time: 5079 gc time: 40" "cpu time: 5100 real time: 5099 gc time: 40" "cpu time: 5137 real time: 5136 gc time: 40")) ("100111100" ("cpu time: 5100 real time: 5099 gc time: 43" "cpu time: 5110 real time: 5111 gc time: 40" "cpu time: 5203 real time: 5206 gc time: 43" "cpu time: 5103 real time: 5101 gc time: 46" "cpu time: 5093 real time: 5093 gc time: 40" "cpu time: 5093 real time: 5096 gc time: 40" "cpu time: 5167 real time: 5164 gc time: 40" "cpu time: 5114 real time: 5114 gc time: 40")) ("100111101" ("cpu time: 5073 real time: 5071 gc time: 44" "cpu time: 5166 real time: 5170 gc time: 40" "cpu time: 5533 real time: 5533 gc time: 47" "cpu time: 5090 real time: 5091 gc time: 40" "cpu time: 5113 real time: 5113 gc time: 40" "cpu time: 5100 real time: 5099 gc time: 40" "cpu time: 5160 real time: 5158 gc time: 44" "cpu time: 5106 real time: 5106 gc time: 44")) ("100111110" ("cpu time: 5110 real time: 5107 gc time: 43" "cpu time: 5100 real time: 5100 gc time: 44" "cpu time: 5083 real time: 5080 gc time: 44" "cpu time: 5063 real time: 5063 gc time: 44" "cpu time: 5157 real time: 5157 gc time: 43" "cpu time: 5083 real time: 5085 gc time: 43" "cpu time: 5090 real time: 5088 gc time: 43" "cpu time: 5194 real time: 5194 gc time: 44")) ("100111111" ("cpu time: 5077 real time: 5078 gc time: 40" "cpu time: 5080 real time: 5081 gc time: 50" "cpu time: 5163 real time: 5161 gc time: 43" "cpu time: 5073 real time: 5068 gc time: 43" "cpu time: 5193 real time: 5194 gc time: 44" "cpu time: 5046 real time: 5043 gc time: 44" "cpu time: 5096 real time: 5094 gc time: 43" "cpu time: 5054 real time: 5050 gc time: 43")) ("101000000" ("cpu time: 5540 real time: 5537 gc time: 54" "cpu time: 5493 real time: 5486 gc time: 49" "cpu time: 5523 real time: 5518 gc time: 57" "cpu time: 5510 real time: 5506 gc time: 54" "cpu time: 5550 real time: 5549 gc time: 43" "cpu time: 5484 real time: 5479 gc time: 46" "cpu time: 5694 real time: 5686 gc time: 46" "cpu time: 5473 real time: 5469 gc time: 53")) ("101000001" ("cpu time: 5503 real time: 5499 gc time: 65" "cpu time: 5493 real time: 5490 gc time: 40" "cpu time: 5577 real time: 5573 gc time: 53" "cpu time: 5684 real time: 5680 gc time: 56" "cpu time: 5476 real time: 5473 gc time: 56" "cpu time: 5533 real time: 5533 gc time: 54" "cpu time: 5747 real time: 5739 gc time: 40" "cpu time: 5540 real time: 5535 gc time: 53")) ("101000010" ("cpu time: 5423 real time: 5418 gc time: 64" "cpu time: 5477 real time: 5470 gc time: 53" "cpu time: 5630 real time: 5627 gc time: 56" "cpu time: 5520 real time: 5519 gc time: 61" "cpu time: 5517 real time: 5513 gc time: 44" "cpu time: 5460 real time: 5456 gc time: 60" "cpu time: 5514 real time: 5512 gc time: 62" "cpu time: 5493 real time: 5489 gc time: 53")) ("101000011" ("cpu time: 5587 real time: 5583 gc time: 46" "cpu time: 5517 real time: 5513 gc time: 52" "cpu time: 5470 real time: 5468 gc time: 58" "cpu time: 5460 real time: 5459 gc time: 51" "cpu time: 5513 real time: 5510 gc time: 53" "cpu time: 5524 real time: 5523 gc time: 43" "cpu time: 5460 real time: 5455 gc time: 50" "cpu time: 5617 real time: 5613 gc time: 59")) ("101000100" ("cpu time: 5477 real time: 5471 gc time: 50" "cpu time: 5474 real time: 5470 gc time: 62" "cpu time: 5506 real time: 5503 gc time: 47" "cpu time: 5493 real time: 5491 gc time: 53" "cpu time: 5487 real time: 5483 gc time: 57" "cpu time: 5440 real time: 5440 gc time: 52" "cpu time: 5437 real time: 5431 gc time: 54" "cpu time: 5526 real time: 5524 gc time: 59")) ("101000101" ("cpu time: 5477 real time: 5473 gc time: 70" "cpu time: 5467 real time: 5465 gc time: 54" "cpu time: 5493 real time: 5490 gc time: 50" "cpu time: 5497 real time: 5492 gc time: 46" "cpu time: 5507 real time: 5503 gc time: 89" "cpu time: 5494 real time: 5489 gc time: 47" "cpu time: 5480 real time: 5472 gc time: 43" "cpu time: 5514 real time: 5512 gc time: 53")) ("101000110" ("cpu time: 5500 real time: 5495 gc time: 67" "cpu time: 5464 real time: 5463 gc time: 47" "cpu time: 5467 real time: 5467 gc time: 56" "cpu time: 5657 real time: 5653 gc time: 69" "cpu time: 5506 real time: 5499 gc time: 50" "cpu time: 5477 real time: 5472 gc time: 51" "cpu time: 5530 real time: 5528 gc time: 53" "cpu time: 5497 real time: 5494 gc time: 50")) ("101000111" ("cpu time: 5463 real time: 5462 gc time: 76" "cpu time: 5424 real time: 5421 gc time: 43" "cpu time: 5597 real time: 5594 gc time: 60" "cpu time: 5410 real time: 5405 gc time: 46" "cpu time: 5487 real time: 5480 gc time: 46" "cpu time: 5440 real time: 5439 gc time: 69" "cpu time: 5436 real time: 5433 gc time: 50" "cpu time: 5470 real time: 5467 gc time: 51")) ("101001000" ("cpu time: 5347 real time: 5342 gc time: 50" "cpu time: 5397 real time: 5393 gc time: 40" "cpu time: 5677 real time: 5674 gc time: 61" "cpu time: 5364 real time: 5361 gc time: 47" "cpu time: 5293 real time: 5288 gc time: 43" "cpu time: 5417 real time: 5415 gc time: 63" "cpu time: 5360 real time: 5357 gc time: 43" "cpu time: 5323 real time: 5319 gc time: 43")) ("101001001" ("cpu time: 5367 real time: 5362 gc time: 55" "cpu time: 5364 real time: 5361 gc time: 43" "cpu time: 5277 real time: 5275 gc time: 46" "cpu time: 5543 real time: 5541 gc time: 80" "cpu time: 5367 real time: 5366 gc time: 63" "cpu time: 5313 real time: 5313 gc time: 46" "cpu time: 5340 real time: 5336 gc time: 57" "cpu time: 5346 real time: 5343 gc time: 48")) ("101001010" ("cpu time: 5300 real time: 5297 gc time: 46" "cpu time: 5327 real time: 5323 gc time: 72" "cpu time: 5263 real time: 5259 gc time: 53" "cpu time: 5307 real time: 5302 gc time: 54" "cpu time: 5323 real time: 5318 gc time: 60" "cpu time: 5310 real time: 5310 gc time: 50" "cpu time: 5283 real time: 5282 gc time: 61" "cpu time: 5314 real time: 5310 gc time: 63")) ("101001011" ("cpu time: 5340 real time: 5337 gc time: 63" "cpu time: 5380 real time: 5375 gc time: 43" "cpu time: 5303 real time: 5295 gc time: 59" "cpu time: 5326 real time: 5322 gc time: 70" "cpu time: 5330 real time: 5327 gc time: 71" "cpu time: 5276 real time: 5271 gc time: 43" "cpu time: 5326 real time: 5324 gc time: 47" "cpu time: 5357 real time: 5353 gc time: 52")) ("101001100" ("cpu time: 5293 real time: 5289 gc time: 53" "cpu time: 5286 real time: 5282 gc time: 57" "cpu time: 5276 real time: 5274 gc time: 57" "cpu time: 5273 real time: 5269 gc time: 62" "cpu time: 5467 real time: 5463 gc time: 62" "cpu time: 5270 real time: 5266 gc time: 53" "cpu time: 5267 real time: 5264 gc time: 68" "cpu time: 5280 real time: 5275 gc time: 58")) ("101001101" ("cpu time: 5327 real time: 5326 gc time: 47" "cpu time: 5340 real time: 5337 gc time: 66" "cpu time: 5306 real time: 5306 gc time: 44" "cpu time: 5313 real time: 5312 gc time: 60" "cpu time: 5283 real time: 5280 gc time: 54" "cpu time: 5300 real time: 5296 gc time: 46" "cpu time: 5290 real time: 5287 gc time: 47" "cpu time: 5317 real time: 5315 gc time: 64")) ("101001110" ("cpu time: 5403 real time: 5400 gc time: 74" "cpu time: 5397 real time: 5394 gc time: 51" "cpu time: 5303 real time: 5299 gc time: 50" "cpu time: 5323 real time: 5318 gc time: 56" "cpu time: 8080 real time: 8078 gc time: 52" "cpu time: 5273 real time: 5272 gc time: 47" "cpu time: 5410 real time: 5404 gc time: 60" "cpu time: 5607 real time: 5605 gc time: 60")) ("101001111" ("cpu time: 5334 real time: 5327 gc time: 43" "cpu time: 5320 real time: 5317 gc time: 61" "cpu time: 5486 real time: 5484 gc time: 50" "cpu time: 5396 real time: 5393 gc time: 47" "cpu time: 5400 real time: 5393 gc time: 40" "cpu time: 5333 real time: 5330 gc time: 57" "cpu time: 5410 real time: 5410 gc time: 53" "cpu time: 5360 real time: 5357 gc time: 56")) ("101010000" ("cpu time: 9550 real time: 9550 gc time: 51" "cpu time: 9490 real time: 9489 gc time: 47" "cpu time: 9447 real time: 9443 gc time: 43" "cpu time: 9496 real time: 9495 gc time: 43" "cpu time: 9600 real time: 9599 gc time: 43" "cpu time: 9590 real time: 9589 gc time: 47" "cpu time: 9437 real time: 9434 gc time: 43" "cpu time: 9470 real time: 9471 gc time: 48")) ("101010001" ("cpu time: 9653 real time: 9653 gc time: 50" "cpu time: 9560 real time: 9555 gc time: 40" "cpu time: 9597 real time: 9594 gc time: 53" "cpu time: 9590 real time: 9592 gc time: 43" "cpu time: 9870 real time: 9867 gc time: 46" "cpu time: 9543 real time: 9544 gc time: 44" "cpu time: 9527 real time: 9523 gc time: 60" "cpu time: 9520 real time: 9514 gc time: 54")) ("101010010" ("cpu time: 9746 real time: 9747 gc time: 54" "cpu time: 9560 real time: 9561 gc time: 52" "cpu time: 9480 real time: 9478 gc time: 47" "cpu time: 9494 real time: 9491 gc time: 59" "cpu time: 9450 real time: 9448 gc time: 50" "cpu time: 9697 real time: 9697 gc time: 51" "cpu time: 9517 real time: 9518 gc time: 46" "cpu time: 9623 real time: 9623 gc time: 47")) ("101010011" ("cpu time: 9777 real time: 9774 gc time: 40" "cpu time: 9420 real time: 9423 gc time: 54" "cpu time: 9393 real time: 9390 gc time: 60" "cpu time: 9560 real time: 9557 gc time: 40" "cpu time: 9603 real time: 9603 gc time: 43" "cpu time: 9677 real time: 9678 gc time: 50" "cpu time: 9410 real time: 9408 gc time: 46" "cpu time: 9537 real time: 9536 gc time: 55")) ("101010100" ("cpu time: 9607 real time: 9603 gc time: 53" "cpu time: 9463 real time: 9462 gc time: 61" "cpu time: 9590 real time: 9589 gc time: 59" "cpu time: 9597 real time: 9592 gc time: 46" "cpu time: 9450 real time: 9449 gc time: 47" "cpu time: 9450 real time: 9447 gc time: 57" "cpu time: 9403 real time: 9400 gc time: 57" "cpu time: 9706 real time: 9706 gc time: 56")) ("101010101" ("cpu time: 9450 real time: 9447 gc time: 57" "cpu time: 9530 real time: 9527 gc time: 57" "cpu time: 9387 real time: 9387 gc time: 62" "cpu time: 9456 real time: 9459 gc time: 67" "cpu time: 9497 real time: 9496 gc time: 53" "cpu time: 9360 real time: 9356 gc time: 43" "cpu time: 10683 real time: 10681 gc time: 48" "cpu time: 9557 real time: 9555 gc time: 40")) ("101010110" ("cpu time: 9376 real time: 9374 gc time: 43" "cpu time: 9374 real time: 9370 gc time: 53" "cpu time: 9390 real time: 9391 gc time: 53" "cpu time: 9400 real time: 9395 gc time: 52" "cpu time: 9410 real time: 9411 gc time: 51" "cpu time: 9540 real time: 9538 gc time: 40" "cpu time: 9410 real time: 9406 gc time: 57" "cpu time: 9507 real time: 9506 gc time: 51")) ("101010111" ("cpu time: 9333 real time: 9328 gc time: 53" "cpu time: 9417 real time: 9417 gc time: 63" "cpu time: 9330 real time: 9326 gc time: 40" "cpu time: 9233 real time: 9230 gc time: 50" "cpu time: 9310 real time: 9307 gc time: 56" "cpu time: 9203 real time: 9200 gc time: 46" "cpu time: 9290 real time: 9289 gc time: 56" "cpu time: 9666 real time: 9666 gc time: 52")) ("101011000" ("cpu time: 9347 real time: 9344 gc time: 43" "cpu time: 9324 real time: 9325 gc time: 68" "cpu time: 9330 real time: 9329 gc time: 43" "cpu time: 9373 real time: 9372 gc time: 63" "cpu time: 9346 real time: 9344 gc time: 47" "cpu time: 9327 real time: 9325 gc time: 51" "cpu time: 9410 real time: 9408 gc time: 43" "cpu time: 9343 real time: 9344 gc time: 78")) ("101011001" ("cpu time: 9527 real time: 9523 gc time: 49" "cpu time: 10457 real time: 10454 gc time: 40" "cpu time: 9430 real time: 9428 gc time: 40" "cpu time: 9383 real time: 9381 gc time: 53" "cpu time: 9350 real time: 9350 gc time: 44" "cpu time: 9450 real time: 9450 gc time: 50" "cpu time: 9560 real time: 9559 gc time: 43" "cpu time: 9544 real time: 9541 gc time: 52")) ("101011010" ("cpu time: 9313 real time: 9311 gc time: 40" "cpu time: 9306 real time: 9305 gc time: 40" "cpu time: 9300 real time: 9297 gc time: 40" "cpu time: 9443 real time: 9440 gc time: 50" "cpu time: 9286 real time: 9285 gc time: 44" "cpu time: 9314 real time: 9311 gc time: 57" "cpu time: 9686 real time: 9686 gc time: 49" "cpu time: 9360 real time: 9361 gc time: 51")) ("101011011" ("cpu time: 9263 real time: 9261 gc time: 61" "cpu time: 9267 real time: 9263 gc time: 63" "cpu time: 9260 real time: 9260 gc time: 40" "cpu time: 9236 real time: 9233 gc time: 57" "cpu time: 9783 real time: 9781 gc time: 56" "cpu time: 9496 real time: 9495 gc time: 40" "cpu time: 9253 real time: 9251 gc time: 50" "cpu time: 9463 real time: 9462 gc time: 48")) ("101011100" ("cpu time: 12570 real time: 12571 gc time: 54" "cpu time: 9373 real time: 9371 gc time: 61" "cpu time: 9257 real time: 9253 gc time: 64" "cpu time: 9323 real time: 9322 gc time: 47" "cpu time: 9277 real time: 9276 gc time: 59" "cpu time: 9290 real time: 9289 gc time: 44" "cpu time: 9274 real time: 9271 gc time: 58" "cpu time: 9316 real time: 9316 gc time: 56")) ("101011101" ("cpu time: 9246 real time: 9245 gc time: 53" "cpu time: 9477 real time: 9472 gc time: 57" "cpu time: 9337 real time: 9335 gc time: 65" "cpu time: 9237 real time: 9234 gc time: 56" "cpu time: 9354 real time: 9353 gc time: 40" "cpu time: 9640 real time: 9635 gc time: 50" "cpu time: 9350 real time: 9350 gc time: 53" "cpu time: 9247 real time: 9247 gc time: 59")) ("101011110" ("cpu time: 10030 real time: 10031 gc time: 55" "cpu time: 9217 real time: 9218 gc time: 50" "cpu time: 10023 real time: 10022 gc time: 47" "cpu time: 9307 real time: 9310 gc time: 49" "cpu time: 9197 real time: 9198 gc time: 50" "cpu time: 9256 real time: 9258 gc time: 49" "cpu time: 9260 real time: 9259 gc time: 54" "cpu time: 9277 real time: 9274 gc time: 56")) ("101011111" ("cpu time: 9266 real time: 9265 gc time: 40" "cpu time: 9077 real time: 9075 gc time: 56" "cpu time: 9200 real time: 9199 gc time: 53" "cpu time: 9193 real time: 9187 gc time: 64" "cpu time: 9107 real time: 9102 gc time: 61" "cpu time: 9103 real time: 9099 gc time: 43" "cpu time: 9120 real time: 9120 gc time: 43" "cpu time: 9164 real time: 9162 gc time: 70")) ("101100000" ("cpu time: 5453 real time: 5447 gc time: 40" "cpu time: 5644 real time: 5637 gc time: 51" "cpu time: 5507 real time: 5502 gc time: 44" "cpu time: 5497 real time: 5493 gc time: 48" "cpu time: 6290 real time: 6290 gc time: 59" "cpu time: 5417 real time: 5416 gc time: 47" "cpu time: 5463 real time: 5460 gc time: 44" "cpu time: 5513 real time: 5511 gc time: 50")) ("101100001" ("cpu time: 5507 real time: 5504 gc time: 55" "cpu time: 5486 real time: 5478 gc time: 53" "cpu time: 5537 real time: 5530 gc time: 57" "cpu time: 5544 real time: 5541 gc time: 49" "cpu time: 5474 real time: 5470 gc time: 43" "cpu time: 5554 real time: 5551 gc time: 43" "cpu time: 5520 real time: 5520 gc time: 50" "cpu time: 5463 real time: 5460 gc time: 47")) ("101100010" ("cpu time: 5513 real time: 5511 gc time: 58" "cpu time: 5473 real time: 5470 gc time: 43" "cpu time: 5554 real time: 5550 gc time: 64" "cpu time: 5560 real time: 5555 gc time: 43" "cpu time: 5530 real time: 5526 gc time: 77" "cpu time: 5533 real time: 5529 gc time: 60" "cpu time: 5497 real time: 5494 gc time: 43" "cpu time: 5517 real time: 5517 gc time: 61")) ("101100011" ("cpu time: 5503 real time: 5500 gc time: 50" "cpu time: 5460 real time: 5459 gc time: 50" "cpu time: 5460 real time: 5457 gc time: 61" "cpu time: 5477 real time: 5474 gc time: 59" "cpu time: 5484 real time: 5480 gc time: 47" "cpu time: 5620 real time: 5618 gc time: 56" "cpu time: 5594 real time: 5589 gc time: 47" "cpu time: 5466 real time: 5465 gc time: 43")) ("101100100" ("cpu time: 5477 real time: 5471 gc time: 52" "cpu time: 5430 real time: 5427 gc time: 48" "cpu time: 5473 real time: 5470 gc time: 56" "cpu time: 5554 real time: 5548 gc time: 56" "cpu time: 5483 real time: 5482 gc time: 53" "cpu time: 5473 real time: 5467 gc time: 51" "cpu time: 5473 real time: 5472 gc time: 51" "cpu time: 5490 real time: 5485 gc time: 59")) ("101100101" ("cpu time: 5420 real time: 5418 gc time: 43" "cpu time: 5430 real time: 5428 gc time: 43" "cpu time: 5487 real time: 5484 gc time: 56" "cpu time: 5457 real time: 5454 gc time: 47" "cpu time: 5463 real time: 5459 gc time: 64" "cpu time: 5446 real time: 5445 gc time: 46" "cpu time: 5467 real time: 5461 gc time: 62" "cpu time: 5534 real time: 5530 gc time: 54")) ("101100110" ("cpu time: 5463 real time: 5460 gc time: 40" "cpu time: 5453 real time: 5450 gc time: 46" "cpu time: 5483 real time: 5480 gc time: 66" "cpu time: 5463 real time: 5459 gc time: 43" "cpu time: 5516 real time: 5513 gc time: 50" "cpu time: 5527 real time: 5522 gc time: 60" "cpu time: 5443 real time: 5437 gc time: 44" "cpu time: 5520 real time: 5518 gc time: 60")) ("101100111" ("cpu time: 5530 real time: 5526 gc time: 47" "cpu time: 5536 real time: 5534 gc time: 61" "cpu time: 5574 real time: 5570 gc time: 46" "cpu time: 5490 real time: 5489 gc time: 53" "cpu time: 5486 real time: 5484 gc time: 69" "cpu time: 5480 real time: 5476 gc time: 43" "cpu time: 5527 real time: 5524 gc time: 72" "cpu time: 5464 real time: 5461 gc time: 49")) ("101101000" ("cpu time: 5296 real time: 5291 gc time: 61" "cpu time: 5293 real time: 5289 gc time: 48" "cpu time: 5284 real time: 5282 gc time: 63" "cpu time: 5253 real time: 5253 gc time: 47" "cpu time: 5276 real time: 5275 gc time: 44" "cpu time: 5237 real time: 5233 gc time: 50" "cpu time: 5237 real time: 5233 gc time: 55" "cpu time: 5293 real time: 5289 gc time: 58")) ("101101001" ("cpu time: 5320 real time: 5317 gc time: 43" "cpu time: 5347 real time: 5342 gc time: 46" "cpu time: 5396 real time: 5394 gc time: 47" "cpu time: 5437 real time: 5432 gc time: 46" "cpu time: 5427 real time: 5424 gc time: 43" "cpu time: 5356 real time: 5357 gc time: 57" "cpu time: 5353 real time: 5347 gc time: 57" "cpu time: 5310 real time: 5308 gc time: 50")) ("101101010" ("cpu time: 5403 real time: 5399 gc time: 47" "cpu time: 5390 real time: 5385 gc time: 58" "cpu time: 5320 real time: 5314 gc time: 48" "cpu time: 5313 real time: 5311 gc time: 62" "cpu time: 5423 real time: 5419 gc time: 49" "cpu time: 5337 real time: 5333 gc time: 49" "cpu time: 5404 real time: 5400 gc time: 46" "cpu time: 5343 real time: 5339 gc time: 55")) ("101101011" ("cpu time: 5260 real time: 5259 gc time: 80" "cpu time: 5267 real time: 5265 gc time: 47" "cpu time: 5327 real time: 5325 gc time: 55" "cpu time: 5387 real time: 5384 gc time: 67" "cpu time: 5280 real time: 5277 gc time: 61" "cpu time: 5300 real time: 5296 gc time: 63" "cpu time: 5383 real time: 5381 gc time: 53" "cpu time: 5324 real time: 5322 gc time: 46")) ("101101100" ("cpu time: 5270 real time: 5266 gc time: 60" "cpu time: 5380 real time: 5378 gc time: 74" "cpu time: 5300 real time: 5297 gc time: 60" "cpu time: 5346 real time: 5344 gc time: 44" "cpu time: 5286 real time: 5285 gc time: 70" "cpu time: 5727 real time: 5721 gc time: 53" "cpu time: 5274 real time: 5270 gc time: 57" "cpu time: 5357 real time: 5353 gc time: 50")) ("101101101" ("cpu time: 5330 real time: 5326 gc time: 43" "cpu time: 5337 real time: 5333 gc time: 47" "cpu time: 5343 real time: 5341 gc time: 67" "cpu time: 5277 real time: 5273 gc time: 56" "cpu time: 5286 real time: 5284 gc time: 60" "cpu time: 5313 real time: 5309 gc time: 64" "cpu time: 5300 real time: 5295 gc time: 50" "cpu time: 5327 real time: 5318 gc time: 59")) ("101101110" ("cpu time: 5306 real time: 5303 gc time: 53" "cpu time: 5677 real time: 5671 gc time: 60" "cpu time: 5310 real time: 5308 gc time: 50" "cpu time: 5280 real time: 5282 gc time: 43" "cpu time: 5327 real time: 5324 gc time: 60" "cpu time: 5290 real time: 5287 gc time: 51" "cpu time: 5320 real time: 5316 gc time: 60" "cpu time: 5337 real time: 5336 gc time: 52")) ("101101111" ("cpu time: 5280 real time: 5278 gc time: 61" "cpu time: 5316 real time: 5314 gc time: 50" "cpu time: 5320 real time: 5316 gc time: 46" "cpu time: 5310 real time: 5309 gc time: 72" "cpu time: 5330 real time: 5329 gc time: 70" "cpu time: 5306 real time: 5303 gc time: 60" "cpu time: 5293 real time: 5292 gc time: 43" "cpu time: 5320 real time: 5318 gc time: 53")) ("101110000" ("cpu time: 9484 real time: 9480 gc time: 40" "cpu time: 9543 real time: 9542 gc time: 40" "cpu time: 9540 real time: 9539 gc time: 46" "cpu time: 9517 real time: 9519 gc time: 47" "cpu time: 9470 real time: 9470 gc time: 56" "cpu time: 9543 real time: 9539 gc time: 47" "cpu time: 9490 real time: 9489 gc time: 69" "cpu time: 9477 real time: 9474 gc time: 50")) ("101110001" ("cpu time: 9510 real time: 9511 gc time: 47" "cpu time: 9697 real time: 9695 gc time: 50" "cpu time: 9570 real time: 9567 gc time: 43" "cpu time: 10223 real time: 10221 gc time: 40" "cpu time: 9494 real time: 9494 gc time: 43" "cpu time: 9584 real time: 9585 gc time: 52" "cpu time: 9573 real time: 9571 gc time: 62" "cpu time: 9614 real time: 9613 gc time: 54")) ("101110010" ("cpu time: 9420 real time: 9419 gc time: 67" "cpu time: 9403 real time: 9402 gc time: 56" "cpu time: 9486 real time: 9486 gc time: 40" "cpu time: 9417 real time: 9416 gc time: 47" "cpu time: 9477 real time: 9476 gc time: 64" "cpu time: 9477 real time: 9478 gc time: 43" "cpu time: 9567 real time: 9565 gc time: 64" "cpu time: 9423 real time: 9422 gc time: 50")) ("101110011" ("cpu time: 9470 real time: 9467 gc time: 44" "cpu time: 14560 real time: 14559 gc time: 40" "cpu time: 9593 real time: 9591 gc time: 40" "cpu time: 9503 real time: 9502 gc time: 64" "cpu time: 9393 real time: 9393 gc time: 54" "cpu time: 9437 real time: 9436 gc time: 66" "cpu time: 9543 real time: 9541 gc time: 40" "cpu time: 9433 real time: 9430 gc time: 49")) ("101110100" ("cpu time: 9480 real time: 9480 gc time: 54" "cpu time: 9403 real time: 9402 gc time: 44" "cpu time: 9453 real time: 9450 gc time: 40" "cpu time: 9413 real time: 9411 gc time: 55" "cpu time: 9556 real time: 9551 gc time: 50" "cpu time: 9526 real time: 9524 gc time: 47" "cpu time: 9510 real time: 9510 gc time: 55" "cpu time: 9443 real time: 9443 gc time: 46")) ("101110101" ("cpu time: 9390 real time: 9388 gc time: 50" "cpu time: 9413 real time: 9410 gc time: 50" "cpu time: 9400 real time: 9398 gc time: 47" "cpu time: 9410 real time: 9410 gc time: 67" "cpu time: 9397 real time: 9394 gc time: 50" "cpu time: 9703 real time: 9703 gc time: 60" "cpu time: 9514 real time: 9512 gc time: 53" "cpu time: 9680 real time: 9679 gc time: 54")) ("101110110" ("cpu time: 9657 real time: 9657 gc time: 47" "cpu time: 9267 real time: 9267 gc time: 43" "cpu time: 9370 real time: 9369 gc time: 50" "cpu time: 9320 real time: 9318 gc time: 53" "cpu time: 9307 real time: 9306 gc time: 80" "cpu time: 9297 real time: 9290 gc time: 47" "cpu time: 9390 real time: 9388 gc time: 63" "cpu time: 9620 real time: 9618 gc time: 53")) ("101110111" ("cpu time: 9430 real time: 9425 gc time: 46" "cpu time: 9233 real time: 9235 gc time: 50" "cpu time: 9536 real time: 9530 gc time: 47" "cpu time: 9400 real time: 9398 gc time: 43" "cpu time: 9293 real time: 9289 gc time: 103" "cpu time: 9330 real time: 9331 gc time: 54" "cpu time: 9300 real time: 9295 gc time: 43" "cpu time: 9453 real time: 9451 gc time: 59")) ("101111000" ("cpu time: 9477 real time: 9472 gc time: 47" "cpu time: 9327 real time: 9327 gc time: 40" "cpu time: 9297 real time: 9295 gc time: 43" "cpu time: 9370 real time: 9368 gc time: 53" "cpu time: 9370 real time: 9368 gc time: 58" "cpu time: 9300 real time: 9299 gc time: 43" "cpu time: 9360 real time: 9356 gc time: 48" "cpu time: 9370 real time: 9368 gc time: 71")) ("101111001" ("cpu time: 9446 real time: 9445 gc time: 50" "cpu time: 9393 real time: 9393 gc time: 40" "cpu time: 9544 real time: 9537 gc time: 56" "cpu time: 9490 real time: 9489 gc time: 43" "cpu time: 9577 real time: 9576 gc time: 60" "cpu time: 9366 real time: 9364 gc time: 47" "cpu time: 9433 real time: 9426 gc time: 40" "cpu time: 9377 real time: 9374 gc time: 60")) ("101111010" ("cpu time: 9297 real time: 9295 gc time: 58" "cpu time: 14370 real time: 14370 gc time: 50" "cpu time: 9287 real time: 9282 gc time: 40" "cpu time: 9280 real time: 9278 gc time: 40" "cpu time: 9350 real time: 9349 gc time: 56" "cpu time: 14370 real time: 14370 gc time: 51" "cpu time: 9263 real time: 9261 gc time: 57" "cpu time: 9330 real time: 9329 gc time: 57")) ("101111011" ("cpu time: 9276 real time: 9276 gc time: 74" "cpu time: 9483 real time: 9482 gc time: 52" "cpu time: 9324 real time: 9322 gc time: 48" "cpu time: 9260 real time: 9256 gc time: 55" "cpu time: 9270 real time: 9268 gc time: 47" "cpu time: 9230 real time: 9229 gc time: 44" "cpu time: 9500 real time: 9501 gc time: 40" "cpu time: 9250 real time: 9247 gc time: 40")) ("101111100" ("cpu time: 9437 real time: 9434 gc time: 54" "cpu time: 9270 real time: 9267 gc time: 44" "cpu time: 9280 real time: 9277 gc time: 44" "cpu time: 9323 real time: 9317 gc time: 52" "cpu time: 9747 real time: 9745 gc time: 49" "cpu time: 9360 real time: 9355 gc time: 69" "cpu time: 9357 real time: 9357 gc time: 44" "cpu time: 9326 real time: 9326 gc time: 50")) ("101111101" ("cpu time: 9560 real time: 9556 gc time: 46" "cpu time: 9803 real time: 9800 gc time: 40" "cpu time: 9450 real time: 9447 gc time: 63" "cpu time: 9303 real time: 9303 gc time: 46" "cpu time: 9346 real time: 9346 gc time: 46" "cpu time: 9340 real time: 9342 gc time: 44" "cpu time: 9270 real time: 9266 gc time: 40" "cpu time: 9310 real time: 9312 gc time: 62")) ("101111110" ("cpu time: 9630 real time: 9627 gc time: 58" "cpu time: 9143 real time: 9141 gc time: 57" "cpu time: 9283 real time: 9283 gc time: 48" "cpu time: 9167 real time: 9163 gc time: 54" "cpu time: 9253 real time: 9252 gc time: 40" "cpu time: 9350 real time: 9347 gc time: 43" "cpu time: 9303 real time: 9302 gc time: 44" "cpu time: 9243 real time: 9244 gc time: 43")) ("101111111" ("cpu time: 9164 real time: 9159 gc time: 47" "cpu time: 9196 real time: 9196 gc time: 62" "cpu time: 9487 real time: 9487 gc time: 40" "cpu time: 9144 real time: 9140 gc time: 56" "cpu time: 9270 real time: 9268 gc time: 47" "cpu time: 9266 real time: 9259 gc time: 50" "cpu time: 9693 real time: 9688 gc time: 44" "cpu time: 9510 real time: 9505 gc time: 59")) ("110000000" ("cpu time: 6357 real time: 6352 gc time: 43" "cpu time: 6373 real time: 6371 gc time: 43" "cpu time: 6493 real time: 6490 gc time: 50" "cpu time: 6407 real time: 6404 gc time: 47" "cpu time: 6377 real time: 6372 gc time: 47" "cpu time: 6533 real time: 6532 gc time: 46" "cpu time: 6380 real time: 6376 gc time: 50" "cpu time: 6370 real time: 6369 gc time: 58")) ("110000001" ("cpu time: 6423 real time: 6418 gc time: 53" "cpu time: 6377 real time: 6377 gc time: 50" "cpu time: 6503 real time: 6504 gc time: 58" "cpu time: 6390 real time: 6389 gc time: 40" "cpu time: 6390 real time: 6386 gc time: 54" "cpu time: 6543 real time: 6541 gc time: 68" "cpu time: 6384 real time: 6382 gc time: 53" "cpu time: 6380 real time: 6377 gc time: 44")) ("110000010" ("cpu time: 6400 real time: 6401 gc time: 44" "cpu time: 6340 real time: 6334 gc time: 54" "cpu time: 6670 real time: 6668 gc time: 51" "cpu time: 6336 real time: 6336 gc time: 44" "cpu time: 6343 real time: 6341 gc time: 43" "cpu time: 6487 real time: 6486 gc time: 48" "cpu time: 6494 real time: 6495 gc time: 40" "cpu time: 6453 real time: 6453 gc time: 62")) ("110000011" ("cpu time: 6527 real time: 6527 gc time: 40" "cpu time: 6434 real time: 6432 gc time: 54" "cpu time: 6356 real time: 6356 gc time: 40" "cpu time: 6393 real time: 6390 gc time: 43" "cpu time: 6440 real time: 6437 gc time: 51" "cpu time: 6383 real time: 6380 gc time: 43" "cpu time: 6407 real time: 6406 gc time: 63" "cpu time: 6416 real time: 6415 gc time: 54")) ("110000100" ("cpu time: 6536 real time: 6532 gc time: 50" "cpu time: 6450 real time: 6445 gc time: 49" "cpu time: 6523 real time: 6522 gc time: 44" "cpu time: 6430 real time: 6431 gc time: 40" "cpu time: 6463 real time: 6462 gc time: 44" "cpu time: 6427 real time: 6428 gc time: 67" "cpu time: 6440 real time: 6437 gc time: 50" "cpu time: 6453 real time: 6454 gc time: 57")) ("110000101" ("cpu time: 6444 real time: 6441 gc time: 44" "cpu time: 6440 real time: 6440 gc time: 40" "cpu time: 6460 real time: 6458 gc time: 60" "cpu time: 6447 real time: 6444 gc time: 52" "cpu time: 6663 real time: 6662 gc time: 67" "cpu time: 6430 real time: 6429 gc time: 47" "cpu time: 6440 real time: 6442 gc time: 47" "cpu time: 6420 real time: 6420 gc time: 58")) ("110000110" ("cpu time: 6313 real time: 6311 gc time: 50" "cpu time: 6297 real time: 6294 gc time: 43" "cpu time: 6320 real time: 6317 gc time: 50" "cpu time: 6337 real time: 6333 gc time: 43" "cpu time: 6283 real time: 6285 gc time: 57" "cpu time: 6320 real time: 6323 gc time: 40" "cpu time: 6333 real time: 6332 gc time: 50" "cpu time: 6346 real time: 6341 gc time: 52")) ("110000111" ("cpu time: 6334 real time: 6335 gc time: 44" "cpu time: 6333 real time: 6331 gc time: 53" "cpu time: 6373 real time: 6372 gc time: 40" "cpu time: 6387 real time: 6386 gc time: 50" "cpu time: 6363 real time: 6362 gc time: 54" "cpu time: 6343 real time: 6340 gc time: 50" "cpu time: 6304 real time: 6300 gc time: 47" "cpu time: 6390 real time: 6388 gc time: 58")) ("110001000" ("cpu time: 6457 real time: 6453 gc time: 47" "cpu time: 6424 real time: 6421 gc time: 44" "cpu time: 6477 real time: 6478 gc time: 49" "cpu time: 6467 real time: 6466 gc time: 50" "cpu time: 6467 real time: 6469 gc time: 53" "cpu time: 6493 real time: 6494 gc time: 50" "cpu time: 6613 real time: 6612 gc time: 50" "cpu time: 6590 real time: 6588 gc time: 40")) ("110001001" ("cpu time: 6823 real time: 6823 gc time: 54" "cpu time: 6447 real time: 6444 gc time: 43" "cpu time: 6587 real time: 6585 gc time: 40" "cpu time: 6454 real time: 6454 gc time: 49" "cpu time: 6630 real time: 6629 gc time: 50" "cpu time: 6590 real time: 6589 gc time: 54" "cpu time: 6446 real time: 6439 gc time: 40" "cpu time: 6587 real time: 6585 gc time: 52")) ("110001010" ("cpu time: 6517 real time: 6516 gc time: 54" "cpu time: 6564 real time: 6564 gc time: 44" "cpu time: 6700 real time: 6700 gc time: 44" "cpu time: 6526 real time: 6522 gc time: 53" "cpu time: 6430 real time: 6429 gc time: 40" "cpu time: 6630 real time: 6626 gc time: 43" "cpu time: 6587 real time: 6584 gc time: 50" "cpu time: 6687 real time: 6687 gc time: 40")) ("110001011" ("cpu time: 6496 real time: 6498 gc time: 47" "cpu time: 6594 real time: 6590 gc time: 40" "cpu time: 6487 real time: 6483 gc time: 40" "cpu time: 6760 real time: 6758 gc time: 44" "cpu time: 6637 real time: 6634 gc time: 53" "cpu time: 6483 real time: 6480 gc time: 46" "cpu time: 6484 real time: 6483 gc time: 43" "cpu time: 6603 real time: 6602 gc time: 43")) ("110001100" ("cpu time: 6537 real time: 6535 gc time: 50" "cpu time: 6546 real time: 6544 gc time: 50" "cpu time: 6580 real time: 6579 gc time: 54" "cpu time: 6514 real time: 6511 gc time: 40" "cpu time: 6540 real time: 6538 gc time: 60" "cpu time: 6714 real time: 6710 gc time: 54" "cpu time: 6553 real time: 6552 gc time: 49" "cpu time: 9770 real time: 9768 gc time: 59")) ("110001101" ("cpu time: 6503 real time: 6499 gc time: 40" "cpu time: 6486 real time: 6485 gc time: 40" "cpu time: 6504 real time: 6502 gc time: 57" "cpu time: 6477 real time: 6473 gc time: 40" "cpu time: 6507 real time: 6506 gc time: 57" "cpu time: 6536 real time: 6535 gc time: 53" "cpu time: 6503 real time: 6503 gc time: 46" "cpu time: 6553 real time: 6550 gc time: 40")) ("110001110" ("cpu time: 6384 real time: 6378 gc time: 53" "cpu time: 6416 real time: 6415 gc time: 40" "cpu time: 6403 real time: 6401 gc time: 43" "cpu time: 6463 real time: 6462 gc time: 53" "cpu time: 6374 real time: 6373 gc time: 44" "cpu time: 6336 real time: 6334 gc time: 56" "cpu time: 6410 real time: 6407 gc time: 51" "cpu time: 6450 real time: 6446 gc time: 43")) ("110001111" ("cpu time: 6417 real time: 6417 gc time: 51" "cpu time: 6446 real time: 6447 gc time: 43" "cpu time: 6393 real time: 6392 gc time: 54" "cpu time: 6460 real time: 6458 gc time: 40" "cpu time: 6417 real time: 6415 gc time: 40" "cpu time: 6434 real time: 6430 gc time: 40" "cpu time: 6433 real time: 6431 gc time: 46" "cpu time: 6444 real time: 6442 gc time: 59")) ("110010000" ("cpu time: 7313 real time: 7313 gc time: 40" "cpu time: 4497 real time: 4495 gc time: 43" "cpu time: 4373 real time: 4374 gc time: 40" "cpu time: 4383 real time: 4379 gc time: 40" "cpu time: 4370 real time: 4368 gc time: 40" "cpu time: 4353 real time: 4351 gc time: 40" "cpu time: 4414 real time: 4413 gc time: 40" "cpu time: 4403 real time: 4401 gc time: 40")) ("110010001" ("cpu time: 4367 real time: 4364 gc time: 40" "cpu time: 4390 real time: 4390 gc time: 40" "cpu time: 4393 real time: 4393 gc time: 40" "cpu time: 4480 real time: 4477 gc time: 44" "cpu time: 4390 real time: 4389 gc time: 40" "cpu time: 4373 real time: 4373 gc time: 40" "cpu time: 4374 real time: 4371 gc time: 40" "cpu time: 4370 real time: 4370 gc time: 40")) ("110010010" ("cpu time: 4393 real time: 4390 gc time: 40" "cpu time: 4420 real time: 4418 gc time: 43" "cpu time: 5147 real time: 5143 gc time: 43" "cpu time: 4406 real time: 4403 gc time: 40" "cpu time: 4443 real time: 4440 gc time: 40" "cpu time: 4500 real time: 4500 gc time: 40" "cpu time: 4403 real time: 4401 gc time: 43" "cpu time: 4433 real time: 4433 gc time: 43")) ("110010011" ("cpu time: 4383 real time: 4379 gc time: 44" "cpu time: 4403 real time: 4398 gc time: 40" "cpu time: 4384 real time: 4382 gc time: 43" "cpu time: 4377 real time: 4376 gc time: 40" "cpu time: 4367 real time: 4364 gc time: 44" "cpu time: 4410 real time: 4409 gc time: 40" "cpu time: 4403 real time: 4402 gc time: 40" "cpu time: 4396 real time: 4398 gc time: 40")) ("110010100" ("cpu time: 4430 real time: 4430 gc time: 43" "cpu time: 4414 real time: 4415 gc time: 43" "cpu time: 4416 real time: 4416 gc time: 44" "cpu time: 4426 real time: 4426 gc time: 40" "cpu time: 4410 real time: 4411 gc time: 40" "cpu time: 4407 real time: 4407 gc time: 44" "cpu time: 4417 real time: 4413 gc time: 43" "cpu time: 4407 real time: 4405 gc time: 44")) ("110010101" ("cpu time: 4427 real time: 4425 gc time: 47" "cpu time: 4414 real time: 4409 gc time: 43" "cpu time: 4410 real time: 4408 gc time: 40" "cpu time: 4410 real time: 4414 gc time: 43" "cpu time: 4397 real time: 4399 gc time: 44" "cpu time: 4413 real time: 4411 gc time: 40" "cpu time: 4433 real time: 4433 gc time: 43" "cpu time: 4400 real time: 4396 gc time: 43")) ("110010110" ("cpu time: 5897 real time: 5894 gc time: 43" "cpu time: 3253 real time: 3255 gc time: 44" "cpu time: 3333 real time: 3333 gc time: 44" "cpu time: 3267 real time: 3268 gc time: 46" "cpu time: 3264 real time: 3261 gc time: 44" "cpu time: 3270 real time: 3269 gc time: 43" "cpu time: 5843 real time: 5844 gc time: 40" "cpu time: 3344 real time: 3339 gc time: 44")) ("110010111" ("cpu time: 3353 real time: 3348 gc time: 43" "cpu time: 3277 real time: 3277 gc time: 40" "cpu time: 3360 real time: 3362 gc time: 40" "cpu time: 3250 real time: 3248 gc time: 40" "cpu time: 3270 real time: 3268 gc time: 40" "cpu time: 3267 real time: 3266 gc time: 44" "cpu time: 3264 real time: 3264 gc time: 46" "cpu time: 3254 real time: 3252 gc time: 47")) ("110011000" ("cpu time: 4433 real time: 4432 gc time: 40" "cpu time: 4486 real time: 4486 gc time: 40" "cpu time: 4413 real time: 4414 gc time: 40" "cpu time: 4440 real time: 4440 gc time: 40" "cpu time: 4426 real time: 4427 gc time: 43" "cpu time: 4413 real time: 4411 gc time: 40" "cpu time: 4430 real time: 4428 gc time: 40" "cpu time: 4487 real time: 4485 gc time: 40")) ("110011001" ("cpu time: 4480 real time: 4480 gc time: 43" "cpu time: 4427 real time: 4427 gc time: 40" "cpu time: 4417 real time: 4415 gc time: 44" "cpu time: 4443 real time: 4444 gc time: 40" "cpu time: 4423 real time: 4425 gc time: 40" "cpu time: 4457 real time: 4454 gc time: 43" "cpu time: 4430 real time: 4428 gc time: 40" "cpu time: 4430 real time: 4429 gc time: 40")) ("110011010" ("cpu time: 4450 real time: 4447 gc time: 40" "cpu time: 4484 real time: 4481 gc time: 40" "cpu time: 4480 real time: 4478 gc time: 43" "cpu time: 4550 real time: 4547 gc time: 40" "cpu time: 4480 real time: 4478 gc time: 40" "cpu time: 4457 real time: 4452 gc time: 40" "cpu time: 4463 real time: 4459 gc time: 44" "cpu time: 4480 real time: 4480 gc time: 43")) ("110011011" ("cpu time: 4507 real time: 4503 gc time: 43" "cpu time: 4447 real time: 4443 gc time: 40" "cpu time: 4487 real time: 4486 gc time: 40" "cpu time: 4460 real time: 4459 gc time: 40" "cpu time: 6090 real time: 6086 gc time: 43" "cpu time: 4450 real time: 4452 gc time: 40" "cpu time: 4453 real time: 4450 gc time: 40" "cpu time: 4490 real time: 4489 gc time: 40")) ("110011100" ("cpu time: 4463 real time: 4466 gc time: 43" "cpu time: 4460 real time: 4457 gc time: 43" "cpu time: 4490 real time: 4486 gc time: 43" "cpu time: 4474 real time: 4469 gc time: 43" "cpu time: 4474 real time: 4474 gc time: 50" "cpu time: 4487 real time: 4483 gc time: 40" "cpu time: 4466 real time: 4462 gc time: 40" "cpu time: 4467 real time: 4464 gc time: 43")) ("110011101" ("cpu time: 4460 real time: 4461 gc time: 40" "cpu time: 4464 real time: 4461 gc time: 43" "cpu time: 4463 real time: 4463 gc time: 40" "cpu time: 4463 real time: 4463 gc time: 44" "cpu time: 4454 real time: 4452 gc time: 40" "cpu time: 5640 real time: 5640 gc time: 40" "cpu time: 4457 real time: 4457 gc time: 43" "cpu time: 5644 real time: 5643 gc time: 43")) ("110011110" ("cpu time: 3313 real time: 3315 gc time: 43" "cpu time: 5910 real time: 5910 gc time: 43" "cpu time: 3327 real time: 3325 gc time: 40" "cpu time: 3337 real time: 3338 gc time: 50" "cpu time: 3346 real time: 3346 gc time: 44" "cpu time: 3313 real time: 3311 gc time: 40" "cpu time: 3323 real time: 3325 gc time: 43" "cpu time: 3327 real time: 3325 gc time: 40")) ("110011111" ("cpu time: 3310 real time: 3308 gc time: 53" "cpu time: 3377 real time: 3375 gc time: 43" "cpu time: 3360 real time: 3360 gc time: 43" "cpu time: 3333 real time: 3331 gc time: 43" "cpu time: 3324 real time: 3318 gc time: 47" "cpu time: 3340 real time: 3342 gc time: 40" "cpu time: 3336 real time: 3334 gc time: 43" "cpu time: 3320 real time: 3319 gc time: 44")) ("110100000" ("cpu time: 6400 real time: 6397 gc time: 51" "cpu time: 6350 real time: 6349 gc time: 44" "cpu time: 6447 real time: 6447 gc time: 56" "cpu time: 6590 real time: 6590 gc time: 47" "cpu time: 6477 real time: 6477 gc time: 57" "cpu time: 6377 real time: 6377 gc time: 47" "cpu time: 6617 real time: 6613 gc time: 74" "cpu time: 6300 real time: 6299 gc time: 40")) ("110100001" ("cpu time: 6516 real time: 6518 gc time: 61" "cpu time: 6673 real time: 6672 gc time: 40" "cpu time: 6377 real time: 6375 gc time: 43" "cpu time: 6433 real time: 6431 gc time: 40" "cpu time: 6390 real time: 6389 gc time: 50" "cpu time: 6513 real time: 6512 gc time: 53" "cpu time: 6517 real time: 6515 gc time: 47" "cpu time: 6407 real time: 6405 gc time: 54")) ("110100010" ("cpu time: 6320 real time: 6319 gc time: 49" "cpu time: 6506 real time: 6505 gc time: 44" "cpu time: 6447 real time: 6444 gc time: 54" "cpu time: 6584 real time: 6581 gc time: 66" "cpu time: 6507 real time: 6504 gc time: 49" "cpu time: 6340 real time: 6339 gc time: 40" "cpu time: 6447 real time: 6446 gc time: 46" "cpu time: 6347 real time: 6346 gc time: 43")) ("110100011" ("cpu time: 6390 real time: 6390 gc time: 40" "cpu time: 6410 real time: 6405 gc time: 40" "cpu time: 6450 real time: 6446 gc time: 63" "cpu time: 6414 real time: 6411 gc time: 64" "cpu time: 6414 real time: 6409 gc time: 40" "cpu time: 6534 real time: 6533 gc time: 63" "cpu time: 6446 real time: 6448 gc time: 57" "cpu time: 6467 real time: 6464 gc time: 50")) ("110100100" ("cpu time: 6460 real time: 6460 gc time: 57" "cpu time: 6430 real time: 6430 gc time: 43" "cpu time: 6476 real time: 6474 gc time: 43" "cpu time: 6483 real time: 6483 gc time: 47" "cpu time: 6437 real time: 6434 gc time: 43" "cpu time: 6453 real time: 6450 gc time: 72" "cpu time: 6430 real time: 6427 gc time: 44" "cpu time: 6483 real time: 6482 gc time: 60")) ("110100101" ("cpu time: 6427 real time: 6423 gc time: 43" "cpu time: 6447 real time: 6446 gc time: 46" "cpu time: 6450 real time: 6446 gc time: 46" "cpu time: 6424 real time: 6422 gc time: 51" "cpu time: 6493 real time: 6497 gc time: 52" "cpu time: 6410 real time: 6412 gc time: 43" "cpu time: 6444 real time: 6442 gc time: 50" "cpu time: 6450 real time: 6449 gc time: 40")) ("110100110" ("cpu time: 6370 real time: 6371 gc time: 47" "cpu time: 6363 real time: 6362 gc time: 50" "cpu time: 6360 real time: 6356 gc time: 46" "cpu time: 6300 real time: 6296 gc time: 51" "cpu time: 6297 real time: 6292 gc time: 57" "cpu time: 6250 real time: 6248 gc time: 43" "cpu time: 6357 real time: 6355 gc time: 44" "cpu time: 6333 real time: 6327 gc time: 49")) ("110100111" ("cpu time: 6340 real time: 6341 gc time: 52" "cpu time: 6337 real time: 6336 gc time: 61" "cpu time: 6300 real time: 6296 gc time: 43" "cpu time: 6344 real time: 6342 gc time: 44" "cpu time: 6340 real time: 6338 gc time: 53" "cpu time: 6377 real time: 6375 gc time: 53" "cpu time: 6323 real time: 6321 gc time: 66" "cpu time: 6310 real time: 6306 gc time: 47")) ("110101000" ("cpu time: 6424 real time: 6423 gc time: 47" "cpu time: 6380 real time: 6378 gc time: 53" "cpu time: 6400 real time: 6396 gc time: 52" "cpu time: 6393 real time: 6392 gc time: 53" "cpu time: 6450 real time: 6447 gc time: 63" "cpu time: 6367 real time: 6365 gc time: 46" "cpu time: 6517 real time: 6514 gc time: 50" "cpu time: 6636 real time: 6635 gc time: 47")) ("110101001" ("cpu time: 6437 real time: 6434 gc time: 40" "cpu time: 6443 real time: 6442 gc time: 44" "cpu time: 6620 real time: 6618 gc time: 46" "cpu time: 6737 real time: 6735 gc time: 40" "cpu time: 6450 real time: 6447 gc time: 40" "cpu time: 6596 real time: 6593 gc time: 43" "cpu time: 6664 real time: 6658 gc time: 66" "cpu time: 6463 real time: 6464 gc time: 44")) ("110101010" ("cpu time: 6374 real time: 6372 gc time: 44" "cpu time: 6377 real time: 6374 gc time: 40" "cpu time: 6390 real time: 6389 gc time: 50" "cpu time: 6576 real time: 6578 gc time: 68" "cpu time: 6550 real time: 6547 gc time: 50" "cpu time: 6527 real time: 6525 gc time: 46" "cpu time: 6623 real time: 6618 gc time: 43" "cpu time: 6380 real time: 6375 gc time: 46")) ("110101011" ("cpu time: 6636 real time: 6631 gc time: 43" "cpu time: 6657 real time: 6656 gc time: 50" "cpu time: 6517 real time: 6514 gc time: 40" "cpu time: 6493 real time: 6488 gc time: 50" "cpu time: 6520 real time: 6520 gc time: 65" "cpu time: 6517 real time: 6514 gc time: 40" "cpu time: 6753 real time: 6755 gc time: 63" "cpu time: 6473 real time: 6473 gc time: 50")) ("110101100" ("cpu time: 6670 real time: 6669 gc time: 65" "cpu time: 6526 real time: 6525 gc time: 40" "cpu time: 6543 real time: 6543 gc time: 43" "cpu time: 6723 real time: 6721 gc time: 46" "cpu time: 6590 real time: 6587 gc time: 48" "cpu time: 6537 real time: 6534 gc time: 59" "cpu time: 6514 real time: 6511 gc time: 44" "cpu time: 6556 real time: 6555 gc time: 50")) ("110101101" ("cpu time: 6496 real time: 6495 gc time: 50" "cpu time: 6513 real time: 6515 gc time: 43" "cpu time: 6544 real time: 6542 gc time: 47" "cpu time: 6500 real time: 6496 gc time: 46" "cpu time: 6500 real time: 6497 gc time: 43" "cpu time: 6497 real time: 6494 gc time: 53" "cpu time: 6520 real time: 6519 gc time: 40" "cpu time: 6506 real time: 6505 gc time: 43")) ("110101110" ("cpu time: 6417 real time: 6416 gc time: 60" "cpu time: 6407 real time: 6406 gc time: 43" "cpu time: 6353 real time: 6350 gc time: 52" "cpu time: 6537 real time: 6533 gc time: 44" "cpu time: 6454 real time: 6451 gc time: 44" "cpu time: 6343 real time: 6341 gc time: 49" "cpu time: 6366 real time: 6366 gc time: 47" "cpu time: 6447 real time: 6448 gc time: 43")) ("110101111" ("cpu time: 6390 real time: 6389 gc time: 49" "cpu time: 6596 real time: 6598 gc time: 61" "cpu time: 6417 real time: 6415 gc time: 50" "cpu time: 6410 real time: 6410 gc time: 50" "cpu time: 6450 real time: 6448 gc time: 54" "cpu time: 6430 real time: 6424 gc time: 47" "cpu time: 6430 real time: 6427 gc time: 47" "cpu time: 6463 real time: 6463 gc time: 50")) ("110110000" ("cpu time: 4363 real time: 4360 gc time: 40" "cpu time: 4513 real time: 4515 gc time: 40" "cpu time: 4353 real time: 4352 gc time: 40" "cpu time: 4397 real time: 4397 gc time: 43" "cpu time: 4340 real time: 4342 gc time: 36" "cpu time: 4380 real time: 4378 gc time: 40" "cpu time: 4413 real time: 4411 gc time: 40" "cpu time: 4357 real time: 4354 gc time: 37")) ("110110001" ("cpu time: 4367 real time: 4368 gc time: 40" "cpu time: 4370 real time: 4373 gc time: 40" "cpu time: 4356 real time: 4358 gc time: 43" "cpu time: 4457 real time: 4454 gc time: 40" "cpu time: 4367 real time: 4367 gc time: 40" "cpu time: 4363 real time: 4363 gc time: 40" "cpu time: 4363 real time: 4361 gc time: 43" "cpu time: 4370 real time: 4367 gc time: 43")) ("110110010" ("cpu time: 4467 real time: 4467 gc time: 43" "cpu time: 4470 real time: 4468 gc time: 43" "cpu time: 4417 real time: 4414 gc time: 43" "cpu time: 4380 real time: 4383 gc time: 40" "cpu time: 4413 real time: 4410 gc time: 40" "cpu time: 4386 real time: 4385 gc time: 40" "cpu time: 4483 real time: 4483 gc time: 40" "cpu time: 4417 real time: 4417 gc time: 37")) ("110110011" ("cpu time: 4357 real time: 4357 gc time: 40" "cpu time: 4394 real time: 4392 gc time: 40" "cpu time: 4373 real time: 4374 gc time: 44" "cpu time: 4383 real time: 4380 gc time: 40" "cpu time: 4454 real time: 4454 gc time: 40" "cpu time: 4397 real time: 4394 gc time: 40" "cpu time: 4376 real time: 4375 gc time: 43" "cpu time: 4754 real time: 4755 gc time: 40")) ("110110100" ("cpu time: 4423 real time: 4422 gc time: 46" "cpu time: 4424 real time: 4422 gc time: 43" "cpu time: 4404 real time: 4400 gc time: 40" "cpu time: 4440 real time: 4439 gc time: 40" "cpu time: 4507 real time: 4509 gc time: 43" "cpu time: 4430 real time: 4429 gc time: 43" "cpu time: 4420 real time: 4421 gc time: 40" "cpu time: 4426 real time: 4427 gc time: 40")) ("110110101" ("cpu time: 4373 real time: 4374 gc time: 47" "cpu time: 4420 real time: 4417 gc time: 44" "cpu time: 4397 real time: 4398 gc time: 40" "cpu time: 4376 real time: 4372 gc time: 44" "cpu time: 4374 real time: 4373 gc time: 43" "cpu time: 4383 real time: 4381 gc time: 44" "cpu time: 4377 real time: 4377 gc time: 43" "cpu time: 4387 real time: 4383 gc time: 43")) ("110110110" ("cpu time: 3300 real time: 3297 gc time: 47" "cpu time: 3290 real time: 3287 gc time: 40" "cpu time: 3343 real time: 3341 gc time: 43" "cpu time: 3257 real time: 3256 gc time: 47" "cpu time: 3300 real time: 3296 gc time: 43" "cpu time: 3350 real time: 3350 gc time: 40" "cpu time: 3304 real time: 3302 gc time: 47" "cpu time: 3263 real time: 3265 gc time: 44")) ("110110111" ("cpu time: 3353 real time: 3349 gc time: 47" "cpu time: 3343 real time: 3342 gc time: 48" "cpu time: 3283 real time: 3281 gc time: 43" "cpu time: 3234 real time: 3231 gc time: 43" "cpu time: 3243 real time: 3240 gc time: 44" "cpu time: 3280 real time: 3278 gc time: 40" "cpu time: 3243 real time: 3240 gc time: 44" "cpu time: 3257 real time: 3258 gc time: 46")) ("110111000" ("cpu time: 4456 real time: 4454 gc time: 40" "cpu time: 4430 real time: 4432 gc time: 40" "cpu time: 4403 real time: 4403 gc time: 43" "cpu time: 4643 real time: 4642 gc time: 48" "cpu time: 4400 real time: 4401 gc time: 40" "cpu time: 4437 real time: 4436 gc time: 46" "cpu time: 4420 real time: 4421 gc time: 40" "cpu time: 4410 real time: 4411 gc time: 40")) ("110111001" ("cpu time: 4430 real time: 4431 gc time: 40" "cpu time: 4423 real time: 4423 gc time: 40" "cpu time: 4413 real time: 4412 gc time: 40" "cpu time: 4483 real time: 4482 gc time: 40" "cpu time: 4430 real time: 4429 gc time: 40" "cpu time: 4463 real time: 4465 gc time: 40" "cpu time: 4487 real time: 4487 gc time: 40" "cpu time: 4467 real time: 4463 gc time: 40")) ("110111010" ("cpu time: 4480 real time: 4476 gc time: 43" "cpu time: 4490 real time: 4491 gc time: 40" "cpu time: 4490 real time: 4491 gc time: 40" "cpu time: 4480 real time: 4478 gc time: 40" "cpu time: 4490 real time: 4492 gc time: 43" "cpu time: 4456 real time: 4455 gc time: 36" "cpu time: 4460 real time: 4461 gc time: 50" "cpu time: 4473 real time: 4473 gc time: 37")) ("110111011" ("cpu time: 4430 real time: 4429 gc time: 40" "cpu time: 4437 real time: 4437 gc time: 50" "cpu time: 4450 real time: 4449 gc time: 46" "cpu time: 4473 real time: 4471 gc time: 40" "cpu time: 4454 real time: 4454 gc time: 40" "cpu time: 4603 real time: 4604 gc time: 43" "cpu time: 4480 real time: 4479 gc time: 40" "cpu time: 4474 real time: 4475 gc time: 37")) ("110111100" ("cpu time: 4477 real time: 4473 gc time: 43" "cpu time: 4470 real time: 4468 gc time: 43" "cpu time: 4477 real time: 4474 gc time: 43" "cpu time: 4510 real time: 4510 gc time: 47" "cpu time: 4484 real time: 4484 gc time: 43" "cpu time: 4463 real time: 4465 gc time: 43" "cpu time: 4477 real time: 4474 gc time: 43" "cpu time: 4480 real time: 4479 gc time: 44")) ("110111101" ("cpu time: 4450 real time: 4450 gc time: 43" "cpu time: 4450 real time: 4449 gc time: 53" "cpu time: 4430 real time: 4430 gc time: 40" "cpu time: 4446 real time: 4444 gc time: 40" "cpu time: 4456 real time: 4455 gc time: 43" "cpu time: 4447 real time: 4447 gc time: 53" "cpu time: 4430 real time: 4433 gc time: 40" "cpu time: 4440 real time: 4440 gc time: 47")) ("110111110" ("cpu time: 3367 real time: 3365 gc time: 40" "cpu time: 3423 real time: 3423 gc time: 43" "cpu time: 3303 real time: 3303 gc time: 43" "cpu time: 3430 real time: 3430 gc time: 43" "cpu time: 5970 real time: 5966 gc time: 43" "cpu time: 3354 real time: 3355 gc time: 40" "cpu time: 3320 real time: 3318 gc time: 43" "cpu time: 3333 real time: 3331 gc time: 43")) ("110111111" ("cpu time: 3303 real time: 3303 gc time: 44" "cpu time: 3330 real time: 3329 gc time: 40" "cpu time: 3307 real time: 3304 gc time: 44" "cpu time: 3320 real time: 3322 gc time: 44" "cpu time: 3340 real time: 3339 gc time: 50" "cpu time: 3300 real time: 3298 gc time: 47" "cpu time: 5084 real time: 5083 gc time: 40" "cpu time: 3344 real time: 3339 gc time: 46")) ("111000000" ("cpu time: 4133 real time: 4131 gc time: 40" "cpu time: 4170 real time: 4164 gc time: 46" "cpu time: 4127 real time: 4126 gc time: 43" "cpu time: 4160 real time: 4157 gc time: 46" "cpu time: 4217 real time: 4211 gc time: 56" "cpu time: 4154 real time: 4153 gc time: 46" "cpu time: 4137 real time: 4133 gc time: 52" "cpu time: 4180 real time: 4178 gc time: 37")) ("111000001" ("cpu time: 4090 real time: 4087 gc time: 44" "cpu time: 4163 real time: 4159 gc time: 46" "cpu time: 4083 real time: 4077 gc time: 44" "cpu time: 4077 real time: 4072 gc time: 56" "cpu time: 4143 real time: 4141 gc time: 54" "cpu time: 4117 real time: 4113 gc time: 50" "cpu time: 4110 real time: 4108 gc time: 36" "cpu time: 4110 real time: 4107 gc time: 56")) ("111000010" ("cpu time: 4343 real time: 4343 gc time: 43" "cpu time: 4117 real time: 4114 gc time: 55" "cpu time: 4353 real time: 4352 gc time: 58" "cpu time: 4137 real time: 4135 gc time: 53" "cpu time: 4110 real time: 4108 gc time: 50" "cpu time: 4106 real time: 4106 gc time: 44" "cpu time: 4133 real time: 4132 gc time: 57" "cpu time: 4193 real time: 4192 gc time: 40")) ("111000011" ("cpu time: 4113 real time: 4109 gc time: 53" "cpu time: 4413 real time: 4408 gc time: 50" "cpu time: 4127 real time: 4123 gc time: 57" "cpu time: 4094 real time: 4090 gc time: 43" "cpu time: 4163 real time: 4164 gc time: 51" "cpu time: 4120 real time: 4118 gc time: 56" "cpu time: 4134 real time: 4127 gc time: 43" "cpu time: 4247 real time: 4243 gc time: 40")) ("111000100" ("cpu time: 4120 real time: 4121 gc time: 56" "cpu time: 4093 real time: 4090 gc time: 46" "cpu time: 4100 real time: 4097 gc time: 44" "cpu time: 4170 real time: 4166 gc time: 50" "cpu time: 4113 real time: 4112 gc time: 60" "cpu time: 4077 real time: 4071 gc time: 56" "cpu time: 4080 real time: 4077 gc time: 66" "cpu time: 4070 real time: 4067 gc time: 51")) ("111000101" ("cpu time: 4136 real time: 4136 gc time: 50" "cpu time: 4150 real time: 4146 gc time: 44" "cpu time: 5050 real time: 5049 gc time: 54" "cpu time: 4140 real time: 4138 gc time: 64" "cpu time: 4150 real time: 4148 gc time: 40" "cpu time: 4173 real time: 4172 gc time: 57" "cpu time: 4144 real time: 4141 gc time: 50" "cpu time: 4186 real time: 4186 gc time: 50")) ("111000110" ("cpu time: 4077 real time: 4074 gc time: 46" "cpu time: 4103 real time: 4101 gc time: 53" "cpu time: 4090 real time: 4086 gc time: 60" "cpu time: 4073 real time: 4070 gc time: 49" "cpu time: 4103 real time: 4102 gc time: 50" "cpu time: 4120 real time: 4116 gc time: 53" "cpu time: 4107 real time: 4107 gc time: 56" "cpu time: 4117 real time: 4115 gc time: 49")) ("111000111" ("cpu time: 4083 real time: 4084 gc time: 51" "cpu time: 4500 real time: 4495 gc time: 43" "cpu time: 4090 real time: 4085 gc time: 43" "cpu time: 4134 real time: 4130 gc time: 50" "cpu time: 4080 real time: 4081 gc time: 56" "cpu time: 4073 real time: 4073 gc time: 59" "cpu time: 4156 real time: 4154 gc time: 65" "cpu time: 4100 real time: 4098 gc time: 65")) ("111001000" ("cpu time: 3973 real time: 3973 gc time: 49" "cpu time: 4004 real time: 4000 gc time: 50" "cpu time: 4020 real time: 4017 gc time: 51" "cpu time: 4023 real time: 4021 gc time: 50" "cpu time: 3970 real time: 3965 gc time: 43" "cpu time: 3980 real time: 3979 gc time: 59" "cpu time: 4030 real time: 4029 gc time: 53" "cpu time: 3977 real time: 3975 gc time: 60")) ("111001001" ("cpu time: 3920 real time: 3918 gc time: 48" "cpu time: 3986 real time: 3982 gc time: 57" "cpu time: 3957 real time: 3951 gc time: 53" "cpu time: 3967 real time: 3965 gc time: 95" "cpu time: 3970 real time: 3964 gc time: 53" "cpu time: 3930 real time: 3927 gc time: 50" "cpu time: 4210 real time: 4204 gc time: 60" "cpu time: 3973 real time: 3968 gc time: 54")) ("111001010" ("cpu time: 3954 real time: 3955 gc time: 50" "cpu time: 3900 real time: 3896 gc time: 54" "cpu time: 3913 real time: 3911 gc time: 37" "cpu time: 3916 real time: 3912 gc time: 44" "cpu time: 3906 real time: 3903 gc time: 44" "cpu time: 3957 real time: 3952 gc time: 50" "cpu time: 3953 real time: 3951 gc time: 52" "cpu time: 3904 real time: 3903 gc time: 50")) ("111001011" ("cpu time: 3957 real time: 3952 gc time: 44" "cpu time: 4167 real time: 4163 gc time: 43" "cpu time: 3893 real time: 3893 gc time: 43" "cpu time: 3970 real time: 3969 gc time: 54" "cpu time: 3914 real time: 3913 gc time: 55" "cpu time: 3967 real time: 3964 gc time: 79" "cpu time: 3907 real time: 3903 gc time: 40" "cpu time: 3973 real time: 3972 gc time: 58")) ("111001100" ("cpu time: 3943 real time: 3936 gc time: 43" "cpu time: 3920 real time: 3917 gc time: 46" "cpu time: 3910 real time: 3908 gc time: 46" "cpu time: 3936 real time: 3933 gc time: 43" "cpu time: 3920 real time: 3917 gc time: 43" "cpu time: 3910 real time: 3909 gc time: 43" "cpu time: 3980 real time: 3979 gc time: 46" "cpu time: 3956 real time: 3954 gc time: 63")) ("111001101" ("cpu time: 3997 real time: 3992 gc time: 55" "cpu time: 3950 real time: 3949 gc time: 43" "cpu time: 3970 real time: 3968 gc time: 53" "cpu time: 3960 real time: 3958 gc time: 67" "cpu time: 3974 real time: 3970 gc time: 46" "cpu time: 3947 real time: 3944 gc time: 52" "cpu time: 3950 real time: 3947 gc time: 58" "cpu time: 3963 real time: 3959 gc time: 43")) ("111001110" ("cpu time: 3940 real time: 3937 gc time: 76" "cpu time: 3890 real time: 3884 gc time: 53" "cpu time: 3917 real time: 3914 gc time: 53" "cpu time: 3930 real time: 3930 gc time: 40" "cpu time: 3937 real time: 3935 gc time: 73" "cpu time: 3900 real time: 3895 gc time: 40" "cpu time: 3883 real time: 3884 gc time: 68" "cpu time: 3900 real time: 3895 gc time: 47")) ("111001111" ("cpu time: 4036 real time: 4036 gc time: 43" "cpu time: 3920 real time: 3916 gc time: 56" "cpu time: 3900 real time: 3894 gc time: 46" "cpu time: 3916 real time: 3911 gc time: 47" "cpu time: 3917 real time: 3913 gc time: 55" "cpu time: 3923 real time: 3923 gc time: 46" "cpu time: 3970 real time: 3967 gc time: 77" "cpu time: 3920 real time: 3917 gc time: 48")) ("111010000" ("cpu time: 936 real time: 938 gc time: 46" "cpu time: 943 real time: 941 gc time: 40" "cpu time: 960 real time: 959 gc time: 40" "cpu time: 940 real time: 940 gc time: 40" "cpu time: 940 real time: 941 gc time: 40" "cpu time: 950 real time: 948 gc time: 50" "cpu time: 943 real time: 941 gc time: 40" "cpu time: 940 real time: 939 gc time: 44")) ("111010001" ("cpu time: 933 real time: 933 gc time: 40" "cpu time: 937 real time: 936 gc time: 40" "cpu time: 943 real time: 939 gc time: 43" "cpu time: 940 real time: 938 gc time: 43" "cpu time: 940 real time: 939 gc time: 40" "cpu time: 937 real time: 939 gc time: 40" "cpu time: 940 real time: 937 gc time: 40" "cpu time: 937 real time: 935 gc time: 40")) ("111010010" ("cpu time: 940 real time: 936 gc time: 40" "cpu time: 937 real time: 936 gc time: 40" "cpu time: 950 real time: 946 gc time: 46" "cpu time: 944 real time: 943 gc time: 50" "cpu time: 933 real time: 936 gc time: 40" "cpu time: 937 real time: 937 gc time: 40" "cpu time: 937 real time: 935 gc time: 40" "cpu time: 933 real time: 936 gc time: 43")) ("111010011" ("cpu time: 967 real time: 967 gc time: 40" "cpu time: 923 real time: 922 gc time: 36" "cpu time: 930 real time: 930 gc time: 40" "cpu time: 930 real time: 927 gc time: 40" "cpu time: 926 real time: 925 gc time: 40" "cpu time: 924 real time: 925 gc time: 37" "cpu time: 927 real time: 925 gc time: 37" "cpu time: 927 real time: 926 gc time: 40")) ("111010100" ("cpu time: 933 real time: 935 gc time: 48" "cpu time: 950 real time: 946 gc time: 47" "cpu time: 947 real time: 946 gc time: 43" "cpu time: 936 real time: 934 gc time: 40" "cpu time: 937 real time: 937 gc time: 40" "cpu time: 944 real time: 940 gc time: 43" "cpu time: 950 real time: 947 gc time: 43" "cpu time: 933 real time: 935 gc time: 43")) ("111010101" ("cpu time: 934 real time: 931 gc time: 43" "cpu time: 930 real time: 930 gc time: 43" "cpu time: 933 real time: 931 gc time: 43" "cpu time: 940 real time: 939 gc time: 50" "cpu time: 940 real time: 940 gc time: 43" "cpu time: 933 real time: 933 gc time: 40" "cpu time: 936 real time: 937 gc time: 44" "cpu time: 933 real time: 933 gc time: 40")) ("111010110" ("cpu time: 934 real time: 932 gc time: 40" "cpu time: 930 real time: 934 gc time: 40" "cpu time: 937 real time: 936 gc time: 44" "cpu time: 936 real time: 934 gc time: 40" "cpu time: 936 real time: 936 gc time: 40" "cpu time: 933 real time: 932 gc time: 40" "cpu time: 930 real time: 932 gc time: 44" "cpu time: 930 real time: 933 gc time: 43")) ("111010111" ("cpu time: 920 real time: 918 gc time: 40" "cpu time: 920 real time: 920 gc time: 43" "cpu time: 933 real time: 932 gc time: 50" "cpu time: 927 real time: 927 gc time: 50" "cpu time: 923 real time: 921 gc time: 44" "cpu time: 920 real time: 921 gc time: 40" "cpu time: 917 real time: 915 gc time: 44" "cpu time: 920 real time: 921 gc time: 40")) ("111011000" ("cpu time: 800 real time: 801 gc time: 40" "cpu time: 803 real time: 799 gc time: 44" "cpu time: 840 real time: 840 gc time: 40" "cpu time: 850 real time: 851 gc time: 50" "cpu time: 803 real time: 800 gc time: 40" "cpu time: 840 real time: 840 gc time: 40" "cpu time: 800 real time: 800 gc time: 44" "cpu time: 800 real time: 801 gc time: 40")) ("111011001" ("cpu time: 790 real time: 788 gc time: 40" "cpu time: 790 real time: 790 gc time: 40" "cpu time: 787 real time: 790 gc time: 40" "cpu time: 797 real time: 795 gc time: 40" "cpu time: 800 real time: 800 gc time: 50" "cpu time: 793 real time: 792 gc time: 40" "cpu time: 794 real time: 790 gc time: 40" "cpu time: 790 real time: 790 gc time: 40")) ("111011010" ("cpu time: 800 real time: 794 gc time: 43" "cpu time: 803 real time: 803 gc time: 50" "cpu time: 797 real time: 797 gc time: 40" "cpu time: 860 real time: 861 gc time: 50" "cpu time: 793 real time: 794 gc time: 40" "cpu time: 804 real time: 800 gc time: 40" "cpu time: 797 real time: 796 gc time: 40" "cpu time: 800 real time: 797 gc time: 44")) ("111011011" ("cpu time: 776 real time: 776 gc time: 40" "cpu time: 777 real time: 776 gc time: 40" "cpu time: 783 real time: 783 gc time: 46" "cpu time: 780 real time: 780 gc time: 40" "cpu time: 777 real time: 777 gc time: 40" "cpu time: 780 real time: 778 gc time: 44" "cpu time: 776 real time: 777 gc time: 40" "cpu time: 776 real time: 777 gc time: 40")) ("111011100" ("cpu time: 800 real time: 796 gc time: 43" "cpu time: 804 real time: 799 gc time: 43" "cpu time: 800 real time: 798 gc time: 43" "cpu time: 797 real time: 794 gc time: 43" "cpu time: 797 real time: 795 gc time: 40" "cpu time: 796 real time: 796 gc time: 40" "cpu time: 804 real time: 802 gc time: 43" "cpu time: 803 real time: 803 gc time: 50")) ("111011101" ("cpu time: 783 real time: 783 gc time: 36" "cpu time: 784 real time: 782 gc time: 40" "cpu time: 887 real time: 886 gc time: 40" "cpu time: 790 real time: 790 gc time: 40" "cpu time: 783 real time: 785 gc time: 44" "cpu time: 790 real time: 789 gc time: 40" "cpu time: 823 real time: 823 gc time: 43" "cpu time: 783 real time: 782 gc time: 44")) ("111011110" ("cpu time: 800 real time: 797 gc time: 43" "cpu time: 840 real time: 839 gc time: 43" "cpu time: 796 real time: 796 gc time: 40" "cpu time: 800 real time: 797 gc time: 40" "cpu time: 793 real time: 794 gc time: 43" "cpu time: 793 real time: 795 gc time: 40" "cpu time: 800 real time: 801 gc time: 43" "cpu time: 800 real time: 798 gc time: 43")) ("111011111" ("cpu time: 780 real time: 778 gc time: 43" "cpu time: 780 real time: 779 gc time: 50" "cpu time: 814 real time: 814 gc time: 43" "cpu time: 773 real time: 772 gc time: 43" "cpu time: 774 real time: 773 gc time: 44" "cpu time: 770 real time: 770 gc time: 43" "cpu time: 770 real time: 771 gc time: 43" "cpu time: 770 real time: 770 gc time: 40")) ("111100000" ("cpu time: 4100 real time: 4098 gc time: 43" "cpu time: 4343 real time: 4338 gc time: 44" "cpu time: 4120 real time: 4121 gc time: 43" "cpu time: 4133 real time: 4129 gc time: 53" "cpu time: 4096 real time: 4093 gc time: 37" "cpu time: 4080 real time: 4077 gc time: 43" "cpu time: 4083 real time: 4083 gc time: 40" "cpu time: 4107 real time: 4103 gc time: 47")) ("111100001" ("cpu time: 4170 real time: 4164 gc time: 40" "cpu time: 4087 real time: 4085 gc time: 53" "cpu time: 4380 real time: 4379 gc time: 44" "cpu time: 4153 real time: 4152 gc time: 47" "cpu time: 4394 real time: 4390 gc time: 40" "cpu time: 4133 real time: 4128 gc time: 43" "cpu time: 4367 real time: 4363 gc time: 62" "cpu time: 4223 real time: 4222 gc time: 43")) ("111100010" ("cpu time: 4147 real time: 4144 gc time: 50" "cpu time: 4120 real time: 4115 gc time: 50" "cpu time: 4154 real time: 4149 gc time: 43" "cpu time: 4113 real time: 4111 gc time: 43" "cpu time: 4083 real time: 4077 gc time: 50" "cpu time: 4150 real time: 4146 gc time: 53" "cpu time: 4097 real time: 4094 gc time: 54" "cpu time: 4160 real time: 4157 gc time: 55")) ("111100011" ("cpu time: 4143 real time: 4140 gc time: 40" "cpu time: 4127 real time: 4126 gc time: 54" "cpu time: 4130 real time: 4126 gc time: 64" "cpu time: 4110 real time: 4108 gc time: 49" "cpu time: 4103 real time: 4103 gc time: 46" "cpu time: 4124 real time: 4122 gc time: 56" "cpu time: 4294 real time: 4291 gc time: 54" "cpu time: 4103 real time: 4102 gc time: 51")) ("111100100" ("cpu time: 4097 real time: 4093 gc time: 50" "cpu time: 4123 real time: 4117 gc time: 47" "cpu time: 4157 real time: 4150 gc time: 53" "cpu time: 4103 real time: 4102 gc time: 54" "cpu time: 4093 real time: 4092 gc time: 46" "cpu time: 4137 real time: 4136 gc time: 47" "cpu time: 4153 real time: 4151 gc time: 60" "cpu time: 4094 real time: 4092 gc time: 57")) ("111100101" ("cpu time: 4200 real time: 4197 gc time: 54" "cpu time: 4126 real time: 4122 gc time: 54" "cpu time: 4117 real time: 4116 gc time: 57" "cpu time: 4136 real time: 4133 gc time: 53" "cpu time: 4124 real time: 4121 gc time: 50" "cpu time: 4124 real time: 4117 gc time: 56" "cpu time: 4143 real time: 4141 gc time: 40" "cpu time: 4147 real time: 4146 gc time: 63")) ("111100110" ("cpu time: 4117 real time: 4114 gc time: 50" "cpu time: 4083 real time: 4080 gc time: 50" "cpu time: 4120 real time: 4118 gc time: 62" "cpu time: 4074 real time: 4069 gc time: 62" "cpu time: 4077 real time: 4074 gc time: 44" "cpu time: 4377 real time: 4374 gc time: 49" "cpu time: 4367 real time: 4362 gc time: 71" "cpu time: 4077 real time: 4076 gc time: 56")) ("111100111" ("cpu time: 4090 real time: 4088 gc time: 54" "cpu time: 4093 real time: 4093 gc time: 46" "cpu time: 4257 real time: 4256 gc time: 61" "cpu time: 4160 real time: 4157 gc time: 46" "cpu time: 4113 real time: 4110 gc time: 49" "cpu time: 4080 real time: 4080 gc time: 51" "cpu time: 4166 real time: 4167 gc time: 46" "cpu time: 4176 real time: 4174 gc time: 48")) ("111101000" ("cpu time: 3914 real time: 3909 gc time: 50" "cpu time: 3943 real time: 3937 gc time: 44" "cpu time: 3993 real time: 3993 gc time: 51" "cpu time: 3937 real time: 3936 gc time: 53" "cpu time: 3897 real time: 3893 gc time: 47" "cpu time: 3913 real time: 3909 gc time: 44" "cpu time: 3920 real time: 3915 gc time: 46" "cpu time: 3900 real time: 3899 gc time: 40")) ("111101001" ("cpu time: 3967 real time: 3965 gc time: 46" "cpu time: 3957 real time: 3952 gc time: 50" "cpu time: 3997 real time: 3994 gc time: 56" "cpu time: 3977 real time: 3977 gc time: 43" "cpu time: 3960 real time: 3956 gc time: 56" "cpu time: 4033 real time: 4031 gc time: 48" "cpu time: 3930 real time: 3929 gc time: 43" "cpu time: 3917 real time: 3914 gc time: 54")) ("111101010" ("cpu time: 3930 real time: 3929 gc time: 60" "cpu time: 3910 real time: 3907 gc time: 40" "cpu time: 3950 real time: 3948 gc time: 57" "cpu time: 3994 real time: 3990 gc time: 52" "cpu time: 3927 real time: 3924 gc time: 36" "cpu time: 4190 real time: 4187 gc time: 57" "cpu time: 3934 real time: 3933 gc time: 43" "cpu time: 4007 real time: 4005 gc time: 59")) ("111101011" ("cpu time: 3944 real time: 3940 gc time: 40" "cpu time: 3900 real time: 3897 gc time: 47" "cpu time: 3950 real time: 3949 gc time: 40" "cpu time: 3963 real time: 3962 gc time: 44" "cpu time: 4227 real time: 4222 gc time: 65" "cpu time: 3970 real time: 3964 gc time: 43" "cpu time: 3933 real time: 3932 gc time: 56" "cpu time: 3973 real time: 3973 gc time: 46")) ("111101100" ("cpu time: 3947 real time: 3943 gc time: 53" "cpu time: 3930 real time: 3926 gc time: 44" "cpu time: 3930 real time: 3928 gc time: 50" "cpu time: 3913 real time: 3913 gc time: 59" "cpu time: 3990 real time: 3985 gc time: 50" "cpu time: 3920 real time: 3918 gc time: 47" "cpu time: 3983 real time: 3984 gc time: 66" "cpu time: 3917 real time: 3913 gc time: 51")) ("111101101" ("cpu time: 4000 real time: 3996 gc time: 56" "cpu time: 3963 real time: 3962 gc time: 54" "cpu time: 3940 real time: 3935 gc time: 53" "cpu time: 3966 real time: 3964 gc time: 56" "cpu time: 4013 real time: 4009 gc time: 51" "cpu time: 3937 real time: 3934 gc time: 40" "cpu time: 4020 real time: 4017 gc time: 51" "cpu time: 3973 real time: 3967 gc time: 47")) ("111101110" ("cpu time: 3913 real time: 3910 gc time: 48" "cpu time: 3934 real time: 3930 gc time: 53" "cpu time: 3960 real time: 3960 gc time: 63" "cpu time: 3933 real time: 3931 gc time: 50" "cpu time: 3940 real time: 3940 gc time: 47" "cpu time: 3957 real time: 3952 gc time: 47" "cpu time: 3917 real time: 3913 gc time: 40" "cpu time: 3910 real time: 3908 gc time: 62")) ("111101111" ("cpu time: 3983 real time: 3976 gc time: 56" "cpu time: 3974 real time: 3972 gc time: 68" "cpu time: 4010 real time: 4007 gc time: 56" "cpu time: 3944 real time: 3940 gc time: 46" "cpu time: 4337 real time: 4335 gc time: 50" "cpu time: 3917 real time: 3917 gc time: 50" "cpu time: 3973 real time: 3971 gc time: 52" "cpu time: 3890 real time: 3889 gc time: 56")) ("111110000" ("cpu time: 937 real time: 938 gc time: 40" "cpu time: 977 real time: 977 gc time: 40" "cpu time: 947 real time: 942 gc time: 40" "cpu time: 940 real time: 939 gc time: 40" "cpu time: 940 real time: 937 gc time: 40" "cpu time: 944 real time: 941 gc time: 40" "cpu time: 940 real time: 938 gc time: 40" "cpu time: 940 real time: 940 gc time: 43")) ("111110001" ("cpu time: 954 real time: 954 gc time: 47" "cpu time: 947 real time: 947 gc time: 40" "cpu time: 950 real time: 948 gc time: 40" "cpu time: 947 real time: 945 gc time: 36" "cpu time: 943 real time: 946 gc time: 40" "cpu time: 947 real time: 944 gc time: 50" "cpu time: 950 real time: 946 gc time: 40" "cpu time: 937 real time: 937 gc time: 40")) ("111110010" ("cpu time: 943 real time: 942 gc time: 47" "cpu time: 940 real time: 938 gc time: 40" "cpu time: 940 real time: 938 gc time: 43" "cpu time: 940 real time: 939 gc time: 40" "cpu time: 936 real time: 938 gc time: 43" "cpu time: 983 real time: 981 gc time: 40" "cpu time: 936 real time: 935 gc time: 40" "cpu time: 944 real time: 944 gc time: 46")) ("111110011" ("cpu time: 940 real time: 939 gc time: 40" "cpu time: 927 real time: 928 gc time: 36" "cpu time: 927 real time: 927 gc time: 37" "cpu time: 923 real time: 924 gc time: 40" "cpu time: 926 real time: 924 gc time: 40" "cpu time: 927 real time: 924 gc time: 40" "cpu time: 927 real time: 925 gc time: 40" "cpu time: 937 real time: 932 gc time: 40")) ("111110100" ("cpu time: 940 real time: 939 gc time: 43" "cpu time: 933 real time: 934 gc time: 43" "cpu time: 936 real time: 936 gc time: 40" "cpu time: 937 real time: 932 gc time: 44" "cpu time: 940 real time: 939 gc time: 44" "cpu time: 933 real time: 932 gc time: 44" "cpu time: 940 real time: 941 gc time: 54" "cpu time: 933 real time: 933 gc time: 43")) ("111110101" ("cpu time: 937 real time: 936 gc time: 50" "cpu time: 943 real time: 939 gc time: 50" "cpu time: 950 real time: 948 gc time: 44" "cpu time: 930 real time: 927 gc time: 43" "cpu time: 930 real time: 929 gc time: 44" "cpu time: 950 real time: 950 gc time: 44" "cpu time: 934 real time: 932 gc time: 43" "cpu time: 930 real time: 927 gc time: 43")) ("111110110" ("cpu time: 930 real time: 931 gc time: 43" "cpu time: 937 real time: 933 gc time: 44" "cpu time: 930 real time: 932 gc time: 43" "cpu time: 934 real time: 932 gc time: 44" "cpu time: 934 real time: 932 gc time: 44" "cpu time: 930 real time: 931 gc time: 48" "cpu time: 934 real time: 931 gc time: 44" "cpu time: 930 real time: 931 gc time: 43")) ("111110111" ("cpu time: 927 real time: 926 gc time: 50" "cpu time: 920 real time: 917 gc time: 43" "cpu time: 977 real time: 977 gc time: 54" "cpu time: 920 real time: 920 gc time: 44" "cpu time: 923 real time: 921 gc time: 40" "cpu time: 927 real time: 927 gc time: 54" "cpu time: 917 real time: 918 gc time: 40" "cpu time: 920 real time: 919 gc time: 44")) ("111111000" ("cpu time: 810 real time: 811 gc time: 40" "cpu time: 807 real time: 803 gc time: 40" "cpu time: 803 real time: 801 gc time: 40" "cpu time: 804 real time: 806 gc time: 46" "cpu time: 800 real time: 799 gc time: 43" "cpu time: 800 real time: 799 gc time: 40" "cpu time: 810 real time: 810 gc time: 47" "cpu time: 800 real time: 799 gc time: 40")) ("111111001" ("cpu time: 810 real time: 807 gc time: 53" "cpu time: 797 real time: 798 gc time: 36" "cpu time: 800 real time: 798 gc time: 40" "cpu time: 790 real time: 791 gc time: 40" "cpu time: 803 real time: 800 gc time: 40" "cpu time: 807 real time: 805 gc time: 44" "cpu time: 840 real time: 836 gc time: 46" "cpu time: 800 real time: 799 gc time: 40")) ("111111010" ("cpu time: 803 real time: 802 gc time: 47" "cpu time: 840 real time: 839 gc time: 40" "cpu time: 797 real time: 797 gc time: 40" "cpu time: 800 real time: 801 gc time: 43" "cpu time: 793 real time: 796 gc time: 40" "cpu time: 806 real time: 804 gc time: 50" "cpu time: 807 real time: 805 gc time: 40" "cpu time: 797 real time: 796 gc time: 40")) ("111111011" ("cpu time: 780 real time: 776 gc time: 40" "cpu time: 777 real time: 777 gc time: 40" "cpu time: 777 real time: 776 gc time: 37" "cpu time: 777 real time: 778 gc time: 37" "cpu time: 780 real time: 776 gc time: 40" "cpu time: 783 real time: 784 gc time: 46" "cpu time: 780 real time: 777 gc time: 40" "cpu time: 776 real time: 775 gc time: 40")) ("111111100" ("cpu time: 797 real time: 795 gc time: 40" "cpu time: 804 real time: 803 gc time: 49" "cpu time: 796 real time: 793 gc time: 44" "cpu time: 800 real time: 796 gc time: 40" "cpu time: 800 real time: 800 gc time: 43" "cpu time: 793 real time: 794 gc time: 43" "cpu time: 797 real time: 795 gc time: 40" "cpu time: 797 real time: 796 gc time: 40")) ("111111101" ("cpu time: 783 real time: 785 gc time: 43" "cpu time: 794 real time: 791 gc time: 43" "cpu time: 784 real time: 784 gc time: 40" "cpu time: 784 real time: 784 gc time: 40" "cpu time: 797 real time: 797 gc time: 43" "cpu time: 786 real time: 783 gc time: 43" "cpu time: 793 real time: 792 gc time: 43" "cpu time: 783 real time: 784 gc time: 43")) ("111111110" ("cpu time: 793 real time: 794 gc time: 40" "cpu time: 904 real time: 905 gc time: 43" "cpu time: 796 real time: 797 gc time: 43" "cpu time: 793 real time: 794 gc time: 43" "cpu time: 794 real time: 792 gc time: 40" "cpu time: 836 real time: 838 gc time: 40" "cpu time: 797 real time: 793 gc time: 44" "cpu time: 804 real time: 803 gc time: 40")) ("111111111" ("cpu time: 797 real time: 795 gc time: 67" "cpu time: 797 real time: 793 gc time: 60" "cpu time: 793 real time: 791 gc time: 60" "cpu time: 803 real time: 800 gc time: 70" "cpu time: 790 real time: 788 gc time: 60" "cpu time: 790 real time: 790 gc time: 60" "cpu time: 790 real time: 788 gc time: 60" "cpu time: 793 real time: 792 gc time: 60"))
false
53b22fa863c40cc4397e6a3fc4a9d3ed7b9f6fdc
894df548c3c94d5d315a83a3fa2ec4b5e8be064a
/class/w04/secret-account.rkt
e39083fef760db07de9acd4a09a975e0c7e02cb0
[]
no_license
mgarcia77/cs37
ede79f1db5f8898837f16776052e1f18642acbb9
9247a6516f1758217409b3087f3df43103c6465b
refs/heads/master
2021-01-10T18:45:14.960703
2013-04-05T19:59:45
2013-04-05T19:59:45
null
0
0
null
null
null
null
UTF-8
Racket
false
false
1,547
rkt
secret-account.rkt
#lang racket ;; wrapper to avoid changing internal definitions (define ask (lambda (obj msg . args) (apply (obj msg) args))) (define make-account (lambda (init) (let ((orig init)) (define deposit (lambda (x) (set! init (+ init x)) init)) (define withdraw (lambda (x) (if (> x init) "insufficient funds" (begin (set! init (- init x)) init)))) (define balance (lambda () init)) (lambda (msg) (cond ((eq? msg 'deposit) deposit) ((eq? msg 'withdraw) withdraw) ((eq? msg 'balance) balance) (else (lambda args (display "invalid request")))))))) (define make-secret-account (lambda (initial password) (let ((account (make-account initial)) (validated? #f)) (define unlock (lambda (pin) (cond ((eq? pin password) (set! validated? #t)) (else (lambda args (display "invalid pin")))))) (define lock (lambda () (set! validated? #f))) (lambda (msg) (cond ((eq? msg 'unlock) unlock) ((eq? msg 'lock) lock) (validated? (account msg)) (else (lambda args (display "account locked")))))))) (define acct (make-secret-account 10 '12345)) (ask acct 'unlock '12345) (ask acct 'balance) (ask acct 'withdraw 5) (ask acct 'deposit 100) (ask acct 'lock) ;;(ask acct 'withdraw 5000) ;; consider passing pin to method, avoiding explicit lock/unlock
false
d9d519d66ca95135789915d6b0c1d823ce31f565
d17943098180a308ae17ad96208402e49364708f
/platforms/js-vm/private/private/primitive-table.rkt
e41a6e75b02962953b01e560c7387ba816218d4f
[]
no_license
dyoo/benchmark
b3f4f39714cc51e1f0bc176bc2fa973240cd09c0
5576fda204529e5754f6e1cc8ec8eee073e2952c
refs/heads/master
2020-12-24T14:54:11.354541
2012-03-02T19:40:48
2012-03-02T19:40:48
1,483,546
1
0
null
null
null
null
UTF-8
Racket
false
false
1,359
rkt
primitive-table.rkt
#lang s-exp "profiled-base.rkt" (require compiler/zo-parse scheme/match) ;; mapping from nonnegative integers to the names of primitives. (provide primitive-table) ;; Code is copied-and-pasted from compiler/decompile. (define primitive-table ;; Figure out number-to-id mapping for kernel functions in `primitive' (let ([bindings (let ([ns (make-base-empty-namespace)]) (parameterize ([current-namespace ns]) (namespace-require ''#%kernel) (namespace-require ''#%unsafe) (namespace-require ''#%flfxnum) (for/list ([l (namespace-mapped-symbols)]) (cons l (with-handlers ([exn:fail? (lambda (x) #f)]) (compile l))))))] [table (make-hash)]) (for ([b (in-list bindings)]) (let ([v (and (cdr b) (zo-parse (let ([out (open-output-bytes)]) (write (cdr b) out) (close-output-port out) (open-input-bytes (get-output-bytes out)))))]) (let ([n (match v [(struct compilation-top (_ prefix (struct primval (n)))) n] [else #f])]) (hash-set! table n (car b))))) table))
false
50635f64411674cf37b2715381a706409e89f89c
c86d2725ede9f022a4ac9a33ab94f452db32a19b
/info.rkt
71241a3ebc957cf38c10b6224639f539c3af4124
[ "MIT" ]
permissive
rfindler/Grift
e38f0d680e423a6ae9365d674376aa24563dab2d
01061bbf9916e18cba340044e9f0fa8b4379f202
refs/heads/master
2020-03-21T15:06:10.102115
2018-06-26T06:33:17
2018-06-26T06:34:08
138,694,386
0
0
null
2018-06-26T06:30:13
2018-06-26T06:30:13
null
UTF-8
Racket
false
false
109
rkt
info.rkt
#lang info (define collection "grift") (define version "0.1") ;;(define scribblings '(("manual.scrbl" ())))
false
bcdc860a31c6f86c232b48be1e5ce553dd3d235d
3dfe64bf2cb2b852ce61e1157681a562e785b790
/test/dssl2/parametric.rkt
dabd0c99e3ab79f374775b3abf18e221cc4fcc36
[]
no_license
stamourv/dssl2
54466a1a4432992b16e0e0a4b09e5e7b31a20f41
f97b4875ef3c737b017a5e636e3a343e59d5e178
refs/heads/master
2021-07-01T02:30:02.702516
2020-09-08T08:54:59
2020-09-08T23:07:31
164,521,335
0
0
null
2019-01-08T00:39:03
2019-01-08T00:39:03
null
UTF-8
Racket
false
false
623
rkt
parametric.rkt
#lang dssl2 # Check that parametric contracts don't mess up non-parametric function names: def foo_bar(): 5 assert_eq str(foo_bar), '#<proc:foo_bar>' def id[A](x: A) -> A: x assert_eq id[int?](5), 5 assert_eq id(5), 5 assert_error id[str?](5) def choose[A, B](which: bool?, x: A, y: B) -> OrC(A, B): x if which else y assert_eq choose(True, 4, 'hello'), 4 assert_eq choose(False, 4, 'hello'), 'hello' # assert_eq format('~e', choose), 'choose' def tricky[Y](good?: bool?, x: Y) -> Y: x if good? else 4 assert_eq tricky[str?](True, 'five'), 'five' assert_error tricky[str?](False, 'five'), 'promised: str?'
false
a0b02431e23baab4330fb895f246bbef1304523f
62c89908423c0c8c472ad87da25c184b03cb0a32
/Scheme/exam.rkt
23966625a9780c99bb4acb4034c736ff4e57a525
[]
no_license
StiliyanDr/Functional-programming
3cba58e4f69e152ec79bc4421762a1bdac991d01
46d8a4e3ff7a2faab5fef24e53f9a9b3269b705e
refs/heads/master
2022-09-08T21:35:16.564414
2022-08-25T10:03:07
2022-08-25T10:03:07
152,886,241
0
0
null
null
null
null
UTF-8
Racket
false
false
3,622
rkt
exam.rkt
#lang racket/base (define ++ (lambda (number) (+ number 1))) (define -- (lambda (number) (- number 1))) (define removeLastDigitOf (lambda (number) (quotient number 10))) (define lastDigitOf (lambda (number) (modulo number 10))) (define digitsCount (lambda (number) (define utility (lambda (rest count) (if (< rest 10) (++ count) (utility (removeLastDigitOf rest) (++ count))))) (utility number 0))) (define digitN (lambda (number n) (if (= n 1) (lastDigitOf number) (digitN (removeLastDigitOf number) (-- n))))) (define middleDigit (lambda (number) (let* ([count (digitsCount number)] [middle (++ (quotient count 2))]) (if (odd? count) (digitN number middle) -1)))) (module+ test (require rackunit) (check-eqv? (middleDigit 0) 0) (check-eqv? (middleDigit 12) -1) (check-eqv? (middleDigit 12345) 3) ) (define id (lambda (x) x)) (define negate (lambda (x) (- x))) (define accumulate-i (lambda (operation neutralElement from to term next) (if (> from to) neutralElement (accumulate-i operation (operation neutralElement (term from)) (next from) to term next)))) (define meetTwice? (lambda (f g start end) (>= (accumulate-i + 0 start end (lambda (i) (if (= (f i) (g i)) 1 0)) ++) 2))) (module+ test (check-false (meetTwice? id negate 0 9)) (check-true (meetTwice? id (lambda (x) (* x x)) 0 5)) (check-true (meetTwice? id id 1 5)) ) (define member (lambda (item list) (cond [(null? list) #f] [(equal? item (car list)) list] [else (member item (cdr list))]))) (define ElementsMapInList? (lambda (list f) (foldl (lambda (result element) (and result (member (f element) list))) #t list))) (define elementsMapInList? (lambda (list f) (all? (lambda (element) (member (f element) list)) list))) (define all? (lambda (p? list) (or (null? list) (and (p? (car list)) (all? p? (cdr list)))))) (define complement (lambda (p?) (lambda (argument) (not (p? argument))))) (define any? (lambda (p? list) (not (all? (complement p?) list)))) (define condition? (lambda (list f g) (define predicate? (lambda (element1) (all? (lambda (element2) (= [g (f element1) (f element2)] [f (g element1 element2)])) list))) (all? predicate? list))) (define is-em? (lambda (list g f) (and (elementsMapInList? list f) (condition? list f g)))) (define foldl (lambda (operation neutralElement list) (if (null? list) neutralElement (foldl operation (operation neutralElement (car list)) (cdr list))))) (define insertTwo (lambda (x y list) (cons x (cons y list)))) (define lookAndSay (lambda (list) (define generate (lambda (rest current length generated) (cond [(null? rest) (insertTwo current length generated)] [(equal? current (car rest)) (generate (cdr rest) current (++ length) generated)] [else (generate rest (car rest) 0 (insertTwo current length generated))]))) (if (null? list) list (reverse (generate list (car list) 0 '()))))) (module+ test (check-equal? (lookAndSay '()) '()) (check-equal? (lookAndSay '(9)) '(1 9)) (check-equal? (lookAndSay '(1 1 2 3 3 3 1 4 4 4)) '(2 1 1 2 3 3 1 1 3 4)) )
false
59289e8e969e4a884420a355f7afe0803047c4c8
6858cbebface7beec57e60b19621120da5020a48
/2/p12_2.rkt
1ea97385d2bc5489fc165084d7034822ddb00f39
[]
no_license
ponyatov/PLAI
a68b712d9ef85a283e35f9688068b392d3d51cb2
6bb25422c68c4c7717b6f0d3ceb026a520e7a0a2
refs/heads/master
2020-09-17T01:52:52.066085
2017-03-28T07:07:30
2017-03-28T07:07:30
66,084,244
2
0
null
null
null
null
UTF-8
Racket
false
false
571
rkt
p12_2.rkt
(define (parse [s : s-expression]) : ArithC (cond [(s-exp-number? s) ; if s-number (numC (s-exp->number s))] ; return numC(number) [(s-exp-list? s) ; if composite structure (let ([sl (s-exp->list s)]) ; local listed sl (case (s-exp->symbol (first sl)) ; <operator> [(+) (plusC (parse (second sl)) (parse (third sl)))] [(*) (multC (parse (second sl)) (parse (third sl)))] [else (error 'parse "invalid list input")] ))] [else (error 'parse "invalid input")]))
false
50ddf19a13f78e8c2b8d841bf268e9935fcc3641
ea0854849ff547901c62c20e4f1034966969d939
/environment.rkt
c235edccba3451d9650467e0401dca6e20e34857
[]
no_license
danking/racket-utils
40272be49645050eb21af26b80ed6cc95f9a8731
90d5c86ba992a87138cb8f14a86ecf852966aca7
refs/heads/master
2020-04-06T06:37:21.110912
2014-07-23T16:13:33
2014-07-23T16:13:33
null
0
0
null
null
null
null
UTF-8
Racket
false
false
247
rkt
environment.rkt
#lang racket (provide (all-defined-out)) (define empty-env (hash)) (define extend-env hash-set) (define lookup-env hash-ref) (define (extend-env/list e ks vs) (for/fold [(e e)] [(k ks) (v vs)] (extend-env e k v)))
false