-
Notifications
You must be signed in to change notification settings - Fork 4
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
Added comments, docstrings #3
Open
gw666
wants to merge
15
commits into
SICPDistilled:master
Choose a base branch
from
gw666:master
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
also added comments to help orient new users
shapes: box, x, diamond, george segment-lists allow compound shapes to be drawn using concat; see diamond-x fcns: flip-horiz, flip-vert; rotate, rotate180, rotate270; below
Abstracted split-up, split-right into higher-level split function.
Source code refactored, with comments and docstrings added, to make it easy for beginners to get up to speed quickly. Does not implement image-painter. To give yourself a chance to complete the exercise as ‘thattommyhall’ intended, delete the bodies of the following functions: add-vec sub-vec scale-vec flip-horiz rotate below path right-split (uncomment by removing “#_”) up-split (uncomment by removing “#_”) split Just evaluate this file to see the “goal” function, square-limit, draw itself. This version uses the “higher-level” versions of right-split and up-split. If you decide to write the code for up-split and derive the higher-level function ‘split’, you will need to comment out or remove the versions of right-split and up-split that follow split in the source code and un-comment the versions that precede split in the source code. Enjoy, and please give me feedback if you find my version helpful!
This reverts commit f8dc53523901f84b162294b3ba8f2bd7a6a3ac6f. Conflicts: src/escher/core.clj
This reverts commit f8dc53523901f84b162294b3ba8f2bd7a6a3ac6f. Conflicts: src/escher/core.clj
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Hi, @thattommyhall,
I got things working properly for segment-painters (didn't bother with image-painters) and added comments and docstrings that I think would make the learning process easier for beginners.
Use however much/little/none as you wish, and modify as you see fit. I believe it is important to remove as many barriers to success as possible, which includes (in my book) having to figure out details that have nothing to do with the material being learned (which, FYI, is why I'm not bothering with image-painters).
I was a magazine editor/writer for many years (including BYTE, 1979-1988), so I think I have some experience at this process.
That being said, this is my first ever pull request ever, anywhere, so please pardon my errors (and I constantly struggle with git, too). If there's a next time, I'll create a "topic branch" (?) to make things easier for you.
Best wishes,
Gregg Williams