top | item 11976966

(no title)

NickLarsen | 9 years ago

That's fair. Originally asm.js was named capsule.js but that was taken and didn't really mean what it was. We could also call it modules but there is another very related spec out there for that as well. What would you call it instead?

discuss

order

Someone|9 years ago

OpenDoc used 'part'. IIRC, all parts had a presence in the GUI, though.

This, I think is just a library or archive (in the ar/ranlib sense; https://sourceware.org/binutils/docs/binutils/ar.html#ar) of code that the browser loads over the Internet.

Java hit a jackpot calling such a thing a jar, a word that is both shorthand for "Java archive" and a noun describing a container. That suggests looking at words such as 'bottle', 'box', 'cask', 'pot' (nice word, but its connotations do not make it a winner), 'cup', 'amphora', 'pithos' (not well-known enough, and typically unmovable), 'crate' (taken by rust), or 'vase' but I can't find a nice alternative interpretation as an abbreviation ('Jug' has a 'j' that could mean JavaScript, but I think we would be looking for something with a W for 'web' or I for 'internet') or even something that sounds good ('crate' is growing on me, but already taken by rust. That shows that other terms might grow to become acceptable, too. Maybe 'jug' could be such a word?)

kahnpro|9 years ago

Plus jug will give us great opportunities for immaturity, like hey Bob, can you take a look at my jugs? Are my jugs too big?

tdumitrescu|9 years ago

It's interesting that the discussion in this thread centers around what to call modules, components, and packaging units. It's like saying that JVM bytecode is a way to author JARs, when it's actually the other way around: JARs are a way to package classes packaging JVM bytecode, which is a compilation target for various languages. WASM is similarly a compilation target for code; whether it's a module of code or a capsule of code or a script tag of code isn't really the point, and "source code" remains an uncountable noun (http://www.edufind.com/english-grammar/countable-and-uncount...). And that it's supposed to be browser-agnostic is cool, but surely the bigger picture is that it's source-language-agnostic.

NickLarsen|9 years ago

Initially my thought was to compare it to the first compiler, back in the days when punch cards were the interface, but I decided against any history lessons that go that far back. In that analogy, the byte code is the machine, and now we all need to be writing compilers for it. This is why so many languages compile to javascript, it's the assembly of the web (not my trademark), in the browser world at least. If you want this code to run in that browser, you gotta pay the penalty of cross compilation inefficiency.

I actually think being browser agnostic is more important; it is sort of the reason we're even looking at wasm replacing asm.js in the first place. asm.js is still javascript, even though it gets handled differently under the covers. Having a second option of language supported by all major browsers is a huge deal, especially one with static typing.

As for the naming thing, a little bit of bikeshedding is healthy from time to time.

Longwelwind|9 years ago

I believe "module" in classic Javascript already corresponds to a "self-contained" Javascript file.

azdle|9 years ago

How about a "Web Assembly Module Object"? I don't know if that is technically correct, but it does let you call them a "WAMO" file.

binji|9 years ago

We've been calling them modules, but I'm not certain that's what we'll end up with.

Also, there's a reason the description is a bit fuzzy on the WebAssembly landing page. It's not just a binary format (in fact, we didn't have a binary format for a while after we started). I like to think that it's a specification of execution semantics that can be expressed in many different formats (text, binary, AST, etc.). Not sure that's the easiest way to explain it though.

NickLarsen|9 years ago

Sounds like a processor to me, let's just call them kernels.

SiVal|9 years ago

code components?

ludamad|9 years ago

Web libraries?