Hacker News new | past | comments | ask | show | jobs | submit login

Can you give some examples of the prompts you used to get Claude to generate the old-enough code?



Here's the prompt I ended up with after several iterations of Claude trying to spit out Objective-C 2.0 code:

"This project must generate code that works with Mac OS X Tiger 10.4, Xcode 2.5, and Objective-C 1.x. The Objective-C code generated MUST NOT have ARC, blocks, @property, @optional, @try, @synchronize, NSInteger, auto-layout, or modern features, NSCharacterSet doesn't have newlineCharacterSet. I know it's an old, obsolete version but I must use it.

Generate clean code with comments and debug logging to NSLog."


Any reason Xcode 2 was chosen? Wouldn't have Xcode 3.2.6 on Snow Leopard but targeting OS X 10.4 and including ppc as an architecture also worked?


> Any reason Xcode 2 was chosen? Wouldn't have Xcode 3.2.6 on Snow Leopard but targeting OS X 10.4 and including ppc as an architecture also worked?

I forget exactly why I used Xcode 2.5, but I wanted to do it on Tiger since that OS was the one around the time Xbins started. It probably would've been a bit nicer working in Snow Leopard, but I just chose Tiger.


I asked Claude "As a developer writing for mac os x 10.4 tiger on Xcode 2, write me a hello world mac app with a button that outputs the string "hello world" to the console" and it seemed to produce correct results in Objective-C.




Join us for AI Startup School this June 16-17 in San Francisco!

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: