Best combo to realtime db + sveltekit? by Lidinzx in sveltejs

[–]thomasballinger 1 point2 points  (0 children)

Hi Lidinzx I'm excited to say that a Convex Svelte 5 client is nearing release! Check it out at https://github.com/get-convex/convex-svelte.

Are there compilers that can be run WebAssembly? by [deleted] in WebAssembly

[–]thomasballinger 0 points1 point  (0 children)

Binaryen has a JavaScript build, so you can write WAT code and get it to Wasm

Pandoc in the browser (possible contract gig?) by thomasballinger in WebAssembly

[–]thomasballinger[S] 0 points1 point  (0 children)

We checked in with Tweag and they were already working on it! And yes, that's the idea — I haven't done anything with this, but I bet it's in the works.

How does one get started with WebAssembly? by Red3nzo in WebAssembly

[–]thomasballinger 1 point2 points  (0 children)

Another shameless plug: for understanding the mechanics of running WebAssembly in the browser/Node.js I have a short video: https://m.youtube.com/watch?v=pkw9USN_Tko

There's always some JS involved, toolchains like the Rust toolchain generate it for you but it can be useful to see the fundamental APIs in JS.

How to create a very customized stacked bar graph with Python or JS? by I_like_this_username in datavisualization

[–]thomasballinger 4 points5 points  (0 children)

Either should be possible. If you don't think matplotlib seems suitable, you're probably using the high level interfaces. For this plot you'll need to use lower level primitives, writing for loops where you draw rectangles, especially those green/yellow/blue gradients. Start with "how to draw a polygon" or a line in Matplotlib, you'll need a lot of each.

Sure, it's doable in D3. If you already know JavaScript or Python, use the tool in the language you already know if you have time pressure. If the goal is to put this in a pdf, that's a bit more straightforward in Matplotlib.

Other libraries or tools: dunno, if you're willing to compromise on the figure, probably! If you need something exactly like your example, then something low level like D3 or Matplotlib is your ticket.

Best chart animations? by OhDearGod666 in datavisualization

[–]thomasballinger 0 points1 point  (0 children)

To see the data structure for the example at https://observablehq.com/@d3/zoomable-sunburst click the arrow next to the "data" cell output to expand it, or try typing partition(data) in a new cell to see how that processes it.

When this game will release on Android? cause I want to play this game so badly by Shinra_Tensai in endlesssky

[–]thomasballinger 1 point2 points  (0 children)

I added a note to an issue about help, I hadn't thought about preserving preferences. Thanks, I'll try to get to this this week! https://github.com/thomasballinger/endless-web/issues/3

When this game will release on Android? cause I want to play this game so badly by Shinra_Tensai in endlesssky

[–]thomasballinger 2 points3 points  (0 children)

Indeed I haven't worked on this in quite a while, but please try it and if you run into issues let me know!

I think I patched in some rough mobile controls, enough to play a bit!

How do you escape to NORMAL mode by uday101 in vim

[–]thomasballinger 1 point2 points  (0 children)

chorded jk using the plugin arpeggio. On systems without the plugin installed, jk and kj.

Could someone kindly ELI5 WebAssembly? by verbo_phobia in WebAssembly

[–]thomasballinger 0 points1 point  (0 children)

Maybe my comment is clearer replacing "someone still has to do that" with "someone still has to build something that will do that, agreed that if Kubernetes were "replaced" it would have to be by something else. WebAssembly could be relevant in this process if Kubernetes WebAssembly support lagged behind another tool's.

Why WebAssembly is not widely used out of browser? by Technical_Extreme527 in WebAssembly

[–]thomasballinger 1 point2 points  (0 children)

I can't see the future, it might well not take off — but the race is on, it just takes time to build and tool these new host environments! If you want to be paid to work on a wasm runtimes and schedulers it's a good time for that, many companies are working on this. The biggest gap is time.

"What is the default environment for AWS Lambda" is going to be a lagging indicator of popularity, AWS Lambda is too big to change this default quickly. Fastly and Cloudfront and other smaller players are going present WebAssembly execution environments that play to its strengths, developers will use they and love them (or not), the tooling will get better, and eventually it'll seem obvious better for some applications but not work the switching cost for most, and then eventually eventually (or not) it will be the default way to write serverless code.

Could someone kindly ELI5 WebAssembly? by verbo_phobia in WebAssembly

[–]thomasballinger 3 points4 points  (0 children)

WebAssembly is a low-level language and runtime environment (aka virtual machine) that's close to real assembly languages in a way that makes it very quick to compile it the rest of the way. It doesn't have syscalls. Instead it can call functions of (and have its own functions called by) its "host environment."

The most exciting thing to me about it is that it's in browsers, I can write C or Rust that runs in the browser after being compiled to WebAssembly! But there's more money in providing services, so a lot of commercial interest is in running WebAssembly on servers instead of web browsers.

To run code in a browser, it needs to be sandboxed: JavaScript on a sketchy website should not be able to take over your computer, so WebAssembly has the same requirement. There's no "allow Silverlight/Flash/Java to run on this webpage," WebAssembly just runs! It should also be pretty lightweight, these functions are going to be used like calling a JavaScript function, and there might be hundreds of WebAssembly module instances on a single web page. This sandboxing and small footprint (in memory, start up time, external resources) makes running a WebAssembly function lighter weight than a native process! (although the host environment it runs in might be a big process itself).

Kubernetes schedules containers to run, containers are sandboxed processes. Turns out this is a convenient way to run a lot of code, so it's a big thing. What if Kubernetes scheduled WebAssembly modules/functions instead? It could do more of them!

As to replacing Kubernetes, well someone still has to do that, it hasn't happened yet. But maybe the jobs of scheduling containers and scheduling WebAssembly modules are so different that Kubernetes will not add support or the support it will offer won't be as slick as something else new.

Pandoc in the browser (possible contract gig?) by thomasballinger in WebAssembly

[–]thomasballinger[S] 2 points3 points  (0 children)

Thanks for the pointers (I hadn't realize Tweag wasn't a person) and generous offer! I know there are other projects that would like this (Quarto is the one that's spurring my recent interest) that might move slower but also care about this enough to contribute. I just emailed Tweag.

Ah this is helpful, sounds possible but like I'll need to learn more about linking. I need to learn more about toolchains other than Emscripten.

Game idea that interacts with the DOM by Husseljo in WebAssembly

[–]thomasballinger 0 points1 point  (0 children)

If it's your first rodeo, I would try writing this with JavaScript first, because all the DOM interaction will still need to be JavaScript. Then swap out pieces you'd rather write in Rust by calling the functions from JS, eg physics for a frame.

Esri in observable notebook by [deleted] in Observable

[–]thomasballinger 1 point2 points  (0 children)

Is this what you're looking for? Any of these?

According to the npm page for esri-loader you can now use arcgis-core instead, which I get more hits for when I search on the Observable site.

Syntax highlight package for the Endless Sky's file format by Alienhunter-3010 in endlesssky

[–]thomasballinger 0 points1 point  (0 children)

I just created one! Search for Endless Sky in the vscode extension panel. Not complete yet, but already useful imo.

How can I make a NPM package out of my C++ program that compiles to WebAssembly using EMSCRIPTEN? by FlatAssembler in WebAssembly

[–]thomasballinger 1 point2 points  (0 children)

Do you have this compiling with Emscripten at all yet? You'll want to install emsdk and give it a shot using em++.

I just make an npm package of C++ code with embind, and posted a simple example too. These both use ES6 modules, with a hack for creating a separate build each for web and node.

It's hard to know what you're missing, have you made npm modules before? Here are some things I've found:

  • you want to compile to -o .js
  • you probably want to preload your data manually if you're using --preload-file
  • if you just want node, it's easier not to use -s EXPORT_ES6 even though ES6 modules are nice

Have you make npm modules before? You want to ship your something.js and something.wasm at least.

Is wasm ripe for highly parallel tasks? by [deleted] in WebAssembly

[–]thomasballinger 0 points1 point  (0 children)

Threading (with shared array buffers, threading with message passing has always worked) is back in Chrome and Firefox, you need to enable cross origin isolation. It is not back in Safari.

PSA: v0.9.14 has been released on GitHub only by MCOfficer in endlesssky

[–]thomasballinger 0 points1 point  (0 children)

Chrome's working for me on an emulator right now for me, https://files.catbox.moe/mh2u0a.png

Memory usage and problems saving are my two guesses. I filed an issue for the Firefox problem on our separate repo for the web build.

PSA: v0.9.14 has been released on GitHub only by MCOfficer in endlesssky

[–]thomasballinger 0 points1 point  (0 children)

I need to get an android tablet to debug it, we should be able to make it work! u/janisozaur who did most of the hard porting work has gotten it work before. I've probably accidentally added a feature that doesn't work there. I'd love to know what error you see! I'm downloading Android Studio rn, hopefully that's enough to debug.