Live data from Hacker News

HolyJit: A New Hope

blog.mozilla.org

31–40 of 219 posts

Re: HolyJit: A New Hope

#31
post #9

I'm not sure as to what is fundamentally different about this JIT-compiler (except for the awesome name of course) Is it basically just a Rust rewrite which also tries to reduce the complexity of their current just-in-time compiler? Edit: By calling it "just" a Rust rewrite, I'm not implying that's a simple undertaking, even moreso considering the complexity of modern JS engines.

I believe the fundamental difference is that instead of hand-writing snippets of assembly which their JIT can append, they are having the Rust compiler generate the assembly snippets from Rust code. This lets them be much more confident that they wrote the snippets correctly, and lets them spend much less time writing the snippets so they can focus on optimizations.

... and the snippets are used for the interpreter, which gives you more confidence that interpreted and JITed code behave the same (if I understood it correctly).

Re: HolyJit: A New Hope

#32
post #24

Why does the Cargo.toml[1] file in the source repo for HolyJit have the word "brainfuck"[2] in it? Does that have some significance to Rust or Mozilla? Or is this a case of copy pasta? [1]: https://github.com/nbp/holyjit/blob/master/Cargo.toml [2]: Permanent link to line: https://github.com/nbp/holyjit/blob/1f20eb41de2dae14179815c7...

Because it has an example that JITs Brainfuck: https://github.com/nbp/holyjit/blob/master/examples/brainfuc...

(They actually don’t even need that line, as Cargo already infers this via convention)

Re: HolyJit: A New Hope

#33

First thought was: "Is this another Terry Davis language/framework?"[1] No, no it is not. I would suggest changing the name from HolyJit to anything else. [1] https://en.m.wikipedia.org/wiki/TempleOS

But it sounds like "holy shit" LOL. You know what else is funny? Farts!

Re: HolyJit: A New Hope

#34
post #24

Why does the Cargo.toml[1] file in the source repo for HolyJit have the word "brainfuck"[2] in it? Does that have some significance to Rust or Mozilla? Or is this a case of copy pasta? [1]: https://github.com/nbp/holyjit/blob/master/Cargo.toml [2]: Permanent link to line: https://github.com/nbp/holyjit/blob/1f20eb41de2dae14179815c7...

Because the first example that uses holyjit is an implementation [1] of the brainfuck [0] language.

[0]: https://en.wikipedia.org/wiki/Brainfuck

[1]: https://github.com/nbp/holyjit/blob/master/examples/brainfuc...

Re: HolyJit: A New Hope

#35
post #24

Why does the Cargo.toml[1] file in the source repo for HolyJit have the word "brainfuck"[2] in it? Does that have some significance to Rust or Mozilla? Or is this a case of copy pasta? [1]: https://github.com/nbp/holyjit/blob/master/Cargo.toml [2]: Permanent link to line: https://github.com/nbp/holyjit/blob/1f20eb41de2dae14179815c7...

There's a brainfuck [1] interpreter example in the examples/ directory, which I assume is the reason for this allegedly temporary name.

[1] https://en.wikipedia.org/wiki/Brainfuck

Re: HolyJit: A New Hope

#36
post #24

Why does the Cargo.toml[1] file in the source repo for HolyJit have the word "brainfuck"[2] in it? Does that have some significance to Rust or Mozilla? Or is this a case of copy pasta? [1]: https://github.com/nbp/holyjit/blob/master/Cargo.toml [2]: Permanent link to line: https://github.com/nbp/holyjit/blob/1f20eb41de2dae14179815c7...

This is a reference to examples/brainfuck.rs in the repository, which seems to implement a JIT interpreter for Brainfuck, a very basic esoteric programming language.

Re: HolyJit: A New Hope

#37
post #24

Why does the Cargo.toml[1] file in the source repo for HolyJit have the word "brainfuck"[2] in it? Does that have some significance to Rust or Mozilla? Or is this a case of copy pasta? [1]: https://github.com/nbp/holyjit/blob/master/Cargo.toml [2]: Permanent link to line: https://github.com/nbp/holyjit/blob/1f20eb41de2dae14179815c7...

[deleted]

Re: HolyJit: A New Hope

#40

I'm not sure as to what is fundamentally different about this JIT-compiler (except for the awesome name of course) Is it basically just a Rust rewrite which also tries to reduce the complexity of their current just-in-time compiler? Edit: By calling it "just" a Rust rewrite, I'm not implying that's a simple undertaking, even moreso considering the complexity of modern JS engines.

Basically, instead of manually writing assembly fragments, they want to reuse annotated interpreter code, thus ensuring both correctness and safety for JIT-generated code, while reducing the redundancy. The rustc compiler is used to generate assembly fragments for the JIT, directly out of the interpreter code. It seems like a worthwhile endeavor.
Post reply on HN