Live data from Hacker News

WebContainers: Run Node.js natively in the browser

blog.stackblitz.com

71–80 of 238 posts

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

#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.

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

#72
post #65

Earlier quoted context omitted.

> We are working on CheerpX, but it’s not yet available generally. If you are curious and want to know more, stay tuned, or get in touch! How close is CheerpX to getting (for example) an app that uses a PyTorch model running in the browser? :)

Not an expert on PyTorch in particular, the python + native (if any) components would work right now. If GPU acceleration is required some way to bridge into WebGL or (much better) WebGPU would need to be engineered, certainly doable but not existing right now.

Except for figuring out Pytorch's blas, the rest should be pretty straightforward to use CPU-only, I'd love to use that to (even pay to) compile some side projects to wasm apps in the browser :)

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

#73

Isn't it awful? Now each smart ass web developer will start sending down scripts with nodejs to enable 'rich' user experience

Oh no! The user experience must surely not be enriched! Damn those smart ass web developers who aren't like the rest of us that care about code quality and engineering principles!

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

#74
post #39

Earlier quoted context omitted.

basically node exposes all these other APIs like reading a file from disk. Browser also has APIs like detecting when the page is fully loaded that wouldn't be available on Node. What JavaScript syntax is supported can also vary between Node and browsers.

WASM cannot magically load from disk, there is browser protection, right?

It can't access the file system, but it could implement an API that emulates a file system inside the browser sandbox. Presumably that's what they're doing here.

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

#75

I think very few people will realize the systemic effects that a demo like this entails. Very, very good work StackBlitz team!

Thank you! Our entire team has definitely averaged 3hrs of sleep every night the past week to make this launch happen :) Incredible how much work goes into launching something like this.

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

#77
post #76

Can we please call it NodeJS and stop calling it Node.js? It's not a .js file, and it's not written in JavaScript .

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.

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

#78
post #77
post #76

Can we please call it NodeJS and stop calling it Node.js? It's not a .js file, and it's not written in JavaScript .

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 the sort)

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

#79
So... Two thoughts: this probably means we can run node in deno?

Second: looks like js is catching up with smalltalk. JJust a shame the debugger is still rather crappy, and the browser/inspector only applies to a subset of widgets/controls (the html/css stuff, not the tab bar, address line, bookmarks menu etc..).

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

#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 :)
Post reply on HN