[racket] users Digest, Vol 109, Issue 59
Please take me off the list
Thanks
On Fri, Sep 26, 2014 at 12:16 AM, <users-request at racket-lang.org> wrote:
> Send users mailing list submissions to
> users at racket-lang.org
>
> 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
> users-request at racket-lang.org
>
> You can reach the person managing the list at
> users-owner at racket-lang.org
>
> 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: typed racket, filters, and polymorphism (Sam Tobin-Hochstadt)
> 2. Re: web server: module servlets (Jay McCarthy)
> 3. Re: [GENERAL] Off Topic: Anybody reading this via
> news.gmane.org? (George Neuner)
> 4. Re: typed racket, filters, and polymorphism (Alexander D. Knauth)
> 5. Re: web server: module servlets (George Neuner)
>
>
> ----------------------------------------------------------------------
>
> Message: 1
> Date: Thu, 25 Sep 2014 18:19:37 -0400
> From: Sam Tobin-Hochstadt <samth at cs.indiana.edu>
> To: "Alexander D. Knauth" <alexander at knauth.org>
> Cc: racket users list <users at racket-lang.org>
> Subject: Re: [racket] typed racket, filters, and polymorphism
> Message-ID:
> <CAK=HD+ZpPuvYTMZJ1_LXrnPGjcPamZ73Z8aiPizCussR+UxYsw at mail.gmail.com>
> Content-Type: text/plain; charset=UTF-8
>
> 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
> <alexander at knauth.org> 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
>>
>
>
> ------------------------------
>
> Message: 2
> Date: Thu, 25 Sep 2014 18:26:58 -0400
> From: Jay McCarthy <jay.mccarthy at gmail.com>
> To: George Neuner <gneuner2 at comcast.net>
> Cc: users <users at racket-lang.org>
> Subject: Re: [racket] web server: module servlets
> Message-ID:
> <CAJYbDamsu2F=97vnZJQdx2dRO-Ss46NU0icrf8XwNA_2mMg9gw at mail.gmail.com>
> Content-Type: text/plain; charset=UTF-8
>
> On Thu, Sep 25, 2014 at 4:34 PM, George Neuner <gneuner2 at comcast.net> wrote:
>> Hi Jay,
>>
>> On 9/25/2014 1:04 PM, Jay McCarthy wrote:
>>
>>> If a Racket library is deliberately put into the servlet-namespace, does
>>> that streamline linking?
>>
>> Your assumption about the purpose of this is not correct. Anything in
>> the servlet-namespace will be shared between all servlets, and thus
>> not loaded per-servlet.
>>
>>
>> I think you misunderstood my question, but you may have answered it anyway.
>>
>> What I really was asking was whether each custodian was having to
>> individually load common Racket libraries [ web-server/*, net/*, etc. ] for
>> a new servlet rather than all servlet custodians sharing libraries that are
>> already loaded. Or, if not actually "loading" the libraries, then having to
>> go to disk to check dependencies.
>>
>> So if I create a shared servlet namespace and put, e.g.,
>> "web-server/servlet" into it, would that in any way speed up starting a new
>> dynamically loaded servlet?
>
> There is a very small set that is automatically shared:
> racket/base
> web-server/private/servlet
> web-server/http
> web-server/servlet/web
> ...
>
> web-server/servlet is NOT shared, nor is any net library or common
> racket library like racket/list. They are all totally unique per
> servlet.
>
> This, by the way, is part of why I don't recommend using dynamic
> servlets at all and suggest using serve/servlet.
>
> Jay
>
>
>
> --
> Jay McCarthy
> http://jeapostrophe.github.io
>
> "Wherefore, be not weary in well-doing,
> for ye are laying the foundation of a great work.
> And out of small things proceedeth that which is great."
> - D&C 64:33
>
>
> ------------------------------
>
> Message: 3
> Date: Thu, 25 Sep 2014 20:13:54 -0400
> From: George Neuner <gneuner2 at comcast.net>
> To: Adrian Klaver <adrian.klaver at aklaver.com>, neil at neilvandyke.org
> Cc: "users at racket-lang.org >> users" <users at racket-lang.org>
> Subject: Re: [racket] [GENERAL] Off Topic: Anybody reading this via
> news.gmane.org?
> Message-ID: <5424AFC2.6020302 at comcast.net>
> Content-Type: text/plain; charset="windows-1252"; Format="flowed"
>
>
> On 9/25/2014 5:26 PM, Neil Van Dyke wrote:
>> You can check your IP addr against the list at
>> "http://gmane.org/denied.php".
>>
>> Neil V.
>
> On 9/25/2014 7:08 PM, Adrian Klaver wrote:
>>
>> Take a look here:
>>
>> http://gmane.org/denied.php
>>
>> My guess is you are the fourth one from the bottom.
>>
>>
>> Might want to take a look at this thread to see what your options are
>> and what the turn around time is on your request:
>>
>> http://thread.gmane.org/gmane.discuss/16309
>
> Thanks to both of you - I missed seeing the entry about the denied list
> in the FAQ.
>
> Adrian you were right - it seems that I have been blocked for some
> reason. Based on the description of infractions I really don't think I
> did anything to warrant it ... but there it is. I'll have to follow my
> lists by email until I can unblocked.
>
> Thanks again,
> George
> -------------- next part --------------
> An HTML attachment was scrubbed...
> URL: <http://lists.racket-lang.org/users/archive/attachments/20140925/0d2a1f73/attachment-0001.html>
>
> ------------------------------
>
> Message: 4
> Date: Thu, 25 Sep 2014 21:42:00 -0400
> From: "Alexander D. Knauth" <alexander at knauth.org>
> To: Sam Tobin-Hochstadt <samth at cs.indiana.edu>
> Cc: racket users list <users at racket-lang.org>
> Subject: Re: [racket] typed racket, filters, and polymorphism
> Message-ID: <F16C1892-F09C-4A9F-94E2-16D5DE72F57D at knauth.org>
> Content-Type: text/plain; charset="windows-1252"
>
> 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 <samth at cs.indiana.edu> 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
>> <alexander at knauth.org> 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
>>>
>
> -------------- next part --------------
> An HTML attachment was scrubbed...
> URL: <http://lists.racket-lang.org/users/archive/attachments/20140925/dc09b97f/attachment-0001.html>
>
> ------------------------------
>
> Message: 5
> Date: Fri, 26 Sep 2014 00:16:56 -0400
> From: George Neuner <gneuner2 at comcast.net>
> To: Jay McCarthy <jay.mccarthy at gmail.com>
> Cc: users <users at racket-lang.org>
> Subject: Re: [racket] web server: module servlets
> Message-ID: <5424E8B8.8040501 at comcast.net>
> Content-Type: text/plain; charset="utf-8"; Format="flowed"
>
> On 9/25/2014 6:26 PM, Jay McCarthy wrote:
>> web-server/servlet is NOT shared, nor is any net library or common
>> racket library like racket/list. They are all totally unique per
>> servlet.
>>
>> This, by the way, is part of why I don't recommend using dynamic
>> servlets at all and suggest using serve/servlet.
>
> But ... IIUC ... a listener started by serve/servlet will still
> dynamically load from <servlet-root>, <server-root>/htdocs/*, etc. if
> the request doesn't match a hard coded dispatch URL - the regex of the
> initial servlet or an entry in a dispatcher table. At least that's the
> behavior I see with my own application: my initial servlet returns 404
> when called - the call to serve/servlet just sets up the environment
> and and all the "real" servlets are demand loaded from disk when first
> touched.
>
> Are you advocating *static* linking and essentially just dispatching to
> internal functions by URL? ISTM that that defeats the purpose.
>
> George
> -------------- next part --------------
> An HTML attachment was scrubbed...
> URL: <http://lists.racket-lang.org/users/archive/attachments/20140926/ffaf6bde/attachment.html>
>
> End of users Digest, Vol 109, Issue 59
> **************************************