Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

empty-scene is a stub #16

Open
stchang opened this issue May 12, 2015 · 4 comments
Open

empty-scene is a stub #16

stchang opened this issue May 12, 2015 · 4 comments

Comments

@stchang
Copy link
Collaborator

stchang commented May 12, 2015

lang whalesong

(require whalesong/world)
(require whalesong/image)
(empty-scene)

Produces the error:
empty-scene: stub definition

Should I use something else?

@stchang
Copy link
Collaborator Author

stchang commented May 12, 2015

It appears the error only occurs when I run with racket and not whalesong, so I believe this is not a bug. Sorry.

@stchang stchang closed this as completed May 12, 2015
@soegaard soegaard reopened this May 13, 2015
@soegaard
Copy link
Owner

The ideal is that a Whalesong program runs in both DrRacket and the browser.
Therefore the stub for Racket ought to import empty-scene from 2htdp/image .
(But the point is moot if the other image functions doesn't work in DrRacket either -
if so feel free to close this PR again)

@stchang
Copy link
Collaborator Author

stchang commented Jun 5, 2015

I'm investigating this. I tried simply exporting functions from 2htdp/image to use when running in DrRacket, but it doesnt work because whalesong defines it's own color struct instead of using the one from 2htdp/image.

https://github.com/soegaard/whalesong/blob/master/whalesong/image/private/color.rkt

Anyone know why it needs to do this?

@vishesh
Copy link
Collaborator

vishesh commented Jun 8, 2015

Whalesong wont compile modules written with #lang racket, that is why it uses its own struct color. Same is with posn. We have to import struct depending we are compiling for JS or running as Racket program.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants