Get the latest tech news

Polycompiler: Merge Python and JavaScript code into one file that runs in both


Merge Python and JS code into one file that can be run in both languages. - EvanZhouDev/polycompiler

An experimental project to attempt to merge arbitrary Python and JS code into one source file. The first statement, ignoring the JS comment, is simply an integer. While it seems simple in hindsight, this solution took a long time to figure out (even though some aspects of it are hiding in plain sight), so I hope it's interesting!

Get the Android app

Or read this on Hacker News

Read more on:

Photo of file

file

Photo of javascript

javascript

Photo of javascript code

javascript code

Related news:

News photo

WebMonkeys: parallel GPU programming in JavaScript (2016)

News photo

Some features that every JavaScript developer should know in 2025

News photo

CentreStack RCE exploited as zero-day to breach file sharing servers