Building a JavaScript runtime in one month

(themackabu.dev)

7 points | by franciscop 3 hours ago

2 comments

  • yesitcan 1 hour ago
    It’s like the author thought it would look less AI-generated if he prompts it to not capitalize sentences.
  • vivzkestrel 57 minutes ago
    stupid question for people like you

    - how do you exactly know how javascript works inside out?

    - i am assuming it is not the most feasible of tasks to sit through the v8 source code with half a million files inside and figure out what part does what

    - what level of c/c++ is actually needed to pull something off like this and if you are a beginner who can write some basic data structures and sorting functions,

    - what is the roadmap to go from here to the point where you are writing your own browser engine or game engine or drivers for some hardware devices?

    • franciscop 7 minutes ago
      This is not me, I just saw an interesting article and posted it here. But I can answer the first question, there's 3 major ways I can think of:

      - Read the specification in-depth and understand it well.

      - Just testing, if you know JavaScript you can test it in other runtimes, create tests around the methods and then you know how it works well. This is usually more for edge cases though, like what happens if you mutate the 3rd argument of Array.map?

      - Look at other implementation's internals, as you said.