正在加载视频...

视频加载失败

GPT-Migrate helps you easily migrate your codebase from one language or framework to another 👇

301,944 次观看 • 3 年前 •via X (Twitter)

10 条评论

Josh Payne 的头像
Josh Payne3 年前

The vision I'm excited for: ◐ a Flask API -> FastAPI or Node.js ◑ ◐ a React Native app -> Swift/Android ◑ ◐ a Python data pipeline -> Rust pipeline ◑ ◐ a Vue frontend -> Typescript + Next.js ◑ ...all in just a few minutes ⚡

Josh Payne 的头像
Josh Payne3 年前

Here's how it works: 1. It creates a Docker environment for <newlang> 2. Recursively rebuilds new <newlang> code from your existing code 3. Builds unit tests from your old code 4. Tests the new code against them 5. Iteratively debugs the code for you (Debugging 👇)

Josh Payne 的头像
Josh Payne3 年前

I have to admit, it’s kind of addicting to just press “y” and let it fix the code whenever there’s an error 😁 Keep in mind that *this is a hackathon project* (from Saturday's @agihouse_org hackathon), so it's extremely nascent, and there's a ton of work left to do.

Josh Payne 的头像
Josh Payne3 年前

Code migration is a painstaking and complex task faced by everyone from indie devs to the Fortune 500. Transpilers exist, but yield unmanageable code. Practical migration is only now becoming tractable, thanks to today's LLMs, as shown by @swyx, @antonosika, @SigGravitas et al.

Josh Payne 的头像
Josh Payne3 年前

In fact, I recently migrated from Flask to FastAPI for another project (TBA) and I *wished* there was something like this out there. I've been asked by pretty much everyone I've shared this with: "does it do language x to language y?" The answer is probably, but it's early, so...

Josh Payne 的头像
Josh Payne3 年前

📣 This is a call to action! Migration is TOUGH, and I've really only made a small chip at it. If this problem gets you excited and you're interested being a core contributor, I (and most software orgs/people, really) would love to see you in the repo!

Travis Fischer 的头像
Travis Fischer3 年前

Would love a version of this that’s focused on converting / upgrading popular NPM modules to modernize or fix best practices. axios ⇒ fetch commonjs ⇒ esm upgrading react support patching vulnerabilities (taking action on @SocketSecurity) etc cc @feross @sindresorhus @rauchg

Josh Payne 的头像
Josh Payne3 年前

@SocketSecurity @feross @sindresorhus @rauchg Love these 🔥 ideas!! Going to be a busy weekend :)

Marc Seitz — oss/acc 的头像
Marc Seitz — oss/acc3 年前

great work Josh 👏 I can see this being applied to unmaintained open-source project / packages that still are critical but no one has time to upgrade to the next major version of a programming language / franework ruby on rails 4 —> ror 7 c —> rust

Josh Payne 的头像
Josh Payne3 年前

Agreed! One challenge is knowledge cutoffs, but this could be solved with documentation search calls etc. Future feature possibly

相关视频