Hacker News new | past | comments | ask | show | jobs | submit | trainfromkansas's comments login

"Circumstantial" evidence is often stronger than "direct" evidence. e.g. DNA is almost always "circumstantial", yet more modernly maligned eye witness evidence is "direct".


__all__ is only relevant for * imports.

And please, just don't use * imports. It really doesn't save you much time at the cost of implicit untraceable behavior. If you don't worry about * imports, you don't need to add the __all__ boilerplate to every module.

This article is more about advertising a package called tach, that I suppose tries to add "true" private classes to Python.

But it doesn't actually enforce anything, because you still need to run their tool that checks anything. You could just easily configure your standard linter to enforce this type of thing rather than use a super specialized tool.


A direct benefit of using `__all__` at module A is better intellisense while editing files that imports A, if A has a small intended public API and many internal usage symbols.


I just tried it and at least the autocomplete in IPython appears to ignore __all__ when suggesting possible imports. I haven't tried any other tools' autocompletes.

If module A has a small intended public API, you can structure it no matter how you want to achieve that. You can put those internal symbols behind their own object/class/module if you prefer.

Using `__all__` has one functional consequence, which is `from A import *`. Again, I would avoid * imports entirely, but if you want to try to curb possible downstream problems from users who do indeed use * imports, I would also prefer not defining `__all__` because it's extra boilerplate you have to maintain and can very easily be missed on future updates.


This is why I still (sometimes) bother with __all__. Makes autodoc better too.


Before I studied math, I always slightly resented imaginary numbers as being "math wankery" and just defined because mathematicians had a compulsion to generalize and define new nonsense because they could, and not because it made any sense to.

On the way to changing my mind, I learned that the Fundamental Theorem of Algebra only works for complex numbers (and not "real" numbers), the beauty and simplicity of rotations in the complex plane, but maybe most convincing to me was a history lesson about quaternions.

Quaternions are an extension of the complex numbers, but they're not typically taught in higher math education these days, which contradicted my resentment that mathematicians were just obsessed with getting more and more abstract and general for the sake of it. Of course, they were in vogue in the 19th century (Maxwell's equations were originally written down using them), but mathematicians soon realized they just weren't as useful or as "nice" philosophically as complex numbers and just about anything you can accomplish with quaternions were better accomplished with vectors of complex numbers.

That story played a big part in persuading me that there really is something special about complex numbers -- that maybe they're the most "natural" or "real" numbers of them all.


Also, note the origin story of the complex numbers:

Contrary to legend, they weren't discovered out of a desire by mathematicians to have roots to all quadratics such as x^2 + 1 = 0. It's perfectly sensible for an equation like that to just lack a solution: this just means the standard parabola never drops below zero. Analogously, if we calculate a rocket's payload mass to Low Earth Orbit and the answer is negative, we don't feel a need to find some deep meaning behind negative mass: we just say the rocket can't get to orbit at all. Simple.

It's cubics for which complex numbers were introduced. Cubics (with real coefficients), unlike quadratics, always have real roots, since one arm goes to +∞ and the other to -∞, so it has to cross the x axis somewhere in between. But when the cubic formula was finally discovered, it had this strange property that you frequently had to take square roots of negative numbers, then add those weird square roots to "regular" numbers, and if you just shut up and calculated, the weird parts would always cancel out and you'd get a "regular" number that solved the original equation. That is, you had to pass through the complex numbers in order to find the real solutions.


Quaternions are actually often used in games to represent rotation, largely because they can’t gimbal lock.


Bugger me… I just commented on that very thing, and then read a few more comments and find you beat me to the punch by several days. LOL


While Maxwell's equations certainly can be written with quaternions, they were not originally written that way. Maxwell originally just "wrote them out", meaning component-by-component. He had 20 equations! That's why H is sometimes used for magnetic fields: the electric fields were E, F, and G.

Nowadays we usually write 4 vector equations, or 2 in the language of differential forms.


If you do any electronics or signal processing (digital or analog) at all[1], you stop believing that complex numbers are "math wankery" immediately and embrace them as the only thing that's, uh, real.

You mention the Fundamental Theorem of Algebra, I would also add analytic signals. Those are complex by nature, and yet they make so much more sense than real signals ("real" in both senses: non-imaginary and "real world"). In fact, it turns out, real/real world signals are better represented as the sum of two analytic signals.

It's so weird how real numbers, the numbers we consider to be the normal ones, are the special case in a universe that seems to favor complex numbers for the most fundamental things.

[1] Of course also physics in general, but physics can be theoretical, while engineering is almost always rooted in practicality.


> anything you can accomplish with quaternions were better accomplished with vectors of complex numbers

What about octonions? Are they even less useful?


The octonions aren’t even associative, making them less “natural” and harder to work with.

But quaternions are quite useful for working with rotations in three dimensions. To be very technical, the unit imaginary quaternions form a double (universal) cover of the rotation group SO(3).


I didn't even know what "Quaternions" were until I started to get into 3D graphics and found that they're often used instead of degrees or radians to avoid camera "gimbal lock".


There's nothing I want more than a Watermelon Oreo right now...


They held my number hostage for a while after I switched off iPhone. I think it took months for iPhone users to be able to message my number before it actually started reaching me again.

I think there's a lot of truth to the word "hijacking" here.



I don't remember. It was many years ago -- circa 2015. Nevertheless, I'm irritated by the implication that it's the user's responsibility to do this.

At least as recently as last year, I've discovered instances where iPhone users will not have received a message/image (both from me and others in group chat) seemingly randomly.

I really don't like that Apple has managed to sell a prevailing narrative that it's somehow the fault of users who don't buy their expensive hardware that is necessary to use their software that impinges on an open protocol.


> I'm irritated by the implication that it's the user's responsibility to do this

I don't think it's so irritating. When you set up your phone you are prompted to allow iMessage to use the number. If you allow it you'll have to remove it again after you decide to not use it again. Just like you have to cancel a subscription if you don't want to use it any more.


It’s because the server still think iMessage is active with that number, and default to it over SMS. It’s a glitch, but is entirely unrelated to any hijacking. It just comes from the fact that the identifier for iMessage and SMS are identical, and that in some cases the system does not realise iMessages does not work. It is not trying to route SMSes as iMessages or anything like that.


Yes I've seen a few people experience this hell as well. To just call it a UI abstraction is completely detached from reality and how it's implemented.


How long ago was that? There used to be a bug related to that, but disabling iMessage on your device before you switch off would resolve it. Not obvious, I know. I'm unsure if that's still a thing or if I'm even remembering it correctly.


what if it is stolen/broken and you don't want to buy an iphone but an android ?



That's definitely a problem. I wasn't claiming it wasn't an issue, I was curious how long ago it happened because I wanted to know if it was the same as the issue I experienced years ago.


I'm getting the impression that the new job I'm starting very soon uses something like this.

Any suggestions on most convenient way to cover up camera when not using it? I've looked at a few "webcam camera slide" products around, but I'm hearing a lot of reports of them cracking the screen of recent Macbook Pros.


Do your work inside a VM. Disable the device whenever you want.


post-it note, bookmark size.


Small piece of electric tape over the camera.


Use the OBS virtual camera to send whatever image you want over.


2021: return of the goatse. Sorry boss, no clue, something must be fucked up on your end?


AFAIK the only player to have tested positive for COVID in that outbreak is Gleyber Torres (the rest were support staff), who had an actual COVID infection before, which undermines your idea that getting COVID is somehow superior to getting vaccinated.

And as already mentioned, the Yankees received the J&J vaccine, which is not an MRNA vaccine.


Not the best example since there was a severe earthquake in Pompeii in 62 AD. They were still rebuilding in 79 AD when the town was destroyed by Vesuvius.


If they had taken the matter seriously, they'd not have rebuilt there. We know some Romans recognized the mountain as a volcano years before the eruption, but if there were any warnings associated with this recognition, they seem to have gone unheeded.

(Also, earth quakes are/were pretty common throughout Italy. This perhaps contributed to complacency.)


Not sure you meant to imply otherwise, but just to clarify: Bly intentionally got herself committed for an undercover assignment.


From a great coffee table book, "100 Facts About Pandas", by David O'Doherty and Claudia O'Doherty (no relation).

https://www.amazon.com/Facts-About-Pandas-David-ODoherty/dp/...

One of my other favorite "facts" in there is that if a panda gets struck by lightning, its black parts turn white and its white parts turn black. It is called a "negative panda". If it gets struck by lightning once more, it reverts to its natural coloring and it is called a "double-negative panda", or just a "panda".


Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: