News for hackers. Stuff that matters.
Re:Super Tiny Compiler by Stratoscope on Thursday March 31, 2016 @05:40AM (#11395978)
That brings back fond memories. Back in the day on BIX¹ (is anyone else here old enough to remember BIX?) we were talking about different languages and compilers, and the topic of C++ came up. I said, "C++? That's a preprocessor, isn't it?"

Much to my embarrassment, Bjarne Stroustrup was hanging out in the same BIX conference, and he chewed me out for this - but very politely. Bjarne explained that Cfront was definitely not a preprocessor (which would imply something like the C preprocesssor), but an actual honest-to-goodness compiler that just happened to have C as its compilation target.

Now if we could only get the younger generation to abandon that horrible "transpiler" word and call things by their right name: a compiler!

¹ https://en.wikipedia.org/wiki/Byte_Information_Exchange

Re:Super Tiny Compiler by pklausler on Thursday March 31, 2016 @12:18PM (#11398289)
I didn't notice "transpiler" until a year or so ago, and man, it grates nearly as badly as "performant" does.
Re:Super Tiny Compiler by vinhboy on Thursday March 31, 2016 @06:01AM (#11396039)
If something compiles down to C, does that mean there has to be another compiler to compile the C after that?
Re:Super Tiny Compiler by Stratoscope on Thursday March 31, 2016 @06:13AM (#11396072)
Indeed it does.

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

This should not be a surprise. Consider what happens on a modern CPU after the preprocessors do their job, after the compilers do their job, when you're right down to machine code: the bare metal!

But really, how bare is that metal? Not at all.

Your so-called "machine language" just turns out to be another high level language that the CPU itself compiles down to the actual internal instructions that it executes, instructions that look nothing like what you thought was the machine language.

It's all turtles, my friend.

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

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

Re:Super Tiny Compiler by throweway on Thursday March 31, 2016 @07:14AM (#11396291)
Then the universe interprets the code.

My theory is Haskell is functional compiles to machine code which is imperative which runs on a procesor running on physics which is functional again!

Re:Super Tiny Compiler by majewsky on Thursday March 31, 2016 @06:19AM (#11396091)
If you want a binary executable, yes. But that's sort of a tautology: If a program produces some output (like C source code or a binary), you usually run it because you intend to do something with its output later (like compile it or interpret it, or execute it on the machine if it's a binary).
Re:Super Tiny Compiler by jes on Thursday March 31, 2016 @06:17AM (#11396083)
Yes, either another compiler to translate it to machine code, or a C interpreter. Years ago, for example, there was a C interpreter that went by the name "Saber C," if memory serves.