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

> A compiler is only deterministic with respect to itself.

You can compare how its output behaves compared to that of the ‘official’ compiler.

> It should output identical binaries for identical input

Not necessarily, and it’s surprisingly hard to make that happen in modern compilers. Outputs may contain timestamps, file paths, padding inside constant structs may be different, multi-threading in compiler or linker may reorder objects (https://en.wikipedia.org/wiki/Reproducible_builds).

> Reflections on Trusting Trust and the underhanded c contest, trusting google not to write backdoors into your binary is a little different than trusting anyone with a claude subscription

If you compile this compiler multiple times, sometimes with the ‘official’ go compiler, I don’t think that will be a problem. Having non-hidden back doors that are hard to find due to the size of the code, however, can be a problem.


>You can compare how its output behaves compared to that of the ‘official’ compiler.

Sure but that's a fairly hard problem. Even fairly straight forward things can have millions of combinations of inputs/state. It may be tractable to cover normal program behaviour but a compiler could do something screwy like use a syscall wrong such that it, say, deletes the wrong file with certain inputs.


FTA: “Disk Utility is […] Despite being used by almost everyone who runs a Mac”

Citation needed. It would not surprise me if that were false. You don’t need it to mount or eject media, and I bet a large fraction of users would, if the Finder refused to eject a disk, just unplug the device or reboot their systems.


> The way I think computing should have evolved, given their history in scientific and military applications:

> 1. Starting with arbitrary precision formats

> 2. Noticing it's sometimes too slow

And always too costly. Both were so bloody obvious that they didn’t consider 1 at all.

> What reality seems to look like:

> 1. Limited precision calculations are the default

Historically, fixed precision integer calculations with implied decimal points were the default.

Von Neumann, in 1946 (https://www.arithmazium.org/library/lib/wk_floating_point_hi...):

“Several of the digital computers being planned or built in this country or in England are to contain a so-called floating decimal point.' ... There appear to be two major purposes in a 'floating' decimal point system both of which arise from the fact that the number of digits in a word is constant, fixed by design considerations for each particular machine. The first of these purposes is to retain in a sum or product as many significant digits as possible and the second of these is to free the human operator from the burden of estimating and inserting into a problem 'scale factors' multiplication constants which serve to keep numbers within the limits of the machine.

There is, of course, no denying the fact that human time is consumed in arranging for the introduction of suitable scale factors. We only argue that the time consumed is a very small percentage of the total time we will spend in preparing an interesting problem for our machine. The first advantage of the floating point is, we feel, somewhat illusory. In order to have such a floating point one must waste memory capacity which could otherwise be used for carrying more digits per word. It would therefore seem to us not at all clear whether the modest advantages of a floating binary point offset the loss of memory capacity and the increased complexity of the arithmetic and control circuits”

(Historically, the idea of fixed-point floats go back centuries, to the first mechanical calculators and the slide rule)


Thank you! This is exactly the back-story I missed in my CS education.

Nitpick: “Doug” likely is shorthand for “Douglas”. Also I think he’s American. If so he likely has a middle name.

And indeed, Wikipedia says he’s “Douglas S Lea” (https://en.wikipedia.org/wiki/Doug_Lea)


IEEE 754 isn't sufficient. Excel worries a lot about making floating point numbers feel like real numbers to non computer scientists

William Kahan, father of IEEE 754, wrote about that: https://people.eecs.berkeley.edu/~wkahan/Mind1ess.pdf

> And many Excel features work on numbers as displayed, rather than the underlying bytes.

I think that’s a configuration flag


Very interesting, I am doing a review of the types right now so I will read that (and the fat document).

Languages that are

- Highly obscure. If few dependencies exist, you’ll likely use few.

- Have multiple slightly incompatible implementations. If you don’t know whether a dependency, if you find one, will work with your implementation, you’ll be less inclined to search for one.

- Make using dependencies hard. If using a dependency (e.g. because auto-completion won’t know about it) or keeping a dependency working (e.g. because you have to manually download updated versions, or because weak typing means you don’t get early warnings about API changes in a new version) is hard, you’re more likely to write the thing yourself.

Lisps and Forths tend to score high for these because the idea behind those languages is that you bend them to suit the goal you’re working towards.

Of course, it also helps if the language or its standard library have good implementations of most things you’ll need. For example, you are less likely to need to buy a Basic expansion cartridge if the built-in Basic already has floating point, graphics capabilities, etc.


> what is the reason for them devoting such a huge fraction of their R&D budget to unrelated (though impactful) problems?

Do they do that? If not, chances are they are also working on problems with direct utility such as cancer medicines and improving solar cells, but don’t release their results on those because such results are worth real money.


It’s a matter of marketing. Bluetooth is similar.

https://en.wikipedia.org/wiki/Bluetooth#Implementation:

“Originally, Gaussian frequency-shift keying (GFSK) modulation was the only modulation scheme available. Since the introduction of Bluetooth 2.0+EDR, π/4-DQPSK (differential quadrature phase-shift keying) and 8-DPSK modulation may also be used between compatible devices.

[…]

In 2019, Apple published an extension called HDR which supports data rates of 4 (HDR4) and 8 (HDR8) Mbit/s using π/4-DQPSK modulation on 4 MHz channels with forward error correction (FEC)

[…]

The above excludes Bluetooth Low Energy, introduced in the 4.0 specification,[30] which uses the same spectrum but somewhat differently.”

The various network standards (2G, 3G, 4G, 5G) similarly have little to do with each other, technically.


> If you're providing something free and open source for the public good

This isn’t about source; it’s about publishing a binary.

And I think the info has to be provided because the app may not be for the common good. It could try to lure its users to gamble, give them bad medical advice that harms or kills them, etc.


> Does the raw count of lean code lines shed any light on how impressive Andrew Wiles' proof of Fermat's Last Theorem was?

No. You can increase the line count of any Lean proof almost at will by expanding axioms it builds on by their Lean proofs.

Also, one can write very long proofs for simple statements. As a stupid example a proof for “there is only one even prime less than a million” could follow the lines of

- proof 1 isn’t even - proof 2 is even and prime - proof 3 isn’t even - proof 4 is even, but not prime - proof 5 isn’t even … - proof 999,998 is even, but not prime - proof 999,999 isn’t even

instead of the simpler

- even numbers are divisible by 2 - prime numbers are only divisible by 1 and itself - assume p is an even prime - the, p being even, it is divisible by 2 - and, p being prime, it is only divisive by 1 and p - 2 ≠ 1 - hence p = 2


You seem to share the belief that the length of the proof is an indication of how impressive it is. If so, would we not need to say that it sheds some limited light on it? Because you can not decrease the line count of any Lean proof at will by removing/shrinking "axioms it builds on by their Lean proofs"?!

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

Search: