From 6d052283b4b0a19be802111758d0ded7b8491f08 Mon Sep 17 00:00:00 2001 From: Enrico Maria Cestari Date: Thu, 3 Mar 2022 21:08:38 +0100 Subject: [PATCH] Chapter 4 Updates --- Chapter 4 - Data Structures/EJS-Chapter4.js | 375 ++++++++++ .../chapter4.test.js | 0 .../jacques_journal.js | 97 +++ .../package.json | 0 Chapter 4/datastructures.js | 178 ----- Chapter 4/jacques_journal.js | 97 --- .../report.20200313.152058.59233.0.001.json | 660 ------------------ 7 files changed, 472 insertions(+), 935 deletions(-) create mode 100644 Chapter 4 - Data Structures/EJS-Chapter4.js rename {Chapter 4 => Chapter 4 - Data Structures}/chapter4.test.js (100%) create mode 100644 Chapter 4 - Data Structures/jacques_journal.js rename {Chapter 4 => Chapter 4 - Data Structures}/package.json (100%) delete mode 100644 Chapter 4/datastructures.js delete mode 100644 Chapter 4/jacques_journal.js delete mode 100644 Chapter 4/report.20200313.152058.59233.0.001.json diff --git a/Chapter 4 - Data Structures/EJS-Chapter4.js b/Chapter 4 - Data Structures/EJS-Chapter4.js new file mode 100644 index 0000000..12586ac --- /dev/null +++ b/Chapter 4 - Data Structures/EJS-Chapter4.js @@ -0,0 +1,375 @@ +//In order to compute digital data, it's necessary to represent it in computer memory +//An ARRAY (or VECTOR) is a a list of values, separated by commas and inserted between brackets +let listOfNumbers = [2,3,5,7,11]; +console.log(listOfNumbers[2]); +// -> 5 +console.log(listOfNumbers[0]); // First index of an array is zero, not one. +// -> 2 +console.log(listOfNumbers[2-1]); +// -> 3 + + +//In JavaScript all values have properties, except from null and undefined. These have no properties +null.length; +// -> Type Error: null has no properties + + +//value.x RETRIEVES A PROPERTY x of "value" -> so value must have a linked property +//value[x] ATTEMPTS TO CALCULATE expression "x" and use result as property name + + +/* ************ METHODS *********** */ + +// Properties that contain functions are generally called methods of the value they belong to, as in “toUpperCase is a method of a string.” +let doh = "Doh"; +console.log(typeof doh.toUpperCase()); +// -> function +console.log(doh.toUpperCase()); +// -> DOH + + +let sequence = [1, 2, 3]; +sequence.push(4); // The push method adds values to the end of an array +sequence.push(5); +console.log(sequence); +// -> [1, 2, 3, 4, 5] +console.log(sequence.pop()); // The pop method removes the last value in the array and returns it +// -> 5 +console.log(sequence); +// -> [1, 2, 3, 4] + + + +/* *********** OBJECTS *********** */ + + + +//Values of type OBJECT are arbitrary collections of properties. +let day1 = { + squirrel: false, + events: ["work", "touched tree", "pizza", "running"] +}; +console.log(day1.squirrel); +// -> false +console.log(day1.wolf); +// -> undefined +day1.wolf = false; +console.log(day1.wolf); +// -> false + + +// braces have two meanings in JavaScript. At the start of a statement, they start a block of statements. In any other position, they describe an object. +let descriptions = { + work: "Went to work", + "touched tree": "Touched a tree" +}; + + +// The delete operator is a unary operator that, when applied to an object property, will remove the named property from the object. This is not a common thing to do, but it is possible. +let anObject = {left: 1, right: 2}; +console.log(anObject.left); +// -> 1 +delete anObject.left; //Truncates a variable from the object +console.log(anObject.left); +// -> undefined +console.log("left" in anObject); // The binary in operator, when applied to a string and an object, tells you whether that object has a property with that name. +// -> false +console.log("right" in anObject); +// -> true + +// To find out what properties an object has, you can use the Object.keys function. +console.log(Object.keys{x:0, y:0, z:2}); +// -> ["x", "y", "z"] + + +// There’s an Object.assign function that copies all properties from one object into another. +let objectA = {a:1, b:2}; +Object.assign(objectA, {b:3, c:4}); //Object.assign copies all properties from an object to another +console.log(objectA); +// -> {a: 1, b: 3, c: 4} + +// Arrays, then, are just a kind of object specialized for storing sequences of things. If you evaluate typeof [], it produces "object". + + +/* ******** MUTABILITY ********* */ + +// Object values can be modified. The types of values such as numbers, strings, and Booleans, are all immutable. +// Objects work differently. You can change their properties, causing a single object value to have different content at different times. +// With objects, there is a difference between having two references to the same object and having two different objects that contain the same properties. +let object1 = {value: 10}; +let object2 = object1; +let object3 = {value: 10}; + +console.log(object1 == object2); +// -> true +console.log(object1 == object3); +// -> false + +object1.value = 15; +console.log(object2.value); +// -> 15 +console.log(object3.value); +// -> 10 +// The object1 and object2 bindings grasp the same object, which is why changing object1 also changes the value of object2. They are said to have the same identity. +// The binding object3 points to a different object, which initially contains the same properties as object1 but lives a separate life. + + +// though a const binding to an object can itself not be changed and will continue to point at the same object, the contents of that object might change. +const score = {visitors:0, home:0}; +// This is okay +score.visitors = 1; +// This isn't allowed +score = {visitors:1, home:1}; + +// When you compare objects with JavaScript’s == operator, it compares by identity: it will produce true only if both objects are precisely the same value. Comparing different objects will return false, even if they have identical properties. +// There is no “deep” comparison operation built into JavaScript, which compares objects by contents, but it is possible to write it yourself + +let journal = []; +function addEntry(events, squirrel){ + journal.push({events,squirrel}); //Shortened syntax for {events:events, squirrel:squirrel} +} +addEntry(["work","touched tree","pizza","running","television"],false); +addEntry(["work","ice cream","cauliflower","lasagna","touched tree","brushed tree"],false); +addEntry(["weekend","cycling","break","peanuts","beer"],true); + + +function phi(table){ + return (table[3] * table[0] - table[2] * table[1]) / + Math.sqrt((table[2] + table[3]) * + (table[0] + table[1]) * + (table[1] + table[3]) * + (table[0] + table[2])); +} +console.log(phi([76, 9, 4, 1])) +// → 0.068599434 + +let JOURNAL = require('./jacques_journal.js'); +function tableFor(event, journal){ + let table = [0,0,0,0]; + for (let i=0; i 0.1 || correlation < -0.1){ + console.log(event + ":", correlation); + } +} +// → weekend: 0.1371988681 +// → brushed teeth: -0.3805211953 +// → candy: 0.1296407447 +// → work: -0.1371988681 +// → spaghetti: 0.2425356250 +// → reading: 0.1106828054 +// → peanuts: 0.5902679812 + + +for (let entry of JOURNAL) { + if (entry.events.includes("peanuts") && + !entry.events.includes("brushed teeth")) { + entry.events.push("peanut teeth"); + } +} +console.log(phi(tableFor("peanut teeth", JOURNAL))); +// -> 1 + + +/* ****** OTHER ARRAY METHODS ****** */ + +let todoList = []; +function remember(task){ + todoList.push(task); +} +function getTask(){ + return todoList.shift(); // removes task from the beginning of the array +} +function rememberUrgently(task){ + todoList.unshift(task); //add it at the beginning of the array +} +// So: +// push() and pop(): add/remove at the END of the array +// shift() and unshift(): add/remove at the BEGINNING of the array + + +console.log([1, 2, 3, 2, 1].indexOf(2)); // Search from the beginning +// → 1 +console.log([1, 2, 3, 2, 1].lastIndexOf(2)); // Search from the end +// → 3 + +console.log([0, 1, 2, 3, 4].slice(2, 4)); // Takes start and end indices and returns an array with only the elements in between +// → [2, 3] +console.log([0, 1, 2, 3, 4].slice(2)); +// → [2, 3, 4] + + +// The concat method can be used to glue arrays together to create a new array, similar to what the + operator does for strings. +function remove(array, index) { + return array.slice(0, index) + .concat(array.slice(index + 1)); +} +console.log(remove(["a", "b", "c", "d", "e"], 2)); +// → ["a", "b", "d", "e"] + + +let kim = "Kim"; +kim.age = 88; // Values of type string, number and Boolean are not objects and they don't store new properties +console.log(kim.age); +// -> undefined + +// Every string value has a number of methods +console.log("coconuts".slice(4,7)); +// -> nut + +console.log("coconut".indexOf("u")); +// -> 5 + +console.log("one two three".indexOf("ee")); // string indexOf method can search for a string containing more than one character +// -> 11 + +console.log(" okay\n ".trim()); // trim method removes whitespace from the start and end of a string +// -> okay + +console.log(String(6).padStart(3, "0")); +// -> 006 + +let sentence = "Secretarybirds specialize in stomping"; +let words = sentence.split(" "); +console.log(words); +// -> ["Secretarybirds","specialize","in","stomping"] +console.log(words.join(". ")); +// -> Secretarybirds.specialize.in.stomping + +console.log("LA".repeat(3)); +// -> LALALA + +let string = "abc"; +console.log(string.length); +// -> 3 +console.log(string[1]); +// -> b + + + + +/* ************ REST PARAMETERS ************ */ + +// A function can accept ANY number of params, using the ... notation - Called the REST Parameter +function max(...numbers){ + let result = -Infinity; + for (let number of numbers){ + if (number>result){ + result = number; + } + } + return result; +} + +console.log(max(4,1,9,-2)); +// -> 9 + +let numbers = [5,1,7]; +console.log(max(...numbers)); +// -> 7 + +let words = ["never","fully"]; +console.log(["will", ...words, "understand"]); +// -> ["will","never","fully","understand"] + +/* ******** THE MATH OBJECT ******** */ +// The Math object is used as a container to group a bunch of related functionality. +// There is only one Math object, and it is almost never useful as a value. +// Rather, it provides a namespace so that all these functions and values do not have to be global bindings. +function randomPointOnCircle(radius){ + let angle = Math.random() * 2 * Math.PI; + return {x: radius * Math.cos(angle), y: radius * Math.sin(angle)}; +} +console.log(randomPointOnCircle(2)); +// -> {x: xxxx.xxxx, y: yyyy.yyyy} + + +// Though computers are deterministic machines—they always react the same way if given the same input—it is possible to have them produce numbers that appear random. +console.log(Math.random()); +console.log(Math.random()); +console.log(Math.random()); + +console.log(Math.floor(Math.random() * 10)); // Math.floor rounds down to the nearest whole number. +console.log(Math.ceil(Math.random() * 10)); // Math.ceil rounds up to a whole number. +console.log(Math.round(Math.random() * 10)); // Math.ceil rounds up to the nearest whole number. + + +// DESTRUCTURING + +// Rewriting phi function in a "destructured way", using square brackets to "look inside" the value, rather than using an array variable +function phiDestructured([n00,n01,n10,n11]){ + return (n11 * n00 - n10 * n01) / + Math.sqrt((n10 + n11) * (n00 + n01) * + (n01 + n11) * (n00 + n10)); +} + +// This can also be done with objects: +let {name} = {name: "Faraji", age: 23}; +console.log(name); +console.log("\n\n"); + +//JSON +// In order to send data, we SERIALIZE data. We basically convert them in a flat notation. JSON = JavaScript Object Notation +// Two functions are used: JSON.stringify and JSON.parse +let string = JSON.stringify({squirrel:false, events: ["weekend"]}); // stringify takes a JavaScript value and returns a JSON-encoded string +console.log(string); +console.log(JSON.parse(string).events); // parse takes a string and converts it to the value it encodes + + + +/* ******* SUMMARY ******* */ +/* +Objects and arrays (which are a specific kind of object) provide ways to group several values into a single value. +Conceptually, this allows us to put a bunch of related things in a bag and run around with the bag, instead of wrapping our arms around all of the individual things and trying to hold on to them separately. + +Most values in JavaScript have properties, the exceptions being null and undefined. +Properties are accessed using value.prop or value["prop"]. +Objects tend to use names for their properties and store more or less a fixed set of them. +Arrays, on the other hand, usually contain varying amounts of conceptually identical values and use numbers (starting from 0) as the names of their properties. + +There are some named properties in arrays, such as length and a number of methods. +Methods are functions that live in properties and (usually) act on the value they are a property of. + +You can iterate over arrays using a special kind of for loop—for (let element of array). + */ \ No newline at end of file diff --git a/Chapter 4/chapter4.test.js b/Chapter 4 - Data Structures/chapter4.test.js similarity index 100% rename from Chapter 4/chapter4.test.js rename to Chapter 4 - Data Structures/chapter4.test.js diff --git a/Chapter 4 - Data Structures/jacques_journal.js b/Chapter 4 - Data Structures/jacques_journal.js new file mode 100644 index 0000000..abc10ad --- /dev/null +++ b/Chapter 4 - Data Structures/jacques_journal.js @@ -0,0 +1,97 @@ +let JOURNAL = [ + {"events":["carrot","exercise","weekend"],"squirrel":false}, + {"events":["bread","pudding","brushed teeth","weekend","touched tree"],"squirrel":false}, + {"events":["carrot","nachos","brushed teeth","cycling","weekend"],"squirrel":false}, + {"events":["brussel sprouts","ice cream","brushed teeth","computer","weekend"],"squirrel":false}, + {"events":["potatoes","candy","brushed teeth","exercise","weekend","dentist"],"squirrel":false}, + {"events":["brussel sprouts","pudding","brushed teeth","running","weekend"],"squirrel":false}, + {"events":["pizza","brushed teeth","computer","work","touched tree"],"squirrel":false}, + {"events":["bread","beer","brushed teeth","cycling","work"],"squirrel":false}, + {"events":["cauliflower","brushed teeth","work"],"squirrel":false}, + {"events":["pizza","brushed teeth","cycling","work"],"squirrel":false}, + {"events":["lasagna","nachos","brushed teeth","work"],"squirrel":false}, + {"events":["brushed teeth","weekend","touched tree"],"squirrel":false}, + {"events":["lettuce","brushed teeth","television","weekend"],"squirrel":false}, + {"events":["spaghetti","brushed teeth","work"],"squirrel":false}, + {"events":["brushed teeth","computer","work"],"squirrel":false}, + {"events":["lettuce","nachos","brushed teeth","work"],"squirrel":false}, + {"events":["carrot","brushed teeth","running","work"],"squirrel":false}, + {"events":["brushed teeth","work"],"squirrel":false}, + {"events":["cauliflower","reading","weekend"],"squirrel":false}, + {"events":["bread","brushed teeth","weekend"],"squirrel":false}, + {"events":["lasagna","brushed teeth","exercise","work"],"squirrel":false}, + {"events":["spaghetti","brushed teeth","reading","work"],"squirrel":false}, + {"events":["carrot","ice cream","brushed teeth","television","work"],"squirrel":false}, + {"events":["spaghetti","nachos","work"],"squirrel":false}, + {"events":["cauliflower","ice cream","brushed teeth","cycling","work"],"squirrel":false}, + {"events":["spaghetti","peanuts","computer","weekend"],"squirrel":true}, + {"events":["potatoes","ice cream","brushed teeth","computer","weekend"],"squirrel":false}, + {"events":["potatoes","ice cream","brushed teeth","work"],"squirrel":false}, + {"events":["peanuts","brushed teeth","running","work"],"squirrel":false}, + {"events":["potatoes","exercise","work"],"squirrel":false}, + {"events":["pizza","ice cream","computer","work"],"squirrel":false}, + {"events":["lasagna","ice cream","work"],"squirrel":false}, + {"events":["cauliflower","candy","reading","weekend"],"squirrel":false}, + {"events":["lasagna","nachos","brushed teeth","running","weekend"],"squirrel":false}, + {"events":["potatoes","brushed teeth","work"],"squirrel":false}, + {"events":["carrot","work"],"squirrel":false}, + {"events":["pizza","beer","work","dentist"],"squirrel":false}, + {"events":["lasagna","pudding","cycling","work"],"squirrel":false}, + {"events":["spaghetti","brushed teeth","reading","work"],"squirrel":false}, + {"events":["spaghetti","pudding","television","weekend"],"squirrel":false}, + {"events":["bread","brushed teeth","exercise","weekend"],"squirrel":false}, + {"events":["lasagna","peanuts","work"],"squirrel":true}, + {"events":["pizza","work"],"squirrel":false}, + {"events":["potatoes","exercise","work"],"squirrel":false}, + {"events":["brushed teeth","exercise","work"],"squirrel":false}, + {"events":["spaghetti","brushed teeth","television","work"],"squirrel":false}, + {"events":["pizza","cycling","weekend"],"squirrel":false}, + {"events":["carrot","brushed teeth","weekend"],"squirrel":false}, + {"events":["carrot","beer","brushed teeth","work"],"squirrel":false}, + {"events":["pizza","peanuts","candy","work"],"squirrel":true}, + {"events":["carrot","peanuts","brushed teeth","reading","work"],"squirrel":false}, + {"events":["potatoes","peanuts","brushed teeth","work"],"squirrel":false}, + {"events":["carrot","nachos","brushed teeth","exercise","work"],"squirrel":false}, + {"events":["pizza","peanuts","brushed teeth","television","weekend"],"squirrel":false}, + {"events":["lasagna","brushed teeth","cycling","weekend"],"squirrel":false}, + {"events":["cauliflower","peanuts","brushed teeth","computer","work","touched tree"],"squirrel":false}, + {"events":["lettuce","brushed teeth","television","work"],"squirrel":false}, + {"events":["potatoes","brushed teeth","computer","work"],"squirrel":false}, + {"events":["bread","candy","work"],"squirrel":false}, + {"events":["potatoes","nachos","work"],"squirrel":false}, + {"events":["carrot","pudding","brushed teeth","weekend"],"squirrel":false}, + {"events":["carrot","brushed teeth","exercise","weekend","touched tree"],"squirrel":false}, + {"events":["brussel sprouts","running","work"],"squirrel":false}, + {"events":["brushed teeth","work"],"squirrel":false}, + {"events":["lettuce","brushed teeth","running","work"],"squirrel":false}, + {"events":["candy","brushed teeth","work"],"squirrel":false}, + {"events":["brussel sprouts","brushed teeth","computer","work"],"squirrel":false}, + {"events":["bread","brushed teeth","weekend"],"squirrel":false}, + {"events":["cauliflower","brushed teeth","weekend"],"squirrel":false}, + {"events":["spaghetti","candy","television","work","touched tree"],"squirrel":false}, + {"events":["carrot","pudding","brushed teeth","work"],"squirrel":false}, + {"events":["lettuce","brushed teeth","work"],"squirrel":false}, + {"events":["carrot","ice cream","brushed teeth","cycling","work"],"squirrel":false}, + {"events":["pizza","brushed teeth","work"],"squirrel":false}, + {"events":["spaghetti","peanuts","exercise","weekend"],"squirrel":true}, + {"events":["bread","beer","computer","weekend","touched tree"],"squirrel":false}, + {"events":["brushed teeth","running","work"],"squirrel":false}, + {"events":["lettuce","peanuts","brushed teeth","work","touched tree"],"squirrel":false}, + {"events":["lasagna","brushed teeth","television","work"],"squirrel":false}, + {"events":["cauliflower","brushed teeth","running","work"],"squirrel":false}, + {"events":["carrot","brushed teeth","running","work"],"squirrel":false}, + {"events":["carrot","reading","weekend"],"squirrel":false}, + {"events":["carrot","peanuts","reading","weekend"],"squirrel":true}, + {"events":["potatoes","brushed teeth","running","work"],"squirrel":false}, + {"events":["lasagna","ice cream","work","touched tree"],"squirrel":false}, + {"events":["cauliflower","peanuts","brushed teeth","cycling","work"],"squirrel":false}, + {"events":["pizza","brushed teeth","running","work"],"squirrel":false}, + {"events":["lettuce","brushed teeth","work"],"squirrel":false}, + {"events":["bread","brushed teeth","television","weekend"],"squirrel":false}, + {"events":["cauliflower","peanuts","brushed teeth","weekend"],"squirrel":false} +]; + +// This makes sure the data is exported in node.js — +// `require('./path/to/04_data.js')` will get you the array. +if (typeof module != "undefined" && module.exports) + module.exports = JOURNAL; diff --git a/Chapter 4/package.json b/Chapter 4 - Data Structures/package.json similarity index 100% rename from Chapter 4/package.json rename to Chapter 4 - Data Structures/package.json diff --git a/Chapter 4/datastructures.js b/Chapter 4/datastructures.js deleted file mode 100644 index 59d410f..0000000 --- a/Chapter 4/datastructures.js +++ /dev/null @@ -1,178 +0,0 @@ -//In order to compute digital data, it is firstly needed to find a way to represent them in computer memory -//An ARRAY (or VECTOR) is a a list of values, separated by commas and inserted between brackets -let listOfNumbers = [2,3,5,7,11]; -console.log(listOfNumbers[2]); -console.log(listOfNumbers[0]); -console.log(listOfNumbers[2-1]); -console.log("\n\n") - -//In JavaScript all values have properties, except from null and undefined. These have no properties -//value.x RETRIEVES A PROPERTY x of "value" -> so value must have a linked property -//value[x] ATTEMPTS TO CALCULATE expression "x" and use result as property name - -//Values of type OBJECT are arbitrary collections of properties. -//It is possible to create objects with a notation between parentheses -let day1 = { - squirrel: false, - events: ["work", "touched tree", "pizza", "running"] -}; -console.log(day1.squirrel); -console.log(day1.wolf); -day1.wolf = false; -console.log(day1.wolf); -console.log("\n\n"); - -let descriptions = { - work: "Sono andato a lavorare", - "touched tree": "Ho toccato un albero" -}; - -let anObject = {left: 1, right: 2}; -console.log(anObject.left); -console.log(Object.keys(anObject)); -delete anObject.left; //Truncates a variable from the object -console.log(anObject.left); -console.log("left" in anObject); // Writes "false" -console.log("right" in anObject); // Writes "true" -console.log(Object.keys(anObject)); -console.log("\n\n"); - -let objectA = {a:1, b:2}; -Object.assign(objectA, {b:3, c:4}); //Object.assign copies all properties from an object to another -console.log(objectA); -console.log("\n\n"); - -let object1 = {value: 10}; -let object2 = object1; -let object3 = {value: 10}; -console.log(object1 == object2); // TRUE -console.log(object1 == object3); // FALSE -object1.value = 15; -// Variables object1 and object2 access the same object, so if we change 1 also 2 changes. Object3 variable points to another object. -console.log(object2.value); -console.log(object3.value); -console.log("\n\n"); - -const score = {visitors:0, home:0}; -score.visitors = 1; //This is good -// score = {visitors:1, home:1}; THIS IS FORBIDDEN - -let myJournal = []; -function addEntry(events, squirrel){ - myJournal.push({events,squirrel}); //Shortened syntax for {events:events, squirrel:squirrel} -} -addEntry(["work","touched tree","pizza","running","television"],false); -addEntry(["work","ice cream","cauliflower","lasagna","touched tree","brushed tree"],false); -addEntry(["weekend","cycling","break","peanuts","beer"],true); -console.log(myJournal); - -function phi(table){ - return (table[3] * table[0] - table[2] * table[1]) / - Math.sqrt((table[2] + table[3]) * - (table[0] + table[1]) * - (table[1] + table[3]) * - (table[0] + table[2])); -} -console.log(phi([76, 9, 4, 1])) - -var journal = require('./jacques_journal.js'); -function tableFor(event, journal){ - let table = [0,0,0,0]; - for (let i=0; i 0.1 || correlation < -0.1){ - console.log(event + ":", correlation); - } - -} - -console.log("\n\n"); - -for (let entry of journal) { - if (entry.events.includes("peanuts") && - !entry.events.includes("brushed teeth")) { - entry.events.push("peanut teeth"); - } -} -console.log(phi(tableFor("peanut teeth", journal))); - -let todoList = []; -function remember(task){ - todoList.push(task); -} -function getTask(){ - return todoList.shift(); -} -function rememberUrgently(task){ - todoList.unshift(task); //add it at the beginning of the array -} - - -// A function can accept ANY number of params, using the ... notation - Called the REST Parameter -function max(...numbers){ - let result = -Infinity; - for (let number of numbers){ - if (number>result){ - result = number; - } - } - return result; -} - -console.log(max(4,1,9,-2)); -console.log("\n\n"); - -// DESTRUCTURING -// Rewriting phi function in a "destructured way", using square brackets to "look inside" the value, rather than using an array variable -function phiDestructured([n00,n01,n10,n11]){ - return (n11 * n00 - n10 * n01) / - Math.sqrt((n10 + n11) * (n00 + n01) * - (n01 + n11) * (n00 + n10)); -} - -// This can also be done with objects: -let {name} = {name: "Faraji", age: 23}; -console.log(name); -console.log("\n\n"); - -//JSON -// In order to send data, we SERIALIZE data. We basically convert them in a flat notation. JSON = JavaScript Object Notation -// Two functions are used: JSON.stringify and JSON.parse -let string = JSON.stringify({squirrel:false, events: ["weekend"]}); -console.log(string); -console.log(JSON.parse(string).events); \ No newline at end of file diff --git a/Chapter 4/jacques_journal.js b/Chapter 4/jacques_journal.js deleted file mode 100644 index b320263..0000000 --- a/Chapter 4/jacques_journal.js +++ /dev/null @@ -1,97 +0,0 @@ -var JOURNAL = [ - {"events":["carrot","exercise","weekend"],"squirrel":false}, - {"events":["bread","pudding","brushed teeth","weekend","touched tree"],"squirrel":false}, - {"events":["carrot","nachos","brushed teeth","cycling","weekend"],"squirrel":false}, - {"events":["brussel sprouts","ice cream","brushed teeth","computer","weekend"],"squirrel":false}, - {"events":["potatoes","candy","brushed teeth","exercise","weekend","dentist"],"squirrel":false}, - {"events":["brussel sprouts","pudding","brushed teeth","running","weekend"],"squirrel":false}, - {"events":["pizza","brushed teeth","computer","work","touched tree"],"squirrel":false}, - {"events":["bread","beer","brushed teeth","cycling","work"],"squirrel":false}, - {"events":["cauliflower","brushed teeth","work"],"squirrel":false}, - {"events":["pizza","brushed teeth","cycling","work"],"squirrel":false}, - {"events":["lasagna","nachos","brushed teeth","work"],"squirrel":false}, - {"events":["brushed teeth","weekend","touched tree"],"squirrel":false}, - {"events":["lettuce","brushed teeth","television","weekend"],"squirrel":false}, - {"events":["spaghetti","brushed teeth","work"],"squirrel":false}, - {"events":["brushed teeth","computer","work"],"squirrel":false}, - {"events":["lettuce","nachos","brushed teeth","work"],"squirrel":false}, - {"events":["carrot","brushed teeth","running","work"],"squirrel":false}, - {"events":["brushed teeth","work"],"squirrel":false}, - {"events":["cauliflower","reading","weekend"],"squirrel":false}, - {"events":["bread","brushed teeth","weekend"],"squirrel":false}, - {"events":["lasagna","brushed teeth","exercise","work"],"squirrel":false}, - {"events":["spaghetti","brushed teeth","reading","work"],"squirrel":false}, - {"events":["carrot","ice cream","brushed teeth","television","work"],"squirrel":false}, - {"events":["spaghetti","nachos","work"],"squirrel":false}, - {"events":["cauliflower","ice cream","brushed teeth","cycling","work"],"squirrel":false}, - {"events":["spaghetti","peanuts","computer","weekend"],"squirrel":true}, - {"events":["potatoes","ice cream","brushed teeth","computer","weekend"],"squirrel":false}, - {"events":["potatoes","ice cream","brushed teeth","work"],"squirrel":false}, - {"events":["peanuts","brushed teeth","running","work"],"squirrel":false}, - {"events":["potatoes","exercise","work"],"squirrel":false}, - {"events":["pizza","ice cream","computer","work"],"squirrel":false}, - {"events":["lasagna","ice cream","work"],"squirrel":false}, - {"events":["cauliflower","candy","reading","weekend"],"squirrel":false}, - {"events":["lasagna","nachos","brushed teeth","running","weekend"],"squirrel":false}, - {"events":["potatoes","brushed teeth","work"],"squirrel":false}, - {"events":["carrot","work"],"squirrel":false}, - {"events":["pizza","beer","work","dentist"],"squirrel":false}, - {"events":["lasagna","pudding","cycling","work"],"squirrel":false}, - {"events":["spaghetti","brushed teeth","reading","work"],"squirrel":false}, - {"events":["spaghetti","pudding","television","weekend"],"squirrel":false}, - {"events":["bread","brushed teeth","exercise","weekend"],"squirrel":false}, - {"events":["lasagna","peanuts","work"],"squirrel":true}, - {"events":["pizza","work"],"squirrel":false}, - {"events":["potatoes","exercise","work"],"squirrel":false}, - {"events":["brushed teeth","exercise","work"],"squirrel":false}, - {"events":["spaghetti","brushed teeth","television","work"],"squirrel":false}, - {"events":["pizza","cycling","weekend"],"squirrel":false}, - {"events":["carrot","brushed teeth","weekend"],"squirrel":false}, - {"events":["carrot","beer","brushed teeth","work"],"squirrel":false}, - {"events":["pizza","peanuts","candy","work"],"squirrel":true}, - {"events":["carrot","peanuts","brushed teeth","reading","work"],"squirrel":false}, - {"events":["potatoes","peanuts","brushed teeth","work"],"squirrel":false}, - {"events":["carrot","nachos","brushed teeth","exercise","work"],"squirrel":false}, - {"events":["pizza","peanuts","brushed teeth","television","weekend"],"squirrel":false}, - {"events":["lasagna","brushed teeth","cycling","weekend"],"squirrel":false}, - {"events":["cauliflower","peanuts","brushed teeth","computer","work","touched tree"],"squirrel":false}, - {"events":["lettuce","brushed teeth","television","work"],"squirrel":false}, - {"events":["potatoes","brushed teeth","computer","work"],"squirrel":false}, - {"events":["bread","candy","work"],"squirrel":false}, - {"events":["potatoes","nachos","work"],"squirrel":false}, - {"events":["carrot","pudding","brushed teeth","weekend"],"squirrel":false}, - {"events":["carrot","brushed teeth","exercise","weekend","touched tree"],"squirrel":false}, - {"events":["brussel sprouts","running","work"],"squirrel":false}, - {"events":["brushed teeth","work"],"squirrel":false}, - {"events":["lettuce","brushed teeth","running","work"],"squirrel":false}, - {"events":["candy","brushed teeth","work"],"squirrel":false}, - {"events":["brussel sprouts","brushed teeth","computer","work"],"squirrel":false}, - {"events":["bread","brushed teeth","weekend"],"squirrel":false}, - {"events":["cauliflower","brushed teeth","weekend"],"squirrel":false}, - {"events":["spaghetti","candy","television","work","touched tree"],"squirrel":false}, - {"events":["carrot","pudding","brushed teeth","work"],"squirrel":false}, - {"events":["lettuce","brushed teeth","work"],"squirrel":false}, - {"events":["carrot","ice cream","brushed teeth","cycling","work"],"squirrel":false}, - {"events":["pizza","brushed teeth","work"],"squirrel":false}, - {"events":["spaghetti","peanuts","exercise","weekend"],"squirrel":true}, - {"events":["bread","beer","computer","weekend","touched tree"],"squirrel":false}, - {"events":["brushed teeth","running","work"],"squirrel":false}, - {"events":["lettuce","peanuts","brushed teeth","work","touched tree"],"squirrel":false}, - {"events":["lasagna","brushed teeth","television","work"],"squirrel":false}, - {"events":["cauliflower","brushed teeth","running","work"],"squirrel":false}, - {"events":["carrot","brushed teeth","running","work"],"squirrel":false}, - {"events":["carrot","reading","weekend"],"squirrel":false}, - {"events":["carrot","peanuts","reading","weekend"],"squirrel":true}, - {"events":["potatoes","brushed teeth","running","work"],"squirrel":false}, - {"events":["lasagna","ice cream","work","touched tree"],"squirrel":false}, - {"events":["cauliflower","peanuts","brushed teeth","cycling","work"],"squirrel":false}, - {"events":["pizza","brushed teeth","running","work"],"squirrel":false}, - {"events":["lettuce","brushed teeth","work"],"squirrel":false}, - {"events":["bread","brushed teeth","television","weekend"],"squirrel":false}, - {"events":["cauliflower","peanuts","brushed teeth","weekend"],"squirrel":false} - ]; - - // This makes sure the data is exported in node.js — - // `require('./path/to/04_data.js')` will get you the array. - if (typeof module != "undefined" && module.exports) - module.exports = JOURNAL; \ No newline at end of file diff --git a/Chapter 4/report.20200313.152058.59233.0.001.json b/Chapter 4/report.20200313.152058.59233.0.001.json deleted file mode 100644 index fdf2099..0000000 --- a/Chapter 4/report.20200313.152058.59233.0.001.json +++ /dev/null @@ -1,660 +0,0 @@ - -{ - "header": { - "reportVersion": 1, - "event": "Allocation failed - JavaScript heap out of memory", - "trigger": "FatalError", - "filename": "report.20200313.152058.59233.0.001.json", - "dumpEventTime": "2020-03-13T15:20:58Z", - "dumpEventTimeStamp": "1584109258359", - "processId": 59233, - "cwd": "/Users/enricocestari/MyCode/JavaScript-Exercises/Chapter 4", - "commandLine": [ - "node", - "/usr/local/bin/jest" - ], - "nodejsVersion": "v13.6.0", - "wordSize": 64, - "arch": "x64", - "platform": "darwin", - "componentVersions": { - "node": "13.6.0", - "v8": "7.9.317.25-node.26", - "uv": "1.34.0", - "zlib": "1.2.11", - "brotli": "1.0.7", - "ares": "1.15.0", - "modules": "79", - "nghttp2": "1.40.0", - "napi": "5", - "llhttp": "2.0.1", - "openssl": "1.1.1d", - "cldr": "35.1", - "icu": "64.2", - "tz": "2019a", - "unicode": "12.1" - }, - "release": { - "name": "node", - "headersUrl": "https://nodejs.org/download/release/v13.6.0/node-v13.6.0-headers.tar.gz", - "sourceUrl": "https://nodejs.org/download/release/v13.6.0/node-v13.6.0.tar.gz" - }, - "osName": "Darwin", - "osRelease": "19.3.0", - "osVersion": "Darwin Kernel Version 19.3.0: Thu Jan 9 20:58:23 PST 2020; root:xnu-6153.81.5~1/RELEASE_X86_64", - "osMachine": "x86_64", - "cpus": [ - { - "model": "Intel(R) Core(TM) i7-8850H CPU @ 2.60GHz", - "speed": 2600, - "user": 52677460, - "nice": 0, - "sys": 22924400, - "idle": 226029820, - "irq": 0 - }, - { - "model": "Intel(R) Core(TM) i7-8850H CPU @ 2.60GHz", - "speed": 2600, - "user": 1727370, - "nice": 0, - "sys": 1306490, - "idle": 298588430, - "irq": 0 - }, - { - "model": "Intel(R) Core(TM) i7-8850H CPU @ 2.60GHz", - "speed": 2600, - "user": 41214260, - "nice": 0, - "sys": 14981380, - "idle": 245428140, - "irq": 0 - }, - { - "model": "Intel(R) Core(TM) i7-8850H CPU @ 2.60GHz", - "speed": 2600, - "user": 1599900, - "nice": 0, - "sys": 1029830, - "idle": 298992390, - "irq": 0 - }, - { - "model": "Intel(R) Core(TM) i7-8850H CPU @ 2.60GHz", - "speed": 2600, - "user": 31969380, - "nice": 0, - "sys": 11205030, - "idle": 258449040, - "irq": 0 - }, - { - "model": "Intel(R) Core(TM) i7-8850H CPU @ 2.60GHz", - "speed": 2600, - "user": 1605820, - "nice": 0, - "sys": 910840, - "idle": 299105290, - "irq": 0 - }, - { - "model": "Intel(R) Core(TM) i7-8850H CPU @ 2.60GHz", - "speed": 2600, - "user": 24735890, - "nice": 0, - "sys": 8275470, - "idle": 268611780, - "irq": 0 - }, - { - "model": "Intel(R) Core(TM) i7-8850H CPU @ 2.60GHz", - "speed": 2600, - "user": 1623440, - "nice": 0, - "sys": 817730, - "idle": 299180600, - "irq": 0 - }, - { - "model": "Intel(R) Core(TM) i7-8850H CPU @ 2.60GHz", - "speed": 2600, - "user": 20408910, - "nice": 0, - "sys": 6444520, - "idle": 274769380, - "irq": 0 - }, - { - "model": "Intel(R) Core(TM) i7-8850H CPU @ 2.60GHz", - "speed": 2600, - "user": 1595690, - "nice": 0, - "sys": 743970, - "idle": 299281950, - "irq": 0 - }, - { - "model": "Intel(R) Core(TM) i7-8850H CPU @ 2.60GHz", - "speed": 2600, - "user": 15869350, - "nice": 0, - "sys": 4625500, - "idle": 281127650, - "irq": 0 - }, - { - "model": "Intel(R) Core(TM) i7-8850H CPU @ 2.60GHz", - "speed": 2600, - "user": 1568860, - "nice": 0, - "sys": 670510, - "idle": 299382050, - "irq": 0 - } - ], - "networkInterfaces": [ - { - "name": "lo0", - "internal": true, - "mac": "00:00:00:00:00:00", - "address": "127.0.0.1", - "netmask": "255.0.0.0", - "family": "IPv4" - }, - { - "name": "lo0", - "internal": true, - "mac": "00:00:00:00:00:00", - "address": "::1", - "netmask": "ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff", - "family": "IPv6", - "scopeid": 0 - }, - { - "name": "lo0", - "internal": true, - "mac": "00:00:00:00:00:00", - "address": "fe80::1", - "netmask": "ffff:ffff:ffff:ffff::", - "family": "IPv6", - "scopeid": 1 - }, - { - "name": "en5", - "internal": false, - "mac": "ac:de:48:00:11:22", - "address": "fe80::aede:48ff:fe00:1122", - "netmask": "ffff:ffff:ffff:ffff::", - "family": "IPv6", - "scopeid": 4 - }, - { - "name": "en0", - "internal": false, - "mac": "38:f9:d3:8e:2a:58", - "address": "192.168.1.6", - "netmask": "255.255.255.0", - "family": "IPv4" - }, - { - "name": "awdl0", - "internal": false, - "mac": "5a:82:ae:b4:dc:dc", - "address": "fe80::5882:aeff:feb4:dcdc", - "netmask": "ffff:ffff:ffff:ffff::", - "family": "IPv6", - "scopeid": 8 - }, - { - "name": "llw0", - "internal": false, - "mac": "5a:82:ae:b4:dc:dc", - "address": "fe80::5882:aeff:feb4:dcdc", - "netmask": "ffff:ffff:ffff:ffff::", - "family": "IPv6", - "scopeid": 9 - }, - { - "name": "utun0", - "internal": false, - "mac": "00:00:00:00:00:00", - "address": "fe80::64fe:bd06:4e62:3da8", - "netmask": "ffff:ffff:ffff:ffff::", - "family": "IPv6", - "scopeid": 15 - }, - { - "name": "utun1", - "internal": false, - "mac": "00:00:00:00:00:00", - "address": "fe80::70f9:b64c:bab3:f4c8", - "netmask": "ffff:ffff:ffff:ffff::", - "family": "IPv6", - "scopeid": 16 - }, - { - "name": "utun2", - "internal": false, - "mac": "00:00:00:00:00:00", - "address": "172.16.0.19", - "netmask": "255.255.255.0", - "family": "IPv4" - } - ], - "host": "ip-192-168-1-6.eu-west-1.compute.internal" - }, - "javascriptStack": { - "message": "No stack.", - "stack": [ - "Unavailable." - ] - }, - "nativeStack": [ - { - "pc": "0x000000010015c617", - "symbol": "report::TriggerNodeReport(v8::Isolate*, node::Environment*, char const*, char const*, std::__1::basic_string, std::__1::allocator > const&, v8::Local) [/usr/local/bin/node]" - }, - { - "pc": "0x0000000100084798", - "symbol": "node::OnFatalError(char const*, char const*) [/usr/local/bin/node]" - }, - { - "pc": "0x000000010017f78d", - "symbol": "v8::Utils::ReportOOMFailure(v8::internal::Isolate*, char const*, bool) [/usr/local/bin/node]" - }, - { - "pc": "0x000000010017f737", - "symbol": "v8::internal::V8::FatalProcessOutOfMemory(v8::internal::Isolate*, char const*, bool) [/usr/local/bin/node]" - }, - { - "pc": "0x0000000100299763", - "symbol": "v8::internal::Heap::FatalProcessOutOfMemory(char const*) [/usr/local/bin/node]" - }, - { - "pc": "0x000000010027c6b5", - "symbol": "v8::internal::Factory::AllocateRawFixedArray(int, v8::internal::AllocationType) [/usr/local/bin/node]" - }, - { - "pc": "0x000000010027b31c", - "symbol": "v8::internal::Factory::NewFixedArrayWithFiller(v8::internal::RootIndex, int, v8::internal::Object, v8::internal::AllocationType) [/usr/local/bin/node]" - }, - { - "pc": "0x0000000100384b01", - "symbol": "v8::internal::(anonymous namespace)::ElementsAccessorBase >::ConvertElementsWithCapacity(v8::internal::Handle, v8::internal::Handle, v8::internal::ElementsKind, unsigned int, unsigned int, unsigned int) [/usr/local/bin/node]" - }, - { - "pc": "0x0000000100383808", - "symbol": "v8::internal::(anonymous namespace)::ElementsAccessorBase >::GrowCapacity(v8::internal::Handle, unsigned int) [/usr/local/bin/node]" - }, - { - "pc": "0x00000001004bf68e", - "symbol": "v8::internal::Runtime_GrowArrayElements(int, unsigned long*, v8::internal::Isolate*) [/usr/local/bin/node]" - }, - { - "pc": "0x0000000100750039", - "symbol": "Builtins_CEntry_Return1_DontSaveFPRegs_ArgvOnStack_NoBuiltinExit [/usr/local/bin/node]" - } - ], - "javascriptHeap": { - "totalMemory": 2786578432, - "totalCommittedMemory": 2785689472, - "usedMemory": 2738228256, - "availableMemory": 16758784, - "memoryLimit": 2197815296, - "heapSpaces": { - "read_only_space": { - "memorySize": 262144, - "committedMemory": 33328, - "capacity": 33040, - "used": 33040, - "available": 0 - }, - "new_space": { - "memorySize": 33554432, - "committedMemory": 33546304, - "capacity": 16758784, - "used": 0, - "available": 16758784 - }, - "old_space": { - "memorySize": 49684480, - "committedMemory": 49313952, - "capacity": 36319544, - "used": 36319544, - "available": 0 - }, - "code_space": { - "memorySize": 692224, - "committedMemory": 513568, - "capacity": 421024, - "used": 421024, - "available": 0 - }, - "map_space": { - "memorySize": 2363392, - "committedMemory": 2260560, - "capacity": 1519440, - "used": 1519440, - "available": 0 - }, - "large_object_space": { - "memorySize": 1797459968, - "committedMemory": 1797459968, - "capacity": 1797421544, - "used": 1797421544, - "available": 0 - }, - "code_large_object_space": { - "memorySize": 49152, - "committedMemory": 49152, - "capacity": 2784, - "used": 2784, - "available": 0 - }, - "new_large_object_space": { - "memorySize": 902512640, - "committedMemory": 902512640, - "capacity": 902510880, - "used": 902510880, - "available": 0 - } - } - }, - "resourceUsage": { - "userCpuSeconds": 12.5112, - "kernelCpuSeconds": 0.877147, - "cpuConsumptionPercent": 102.987, - "maxRss": 2888235483136, - "pageFaults": { - "IORequired": 24, - "IONotRequired": 710445 - }, - "fsActivity": { - "reads": 0, - "writes": 0 - } - }, - "libuv": [ - ], - "environmentVariables": { - "USER": "enricocestari", - "PATH": "/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin", - "LOGNAME": "enricocestari", - "SSH_AUTH_SOCK": "/private/tmp/com.apple.launchd.JGMg0A1oXV/Listeners", - "HOME": "/Users/enricocestari", - "SHELL": "/bin/zsh", - "__CF_USER_TEXT_ENCODING": "0x1F5:0x0:0x4", - "TMPDIR": "/var/folders/6f/8q77h2s95lvgl9hsb8wqrt5m0000gn/T/", - "XPC_SERVICE_NAME": "0", - "XPC_FLAGS": "0x0", - "TERMINUS_PLUGINS": "", - "TERM": "xterm-256color", - "TERM_PROGRAM": "Terminus", - "LANG": "en_US.UTF-8", - "LC_ALL": "en_US.UTF-8", - "LC_MESSAGES": "en_US.UTF-8", - "LC_NUMERIC": "en_US.UTF-8", - "LC_COLLATE": "en_US.UTF-8", - "LC_MONETARY": "en_US.UTF-8", - "PWD": "/Users/enricocestari/MyCode/JavaScript-Exercises/Chapter 4", - "SHLVL": "1", - "OLDPWD": "/Users/enricocestari/MyCode/JavaScript-Exercises/Chapter 3", - "_": "/usr/local/bin/jest", - "NODE_ENV": "test", - "JEST_WORKER_ID": "1" - }, - "userLimits": { - "core_file_size_blocks": { - "soft": 0, - "hard": "unlimited" - }, - "data_seg_size_kbytes": { - "soft": "unlimited", - "hard": "unlimited" - }, - "file_size_blocks": { - "soft": "unlimited", - "hard": "unlimited" - }, - "max_locked_memory_bytes": { - "soft": "unlimited", - "hard": "unlimited" - }, - "max_memory_size_kbytes": { - "soft": "unlimited", - "hard": "unlimited" - }, - "open_files": { - "soft": 24576, - "hard": "unlimited" - }, - "stack_size_bytes": { - "soft": 8388608, - "hard": 67104768 - }, - "cpu_time_seconds": { - "soft": "unlimited", - "hard": "unlimited" - }, - "max_user_processes": { - "soft": 2784, - "hard": 4176 - }, - "virtual_memory_kbytes": { - "soft": "unlimited", - "hard": "unlimited" - } - }, - "sharedObjects": [ - "/usr/local/bin/node", - "/usr/local/opt/icu4c/lib/libicui18n.64.dylib", - "/usr/local/opt/icu4c/lib/libicuuc.64.dylib", - "/usr/local/opt/icu4c/lib/libicudata.64.dylib", - "/System/Library/Frameworks/CoreFoundation.framework/Versions/A/CoreFoundation", - "/usr/lib/libSystem.B.dylib", - "/usr/lib/libc++.1.dylib", - "/usr/lib/system/libcache.dylib", - "/usr/lib/system/libcommonCrypto.dylib", - "/usr/lib/system/libcompiler_rt.dylib", - "/usr/lib/system/libcopyfile.dylib", - "/usr/lib/system/libcorecrypto.dylib", - "/usr/lib/system/libdispatch.dylib", - "/usr/lib/system/libdyld.dylib", - "/usr/lib/system/libkeymgr.dylib", - "/usr/lib/system/liblaunch.dylib", - "/usr/lib/system/libmacho.dylib", - "/usr/lib/system/libquarantine.dylib", - "/usr/lib/system/libremovefile.dylib", - "/usr/lib/system/libsystem_asl.dylib", - "/usr/lib/system/libsystem_blocks.dylib", - "/usr/lib/system/libsystem_c.dylib", - "/usr/lib/system/libsystem_configuration.dylib", - "/usr/lib/system/libsystem_coreservices.dylib", - "/usr/lib/system/libsystem_darwin.dylib", - "/usr/lib/system/libsystem_dnssd.dylib", - "/usr/lib/system/libsystem_featureflags.dylib", - "/usr/lib/system/libsystem_info.dylib", - "/usr/lib/system/libsystem_m.dylib", - "/usr/lib/system/libsystem_malloc.dylib", - "/usr/lib/system/libsystem_networkextension.dylib", - "/usr/lib/system/libsystem_notify.dylib", - "/usr/lib/system/libsystem_sandbox.dylib", - "/usr/lib/system/libsystem_secinit.dylib", - "/usr/lib/system/libsystem_kernel.dylib", - "/usr/lib/system/libsystem_platform.dylib", - "/usr/lib/system/libsystem_pthread.dylib", - "/usr/lib/system/libsystem_symptoms.dylib", - "/usr/lib/system/libsystem_trace.dylib", - "/usr/lib/system/libunwind.dylib", - "/usr/lib/system/libxpc.dylib", - "/usr/lib/libobjc.A.dylib", - "/usr/lib/libc++abi.dylib", - "/usr/lib/libfakelink.dylib", - "/usr/lib/libDiagnosticMessagesClient.dylib", - "/usr/lib/libicucore.A.dylib", - "/usr/lib/libz.1.dylib", - "/System/Library/Frameworks/ApplicationServices.framework/Versions/A/ApplicationServices", - "/System/Library/Frameworks/CoreGraphics.framework/Versions/A/CoreGraphics", - "/System/Library/Frameworks/CoreText.framework/Versions/A/CoreText", - "/System/Library/Frameworks/ImageIO.framework/Versions/A/ImageIO", - "/System/Library/Frameworks/ColorSync.framework/Versions/A/ColorSync", - "/System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/ATS.framework/Versions/A/ATS", - "/System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/ColorSyncLegacy.framework/Versions/A/ColorSyncLegacy", - "/System/Library/Frameworks/CoreServices.framework/Versions/A/CoreServices", - "/System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/HIServices.framework/Versions/A/HIServices", - "/System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/LangAnalysis.framework/Versions/A/LangAnalysis", - "/System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/PrintCore.framework/Versions/A/PrintCore", - "/System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/QD.framework/Versions/A/QD", - "/System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/SpeechSynthesis.framework/Versions/A/SpeechSynthesis", - "/System/Library/PrivateFrameworks/SkyLight.framework/Versions/A/SkyLight", - "/System/Library/PrivateFrameworks/FontServices.framework/libFontParser.dylib", - "/System/Library/Frameworks/Accelerate.framework/Versions/A/Accelerate", - "/System/Library/Frameworks/IOSurface.framework/Versions/A/IOSurface", - "/usr/lib/libxml2.2.dylib", - "/System/Library/Frameworks/CFNetwork.framework/Versions/A/CFNetwork", - "/System/Library/Frameworks/Foundation.framework/Versions/C/Foundation", - "/System/Library/PrivateFrameworks/WatchdogClient.framework/Versions/A/WatchdogClient", - "/usr/lib/libcompression.dylib", - "/System/Library/Frameworks/SystemConfiguration.framework/Versions/A/SystemConfiguration", - "/System/Library/Frameworks/CoreDisplay.framework/Versions/A/CoreDisplay", - "/System/Library/PrivateFrameworks/IOAccelerator.framework/Versions/A/IOAccelerator", - "/System/Library/Frameworks/IOKit.framework/Versions/A/IOKit", - "/System/Library/Frameworks/Metal.framework/Versions/A/Metal", - "/System/Library/Frameworks/MetalPerformanceShaders.framework/Versions/A/MetalPerformanceShaders", - "/System/Library/PrivateFrameworks/MultitouchSupport.framework/Versions/A/MultitouchSupport", - "/System/Library/Frameworks/Security.framework/Versions/A/Security", - "/System/Library/Frameworks/QuartzCore.framework/Versions/A/QuartzCore", - "/usr/lib/libbsm.0.dylib", - "/usr/lib/liblzma.5.dylib", - "/usr/lib/libauto.dylib", - "/System/Library/Frameworks/DiskArbitration.framework/Versions/A/DiskArbitration", - "/usr/lib/libarchive.2.dylib", - "/usr/lib/liblangid.dylib", - "/usr/lib/libCRFSuite.dylib", - "/usr/lib/libenergytrace.dylib", - "/usr/lib/system/libkxld.dylib", - "/System/Library/PrivateFrameworks/AppleFSCompression.framework/Versions/A/AppleFSCompression", - "/usr/lib/libcoretls.dylib", - "/usr/lib/libcoretls_cfhelpers.dylib", - "/usr/lib/libpam.2.dylib", - "/usr/lib/libsqlite3.dylib", - "/usr/lib/libxar.1.dylib", - "/usr/lib/libbz2.1.0.dylib", - "/usr/lib/libiconv.2.dylib", - "/usr/lib/libcharset.1.dylib", - "/usr/lib/libnetwork.dylib", - "/usr/lib/libpcap.A.dylib", - "/usr/lib/libapple_nghttp2.dylib", - "/System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/FSEvents.framework/Versions/A/FSEvents", - "/System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/CarbonCore.framework/Versions/A/CarbonCore", - "/System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/Metadata.framework/Versions/A/Metadata", - "/System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/OSServices.framework/Versions/A/OSServices", - "/System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/SearchKit.framework/Versions/A/SearchKit", - "/System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/AE.framework/Versions/A/AE", - "/System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/LaunchServices.framework/Versions/A/LaunchServices", - "/System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/DictionaryServices.framework/Versions/A/DictionaryServices", - "/System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/SharedFileList.framework/Versions/A/SharedFileList", - "/System/Library/Frameworks/NetFS.framework/Versions/A/NetFS", - "/System/Library/PrivateFrameworks/NetAuth.framework/Versions/A/NetAuth", - "/System/Library/PrivateFrameworks/login.framework/Versions/A/Frameworks/loginsupport.framework/Versions/A/loginsupport", - "/System/Library/PrivateFrameworks/TCC.framework/Versions/A/TCC", - "/System/Library/PrivateFrameworks/CoreNLP.framework/Versions/A/CoreNLP", - "/System/Library/PrivateFrameworks/MetadataUtilities.framework/Versions/A/MetadataUtilities", - "/usr/lib/libmecabra.dylib", - "/usr/lib/libmecab.dylib", - "/usr/lib/libgermantok.dylib", - "/usr/lib/libThaiTokenizer.dylib", - "/usr/lib/libChineseTokenizer.dylib", - "/System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vImage.framework/Versions/A/vImage", - "/System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/vecLib", - "/System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/libvMisc.dylib", - "/System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/libvDSP.dylib", - "/System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/libBLAS.dylib", - "/System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/libLAPACK.dylib", - "/System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/libLinearAlgebra.dylib", - "/System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/libSparseBLAS.dylib", - "/System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/libQuadrature.dylib", - "/System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/libBNNS.dylib", - "/System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/libSparse.dylib", - "/System/Library/PrivateFrameworks/LanguageModeling.framework/Versions/A/LanguageModeling", - "/System/Library/PrivateFrameworks/CoreEmoji.framework/Versions/A/CoreEmoji", - "/System/Library/PrivateFrameworks/LinguisticData.framework/Versions/A/LinguisticData", - "/System/Library/PrivateFrameworks/Lexicon.framework/Versions/A/Lexicon", - "/usr/lib/libcmph.dylib", - "/System/Library/Frameworks/OpenDirectory.framework/Versions/A/Frameworks/CFOpenDirectory.framework/Versions/A/CFOpenDirectory", - "/System/Library/Frameworks/OpenDirectory.framework/Versions/A/OpenDirectory", - "/System/Library/PrivateFrameworks/APFS.framework/Versions/A/APFS", - "/System/Library/Frameworks/SecurityFoundation.framework/Versions/A/SecurityFoundation", - "/usr/lib/libutil.dylib", - "/System/Library/PrivateFrameworks/CoreServicesStore.framework/Versions/A/CoreServicesStore", - "/System/Library/Frameworks/ServiceManagement.framework/Versions/A/ServiceManagement", - "/System/Library/PrivateFrameworks/BackgroundTaskManagement.framework/Versions/A/BackgroundTaskManagement", - "/usr/lib/libxslt.1.dylib", - "/System/Library/PrivateFrameworks/GPUWrangler.framework/Versions/A/GPUWrangler", - "/System/Library/PrivateFrameworks/IOPresentment.framework/Versions/A/IOPresentment", - "/System/Library/PrivateFrameworks/DSExternalDisplay.framework/Versions/A/DSExternalDisplay", - "/System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries/libCoreFSCache.dylib", - "/System/Library/Frameworks/MetalPerformanceShaders.framework/Frameworks/MPSCore.framework/Versions/A/MPSCore", - "/System/Library/Frameworks/MetalPerformanceShaders.framework/Frameworks/MPSImage.framework/Versions/A/MPSImage", - "/System/Library/Frameworks/MetalPerformanceShaders.framework/Frameworks/MPSNeuralNetwork.framework/Versions/A/MPSNeuralNetwork", - "/System/Library/Frameworks/MetalPerformanceShaders.framework/Frameworks/MPSMatrix.framework/Versions/A/MPSMatrix", - "/System/Library/Frameworks/MetalPerformanceShaders.framework/Frameworks/MPSRayIntersector.framework/Versions/A/MPSRayIntersector", - "/System/Library/Frameworks/MetalPerformanceShaders.framework/Frameworks/MPSNDArray.framework/Versions/A/MPSNDArray", - "/System/Library/PrivateFrameworks/MetalTools.framework/Versions/A/MetalTools", - "/System/Library/PrivateFrameworks/AggregateDictionary.framework/Versions/A/AggregateDictionary", - "/System/Library/PrivateFrameworks/CoreAnalytics.framework/Versions/A/CoreAnalytics", - "/System/Library/PrivateFrameworks/AppleSauce.framework/Versions/A/AppleSauce", - "/usr/lib/libMobileGestalt.dylib", - "/System/Library/PrivateFrameworks/AppleSystemInfo.framework/Versions/A/AppleSystemInfo", - "/usr/lib/libIOReport.dylib", - "/System/Library/Frameworks/CoreImage.framework/Versions/A/CoreImage", - "/System/Library/Frameworks/CoreVideo.framework/Versions/A/CoreVideo", - "/System/Library/Frameworks/OpenGL.framework/Versions/A/OpenGL", - "/System/Library/PrivateFrameworks/GraphVisualizer.framework/Versions/A/GraphVisualizer", - "/System/Library/PrivateFrameworks/FaceCore.framework/Versions/A/FaceCore", - "/System/Library/Frameworks/OpenCL.framework/Versions/A/OpenCL", - "/usr/lib/libFosl_dynamic.dylib", - "/System/Library/PrivateFrameworks/OTSVG.framework/Versions/A/OTSVG", - "/System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/ATS.framework/Versions/A/Resources/libFontRegistry.dylib", - "/usr/lib/libate.dylib", - "/System/Library/Frameworks/ImageIO.framework/Versions/A/Resources/libJPEG.dylib", - "/System/Library/Frameworks/ImageIO.framework/Versions/A/Resources/libTIFF.dylib", - "/System/Library/Frameworks/ImageIO.framework/Versions/A/Resources/libPng.dylib", - "/System/Library/Frameworks/ImageIO.framework/Versions/A/Resources/libGIF.dylib", - "/System/Library/Frameworks/ImageIO.framework/Versions/A/Resources/libJP2.dylib", - "/System/Library/Frameworks/ImageIO.framework/Versions/A/Resources/libRadiance.dylib", - "/usr/lib/libexpat.1.dylib", - "/System/Library/PrivateFrameworks/AppleJPEG.framework/Versions/A/AppleJPEG", - "/System/Library/PrivateFrameworks/FontServices.framework/libhvf.dylib", - "/System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries/libGFXShared.dylib", - "/System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries/libGLU.dylib", - "/System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries/libGL.dylib", - "/System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries/libGLImage.dylib", - "/System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries/libCVMSPluginSupport.dylib", - "/System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries/libCoreVMClient.dylib", - "/usr/lib/libncurses.5.4.dylib", - "/System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/ATSUI.framework/Versions/A/ATSUI", - "/usr/lib/libcups.2.dylib", - "/System/Library/Frameworks/Kerberos.framework/Versions/A/Kerberos", - "/System/Library/Frameworks/GSS.framework/Versions/A/GSS", - "/usr/lib/libresolv.9.dylib", - "/System/Library/PrivateFrameworks/Heimdal.framework/Versions/A/Heimdal", - "/System/Library/Frameworks/Kerberos.framework/Versions/A/Libraries/libHeimdalProxy.dylib", - "/usr/lib/libheimdal-asn1.dylib", - "/System/Library/PrivateFrameworks/CommonAuth.framework/Versions/A/CommonAuth", - "/System/Library/Frameworks/CoreAudio.framework/Versions/A/CoreAudio", - "/System/Library/Frameworks/AudioToolbox.framework/Versions/A/AudioToolbox", - "/System/Library/PrivateFrameworks/AssertionServices.framework/Versions/A/AssertionServices", - "/System/Library/PrivateFrameworks/AudioToolboxCore.framework/Versions/A/AudioToolboxCore", - "/System/Library/PrivateFrameworks/caulk.framework/Versions/A/caulk", - "/System/Library/PrivateFrameworks/BaseBoard.framework/Versions/A/BaseBoard", - "/System/Library/PrivateFrameworks/RunningBoardServices.framework/Versions/A/RunningBoardServices", - "/System/Library/PrivateFrameworks/PersistentConnection.framework/Versions/A/PersistentConnection", - "/System/Library/PrivateFrameworks/ProtocolBuffer.framework/Versions/A/ProtocolBuffer", - "/System/Library/PrivateFrameworks/CommonUtilities.framework/Versions/A/CommonUtilities", - "/System/Library/PrivateFrameworks/Bom.framework/Versions/A/Bom", - "/usr/lib/libAudioToolboxUtility.dylib", - "/Users/enricocestari/.config/yarn/global/node_modules/fsevents/build/Release/fse.node" - ] -} \ No newline at end of file