News for hackers. Stuff that matters.
Re:Back end of Meta Threads is built with Python 3.10 with s... by georgyo on Thursday July 06, 2023 @10:42PM (#36626400)
This may be shocking to you, but _all_ code is effectively compiled to "machine code" eventually.

If it is running on your CPU, then it is running on your machine.

When the compilation happens can be different (interpretted, JIT, ahead of time) but those are just design choices.

Re:Back end of Meta Threads is built with Python 3.10 with s... by rewmie on Friday July 07, 2023 @01:01AM (#36627374)
> This may be shocking to you, but _all_ code is effectively compiled to "machine code" eventually.

I'm not sure you understood the point. It means nothing to claim that deep down it's all opcodes or electrons flowing. What matters is being able to transform the code targeting the high level interface to the lowest level interface in a way that remains usable and regression-free. Sometimes compilers for widely popular languages introduce bugs and weird behavior too.

Re:Back end of Meta Threads is built with Python 3.10 with s... by georgyo on Friday July 07, 2023 @09:08AM (#36631161)
I don't think you understood the comments above, but I definitely don't understand your point...

Compilers introduce bugs, yes. Compilers are code, and code can have bugs and regressions.

But the comments above make no mention of bugs are regressions. They said compiling php into machine code is "impossible."

Going form high level interfaces to lower level is the easy part. It's what all interprets and compilers do already.

Having different intermediate forms is also a very common practice. There is nothing special about php here. Except for maybe it's underserved reputation of being an obtuse language.

Re:Back end of Meta Threads is built with Python 3.10 with s... by lyu07282 on Friday July 07, 2023 @09:31AM (#36631483)
Such a pedantic response, the archetypical HN comment, I can sense the pretentious smirk on your face while writing it, thanks. Words still mean something, we don't compile a dynamically typed, interpreted scripting language such as PHP for a reason and as it turns out Facebook didn't "compile PHP" either but a dialect of the language.

https://en.wikipedia.org/wiki/Hack_(programming_language)

Re:Back end of Meta Threads is built with Python 3.10 with s... by redsky880 on Friday July 07, 2023 @06:19PM (#36639030)
Facebook transpiled it before using the HHVM.

https://en.wikipedia.org/wiki/HipHop_for_PHP

Re:Back end of Meta Threads is built with Python 3.10 with s... by dang on Sunday July 09, 2023 @02:06PM (#36657097)
Please don't respond to a bad comment by breaking the site guidelines yourself. That only makes things worse.

https://news.ycombinator.com/newsguidelines.html

Re:Back end of Meta Threads is built with Python 3.10 with s... by dang on Sunday July 09, 2023 @02:06PM (#36657095)
Please follow the site guidelines and edit swipes and putdowns out of your comments here. They're not what this site is for, and destroy what it is for.

https://news.ycombinator.com/newsguidelines.html