@wojventures@dhh The conservative, corrupted government that sold 6.5 million visas* without any verification... yeah, a blessing. *more than any other country in the EU
If you can tell what's wrong here, you're better than 99.999% of CS grads. And probably need to schedule an yearly medical checkup.
int i = 5;
i = i++ + ++i;
printf("%d\n", i);
Once you push through the crypto gaslighting, you realise there's no meaningful tech here at all all, and the whole of it just gambling, regulatory arbitrage, and scams.
Torching the planet to sell expensive entries in a database really is as stupid as it seems.
*** The AI challenge ***
Some people say today that AI writes 10%, 30%, 50%, or even 80% of code for them today. I'm not even close to these numbers. It probably makes my coding faster by 1-2% but no more. However, it's possible that I use AI in the wrong way, or your AI coding assistant tool is better than mine.
So, here's a challenge. We have a function in IntelliJ IDEA Community Edition, UNeDfaValueEvaluator.BuilderEvaluator#calculateBuilder. Here it is:
https://t.co/hGmzovM30C
Note: take exactly this revision, not a newer one, as I may solve it by myself in the future.
The problem: the function is recursive and sometimes eats a lot of stack. In particular, there's a test UStringEvaluatorWithSideEffectsTest#test many appends which eats more than 1000 frames. As a result, it occasionally fails with StackOverflowError. Here's the link to the test:
https://t.co/D8YYIuvXFv
The task: make your AI coding tool, whatever it is, to rewrite the calculateBuilder function to a semantically equivalent one, which uses much less stack (at least 2x less) for the same test many appends test. Ideally, make it non-recursive completely, but making it 'less recursive' also counts. You may guide your tool with a series of prompts or fix small mistakes by yourself, but the problem should be essentially solved by AI, not by you. Also, you should not edit the test, or anything outside the BuilderEvaluator class. If you need to declare additional functions or data structures, feel free to declare them inside the class or even inside the original function.
An additional hint: the stacktrace during the StackOverflowError looks like this:
...
at calculateBuilder(UNeDfaValueEvaluator.kt:364)
at calculateBuilder(UNeDfaValueEvaluator.kt:302)
at calculateBuilder(UNeDfaValueEvaluator.kt:364)
at calculateBuilder(UNeDfaValueEvaluator.kt:374)
at calculateBuilder(UNeDfaValueEvaluator.kt:302)
at calculateBuilder(UNeDfaValueEvaluator.kt:364)
at calculateBuilder(UNeDfaValueEvaluator.kt:302)
at calculateBuilder(UNeDfaValueEvaluator.kt:364)
at calculateBuilder(UNeDfaValueEvaluator.kt:374)
at calculateBuilder(UNeDfaValueEvaluator.kt:302)
...
You and your tool may use this information if you find it helpful.
I find this task pretty suitable for AI. It's well formulated and short. It does not require the deep knowledge of the project. You don't need to understand anything outside of this source file (aside from common Kotlin knowledge), so it will easily fit into any context window. I think you may even skip importing the whole project and simply feed one file to your tool. On the other hand, it's not a common 'Yet another TODO list app' sample which is usually used to promote AI. It's a real task from real enterprise development.
My AI tool was not able to solve it. It generated the compilable code, but it was not nearly equivalent. Probably I haven't tried enough or I used wrong prompts, so you might be more lucky.
To test your solution, you may run other tests inside UStringEvaluatorWithSideEffectsTest, as they cover this method more or less well. Alternatively, you can post your solution (as a gist or whatever) in the comments, and I will run tests for you.
I think this might be an interesting AI experiment. Please repost if you agree with me.
After 12 years at Red Hat, it’s time to move on. Tomorrow, July 4 is JRuby’s Independence Day! I’m going to need your help to keep the JRuby project going. Sign up for a sponsorship or contact me about commercial support today. JRuby needs you and so do I! ❤️
@migueldeicaza Have you read Side by Side: Parallel Histories of Israel-Palestine? Seems like a good one if only for the format (literally side by side narratives).
@Domt301@nunu_berlin On my (now ex-) team it was recent remote hires. We’ve just publicly announced new features a week earlier and had tons of stuff left to do.