[racket] Efficiency of tight loops in Racket

From: Neil Van Dyke (neil at neilvandyke.org)
Date: Fri Jan 14 09:40:56 EST 2011

Eli Barzilay wrote at 01/14/2011 09:21 AM:
> 9 hours ago, David Nolen wrote:
>   
>> With a good FFI it seems like someone could write a great Racket DSL for evented network programming a la Node.js minus all the JS callback cruft.
>>     
>
> I know very little about it, but it looks like it covers stuff that racket includes as built in functionality.
>   

Yeah, I don't know Node.js, but most of "http://nodejs.org/api.html" 
looks like ways to make JavaScript more easily do things that Racket 
already does better than Node.js does.

Regarding event-driven API like I see in the documentation for Node.js 
"net.Server" documentation, you could implement that in pure Racket 
pretty easily, without needing FFI.

I've done some fairly high-performance I/O for TCP and interactive 
subprocess pipes in pure Racket.  Racket's own event conception, buffer 
operations, and multithreading have been up to the task.  Of course, 
Racket certainly lets you implement simpler abstractions like Node.js's 
atop this.  You can even make Racket special-syntax like 
"define-Node.js-like-server-and-with-some-static-checking". :)

-- 
http://www.neilvandyke.org/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.racket-lang.org/users/archive/attachments/20110114/5c65c0ce/attachment.html>

Posted on the users mailing list.