TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Ask HN: Does ChatGPT not write code anymore?

1 pointsby jdcampolargoover 2 years ago
I asked it to write code and this is the reply I'm getting "As a language model AI I don't have the ability to write code."

1 comment

ttctciyfover 2 years ago
Tested just now:<p>Q: In kotlin, how would you implement a function that takes a string and returns boolean true iff the string is palindromic, otherwise false?<p>A:<p>&gt; Here is an example implementation of a palindrome checking function in Kotlin:<p><pre><code> kotlin fun isPalindrome(s: String): Boolean { val cleaned = s.filter { it.isLetterOrDigit() }.toLowerCase() return cleaned == cleaned.reversed() } </code></pre> &gt; This implementation first removes any non-letter and non-digit characters and converts the string to lowercase. Then, it checks if the cleaned string is equal to its reversed form. If they are equal, the function returns true, otherwise false.<p>Bonus test of the &#x27;new mathematical ability and accuracy&#x27; claimed in the modal intro on login:<p>Q: what&#x27;s 16 times 9 times 5 times 7?<p>A: The expression 16 * 9 * 5 * 7 evaluates to 7560.<p>Oops!