r/ProgrammerHumor • • 21d ago

Meme programmingLanguagesWhenYouAskThemToDoSomthing

Post image
1.6k Upvotes

224 comments sorted by

View all comments

371

u/STEMpsych 21d ago

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

249

u/Ri_Konata 21d 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

124

u/javascript 21d ago

I do have big wishes

98

u/thrye333 21d 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.)

62

u/javascript 21d ago • Heartwarming

I do what I can

11

u/Scientific_Artist444 20d ago

I interpreted it as asynchronicity.

6

u/Kokuswolf 20d ago

At least a prototype if it.

4

u/amatulic 20d 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 20d 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 21d ago

skill issue

30

u/jam_pod_ 20d ago

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

29

u/throwaway563125685 20d ago

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

7

u/STEMpsych 20d ago

Holy shit.

5

u/namitynamenamey 19d 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 19d ago

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

6

u/throwaway563125685 19d 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 20d ago

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

10

u/BastetFurry 20d ago

🎵 In the sourcecode The quiet sourcecode The lambda sleeps tonight

Async Await Async Await... 🎵

3

u/STEMpsych 20d ago

I will never not upvote this.

7

u/goatanuss 20d ago edited 20d 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 21d ago

I thought that was more of a #JustAsyncThings

7

u/HugoNikanor 20d ago

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

15

u/prehensilemullet 21d ago

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

4

u/Oblivious_catalyst 21d ago

debatable

10

u/prehensilemullet 21d ago edited 20d 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)
→ More replies (3)