frontpage.
newsnewestaskshowjobs

Made with ♥ by @iamnishanth

Open Source @Github

fp.

Open in hackernews

Use Python for Scripting

https://hypirion.com/musings/use-python-for-scripting
2•birdculture•2d ago

Comments

zahlman•2d ago
Dupe: https://news.ycombinator.com/item?id=46176113
mubou2•2d ago
How do you handle packages? I want scripts to a be a single file with a shebang, not a repo with a requirements.txt that I need to run in a venv. To me, this is the biggest blocker to using Python for any non-trivial scripting (which is precisely the kind where I wouldn't want to use bash), but I'd like to know how others deal with it.

C# scripts let you reference packages in a comment at the top of the file, for example:

https://devblogs.microsoft.com/dotnet/announcing-dotnet-run-...

eternityforest•2d ago
What can you do with bash that isn't in the stdlib of python?

Generally the only nontrivial scripting I ever do is associated with a larger project, so I often already have a pyproject.toml and a UV environment, and I just add the dependencies to the dev group.

mubou2•2d ago
Well, that's kind of what I mean. For scripts in a python project, you can freely use whatever packages you need. But for one-off scripts, if you need bs4 or something, you're screwed. Either your script now has external dependencies or it requires special tooling.

It just feels strange that C# of all languages is now a better scripting tool than Python, at least out of the box. I did notice uv has exactly the feature I'm looking for, though it's obviously third-party:

https://docs.astral.sh/uv/guides/scripts/#declaring-script-d...

Is everyone just using uv now instead of pip, perhaps? Or is just another alongside pipenv, conda, poetry, etc.? (Python's not my main these days, so I'm out of the loop.)

eternityforest•1d ago
UV is taking over really fast, it seems to be much more popular any other option.

I suspect conda still has some market share too but I've never needed it.

chillaranand•1d ago
You can specify requirements at the top of file and uv can run the script after automatically installing the dependencies.

https://avilpage.com/2025/04/learn-python-uv-in-100-seconds....

Show HN: Git-scope – Blazing TUI to manage 50 Git repos without CD-ing dirs

https://github.com/Bharath-code/git-scope
1•iam_pbk•31s ago•0 comments

Bringing USDT Power to Parca

https://www.polarsignals.com/blog/posts/2025/12/10/usdt-deep-dive
1•gnurizen•3m ago•1 comments

Show HN: Grok-CLI-MCP – MCP server wrapping Grok CLI (alternative to direct API)

https://github.com/BasisSetVentures/grok-cli-mcp
1•changxu•5m ago•0 comments

CEOs Are All-In on AI

https://www.wsj.com/articles/ceos-are-all-in-on-ai-f3882564
1•gmays•5m ago•0 comments

DNP achieves 1.4nm semiconductor process without EUV

https://www.afp.com/en/infos/dnp-achieves-10nm-line-pattern-resolution-nanoimprint-template-cutti...
2•Croftengea•5m ago•0 comments

LibGodot – Embed Godot Engine Everywhere (GodotCon 2025) [video]

https://www.youtube.com/watch?v=L06KBOWCsSk
1•gudzpoz•6m ago•0 comments

Testing S3 ABAC Locally

https://iam.cloudcopilot.io/posts/test-s3-abac-locally-with-iam-lens
1•davidjkerber•7m ago•1 comments

Building Audit Logs with CDC and SCD Type 2

https://www.artie.com/blogs/how-to-build-audit-logs-using-cdc-and-scd-type-2
4•dfallon•8m ago•0 comments

Open-source, no-account video meetings using SvelteKit and Cloudflare

https://videome.video
1•MrRoyce101•9m ago•1 comments

Regulating Commercial Spyware Through Export Controls

https://www.lawfaremedia.org/article/regulating-commercial-spyware-through-export-controls
1•hn_acker•10m ago•0 comments

"UI is Pre-AI" is so real. Look at this Siri like bubble [video]

https://www.youtube.com/watch?v=1I5trPGEu50
1•hellorahulk•10m ago•0 comments

Real UDP Packet loss test using WebRTC (Beta)

https://vishnu.pro
1•vishnu351•11m ago•0 comments

Optical Context Compression Is Just (Bad) Autoencoding

https://arxiv.org/abs/2512.03643
1•atbhtunnm•11m ago•1 comments

Facilitating AI Adoption at Imprint

https://lethain.com/company-ai-adoption/
1•funcimp•13m ago•0 comments

We don't know what most microbial genes do. Can genomic language models help?

https://www.owlposting.com/p/we-dont-know-what-most-microbial
2•abhishaike•14m ago•0 comments

At this ultramarathon, runners tackle 31 miles and eat at nine Taco Bells

https://www.washingtonpost.com/dc-md-va/2025/11/30/dc-taco-bell-50k-ultramarathon/
2•woldemariam•17m ago•0 comments

Show HN: MimicKit – RL framework for humanoid motion imitation

https://github.com/xbpeng/MimicKit
3•xbpeng4•18m ago•0 comments

PSFirebirdToMSSQL – 6x faster than Linked Servers (21 min → 3:24 min)

https://github.com/gitnol/PSFirebirdToMSSQL
1•hngitnol•18m ago•1 comments

England Historic Aerial Photo Explorer

https://historicengland.org.uk/images-books/archive/collections/aerial-photos/
1•davemateer•19m ago•0 comments

Qwen3-Omni-Flash-2025-12-01:a next-generation native multimodal large model

https://qwen.ai/blog?id=qwen3-omni-flash-20251201
2•pretext•20m ago•0 comments

California Enacted AI Bills. Now Officials Must Define Them

https://www.lawfaremedia.org/article/california-enacted-ai-bills-now-officials-must-define-them
2•hn_acker•20m ago•0 comments

Greco for FHE and ZK Consistency

https://blog.enclave.gg/enclave-cryptography-greco-fhe-zk/
2•badcryptobitch•21m ago•0 comments

All 187,460 Miles of Road That Led to Rome, Mapped

https://www.nytimes.com/2025/12/09/science/archaeology-roman-empire-roads.html
2•bookofjoe•22m ago•1 comments

Why Your TV Will Probably Never Be Better Than It Is Now

https://lifehacker.com/tech/why-your-tv-will-never-be-better-than-it-is-now
3•whynotmaybe•22m ago•2 comments

Gold, guns and cartels: The battle for a billion-dollar mine

https://english.elpais.com/international/2025-11-06/gold-guns-and-cartels-the-battle-for-a-billio...
2•PaulHoule•22m ago•0 comments

Copyright Lawsuits over Embedding Are Still a Thing

https://blog.ericgoldman.org/archives/2025/12/copyright-lawsuits-over-embedding-are-still-a-thing...
2•hn_acker•23m ago•0 comments

Show HN: Agent‑Flow – prompts and workflows for any MCP‑compatible AI agent

https://agentflowhq.dev
1•sileo-oss•24m ago•0 comments

Simpler.Grants.gov

https://simpler.grants.gov/
3•gregsadetsky•24m ago•1 comments

Claude Code supports modular rules in .claude/rules/

https://code.claude.com/docs/en/memory
1•freewizard•25m ago•0 comments

Foundation model for health prediction using Apple Watch data

https://9to5mac.com/2025/12/09/researchers-used-3-million-days-of-apple-watch-data-to-train-a-dis...
5•beekay•25m ago•1 comments