r/assemblyscript

35 archived posts · Jun 2018 – Jun 2026

Random post

u/AppledogHu•

Hi! I wrote the SD-8516 project in AssemblyScript. It runs 20-30x faster than a comparable JavaScript version. If you're interested in checking it out let me know. I just wanted to point out that I did something amazing in AssemblyScript and that I think AssemblyScript is AWESOME!

20


u/popefelix•

I'm trying to generate and parse JSON inside of an AS application. As part of that I've submitted a PR to assemblyscript-json to properly escape reserved characters in JSON . And I feel pretty good about doing it the way I did (doing the escaping in JSON.Str.toString()), because the code below returns {"foo":1}:

import { JSON } from 'assemblyscript-json'

function(): string {
  const obj = new JSON.Obj()
  obj.set('foo', 1)
  return obj.toString()
}

But I feel like maybe there was a better place to put that, or a more elegant way to do it.

20

u/popefelix•

Complete n00b to AssemblyScript, but reasonably familiar with TypeScript.

As a proof of concept for a project using AssemblyScript and Fastly Compute@Edge, I'm writing an AS app that retrieves launches from SpaceX and provides two line elements (TLE) for the payloads in a given launch. This requires me to interface with the SpaceX API and N2YO.com. How do I make those API calls? Do I implement that logic in a separate TypeScript module and import it?

22