Please take me off the list Thanks
On Sun, Sep 28, 2014 at 6:58 PM, <[email protected]> wrote: > Send users mailing list submissions to > [email protected] > > To subscribe or unsubscribe via the World Wide Web, visit > http://lists.racket-lang.org/users/listinfo > or, via email, send a message with subject or body 'help' to > [email protected] > > You can reach the person managing the list at > [email protected] > > When replying, please edit your Subject line so it is more specific > than "Re: Contents of users digest..." > > > [Racket Users list: > http://lists.racket-lang.org/users ] > > > Today's Topics: > > 1. Re: aws/glacier: credential scope (Greg Hendershott) > 2. Re: aws/glacier: credential scope (Greg Hendershott) > 3. Re: aws/glacier: credential scope (Norman Gray) > 4. Re: aws/glacier: credential scope (Greg Hendershott) > 5. Re: typed racket, filters, and polymorphism (Matthias Felleisen) > > > ---------------------------------------------------------------------- > > Message: 1 > Date: Sun, 28 Sep 2014 17:15:21 -0400 > From: Greg Hendershott <[email protected]> > To: Jay McCarthy <[email protected]> > Cc: [email protected] > Subject: Re: [racket] aws/glacier: credential scope > Message-ID: > <cagspun2t_zoaeagm2pdvsjdrtzbw2ax0vo66qdqmxi6rejj...@mail.gmail.com> > Content-Type: text/plain; charset=UTF-8 > >> I clicked "update" on pkgs.racket-lang.org. But it seems to be slower >> than usual to refresh. After it does, you can `raco pkg update aws` to >> get the fix. > > Something seems wrong/stuck on pkgs.racket-lang.org. The top of the page says: > > "update upload in progress: there may be inconsistencies below" > > It's been saying that for nearly an hour. > > In the past, clicking "update" would cause a successful refresh -- the > package would get a red star indicating it's updated -- within a > minute or two. > > > ------------------------------ > > Message: 2 > Date: Sun, 28 Sep 2014 17:17:32 -0400 > From: Greg Hendershott <[email protected]> > To: Jay McCarthy <[email protected]> > Cc: [email protected] > Subject: Re: [racket] aws/glacier: credential scope > Message-ID: > <CAGspUn1tMRkaZjK30rvxg+aUS7wXG5L_XT=_tou5o0ybg0p...@mail.gmail.com> > Content-Type: text/plain; charset=UTF-8 > >>> I clicked "update" on pkgs.racket-lang.org. But it seems to be slower >>> than usual to refresh. After it does, you can `raco pkg update aws` to >>> get the fix. >> >> Something seems wrong/stuck on pkgs.racket-lang.org. The top of the page >> says: >> >> "update upload in progress: there may be inconsistencies below" >> >> It's been saying that for nearly an hour. > > Sometimes instead it says: > > "update upload being computed: the information below may not > represent all recent changes and updates" > > It has switched between those two messages at various intervals over > the last hour. > > > ------------------------------ > > Message: 3 > Date: Sun, 28 Sep 2014 22:40:19 +0100 > From: Norman Gray <[email protected]> > To: Greg Hendershott <[email protected]> > Cc: Jay McCarthy <[email protected]>, [email protected] > Subject: Re: [racket] aws/glacier: credential scope > Message-ID: <[email protected]> > Content-Type: text/plain; charset=us-ascii > > > On 2014 Sep 28, at 22:17, Greg Hendershott <[email protected]> wrote: > >>>> I clicked "update" on pkgs.racket-lang.org. But it seems to be slower >>>> than usual to refresh. After it does, you can `raco pkg update aws` to >>>> get the fix. >>> >>> Something seems wrong/stuck on pkgs.racket-lang.org. The top of the page >>> says: >>> >>> "update upload in progress: there may be inconsistencies below" >>> >>> It's been saying that for nearly an hour. >> >> Sometimes instead it says: >> >> "update upload being computed: the information below may not >> represent all recent changes and updates" >> >> It has switched between those two messages at various intervals over >> the last hour. > > And in case it's a useful data point, I'm getting > > % raco pkg update aws > Resolving "aws" via http://download.racket-lang.org/releases/6.1/catalog/ > Resolving "aws" via http://pkgs.racket-lang.org > No updates available > % > > And Greg, your fix is close enough to what I guessed might be the problem > that I'm now kicking myself for not just diving in and trying a fix myself. > Garhhhh... > > Norman > > > -- > Norman Gray : http://nxg.me.uk > SUPA School of Physics and Astronomy, University of Glasgow, UK > > > > > ------------------------------ > > Message: 4 > Date: Sun, 28 Sep 2014 18:10:55 -0400 > From: Greg Hendershott <[email protected]> > To: Norman Gray <[email protected]> > Cc: [email protected] > Subject: Re: [racket] aws/glacier: credential scope > Message-ID: > <CAGspUn2cc44ouZpTmvu8e6nW_EmtjWNccco6WoH5p2QuU=4...@mail.gmail.com> > Content-Type: text/plain; charset=UTF-8 > > If you're in a hurry you could remove and re-install directly from GitHub: > > $ raco pkg remove aws > $ raco pkg install git://github.com/greghendershott/aws > > On Sun, Sep 28, 2014 at 5:40 PM, Norman Gray <[email protected]> wrote: >> >> On 2014 Sep 28, at 22:17, Greg Hendershott <[email protected]> wrote: >> >>>>> I clicked "update" on pkgs.racket-lang.org. But it seems to be slower >>>>> than usual to refresh. After it does, you can `raco pkg update aws` to >>>>> get the fix. >>>> >>>> Something seems wrong/stuck on pkgs.racket-lang.org. The top of the page >>>> says: >>>> >>>> "update upload in progress: there may be inconsistencies below" >>>> >>>> It's been saying that for nearly an hour. >>> >>> Sometimes instead it says: >>> >>> "update upload being computed: the information below may not >>> represent all recent changes and updates" >>> >>> It has switched between those two messages at various intervals over >>> the last hour. >> >> And in case it's a useful data point, I'm getting >> >> % raco pkg update aws >> Resolving "aws" via http://download.racket-lang.org/releases/6.1/catalog/ >> Resolving "aws" via http://pkgs.racket-lang.org >> No updates available >> % >> >> And Greg, your fix is close enough to what I guessed might be the problem >> that I'm now kicking myself for not just diving in and trying a fix myself. >> Garhhhh... >> >> Norman >> >> >> -- >> Norman Gray : http://nxg.me.uk >> SUPA School of Physics and Astronomy, University of Glasgow, UK >> > > > ------------------------------ > > Message: 5 > Date: Sun, 28 Sep 2014 18:58:20 -0400 > From: Matthias Felleisen <[email protected]> > To: "Alexander D. Knauth" <[email protected]> > Cc: Spencer florence <[email protected]>, racket users list > <[email protected]>, Sam Tobin-Hochstadt <[email protected]> > Subject: Re: [racket] typed racket, filters, and polymorphism > Message-ID: <[email protected]> > Content-Type: text/plain; charset="utf-8" > > > If you want the type checker to ensure your program is unit-correct, I assume > you also want no run-time residual of the dimensions but that is in conflict > with wanting a structure because it imposes a run-time cost. Are you sure you > want a unit? -- Matthias > > > > > > > On Sep 28, 2014, at 1:37 PM, Alexander D. Knauth wrote: > >> No because I want the unit to be a struct that has a dimension field, not a >> symbol with various dimensions defined as unions of units. >> I want the unit to be based on the dimension, not the other way around, so >> that new units can be made that have the same dimension. >> >> I have something like the number+unit struct (I called it measure), but I?ll >> work on more that after I have the unit struct figured out. >> >> On Sep 28, 2014, at 12:13 PM, Spencer florence <[email protected]> >> wrote: >> >>> would something like this work? >>> >>> #lang typed/racket >>> >>> (struct (U) number+unit ([amount : Real] [unit : U])) >>> >>> (define-type Weight-Unit (U 'kg 'g 'mg '?g)) >>> (define-type Weight (number+unit Weight-Unit)) >>> (define-predicate weight? Weight) >>> >>> (: make-weight : Real Weight-Unit -> Weight) >>> (define (make-weight n u) >>> (number+unit n u)) >>> >>> (: +/weight : Weight Weight -> Weight) >>> ;; something something needs unit conversion >>> (define (+/weight w1 w2) >>> (number+unit (+ (number+unit-amount w1) >>> (number+unit-amount w1)) >>> (number+unit-unit w1))) >>> >>> (+/weight (make-weight 1 'kg) (make-weight 1 'kg)) >>> >>> >>> >>> On Sun, Sep 28, 2014 at 11:03 AM, Alexander D. Knauth >>> <[email protected]> wrote: >>> >>> Because the struct is representing a unit (kilograms, meters, seconds, >>> etc.), and a unit has a dimension (mass, length, time, etc.) and I want the >>> type-checker to be able to know what the dimension of a unit is so that the >>> types of functions can specify the dimension that something should have. >>> The real solution to this would probably be bounded polymorphism, but I was >>> wondering if there was some other way to do it with occurrence typing in >>> the guard or something like that. >>> >>> On Sep 28, 2014, at 11:48 AM, Sam Tobin-Hochstadt <[email protected]> >>> wrote: >>> >>> > Why not do this with the type, instead of making this polymorphic? >>> > >>> > Sam >>> > >>> > On Fri, Sep 26, 2014 at 7:35 PM, Alexander D. Knauth >>> > <[email protected]> wrote: >>> >> Is it possible to have a struct that does certain things according to the >>> >> guard? >>> >> #lang typed/racket >>> >> >>> >> (struct (a) foo ([a : a]) #:transparent >>> >> #:guard (lambda (a _) >>> >> (unless (exact-integer? a) >>> >> (error 'foo "expected Integer, given ~v" a)) >>> >> a)) >>> >> >>> >> (ann (foo (ann 1 Any)) (foo Integer)) >>> >> >>> >> (: x : (foo Any)) >>> >> (define x (foo 1)) >>> >> >>> >> (ann (foo-a x) Integer) >>> >> >>> >> ;. Type Checker: Polymorphic function `foo1' could not be applied to >>> >> arguments: >>> >> ;Argument 1: >>> >> ; Expected: a >>> >> ; Given: Any >>> >> ; >>> >> ;Result type: (foo a) >>> >> ;Expected result: (foo Integer) >>> >> ; in: (foo (ann 1 Any)) >>> >> ;. Type Checker: Polymorphic function `foo-a' could not be applied to >>> >> arguments: >>> >> ;Argument 1: >>> >> ; Expected: (foo a) >>> >> ; Given: (foo Any) >>> >> ; >>> >> ;Result type: (a : ....) >>> >> ;Expected result: Integer >>> >> ; in: (foo-a x) >>> >> >>> >> On Sep 25, 2014, at 9:42 PM, Alexander D. Knauth <[email protected]> >>> >> wrote: >>> >> >>> >> What I?m trying to accomplish is something more like this: >>> >> #lang typed/racket >>> >> >>> >> (require "dimensions.rkt") >>> >> >>> >> (struct (d) unit ([name : Any] [scalar : Positive-Real] [dimension : d]) >>> >> #:transparent >>> >> #:guard (lambda (name scalar dimension _) >>> >> (unless (dimension? dimension) >>> >> (error 'unit "expected Dimension, given ~v" dimension)) >>> >> (values name scalar dimension))) >>> >> >>> >> (define-type (Unitof d) (unit d)) >>> >> >>> >> (define-type Unit (Unitof Dimension)) >>> >> >>> >> (define Unit? (make-predicate Unit)) >>> >> >>> >> (define-type Unitish >>> >> (U (Unitof Any) >>> >> Dimension >>> >> Positive-Real)) >>> >> >>> >> (: ->unit : (All (d) (case-> [(Unitof d) -> (Unitof d)] >>> >> [Unitish -> Unit]))) >>> >> (define (->unit u) >>> >> (cond [(unit? u) >>> >> (unless (Unit? u) ; this should never happen anyway because of the >>> >> guard >>> >> (error '->unit "expected (Unitof Dimension), given ~v" u)) >>> >> u] >>> >> [(dimension? u) (unit u 1 u)] >>> >> [(positive-real? u) (unit u u dimensionless-dimension)])) >>> >> >>> >> >>> >> On Sep 25, 2014, at 6:19 PM, Sam Tobin-Hochstadt <[email protected]> >>> >> wrote: >>> >> >>> >> No, I don't think you can do this. Can you say more about what you're >>> >> trying to accomplish? >>> >> >>> >> Sam >>> >> >>> >> On Thu, Sep 25, 2014 at 6:15 PM, Alexander D. Knauth >>> >> <[email protected]> wrote: >>> >> >>> >> Do any of you have any advice for getting a function like this to >>> >> type-check? >>> >> #lang typed/racket >>> >> >>> >> (: check-int : (All (a) (case-> [a -> a] >>> >> [Any -> Integer]))) >>> >> (define (check-int int) >>> >> (unless (exact-integer? int) >>> >> (error 'check-int "expected Integer, given ~v" int)) >>> >> int) >>> >> >>> >> ;. Type Checker: type mismatch >>> >> ; expected: a >>> >> ; given: Integer in: int >>> >> >>> >> >>> >> >>> >> ____________________ >>> >> Racket Users list: >>> >> http://lists.racket-lang.org/users >>> >> >>> >> >>> >> ____________________ >>> >> Racket Users list: >>> >> http://lists.racket-lang.org/users >>> >> >>> >> >>> >>> >>> ____________________ >>> Racket Users list: >>> http://lists.racket-lang.org/users >>> >>> >> >> ____________________ >> Racket Users list: >> http://lists.racket-lang.org/users > > -------------- next part -------------- > An HTML attachment was scrubbed... > URL: > <http://lists.racket-lang.org/users/archive/attachments/20140928/0821b16d/attachment.html> > > End of users Digest, Vol 109, Issue 71 > ************************************** ____________________ Racket Users list: http://lists.racket-lang.org/users

