361 karma · joined April 10, 2025
#!/bin/bash
file="$1"
model=$(sed -n '2p' "$file" | sed 's/^# \*//')
prompt=$(tail -n +3 "$file")
curl -s https://api.anthropic.com/v1/messages \
-H "x-api-key: $ANTHROPIC_API_KEY" \
-H "content-type: application/json" \
-H "anthropic-version: 2023-06-01" \
-d "{
\"model\": \"$model\",
\"max_tokens\": 1024,
\"messages\": [{\"role\": \"user\", \"content\": $(echo "$prompt" | jq -Rs .)}]
}" | jq -r '.content[0].text'
hello.prompt #!/usr/local/bin/promptrun
# claude-sonnet-4-20250514
Write a haiku about terminal commands.I apologize for the writing style, don't take it personally, just every devtool product I see on HN nowadays fails for this particular reason.
Let's be honest, all tries to bring a cpython alternative failed (niche boosters like PyPy is a separate story, but it's not up-to-date, and not entirely exact). For some reason, people think that 1:1 compatibility is not critical and too costly to pursue (hello, all LLVM-based compilers). I think, it's doable and there's a solid way to solve it. What if Astral thinks so too?
[0] https://github.com/openplanetdata/osm/blob/924d680ff8df6263f...
You just can't measure it properly, outside of experiments and building your own assessment within your context. All the recommendations here just don't work. "Try all of them, stick with one for a while, don't forget to retry others on a regular basis" - that's my moto today.
Cursor (as an agent/orchestrator) didn't work for me at all (Python, low-level, no frameworks, not webdev). I fell in love with Windsurf ($60 tier initially). Switched entirely to JetBrains AI a few days ago (vscode is not friendly for me, PyCharm rocks), so happy about the price drop.
So, right now, you have two options to log:
1. `logger.debug(f'Processing {x}')` - looks great, but evaluates anyway, even if logging level > `logging.DEBUG`;
2. `logger.debug('Processing %s', x)` - won't evaluate till necessary.
What would be the approach with t-strings in this case? Would we get any benefits?