sicp-lang / sicp

A SICP language for Racket.
GNU Lesser General Public License v3.0
191 stars 24 forks source link

Add type version for `sicp-pict` and make some improvements to `sicp` and `sicp-pict`. #38

Closed NoahStoryM closed 2 years ago

NoahStoryM commented 2 years ago

This PR mainly makes the following changes:

  1. [sicp]: improve amb (add 2 shortcuts).
  2. [sicp]: provide unicode lambda, 1+ 1- -1+, null, compose .
  3. [sicp]: add some stream operators.
  4. [typed/sicp-pict]: Add typed/sicp-pict (warning: the return type of paint is Image-Snip%, which is not supported by TR. https://github.com/racket/typed-racket/pull/1236 update: the current TR already supports Image-Snip%.)
  5. [sicp-pict]: Add blank, which is the identity element of superpose.
  6. [sicp-pict]: Add more arguments to paint (similar to make-bitmap).
  7. [sicp-pict]: Add above function.
  8. [sicp-pict]: Improve the contracts of *->painter and new-* functions.
  9. [Document]: superpose can accept any number of arguments, not just two.
  10. [Document]: transform-painter should accept a painter argument.
  11. [Document]: The width and height should be of exact-positive-integer? instead of (and/c positive? integer?).
  12. [Document]: Add COLORS, PENS, and BRUSHES and Syntactic Sugar sections.
NoahStoryM commented 2 years ago

Hi @soegaard, currently I have no other changes planned for this PR (if I think of other changes later, I will open a new PR). Please review it.

soegaard commented 2 years ago

Great work.

Don't forget to add yourself to the list of contributors.

sorawee commented 2 years ago

Sorry for not reviewing this earlier, but this PR breaks the documentation. I will fix it, but please make sure that you test it next time.

NoahStoryM commented 2 years ago

Oh sorry, I'm not very familiar with scribble, I just checked the web documentation and ignored the messages. I'll pay more attentions next time!