1
play

1 Uh oh Some terminology A programming language is A program is - PDF document

A puzzle Back up. What is a program? Suppose you want to run lots of JavaScript programs-- all the cool kids are doing it, but unfortunately you have a computer that can only execute x86 assembly. So you decide to write a compiler from


  1. A puzzle … Back up. What is a program? Suppose you want to run lots of JavaScript programs-- all the cool kids are doing it, but unfortunately you have a computer that can only execute x86 assembly. So you decide to write a compiler from JavaScript to x86 assembly . Furthermore, suppose that you think Scala is the best language for writing a compiler; you find the language has particularly effective constructs for implementing compilers. Unfortunately, your computer only has a C to x86 compiler . You know that you can write an awesome compiler in Scala that produces efficient x86 code, but you're not so sure you can write an efficient compiler in C. What do you do? 1 2 How do you use a program? How do you run a program? 3 4 What is compilation? What is an interpreter? 5 6 1

  2. Uh oh … Some terminology • A programming language is • A program is 7 8 An analogy: A cooking recipe Syntax and semantics: An analogy 9 10 Meta Language and Object Language Interpreter 11 12 2

  3. Compiler Back to the puzzle … • What do we have? 13 14 Step 0 Step 1 15 16 Step 2 Step 3 17 18 3

  4. Step 4 Step 5 19 20 Getting to Know You: “I, …, wonder …” Principles of Programming Languages Prof. Evan Chang Meeting 1: Welcome, CSCI 3155, Spring 2014 22 Distraction-Free Classroom Distraction-Free Classroom • Let’s turn off our cell phones and wi-fi • Laptop users, please sit in the back rows, on the sides … just imagine that we have class at 30,000 feet 23 24 4

  5. Introductions Introductions: Your guide this semester • Introduce yourself to someone you haven’t met before. [credit Boulder New Tech Meetup] • Two minutes! • Office hours: T 10:45am-11:45am, R 2pm-3pm, or drop by ECOT 621 25 26 Introductions: Other guides Instruction Philosophy • Do you drive? David Johnson Alok Joshi 27 28 Who is the better instructor? Who is the better instructor? Instructor Pass Rate on Instructor Pass Rate on Accident Rate in Driver’s Test Driver’s Test Next Year #1 98% #1 98% 20% #2 88% #2 88% 0.1% Instructor #1 focuses on the exam, while instructor #2 focuses on the ideas and skills the student needs for the future. 29 30 5

  6. Focusing on guiding towards Discussion, discussion, discussion understanding … subset of • Project-based course: Build a JavaScript • Discussion, not lecture interpreter – Only meeting I will use slides – Incrementally in 6 two-week projects • Please interrupt at any time! – Two weeks of discussion towards completing • It’s completely ok to say: the lab, driven by you (in class + on Piazza)! – I don’t understand. Please say it another way. – Fridays are lab sessions—bring a laptop – Slow down! – Labs due Friday Saturday • Course is project-based – No late labs but generous “redo” policy and drop lowest – Lab assignments prompt the discussion – Expectation on you to be active 31 32 Oath Introductions: About you? • What do you want to get out of this class? 33 34 What do you want to get out of this class? Getting Your Money’s Worth Why Study PL? 35 6

  7. “Isn’t PL ancient history?” Don’t we have enough prog. languages? • PL is an old field within Computer Science • 1920’s: “computer” = “person” • 1936: Church’s Lambda Calculus (= PL!) ‏ • 1937: Shannon’s digital circuit design • 1940’s: first digital computers • 1950’s: FORTRAN (= PL!) ‏ • 1958: LISP (= PL!) ‏ • 1960’s: Unix • 1972: C Programming Language • 1981: TCP/IP • 1985: Microsoft Windows 37 38 A Dismal View of PL Not quite a trip to the zoo … Java Ruby ‏ Not a history course 39 40 More like a study of anatomy … So Why Study PL? 41 7

  8. “I like Ruby. Isn’t that enough?” What PLs do you know? 43 44 What PLs do you know? TIOBE Language Popularity Index 45 46 http://www.tiobe.com/tiobe_index/ TIOBE Language Popularity Index Jobs! http://blog.timbunce.org/ 47 2008/02/12/ 48 comparative-language-job-trend-graphs/ 8

  9. Increase ability to learn new languages Have you ever had to pick a language? • You will need to learn many languages during your careers. • You will learn concepts that make it easier for you to learn new languages in this class. 49 50 Improve background for choosing an Have you ever had to pick a language? appropriate language 51 52 Have you heard of MapReduce? Have you heard of MapReduce? … inspired by ideas from PL theory 53 54 9

  10. Get new ways of viewing computation Get new ways of viewing programs and approaching algorithmic problems • What is a program? How it executes, right? 55 56 Better understanding of the Other Reasons? significance of implementation 57 58 Other Reasons? How? 59 10

  11. Build interpreters for JavaScript in A convenient language for language tools (compilers, interpreters, Requirements • Never heard of it? etc.) 61 Prerequisites Assignments • CSCI 2270 (CS2: Data Structures) • Labs (30%) • CSCI 2824 (Discrete Structures) • Quizzes (20%), Midterm (20%), Final (25%) • [CSCI 2400 (Computer Systems)] • Participation (5%) and Reading • Proficiency in programming and ready to pick up new languages quickly. – trees, recursion, induction, stack+heap • If you have not satisfied the prerequisites or have any concerns, please see me. 63 64 Reading, Participation, Extra Credit Online Discussion: Piazza • Reading to spark class discussion, post/bring • “Begin Active” questions – Post ¸ 1 substantive comment, question, or • Textbook: answer each week – Friedman, Wand. Essentials of Programming Languages, 3 rd edition • Take a moment to reflect upon the day’s – Odersky, Spoon, Venners. Programming in Scala, 2 nd edition reading or class discussion – Course notes • Participate actively in-class and online • Replaces E-Mail • Extra Credit really extra – Course announcements – Questions for course staff 65 66 11

  12. Labs, Quizzes, and Exams • Labs – Are two weeks, due Saturday 6:00pm – In pairs for learning and interviews but everyone submits and individually responsible for the material Course Administration – Collaboration are encouraged (but you must acknowledge!) – Autograde part and interview part • Quizzes (Tue after each lab) • Midterm Exam: Feb 27 • Final Exam: According to University – Mark your calendars. No make-ups (except special circumstances) 67 Policies Highlights • Read the course syllabus • Lab assignment late and “redo” policy • No make-up exams (unless emergency or http://www.cs.colorado.edu/~bec/courses/csci3155-s14/ special accommodation) • Special accommodation requests (disability, • Coming next time means you have read religious observances) within first four weeks and agreed to them. • Regrades requests within one week 69 70 Most Important Goal For Next Time • Read the course syllabus http://www.cs.colorado.edu/~bec/courses/csci3155-s14/ Have Lots of Fun! • Join the course moodle, Piazza, upload a profile picture, and introduce yourself • Set up a Scala development environment – Scala IDE screencasts 71 72 12

  13. Controversial Editorial … • Linked on the schedule • Optional, but entertaining • “Take this course to get a first-rate CS education” 73 13

Recommend


More recommend