From 038bde4aaae4e9648cdc176f9e475f9d55bb334c Mon Sep 17 00:00:00 2001 From: Rob Rix Date: Fri, 3 Jun 2016 18:32:21 -0400 Subject: [PATCH 01/10] Reformat to line Category constructors up. This reverts commit 5ce35d2a39ff6b83abd19d0d9476cc75922a36fe. --- src/Category.hs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Category.hs b/src/Category.hs index eca013843..e95a39971 100644 --- a/src/Category.hs +++ b/src/Category.hs @@ -5,9 +5,9 @@ import Data.String -- | A standardized category of AST node. Used to determine the semantics for -- | semantic diffing and define comparability of nodes. -data Category = +data Category -- | An operator with 2 operands. - BinaryOperator + = BinaryOperator -- | A literal key-value data structure. | DictionaryLiteral -- | A pair, e.g. of a key & value From 83b57fc6431feb80459bc1bbae4347b2cdebee0d Mon Sep 17 00:00:00 2001 From: Rob Rix Date: Fri, 3 Jun 2016 18:34:42 -0400 Subject: [PATCH 02/10] Add a Category for the top-level scope. --- src/Category.hs | 4 +++- src/DiffSummary.hs | 3 ++- src/Renderer/Split.hs | 1 + 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/src/Category.hs b/src/Category.hs index e95a39971..902d86849 100644 --- a/src/Category.hs +++ b/src/Category.hs @@ -6,8 +6,10 @@ import Data.String -- | A standardized category of AST node. Used to determine the semantics for -- | semantic diffing and define comparability of nodes. data Category + -- | The top-level branch node. + = Program -- | An operator with 2 operands. - = BinaryOperator + | BinaryOperator -- | A literal key-value data structure. | DictionaryLiteral -- | A pair, e.g. of a key & value diff --git a/src/DiffSummary.hs b/src/DiffSummary.hs index bc2edb507..7f4a7d3e6 100644 --- a/src/DiffSummary.hs +++ b/src/DiffSummary.hs @@ -35,6 +35,7 @@ instance HasCategory Text where instance HasCategory Category where toCategoryName category = case category of + Program -> "top level" BinaryOperator -> "binary operator" DictionaryLiteral -> "dictionary" Pair -> "pair" @@ -43,7 +44,7 @@ instance HasCategory Category where IntegerLiteral -> "integer" SymbolLiteral -> "symbol" ArrayLiteral -> "array" - (Other s) -> s + Other s -> s instance HasCategory leaf => HasCategory (Term leaf Info) where toCategoryName = toCategoryName . category . extract diff --git a/src/Renderer/Split.hs b/src/Renderer/Split.hs index 9ddb07a57..cf9dbe7a4 100644 --- a/src/Renderer/Split.hs +++ b/src/Renderer/Split.hs @@ -36,6 +36,7 @@ classifyMarkup category element = (element !) . A.class_ . stringValue $ styleNa -- | Return the appropriate style name for the given category. styleName :: Category -> String styleName category = "category-" ++ case category of + Program -> "program" BinaryOperator -> "binary-operator" DictionaryLiteral -> "dictionary" Pair -> "pair" From adca4a56a3ef415cf6c08d9bec17e49c7888da97 Mon Sep 17 00:00:00 2001 From: Rob Rix Date: Fri, 3 Jun 2016 18:35:27 -0400 Subject: [PATCH 03/10] Assign the Program category. --- src/TreeSitter.hs | 1 + 1 file changed, 1 insertion(+) diff --git a/src/TreeSitter.hs b/src/TreeSitter.hs index def687d7d..0ac3f474d 100644 --- a/src/TreeSitter.hs +++ b/src/TreeSitter.hs @@ -37,6 +37,7 @@ categoriesForLanguage language name = case (language, name) of -- | Given a node name from TreeSitter, return the correct categories. defaultCategoryForNodeName :: String -> Category defaultCategoryForNodeName name = case name of + "program" -> Program "function_call" -> FunctionCall "pair" -> Pair "string" -> StringLiteral From 10b424cd47bd328824777add6f462906c208ebf7 Mon Sep 17 00:00:00 2001 From: Rob Rix Date: Fri, 3 Jun 2016 18:37:40 -0400 Subject: [PATCH 04/10] Add an Error category. --- src/Category.hs | 2 ++ src/DiffSummary.hs | 1 + src/Renderer/Split.hs | 1 + 3 files changed, 4 insertions(+) diff --git a/src/Category.hs b/src/Category.hs index 902d86849..f621177dc 100644 --- a/src/Category.hs +++ b/src/Category.hs @@ -8,6 +8,8 @@ import Data.String data Category -- | The top-level branch node. = Program + -- | A node indicating syntax errors. + | Error -- | An operator with 2 operands. | BinaryOperator -- | A literal key-value data structure. diff --git a/src/DiffSummary.hs b/src/DiffSummary.hs index 7f4a7d3e6..bb9652f39 100644 --- a/src/DiffSummary.hs +++ b/src/DiffSummary.hs @@ -36,6 +36,7 @@ instance HasCategory Text where instance HasCategory Category where toCategoryName category = case category of Program -> "top level" + Error -> "error" BinaryOperator -> "binary operator" DictionaryLiteral -> "dictionary" Pair -> "pair" diff --git a/src/Renderer/Split.hs b/src/Renderer/Split.hs index cf9dbe7a4..9912d1615 100644 --- a/src/Renderer/Split.hs +++ b/src/Renderer/Split.hs @@ -37,6 +37,7 @@ classifyMarkup category element = (element !) . A.class_ . stringValue $ styleNa styleName :: Category -> String styleName category = "category-" ++ case category of Program -> "program" + Error -> "error" BinaryOperator -> "binary-operator" DictionaryLiteral -> "dictionary" Pair -> "pair" From 0f924f786c29d68e3fa5c638ffdfd23edea6bf82 Mon Sep 17 00:00:00 2001 From: Rob Rix Date: Fri, 3 Jun 2016 18:38:04 -0400 Subject: [PATCH 05/10] Assign the Error category. --- src/TreeSitter.hs | 1 + 1 file changed, 1 insertion(+) diff --git a/src/TreeSitter.hs b/src/TreeSitter.hs index 0ac3f474d..73800c363 100644 --- a/src/TreeSitter.hs +++ b/src/TreeSitter.hs @@ -38,6 +38,7 @@ categoriesForLanguage language name = case (language, name) of defaultCategoryForNodeName :: String -> Category defaultCategoryForNodeName name = case name of "program" -> Program + "ERROR" -> Error "function_call" -> FunctionCall "pair" -> Pair "string" -> StringLiteral From d3c23769e7c1a8fc29d56f531f5bfa4aba2e2255 Mon Sep 17 00:00:00 2001 From: Rob Rix Date: Fri, 3 Jun 2016 18:40:43 -0400 Subject: [PATCH 06/10] :fire: redundant parens. --- src/TreeSitter.hs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/TreeSitter.hs b/src/TreeSitter.hs index 73800c363..b5b40f94b 100644 --- a/src/TreeSitter.hs +++ b/src/TreeSitter.hs @@ -45,7 +45,7 @@ defaultCategoryForNodeName name = case name of "integer" -> IntegerLiteral "symbol" -> SymbolLiteral "array" -> ArrayLiteral - _ -> (Other name) + _ -> Other name -- | Return a parser for a tree sitter language & document. documentToTerm :: Language -> Ptr Document -> Parser From 16207b03d1330a3ad45aa001925b2ed53fe68934 Mon Sep 17 00:00:00 2001 From: Rob Rix Date: Fri, 3 Jun 2016 18:43:43 -0400 Subject: [PATCH 07/10] Extract the term comparison relation. --- src/Diffing.hs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/Diffing.hs b/src/Diffing.hs index 81ffef9e1..c3d2b1a96 100644 --- a/src/Diffing.hs +++ b/src/Diffing.hs @@ -90,7 +90,7 @@ diffFiles parser renderer sourceBlobs = do let textDiff = case areNullOids of (True, False) -> pure $ Insert (snd terms) (False, True) -> pure $ Delete (fst terms) - (_, _) -> runBothWith (diffTerms construct ((==) `on` category . extract) diffCostWithCachedTermSizes) $ replaceLeaves <*> terms + (_, _) -> runBothWith (diffTerms construct shouldCompareTerms diffCostWithCachedTermSizes) $ replaceLeaves <*> terms pure $! renderer textDiff sourceBlobs where construct :: CofreeF (Syntax Text) (Both Info) (Diff Text Info) -> Diff Text Info @@ -100,6 +100,7 @@ diffFiles parser renderer sourceBlobs = do getCost diff = case runFree diff of Free (info :< _) -> cost <$> info Pure patch -> uncurry both (fromThese 0 0 (unPatch (cost . extract <$> patch))) + shouldCompareTerms = (==) `on` category . extract -- | The sum of the node count of the diff’s patches. diffCostWithCachedTermSizes :: Diff a Info -> Integer From 6e66837cc03e7c68e02aa2accf3db57576f1663b Mon Sep 17 00:00:00 2001 From: Rob Rix Date: Mon, 6 Jun 2016 08:19:38 -0400 Subject: [PATCH 08/10] Capitalize the Program category in the JSON fixtures. --- test/diffs/dictionary.json.js | 2 +- test/diffs/newline-at-eof.json.js | 2 +- test/diffs/no-newline-at-eof.json.js | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/test/diffs/dictionary.json.js b/test/diffs/dictionary.json.js index e3b6e200a..8d400b860 100644 --- a/test/diffs/dictionary.json.js +++ b/test/diffs/dictionary.json.js @@ -1 +1 @@ -{"rows":[[{"number":1,"terms":[{"range":[0,2],"category":"program","children":[{"range":[0,2],"category":"expression_statement","children":[{"range":[0,2],"category":"DictionaryLiteral","children":{}}]}]}],"range":[0,2],"hasChanges":false},{"number":1,"terms":[{"range":[0,2],"category":"program","children":[{"range":[0,2],"category":"expression_statement","children":[{"range":[0,2],"category":"DictionaryLiteral","children":{}}]}]}],"range":[0,2],"hasChanges":false}],[{"number":2,"terms":[{"range":[2,12],"category":"program","children":[{"range":[2,12],"category":"expression_statement","children":[{"range":[2,12],"category":"DictionaryLiteral","children":{"\"b\"":{"range":[4,10],"category":"Pair","children":[{"range":[4,7],"category":"StringLiteral","children":[{"range":[4,5],"category":"StringLiteral"},{"range":[5,6],"category":"StringLiteral"},{"range":[6,7],"category":"StringLiteral"}]},{"patch":"replace","range":[9,10],"category":"number"}]}}}]}]}],"range":[2,12],"hasChanges":true},{"number":2,"terms":[{"range":[2,12],"category":"program","children":[{"range":[2,12],"category":"expression_statement","children":[{"range":[2,12],"category":"DictionaryLiteral","children":{"\"b\"":{"range":[4,10],"category":"Pair","children":[{"range":[4,7],"category":"StringLiteral","children":[{"range":[4,5],"category":"StringLiteral"},{"range":[5,6],"category":"StringLiteral"},{"range":[6,7],"category":"StringLiteral"}]},{"patch":"replace","range":[9,10],"category":"number"}]}}}]}]}],"range":[2,12],"hasChanges":true}],[{"number":3,"terms":[{"range":[12,21],"category":"program","children":[{"range":[12,21],"category":"expression_statement","children":[{"range":[12,21],"category":"DictionaryLiteral","children":{"\"a\"":{"range":[14,20],"category":"Pair","children":[{"range":[14,17],"category":"StringLiteral","children":[{"range":[14,15],"category":"StringLiteral"},{"range":[15,16],"category":"StringLiteral"},{"range":[16,17],"category":"StringLiteral"}]},{"range":[19,20],"category":"number"}]}}}]}]}],"range":[12,21],"hasChanges":false},{"number":3,"terms":[{"range":[12,21],"category":"program","children":[{"range":[12,21],"category":"expression_statement","children":[{"range":[12,21],"category":"DictionaryLiteral","children":{"\"a\"":{"range":[14,20],"category":"Pair","children":[{"range":[14,17],"category":"StringLiteral","children":[{"range":[14,15],"category":"StringLiteral"},{"range":[15,16],"category":"StringLiteral"},{"range":[16,17],"category":"StringLiteral"}]},{"range":[19,20],"category":"number"}]}}}]}]}],"range":[12,21],"hasChanges":false}],[{"number":4,"terms":[{"range":[21,23],"category":"program","children":[{"range":[21,23],"category":"expression_statement","children":[{"range":[21,22],"category":"DictionaryLiteral","children":{}}]}]}],"range":[21,23],"hasChanges":false},{"number":4,"terms":[{"range":[21,23],"category":"program","children":[{"range":[21,23],"category":"expression_statement","children":[{"range":[21,22],"category":"DictionaryLiteral","children":{}}]}]}],"range":[21,23],"hasChanges":false}],[{"number":5,"terms":[{"range":[23,23],"category":"program","children":[]}],"range":[23,23],"hasChanges":false},{"number":5,"terms":[{"range":[23,23],"category":"program","children":[]}],"range":[23,23],"hasChanges":false}]],"oids":["",""],"paths":["test/diffs/dictionary.A.js","test/diffs/dictionary.B.js"]} \ No newline at end of file +{"rows":[[{"number":1,"terms":[{"range":[0,2],"category":"Program","children":[{"range":[0,2],"category":"expression_statement","children":[{"range":[0,2],"category":"DictionaryLiteral","children":{}}]}]}],"range":[0,2],"hasChanges":false},{"number":1,"terms":[{"range":[0,2],"category":"Program","children":[{"range":[0,2],"category":"expression_statement","children":[{"range":[0,2],"category":"DictionaryLiteral","children":{}}]}]}],"range":[0,2],"hasChanges":false}],[{"number":2,"terms":[{"range":[2,12],"category":"Program","children":[{"range":[2,12],"category":"expression_statement","children":[{"range":[2,12],"category":"DictionaryLiteral","children":{"\"b\"":{"range":[4,10],"category":"Pair","children":[{"range":[4,7],"category":"StringLiteral","children":[{"range":[4,5],"category":"StringLiteral"},{"range":[5,6],"category":"StringLiteral"},{"range":[6,7],"category":"StringLiteral"}]},{"patch":"replace","range":[9,10],"category":"number"}]}}}]}]}],"range":[2,12],"hasChanges":true},{"number":2,"terms":[{"range":[2,12],"category":"Program","children":[{"range":[2,12],"category":"expression_statement","children":[{"range":[2,12],"category":"DictionaryLiteral","children":{"\"b\"":{"range":[4,10],"category":"Pair","children":[{"range":[4,7],"category":"StringLiteral","children":[{"range":[4,5],"category":"StringLiteral"},{"range":[5,6],"category":"StringLiteral"},{"range":[6,7],"category":"StringLiteral"}]},{"patch":"replace","range":[9,10],"category":"number"}]}}}]}]}],"range":[2,12],"hasChanges":true}],[{"number":3,"terms":[{"range":[12,21],"category":"Program","children":[{"range":[12,21],"category":"expression_statement","children":[{"range":[12,21],"category":"DictionaryLiteral","children":{"\"a\"":{"range":[14,20],"category":"Pair","children":[{"range":[14,17],"category":"StringLiteral","children":[{"range":[14,15],"category":"StringLiteral"},{"range":[15,16],"category":"StringLiteral"},{"range":[16,17],"category":"StringLiteral"}]},{"range":[19,20],"category":"number"}]}}}]}]}],"range":[12,21],"hasChanges":false},{"number":3,"terms":[{"range":[12,21],"category":"Program","children":[{"range":[12,21],"category":"expression_statement","children":[{"range":[12,21],"category":"DictionaryLiteral","children":{"\"a\"":{"range":[14,20],"category":"Pair","children":[{"range":[14,17],"category":"StringLiteral","children":[{"range":[14,15],"category":"StringLiteral"},{"range":[15,16],"category":"StringLiteral"},{"range":[16,17],"category":"StringLiteral"}]},{"range":[19,20],"category":"number"}]}}}]}]}],"range":[12,21],"hasChanges":false}],[{"number":4,"terms":[{"range":[21,23],"category":"Program","children":[{"range":[21,23],"category":"expression_statement","children":[{"range":[21,22],"category":"DictionaryLiteral","children":{}}]}]}],"range":[21,23],"hasChanges":false},{"number":4,"terms":[{"range":[21,23],"category":"Program","children":[{"range":[21,23],"category":"expression_statement","children":[{"range":[21,22],"category":"DictionaryLiteral","children":{}}]}]}],"range":[21,23],"hasChanges":false}],[{"number":5,"terms":[{"range":[23,23],"category":"Program","children":[]}],"range":[23,23],"hasChanges":false},{"number":5,"terms":[{"range":[23,23],"category":"Program","children":[]}],"range":[23,23],"hasChanges":false}]],"oids":["",""],"paths":["test/diffs/dictionary.A.js","test/diffs/dictionary.B.js"]} \ No newline at end of file diff --git a/test/diffs/newline-at-eof.json.js b/test/diffs/newline-at-eof.json.js index 4a2006f5b..613609c5c 100644 --- a/test/diffs/newline-at-eof.json.js +++ b/test/diffs/newline-at-eof.json.js @@ -1 +1 @@ -{"rows":[[{"number":1,"terms":[{"range":[0,29],"category":"program","children":[{"range":[0,28],"category":"expression_statement","children":[{"range":[0,27],"category":"FunctionCall","children":[{"range":[0,11],"category":"member_access","children":[{"range":[0,7],"category":"identifier"},{"range":[8,11],"category":"identifier"}]},{"range":[12,26],"category":"arguments","children":[{"range":[12,26],"category":"StringLiteral","children":[{"range":[12,13],"category":"StringLiteral"},{"range":[13,18],"category":"StringLiteral"},{"range":[18,19],"category":"StringLiteral"},{"range":[20,25],"category":"StringLiteral"},{"range":[25,26],"category":"StringLiteral"}]}]}]}]}]}],"range":[0,29],"hasChanges":false},{"number":1,"terms":[{"range":[0,29],"category":"program","children":[{"range":[0,28],"category":"expression_statement","children":[{"range":[0,27],"category":"FunctionCall","children":[{"range":[0,11],"category":"member_access","children":[{"range":[0,7],"category":"identifier"},{"range":[8,11],"category":"identifier"}]},{"range":[12,26],"category":"arguments","children":[{"range":[12,26],"category":"StringLiteral","children":[{"range":[12,13],"category":"StringLiteral"},{"range":[13,18],"category":"StringLiteral"},{"range":[18,19],"category":"StringLiteral"},{"range":[20,25],"category":"StringLiteral"},{"range":[25,26],"category":"StringLiteral"}]}]}]}]}]}],"range":[0,29],"hasChanges":false}],[{"number":2,"terms":[{"range":[29,29],"category":"program","children":[]}],"range":[29,29],"hasChanges":false},{"number":2,"terms":[{"range":[29,30],"category":"program","children":[]}],"range":[29,30],"hasChanges":false}],[{"number":3,"terms":[{"range":[30,56],"category":"program","children":[{"patch":"insert","range":[30,55],"category":"expression_statement","children":[{"range":[30,54],"category":"FunctionCall","children":[{"range":[30,41],"category":"member_access","children":[{"range":[30,37],"category":"identifier"},{"range":[38,41],"category":"identifier"}]},{"range":[42,53],"category":"arguments","children":[{"range":[42,53],"category":"StringLiteral","children":[{"range":[42,43],"category":"StringLiteral"},{"range":[43,52],"category":"StringLiteral"},{"range":[52,53],"category":"StringLiteral"}]}]}]}]}]}],"range":[30,56],"hasChanges":true}],[{"number":4,"terms":[{"range":[56,56],"category":"program","children":[]}],"range":[56,56],"hasChanges":false}]],"oids":["",""],"paths":["test/diffs/newline-at-eof.A.js","test/diffs/newline-at-eof.B.js"]} \ No newline at end of file +{"rows":[[{"number":1,"terms":[{"range":[0,29],"category":"Program","children":[{"range":[0,28],"category":"expression_statement","children":[{"range":[0,27],"category":"FunctionCall","children":[{"range":[0,11],"category":"member_access","children":[{"range":[0,7],"category":"identifier"},{"range":[8,11],"category":"identifier"}]},{"range":[12,26],"category":"arguments","children":[{"range":[12,26],"category":"StringLiteral","children":[{"range":[12,13],"category":"StringLiteral"},{"range":[13,18],"category":"StringLiteral"},{"range":[18,19],"category":"StringLiteral"},{"range":[20,25],"category":"StringLiteral"},{"range":[25,26],"category":"StringLiteral"}]}]}]}]}]}],"range":[0,29],"hasChanges":false},{"number":1,"terms":[{"range":[0,29],"category":"Program","children":[{"range":[0,28],"category":"expression_statement","children":[{"range":[0,27],"category":"FunctionCall","children":[{"range":[0,11],"category":"member_access","children":[{"range":[0,7],"category":"identifier"},{"range":[8,11],"category":"identifier"}]},{"range":[12,26],"category":"arguments","children":[{"range":[12,26],"category":"StringLiteral","children":[{"range":[12,13],"category":"StringLiteral"},{"range":[13,18],"category":"StringLiteral"},{"range":[18,19],"category":"StringLiteral"},{"range":[20,25],"category":"StringLiteral"},{"range":[25,26],"category":"StringLiteral"}]}]}]}]}]}],"range":[0,29],"hasChanges":false}],[{"number":2,"terms":[{"range":[29,29],"category":"Program","children":[]}],"range":[29,29],"hasChanges":false},{"number":2,"terms":[{"range":[29,30],"category":"Program","children":[]}],"range":[29,30],"hasChanges":false}],[{"number":3,"terms":[{"range":[30,56],"category":"Program","children":[{"patch":"insert","range":[30,55],"category":"expression_statement","children":[{"range":[30,54],"category":"FunctionCall","children":[{"range":[30,41],"category":"member_access","children":[{"range":[30,37],"category":"identifier"},{"range":[38,41],"category":"identifier"}]},{"range":[42,53],"category":"arguments","children":[{"range":[42,53],"category":"StringLiteral","children":[{"range":[42,43],"category":"StringLiteral"},{"range":[43,52],"category":"StringLiteral"},{"range":[52,53],"category":"StringLiteral"}]}]}]}]}]}],"range":[30,56],"hasChanges":true}],[{"number":4,"terms":[{"range":[56,56],"category":"Program","children":[]}],"range":[56,56],"hasChanges":false}]],"oids":["",""],"paths":["test/diffs/newline-at-eof.A.js","test/diffs/newline-at-eof.B.js"]} \ No newline at end of file diff --git a/test/diffs/no-newline-at-eof.json.js b/test/diffs/no-newline-at-eof.json.js index 3c4e0d1a8..618c059c2 100644 --- a/test/diffs/no-newline-at-eof.json.js +++ b/test/diffs/no-newline-at-eof.json.js @@ -1 +1 @@ -{"rows":[[{"number":1,"terms":[{"range":[0,28],"category":"program","children":[{"range":[0,28],"category":"expression_statement","children":[{"range":[0,27],"category":"FunctionCall","children":[{"range":[0,11],"category":"member_access","children":[{"range":[0,7],"category":"identifier"},{"range":[8,11],"category":"identifier"}]},{"range":[12,26],"category":"arguments","children":[{"range":[12,26],"category":"StringLiteral","children":[{"range":[12,13],"category":"StringLiteral"},{"range":[13,18],"category":"StringLiteral"},{"range":[18,19],"category":"StringLiteral"},{"range":[20,25],"category":"StringLiteral"},{"range":[25,26],"category":"StringLiteral"}]}]}]}]}]}],"range":[0,28],"hasChanges":false},{"number":1,"terms":[{"range":[0,29],"category":"program","children":[{"range":[0,28],"category":"expression_statement","children":[{"range":[0,27],"category":"FunctionCall","children":[{"range":[0,11],"category":"member_access","children":[{"range":[0,7],"category":"identifier"},{"range":[8,11],"category":"identifier"}]},{"range":[12,26],"category":"arguments","children":[{"range":[12,26],"category":"StringLiteral","children":[{"range":[12,13],"category":"StringLiteral"},{"range":[13,18],"category":"StringLiteral"},{"range":[18,19],"category":"StringLiteral"},{"range":[20,25],"category":"StringLiteral"},{"range":[25,26],"category":"StringLiteral"}]}]}]}]}]}],"range":[0,29],"hasChanges":false}],[{"number":2,"terms":[{"range":[29,30],"category":"program","children":[]}],"range":[29,30],"hasChanges":false}],[{"number":3,"terms":[{"range":[30,55],"category":"program","children":[{"patch":"insert","range":[30,55],"category":"expression_statement","children":[{"range":[30,54],"category":"FunctionCall","children":[{"range":[30,41],"category":"member_access","children":[{"range":[30,37],"category":"identifier"},{"range":[38,41],"category":"identifier"}]},{"range":[42,53],"category":"arguments","children":[{"range":[42,53],"category":"StringLiteral","children":[{"range":[42,43],"category":"StringLiteral"},{"range":[43,52],"category":"StringLiteral"},{"range":[52,53],"category":"StringLiteral"}]}]}]}]}]}],"range":[30,55],"hasChanges":true}]],"oids":["",""],"paths":["test/diffs/no-newline-at-eof.A.js","test/diffs/no-newline-at-eof.B.js"]} \ No newline at end of file +{"rows":[[{"number":1,"terms":[{"range":[0,28],"category":"Program","children":[{"range":[0,28],"category":"expression_statement","children":[{"range":[0,27],"category":"FunctionCall","children":[{"range":[0,11],"category":"member_access","children":[{"range":[0,7],"category":"identifier"},{"range":[8,11],"category":"identifier"}]},{"range":[12,26],"category":"arguments","children":[{"range":[12,26],"category":"StringLiteral","children":[{"range":[12,13],"category":"StringLiteral"},{"range":[13,18],"category":"StringLiteral"},{"range":[18,19],"category":"StringLiteral"},{"range":[20,25],"category":"StringLiteral"},{"range":[25,26],"category":"StringLiteral"}]}]}]}]}]}],"range":[0,28],"hasChanges":false},{"number":1,"terms":[{"range":[0,29],"category":"Program","children":[{"range":[0,28],"category":"expression_statement","children":[{"range":[0,27],"category":"FunctionCall","children":[{"range":[0,11],"category":"member_access","children":[{"range":[0,7],"category":"identifier"},{"range":[8,11],"category":"identifier"}]},{"range":[12,26],"category":"arguments","children":[{"range":[12,26],"category":"StringLiteral","children":[{"range":[12,13],"category":"StringLiteral"},{"range":[13,18],"category":"StringLiteral"},{"range":[18,19],"category":"StringLiteral"},{"range":[20,25],"category":"StringLiteral"},{"range":[25,26],"category":"StringLiteral"}]}]}]}]}]}],"range":[0,29],"hasChanges":false}],[{"number":2,"terms":[{"range":[29,30],"category":"Program","children":[]}],"range":[29,30],"hasChanges":false}],[{"number":3,"terms":[{"range":[30,55],"category":"Program","children":[{"patch":"insert","range":[30,55],"category":"expression_statement","children":[{"range":[30,54],"category":"FunctionCall","children":[{"range":[30,41],"category":"member_access","children":[{"range":[30,37],"category":"identifier"},{"range":[38,41],"category":"identifier"}]},{"range":[42,53],"category":"arguments","children":[{"range":[42,53],"category":"StringLiteral","children":[{"range":[42,43],"category":"StringLiteral"},{"range":[43,52],"category":"StringLiteral"},{"range":[52,53],"category":"StringLiteral"}]}]}]}]}]}],"range":[30,55],"hasChanges":true}]],"oids":["",""],"paths":["test/diffs/no-newline-at-eof.A.js","test/diffs/no-newline-at-eof.B.js"]} \ No newline at end of file From 9df5b439a4eaa06b496a4baf71c6062cd59dd3ec Mon Sep 17 00:00:00 2001 From: joshvera Date: Mon, 6 Jun 2016 12:14:58 -0400 Subject: [PATCH 09/10] s/2015/2016 --- weekly/{2015-06-01.md => 2016-06-01.md} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename weekly/{2015-06-01.md => 2016-06-01.md} (100%) diff --git a/weekly/2015-06-01.md b/weekly/2016-06-01.md similarity index 100% rename from weekly/2015-06-01.md rename to weekly/2016-06-01.md From f92614fb7e7794a04550c01e2bfa5fee57a1d73a Mon Sep 17 00:00:00 2001 From: joshvera Date: Mon, 6 Jun 2016 12:15:08 -0400 Subject: [PATCH 10/10] Add weekly notes for 06/06/2016 --- weekly/2016-06-06.md | 63 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 63 insertions(+) create mode 100644 weekly/2016-06-06.md diff --git a/weekly/2016-06-06.md b/weekly/2016-06-06.md new file mode 100644 index 000000000..fb419b189 --- /dev/null +++ b/weekly/2016-06-06.md @@ -0,0 +1,63 @@ +# May 31th, 2016 + +## Agenda + +1. Retrospective on last week: + - What went well? + - What was challenging? + - What did you learn? + + +## What went well? + +@robrix: + +- As of this morning we’re pushing data to graphite. +- There's a 2 hour window of when data is pulled in to graphite. +- We have a much more thorough understanding of the shape of the SES problems. + +@rewinfrey: +- Came away with a much more thorough understanding of SES. +- Pairing with Rob on the profiling issues. + +@joshvera +- Exploring the current productions of tree-sitter output. +- Got an airbnb for the Mini-Summit. + + +## What was challenging? + +@robrix: +- SES performance has been a problem. Briefly confused into thinking we had solved the problem. We’re profiling semantic-diff-tool and running the tests on semantic-diff. If we don’t clean semantic-diff-tool then it doesn’t know that semantic-diff has been rebuilt and it doesn’t try to relink it. Happens specifically when changing branches. +- SES performance depends on O(n) cost function. + +@rewinfrey: +- Heartbreaking to discover that a huge performance win was a bad build. +- Felt like it was hard to contribute to the deployment and build process. +- Do we have a fallback in place in case S3 fails? + +@joshvera: +- Error productions from tree-sitter are difficult to debug and obscure diff summary output. +- Understanding and communicating how our deployment process works to other people. Maybe this means we need better documentation? + + +## What did you learn? + +@robrix: +- Learning about parallelism because we have large asymptotic factors in SES. +- Developed a stronger intuition for why cost has to be linear with respect to the size of the diff tree. + +@rewinfrey: +- Learned a lot about profiling in Haskell. +- Learned how to use Profiteur to visualize the space and time costs for a given computation. +- Trying to use the Eval monad to parallelize the Minimax algorithm. + +@joshvera: +- Learned about designing CRISPR proteins that can be edited into bacteria to defend against viruses and plasmids. +- Read up on GHC's Core language in order to understand some of the optimizations GHC performs. + + +## Other Items + +- Mini-Summit plans set for the week of June 20th. +- Rob on vacation starting Tuesday June 7th! :sunglasses: