Re: [racket] syntax/parse ~or patterns

2011-06-09 Thread Carl Eastlund
Nadeem, You're mixing "..." repetition with mapping some kind of operation over each element, and that doesn't work, at least not directly. Also, the way you've used ~or does not preserve the ordering of elements. Instead, the attributes a and b just get all the a/b pairs, and c gets all the c el

[racket] syntax/parse ~or patterns

2011-06-09 Thread Nadeem Abdul Hamid
I'm struggling with figuring out how to work with ~or patterns and syntax/parse. Suppose, for example, I want to write a macro that takes any number of either single numbers or pairs of numbers. It should expand into a list of results where each single number is negated and each pair is summed toge

Re: [racket] Limit command-line Racket's memory

2011-06-09 Thread Matthew Flatt
At Thu, 09 Jun 2011 18:08:22 -0400, Tony Garnock-Jones wrote: > I'm running racket (from git) from the command-line on a machine with > 64MB RAM. The 3m collector is not (yet) supported on the machine - it's > a MIPS-based CPU. > > When I start the web-server, it loads and runs OK up until it tr

[racket] Limit command-line Racket's memory

2011-06-09 Thread Tony Garnock-Jones
Hi all, I'm running racket (from git) from the command-line on a machine with 64MB RAM. The 3m collector is not (yet) supported on the machine - it's a MIPS-based CPU. When I start the web-server, it loads and runs OK up until it tries to fork() for a (process*) call, at which point it fails

Re: [racket] Reading Graph Structure: read: #..= expressions not allowed in read-syntax mode (??)

2011-06-09 Thread Sam Tobin-Hochstadt
On Thu, Jun 9, 2011 at 8:34 AM, Marijn wrote: > -BEGIN PGP SIGNED MESSAGE- > Hash: SHA1 > > Thanks Matthias, > > On 06/09/11 16:34, Matthias Felleisen wrote: >> >> (1) To create cyclic structs you need mutability in our world. [gensym is 0 >> assignments, cyclic structs is 1 assignment, a

Re: [racket] Reading Graph Structure: read: #..= expressions not allowed in read-syntax mode (??)

2011-06-09 Thread Marijn
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Thanks Matthias, On 06/09/11 16:34, Matthias Felleisen wrote: > > (1) To create cyclic structs you need mutability in our world. [gensym is 0 > assignments, cyclic structs is 1 assignment, and state is N assignments.] > > (2) I think the failure sh

Re: [racket] Reading Graph Structure: read: #..= expressions not allowed in read-syntax mode (??)

2011-06-09 Thread Matthias Felleisen
(1) To create cyclic structs you need mutability in our world. [gensym is 0 assignments, cyclic structs is 1 assignment, and state is N assignments.] (2) I think the failure should come earlier when a struct isn't mutable. If you agree, you can try to request a feature change. On Jun 8,

Re: [racket] Regex for blank line?

2011-06-09 Thread Matthias Felleisen
I have used string-trim for this from srfi/13 in conjunction with (string=? "" ...): > string-trim-both s [char/char-set/pred start end] -> string > Trim s by skipping over all characters on the left / on the right / on both > sides that satisfy the second parameter char/char-set/pred: >