Oh come on, don't be pedantic. There is a term for non-physically-based rendered, it's called "rasterization". Just because it's technically incorrect doesn't mean it's any less of a colloquial term. To ignore this is to ignore how language actually works. Even the wikipedia page for Rasterization compares it with ray tracing.
The string literal is a pointer, so !pointer is false. And then you get a nice explanation message when the assertion fails. I wish all assert gave optional explanation messages.
Think about why you want to lose weight. Is it to be healthier, or is to reach an arbitrary number? If it's the latter then maybe you can just pound down 1500 calories of cake a day. If not, then you actually do need to eat healthy. The health benefits don't come from weighing less, they come from having a healthier body composition and less visceral (internal) fat.
I've seen this article reach the front page many times and I laugh every single time. There's too many golden lines.
> First communication became digitized and free to everyone. Then, when clean energy became free, things started to move quickly.
> Transportation dropped dramatically in price. It made no sense for us to own cars anymore, because we could call a driverless vehicle or a flying car for longer journeys within minutes.
> Once in awhile, I will choose to cook for myself. It is easy - the necessary kitchen equipment is delivered at my door within minutes.
> Shopping? I can't really remember what that is. For most of us, it has been turned into choosing things to use. Sometimes I find this fun, and sometimes I just want the algorithm to do it for me. It knows my taste better than I do by now.
> Once in awhile I get annoyed about the fact that I have no real privacy. No where I can go and not be registered. I know that, somewhere, everything I do, think and dream of is recorded. I just hope that nobody will use it against me.
I can't tell if it's written by a normal person, some buzzword-spouting AI, or someone from the 80's who's never interacted with modern technology.
EDIT: And of course, how could I forget, "In our city we don't pay any rent, because someone else is using our free space whenever we do not need it. My living room is used for business meetings when I am not there."
I've been thinking for a while about something like an "assertion based type system." Rather than types being variants of other types, types can be described as other types + restrictions. Functions take variables with types but also come with a list of assertions. For example, it is sometimes useful in graphics to differentiate, in the type system, a 3D vector and a normalized vector (e.g. separate Vec3 and Norm3 types) but there is nothing you can do to actually put this into the type system. In some assertion based system, you would write something like: `type Norm3 = Vec3 v given(len(v) == 1)`. You could cast a Vec3 to a Norm3 which would run the assertion at run time, or you could write a function like `normalize` which always returns a Norm3 (maybe even it comes with its own assertion that len(v) != 0). Then you can safely pass your Norm3s to functions that expect normalized vectors. It's always recommended to make bad states unrepresentable, but it's weird how no language has ever given you a system like this.
I know hacks get posted too often to HN, but this is a particularly egregrious example. Proctortrack is an online proctoring software which school force the students to download and use. It collects, from their own privacy policy:
* Name and Address
* Zip Code
* Photograph of identity document, such as a driver’s license
* Photograph of you
(Note: it needs a scan of your face from three angles.)
* Telephone Number
* Usernames and Passwords
* Name of the Test Sponsor(s)
* Employment information
* E-mail address
* Test submissions
* Screen-captures
* Audio and video recordings of you taking tests and the test-room environment
* Biometric data, including biometric identifiers (such as scans of hand or knuckles) and biometric information (such as knuckle, face, or keystroke patterns)
* Government-issued identification number (if required, or as included in the identity document you provide)
Why does it need all this information? This is yet another example of a shitty company "forgetting" to pay for security and the consumers (who don't even have a choice to not use the software) have to pay.
You're missing the point. Here's a good article that talks about the problems of having neither overloading nor default parameters, but in Go.[1] The problem is made significantly worse in Rust when all struct fields need to be initialized and there are no varargs. I really see no solution to the "stable API with more options" problem in Rust, aside from a builder pattern, which I really hate.
The author flatly says "do not use inheritance." Without inheritance and polymorphism, what is left in OOP? If you look at the author's 4 pillars, the only thing left is encapsulation (and "Oversimplified Hot Takes") It seems like the author himself has proven why OOP is bad. You can have encapsulation without OOP. People were doing it in C 40 years ago. And people are doing it in Go right now. No one would call Go an OO language, yet it has what the author admits is OOP's only good feature.
I hate when I ask something about globals on SO and I get the same blanket answer. Why does every programmer feel the need to tell me that "globals make it hard to reason about the state of your program?" Unfortunately most systems are global based. OpenGL has one global state. A database connection is a global. Either you can use globals to model these things properly or you can complicate it by not using globals. The library will be using globals under the hood anyways.
The CERB is all the downsides and expenses of UBI without any of the benefits---no incentive to find work, bureaucracy hell, Canada has to worry about and invesigate fraud, doesn't help poor workers working minimum wage jobs (which are almost all essential)
That's not possible with nullable types. The whole point of nullable types is to mark types that can be null. So this is possible:
But now it's not much different than this:
My point is that these are fundamentally the same thing. The only difference is syntax, ergonomics, and compiler support.