Live data from Hacker News

I'm fed up with it, so I'm writing a browser

adayinthelifeof.nl

451–460 of 501 posts

Re: I'm fed up with it, so I'm writing a browser

#451
post #172

Earlier quoted context omitted.

As a developer my problem with the GPL is that it's less free than other licenses. It's an interesting legal hack, but it can only succeed in its goals by boiling the ocean. I just want to write things, and sometimes making money involves not publishing all of your source code. Having to choose between options and idealism limits the popularity of GPL projects.

I have the same problem with GPL, specifically in that as far as I can tell it doesn't give one the freedom of making a living out of making software as a product. I'd love to be proven wrong and find out that there are practical, viable ways to develop new GPL software and be paid strictly for doing this. However, what I tend to hear is that people don’t get paid for this, but rather for customizing that software (o…

> I personally want to make a living making software products, not services. GPL doesn’t seem to offer me a way to do this.

It's exactly the opposite!

If you want to make a living making software, you make it GPL. Any corporation that wants it will need to pay you for a commercially licensed version they can use (it's your code, you can license it in as many ways as you want). The hobbyists can use the free GPL version and the companies can pay you for your work. Win-win.

If you make your software BSD/MIT licenses you can't make any money, every corporation that wants it just takes it for free so you can't make a living out of it. You could try selling support but if your library is great and easy to use, not much money in that.

Unfortunately for you (and me) even if you make a really awesome library and license it as described above, you still can't make a living because there are other similar libraries with MIT/BSD license and the corporations will use those (even if they are inferior to yours) to avoid paying you. Thus, the market for selling software like this has been eliminated and we're stuck selling subscription services.

Re: I'm fed up with it, so I'm writing a browser

#452

Earlier quoted context omitted.

The fundamental problem I have with the GPL, and I think is echoed elsewhere here, is that the GPL is not about my code. It is trying to force my will on other people’s code. It is inherently less free because it is trying to exert dominance over things I do not own and have never been involved in. In theory, a 10 liner GPL Python script could infect an org with 20 millions lines of closed source code and try to dict…

IANAL but I don't think your example is accurate. Unless you expanded that 20 line python script into your 20 million line application, the GPL is not going to cross over and infect your other code. It would mean that if you are distributing that python script to users then you have to include the source for it (not usually a problem with python, but it is for other languages).

From the GPL 2.0 license:

“You must cause any work that you distribute or publish, that in whole or in part contains or is derived from the Program or any part thereof, to be licensed as a whole at no charge to all third parties under the terms of this License”.

That is pretty clear. If you distribute software that contains a GPL component, the whole lot is considered GPL. Whether the GPL is 20 lines or a million is irrelevant.

This is why the GPL and similar licenses are called viral. They infect other people’s code and try to impose license terms on it.

This is also why licenses like LGPL were created, to try to be a little more reasonable. But that seems to have failed almost completely.

Re: I'm fed up with it, so I'm writing a browser

#453
post #417

Earlier quoted context omitted.

Unfortunately you've fallen victim to years of anti-GPL propaganda and FUD. A 10-liner GPL Python script is not going to "infect" an org with 20 million lines of closed source code. Suggesting that it's possible, even "in theory", is absurd. Yes, you need to be careful when you integrate GPL and LGPL code into your proprietary code base, and in some cases you just cannot do it. But so what? You are not entitled to us…

"Yes, you need to be careful when you integrate GPL and LGPL code into your proprietary code base, and in some cases you just cannot do it. But so what? You are not entitled to use of that code. If you can't use it because of its license, then that's life: move on and find something else that you can use, or write it yourself." Yeah, apparently people moved on and the GPL is loosing significance.

Is it, though? I really don't think it has. There's still plenty of GPL-licensed software out there; most of the software I run on my laptop is still GPL, for example (the main notable exception being Firefox).

I think perhaps there's just a lot more open source out there these days than there was 10 years ago. A good amount of it was started by or sponsored by corporations, and sadly those types of entities are less likely to use the GPL.

But that's fine, no skin off anyone else's back.

Re: I'm fed up with it, so I'm writing a browser

#454

Earlier quoted context omitted.

Yeah, it strikes me a bit like, this will be hyperbole, complaining about forbidding slavery reduces freedom because you are not allowed to have slaves.

The difference is that nobody is harmed in the scenario where someone makes a closed source product with permissively licensed code. The original project is still there and still just as usable. Everyone still has the same freedoms as they did previously.

If that "someone" is backed by a large corporation whose goal is to extinguish the utility of the existing project, they might hire away some of the contributors and add features at a pace that the original project just can't keep up with.

While that's certainly capitalism at its finest, I don't think that's a good outcome for the user base as a whole, or of the community.

Re: I'm fed up with it, so I'm writing a browser

#455

Earlier quoted context omitted.

I wish more people gave a shot at browser implementations. You see a lot of comments that this in a herculean task, and maybe it is, but it's not _that_ bad. You don't have to implement all of the functionality of modern web browsers. You don't need battery APIs, game controller APIs, USB, etc. Focus on what is important - HTML, CSS, JS. Worst case scenario - you will learn something new. Best of luck on this project…

I think it probably is that bad if you the approach it as this person is currently doing: not using any libraries at all. If you use existing libraries for HTML parsing, CSS parsing, layout algorithms, graphics rendering, etc, then I think I think it's doable.

Writing parsers honestly isn't that hard, especially when you have more or less step-by-step instructions for some of the formats, and test suites that independent 3rd parties have written that you can use to help verify your implementation.

Regardless, so what if it's "bad"? OP is using this as a learning experience too. If he wants to write parsers, and thinks that experience will be good for him, then he should write parsers.

I do agree that writing your own parsers isn't strictly necessary if you want to write an independent web renderer/browser. If I were tackling this project, I'd be more interested in and curious about how to write a renderer, and if there's a HTML or CSS parsing crate already written and available on crates.io, I'd probably use it.

Then again, writing a parser would also make me intimately familiar with HTML and CSS in ways that I'm probably not currently, and that might help inform how I build the renderer.

Re: I'm fed up with it, so I'm writing a browser

#456
post #59

OP here. Thanks for the pos/neg/neutral comments everybody. Some remarks: Yes, there are a lot of browsers out there where I can contribute to which would be more efficient. But that would result in just a few browsers instead of a lot of browsers. I'm all for the last one, as this would give people options. This IS a pet project. I never told anyone otherwise. I would start writing it even when I wasn't fed up with…

To me the logical conclusion of what you write is not to write yet-another-web-browser, because browsers are rotten to the core by terrible protocol designs, terrible specifications, politics, greed etc. Browsers did not spontaneously start to degrade, it's what the key actors at different times did that made it happen. The only hope, IMO, is to build something much more sane that cannot be abused. Something like Gop…

I remember first seeing Gemini a while ago, and thought, "cool project, but I probably won't ever use it". And I haven't. If I'd want to build a browser, I want there to be a lot of content for me out there already for me to browse.

It's funny, because I think designing a new protocol and markup language, and then building both server and client software for it, and then actually convincing millions of people to use it... well that sounds orders of magnitude harder than writing a web browser, even with all the crazy and terrible protocols and APIs I'd be expected to build.

And sure, I could set my sights lower and try to build something with much more modest ambitions, only hoping for a few thousands of people to use it -- at most! -- but that doesn't sound interesting to me. I'd still have to use the web for all the other things I need and want to use the web for. Maybe this sort of thing does sound interesting to some people. That's great, go for it!

Re: I'm fed up with it, so I'm writing a browser

#457

Earlier quoted context omitted.

I access the web through the internet, the same as I have done since 1993. I use software that can make TCP connections, send HTTP requests and receive HTTP responses.

Care to share specific details? Curl? wget? netcat? Terminal-mode browser? (I use all of the above myself. Many websites ... behave poorly with them, though they can still be useful.)

Original netcat yes, all the time. A variety of other TCP clients. Customised Links browser. Several proxies. Customised tnftp. curl in HN examples.

Consider that each web user might visit different websites and seek different information and data. Each user might have different preferences. What is good for one user might not be good for another. Me, I prefer textmode. I am not interested in X11-style terminal emulators. I have not used a mouse outside of the office for over 30 years.

I write simple UNIX programs that extract the information/data I want from HTML or JSON on stdin. I usually output this info/data as plain text, CSV or SQL. For recreational web use I am not interested in "interactive" websites. If I get a response body with the info/data I want, then the website is "working" as desired.

As it happens, the most challenging step for me is deciding what info/data I want to keep. Websites routinely contain so much garbage and marginally useful bits of info/data that processing it all is an exercise in diminishing returns. (And this is precisely what people trying to write "modern" browsers will inevitably try to do.)

Re: I'm fed up with it, so I'm writing a browser

#458
post #256

For those interested in trying this on their own as a learning experience, I've really loved the early material in this book: "Web Browser Engineering." ( https://browser.engineering/ ) It was posted here a while back.

It’s an awesome book and was my favorite class at the UofU. I keep telling myself I’m going to go back through it in a language other than Python as a fun and challenging personal project.

Re: I'm fed up with it, so I'm writing a browser

#459

Earlier quoted context omitted.

Right, corporate lawyers are ideological activists trying to kill GPL. But the campaign to denigrate the ideological activists on the other side is much more successful.

> Right, corporate lawyers are ideological activists trying to kill GPL. This is a pretty cynical "assume the worst" outlook, and it badly violates Occam's Razor. I think a much more likely reason that corporate lawyers disapprove of the GPL is that one of their main jobs (in some cases their entire job) is to protect the company's IP, and the GPL is a huge threat to IP. Any lawyer who didn't advise avoiding the GPL…

I've seen too many cases, recent example comes to mind is apple switching from bash to zsh, that are done not for technical or even business reason but ideological.

Re: I'm fed up with it, so I'm writing a browser

#460

I'm not used to this kind of negativity on HN about browsers and the open web. I think it's a very worthwhile endeavor, whether he succeeds or not. If the result is only half a browser that is not incentivized by big tech, than it can be useful for the moment my reliance on Firefox has to stop. I hope it doesn't get there because I like my Firefox very much, but I came to realize that my browser is a sort of bottlene…

> I'm not used to this kind of negativity on HN about browsers and the open web. Really? It's a given that any thread about browsers on HN will have a dozen highly upvoted replies that claim it's impossible to make a new browser. Even though we have evidence that it is indeed possible. Ladybird is made from scratch (originally all the way down to the C++ stdlib!) and can now run Discord (poorly) after 3-4 years of pa…

Ladybird has mostly stopped those upvote parties - turns out we were wrong!
Post reply on HN