They're used for code like this:
assert_eq(list.len(), 1)
expect_eq(list[0].username, "jdoe")
expect_eq(list[0].uid, 1000)
The idea being that if multiple properties are incorrect, then all of them will be printed out to the test log.11,783 karma · joined March 23, 2009
john@john-millikin.com
Currently semi-retired; formerly at Google (2011-2017) and Stripe (2017-2022)
They're used for code like this:
assert_eq(list.len(), 1)
expect_eq(list[0].username, "jdoe")
expect_eq(list[0].uid, 1000)
The idea being that if multiple properties are incorrect, then all of them will be printed out to the test log. FAILED: Expected RESPONSE_NO_DATA, got RESPONSE_INVALID_ARG
In /src/foo/ApiTest.cpp:123
For non-enumerated integers, the output would be something like: FAILED: Expected ResponseCode(200), got ResponseCode(404)
In /src/foo/ApiTest.cpp:123
If values are formatted with some amount of self-description, then printing the name of the variable being evaluated is not usually informative.If you know the file and line of the assertion, plus the values that are being checked, there's not as much need for a stringified version of the expression.
Looking at the Amazon listing and a third-party summary[0] it seems to be the sort of wool-brained code astrology that was popular twenty years ago when people were trying to push "extreme programming" and TDD.
[0] https://gist.github.com/wojteklu/73c6914cc446146b8b533c0988c...
How would a test suite with one assertion per test work? Do you have all the test logic in a shared fixture and then dozens of single-assertion tests? And does that rule completely rule out the common testing pattern of a "golden checkpoint"?
I tried googling for that rule and just came up with page after page of people arguing against it. Who is for it?
By the time the major browsers drop support for plaintext HTTP, that protocol will be as quaint and archaic as Gopher is today.
(and we'll all be better off for it -- good riddance to anything ASCII-based or unauthenticated)
[0] https://blog.mozilla.org/security/2021/07/20/stopping-ftp-su...
For proprietary software it's idiomatic to use a private CA for securing connections to a central server, to avoid the risk of DNS hijacking or a malicious third-party CA. For open-source software it will, definitionally, allow substituting different server key validation options for users who prefer to run their own servers.
The only real problem QUIC's mandatory TLS causes is that localhost development becomes marginally more difficult, but even as someone who loves running my in-development stuff on localhost it's clear that the security of the internet as a whole is of far greater value.
> CIDs are still unique when referring to _metadata_, and can be used to
> "unambiguously fetch content from its peers".
A CID, mathematically, cannot uniquely identify a single file. Consider the CID bafybcfbaqydfnrof5stdvkzhwx6kglb7p6owxja: [desktop]$ ipfs get bafybcfbaqydfnrof5stdvkzhwx6kglb7p6owxja -o temp.pdf
[desktop]$ shasum -a 256 temp.pdf
2bb787a73e37352f92383abe7e2902936d1059ad9f1ba6daaa9c1e58ee6970d0 temp.pdf
[laptop]$ ipfs get bafybcfbaqydfnrof5stdvkzhwx6kglb7p6owxja -o temp.pdf
[laptop]$ shasum -a 256 temp.pdf
d4488775d29bdef7993367d541064dbdda50d383f89f0aa13a6ff2e0894ba5ff temp.pdf
If you were to try fetching that CID from the peer network, which file you'd get would depend on which peer you're fetching it from. > Content addressing: IPFS uniquely identifies immutable content stored
> on the network. This approach simplifies storage and reference to the
> underlying data, as a node can use a unique key to unambiguously fetch
> content from its peers.
This is unfortunately not true -- IPFS uses content addressing for metadata, but file content isn't content-addressed. The result is a network similar to BitTorrent's DHT, where if you know the hash of the torrent file you can download the content, but having a hash of the content doesn't get you anything.An example I posted previously (https://news.ycombinator.com/item?id=32426051): debian-10.7.0-amd64-netinst.iso has SHA256 checksum b317d87b0a3d5b568f48a92dcabfc4bc51fe58d9f67ca13b013f1b8329d1306d, but a very large number of CIDs could be used to identify that file. The following two CIDs are both valid identifiers for it:
https://cid.ipfs.tech/#bafybeihjy54iyvheotna2aeqmzhqnro6yot4...
https://cid.ipfs.tech/#bafybeihfqpypuhmtyzazrj3g4b4f4nqk2ziy...
You'll only be able to download that file from IPFS if you know which CID to use, and if there are peers hosting it with the same CID.
> there are differences in productivity, as you'd expect, but even
> the more-commonly-cited "10x" is bullshit.
and then you continue with the quoted statement that the comparison is between "normal, professional programmers" and someone 10x better than that.However, that is not the standard meaning of "10x programmer". That term refers to someone 10x better than the worst programmer.
The claim that 10x engineers exist is: Given a group of programmers who are capable of planning and executing some project, the most effective member will be approximately 10x "better" (at speed / correctness) than the least effective member.
I've been on both ends of that 10x, but have never experienced a situation where all the programmers were approximately the same. There's always someone who is clearly more capable, and someone who is not.
For the differences between two Japanese words with the same pronunciation and similar meaning, Yahoo Answers is a surprisingly good resource. You can also do web searches like [[ 「同志」と「同士」の違い ]] to find explanation pages. In general homophonic kanji is an area that even native speakers struggle with sometimes, so there's lots of non-English coverage available.
https://detail.chiebukuro.yahoo.co.jp/qa/question_detail/q10...
"「同志」と「同士」の意味の違いについて教えてください。"
> The comparison is always between normal, professional programmers
> and those "10x" alpha-male
The commonly-cited 10x difference is between the best and worst engineers, not best and average. > I think, for some of the words I will share with you at the end,
> there is a high likelihood of those words having Chinese roots
> rather than Japanese.
A rough (but not perfect) way to decide if a Japanese term is derived from Chinese is that it is composed of two or more kanji. Often you'll see a single-kanji word with Japanese pronunciation, and the same kanji in a compound use the Chinese pronunciation.Examples from the article include 「感情」 (kan-jou), 「同士」 (dou-shi), 「反射」 (han-sha).
I'd also be careful about using jisho.org as a source without cross-checking to make sure you got the correct meaning. Some of the examples given in OP are wrong, for example 「同士」 is a suffix used to indicate a relationship is mutual -- 同僚 (coworker) + 同士 = 同僚同士 (coworkers) -- and 「大きい」 means "large", not "a lot" (which would be 「多い」 (oo-i).
> nonsense words "Nike"
https://en.wikipedia.org/wiki/Nike_(mythology)The community largely followed to the new domain, leaving the Wikia version in a sort of dormant state filled with spam and weird "original fan-creation" pages.
https://www.reddit.com/r/touhou/comments/44prw7/what_went_wr...
https://en.touhouwiki.net/wiki/Talk:Touhou_Wiki/Archive_3#Wa...
A large program might have less than a dozen external dependencies, and they released every couples months at most, so keeping up to date was easy. And most of the time you didn't even need to update unless someone discovered a security vulnerability, which was not that common despite all the libraries being written in C or C++.
The approach of NPM (etc) is fundamentally different in that it's considered normal for a project to have hundreds or thousands of dependencies. To manage the update cadence, the users of these package repositories try to invent new schemes for version numbers -- or write quirky gif-laden blog posts about how they burn the monthly budget of a small country on testing in CI.
But the core problem is that they've locked themselves into a stupid and unsustainable paradigm. You can't do the sort of software development that involves writing code if you've decided that your job is to haphazardly glue together other people's code, especially when your're willing to depend on packages written by anything and anyone.
--
I honestly think a lot of the problem of over-dependency comes from the new package managers that make it too easy to depend on stuff recursively. If NPM required you to type out `npm add-project-dependency left-pad/1.0.0 --checksum sha256:a1b2c3...` then that would have been a strong forcing function against a huge number of tiny packages, because at some point your fingers get tired.
For example, in my personal projects I use Bazel as a build system, which makes me a bit more aware of dependency hell because each dependency needs to be registered.
There are projects like QEMU that are straightforward to build in Bazel because their dependency tree is bounded, but some of the stuff coming out of JavaScript land is just unavailable to me because I don't have the patience to chase down hundreds of packages to run a "hello world".
I've found I avoid certain parts of the Rust ecosystem because they're JS-ish, but there's other parts that have a more C/C++-ish style and those packages work fine for me. Similarly for Python. Go has largely avoided the issue, though I don't have an intuition as to why (different culture?).
One issue with Ghidra's that I keep hitting is its poor support for amd64 SIMD. There's a good example at <https://github.com/NationalSecurityAgency/ghidra/issues/249>:
0000000000000000 <intrinsics>:
0: f3 0f 1e fa endbr64
4: 0f c6 ca 1b shufps $0x1b,%xmm2,%xmm1
8: 0f 58 c1 addps %xmm1,%xmm0
b: c3 retq
IDA produces great decompilation: __m128 __fastcall intrinsics(__m128 a1, __m128 a2, __m128 a3) {
return _mm_add_ps(a1, _mm_shuffle_ps(a2, a3, 27));
}
The Ghidra output is a mishmash of CONCAT pseudo-macros. > I made this for fun, I'm showing it to you so
> you can laugh,
You can add +1 to your laugh counter, the "marketing" copy is what I wish every SaaS homepage looked like.Out of curiosity, what does the user count look like? $4/month buys a lot of CloudFront.
> I used Stripe for about a year to run a small cell phone store in Denver
> [...] All of a sudden, we run a charge for $3300 because our primary
> processor in my business was down,
This is the same story as https://news.ycombinator.com/item?id=32261868, even with identical wording. Interesting that it's posted by a different Reddit and HN account.During the discussion it came out that this cell phone store used their Stripe account to sell a used vehicle[0], which is the sort of unusual activity that makes every regulated financial services company sit up and pay attention. A common risk mitigation is for the payment processor to hold the money in escrow until after the dispute period.
https://doc.rust-lang.org/reference/
https://doc.rust-lang.org/nomicon/
Documentation aimed at beginners often assumes a lack of prior programming experience, which is useful if you are (for example) a high-school student learning about pointers and abstraction but IMO not a good use of time for most people posting on Hacker News.
The Rust reference manual is well-written and comprehensive for basic Rust, and the Rustonomicon has often answered my questions about more advanced topics (FFI, concurrency).
For example the document for digital audio[0] has FLAC as a "preferred" format and MP3 as "acceptable".
I didn't see any discussion of selecting formats based on recovery of original data from corrupted storage, and given the context I doubt that was given much consideration. When doing data archival it's better to have replication and checksums, then if any file is corrupt it's recovered from replica rather than trying to do a partial recovery.
[0] https://github.com/usnationalarchives/digital-preservation/b...
I haven't done low-level Windows programming since before the 64-bit transition, but I thought they kept the model of a DLL wrapper with a stable ABI.
> Windows application don't need to bundle system libraries like the libc
That might be a bad example, because Windows applications are expected to bundle their own libc (MSVCRT). I'm not sure if modern Windows even ships with a copy -- it definitely doesn't ship with copies of all the versions that applications might depend on.Linux follows the Windows model, where the stable interface is the kernel (Linux's syscalls, Windows's ntdll). This in turn implies that libc is a non-system runtime dependency, and a Linux application that wants to be portable across more than one release of Ubuntu (or whatever) should bundle its own copy.
Complaints of Linux ABI stability is mostly a story of old-timers trying to imitate how Unix worked in the '80s and '90s, with libc baked into the OS. Younger developers are more likely to use static linking or Docker/Flatpak/Snap.
> I have relocated to Kyiv, mainly because with what’s going
> on I feel on an emotional level compelled to be here, to
> stand against the horrors.
> [...]
> The route was Cambridge -> London -> Bruxelles
> -> Köln -> Berlin -> Przemyśl (Polish border town)
> -> Kyiv.Analysis of panic-safety in Rust is comparatively easy. The set of standard library calls that can panic is finite, so if your tool just walks every call graph you can figure out whether panic is disproven or not.