Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Trying to solve the halting problem are we. Remember that one of the most dangerous JavaScript APIs turned out to be a sub-millisecond monotonically increasing time source.


Solving the halting problem is quite tractable.

You can do it the right way, by using total functional programming. Or you can do it the wrong way, by providing a time budget or "gas", and yanking the process if and when it's exceeded.

No, this is more of a Rice's Theorem kind of situation...


Why do you think using 'gas' is the wrong way? Not only does it solve this problem, it solves it in a deterministic way, which has many applications, for example deterministic debugging and replicable computation!


I don't, actually.

What I really meant was that total functional programming is the MIT way to do it, and gas caps or supervisors are the New Jersey way to do it.


> one of the most dangerous JavaScript APIs turned out to be a sub-millisecond monotonically increasing time source

Details?


Pretty sure that's a reference to the Spectre CPU timing attacks and JS's SharedArrayBuffer type being used to construct timers as an attack vector:

https://v8.dev/blog/spectre




Consider applying for YC's Winter 2027 batch! Applications are open till November 2.

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

Search: