Live data from Hacker News

The browser is the sandbox

aifoc.us

191–200 of 202 posts

Re: The browser is the sandbox

#191

Earlier quoted context omitted.

This is a misconception. AS3 actually had great garbage collection, and solidly written AS3 code did not leak.

Flex player leaked memory like a sieve. After one day or so it would hang the computer. Maybe it was wrongly written, but leak it did. I have experienced it first hand. Maybe it was the standalone flex player instead of the web Flash player?

I don't know about a standalone Flex player, I don't think such a thing existed. Maybe you mean standalone Flash player. I didn't use Flex components. I coded in pure AS3. I had critical business code that ran nonstop for years on end in AIR on dozens of deployments without memory leaks. Again, I think that badly written AS3 code (or bad components) could definitely take down a player fairly quickly. Garbage collection required you to track and clean up weak references, but it's the same thing in Javascript. You had to know the lifecycle of your components and what you were doing.

Re: The browser is the sandbox

#192
post #156

Earlier quoted context omitted.

Flex player leaked memory like a sieve. After one day or so it would hang the computer. Maybe it was wrongly written, but leak it did. I have experienced it first hand. Maybe it was the standalone flex player instead of the web Flash player?

My memory is a bit fuzzy, do not remember flex player, did you mean AIR? (Flash for desktop, with file access)

That was what I meant indeed.

Re: The browser is the sandbox

#193
post #71

Earlier quoted context omitted.

You mean for running unsafe Python code? I'm on a multi-year quest to answer that question! The best I've found is running Python code inside Pyodide in WASM in Node.js or Deno accessed from Python via a subprocess, which is a wildly convoluted way to go but does appear to work! https://til.simonwillison.net/deno/pyodide-sandbox Here's a related recent experimental library which does something similar but with JavaSc…

Thank you! With WASM I can’t use all pypi packages and can’t connect to database, that’s why I’m looking for python based solution

With Wasmer you should be able to use all pypi packages (even the native ones), although we are a bit light on the native packages we support now

Re: The browser is the sandbox

#194

Earlier quoted context omitted.

Flex player leaked memory like a sieve. After one day or so it would hang the computer. Maybe it was wrongly written, but leak it did. I have experienced it first hand. Maybe it was the standalone flex player instead of the web Flash player?

I don't know about a standalone Flex player, I don't think such a thing existed. Maybe you mean standalone Flash player. I didn't use Flex components. I coded in pure AS3. I had critical business code that ran nonstop for years on end in AIR on dozens of deployments without memory leaks. Again, I think that badly written AS3 code (or bad components) could definitely take down a player fairly quickly. Garbage collecti…

It is possible I was holding it wrong. I do not doubt your experience, but it was very easy to write things that leaked memory in Flash, and it was impossible to remove those leaks sometimes. I was part of a project where a lot of effort went into removing references etc and it was still not working. We had to have 2 instances restarting each other. It was a mess. Maybe we can agree those were "bad components".

I blame the runtime. The quality of the code was good. It was not normal.

A few sources of people complaining about the same, some from hn with the same solution I had to adopt, some from CVE, some from users:

- https://community.adobe.com/questions-638/flash-player-23-24...

- https://advisories.checkpoint.com/defense/advisories/public/...

- https://news.ycombinator.com/item?id=45813026

> The memory leaks were so bad that Adobe advised us to just restart the app periodically

- https://blog.gskinner.com/archives/2005/10/major_flash_pla.h...

- https://support.mozilla.org/bm/questions/931671

Re: The browser is the sandbox

#195
post #94

Earlier quoted context omitted.

> It makes web apps first class productivity applications. They won’t be first-class as long as native UI still has the upper hand.

This battle is long won in favor of webtech in every realm but 3d/video editing/audio work/things that do gpu heavy lifting like game engines. Outside those sort of spaces it’s hard to name a popular piece of software still on native that isn’t a wrapped webapp.

Microsoft Office apps, Java IDEs, text editors in general. Most of the time I spend with software is with non-web-UI applications.

To the extent that the battle has been won, the apps it has been won with are nevertheless second-class compared to native-level usability.

Re: The browser is the sandbox

#196
post #135

Earlier quoted context omitted.

I’ve never used a webapp that felt nicer than native software, it’s always very clearly a compromise.

I can't tell what's a web app and what's native these days. Are you sure you can?

The way keyboard-only usage works, if it is workable at all, is usually a dead giveaway. As is the lack of dialog windows and traditional menus, and often latency.

Re: The browser is the sandbox

#197

Earlier quoted context omitted.

Right, so that was exactly what I was thinking when I wrote that. All three of Flash, PDF, and the browser DOM are expansive, ambitious metaformats, containers for every piece of technology that has ever had a bug. Your take on why Flash didn't survive is more cynical than mine. I genuinely think Apple threw up their hands at the prospect of attempting to solve a security problem on the same scale as the browser itse…

My memory of this time is getting a bit fuzzy tbh, but from what I remember Google in the first part of the 2010s put Flash inside their renderer sandbox and Safari/Firefox were still lagging on browser sandboxing at that time. I think Adobe had shared the plugin code with Google to make this possible. There are certainly obvious issues with securing a third party codebase you don't control, and it's likely that the…

This deserves a better response than I can give. All of this makes sense! I'm just aware of the contemporaneous takes on how hard the Flash security problem was.

Re: The browser is the sandbox

#198
post #125

Earlier quoted context omitted.

>And today this is.. not sufficient. What we require today is to run software protected from each other. For quite some time I tried to use Unix permissions for this (one user per application I run), but it's totally unworkable. You need a capabilities model, not an user permission model Unix permissions remain a fundamental building block of Android's sandbox. Each app runs as its own unix user.

Subthread from a while ago where I wrote some details on how Android sandboxing architecture uses Linux’s primitives: https://news.ycombinator.com/item?id=40676309

I really want a desktop distro that is based on Android but can run normal desktop apps, fully isolated by default

Can Binder run on desktop, with some non-mainline kernel? Is someone maintaining such kernel with up to date patches?

Re: The browser is the sandbox

#199
post #195

Earlier quoted context omitted.

This battle is long won in favor of webtech in every realm but 3d/video editing/audio work/things that do gpu heavy lifting like game engines. Outside those sort of spaces it’s hard to name a popular piece of software still on native that isn’t a wrapped webapp.

Microsoft Office apps, Java IDEs, text editors in general. Most of the time I spend with software is with non-web-UI applications. To the extent that the battle has been won, the apps it has been won with are nevertheless second-class compared to native-level usability.

> Microsoft Office apps

Thought these were web wrappers now if you use the latest

> text editors in general

Definitely not in general, VSCode and Cursor are both webtech and are extremely popular. Only terminal editors are native and then beyond that you have things like SublimeText, Textmate which are extremely niche now.

> Java IDEs

Yeah those and XCode I guess, Java IDE is extremely niche compared to webdev.

Re: The browser is the sandbox

#200
post #17

We never say that it isn't. There is a reason Google developed NaCl in the first place that inspired WebAssembly to become the ultimate sandbox standard. Not only that, DOM, JS and CSS also serves as a sandbox of rendering standard, and the capability based design is also seen throughout many browsers even starting with the Netscape Navigator. Locking down features to have a unified experience is what a browser shoul…

>all of them being a horrible one Silverlight was nice, pity it got discontinued.

It wasn't nice for Linux. I remember having to run a windows vm just to watch netflix in a browser back when their player was silverlight.
Post reply on HN