News for hackers. Stuff that matters.
Re:Show HN: A complete Bash parser in JavaScript transpiled ... by tlrobinson on Wednesday May 16, 2018 @10:09PM (#17088143)
Not sure if trolling. I think most programmers have a sense of what constitutes "roughly the same level of abstraction". Certainly there are gray areas, but such is life.
Re:Show HN: A complete Bash parser in JavaScript transpiled ... by monocasa on Wednesday May 16, 2018 @10:42PM (#17088309)
I've been mainly asking, how does the compiler intrinsically change depending on the abstraction of it's source and target?

In my mind your argument is equivalent to to separating novels based on if they were written with a pen or a pencil. Yes, there's a difference between a pen and a pencil, but that has no effective bearing on the novel as written. And it doesn't make sense to categorize novels based on that.

Re:Show HN: A complete Bash parser in JavaScript transpiled ... by Stratoscope on Wednesday May 16, 2018 @11:47PM (#17088561)
Back around 1985, I got involved in a discussion on BIX with Bjarne Stroustrup about whether Cfront was a compiler or not.

Cfront was Bjarne's original C++ compiler. It translated C++ code into C code which would then be passed through a C compiler.

I didn't think Cfront should be called a compiler, because it didn't compile down to machine code and not even to assembly, only to another relatively high level language.

Bjarne was quite insistent that Cfront really was a compiler, and the fact that it compiled to another source language was immaterial. It did essentially the same things as any compiler, it only had a different back end code generator. And the code generator could later be swapped out for one that generates machine code.

Of course you can call it whatever you want, but Bjarne called it a compiler.

Re:Show HN: A complete Bash parser in JavaScript transpiled ... by tlrobinson on Thursday May 17, 2018 @12:04AM (#17088633)
My position* is transpilers are a subset of compilers. So yes, Cfront was a compiler, and a transpiler.

* Which I admittedly didn't make clear in the parent comments, but did mention elsewhere in this thread.

Re:Show HN: A complete Bash parser in JavaScript transpiled ... by Stratoscope on Thursday May 17, 2018 @01:15AM (#17088912)
Ah, it sounds like we are on the same page after all. I mistook what you said for something I've occasionally seen other people say, that a transpiler is not a compiler. My apology for the misunderstanding.