CS 201 - Fall 2024.


[Home]

Welcome to CS 201! 09/16/2024

Video of the Day

Mariachi Nuevo Tecalitlán / Cielito Lindo submitted by Sophia Calderon Monarrez
This Monday we celebrate the Mexican Independence Day, and the song is “Cielito Lindo,” a Mexican traditional song interpreted by Mariachi.

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: Racket / UNIX.

Administrivia

  • If you have an upcoming performance or athletic event, I am happy to promote it during class. Just send me a note.

  • Yale Information Society Project Free lunch. See "About | Mailing Lists" See ISP email today.

  • There was a typo in the syllabus for the email address for the SAS coordinator. The correct address is cpscaccommodatedexams@yale.edu.

  • I am available for lunch on Mondays at noon at the Franklin College Dining Hall.

  • I have office hours Wednesdays from 4-6 pm, on zoom, id 459 434 2854. No office hours Wednesday 9/18. Rescheduled to Friday 9/20 1:30-3:30pm.

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

  • Homework assignments: [Assignments]. We will discuss hw1. hw2 is now available.

    Racket.

    Review hw1 - sorted? Note: use (runtests) to check your code.

    TailRecursion.html (jupyter) Default arguments (need for hw1 sorted? and inflate) also let for iterate and others

    Recursion.html (jupyter) deep recursion

    Memoization.html (jupyter)

    Getting to know UNIX

    UNIX Principle 1 . and ..
    [Home]