And then JSON doesn’t restrict numbers to any range or precision; and at least when I deal with JSON values, I feel the need to represent them as a BigDecimal or similar arbitrary precision type to ensure I am not losing information.
And then JSON doesn’t restrict numbers to any range or precision; and at least when I deal with JSON values, I feel the need to represent them as a BigDecimal or similar arbitrary precision type to ensure I am not losing information.
That’s because the nearest representable float to 0.99999999999999 is 1.0 - not because Python is handling rationals correctly.
This is a float imprecision issue that just happens to work out in this case.
It’s worth wondering why, if Python is OK with “/“ producing a result of a different type than its arguments, don’t they implement a ratio type. e.g. https://www.cs.cmu.edu/Groups/AI/html/cltl/clm/node18.html#SECTION00612000000000000000
How would you implement this in code?
JavaScript is truly a bizarre language - we don’t need to go as far as arbitrary-precision decimal, it does not even feature integers.
I have to wonder why it ever makes the cut as a backend language.
You have to explicitly check if the return value is an error and propagate it. You write the same boilerplate
if (err) return err
over and over again, which just litters your code.
That’s only true in crappy languages that have no concept of async workflows, monads, effects systems, etc.
Sad to see that an intentionally weak/limited language like Go is now the counterargument for good modeling of errors.
You are seeing changes in the refractive index of air as a result of heat lowering the density of the air. As air comes in contact with the hot surface, it becomes heated and rises through otherwise cool air - The rising air causes eddies and vortexes that lead to light bending in weird ways as it passes through.
The shadows are much like the shadows on the bottom of a pool when there are waves on the surface. Incoming wavefront of light are distorted from planar and sent in different directions, some directions get less total light, some get more.
Yes, it is a huge pain, especially if you want to have round-trip interoperability with humans using markup. Wikipedia had a major challenge with this when they decided to add a rich text editor alongside wiki markup.
Calling people “resources” and the mindset that delivery teams are just a number that you can spend money to increase is a mark of poor project and personnel management, as well.
Why should no one be touching it? You’re basically forcing manually communicated sync/check points on a system that was designed to ameliorate those bottlenecks
If “we work in a way that only one person can commit to a feature”, you may be missing the point of collaborative distributed development.
Never use rebase for any branch that has left your machine (been pushed) and which another entity may have a local copy of (especially if that entity may have committed edits to it).
Not just calls to self - any time a function’s last operation is to call another function and return its result (a tail call), tail call elimination can convert it to a goto/jump.
If your company is using story points to “measure” developers, they are completely misusing that concept, and it probably results in a low-teamwork environment (as you describe).
The purpose of story points is so a team can say “we’re not taking more than X work for the next two weeks. Make sure it’s the important stuff.” It is a way to communicate a limit to force prioritization by the product owner.
And, in fact, data shows that point estimation so poorly converges on reality that teams may as well assign everything a “1”. The key technique is to try to make stories the same size, and to reduce variability by having the team swarm/mob to unblock stuck work.
Who creates these tasks? They need to close the year old items, reevaluate the work and break it down into sub-5-day chunks. If there are so many unknowns that it’s impossible to do that, the team needs to brainstorm how to resolve them.
The guy writing didn’t know about generics, so…. (to be clear, I trust the rust core devs know about these things, I’m implying that they are afraid to reference them directly because they think the M word will scare people)
They seem quite afraid of mentioning the basis for effects that Haskell, Scala et al have used for years - Monads.
So they’re going to re-invent it all 🙃
Fun fact: a US nickel weighs 5.000g, and 5 US quarters weigh 1.0000oz
Yes, the center (neutral) is connected to ground somewhere, but is not a suitable ground reference - because current on the neutral creates a voltage drop along the neutral conductor. A North American outlet box has Hot (L1), maybe another Hot (L2), Neutral, and also an earth/ground conductor.
Neutral is not ever treated as ground; it’s impermissible to connect it to any bare metallic surface. Other than not being switched, and being the side that ends up on the threads of a light socket, it’s handled the same way as a hot/line conductor. Just like a 240V system.
It would dissipate static fine, if you were allowed to touch it.
I think that’s incorrect. The ground pin is a dedicated equipotential reference bonded to the earth via an acyclic wiring path which carries no current. It does go pretty directly to the ground rod via the breaker panel ground bus. Neutral happens to be connected to it at the entrance panel for fault clearing, but not really for any other reason.
Since all metallic chassis, pipes, ducts, etc are connected to it and it is available pretty much throughout a building, it is a logical place to connect ESD-prevention gear, even if the earth has little to do with that. (But, a grounding electrode system installed to code should have less than 25 ohm impedance to ideal earth - not exactly a “poor” conductor)
Could be a crypto key, or a randomly distributed 64-bit database row ID, or a memory offset in a stack dump of a 64 bit program