Live data from Hacker News

WebContainers: Run Node.js natively in the browser

blog.stackblitz.com

121–130 of 238 posts

Re: WebContainers: Run Node.js natively in the browser

#122
Does this mean we can now have a SOA in the browser? True separation of concerns: Render code deal with writing to DOM, when data is needed it calls a node API proxy server which in tern interfaces with REST/grpc/graphql servers, then there's also auth service, and also a local (literally local) cache service. All in the browser. Damn.

Re: WebContainers: Run Node.js natively in the browser

#123
post #16

I was kinda hoping it was something crazy like nodejs with v8 engine compiled to wasm lol

Did you read the post? You might be pleasantly surprised :)

Can you please go into more detail as to what exactly is being compiled to wasm? The post does not describe it. In particular there seems to be a lot of confusion about whether the JS engine itself is running in wasm or not.

Re: WebContainers: Run Node.js natively in the browser

#125
post #98

Earlier quoted context omitted.

I think the issue isn't with Wasm support, it's the filesystem API. They could've included a polyfill though... But as that API is new it might not be available yet.

It's the "File System Access API," the one that allows the browser to read/write files on your actual computer. It's an I/O feature, impossible to polyfill. The similarly named "FileSystem API" gives you access to a sandboxed "virtual drive" in the browser. Firefox has supported that for years, and polyfills are possible, but it's irrelevant in this case. https://caniuse.com/?search=file%20system

I believe it still counts as a polyfill, even if it doesn't do what it says on the can (but it has compatible interface, so your app runs).

Re: WebContainers: Run Node.js natively in the browser

#126

Web development is a big gigantic shit storm. Why can’t we use a real statically typed language without this JS shitty overhead, generate compiled binary and send that to users? I personally hate writing javascript

Have you not heard of WASM? And while it's not exactly what you're asking for, what about Typescript?

Re: WebContainers: Run Node.js natively in the browser

#127
post #80
post #71

Wow, the PWA is really impressive. Honestly it's starting to get hard to tell the difference between this and Electron-based editors like VS Code. I'm really excited for integration with the File System Access API; that's the final puzzle piece I'd need to use something like this for serious work.

You can checkout www.StackBlitz.com/local and give it a try! Still in Alpha, but should generally work for you :)

So it's 8 dollars for the astronaut plan. That's what I pay for robux to my kids, per week. It's jaw dropping to me how such advanced tech is made available at a single digit price. Thanks for sharing.

Re: WebContainers: Run Node.js natively in the browser

#128

Hi all- CEO of StackBlitz/author of this blog post here. Happy to answer any questions! (Also, thanks for posting this bpierre!)

How much of this is JavaScript specific and how much could be expanded to “any” programming language?

Re: WebContainers: Run Node.js natively in the browser

#129
post #82

Everyone thought WASM would enable developers to write code in any language they wanted (with type checking and higher performance) and deploy it on the web. JS Developers come in: so we can compile node.js to WASM and run that in the browser?! Yay!! Now we can have backend JS running in the browser alongside browser JS! Jokes aside: this is actually quite interesting, the demo is very impressive (except for the "onl…

Browser Javascript suffers from not producing a single "binary" as its build system output. You do get one bundle, but none of the parts know anything about each other, and it limits the ability to optimize. (It is a lot more like the C preprocessor, rather than a C compiler.) Methods that can't possibly ever be called end up being sent to each user, for no reason other than "well someone could write an eval() that n…

> the direction I'd like to see web development move is having a statically typed language that compiles to VM bytecode.

Java… you want Java. And so the cycle continues!

Re: WebContainers: Run Node.js natively in the browser

#130
post #78
post #77

Earlier quoted context omitted.

Names don't have any such requirements - but we should use them correctly. You don't rename Windows even though it's not a hole in the wall stuffed with glass.

It's just irksome. I don't think Windows is a good analogy. More like if I called the OS "Windows.jpg". If you're going to use something that looks like a filename as a product name, then make sure that file actually exists and is in the expected format. D3.js --> good Angular.js --> good Node.js --> bad python3.py --> bad Windows.jpg --> bad Windows.exe --> okay (I don't use windows but I assume there's something of…

If you are going to get this pedantic, then why not also include *.com as bad, because that was a file type in DOS.
Post reply on HN