hawk
play

HAWK HTML IS ALL WE KNOW JON ADELSON, ETHAN BENJAMIN, JUSTIN - PowerPoint PPT Presentation

HAWK HTML IS ALL WE KNOW JON ADELSON, ETHAN BENJAMIN, JUSTIN CHANG, GRAHAM GOBIESKI, GEORGE YU OVERVIEW Imperative Language Pattern-action structure based on AWK Handles CSS selectors and Regex for patterns Full type inference


  1. HAWK HTML IS ALL WE KNOW JON ADELSON, ETHAN BENJAMIN, JUSTIN CHANG, GRAHAM GOBIESKI, GEORGE YU

  2. OVERVIEW • Imperative Language • Pattern-action structure based on AWK • Handles CSS selectors and Regex for patterns • Full type inference

  3. TUTORIAL • Compile source code: make • To run tests: make test • Write HAWK: *.hk • To Compile a Program: ./prog <program-name> > Program.java • To Run a Program: javac Program.java && java -cp ./ _hawk_lib/jsoup.jar: Program <args>

  4. DEMO • Demo 1: Find all prime numbers in a document • Demo 2: Find the average number of upvotes on the front page of Reddit • Demo 3: Get the weather • Demo 4: Line counter; 4500 total lines of code • Demo 5: Nasty Type Inference

  5. BEGIN{ fun getSingletonTable(x){ DEMO 5 return {x}; } fun modifyTable(t){ t[0] = getSingletonTable(42); } table = {}; table[0] = {}; nestedTable = table[0]; modifyTable(nestedTable); nestedNestedTable = table[0][0]; value = nestedNestedTable[0]; print(value); } END{}

  6. LANGUAGE IMPLEMENTATION

  7. LESSONS LEARNED • Start early! • Know OCaml • Weekly group work sessions increase productivity • Don’t commit broken code • Know your LRM and set reasonable goals

Download Presentation
Download Policy: The content available on the website is offered to you 'AS IS' for your personal information and use only. It cannot be commercialized, licensed, or distributed on other websites without prior consent from the author. To download a presentation, simply click this link. If you encounter any difficulties during the download process, it's possible that the publisher has removed the file from their server.

Recommend


More recommend