"Programming" in PAPL

279 views
Skip to first unread message

Danil Braun

unread,
Sep 5, 2020, 7:16:05 AM9/5/20
to Pyret Discuss
Hello,

https://papl.cs.brown.edu/2019/Introduction.html
One book is an introduction to programming, teaching you basic concepts of organizing data and the programs that operate over them, ending in the investigation of universally useful algorithms.

So what exactly chapters correspond to this --- "introduction to programming" --- half of the book? I'd also like to tell my high-school students about variables (vs. identifiers), for and while loops, I/O via Python because of our CS curriculum and exam. Can I cover these "imperative" topics with Pyret and not resort to Python? If so, what chapters can help me with this? And if not, what a way would you recommend for such a transfer?

Shriram Krishnamurthi

unread,
Sep 5, 2020, 8:00:24 AM9/5/20
to pyret-...@googlegroups.com, Kathi Fisler
Hi Danil,

The "Programming" part ends at (currently) Chapter 22, "Algorithms That Exploit State". After that the PL part begins.

Variables are already in that part: Chapter 21, "State, Change, and More Equality". For instance, see 21.4, "From Identifiers to Variables"https://papl.cs.brown.edu/2020/State__Change__and_More_Equality.html#%28part._mutable-variables%29. In fact, you can cover these topics in Pyret itself: e.g., this is a perfectly legal program:

var x = 0

for each(i from range(1, 11)): # i is 1, 2, …, 10
  x := x + i
end

# confirm the result the old-fashioned way (-:
print(x) # prints 55

# confirm the result the Pyret way
check:
  x is 55
end

However, perhaps an even better guide for you would be the materials that Kathi Fisler has developed for her course CSCI 0111 at Brown. This transitions from a prefix of the P part of PAPL to Python.

I'm CCing Kathi hoping she can weigh in here.

Shriram

Kathi Fisler

unread,
Sep 6, 2020, 7:04:43 PM9/6/20
to Shriram Krishnamurthi, pyret-...@googlegroups.com
Hi Danil,

As Shriram mentioned, my college-intro starts in Pyret and then transitions to Python when we get to state and loops. You can find all of the course materials (including at least outlines of lecture notes) on the course website (this is the version from Spring 2020). You could make the transition to Python after doing lists in Pyret (you don't have to get to trees).

You could cover imperative variables in Pyret. The available looping structures are akin to per-element iterators (as in Java, if you've used that). I switch to Python, however, since I think that better suits the needs of my students and what they want to do after taking my course.

I'm in the process of converting the notes into more of a textbook form (replacing the first-half of PAPL), but I estimate it will take at least through this semester for me to finish that up.

Happy to answer any questions.

Kathi

Danil Braun

unread,
Sep 15, 2020, 12:32:06 PM9/15/20
to Pyret Discuss
Thanks for answering!

Kathi, aren't video lectures publicly available? 

Shriram, it seems to me that there is too little exercises in PAPL (unlike HtDP), do you plan to add some more?

понедельник, 7 сентября 2020 г. в 04:04:43 UTC+5, Kathi Fisler:

Shriram Krishnamurthi

unread,
Sep 15, 2020, 12:40:12 PM9/15/20
to pyret-...@googlegroups.com
Part of the reason is that the exercises are all on the Web from my course (ditto from Kathi's 0111): e.g.,


(A handful of assignments from prior years have been dropped; each year has its own permalink.)

I know this isn't optimal, but there's at least something there. (-:

Danil Braun

unread,
Sep 16, 2020, 10:52:10 AM9/16/20
to Pyret Discuss
 the exercises are all on the Web from my course

May I pick up some of them for my course? I also wanted to ask about licenses, because I want to translate PAPL into Russian. Everything is clear about Bootstrap, but under what license is PAPL distributed?

вторник, 15 сентября 2020 г. в 21:40:12 UTC+5, Shriram Krishnamurthi:

Shriram Krishnamurthi

unread,
Oct 4, 2020, 10:13:26 AM10/4/20
to pyret-...@googlegroups.com
Sorry for the delay. This has been a … packed semester.

Yes, of course, you may pick up anything you like. Please consider everything (course Web content, book, etc.) to be CC BY-NC-SA, and if you need a different license, talk to me about it.

As for a translation: wow! That would be awesome, but wait a while. Kathi Fisler is currently adding chapters at a good clip to cover the Data-Centric material. I have also developed a bunch of new material that I think would make for very nice "interludes"; right now I have them sitting as rough notes in a Google Doc, but I can transcribe them once my semester is over (even during winter break). We also want to split PAPL, truncating off the PL parts, and focusing on the P part as a book for Data-Centric Introduction to Computing.

With all four of us (Kathi, Joe, Ben, and I) teaching right now, all we can do is keep up with producing new content. I think all these high-level structural changes will have to wait until winter break. But if there is real interest, that would help spur us to action over break.

Finally, I am curious whether your students have any English skills at all, and how bad things are if you just use something like Google Translate. (Just to be clear, I do speak several languages other than English, so I know what it's like to read GT prose vs real, native prose!) Translating the book would be quite a task, especially with all the new material we're writing, and the problem with new material is that it takes a few iterations to settle and become good, which means it will require several rounds of revision.

Shriram

Danil Braun

unread,
Oct 11, 2020, 10:02:13 AM10/11/20
to Pyret Discuss
Please consider everything (course Web content, book, etc.) to be CC BY-NC-SA

OK, thanks.


As for a translation: wow! That would be awesome, but wait a while. Kathi Fisler is currently adding chapters at a good clip to cover the Data-Centric material. I have also developed a bunch of new material that I think would make for very nice "interludes"; right now I have them sitting as rough notes in a Google Doc, but I can transcribe them once my semester is over (even during winter break). We also want to split PAPL, truncating off the PL parts, and focusing on the P part as a book for Data-Centric Introduction to Computing.

What I'm doing right now for my high-schoolers is not an exact translation of the book, but rather notes like these: http://cs.brown.edu/courses/csci0050/2019/Lectures/tables-intro.html. And now I'm using 2019 version as a source.

Finally, I am curious whether your students have any English skills at all

There is one  (out of six) who can read PAPL in English with some effort. The main difficulty for them, it seems to me, lies in the fact that English is not their native language (as it is for me). Therefore, they perceive keywords like if, else, cases, fun, sieve, and so on in a completely different way than your students, for (many of?) whom this language is native.


, and how bad things are if you just use something like Google Translate. (Just to be clear, I do speak several languages other than English, so I know what it's like to read GT prose vs real, native prose!) Translating the book would be quite a task, especially with all the new material we're writing, and the problem with new material is that it takes a few iterations to settle and become good, which means it will require several rounds of revision.

I would be grateful if someone who speaks both Russian and English well enough will take a look at the translation and make their comments and assess the adequacy of the translation. If there are any, I can give them a link to the git repository with the translation. I have already written to Andrey Miskov — https://twitter.com/andreymiskov/status/1292547195107975169 —, he read the few chapters that are already done, and was satisfied.
воскресенье, 4 октября 2020 г. в 19:13:26 UTC+5, Shriram Krishnamurthi:

Shriram Krishnamurthi

unread,
Dec 20, 2020, 9:49:25 PM12/20/20
to pyret-...@googlegroups.com
Hi Danil — Just wondering how this experience went this semester!

Danil Braun

unread,
Jan 7, 2021, 5:36:34 PM1/7/21
to Pyret Discuss
>Hi Danil — Just wondering how this experience went this semester!

Hi, I would say that the results are rather pleasing to me. We managed to get
to the Processing Lists chapter, which turned out to be the most difficult so
far. The most difficult was the concept of the accumulator. In the next quarter
(1/2 semester), we will go over this chapter again, I think. We need to solve
even more problems for a more confident understanding.

And I also look forward to your notes on those cs019 lectures that are related
to other topics in CS.
понедельник, 21 декабря 2020 г. в 07:49:25 UTC+5, Shriram Krishnamurthi:
Reply all
Reply to author
Forward
0 new messages