r/ProgrammerHumor • • 25d ago

Meme programmingLanguagesWhenYouAskThemToDoSomthing

Post image
1.6k Upvotes

224 comments sorted by

View all comments

371

u/STEMpsych 25d ago

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

249

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

I do have big wishes

98

u/thrye333 25d 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 25d ago • Heartwarming

I do what I can

11

u/Scientific_Artist444 24d ago

I interpreted it as asynchronicity.

6

u/Kokuswolf 24d ago

At least a prototype if it.

4

u/amatulic 24d 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 24d 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 25d ago

skill issue

30

u/jam_pod_ 25d ago

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

29

u/throwaway563125685 24d ago

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

7

u/STEMpsych 24d ago

Holy shit.

5

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

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

6

u/throwaway563125685 23d 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 25d ago

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

10

u/BastetFurry 24d ago

🎵 In the sourcecode The quiet sourcecode The lambda sleeps tonight

Async Await Async Await... 🎵

3

u/STEMpsych 24d ago

I will never not upvote this.

7

u/goatanuss 24d ago edited 24d 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 25d ago

I thought that was more of a #JustAsyncThings

7

u/HugoNikanor 24d ago

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

15

u/prehensilemullet 25d ago

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

4

u/Oblivious_catalyst 25d ago

debatable

10

u/prehensilemullet 25d ago edited 24d 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)