Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

Why browsers are bloated

Name: Anonymous 2014-07-27 0:20

https://github.com/WebKit/webkit/blob/master/Source/WebCore/platform/Scrollbar.cpp
https://github.com/WebKit/webkit/blob/master/Source/WebCore/platform/win/ScrollbarThemeWin.cpp
Let's reinvent the fucking scrollbar, which every goddamn platform with a UI already has, and make it behave subtly different from the native one!

Right-click a native scrollbar in some other app:
- Scroll Here
- Top
- Bottom
- Page Up
- Page Down
- Scroll Up
- Scroll Down

Right-click a scrollbar in Chrome:
- Back
- Forward
- Reload
- Save As...
...

Right-click a scrollbar in Firefox and Opera:
Absolutely fucking nothing happens!

What the fuck!? How did these terminally retarded idiots get involved in creating one of the most important pieces of software to the average user?

Name: Anonymous 2014-07-29 23:03

>>10
uzbl?

Uses WebkitGtk+ for rendering

Now look at the links in the OP again... all these stupid "minimalist" browsers are just a different UI with the same existing bloated rendering engine.

Name: Anonymous 2014-07-29 23:50

>>11-kun speaks the truth
luakit is better, but still a shit
We need something new

Name: Anonymous 2014-07-30 1:14

>>12
luakit
webkit based browser framework

Name: Anonymous 2014-07-30 4:01

>>11,12
What's so bloated about the rendering engine? Did you want a HTML engine that only supported HTML4 and CSS2?

Name: Anonymous 2014-07-30 4:08

HTML and CSS are bloated.

Name: Anonymous 2014-07-30 6:30

>>14
I want a rendering engine that doesn't reinvent scrollbars, for one thing.

Name: Anonymous 2014-07-30 8:07

Why do these idiots blabber about how a rendering engine is so terribly complex and monstrously huge? Why is rendering a web page any harder than rendering an app GUI? It's all just text and rectangles. OK, there also SVG and Flash, but there are plugins for that. Why can't anyone just take GTK or Qt and make a browser out of it?

Name: /lounge/ 2014-07-30 8:51

>>17
The rendering engine needs to interpret every piece of element within the HTML page. It also has to keep track of every element within each web page. This means your rendering engine has to keep track of a lot of information as well as render that information. If you want an example of the complexity of rendering documents with many individual elements, try looking at the source code of Scribus and have a look at the data of a Scribus document.

Name: Anonymous 2014-07-30 11:56

Chrome is even worse - the minimise/maximise/close buttons are actually bitmap images! (http://src.chromium.org/viewvc/chrome/trunk/src/ui/resources/ )

They've also been reinventing the scrollbars too; it looks like WebKit uses the native drawing routine for scrollbars, but Chrome wants to reimplemnt that itself: http://my-chrome.ru/2014/01/about-scrollbars/ (from right to left: natively drawn scrollbar, Chrome-drawn half-broken scrollbar, Chrome-drawn slightly-less-broken scrollbar.)

>>17,18
They're complex because the monkeys who write them are doing it wrong. I've been (slowly) working on a CSS box renderer and the code is actually quite simple and straightforward once the algorithms have been figured out.

The big rendering engines are written by large teams with deadlines so there's necessarily the whole OOP bloat (all the ways to make software easier to write for large loose teams but creates ridiculously inefficient enterprisey designs: "separation of concerns", "information hiding", etc.) and less time spent thinking about the simplest way to do something, which also adds to the complexity.

On the other hand I'm working alone and not trying to make any deadlines, so I can spend as much time as I like thinking about how to design this thing and have it as monolithic as it needs to be. For example, the document is tree-structured so it seems to suggest a lot of algorithms are going to be recursive; I also thought at first this would be how the line layout (including wordwrap) should be done, but then realised just how much state would need to be passed around and that doing it recursively seemed far too complex.

If I was someone working as part of a team on a project with a deadline, I might've just accepted the complexity at this point, maybe even tried to hide it behind a design pattern (which just makes things worse overall!) or made several classes, and wrote the code. This is how most of the existing rendering engines (and the bulk of software) was written.

Instead I thought about it more and realised that recursion is not the best way to do it - the boxes do form a tree structure, but recursion isn't needed to traverse them and calculate linebreaks since that requires a more linear view of the data. I ended up with an extremely elegant and simple algorithm based on a few loops and pointer following. It can't be written without using goto either, so a more traditional programmer probably would've never figured it out. The implementation of the core traversal and linebreaking decision is only a few dozen machine instructions.

Rendering a document is overall a complex task, but if you can consider all that complexity in large pieces, and condense them into a simple algorithm, then the code does not need to be complex. In contrast with the traditional notion of breaking problems into simpler pieces and then combining them together to create a more complex whole, I'm taking complex pieces of the problem and combining them together to create a simple whole. It's somewhat like procedural generation in the demoscene.

Let's make this thread the continuation of http://dis.4chan.org/read/prog/1321853871/

Name: Anonymous 2014-07-30 13:12

>>19
Can you post the code? I'm interested in your solution and a low-resource browser.

Name: Anonymous 2014-07-30 13:19

>>18
How is this thread for /lounge/?

Name: Alexander Dubček 2014-07-30 14:03

<style type="text/css">
dubs {
check: always;
}
</style>

Name: Anonymous 2014-07-30 23:08

>>21
Sorry, I forgot to deal with my thread redirection service.

Name: Cudder !MhMRSATORI 2014-07-31 12:00

>>19
That was me. Name field somehow disappeared...

>>20
Here's most of the interesting part (non-recursive CSS box tree traversal.) Linebreaking is just looping through the text, updating the break positions and width as you go, and splitting upwards when the line becomes too wide. There are some special cases like font-family: monospace and white-space: pre/nowrap/pre-wrap that probably don't need examining every single character. The upward-splitting code is also non-recursive, it's another big loop. Then the x/y is adjusted appropriately to the next line and the algorithm continues exactly where it left off - no "backtracking" or wasted work.

; esi = cur_y edi = cur_x
; ecx = avail_width
; edx = last_bkpt linebreaking info
; ebp = containing block box
mov ebx, ebp
xor esi, esi
line_loop:
call set_widths ; sets edi and ecx
mov ebx, [ebx+cssbox.first_child]
or ebx, ebx
jz done
loop1:
mov al, [eax+cssbox.type]
cmp al, CSB_TEXT
jnz not_text
; <code omitted>
not_text:
cmp al, CSB_INBK
jnz not_inbk
call cssbox_extw
add edi, eax
cmp edi, ecx
jb check_sib
cmp [ebx+cssbox.prev_sibling], dord 0
jz check_sib
; <code omitted>
jmp loop1
not_inbk: ; CSB_INLN
call cssbox_lncaw
add edi, eax
mov eax, [ebx+cssbox.first_child]
or eax, eax
jz exit_box
mov ebx, eax
jmp loop1
exit_box:
call cssbox_rncaw
exit_loop:
add edi, eax
check_sib:
mov eax, [ebx+cssbox.next_sibling]
or eax, eax
jz go_up
mov ebx, eax
jmp loop1
go_up:
mov ebx, [ebx+cssbox.parent]
cmp ebx, ebp
jnz exit_box
done:


For comparison, the wordwrapping and box traversal algorithm in WebKit is, I think, somewhere in here... or maybe spread across many of the other several dozen files in the directory: http://trac.webkit.org/browser/trunk/Source/WebCore/rendering/InlineFlowBox.cpp

And for your amusement, here is a WTF I found in the HTML parser:
https://github.com/WebKit/webkit/blob/master/Source/WebCore/html/parser/NestingLevelIncrementer.h

Name: Cudder !MhMRSATORI 2014-07-31 12:05

Also noticed WK uses floating point for positions!

Who thought that was better than fixed-point? No one needs webpages several billion pixels high...

Name: Cudder !MhMRSATORI 2014-07-31 12:07

s/mov al, [eax+cssbox.type]/mov al, [ebx+cssbox.type]/

Name: Anonymous 2014-07-31 12:15

>>19
If I was someone working as part of a team on a project with a deadline, I might've just accepted the complexity at this point, maybe even tried to hide it behind a design pattern (which just makes things worse overall!) or made several classes, and wrote the code. This is how most of the existing rendering engines (and the bulk of software) was written.

While it's fantastic that you've found an elegant solution to parsing and rendering HTML pages, the rest of the world generally doesn't have the time to work as you do. This is why open source corporate projects (like any other corporate software project) take the worse is better approach to programming - "if it runs well enough then we can ship it". Maybe if you write a web log detailing your solution together with your analysis of the Gecko engine, you could send a notice to the Mozilla engineers who might pick up a few ideas to put into Gecko.

Name: Anonymous 2014-07-31 13:02

Name: Anonymous 2014-07-31 15:24

>>26
Shalom!

Name: Anonymous 2014-07-31 17:10

>>28
It's not open source quality, it's Apple quality. With closed source it would be the same except you wouldn't be able to see and appreciate the beauty of ENTERPRISE SOLUTIONS.

Name: Anonymous 2014-07-31 18:41

>>27
In a corporate environment, it's much easier to appear productive when you're furiously banging away at a keyboard and producing lots of code. The guy who just sits there thinking doesn't look like he's doing anything. That's why you get shit like classes containing a single variable and two trivial methods, because "I wrote ten classes today" sounds like you're getting a lot of things done while "I added a few variables and functions" doesn't. I don't work for Apple but a lot of other places love to use metrics like SLoC to measure productivity, which ends up encouraging this WTF-ery.

>>28
adjustmentForChildrenWithSameLineHeightAndBaseline
It's like I'm really reading Java!

Name: Anonymous 2014-07-31 21:06

>>31
It's clear and descriptive of its purpose. There is no better way to clearly describe such a complex idea short of inventing a new word to describe it.

Name: Anonymous 2014-07-31 22:35

>>31
The guy who just sits there thinking doesn't look like he's doing anything.
"I wrote ten classes today" sounds like you're getting a lot of things done
The volume of code output doesn't matter so much as progressing through the list of specifications in the world of business paid programming. A 50 line procedure that is functionally equivalent to a 200 line procedure doesn't matter to anybody but programmers. If the 200 line procedure was quicker to reason and write, that's what's getting shipped.

A thoughtful programmer who spends all day to remove 30 lines of code from the codebase (in order to make the logic cleaner) is less productive than a workhorse programmer who spends all day going through sections of the specification with masses of code - the brute force programmer is actually making progress and software stakeholders value this more than clean code. This doesn't mean that all progress is good progress. Progression without a reasonable amount care can lead to various software and development problems in the future.

The world of programmers for hire is a balancing act that leans towards people who achieves the most within the smallest amount of time.

Name: Anonymous 2014-08-01 2:57

>>33
If the 200 line procedure was quicker to reason and write, that's what's getting shipped.
Your arguments is fallacious, because larger codebase impedes maintainability in the long run. I.e. saving $1 today can easily cost you $10 tomorrow. It is like debt, with only difference is that you can borrow more to repay current debt.

Name: Anonymous 2014-08-01 6:06

>>34
debt
Shalom!

Name: Anonymous 2014-08-01 7:27

A web browser could easily be implemented with just few lines of bash/awk/sed/curl. There's no way to justify the millions of lines of code that are in modern web browsers.

Name: Anonymous 2014-08-01 8:51

to justify is to be an ~idiot~

Name: Anonymous 2014-08-01 10:40

6 000 000 source lines of code

Name: Cudder !MhMRSATORI 2014-08-01 12:18

>>27
The amount of time I've spent on this algorithm in total probably does not exceed a day at most; I'm normally very busy with other things. I don't think "worse is better" applies here, since that usually leads to much simpler designs which don't handle particular edge-cases well (e.g. Unix), instead of grotesque complexity.

>>31,32
If you ever find yourself needing to describe such a complex idea, you should probably reconsider your approach. From a quick glance it appears to be for moving boxes up/down depending on vertical alignment, something which the code manages to make extremely bloated despite it being a very simple idea:

1. Collect the maximum height of all the boxes on one line, while laying them out; this will be the line height.
2.a Top-aligned boxes don't need to be moved.
2.b Centre-aligned boxes have (maxHeight - height)/2 added to their y-position
2.c Bottom-aligned boxes have maxHeight - height added to their y-position

The WK code expresses this too, but it's far more obfuscated and probably traverses the box list many more times than necessary - there's a function to do the first step mentioned above, but it traverses the whole box list. If layout has to traverse the box list already, why not compute the maximum height at the same time? The monkeys will spout things like "modularity" and "encapsulation", because they were so brain-damaged by their religious adherence to OOP dogma that they don't realise it's extra work both for them to write extra code, and the machine to execute it. They might also cry "premature optimisation", but this isn't any clever optimisation, it's common sense. To think otherwise is like driving to the store and back for each individual item you buy - absolutely retarded! Anyone sane wouldn't ever think of doing such a thing, yet put them in front of a computer, indoctrinate them with OOP religion, and this is what they'll do.

>>33
I don't see how using excessively verbose code with tons of needless indirection/abstraction and mind-numbingly-long variable names is in any way more productive. The same goes for reimplementing basic UI functionality and creating trivial classes - it's busy work, useless time-sinks to give the impression of being productive.

http://en.wikipedia.org/wiki/Muda_(Japanese_term)

Name: Anonymous 2014-08-01 13:07

>>39
Shalom!

Name: Anonymous 2014-08-01 13:23

Hey Cudder, is it true that you are a girl?

Name: Anonymous 2014-08-01 14:11

>>41

Xhe is halfway beetwen it

Name: Anonymous 2014-08-01 19:15

I always wonder why there are no more browsers using Firefox's rendering engine other than Firefox itself. There are a half-dozen webkit browsers. I don't like webkit. I wish there was something like luakit but with Firefox's rendering engine.

Name: Anonymous 2014-08-01 20:05

>>43
They stopped allowing other browsers using it or something, I guess they mixed the firefox and geeko code

Name: Anonymous 2014-08-01 23:45

>>44
Tons of browsers using Gecko besides Firefox:
http://en.wikipedia.org/wiki/Gecko_(software)#Usage

In the past, Gecko had slower market share adoption due to the complexity of the Gecko code, which aimed to provide much more than just an HTML renderer for web browsers.[19][20][21] Mozilla's engineering efforts since then have addressed many of these historical weaknesses.[22]

The Gecko engine also provides a versatile XML-based user interface rendering framework called XUL that was used extensively in mail, newsgroup, and other programs. Another reason for much of the complexity in Gecko is the use of XPCOM, a cross-platform component model.[23] However, its use has been scaled back.[24]

If Webkit is supposed to be the simpler alternative, I don't even want to know waht Gecko code looks like...

Name: Anonymous 2014-08-02 1:09

>>41

anal sex doesn't make you girl.

Name: Anonymous 2014-08-02 2:03

>>39
I don't see how using excessively verbose code with tons of needless indirection/abstraction and mind-numbingly-long variable names is in any way more productive. The same goes for reimplementing basic UI functionality and creating trivial classes - it's busy work, useless time-sinks to give the impression of being productive.
I don't think you completely got my point. I'm saying the world of paid programming values productivity a lot more than they value optimal design. Programmers who produce verbose code that achieves the specifications within a shorter timeframe are valued higher than programmers who take longer to produce optimal code and design. I'm not judging the value of this being good or bad, I'm just saying that this happens.

The same goes for reimplementing basic UI functionality and creating trivial classes
I am not the designer of Chrome and I cannot give any rationale why they chose to work this way. I can only assume they had a good reason to specify this as a feature.

Name: Anonymous 2014-08-02 2:45

>>47
I'm not judging the value of this being good or bad, I'm just saying that this happens.

You're trying to have your cake and eat it too. They're apples and oranges. Don't play sour grapes just because someone cooled your jets off.

Name: Anonymous 2014-08-02 4:27

>>48
You need to reduce your use of figurative language. I'm having trouble comprehending your message.

Name: Anonymous 2014-08-02 7:03

Name: Cudder !MhMRSATORI 2014-08-02 12:07

>>45
Gecko code is actually not as verbose and thus easier to read, despite there being far more of it; I think this is the equivalent of the WK InlineFlowBox above:
https://hg.mozilla.org/mozilla-central/file/a4f779bd7cc2/layout/generic/nsInlineFrame.cpp
https://hg.mozilla.org/mozilla-central/file/a4f779bd7cc2/layout/generic/nsBlockFrame.cpp

Theres's also a lot more comments.

>>47
Programmers who produce verbose code that achieves the specifications within a shorter timeframe are valued higher than programmers who take longer to produce optimal code and design.
Code needs to be input, and verbose code takes more time to write - even when using an IDE that autocompletes 40-character-long variable names. Verbose code also comes from overly complex design, which leads to writing more code than is actually needed. The total time spent on design and implementation is likely more than an approach of creating the simplest design that works, and writing the minimal amount of code to accomplish that.

Name: Anonymous 2014-08-02 17:32

>>51
Shalom!

Name: Anonymous 2014-08-04 6:23

>>41

Would you cuddle the cudder?

Name: Cudder !MhMRSATORI 2014-08-04 11:58

More insanity, this time from the Mozilla side:
https://bugzilla.mozilla.org/show_bug.cgi?id=630181

Put the complex quadratic-time text-wrapping algorithm of TeX into a browser? What the fuck!? I'm going to bet that 99.999% of browser users out there don't give a flying monkeyfuck about justified text. Just count up the number of spaces in each line, divide the width remaining by it, and add that to each one. Done. Fast and simple and good enough.

Name: Anonymous 2014-08-04 12:19

>>54
Shalom!

Name: Anonymous 2014-08-04 13:19

>>54
Firefox is a modern web browser, and that is a good idea. I don't know if it will be implemented but I think it will, eventually.

Name: Anonymous 2014-08-04 15:18

>>54
The person who filed that bug is not a developer and it's evident from the comments that the developers themselves don't badly want to implement it. Granted the Mozilla developers did seem to think that implementing a pixel accurate PDF engine using HTML5 canvas was a good idea...

Name: Anonymous 2014-08-05 7:59

>>54
:-/
I am so mad now

Name: Cudder !MhMRSATORI 2014-08-05 11:42

>>56
I bloody well hope not! How much energy (human and machine) needsd to be wasted on figuring out [i]where to split a line of text[/i}!?!?

In fact I am used to systems that do not even tr
y to split at whitespace. If the available width
is x columns wide, they would just split the li
ne at that position, no exceptions. Easy and com
pact and really not so hard to read if you're us
ed to it, but I don't think the majority will li
ke this, so for my browser I will compromise on
an algorithm that doesn't split words, but is no
t any more complicated than that.


When people read webpages, their primary goal is to consume the content, the information (no matter how vapid it may be.) The majority of them are not there to gawk at the linebreaking or font rendering, so any added complexity there for small improvements will be imperceptible and wasted for almost everyone. Don't even get me started on the idiocy of "smart" quotes, ligatures, and all that other extraneous shit.

Name: Anonymous 2014-08-05 12:56

>>59
Shalom!

Name: this shit it old 2014-08-05 14:51

>>11-14
Walk the thread, we've discussed netsurf, links2, jumanji, dillo, etc.. Cudder might enjoy Dillo.

If you still don't get it, stop using, supporting, and advertizing the larger market shares of web browsers.

>>36
So you are saying we should use Elinks, or adapting it with the cURL library? You still need to render colour. Unless you are seeking doing it VT100 max colours.

Name: >>10,61 !2l1ZW3Z9JI 2014-08-05 15:04

>>19
Shit, my old post are there. It's been 2 years. It feels so long.

Name: Anonymous 2014-08-05 15:30

Cudder, We need to open a gitlab to share code. I've been wanting to do this all my life:
This is also going to be the web browser that puts YOU in control. Per-site/per-domain/per-path settings for security and privacy; a UI that doesn't treat users like idiots by hiding everything;
http://dis.4chan.org/read/prog/1321853871/127

Do we use that tor-fossil repo we have here somewhere?

Name: od says 2014-08-05 17:00

the web has faaar grown out of control

really, how open is a protocol if you need a team of hundred programmers to implement it?

what is needed is a reset, a reboot to a more simple protocol. of course this will never happen but lets entertain the idea nonetheless.

a protocol that cannot be implemented by a programmer in his spare time over a week is not open, OKAY?

so let's go back and think about why all this shit has to be so complex, aside from encryption, does it really need to be? do we even need HTML anymore? haven't we LOOONG crossed the point at which it would be economical to just send images over the wire?

Name: Nice Squares 2014-08-05 17:02

>>64
it would be economical to just send images over the wire
Back to the imageboards with you, mister.

Name: Anonymous 2014-08-05 17:04

>>64
HTTPS is fine for it's multiple uses.

HTML needs to be done away with. ASCIIdoc or orgmode should be the markup standard. Images are fine. Animations are best suited to video now.

Name: Anonymous 2014-08-05 23:57

Name: Anonymous 2014-08-06 1:21

>>67
What's the point of a terminal app that isn't light on resources? Mad 1337 cred if you set it to green text?

Name: Anonymous 2014-08-06 2:33

>>67
http://acko.net/blog/on-termkit/

This is everything that's wrong with programmers today. They see something they find just a little difficult, and build an insanely complex system to replace it with an even more arcane set of rules and behaviour.

Name: Anonymous 2014-08-06 4:33

>>67
Node.js
Unix has bad usability
Stopped reading this shit. The author should go stick a broomstick up his anus.

Name: Anonymous 2014-08-06 5:51

>>67-70
The big problem I see with TermKit is the lack of a unifying concept for its interfaces. Unix terminal applications aren't powerful despite the shitty unstructured nature of byte streams; they're powerful because byte streams are easily mungeable. Layering HTTP and JSON over that just adds new complexity for applications to deal with (News flash! Not every application is a web app!)

People in the 70s and 80s also tried to make everything fit their preferred structured data paradigm (at the time I believe it was mostly records) and they failed then, too. Serialization formats come and go but the pipe marches on.

Name: Cudder !MhMRSATORI 2014-08-06 10:42

>>63
At this point it would probably be better to share ideas only.

>>64
really, how open is a protocol if you need a team of hundred programmers to implement it?
Maybe you don't. That's what I'm trying to do - find simplicity in complexity.

a protocol that cannot be implemented by a programmer in his spare time over a week is not open
Depends on what it does. There's justifiable complexity, and there's extraneous complexity. The former is fine, the latter is the problem.

>>67
:facepalm:

>>71
they're powerful because byte streams are easily mungeable
They expose the full power of letting the application interpret data as it wants to. The complexity and annoying failure modes of trying to enforce a type on the data make it a stupid thing to do - remember resource forks on old MacOS and the typed (text, binary, record, etc.) files used in old mainframe systems? Not surprisingly, they disappeared.

Name: Anonymous 2014-08-06 10:53

>>72
Not surprisingly, they disappeared.

Not entirely, they're just better hidden now.

Name: Anonymous 2014-08-06 11:46

>>72
Shalom!

Name: od says 2014-08-06 14:06

>>67
termkit seems like just more shit piled upon shit. really the opposite of the way to go imo.

>>72
simplicity? about how "open" the web is and from the looks of it, a few years from now everything will be unspiderable SPA's which only works in the last version of the big 3 "evergreen" browsers. And you'll only be able to ever find anything using one of two different search engines. they got us by the balls mate. you need big teams, big infrastructure, to even get started.

Name: Anonymous 2014-08-06 23:43

>>75
As far as I am able to tell this is the goal of the big three browser implementors. Not versioning standards like HTML5 can only make sense if you don't plan on anyone else ever implementing your "standard".

Name: Anonymous 2014-08-07 2:52

why does shitfox use rdf?
i read https://developer.mozilla.org/en-US/docs/RDF_in_Mozilla_FAQ but i could not understand a thing.

Name: Anonymous 2014-08-07 2:56

Name: Anonymous 2014-08-07 8:04

>>78
Basically, if you know CLOS, it's a half-arsed implementation of CLOS. RDF's are bookmark objects that can be printed and shared among lisp images.

Name: Anonymous 2014-08-07 19:13

>>72
At this point it would probably be better to share ideas only.
Why, you are publishing it soon? I really want to do the domain controls, cookie and temp file requests, esp. certs handling.

Unless you have that done already. CSS, I rather do something else, like Xlib instead, even Cairo.

IMHO, I want to ignore HTML5, ans just go with WHATWG.

Name: Cudder !MhMRSATORI 2014-08-08 12:50

>>75,76
That's why we need a new browser, one that isn't controlled by some large organisation, one which is compatible enough to view most information-oriented sites, maybe even some app-sites like YouTube or Fecesbook. Then figure out how to market it so that it appeals to the masses, making it spread widely. Encourage forks and customisations (it should be public-domain), so we might have several dozen different versions all based around the same core, but with subtly different UIs, extra features, etc.

This will be what can start the revolution - when the "web developers" realise that almost everyone's browser is slightly different, and that everyone likes their version because of their differences and is unwilling to change, hopefully this will make them more focused on content instead of styling, reduce unnecessary use of features for the sake of using them, and lead to a more accessible Internet for all.

Chrome gained marketshare because it was faster, easier to use in some ways, and still displayed existing pages well. What will be the "killer feature(s)" of The Next Browser? Being smaller and faster, completely pubic-domain and open-source, and easy-to-use but also powerful UI is what I'm thinking of.

The issue of search engine replacement is a whole different can of worms, let's not open that one here. Create another thread for it if you want.

>>77,78
RDF: Retardedly Demented Format.

>>80
Quite the opposite, actually; this is more like a thinking exercise with some coding involved, than the other way around - as discussed above, it's more important that you think and plan the design before writing any code. Since I'm targeting Windows, you might be more interested in thinking about writing efficient UIs on Linux with a minimum of dependencies - Xlib/Xt/Xaw does look like a good path to take.

Name: Anonymous 2014-08-08 13:06

Ha, remember when firefox was the lean fast browser? You know, back at version 1.

Name: I know! Make a new standard! 2014-08-08 13:29

>>82
I was about to reply that to >>81. She is describing the Mosaic NetscapeFirefox pretty damn well. How many gecko browser are there?

Marketing is what made Chrome today the highest market share.

Name: Anonymous 2014-08-08 16:01

>>83
She

Shalom!

Name: Anonymous 2014-08-08 16:10

>>81
Shalom!

Name: Anonymous 2014-08-08 23:08

>>84
Shalom!

Name: Anonymous 2014-08-08 23:22

>>85
Shalom!

Name: Anonymous 2014-08-09 0:19

>>81
I don't see how a simpler implementation can succeed on its own merits today. People will not switch to a new browser unless it is bug-for-bug compatible with their previous one. Gecko only succeeded because people began to move away from ActiveX. WebKit only succeeded because because Mozilla did not subsequently introduce many (any?) extensions of their own that saw wide adoption. I'd wager that WebKit/KHTML was fairly simple as well in the early days...

Bloat is the price of victory. This observation is applicable to other software as well.

Name: Anonymous 2014-08-09 0:23

>>88
Software for quality users instead of for the inferior low intelligence masses. Or just create software for you by you.

Name: Anonymous 2014-08-09 8:58

What will be the "killer feature(s)" of The Next Browser? Being smaller and faster, completely pubic-domain and open-source, and easy-to-use but also powerful UI is what I'm thinking of.

The next browser? mate by the looks of it you can just start thinking about the next protocol. Not even the nuttiest nut is going to be able to go without a client that renders his bank apps and does Flash. If we're to get in there it has to be from the side.

We need something in between IRC (decentralized, data oriented, native UI, "instant") and the Web (application oriented). With a strong focus on privacy and security. We can build this platform on top of HTTP for all I care but HTML5 has gots to go.

Name: Anonymous 2014-08-09 9:38

>>90
The protocol doesn't need to be built on top of HTTP. Just about everything can be sent over HTTP, so the final result can be layered on top of whatever you like.

What do you mean with native UI? No matter how you sensibly define it, IRC and the Web either both have it or both don't.

Also, the Web is not application oriented. Actually, the fact that it was never meant for this EPIC WEB APP shit is pretty much the biggest source of problems right now. It's questionable whether applications like that are actually desireable, anyway. With proper authentication and communication, most vital ones could be reduced to simple requests.

Name: Anonymous 2014-08-09 9:53

>>90
decentralized
SHALOM!

Name: Anonymous 2014-08-09 17:52

,:::::,...;;;:::::::,,,,,,::::::,::::;;::;::::::::::::::,::;;;:::::::::;:::::::::::::::::::::;;;;::;;::::::;''':;;;;;;;;;;:::::,,::::::,,:,:::::,::::,:,:::``:;;;;;;;;::;;::;::;;::::::;;:::;;;;;::
,:::::,,..,..,,,:::,...,,:::;,,..,;:::::::::::::::::::,,:;''';::;;;;;;;::::::,:::::::;:::::::::;;;::;;;::::;;;;;;;;;;;:::::;:::::::::::::,::::::,::;::::::..,;;;::;::;:;;;:::::;,,,:,::;;::;;:::::;
,;:;:,:,,,....,.,.......,,:::,.``,::::::::,::,:::::::,:;''';::;;'''+'''';;:;:,:::::::::;:::;:::;;;;;;;;;::;;::;;;;;:::,:;:;;::::::,,:::::::::::::::;;;;:::.,;:::::,::;;;;:;::::::,,,,:;:::;+'';;;::
.:;;;::,,::,,,...``.,,.,:,,,,,.`.::::::,::::,,::,:,,,:;;;;;:,:,,::;;;;;;;:::;::;:;::::;;;;;';:;;;::,,,:;;;;;::;;:::::,,:;:;:,::::::::;::::::;:::::,:::,,::::;;,.,,,:;:::::;;;;;;::::,,::::,:;'''';:
`.;''';;;';;;;:,..`.:,,:::::,,,.,;;:::,::::;::::::,.,:::,:;;::::,.::::::::::::::::::;:;;'';;;::;;;,,,,:;;;;;::::::;;:,:;;;:::;::::::;;:;::::;::::,,,,:,,:;:::,.`,:::::,:::::::;::;;;:,,:;:,,,:;;;':
`,:'''';;'';;'';;,..:,,,,,::,::,::;::,,:::;;::;;';,.,:;::::::;;:,`.::,,::::;:,,:::::;;::::;;::::;,:::,,,:;;;;::;::;;:::;;:;:;'''';;'''::;:::;;;:::::::::::,:,.,::::;::,;:::::::::;;:;::;;;';::;;:::
,:,:;;;'''+';:;:.`,:;:::,,,,,,,,:;;:::::::;::;''';:::,,::::,:;;;:.,:::,,,::;::::;:::::::::::,,:::,:;;:,,,:;;::::::;;';::::;:::;;'';;;::;;;;;;:::;;::::::;,,;:::::::::::::;:::;;;::::;;::::::::;;:::
;':,::;;'''';;..`.:'';;;,,,:,,,,:,:;:::;;;::;''''':::,,::::,:;;;:,::;::,,,,::::::::::::::::,,::::;;;:;;,,::::::;:::;;::,,,::::::;;;;;;;:;;:;';;;;;;::::::,,::::::::::::,:;';;;;';:,,;::,,::::;;::::
'',.::,:;;;;:.``,:;;';::;,::;;:;,,,:::;';;;;'';';';:;;::;:,:;:::::::;;::::,,,::,::::::::;:,,:::::::::,,::::::::;:::;:::::,,,:::::;;:;;;;:;;;;;'';;::;;:,,::;:::,:;;;;;:,::;;;;;;;;:::::,,::;;;';;:;
:;,.::..,;;,,`.,:;:::::,:;:;;'';;:::::::;;;;;;;;;';:;:,::::;;;:::::;;;;;;::::,,:::::::.,:,.,;;:::::::,,:;:;;::::::,:,,:;:::::;:::;::;:;;:;;;;:::::::::,:,::;;:::;;;;';;;::,:::;;;:;:::;;';;;::;;;;:
:;,,::::,':,,,,::;:;::::::::;;:::;;:;;;:::::;;;;;;::;::::::::;;::::::::;;::::,,::::::,.,:,.:';,,::::::;;;;;:;;;;;:::,,:::;:::::::::;;;;;;;'';::;::::::::::::;::::;''+';;';;,..,,,,,::;;'';';:::;;;:
::,,,,:;,::::,::::::;;:::;;:;;:::::::'+';,,:;;;:;::::,,:;;::,:;;::::::::::::;;,,::::::::,.,;;:,,.,::::::;;;::;;;;:;;;::::;:;:;::;::;;;::;;;::::;;::;:::::::::::::;;'+'''';;;:,...,,,:;;;;;::;;::;;:
::,,.,,,.,::::::::,:,,,::::::'';,:,.,,:;:,,:::;::';::::::;;:::::,:;;::::::::;;;:::::::::,.::::;',.,;::;;;'';;;;:::';;;;::::;;;:;:::;;;::;;;:.:;;;::::::::::;:::::::;;';';;;:;::,....,,::::,::;::::,
:,....,,,,:::,,,:,,,,,::::::;;;,......,.........,,,,..,,,,:,::,::;';;:::::::::;:;;::,,::;;;::::;;,,::;'+';;;;:,;;:;;;;;;;::;;:::;;;;;;;;;;;..:;;:;:::;:;:::;::;;:::::,,:,:;::::::,,,,:;;::::::,,:::
,;.,:,,:::::::,,,,,,:::::::::;;:,,,,,,,,..........,,......,.,,,,..,..,,,,,:::::;;;:.,:::;;;:::::;;,,:;'';;;;:::;;;';;;::;:;::::;;;;;;;;;;:.`,::;::::;::;;::::;:;;::::,::,::;;;;:::::;;::,::,,:,.,,,
:;.:':,,;:,,::..,:::::::::;:::;::::::::;:,':,,;'''+'+++''''';;;;:::,,,:,:,::::;;;;;;;;;;::::::::;;:,:;;;:;;::;;;;:;::;:::;;;;;;;;;';:;;:,,.:;:::::::::::::::::::::::,,:::::::::::::::::::,,,,:::,:,
;:,:'':.;;;:,..,:;:::::,::::::,,;:;;;;;;;;;:::;''++''';''';:,:;;;:;;;;::::::::;::;:::::::::,::;:::::,:;;;;;;;;;::::::::;:;;;;;:;;;;;;:,,,.::;;:::::::,::,,:::::::::::::::;::,:,,:::::::,,:,,,:;;;;'
',.:;;;,,:;;,,,::::::,:,.,,;;:,:;;;;';;'';;::::;''+';;;;;':,.,,::::;:::::::::::::::;:::;:::,:::;;;;;:;;;;;;;;;:;:;;:::::::::;:;;::::::,::;:::;;:;::::;::;::::::::::::,,::::,,,,,:;:::,:::::::::::,:
:,,:;;::..,,:::::::::,::,,:;;;::,;;'';;';;:,:::;';;';'';;;:::::;:::::::,:::::::::::;;;::;;::::::;;'+;;'';'';';;';':;::;:::::;::::::;:,:;;:::::::::::::::::,::,::,,,,,.....````.............,.,..,,,
::::,::,,,,,,,::,::::,:::,,;;::::,,:;''';;:,,:;;;;,::;;;;::::::::::::::::::::::::::::;::::;;:::;;'''+++++'''+:';;;::::;;;;;;:::::::;:,:,:,,:::::::::;;;;;;;;;;';;;;;;;:,:,,...,::;;;;;;:;;;;;;;;;;;
':';,,::::;,,,:,,:::::,,,,::::,:':,,,::';,,,.,';;::;;::::::::;:::::::::;:;:;:::::::::;;;;;;;:::;''++'++++''''+'';::::;;';;;::;;:::,,.,,,,,::;;;;;::;;'''';''''';;'';;;;:;;;;,,:;+;;:,:;;;;;;;;:;:,,
+';::::::::;::,,,;:::,,,::::::::';;,,,,:,`,,.::::::::::;::::::::::::;;:::;;:;;:;:::;''++'++++++++#++#++'+#+#;+'';::,:;:'::,.,,,,..,,,::;;'''';;;:::::::;::::;;:::;:::;;;::::,,,,:,::,.,:;;:;::::,,.
';;;;;:,::,:;+;,,::,::;::;:::;;;;'+':::,``,,::::::::::;::;:::::::::::;;;;::;:;:;;;;+'+'+'+++++++#+++'+'+++'++''++':;;:;':,.,,,,::;::;::,,:;;';::::;;::::::::::::::::::::::;:,::::,,,:,::::,::::::,:
;;;;;:,,,,,:::'+;,,,:;;;:::::;';;;'.,:':,,,:;:::::;;::::;:;::::::::::;;;;;;:;;;;;;;:;'+'++++++'++++++++++++''+''+'';;,;'+'::::::;;;;:::..,::::;:;::::;;::::::::::::,::;;;;;::::::::.::::;::::;:,::;
;;:::::::,,,:,:;';:,,,:;;:::::::::,...,;;::;;;:::;;;:;::::;;:;,:::,,,,:::;:;;;''';;';''+++++++#'++++++'+'++++;+''+;;';;'+;;:;::::::;;::;,,;:::;;;;:;;;;::;;;;;;:::::::;:;';;;::::;::::;;:::::::::::
:::::,.,:,:::,,:::::::,:;:,:,,::::;:```.::;;;;::::;;:::::::;::;::::::,::;';;'''+;;';:'''+#++++++++'+++++'+'+'+'+''''';;'++';::::::::::::::;::::;;;:::::::;;::::::::::::;;:::;;';:::::::::::::;::,,:
;;::,.`.:::;;;;;::,,'';,,,.:::;;;;+',`.,::::::::::;;:::::::::::;:::::::,,:;'''+''';':;'+++'++++++++'++''+'+'''''''''';;+;;+';:::::;::::;;;;::,::;;;:::::;;::::,,:::;:::;;;;;;;:;::::;::::;:::::::,:
;';:,...:;;;':;;;:,,'::;:::::;:::,,:,:';:::::::::;;;;;;::::::;::::;::::::;''+'++;';;;;+'++#''#''+++'+++''++'''';;;;''';'':;';';::;,::::::;;;;:::::::;::;:;;;;;:::::;;;::::::;;;;:::::::,:;:;;;::;::
:;;;;:.`,:;;;;:::,,,::::::;;++:,;:.```::::::::::::;;;;;;;;;:;;;;;:::::::''''+''+'';;;;''';''''+'+''+'++'''''''';;';;'';';;'#'';::::;::::::;;;;::::::::::;''';;;;;::::::::;;::::;::::::::::::;:;;:;;
,,:::::.,::,;:::;';::::;;;'''++'+++;,:;:::::;;;;:;;;;;;';;;::;;;;::::';'''+'+++'++;;'''+'''''+''''''';'''';''+;'';;;;;;';;'+';';':,;::::::;;;;:::::::::,;'+'';'';:;;::::;;::;;;;;;;:::;::;;;::::;;;
,::::::::,,,::,,::'::::::::;;;;:;;'+'';;:;::::::::,::;;';;;;;;;;;:::;;''''''''+##'''';+'+'+'''+'';'''''';''''''''';;;;;;;;';'''';;;::::::::;::::::::;:,:::::;;:::::::,:::::,;:::;;:::,::,:;::::;;;:
:;,.,:;;,,:,,:;:,::;;:`,;:,:::;;;::::::;:;:::::::::::;;;;;;;;;:;;;;;;;'''+'''++##+'+''++''+'''''';;;'''''''';''';;;;;'';;;;'+'''''';:;;;;;;;;;;:::::;;:;;;;;;;:;;:;::::::::,::,:;;::::;;;;::;:;::::
:,,::;';:,,:,..,::;;'` ,';:,;;;::::::::;:;;:;::::::::::::::::;;;;;;;;;;''''++++:;#+'+''+''';'';;''';;';;'';'''''':';;;;;;;;';''''';';';:;:::::;;:::;;;;;;;;;;;;:::;:::::,::::;:::;:::;;;';::::;::::
,,,:;:.:;,,:.``.,;;;.` :'';:;::::::::::;:;;;:,.::::::::::::::::::;'''''+'+'+'@:':'#'''';'''';:';;;;;';''''';;'';';;'';;;;';;';'+''+''';;;;::;:;;;::;;;;;;:;:;:;::;;;;;,:::;;:::,::::::,,,,:::::::::
,.:;:,.:;,:, `,,`.,. `'++'';::;:::::::;;::::,,::::::;::::::;:::'''+'''''+;+++@#':++'++';'';;'''''';';;';;;;;;;;;;;'';'''''';'''''';'';;;;;;::::::;:::::;;;::::::;;;::;;::;;:::;::;:,.,:;:::,,:::::
.`:,:,,,:., `::,`` .;;'';:::;::::::;:;;::,.,,,::::;::::::;::;++'''+''''+++###@'#'''+''';'''''';;;;;';;;;;;'';';''+'''+'+;;'''';;;;;;;;;':::::,:::::,;:::::::;::::;'';::::::::;::.`:::;;::;::::::
`.,...` ..` .;,:.` `,,;;;::::;:;;:::;:;,,...:::::::::::;:::::;#'+''';'''++'###++'+''+'';;'';'';';';+;';'''+''+'''+++++'''''';;;''''';''';;:,,;::::::,:::,:;;;;;;::::;:::::,:::::,.;:::::::;::::,,
..,,,::`.` ``.:.,`` `:::;;;:::::;;;:;:;,..`.:::;:;:::::,,;;;:::#+'+'''';'''''##++'+;+''';'''+'''';+'+'''''+++++'+++++''+'';''''';'''''';';';:,:;;::;;:;::,::;;;:::;:;:;;:::::::::,,;::::;:::;::;;,,
++''++':.````;;.```,;;:;;;::::::;:;;::.`,:;;;:::::;;;:::;;;::.++'''''+'';';'''''++'+:':;';'''+''+'+''++'+'''++++'+++++'++++''+';''''';;;;;;'':;;::::,:::::::,,::::::::;::::::::::,::::::::::::;::;:
;::;::,,``...:.``.,';;;;;::::::;:::,,::;;::;;:;::::;';;::::::;'++;';';;;''''''+++;''''';''';+++++''++++++++'++++++'++++++++'+''+';;;;'''+''';;:::;;;:::::::::::,:..:;:':;::::;:::,:::::;,::::;::;::
` ``....,`::..`.,.:;;:';;:::,,,,,,::'';;::::;::::::::;:;:::::++''''';;:;+++''+'''#''';''''+''+'''+++++++++'+++++''''++++++'+'''+;;+''';''''''';;;;'';;;;;;;:;:;:::...:::::::,:::;;::::::,::,:::;:::
;:......,,;,.`::,..,::::,..,,,,::::;;;;:;::::::;:;;;;:;;::::''#++'+'''+++++'';''++''''+''+''''++'+'++++++';'++''';;'+++++++''+''+';';''''''';'';;::;;;;:::::,,:;.,,,,.,.,,:::;::::::::::::::::::;::
;;;'';:;:;:::,::;;,::,:::::;::::::::;;''';::;::;:;;;:::::;;;++++'';;'''''';;;'+++'''''''''+'''++'+++++++''+''''''''''++#++++'+'''';;;;';';;:''';;:::;;::';::.,,:,:;;;;;;:,.``,,:;:::,:;;:,:::,,,,,:
;'''+:,::',:';;;;;:;;;;:;;:::;;;;;;:::;;;;;:;:::::::::::;;;''++'''''''+'';'+''+++'+''';'++'+'+++'+++#+++'+++''++++++'#+###+++++++';;;;'''''';''';::::::,,..:,,,,::::::::::;:;:;:..,::'';;:;::`..```
;;;;:,,:;;:;::;;;:,.,;::;;:::'+';;;;;:::::;;::::::::;::::;'+++'''''+'';;;;;;'++'+''''''+;+'''+++++++++++++++'+##++'@''++###++'++'''';;';;'';':;'+';;:,,:,..,:;:::,::::::,:;:;;;:::::,:;:::.`....`.`
:.:,,,,:::,,:;'''';.::;:::;;;;+'''+++':::::;;;;;::;::::;;;'+++'''''''''';;''''''';'''''+'''+++'+++#+#+#+++#+++++'''+@@'#+++#++''+''';;;'';''';;;'';:,,:,,:::::::,::,,.,...```.,:.`...`.:`:.:,:';'''
,..,,.,,,..,:;;;:;;::::;;;;::;:.,:'+''';;:,,:::;;;:::;:;;;+'++'''''';;;;''''''+'''''+++''''+'++++++##+#+##'';'++';+'+++###+++'++++''';;;';;;;;;:;'';::::,::::,,....::;:,::,:;::;;';'';;':,::;;:..``
:::,:::;';,:::::,::::,::,::,:::;:;;::;,:::::;;:::::::::::''''';'';'''''+''''++'''''''''++'+'++++#+###+#@@#+'''++'';###+#+#+++''+'+''''';''';::.:;';,:,,.,:;;;;;:;;::::::::;::;:;;;:;;;;:::;;::::;;:
:;;;;;;;:;;::::;,::,,,:::,,,,,::,:::;:` .::::::::::,:::::+''';':'';';'''''+''''++'''''''''++'++++######+##@+''+#''@@@'++#++++'++''+'';:;:::::,::''+';;;:::;.....,,,::::;:::::::;:::::::,::::;:::::;
::::;;::;;;;::,::::,,:::,,,..,,,,::::`` ` .;::,:,::,:::::+''+'';'';;'''';''''';;+'';'''''+'''+'+######@###@#+''#++@+++'++++#+++++'''';;;;'++''+''';:,,::,':::::,,;::,:,.,:::;:;:::::,,:::;:,,::;;,;
,,;;;;;:;::::,,,::::::,,,,,,.,:,;::;:`` ` `,:,::::::::::''+';;;;;;;;;';;'''++'+';;''''''++'+'++++######++#@##+;'+++'+'++++++++++''''';;;'''';;;;''':::.;,,:,::;:;,,:;:;:::;:,:,;;,::;:,:::,,:::,::
:::;''++';:.:.,,:::,:;:::::::;;;::::::``````.::::::::;;::;+'''';;;;''';'+'';';;'';'+''++++++++'++++##+++++++#+###+++''''+++++++++++'''';';''''''';'';;,;;:::,,,:;:,,::,;+';.;;';;':;:;;:;:::::;::,:
::'';;;''+':,::;;::::::::::::::::::::'```,``.,::::::::;;:'''''';';'::;;;+'''''''+''''''''''++''+#+###++'+;+##+++++++';;;'#+++++++++'''';;'';';;;'+''',;:,::::;;::,,::;,;,,:::;;';;;;;,:::,:;::::;;;
;;:;::::::':,:;;:::::::::::::::::::::;;``,``.,.;:;;::;;;;;'''';'';;;+''';:'+'''';'''+++++++''+++'###+++'+#+#''+++'';;;:;;''+++++'+''''''';''';'';;;''+;:::::::;:;;:,:;';;::,,::::;:::::::::::,,:,,:
:::::;;;;:;;;:::::,,,:,,,,,,:::::::;;;':`,:.,,`:;;;';::'''''+;';;''''+;''+;'''''''''''''+++'#++'#++##+'''''++++++'';;;;;;'+++++++'''+''';;;;;;'''';;'+;,,:::::::::::;::'::::::::;,:;;:,;':::,,;';;:
;::;:::::::,,,,,,,,,,,::;:::::::::;;;;;+::#;`,,,:::;:;::''''''+;''';;;;;'++''';;;''';'+'++#:++++;++##+';;''''+++'''';;;;;'+++'++++'''';'';;;'''';;'''';,:;:;;:::::::::::;::;::::::;:::;+';:;'+'++''
::::,::::::,:,,:,,:,,::;;;;;;;::;;,::;;'+;;+,:`.;:::::;;''''';;''';;'';''''++++;,,;'+'''''+++#####+#++;;;;'''''+''';;';;'++++'+++''';''';,:''::+''+:''';:;:::;;:;:::;;';::::::::'::;,::,:::;;'+#+++
';;;::;::::,::,:::::,:;;::::;;::::;;:;;;'':+;'::;::::::;'''+;+';';++:'+++;::':;;;;;;:''+'+'++##+++++++;';;;;'''''''';;;;''''#''''+';';:::;'':,+',''+''';';:::::;;;::;:,::,:;;:;:;;;;;;;:;:;;;;;;:;;
;;:,:::,:,::::,::::::::::::::;:::::::::;:;:''::;;,,:;:;'''';:';;;,:''';;'#+:';;';';;';+'++'+++'++++++'';;';;'''''''';;;;'+'''+++''+';'';:;';'++:,+.+'+'::;:::::;;;;::';:,;:;+;:;;;;;';:::::;;;;:;::
::;'';,:::;:;:::::;:::::::,::;::::;::::.::::;';::::';:''+;;'+#,,;;;'+'++',;'''''';;;'''''++++++++++++'';;;;;'+';;;''';;';'+++++++''''';''',''';+';:'.+';;;::::'+'';:'+;:::;;;;;';:;;;;:;;;:::::;;::
:::;;;:;::::;;:,;;::,,,::::::::::::::::,::::::;:;;;'';','';+,;''+'''''::;+++;'';;'';'+'++''++++++++#+''';;;;';';;''''''''''++'#+'+'';''':'';:+';;';;;;:':;;::;:;;:;;;''::;';';''':;;;;:::;;;::::;;;
;;;::::;,;::::;:::,,,,,,:,,,,:,,,::::,::::,,,:,,,:;';,;''#.'';';''+'',#'''''';'+''++'''++;'+#++++++#''+''':;;':'':;''''''+'+'';+''+'''''+,:'+;+''';;';;.':::::,,,:;;;''+;';;;'#;;:;;;:;;;;;;:::;::;
;:::::::::::::,:;::,,,,,,,,,:,,::,::,,::,,::,::::,:.:';+.'''''';++',:''++''''++''''''++++;#++++++##++''''''';:';';;:,++'''+++++;+''+'''''+;:,#;'':;,';';,;;;:;;;;;:;:;::;;'';;;;;;+';;;;;;';:;:;;;;
::,:::::,.::;:.:,,,:,:,,,,,::::,,,,,:,::,::::,,,:,:;:;,''+''';'''+:'+''++++++'''''+;+'+++++#+#'##+++++'''+';;;;''';;:';+'+'+#+#+'++'+'++;;+:+:.#;;':'''+.'`;;;:;;::;;;;;:::;'';;:;;;:':':';;;;;;';;
:;:::,,,,,:;:,,:,:::,::,,::::::,,,,,::::,::::,:,,:,::,+'+'''++'':;'#'''''++''++'+':;'''+'++'+++#+++++++''':;;;;+;''.,;,''+#'+#++'+'''+'''+,'''+,'';''::'+:+.;;:::,;;:;;;;;;;;;:;;;;;;::;:,;;';;';;'
;:,.,,,:;;::::::,::::,:,,:::,:,,,::::::::,,:::,::;;.';;'''''++',++;'+''+''';+;+',;,'''+;+++'+++++####+'+;+',';;'';;;;.:;'++;++''++'+#;+''++:+:+'',+;;+;,';:;,;;::;;;;:;';;:;;;;;:::;:.'+''';;;;';;'
,.,,;:::::::,,::;:;::::::;:,,:,:,,,:,:,:::::;:;;;:,;;;'+'+'+'+:''+''''+++''#;++`+,+''',+++'++'+++#+#++++'+';:';;';;;;:;.'++++'#+'++;+';''++',#;+;'.'++;;.+;;:,;::;;:::;;::;;;;;:,,:;;;'''::;''';;;;
::::;:::,:;:::::::;:;';::::::::,,,::,::;:;:;:;;:,':;;'+''+++';++;''''+++;'+;#+.+:+++',++++'++'++##++#+#++;';;:;;+;;;:,'.+#;+;#+;++++'''+;';+':';+:',+;''+.;;:;,;:,;;::;,::::;';::'''++''';;;';';;;;
::;;::::::::::::::;;;::;;;;;;;:::;::;::;'';;'';,:;;;;''+'+++'+'++'+''++:''''#.':#''';++#'+;++'++##'#+##'+'::;:;;+;:::,':'+;#+'++'''+;'+:+:;;++,';+':;'''+':;;:;:;:::;;;';;::;;;;;;+;::;;;;;;'';::;;
:;:;;:,::;:::;;;;;'';;;::;:;::''::::;';'';;''';;;;+'''+++'+'+'+'+++'++,+'','.++;+'':;'#'+#'+'#++#+'#;+':'',::;::+;:::.::+#'+++#+;++;@;:+:',::+;,+,+';';;+'',:;;;:,,,::;;;;:;;;;';;:::;;;;:;:'';':;;
,:::;::;::::;;;;;'''+;:::;::,,::;;:::;';;;;':'';;;'''+++'++++++#+++++,'+',:,#+,'''+#'+;+++;#+#'+#''#;#++#+',:;:;+;;::.;;'++;+''+;++'+;+;;++;::++.+`'';;;:;;;::::;:;;;:::;:::;;;;;:;:;:::;;;;;;;;;;;
,,,::;:;;;:::;;;;';:;:::;;::;;;;;;;;;'''';;;;;';;;'''+++++++'++''+++.+#,:,'+''++''+;+++++#:++#;+#'#@;##::;;::;;;';:::.;;;++;+++''''';';;':'+;::'''':;''';;;:;,:;;:,;;::;;;;;;;;;;'';;:;:;;;';;;:;;;
::::,:,:.;;;;;;;;;';;;;:::;'';';'';;;'':;';;;;;';;'+++++'+'++++;''+.++..:+.'':+'+++;#,+++#+++#;'+;@++##;''',;;;;';;::.;,;';,'+;+''';;#;+;'''+'.:':';'''':+;;;;::;:;.;:;;;;;;;'##+';;::;;:;;;;;'':,:
::::::::::''';;;;;::'+;;::::;;;:;';;;';:;;;;;;;;'''+'++''+++++'+';,+':,;'.++#+;:++:;'@+##+#+##;'+'#+#++++';::;;;';::,.'::'+:;+'';'+#;;';'''';;+;'':;,''''.;;;;:,;:;',:;;;:;;;;:'';;;;;+;;;:;;;;,,::
::::::::::::::;';:::;::;;;;:;:::::';';;;;;;;;;;;;'+'++++++'++'''':+;@,''+;++'''####;,+'++###'#'+#++#@'++;'';::;;';;;,,+;;''';;+';++++;':+;;''':#:';'':'+'',;;;:;:',;'::;;;;;'+'';;;';;;:;::::;;,;';
;::::::::::::;::::;;;''''';;';;:;:;;;;:;;;;;';::;++'+;''+++''++++#'#`;++,#++;;;#+.#;@+#++#+#+'+##;++#:#+''+;::;;#++'''+'''+++;+#+###+:''':;'''+:;:';';''''',:;';;;:::.::::;';'';;;;:;;'':'';;;;;;;;
:::::::::,:::;';:::;;;''++'';:;';;;;;;;;::;;;;::'+';++++++'++#+#:++:,+++''+#.;+'@+;,+;+#+#;##++'++'#+;#++''+:;###++++++'++#;'+;'##+++;'+'++'+'';#:+.;+,:''':';;;;,';:;.:;:;;;;';+;;;;';;';;;';';:;;
:;:::::;:::::;;;'::;;;;;;''':;;';;;:;';;';;;:;'+'''++#++'''+'+#`'':`@++++'';';++:@#;#+##+#'@+++'+++++''+'@'+##+#+++++#++'++++++'+#++#''+;++;''';:'`';';''+';.;;;;',''''::;;;;;;''';;;;;;;:;;;;;:;:;
:::::;:;;:::;;;;'+:::;;;;;;;;;;''';';;#++'''';;';''''+'+++'+';:+#,''+'','+#:,+++.:##:#+#+#;##+'+++#+''+@#+++++####+#++#+++#'''+#'++++;#+'+:;'+:';;'';;',;+';':;';;;+++';';;;';;;;;;';;;;::;;;;;;;;:
::;::::::;::;;#'+'+'+'';;;;;'';;';;+++'+'+''''+++''+++++++''##'#.+`++;':+',+`++##''@:#+###+###'+;@##'++#++##@#''#;'';++++:'+''#+#++++''+'';:'''';:;::;':';';;;'';;':+';':''';';'';';;;;:;;;;;;;;;::
::;;;::;;;;::::';;:''''''''''''+';'''''''+++'++'+'';+++''+++#`+`+:+';++''#;+;++++@:@#'#####;##;+@'+'++'++++#''+'#'''';+'''''+'+++####'+++'';;;'';:++`';;,;';'':'''';:'''';;;;;;;;;::;::;,';;;;:;;;:
:;;;;:::;;;::,';+'''';'+++''';;;'+++'';''++++''+++'+''++++++;#.++,'++'+++.#,'+':,+.+#++###+;@#'@#++++'''++#+;'''#''';''';;;;;';''++++''++'+:#';;++;':;;',;';''''#++'+:'';';;;;;+;;;:;:;:::;;;;;:;;;
;;;:;;;:;;;;:;;;:+'''''''+'''+';++'''''+''+++''+++'+++++''+#:,++`.+''+;+#;+:+'+:++.:#++##+##'#+#++'+''++'++''+''#''';;';;;;;;:;:;++##''+++#;+++:'':;,;;';':';:''++++''++'''+'++#+;:;;;;:;;;;;';:;':
;;;;:;;;;;;:;;:;;#+'';'+''';;;;'++'''''#';'+++'+++''++'+#'+,+'+++;;+':+#;#++''+`++.,+++#####'+++#++''''''++'''+'#'''';';;;::::::;'+###;'#+#;+'#+;;;';:;;+:'';+;'''''+':+''';'''':;;;:;::;;;:;;:;:::
';;;;;;;;;:;:;';;++;##+'++';;;;;;''''''++:;++++'+'++'+++++#';++`+++';#'+.';#;#+ ++::##+###+#'#++++''''''''+'''''@'''';'';::,,:,:;''###'+++#''+;'';;+:,;;;:'';;';;'''''+'';;;;:;:;;;';;:;:;;;;:;:;,:
';;:;;::;;;;;;;:;''++'++'''+;;''';';'''++##++++''+'''+'+++,:++'+,++,#+'#++.'+;+.++';+++####@+#++'+';;'''+'+'+'++@'+'''':;:,:,,::;;+#+##;'#+#+;+'+++;:';;;'#';;;''''''';;+;;'';;;;;;';;;;:;:;:::;;':
+';;;;;;;+';;;;;';;+';'''''+'''''''';';+#+'';+'+++++'''+'@`+++.',#:+'+':+#:+'+#,+++;#+#+####+'++';;;;;''''++++++@'++''';:::,::,:;'++#+++++#+++''#'',:;,;'++'';;;'''''''+:+';;:::;;;:;;;;;:;:;;;;;';
+';;;;;;;''';;;;;:;'';;'+''+++''+';;'+'+++';'''''++++++'+`+++:++,,'+'++,'#+#''':+++:+@#+####+;''';;;';;'''++++++@'+++''::,,,,:;;;++###'#++#+#,;''''::':;:';';;;;''''';';'';;:::::;;'':;:;;;;'';;'''
'';;;;;'';:;;;'';;;;'':;''''++'';'''+#++#+'''''''+''+'++';+++:'#;'++++;+++#:'+;;++#:'#++##+++'';;;;;;;;'''+++++'@++++'':;:,,::;;'+++###++'+#+#;:++':;':+;:,+;;;;'''''';'':::::,:;;;;';;:;'''';'+;''
;''';;;''';;'';;;';;';;''';'+++';;'+#+#+++''+'+'+++'+++#:@'+,++''+''''+#+;'++'.'++#;;+#'##++''';;';;';;'''++++++@#+++;;:::,::,;'++#####+#'++#+'##'':;';';'`+''''''''';;;:':;:::::;''++'''++++''''''
;'';;'''';''''';;;;;;;';;;;';;;;;;';'+++'''+''''+'+'++#,.'+#;'+;+++'+',+';#'++,#++#;'@+###+#+'+;'';;;;';'''++#++'++++';:;:::;',:+#####++#+;++##''+':''';'';;'''''';'''';';,::,:;;''''++''''''++'+'+
'''';;';'''+'';''';;;;'';::;;;;:;;;;;''''''+'';''++'++;@'++.'';;#''';#.'+:+'++:#;+@+#;+'#@+#++'+'+;;';;;';''+++++'+'';;;:,,:;;'''+###+'##+;#++#'#';;+'';;'';'';''''''';'';:;'';;;'''+'+'''''+++++++
';:;'''';'''++''''''';;';'';;;;':';;;';''''+'+''+''++++:#++'+;':'+'+'':+',+++#'+.'+#@#:+##+##+'++';;';;;;';;;;'''';;;';;;,::;';;'####+'++;++++++'+';'';:'''':''''';';';''++;++';';'''''''''+''++'++
;;;;;''';''''''''''+'';'++'+';;;''''''';++'''#'++'+'+;',++,''+';'''''#''','+#@++#+##;#++######+'++;';''''';;;;;;;';;;;';;,;;;;':;:###++'#+#+:+++'++:'';;;;;::'''''''';;''+####+++';''''''''+++++'''
:,;;;;'''';;'+++'''++'';''+'''''''''';''++'+#'''+++''+#++++'+'''+'''''##',+'#+++#;##'##;####@##++''''';;'''';;;;'';;;';;;::':;'';+'+#+#+'#@++#'+'++:;;;:''::;;'''';;';;''++#+++#++''''+'''''++'''''
::;;;';;'++'''''''++#'++++++'';'''+'++''''+'+++''++''':+'''''++'';''';+'+,++++#+#+###@+#'######++:+'';;''''''''';;'''';;::;;:;;''+#+#++'#+#+#;'+;;+;'';::;;,;;;;';';;;'''''++'++++++';'+'''''''''''
:;;:;;;;''+'''+++++'++++''''+'''';':;'''+;+;'';;'';''',+'+++'''';+''':#+':'+++#+#####;##'######'+'+''';''''''''''';;;';::;;';;;;++#####;#+++#+++'+''';;;';;;:;:+:;:'''';;'''+'+''''''';'';'''''';''
;'+';;;';''+'++++''+'#+++''++++;''';+''+'++++''';+'''+;+';'''++'+;+'',''+:;#;+++####@@#+#+@####+'+++'';+''''';+;';;';;;::';;';++++++#++'#++#+@;+'++;';':;;:;;:;;';';;;;;'''';''''+'+;''';;;;''';;''
''+'+';;;;;''''+++'#++;#+'+++''+'+'''+++++++''''''''''+'''+'''++;+;+',#;+:++''#'#+##@+:+@+######'++'+'+'''+''';:;;:;;::;'';''++#####+##+++++++;++;'''''':::::;;';'';;'';''''''''';;'';;;''';;;;;'''
;;'''';;;;''+#+'+''++#+++++++''''++''''''+''+'++';''';'''''''+''''+''.+++'##;#@+++###@##+++###@+++'+#++''''';;;:;:::;;:'''''+####++#++++++++#++++;';';';';'':;;;;';'';';';'';'''''';''';'';;;;;;;;'
';+':'';;;;;':++'''''##++++#+';''''';'+''+++'+'''++:;;'+'+'++'''+'+;'.+'+;+++##'#+##+#+++##+#####+++++++++'''';;;::;:;;'''''+####+@++#++++#++''#;+'';;;;'':;';;'';:;'';''++'''''+'''';;;;';;;;;;+:'
';+''+;';'';'+'+''+'+#++'#+#++''+';'''''++++''+'::+';;''''+'''';;'++'.+'+##++##++'##+#++;'#+#####+#+#+++++'''';';;';:;''''++##+#@##+#+++#++++++++;;'';;';:;:;;::;'++'''+'+++'''';';;;;;';;;;';';'';
'#';++'';;''''+''++'+++++++#+++'+++';'''+++';','++';;''''';+;++''''++.+++@'##'#+'+###+@''##+#@########+++++++''+;;;+';''#'+######+#+#+++++'##'+'''''''';;'';:;;;';;;''+++#++#''''';;';;;';;,;;;''+'
,:';+++;';''''''''''#+'''+##+#+#++'';'''''''';'+';+';;;;':+'++';'++'+.+#+#;+#+@++++##++;#+@'@###@######+#++++++''+'+;:+'#+######+#@#+##++++'++';'''''';;';;';,;;:''''+#+++''''''';'';:;:;';:,;'';,;
,:;+'+''';'';+''+;+'#+''+###+++++#+;++;+';;';''';';::''';+''+'#'+''++:++#+;#++@++'+##+#;##''###########++#+''''+''##+'+++@+#@+++#+####@##++'++'''''''';;;''':';;';;'++###+''''';;:;;;;;;;'';'';'';:
:::;+''''''''+'''+''++'+###+++++++''';''++'+'';''''';;';;;;+'++''+++#:++++'+++#'#+;##+#;##@'@+#########++++'+'+'''###+#####@'+++#+#+#####+++++'''''''';';':;:;;::;;'+++++'+'';';;'';:;;;;''''+'';+;
:;::;''''+'':''''''###++##++++++++;;;;+'+++'''''''';''''';'''+;++'''+:++#++##+@:#+;#@+#;###'@###########+++'+'+++'###+#####+++++++++######+''+''''''''';:;:;;;;;';'''''''''''';''''';;;';'';;;';:;:
,:,:::;+++'''+'''++##++###++++''++;';+'++++'''#;';;;'';';''++:'''#;++,#++++'''#;'+'#@+++@###########@####+++''++++#@#+@##@@+++@##+++++###+#+++''''''''';:;;';;;';;:''''+'''''''''''+';;''''''';';''
,::::;::;''''''''++##+##+++++'''+;;''''++';;'';';'';;:'';'+';#;+;;++';++++#;'##;++#'@#+'@+#+########@++##++++'++'+##@+#@###''###++++++#@###+++;'';'';';'';;;';';'::';''''++'''+'+++;+'+'':,,''+++';
::,::::::;'+''';''++##+#+++++''++;';';''';+';'''';''+'';''+''+''+'+'';++++#''+@''#++##''+#+@##@##@#######+++'''#++####@###++@#@#++#+++###+++';'';+'';;;;;;':;';;:::':;'''++'+'#####;+++'+''';'''';;
;:;:'';;:;:;''+''+++#+##+++'++'';'''''''';;+:;'::'+';;;''+':+'''++''#''#'++++#'+:#+#++''##+##############+'+'''++#++#++#####@####+++++++#+'++''''''';;'+'':;;::;;::;;;'+'';;:;;:;+##+'';'+';'+:'';;
,;;;;;;;'';;'+##+'++###++'++++'';''''';''+;'';;+;;,';;;'''''''+''+++#;#++++'+#+';#+#++'#++##############+++'';;+'++++#+####@###+####++#######++++++';;;'';'::;:;::;;;;:::;;;;;;:;:,+''''';;;;:';'';
,:;;;;::;;;;';###+++##++++;::++';+''';;'':;:;'';;;';'';'''''+'+''++++'+##'#@++#+;+##+#'+##+++######@+@##+++'';#++++#+##++#@###++#+#'#+###+#++;;:;;;;;;;;;;;:;;;;;;:::::;:'::::;;;;;;;;;;';;;;';';;;
:'::::,,::;'';+##++++++''::;:::,:::;;:';;;;;;;;:;;;;;;';'+;++++''+++'++#++@#+##+'#+++#'#++@###@+###@#####+';''+'####+#++++#+:'@#+#+++##'';;';;:'+;:::;;;;';;;':::;::;:;::;:;;':;';+;:;:';';.;;';'';
;:'':,::+';:;;+#+#+#;'.,::;,:;:,::::::::::;;::';;;:;;;;';'++'''+'''+++++##++###+#++#++'+@####@+#@+##@#####'''#++##@#@#';;;;;;';+';;;:;:';;;;:::''''':;:;:;;;;:';::;::::::;.::';;:;;:,::'';;'';'+'':
'';;:;;';,;:;;:::,,::,:;;::,;:::::,::,::,:,,::::;;;;;+'';'+++''++++''+++#++#####+###@#'###+##@#++########@#++++####+';;;':;;;;:;;;;:;;;:;';;'+''''';+#;:;:;::,;;:;:;:;;'';;';:;;;;;:;'::::;.:;;;:::
;'''+'';:::::;,,;;;:;;;:;::::,,:::,::::;,,::,:',:,;+';:'':'''++''#+'++'#++++#+########++#:;###;';:;###',::,;';###';;:';;;:;;':;:::;;':';':';;+';'#+;;.;;;;;;::;::::::;:''..:,::,';,,:;::;:::;:;;;:'
,,::::::::;':::;:;;::;:;::'+'+:::::::::::;::,:,::;;,:;;';'''';++;:'+#++++#++++@@@':####'@,;:::#''#';:;:;;;;::;';;:,;:':'';;;':::';;;::;::;;;;;;;;;:::;:;:::;;:;;,,,:;,;:::;:;;;'';';::;;;::::;;:'''
::::,::;;':;;,,:::;;;;;;:;:;,::.:::;:::,;::,::;;;+;;:;;:;;;:::::::':,;;;'::#'',:`,:;@:,:.;,;;,,'#++;;;:;;'::;,.;;',,;:+'''+'+':,,;''+,;'':';:::,::,;;:::;';:::,,::::;::;:::;:,;+'++';;:,::';:;:;;:;
;'';;;::;:;;:::::::;:;::;:''::,::::;;::::;,.::,;;::::;;:;;;;;;::;:':::';;;'. ;;:':;':::::',;::;:;';;;;;;;;;;.,::,;'',.+;';'';','+#'';:;:;;.::.::;:,;:::,::'::,`,,:#':;;::::::;,,`.:::;::':::;;;::;'
';:;;;::;;;:::;::;:;;:;::::;:,,:::::::;::;:;,:;;;::'+::;;.,:::;;;;;::;.;:: #;;:;:;,;';''''+'#+'::;;'':;;:,;:''':+:;;'+;';+'''++;,,:,;';:::;;:;;;,:,::::;;;;':;:;;:::,::;::,:;;;;;:;:,:+:;;:;'';;,;;
;;+;;;':;:;';:;::;::;;;:,::;;:;;;::;::,';;:,;;';;;:;,;::;+;;';;++:::';::::',;;;,;;';:;:;;,:,,,,::,,:'';+ :;+;:;#+,,';;;';+;';;::,:::;:;;;;;;::::.;,:::::;::,:;;;:,:;:::..,::,:;:;':::;::''';:;#::+;
;::,:;;;:.,:';:;;;::;;;:;;;:;;:;;;;:;;':'+:;+,,;,:';;;'+;:;;,:;:,::::;;+;;+,;::;;'''+;;:;::;;';:;'';::'::;';';'''',';+';;+''';;::;;:::::;;;:;:;;,::;:,;:,::;:,',:;:;:;:::;::;::,:::::,;#';;:;;:++':
:;; ;:::;;'':,,,:.:+'::::,::;;;;;;:;:';',,:;;::::::;::``. :;;;::;'::;;';.+,;;;:;;:::,;:;;;:';;''+;:::;,+';;:;;';;'+;';''+@++'':'::;';;.';:::;'.::::;::::';:;::::',::'.:;::::::;;:';;''::;;;;:';:':;
' :;,;::.,;::;:;:,+:;;;::;:,:,,;::;;;:';+'::;;;;:;:;:,;'+#,:'';;;:`;;:;,.:':';:;::;;;;;::;;'+++';;''':;::;;:';+':;:@'##+'+#+;';;::;': :;,:;::,;::,:::;::;::::::'+';::;::::::;,;;;::;;:;:;+';;;:+#+'
;++''':; ;:;:;'';:;:;;;;;;:,,,;;;;:.`,;+';:::;';:;;'';:::,:;;;;:,;:::::';::;;;';::;',';::;;';:;:';;'';'';:;;;'+'+';''#';:;,,;';':;,:::'++;'';';;;:;::,::'::::,, :::::':;;,:::;,':;;::::,:,;####+;:;
::;:;;:;,:;:;::;+::;::,;';::'::'+';';::;;;;':::::''::;;;';,;,,;:;;:';,;;::,;::::::::;;:,::;,,:::;;;'++'++'''::;;;;';':.:,:;:':;:,:::,;;''+;:::;;:;:;',:;;:::;;;:;,:::;:;:'::::',;::;++;,,';,;:;;::;
:;;:;::;',;;;+;:,,,,,..:;;::+';;;:;:;:+;;:;;,;::,,:;,,;;;;;+,;'':;':;:;;:;::;:;,;:::;:';,,;;,::;::;:;;.;'';:':;;;;;;';'.;';#;::;,':::::;;;::;':;;;:';;':',:;:::;,::::.:;::;::,;:`,;:;:;:';;:,++;:::
;;;':::,';;,`.;'+':,`,',,',,.,;;+:;:+'::;;;;;,:;';:;:,,+';:.,::;;,,:;,:,,:::,';;:.:;:::;',,:':;::::;;:''+;:,.',:;+#''+;';,';:;::;:;::;;;,::;:,:,:;:;;;'+:':::,;;:,;:;;;;;;;:;;:;':;;.: ;;;';':;;;,;
,;:,':,:,:+'+;:,;,:;',:':;;;,+';;;;::;;;:':';'+;;:++;',.,;;';#.;:,.,:,::;:;;';;;;;:,;::::;:':;':;::;;':::`:::+::;:,'';;+;',+:#::;::@;:;;;;';:;',,:;:,;,;''::::;;::;::,;.:',::''::;;;:,`,:''';;;::''
:;;.;#,#',:::;:,;:;::::;::::;;:;';;:';;::;;;'':,,::;::,:;::::;.::,:::,;;;;;'',:;;;;:;:;:';;:;:'::::,'+:;+##+;;::,:';:;';;'+;::':::,..;.:::;;.:::';;;'::;;;;'',;:;:,'::;:::::;';::;,,::::;:+:;':;::;
::+`.,;::::;;;:::;:::,;:.:,,,:';;;;;::::+:,'',:,,.,;';:,';:;:;:::,::;;':::;::+:;:';;':;';;;'+;'';:,;;,::,;::',::#,;'';';':;'+,,;,'::::,:';:.,:,;;;,:':;':;;:;:';';;:::,;;:::,::;::,;;,'':':;;;;:;;;
,;;':;::;:::::::;';,;'';:;;::;::,':;,:;:.;,::::;:::;::,':::::;;':;:;::;',;;;:':';;,;':'';;;:;'##+'+'.::;:::::,`,;;;;#;;'+';,+';.,.,;;,,+,,',';;;';';;;';;;;:,,;';;;'::;;;;;:;::,;;:;:++;.;,;+.'#'':
;:;:;;:;;;;;;;;:;;;;,:;;::::;;::;;:'`,::,:,::::;;;';::::;,,:;;,:::;;::#';;';;::;:';:,+;:;;;::;:;; `::;;,:;;+,''';;+;;::,;;;;'''',+:,:.,':.,,::';:;'',:.,..`..,::;';',';;'';';,'+;;;:;.;:',,:;#;:;';
:,::::::::;,.`::;;;:;+,:;;:,;:,::.,;,,.,:';;;;;:;';;:;:`;;,,:::;;:.,':,:;::;;;#:;;'++`:::;;:;::::;;;':';';:;;;::'+;';:;;:::,::+'+,:;;:;;;;.,. ';:;:;'++#@##+';#'';;;'+''';:;;;::;:.,:;::.,,+.:::;::
:,,:':::,,:;::::::.;:;+',:,;::::;':;++;::@'';''+';':;;::,:;;`;;:,.;;,:;::;::::;::;;,;':;;::;::+';';;'';;;:;':;;;+;;;;;:;;:::,:+'+':,,:;;::;::;:,`:'+''++::::'+;:;;;;:''':';;'.::;';,::;,.,':::::::,
.::;::::,::;;:::,.`;;:::;''',;':;;:,,,:'::.;#+++':;;;:;:':::::;:`';';:;;;';;;;,;;:;;::::,:;;:'+;'':+'''+';'++'+#++'#;+;;:::';:;+;+''.::'+;'''';;+':`,;':#,:;::,;;;;;;'::;';:;':;'''';'.,:+;;:::;::;
:;;;,,,::::`::::::::::;::::,:;;;.,:;';;;;;::';';:,:;::::,.;,;::::;;:,;;':;;,:::;:';;:::::;+';;+#'.;@#+++'+++##+#+###;';'';++';:::;;;+,:::;.::::;:,+#''`.:';;';;;:;;;,.::,:+;::;;';:::;.,',;;:'#:,,;


http://gopher.floodgap.com/overbite/relevance.html

Name: Anonymous 2014-08-09 17:55

>>93
Does this mean that I will die? ;~;

Name: Anonymous 2014-08-15 2:32

Name: Anonymous 2014-08-15 16:32

>>95
reinventing the wheel in Rust with GC for added slowdown

Name: Anonymous 2014-08-15 19:52

>>96
you don't have a slightliest idea
just dropping all legacy/compatibility crap could provide _huge_ speedup

Name: Anonymous 2014-08-16 10:18

>>97

I've a big idea: GC is shit.

Name: Cudder !MhMRSATORI 2014-08-16 12:26

>>95
It's a start, at least...

children: Vec<Node>
That's not really the best choice for the DOM tree, as simple as it may look - arbitrary position inserts and deletes, and thus "find next sibling"/"find previous sibling", are going to be far more common than indexing operations.

The article about parsing is just one big facepalm. At least use a state machine for the tokeniser... I see now, this is written in an id10t-proofed language that's missing goto so they have to bend over backwards to do anything truly simple and efficient with it. In the old thread I mentioned I had a full HTML5 parser written in C in a 24KB binary, consisting of 12KB tokeniser and 12KB tree construction. I've rewritten the tokeniser in Asm since then, and it's now... less than one kilobyte!!! At ~70 states, with around a dozen bytes per state on average, maybe that's not so surprising after all.

Tree construction is a bit trickier since the full number of possibilities is basically {text, n types of tags open/close, comment, doctype, EOF} * 23 "insertion modes", but many of these cases are identical so there's a lot of redundancy (e.g. DOCTYPE tokens are basically ignored in everything but the initial IM - considering that 16 tokeniser states are needed just to parse these, it's rather wasteful.) At the moment my tree construction is 66 functions in ~2K lines of C with the bulk of the code being switch()s; when I have the time I should try to shrink that too. Encoding the state data in arrays instead of directly in code might help...

I haven't written any CSS parsing code yet so I'll not make any estimates nor comments on that third article.

Name: Anonymous 2014-08-16 19:16

>>99
Shalom!

Name: Anonymous 2014-08-16 20:08

>>99
but goto considered harmful

Name: Anonymous 2014-08-17 1:16

How to master CS like cudder?

Name: Anonymous 2014-08-17 5:22

>>102
By picking pecks of pickled peppers.

Name: Cudder !MhMRSATORI 2014-08-17 9:35

>>101
Dijkstra considered harmful.

Name: Anonymous 2014-08-17 9:38

>>104
Shalom!

Name: Cudder !MhMRSATORI 2014-08-18 11:24

Figured out another optimisation - DOCTYPE tokens don't need to be handled fully by the tokeniser, that's another dozen states I don't need...

Name: Anonymous 2014-08-18 11:38

>>106

implying removal of features is a valid optimization

Name: Anonymous 2014-08-18 12:24

Browsers are bloated mostly because the layout engines are bloated.
Hopefully, Servo will be good.
https://github.com/servo/servo

Name: Anonymous 2014-08-19 1:09

Name: Cudder !MhMRSATORI 2014-08-19 6:22

>>107
Yes, removal of features from one place and insertion of them in another place where they make more sense. The tokeniser doesn't need to parse the fields within a DOCTYPE, it just needs to figure out where the end of the tag is, which is really easy (but you wouldn't know just by reading the spec) - scan to the next '>'. The fields within it can be parsed at some later point, perhaps even in a different thread. The DOCTYPE is only used for an edge-case quirks-mode parsing decision but the way that's detected in the spec is ridiculously bloated (see http://www.w3.org/TR/html5/syntax.html#the-initial-insertion-mode; all those string constants are bigger than the whole tokeniser I have), so I'll probably end up just defaulting to quirks-mode off and letting the user push a button to toggle it if she feels the page doesn't look right...

Character references (&lt; &nbsp etc.) are another thing the spec tries to put into the tokeniser, but once again it's not necssary to parse them at this point to determine the boundaries between various pieces. Charref conversion can be done when strings get copied out of the input buffer and into the DOM.

>>108
2/3rds Rust and almost 1/3... Python!? The code I glanced at there doesn't look much simpler. Browsers are bloated because the whole thing is bloated. The HTML parser there contains a tokeniser...

https://github.com/servo/libhubbub/blob/master/src/tokeniser/tokeniser.c

...which is a pretty horrific 3kline+ piece of code, much of it duplicated, considering it came from one of the more "lightweight" browsers - NetSurf. On the other hand, Dillo's HTML parser (entire parser, tokeniser is integrated, around 4.1klines) is quite a bit nicer, although I don't know how HTML5-compliant it is:

http://hg.dillo.org/dillo/file/tip/src/html.cc

Newer Posts