EBoard 05: Primitive types
This class will be recorded! Its use is limited to members of the
class. Please do not share with others.
Approximate overview
- Administrative stuff [~10 min]
- Tracing examples [~5 min]
- Q&A [~10 min]
- Quiz [~5 min]
- Lab [~60 min]
Administrative stuff
Notes and News
- Evening tutoring will be available 3-5 p.m. Sundays and 8-10 p.m.
Sundays through Thursdays in the tutoring channel on the CS team.
- At the point I wrote this, our (US) election was still up in the air.
It may still be. (Yup.) I assume in any case, it is generating anxiety.
- The College has sent out a list of resources. Let me know if you
need a copy.
- If you find that you can’t get work done, let me know and I’ll
adjust appropriately (no tokens required).
- I set up a channel for folks “Far away from Grinnell” to make it easier for
you to ask questions of each other in “off hours” for us (and “on hours” for
you). I’d recommend that you follow the channel so that you can more easily
ask questions of each other.
- I got my new overly-fancy Webcam from ITS, which I’ve place on my
upper monitor. Other than it being easier to see how bald I’m
getting and the mess on my floor, do you notice any difference?
- Thank you to students for the great questions on curves and roots
and other issues in the Q&A channel.
- For those who are unable to share your screen, please check the
version of Teams you are using (Teams -> About Microsoft Teams)
and DM it to me.
- I seem to have magically switched to
Microsoft Teams Version 1.3.00.28778. It was last updated on 11/3/20.
- Has anyone else started thinking about “A Side” as “aside” and
“B side” as “beside”?
Upcoming activities
- Noon, Thursday: Convocation! (+1 token)
- 5pm, Thursday: Learn about the CS major (+1 token)
- Noon, Friday, Strengthening Community in Extraordinary times (+1 token)
Why attend Scholars’ Convocation
- Individually advised curriculum has advantages
- Individually advised curriculum has disadvantages
- Almost no common (academic) experiences
- George Drake created Scholars Convocation as a common academic
experience
- So participate in it.
- See similar details at https://rebelsky.cs.grinnell.edu/musings/convocation.
Upcoming work
I’ll try to include this list of upcoming work each day. Your colleagues
have created a Discord Channel that they will demo for you.
- Reading writeup for today
(due 8:00 a.m. this morning; a few minutes ago!)
- Mini-project 1
(due tonight at 10:30 p.m. CST)
- Writeup for lab on procedures from yesterday
(due Thurday 8:00 a.m. on Gradescope; ideally before the end of class today)
- Writeup for lab on basic types
(due Thursday 8:00 a.m. on Gradescope; ideally before the end of class today)
- Readings for Thursday
(responses to questions due Thursday 8 a.m. on Gradescope)
- Tomorrow’s quiz: Basic types or functions (or both)
Attendance
- Our wonderful mentors will take attendance by looking at the the list
of also-wonderful people here.
Tracing examples
Reminder:
- Evaluate inside-out (often left-to-right)
- For procedure evaluation, replace inputs (“formal parameters”) by the
arguments (“actual parameters”) in the body, then evaluate the body.
Examples
(define fun
(lambda (x)
(+ (sqr x) (/ x 2))))
; (fun (* 2 (+ 1 3)))
; --> (fun (* 2 4))
; --> (fun 8)
; --> (+ (sqr 8) (/ 8 2))
; --> (+ (sqr 8) (/ 8 2))
; --> (+ 64 (/ 8 2))
; --> (+ 64 4)
; --> 68
Q&A
What are the colors of the rainbow starship?
Rainbow colors: red, orange, yellow, green, blue, indigo, violet (ROYGBIV)
Rainbow colors: red, orange, yellow, green, blue, violet
Why would you use Unicode?
Because there are more languages than English.
i18n; internationalization
It’s fun. There are Unicode characters for Klingon!
We use an encoding because, at the root, computers just store numbers
(0’s and 1’s, which we interpret as numbers).
Uniformity.
If I have questions on my grading, what should I do?
Chat with Sam.
Is there a logic to where things are in ASCII or Unicode?
Space is 00100000 in binary.
Logic of computer scientists in the 1950’s.
Why do we write ‘(85) for “the list that contains the value 85”?
To distinguish it from “apply the procedure named 85”.
> (define f
(lambda (x)
(* 2 x)))
> (list f)
'(#<procedure:f>)
> (list 'f)
'(f)
> (list "f")
'("f")
Quiz
Cancelled
- Bring up readings in your browser.
- (Don’t bother opening DrRacket.)
- Go to the Quiz in Gradescope.
- Five minutes (more or less).
Lab
Same pairs as yesterday. Let’s hope that Sam saved those pairs.
Thirty minutes on yesterday’s lab. Fifteen on A side. Fifteen
on B side.
- Please set up your groups in the “Lab Sessions” channel.
- Please name your groups as designated below.
- Sam (well, Sam using a computer program he wrote) assigns groups.
- First person in the group goes to the Lab Sessions channel, clicks
the camera (or something equivalent) and then “Meet Now”.
Please get the channel right. We won’t see you in other channels.
- Add a subject. “Group #: Names”, such as “Group 1: SamR & JohnG”
Please get the group name right. It makes it much easier for us.
- Click “Meet Now”.
- Invite the other members of the group.
- Other members of the group join. (Today, you can start discussions once
you have two in the group. Generally, you’ll wait until everyone is there.)
- Discuss/work/whatever.
Debrief
Perhaps we’ll have time today.