Live data from Hacker News

TIL: You can access a user’s camera with just HTML

austingil.com

151–160 of 240 posts

Re: TIL: You can access a user’s camera with just HTML

#151

Earlier quoted context omitted.

It just feels like every time software developers can't (or won't) build things cross-platform, users end up with bigger and bloatier solutions and poorer experiences. First, it was cross-platform UI toolkits and OS abstractions like Qt (require users to use a big, "lowest common denominator compromise" library ) Then, it was web apps (require users to provide a browser) Then, it was Electron and friends (ship the wh…

You're absolutely correct. IMO, the reason is, to a large degree, ineptness of software engineers. It simply doesn't pay to hire or train high-quality SEs, if you're not google or Amazon (and even they probably only hire and pay the best to prevent competition). Instead, the industry as a whole hands out more "productive" tools, i.e., the abstraction layers you mentioned, in order to build ever more trivial applicati…

I agree with what you wrote 99% but draw a different conclusion.

The 1% where I don't agree: most developers aren't engineers. These days companies hire engineers for stuff that is hard and important. But most do not need that.

And my impression is that that is a good thing. There's been a real democratization of development which means there's a lot of software being written. Most applications I see are fundamentally CRUD apps, and while I'm a bit fearful of the security of the banking apps, the massive frameworks are at least designed (implicitly at least) to reduce complexity and steer people towards some "best practices". Any kid today can build something that only a couple of decades ago (or less) really did need serious engineering.

We've followed the same path before. Rich people used to hire chauffeurs who didn't just drive but performed maintenance on the cars. Then people knew how to change tyres, gap their spark plugs etc. Now people know how to turn the key and steer around the road, hopefully not killing too many people in the process. Next, they'll only need to know how to step into the vehicle.

We should be glad software is going that way. It's not like that will reduce employment for engineers.

Re: TIL: You can access a user’s camera with just HTML

#152
post #77

Earlier quoted context omitted.

Thanks for saying this, as I know a lot of people on HN have very negative feelings towards this trend. Personally, I feel the browser is a great way to stop reinventing the wheel, and the APIs abstract away a lot of the heavy lifting. They pretty much get you 80% of the way there, and the last 20% is where you can really add the stamp of "uniqueness" to your implementation. The fact that the browser is also heavily…

It just feels like every time software developers can't (or won't) build things cross-platform, users end up with bigger and bloatier solutions and poorer experiences. First, it was cross-platform UI toolkits and OS abstractions like Qt (require users to use a big, "lowest common denominator compromise" library ) Then, it was web apps (require users to provide a browser) Then, it was Electron and friends (ship the wh…

Operating systems like WebOS, KaiOS/Firefox OS, ChromeOS largely do away with many layers of the stack, by making the web technology front & center. I do think you're right that perhaps some layers could go, but I think native apps & much of the native OS itself are far closer to the LaserDisc technology[1] that we can get rid of.

Reciprocally, on the server, there's definitely traction strong traction with webassembly being the de-facto platform for glue/extensions/user-code, owing to it's super sandboxing & capability systems like WASI. Being able to take any langauge, compile to wasm, and distribute & safely run that module has been a huge upgrade, and a very nice bit of platform that historically wasn't really available/commonplace on "native".

Your issue with "Electron and friends" is wrong. As you say, Electron does at present bundle a whole browser in each app. But many "friends" have new approaches. Tauri recently went 1.0, and generally builds off the already available WebView that all major OSes include[2]. I'd be interested to see what kind of fear/concern you'd present if Electron also had a more respectful shared-library usage-pattern.

[1] "Writing an App is Like Coding for Laserdisc" https://shkspr.mobi/blog/2022/09/writing-an-app-is-like-codi... https://news.ycombinator.com/item?id=32723192 (153 points, 1d ago, 184 comments)

[2] "Tauri [1.0] - Electron alternative written in rust" https://news.ycombinator.com/item?id=29807022 (558 points, 8mo ago, 419comments)

Re: TIL: You can access a user’s camera with just HTML

#153
post #35

Earlier quoted context omitted.

And theres a LOT more APIs than people realize: https://developer.mozilla.org/en-US/docs/Web/API Some interesting ones: - Screen recording/capture - Battery status - Barcode Detection - Bluetooth - Sensors (e.g. Accelerometer) - Wake/screen lock - Color picker - Vibration - MIDI - USB - Contacts picker - Presentation (AirPlay, Chromecast) - Virtual reality

These are all Javascript APIs. I think what's particularly notable about the OP is that it's HTML.

I'm here for the JS comments.

I'm amazed at how quickly I can throw together a front end feature in JavaScript on my otherwise html site.

Really all of web impressed me over the desktop/app counterparts. I wrote and read to/from a php database with less than 2 hours of time. Laravel has me doing user authentication + useful coding in less than 40 hours after the tutorial.

Re: TIL: You can access a user’s camera with just HTML

#154

Earlier quoted context omitted.

> Then, Docker and containers (ship the whole OS with the application) 𝚃̶𝚘̶ ̶𝚋̶𝚎̶ ̶𝚏̶𝚊̶𝚒̶𝚛̶,̶ ̶𝚝̶𝚑̶𝚊̶𝚝̶'̶𝚜̶ ̶𝚜̶𝚑̶𝚒̶𝚙̶𝚙̶𝚒̶𝚗̶𝚐̶ ̶𝚝̶𝚑̶𝚎̶ ̶ ̶𝚔̶𝚎̶𝚛̶𝚗̶𝚎̶𝚕̶ ̶ ̶𝚊̶𝚗̶𝚍̶ ̶𝚗̶𝚎̶𝚎̶𝚍̶𝚎̶𝚍̶ ̶𝚙̶𝚊̶𝚌̶𝚔̶𝚊̶𝚐̶𝚎̶𝚜̶ ̶𝚠̶𝚒̶𝚝̶𝚑̶ ̶𝚝̶𝚑̶𝚎̶ ̶𝚊̶𝚙̶𝚙̶𝚕̶𝚒̶𝚌̶𝚊̶𝚝̶𝚒̶𝚘̶𝚗̶.̶ ̶ ̶𝚃̶𝚑̶𝚊̶𝚝̶'̶𝚜̶ ̶𝚙̶𝚎̶𝚍̶𝚊̶𝚗̶𝚝̶𝚒̶𝚌̶,̶ ̶𝙸̶ ̶𝚔̶𝚗̶𝚘̶𝚠̶,̶ ̶𝚊̶𝚗̶𝚍̶ ̶𝚠̶𝚑̶𝚒̶𝚕̶𝚎̶ ̶𝚠̶𝚑̶𝚊̶𝚝̶ ̶𝚢̶𝚘̶…

Containers don't ship a kernel, just the userspace.

[deleted]

Re: TIL: You can access a user’s camera with just HTML

#155

Earlier quoted context omitted.

It just feels like every time software developers can't (or won't) build things cross-platform, users end up with bigger and bloatier solutions and poorer experiences. First, it was cross-platform UI toolkits and OS abstractions like Qt (require users to use a big, "lowest common denominator compromise" library ) Then, it was web apps (require users to provide a browser) Then, it was Electron and friends (ship the wh…

> Ship an entire physical PC to the user pre-loaded with the application? A phone (hi iOS), a video game console, a smart appliance, etc. are examples of this. Building cross platform, native applications is expensive (comparatively) to building web applications. I made an FM synthesizer in the browser using WASM and the webaudio api just for personal use. I wouldn't have made it if I had to write it as a native app,…

> A phone (hi iOS), a video game console, a smart appliance, etc. are examples of this.

Related to this: iirc, games for the Xbox One (and presumable the latest generation 'Series' consoles) always run in a VM, with their own kernel and graphics drivers.

Re: TIL: You can access a user’s camera with just HTML

#156

A lot of totally valid opinions out there about this, but I personally _love_ how the browser is becoming a very well-featured sandbox for shipping applications. For personal fun and learning, I'm making a complete 2D video game in ideally less than 1MB. It has 60fps graphics, full spatial audio, and gamepad support, all because the browser has a lot of these APIs that didn't exist when I was starting out my career.…

I love the idea of a good cross platform sandbox to ship apps. I think it's really unfortunate that we chose a web browser to be that application platform.

The underlying technology is terrible. HTML and CSS are for displaying documents. Things which should be trivial to add to an application UI (add a ListView, anchor element X to be left of element Y, etc) are nigh impossible without using some bloated toolkit anyway. JS is a slow and brittle language to work with.

The fact that the web became an application delivery platform is an unfortunate historical accident that I am not sure we can recover from.

If we devoted 10% of the engineering that went into "web technology" into an actual dedicated cross platform application platform, it would be way better than the web is today. Faster, less bloat, better technology so that we don't need frameworks on frameworks to do a hello world, etc.

Re: TIL: You can access a user’s camera with just HTML

#157
post #77

A lot of totally valid opinions out there about this, but I personally _love_ how the browser is becoming a very well-featured sandbox for shipping applications. For personal fun and learning, I'm making a complete 2D video game in ideally less than 1MB. It has 60fps graphics, full spatial audio, and gamepad support, all because the browser has a lot of these APIs that didn't exist when I was starting out my career.…

Thanks for saying this, as I know a lot of people on HN have very negative feelings towards this trend. Personally, I feel the browser is a great way to stop reinventing the wheel, and the APIs abstract away a lot of the heavy lifting. They pretty much get you 80% of the way there, and the last 20% is where you can really add the stamp of "uniqueness" to your implementation. The fact that the browser is also heavily…

The browser is inefficient. Use a modern website on a ten year old laptop and it is close to unusable because of modern web dev practices. That laptop is still perfectly usable for a lot of things.

The modern web drives obsolescence second only to gaming, but while gaming is user driven and entertainment focused (i.e. not essential), the web is megacorp driven and also includes necessary modern infrastructure.

That is all around a bad thing.

Re: TIL: You can access a user’s camera with just HTML

#158
post #143

Earlier quoted context omitted.

Calendars are far more useful as web apps than other incarnations; you can open them anywhere and don't have to carry a specific artifact with you to do it.

a web view for caldav is just fine (and how I use outlook currently); but for notifications a proper program is definitely preferable.

the flashing/buzzing/squawking device in your pocket does this quite well.

Re: TIL: You can access a user’s camera with just HTML

#159
post #46
post #28

Earlier quoted context omitted.

I find it incredible that people still think HTML, a spec first published in 1990 when we were using 386s with CGA monitors, shouldn't have evolved to utilise some of the modern features available on today's computers and phones. Why wouldn't we want to be able to do useful things on the web with our devices?

I'm not arguing that the trend is a bad one, but it does come with downsides that are significant for some. For instance, I certainly don't want every random website I might visit to have access to these abilities. It just strikes me as an unnecessary security risk.

What exactly is the security risk? The browser intermediates all access and you already trust the browser to handle many other sensitive operations on your behalf. There's no way for a site to activate this without your approval or covertly without a full zero-day (probably two since most OSes also have recording indicators now).

Contrast this with where we were in the bad old days: sites used things like plugins or Flash/Silverlight which had massive attack surfaces and, for years, inadequate privacy controls or sandboxing. Part of why this is in the browser now is that the browser developers realized that things were never going to get better if they left it to the disinterested developers at companies like Adobe, and now that's just a “can you believe we used to think this was normal?” historical trivia point.

Re: TIL: You can access a user’s camera with just HTML

#160

A lot of totally valid opinions out there about this, but I personally _love_ how the browser is becoming a very well-featured sandbox for shipping applications. For personal fun and learning, I'm making a complete 2D video game in ideally less than 1MB. It has 60fps graphics, full spatial audio, and gamepad support, all because the browser has a lot of these APIs that didn't exist when I was starting out my career.…

I love the idea of a good cross platform sandbox to ship apps. I think it's really unfortunate that we chose a web browser to be that application platform. The underlying technology is terrible. HTML and CSS are for displaying documents. Things which should be trivial to add to an application UI (add a ListView, anchor element X to be left of element Y, etc) are nigh impossible without using some bloated toolkit anyw…

There is a possible future where HTML and JavaScript are relegated to historical shims for WASM and . I don't know if this is a good future or not, but you want a future with cross-platform apps freed from "web technologies" that's probably the one that's most achievable from the state of things today.
Post reply on HN