Re: [racket] lex-error report while reading HTML using module XML

2012-12-12 Thread Jay McCarthy
I think the XML parser should be for parsing XML. You could look at the HTML module or, even better, use Neil van Dyke's html-parsing library, which deals with this issue and more. Jay On Wed, Dec 12, 2012 at 9:42 PM, Haiwei Zhou wrote: > Hi, > > In HTML the tag has no end tag. This causes trou

[racket] lex-error report while reading HTML using module XML

2012-12-12 Thread Haiwei Zhou
Hi, In HTML the tag has no end tag. This causes trouble while using string->xexpr. It is reported that tag img is not closed. I found in the XML writer there is a parameter named empty-tag-shorthand to control the HTML generation behavior. So I added a quick hack into XML reader to tolerate thos

Re: [racket] [racket-ide] Can the split view be made to be verticalas well?

2012-12-12 Thread Me
I was still using 5.2. I've upgraded now. Thanks. Racket Users list: http://lists.racket-lang.org/users

Re: [racket] for-each

2012-12-12 Thread Danny Yoo
On Wed, Dec 12, 2012 at 7:19 PM, Dman P wrote: > I was looking for a good example of the racket function for-eachI have > been trying to implant it but can not seem to get it work Have you been able to find the example in the documentation? http://docs.racket-lang.org/reference/pairs.

Re: [racket] Racket equivalent to RubyMotion

2012-12-12 Thread Matt Jadud
On Wed, Dec 12, 2012 at 3:45 PM, Neil Toronto wrote: > I have an arithmetic practice puzzle game thingy ready for when somebody > makes this. > > Would it be easiest to use Danny's Racket-to-JavaScript compiler? > > I haven't played with it, but PhoneGap seems to be a nifty way to get to multiple

Re: [racket] for-each

2012-12-12 Thread Grant Rettke
A good example, it is like map, but for when you only care about side effects. On Wed, Dec 12, 2012 at 8:19 PM, Dman P wrote: > I was looking for a good example of the racket function for-eachI > have been trying to implant it but can not seem to get it work > > > >

Re: [racket] for-each

2012-12-12 Thread Kieron Hardy
I don't know if it's a particularly good example, but here's a basic usage of for-each: #lang racket (define lst '(apple banana cherry)) (for-each (lambda (x) ; x is bound to each item of lst in turn (printf "item:~a~n" x) ; do something more with x ) lst) Hope this helps,

Re: [racket] [racket-ide] Can the split view be made to be vertical as well?

2012-12-12 Thread Justin Zamora
Select "Use Horizontal Layout" in the View menu. Justin On Dec 12, 2012 9:17 PM, "Da Gamer" wrote: > The way it is now -- file on top and instarepl at the bottom -- is ok. But > I was wondering if the instarepl view could be also set so it is vertical > as well. Somewhat like a split screen view

[racket] for-each

2012-12-12 Thread Dman P
I was looking for a good example of the racket function for-eachI have been trying to implant it but can not seem to get it work Racket Users list: http://lists.racket-lang.org/users

[racket] [racket-ide] Can the split view be made to be vertical as well?

2012-12-12 Thread Da Gamer
The way it is now -- file on top and instarepl at the bottom -- is ok. But I was wondering if the instarepl view could be also set so it is vertical as well. Somewhat like a split screen view.. At least, for me, having that vertical view makes it easier in terms of reading and comparing. ___

Re: [racket] Racket equivalent to RubyMotion

2012-12-12 Thread Danny Yoo
On Wed, Dec 12, 2012 at 1:45 PM, Neil Toronto wrote: > I have an arithmetic practice puzzle game thingy ready for when somebody > makes this. > > Would it be easiest to use Danny's Racket-to-JavaScript compiler? It may be worthwhile; I haven't looked at all into RubyMotion though. What kind of A

Re: [racket] Racket equivalent to RubyMotion

2012-12-12 Thread Hendrik Boom
On Wed, Dec 12, 2012 at 09:25:34AM -0800, Gregory Woodhouse wrote: > Very cool. It's available for iOS, too. >From time to time. It seems to be a cat-and-mouse game between the developer and Apple's app inspectors. -- hendrik Racket Users list: http://lists.racket-lang

Re: [racket] Math library ready for testing

2012-12-12 Thread Harry Spier
Neil Toronto wrote: >The maximum number of threads a parallelized math function will use. > The default value is (max 1 (processor-count))." Pierpaolo replied:: >Isn't (max 1 (processor-count)) the same as (processor-count) ? >Or does Racket runs on machines with less than 1 processors? 8^) F

Re: [racket] circular lists are not lists or sequences

2012-12-12 Thread David Van Horn
On 12/10/12 11:00 AM, Jens Axel Søgaard wrote: 2012/12/10 David Van Horn : On 12/10/12 10:14 AM, Matthew Flatt wrote: We did change `in-list' to add a `list?' guard, so the behavior is as intended. Maybe we need a new `in-' sequence constructor that works as long as pairs appear for as far as

Re: [racket] Racket equivalent to RubyMotion

2012-12-12 Thread Neil Toronto
I have an arithmetic practice puzzle game thingy ready for when somebody makes this. Would it be easiest to use Danny's Racket-to-JavaScript compiler? On 12/12/2012 09:02 AM, Grant Rettke wrote: Sounds like a fun project. On Wed, Dec 12, 2012 at 9:56 AM, Geoffrey S. Knauth mailto:ge...@knauth

Re: [racket] novice question about parentheses and control flow

2012-12-12 Thread je back
Thanks for the explanation; it makes sense now. Part of my confusion stemmed from not recognizing that the calls were stacking up until the eof condition was met. Jan Erik On Wed, Dec 12, 2012 at 11:49 AM, Stephen Bloch wrote: > > On Dec 12, 2012, at 10:29 AM, Matthias Felleisen wrote: > > > I

Re: [racket] Racket equivalent to RubyMotion

2012-12-12 Thread Gregory Woodhouse
Very cool. It's available for iOS, too. Gambit v4.6.4 > (+ 5 2) 7 > (define (f x) (+ x 1)) > (f 4) 5 >  Sent from my iPhone On Dec 12, 2012, at 8:56 AM, Hendrik Boom wrote: > Not Racket, but still Scheme. There'a a Gambit app on Android. Racket Users list: http://l

Re: [racket] Math library ready for testing

2012-12-12 Thread Neil Toronto
Using this thread is fine, because I'm monitoring it closely. If you're not sure whether some behavior is an error, email the list. Even if you're wrong, you're not wrong: if you misunderstood something, it's probably the documentation's fault. Also, other people probably misunderstood it in t

Re: [racket] Racket equivalent to RubyMotion

2012-12-12 Thread Hendrik Boom
On Wed, Dec 12, 2012 at 10:56:15AM -0500, Geoffrey S. Knauth wrote: > I'm writing in Racket, after months of Scala, which was nice too, in a > different way. Today I found out about RubyMotion, and wondered how hard it > would be to do do the same thing in Racket, i.e., write iOS apps in Racket,

Re: [racket] novice question about parentheses and control flow

2012-12-12 Thread Stephen Bloch
On Dec 12, 2012, at 10:29 AM, Matthias Felleisen wrote: > In Racket, Scheme, and Lisp, parentheses are NOT optional, they are > meaningful. Everyone counts. In specific, one of the things parentheses often mean is that the first thing inside the parentheses is a function to be applied to the r

Re: [racket] Math library ready for testing

2012-12-12 Thread Pierpaolo Bernardi
Should I use the bug reporting machinery for small things like this one, which I assume there will be a bunch in the new docs? Better a private mail to Neil? P. On Wed, Dec 12, 2012 at 4:58 PM, Neil Toronto wrote: > I'll fix the type of `processor-count' and change the math docs. > > Neil ⊥ >

Re: [racket] Racket equivalent to RubyMotion

2012-12-12 Thread Grant Rettke
Sounds like a fun project. On Wed, Dec 12, 2012 at 9:56 AM, Geoffrey S. Knauth wrote: > I'm writing in Racket, after months of Scala, which was nice too, in a > different way. Today I found out about RubyMotion, and wondered how hard > it would be to do do the same thing in Racket, i.e., write i

Re: [racket] Math library ready for testing

2012-12-12 Thread Neil Toronto
I'll fix the type of `processor-count' and change the math docs. Neil ⊥ On 12/12/2012 08:16 AM, Robby Findler wrote: But it could be elided for the docs. Robby On Wed, Dec 12, 2012 at 8:33 AM, J. Ian Johnson wrote: I imagine that's there more for Typed Racket's sake. -Ian - Original Mes

[racket] Racket equivalent to RubyMotion

2012-12-12 Thread Geoffrey S. Knauth
I'm writing in Racket, after months of Scala, which was nice too, in a different way. Today I found out about RubyMotion, and wondered how hard it would be to do do the same thing in Racket, i.e., write iOS apps in Racket, and write Android apps in Racket. In know I can write Android apps in S

Re: [racket] novice question about parentheses and control flow

2012-12-12 Thread Matthias Felleisen
In Racket, Scheme, and Lisp, parentheses are NOT optional, they are meaningful. Everyone counts. Once you have programmed in this world for a while, however, you won't really see the parens anymore and you won't make nearly as many syntax mistakes as in 'ugly languages'. Feel free to ask more

[racket] novice question about parentheses and control flow

2012-12-12 Thread je back
There's something quite basic about how scheme works that eludes me. Please let me know if it would be more appropriate to post this somewhere eles. This program works as I expect: (let loop ((a 0)) (if (> a 3) (print "it's over") (begin (print a) (loop (+ 1 a) I

Re: [racket] Math library ready for testing

2012-12-12 Thread Robby Findler
But it could be elided for the docs. Robby On Wed, Dec 12, 2012 at 8:33 AM, J. Ian Johnson wrote: > I imagine that's there more for Typed Racket's sake. > -Ian > - Original Message - > From: "Pierpaolo Bernardi" > To: "Neil Toronto" > Cc: users@racket-lang.org > Sent: Wednesday, Decemb

Re: [racket] Math library ready for testing

2012-12-12 Thread J. Ian Johnson
I imagine that's there more for Typed Racket's sake. -Ian - Original Message - From: "Pierpaolo Bernardi" To: "Neil Toronto" Cc: users@racket-lang.org Sent: Wednesday, December 12, 2012 9:17:57 AM GMT -05:00 US/Canada Eastern Subject: Re: [racket] Math library ready for testing On Fri, D

Re: [racket] Math library ready for testing

2012-12-12 Thread Pierpaolo Bernardi
On Fri, Dec 7, 2012 at 9:33 PM, Neil Toronto wrote: > I've just pushed the last commits that make the new math library ready for > wider testing. Almost everything ready for use is documented, the tests keep > passing, and everything *seems* to work. (max-math-threads) → Positive-Integer

Re: [racket] Screenshot in OS X

2012-12-12 Thread Matthew Flatt
At Sat, 8 Dec 2012 14:29:50 +0100, Jens Axel Søgaard wrote: > I have extended the screenshot code. Now it is possible to > capture both the entire display and a single window. > As an example I have recreated the images in the > widget gallery (in the gui docs). I notice that combo-field% > and edi

Re: [racket] deceptive perfomance for typed racket in integer division

2012-12-12 Thread Robby Findler
FWIW, big GCs are usually multiple seconds. But minor collections are in that neighborhood and those happen more randomly when running inside DrRacket. Robby On Wed, Dec 12, 2012 at 7:12 AM, Pierpaolo Bernardi wrote: > On Tue, Dec 11, 2012 at 7:09 PM, Neil Toronto wrote: > >> I've had good succ

Re: [racket] deceptive perfomance for typed racket in integer division

2012-12-12 Thread Pierpaolo Bernardi
On Tue, Dec 11, 2012 at 7:09 PM, Neil Toronto wrote: > I've had good success running DrRacket and selecting "No debugging or > profiling" and deselecting "Preserve stacktrace" in the Language dialog. > Most of the time, I get performance similar to command-line Racket. I think > the only signific

Re: [racket] cond else and

2012-12-12 Thread Stephen Bloch
> 2012/12/12 Frank Weytjens wrote: >> (define (draw-shapes a-posn a-lon) >> (cond >>[(empty? a-lon) true] >>[else (and (draw-circle a-posn (first a-lon)) >> (draw-shapes a-posn (rest a-lon)))])) >> ... Jens Axel Søgaard replied: > In the teaching languages only one expres

Re: [racket] Math library ready for testing

2012-12-12 Thread Pierpaolo Bernardi
BTW, I seem to remember that GMP stores the table of small primes as a vector of the differences between consecutive primes. Storing a byte per prime goes a long way. Let's see... there are 50847534 primes under 10^9, the max difference between a consecutive pair of them is 282. We can store that

Re: [racket] cond else and

2012-12-12 Thread Jens Axel Søgaard
2012/12/12 Frank Weytjens : > For example: > > (define (draw-shapes a-posn a-lon) > (cond > [(empty? a-lon) true] > [else (and (draw-circle a-posn (first a-lon)) >(draw-shapes a-posn (rest a-lon)))])) > > Why is there an AND needed in the else clause? > ELSE is normaly us

[racket] Passing info from reader level

2012-12-12 Thread Rajah Mahsohn Omega
Hi, I am creating my own language with racket, it's the same as racket except that I can embed metadata anywhere in the code. I have implemented a read and read-syntax function which detects the metadata and returns (make-special-comment metadata) this seems to be the only way to remove it from the