News for hackers. Stuff that matters.
Re:I'm fed up with it, so I'm writing a browser by ilaksh on Friday September 22, 2023 @06:27AM (#37610250)
Think about the depth and breadth of Web APIs at our disposal: Fetch API for fetching resources, Service Workers enabling offline experiences and background scripts, Canvas and WebGL allowing powerful 2D and 3D graphics, respectively, while WebVR and WebXR bring virtual and augmented reality straight to our browsers. There's the Web Audio API providing rich audio processing, the vast array of device interaction tools like Geolocation, Notifications, Web Bluetooth, and Web USB, and even niche functionalities like Screen Capture and Page Visibility to enhance user experiences. The browser even offers robust storage solutions such as IndexedDB, Cache API, and Local Storage. For seamless communication, we've got WebRTC for real-time chats, WebSockets for persistent connections, and Service Workers again playing a pivotal role in background data sync and push notifications. On the performance front, APIs like Navigation Timing and Performance Observer ensure our web apps run smoothly, and for security, there's Web Authentication and SubtleCrypto.

Now, when you pivot to layout and design, the sheer versatility of HTML and CSS is evident. We've gone from classic float and position-based layouts to the modern and responsive techniques offered by Flexbox and Grid Layout. There's the multi-column layout mimicking newspaper designs, the older table layouts now reserved for tabular data, and the extremely vital responsive designs tailored through media queries and adaptive or fluid strategies. This ability to create almost any layout imaginable, combined with the impressive array of APIs, really emphasizes the parallel between browsers and traditional OSes, with the browser now serving as a robust platform for intricate and expansive applications, just like an OS would.

Furthermore, when we talk about traditional OS features, IPC (Inter-Process Communication) is one that stands out – and browsers have their own spin on it. Web Workers and Shared Workers, for instance, enable concurrency by allowing scripts to run in the background without blocking the main thread, which is eerily reminiscent of how OS processes function. The Push API and Server-sent Events can be viewed as a form of "message-passing" mechanism, fostering communication between the server and the browser. And the crown jewel: sandboxing. Browsers inherently sandbox web pages to protect the user, ensuring that potentially harmful code is isolated and can't wreak havoc on the user's system. This level of isolation and security is paramount in an OS, and the browser pulls it off with finesse. Combine this with the robust Web APIs and versatile layouts, and the case for browsers as modern-day operating systems becomes quite compelling.

Another striking resemblance between browsers and operating systems emerges when we consider the world of programming languages. Just as multiple languages can be compiled to target a specific OS, an impressive variety of languages are designed to compile down to JavaScript or WebAssembly for execution in the browser. TypeScript, CoffeeScript, Elm, Dart, and even Kotlin and Scala have flavors that target the web, reflecting the vastness and diversity of this ecosystem. WebAssembly (or wasm) further elevates this paradigm, acting like a low-level bytecode, and welcoming languages like C, C++, and Rust to the web arena. This proliferation of languages and the ability to compile them for a unified runtime environment (the browser) is reminiscent of how diverse programming languages compile to binaries for a specific OS. The flexibility and broad reach of the web's "compilation target" underscore the browser's position as a de facto operating system of the modern web era.

Re:I'm fed up with it, so I'm writing a browser by phendrenad2 on Friday September 22, 2023 @12:53PM (#37614411)
At least make your own argument, don't ask ChatGPT to do it for you. ChatGPT is really stretching to make your point though, as you can see from the laughable use of the phrase "Another striking resemblance between browsers and operating systems" after just listing a bunch of web APIs that no one cares about. (WebVR? Get out of here...)
Re:I'm fed up with it, so I'm writing a browser by ilaksh on Friday September 22, 2023 @02:08PM (#37615487)
People should care about WebXR. It's the closest thing to the concept of the metaverse. Or could be if people cared.

People care about quite a lot of those APIs.

And I asked it to list all of them because it helps make my point.

Re:I'm fed up with it, so I'm writing a browser by dang on Friday September 22, 2023 @04:59PM (#37617714)
Please make your points yourself. Generated comments aren't allowed on HN and we ban accounts that post them.

https://news.ycombinator.com/newsguidelines.html

Re:I'm fed up with it, so I'm writing a browser by ilaksh on Saturday September 23, 2023 @02:42AM (#37621105)
Ok. Sorry. I do find comments that are obviously AI-generated to be annoying also. I know you are busy, and please don't take this as some kind of back talk. I just think it is worth a moment of your time if you can get a little bit more detail on this issue from this "incident".

But just to clarify, this is the first time I have generated a comment, and it was a collaborative effort between me and GPT-4 that lasted like fifteen minutes. It wasn't just a lazy "here is the comment, reply to it".

I was trying to make a better comment. In particular the point I was trying to make was about the sheer scope of web platform functionality and APIs. Which there are so many web APIs that I was using ChatGPT as a research tool. Even GPT-4 said "wow, I can't list _all_ of the APIs, there are too many of them".

Also, I don't see anything on that guidelines page that says anything about AI-generated content being disallowed, so you might consider updating it.

Also, how do you determine if a comment is AI-generated or not? Because the previous version which I had asked it to refine to be in my voice was closer to my writing voice but actually less substantive.

So I had a slightly worse comment ready to go (didn't make the point as well) but I decided to reply with the comment that was better even though it was easier to detect as AI-generated.

I don't think you would have threatened me if you really wanted me on the site. I make a lot of comments on HN, probably spending too much time on here. And I can be fairly, lets say, bold about the content of the comments.

I do remember a recent incident where someone was advertising that they would spend two weeks to build out a basic chatbot for a minimum of $10,000. I can guarantee that person was hoping to spend a half-day or less if they found a customer for a truly simple bot. So the advertisement and business model was dishonest and borderlining on a scam because it misrepresented the time and effort involved and deliberately overcharged for a simple project. That's why I commented on that post.

But I understand that you don't have time to try to parse out how some comments that are obviously on shaky ground might be warranted in some cases.

If you do ban me then I will miss HN. But also, if I am investing a lot of time into this and the comments or submissions aren't appreciated overall, then even for myself, I should reevaluate the use. Maybe socializing just isn't for me, even on a web forum.