Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

189
Views
How would a site, like w3schools, run many languages locally?

I'm working on a portfolio website, and I thought it would be cool to be able to run my scripts in python, java, js, rust, etc locally in the browser Here's an example of this from w3schools

I'm guessing they have a translation layer to javascript, but in the event that they're actually running C++ here, does anyone know how this might be done or generalized?

about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

They do not translate those languages to JavaScript and then run it on the client - that would be a herculean task to get right, especially for multiple languages. Rather, they (and the many similar sites like try it online) take the source code text from the client's browser, and run it on the server, and respond to the client with the result from the server.

To achieve something like this, you'd need

  • A backend (in any language)
  • Compilers/interpreters/etc for all languages you want to support
  • A way for the backend to programatically call them with the user's input (which is often pretty easy)

For proof that w3schools takes the result from a server, rather than running it locally, examine the network tab of your browser, and you'll see it:

enter image description here

about 4 years ago · Juan Pablo Isaza Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!