This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #lang typed/racket | |
| (define-type T (U String Integer)) | |
| (: fizzbuzz/1 : (Integer -> T)) | |
| (define (fizzbuzz/1 x) | |
| (define mod3 (zero? (modulo x 3))) | |
| (define mod5 (zero? (modulo x 5))) | |
| (cond [(and mod3 mod5) "fizzbuzz"] | |
| [mod3 "fizz"] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #lang racket | |
| (require unstable/sequence) | |
| (define los (list '(1 2 3) | |
| '("a" "b" "c"))) | |
| (define (f elts) | |
| (format "I see: ~s" elts)) | |
| (define result |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 128-110-72-21:gzip-1.2.4 dyoo$ ./gunzip -c ~/Desktop/test.gz | |
| inflate | |
| inflate block | |
| nextbyte: 149 | |
| nextbyte: 206 | |
| nextbyte: 61 | |
| nextbyte: 114 | |
| nextbyte: 195 | |
| nextbyte: 32 | |
| nextbyte: 16 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #lang racket | |
| (require file/gzip | |
| file/gunzip) | |
| (define sample-file | |
| (bytes-append #"(\"5.3.2\" (\"ab7f6f4533252566bc62383ca395f8272851592b\"" | |
| #" . \"9364523f1c28f962fb967025aa140670c9b5b9a5\") " | |
| #"#\"/Users/dyoo/work/minipascal/minipascal/lang/../semantics.rkt\"" | |
| #" (collects #\"syntax\" #\"parse\" #\"private\" #\"runtime-report.rkt\")" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 128-110-72-21:updated-gzip-1.2.4 dyoo$ diff -u inflate.c ../gzip-1.2.4/inflate.c | |
| --- inflate.c 2013-02-05 15:05:33.000000000 -0700 | |
| +++ ../gzip-1.2.4/inflate.c 1993-08-13 08:50:20.000000000 -0600 | |
| @@ -212,16 +212,14 @@ | |
| 0x01ff, 0x03ff, 0x07ff, 0x0fff, 0x1fff, 0x3fff, 0x7fff, 0xffff | |
| }; | |
| -int theByte; | |
| - | |
| #ifdef CRYPT |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #lang racket | |
| (require syntax/parse) | |
| (define (test-syntax stx) | |
| (syntax-parse stx | |
| ((~and (one two (three four ...) ...) WHOLE) | |
| (syntax/loc stx #'WHOLE)))) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #lang racket/base | |
| (require ffi/unsafe | |
| racket/port) | |
| (provide readline start) | |
| (define libreadline (ffi-lib "libreadline" '("5" "6" "4" ""))) | |
| (define rl-callback-handler-install | |
| (get-ffi-obj "rl_callback_handler_install" libreadline |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #lang racket/base | |
| (require ffi/unsafe | |
| racket/port) | |
| (provide readline start) | |
| (define libreadline (ffi-lib "libreadline" '("5" "6" "4" ""))) | |
| (define rl-callback-handler-install | |
| (get-ffi-obj "rl_callback_handler_install" libreadline |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <!DOCTYPE html> | |
| <html> | |
| <head> | |
| <style> | |
| /* A hack, inserted to break some Scheme ids: */ | |
| .mywbr { | |
| width: 0; | |
| font-size: 1px; | |
| } | |
| </style> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #lang racket | |
| (require framework) | |
| (number-snip:make-repeating-decimal-snip 22/7 #f) |