Software & DevOps

Translate old scripts to a new language

One developer used ChatGPT and Gemini to translate 20 years of Python scripts into Go, one script at a time.

Steps

  1. Translate one script at a time.
  2. Check the outputs match.
  3. Keep the originals.

Prompt you can copy

Translate this [language] script to [language], keeping the same behavior. Note anything that doesn't translate cleanly.

Tools

  • ChatGPT
  • Gemini

For Developers. Added .

Source

hn ·

Related use cases

Software & DevOps

Build a small desktop app to send files to a CNC machine

A hobbyist asked Gemini Pro for a Python Qt app that sends g-code files to a CNC machine or laser cutter, and it runs on Windows, Mac, and Linux.

Caution. Test machine tools carefully.

Developers, TradesGemini

Software & DevOps

Build your first Android app

With no Kotlin experience, one developer built their first Android app with Gemini.

Developers, IndividualsGemini