3 ms·
A 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
by sramam 8y ago
A 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]