CS 201 - Spring 2025. 1/31/2025.


[Home]

Welcome to CS 201!

Video of the Day

In C, Terry Riley. See In C wiki. Radiolab In C from 2009.

I hereby solicit suggestions for the video of the day. Please email me your ideas with explanations. Selected entries will win 5 homework points. If your video is played at the beginning of class, you must also briefly explain something about the video and something about yourself - in person.

Logical problem of the day

All cards have letters on one side and numbers on the other. You see four cards showing the signs or symbols A, K, 4, and 7 on the front side of the cards. The experimenter claims: “If there is a vowel on one side of the card, then there is an even number on the other side.”

The experimenter then asks: “Which card(s) must be turned over to check whether the rule applies? "

https://pollev.com/slade You may also download the app to your phone. Use the "slade" poll id.

Top Ten Reasons to Learn Racket!

Number 4: It looks good on your resume, as a second order effect. Most employers are not looking for people who code in racket, but those who themselves learned racket will appreciate the intellectual challenges you faced and will likely value you more, creating a better work experience. (Story about Francesca and Google.)

I installed the AI search engine, Perplexity, and asked it about the reasons to use racket. Check it.

Racket offers several advantages over other programming languages:

1. **Language-Oriented Programming (LOP)**: Racket is ideal for LOP due to its powerful macro system, which allows programmers to create entirely new programming languages and make compiler-style code transformations easily[5].

2. **Extensive Macro System**: Racket's macro system is better than any other, making it easier to create embedded language constructs and perform code transformations, providing a significant boost to programming productivity[5].

3. **Platform for Language Design and Implementation**: Racket is designed as a platform for programming language design and implementation, allowing programmers to define their own loops with powerful macros and make entire domain-specific languages as libraries[2][4].

4. **Support for Higher-Order Software Contracts and Safe Gradual Typing**: Racket is the first language to support higher-order software contracts and safe gradual typing, allowing programmers to combine functional with object-oriented components as needed[2].

5. **Ease of Creating New Languages**: Racket allows programmers to create new languages on the fly without the need for external tools or setup, making it a versatile choice for applications that require multiple languages[2].

In summary, Racket's strengths lie in its support for language design, powerful macro system, and the ease with which new languages can be created, making it a compelling choice for programmers looking to explore language-oriented programming and create domain-specific languages.

Sources

[1] Why Language-Oriented Programming? Why Racket? https://news.ycombinator.com/item?id=19232068

[2] Racket https://racket-lang.org/

[3] Reasons to learn Racket https://www.reddit.com/r/Racket/comments/pw4mc1/reasons_to_learn_racket/

[4] Racket (programming language) - Wikipedia https://en.wikipedia.org/wiki/Racket_(programming_language)

[5] Beautiful Racket: Why language-oriented programming? Why Racket? https://beautifulracket.com/appendix/why-lop-why-racket.html (Note: you can make your own programming language in one hour.)

By Perplexity at https://www.perplexity.ai/

Canvas Quiz of the Day (need daily password)

Most days, there will be a simple canvas quiz related to the lecture. You need a password to activate the quiz, which I will provide in class. These quizzes will count toward your class participation grade. The quiz is available only during class.

Click for today's quiz.

Note: the collaboration quiz is separate. It coincides with the first homework assignment.

Lecture 8: Recursion.

  • I have office hours Wednesdays from 4-6 pm, on zoom, id 459 434 2854.

  • I am available for lunch on Mondays at 1 pm in Morse.

  • ULA office hours are found at https://csofficehours.org/CS201/schedule. Sign up via the queue.

  • Homework assignments: [Assignments]. hw1 is now available. Note: I have listed provisional due dates for all assignments. The name of your homework file submitted to gradescope must be exactly the same as the assignment file, e.g., hw0.rkt, hw1.rkt. Otherwise, zippo.

    Announcements

  • Information Society Project Yale Law School. Weekly Events

    Racket.

    hw1 overview

    Recursion.html (jupyter) deep recursion.

    TailRecursion.html (jupyter) tail recursion + let and optional arguments.

    Getting to know UNIX

    UNIX Introduction Principle 2.
    [Home]