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
| from http.server import HTTPServer, BaseHTTPRequestHandler | |
| from subprocess import check_output | |
| def respond(out, s): | |
| html_begin = "<html><head></head><body><pre>" | |
| html_end = "</pre></body></html>" | |
| response = html_begin + out.decode('utf-8') + html_end | |
| print(out) | |
| s.send_response(200) | |
| s.send_header("Content-type", "text/html") |
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 | |
| ;; 03. pvar a = 0; | |
| ;; 04. [lbl] topOfLoop: | |
| ;; 05. a++; | |
| ;; 06. if (a < 292 ) { | |
| ;; 07. goto topOfLoop; | |
| ;; 08. } | |
| (let ((a 0)) |
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
| danking@danking-netbook:~/development/haskell-imagemagick/c 21:21 $ ld -z relro --hash-style=gnu --as-needed --build-id --eh-frame-hdr -m elf_i386 -dynamic-linker /lib/ld-linux.so.2 -o wand /usr/lib/gcc/i686-linux-gnu/4.6/../../../i386-linux-gnu/crt1.o /usr/lib/gcc/i686-linux-gnu/4.6/../../../i386-linux-gnu/crti.o /usr/lib/gcc/i686-linux-gnu/4.6/crtbegin.o -L/usr/lib/gcc/i686-linux-gnu/4.6 -L/usr/lib/gcc/i686-linux-gnu/4.6/../../../i386-linux-gnu -L/lib/i386-linux-gnu -L/usr/lib/i386-linux-gnu -L/usr/lib/gcc/i686-linux-gnu/4.6/../../../i386-linux-gnu -L/usr/lib/gcc/i686-linux-gnu/4.6/../../.. -L/lib/i386-linux-gnu -L/lib -L/usr/lib/i386-linux-gnu -L/usr/lib -lMagickWand -lMagickCore wand.o -lgcc --as-needed -lgcc_s --no-as-needed -lc -lgcc --as-needed -lgcc_s --no-as-needed /usr/lib/gcc/i686-linux-gnu/4.6/crtend.o /usr/lib/gcc/i686-linux-gnu/4.6/../../../i386-linux-gnu/crtn.o | |
| wand.o: In function `main': | |
| wand.c:(.text+0x3b): undefined reference to `MagickWandGenesis' | |
| wand.c:(.text+0x40): undefined reference to |
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
| danking@danking-netbook:~/development/haskell-imagemagick/c 21:11 $ cc -o wand `pkg-config --cflags --libs MagickWand` wand.c | |
| /tmp/ccee4InW.o: In function `main': | |
| wand.c:(.text+0x3b): undefined reference to `MagickWandGenesis' | |
| wand.c:(.text+0x40): undefined reference to `NewMagickWand' | |
| wand.c:(.text+0x5c): undefined reference to `MagickReadImage' | |
| wand.c:(.text+0x7b): undefined reference to `MagickGetException' | |
| wand.c:(.text+0xc1): undefined reference to `MagickRelinquishMemory' | |
| wand.c:(.text+0xdd): undefined reference to `MagickResetIterator' | |
| wand.c:(.text+0x109): undefined reference to `MagickResizeImage' | |
| wand.c:(.text+0x115): undefined reference to `MagickNextImage' |
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
| (define-struct just-a-function ([l #:mutable] r) #:property prop:procedure 2) | |
| (define (define#-help proc) | |
| (let* ((me (box #f)) | |
| (f (just-a-function proc (lambda args (apply (just-a-function-l (unbox me)) args))))) | |
| (set-box! me f) | |
| (values f (lambda (new-proc) (set-just-a-function-l! f new-proc))))) | |
| (define-syntax define# (syntax-rules () ((_ ((name magic) args ...) body) | |
| (define-values (name magic) | |
| (define#-help (lambda (args ...) body)))))) |
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 (for-syntax racket racket/syntax)) | |
| (provide (all-defined-out)) | |
| (define-syntax (struct* stx) | |
| (syntax-case stx () | |
| ((_ name (args ...) others ...) | |
| (with-syntax (((arg-list ...) (build-arg-list #'(args ...) (get-autos #'(others ...)))) | |
| ((others ...) (remove-autos #'(others ...))) |
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 (for-syntax racket racket/syntax)) | |
| (provide (all-defined-out)) | |
| (define-syntax (struct* stx) | |
| (syntax-case stx () | |
| ((_ name (args ...) (defaults ...) others ...) | |
| (with-syntax ((arg-list (datum->syntax #'(args ...) | |
| (for/list ((arg (syntax->list #'(args ...))) |
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
| (define-syntax (singleton-struct stx) | |
| (syntax-case stx () | |
| ((_ name others ...) | |
| (let-syntax ((name? (syntax-append #'name #'?))) | |
| #'(define-values | |
| (name name?) | |
| (let () | |
| (struct name () others ...) | |
| (values (name) name?))))))) |
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
| Economy Chevy Aveo or similar $ 49.99 USD / day | |
| $ 65.61 USD Total | |
| Compact Nissan Versa, Toyota Yaris or similar $ 51.99 USD / day | |
| $ 67.74 USD Total | |
| Intermediate Toyota Corolla, Nissan Sentra or similar $ 53.99 USD / day | |
| $ 69.86 USD Total | |
| Standard Ford Fusion or similar $ 56.99 USD / day |
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
| [email protected]> (let* ((a-box (box #f)) | |
| (b-box (box #f)) | |
| (a (set 1 a-box)) | |
| (b (set 1 b-box))) | |
| (set-box! a-box a) | |
| (set-box! b-box b) | |
| (displayln a) | |
| (displayln b) | |
| (equal? a b)) | |
| #0=#<set: 1 #�#> |