6 ms·
Looks like yet another example of the https://en.wikipedia.org/wiki/Inner-platform_effect https://en.wikipedia.org/wiki/Inner-platform_effect ...when will this
by userbinator 10y ago
Looks like yet another example of the https://en.wikipedia.org/wiki/Inner-platform_effect https://en.wikipedia.org/wiki/Inner-platform_effect ...when will this abstraction madness end?
Extended JavaScript runtimes for C, C++, Go, and Node.js that support running programs written in these languages as processes in the browser.
Does that mean it's an interpreter? The main page doesn't say much.
- detaro 10y agoIf I understand right it compiles said languages to browser-compatible JS and provides an environment for them, so no, I don't think it includes an interpreter in itself. Everything is JS running in the browser's JS interpreter.
- emeryberger 10y agoCorrect. To quote Bobby's comment above: Browsix is not an interpreter. Browsix provides a shared kernel and primitives like system calls to _existing_ interpreters and runtimes that target JavaScript. For example, we extended both the GopherJS and Emscripten compilers and runtimes to talk to our shared kernel, so that processes written in C and Go can run in parallel (on separate Web Workers) and communicate over pipes, sockets and the filesystem in the browser (much like they can in a standard Unix environment).
- ChuckMcM 10y agoIf you start the seed of an idea at least three emulators deep when the browser returns to the top level it thinks it originated that idea.
- prodigal_erik 10y agoThey skipped limbo, where time has no meaning. There you can create a world with only a state machine and infinite tape.
- bryanrasmussen 10y agoBut my browser wouldn't let go of the idea and then it cr....
- kazinator 10y agoAlso related to "abstraction inversion".
- digi_owl 10y agoInterpreters, interpreters all the way down...
- amelius 10y agoI don't think this is the same concept. Running Unix processes inside a browser actually is new functionality. You can now also run Unix processes inside a browser on a Windows host, for example.
- eriknstr 10y agoYou can run Unix processes on Windows 7 and the others with MSYS or Cygwin or on Windows 10 using the Microsoft-provided Linux compatibility layer.
- owlmirror 10y agoWhich presents itself as a much higher barrier. Only the smallest fraction of Windows PCs have these layers enabled/correctly configured, for it to run. Virtually all Windows PCs have a Browser installed and running. Most users know how to open and operate a Browser. Of course it's kind of redundant for everything to be reimplemented into the browser, things that should be implemented and used on a OS level, but I think it's a testament of the shortcomings of the UX design or even more fundamental paradigms of personal computing.
- eriknstr 10y ago>Only the smallest fraction of Windows PCs have these layers enabled/correctly configured, for it to run. I have never had any trouble running either MSYS2 or Cygwin on Windows computers even when the amount of privileges given to my account has been very low.
- 0942v8653 10y agoThe website to MSYS2 was blocked by my high school's firewall. I think Cygwin used Sourceforge, which was arbitrarily filtered for badware risk. There were other ways of fixing that, but my point is… it'a good to have alternatives, and the browser ensures good portability.
- minxomat 10y ago
- TeMPOraL 10y agoThis is how we improve the solutions of previous generations. Everybody knows the recipe for the future - since web = future and web is written in JavaScript, we need to rewrite everything in JS. /s
- ris 10y agoAs much as my initial reaction was along the lines of "oh god", actually I think this could be really useful for exposing legacy (or just unix-tied) tools to less savvy users. Pragmatic situations basically.
- icebraining 10y agoIf you think about it, this is no more abstracted than any Java program. You compile the source (C or Java) to an intermediate representation (JS or bytecode), which is then shipped to the client and executed by a language VM.
- therein 10y agoVery true but wouldn't you say Java bytecode looks a lot more like it was intended to be interpreted as an intermediate language than Javascript does?
- comex 10y agoHence the transition from asm.js to WebAssembly, which is getting pretty close to readiness.
- kuschku 10y agoExcept, it’s also less debuggable and modifiable by end users. How is the end user supposed to modify the code, or break the DRM to create a local copy, or port it to another platform once this isn’t supported anymore? WebAssembly breaks that ability, while Java at least retains it somewhat.
- comex 10y agoWhat specifically are you referring to? WebAssembly and JVM bytecode are fairly similar; the JVM is more explicit about some things, like data types (classes), but I'm not sure the difference is that stark.
- kuschku 10y agoHave you tried reversing code in both before? Even the most complicated bytecode for the JVM (for example, code extracted from Android apps and thrown through dex2jar) is a lot easier readable than WebAssembly. I’ve spent quite a while reversing example projects in both formats, and I really hate WebAssembly.
- nteon 10y agoHi - main author here. Browsix is not an interpreter. Browsix provides a shared kernel and primitives like system calls to _existing_ interpreters and runtimes that target JavaScript. For example, we extended both the GopherJS and Emscripten compilers and runtimes to talk to our shared kernel, so that processes written in C and Go can run in parallel (on separate Web Workers) and communicate over pipes, sockets and the filesystem in the browser (much like they can in a standard Unix environment).
- shurcooL 10y agoVery interesting, can you tell us more how GopherJS is being used by Browsix?
- nteon 10y agoYes! GopherJS has been amazing to work with. The majority of our changes (https://github.com/bpowers/browsix-gopherjs https://github.com/bpowers/browsix-gopherjs) amount to an alternative implementation of the compiler/natives/syscall package (we started before GopherJS had its own filesystem implementation). This lets us use the stack saving + resuming support GopherJS already has to implement blocking system calls.
- jonathanpoulter 10y agoThanks, this is super exciting. It really could push LaTeX on the web. In my opinion, this solves the problem I feel similar to every attempt to implement Vim keybindings has, what features of the original to implement (everyone wants something different), slight bugs or limitations which aren't at first apparent.
- cyberpunk 10y agoAre you not easier emulating x86 then trying to reimplement the entire linux syscall table in javascript? Then you can run anything that works on ia32 unmodified -- gcc, linux, X, firefox.. Whaytever... Someone already did it: http://bellard.org/jslinux/tech.html http://bellard.org/jslinux/tech.html