11 ms·
What's the difference between this and something like AssemblyScript?: https://github.com/AssemblyScript/assemblyscript https://github.com/AssemblyScript/assemb
by PaulBGD_ 8y ago
What's the difference between this and something like AssemblyScript?: https://github.com/AssemblyScript/assemblyscript https://github.com/AssemblyScript/assemblyscript
EDIT: I see that this project actually existed slightly before AssemblyScript. Still seems like two very similar projects.
- RussianCow 8y agoFrom a quick glance, it looks like AssemblyScript compiles TypeScript, whereas Walt uses its own dialect of JS with WebAssembly types.
- sramam 8y agoA quick look at a sample .assembly file [0], make it look like a very different language from TypeScript. That said, the familiar tooling, editor support, are wins over other WASM options. [0] https://github.com/AssemblyScript/assemblyscript/blob/master/examples/game-of-life/assembly/index.ts https://github.com/AssemblyScript/assemblyscript/blob/master...
- torch2424 8y agoI help out every once and a while on the AssemblyScript team with like issues, docs, and things. And made wasmboy, which uses AssemblyScript: https://github.com/torch2424/wasmBoy https://github.com/torch2424/wasmBoy But that being said, usually when people are interested in the language, we usually direct them to the "n-body" example: https://github.com/AssemblyScript/assemblyscript/blob/master/examples/n-body/assembly/index.ts https://github.com/AssemblyScript/assemblyscript/blob/master... . Which kind of looks more typescript-y :) Also, just to stay on topic, I think walt is awesome. Stoked to see so many projects coming up with a "Wasm for JS devs" approach/story.
- saosebastiao 8y agoApart from the explicit number types (`i32` instead of `number`, etc.) it looks like standard typescript. What looks different to you?
- sramam 8y agoIncredibly, the segment below is valid TypeScript. @inline function rot(x: u32, y: u32, v: u32): void { var a = max<i32>((v >>> 24) - BIT_ROT, 0); set(x, y, (a << 24) | (v & 0x00ffffff)); } You must be working on a different set of problems than me to be able to identify this as vanilla TypeScript. Not given the context of a file extension, I would forgive anyone for mistaking this to be some kind of low level driver code and be confused on source language. It is so impressive that this is valid TS though! [edit: code formatting]
- abuldauskas 8y agoI wrote/maintain Walt. This question comes up a bunch. The two projects are really similar no doubt. I can't speak for AssemblyScript, but my own motivation was simple. I wanted to learn WebAssembly and I wanted an accessible platform to do so with. At the time this wasn't really possible, tools like emscripten took forever to set up and were clunky to use. Plus I knew C already, I wanted to learn WebAssembly instead. So where Walt is an attempt to write WebAssembly with a familiar syntax, AssemblyScript is an attempt to compile TypeScript to WebAssembly. To do so AssemblyScript comes with many more niceties/features out of the box IIRC, like optional(?) GC for example. Walt makes no such attempts and takes a more DIY approach. Walt also has language extensions, via customizable syntax and compiler pipeline, where AssemblyScript is a TypeScript compiler more or less. My hope is that this allows for a babel-like situation for WebAssembly in the future via the tooling setup for Walt. I don't think this is a goal of AssemblyScript.
- burfog 8y agoYour project is weird to begin with, and then "knew C already" makes it even weirder. The whole point of WebAssembly was to find some way to get away from JavaScript, and to support languages like C. Here you are, going right back to the JavaScript that we've been trying to escape for the past 23 years. Also, on your page you say that "A competent Front-end engineer should be able to edit WebAssembly as easily as any other systems programmer." The "any other" seems to imply that a "Front-end engineer" is a "systems programmer". This is typically not the case.
- abuldauskas 8y agoEscaping JavaScript is not a perspective shared by all (most?), though. It's has been a weird and interesting project, but that's not really a bad thing is it.
- Touche 8y agoYou'll have to excuse HN Guy that assumes that every project on GitHub is done to try and take over the world and not because, you know, learning is fun. So keep on doing weird things with your weird and awesome language.