Re: [racket-users] Racket v7.6

2020-02-13 Thread John Cowan
Thanks.  So in that case Racket/CS files would be expected to be larger.

On Thu, Feb 13, 2020 at 9:14 PM Sam Tobin-Hochstadt 
wrote:

>
>
> On Thu, Feb 13, 2020, 9:11 PM John Cowan  wrote:
>
>>
>>
>> On Thu, Feb 13, 2020 at 8:27 PM 'John Clements' via users-redirect <
>> us...@plt-scheme.org> wrote:
>>
>>  (Compiled code remains significantly larger compared to the default
>>> implementation.)
>>>
>>
>> Does this refer to bytecode or machine code?
>>
>
> The Racket CS implementation does not use bytecode; the compiled form on
> disk includes machine code.
>
> Sam
>
>
>
>>
>>
>> John Cowan  http://vrici.lojban.org/~cowanco...@ccil.org
>> Wer es in kleinen Dingen mit der Wahrheit nicht ernst nimmt, dem kann
>> man auch in grossen Dingen nicht vertrauen.  --Albert Einstein on honesty
>>
>> --
>> 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+unsubscr...@googlegroups.com.
>> To view this discussion on the web visit
>> https://groups.google.com/d/msgid/racket-users/CAD2gp_S%2BsxYf_8QV02XeJi-qLUKtySHDd5LQO9C9%3DbeqJ6fUTw%40mail.gmail.com
>> 
>> .
>>
>

-- 
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+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/racket-users/CAD2gp_SB7Qc61J%2BKpodT1YhE5uCMA5fM8TrpL5yj13fZZ7ktfQ%40mail.gmail.com.


Re: [racket-users] Racket v7.6

2020-02-13 Thread John Cowan
On Thu, Feb 13, 2020 at 8:27 PM 'John Clements' via users-redirect <
us...@plt-scheme.org> wrote:

 (Compiled code remains significantly larger compared to the default
> implementation.)
>

Does this refer to bytecode or machine code?



John Cowan  http://vrici.lojban.org/~cowanco...@ccil.org
Wer es in kleinen Dingen mit der Wahrheit nicht ernst nimmt, dem kann
man auch in grossen Dingen nicht vertrauen.  --Albert Einstein on honesty

-- 
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+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/racket-users/CAD2gp_S%2BsxYf_8QV02XeJi-qLUKtySHDd5LQO9C9%3DbeqJ6fUTw%40mail.gmail.com.


[racket-users] Racket v7.6

2020-02-13 Thread 'John Clements' via users-redirect
--
Racket version 7.6 is now available from

https://racket-lang.org/


* DrRacket's scrolling has been made more responsive.

* DrRacket's dark mode support is improved for Mac OS and Unix.

* Racket CS is ready for production use. We will work to further
  improve Racket CS before making it the default implementation, but
  it now consistently passes all of our integration tests and
  generally performs well. (Compiled code remains significantly larger
  compared to the default implementation.)

* The Web Server provides fine-grained control over various aspects of
  handling client connections (timeouts, buffer sizes, maximum header
  counts, etc.) via the new "safety limits" construct.

  Using this new construct, we have decreased the web server's default
  level of trust in client connections and made it detect additional,
  maliciously constructed requests. Resource-intensive applications may
  need to adjust the default limits (for example, to accept large file
  uploads).  In trusted settings, they can be disabled completely by
  starting the web server with `#:safety-limits
  (make-unlimited-safety-limits)`.

* The Web Server's handling of large files is improved, and its
  latency for long-running request handlers is reduced.

* The Macro Stepper has a new macro hiding algorithm that tracks term
  identity through syntax protection (see `syntax-arm`), making macro
  hiding work more reliably. Its UI indicates protected and tainted
  syntax.

* The Racket documentation includes a "building and contributing" guide.

Contributors: Alex Harsanyi, Alex Knauth, Alex Muscar, Alexis King, Ben
Greenman, Bogdan Popa, Brian Wignall, Dan Holtby, David K. Storrs,
Dionna Glaze, Dominik Pantůček, Fred Fu, Geoff Shannon, Gustavo
Massaccesi, Jack Firth, Jay McCarthy, Jens Axel Søgaard, Jesse Alama,
Joel Dueck, John Clements, Jordan Johnson, Julien Delplanque, Leo Uino,
Luka Hadži-Đokić, Luke Lau, Matthew Flatt, Matthias Felleisen, Mike
Sperber, Paulo Matos, Philip McGrath, Reuben Thomas, Robby Findler, Ross
Angle, Ryan Culpepper, Sage Gerard, Sam Tobin-Hochstadt, Shu-Hung You,
Sorawee Porncharoenwase, Stephen De Gabrielle, Syntacticlosure, Timo
Wilken, Tommy McHugh, Winston Weinert, Zaoqi

Feedback Welcome
--



-- 
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+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/racket-users/417a89bb-5a84-407c-9e24-dc6be6e017b2%40mtasv.net.


Re: [racket-users] How to stream file uploads with the Racket web server?

2020-02-13 Thread Brian Adkins
I tried replying earlier today, but somehow the post got deleted - could've 
been user error I suppose.

Anyway, the gist of the response was how I continue to be amazed by how 
often I get pleasant surprises with Racket - either there is some facility 
to do what I want that I just haven't found yet, or in this case where 
there soon will be :)

I have a couple Racket web apps in production now, so I think I have enough 
real world examples to begin extracting code into a web framework. Although 
it will look significantly different than Rails (more functional, less 
object oriented), I'm hoping to achieve similar ease-of-use functionality. 
I first viewed the Rails "weblog in 15 minutes" video fourteen years ago, 
and it had a significant impact on my professional life (at the time I was 
working in Java w/ Spring & Hibernate, etc.). The video is dated now & has 
some annoying idiosyncrasies, but if you haven't seen it, and you're 
interested in web development (in any language), it's worth viewing just to 
get the overview of Rails ease of use:

https://www.youtube.com/watch?v=Gzj723LkRJY=youtu.be 

On Thursday, February 13, 2020 at 11:02:33 AM UTC-5, bogdan wrote:
>
> The version of the web-server that will be included with Racket 7.6 
> changes the way file uploads are handled so that they get offloaded to 
> disk after a certain threshold (similar to how that nginx module you 
> linked to works). 
>
> You can check out the pre-release docs for details: 
>
> * 
> https://pre-release.racket-lang.org/doc/web-server/http.html?q=binding%3Afile#%28def._%28%28lib._web-server%2Fhttp%2Frequest-structs..rkt%29._make-binding~3afile%2Fport%29%29
>  
> * 
> https://pre-release.racket-lang.org/doc/web-server-internal/dispatch-server-unit.html#%28part._safety-limits%29
>  
>
> To get these changes ahead of the release, you should be able to install 
> an updated version of `web-server-lib' from the package server or from 
> git. 
>
> Hope that helps! 
>
> - Bogdan 
>
> Brian Adkins writes: 
>
> > I'm posting a file to my web app using the following form: 
> > 
> >  >   method="post" *enctype="multipart/form-data"* 
> > class="file-upload-form"> 
> > ... 
> >  
> > 
> > I use a simple function to create a hashtable of attributes: 
> > 
> > (define (form-values req) 
> >   (for/hash ([ b (in-list (request-bindings/raw req)) ]) 
> > (cond [ (binding:form? b) (values 
> >(bytes->string/utf-8 (binding-id b) 
> #\space) 
> >(bytes->string/utf-8 (binding:form-value 
> b) 
> > #\space)) ] 
> >   [ (binding:file? b) (values 
> >(bytes->string/utf-8 (binding-id b) 
> #\space) 
> >(binding:file-content b)) ]))) 
> > 
> > It appears that the entire file contents are in the binding by the time 
> the 
> > request is available to me. This is fine for "small enough" files, but 
> for 
> > larger files, it would be great to be able to stream the file contents. 
> The 
> > solution may be to use something like nginx's upload module: 
> > 
> > https://www.nginx.com/resources/wiki/modules/upload/ 
> > 
> > But before I go down that route, I thought I'd ask if the Racket web 
> server 
> > provides a more direct way to accomplish this. 
> > 
> > Thanks, 
> > Brian 
>

-- 
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+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/racket-users/6a3298ff-a40c-4a6e-9f16-b1c95144e482%40googlegroups.com.


Re: [racket-users] How to stream file uploads with the Racket web server?

2020-02-13 Thread Bogdan Popa
The version of the web-server that will be included with Racket 7.6
changes the way file uploads are handled so that they get offloaded to
disk after a certain threshold (similar to how that nginx module you
linked to works).

You can check out the pre-release docs for details:

* 
https://pre-release.racket-lang.org/doc/web-server/http.html?q=binding%3Afile#%28def._%28%28lib._web-server%2Fhttp%2Frequest-structs..rkt%29._make-binding~3afile%2Fport%29%29
* 
https://pre-release.racket-lang.org/doc/web-server-internal/dispatch-server-unit.html#%28part._safety-limits%29

To get these changes ahead of the release, you should be able to install
an updated version of `web-server-lib' from the package server or from git.

Hope that helps!

- Bogdan

Brian Adkins writes:

> I'm posting a file to my web app using the following form:
>
>method="post" *enctype="multipart/form-data"*
> class="file-upload-form">
> ...
> 
>
> I use a simple function to create a hashtable of attributes:
>
> (define (form-values req)
>   (for/hash ([ b (in-list (request-bindings/raw req)) ])
> (cond [ (binding:form? b) (values
>(bytes->string/utf-8 (binding-id b) #\space)
>(bytes->string/utf-8 (binding:form-value b)
> #\space)) ]
>   [ (binding:file? b) (values
>(bytes->string/utf-8 (binding-id b) #\space)
>(binding:file-content b)) ])))
>
> It appears that the entire file contents are in the binding by the time the
> request is available to me. This is fine for "small enough" files, but for
> larger files, it would be great to be able to stream the file contents. The
> solution may be to use something like nginx's upload module:
>
> https://www.nginx.com/resources/wiki/modules/upload/
>
> But before I go down that route, I thought I'd ask if the Racket web server
> provides a more direct way to accomplish this.
>
> Thanks,
> Brian

-- 
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+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/racket-users/m2blq2wk4t.fsf%40192.168.0.142.


[racket-users] How to stream file uploads with the Racket web server?

2020-02-13 Thread Brian Adkins
I'm posting a file to my web app using the following form:


...


I use a simple function to create a hashtable of attributes:

(define (form-values req)
  (for/hash ([ b (in-list (request-bindings/raw req)) ])
(cond [ (binding:form? b) (values
   (bytes->string/utf-8 (binding-id b) #\space)
   (bytes->string/utf-8 (binding:form-value b) 
#\space)) ]
  [ (binding:file? b) (values
   (bytes->string/utf-8 (binding-id b) #\space)
   (binding:file-content b)) ])))

It appears that the entire file contents are in the binding by the time the 
request is available to me. This is fine for "small enough" files, but for 
larger files, it would be great to be able to stream the file contents. The 
solution may be to use something like nginx's upload module:

https://www.nginx.com/resources/wiki/modules/upload/

But before I go down that route, I thought I'd ask if the Racket web server 
provides a more direct way to accomplish this.

Thanks,
Brian

-- 
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+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/racket-users/97fe4333-5778-4c47-94e0-1e5713e54b22%40googlegroups.com.


Re: [racket-users] plan to build a continuous integration system in racket

2020-02-13 Thread Sage Gerard
Some core devs are already looking into building a new CI/CD for use in the 
project. Maybe it would be worth taking a look at the Racket Slack and ask if 
you can participate in the #ci channel.

Re: web dev, maybe one of my posts can help, but it's more of a supplement to a 
guide you already read https://sagegerard.com/racket-webserver-notes.html

I think it's a great idea to learn Racket in any case, but I'm not sure what 
your goals are in getting in the web field. The web-server package is a 
behemoth of an engineering effort, and it's use of serializable continuations 
is an advantage IMO. Is there anything else in particular that you are hoping 
to find?

 Original Message 
On Feb 13, 2020, 12:05 AM, Xu Xue wrote:

> Hi, all
>
> I am a senior student and plan to build a continuous integration system using 
> Racket as my graduation project.
>
> I'm very new to Racket web programming and CI/CD (about CI system I've 
> already found some great projects to refer to).
>
> I've just gone through [Web Applications in Racket] and bought [Server: 
> Racket].
>
> Are there any other starter resources or experiences to share about the 
> Racket web programming?
>
> Or maybe isn't it a good choice to dive into the web field using Racket?
>
> --
> 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+unsubscr...@googlegroups.com.
> To view this discussion on the web visit 
> [https://groups.google.com/d/msgid/racket-users/3d98a427-f3a7-44d2-ad45-499a1f3cf83c%40googlegroups.com](https://groups.google.com/d/msgid/racket-users/3d98a427-f3a7-44d2-ad45-499a1f3cf83c%40googlegroups.com?utm_medium=email_source=footer).

-- 
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+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/racket-users/NgeFdLW_YU4fGDCPeL8gRH-RPBkyHpBgAd5bVClXHTrwXmkcly0-5qn71BZ1M3Giw2j8i6RSjAnpUauaDHYVI9Q9xz7K0huWUW5apEoC_OA%3D%40sagegerard.com.