Re: [racket] link: module mismatch

2012-11-28 Thread Anthony Carrico
On 11/29/2012 01:20 AM, Anthony Carrico wrote: > (module+ test > (check = 4 (scheme_eval '(+ 2 2) (make-base-namespace > Hmm, a clue, this doesn't fail: (module+ test (check-false (scheme_eval '#f (make-base-namespace -- Anthony Carrico signature.asc Description: OpenPGP digital

[racket] link: module mismatch

2012-11-28 Thread Anthony Carrico
I have a test case that works at the command line: $ racket Welcome to Racket v5.3.1. > (require "simple.rkt") > (scheme_eval '(+ 2 2) (make-base-namespace)) 4 > But fails with raco test: $ raco test "simple.rkt" link: module mismatch; possibly, bytecode file needs re-compile because dependenci

[racket] How to get paren highlighting with online compilation highlighting too?

2012-11-28 Thread Grant Rettke
Hi, With online compilation enabled and "highlight errors in yellow" enabled the highlighting of s-expressions in the yellow area is disabled. This makes it difficult to see where we might want to make changes. How may I get the desired behavior? Grant -- Grant Rettke | ACM, AMA, COG, IEEE gr

Re: [racket] Problem with posting to Racket users list

2012-11-28 Thread Eli Barzilay
8 hours ago, Harry Spier wrote: > My last two posts to the users list have shown up on the gmane > mirror and the google groups mirror but not on the mail archive. My > original posts didn't show up on the mail archive but my subsequent > reply did. I think this has happened to me once or twice in

Re: [racket] problem with get-argb-pixels (or underlying drawing software)

2012-11-28 Thread John Clements
On Nov 28, 2012, at 5:40 PM, Robby Findler wrote: > I think the first step to understanding this is to operate at the dc% level. > That is, make a little program that draws (simpler) shapes, cropped and > uncropped, via calls directly to the dc object and see if you can find a > minimalist pro

Re: [racket] Doing collision detection in universe.ss

2012-11-28 Thread Matthew Flatt
Right --- you don't want `#lang scratchy'. The `scratchy/runtime' library might be useful. At Wed, 28 Nov 2012 21:01:32 -0500, Yaron Minsky wrote: > Ah, looking at scratchy more closely, I now think I understand it. > It's neat, but it's not quite what I'm looking for. In particular, I > was look

Re: [racket] Doing collision detection in universe.ss

2012-11-28 Thread Yaron Minsky
Ah, looking at scratchy more closely, I now think I understand it. It's neat, but it's not quite what I'm looking for. In particular, I was looking for a set of libraries that made the kinds of things one can do in scratch easy to do. But scratchy is its own little language, and doesn't give you

Re: [racket] problem with get-argb-pixels (or underlying drawing software)

2012-11-28 Thread Robby Findler
I think the first step to understanding this is to operate at the dc% level. That is, make a little program that draws (simpler) shapes, cropped and uncropped, via calls directly to the dc object and see if you can find a minimalist program. Well, that's how I tackle these problems, generally. Rob

[racket] problem with get-argb-pixels (or underlying drawing software)

2012-11-28 Thread John Clements
I'm seeing strange behavior in bitmap rendering... or maybe the problem is in get-argb-pixels; I don't seem to have the tools to observe the difference.I'm hesitant to file a bug report, because this may simply be a consequence of built-in mac drawing routines.  At a minimum, though, there's a doc

Re: [racket] text/font not rendering symbol fonts on WinXP

2012-11-28 Thread Robby Findler
On Wed, Nov 28, 2012 at 5:42 PM, Clement Erik Ferguson wrote: > Using that dll fixed the problem on Windows XP 32bit! > > Using the 64-bit one on Windows 7 64-bit didn't work, though. > > Also, I was able to test out text/font with a symbol font on OS X 10.8.2, > and it also would not render the s

Re: [racket] Doing collision detection in universe.ss

2012-11-28 Thread Yaron Minsky
This sounds great. I'm curious how it compared to snap, which is scratch like, but with more abstraction capabilities and more FP mixed in. One key thing to aim for I believe is the online component. This is where scratch really shines. They manage to male coding a highly social activity, which m

Re: [racket] Doing collision detection in universe.ss

2012-11-28 Thread Yaron Minsky
This sounds ideal. I'll check it out. On Nov 28, 2012 8:00 AM, "Matthew Flatt" wrote: > For what it's worth > > https://github.com/mflatt/scratchy > > is an implementation of the Scratch sprite and evaluation model plus a > textual language. It has all of the drawbacks of Scratch --- mutation,

Re: [racket] Doing collision detection in universe.ss

2012-11-28 Thread Prabhakar Ragde
Shriram wrote: Yaron, this summer my students, Kathi Fisler, and I built a block-based, functional language with types (expressed as colors) and testing. It runs in the browser, uses the WeScheme runtime and can express most Bootstrap programs. It needs more polish before we can release it to t

Re: [racket] Web-Server: dispatch rules and urls generated with embed/url

2012-11-28 Thread Jay McCarthy
embed/url uses the current URL as the base, because a continuation represents a step in the large computation that that URL represents. On a technical level, it needs to do this to correctly handle servers that serve many servlets each with different URLs. It uses the base url to get to the continu

Re: [racket] text/font not rendering symbol fonts on WinXP

2012-11-28 Thread Clement Erik Ferguson
Using that dll fixed the problem on Windows XP 32bit! Using the 64-bit one on Windows 7 64-bit didn't work, though. Also, I was able to test out text/font with a symbol font on OS X 10.8.2, and it also would not render the symbol font. I found somebody who had made TeX fonts for byzantine neumes

[racket] Web-Server: dispatch rules and urls generated with embed/url

2012-11-28 Thread Helmut Dobretzberger
Hey, I have a problem with the behaviour of embed/url in combination of using pretty urls: when the current page is http://localhost:8080, and I generate a URL with embed/url, the result is something like "/;((...)). That's fine. If I have pretty url with dispatch, like http://localhost:8080/sear

Re: [racket] Doing collision detection in universe.ss

2012-11-28 Thread Shriram Krishnamurthi
Yaron, this summer my students, Kathi Fisler, and I built a block-based, functional language with types (expressed as colors) and testing. It runs in the browser, uses the WeScheme runtime and can express most Bootstrap programs. It needs more polish before we can release it to the world. We would

[racket] Problem with posting to Racket users list

2012-11-28 Thread Harry Spier
My last two posts to the users list have shown up on the gmane mirror and the google groups mirror but not on the mail archive. My original posts didn't show up on the mail archive but my subsequent reply did. I think this has happened to me once or twice in the past also. Harry Spier

Re: [racket] Doing collision detection in universe.ss (related question)

2012-11-28 Thread Stephan Houben
Here is John's gist extended with the method based on integer masks per scanline. https://gist.github.com/4163396 Stephan On 11/28/2012 2:26 PM, Stephan Houben wrote: Apart from introducing a bounding box check, I would suggest converting each scanline into a single exact integer with 1 bits c

Re: [racket] Online testing

2012-11-28 Thread David Van Horn
On 11/28/12 12:08 PM, Matthias Felleisen wrote: I think David is interested in an extension of the check-syntax mode. CS should report when test cases fail. I am willing to help it along by writing all test cases within (module+ test ...) for that. Yes exactly. I'd be happy to write (module+

Re: [racket] Online testing

2012-11-28 Thread J. Ian Johnson
I know that will error, but I thought the point was for online check syntax to error. -Ian - Original Message - From: "Matthias Felleisen" To: "J. Ian Johnson" Cc: "Asumu Takikawa" , "Racket Users" Sent: Wednesday, November 28, 2012 12:13:44 PM GMT -05:00 US/Canada Eastern Subject: Re:

Re: [racket] Online testing

2012-11-28 Thread Matthias Felleisen
You need to click check syntax. On Nov 28, 2012, at 12:08 PM, J. Ian Johnson wrote: > This doesn't give me a syntax error. > -Ian > - Original Message - > From: "Asumu Takikawa" > To: "David Van Horn" > Cc: "Racket Users" > Sent: Wednesday, November 28, 2012 12:06:25 PM GMT -05:00 U

Re: [racket] Online testing

2012-11-28 Thread J. Ian Johnson
This doesn't give me a syntax error. -Ian - Original Message - From: "Asumu Takikawa" To: "David Van Horn" Cc: "Racket Users" Sent: Wednesday, November 28, 2012 12:06:25 PM GMT -05:00 US/Canada Eastern Subject: Re: [racket] Online testing On 2012-11-28 12:04:16 -0500, Asumu Takikawa wro

Re: [racket] Online testing

2012-11-28 Thread Matthias Felleisen
I think David is interested in an extension of the check-syntax mode. CS should report when test cases fail. I am willing to help it along by writing all test cases within (module+ test ...) for that. -- Matthias smime.p7s Description: S/MIME cryptographic signature R

Re: [racket] Online testing

2012-11-28 Thread Asumu Takikawa
On 2012-11-28 12:04:16 -0500, Asumu Takikawa wrote: > Also, this doesn't work if you use a `module*` or `module+`. Is that a bug? Oops, this obviously doesn't work since you can't import a `module*` submodule from its parent. D'oh. Cheers, Asumu Racket Users list: http://

Re: [racket] Online testing

2012-11-28 Thread Asumu Takikawa
On 2012-11-28 11:48:45 -0500, David Van Horn wrote: > I'm sure this possible and probably not difficult, but I thought I'd > throw it out there for feedback. If you do something like this: #lang racket (module test racket (require rackunit) (check-equal? 5 2)) (begin-for-syntax

[racket] Online testing

2012-11-28 Thread David Van Horn
Something that would be useful to me is a #lang racket/test that is just like #lang racket but runs the entire module at compile time and collects test failures, reporting them as syntax errors. Then I could develop code with online compilation to give me online feedback about test cases. Onc

Re: [racket] Doing collision detection in universe.ss

2012-11-28 Thread Stephen Bloch
On Nov 28, 2012, at 7:37 AM, Yaron Minsky wrote: > I do think that a good design goal for Racket's kid-oriented libraries > would be to be feature compatible with Scratch. It would be great if > there were good ways of doing everything that Scratch can do, from > playing sounds to detecting coll

Re: [racket] Doing collision detection in universe.ss

2012-11-28 Thread Jens Axel Søgaard
2012/11/28 Hendrik Boom : > There are two arts to collision detection: figuring out whether two > images collide (which gets trickier when they're in motion) and > organising all your objects so you don't have to test very many > combinations of them. Back in the summer holiday I played with 2d-r

Re: [racket] Doing collision detection in universe.ss

2012-11-28 Thread Yaron Minsky
Is this oriented towards educational use, or is it a more general-purpose library? y On Tue, Nov 27, 2012 at 10:51 PM, Jay McCarthy wrote: > And if you don't want to write your own... > > I have a Planet package or github repo for almost everything... > > (old) slow functional physics in Racket

Re: [racket] Doing collision detection in universe.ss (related question)

2012-11-28 Thread Stephan Houben
Apart from introducing a bounding box check, I would suggest converting each scanline into a single exact integer with 1 bits corresponding to alpha unequal 0. Then for each scanline, you can use arithmetic-shift and bitwise-and, and then check the result for being non-zero. Stephan 2012/11/28 S

Re: [racket] Doing collision detection in universe.ss

2012-11-28 Thread Jay McCarthy
General purpose use. On Wed, Nov 28, 2012 at 5:38 AM, Yaron Minsky wrote: > Is this oriented towards educational use, or is it a more > general-purpose library? > > y > > On Tue, Nov 27, 2012 at 10:51 PM, Jay McCarthy wrote: >> And if you don't want to write your own... >> >> I have a Planet pac

Re: [racket] Doing collision detection in universe.ss

2012-11-28 Thread Matthew Flatt
For what it's worth https://github.com/mflatt/scratchy is an implementation of the Scratch sprite and evaluation model plus a textual language. It has all of the drawbacks of Scratch --- mutation, race conditions, and busy waiting --- without the nice graphical syntax! It has a collision detecto

Re: [racket] bug report feature on planet needs to be shot in the face

2012-11-28 Thread Robby Findler
It should be sending you email already, assuming that you told the bug report system what your email address is. The emails come from t...@racket-lang.org. I just created a bug report and assigned it to me and I got the email (twice, actually, because I already get all of the bug report emails). R

Re: [racket] Doing collision detection in universe.ss

2012-11-28 Thread Yaron Minsky
To be clear, I'm firmly interested in tinkering, which is why I'm using universe.ss and image.ss. I do think that a good design goal for Racket's kid-oriented libraries would be to be feature compatible with Scratch. It would be great if there were good ways of doing everything that Scratch can d

Re: [racket] Doing collision detection in universe.ss

2012-11-28 Thread Hendrik Boom
On Tue, Nov 27, 2012 at 08:56:13PM -0500, Yaron Minsky wrote: > I've been weaning my son off of Scratch in favor of Racket, and trying > to get him to write interactive games using universe.ss and image.ss. > I'm wondering if anyone has suggestions for how to do things like > collision detection.

Re: [racket] Doing collision detection in universe.ss (related question)

2012-11-28 Thread Stephen Bloch
On Nov 28, 2012, at 3:10 AM, John Clements wrote: > Okay, the totally-dumb collision detection implementation was shorter than > expected; only 73 lines, including (light) testing. Here's a link to that > code: > > https://gist.github.com/4159778 Simple, straightforward. I notice that your

Re: [racket] Doing collision detection in universe.ss (solution!)

2012-11-28 Thread John Clements
On Nov 27, 2012, at 11:21 PM, John Clements wrote: > > On Nov 27, 2012, at 11:04 PM, John Clements wrote: > >> >> On Nov 27, 2012, at 5:56 PM, Yaron Minsky wrote: >> >>> I've been weaning my son off of Scratch in favor of Racket, and trying >>> to get him to write interactive games using univ