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-11-16 7:27

>>257
Define a container that can hold several types of elements.
Define a fold function that works on several types of containers.
Can C do that without C "macros"?

Name: >>6 2014-11-16 9:25

>>258
Define a container that can hold several types of elements.
Like struct (and maybe with a enum "tag" and a union if you want to save space) or a void *.

Define a fold function that works on several types of containers.
http://bbs.progrider.org/prog/read/1403675318/10
Surely there are more examples.

Can C do that without C "macros"?
Yes as you can see.

Name: >>259 2014-11-16 9:26

I am not >>6, I have no idea how that >>6 was there.

Name: Anonymous 2014-11-16 9:48

>>259
int fn(void *, void *)
No automatic dispatch on the type of the container. Also, type-unsafe shit. Might as well use Lisp instead.

Name: Anonymous 2014-11-16 9:50

>>259
Also:
if (fn(&bp[i * size], arg) == 0)
bp[i * size]
This implies that the container is indexable and, what's worse, contigious. How are you going to fold/map a tree then? C is useless.

Name: L. A. Calculus !jYCj6s4P.g 2014-11-16 10:10

>>261,262

No automatic dispatch ...
DIS AINT UR FUCKIN TAXI SERVICE YA FLASHY PANTS RETOID, DIS IS PROGRAMMIN. IF U CANT HANDLE IT, GO RUN CRYIN 2 MOMMY

This implies that the container is indexable and, what's worse, contigious. How are you going to fold/map a tree then? C is useless.
ARRAYS R DA DATATYPE OF C. IF UR EVEN THINKIN ABOUT DOING UR FLASHY GOOTCHY FUNCTIONAL PROGRAMMIN SHIT WITH UR CUTE TREES N BUSHES U SHUD STAY DA FUCK AWAY FROM C N GO BAK TO BITCHING WITH DA OTHER LADIES ON ##programming ABOUT WICH LANGUAGE IS DA MOST /fa/

N STOP ASKIN TEENAGE GIRLS 2 DO DISGUSTIN SHIT, YA FUCKIN POOP SCOOPING RETOID. ALL DEY WANT IS A RIDE HOME, NOT TO FULFILL UR DISGUSTING KAWAII SAFARI HENTAI FETISHES.

Name: L. A. Calculus !jYCj6s4P.g 2014-11-16 10:11

O YEA, N GET DA FUK OUTTA MY THRED

Name: Anonymous 2014-11-16 10:19

>>262
You can easily modify it to work with any data structure.

Name: Anonymous 2014-11-16 10:59

>>263
Actually, even C++ has std::accumulate which is a generic fold. And C++ is hardcore, painful Sado-Masochistic programming just like you love. So C is a useless archaism even among the imperative posse. You should retire and watch Santa Barbara, gramps, not read the internet.

>>265
No, I can't.

Name: Anonymous 2014-11-16 11:03

>>266
Well, you can't, but other people can.

Name: Anonymous 2014-11-16 12:04

>>267
Only via macros which are bug-ridden, ad hoc implementation of generics.

Name: Anonymous 2014-11-16 16:16

You might be interested in this for your HTML engine:

https://ocharles.org.uk/blog/posts/2014-11-11-memo-html.html

Self-Memoizing HTML Rendering via Mutually Recursive Data Types

Name: Anonymous 2014-11-16 16:57

>>111
>>222
LUDICROUS TRIPS

Also sweet hexadecimal dubs, >>255-san, >>256-san.

Name: Anonymous 2014-11-16 19:01

>>262
You'd have to write a map function for trees (as you would for C++). Fold can be done using the visitor pattern.

Name: Anonymous 2014-11-16 19:38

>>271
So it would be a separate function specifically for trees? C is useless.

Name: Anonymous 2014-11-16 20:50

>>272
So you want to call a function but you don't want to know which one you're going to call?

Name: Anonymous 2014-11-16 20:50

>>272
Everybody uses C. Huskel? Who's that?

Name: Anonymous 2014-11-16 21:14

>>271
visitor pattern
Shalom!

Name: Anonymous 2014-11-16 21:26

>>262
Pass another function pointer as argument that each time it is called it will show the next element to be folded.

Name: Anonymous 2014-11-16 22:16

>>272
It's also a separate function in C++. They just look the same when you call it.

Newer Posts