Live data from Hacker News

HolyJit: A New Hope

blog.mozilla.org

191–200 of 219 posts

Re: HolyJit: A New Hope

#191
post #188

Earlier quoted context omitted.

Well, except WebAudio. That standard omits some essential low level audio primitives while featuring an incomplete scatter of high level APIs.

Agreed. I've only given it a cursory glance, but I've read several people bemoaning how awful it is. And, I think it's an example of what happens when APIs are built by folks who aren't actually building things with them. Audio always seems to get screwed up by engineers, sometimes for years. Linux had absolutely shitty audio up until...like yesterday. It's a feedback loop, I think. Almost nobody uses the web for ser…

> Linux had absolutely shitty audio up until...like yesterday.

Is that just hyperbole, or has there been a recent (within the past 6 months) development that has made Linux audio better?

Re: HolyJit: A New Hope

#192
post #180

I was expecting TempleOS getting a new jit

I confess, I actually chuckled out loud. I haven't seen any of their posts for a while. I hope they are okay.

I find it amazing what he has done. I did say new jit as HolyC is compiled on the fly and has some amazing features that no other system has(embedded images). Yeah there are some esoteric features, but that is the benefit of DIY.

Re: HolyJit: A New Hope

#193
post #175

Earlier quoted context omitted.

Rust has several layers of IR: AST -> HIR -> MIR -> LLVM IR This operates at the MIR layer. You can sort of think of MIR as "core Rust", in that it's the final, desugared form of everything. This is why the non-lexical lifetime stuff has taken a while; the precursor to that is "port the borrow checker to MIR". MIR/HIR are also fairly new; using MIR is only a year old.

> You can sort of think of MIR as "core Rust", in that it's the final, desugared form of everything. Though I don't want anyone to get the impression that MIR is a source-compatible subset of Rust; it's a pretty different thing in its own right. (Worth clarifying because one could imagine a "fully-desugared" maximally-explicit subset of Rust, where e.g. all method calls are maximally disambiguated via UFCS, all types…

That is what I imagined when the Karger/Thompson attack came up with regards to Rust. The simplest cheat would be mapping low-level Rust to a safe subset of C. Automatically or hand-convert the source for Rust compiler. Then, run that through CompCert. A Csmith-style program run through both versions of Rust compiler might also catch errors in one or both. One might also use the C tooling to find errors in the Rust compiler or apps. And so on.

First step that was necessary would be converting the Rust to its lowest-level form. That sounds like the fully-desugared" form you describe.

Re: HolyJit: A New Hope

#194

Earlier quoted context omitted.

Agreed. I've only given it a cursory glance, but I've read several people bemoaning how awful it is. And, I think it's an example of what happens when APIs are built by folks who aren't actually building things with them. Audio always seems to get screwed up by engineers, sometimes for years. Linux had absolutely shitty audio up until...like yesterday. It's a feedback loop, I think. Almost nobody uses the web for ser…

> Linux had absolutely shitty audio up until...like yesterday. Is that just hyperbole, or has there been a recent (within the past 6 months) development that has made Linux audio better?

Hyperbole. It really was fixed a couple years ago, maybe as much as three or four, if you were running a cutting-edge distribution like Fedora. But, it was entirely fair to say Linux absolutely sucked at audio for decades.

Re: HolyJit: A New Hope

#195

Earlier quoted context omitted.

The state of the art in jit compilation has advanced quite a bit since then, and another difference between the days of old and new is that this is being targeted at runtime code generation, which naturally trades off throughput of generated code for speed-of-generation. Especially for web pages, speed-of-generation, and the stability of the resulting code under polymorphism (so that jitcode with type assumptions doe…

"The state of the art in jit compilation has advanced quite a bit since then" Since when? Since the 70's? Sure. But since the 90's, not really in terms of techniques, only in terms of engineering and feasibility of advanced techniques. It's not that there is no research, mind you, but it's definitely more engineering than research. That also doesn't make it any less cool, exciting, etc. "another difference between th…

Where do you draw the line between engineering and research?

Graal has shown that you can use interpreter specialization to create a Javascript engine that's essentially as fast as V8. It relies on a lot of clever tricks to do that, like partial escape analysis. Graal has generated quite a few published research papers. It seems like both engineering and research, to me.

Re: HolyJit: A New Hope

#196

Earlier quoted context omitted.

"The state of the art in jit compilation has advanced quite a bit since then" Since when? Since the 70's? Sure. But since the 90's, not really in terms of techniques, only in terms of engineering and feasibility of advanced techniques. It's not that there is no research, mind you, but it's definitely more engineering than research. That also doesn't make it any less cool, exciting, etc. "another difference between th…

Where do you draw the line between engineering and research? Graal has shown that you can use interpreter specialization to create a Javascript engine that's essentially as fast as V8. It relies on a lot of clever tricks to do that, like partial escape analysis. Graal has generated quite a few published research papers. It seems like both engineering and research, to me.

This is obviously a hard line to draw.

I tend to draw it at "research produces new things that were not previously known, engineering may produce new insights or improvements of things that were already known".

(but again, I admit this is not a very very bright line)

I consider graal to be good engineering. It is a new arrangement and engineering of existing techniques. That will in fact, often produce new papers.

For example, I built the first well-engineered value based partial redundancy elimination in GCC. before that, there were zero production implementations, and it was considered "too slow to be productionizable" until i took a whack at it. I helped with some papers on it. It's not research, just good engineering. The theory was known, etc. I just made it practical. That wasn't research.

Another example: LLVM now has the first shipping implementation ever of an efficient incremental dominator tree updating scheme (that i'm aware of. GCC has a scheme to do it for some things, but it's not efficient). Again, previously not efficient. Theory has been published. Again, making it work well is just good engineering.

Another example: LLVM's phi placement algorithm is a linear time algorithm based on sreedhar and gao's work. If you read further research papers, they actually pretty much crap on this algorithm as very inefficient.

It turns out they were just bad at implementing it effectively, and LLVM's version is way faster than anything else out there. Is it research because our results are orders of magnitude better than anything else out there? No. It may be cool, it may be amazing, etc, but it's still engineering.

Remember that conferences like PLDI and CGO accept papers not just on research, but on implementation engineering.

All that said, i also don't consider trying to differentiate heavily between research and engineering to be that horribly interesting (though i know some prize one or the other).

Re: HolyJit: A New Hope

#197
post #180

Earlier quoted context omitted.

I confess, I actually chuckled out loud. I haven't seen any of their posts for a while. I hope they are okay.

I find it amazing what he has done. I did say new jit as HolyC is compiled on the fly and has some amazing features that no other system has(embedded images). Yeah there are some esoteric features, but that is the benefit of DIY.

You have inspired me. I'll torrent his most recent ISO and spin it up in a VM over the weekend. I will give it an honest look and be objective.

I should set a blog up before that.

Re: HolyJit: A New Hope

#198
post #197

Earlier quoted context omitted.

I find it amazing what he has done. I did say new jit as HolyC is compiled on the fly and has some amazing features that no other system has(embedded images). Yeah there are some esoteric features, but that is the benefit of DIY.

You have inspired me. I'll torrent his most recent ISO and spin it up in a VM over the weekend. I will give it an honest look and be objective. I should set a blog up before that.

You will need to ignore anything non-technical. He suffers from mental illness and says offensive things.

Re: HolyJit: A New Hope

#199
post #175

Earlier quoted context omitted.

> You can sort of think of MIR as "core Rust", in that it's the final, desugared form of everything. Though I don't want anyone to get the impression that MIR is a source-compatible subset of Rust; it's a pretty different thing in its own right. (Worth clarifying because one could imagine a "fully-desugared" maximally-explicit subset of Rust, where e.g. all method calls are maximally disambiguated via UFCS, all types…

That is what I imagined when the Karger/Thompson attack came up with regards to Rust. The simplest cheat would be mapping low-level Rust to a safe subset of C. Automatically or hand-convert the source for Rust compiler. Then, run that through CompCert. A Csmith-style program run through both versions of Rust compiler might also catch errors in one or both. One might also use the C tooling to find errors in the Rust c…

I admit that I'm quite curious about determining exactly what features could be left out of maximally-explicit Rust, because it would determine the obvious MVP for an alternative compiler, that could technically compile all Rust code with the caveat that you would need to first losslessly and automatically transform the source (which theoretically shouldn't be too hard to add the Rust compiler, e.g. it already has the capability to print Rust source post-macro expansion). Without macros, you'd need neither an implementation of pattern macros nor syntax extensions; without inferred types, you'd need neither a trait resolution engine nor anything of Hindley-Milner; with every identifier fully qualified you wouldn't need any name resolution rules... and we've already established that a borrow checker is unnecessary to implement if your goal is to merely compile Rust code that has already been typechecked. All that together means that you could have a legitimately useful alternative backend with so, so much less work on behalf of the implementor!

Re: HolyJit: A New Hope

#200
post #197

Earlier quoted context omitted.

You have inspired me. I'll torrent his most recent ISO and spin it up in a VM over the weekend. I will give it an honest look and be objective. I should set a blog up before that.

You will need to ignore anything non-technical. He suffers from mental illness and says offensive things.

I was online in the 80s. I have an account on voat. I visit Slashdot. I should be ok. ;-)
Post reply on HN