[racket] Beginners request for code review.

From: Piotr Klibert (piotr.klibert at 10clouds.com)
Date: Thu Jan 31 05:40:37 EST 2013

I have a problem with your suggestion, namely:

> 2) If you make this a github repository, then you could publish
> it as a 'raco pkg' package and everyone could try it out.
> Looks like fun!

I use bzr and launchpad for personal things and github for work
related stuff, so that's why it was on launchpad. But it's not a
problem to make it a github repo and I did that:
https://github.com/piotrklibert/bezier

But I don't know exactly how to make it easily downloadable and
installable by others? Honestly I never used the raco tool - it's not
my fault :), planet packages are installed by just requiring them and
I had no need for it yet. I looked through
http://docs.racket-lang.org/raco/plt.html and
http://docs.racket-lang.org/raco/running.html
but at a first glance it looks really complicated... and there are no
examples :(

In Python we'd write a simple setup.py (I guess it's equivalent of
info.rkt) and then use a tool such as pip with:

pip install -e git+git://github.com/etc/...

And it would clone github repo and link it to the site-packages
(collects in racket?) so that imports work from everywhere.

How exactly does this workflow look in Racket using raco? Is there an
example/tutorial somewhere? On a related note, do I need to do
something in particular to turn this few files into a collection? Will
relative importing (erm, requiring :)) work after it's made into a
collection or will I have to rewrite (require "bezier-gui.rkt") to
(require my-collection/bezier-gui)?

Sorry for this, I guess I should really learn more about racket tooling :)

In the meantime, I just cloned (branched earlier) the repository and
it worked fine on a few machines I tried this:

git clone git at github.com:piotrklibert/bezier.git
racket bezier/bezier.rkt

Best regards,
Piotr Klibert


2013/1/31 John Clements <clements at brinckerhoff.org>:
>
> On Jan 30, 2013, at 5:20 PM, Piotr Klibert wrote:
>
>> Hello all.
>>
>> TL;DR: I "want" a code review. Link to the repository at the end.
>
> ...
>
>> The code lives here: http://bazaar.launchpad.net/~klibertp/+junk/bezier/files
>>
>> I will really appreciate any feedback from anyone. Thanks in advance!
>
> Well, I took a 10 second look, and everything looks lovely to me.  I do mean 10 seconds, though.
>
> 1) I see that define-syntax-rule made a big performance difference.  I know it's possible to encourage racket to do more inlining; I wonder if that would have helped.
> 2) If you make this a github repository, then you could publish it as a 'raco pkg' package and everyone could try it out. Looks like fun!
>
> Best,
>
> John Clements

Posted on the users mailing list.