logoalt Hacker News

jacquesm • last Wednesday at 7:16 PM • 2 replies • view on HN

I did say barring optimizations to ensure that that was taken into account. The link is a deterministic one, which is what matters. If the program would do something you did not program you'd see that as a compiler bug.


Replies

nostrademons • last Wednesday at 7:27 PM

There's a whole rats nest of undefined behavior (at least in languages like C, C++, PHP, and Perl) where it's very easy to write a syntactic utterance whose output is not deterministic, and the usual outcome is "your machine is now pwned". A significant portion of the Internet was taken offline this morning because of one, with numerous HN stories documenting it.

Newer languages consider this to be a misfeature, and have taken pains to define far more of the language semantics outright, even if the definition is simply "This is a compile error" or "This is a panic." It's interesting that we're now going back the opposite way with LLMs, with their ability to generate code that does something for any natural-language prompt being a major selling point.

➕ show 1 reply
pjmlp • last Wednesday at 7:22 PM

Yeah, but only toy compilers don't do optimizations.

➕ show 1 reply