frontpage.
newsnewestaskshowjobs

Open Source @Github

fp.

Open in hackernews

What I'm Finding About LLM Code Style and Token Costs

https://www.jimmont.com/llm-style-token-costs
18•jimmont•3h ago

Comments

jimmont•3h ago
Reviewing my experience using LLMs, to improve results, reduce churn and token usage. Discovering the gap between what they produce and what I'd normally do is a significant source of output cost, regressions and surfacing a bit of why and how to fix it. Notably Claude is remarkably bad at/about this, producing errors even when directed toward modern Web solutions—that cut token use a lot, like toward 90% occasionally, which together with the frustrating churn led me to review how I'm working, what is happening and generate this article.
ftaisdeal•3h ago
Excellent article, with impeccable analysis, that will fundamentally change how I work with Claude myself. I have already learned to give Claude both a "do" and a "don't" in order to limit unpleasant surprises.
defytonofficial•3h ago
This matches my experience. I've been using OpenRouter with GPT-4o for an image verification service, and the prompt engineering choices have a measurable impact on cost.

One thing I found: asking the model to respond in structured JSON (with a strict schema) vs free-form text cuts token output by ~40% on average. The model stops "explaining itself" and just gives you the answer.

Also noticed that including a reference image in vision calls roughly doubles the input cost but improves accuracy enough that you save on retries. Net cost ended up lower for my use case.

Curious if you've measured the difference between asking for "concise" output vs actually constraining the response format.

bombcar•1h ago
I just had Claude try to process an RSS feed and it was about to ZALGΌ IS TOƝȳ THË PO NY itself and I pointed that out and it immediately said "Wordpress has a json interface, I'll use that".

You need to know the shape of the solution ...

vadansky•47m ago
If feels like the photoshop paint bucket tool.

If you draw a sloppy circle and fill it in, it'll "escape" and try to paint the whole canvas (and back in the day would get my slow computer stuck until I spam "esc").

You have to be able to draw a good circle to use it.

anttiharju•46m ago
Context about tony the pony

https://stackoverflow.com/questions/1732348/regex-match-open...

datadrivenangel•1h ago
The code comments are an especially brutal thing to add cruft and bloat and confuse the coding agents.

And it feels like claude code has gotten more verbose with the multiline comments lately

OpenAI unveils its first custom chip, built by Broadcom

https://techcrunch.com/2026/06/24/openai-unveils-its-first-custom-chip-built-by-broadcom/
615•jamdesk•10h ago•356 comments

Anthropic says Alibaba illicitly extracted Claude AI model capabilities

https://www.reuters.com/world/china/anthropic-says-alibaba-illicitly-extracted-claude-ai-model-ca...
175•htrp•8h ago•329 comments

LuaJIT 3.0 proposed syntax extensions

https://github.com/LuaJIT/LuaJIT/issues/1475
95•phreddypharkus•3h ago•51 comments

Cloudflare launched self-managed OAuth for all

https://blog.cloudflare.com/oauth-for-all/
49•terryds•2h ago•10 comments

Blogging can just be stating the obvious

https://blog.jim-nielsen.com/2026/blogging-stating-the-obvious/
122•Curiositry•4h ago•49 comments

Show HN: Write SaaS apps where users control where their data is stored

https://github.com/wolfoo2931/linkedrecords/
21•WolfOliver•5d ago•0 comments

Dostoyevsky isn't difficult

https://www.autodidacts.io/dostoyevsky-isnt-difficult/
81•surprisetalk•2d ago•70 comments

Qualcomm to Acquire Modular

https://www.reuters.com/business/qualcomm-buy-ai-startup-modular-2026-06-24/
170•timmyd•14h ago•41 comments

Mixing Visual and Textual Code

https://arxiv.org/abs/2603.15855
23•doppioandante•3h ago•3 comments

RubyLLM: A Ruby framework for all major AI providers

https://rubyllm.com/
361•doener•13h ago•60 comments

45°C cooling design cuts data center water use to near zero

https://blogs.nvidia.com/blog/liquid-cooling-ai-factories/
244•nitin_flanker•14h ago•168 comments

Zombie unicorns are haunting Silicon Valley

https://www.economist.com/business/2026/06/21/zombie-unicorns-are-haunting-silicon-valley
20•andsoitis•2h ago•4 comments

PR spam today looks like email spam in the early 2000s

https://www.greptile.com/blog/prs-on-openclaw
194•dakshgupta•14h ago•113 comments

GLM-5.2 is a step change for open agents

https://www.interconnects.ai/p/glm-52-is-the-step-change-for-open
165•vantareed•2d ago•93 comments

Computer use in Gemini 3.5 Flash

https://blog.google/innovation-and-ai/models-and-research/gemini-models/introducing-computer-use-...
194•swolpers•11h ago•121 comments

Ending respiratory infections

https://blog.interceptfund.com/p/ending-respiratory-infections
111•EthanFantl•3h ago•44 comments

Optimizing [sqlx:test] rebuild time

https://kobzol.github.io/rust/2026/06/21/optimizing-sqlx-test-rebuild-time.html
6•ibobev•2d ago•0 comments

What I'm Finding About LLM Code Style and Token Costs

https://www.jimmont.com/llm-style-token-costs
18•jimmont•3h ago•7 comments

Ask HN: Where is our profession (programmer) going?

30•syntaxbush•1h ago•21 comments

GTA 6 Physical Copies Won't Include a Disc, Will Just Be a Code in a Box

https://www.ign.com/articles/grand-theft-auto-6-physical-copies-wont-include-a-disc-will-just-be-...
17•jmsflknr•43m ago•5 comments

Matt's Script Archive: The Scripts That Reshaped the Web

https://tedium.co/2026/06/22/matts-script-archive-retrospective/
25•1317•2d ago•9 comments

Bible as RAG Database

https://www.crosscanon.com/
66•jacksonastone•2h ago•35 comments

The Xteink X4 E-Ink Reader

https://blog.omgmog.net/post/xteink-x4-e-ink-reader/
195•felixdoerp•12h ago•120 comments

Writers and Drugs

https://lithub.com/are-writers-intrinsically-vulnerable-to-alcohol-and-drugs/
14•dang•2h ago•6 comments

Crawling BitTorrent DHTs for Fun and Profit [pdf]

https://www.usenix.org/legacy/event/woot10/tech/full_papers/Wolchok.pdf
77•dgellow•3d ago•32 comments

15 sorting algorithms in 6 minutes (2013) [video]

https://www.youtube.com/watch?v=kPRA0W1kECg
11•akkartik•1d ago•0 comments

Exploring the internal representations of Pangram 3.3.2

https://www.pangram.com/pangram-space
16•krackers•3h ago•5 comments

Show HN: Nub – A Bun-like all-in-one toolkit for Node.js

https://github.com/nubjs/nub
218•colinmcd•14h ago•63 comments

Medical students are using popular research tool to pump out misleading studies

https://www.science.org/content/article/medical-students-are-using-popular-research-tool-pump-out...
6•rndsignals•2h ago•2 comments

Elastic lays off 7% of employees

https://www.elastic.co/blog/ceo-ash-kulkarni-announcement-to-elastic-employees
163•dakrone•6h ago•146 comments