Note to Fred - use WebAssembly

Everything else that doesn't fall into one of the other categories.
OgreVorbis
Posts: 1
Joined: Tue Dec 14, 2021 10:08 am

Note to Fred - use WebAssembly

Post by OgreVorbis »

I really think SpiderBasic would benefit from having a WebAssembly backend. Given that PB compiles to x86 assembly, I would think that producing WebAsm instead would be easier than JavaScript. Of course, it's already done in JS, so it might be a little annoying to re-do it, but it would be worth it. You'd probably see increased performance and the backend would be less of a cluster... I'm sure producing JS doesn't look pretty. Also, the way this compiles JS doesn't look very readable, but it could output "somewhat" readable WebAsm.

It'd make me a lot happier to use it. Part of the reason I like PB is that I know it's a clean language inside and out. Unlike something like Python for example, which is slow and ugly.
perb
Posts: 6
Joined: Sat Mar 14, 2015 10:30 am

Re: Note to Fred - use WebAssembly

Post by perb »

PB compiles now with llvm as target. And llvm could deliver webassembly. So it would be good for PB to use this.
User avatar
skywalk
Posts: 47
Joined: Tue Feb 25, 2014 2:13 am
Location: Boston, MA

Re: Note to Fred - use WebAssembly

Post by skywalk »

PB v6 beta's added a C transpiler. Instead of generating ASM and custom compiling for a limited x86_x64 architecture, you can choose to transpile direct to C and apply the newly installed C compiler with optimization for even faster machine code and newer targets like the RaspberryPI or ARM based PC's!
LLVM was abandoned due to its complexity.

Once v6 goes release, it will be interesting to see what's next for SpiderBasic.
WASM is on the rise and will eventually overtake JS in browsers mainly because it saves power on mobile devices. Mobile drives browser tech, not PC's.
I would stick with JS until the WASM libs mature.
When working toward the solution of a problem, it always helps if you know the answer. ~ ?
An expert is one who knows more and more about less and less until he knows absolutely everything about nothing. ~ Weber
Quin
Posts: 17
Joined: Wed Nov 08, 2023 4:38 pm

Re: Note to Fred - use WebAssembly

Post by Quin »

skywalk wrote: Tue Mar 15, 2022 2:23 am PB v6 beta's added a C transpiler. Instead of generating ASM and custom compiling for a limited x86_x64 architecture, you can choose to transpile direct to C and apply the newly installed C compiler with optimization for even faster machine code and newer targets like the RaspberryPI or ARM based PC's!
LLVM was abandoned due to its complexity.

Once v6 goes release, it will be interesting to see what's next for SpiderBasic.
WASM is on the rise and will eventually overtake JS in browsers mainly because it saves power on mobile devices. Mobile drives browser tech, not PC's.
I would stick with JS until the WASM libs mature.
Agreed fully. I'd love to see SB compile to WASM, but maybe it needs to become more mature first.
plouf
Posts: 194
Joined: Tue Feb 25, 2014 6:01 pm
Location: Athens,Greece

Re: Note to Fred - use WebAssembly

Post by plouf »

we all want that but since i see reported many times long ago i.e. viewtopic.php?p=6121&hilit=wasm#p6121

and no move done, i guess it has little hopes for the foreseen future.
too many thing are pending for SB... and webasm i think is not first priority
Christos
Post Reply