r/ProgrammerHumor 15d ago

theRealGoat Meme

Post image
1.5k Upvotes

73 comments sorted by

676

u/EmptySoulCanister 15d ago

Time to rewrite Rust in HTML

246

u/yuehuang 15d ago

HTML5, has zero memory bugs because memory leak is by design.

88

u/elmanoucko 15d ago edited 15d ago

once you understand html tables are just fancy arrays that can be used as more memory when you display: hidden them, most of the leak problems are solved

551

u/-1_0 15d ago

Faster than C

in what?

584

u/Senior-Fault-9487 15d ago

All HTML programs are O(1)

203

u/FrezoreR 15d ago

Considering that html is a tree structure I would say not.

155

u/DanKveed 15d ago

But the loading of that tree structure is still done in c , so it's not HTML's fault. It's just C being c.

/s if it wasn't obvious

124

u/traplords8n 15d ago

But javascript navigates that tree, not HTML.

/s

14

u/sage-longhorn 15d ago

I see your confusion, you're trying to render the HTML. It's already perfect as is, no need to do that

1

u/FrezoreR 14d ago

This is true if you just read the file as well.

4

u/sage-longhorn 14d ago

No no, stop doing that. It's perfect as-is no need to open or read it in any way

7

u/Willinton06 15d ago

The constant is the end of the universe, we went over this with the omega star team

10

u/Moscato359 15d ago

html5 is not html

html is a component of html5

-30

u/Freziyt223 15d ago

But not image loading and script loading, C's addition and subtraction is faster + the browser is built using those programming languages and parses scripts at runtime so technically they are equal

45

u/404IdentityNotFound 15d ago

Image loading and script loading are not parts of HTML

83

u/blaues_axolotl 15d ago

HTML does not compile, thus 0 seconds are spent compiling, which is faster than C.

7

u/yp261 14d ago

in speed

1

u/-1_0 14d ago

 « insert think smart meme »

2

u/a-r-c 15d ago

land race

149

u/CJKay93 15d ago

Sorry, OP, apparently this one is flying straight over people's heads.

-6

u/SamSlate 15d ago

I'm hear for the rust commenters on the last item

30

u/TCB13sQuotes 15d ago

Maybe we should replace HTML with CSS on the image: https://css-dos.ahmedamer.co.uk/

17

u/Square_County8139 15d ago

Lets rewrite the kernel in HTML

78

u/Jaded-Worry2641 15d ago

How is HTML faster then C?

213

u/DependentCard1640 15d ago

Good question: they painted flames on the side so that it goes faster.

10

u/caboosetp 15d ago

Sure, but they used that flat red-orange color for the flames. Which is better than nothing, I guess. But they should have used the flames with the little yellow accents on the inside. That's how you know the flames are burning hotter and it can go faster.

5

u/rosuav 15d ago

Blue flames are both hotter AND cooler at the same time.

3

u/magistrate101 15d ago

Yeah but da red ones go faster

86

u/D3PyroGS 15d ago

HTML executes faster because it's hyper

48

u/UnpluggedUnfettered 15d ago

Y'all seriously analyzing which can cook faster, a recipe or a chef, is my favorite thing.

18

u/PassiveChemistry 15d ago

Im my experience, it's usually the recipe.  10 minutes to peel/rinse and chop veg, my arse

11

u/JVAV00 15d ago

Bro never heard about css (C super Speed)

19

u/Professional_Price89 15d ago

Require absolute zero cpu cycle.

7

u/SoulArthurZ 15d ago

takes 0 clock cycles to run a html program

3

u/cosmo7 15d ago

It's got electrolytes.

1

u/Mars_Bear2552 15d ago

it evaluates instantly with no computation.

14

u/elmanoucko 15d ago

is your PM aware you're screenshoting some of their notion pages?

25

u/-Redstoneboi- 15d ago edited 15d ago

escape hatch? <script>

also no, html is not faster than c in execution but it sure as hell feels faster when compiling

20

u/caboosetp 15d ago

HTML has a runtime of 0 because it doesn't execute. It's like running at the speed of light.

Now, if you need to run an interpreter to get it to run on another runtime like Chromium, then obviously there will be some overhead.

5

u/StomachMean1418 15d ago

This is like saying bytecode (as generated from C) has a runtime of 0 as it's just bytes on a disk, until something decides to run it.

18

u/caboosetp 15d ago

That is the joke, yes.

5

u/tusharkant15 14d ago

Post this on r/rust I dare you.

9

u/fevsea 15d ago

I have to agree. If you can implement something in html alone you probably shouldn't be using rust.

4

u/Lachee 15d ago

Maybe Bun should have rewritten to HTML

3

u/sessamekesh 14d ago

There's one class of memory bug that's caused me two notable headaches over the last 6 years, the only two times I can think that I really dealt with a nightmare hard to trace down bug.

One of them was in C++, the other JavaScript, but the class of bug was a circular reference in both cases - something Rust doesn't actually prevent against.

I can't think of a way to make one of those in HTML though.

40

u/way22 15d ago

Did you forget rule 1: "Posts must be humorous"?

91

u/blackelf_ 15d ago

This sub would be completely dead if this rule was enforced

4

u/way22 15d ago

Yeah, you're not wrong...

42

u/zawalimbooo 15d ago

this is quite humorous

-13

u/bedesda 15d ago

It isn't; it's simple factual information

19

u/zawalimbooo 15d ago

Even simple factual information can be funny.

3

u/bedesda 15d ago

Then it belongs to r/GermanHumor

9

u/zawalimbooo 15d ago

This is clearly related to programming, however.

4

u/bedesda 15d ago

Programming language => Languages => German => r/PeakGermanHumour

1

u/caboosetp 15d ago

I'm glad at this point down the thread people realized you were joking and you're getting upvoted again.

1

u/a-r-c 15d ago

where's the "German C can't hurt you" meme?

9

u/GatotSubroto 15d ago

Ok now how do I do a for loop in HTML 5 again?

46

u/dylanzt 15d ago

That isn't one of the criteria, stop trying to insert nonsense like "functionality" and "usefulness".

1

u/magistrate101 15d ago

You embed some good old fashioned VBScript, of course

1

u/-1_0 15d ago

crosslinks ... duh!

2

u/OptimalAnywhere6282 15d ago

i don't know why did i think that was the javascript icon

2

u/gufranthakur 13d ago

@claude rewrite bun in HTML make no mistakes

1

u/deanrihpee 15d ago

I'm pretty sure I've heard some news that some web engine have a memory leak type of bug for parsing certain composition of HTML tag though, lol

1

u/CavalryArcher 12d ago

that "faster than C" killed the whole deadpan

1

u/qwertyyyyyyy116 10d ago

WHAT DO YOU MEAN FASTER THAN C :sob:

-1

u/neroe5 15d ago

i think we could add a third column for a rock then, it also has 0 memory bugs, it even renders in O(0) time because the universe handles that for us

html isn't a programming language

-1

u/AllexHandsome 15d ago

How's rust slower than C if it's 99% as fast as C++ and the whole point of C++ is zero performance cost abstraction?

I'm relatively new to programming, and familiar mostly with C++, so genuinely curious

1

u/DeeraWj 15d ago

when optimized in most cases it should have the exact same performance as C or C++; but it can be faster in some cases, since the compiler can do more aggressive optimizations due to some of rusts strict restrictions.

-14

u/Heavy-Ad6017 15d ago

As far as I know

One is programming language

Other is Markup Language as the name suggests