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: Test 2015-07-13 6:02

I am surprised at 2 things, aftyer not being here in more than a year:

1. this server and domain still live
2. this thread is alive

Cudder, you are one heck of a trooper.

Reviewing the thread, I had an epiphany. Knowing that HTML and CSS are shit markup languages, and you are using ASM to build your browser, why not form new methods to represent the DOM values that are their specifications. It'd make for easier parsing and algorithms, by performing new methods of their representations.

Here's one raw example to illustrate my point by no means the one I want implemented:
Element, name, ASM representation, value
Doctype, html , dth , 3000h
doc_attributes, htmllang, dth + lang#, 3200h
doc_attributes, htmlmanifest, dth + manifest(), 3100h
Mediatype, img , mi , 5000h
Mediatype, music , mu , 6000h
Mediatype, video , mv , 7000h

html_content, head , hh , 30f0h
head_attributes, , hha , 30e0h
html_content, body , hb , 30d0h
body_attributes, onafterprint , hbap , 30c0h
body_attributes, onbeforeprint , hbbp , 30b0h
body_attributes, onbeforeunload , hbul , 30a0h
body_element, article , hbea , 30afh
body_element, section , hbes , 30aeh
body_element, nav, hben , 30adh
[...]


You can also use a lattice to represent values that are "unlocked" to quickly output said HTML/CSS values in a codex. You recall old video games that use matrix master passwords, that if the correct AND OR if condition met, it would return said gate or value for the main loop:
e.g.: https://i1.ytimg.com/vi/kE4aJwDhQ94/hqdefault.jpg
0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0

Sample `elements` in doctype->html being used:
3 0 0 7 2 0 0 3
0 7 8 0 3 0 5 0
9 0 0 8 0 2 0 2
3 0 5 0 0 0 3 0
0 1 7 0 0 4 0 0
0 6 0 0 5 0 0 9
5 4 0 0 0 4 0 3
0 1 7 0 0 2 0 0

There are many ways you can re-represenmt the values, and quickly call on the addresses that call the render types for the DOM.

-----
Also, for anyone here, please ignore W3C. They are asshats. WHATWG is doing proper standardizations since '04.

Name: Cudder !cXCudderUE 2015-07-13 6:30

>>639,640
That explains why web apps are so fucking slow... and I hate reading source code because it looks like the shit in >>1. But here, for probably the first time on the public Web, is the complexities of attribute storage in the most common browser engines.

WebKit:
https://github.com/WebKit/webkit/blob/master/Source/WebCore/dom/Element.cpp

A resizable array of unsorted(!) structures. Funny that elements themselves don't have attributes, but a secondary element->attribute hash table is used. Code is disturbingly verbose; just count how many function calls you have to go through from setAttribute to when the thing actually gets written to the array. The resizeable array itself is a bloody verbose mess too:

https://github.com/WebKit/webkit/blob/master/Source/WTF/wtf/Vector.h

Gecko:
https://hg.mozilla.org/mozilla-central/file/eab21ec484bb/dom/base/FragmentOrElement.h

One resizeable, unsorted array in each element that holds both children and attributes, with a bit of weird hashtable-like hybrid thing:

https://hg.mozilla.org/mozilla-central/file/eab21ec484bb/dom/base/nsAttrAndChildArray.cpp

Code feels a bit less verbose and is more readable than WebKit.

Trident (version used in IE4, no public link to source available):

Resizeable unsorted array allocated off end of element structure.

NetSurf:

Doubly-linked, doubly-indirect(!) unsorted list.

Dillo:

No attributes stored in element structure itself! Reparses the markup for every attribute retrieval operation. :facepalm:

tl;dr: O(n) except for Gecko which may be O(1) for some cases ("mapped attributes".)

I'll go with an unsorted parallel array for my browser; it's probably not going to be worse than what's out there already(especially those "lightweight" browsers at the end) and likely slightly better cache-wise to use parallel arrays than arrays of structures.

Next part: CSS property-value storage. There are many more KV pairs on average than with attributes, so I expect to see some different data structures.

Name: Anonymous 2015-07-13 7:54

>>642
*Cudder is all talk and no action*

Name: Cudder !cXCudderUE 2015-07-18 15:54

>>641
I have no idea what you're trying to say but it seems interesting enough. You need to elucidate more.

>>643
Thinking before doing seems to be a skill that is rapidly degrading in the current generation... >>549 is an example of what happens if you just dive in and start writing code with a minimum amount of brain use.

Name: Anonymous 2015-07-18 16:33

>>644
Could you at least document all your ideas and prototypes so far? I want to start contributing to an ASM browser in my limited free-time, but I`m not an EXPERT PROGRAMMER enough to start from scratch.
Make a summarize with everything you have and post a link to it. You could use pastebin if it`s too big for progrider.
It`s just that currently you talk and talk, but we have nothing.

Name: Anonymous 2015-07-18 21:13

Maximize ENTERPRISE SCALABLE SOLUTIONS while minimizing BRAIN USE.

Name: Anonymous 2015-07-18 21:38

>>645
ASM browser
Do you look forward to enjoying the compatibility issues on every other platform?

Name: Anonymous 2015-07-18 22:31

>>647
Yes

Name: Cudder !cXCudderUE 2015-07-19 0:16

>>645
Make a summarize with everything you have and post a link to it.
https://dis.4chan.org/read/prog/1321853871
http://bbs.progrider.org/prog/read/1406427616

Everything interesting enough about it I've been posting in the previous thread and this thread. If you don't have enough of an attention span to read them, you don't have enough of an attention span to write a browser in Asm.

Name: Anonymous 2015-07-19 1:02

>>649
Not that guy, but could you give us the highlights of those threads and which information is still relevant? Thanks.

Name: Anonymous 2015-07-19 1:51

>>650
Not Cudder, but could you learn to read? Thanks.

Name: Anonymous 2015-07-19 2:12

>>651
That same guy you replied to, I just want to know what from those threads is still relevant today.

Name: Cudder !cXCudderUE 2015-07-19 5:12

>>652
Everything?

Name: Anonymous 2015-07-19 13:44

https://dis.4chan.org/read/prog/1321853871
That thread was almost 4 years ago. wow.

Name: Cudder !cXCudderUE 2015-07-19 16:08

>>654
August 2011. It was around the time Mozilla released Firefox 4 and started the ridiculous version number race with Google that I realised how horribly user-hostile and mindlessly oppressive browsers had become and it was necessary to do something about it.

Here's the current roadmap:

- HTML parser/DOM generation (pretty much done)
- CSS parser (currently working on)
- CSS box generation and attribute computation
- Renderer
- Network/UI/Misc
** public-domain release **
- JavaScript? WebGL? ...?

Name: Anonymous 2015-07-19 16:38

>>655
Could you make the public-domain release before the UI?
Others could use the core of the browser engine to write their own UIs.

Name: Anonymous 2015-07-19 23:08

>>656
No one will and you know it. It may come out one day that Cudder is a tranny\donated money to have Hitler cloned\wants to integrate SystemD and there will be lots of outrage and 666 forks, but those will die off in less than a week and everyone will forget about them and keep using his release.

Name: Anonymous 2015-07-20 20:14

It's too big a task to keep the browser safe. It takes an incredible amount of effort to find and eliminate security holes. To code a browser in assembly would probably make it even more unsecure than other browsers. By the time the browser is in beta phase, you probably have to run it sandboxed anyway, and that eliminated all the benefits of it.

Name: Anonymous 2015-07-21 0:27

Name: Anonymous 2015-07-21 0:46

>>659
cool story bro?

Name: Anonymous 2015-07-21 6:57

>>659
Do people really think they have no direction if they learn multiple languages?

Name: Cudder !cXCudderUE 2015-07-21 10:43

>>658
Actually, no. If you're worried about buffer overflows and such, I've probably spent more time thinking about the lengths of things when designing this in a day than most C developers have in a week.

Of course if you eventually decide to use this browser with plugins like Flash and get pwned because of an exploit in that, it's not my problem... I don't blacklist or whitelist, I let the user decide. Freedom > security.

Name: Anonymous 2015-07-21 21:32

I started a thread here to see if anyone would help Cudder.
http://board.flatassembler.net/topic.php?t=18379

PeExecutable is a pick. If anyone want to take over the discussion, the password for the account is QBc7#PF_T-qAjI7(c9
I'm out. Good luck.

Name: Anonymous 2015-07-21 22:22

PLUGIN MY ANUS

Name: Anonymous 2015-07-21 22:30

>>663
I'd gladly help Cudder to cuck her husband.

Name: SATANIC TRIPS 2015-07-21 22:36

SATANIC TRIPS GET

Name: Anonymous 2015-07-21 22:50

>>663
Wow that thread sucks. I'll take "Who are you quoting" and the rest of you niggers any day over that cancerous garbage.

Name: Anonymous 2015-07-21 23:01

>>663,665
I'd gladly help cudder to punish her daughter!

Name: Anonymous 2015-07-21 23:05

>>663
Wow, it worked.

Name: Anonymous 2015-07-21 23:14

@PeExecutable
Shalom, kike!

@typedef
Who the fuck are you quoting?

Also, this thread sucks. I'll take the niggers of progrider.org any day over that cancerous garbage.
Whoever did this, you could at least post the truth about homosexuals and atheists. That would be a useful ban, unlike this one.

Name: Anonymous 2015-07-21 23:24

>>668
Lewd!

Name: Anonymous 2015-07-21 23:35

>>663
Wow, they just immediately had a really long winded and pointless discussion about gamedev that was also devoid of anything interesting. Like, a discussion they put a lot of effort into. Those are some long fucking off topic and boring paragraphs. And then when you bring that up, they shift the blame on you. Like it's your fault they are such boring assholes. ``You should have have written the OP a different way.'' Blah blah blah. Then everything else they say is completely useless. What a toxic group of boring people. If I could punch them in the face like the barbaric nigger I am, I would.

Name: Anonymous 2015-07-21 23:59

>>670
I deleted it.
typedef is cool, the issue is the fuckers talking about game-dev all of a sudden on cudder-browser's thread. Off-topic bitches.

Name: Cudder !cXCudderUE 2015-07-22 5:07

>>663
Copying my posts, complete with the few typos, is not helpful. They were intended to be read by those already familiar with /prog/4chan culture, not random users somewhere else.

Besides, I don't need any help at the moment and the whole browser will likely not be in Asm; only the lower-level parts.

Name: Anonymous 2015-07-22 13:47

>>674
Sorry, I only wanted to help.
I'm ashamed, Cudder-sama!

Name: Anonymous 2015-07-22 21:29

Please forgive >>675-kun Cudder-sama! I don't want ze to commit sepuku!

Name: Anonymous 2015-07-22 23:18

'>ze

Epic!

Name: Marisa Kirisame 2015-07-23 1:10

Requires the /Ze option.

Name: Anonymous 2015-07-23 2:13

>>678
OrdinaryMagician?

Name: Anonymous 2015-07-23 11:13

>>679
He is Cudder's second personality.

Newer Posts