Re: [racket] Help with phases

2012-01-16 Thread Jon Rafkind
I'm guessing a little bit but I think its because the `phases' macro is expanded at phase 2 before `set-compile' is called. If you put (set-compile) before the definition of `phases' then you get '(1 2). On 01/17/2012 12:06 AM, Veer Singh wrote: > > Why macro call (phases) produces '(1 0) and no

[racket] Help with phases

2012-01-16 Thread Veer Singh
Why macro call (phases) produces '(1 0) and not '(1 2) ? (module mod1 racket (require (for-syntax syntax/parse)) ;"mod-compile.rkt")) (require (for-syntax (for-syntax syntax/parse racket ))) ;"mod-compile.rkt"))) (provide set-compile phases)

Re: [racket] Teach yourself Racket in Fixnum Days?

2012-01-16 Thread Guillaume Marceau
On 1/6/2012 10:07 PM, Giuseppe Paleologo wrote: My applications are mostly in Statistics/Data Analysis. Rather than dealing with a single, massive data set, I often have many medium-sized ones. I find myself applying in R or Python large amounts of maps, reduces, filters and other list manipulati

[racket] Whither ProfessorJ

2012-01-16 Thread Tom Maynard
Well, not only ProfJ, but also Viera K. Proulx and her publications, like "Design of Class Hierarchies" and "How to Design Class Hierarchies" and K.E.Gray's "ProfessorJ: A Gradual Intro to Java..." -- or even "Compiling Java to PLT Scheme?" Has all this hard work gone to waste? Will there eve

[racket] problem with raco distribute

2012-01-16 Thread Will Robinson
Hello, I am trying to use raco to make a distributable exe to share an app with friends and students who are largely ignorant about racket (and computers in general). Making an "all-in-wonder" exe is a perfect solution for me here. The problem is that when I run raco.exe, I get this error in Win

Re: [racket] Web application question.

2012-01-16 Thread Neil Van Dyke
If you want something a third option: http://www.neilvandyke.org/racket-html-template/ The documentation will come eventually, but the most basic usage is self-explanatory. -- http://www.neilvandyke.org/ Racket Users list: http://lists.racket-lang.org/users

[racket] Look-ahead in parser-tools?

2012-01-16 Thread Simon Haines
I've been playing around with parser-tools and am having difficulty expressing the following language: "remember is " "remember " where is any string that does not contain the word 'is', is a well-formed email address and is any string that does not match the previous constraints. Here's (st

Re: [racket] Web application question.

2012-01-16 Thread Danny Yoo
> Can someone tell me, is there some advantage or added funtionality in using > the @syntax in a template over the first example using quosiquotes? Section 7.4 of the Web Server docs shows a difference: http://docs.racket-lang.org/web-server/templates.html#(part._.Escaping) A version with qu

[racket] Web application question.

2012-01-16 Thread Harry Spier
Dear list members, In "Continue Web applications in Racket" it gives this example of creating dynamic webpages using quosiquotes: ; render-greeting: string -> response ; Consumes a name, and produces a dynamic response. (define (render-greeting a-name) (response/xexpr `(html (head (title "Welcome"

[racket] ICFP 2012 Call for papers

2012-01-16 Thread Wouter Swierstra
= ICFP 2012: International Conference on Functional Programming Copenhagen, Denmark, September 9 - 15, 2012 http://www.icfpconference.org/icfp2012 = Import

Re: [racket] filtering syntax

2012-01-16 Thread Sam Tobin-Hochstadt
On Mon, Jan 16, 2012 at 7:57 AM, Marijn wrote: > >    ((_ ((id rule) ...)) >     (with-syntax (((dep ...) (free-vars (expand #'(rule ...) You need to use `local-expand', not `expand', here. Probably like this: (local-expand #'(rule ...) 'expression '()) -- sam th sa...@ccs.neu.edu

[racket] Auto reloading REPL?

2012-01-16 Thread Dennis Honeyman
Hi, everyone. I was wondering if it was possible to have the REPL automatically reload when the file is changed. Currently I came up with this in my .racketrc ... (define-syntax-rule (reload f) (lambda () (for ([i (in-naturals)]) (enter! f) (sleep 0.5)))

Re: [racket] filtering syntax

2012-01-16 Thread Marijn
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 13-01-12 15:52, Sam Tobin-Hochstadt wrote: > On Fri, Jan 13, 2012 at 9:23 AM, Matthias Felleisen > wrote: >> compute the free variables with a simple recursive pass over core >> syntax, > > Note that there's code to do this here: > http://pre.ra

Re: [racket] why shift/reduce conflict?

2012-01-16 Thread Veer Singh
I think the conflict may be here(I may be wrong) : When parser encounter C , it can reduce to y or it can shift i.e it think there is A waiting to be read, hence shift/reduce conflict On Mon, Jan 16, 2012 at 2:49 PM, Dmitry Pavlov wrote: > Hello all, > > I am having trouble with yacc parser

Re: [racket] help using xml-rpc:1:2

2012-01-16 Thread Maurizio Giordano
(reposted to racket user list) Hi Jay, hi all to tell the truth, some time ago I was looking for a SOAP package in plt/racket, but there's no one. So I started using/testing your xmlrpc pkg (and the older one as well). In my current project I am developing a WS-BPEL engine in Racket Scheme ... th

[racket] why shift/reduce conflict?

2012-01-16 Thread Dmitry Pavlov
Hello all, I am having trouble with yacc parser giving shift/reduce conflict, while I do not see where the conflict can be. I have simplified the grammar to the following one: #lang racket (require parser-tools/yacc parser-tools/lex) (define-empty-tokens my-tokens (EOF A B C)) (defi

Re: [racket] question about macro failing due to hygiene(?)

2012-01-16 Thread Eli Barzilay
A few minutes ago, Marijn wrote: > > And so it does, but even in the simplified example I find it hard to > reason about it and come to a conclusion on whether it should return > 1 or 2. Yes, it is a little tricky. > Do you just look at: > > (define-syntax-rule (make-variable __E__) >

Re: [racket] question about macro failing due to hygiene(?)

2012-01-16 Thread Marijn
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 13-01-12 21:24, Eli Barzilay wrote: > Three hours ago, Marijn wrote: >> -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 >> >> Why doesn't this work (expand: unbound identifier in module in: >> a): [...] > > Similar to the reason that this: > > (def

Re: [racket] filtering syntax

2012-01-16 Thread Marijn
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 13-01-12 16:32, Matthias Felleisen wrote: > > On Jan 13, 2012, at 10:20 AM, Marijn wrote: > >> >> Right, b would be a constant, namely the function that returns >> the value of a. > > > a is assignable so b is constant only between 'set! messag