News for hackers. Stuff that matters.
Re:Building a Cloud Database from Scratch: Why We Moved from... by jeffbee on Friday May 27, 2022 @11:28PM (#31537357)
> C++ code can be compiled into assembly language for direct execution on the OS

Honestly it sounds like these guys don't know how a computer works at all.

Re:Building a Cloud Database from Scratch: Why We Moved from... by PaulDavisThe1st on Saturday May 28, 2022 @01:21AM (#31537817)
Back when I started programming computers for a living, I came across a quote from wise sage that went something like this:

"When you first start programming, understanding the difference between a compiled and an interpreted language can be quite hard. After you've been doing it for a while, the difference will seem really obvious, and impossible to miss. When you've been doing it even longer, you'll find that you are no longer sure of what the difference really, and will likely struggle to explain it to a beginner."

Re:Building a Cloud Database from Scratch: Why We Moved from... by _gabe_ on Saturday May 28, 2022 @02:09AM (#31538012)
I think the parent comment is just insinuating that it's weird that they said assembly gets executed directly by the machine. Instead of saying that the assembly gets assembled into binary machine code that gets executed directly by the machine. And afaik that's what ultimately happens, but maybe I don't know how a computer works either. If that's the case please correct me haha.
Re:Building a Cloud Database from Scratch: Why We Moved from... by PaulDavisThe1st on Saturday May 28, 2022 @01:27PM (#31542090)
Well, the "binary machine code" in many cases today gets translated into microcode before it is "executed", so there's that.
Re:Building a Cloud Database from Scratch: Why We Moved from... by johnisgood on Saturday May 28, 2022 @02:17AM (#31538037)
I think that is fine, but maybe I have no clue either. :D
Re:Building a Cloud Database from Scratch: Why We Moved from... by jtsiskin on Saturday May 28, 2022 @06:09PM (#31544304)
The full quote is “Moreover, C++ code can be compiled into assembly language for direct execution on the OS instead of relying on interpreters or language runtime.”
Re:Building a Cloud Database from Scratch: Why We Moved from... by vnorilo on Saturday May 28, 2022 @03:27AM (#31538325)
The charitable interpretation is they mean the code runs without a VM, and interfaces with OS syscalls instead of an inner platform like node, java, .net...
Re:Building a Cloud Database from Scratch: Why We Moved from... by deilline on Saturday May 28, 2022 @02:16AM (#31538033)
Maybe they meant there’s no VM like w/ Java, so no intermediate bytecode, or no IL like C# iirc
Re:Building a Cloud Database from Scratch: Why We Moved from... by stingraycharles on Saturday May 28, 2022 @02:42AM (#31538128)
Yes but assembly is an intermediary representation and the OS is not doing any “direct execution”, it’s the CPU that does it.

I would expect a seasoned C++ database developer to be able to understand these nuances.

Re:Building a Cloud Database from Scratch: Why We Moved from... by jcelerier on Saturday May 28, 2022 @03:43PM (#31543120)
> Yes but assembly is an intermediary representation

there's certainly a technical difference between assembly and machine code, but it's pretty common to use the word "assembly" by metonymy with the latter

> the OS is not doing any “direct execution”

OSes have native executable formats for which execution most certainly has less steps than executing a .js, a .jar or a .sh, which I would absolutely call "direct execution". The criterion can be defined I would guess as - does the OS / environment need to launch a separate process / specific steps such as setting up an interpreter before getting to the code you want to execute ? but most likely there's a finer distinction to be made.

Re:Building a Cloud Database from Scratch: Why We Moved from... by pjmlp on Monday May 30, 2022 @04:09AM (#31556607)
It is called LLVM, GIMPLE or whatever, depending on the middle layer we are talking about in C and C++ compilers.

Likewise there are JIT and AOT compilers for turning those JVM bytecodes or MSIL into machine code as well, including not shipping a VM rather a runtime.

So it does show a lack of understanding on how compilers work.

Re:Building a Cloud Database from Scratch: Why We Moved from... by kaba0 on Saturday May 28, 2022 @05:11AM (#31538826)
I’m sure you know it but in the majority of cases JIT-compiled languages run bare-metal machine code just as well.