CS 200 - Fall 2023. 11/06/2023.


[Home]

Welcome to CS 200!

Video of the day

Regulation Framework for ChatGPT Vint Cerf.
The keynote speech by Vint Cerf addresses the arrival of large-scale language models such as GPT-3 and the risks associated with the use of machine learning. Cerf notes that machine learning is a narrower kind of intelligence that uses multi-layer neural networks, which were previously discounted in the 1960s as inadequate. However, over the last decade or so, they have become extremely powerful in their functionality. Cerf points out that there are risks associated with the use of machine learning, and these risks can be categorized similarly to the risks associated with self-driving cars. Cerf suggests that low-risk applications of machine learning include making suggestions to users, while high-risk applications include medical diagnosis and automated surgery. Cerf notes that one of the challenges associated with machine learning is the inability to predict or anticipate how the system might go off the rails.

Cerf mentions self-driving car levels.

ELIZA was a conversational natural language program from the 1960's. The emacs text editor (used by yours truly) includes ELIZA, invoked by meta-x doctor. PARRY was another natural language program from the 1970's, built by psychiatrist Kenneth Colby to simulare a paranoid schizophrenic patient.

Vint Cerf decided to have them talk to each other, and published the result as an Internet Request for Comments (RFC). Broadly speaking, RFCs document the underlying technology and development of the Internet. See RFC 439: PARRY Encounters the DOCTOR.

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

If a bat and a ball together cost $1.10, and the bat costs a dollar more than the ball, how much does the ball cost ?

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

The formation and revision of intuitions, Meyer and Frederick. Cognition, Volume 240, November 2023. Shane Frederick is a Professor of Marketing at the Yale School of Management.

Lecture 18: UNIX / Computer Architecture.

Administrivia

  • I have Office hours via zoom, meeting ID 459 434 2854. Wednesday 4-6pm.

  • ULA office hours posted on csofficehours.org. See the posting on Ed Discussions for more information.

  • Homework assignments: [Assignments]. hw5 is available. Extension to Monday November 13th. You will submit with gradescope.

  • Book recommendations: You are not expected to understand this Online copy from the Yale Library. Tells lots of stories about computer science. Very easy to read.

  • The Ethics of AI, by Luciano Floridi. See online book at Yale.

  • Kollected Kode Vicious, George Neville-Neil. Inciteful and practical programming advice, from column in CACM. (George is now a PhD student in Yale CS Department.)

    Midterm Exam II: Thursday November 9th, 7pm

  • Midterm exam Thursday November 9th, 7pm, WLH 207. As with the first midterm, the accessibility exam room will be WLH 211.

    The second midterm will similar to the first. You will have 2 hours. Here is a sample midterm exam. (solutions) There will also be a question on data structures. For decorators, there will be a wraps question.

    There will be a UNIX question, as in the first midterm. Here is a sample UNIX transcript (solutions) UNIX will cover through principle 4.

    The CS 201 midterm review slides cover UNIX.

    Computer Architecture

    Python ~ (invert) unary operator implements two's complement.

    PVM.html jupyter notebook - Python Virtual Machine and hw5.

    The current version of Python, 3.11, generates some new byte codes that were not part of previous versions. I have added definitions for these op codes to hw5.py. See dis.html which includes bytecodes new in 3.11.

  • bytecode.py
  • pvm.py
  • Bytecode API
          classBinaryOp
    Enum for the argument of the BINARY_OP instruction (3.11+).
    
    Arithmetic operations
    
    BinaryOp.ADD (0): x + y BinaryOp.SUBTRACT (10): x - y
    BinaryOp.MULTIPLY (5): x * y BinaryOp.TRUE_DIVIDE (11): x / y
    BinaryOp.FLOOR_DIVIDE (2): x // y BinaryOp.REMAINDER (6): x % y
    BinaryOp.MATRIX_MULTIPLY (4): x @ y BinaryOp.POWER (8): x ** y
    
    Logical and binary operations
    
    BinaryOp.LSHIFT (3): x << y BinaryOp.RSHIFT (9): x >> y BinaryOp.AND
    (1): x & y BinaryOp.OR (7): x | y BinaryOp.XOR (12): x ^ y
    
    Inplace operations:
    
    BinaryOp.INPLACE_ADD (13): x += y BinaryOp.INPLACE_SUBTRACT (23): x -=
    y BinaryOp.INPLACE_MULTIPLY (18): x *= y BinaryOp.INPLACE_TRUE_DIVIDE
    (24): x /= y BinaryOp.INPLACE_FLOOR_DIVIDE (15): x //= y
    BinaryOp.INPLACE_REMAINDER (19): x %= y
    BinaryOp.INPLACE_MATRIX_MULTIPLY (17): x @= y BinaryOp.INPLACE_POWER
    (21): x **= y BinaryOp.INPLACE_LSHIFT (16): x <<= y
    BinaryOp.INPLACE_RSHIFT (22): x >>= y BinaryOp.INPLACE_AND (14): x &=
    y BinaryOp.INPLACE_OR (20): x |= y BinaryOp.INPLACE_XOR (25): x ^= y
    	  
    See updated BINARY_OP and SYMBOLS in hw5.py.

  • Iterators.html

    Getting to know UNIX

    UNIX Introduction Principle 4.
    [Home]