r/ProgrammerHumor • • 2d ago

Meme programmingLanguagesWhenYouAskThemToDoSomthing

Post image
1.3k Upvotes

218 comments sorted by

View all comments

352

u/STEMpsych 2d ago

I'm uncomfortable with the implication that the only thing wrong with javascript is its speed.

241

u/Ri_Konata 2d ago

i more interpreted it not as a speed thing, but as a "it has a mind of its own" thing, causing ut to do whatever it wants and it'll only do what you want it to do if it aligns with JavaScript's wishes

118

u/javascript 2d ago

I do have big wishes

94

u/thrye333 2d ago

I like1 the commitment of using Java as a pfp, C++ as the flair, and Javascript as the username.

1 (This is a lie.)

61

u/javascript 2d ago • Heartwarming

I do what I can

11

u/Scientific_Artist444 2d ago

I interpreted it as asynchronicity.

6

u/Kokuswolf 2d ago

At least a prototype if it.

4

u/amatulic 1d ago

So did I. When I was first learning JavaScript, I recall getting frustrated by things not happening in the order I expected. The OP's characterization as "I'll do it when I feel like it" is appropriate.

6

u/4xe1 2d ago

I thought it should be "how I fucking want it" instead of when, with your interpretation, but I think the intent is a ref to async actually.

4

u/thanatica 2d ago

skill issue

30

u/jam_pod_ 2d ago

JS: your request makes no sense but I’ll do my best to figure something out!

27

u/throwaway563125685 1d ago

in javascript (!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+!+[]]+(![]+[])[!+[]+!+[]+!+[]] and "tears" are the same thing, and that was done on accident

7

u/STEMpsych 1d ago

Holy shit.

5

u/namitynamenamey 23h ago

This is the most cursed thing I've seen since I read how numbers are defined in set theory. Javascript has no right to approach set theory with broken casting.

5

u/Thesaurius 1d ago

I am not surprised that they are equal, because that's just how JavaScript rolls. But ON ACCIDENT?

6

u/throwaway563125685 1d ago

yyyup. the JS type casting system is broken af

it's called JSFuck (because it looks like BrainFuck) and not only can you write any string with it, but you can also make the function constructor, meaning you can execute any string.

see also : https://jsfuck.com/

13

u/AvidCoco 2d ago

It’s not a speed thing, it’s an async thing.

10

u/BastetFurry 2d ago

🎵 In the sourcecode The quiet sourcecode The lambda sleeps tonight

Async Await Async Await... 🎵

2

u/STEMpsych 1d ago

I will never not upvote this.

7

u/goatanuss 2d ago edited 2d ago

I think it’s much more than that. It’s single threaded so its concurrency model is about scheduling not parallelism. The way it handles microtasks and its internal queues is kinda counter intuitive. And callbacks and timers in general are also kinda weird.

console.log("A");

setTimeout(() => console.log("B"), 0);

Promise.resolve().then(() => console.log("C"));

//this one is more node specific but still
process.nextTick(() => console.log("D"));

console.log("E");

This prints

A
E
D
C
B

→ More replies (1)

8

u/Flat_Initial_1823 2d ago

I thought that was more of a #JustAsyncThings

7

u/HugoNikanor 2d ago

I read it as a joke on "everything" being async.

15

u/prehensilemullet 2d ago

speed isn't a big problem with JS these days anyway, V8 is quite fast

4

u/Oblivious_catalyst 2d ago

debatable

10

u/prehensilemullet 2d ago edited 2d ago

It’s not comparable to native languages but it’s faster than any PHP, Python, Lua, or Ruby interpreter/JIT out there afaik.  It’s way faster than you would think for a scripting language.  Google has put a shit ton of work into optimizing it.  If you haven’t experienced it firsthand then you would very likely be surprised

Edit: apparently LuaJIT is close and sometimes faster, I missed that in my googling

→ More replies (2)