Looking Under the Hood of JavaScript

แชร์
ฝัง
  • เผยแพร่เมื่อ 23 ม.ค. 2025
  • Ever wonder what in the world is going on with JS? Well in this we deep dive into v8, into the internals to figure out WTF IS GOING ON WITH SETTIMEOUT???
    SMI in v8?? v8.dev/blog/po...
    Aleksei: / the_kozy
    Twitch
    Everything is built live on twitch
    Twitch : bit.ly/3xhFO3E
    Discord: discord.gg/ThePrimeagen
    Spotify DevHour: open.spotify.c...
    Editor
    All my videos are edited by Flip. Give him a follow! / flipmediaprod He is also open to do more editing, so slide deeeeeeeeep into his dms.
    Join this channel to get access to perks:
    / @theprimeagen
    Links
    Linode: linode.com/prime
    / discord
    Twitch: / theprimeagen
    Insta: / theprimeagen
    Twitter: / theprimeagen
    VimRC & i3: github.com/The...
    Keyboard 15% off bit.ly/Prime360 USE CODE PRIME360
    #coding #neovim #typescript #programming #vim #softwareengineering #codinglife #webdesign #webdevelopment #webdev #javascript #rustlang #rust #twitch #twitchstreamer #programmerhumor #codinghumor #software #softwareengineer #softwaredeveloper #softwaredevelopment

ความคิดเห็น • 580

  • @ThePrimeagen
    @ThePrimeagen  2 ปีที่แล้ว +1132

    I really enjoyed making this video. Its more of a new style for me, do you like it? Should I do more of this style? (send the algorithm signals!!!)

    • @the_flask
      @the_flask 2 ปีที่แล้ว +28

      Yes

    • @dhruvtekker1220
      @dhruvtekker1220 2 ปีที่แล้ว +15

      It's super complicated and i didn't understand most of it.
      But i liked it bc i wanna learn more about js--> c++ stuff

    • @matiasbpg
      @matiasbpg 2 ปีที่แล้ว +4

      I loved the video. It's really difficult to give content like this that deep dive into the internals

    • @mouradaouinat8721
      @mouradaouinat8721 2 ปีที่แล้ว

      Duh

    • @user-alesomething123
      @user-alesomething123 2 ปีที่แล้ว +1

      Yes please, I really like that the content is aimed towards explanation for intermediary stuff. Especially the fact that you’ve posted a link for further explanation and I can go and see things I don’t understand. There’s already content on TH-cam code space aimed towards beginners and people with an agenda to obscure info to sell a course. It’s why I mostly avoid TH-cam these days and just focus on odin project.

  • @RunningRay9
    @RunningRay9 2 ปีที่แล้ว +1164

    this shows that JS is BLAZINGLY fast. It executes a code that is supposed to take infinitely long time in just an instant.
    Blazingly fast

    • @wlockuz4467
      @wlockuz4467 2 ปีที่แล้ว +85

      It has done executing while Rust hasn't even compiled!

    • @wadecodez
      @wadecodez 2 ปีที่แล้ว +25

      Or is it infinitely fast?

    • @igorordecha
      @igorordecha 2 ปีที่แล้ว +7

      @@wlockuz4467 I just thought...
      You have an algorithm written in both JS and Rust (both in source form). You enter commands "node program.js" and "cargo build && ./target/debug/program" respectively and measure time from pressing enter to the program returning.
      How large the input must be (the N in big O notation) for rust to win? Then check how building for production changes the results.

    • @kamuridesu
      @kamuridesu 2 ปีที่แล้ว +3

      @@igorordecha I made this test some time ago with python and it really depends on the operation and performance of the machine. Using an 7th gen Intel core i7 and a simples multiplication operation, even with compilation rust executed faster than Python. I assume that JavaScript has a performance similar, if not worse, than python

    • @HuntingKingYT
      @HuntingKingYT 2 ปีที่แล้ว +3

      @@igorordecha cargo run**

  • @kebien6020
    @kebien6020 2 ปีที่แล้ว +385

    To summarize (please correct me if I misunderstood):
    - The infinity case is just special handling where it's treated the same as 0
    - Any other number gets casted to a 32 bit integer so some of the bigger numbers get truncated to small or even negative values
    - Negative values are handled effectively the same as 0

    • @ricardoamendoeira3800
      @ricardoamendoeira3800 2 ปีที่แล้ว +45

      What I don't understand is if you're making a special case for infinity why would you run it immediately instead of simply not scheduling it at all?!

    • @MrSuperNova46
      @MrSuperNova46 2 ปีที่แล้ว +31

      @@funnyav "This is the way"

    • @alxandr90
      @alxandr90 2 ปีที่แล้ว +14

      @@ricardoamendoeira3800 As far as I understood, the converting of Infinity to 0 has nothing to do with `setTimeout`. Rather, `Infinity` converts to 0 if you try to treat it as an integer. If you do `Infinity | 0` you get 0.

    • @nathanhedglin931
      @nathanhedglin931 2 ปีที่แล้ว +3

      @@funnyav divide by zero would be NaN. Weird stuff

    • @rosenthalpiano
      @rosenthalpiano 2 ปีที่แล้ว +4

      @@nathanhedglin931 setTimeout with NaN also executes immediately. Fun huh?

  • @mattshnoop
    @mattshnoop 2 ปีที่แล้ว +304

    Excellent video. This video has less of a "look how shitty JS is" vibe and is more just a great deep dive into the internals of V8.

    • @ThePrimeagen
      @ThePrimeagen  2 ปีที่แล้ว +105

      thats the point!
      no need to bag on JS, its been bagged on enough, its more "why" does it do something

    • @SleepeJobs
      @SleepeJobs 2 ปีที่แล้ว +1

      👍👍

    • @ricardoamendoeira3800
      @ricardoamendoeira3800 2 ปีที่แล้ว +15

      @@ThePrimeagen Actually I think this was more the "how it happens", in the future it would be nice to include the discussions on why some decisions were made (from issue trackers, PR's, etc.
      For example why choose to treat infinity as 0 instead of not scheduling the callback at all.

    • @lawrencedoliveiro9104
      @lawrencedoliveiro9104 2 ปีที่แล้ว

      So basically, it is V8 that is shitty.

    • @jongeduard
      @jongeduard 2 ปีที่แล้ว +1

      For me it's not completely the first thing about V8 that I have watched around the subject of data types. I forgot which video it was, but it was some years ago and they had a very detailed explanation about the V8 engine and how you could write your code smarter to become more high performant.
      They also talked about SMI numbers and how using arrays of SMI's where the most efficient ones to use (because of preventing those extra pointers and memory allocations), also how important it was in general not to mixup several types in the same array. For example 1 object or string inside your array also containing numbers makes the whole thing based on extra pointers and allocations (in other words, the whole array becomes a boxed one).
      It's also true the language has a ton of initial design problems. But other languages also have their issues. C and C++ have their own huge problems for example (being very unsafe and vulnerable for example).
      It's great that powerfull JS engines exist these days. I would like to know more about the Firefox JS engine as well. Because V8 is not the only workhorse one that exists.

  • @snoopy8870
    @snoopy8870 2 ปีที่แล้ว +110

    this type of content on programming is what we need more!!!

    • @chrismuga
      @chrismuga 2 ปีที่แล้ว

      Facts

    • @YPLabs
      @YPLabs 2 ปีที่แล้ว

      @@chrismuga

  • @spicybaguette7706
    @spicybaguette7706 2 ปีที่แล้ว +55

    Massive props to the v8 devs for making a garbage (collecting) language actually performant, these optimizations are just insane.
    Also SO to the people working at JSC and SpiderMonkey

    • @ThePrimeagen
      @ThePrimeagen  2 ปีที่แล้ว +27

      yayay! its nuts that v8 team is so talented they took a language that is TERRIBLE for perf and made it semi decent. its ackshually nuts.

  • @scottiedoesno
    @scottiedoesno 2 ปีที่แล้ว +7

    Love love love this video. This is the kind of stuff that really gives so much insight into what's going on behind the scenes. Thanks a ton for taking the time, not only to figure out why, but also to explain it so well.

  • @Nurof3n_
    @Nurof3n_ 2 ปีที่แล้ว +79

    More videos like this one please!

    • @ThePrimeagen
      @ThePrimeagen  2 ปีที่แล้ว +11

      ya!

    • @YPLabs
      @YPLabs 2 ปีที่แล้ว +6

      ​@@ThePrimeagen And make them pretty LongLongLong xD

  • @SoKette
    @SoKette 2 ปีที่แล้ว +7

    Diving into internals is always fun ! When everything gets demystified after a long and arduous journey of grepping and filling your brain with as much as you can, it's sooooo satisfying.

  • @SuperRedstoneman
    @SuperRedstoneman 2 ปีที่แล้ว +9

    Saddens me that not more people are doing videos like this and there are some concepts you go through very quickly but nevertheless I like how you explained a single thing in detail quickly while throwing in knowledge and remarks about how things work

  • @johndavidson8096
    @johndavidson8096 2 ปีที่แล้ว +2

    Great video! Love seeing in-depth JS stuff! It's crazy impressive how much work V8 does to make JS run faster

  • @JosephHenryDrawing
    @JosephHenryDrawing 2 ปีที่แล้ว +2

    This is really important to teach that! Don't be afraid to understand the internals and check the source code. Amazing video

  • @ThePrimeagen
    @ThePrimeagen  2 ปีที่แล้ว +9

    I also didn't fight anyone, i got a stye, a duct in my eye closed and eff'd me for a few days...

    • @tini_
      @tini_ 2 ปีที่แล้ว +4

      hmmmm, your last sentence "he is the best Engineer I have ever worked with" sounded kinda sus. Blink twice with the other eye if you need help!

    • @lawrencedoliveiro9104
      @lawrencedoliveiro9104 2 ปีที่แล้ว +1

      Hey, it was a chance to use the old “you should see the other guy” joke ...

  • @peternoire
    @peternoire 2 ปีที่แล้ว +164

    I know we are kinda making fun of JavaScript but.. its so educational it just makes me love JavaScript more. You're great at doing this type of content. Definitely do more.

    • @peternoire
      @peternoire 2 ปีที่แล้ว +7

      I said we as in we made this video together apparently. I don't know why I typed that.

    • @ThePrimeagen
      @ThePrimeagen  2 ปีที่แล้ว +73

      btw, i am not trying to make fun of javascript, just trying to have fun with it :)
      and try to explain things in a fun way!

    • @RainOrigami
      @RainOrigami 2 ปีที่แล้ว

      classic case of stockholm syndrome

    • @peternoire
      @peternoire 2 ปีที่แล้ว +2

      @@ThePrimeagen you killin it, thanks for the good content. 👍

    • @professornumbskull5555
      @professornumbskull5555 2 ปีที่แล้ว +14

      Yo... You love JS? Are you alright? Do you need therapy?
      /s

  • @marcoaugustovitangeli1300
    @marcoaugustovitangeli1300 2 ปีที่แล้ว +2

    I really enjoyed this video, this kind of content is great, is beautiful to see how "high-level" code, works all the way down and spot this kind of tricky things.

  • @oscarh4066
    @oscarh4066 2 ปีที่แล้ว +1

    I just found you, Prime, and man I became a fan BLAZINGLY FAST!

  • @shekishral6570
    @shekishral6570 2 ปีที่แล้ว +17

    Very informative and interesting, please more of those videos when you brake the javascript code into c++ code!

  • @bashbunni
    @bashbunni 2 ปีที่แล้ว +1

    This is amazing! You crushed this new format 🔥

  • @judedavis92
    @judedavis92 2 ปีที่แล้ว +3

    It’s actually refreshing to see a JS dev with a good understanding of under-the-good mechanics. We need more like that.

  • @mediopalodev
    @mediopalodev 2 ปีที่แล้ว +5

    Brilliant Video. Absolutely more, please!

  • @user-dz7bi8de7z
    @user-dz7bi8de7z 2 ปีที่แล้ว

    I am so happy that I stumpled across this channel. You are such an inspiration, your videos are so well made, funny and you are very authentic. Love it! Thank you very much for your content!

  • @trollander
    @trollander ปีที่แล้ว

    This is so entertaining as well as informative. Learned a lot! Found you from the vim and algorithm courses on frontend master . Huge fan of your teachings

  • @m.minkov
    @m.minkov 2 ปีที่แล้ว

    Really enjoyed this video! Love covering these details that are much more in depth than what you regularly see. Thanks! :D

  • @timdithmer9184
    @timdithmer9184 2 ปีที่แล้ว +8

    This really is some next level sh*t! Thank you very much. I was already enjoying your content a lot. But this teaches people how to find out stuff by themselves, along with providing a very deep understanding of this specific topic. Again, thanks alot! MORE! :D

  • @juniorrueda8180
    @juniorrueda8180 2 ปีที่แล้ว +1

    That’s quite deep indeed
    Amazing video and thanks for sharing your knowledge!

  • @hendersonfernandes7378
    @hendersonfernandes7378 2 ปีที่แล้ว +1

    You are the senior I'd like to have in my life...
    Awesome video!!! ❤

  • @samsupplee-niederman1752
    @samsupplee-niederman1752 2 ปีที่แล้ว

    More of this, please. I've never seen what "under the hood" of JS before this video, and this was an awesome introduction to the WHY behind the weirdness.

  • @masteringmui
    @masteringmui 2 ปีที่แล้ว

    This video was awesome. I'd love more stuff like it, and also more stuff on your learning process and how you set about getting such in-depth knowledge on nitty-gritty stuff like this.

  • @jocdiazm
    @jocdiazm 2 ปีที่แล้ว +1

    Loved the new format!

  • @sooollchhu
    @sooollchhu 2 ปีที่แล้ว +3

    i am gonna have to rewatch it a couple of times to understand it, my brain is not cooperating today . Thank for this video.

  • @Simon-vy8fe
    @Simon-vy8fe 2 ปีที่แล้ว

    Love these deep dives! Keep them going please. :)

  • @vvarhand3985
    @vvarhand3985 2 ปีที่แล้ว

    I loved this!! Would really enjoy seeing more intricate and technical details of the browser’s implementation. You have a great instructional style

  • @y3v4d
    @y3v4d 2 ปีที่แล้ว

    Awesome video, short and full of interesting information and analysis!

  • @danielknight1570
    @danielknight1570 2 ปีที่แล้ว

    sometimes idk wtf ur talking about Prime but it’s soothing to hear ur voice

  • @stefanhall6415
    @stefanhall6415 2 ปีที่แล้ว +6

    Love your videos❤

  • @blackfrog1534
    @blackfrog1534 2 ปีที่แล้ว

    Wow awesome video :3 the more technical the content the more prime shines

  • @petarkolev6928
    @petarkolev6928 2 ปีที่แล้ว +1

    This video is beyond amazing!

  • @Ma1ne2
    @Ma1ne2 2 ปีที่แล้ว

    This was actuall very interesting, I was building a project for university with Rust to Webassembly and a lot of the ideas that you explained here to interface JS with C++ actually apply directly or similarly to wasm-bindgen, including how there is a wrapper struct for passed and returned JS values.

  • @deank179
    @deank179 2 ปีที่แล้ว

    Super interesting! Would love to see more content like this

  • @diegolikescode
    @diegolikescode 2 ปีที่แล้ว

    That is some juicy ass content. Loved this format, you keep getting better and I'll keep coming to you (wat?)

    • @ThePrimeagen
      @ThePrimeagen  2 ปีที่แล้ว

      LETS GO, KEEP COMING BABE!

  • @pd5711
    @pd5711 2 ปีที่แล้ว +1

    Thanks for that video !
    Props for Westbrook usage :D

  • @za_wavbit
    @za_wavbit ปีที่แล้ว +1

    So in the first few seconds my mind already jumped to "32 bit signed integers" and it turns out that was right, but I didn't know the default behavior for something larger was 0. The spec is really fascinating, especially since it includes so much stuff that JS users (like me) would love to see changed, but it can never change because JS has to be backwards-compatible forever. There's always a _logical_ explanation for JS weirdness that made sense at one point in time, but that doesn't mean it's always rational in 2023 (except for typeof null, which was just an accident, but now we're stuck with it).

  • @jgttech
    @jgttech 2 ปีที่แล้ว

    I loved this video. It explains the situation really well.

  • @abhishekgururani6993
    @abhishekgururani6993 2 ปีที่แล้ว

    This video is pure gold, I learned how to research things.

  • @bravesirrobin9576
    @bravesirrobin9576 2 ปีที่แล้ว

    I love this video, I'd like to see more of this type.

  • @hugodsa89
    @hugodsa89 ปีที่แล้ว

    God I love these videos. Thanks prime.

  • @npgoalkeeper
    @npgoalkeeper 2 ปีที่แล้ว +1

    Reviewing an example of chromium doing something seemingly unexpected while on Firefox, truly a chad move

  • @moodynoob
    @moodynoob 2 ปีที่แล้ว

    Absolutely love this kind of content!

  • @Vim_Tim
    @Vim_Tim 2 ปีที่แล้ว +9

    Follow-up question: what does the spec say? Is this Google’s interpretation, or do all browsers implement SetTimeout this way?

    • @lawrencedoliveiro9104
      @lawrencedoliveiro9104 2 ปีที่แล้ว

      I had a look at the MDN page (probably the most readable description I could find), and apart from warning about non-numbers being implicitly coerced into numbers, it says nothing like this. There are situations where delays may last longer than expected, but they should never be shorter.
      So it seems like this is some kind of weird Chrome/Chromium bug.

    • @Vim_Tim
      @Vim_Tim 2 ปีที่แล้ว

      @@lawrencedoliveiro9104 MDN is not a specification… I believe ECMA-262 is the authority for this behavior.

    • @Vim_Tim
      @Vim_Tim 2 ปีที่แล้ว +6

      I found the answer: the W3C HTML5 standard says “if timeout is an Infinity value, a Not-a-Number (NaN) value, or negative, let timeout be zero.” So this is behavior is by design.

    • @lawrencedoliveiro9104
      @lawrencedoliveiro9104 2 ปีที่แล้ว +2

      @@Vim_Tim But that doesn’t say that large values should overflow.

    • @omarb155
      @omarb155 2 ปีที่แล้ว

      It it interesting to consider edge cases like in this video, but hopefully this issue shouldn't arise too often.

  • @edupsousa
    @edupsousa 2 ปีที่แล้ว +2

    It's kind of scary the number of assumptions or best guesses a web browser does. The last time I dove in Chromium code was to find out why it was trying to autocomplete a random text field in my form as a credit card number. Lots of obscure heuristics.

    • @ThePrimeagen
      @ThePrimeagen  2 ปีที่แล้ว +1

      its crazy out there :)

  • @jfdirienzo
    @jfdirienzo 2 ปีที่แล้ว

    This style of video is pure gold 🔥🔥🔥

  • @petrpechkurov3095
    @petrpechkurov3095 2 ปีที่แล้ว

    Thank you, Mr. ThePrimeagen!

  • @headlights-go-up
    @headlights-go-up 2 ปีที่แล้ว +11

    This was simultaneously interesting and confusing. I'm not smart enough for this, should I be ashamed? lol

    • @ThePrimeagen
      @ThePrimeagen  2 ปีที่แล้ว

      i think you have achieved a victory?

  • @thehibbi
    @thehibbi 2 ปีที่แล้ว

    I like understanding stuff like this by inspecting the source code. Very nice video, thanks :)

  • @kardashevr
    @kardashevr 2 ปีที่แล้ว

    a fascinating piece of knowledge I'm never gonna need

  • @UsefulProgrammer
    @UsefulProgrammer 2 ปีที่แล้ว

    I really liked this one. Keep it up.

  • @henrybenedict6357
    @henrybenedict6357 2 ปีที่แล้ว

    I just watch your course about vim on frontend masters and I love it.

  • @igboman2860
    @igboman2860 2 ปีที่แล้ว

    So in summary, setTimeout expects a 32 bit signed integer and overflows . Thanks for the video. I actually didn't know that

  • @mzg147
    @mzg147 2 ปีที่แล้ว +2

    I hate js, I am doing challenges to write web apps without touching js, but this deep dive is just great. Makes appreciating it much easier (it's still hard tho), thank you really much!

  • @CodeWithAhsan
    @CodeWithAhsan 2 ปีที่แล้ว

    I loved this Deep dive. Been working with JS for the past 10 years I never knew about this :) I'd love more of this and would perhaps now start looking into the chromium source code myself as well! Thanks the swolleyeagen

  • @st-jn2gk
    @st-jn2gk 2 ปีที่แล้ว

    love your videos (waiting on your rust ergonomics vid btw 🥺)

  • @amans6504
    @amans6504 2 ปีที่แล้ว

    This time i finally could understand a little c++ in production.

  • @mondirhallouli
    @mondirhallouli 2 ปีที่แล้ว

    you sir are just different! in a very awesome way!

  • @michaeldeloatch7461
    @michaeldeloatch7461 2 ปีที่แล้ว

    I'm a little stopped up in the ears tonight, and a lot hearing impaired every night, and the speakers on my laptop are lousy. @ 2:40 I thought you said "ideologue" which certainly could figure in philosophically between the loosy-goosy world of JS and the cold, heartless metal of C calls ;-) -- oh, you actually said IDLong

  • @ascourter
    @ascourter 2 ปีที่แล้ว

    Nothing like pulling out the ole 2's complement to see some jaws hit the floor

  • @awave7710
    @awave7710 2 ปีที่แล้ว

    def looking forward to more of these

  • @kr0k3tt
    @kr0k3tt ปีที่แล้ว

    Liked for the instance promotion. Thanks prime

  • @Trooperos90
    @Trooperos90 7 หลายเดือนก่อน +1

    What do u mean it gets translated to cpp? Its just v8 interpreter using binary code that was compiled from cpp

  • @HuntingKingYT
    @HuntingKingYT 2 ปีที่แล้ว +2

    It does it immediately because it’s blazingly fast.

  • @ImranSheikh-kg4qd
    @ImranSheikh-kg4qd 2 ปีที่แล้ว +1

    We need more of this type of content...

  • @AlexanderBorshak
    @AlexanderBorshak 2 ปีที่แล้ว

    Nice investigation, many thanks!

  • @drdesten
    @drdesten 2 ปีที่แล้ว

    As someone who has read into the JavaScript spec, these kinds of things don't surprise me too much

  • @quintencabo
    @quintencabo 2 ปีที่แล้ว

    I really loved this video!

  • @alexibnz
    @alexibnz 2 ปีที่แล้ว

    This style reseembles a lot with what I do at my job, but without SAP frameworks… fortunately for the rest of the viewers. Pls do more!

  • @medamine3142
    @medamine3142 2 ปีที่แล้ว

    my mind is exploded from this explanation😵

    • @ThePrimeagen
      @ThePrimeagen  2 ปีที่แล้ว +1

      hopefully in a good way

    • @medamine3142
      @medamine3142 2 ปีที่แล้ว

      @@ThePrimeagen HAHA right

  • @palaciokaesar
    @palaciokaesar ปีที่แล้ว

    an programmer youtube with a huge charisma??? YES I AM INNNN

  • @lotfikamel5947
    @lotfikamel5947 2 ปีที่แล้ว +2

    Really special content 💖

    • @ThePrimeagen
      @ThePrimeagen  2 ปีที่แล้ว +1

      i feel special sometimes

  • @totalmonkeyspeed260
    @totalmonkeyspeed260 2 ปีที่แล้ว

    Good video, do whatever you want dude.🙏

  • @chrissaltmarsh6777
    @chrissaltmarsh6777 2 ปีที่แล้ว +5

    This is hilarious. Reminds me of an ancient Sinclair calculator, very cheap, which got things wromg; the fun was to work out why.
    Lack of RAM - can't deal with edge cases, oh well, WTF.
    Javascript does not have that excuse.

    • @ThePrimeagen
      @ThePrimeagen  2 ปีที่แล้ว +2

      hah, i like investigations, they are funny

  • @qodesmith520
    @qodesmith520 2 ปีที่แล้ว +2

    You're a friggin genius.

    • @ThePrimeagen
      @ThePrimeagen  2 ปีที่แล้ว

      just a man with curiosity

  • @smile4992
    @smile4992 2 ปีที่แล้ว

    I didn't know gimp can be used to create tutorial videos like this. This is amazing.

  • @TeamEternalEmpire
    @TeamEternalEmpire ปีที่แล้ว

    Is there a way to prevent that 'immediately' and 'never' behavior? If we are dynamically writing a value, it can lead to a bug that may be impossible to find

  • @pro.gateway
    @pro.gateway 2 ปีที่แล้ว

    Please do more of this......awsome content

  • @softed
    @softed 2 ปีที่แล้ว

    The infinity thing I can understand, but the rest is just integer overflow which can happen in most languages including rust

  • @razorstone3088
    @razorstone3088 2 ปีที่แล้ว +3

    never looked into what the code for v8 looks like... looks interesting

  • @matthewvaccaro8877
    @matthewvaccaro8877 2 ปีที่แล้ว

    More! More you son of a bitxh!!! More content like this, it’s absolutely amazing ❤❤❤

  • @eliasrojas5326
    @eliasrojas5326 2 ปีที่แล้ว

    beautiful, prime

  • @gargantooga
    @gargantooga 2 ปีที่แล้ว

    Amazing drawing skills!

  • @_randombob
    @_randombob ปีที่แล้ว

    Amazing vid, may have to watch again but neat

  • @avinashthakur80
    @avinashthakur80 2 ปีที่แล้ว +3

    Even worst issue I found in JavaScript is that +0 & -0 are different concepts and in some situations give different results.

    • @ThePrimeagen
      @ThePrimeagen  2 ปีที่แล้ว +1

      so... that is a funny thing. -0 and +0 is the IEEE standard, not js :)

    • @avinashthakur80
      @avinashthakur80 2 ปีที่แล้ว

      @@ThePrimeagen Yes it's IEEE standard but only in JS we see it's worst implementation.
      For example, these 2 expressions give different results.
      Math.atan2(-0, -1)
      Math.atan2(0, -1)

    • @softwarelivre2389
      @softwarelivre2389 2 ปีที่แล้ว +2

      @@avinashthakur80 As they should. It would be clear for anyone that has studied limits in Calculus classes

    • @avinashthakur80
      @avinashthakur80 2 ปีที่แล้ว

      @@softwarelivre2389 Limits don't apply here.
      Limit(x→-0) f(x) is different and not equivalent to f(-0) or f(0)
      In Math, there's no concept of "-0", it is equal to "0".

    • @softwarelivre2389
      @softwarelivre2389 2 ปีที่แล้ว

      @@avinashthakur80 0- and 0+ are literally lim x-> 0- x and lim x->0+ x

  • @andrewrush7667
    @andrewrush7667 2 ปีที่แล้ว

    Great video, thanks!

  • @AlexSharikov
    @AlexSharikov 2 ปีที่แล้ว

    Yes, entertaining and knowledgeable 💥

  • @dano7675
    @dano7675 2 ปีที่แล้ว

    Bah gawd! The SwoleEyeAgen strikes again!

  • @alexibnz
    @alexibnz 2 ปีที่แล้ว

    This sparks joy!!!!!!!!!!!

  • @palkollar7739
    @palkollar7739 ปีที่แล้ว

    this is an awesome channel

  • @leonardoantunes1598
    @leonardoantunes1598 2 ปีที่แล้ว

    Awesome type of vídeo! I want to see more

  • @ARLX-yo1wr
    @ARLX-yo1wr 10 หลายเดือนก่อน

    man, it's blazingly amazing)

  • @DaviAreias
    @DaviAreias 2 ปีที่แล้ว +2

    So basically half of time the V8 engine is checking if we wrote something stupid?

  • @davidomar742
    @davidomar742 2 ปีที่แล้ว

    This is great, on my next interview when they ask me if I have any questions, Ima hit the interviewer with this question. Instant hire

  • @Aspiiire
    @Aspiiire 2 ปีที่แล้ว

    Thanks really amazing and informative video