In recent git versions (>2.23), git restore
and git restore --staged
are the preferred ways to discard changes in the working tree (git checkout -- .
) and staged changes (git reset --
) respectively.
My point today is that, if we wish to count lines of code, we should not regard them as “lines produced” but as “lines spent”: the current conventional wisdom is so foolish as to book that count on the wrong side of the ledger.
——On the cruelty of really teaching computing science - E.W. Djikstra
If you are looking at learning CS in a more holistic manner, there’s Path to a free self-taught education in Computer Science!. It’s a list of courses, categorized by topics, which are exactly what a CS undergraduate would learn. It might feel daunting at first, but you can pick any interesting topic and dive in.
I especially recommend CS50P for beginners.
One problem with exceptions is composability.
You have to rely on good and up-to-date documentation or you have to dig into the source code to figure out what exceptions are possible. For a lot of third party dependencies (which constitute a huge part of modern software), both can be missing.
Error type is a mitigation, but you are free to e.g. panic in Rust if you think the error is unrecoverable.
A third option is to have effect types like Koka, so that all possible exceptions (or effects) can be checked at type level. A similar approach can be observed in practical (read: non-academic) languages like Zig. It remains to be seen whether this style can be adopted by the mainstream.
The problem with these token activism is that it’s hollow in content. The intent might be good, but the action is almost pure virtue signalling.
Slavoj Zizek pointed out in multiple interviews that there’s a pervert self-reflectiveness in the self-censorship: privileged people “enjoy” being guilty of their privilege, so it’s more about themselves rather than the people they claim to represent. “Sorry, but you were naive and unaware of people being racist when they use these words, so let me stop them and now you are protected (by me) in an inclusive atmosphere.”
A related radical freedom situation as an inverse to the above is that when friends get really close, even using racist slurs is treated as a gesture of intimacy, rather than racism. In an ideal world, the context in the public discourse would be so strong that even racist words lose their racist meaning (“oh, so you are joking as well”) rather than the opposite (assuming there’s ubiquitous “hidden” racism in the use of a word, even when there’s clearly none).
Another critique is that it presents itself as a substitute of real solutions. Instead of addressing real problems, it provides a simple “everyday” solution, very much similar to the recycling movement. Of course we need to recycle, but we should be aware that it’s not a substitute of radical real actions (e.g. stopping the big oil).
Such a shame on the activists to spread disinformation. It was Lizzy who crushed the economy, #NOT THE LETTUCE!
They are already invented: 😱 and 😱😱😱
Sean k strikes it again.
Yes for OCaml. Haskell’s inequality is defined as /=
(for ≠). <>
is usually the Monoid mappend
operator (i.e. generalized binary concatenation).
My gut feeling is that the procedural generation thing in Startfield somehow absorbs some people’s need for mods.
Have you heard of 996.icu? I don’t know where you get your statistics, but have a walk around 五道口 and you’ll understand.
Also, I don’t know where you see that I’m a fan of CCP. The government is largely responsible for the phenomenon by not prosecuting the companies lol.
I’m not saying that this isn’t a protest, but merely providing the context for the protest. They took the relaxed dress code to an extreme and deliberately interpreted it as “anything you like”. It’s more of a malicious compliance protest. That’s why they were scolded by the leader, instead of being fired.
I’m not saying everything about China is evil, but 996 is an actual thing, actively resented by Chinese young people. I’ve got friends working such schedules. I’m presenting their views. I had also visited their offices and saw the folding beds.
For those who don’t know, it’s not quite new (except for the word that describes it, Ban Wei 班味). Because of the long working time, a lot of Chinese companies (especially in the tech sector) allow very casual dressing, plushies, even folding beds in the office. Sounds good but is actually horrifying.
The sentence meant to be sarcastic. The dry humor was lost in translation.
It’s a one-piece pajama in the video. She has a coat over it during the work.
In general, given a Turing machine which outputs the result of a procedure to its memory tape, you can equivalently construct a recognizer of valid input/output pairs. Say P is the procedure, then the recognizer R is let (i, o) = input in P(i) = o
The reverse is also possible. Give a recognizer R, you can construct a procedure P that given part of the input (can be empty), computes the rest of the input that makes R accept the whole. It can be defined as for o in all-strings, if R(i, o) then output o and halt, else continue
.
It might feel contrived at first, but both views can be useful depending on the situation. You’ll get used to it soon with some exercises.
Haha, but it’s really a pack of tools, more like a toolbox.