Re: [racket] on the arity of the composition of procedures with different arities

2012-08-07 Thread Robby Findler
Looks like a bug in compose1 (and compose) to me. Robby On Tue, Aug 7, 2012 at 10:46 PM, Erik Dominikus wrote: > I had this conversation with DrRacket 5.2: > >> (procedure-arity (compose1 (lambda (x) 0) (lambda () 0))) > (arity-at-least 0) > >> (procedure-arity (compose1 (lambda (x) 0) (lambda (

[racket] on the arity of the composition of procedures with different arities

2012-08-07 Thread Erik Dominikus
I had this conversation with DrRacket 5.2: > (procedure-arity (compose1 (lambda (x) 0) (lambda () 0))) (arity-at-least 0) > (procedure-arity (compose1 (lambda (x) 0) (lambda (x) 0))) 1 > (procedure-arity (compose1 (lambda (x) x) (lambda (x y) 0))) (arity-at-least 0) I think the arity of the fir

Re: [racket] Racket v5.3

2012-08-07 Thread Sam Tobin-Hochstadt
Yes, this ought to work, but it doesn't. You can have typed submodules in typed modules, though: #lang typed/racket (define: x : Integer 1) (module+ main (displayln x)) I'll look into why your original program doesn't work. Sam On Tue, Aug 7, 2012 at 6:03 PM, Ray Racine wrote: > Looks like I'

Re: [racket] obtaining name of module-level binding

2012-08-07 Thread Galler
Matthias, The DSL text would be of significant interest. On the subject of texts, I also think a book called "The Jumpy Racketeer" introducing reified control primitives in the same format as "The Little Lisper" would receive significant popular interest. R./ Zack On Aug 7, 2012, at 3:36 PM, Ga

Re: [racket] rackunit vs test-engine

2012-08-07 Thread Joe Gilray
Hi Matthias, I will take you up on your offer of an example... thanks! I've read about test-suite and test-case, but I'm not sure of the best way to test each utility in a file. Ideally the tests would be grouped with the functions: (define f1 ...) (module+ test (test-equal? "f1-tests" (f1 1

Re: [racket] users Digest, Vol 84, Issue 21

2012-08-07 Thread James Swaine
be enabled on your platform (futures-enabled? doesn't have any effect on whether futures run in parallel or not). I'm pushing a fix for this. > > > Regards, > > Rodolfo Carvalho > -- next part -- > An HTML attachment was scrubbed..

Re: [racket] rackunit vs test-engine

2012-08-07 Thread Matthias Felleisen
On Aug 7, 2012, at 8:24 PM, Joe Gilray wrote: > Now that 5.3 is out, I've been reading about submodules and their support for > testing. In the past I used test-engine/racket-tests for testing. > > Can someone please give me a rundown of when to use rackunit and > advantages/disadvantages of

Re: [racket] Racket v5.3

2012-08-07 Thread Rodolfo Carvalho
On Tue, Aug 7, 2012 at 9:31 PM, Ray Racine wrote: > But then I don't have a typed submodule in a typed module. I think the > original should work as well. > > > Yes, you are right. It works using two separate files, but not with submodules on the same file. Racket Users l

Re: [racket] Racket v5.3

2012-08-07 Thread Ray Racine
But then I don't have a typed submodule in a typed module. I think the original should work as well. On Aug 7, 2012 7:40 PM, "Rodolfo Carvalho" wrote: > The following code works and prints "Tony". > Notice changing from #lang typed/racket to #lang racket/base. > > > #lang racket/base >

[racket] rackunit vs test-engine

2012-08-07 Thread Joe Gilray
Now that 5.3 is out, I've been reading about submodules and their support for testing. In the past I used test-engine/racket-tests for testing. Can someone please give me a rundown of when to use rackunit and advantages/disadvantages of test-engine and rackunit? Thanks, -Joe

[racket] futures-enabled?

2012-08-07 Thread Rodolfo Carvalho
Hello, The documentation on Futuressays that: Currently, parallel support for future is enabled by default for Windows, > Linux x86/x86_64, and Mac OS X x86/x86_64. I installed Racket 5.3 from the 32-bit Windows installer, and when I run (fut

Re: [racket] Racket v5.3

2012-08-07 Thread Rodolfo Carvalho
The following code works and prints "Tony". Notice changing from #lang typed/racket to #lang racket/base. #lang racket/base (module zoo typed/racket (provide tiger) (: tiger String) (define tiger "Tony")) (require 'zoo) tiger []'s Rodolfo Racket Use

Re: [racket] Racket v5.3

2012-08-07 Thread Rodolfo Carvalho
Hi, On Tue, Aug 7, 2012 at 7:03 PM, Ray Racine wrote: > Looks like I'm still missing something. > Built off of GIT master. About Racket shows. > Welcome to DrRacket, version 5.3.0.17--2012-08-07(c03daba7/d/list) > > > #lang typed/racket > > (module zoo typed/racket > (provide tiger) > >

Re: [racket] obtaining name of module-level binding

2012-08-07 Thread Robby Findler
On Tue, Aug 7, 2012 at 2:36 PM, Galler wrote: > Robby, > > Thanks for the prompt answer. > > I suspected that would be the case. > > Is 'Semantics Engineering with PLT Redex' where I should get started on > language-engineering? That book does, in a very indirect way, prepare you to answer quest

Re: [racket] weirdness with complex numbers

2012-08-07 Thread Matthias Felleisen
That doesn't answer Todd's question. But this does: http://www.wolframalpha.com/share/clip?f=d41d8cd98f00b204e9800998ecf8427efsfdt6pkjg On Aug 7, 2012, at 6:45 PM, Ray Racine wrote: > Wolfram > > http://www.wolframalpha.com/input/?i=roots+x%5E2+%2B+2*x+%2B+10 > > > On Tue, Aug 7, 2012 at

Re: [racket] weirdness with complex numbers

2012-08-07 Thread Ray Racine
More apropos http://www.wolframalpha.com/input/?i=+1%2F2+%2B+i2%2F3+*+1%2F2%2B2i%2F3 On Tue, Aug 7, 2012 at 6:45 PM, Ray Racine wrote: > Wolfram > > http://www.wolframalpha.com/input/?i=roots+x%5E2+%2B+2*x+%2B+10 > > > On Tue, Aug 7, 2012 at 6:28 PM, Matthias Felleisen > wrote: > >> >> If it w

Re: [racket] weirdness with complex numbers

2012-08-07 Thread Ray Racine
Wolfram http://www.wolframalpha.com/input/?i=roots+x%5E2+%2B+2*x+%2B+10 On Tue, Aug 7, 2012 at 6:28 PM, Matthias Felleisen wrote: > > If it weren't against math conventions, I wouldn't mind seeing 1-i1 or > 1/2+i2/3. But I am sure the people who produce Racket or Scheme or Lisp > readers would

Re: [racket] weirdness with complex numbers

2012-08-07 Thread Matthias Felleisen
If it weren't against math conventions, I wouldn't mind seeing 1-i1 or 1/2+i2/3. But I am sure the people who produce Racket or Scheme or Lisp readers would hate me for that one, too. I think your students will need to cope, like all people who study sophisticated concepts (such as complex).

Re: [racket] Racket v5.3

2012-08-07 Thread Ray Racine
Looks like I'm still missing something. Built off of GIT master. About Racket shows. Welcome to DrRacket, version 5.3.0.17--2012-08-07(c03daba7/d/list) #lang typed/racket (module zoo typed/racket (provide tiger) (: tiger String) (define tiger "Tony")) (require 'zoo) tiger . .

Re: [racket] obtaining name of module-level binding

2012-08-07 Thread Galler
Thanks Danny On Tue, Aug 7, 2012 at 4:58 PM, Danny Yoo wrote: ;; Question to others: how can this be simplified? (splicing-let-syntax ([get-literal-metadata (lambda (stx) #`(#%datum . #,(format "~s" I did a slight s

Re: [racket] Racket v5.3

2012-08-07 Thread Ray Racine
My bad. Let me try them (submodules) again. Must have been one of my between the chair and the keyboard phenomena. On Tue, Aug 7, 2012 at 5:06 PM, Sam Tobin-Hochstadt wrote: > > On Aug 7, 2012 4:34 PM, "Ray Racine" wrote: > > > > Nice release guys. > > > > DrRacket is buttery smooth and looks

Re: [racket] obtaining name of module-level binding

2012-08-07 Thread Ryan Culpepper
BTW, there's almost never a need to refer to '#%datum'. Just use 'quote' instead. Ryan On 08/07/2012 04:58 PM, Danny Yoo wrote: ;; Question to others: how can this be simplified? (splicing-let-syntax ([get-literal-metadata (lambda (stx)

Re: [racket] Racket v5.3

2012-08-07 Thread Sam Tobin-Hochstadt
On Aug 7, 2012 4:34 PM, "Ray Racine" wrote: > > Nice release guys. > > DrRacket is buttery smooth and looks nicer than ever. Emacs withdrawal symptoms almost gone when Racket coding. Though the left hand stills tends to spontaneously break out into an organ Fugue every now and then. > > Need to

Re: [racket] obtaining name of module-level binding

2012-08-07 Thread Matthias Felleisen
On Aug 7, 2012, at 3:36 PM, Galler wrote: > Is 'Semantics Engineering with PLT Redex' where I should get started on > language-engineering? No, this book is about engineering the mathematical semantics of a language (existing or to be designed) so that you can test properties (such as well-d

Re: [racket] obtaining name of module-level binding

2012-08-07 Thread Danny Yoo
>;; Question to others: how can this be simplified? >(splicing-let-syntax ([get-literal-metadata > (lambda (stx) > #`(#%datum . #,(format "~s" I did a slight simplification of the code. I'm putting up the revised versi

Re: [racket] obtaining name of module-level binding

2012-08-07 Thread Danny Yoo
> Is 'Semantics Engineering with PLT Redex' where I should get started on > language-engineering? Concretely, I think Robby's suggestion will look something like this: ;; #lang racket ;; Let's create a custom structure for procedures that remember certain

Re: [racket] Racket v5.3

2012-08-07 Thread Ray Racine
Nice release guys. DrRacket is buttery smooth and looks nicer than ever. Emacs withdrawal symptoms almost gone when Racket coding. Though the left hand stills tends to spontaneously break out into an organ Fugue every now and then. Need to play with racket/generic and #:methods combined with TR

Re: [racket] obtaining name of module-level binding

2012-08-07 Thread Galler
Robby, Thanks for the prompt answer. I suspected that would be the case. Is 'Semantics Engineering with PLT Redex' where I should get started on language-engineering? On Tue, Aug 7, 2012 at 3:22 PM, Robby Findler wrote: No, but you could define your own language that had its own define

Re: [racket] obtaining name of module-level binding

2012-08-07 Thread Robby Findler
No, but you could define your own language that had its own define that cooperated with some-useful-... to do that. You would probably want to do this with a macro, tho, so that you get the lexical property. I guess. Robby On Tue, Aug 7, 2012 at 1:15 PM, Galler wrote: > Is there a function or s

[racket] obtaining name of module-level binding

2012-08-07 Thread Galler
Is there a function or syntax to obtain the module-level binding of a function? For example: (define (my-function) (display (some-useful-function-which-captures-name-of-module-level-binding))) ;-> 'my-function Thanks very much. R./ Zack Racket Users list: http://l

[racket] Racket v5.3

2012-08-07 Thread Eli Barzilay
Racket version 5.3 is now available from http://racket-lang.org/ * Submodules are nested module declarations that can be loaded and run independently from the enclosing module. For an overview of submodules, see http://blog.racket-lang.org/2012/06/submodules.html * The futures visual