New JavaScript Set Methods
New JavaScript Set methods introduced in major browsers like Firefox 127 offer efficient set operations without polyfills. These methods simplify tasks like finding intersections, unions, and subsets, enhancing working with unique collections.
Read original articleNew JavaScript Set methods have been introduced, available in major browser engines since Firefox 127 without the need for polyfills. These methods include intersection(), union(), difference(), symmetricDifference(), isSubsetOf(), isSupersetOf(), and isDisjointFrom(). Sets in JavaScript are unique collections where each value is stored only once, similar to arrays but with guaranteed uniqueness. Sets offer advantages like faster element checks compared to arrays, making them suitable for performance-critical scenarios. The new methods allow for various set operations like finding intersections, unions, differences, and logical comparisons between sets. These operations simplify tasks such as removing duplicates, equality checks, and comparisons. The methods also enable checking for subsets, supersets, and disjoint sets, providing Boolean results for logical checks without returning new sets. Overall, the new JavaScript Set methods enhance the functionality and efficiency of working with unique collections in JavaScript.
Related
The demise of the mildly dynamic website (2022)
The evolution of websites from hand-crafted HTML to PHP enabled dynamic web apps with simple deployment. PHP's decline led to static site generators replacing mildly dynamic sites, shifting to JavaScript for features like comments.
Exposition of Front End Build Systems
Frontend build systems are crucial in web development, involving transpilation, bundling, and minification steps. Tools like Babel and Webpack optimize code for performance and developer experience. Various bundlers like Webpack, Rollup, Parcel, esbuild, and Turbopack are compared for features and performance.
Software Engineering Practices (2022)
Gergely Orosz sparked a Twitter discussion on software engineering practices. Simon Willison elaborated on key practices in a blog post, emphasizing documentation, test data creation, database migrations, templates, code formatting, environment setup automation, and preview environments. Willison highlights the productivity and quality benefits of investing in these practices and recommends tools like Docker, Gitpod, and Codespaces for implementation.
Asynchronous Consensus Without Trusted Setup or Public-Key Cryptography
Researchers propose an Asynchronous Common Subset (ACS) protocol for Byzantine consensus without trusted setup or public-key cryptography. The protocol uses hash functions, offers post-quantum security, and introduces new primitives. Efficiently evaluated in a geo-distributed setting.
Gren 0.4: New Foundations
Gren 0.4 updates its functional language with enhanced core packages, a new compiler, revamped FileSystem API, improved functions, and a community shift to Discord. These updates aim to boost usability and community engagement.
What optimisations allow that? As sets in javascript maintain insertion order, aren’t lookups O(n) ?
Not sure when I'll have a chance to use them but seems pretty comprehensive in covering all the basics.
Result : [-2,-7,2,6]
Ladies and Gentlemen, the lingua franca of web programming.
Do Java next!
Related
The demise of the mildly dynamic website (2022)
The evolution of websites from hand-crafted HTML to PHP enabled dynamic web apps with simple deployment. PHP's decline led to static site generators replacing mildly dynamic sites, shifting to JavaScript for features like comments.
Exposition of Front End Build Systems
Frontend build systems are crucial in web development, involving transpilation, bundling, and minification steps. Tools like Babel and Webpack optimize code for performance and developer experience. Various bundlers like Webpack, Rollup, Parcel, esbuild, and Turbopack are compared for features and performance.
Software Engineering Practices (2022)
Gergely Orosz sparked a Twitter discussion on software engineering practices. Simon Willison elaborated on key practices in a blog post, emphasizing documentation, test data creation, database migrations, templates, code formatting, environment setup automation, and preview environments. Willison highlights the productivity and quality benefits of investing in these practices and recommends tools like Docker, Gitpod, and Codespaces for implementation.
Asynchronous Consensus Without Trusted Setup or Public-Key Cryptography
Researchers propose an Asynchronous Common Subset (ACS) protocol for Byzantine consensus without trusted setup or public-key cryptography. The protocol uses hash functions, offers post-quantum security, and introduces new primitives. Efficiently evaluated in a geo-distributed setting.
Gren 0.4: New Foundations
Gren 0.4 updates its functional language with enhanced core packages, a new compiler, revamped FileSystem API, improved functions, and a community shift to Discord. These updates aim to boost usability and community engagement.