Hacker News new | ask | show | jobs
by djriley 41 days ago
That's interesting, I thought Claude or Codex would be really good with it. I've been doing some FPC/Lazarus work with Gemini 3.8 Flash, working on a program that creates STLs, DXFs, and SVGs of involute gears for machining or 3-d printing with a nice "Gear Designer" and visual preview and the code has been perfect. I enjoy building the UI and write the UI logic myself, but the exporters and gear calculations are beyond my capabilities and everything Gemini's done has been basically flawless. I have no dependencies beyond the RTL and LCL, not using any libraries to help with the format exports. Seem's like the opinion here is that Claude and ChatGPT do way better code than Gemini, so I'm surprised you've had issues.

The only minor problems I've had is Gemini went through a phase where it was using semi-colons improperly in if statements, which is something everybody messes up with Pascal, so forgivable, I'm sure if I was using an agent rather than the web interface it would have figured it out from compiler errors right away. That and sometimes with UI stuff it would hallucinate methods or properties for components that are part of commercial delphi components, but I've only ran in to this 2 or 3 times.

When I first started on this project I believe we were on early Gemini 3 and I will say it's handling of Pascal constructs was quite rough, it seemed to have a lot of trouble with the verbosity. Lot's of extra tokens to grok the structure vs something like C or Go. But from 3.5 onwards it's been flawless.

Maybe it's just one of those things Gemini is simply better at. I'd much rather read Gemini prose than Claude, and Pascal is definitely closer to natural language than something like Rust might be. On the other end of the language spectrum I find it is incredibly good with Go as well, I think Google might have a bit of an edge as far as high quality training material for that language goes.

3 comments

> The only minor problems I've had is Gemini went through a phase where it was using semi-colons improperly in if statements, which is something everybody messes up with Pascal, so forgivable, I'm sure if I was using an agent rather than the web interface it would have figured it out from compiler errors right away.

Thank heavens, I wasn't the only person who's seen that. I thought I was the one hallucinating! The Gemini agent did that for a bit, too.

Generally, for Free Pascal and Lazarus, I have had my best luck scaffolding the ideas I want, then letting the agent move forward with them. But yes, the main frontier models are getting pretty good at Pascal. I'm planning to try DeepSeek and a lot of open models soon, but I think they'll return good results too.

Gemini 3.8 Flash as used inside Google's AI Studio is significantly better at certain tasks at which Claude Sonnet 5.5 is not. However, Flash makes more mistakes and needs more guidance.

I sometimes use Gemini and then correct with Sonnet.

As an aside, as an ex Delphi/Pascal programmer I find idiomatic app-level Rust to be very readable. It can degenerate into a sigil soup but as long as generics and macros are kept in check its no worse than Pascal.