

Emscripten gains experimental pthreads support - vmorgulis
https://groups.google.com/forum/#!topic/emscripten-discuss/gQQRjajQ6iY

======
haberman
Looks like this announcement is from two months ago. Anyone have experience
using this?

~~~
gunyarakun
I found some bugs and commented on the original pull request for the pthread
support.
[https://github.com/kripken/emscripten/pull/3266](https://github.com/kripken/emscripten/pull/3266).

In my opinion, the pthread support itself works well now. But the biggest
problem of the implementation is that SharedArrayBuffer, the pthread support
calls for, is implemented only in Firefox currently.

One of the purpose to use emscripten is made an application cross-platform web
application. You can get a "non-webbish" code runs only in Firefox with
pthread-supported emscripten as of now.

I'm looking forward to other browsers with SharedArrayBuffer support,
especially Mobile Safari.

~~~
marcosscriven
Looks like it's coming to Chrome:
[https://groups.google.com/a/chromium.org/forum/#!topic/blink...](https://groups.google.com/a/chromium.org/forum/#!topic/blink-
dev/d-0ibJwCS24)

But agree iOS Safari would be a great addition for this.

------
jbb555
I hate all this web stuff so much. It's slowly reinventing the last 40 years
of computing, only a slow, badly designed, unreliable base.

~~~
Certhas
I don't think reinventing is quite right, reimplementing more like it.

Remember the thing that Microsoft was afraid of for the Web? A middle layer
that makes your OS mostly irrelevant.

It took a roundabout way but we're getting there. Extremely high performance
virtual machines that are all fairly compatible, are deployed across a vast
range of operating systems and devices today.

Together with an UI toolkit that renders fairly similarly across all these
devices.

Technically this maybe can't do things that a single computer couldn't do ages
ago, but now every computer can run that code. And via LLVM you can compile
almost anything to js.

And with a much better security model than "download random exe and run" as
well.

The sneering merely shows that you haven't really thought about what is going
on here.

~~~
striking
The VMs aren't even close to "high performance" (although they are very
wonderfully compatible), and the UI toolkit is not one (it's a document markup
toolkit with buttons and such glued on, it's pretty awful compared to Mac OS's
Interface Builder).

And any computer can run just about any kind of code now. Ask someone to
download Python or LuaJIT and they can run your code.

Security models? In Lua, you can empty the environment and start fresh. You
have a perfect sandbox with the flip of a switch.

I don't think the grandparent comment is sneering. I think he has an opinion
that disagrees with yours.

~~~
bobajeff
>And any computer can run just about any kind of code now.

Not if it's compiled (C, C++ etc.), uses compiled libraries (many Lua, Java
and .Net apps) or any system calls/libraries (.Net)

~~~
ergothus
...Did you miss that this article is about Emscriptem, which allows you to run
C on JS? (this resolving your first issue)

