WebAssembly

Got an idea for enhancing PureBasic? New command(s) you'd like to see?
User avatar
DoubleDutch
Addict
Addict
Posts: 3219
Joined: Thu Aug 07, 2003 7:01 pm
Location: United Kingdom
Contact:

WebAssembly

Post by DoubleDutch »

WebAssembly looks like it now has a consensus. It would be great if a future version of (both) PureBasic and SpiderBasic would export to this. By Christmas it will be supported by all major browsers.

"WebAssembly has a pretty conventional ISA: 8-bit bytes, two’s complement integers, little-endian, and a lot of other normal properties. Reasonably portable C/C++ code should port to WebAssembly without difficultly."

http://webassembly.org/roadmap/

https://developer.mozilla.org/en-US/docs/WebAssembly
https://deluxepixel.com <- My Business website
https://reportcomplete.com <- School end of term reports system
User avatar
djes
Addict
Addict
Posts: 1806
Joined: Sat Feb 19, 2005 2:46 pm
Location: Pas-de-Calais, France

Re: WebAssembly

Post by djes »

Thank you for the information.
User avatar
Tenaja
Addict
Addict
Posts: 1948
Joined: Tue Nov 09, 2010 10:15 pm

Re: WebAssembly

Post by Tenaja »

DoubleDutch wrote:... It would be great if a future version of (both) PureBasic and SpiderBasic would export to this. ...
+1
User avatar
crgimenes
New User
New User
Posts: 6
Joined: Thu Dec 13, 2018 3:52 pm
Location: São Paulo, Brazil
Contact:

Re: WebAssembly

Post by crgimenes »

I use Golang every day and with Go and I have basically two options, compile to JavaScript using
gopherjs or more recently to webassembly.

The problem is that in both options the generated executable is giant and this is bad
because download time matters a lot.

This huge executable happens due to the need for a garbage collector and other Go runtime
resources that were never intended to generate small executables.

But unlike Go, PureBASIC seems to have the right characteristics to generate a tiny WASM binary.
I hope to see webassembly be supported soon and I will have fun creating 2D games for the web
with the best language for it. :D
User avatar
skywalk
Addict
Addict
Posts: 3972
Joined: Wed Dec 23, 2009 10:14 pm
Location: Boston, MA

Re: WebAssembly

Post by skywalk »

+100 :!:
This solves code obfuscation and speedier pages.
The nice thing about standards is there are so many to choose from. ~ Andrew Tanenbaum
Justin
Addict
Addict
Posts: 829
Joined: Sat Apr 26, 2003 2:49 pm

Re: WebAssembly

Post by Justin »

I hope webassembly never becomes a standard. I don't like the idea of executing binary code from a website, it will be a hackers dream, security will be bypassed.

HTML was designed in plain text for a reason.
User avatar
crgimenes
New User
New User
Posts: 6
Joined: Thu Dec 13, 2018 3:52 pm
Location: São Paulo, Brazil
Contact:

Re: WebAssembly

Post by crgimenes »

Justin wrote:I hope webassembly never becomes a standard. I don't like the idea of executing binary code from a website, it will be a hackers dream, security will be bypassed.
I also prefer plain text.
But I prefer webassembly than javascript, at least I can choose the language.
And I do not believe that webassembly will be a bigger security problem than today is the javascript.
User avatar
skywalk
Addict
Addict
Posts: 3972
Joined: Wed Dec 23, 2009 10:14 pm
Location: Boston, MA

Re: WebAssembly

Post by skywalk »

The browser is sandboxed for security regardless of underlying code.
Javascript is wide open. Webassembly is compiled gibberish.
The internet, while nobly serving up and handshaking with text, has wasted untold electrons/clock cycles with binary conversions and hoops. We enjoy the compression algorithms developed to deliver our binary content, but it is far past time for a native binary internet. :wink:
The nice thing about standards is there are so many to choose from. ~ Andrew Tanenbaum
Post Reply