Skip to content

Instantly share code, notes, and snippets.

🦁
Statusing

Sam Tobin-Hochstadt samth

🦁
Statusing
Block or report user

Report or block samth

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View tmp.rkt
#lang racket/base
(require (for-syntax racket/base))
(module base racket/base
(provide f)
(define (f x) (sync x)))
(module r racket/base
(provide f)
(dynamic-require 'racket #f)
(define (f x) (sync x)))
View h2111082019final.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 h2111082019-final) (read-case-sensitive #t) (teachpacks ()) (htdp-settings #(#t constructor repeating-decimal #f #t none #f () #f)))
;; Questions
;; Lists
;; Space Invaders!
(require 2htdp/image)
(define background (empty-scene 200 200))
View sort.rkt
#lang racket/base
(define N 10000000)
(unless (fixnum? (* 100 N)) (error 'fail))
(require futures-sort racket/fixnum racket/vector)
(define fxv (for/fxvector #:length N
([_ (in-range N)])
View fbench.rkt
#lang racket/base
(require racket/future)
(define N 100000000)
(define v (for/vector #:length N ([i N]) i))
(define (sum-vec v)
(for/sum ([i (in-vector v)]) i))
;(time (+ (sum-vec v) (sum-vec v)))
(define t1 (current-process-milliseconds))
View testmain.scrbl
#lang scribble/base
@title[#:style (list 'hidden 'toc-hidden 'no-toc)]{a}
foo
foo
@include-section["testsect.scrbl"]
@section[#:style (list 'hidden 'toc-hidden 'no-toc)]{b}
View errors-cs
not same result untyped: +nan.0+nan.0i typed: +nan.0+0.0i
(/ 2.3454025 (flmin (real->double-flonum 1.797693134862315e+308) (real->double-flonum -1.2848677e+32)) (make-rectangular +nan.0 0.0))
not same result untyped: -0.0-0.0i typed: -0.0+nan.0i
(/ (+ (real->double-flonum 0.41378116537811604) (real->double-flonum 1)) (round (real->double-flonum 1.8869765)) (make-rectangular -1/2 1.7976931348623157e+308))
not same result untyped: 0.0-0.0i typed: 0.0+nan.0i
(/ (+ (exact-round 1.8655746e+35) (exact-round 1)) 2.0324421e-21 (make-rectangular 4 1.7976931348623157e+308))
not same result untyped: -3.701631435361851+1.5e-322i typed: +nan.0+0.0i
View errors
not same result untyped: -0.0+0.0i typed: -0.0+nan.0i
(/ (+ (real->double-flonum 0.41378116537811604) (real->double-flonum 1)) (round (real->double-flonum 1.8869765f0)) (make-rectangular -1/2 1.7976931348623157e+308))
not same result untyped: -3.701631435361851+1.4821969375237e-322i typed: +nan.0+0.0i
(/ (bitwise-not (exact-round 0.9279912613796584)) (flcos (real->double-flonum -1)) (+ (make-rectangular 1 3.95252516673e-323)))
not same result untyped: -0.0+0.0i typed: +nan.0+0.0i
(/ (make-rectangular -1.7976931348623157e+308 -1.0118355f-14))
not same result untyped: -0.2-0.0i typed: +nan.0-0.0i
View systems.txt
[samth@huor:/tmp/CSRankings (gh-pages) plt] r count.rkt
confs: ("sosp" "osdi")
There are 266 people with 1 papers in all confs.
There are 62 people with 2 papers in all confs.
There are 20 people with 3 papers in all confs.
There are 9 people with 4 papers in all confs.
'("Eddie Kohler"
"Shan Lu"
"Wyatt Lloyd"
"Gregory R. Ganger"
View assembly.rkt
#lang racket/base
(require get-primitive)
(define ev (get-primitive 'eval))
(define rd (get-primitive 'read))
(ev '(import (chezscheme)))
(define ois (ev 'open-input-string))
View out
;; linklet ---------------------
(linklet
(() (.syntax-literals) () (interp-match) (syntax-protect)
(t-resyntax t-subst check-loc) (pattern-failure)
(raise-syntax-error
(syntax-e 1/syntax-e)
free-identifier=?))
()
(lambda (user-stx_1)
(let-values ([(arg_2) user-stx_1])
You can’t perform that action at this time.