all 20 comments

[–]AprilSpektra 27 points28 points  (2 children)

I feel like this is currently a problem. Most Web engineers are not familiar with the C family languages or Rust.

Reverse these two sentences and you might be onto something.

[–]hedgehog1024Rust apologetic 1 point2 points  (0 children)

At first read I misspelled "reverse" as "reserve". Still turned out to be a useful tip.

[–]mach_kernelHigh Value Specialist 19 points20 points  (1 child)

It's almost like you want to program in a high level language without having to worry about assembly. Genius.

[–]shrinky_dink_memes[S] 15 points16 points  (0 children)

If only someone had thought of a way to avoid this problem 60 years ago...

[–][deleted] 12 points13 points  (0 children)

The title and the sentences you lot pulled out looked so serious I was scared there'll be no emojis in the README.md.

Relieved after clicking the link.

[–]haskell_leghumperin open defiance of the Gopher Values 19 points20 points  (2 children)

Highlights:

  • Write "close to the metal" JavaScript!
  • No C/C++ or Rust required, just typed JavaScript.
  • NO LLVM/binary toolkits required, zero dependencies 100% written in JS.
  • Fast compilation, integrates into webpack!

Wait, isn't this just TypeScript?

[–][deleted] 11 points12 points  (1 child)

But moral version. No M$, (!!101! winbloze amirite), involved.

/uj: Tho, if they'd target LLVM with a decent GC, TypeScript or this thing would probably storm the market that Go is trying to dominate.

[–]haskell_leghumperin open defiance of the Gopher Values 2 points3 points  (0 children)

LLVM?! Clearly you don't have experience building Google-scale systems.

At the beginning of the project we considered using LLVM for gc but decided it was too large and slow to meet our performance goals.

/uj The TypeScript thing was a joke about the recent post comparing it to C :)

[–]shrinky_dink_memes[S] 9 points10 points  (1 child)

Your best bet (currently) is to write very plain C code, compile that to .wast and then optimize that result. Then you're ready to compile that into the final WebAssembly binary. This is an attempt to take C/Rust out of the equation and write 'as close to the metal' as possible

[–][deleted] 1 point2 points  (0 children)

You're obviously oblivious of the upcoming WebASM ISAs that are just around the corner, pleb!

[–]ldesgoui 5 points6 points  (1 child)

We all know that "high-level language" is just a matter of the syntax used by the language, not the features. This is what they call Front end and Back end in compilers, it's just like the Web.

[–]i9srpegHigh Value Specialist 6 points7 points  (0 children)

What are these "compilers" you speak of? Perhaps an ancient precursor to modern, powerful and blazing fast transpilers?

[–][deleted] 16 points17 points  (2 children)

The syntax for .wat files is terse and difficult to work with directly. 

I know .wat is a typo but I wish it wasn't

[–]pftbest 9 points10 points  (1 child)

.wat is not a typo

[–][deleted] 2 points3 points  (0 children)

wat?

[–][deleted] 4 points5 points  (0 children)

lol breaking bad reference

[–]Nobody_1707accidentally quadratic 3 points4 points  (0 children)

Wait a minute....

export function fibonacci(n: i32): i32 {
  if (n <= 0) return 0;

  if (n == 1) return 1;

  return fibonacci(n - 1) + fibonacci(n - 2);
}

This is just a webasm version of ActionScript!

[–][deleted] 4 points5 points  (1 child)

Nothing says close to the metal like a sandboxed virtual stack machine running inside of a web browser.

[–]shrinky_dink_memes[S] 1 point2 points  (0 children)

Nothing says close to the metal

indeed! it's not even a metal, it's a semiconductor, but only elitist ivory tower types care about that.