Giter Site home page Giter Site logo

racketui's Introduction

RacketUI - Automated Web UI Generator for Racket
================================================

RacketUI is intended to be a teachpack to provide facilities for the
quick and easy generation of web interfaces for programs written in 
the HtDP (_How to Design Programs_) languages of Racket (see 
docs.racket-lang.org).


Example
-------

Consider the following program, which builds an acronym from the
capitalized words in a list of strings (comments and test cases are
omitted):

(define (acronym a-los)
  (cond [(empty? a-los) ""]
        [(cons? a-los) (cond 
                         [(string-upper-case? (string-ith (first a-los) 0))
                          (string-append (string-ith (first a-los) 0)
                                         (acronym (rest a-los)))]
                         [else (acronym (rest a-los))])]))

A web application for this can be automatically generated using:

(require (planet nah22/racketui/web-launch))

(web-launch
 "Acronym Builder"
 (function "Produces an acronym of the capitalized words in the given list."
           (acronym ["Words" (listof+ ["Word" string+])]
                    ->["The acronym" string])))

Running this program should launch a web browser with an user
interface allowing input of a list of words (strings) and the
ability to apply the function to that input to view the result.



License
-------

RacketUI
Copyright (c) 2010-2011 Nadeem Abdul Hamid

racketui's People

Contributors

nadeemabdulhamid avatar lharriott avatar mkyl avatar samth avatar

Stargazers

 avatar Daniele avatar Lewis Brown avatar  avatar  avatar

Watchers

 avatar James Cloos avatar  avatar

Forkers

lharriott samth mkyl

racketui's Issues

Timeout if function takes > 60 seconds to execute.

If a request takes longer than 60 seconds to execute, web-server's safety-limits cause the connection to be closed and the result is never returned to the end-user. One (hacky) solution is to disable those limits, which I've submitted as #4. Wondering if there is a more elegant way of doing it: sending a heartbeat maybe? In any case, here is the stack trace:

Your Web application is running at http://localhost:8000/carlv001.rkt.
Stop this program at any time to terminate the Web Server.
write-string: output port is closed
output port: #output-port:tcp-accepted
errortrace...:
context...:
raise-arguments-error
try-again
loop
[repeats 2 more times]
fprintf
.../http/response.rkt:72:0: output-response-head
.../private/more-scheme.rkt:261:28
call-in-empty-metacontinuation-frame
[repeats 1 more time]
.../private/more-scheme.rkt:168:6: loop
.../private/dispatch-server-with-connect-unit.rkt:144:4: connection-loop
call-in-empty-metacontinuation-frame
[repeats 1 more time]
call-with-empty-metacontinuation-frame-for-swap

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.