[racket] Beginner problem

335 views
Skip to first unread message

Steve Lett

unread,
Jun 8, 2013, 10:26:23 PM6/8/13
to us...@racket-lang.org

Hi
I am a beginner programmer and just came across Racket this week when I was on the Coursera website. I found the course called Intro to Systematic Program Design. I am trying to use Stephen Bloch's Picturing Programs. But my first attempt was using Quick-An Introduction to Racket with Pictures. Typing 5 I got 5. Typing "art gallery" I got "art gallery". But when I typed (circle 10) I got an error message "circle: this function is not defined".

If I need a library there is a problem. My only internet conection is on the Android platform on a Galaxy Tab. So I have downloaded the DrRacket software and transferred it to my Windows Vista Laptop. I also have an XP desktop if I need it.

So how can I get (circle 10) to work?

Thank you for being there! It really means alot!  Steve Lett

Jon Zeppieri

unread,
Jun 8, 2013, 10:35:05 PM6/8/13
to Steve Lett, Racket Users
Did you follow the instructions in the part labeled "2 Set..."? You
need to put "#lang slideshow" at the top of your definitions window
(replacing any #lang line that might already be there), and you need
to press "Run" after doing that.
> ____________________
> Racket Users list:
> http://lists.racket-lang.org/users
>
____________________
Racket Users list:
http://lists.racket-lang.org/users

Danny Yoo

unread,
Jun 8, 2013, 11:02:22 PM6/8/13
to Steve Lett, Racket mailing list
Make sure that if you're using Picturing Programs, don't skip Section 0.3 in:


It talks about how to set up the software for the rest of the book.  You'll need to do it in order for things like "circle" to work.

Jon Zeppieri

unread,
Jun 8, 2013, 11:07:53 PM6/8/13
to Steve Lett, Racket Users
Ah, sorry. If you've already set up DrRacket to use the student
languages, you need to undo that to do the "Quick" tutorial."

You'll need to go back to the Language -> Choose Language... menu and
select the Racket language.

On Sat, Jun 8, 2013 at 11:04 PM, Jon Zeppieri <zepp...@gmail.com> wrote:
> That's what DrRacket responds with if you put a #lang line in the
> interactions (lower) window. You need to put it in the definitions
> (upper) window.
>
> On Sat, Jun 8, 2013 at 10:58 PM, Steve Lett <steve....@gmail.com> wrote:
>> Thanks. I just did that and there's another error message. It reads "read:
>> #lang not enabled in the current context"

Jon Zeppieri

unread,
Jun 8, 2013, 11:11:32 PM6/8/13
to Steve Lett, Racket Users
Or, to put it another way, your language settings need to be different
for the "Quick" tutorial than for "Picturing Programs."

Danny Yoo

unread,
Jun 8, 2013, 11:45:44 PM6/8/13
to Racket mailing list


---------- Forwarded message ----------
From: Steve Lett <steve....@gmail.com>
Date: Sat, Jun 8, 2013 at 8:25 PM
Subject: Re: [racket] Beginner problem
To: Danny Yoo <dy...@hashcollision.org>


Thanks, but how do I install a library when my only internet connection is on Android, Galaxy Tab? I have windows vista on my laptop.

Stephen Bloch

unread,
Jun 9, 2013, 7:10:25 AM6/9/13
to Steve Lett, us...@racket-lang.org
As others have already pointed out,

1) the "Quick" tutorial uses a slightly different language and library from the "Picturing Programs" book, which in turn uses a slightly different library from the "An Introduction to Systematic Program Design".  The latter two are mostly compatible with one another, and were designed for beginning programmers, so I would suggest you use them.

2) chapter 0.3 of the _Picturing Programs_ textbook explains how to choose languages and invoke the relevant library.


As others haven't already pointed out,

3) the libraries you need for "Quick", or "Picturing Programs", or "An Introduction to Systematic Program Design", are already downloaded in the same bundle that brought you DrRacket; you don't need a net connection after this.

4) the 2htdp/image library used in "An Introduction to Systematic Program Design" is a subset of the picturing-programs library used in _Picturing Programs_, so if you follow the directions in chapter 0.3 of the book, all the examples in both the book and the MOOC should work.



Dr. Stephen Bloch
Math/CS Dept, Adelphi University



Stephen Bloch

unread,
Jun 9, 2013, 7:52:15 AM6/9/13
to Steve Lett, us...@racket-lang.org
Reply all
Reply to author
Forward
0 new messages