Day 8 - Advent of Code 2021. adventofcode.com . Accessed Mar 7, 2022. Part I Description You barely reach the safety of the cave when the whale smashes into the cave mouth, collapsing it. Sensors indicate another exit to this cave at a much greater depth, so you have no choice but to press on.
As your submarine slowly makes its way through the cave system, you notice that the four-digit seven-segment displays in your submarine are malfunctioning; they must have been damaged during the escape....
This page contains remarks on Haskell that I encountered when working with source files that span multiple AoC 2021 problems.
and have Haskell solutions. It’ll be nice to compare how they solved the problems. I don’t want to end up perfecting the wrong approach!
Setting Up Haskell Env for AoC To manage dependencies, Cabal and Stack are pretty popular. Stack incorporates the Cabal build system....
Day 1 - Advent of Code 2021: Sonar Sweep. adventofcode.com . Accessed Feb 18, 2022. Part One As the submarine drops below the surface of the ocean, it automatically performs a sonar sweep of the nearby sea floor. On a small screen, the sonar weep report (your puzzle input) appears: each line is a measurement of the sea floor depth as the sweep looks further and further away from the submarine....
Formal Software Design Alloy is an open-source language and analyzer for software modeling. An Alloy model is a collection of constraints that describe a set of structures, e.g. all possible security configurations of a web application. Alloy’s tool, the Alloy Analyzer is a solver that takes the constraints of a model and finds structures that satisfy them.
📑 The Alloy Analyzer leverages a SAT solver, and this precludes Alloy from analyzing optimization problems....
Dependency Management Golang introduced a new library referencing mode to overcome limitations of the old one. While the two library modes are supported by Golang, they are incompatible, e.g. dependency management (DM) issues, reference inconsistencies, build failures, etc. did an empirical study that resulted in HERO, an automated technique to detect DM issues and suggest fixes. Applied to 19k Golang projects, HERO detected 98.5% on a DM issue benchmark, and found 2,422 new DM issues in 2,356 Golang projects....
Meta 📑 Instead of changing the data or learners in multiple ways and then see if fairness improves, postulate that the root causes of bias are the prior decisions that generated the training data. These affect (a) what data was selected, and (b) the labels assigned to the examples. They propose the \(\text{Fair-SMOTE}\) (Fair Synthetic Minority Over Sampling Technique) algorithm which (1) removes biased labels (via situation testing: if the model’s prediction for a data point changes once all of the data points' protected attributes are flipped, then that label is biased and the data point is discarded), and (2) rebalances internal distributions such that based on a protected attribute, examples are equal in both positive and negative classes....
On the Phenomenon of Bullshit Jobs Capitalism is meant to eliminate bullshit jobs, yet layoffs tend to fall on people making, moving, fixing and maintaining things, but not on the salaried paper pushers that effectively work 15 hours a week.
From a political standpoint, a happy productive population with free time on their hands is mortal to the ruling class. Moreover, work is considered a moral value in itself....
The Subject The number of words aren’t intuitive to me. Adults tend to read non-fiction at 238 words per minute. So a good test for how appropriate a piece of writing is, “Can the writer cover X in N minutes?”
Hugo uses 213 WPM, while Medium uses 265 WPM, suggesting Medium has a bias for skimming over close reading.
I wonder if a browser extension that rates the appropriateness of articles given their subject and their word count is a feasible/desirable thing....
Cross-site Request Forgery (XSRF) <img src="http://bank.com/transfer?from=from_ID&to=to_ID&value=1000"> Because the user is logged in and has a cookie, the victim site trusts the user’s browser.
The attacker gets user/browser to execute command on victim site, e.g. request a link, post a form. The command has permanent effects.
A frame can navigate its immediate children. Why is it designed such that it can’t navigate its children too?
Consider a website with a login frame, where the user inputs passwords....
Link to Original Video ML Usefulness to a Dev Reduce time spent programming, e.g. manually crafted spellchecker with rules of thumb vs. feeding ML model some examples. How many words are there in English? Is it hard to have a huge set of all the possible words? How do spellcheckers do it?
Hunspell is the most popular OSS , and it was being used by Chromium , but on Chromium for Windows, the Windows Spellcheck is used ....
Link to Original Video ML Usefulness to a Dev Reduce time spent programming, e.g. manually crafted spellchecker with rules of thumb vs. feeding ML model some examples. How many words are there in English? Is it hard to have a huge set of all the possible words? How do spellcheckers do it?
Hunspell is the most popular OSS , and it was being used by Chromium , but on Chromium for Windows, the Windows Spellcheck is used ....
Problem Statement Let \(d(n)\) be defined as the sum of proper divisors of \(n\) (numbers less than \(n\) which divide evenly into \(n\)).
If \(d(a) = b\) and \(d(b) = a\), where \(a \neq b\), then \(a\) and \(b\) are an amicable pair and each of \(a\) and \(b\) are called amicable numbers.
For example, the proper divisors of \(220\) are \(1, 2, 4, 5, 10, 11, 20, 22, 44, 55, 110\); therefore \(d(220) = 284\)....