Live data from Hacker News

3D graphics rendering pipeline. Implemented in JavaScript. Run in a terminal

github.com

41–50 of 52 posts

Re: 3D graphics rendering pipeline. Implemented in JavaScript. Run in a terminal

#41
post #12

Implemented in ~JavaScript~ TypeScript FTFY ... Also nice to see a Douglas Crockford book (who is not a fan of TS BTW) ... Anyways I star'd this repo ... very impressive +1

Sometimes I think TS was made for Java/C# crowd coming to JS. TS is clean, have to agree. But not much of a fan.

This project is awesome though.

Re: 3D graphics rendering pipeline. Implemented in JavaScript. Run in a terminal

#43

Earlier quoted context omitted.

It's always "from one language to another", sometimes the destination is machine language. The output is generally not meant to be meant to be human-readable in any case. "Transpile" is an ugly and unnecessary word, please don't push it as "more correct".

> It's always "from one language to another“ Hmmm, sometimes it’s “from one version of a language to another version of the same language”. As is the case with Babel[0] and JavaScript. [0] https://babeljs.io/

I mean, arguably ES6 and TS are as close or closer to being "the same language" than ES6 and Babel targets.

Re: 3D graphics rendering pipeline. Implemented in JavaScript. Run in a terminal

#45

Earlier quoted context omitted.

"Transpilation" and "compilation" describe the exact same concept. From user's perspective, readable code is translated into runnable code. From theoretical perspective, code in a more complex language is translated into a less complex language while preserving semantics. From a compiler writer's perspective, it's a totem pole of compilers, with at least one middle-level language usually. Plenty of people use the ter…

Transpile is a superset or compile just like typescript is a superset of JavaScript. Transpile implies translating but not into a less complex language but rather onto a similar runtime. So typescript is dynamic just like JavaScript, and they share much of their semantics. So transpile means compile but onto a similar runtime with similar runtime semantic behavior.

In that case surely you'd agree that there are hardly any compilers in wide use these days - more often than not the first step of a modern compiler is translation into a similar but less expressive intermediate language.

Or does it only count as "transpilation" if the intermediate representation is an already existing language, thus making the distincion purely based on the history of a language, not the implementation?

Re: 3D graphics rendering pipeline. Implemented in JavaScript. Run in a terminal

#47

This is awesome, very well done. As someone with very little knowledge of computer graphics, are there any resources anyone would recommend in order to learn how to build something like this?

For rendering at interactive rates, maybe check out "Real-time Rendering", currently on its 4th edition. https://www.realtimerendering.com/

For rendering at rates measured in seconds per frame, consider the "Physically Based Rendering Textbook", currently on its 3rd edition. https://www.pbrt.org/

Re: 3D graphics rendering pipeline. Implemented in JavaScript. Run in a terminal

#48

Earlier quoted context omitted.

> "Transpilation" and "compilation" describe the exact same concept. No I think transpile implies compiling from one level of abstraction to another similar level of abstraction, which is quite different in theory and practice to compiling to a much lower level of abstraction. It's a useful word to have in your communication toolbox.

Fine, but by that logic, gcc with -O0 is a transpiler, and becomes a compiler again with -O2. Similarly, TS transpiles to JS, but, say, ClojureScript compiles to JS. And if a compiler is built with something like Nanopass, it's a sequence of transpilers that somehow become a compiler along the way.

No I don’t agree. A compiler pass is not a compiler. An non-optimising C to assembly compiler is not compiling to the same level of abstraction.

Re: 3D graphics rendering pipeline. Implemented in JavaScript. Run in a terminal

#49

Earlier quoted context omitted.

Fine, but by that logic, gcc with -O0 is a transpiler, and becomes a compiler again with -O2. Similarly, TS transpiles to JS, but, say, ClojureScript compiles to JS. And if a compiler is built with something like Nanopass, it's a sequence of transpilers that somehow become a compiler along the way.

No I don’t agree. A compiler pass is not a compiler. An non-optimising C to assembly compiler is not compiling to the same level of abstraction.

>A compiler pass is not a compiler.

What is the difference, if there's one well-defined language before the pass and another after it?

>A non-optimising C to assembly compiler is not compiling to the same level of abstraction.

Neither are "transpilers", otherwise they'd be quite useless. Abstraction isn't a linear hirerarchy, in any case.

Re: 3D graphics rendering pipeline. Implemented in JavaScript. Run in a terminal

#50

Earlier quoted context omitted.

No I don’t agree. A compiler pass is not a compiler. An non-optimising C to assembly compiler is not compiling to the same level of abstraction.

>A compiler pass is not a compiler. What is the difference, if there's one well-defined language before the pass and another after it? >A non-optimising C to assembly compiler is not compiling to the same level of abstraction. Neither are "transpilers", otherwise they'd be quite useless. Abstraction isn't a linear hirerarchy, in any case.

Terms are fuzzy. That doesn't mean they're useless. When I talk about 'transpilers' instead of 'compilers' it instantly gives people context.

The term's been in use since the 60s, when most compilers were not optimising.

Post reply on HN