91.301 - Organization of Programming Languages (Martin)

Chapter: 01 - Introduction to Scheme

01 - Introduction to Scheme

Note: Read Chapter 1 (up until the Exercises) before doing this assignment. 

Write the functions described in ps1.rkt. 

You can do your work in the Racket environment.

To try out your work, type "make test" in the Unix shell. This is the same script that that autograder will run.

When you're ready to submit, make a gzip tarball and upload.

Important note: You must tar up all files in the assignment download (the Makefile, the test.t file, and the ps1.rkt solutions), and the files must be located a ps1 subdirectory.

To do this:
  • cd to the directory containing the ps1 directory
  • run this command: 
tar czvf my-submission.tar.gz ps1

Then upload the my-submission.tar.gz file.

Assignment Download: ps1-assignment.tar.gz

00 - Hello World

In this assignment, you'll get set up with Racket, and submit a minimal assignment for autograding.

Make sure you've done the install stuff before trying to complete this assignment.

Download and extract the assignment archive.

Then, write the functions described in ps0.rkt. See also the discussion the class web site.

You can do your work in the Racket environment.

To try out your work, type "make test" in the Unix shell. This is the same script that that autograder will run.

When you're ready to submit, make a gzip tarball and upload.

Important note: You must tar up all files in the assignment download (the Makefile, the test.t file, and the ps0.rkt solutions), and the files must be located a ps1 subdirectory. 

To do this:
  • cd to the directory containing the ps0 directory (note: containing the ps0 directory, not the ps0 directory itself)
  • run this command: 
tar czvf my-submission.tar.gz ps0

Then upload the my-submission.tar.gz file.

Assignment Download: ps0-assignment.tar.gz

Chapter: 02 - Iteration vs. Recursion and HOP

02 - Iteration vs. Recursion and Higher Order Procedures

Note: Read SICP, Section 1.2 and Section 1.3 before doing this assignment

If you are Honors-by-Contract, make sure to understand 1.2.6.

Write the functions described in ps2.rkt. 

You can do your work in the Racket environment.

To try out your work, type "make test" in the Unix shell. This is the same script that that autograder will run.

When you're ready to submit, make a gzip tarball and upload.

Important note: You must tar up all files in the assignment download (the Makefile, the test.t file, and the ps2.rkt solutions), and the files must be located a ps2 subdirectory. 

To do this:
  • cd to the directory containing the ps2 directory
  • run this command: 
tar czvf my-submission.tar.gz ps2

Then upload the my-submission.tar.gz file.  (You can rename it as you like, e.g., with your username or real name, as long as it has a .tar.gz suffix.)

Assignment Download: ps2-assignment.tar.gz

Chapter: 03 - Data Abstraction, Lists, and Higher-Order Functions

03b - Honors and Extra Credit

This assignment has problems on:
  • The dotted-tail notation, which lets you make procedures that accept a variable number of parameters
  • deep-reverse -- i.e., reversing lists-of-lists

Assignment Download: ps3b-assignment.tar.gz

03a - Lists and Higher-Order Functions

Download the assignment files and complete per guidance in the Racket file.

Note: for some of the questions, you are to draw diagrams. For these, you may do any of the following:
  • Draw using ASCII art in the Racket source file, and comment out your drawings.
  • Draw on paper, and take a photo with your phone (or image with a flatbed scanner) and include in your .tar.gz submission.
  • Draw using a computer draw program, and submit a PNG or JPG file or files. 
As usual, don't rename the directory or any of the starter files, and make sure that you are submitting a gzip tar file that has the starter subdir in it.

Assignment Download: ps3a-assignment.tar.gz

Chapter: 04 - Using Map/Filter/Reduce, and Trees

04 - Using Map/Filter/Reduce and Trees

This assignment has two main pieces (which are largely separate);

* implementing a simulated CD database, and then writing database operations using map and filter.

* working with trees, including straight-up recursion implementations, and using map and folding operations.

Note: for the function flip-odd, you are supposed to define it using even? and negate.

It should behave like odd?.

The flip thing is not part of the solution.

Assignment Download: ps4-assignment.tar.gz

Chapter: 05 - Symbolic Differentiation

05 - Symbolic Differentiation

Overview

In this problem set, you'll get more practice with accumulate, and work with the Scheme symbolic differentiator.


Reading


Before doing this problem set, read the following material:

Exercises

1. Exercise 2.36 on pp. 120, accumulating with lists of lists.

2. Exercise 2.53 on pp. 144, testing quotepair?, and memq.

3. Exercise 2.54 on pp. 145, building your own version of equal?.

4. Exercise 2.55 on pp. 145, pushing the limits of quote.

Small Implementation Projects

For the next two problems, refer to the symbolic differentiation code in the grader download.

5. Exercise 2.58 on pp. 151, converting the differentiator to infix. Do subproblem (a) only.


6. Exercise 2.57 on pp. 151, extending the differentiator to handle sum and product expressions of length greater than two.

Exercise 2.58 is much easier than Exercise 2.57, and I would suggest that you complete that one first.

Please note that you have to do work in three files:
  • exercises.rkt
  • exercise2-58.rkt
  • exercise2-57.rkt

Assignment Download: ps5-assignment.tar.gz

Chapter: 06 - Type Systems

06 - Type Systems

Please complete the code and explanations in problems 1 through 5 of the assignment page.

HbC / extra credit, do problems 6 and 7.

At the moment, this assignment is not autograded. 

Make sure each file contains working code, and put a narrative explanation and/or test cases in your discussions explaining how to drive it around.

Assignment Download: ps6-assignment.tar.gz

Chapter: 07 - Environments and Object Orientation

07 - Environments and Object Orientation

This assignment is not autograded.

For the environment diagrams, please submit as ASCII art in the main.rkt file, or include scanned images of drawings.

Overview

The programming assignment for this week explores two ideas: the simulation of a world in which objects are characterized by collections of state variables, and the use of object-oriented programming as a technique for modularizing worlds in which objects interact.

These ideas are presented in the context of a simple text-based adventure game like the ones available on many computers. Such games have provided an interesting sink of time for many computer lovers. In order not to sink too much of your own time, it is important to study the system and plan your work before starting to write any code.

This problem set begins by describing the overall structure of the simulation. The warm-up exercises in Part 2 will help you to master the ideas involved. Part 3 contains the assignment itself.

Also, in Part 4, you will continue exploration of libraries and tools that you may wish to use in your final project.

Credits

This assignment was developed by the Scheme group at MIT, adapted by Holly Yanco, and edited by Fred Martin.

Reading

The SICP Adventure Game

The basic idea of adventure games is that the user plays a character in an imaginary world inhabited by other characters. The user plays the game by issuing commands to the computer that have the effect of moving the character about and performing acts in the imaginary world, such as picking up objects. The computer simulates the legal moves and rejects illegal ones. For example, it is illegal to move between places that are not connected (unless you have special powers). If a move is legal, the computer updates its model of the world and allows the next move to be considered.

Our game takes place in a strange, imaginary world called UMass Lowell, with imaginary places such as a computer lab, a robot lab, and a department office. In order to get going, we need to establish the structure of this imaginary world: the objects that exist and the ways in which they relate to each other.

Initially, there are three procedures for creating objects:

 (make-thing name) 
 (make-place name) 
 (make-person name birthplace restlessness) 

In addition, there are procedures that make people and things and procedures that install them in the simulated world. The reason that we need to be able to create people and things separately from installing them will be discussed in one of the exercises later. For now, we note the existence of the procedures

 (make&install-thing name birthplace) 
 (make&install-person name birthplace restlessness) 

Each time we make or make and install a person or a thing, we give it a name. People and things also are created at some initial place. In addition, a person has a restlessness factor that determines how often the person moves. For example, the procedure make&install-person may be used to create the two imaginary characters, fredm and swathi, and put them in their places, as it were.

 (define computer-lab (make-place 'computer-lab)) 
 (define robot-lab (make-place 'robot-lab)) 
 (define fredm (make&install-person 'fredm robot-lab 3)) 
 (define swathi (make&install-person 'swathi computer-lab 2)) 

All objects in the system are implemented as message-accepting procedures.

Once you load the system on your machine, you will be able to control fredm and swathi by sending them appropriate messages. As you enter each command, the computer reports what happens and where it is happening. For instance, imagine we had interconnected a few places so that the following scenario is feasible:

(ask fredm 'look-around) 
At robot-lab : fredm says -- I see nothing 
() 

(ask (ask fredm 'place) 'exits) 
(south) 

(ask fredm 'go 'south) 
fredm moves from robot-lab to west-hall 
#t 

(ask fredm 'go 'east) 
fredm moves from west-hall to elevator-lobby 
#t 

(ask fredm 'go 'north) 
fredm moves from elevator-lobby to computer-lab 
At computer-lab : fredm says -- Hi swathi 
#t 

(ask swathi 'look-around) 
At computer-lab : swathi says -- I see fredm 

In principle, you could run the system by issuing specific commands to each of the creatures in the world, but this defeats the intent of the game since that would give you explicit control over all the characters. Instead, we will structure our system so that any character can be manipulated automatically in some fashion by the computer. We do this by creating a list of all the characters to be moved by the computer and by simulating the passage of time by a special procedure, clock, that sends a move message to each creature in the list. A move message does not automatically imply that the creature receiving it will perform an action. Rather, like all of us, a creature hangs about idly until he or she (or it) gets bored enough to do something. To account for this, the third argument to make-person specifies the average number of clock intervals that the person will wait before doing something (the restlessness factor).

Before we trigger the clock to simulate a game, let's explore the properties of our world a bit more.

First, let's create a sicp-textbook and place it in the computer-lab (where fredm and swathi now are):

 (define sicp-textbook (make&install-thing 'sicp-textbook computer-lab)) 

Next, we'll have fredm look around. She sees the textbook and swathi. The textbook looks useful, so we have fredm take it and leave.

 (ask fredm 'look-around) 
 At computer-lab : fredm says -- I see sicp-textbook swathi 
 (sicp-textbook swathi) 

 (ask fredm 'take sicp-textbook) 
 At computer-lab : fredm says -- I take sicp-textbook 
 #t 

 (ask fredm 'go 'south) 
 fredm moves from computer-lab to elevator-lobby 
 #t 

swathi had also noticed the manual; he follows fredm and snatches the textbook away. Angrily, fredm sulks off to the network-closet:

 (ask swathi 'go 'south) 
 swathi moves from computer-lab to elevator-lobby 
 At elevator-lobby : swathi says -- Hi fredm 
 #t 

 (ask swathi 'take sicp-textbook) 
 At elevator-lobby : fredm says -- I lose sicp-textbook 
 At elevator-lobby : fredm says -- Yaaaah! I am upset! 
 At elevator-lobby : swathi says -- I take sicp-textbook 
 #t 

 (ask fredm 'go 'west) 
 fredm moves from elevator-lobby to west-hall 
 #t 

 (ask fredm 'go 'south) 
 fredm moves from west-hall to network-closet 
 #t 

Unfortunately for fredm, beneath the network-closet is an inaccessible dungeon, inhabited by a troll named grendel. A troll is a kind of person; it can move around, take things, and so on. When a troll gets a move message from the clock, it acts just like an ordinary person—unless someone else is in the room. When grendel decides to act, it's game over for fredm:

 (ask grendel 'move) 
 grendel moves from dungeon to network-closet 
 At network-closet : grendel says -- Hi fredm 
 #t 

After a few more moves, grendel acts again:

 (ask grendel 'move) 
 At network-closet : grendel says -- Growl.... I'm going to eat you, fredm 
 At network-closet : fredm says -- 
                                  Dulce et decorum est 
                                  pro computatore mori! 
 fredm moves from network-closet to heaven 
 At network-closet : grendel says -- Chomp chomp. fredm tastes yummy! 
 *burp* 

Implementation

The simulator for the world is contained in two files. The first file, game.rkt, contains the basic object system, procedures to create people, places, things and trolls, together with various other useful procedures. The second file, world.rkt, contains code that initializes our particular imaginary world and installs fredmswathi, and grendel.

Download these files here as the assignment starter files. Load and evaluate the world file; this will load in the game file as well.



Assignment Download: ps7-assignment.tar.gz

07a - Environments warm-up

This is a warm-up for the rest of the problem set.

Problem 1: Exercise 3.1 on pp. 224. After writing and testing the code, draw the environment diagram that would result from evaluating the three statements in the exercise.

Problem 2: Exercise 3.2 on pp. 224-225. After writing and testing the code, draw the environment diagram that would result from evaluating the three statements in the exercise.

Problem 3: Exercise 3.3 on pp. 225, creating a password-protected bank account.

Problem 4: Exercise 3.4 on pp. 225, modifying it to keep track of incorrect password accesses.

Chapter: 08 - Streams

08 - Streams

Complete the problems in the ps8.rkt file.

It's a mixture of autograded programming problems and analysis-discussion problems.

See associated material in Section 3.5 of the course text.

Assignment Download: ps8-assignment.tar.gz

Chapter: 09 - Metacircular Evaluator

09 - Metacircular Interpreter

The Metacircular Evaluator

Overview

In this problem set, you’ll learn how to implement Scheme in Scheme—a “meta-circular evalator.”

We'll extend starter code with new features.

Reading

This material is based on the discussion in the book, Chapter 4.1, The Metacircular Evaluator.

The Code

To run the metacircular evaluator, use the pop-up menu in the lower left of the Racket screen to choose the R5RS language. Then evaluate the buffer containing mceval-with-let.ss


Note: we must use the R5RS language in order to get mutable cons cells, which are needed for the implementation of environments.

After evaluating the code buffer, evaluate (mc-eval-loop) in the REPL. This will run the interactions for your metacircular UML Scheme world. Remember that everything you type in (except for variables and numbers) should be prefixed by “uml:” – if you forget, the system will have an error.

You only need to turn in the portions of the code that you change.

Warm-up: Run the metacircular evaluator and evaluate some UML Scheme expressions. Nothing to turn in for this part.

Problem 1: Exercise 4.4 (“or” only) on p. 374. Remember to name your new “or” as “uml:or”. Make sure to implement short-circuiting!

Problem 2: Exercise 4.9 on p. 376. Pick one of the iteration constructs (doforwhile or until) to implement.

Submit

Your work will be manually graded by the TAs.

Submit two source files—one for each problem. The work associated with Problem 1 should be in a file named problem1.rkt, and the Problem 2 answers in problem2.rkt.

For all problems, make sure to all turn in evidence that your code works, and an explanation of what it does.

One-third of the credit will be for a correct implementation; 
one-third for a discussion of the implementation; and 
one-third for demonstrating that your code works.

Each file should contain:

For example, if you were to submit work for the uml:and function, you might turn in something like this.

Implementation and discussion of UML:AND 
This is the main code: 

(define (eval-and exp env)
  (define (iter clauses)
    (if (null? clauses)
	#t
	(if (false? (mc-eval (car clauses) env))
	    #f
	    (iter (cdr clauses)))))
  (iter (and-clauses exp)))

(define (and? exp) (tagged-list? exp 'uml:and))

(define (and-clauses exp) (cdr exp))
This works by iterating down the list of clauses provided to the AND expression. It recursively uses mc-eval to evaluate each clause in the order it appears in the list. If a clause evaluates to false, then the whole expression is considered false (short-circuiting the evaluation of any subsequent expressions).
The only way the whole AND expression evaluates to true is if every single clause evaluates to true. Then, when there are no clauses left (“(if (null? clauses) ... )”), the entire AND expression returns #t.
Also, the following is added to MC-EVAL, after the test for the if? expression: 
((and? exp) (eval-and exp env))
Evidence that it works
;;; MC-Eval input: (uml:and true)
;;; MC-Eval value: #t
; AND of a true input is true

;;; MC-Eval input: (uml:and false)
;;; MC-Eval value: #f
; AND of a false input is false

;;; MC-Eval input: (uml:and true true)
;;; MC-Eval value: #t
; AND of two true inputs is true

;;; MC-Eval input: (uml:and true false)
;;; MC-Eval value: #f
; AND of a true input and a false input is false

;;; MC-Eval input: (uml:define foo 1)
;;; MC-Eval value: ok
; we are going to define a variable to test short-circuiting

;;; MC-Eval input: (uml:and false (uml:begin (uml:set! foo 2) true))
;;; MC-Eval value: #f
; AND should have short-circuited, and not evaluated the BEGIN expression which would set FOO to 2

;;; MC-Eval input: foo
;;; MC-Eval value: 1
; FOO is still 1, because UML:AND short-circuited after evaluating the first input as FALSE !

;;; MC-Eval input: (uml:and true (uml:begin (uml:set! foo 2) true))
;;; MC-Eval value: #t
; no short-circuiting, so now FOO should be 2

;;; MC-Eval input: foo
;;; MC-Eval value: 2
; and it is!

Assignment Download: ps9-assignment.tar.gz

Chapter: 10 - Final Project

08 - Final Code Turn-In

You may collaborate on getting the shared material together, but the narrative explanation of how things work, and what you yourself did, must be done by each person.


Each person must submit the project code and narrative to get credit for the work.


After the project is complete, get all of the source files together.

The README.txt file should be in plain-text format. It should be anywhere from 100 to 500 lines long depending on how much there is to talk about.

Submit here by uploading the .tar.gz or .zip file.


07 - Project Web Page

In this assignment, you will document your OPL final project. This will be done on the class wiki site using a provided template.

There will be one page per project.

Each partner will separately turn in your code using Bottlenose.

Instructions for Project Flyer / Wiki Page

  1. Go to the Project page and click “Edit” to edit the Project page. Add your project title and name as a wiki link per the examples there. The edit password was given in class and is posted to the class Google group. Select a presentation slot based on the instructions in the page.
  2. Save the page.
  3. Click on the newly-created link to your project writeup.
  4. At that page, click edit.
  5. View the starter wiki markup text at http://www.cs.uml.edu/ecg/uploads/OPLfall14/fp-template.txt.
  6. Copy all of the text: Select All and Copy.
  7. Paste the wiki markup-text into your project writeup page, and Save.

You now have the framework for documentation your project. You can re-edit your page as often as you like. Follow the directions in the template for uploading your screen shot.

Note: nothing gets submitted to Bottlenose.

EVERYTHING IS DUE AT 8 AM ON MONDAY DECEMBER 8!

06 - Second Deliverable

Please turn in work that has been completed by this date.

Please prepare a brief discussion of what's been accomplished and what the next steps are.

Make sure to explain what you particularly have done.

Please include in your submission:
  • What you said would be accomplished at this point from your proposal.
  • Code that is written (even if it's not working) — links to code on repositories are fine.
  • Any diagrams or notes that you've made.
  • An index to each submitted item (or logical group of submitted items) -- just one sentence.
This should not take too long. Please don't spend more than 20 to 30 minutes getting your work together.

Important notes:
  • Each member of a team is expected to submit a report.
  • It is better to submit something on time than wait for more later. Just tell me where you are when this assignment is due.

04 - Final Project Proposal

In this assignment, you will produce a plan for your final project and an in-class presentation on Friday November 14.


Each team member must submit a separate proposal. You will jointly prepare 2 to 3 slides as well (see end of this assignment for more on that).

Important
  • Use of languages other than Scheme / Racket not allowed without prior written (email) permission.
  • Teams of more than 2 people not allowed without prior written permission.
  • "Teams" of fewer than 2 people not allowed without prior written permission.

On your PDF submission, provide your name first, and your partner's name second.

The two partners' submissions may be the same, except for the section Work Plan / Schedule, where "What I will do" and "What my partner will do" should be reversed in the two submissions.

Below is a detailed description of the proposal document.

To submit, upload a PDF only with your real name + "_fpp" as the root filename.


Guidelines


The final project is worth 25% of your overall class grade. This proposal document is part of this—so I'd like a significant effort on the proposal itself. 

As we discussed, here are the things that will make a high-quality project:


The Proposal
The proposal itself is a written document that explains what you are going to do. It should have the following sections:
  • Project title. No more than ten words. Really.
  • Problem statement. What is the problem and why is it interesting?
  • Problem analysis. Explain what approaches from the class you will bring to bear on the problem. Be explicit.
  • Data set or other source materials. If you will be working from existing data, where will you get the data (e.g., will you download it from a web site, will you create it via a simulation that you build, etc.)? How will you convert it into a form that is usable for your project? Do your homework here: if you are pulling a data set off the web, actually download it and look at it. Explain in some detail your plan for accomplishing the necessary data processing.
If you are using some other starting materials, explain what they are.
  • Deliverable and Demonstration. What exactly will you produce by the end of the project? Of course, there will be a piece of software, but what will it do? Is it a batch-mode kind of thing, and you will present some analytical results? If so, how would your program be re-run on different source data?
Will your program be interactive, and you can show it at work? There will be a demonstration, so interactive/live programs will be good.
Explain exactly what you'll have at the end.
  • Evaluation of results. How will you know if you are successful? It would be wonderful if this included some kind of quantitative analysis.
  • Work Plan/Schedule. Explain how you will go from proposal to finished product. Explicitly define three deliverables, due on Mon 11/24 (first deliverable), Mon 12/1 (second deliverable), and Mon 12/8 (final project). The nature of the deliverables are project-dependent, but they could include things like processed data ready for import into your program, core implementation of the algorithm, and design of interface/presentation side of the project. You will be expected to turn in code/documentation/data (as appropriate) at each of the three stages, so put concrete steps into your schedule. Include two columns – "What I will do" and "What my partner will do."

In short: You should be proposing something that you have high confidence that you can achieve, and the proposal should project that confidence.

The proposal should be no longer than necessary, but long enough to include critical detail. Three pages is appropriate. Diagrams are welcome.

In-Class Presentation

Create a two- to three-slide presentation of your idea which you will present in class on the same day that the written proposal is due.

You will have two minutes.

Add your material to the Google Presentations slide deck indicated here: https://docs.google.com/presentation/d/1WbGWM4bOMBd-i8lNFK5rxs_H7gd0fo4ro0dy0oiLioY/edit?usp=sharing

Assignment Download: fpp-grading.tar.gz

02 - Final Project Exploration #2

Note: the FPE will not be accepted late. The whole point of it is to do it in advance of your project itself.

Note #2: This is an individual assignment. If you already know who you'll be working with for your project, that's fine, but do the write-up for this assignment on your own.

In this exercise, you will play with at least one library provided by the Racket developers. 

Please choose libraries that you think you might be interested in using in your final project.

Please choose a different library (or libraries) than the one(s) you explored in FPE1.

Start off at the Racket home page, http://racket-lang.org/, and then click on the Documentation link, taking you here: http://docs.racket-lang.org/.

There are lots of libraries. Play with one.

Your job is to explore one library and write up your results. Load the library and write some code to drive it around.

To turn in: 

You should turn in a single PDF file that contains:

The narrative itself should be no longer than 350 words.

The whole document may be several pages depending on the length of your code and whether you include diagrams. Two pages is fine. 

Details:

The autograder will assign you a score of 0, until your work is manually reviewed.

Reminder again: please think about what you might want to work on for your final project, and choose a relevant library to work with.

03 - Team or Interest Declaration

Please note: this assignment must be done on time to receive credit.

In this assignment, you are to either form your team, or declare your interests.


If you have a team:

In order to form your team, you must have:
  • a teammate
  • a project concept
  • a project title (10 words or fewer)
Also, you must know:
  • which library or libraries you plan to use in your project
  • which library or libraries your teammate plans to use
Then, you and your teammate should jointly fill out this form: https://docs.google.com/forms/d/1nbnSGOCFalFm725jCDltjhMoGEm8wCtHj_jmFHGC408/viewform

If you don't have a team:

Then you should individually fill out the following form, which will ask you for:
  • your name
  • your contact details
  • what project ideas you're interested in
  • what you did for FPE1 and FPE2
  • when you're available for team meetings
This info will be available to the class.

Fill out this form: https://docs.google.com/forms/d/1oLqt6kyn7_ECdWBwit9-KhaeX-V8OFhckxX7kXeiXX8/viewform


In either case, there's nothing to turn into Bottlenose. Just do one or the other form.

05 - First Deliverable

Please turn in work that has been completed by this date.

Please prepare a brief discussion of what's been accomplished and what the next steps are.

Make sure to explain what you particularly have done.

Please include in your submission:
  • What you said would be accomplished at this point from your proposal.
  • Code that is written (even if it's not working) — links to code on repositories are fine.
  • Any diagrams or notes that you've made.
  • An index to each submitted item (or logical group of submitted items) -- just one sentence.
This should not take too long. Please don't spend more than 20 to 30 minutes getting your work together.

Important notes:
  • Each member of a team is expected to submit a report.
  • It is better to submit something on time than wait for more later. Just tell me where you are when this assignment is due.

01 - Final Project Exploration #1

Note: the FPE will not be accepted late. The whole point of it is to do it in advance of your project itself.

In this exercise, you will play with at least one library provided by the Racket developers. You will have the opportunity to explore another library later.

Please choose libraries that you think you might be interested in using in your final project.

Start off at the Racket home page, http://racket-lang.org/, and then click on the Documentation link, taking you here: http://docs.racket-lang.org/.

There are lots of libraries. Play with one.

Your job is to explore one library and write up your results. Load the library and write some code to drive it around.

For example, maybe you are interested in retrieving data from the web. If we look at the net/url library, we will find functions for creating URLs, issuing HTTP GET commands, and displaying the results. Here is a little bit of code for driving around a few of the functions in this library:


#lang racket

(require net/url)

(define myurl (string->url "http://www.cs.uml.edu/"))
(define myport (get-pure-port myurl))
(display-pure-port myport)

Notice that (require net/url) is all you need to put in your buffer in order to load the library and start using it.

This above is a trivial example; to complete this for the purposes of this assignment (if you go down the path of pulling HTTP requests), you should use the parsing libraries to parse the HTML, JSON, or XML that is returned.

To turn in: 

Present your work in a single PDF file. The PDF should contain:

The narrative itself should be no longer than 350 words.

The whole document may be several pages depending on the length of your code and whether you include diagrams. Two pages is fine. 

On collaboration:

This is an individual assignment. The exploration and writeup is to be done individually.

While it is not expected at this point in the course, you may already be have selected a project partner.

If so, and you have a tentative project concept, you and your partner should each explore different things, both potentially related to the project.

Details:

The autograder will assign you a score of 0, until your work is manually reviewed.

Reminder again: please think about what you might want to work on for your final project, and choose a relevant library to work with.

Chapter: 11 - Exams

Exam 02

Here is a histogram of the scores, including approximate grading range.

Exam 2 Results 

Exam 01