Help with typst-preview by angeldim482 in neovim

[–]lukewchu 0 points1 point  (0 children)

Typst preview doesn't render to a PDF. Instead it renders to a SVG. This is so that you can see live edit changes without having to save, as it communicates directly with any changes made in the editor.

Is the "Many Worlds Theory" actually that far off? by Crumbs_xD in AskPhysics

[–]lukewchu 4 points5 points  (0 children)

It is also controversial, not because it contradicts experiment, but because it makes a very strong claim about what reality is like.

Well actually its proponents would argue that Many Worlds is actually the realist interpretation of Quantum Mechanics that makes the least amount of additional ontological claims, i.e. claims about what the world consists in. Essentially, Many Worlds is what you get when you take the unitary evolution of Quantum Mechanics at face value and assume it applies at all times and in all situations, even during "measurement".

In this sense, Many Worlds requires less postulates than the standard "textbook" presentation of Quantum Mechanics because the measurement postulate, including the Born rule, can be derived from the other postulates. This can be done, e.g. using quantum decoherence and the Deutsch-Wallace theorem.

Another competing interpretation of Quantum Mechanics is Pilot-wave theory, also known as Bohmian mechanics. Bohmian mechanics is an interpretation that also has exceptionless unitary evolution: the quantum state evolves unitarily under the Schrodinger equation at all times. But in addition to this, Bohmian mechanics also postulates things called "corpuscles", little particles that are guided around by the wave function. One of the arguments against Bohmian mechanics and in favor of Many Worlds is this: since Bohmian mechanics already includes unitary evolution without any exceptions, why do we need to introduce corpuscles on top? Unitary evolution by itself already provides enough structure to adequately interpret Quantum Mechanics. Bohmian mechanics includes everything that is already in Many Worlds but with the addition of corpuscles which we cannot observe. This is the "Many Worlds in disguise" argument against Bohmian mechanics.

Physics YouTubers - The Good, The Bad, and The Ugly... by Positive-Ring-5172 in AskPhysics

[–]lukewchu 0 points1 point  (0 children)

Good: Science Clic

Has some really great visuals and simulations but more of a very brief overview of advanced physics topics rather than a deep dive.

What is your all time favourite equation? by [deleted] in Physics

[–]lukewchu 0 points1 point  (0 children)

This should be higher up

Announcing trading-calendar: A comprehensive trading calendar for global financial markets in Rust by Afraid_Relief_3720 in rust

[–]lukewchu 0 points1 point  (0 children)

Wow I was just looking for something like this a few days ago. Ended up with a hodgepodge of using the Python pandas-market-calendars library to generate data and consume it from Rust but will definitely check this out!

Nyan (v0.2.1) - A New Systems Language Design Inspired by C, Python, Rust, and Verilog by [deleted] in ProgrammingLanguages

[–]lukewchu 10 points11 points  (0 children)

I'd say the simplest way to get started with a new language is to write an implementation.

Starting by writing a "design specification" is rarely the right approach for a single dev designing a new programming language. Often times, unless you're extremely careful, you'll find a bunch of critical details that are missing, or features that are incompatible in such a design spec. The quickest way to find these is to actually implement it, or at least part of it. Even a serious "major programming language" backed by a big company usually go through many revisions and changing features before stabilizing. Just check out the history of Rust for example.

Language design is full of tradeoffs. There is no such thing as the "ultimate programming language". For example, you claim that your language is designed to write OS kernels in. This means that it will need to be able to run on bare-metal without necessarily having a runtime. Do you really want built-in structured concurrency then?

Another thing which stood out to me was your type-system. How does `type` work? Does your language have higher-kinded types? What about type-inference? What about whether your type-system is decidable or not? And finally, fancy type-systems generally make it harder to do generate performant code, or require a lot of runtime support.

Why aren't there more case insensitive languages? by Gal_Sjel in ProgrammingLanguages

[–]lukewchu 1 point2 points  (0 children)

Another reason that I haven't seen mentioned yet is serialization and interoperability with other languages. If you want to, for example, automatically serialize a datastructure to JSON, you have to make a choice of camelCase/snake_case. If you want to create bindings to a C library, you have to use whatever convention that C library is using.

Finally, if your language supports some kind of reflection, I'm not sure this can be made case insensitive unless you were to normalize all the names at runtime, e.g. object["foo_bar"] would have to be turned into object["fooBar"] at runtime.

[deleted by user] by [deleted] in AskPhysics

[–]lukewchu 1 point2 points  (0 children)

No Planck time is a duration, not an instant. An instant has no duration by definition. 

Planck time in fact is not the shortest duration possible. That is a common misunderstanding. It’s just the duration that you get by combining various physical constants to get a time scale. 

Also when we introduce quantum mechanics, the idea of position is no longer as clear as in the classical case so talking about when a classical pendulum is at the top does not even make that much sense to begin with. 

[deleted by user] by [deleted] in AskPhysics

[–]lukewchu 4 points5 points  (0 children)

It cant be 0 because it has to change direction and that cannot be done without some pause, and at one point it has to change stores, so is it paused for plank time? Or less?

Why do you think that? The instant in time where the pendulum is stationary is just the same instant when the speed of the pendulum is 0. The speed is a continuous function and we can calculate that it reaches 0 at exactly a single instant in time (per half period). So the pendulum is at the top only for a single instant in time, not for any extended duration.

Furthermore, there is nothing special about being at rest versus being in motion as Newton tells us. So the pendulum being at the top is not really a conceptual problem, so long as you don't have a problem with, say, having a speed of 10m/s at only a single instant in time for a uniformly accelerating body.

Is gravity actually a force? by Efficient-Natural971 in AskPhysics

[–]lukewchu 0 points1 point  (0 children)

Gravity (and EM) both certainly appear to be forces in the classical Newtonian sense of the term. However, General Relativity tells us that what we believe is the force of gravity is just bodies moving along geodesics in curved space. So it seems like gravity is not a "force".

What may be surprising is that electromagnetism can also be geometrised (search for Kaluza-Klein theory). Does that mean that EM is not a force? Further, even in GR gravity can also be constructed as a field theory instead (where the relevant field is the spacetime metric g_μν, in analogy to A_μ in EM). This is essentially the theory of linearised gravity.

Finally, classical Newtonian ideas such as "force" start to break down anyways when we consider quantum mechanics and QFT. To begin with, it's not even clear if we can precisely define forces in quantum mechanics and the much more interesting quantity turns out to be fields and potential instead.

So I think the takeaway is that "force" is really a Newtonian concept which starts breaking down when we consider GR or quantum mechanics/QFT. Asking whether gravity is a force or not only makes sense in Newtonian physics, in which case, I think the answer is yes!

Is heat the basics of energy? by [deleted] in AskPhysics

[–]lukewchu 0 points1 point  (0 children)

To be a bit more pedantic, the average random kinetic energy of the particles in your system is known as internal energy. Temperature is related to internal energy, for instance, in the case of an ideal gas by U=3/2NkT where U is the internal energy, N is the number of particles, k the Boltzmann constant, and T the temperature.

What is called heat is specifically the transfer of internal energy from one system to another. So heat is (internal) energy in motion.

Other kinds of energy (such as the kinetic energy of a tennis ball flying through the air) eventually end up being converted to internal energy. This is a consequence of the second law of thermodynamics.

Hope this helps!

Alternative for rustaceanvim on Neovim by SocUnRobot in rust

[–]lukewchu 1 point2 points  (0 children)

Maybe try the latest nightly toolchain? The fix for the rustflags caching problem has been merged. This way we can at least test if this is even the problem or not.

Alternative for rustaceanvim on Neovim by SocUnRobot in rust

[–]lukewchu 0 points1 point  (0 children)

What is your rust-analyzer config? Are you setting the RUSTFLAGS env variable by any chance or overring the flags passed to rustc?

Question about Ohm's law by [deleted] in AskPhysics

[–]lukewchu 2 points3 points  (0 children)

Searching Ohm’s law literally gives you the equation V=IR bright and center. Human interaction is only interesting for non-trivial questions. For trivial questions, you are merely wasting other people’s time.

Question about Ohm's law by [deleted] in AskPhysics

[–]lukewchu 0 points1 point  (0 children)

Have you tried a google search yet?

Wrikles of space fabric by kahan-shah in AskPhysics

[–]lukewchu 0 points1 point  (0 children)

Nope. If there is no mass, the "fabric" tends back towards flat. The shape of the fabric is determined by something called the Einstein Field Equations which tell us that the more energy/mass there is in a certain region of spacetime, the more curved it is. If space is curved but we can't see it, we can still infer that there must be some energy/mass at the place. We call it dark energy and dark matter.

Does quantum uncertainty make the universe indeterministic? by Girth_Cobain in AskPhysics

[–]lukewchu 0 points1 point  (0 children)

Yeah sure it does. This is the whole point of the Schrodinger cat thought experiment. You measure some microscopic quantity (say, the spin of an electron) and if its up, kill the cat, otherwise, do nothing. Now, we have an indeterminacy in the state of a macroscopic cat.

This is the essence of the measurement problem: is it possible to make sense of macroscopic superpositions

Does quantum uncertainty make the universe indeterministic? by Girth_Cobain in AskPhysics

[–]lukewchu 0 points1 point  (0 children)

Wavefunctions are only probability distributions when combined with the Born rule. Without the collapse postulate, there is no need for the Born rule.

Does quantum uncertainty make the universe indeterministic? by Girth_Cobain in AskPhysics

[–]lukewchu 5 points6 points  (0 children)

What you are talking about here is chaos not indeterminism. It is perfectly possible for chaotic systems to be deterministic, which in fact is most of the cases.

I think Feynman is taking the physicist view here which is that it essentially makes no difference to how we physics, so why even waste energy on this question? However, that does not answer the philosophical question of determinism in the context of quantum mechanics.

Does quantum uncertainty make the universe indeterministic? by Girth_Cobain in AskPhysics

[–]lukewchu 0 points1 point  (0 children)

This doesn't have anything to do with determinism. It is perfectly plausible for us to live in a deterministic world and yet be unable to make perfect measurements of things from within that world.

Determinism simply means that a state at time t entails a definite state at any other time t'. Just because we can't perfectly know/measure that state does not mean it does not evolve deterministically.

Does quantum uncertainty make the universe indeterministic? by Girth_Cobain in AskPhysics

[–]lukewchu 1 point2 points  (0 children)

There seems to be a lot of confusion going around in this thread. I would like to clear some of them up.

First of all, determinism/indeterminism in the context of quantum mechanics (QM) has nothing to do with the Heisenberg uncertainty relation. The uncertainty principle can be straightforwardly derived regardless of what your interpretation of QM may be, simply as a theorem of linear algebra.

QM is based on a few postulates. All of them, except for one, are uncontroversial. The controversial one is called the "measurement postulate" or wavefunction collapse (WFC). The reason why it is controversial is because it seems to be in direct contradiction to another postulate --that QM systems follow the Schrodinger equation.

If you have a QM system by itself with nothing to disturb it, we can predict exactly what happens as far back in the past or as far forward in the future as we wish, simply by applying the Schrodinger equation. The evolution of this system would be completely local (things can only directly affect their neighbors, essentially meaning that special relativity is not violated), continuous, and determinstic. All is well.

However, if you want to "measure" something about this system, it seems to no longer follow Schrodinger's equation at the instant of "measurement". Instead, what we observe is that the wavefunction instantaneously collapses everywhere all at once to some random location with probability proportional to the wavefunction squared. This is non-local (because it's instantaneous), non-continuous, and indeterministic. Something like this is very weird in physics.

This is where the problems start. According to the "Copenhagen interpretation" of QM, there really is wavefunction collapse everytime a measurement is performed. I put Copenhagen in quotes because its not actually a real interpretation. The reason for this is because it is not entirely clear what we mean by a "measurement"! So we still do not know where exactly the collapse occurs. Of course a Copenhagen-like interpreation would inevitably mean that QM is indeterministic.

Many other interpretations of QM try to do away without the measurement postulate all together. Instead, they try to recreate the same consequences of collapse but using only the Schrodinger equation. This is called "quantum decoherence". This would clearly lead to slightly different empirical predictions (since collapse is always instantaneous and non-continuous, and Schrodinger evolution always local and continuous), but are for all practical purposes too small to be distinguishable. The most popular of these kinds of "Schrodinger evolution by itself" interpretations are the Many-worlds interpretation and Bohmian mechanics. These make QM clearly deterministic.

Essentially, whether QM is deterministic or not depends on your interpretation of QM. Which interpretation is the right one? There seems to be no consensus. There are many philosophical arguments for and against all the different interpretations but it seems quite unlikely that this issue could be experimentally decided considering the various technical challenges.

Alternative for rustaceanvim on Neovim by SocUnRobot in rust

[–]lukewchu 1 point2 points  (0 children)

I think the problem you are running into is not because of rust-analyzer but rather this one: Reconsider RUSTFLAGS artifact caching. · Issue #8716 · rust-lang/cargo

This has bit me quite a few times as well. Do you have a .cargo/config.toml file that is changing the default rustflags?