> However, an electron, unlike a planet or a satellite, is electrically charged, and it has been known since the mid-19th century that an electric charge that undergoes acceleration (changes velocity and direction) will emit electromagnetic radiation, losing energy in the process.
If I take a small piece of matter and shake it for a long time, then don't all its electrons and protons emit electromagnetic radiation and lose energy?
To me it seems the rest of the article, i.e. probability density, also means that the electrons undergoe acceleration because their location changes.
> If I take a small piece of matter and shake it for a long time, then don't all its electrons and protons emit electromagnetic radiation and lose energy?
Yes, they do. But it's only a very very tiny amount.
You're shaking both the positive (nucleus) and negative (electrons) parts of the atoms. The electromagnetic fields outside of the atom almost perfectly cancel out. This means that the acceleration only affects the very small residual field and there is very little radiation at far distances, unless you shake it really really fast.
Another way to look at it is that atoms are in fact already constantly shaking by themselves because of thermal movement. And this does in fact result in them emitting radiation: objects at room temperature will radiate in the infrared spectrum because of this.
The trick is that thermal movements of atoms are very fast compared to moving something by hand. Room temperature infrared radiation frequencies are on the order of tens of terahertz. Compare this to manually shaking an object at (say) 10 times a second. With some hand waving math this is like giving it an equivalent temperature of around 10^-10 kelvin. It will radiate extremely long wave radio waves, but such a tiny amount that it will be completely unmeasurable.
>If I take a small piece of matter and shake it for a long time, then don't all its electrons and protons emit electromagnetic radiation and lose energy?
The energy they lose by radiating is exactly balanced by the energy they gain from you by accelerating them.
Sounds interesting. Let's say the software is a web backend. Can you deploy it like this with zero downtime? So that the new version starts, new traffic goes to it, and the old version handles its active requests to completion and then shuts off.
I don't think so, by default I think the nixos process will simply stop (probably by sending SIGINT) the service and then start it again.
But if you could have the server into 'lame duck mode' (no new connections accepted, but existing ones can finish) / gracefull shutdown and that's a blocking call (or you could poll if it's still up etc), then you could script that before the 'nixos-rebuild switch' call. Maybe sending SIGINT to the service does that already?
I've written an image processing tool in Rust, where running a large image downscaling test with a release build takes 2.0 seconds, and with a debug build it takes 18.7 seconds. So most of the time during development I compiled in release mode, because it was actually faster overall.
For many applications debug builds are fast enough, but their runtime performance is already so slow, that I hope they don't get even slower.
Thank you for your great explanation. I've read the documentation of re-frame, but I still can't figure out how it deals with reusable components and hierarchies.
Let's say I want to write a reusable datepicker component which sends an event like [:date [2017 1 16]] when the user clicks on that date. How can it send it to the calling component? The re-frame pub/sub message bus seems to be global, but what if I want to have several instances of the same component on the page?
The only solution I can come up with is to parameterize the component on instantiation, so that if I have a "person" component that uses the datepicker to set the day of birth of the person, the date-picker would be parameterized so that it would emit a global event such as [:set-person-day-of-birth <person-id> [2017 1 16]]. Is this how re-frame approaches hierarchies?
I would say you don't. I think about it this way: use re-frame to write applications, but components must be self contained and have no knowledge of reframe. To do what you asked, I'll pass a function to the component. The function can then make the context-aware reframe call. That way all your component needs to do is to call the passed in function.
It depends on what you mean by component. Reagent components (ie UI widgets), I agree. Components should be self-contained and as re-frame agnostic as possible. So instead of subscribing to the data they want, they could take in a ratom as an argument (because the subscribe function returns one anyway).
But if the component is larger (that is, not just the view, but also the handlers and subscriptions -- I'd probably call it something else, a service maybe...) then its a bit less simple because not just the view, but also the handlers and subscriptions need to be aware of the "instance" they are running. There's no well defined re-frame solution for this yet.
That is, by convention, subscriptions are always [query-name instance-id <other optional data>] and messages are always [message-type instance-id <other optional data>] by convention. This way works quite well, but has the downside that it is by convention and there's no guarantee that other code will do it the same way.
Of course yes. My reply was largely tied to the parent's description of a date-picker component. But for application level components I'd use event names that are unique at the application level that conveys the intended semantics of the event. Everything else becomes an argument to that name, which pretty much aligns with your notion of instance Id et al although I'd be less rigid about the particular structure of the arguments.
although I'd be less rigid about the particular structure of the arguments.
My reasoning was for conpatibility and consistency. If everyone makes up their own argument structure, it becomes very difficult to maintain and puts the onus on the developers to remember which components use which structure. I'm not really asking for much beyond standardising that the first argument of an instanced event of subscription query is the instance id.
> It's ok to eat cholesterol now, right? All these "mistakes" give science a black eye.
You're confusing central planning and science. Governmental politics and advisory is a form of central planning, and in that realm mistakes are shunned upon.
Science is a protocol that, if duly practiced, will evolve our understanding towards the truth. But the path is not straight. And science does not give any way for determining whether we have found the truth at the present moment.
That's why in proper science everything is in constant flux. For some people that's terrifying, so they prefer central planning and static advisory from above.
"Proper science" is practically practiced by no scientist outside of Math and possibly Physics and Chemistry. Biology, medicine and nutrition, for example, are not "proper sciences".
E.g. the lipid hypothesis (cholesterol causes heart problems) does not, and never had, scientific support (In the "proper science" sense), and did have data against it for about 30 years, but it's very hard to find any scientist who would admit it. Similarly, the hypothesis that cholesterol intake makes a significant difference to serum levels was never proved, essentially disproved many times - and yet, it is taken as an axiom but most "scientists".
So, the fact that some "proper scientific practice" would have shown differently is of no practical consequence.
There's an interesting anecdote from Finland. A company called Copterline flew between Finland's Helsinki and Estonia's Tallinn for many years with two Sikorsky S-76 helicopters. The trip was over the ocean and took 18 minutes.
Sadly one of their copters crashed into the ocean in 2005, killing all 14 aboard. The reason was purely technical. The hydraulic steering system got stuck due to debris that had came loose from an inner coating. The copter was impossible to steer and started spinning around its axis, and spun 13 times until hitting the ocean.
It was the beginning of the end for the company. Later in 2008 they started again with two AgustaWestland AW139 copters. I was aboard once, and it was a fantastic experience. However, it boggled my mind how much even a modern helicopter vibrates. It's a wonder to me how copters can withstand the constant violent vibration. Apparently they can, except in rare cases.
In 2004 Copterline transported 75 000 passengers. If all flights were full (12 passengers and 2 pilots) it means about 17 flights a day, every single day.
Copterline went out of business in December 2008 because it was unprofitable. It's sad, because flying on a helicopter is a cool experience mortals like me usually can't experience without commercial flights.
If I take a small piece of matter and shake it for a long time, then don't all its electrons and protons emit electromagnetic radiation and lose energy?
To me it seems the rest of the article, i.e. probability density, also means that the electrons undergoe acceleration because their location changes.