George Neuner | 18 Apr 23:06 2015
Picon
Picon

Re: [racket-users] web server: database result paging

Hi Jay,

Thanks.  One more question: is there a way to determine the size of the 
continuation cache so as to write a useful (should I) collect? function 
for create-LRU-manager?    What statistic is the threshold-LRU-manager 
checking?

George

On 4/18/2015 4:28 PM, Jay McCarthy wrote:
> Unless you want to just write a RESTful API, you want
> send/suspend/dispatch and you can make any kind of response you want.
> The documentation uses response/xexpr but you could put the URL
> anywhere you'd like, including sending it in an email or through
> carrier pigeon.
>
> Jay
>

--

-- 
You received this message because you are subscribed to the Google Groups "Racket Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to racket-users+unsubscribe@...
For more options, visit https://groups.google.com/d/optout.

Alexander D. Knauth | 18 Apr 23:03 2015

Re: [racket-users] "Save as" Scribble file extension

I just found this:
http://docs.racket-lang.org/tools/adding-languages.html#%28elem._drracket~3adefault-extension%29

But I tried using it by changing the definition of scribble-base-reader-info in
scribble/base/reader.rkt to:
(define (scribble-base-reader-info)
  (lambda (key defval default)
    (case key
      [(color-lexer)
       (dynamic-require 'syntax-color/scribble-lexer 'scribble-inside-lexer)]
      [(definitions-text-surrogate)
       'scribble/private/indentation]
      [(drracket:default-extension)
       "scrbl"]
      [else (default key defval)])))

And it didn’t work.

What is the proper way to do this, or am I misunderstanding the purpose of this?

On Apr 9, 2015, at 8:02 PM, Alexis King <lexi.lambda@...> wrote:

> I’ve done this, too. Could there be some way for #langs to report a default file extension to DrRacket?
> 
>> On Apr 9, 2015, at 15:31, Prabhakar Ragde <plragde@...> wrote:
>> 
>> When I am editing a Scribble file in DrRacket and use "Save Definitions As..." to start a new version, the
system file dialog comes up (I am using OS X) and the file name defaults to Untitled.rkt with the Untitled
highlighted (so I can type in my file name). But the file extension is wrong. I usually want myfile.scrbl in
this case, but I have saved so many instances of myfile.rkt. Is it possible to have the file extension
(Continue reading)

John Clements | 22 Mar 07:29 2015
Picon

updating users mailing list target

I'm about to change the target of the users-GvBox1K3Ixw1Q5oZIJT9Xw@public.gmane.org email address to point to the Google Group. If this is the last message you get on the racket-users mailing list, it probably means you haven't yet signed up for the Google Group... or something else went terribly wrong.

Best,

John Clements

____________________
  Racket Users list:
  http://lists.racket-lang.org/users
Jon Zeppieri | 22 Mar 06:58 2015
Picon

pkgs.racket-lang.org stuck?

It seems like the package server isn't processing any updates. -J
____________________
  Racket Users list:
  http://lists.racket-lang.org/users

Matthew Butterick | 22 Mar 03:29 2015

TR: mystery behavior with optional-argument types

I want to typecheck a function that looks like f1. But it doesn't work. The types of 'bool' and 'syms' are
reported as Any.

However, if I add a dummy keyword argument, as in f2, then everything typechecks fine: 'bool' is reported as
a Boolean and 'syms' is (Listof Symbol).

Feature? Bug?

;;;;;;;;;;;;;;;;;;;;;;;

#lang typed/racket

(: f1 (() (Boolean) #:rest Symbol . ->* . Any))
(define (f1 [bool #t] . syms)
  bool
  syms)

(: f2 (() (Boolean #:x Integer) #:rest Symbol . ->* . Any))
(define (f2 [bool #t] #:x [x 42] . syms)
  bool
  syms)
____________________
  Racket Users list:
  http://lists.racket-lang.org/users

Alexis King | 22 Mar 02:44 2015
Picon

Intercepting WebSocket connections to the Racket web server?

The WebSocket handshake is intentionally implemented in such a way so that WebSocket connections can be
performed using the same port that the HTTP server is running on. This is implemented by making the
handshake a standard HTTP 1.1 GET request with an “Upgrade: websocket” header.

I’m interested in doing this using the Racket web server, but I’m not sure how to intercept websocket
connections. I’m completely willing to implement all the websocket connection logic myself, I just
need to know how to detect headers sent with that Upgrade header before the web server has a chance to handle
them so that I can pass the connection off to my own websocket logic.

What’s the proper way to achieve this sort of thing?

Alexis
____________________
  Racket Users list:
  http://lists.racket-lang.org/users
Matthew Butterick | 21 Mar 19:09 2015

making libraries work natively with both Racket & Typed Racket

Is there an approved way of using #lang typed/racket/base/no-check (or maybe `with-type`) to create
libraries that have both a typed and untyped interface? (The goal being to avoid use of `require/typed`)

For instance, the following works, but maybe it's a bad idea for other reasons:

;;;;;;;;;;;;;;;;;;;

;; adder.rkt = write typed code, but leave off #lang line & `provide`

(: fladd (Flonum Flonum . -> . Flonum))
(define (fladd f1 f2)
  (+ f1 f2))
;;;;;;;;;;;;;;;;;;;

;;;;;;;;;;;;;;;;;;;

;; typed.rkt = compile in typed context

#lang typed/racket/base
(require racket/include)
(provide fladd)
(include "adder.rkt")
;;;;;;;;;;;;;;;;;;;

;;;;;;;;;;;;;;;;;;;

;; untyped.rkt = compile in untyped context with contract

#lang typed/racket/base/no-check
(require racket/include racket/contract racket/math)
(provide (contract-out [fladd (flonum? flonum? . -> . flonum?)]))
(include "adder.rkt")
;;;;;;;;;;;;;;;;;;;

;;;;;;;;;;;;;;;;;;;

;; test.rkt

#lang racket/base

(module typed typed/racket/base
  (require "typed.rkt")
  (require typed/rackunit)
  (check-equal? (fladd 1.0 2.0) 3.0)) ; typechecks correctly

(module untyped racket/base
  (require "untyped.rkt")
  (require rackunit)
  (check-equal? (fladd 1.0 2.0) 3.0) ; meets `provide` contract
  (check-exn exn:fail:contract? (λ () (fladd 1 2)))) ; violates `provide` contract

(module violator racket/base
  (require "typed.rkt")
  (require rackunit)
  (check-exn exn:fail:contract? (λ () (fladd 1 2)))) ; violates typed/untyped contract barrier

(require 'typed)
(require 'untyped)
(require 'violator)
;;;;;;;;;;;;;;;;;;;

____________________
  Racket Users list:
  http://lists.racket-lang.org/users
Eric Dong | 20 Mar 20:20 2015
Picon
Picon

Unsafe version of require/typed?

It would be nice if we could have an unsafe version of require/typed, which doesn't generate a contract, but simply "lies" to the type system about the type. This, of course, breaks the type system's guarantees, and causes UB if optimizations are one, but in some cases contracts cannot be generated (for example, for the "object-name" function), but one can create a safe type for it.

Why can't there be a "require/typed/unsafe" form? It could save a lot of unnecessary asserts and casts, and unnecessary contract overhead.
____________________
  Racket Users list:
  http://lists.racket-lang.org/users
Chrakhan Barzanji | 20 Mar 19:47 2015
Picon

how to start a Web Application from a Server

Hi,
I have a dynamic web application, which i start with the below code. I installed Racket on a VM and want to run the Racket WebApplicarion from this virtual server which has an IP
but when I run the Racket-Program i get following message: Your Web application is running at http://localhost:8080. Stop this program at any time to terminate the Web Server.
this means the program  is running but how can i open the web application with a browser! It can't be on localhost! I'm running it from the server which i connect via VPN!
the serve/servlet:
....
(module+ main
  (serve/servlet
   dispatch
   #:stateless? #f      
   #:launch-browser? #f
   #:connection-close? #t
   #:quit? #f
   #:listen-ip #f
   #:port 8080
   #:servlet-regexp #rx""
   #:extra-files-paths (list static)
   #:servlet-path "/"
   ;#:manager mgr
   #:log-file "try-racket-serve-log.txt"))
p.s.: locally works every thing as it should be...but i want it to put the Application on my server too!
please write me when you can't understand me!

thanks

____________________
  Racket Users list:
  http://lists.racket-lang.org/users
John Clements | 20 Mar 19:38 2015
Picon

Transitioning to Google Groups

Dear all,

As I mentioned back on February 26, PLT would like to get out of the mailing-list administration game. That message was greeted with what I would characterize as cautious apathy, which is exactly what I was hoping for.

Accordingly, we’re going to proceed with the plan to switch to Google Groups, starting today.

For those that are interested, here’s the proposed sequence of steps. At the end of each step is a listing of the problems that are expected to be present after that step is complete.

DONE disable legacy archive flag on google group, do some local testing (group won’t be archiving messages)
- send nice warning message to everyone (here it is!), and ask people to sign up for the new google group themselves (group won’t be archiving messages)
- update text at www.racket-lang.org to tell people to sign up for the google group, rather than using the mailman interface. (new users can’t see incoming messages, some old users can’t see messages on new group)
-  disable mailman-based signup for the group. Add a nice message if possible that tells people to sign up for the google group instead. (new users can’t see messages on dev, some old users can’t see messages on new group)
- create google alias from users <at> racket-lang to point to users-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org, as Eli helped me do for dev. (some old users can’t see messages on new group)
- after an appropriate interval, bulk-add existing members. (some people won’t choose to be on the mailing list any more.)
… at this point, mailman is out of the loop.
- update mail-archive.com to archive new group
- update gmane mirror
- update marc.info

We would like the transition to be as smooth as possible, and we can use your help with this.  Specifically, Google has a daily cap on the number of e-mail addresses that can be bulk-invited to a mailing list. For this reason, it would speed the transition greatly if you could take a moment to sign up for the new group yourself, using this URL:

https://groups.google.com/forum/#!forum/racket-users/join

Some of you are *already* members of this group, but you have your delivery option set to “no e-mail”. If you’re one of these users, then you should adjust your delivery preference to “all e-mail” (assuming this is what you want).

We plan to disable signup for the old group now. Tomorrow, we plan to alter the delivery of the users-GvBox1K3Ixw1Q5oZIJT9Xw@public.gmane.org address to point to the new group.

We plan to manually add or invite the members who do not add themselves, but the daily cap will mean that these users are likely to miss one or more days of postings to this list. Naturally,  those posts will be archived, as part of the group. Also, I have to fill out a captcha for each 10 users, and we currently have more than 1,500.

The archive of the existing list will continue to exist, though new messages will not be added to it.

Let us know if you run into problems!

Many thanks,

John Clements
____________________
  Racket Users list:
  http://lists.racket-lang.org/users
John Clements | 20 Mar 18:35 2015
Picon

Pre-message message (mailing list migration)

In about an hour, I'll be sending a message to this list discussing the move of the Users mailing list, what steps I'll be taking, and what action (not much!) will be required from you.  This pre-message message is to alert you that before doing this, I'll be doing a bit of testing on the existing Google Group, to try to anticipate problems. This shouldn't affect any of you, except that the Google Group won't be archiving messages between now and tomorrow.

Best,

John Clements

____________________
  Racket Users list:
  http://lists.racket-lang.org/users

Gmane