Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Assembly text format. #1164

Closed
hsk opened this issue Dec 7, 2017 · 31 comments
Closed

Assembly text format. #1164

hsk opened this issue Dec 7, 2017 · 31 comments

Comments

@hsk
Copy link

hsk commented Dec 7, 2017

I think S expression is Lisp.
However, WebAssembly is assembly language.
Please, standard assembly language with text format.

@hsk
Copy link
Author

hsk commented Dec 7, 2017

example:

https://github.com/hsk/vscode-debugger-simple-asm/blob/master/dist/ocaml/parser.mly

This is very simple assembly language format.
I think assembly language should be defined with very simple BNF.

@hsk
Copy link
Author

hsk commented Dec 7, 2017

Although it can be understood that handling is easy if written in S formula, S expression is difficult to understand.
Are you not learning anything from XHTML?

@xtuc
Copy link

xtuc commented Dec 7, 2017

What is wrong with WebAssembly Text Format being a new syntax? You said that it's difficult to understand, do you have some examples?

To me it's good to have a dedicated syntax because WebAssembly has nothing to do with neither Lisp or the Assembly text format.

Could you tell us more about XHTML?

@hsk
Copy link
Author

hsk commented Dec 7, 2017

XHTML is very Simple format. But, HTML5 is not XHTML, now.
Because XHTML is not readable and usable for human.
I think S expression is not readable and usable for human too.
Since the web assembly is in a standard format, the text format must adopt the usual assembly language format.

@xtuc
Copy link

xtuc commented Dec 7, 2017

XHTML is not readable and usable for human.

I don't agree, humans can read it and used to even write it.

S expression is not readable and usable for human too.

I don't agree, same comment than for XHTML.

WebAssembly don't use an existing standard for its syntax, it has been designed with specific goals, that's why it has a custom syntax, which is better IMHO.

the text format must adopt the usual assembly language format

I would be opposed to that. Note that WebAssembly is an open group, they don't have to do certain things (like using an existing standard because you say that it has a similar syntax).

Disclaimer: my opinions are my own, not WebAssembly's one.

@hsk
Copy link
Author

hsk commented Dec 7, 2017

I see.
Thank you.

@hsk hsk closed this as completed Dec 7, 2017
@hsk
Copy link
Author

hsk commented Dec 7, 2017

S expression is beautiful and usable.
Good luck.

@hsk
Copy link
Author

hsk commented Dec 7, 2017

@hsk
Copy link
Author

hsk commented Dec 7, 2017

but,...

@ROBERT-MCDOWELL
Copy link

ROBERT-MCDOWELL commented Dec 7, 2017

xtuc:

WebAssembly is not a standard format, it has been designed with specific goals, that's why it has a custom syntax, which is better IMHO

well, wasm will tend to be a standard itself within a couple of years isn't it?

@xtuc
Copy link

xtuc commented Dec 7, 2017

@ROBERT-MCDOWELL sorry I didn't mean to write that, of course WebAssembly is a standard format. I meant that it don't use an existing standard syntax (since they created their own).

@hsk
Copy link
Author

hsk commented Dec 7, 2017

Is LLVM format S expression?
Is X86 assembler format S expression?
Are Arm,68000,PowerPC...
I looking first time WebAssembly is beauty.
But, My motivation is down.
I think, I don't like S expression syntax assembly language.

@hsk
Copy link
Author

hsk commented Dec 7, 2017

There was no need to write parentheses so far.
But we needed parentheses.
I think this is not very happy.

@hsk
Copy link
Author

hsk commented Dec 7, 2017

fuck

@hsk
Copy link
Author

hsk commented Dec 8, 2017

Until now I did not dislike about WebAssembly.
But I hate WebAssembly now.

@hsk
Copy link
Author

hsk commented Dec 8, 2017

From the perspective of lisper, webassembly is epoch-making.
Great. I think so, I think that it is also simple and fast.

@hsk
Copy link
Author

hsk commented Dec 8, 2017

The quick movement of webassembly was also great.

@hsk
Copy link
Author

hsk commented Dec 8, 2017

But,I am not Lisper.
I can see the brackets.
I hate parentheses and I do not like that.

@hsk
Copy link
Author

hsk commented Dec 8, 2017

I think that WebAssembly is egoistic language of lisper.

@hsk
Copy link
Author

hsk commented Dec 8, 2017

Is WebAssembly an intermediate code an S formula?
The Internet has finally caught up with Lain.
Well, maybe HTML is also good for S formula.

@hsk
Copy link
Author

hsk commented Dec 8, 2017

I think that it is very good that I do not need to use C or C ++.
But if I write TypeScript I would like you to choose between writing in native or writing in JS ...

@hsk
Copy link
Author

hsk commented Dec 8, 2017

@hsk
Copy link
Author

hsk commented Dec 8, 2017

@hsk
Copy link
Author

hsk commented Dec 8, 2017

WebAssembly is Hot now!

@hsk
Copy link
Author

hsk commented Dec 8, 2017

However, he is shibuya lisp boy.

@Pauan
Copy link

Pauan commented Dec 8, 2017

@hsk It's not usually intended for people to actually read or write the S-expression format directly.

Instead, you would write your code in a higher level language and it would then be compiled to WebAssembly.

And by using source maps you can even debug in the high-level language, so you never need to see the WebAssembly S-expressions.

So 99+% of the time, it doesn't matter what the text format is, because you never see it.

@hsk
Copy link
Author

hsk commented Dec 8, 2017

I like text format output compiler.
I writing compiler, 99+% of time, I read and write wast.

@hsk
Copy link
Author

hsk commented Dec 8, 2017

He tried to compare the performances corresponding to the wasm that I made in Emscripten in the past
https://qiita.com/toyoshim/items/e714cb4d00eace2f4d97

@ROBERT-MCDOWELL
Copy link

critics are always good to make a project to evolve. However we must take in consideration the years of code layers that built what is internet today and avoid to reinvent the wheel every time there is an evolution....

@jfbastien
Copy link
Member

jfbastien commented Dec 8, 2017

I understand that you're frustrated by s-expressions. I'm not a fan either, and find solace in accepting that the text format doesn't really matter to WebAssembly as a whole. Indeed, the binary format is what matters. We just had to have some text format for low-level display and basic testing, and the only one that was seriously proposed and moved forward was this one. It made some people happy to have s-expresions, so that's nice for them. To me it's similar to using XML: it's ugly and harder to read, but really doesn't matter.

The history of the text format is somewhat long, and I won't repeat it here. s-expressions made sense when we had an AST, but now we have a stack machine, so at a minimum it's a quaint historical factoid that we use s-expressions.

What's great is that you can create your own WebAssembly text format. We did for our own testing and it gives us more flexibility than combining textual s-expressions would. An LLVM IR like format wouldn't be hard to build at all.

That being said, I thoroughly enjoyed the play-by-play realization that you've recorded live here. 👍

@hsk
Copy link
Author

hsk commented Dec 8, 2017

Thank you, for understand my issues.
s-expression is good. developping is speedy.
I know a calling direct LLVM library is fast, and WebAssembly too.
Calling direct library is fast than AST base compiler.
But, library binding is difference between other language.
Since I am hobby programmer, I hope simple AST.
We use C++,JavaScript,Rust,OCaml,Haskell,SML,Coq,Scala,Scheme,Common lisp,etc... any languages.
I do not want you to accompany it soon, but I'd like you to consider it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants