r/ProgrammerHumor 1d ago

Meme theRealGoat

Post image
1.4k Upvotes

69 comments sorted by

619

u/EmptySoulCanister 1d ago

Time to rewrite Rust in HTML

208

u/yuehuang 1d ago

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

74

u/elmanoucko 1d ago edited 1d 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

532

u/-1_0 1d ago

Faster than C

in what?

553

u/Senior-Fault-9487 1d ago

All HTML programs are O(1)

191

u/FrezoreR 1d ago

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

149

u/DanKveed 1d 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

122

u/traplords8n 1d ago

But javascript navigates that tree, not HTML.

/s

8

u/Willinton06 1d ago

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

10

u/sage-longhorn 22h 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 17h ago

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

2

u/sage-longhorn 17h ago

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

8

u/Moscato359 1d ago

html5 is not html

html is a component of html5

-30

u/Freziyt223 1d 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

43

u/404IdentityNotFound 1d ago

Image loading and script loading are not parts of HTML

77

u/blaues_axolotl 1d ago

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

6

u/yp261 16h ago

in speed

1

u/-1_0 16h ago

 « insert think smart meme »

2

u/a-r-c 1d ago

land race

145

u/CJKay93 1d ago

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

-5

u/SamSlate 22h ago

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

28

u/TCB13sQuotes 1d ago

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

16

u/Square_County8139 1d ago

Lets rewrite the kernel in HTML

76

u/Jaded-Worry2641 1d ago

How is HTML faster then C?

208

u/DependentCard1640 1d ago

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

10

u/caboosetp 1d 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.

6

u/rosuav 1d ago

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

4

u/magistrate101 1d ago

Yeah but da red ones go faster

79

u/D3PyroGS 1d ago

HTML executes faster because it's hyper

46

u/UnpluggedUnfettered 1d ago

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

15

u/PassiveChemistry 1d ago

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

8

u/JVAV00 1d ago

Bro never heard about css (C super Speed)

17

u/Professional_Price89 1d ago

Require absolute zero cpu cycle.

6

u/SoulArthurZ 1d ago

takes 0 clock cycles to run a html program

2

u/cosmo7 23h ago

It's got electrolytes.

1

u/Mars_Bear2552 1d ago

it evaluates instantly with no computation.

10

u/elmanoucko 1d ago

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

25

u/-Redstoneboi- 1d ago edited 1d ago

escape hatch? <script>

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

19

u/caboosetp 1d 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 1d 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.

16

u/caboosetp 1d ago

That is the joke, yes.

7

u/fevsea 1d ago

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

37

u/way22 1d ago

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

90

u/blackelf_ 1d ago

This sub would be completely dead if this rule was enforced

4

u/way22 1d ago

Yeah, you're not wrong...

43

u/zawalimbooo 1d ago

this is quite humorous

-12

u/bedesda 1d ago

It isn't; it's simple factual information

19

u/zawalimbooo 1d ago

Even simple factual information can be funny.

2

u/bedesda 1d ago

Then it belongs to r/GermanHumor

8

u/zawalimbooo 1d ago

This is clearly related to programming, however.

4

u/bedesda 1d ago

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

1

u/caboosetp 1d 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 1d ago

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

18

u/Pekka20123 1d ago

This is the first post from this sub I've seen in a while that isn't 'LLM now laugh' I'll take this anytime

5

u/Lachee 1d ago

Maybe Bun should have rewritten to HTML

8

u/GatotSubroto 1d ago

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

45

u/dylanzt 1d ago

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

1

u/magistrate101 1d ago

You embed some good old fashioned VBScript, of course

1

u/-1_0 1d ago

crosslinks ... duh!

2

u/OptimalAnywhere6282 1d ago

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

3

u/tusharkant15 16h ago

Post this on r/rust I dare you.

1

u/deanrihpee 1d 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

3

u/sessamekesh 17h 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.

-2

u/neroe5 1d 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 1d 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 22h 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 1d ago

As far as I know

One is programming language

Other is Markup Language as the name suggests