Re: [racket] Default icon for rkt file type

2014-02-26 Thread Janos Tobias Locsei
Hi Christian, I had the same problem and I set the icon manually using a free program called filetypesman, using these instructions: http://www.sevenforums.com/tutorials/57455-file-extension-icon-change-default-icon.html Hope this helps Tobias On 15 February 2014 17:45, Cristian Baboi wrote

Re: [racket] web server: how to read the current url?

2014-02-05 Thread Janos Tobias Locsei
> > current-servlet-continuation-expiration-handler receives the request > (which contains request-uri) that expired. Is that all you want? > That's exactly what I was looking for. Thanks! Tobias > > Jay > > > On Wed, Feb 5, 2014 at 9:26 AM, Janos Tobias Loc

[racket] web server: how to read the current url?

2014-02-05 Thread Janos Tobias Locsei
Is there a way for a function in the web server to find out the current url? I'm using stateful servlets and I'd like to redirect to the start page of my app if the continuation expires, using something along the lines of (parameterize ([current-servlet-continuation-expiration-handler ])

Re: [racket] FYI: A new Racket-powered startup

2014-02-05 Thread Janos Tobias Locsei
Daniel, Congratulations on the launch! I had a play with the site and it's seems very slick. Like Gustavo, I'm curious about the technology stack you used. I had a look on builtwith (http://builtwith.com/youpatch.com) and saw that you're using nginx and django in conjunction with racket? Tobias

Re: [racket] web server: leading forward slash required in paths?

2014-01-28 Thread Janos Tobias Locsei
ind the file. I > would suspect it has something to do with either file organization, Racket > web server configuration, or both. > > Where are myimage.jpg and mytemplate.html in relation to one another? In > the same directory? > > > On Tue, Jan 28, 2014 at 7:04 AM, Janos To

[racket] web server: leading forward slash required in paths?

2014-01-28 Thread Janos Tobias Locsei
I noticed that when using the racket web server one needs to include a leading forward slash when referencing static files e.g. a style.css or an image.jpg. Is there a rationale for this? It's different than the usual html convention, and it means that when using html template files it's not possib

Re: [racket] passing a list of dispatch clauses to dispatch-rules

2013-12-18 Thread Janos Tobias Locsei
Thanks Jay, your explanation with match helped me get a better understanding of what's going on. For the specific case of match, you can make the b-helper example work if you pass the failure procedure to b-helper and have b-helper return it: (define (b in) (match in [x (=> failure-proc)

Re: [racket] passing a list of dispatch clauses to dispatch-rules

2013-12-17 Thread Janos Tobias Locsei
g" is matched and fail-to-fs throws next-dispatcher that the idea was for the program to keep trying with the rest of the clauses in the dispatch rules. Tobias On 17 December 2013 17:25, Janos Tobias Locsei wrote: > Hi Jay, I tried again using serve/servelet. This is my full cod

Re: [racket] passing a list of dispatch clauses to dispatch-rules

2013-12-17 Thread Janos Tobias Locsei
first one is what I would write, except that I'd put it after the > ["" ...] case so it doesn't shadow it. > > How are you testing this code? (next-dispatcher) is supposed to throw > an exception, but it will caught and used by the Web server when you > are using

Re: [racket] passing a list of dispatch clauses to dispatch-rules

2013-12-17 Thread Janos Tobias Locsei
I thought I'd add a note about what my overall objective with this is, in case there's a completely different way of achieving the same thing. Basically what I want is to be able to serve a combination of apps and static html pages on my domain, but I don't want ".html" as the end of the url for t

Re: [racket] passing a list of dispatch clauses to dispatch-rules

2013-12-17 Thread Janos Tobias Locsei
looks like it's addressing a similar sort of issue: http://lists.racket-lang.org/users/archive/2013-September/059728.html ... but I still don't understand how to construct a "next dispatcher" that (next-dispatcher) will call. Tobias On 16 December 2013 22:44, Jay McCarthy wrot

[racket] passing a list of dispatch clauses to dispatch-rules

2013-12-16 Thread Janos Tobias Locsei
Hi, I'm a newbie Racketeer so apologies if this is a silly question: Is it possible to pass a list of dispatch-clause to dispatch-rules? Naive use of "apply" doesn't work: (define-values (blog-dispatch blog-url) (let ([arglist (list [("") list-posts] [("posts" (

[racket] DrRacket GUI tutorial with MVC concepts?

2013-12-16 Thread Janos Tobias Locsei
Geoff, maybe your son would enjoy the book "Realm of Racket" which teaches game programming in Racket? It teaches MVC by osmosis, i.e. MVC is not explicitly discussed but you learn to structure your code along those lines anyway. I'm about 1/3 of the way through the book and it's good fun. It's ama