That's a helpful tutorial, thanks.
HN user
spappal
Align with the rest of the system, when sqlite is used as a component in a system which mainly speaks json.
Performance, when records are complex and usually not accessed.
Ease, avoiding/postponing table design decisions.
Flexibility, for one of many corner-cases (since sqlite is a very broad tool).
Incremental enhancement, e.g. when starting with sqlite as replacement to an ndjson-file and incrementally taking advantage of transactions and indexes on fields [1,2,3].
For example, several of these could apply when doing structured logging to a sqlite database.
[1]: https://www.sqlite.org/expridx.html
[2]: https://www.sqlite.org/gencol.html
[3]: https://antonz.org/json-virtual-columns/
See also: https://www.sqlite.org/json1.htmlI got good use of the run-time type checking of typeguard [0] when I recently invoked it via its pytest plugin [2]. For all code visited in the test suite, you get a failing test whenever an actual type differs from an annotated type.
[0] https://github.com/agronholm/typeguard/
[1] https://typeguard.readthedocs.io/en/latest/userguide.html#us...
Firefox supports custom search engines, the most bang for the buck custom search engine must be https://duckduckgo.com/?q=%s with keyword being the letter d. Then you get all these 13000+ bangs without having to configure the custom search engines. E.g. write "d !drive term" in url bar. And "d !w hacker news" sends you directly to https://en.wikipedia.org/wiki/Hacker_News
The author of that macro PEP [0] is the same Mark Shannon behind the speedup proposal under discussion.
The reason for magnetic field strength falling off as 1/r^3 is interesting: the biot-savart law says that magnetic field falls off as 1/r^2 from a magnetic source, but in reality sources tend to be better approximated by magnetic dipoles than magnetic monopoles. A "north pole" is always accompanied by a "south pole", and at distance there are "interaction effects" such that a part of the field strength is "canceled out".
the properties of the hashes [g]it uses
Git uses SHA-1, a hardened version since 2017, and are now doing per-repo upgrades to SHA-256 [0]. Lots of repos are presumably still on SHA-1 (and users on older versions of git).
As of 2020, chosen-prefix attacks against SHA-1 are now practical. [verbatim from 1] But I don't think second preimage attacks are practical yet.
Linus Torvalds argued in 2006 basically that it's irrelevant whether git's hash function is second preimage resistant. Selective quoting:
remember that the git model is that you should primarily trust only your _own_ repository [2]
[a malicious] collision is entirely a non-issue: you'll get a "bad" repository that is different from what the attacker intended, but since you'll never actually use his colliding object, it's _literally_ no different from the attacker just not having found a collision at all [2]
All that is just to say: git originally chose its hashes for the above mentioned "git model", thus didn't 100 % care about second preimage resistance. For your suggested search engine, depending on how the database is collected you might not be able to trust "your own repository" (if it's crowdsourced I could register another codebase with the same hash as Linux). A second preimage resistant hash function would be a requirement for the suggested use case.
[0] https://git-scm.com/docs/hash-function-transition/
Since toast is discussed on HN: I remember this video [0] nicely explaining some nice engineering of an interesting toaster.
Compact summaries are useful when revisiting something that was learnt before. Such a document might be more useful for mathematics than most subjects, since many have studied maths but stopped using it, and those teachings are generally still true and relevant.
The doc would be at least 20 % more useful to me if the pdf had a table of contents. Should be easy to include assuming that it was written with latex. Opinion: when writing a lengthy latex document, the extra 0.5 % of work required to add automated pdf metadata (table of contents, clickable references) has outsized usability effects.
I stumbled upon typos:
* "Basel problem formula": pi should be squared.
* The "more general" statement related to Bayes theorem lacks a right parenthesis.
And PEP 8 doesn't mention sorting the imports. There are even counterexamples which aren't alphabetically sorted. It does mention grouping though.
Since Python imports can have side effects, the order can matter. But to the extent that it doesn't break anything, alphabetically sorted groups seems deterministic and readable.
I think this might be the most popular implementation for auto-sorting: https://pypi.org/project/isort/
See also: the paper "Why Most Published Research Findings Are False". Previously on HN: https://news.ycombinator.com/item?id=1825007
This was spotted on HN 3 weeks ago: https://github.com/schollz/croc
P(simultaneously within middle 50 % of n independent distributions) = 0.5^n = 2^(-n), like my parent comment says.
But interestingly, every relevant comment here either got something wrong about the final frequency or percentage, or corrected the wrong thing. (Parent comment, grandparent, 2 aunts and 1 cousin.)
0.5^10 = 2^-10 = 1/(2^10) = 1/1024 [i.e. exactly 1 person per 1024] ~= 0.00097656 ~= 0.09766 %.
0.9^9
Wayback Machine to the rescue: https://web.archive.org/web/20121023081714/https://kturtleco...
I recommend adding bookmarklets for Wayback Machine: https://en.wikipedia.org/wiki/Help:Using_the_Wayback_Machine...
remember that deaf-blind people exist [... ...] able to understand language
I got curious if/how deafblind people learn to communicate in the first place, if they are completely deafblind from birth. If humans can learn not just communication but language without either vision or hearing, that seems to suggest either extreme adaptability or language learning being quite decoupled from vision and hearing. From an evolutionary standpoint, I imagine that both deafness and blindness are probably uncommon enough that language learning could have explicit dependencies on both hearing and vision.
I found an old-looking video about communication with deafblind people. At the linked timestamp is a woman who is deafblind since age 2.
I read Chiang's Exhalation [0] prompted by your question. So much story in so few (6505) words! Great use of a crafted universe to tell a story relevant to us. That's the beauty of sci-fi as I understand it. Worth the 30 minutes.
[0] http://www.nightshadebooks.com/Downloads/Exhalation%20-%20Te...
This doesn't really get us closer to the speed of light, but we have broken lots of speed records in the last 50 years:
Firefox just doesn't have nearly the security credentials that Chrome does at the moment
I think this claim deserves a justification. Not saying you're wrong but I'm interested in how to compare browser security.
(Counteranecdote: the HN-popular article [0] which explained the Firefox zero-day, mentioned in it's last paragraph a Chrome zero-day from March 2019.)
[0] https://www.zdnet.com/article/mozilla-patches-firefox-zero-d...
I would be interested in knowing how cyber warfare and cyber espionage are viewed from a perspective of diplomacy or power play between nations (or corporations). Does anyone know of interesting articles?
I agree that Deep Work is worth a read. Quite a few meaningful ideas in quite few pages. The end-of-day shutdown is one of the ideas that stuck in me. After a workday my mind is usually buzzing a bit too much for most activities. Focusing on winding down helps very much. Having accepted the point made by the author in combination with it being such a small thing to say the phrase when walking from work means that I often remember to say the phrase and then instantly accept that I should focus the last drops of work-related attention on disconnecting from work in a good way. Helps me a lot!
This reminded me of last years "BrickerBot" malware [0] by grey-hat The Janit0r / The Doctor who bricked IoT devices with the stated purpose of preventing the same devices from being hacked by botnet-malware, which allegedly puts the whole internet at risk.
[0] https://www.bleepingcomputer.com/news/security/brickerbot-au...
The light appears to not come from the inside:
This article [0] explains nicely the story of Claude Shannon et al trying to win at roulette.
[0] http://nautil.us/issue/50/emergence/claude-shannon-the-las-v...
Agreed, I just tried it. Two good examples for this are the ones in the Wikipedia page [0]. The size in the page is maybe a bit large, if it requires a too large angle of eye crossing: hit Ctrl - a few times to zoom out.
Over time, I expect editors like VSCode to edit Jupyter notebooks natively.
PyCharm has support for Jupyter notebooks [1], but for now it's not very good [2]. Two weeks ago Jetbrains released this official comment [2]:
Hi, we are aware of the problems our Jupyter support has and we aren't going to fix them, because the current support is going to retire. Currently we are working on another support of Jupyter notebook (even 2!), which hopefully will be better and much more usable. We plan to make it ready for 2018.3 PyCharm release, so stay tuned.
My note: The current PyCharm is version 2.2.
[1] https://www.jetbrains.com/help/pycharm/using-ipython-noteboo...
[2] https://intellij-support.jetbrains.com/hc/en-us/community/po...
recognize adds type hints [0], which is what the desired library would use to verify input / select suitable UI elements etc.
Please read about the impact of Jio in India.
I read this piece [1] which centers on Jios impact on the telecom industry. It states that the rate of digitalization has been boosted, but doesn't really detail the societal impact. Do you recommend any particular article?
[1] https://www.ft.com/content/3f1fe4d6-e4e0-11e7-a685-5634466a6...
This is their latest blog post on the topic: https://signal.org/blog/private-contact-discovery/
Signal has no per-group notification settings
Yes it has, at least on Android. Within a group, press the three-dots-menu on top and choose mute notifications. You can choose for how long they shall be muted, similarly to other apps.
Adding to your list:
- Working backups for text and media.