Re: [racket] Compiling programs with embedded procedures

2010-12-26 Thread John Clements
On Dec 26, 2010, at 2:56 PM, Matthew Flatt wrote: > Yes. Okay, I should probably ask: would it be possible for the stepper to do a principled job of inserting references to stepper procedures in such a way that the user's module could not refer to them? (Currently, it uses 3D syntax for this.

Re: [racket] status of keyword argument support in TR?

2010-12-26 Thread Neil Van Dyke
If you guys know now what the TR ":" syntax will look like for the usual keyword arguments, I would like to know what it is. My reason is that I need to replace my embedded documentation setup, now that I'm targeting Scribble instead of Texinfo, and I'd like to be getting the procedure signatu

[racket] JSON parsing with tree fold

2010-12-26 Thread Neil Van Dyke
To experiment with tree folding like in Oleg Kiselyov's SSAX, I decided to write a JSON parser with a similar approach. Dave Herman of course has already written a fine JSON parser for Racket. But if you are interested in a tree fold parser, such as for handling arbitrarily large inputs, you

Re: [racket] Compiling programs with embedded procedures

2010-12-26 Thread Matthew Flatt
Yes. At Sun, 26 Dec 2010 17:48:14 -0500, Eric Dobson wrote: > Ok, that makes sense. So would the correct way to create code for > runtime at expansion-time, be to use syntax objects which represent > code that evaluates to procedures instead of the procedures > themselves? > > -Eric > > On Sun,

Re: [racket] Compiling programs with embedded procedures

2010-12-26 Thread Eric Dobson
Ok, that makes sense. So would the correct way to create code for runtime at expansion-time, be to use syntax objects which represent code that evaluates to procedures instead of the procedures themselves? -Eric On Sun, Dec 26, 2010 at 5:39 PM, Matthew Flatt wrote: > At Sun, 26 Dec 2010 17:31:23

Re: [racket] Compiling programs with embedded procedures

2010-12-26 Thread Matthew Flatt
At Sun, 26 Dec 2010 17:31:23 -0500, Eric Dobson wrote: > I am trying to understand how the expansion/compilation process deals > with embedding procedures in the syntax of a program, and I have now > constructed a program that returns different values when run in > drracket, and racket. It also doe

[racket] Compiling programs with embedded procedures

2010-12-26 Thread Eric Dobson
I am trying to understand how the expansion/compilation process deals with embedding procedures in the syntax of a program, and I have now constructed a program that returns different values when run in drracket, and racket. It also does not compile for me using raco make. I was wondering what peop

Re: [racket] numbers/bytes in r6rs

2010-12-26 Thread Vincent St-Amour
At Sun, 26 Dec 2010 10:49:45 -0600, Matthew Flatt wrote: > > - determining whether a floating point number is a double or a single. > > I don't think there's any predicate for that. flonum? returns true for double-precision floats, and (lambda (x) (and (inexact-real? x) (not (flonum? x return

Re: [racket] numbers/bytes in r6rs

2010-12-26 Thread Robby Findler
Whoops looks like I was wrong there. Please disregard. Robby On Sunday, December 26, 2010, Robby Findler wrote: > In racket you'd use this function, fwiw: > >  (λ (n) (bytes-length (string->bytes/utf-8 (format "~s" n > > (or possibly a variant of it depending on the encoding you were using)

Re: [racket] numbers/bytes in r6rs

2010-12-26 Thread Matthew Flatt
At Sun, 26 Dec 2010 09:52:20 +0100, Wolfgang De Meuter wrote: > I'm struggling with chapter 2 of the R6RS libraries (relation between Scheme > data objects and bytevectors). Does anyone know a clean&simple way for > - determining the number of bytes needed to push an arbitrary-sized number in > a

Re: [racket] Can't resize DrRacket window in Ubuntu 10.10

2010-12-26 Thread Todd O'Bryan
Actually, I lied. It turns out that you can get a resize control in the bottom left corner of the window, but that's the only place I've found that works. On Sun, Dec 26, 2010 at 10:01 AM, Todd O'Bryan wrote: > I just installed DrRacket on Ubuntu 10.10, both from the binary and > compiled from so

[racket] Can't resize DrRacket window in Ubuntu 10.10

2010-12-26 Thread Todd O'Bryan
I just installed DrRacket on Ubuntu 10.10, both from the binary and compiled from source to be sure the problem existed in both, and I can't resize the window. The target area for the resize controls has always been very small (maybe a pixel or two), but I think it just went to non-existent. Todd

Re: [racket] numbers/bytes in r6rs

2010-12-26 Thread Robby Findler
In racket you'd use this function, fwiw: (λ (n) (bytes-length (string->bytes/utf-8 (format "~s" n (or possibly a variant of it depending on the encoding you were using). Robby On Sun, Dec 26, 2010 at 2:52 AM, Wolfgang De Meuter wrote: > Hello > > I'm struggling with chapter 2 of the R6RS

Re: [racket] Rusty Math

2010-12-26 Thread Robby Findler
The number would have to be complex, but sure you can do that: > (forn 0+10i) #t Robby On Sun, Dec 26, 2010 at 6:04 AM, Sayth Renshaw wrote: > I was doing an exmple and thinking about my expected retrun value to kow if > my function worked. > > However I don't think any value could test true th

Re: [racket] Rusty Math

2010-12-26 Thread Thomas Chust
2010/12/26 Sayth Renshaw : > [...] > However I don't think any value could test true therefore my function would > always be false. I do need to double check though as my math is rusty. But > you cannot square a number and have it retun negative can you? > [...] Hello Sayth, whether that is possi

[racket] Rusty Math

2010-12-26 Thread Sayth Renshaw
I was doing an exmple and thinking about my expected retrun value to kow if my function worked. However I don't think any value could test true therefore my function would always be false. I do need to double check though as my math is rusty. But you cannot square a number and have it retun negati

[racket] numbers/bytes in r6rs

2010-12-26 Thread Wolfgang De Meuter
Hello I'm struggling with chapter 2 of the R6RS libraries (relation between Scheme data objects and bytevectors). Does anyone know a clean&simple way for - determining the number of bytes needed to push an arbitrary-sized number in a bytevector; (log nbr 256) is not good enough :-) - determinin