Hacker Newsnew | past | comments | ask | show | jobs | submit | _0w8t's commentslogin

The error handling verbosity in Go should be blamed partially on the formatter that replaces one-liner if err != nil { return err } with 3 lines.


From a technical point of view nothing prevents the scripting package to be just as informative with errors as bash and have a helper to log and clear the error. If it is not already the case, I call it a bug.


There are plenty of web site builders that allow for a drag-and-drop construction. But people who use them are not programmers.

I.e. programming is not supposed to be easy. So if one sticks to it, the problem has to be hard at least from the management point of view.


Experimentally one never observes waves. Light is detected based on its interaction with electrons and that is always by an electron absorbing a quanta of energy, not via some continuous process as would be the case with waves.

Classically one can imagine that as if electron was hit by a particle. But then we have light diffraction and interference, which classically is described as a wave. So from a classical point of view light travels as a wave but interact as a particle.

As of nature of the light, then consider that there is a reformulation of a classical electrodynamics that eliminates electromagnetic waves all together. There are only electrons that interacts with each other directly with no waves in between. Feynman spent quite some time trying to develop quantum electrodynamic based on that. He failed. Still the point stands that we never observe light directly but only through its effects on electrons and other charged particles. So it could be that what we call light is a theoretical artifact and there is no light in reality.


> So from a classical point of view light travels as a wave but interact as a particle.

And the classical point of view is wrong. Photons resemble classical particles in a few respects, and classical waves in a few others, but at the end of the day they're neither.

> Still the point stands that we never observe light directly but only through its effects on electrons and other charged particles.

This is true of literally everything. "Direct" observation does not exist. Every atom, every cell, every person, every planet, every star - you know them by their effect on your sense-data, or else not at all.


photons dont exist, dude, except in connection with and at the site of the detector. study some qft and then you can go talk about it on the internet with authority.

and yes direct observation exists. that's what measurement is. and that's all you can ever "observe" unless you incorporate the wavefunction, which also doesn't "exist".


> study some qft

I have. Srednicki and Weinberg are sitting on my bookshelf right now.

> photons dont exist, dude, except in connection with and at the site of the detector.

Exactly backwards.

Photons fall out of mode-expanding asymptotic EM field states just like any other particle. It's the interaction picture that can't be rigorously built up out of particle states.


good to know you're informed, but it doesn't mean we're communicating effectively.

what i said is not backwards unless you use the inverse understanding of "exist". and how can photons exist without interaction? they don't. they're localizations by detectors. until then, they only "exist" as the probability wave. that's due to nothing localizing them. that's how i mean "exist". so it's not really meaningful to use that word.

btw "any other particle" doesn't fall out of EM fields.


> btw "any other particle" doesn't fall out of EM fields.

I very obviously meant that XYZ-particle states fall out of mode expansions of the XYZ-field, not that all particles are EM quanta.

> what i said is not backwards unless you use the inverse understanding of "exist". and how can photons exist without interaction?

Exactly the same way any other field configuration can? The state space of the free EM field simply is the photon Fock space.

The state space of an interacting 4D EM field is unknown and may well not exist, hence the need for perturbative approaches and renormalization - in which particle states again emerge as terms in the perturbation series.


I'm pleased to talk with you given that you're familiar with the topic.

> The state space of the free EM field simply is the photon Fock space.

but I'm not sure what your point in mentioning this is. When people hear things like "particles exist between their emission and measurement", they might get the idea that there could be said to be any reality to the existence of particles in transit. They simply aren't particles the way people think of them - they are probability waves. A great example we could discuss is the HBT experiment in which photon bunching was seen. If the bunched photons were really "particles" by any sense of the word, they wouldn't bunch in time of detection merely by the fact they are entangled with each other. That would be like saying entanglement affects the flight of a particle which is simply not able to be said.


> They simply aren't particles the way people think of them

They're not anything the way laymen think of them. They're not classical particles, they're not classical waves, they're not classical anything. They're not really probability waves either, for that matter, or even field configurations - the real object is the algebra of observables. But laymen don't get to dictate the vocabulary of physics, and neither do mathematicians. Fields are the things that would be dual to the observable algebra, were it always equipped with a dual; particles are the things whose creation and annihilation operators would generate it, were there only always such things.


Well, you are still talking about models. The creation and annihilation operators are also mathematical structures. That does not mean, as you seem to imply, that "particle" physics cannot be conceptualized outside of QFT. QFT may be superseded someday and the physical systems we try to describe will still be exactly as they are. I'm not sure if you'll agree with me since I suspect you've got a reason not to.


This comment is needlessly hostile. It's ok to correct someone if you think they're wrong, but this tone isn't conducive to curious conversation.


so it's the tone of my textual words? i think you're mistaking my laughter at their blatant and willful ignorance for hostility, and quite honestly it sounds like you're projecting that hostility. from the start I've been incorrectly downvoted and critiqued while being the primary commenter in this child thread providing a semblance of correct view. to be quite frank i deserve an apology, not some nitpick that comes from your personal assumption about my tone. but i know i won't get one because it's not hostility you care about at all. a lot of you commenters here are pretty hilarious. but not in a good way.


At this point anyone who is as certain about the nature of light as you seem to be may well be right, but is demonstrating a level of confidence the literature does not yet seem to support.

Although there are those who believe that photons only exist at source and at the detector, there is some experimental evidence which contradicts that (for example, this 2013 paper in which researchers 'read' information from a photon without destroying it, which implies its continued existence between creation and observation: https://doi.org/10.1126/science.1246164).

For what it's worth, I am also of the opinion that your tone was hostile, and yes, 'textual words' can and do have a (metaphorical) tone. Regarding downvoting and critiquing, there's an old adage about if you walk into a room and it smells of dog shit, maybe someone in the room stepped in something on the way in, but if every room you walk into all day stinks, well maybe you should check your own shoes.


so, you're trying to tell me that such reasoning about "dog shit" applies to the ignorance of humanity in general? The reality is the very few people actually understood what they were talking about and a lot of people went around operating on what they didn't really know. So while you call me an asshole for correcting a number of incorrect people in this thread who are themselves rather overconfident, I have to again insist that because I am correcting them or destroying their delusions does not make me hostile and there's a very good chance that you're projecting that impression. The definition of hostility includes the intent to do harm or to be unfriendly, which is in fact what the people I am replying to are doing by spreading misinformation, as if they know. If that's too difficult for you to accept, then best that you do not reply to me, because it would be a waste in both of our time. "falsehood travels a great distance in one night before the truth even crosses the threshold of the door". And the masses sentences Socrates to death just because he called them hypocrites. It's a good thing I know these truths or I would have been damaged by you. It still makes me sad though.

and for what it's worth I don't believe the paper you linked says what you think it says.


OK.


Defer will be executed normally when the function exits. yield here is not a statement but a normal function.


I.e. C# and many other languages transform a function with the yield statement into a state machine implementing the iteration protocol.

This proposal does the opposite. It transforms the loop body into a closure passed into the iterator.


The big plus of stellarator design is inherent absence of plasma instabilities affecting tokamaks. Notice that future upgrade of Wendelstein may allow to hold plasma for a hour compared with minutes at best with tokamaks. Many physicists for that reason believes stellarator is the only way to archive practical fusion.


In modern JS engines with 64-bit CPU when the engine cannot deduce types and must use a generic word to represent any kind of values numbers (double values) are not boxed. Rather for everything else a NaN tag bit pattern is used. I.e. code checks if the word matches the NaN pattern. If not, a double is assumed. Otherwise the NaN is checked if it is a real NaN o something else masked as NaN.

This slows down object access as detecting and stripping the NaN tag requires few CPU instructions. Plus it assumes that pointers only have 48 bits with rest are zeros (true for AMD, ARM and Intel) or at least have fixed values (can be arranged on more exotic CPUs). But that does not require to box numbers greatly reducing GC pressure.


> Plus it assumes that pointers only have 48 bits with rest are zeros (true for AMD, ARM and Intel)

Except when it isn't: https://en.wikipedia.org/wiki/Intel_5-level_paging

That's not something you're likely to run into on consumer hardware, but with JS being used on the server I wonder if/when JS engines will need to deal with that.


That's probably quite some time off. As an application, you'd only get the new level of paging if you asked for it, like with PAE. And you're only going to ask for it if you need more than 256TB of address space, which seems like a rather large space to need.

I guess you could have a lot of files mmaped though?


ARM also has pointer cryptography which may one day become a blocker.


When there are more bits in a pointer than NaN 52 bits allows, the trick is to replace pointers with indexes from the start of JS heap. This is not efficient even with arrangement like having heap aligned, say, on 4GB or even more granular address so to get the full pointer one just use bit operation, not an add. But if one wants efficiency, then make sure that types in the code is stable and JIT will generate type-specific code.



This describes 32 bit CPU. As opposite to V8, SpiderMonkey, Mozilla’s JS engine, uses 64 bit words and NaN boxing, even on a 32 bit CPU, to represent a generic JS thing.


I'm pretty sure even on 64bit v8 doesn't use NaN boxing. Do you have docs or code that show it does?

Yes other engines use NaN boxing, but not all engines do.


The primary reason for Pimpl is to ensure binary compatibility for C++. QT uses it extensively precisely for this reason. Reduced compilation time is just a nice bonus.


Chromium once supported unity builds. For me it speeded up builds from 6 hours down to 1 hour 20 minutes on a Windows laptop. And Chromium tries to make their headers reasonable.

Chromium eventually dropped support for such builds. At Google the developers have access to a compilation farm that compiles within like 5 minutes. With such farm unity builds makes things slower as they decrease parallelism. So Google decided not to support them not to deal with very occasional compilation breakage.


Apple doesn’t have this, and WebKit supports Unity builds ;)


The article has not mentioned Bayesian inference, which allows to make sound decisions under uncertainty.

For example, in practice the raven problem is not to guess if all ravens are black but to predict the color of the next raven if that color affects a decision.

From that perspective if one knows absolutely nothing about ravens and has seen a single black raven, then it is mathematically sound to guess that the next raven will be black, not white, and make a decision accordingly.


What do you mean by sound? Mathematically sound means "there exists a model validating it", and of course it exists, but so what? If you mean you can bound the probability of error, then in your formulation you actually can't.


Bayesian inference is mathematically sound as it is based on a very generic postulates and allows to compare probabilities based in the current information and made a decision accordingly. With the proper approach the errors are automatically accounted for. I.e. if the errors are large, then one will see that probabilities are too close each other to make a sound decision. Still if one must made a decision, then one can just use the answer based on Bayesian reasoning.

The problem in practice is that accounting for the existing information is hard with guessing of priors etc. But that is the problem of applicability of Bayesian inference, not the problem with the principle itself.

I.e. Bayesian inference is a good answer to the philosophical problem of induction. It is sad that the article has not even touched on that subject.


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

Search: