Development language #16
Replies: 20 comments 52 replies
-
|
Generating WASM from Java See https://www.infoworld.com/article/3692456/hands-on-with-java-and-wasm.html for a 6-months old photography of the tooling. Tools description:
Pros:
Cons:
|
Beta Was this translation helpful? Give feedback.
-
|
Generating WASM from AssemblyScript See https://www.assemblyscript.org. A very promising thing, but very disappointing in the end. I tried it 18 months ago when I started exploring the WebAssembly topic for antlr. It's unusable for a real project. Pros:
Cons:
|
Beta Was this translation helpful? Give feedback.
-
|
Generating WASM from Kotlin See https://kotlinlang.org/docs/wasm-overview.html In 'alpha' state as of writing. Couldn't find a link to their technical design, notably re runtime libraries. Pros:
Cons:
|
Beta Was this translation helpful? Give feedback.
-
|
Generating WASM from Dart See https://docs.flutter.dev/platform-integration/web/wasm In development as of writing. Pros:
Cons:
|
Beta Was this translation helpful? Give feedback.
-
|
Generating WASM from C#/Blazor See https://learn.microsoft.com/en-us/aspnet/core/blazor/?view=aspnetcore-8.0 Pros:
Cons:
|
Beta Was this translation helpful? Give feedback.
-
|
Generating WASM from Rust See https://rustwasm.github.io/book/ Pros:
Cons:
|
Beta Was this translation helpful? Give feedback.
-
|
Generating WASM from Go see https://zchee.github.io/golang-wiki/WebAssembly/ Pros:
Cons:
|
Beta Was this translation helpful? Give feedback.
-
|
Generating WASM from C++ see https://developer.mozilla.org/en-US/docs/WebAssembly/C_to_Wasm Pros:
Cons:
|
Beta Was this translation helpful? Give feedback.
-
|
Generating WASM from Compose <-- what is that ? 😲 see https://github.com/compose-lang, but there isn't much there yet. Compose is a new language that I'm currently prototyping. It targets WebAssembly only. It has a ts-like syntax for easy migration from ts, and supports composition out of the box. Unlike js/ts/AssemblyScript, It (will) also support runtime reflection à la Java. Pros:
Cons:
Only mentioning it for completeness. That said, if there is appetite to help accelerate, why not... |
Beta Was this translation helpful? Give feedback.
-
|
Eric, what's your recommendation? A lot of cons overall. |
Beta Was this translation helpful? Give feedback.
-
|
FYI I've been playing around a bit with Deno, migrating my Compose project (which uses antlr) from Node. |
Beta Was this translation helpful? Give feedback.
-
|
FWIW I managed today to successfully run the following experiment (using my WIP Compose language):
This is galaxies away from any form of production quality stuff but it's evidence that what we want to achieve on the long term is feasible ! |
Beta Was this translation helpful? Give feedback.
-
|
One factor I would consider is the popularity of the language, as picking a well-known language could mean getting more contributions. For this reason, something as popular as Java or Typescript may be beneficial. |
Beta Was this translation helpful? Give feedback.
-
|
Typescript is ruled out because it can't compile to WebAssembly. |
Beta Was this translation helpful? Give feedback.
-
|
Unless something comes up, I suspect we have to postpone generating the parsers in a browser for now. As of writing, the only language that can be compiled in the browser is WIP. Changing language in the future is not a big deal if we're careful enough to keep dependencies minimal. It does not affect our runtime architecture. An unexpected consequence is that we don't urgently need to generate the tool as WebAssembly: if we can't compile the generated parsers in the browser, the value of running the tool in a browser is limited to antlr5-lab (antlr5 version of antlr4-lab). So what we need to decide now is which desktop language we want to use for the runtime and the generated parsers (I don't see any value in using different ones). That language needs to support Wasm GC and generate small binaries, which leaves us with few options:
Go tooling hasn't been explored. I understand that Go itself runs faster than Java, but we're not looking at the speed of Go, rather at the speed of the generated Wasm (not tested, so we have to assume it is equivalent across above languages). I believe we should focus on the following concerns:
It'd be great if you could express your preference, so we can move forward and get cracking !!! |
Beta Was this translation helpful? Give feedback.
-
|
Sorry if I wasn’t clear, the question was not whether a maven plugin can generate a .class from Kotlin, but whether it can generate WebAssembly.
|
Beta Was this translation helpful? Give feedback.
-
|
I want to write command-line tools that pass parse tree info around. (Being able to parse input is an important but just one task of working with the parse trees using XQuery.) What language do you all prefer? Initially I plan to work on this outside this project but eventually will want it to be integrated. |
Beta Was this translation helpful? Give feedback.
-
|
These days my language of choice is TypeScript, not because I like it, but because it’s the current best compromise for a statically typed language that can run everywhere. I miss reflection a lot but I’d rather do without it than giving up the browser.
|
Beta Was this translation helpful? Give feedback.
-
|
One is mad if one uses Python, Java, Typescript or Javascript for
Serverless - at least in AWS ;). The costs can be high without a good
design already, nevermind adding the startup times of interpreters or JVM
startup time. Depends on the requirements I suppose but I would not do that
myself unless I find myself working somewhere where they have already done
it and need to stick with the plan :) But, I digress from the discussion so
leave it there.
I am thinking that I might not have much to add to ANTLR5 given the
direction that you guys are taking it so far. I'm not against
the direction, but I think you guys already have this tech covered.
I will stick around though and see if I can help in any way. But I was
mostly interested in the Go side of things of course.
…On Fri, Feb 16, 2024 at 11:52 AM ericvergnaud ***@***.***> wrote:
Parser in browser is in-demand for editing code-like stuff on the web.
Also JavaScript and TypeScript is growing in popularity for serverless.
Not speaking of Python for AI.
—
Reply to this email directly, view it on GitHub
<#16 (reply in thread)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAJ7TMD32VKZ4R6KJO5J4J3YT6METAVCNFSM6AAAAABAXARN5OVHI2DSMVQWIX3LMV43SRDJONRXK43TNFXW4Q3PNVWWK3TUHM4DIOJVGUZDO>
.
You are receiving this because you commented.Message ID:
***@***.***>
|
Beta Was this translation helpful? Give feedback.
-
|
@ericvergnaud does it make sense to use antlr4rust as a starting point instead of c target? |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
As mentioned in the Roadmap discussion, WebAssembly is still bleeding edge.
GC features are still minimal, strings are postponed...
Current Node v21 does not support Wasm GC. Node v22 does, but that's still experimental and ARM64 only.
Choosing a language now would be extremely risky, but that shouldn't prevent us from listing possible ones, discussing their pros and cons, and providing updates.
Disclaimer: as developers I suspect we are all strongly opinionated in favor of some languages and against others. I don't think that's a problem, but those opinions shouldn't leak here, and I will shut down the discussion if it drifts 😍.
Not sure how to organize this to prevent it from becoming a mess.
Maybe I start with 1 comment per language, and the per language discussion happens in the corresponding thread ?
Beta Was this translation helpful? Give feedback.
All reactions