Can Cursor Port Python to Swift?

Can Cursor Port Python to Swift?

Video preview
Hey everyone, I wanted to share some insights from a recent livestream I did with Ronald Mannak. We took on a pretty ambitious project, and I thought you might find our experience interesting.

What We Tried to Do

Ronald and I attempted to use Cursor IDE with AI assistance to port the MLX Whisper project from Python to Swift. Our goal was to make it compatible with iOS and macOS devices. It was a big challenge, but we learned a lot in the process.

Tools We Used

  • Cursor IDE with Claude AI integration
  • MLX (Apple's machine learning framework)
  • Swift programming language

Challenges We Faced

  • Converting the entire project at once was too much for the AI
  • We ran into build errors and type mismatches in the generated Swift code
  • Some UI issues in Cursor made applying code changes tricky

Key Takeaways

  1. Breaking the project into smaller parts works better for AI-assisted coding
  1. Providing specific context and documentation to the AI is crucial
  1. We discovered Cursor's documentation indexing feature, which is pretty powerful

What the AI Could (and Couldn't) Do

The AI did well with basic conversions, but struggled with more complex, framework-specific code. It really highlighted where human expertise is still necessary.

Community Involvement

One of the best parts was the engagement from viewers. We got some great tips, and someone even shared a pull request for an MLX implementation in WhisperKit. It was a great reminder of how collaborative our dev community can be.

Looking Ahead

For future streams, we're thinking of tackling smaller projects and maybe building on existing Swift projects like AI Proxy. We want to showcase more practical applications of AI-assisted development.

Final Thoughts

While AI tools like Cursor are promising, they're not a magic solution yet. The stream really showed the importance of human expertise, especially for complex projects.
If you're looking to use AI in your dev workflow, start small, provide good context to the AI, and be ready to refine the generated code.
Stay tuned for more streams where we'll keep exploring this AI + dev intersection. Can't wait to see where this technology takes us!