Comments (6)
Thanks for fixing this.
from sicp.
The procedure paint
calls the painter with its own frame (unit vectors along the first and second axis), so when using paint
you don't need to supply a frame.
However the error message you see is misleading, so we need to fix the error message.
#lang sicp
(#%require sicp-pict)
(define tl (make-vect 0 1))
(define tr (make-vect 1 1))
(define bl (make-vect 0 0))
(define br (make-vect 1 0))
(define segments
(vects->segments
(list bl tl tr br bl)))
(define origin (make-vect 0 0))
(define frame (make-frame origin tl br))
(paint (segments->painter segments))
from sicp.
Btw - sicp-pict is meant to be used like this:
#lang racket
(require sicp-pict)
from sicp.
@soegaard thanks a lot for the clarification.
About using #lang sicp
, it was taken from the Examples section in Racket docs.
from sicp.
Hmm. Maybe it works fine in #lang sicp
too?
I reopened the issue - we still need to improve the error message.
from sicp.
They seem to work fine with sicp
as language, I've did the previous exercises like implementations of square-limit
and corner-split
without any problems.
from sicp.
Related Issues (20)
- paint other image HOT 2
- cons-stream and amb are not documented HOT 1
- even cooler having tests <3 HOT 1
- filter: contract violation expected: list? HOT 3
- Contract for vector-scale should be real?
- Unify sicp-pict/main.rkt and sicp-pict/sicp.rkt HOT 1
- Port picture->painter and load-painter HOT 1
- Setup travis ci and add tests HOT 1
- Error on 3.5.4 Streams and Delayed Evaluation HOT 3
- make sure Racket and R5RS do not mix up badly
- Make top interaction works with R5RS
- Please add the racket topic to this repo HOT 2
- Expression will out of momery when sicp package installed on racket-cs HOT 4
- How does the coordinate mapping work? HOT 3
- squash-inwards example of the book HOT 11
- SICP not building on the build server HOT 2
- DrRacket can't install the package HOT 4
- SICP package not listed in category “Other Languages in the Racket Environment”
- External links and Contributors links not working
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from sicp.