Looking at what it takes to actually implement the "belly of the beast" from scratch, I don't blame them.
(Also, after seeing the below 350-line function that's part of a 3113-line file, I now know that whenever I'm yelling at CSS layout behaving weirdly, there's someone with a much, much more frustrating job.)
EDIT: for anyone who doesn't know, https://servo.org/ is Mozilla's ambitious project to rewrite their browser from scratch with concurrency thought in from the beginning, supported by Rust's unique approach to safe concurrency. Parts of it have already made it into Firefox: https://bholley.net/blog/2017/stylo.html
"(Also, after seeing the below 350-line function that's part of a 3113-line file, I now know that whenever I'm yelling at CSS layout behaving weirdly, there's someone with a much, much more frustrating job.)"
Browser authors are on the receiving end of over 20 years of standards all written by people who were not, personally, the ones implementing them, plus a healthy dollop of "code that worked in this one browser once and become a de facto standard", for which the way tables format themselves in all their myriad ways comes to mind, based around whatever was convenient in already-crufty codebases now long dead.
And then all these nightmares get together and interact. And the end users expect this to be fast. And web developers expect to be able to reach into the middle of this epically complicated data structure and tweak a style and have what may literally be the entire page rerender, and they expect that to be fast and easy. And using a language that was never written to be fast. (If anything, Javascript was written to be implemented quickly, if you read the story about where it came from. There was no time to be worrying about how well it could be JIT'ed 10ish years later.)
I don't spend a lot of time wondering why my browser is so slow; I often find myself wondering how it manages to be so fast. The spec for a browser is insane. I definitely believe that a future of browsers will be a combination of web assembly and a much more raw rendering layer that will offer access to font rendering and the OpenGL primitives, and a non-trivial number of the biggest websites will eventually implement their own renderers. I say "a" future because the current web rendering system will be around to the end of my prognostication powers. But I suspect this bypassing of the "legacy" renderer is also ultimately inevitable. Give it about 5 years or so.
"(Also, after seeing the below 350-line function that's part of a 3113-line file, I now know that whenever I'm yelling at CSS layout behaving weirdly, there's someone with a much, much more frustrating job.)"
At my job, our group recently refactored a file from over 30000 lines down to 17000. I've also seen, on multiple occasions, single methods in Smalltalk applications that exceeded 32KB and therefore broke the compiler! (The egregious sins of Smalltalk shops were weirdly parallel. The egregious sins of Smalltalk vendors were also weirdly parallel, come to think of it.)
I've seen entire major subsystems written without a single instance variable and without a single instance method -- in Smalltalk -- in an application responsible for multi billions of dollars in transactions at a Fortune 500 company. The depths of how bad is, in bad corporate code is kind of amazing. Though in fairness, I think those super long methods resulted from auto-generated methods that became cut and paste hand maintained.
Yikes. I've seen that in small scale, with copypasted auto-generated code (although not Smalltalk) reaching 5k lines or so at a manufacturing company. But what you're talking about is a whole other level of bad.
From personal experience, any site will render quickly of you kill the 10+ externally sourced JS frameworks it loads (or it will just show a white on white page that you can throw reader mode at).
Frankly what went wrong was that print media designers got involved and used flash and JS to turn static text into virtual pamphlets etc.
I wonder why browser makers not take full advantage of the high churn of the JS ecosystem to move forward.
Let put a end to the madness, and say "after 2020, not more in the old apis" and do a clean standard. Then take advantage of the fact html/js have tags that could declare versions, and when a old page show, use the old rendered, and when a new, use the clean one.
By then, most PC/mobile devices are powerfull enough to have 2 renders alive and the transition will be fast for more big/popular sites.
Back to doctypes? I remember as a younger person being very confused at why there were about five different options. Do I use strict? transitional? xhtml?
There are multiple versions of ECMAScript, analogous to whether your compiler supports C++11/14/17/etc. It doesn't make sense to say "let's all use ES8" because ES8 is back-compatible (I think). It's up to the browser to decide what to support, and you have the same issues in C++ where some compilers don't fully support feature X.
Then, which APIs do you deprecate? How do you define "old"? Anything prior to stable is a good rule of thumb, but since JS can be loaded locally, people will use whatever they downloaded and that they know works. Some people advise not to use auto-updating CDNs precisely because a patch might break your page. And remember it's mostly down to the API developers to ensure compatibility across major browsers, not vice versa.
There's nothing wrong with vanilla JS. Really we just need to get people to be less excited about using frameworks for tiny projects that don't require them. Or you have problems like e.g. some text transition that requires loading every single version of the typeface.
Yes, reminds me of "we have 14 different standards. Let's implement a new one that encompasses all that is needed and obsolete the other ones. Now, we have 15 different standards"
But this is exactly what is happened, just that every new one is ad-hoc, and on top of the olds. Every time a new api happened you create standard + 1 * N browsers.
Eventually, you increase ad infinitum the tech debt, or restart.
I think the cost of the whole web stack is high enough not only for the browser makers but EVERYONE ELSE. Is multiply JS (n-versions) + CSS(n-versions) + HTML(n-versions) * N Browser * N OS.
Now, what other rational option can be offered... push forward and keep doing the same and increase the tech debt? Not exist a way to refactor this?
I believe what will happen is what happens continuously with technology, a new layer of abstraction will evolve and thats it. Most devs want to use some abstraction layer (or build one themselves) and thats it. That's how computers work, just layers of abstractions stacked on top of each other. The underlying details, complexity but also power (eg features, security issues,..) only very few understand.
Sorry but this sounds not very informed to me. HTML5, including the APIs it specifies, is already the big rewrite/consolidation of browser standards. Considering the massive investment in JS engines and browser tech since V8 came out in 2008 or so, and considering the shrinking Web, this isn't going to happen. The approach of specifying features/API levels with requirement levels declared in page metadata etc. has long been dismissed by browser developers. Even HTML5+ doesn't bother to version their specs eg WHATWG's "living standard" thing.
What do you mean by the shrinking web? Even desktop apps are now using html. It feels we are going fast toward a “all gui html”, for better or for worse.
Even though the JS ecosystem has high churn there are many many existing websites that were made years ago that continue to exist and that the browser makers don’t want to break for their users.
That is why I say both editions must be supported. The old and the new. But the thing is put a deprecated warning to the old so is possible to build a better new. This also will help to clean JS/CSS.
If this is true then almost all of them will update to https and almost none of them would bother otherwise.
So I guess the question is not if its ok for chrome to break the web for half the world its if its ok for chrome to impose this cost on site owners on behalf of users for the benefit of users.
Incidentally while there may be a lot of tiny sites that don't use https aprox 3/4 of page loads are already over https. Making myrandomhomepageaboutcats.com switch to https seems a reasonable cost for making the rest of the web more secure.
A better approach would be to allow websites to implement their own render engine. If they don't supply a render engine, then the browser picks the default one (which, at some point, will stop being updated).
Maybe we could give the rendering engines catchy names like Shockwave, Flash, Silverlight, and JavaApplet. :)
You can barely trust a typical Web site to run Javascript in your browser without leaking personal information to God knows who. I'm not going to trust them with a full-blown rendering engine.
Once people can run JavaScript and WASM in a sandboxed environment (the browser), you might as well give them the ability to run a rendering engine. There is nothing magical about rendering engines.
Comparison with Flash et al. is not accurate anymore, since these ran in an unprotected environment. Also, they were cumbersome install whereas WASM apps don't need installation (but can live in a cache if desired, and could even be shared among websites).
"Cumbersome installs" and "unprotected environment" were not why people hated Flash. People hated flash because it couldn't be {scraped, crawled, searched}, broke elementary browser controls like copy/paste and the back button, resulted in laggy and clunky UIs, and was excessively heavy on bandwidth. All of this would apply just as much to WASM 'apps'.
Fundamentally the problem is the conflict between the browser as an 'app' platform and the browser as a document viewer. Put simply, would you rather your user interface be 1) a magnificent piece of software with thousands of man-years put into it, debugged over decades, where every use case has been meticulously considered, or 2) a shitty script written by an overworked web developer?
And am sure this will happen. At some point websites will start shipping rendering with webasm. I am it keen on the details but a well done one could use a canvas to do the rendering.
As a anadotal. We can already fo to websites that run vms and emulate old operating systems. I dont this it is far fetched to run a web browser in a web browser.
Unfortunately that destroys accessibility. If you want to support accessibility, then you need a more complicated rendering target than something like a canvas.
In other words: "Print the file, send the printed sheets by fax to the remote office, once received, OCR them and save to a file"
Not to mention that there's no such thing as "Easily run OCR", considering how many weird fonts there are, and that they could be rendered in such small size as to make it difficult even for humans to tell them apart.
The render engine still has to do that. But that isn't much different from how it works now, where the website has to provide the necessary information.
Besides, nobody says we can't have a protocol for some additional accessibility information.
Maybe we make a sort of 'hyper' extension that comes with all kinds of baked in behaviours, so that we don't have to implement that behaviour ourselves when we deserialise it.
This can already be done today through canvas & webgl, or through clever combinations of DOM + JS + CSS. You can control every pixel that's rendered to the screen through the browser.
So why doesn't everyone roll their own? Some issues:
- footprint - that whole runtime has to come across the wire just to render "hello world"
- javascript's single-threaded tendencies make perf a big challenge
- text rendering [this happens to be the thing the document-focused Web really excels at]
- text semantics [SEO]
- gigantic implementation effort [custom engines RARELY make sense even for the demands/budgets/returns of AAA games; how many websites justify this kind of investment?]
Yeah, that's because it's not really supposed to be used for that. Every single one of these is solvable if they wanted to support this use case. Ad footprint and implementation effort - of course there'd be just a few major ones that'd be cached at client side. Ad2 implementation effort, we can simply compile Qt or Gtk to WASM; it even works today, it's just slow because of platform limitations. This'd be used for applications primarily, document-oriented pages could stay HTML/CSS and HTML/CSS could be simplified thanks to complex web apps turning to other means.
That is a horrible idea. How many of them are going support Chinese, Korean, Thai, Japanese, and Arabic? If all you're supporting is English it's easy. As soon as you go international it's extremely hard to handle all the stuff you're unfamiliar with and shutting out people because their names isn't ASCII is not very inclusive.
So Gtk, Qt, Cocoa, Winforms, all of these are too hard to do? We can literally reuse (some of) these, all it takes is compiling them to WASM, it was already tried and it works, it's just slow due to current platform limitations.
"all written by people who were not, personally, the ones implementing them"
I don't think that's true. At least, all the browser standardization processes I've been involved in included several people who would be responsible for actual implementation.
This is fraud, not a miscommunication between marketers and developers. China is known for fraudulent businessmen cheat out of a lot of money and ran to other countries. I believe this is a case of that.
The company just changed its name to "Redcore" after the ZTE ban earlier this year. There is a demand for software/hardware that is "homegrown" not subject to US control.
That's hairy? It looks pretty clean to me. Sure, there are a lot of match cases, but they follow a fairly clean and clear pattern. Pulling them out into a hundred single-use functions certainly wouldn't make it easier to understand.
If it was so difficult to write a browser, then how did Vivaldi guys manage to write not one, but two browsers (previously Opera and now Vivaldi) from scratch.
Sorry for late reply but your response is hillarious - Vivaldi is just re-skined Chrome. New Opera too. Old Opera (presto engine) was developed over a decade, so not really example of "how to easily write web browser".
I'm sure the marketers made a big deal about it being "fully homegrown", but the engineers were like "that's a ton of duplicated effort, lets start with an open source browser and work from there."
It will be interesting to see if they keep merging in changes from the head of the open source browser or if they continue to diverge over time.
China is very much communist. It's very different than 19th and 20th century communist state, but the US looks very different than a 19th and 20th century capitalist state.
The Chinese governmental structure is very much communist. The ideals in the propaganda are communist. The goverment has strong control of their citizens, controlling how many children they can have, which city they can live in, etc.
You're looking for the term Totalitarian. All Communists are Totalitarian, not all Totalitarians are Communists. They've long since done away with the pretenses of Communism.
> They've long since done away with the pretenses of Communism.
They've kept all their pretenses of communism.
We aren't a pure capitalist society, or a pure republic, or democracy. We still use those words to describe ourselves. It's important that we do use those words to describe ourselves. The phrase 'all men are created equal' in the declaration of independence aided the abolitionist argument, even if at no point did the goverment treat all men as equal.
The ideals of communism still have an impact on China's goverment, culture and even economy. Just because they fall short of a perfect communist society doesn't mean they are not communist.
Has there ever been a communist country by that strict definition though?
I've always thought communism was just an unachievable ideal. With socialism as the best case implementation of it, and totalitarianism as the worst case.
Kind of like how "free market" is an ideal, but capitalism is generally the implementation.
Hippie communes? Basically communism works great on the small scale when there are no bad actors in the system. It breaks down at larger scales and becomes authoritarianism.
what means of production even are there in hippie communes? how can you compare a tiny circle of friends with an economic system? all their goods resources and infrastructure is produced and distributed through a market economy. they are just an actor on that market. and what makes you think that these communities work? do you know how. many just break up after a few months? how many work for more than 5 years, a decade or even are multi generational. anecdotally from West Europeans who tried that, it always ended in disasters, people abuse it and these groups break up, split or the people just give up.
> Do workers own the means of production? No. Are they going toward that? No. It's not "communist" then.
Newsflash: workers never owned the means of production in any communist state. They were told they would, but they were subjected to compulsory work to cater to the communist regime's elite goals while owning nothing at all.
That sort of bait and switch is pretty much the hallmark of every single communist regime since the very beginning.
As far as I know Revolutionary Catalonia came the closest to that.
That said, I don't really care that dictatorships after dictatorships called themselves socialist and communist, people's this and that, they - as good populists always do - subverted the people and their ideas.
Just as North Korea is a "democratic" "republic".
Mistake not this nitpicking for defense of communism. I don't think it makes any economic sense to strip away savings and investment and everything else connected to those for compulsory ownership of your workplace.
So yes, bait and switch is what populism is. And it worked and continues to work wonderfully independent of political leaning/orientation.
Writing from scratch in Rust and using process per domain isolation from the very start can make things much more secure. But I doubt that is something that can be done under, say, 3 years.
I'm sure the engineers are also being asked why they couldn't just do it from scratch, 'it can't be that hard', 'shouldn't take too long', 'should be possible' all by people who have not an ounce of knowledge about how any of this works.
It is open source. The icon after a quick search: https://cs.chromium.org/chromium/src/third_party/skia/resour.... Unsure if it's the one that's, say, put in the Windows app manifest. Also unsure if the repo contains all the Chrome resources, but I was under the impression that it did.
https://chromium.googlesource.com/chromium/src/+/lkgr/docs/c... documents the differences on Linux (given it's the only platform which regularly has both packaged). That does seem to miss the EME CDM, though (I'd write a patch for it, but I'm a bit busy at the moment!).
Google Chrome isn't. Chromium is, but Chromium also tends to download 3rd party close-source blobs from online resources, like the one that turns on your microphone.
Based on the link you provided it looks like it's Opt-Out not Opt-In, so it's not really a bug so much as a "feature" that open source software shouldn't have but google wanted to sneak in. based on this link [0] it's pretty clear that they did this intentionally and only changed things after user outcry. I wouldn't call that a bug.
Sounds like the opt-out tracking Mozilla put in, or the advertisement for that TV show it spammed which did stupid things to text. It would be nice to have a mainstream browser which didn't try to track, advertise to, or shove "telemetry" into users.
It wasn't an ad. It shut down before init if you hadn't manually set an about:config value telling it to run.
It was set up in a dumb way, but people also grossly misreported. The extension was "enabled" by default but did exactly nothing except shut itself down. The behavior was all disabled by default.
I think until their browser really establishes some recognition ... you sort of have to follow in the wake of the primary browsers. Nobody wants to be the browser of "oh man why does it work this weird way" where "weird way" is "not like everyone else".
"The company announced that in the latest round of fundraising it had raised a cool 250 million yuan ($36) from investors that included government agencies."
Hmmm... I seem to have missed out on some super-Venezuela levels of hyperinflation happening to the yuan at some point here. You think that'd be the real news.
No, it was just a swipe at a particularly egregious and amusing typo. I don't generally see things wrong by six orders of magnitude like that. I suspect some sort of automated system that attempts to translate "(\d+).*yuan" into dollars automatically, so it translated 250...yuan into $36.
If indeed the yuan had collapsed by a factor of one million since I last checked the news last night, I don't think even the infinite canvas of online news would have a lot of room to be discussing browser plagiarism amidst the torrent of commentary about China's currency collapse and the imminent and/or occurring collapse of the international economy.
If there's anybody with some yuan on hand, I'm willing to offer you a heck of a deal. I'll happily give you $72 for your 250 million yuan. I'm taking a bath on this deal, but I like HN that much and I'm willing to cut you a favor.
As an aside, on the subject of writing a browser from scratch, I once had a meeting with my technical director (many jobs past) in which the proposed solution to some oddities in the Qt web browser widget of the day (this would have been around early 2010s, using Qt 4.8.x, I think) was for us to write our own. Apparently this was a basic, simple task that was commonly set in introductory programming textbooks, and should take me a half-day or so to get something basic running.
I pointed out that when Netscape decided to rewrite their browser, with all the knowledge they had of how browsers work, they spent three years doing it, and that was a decade and a half previously when the web was orders of magnitude more simple.
I sometimes wonder how out of context he was. Or I was? What did he think a browser was? Were we speaking at massive cross-purposes? Did he mean we should grab some other web engine and find a way to use that? Even so, a half-day to get something going? And just what introductory programming textbooks was he reading?
Where was I going with this? Somewhere along the lines of how "write a browser" clearly can mean massively different things to different people, or maybe that there can be an enormous gulf of context and understanding there somewhere. To this day, I still don't know. Never will.
There are essentially six pieces to a browser: a platform support library, a graphics rendering platform, a networking layer, the HTML/CSS rendering, the JS VM integration, and the browser shell on top of all of it.
Getting a first cut of really basic HTML rendering--essentially saying, here's a string that's X color and Y font, display it--is probably doable in a day if you have robust implementations of everything else. I have to imagine your director thought that doing HTML rendering was "all" you'd have to do. Of course, what makes building browsers especially hard is there is very tight integration between all of these different components, so that you have to maintain all of these pieces.
Perhaps he meant "write an app that uses an HTML rendering widget that also has the networking components built in"?
In the old days of Chrome you'd occasionally see WebKit engineers griping about how Chrome was taking all the credit for just repackaging WebKit. I remember wondering about this at some point and noticing the code was roughly 50-50 Chrome/WebKit in terms of size (which is a fraught measurement always but hopefully gives you the idea). To be sure the HTML-rendering part of a browser is a central piece of it, but the Chrome part included stuff like v8, the Windows port of WebKit, the network stack, the multiprocess architecture, all the browser widgetry like tabs, bookmarks, and the fancy URL bar, and so on. So I guess even for people who are close to this it's hard to say what making a browser entails.
This isn't a misunderstanding, but a deliberate lie by RedCore. RedCore actively and specifically stated they weren't based on Blink (Chrome's rendering engine, derived from WebKit, derived from KHTML).
Classic - he mentions not wanting to rip off state funds and government agencies multiple times. Thats exactly what he did though ;) I hope this isn't the last anyone ever hears from Chen Benfeng - "The special expert of the National Thousand Talents Program”.
First of all, good luck to the newly launched YC China.
I'm shocked with that much funding, this startup would choose to either or both a) plagiarize, b) falsely advertise, and they didn't even do it well. I'd say the effort is worth $36 without the million.
Both of these actions (plagiarism, fraud) have ethical and legal implications, but it sounds like they are getting away with this by admitting to the public what they did.. That makes me think the investors were already aware/supportive of the whole stunt.
Is this what the startup scene is like in China? I certainly hope not.. but still, it will take heck a lot more innovation from this company for people to ever trust them again.
Someone did the same thing during the dotcom bubble with Microsoft's media player. They pretended to have a new, revolutionary media player technology (which was actually just a skin), and raised ~$18m on the back of that. It all got vaporized, there never was a real product underneath.
I wouldn't chalk this particular instance up to anything more than loose capital ending up in fraudster hands, as occasionally happens when it's sloshing around to such a degree as it is these days.
Such frauds happened in China for many years, Chinese CPU, Chinese virtual machine, people in China cheats government for money for reputation all over there. Why they succeeded? Because all these frauds involved by officers in government.
Apparently the same is true of their "fully homegrown" 3G cellular network standard. According to this [1] TD-SCDMA, is really an implementation of a failed European standards proposal by Siemens.
Things is not as simple as it looks. Some Chinese say the founder of 'Redcore' is officiallings. There cound be some
collusion between the referee and the athlete, when he get his fundraising.
"The company announced that in the latest round of fundraising it had raised a cool 250 million yuan ($36) from investors that included government agencies."
I want that too.
Just if someone else need their national browser too - I am here with my Sciter (https://sciter.com) - it is an independent implementation of HTML/CSS and universal Web browser can be made from it with 6-9 months ETA.
Oh so in essence this is so root of all those annoying ugly ass anti-virus UIs that make it impossible to take them seriously in any way whatsoever. ;)
What about Maxthon? I remember trying it back in the day and it was pretty decent, better than IE of the time, anyway: https://en.wikipedia.org/wiki/Maxthon
IIRC, it uses the Trident rendering engine, but all the browser UX and chrome is custom. Most browsers are wrapping webkit today, does that make Opera and Safari clones of Chrome? Not sure.
> does that make Opera and Safari clones of Chrome?
Umm, Webkit spun out of Safari, so that would make Chrome the "clone" of Safari.
Which is rather your point. Chrome has made a lot of changes to Webkit over the years, and these days appears to be putting more effort into it than Apple is.
Implying that WebKit somehow stalled because Google forked it into Blink is silly. Apple and Google are both investing heavily in their browsers, just with different priorities. Doesn't take more than just looking at the WebKit blog to see that.
Down votes because "China" is a country of 1.4 billion people and not a single hive minded unit. Also this was clearly a simple scam to rake in investor money, they just told people what they wanted to hear so they'd throw money at them. Has never happened in the west huh?
Besides this cliche was said for the US (back when it copied European inventions in the 18th and 19th century to bootstrap its industry) and Japan in the 60s and 70s (which started by copying western products).
You contradict yourself: at least 50%+ of things you purchase with your hard earned money is made in china. I suppose you dont purchase anything useful then.
Where did this one claim to not be based on Chromium? Homegrown can just mean "the UI and core behavior parts" not not using any third party libs (including rendering) at all.
> At the same time, on the company's official website, the Red Core browser was also described as "breaking the US monopoly, China's first independent innovation smart browser core."
They clearly sold it as their own rendering engine, not just a UI shell. Although I guess due to vague wording it wouldn't necessarily preclude being a fork of Blink.
How is this an issue? When Chrome started, it was based on webkit as well. They've since forked webkit but they did come from a clone of an existing engine.
(Also, after seeing the below 350-line function that's part of a 3113-line file, I now know that whenever I'm yelling at CSS layout behaving weirdly, there's someone with a much, much more frustrating job.)
https://github.com/servo/servo/blob/master/components/layout...
EDIT: for anyone who doesn't know, https://servo.org/ is Mozilla's ambitious project to rewrite their browser from scratch with concurrency thought in from the beginning, supported by Rust's unique approach to safe concurrency. Parts of it have already made it into Firefox: https://bholley.net/blog/2017/stylo.html