frontpage.
newsnewestaskshowjobs

Made with ♥ by @iamnishanth

Open Source @Github

fp.

Open in hackernews

Ask HN: Which function definition keyword do you prefer, def or fn?

1•winwang•11mo ago
I'm curious about what people think of `def` vs `fn`, two short keywords for starting function definitions.

...Or maybe we should subscribe to the church of `df`, haha.

Comments

sitkack•11mo ago
def could be for lots of things, fn is for functions. I don't think it matters much as long as you have one. C would have been so much easier to parse. Just copy Zig or Rust.
butlersean•11mo ago
def means define, could be used to define all kinds of things

fn isnt a legitimate short form of function

fun doesnt work because of the amusement factor

func is the only alternative we have left

sitkack•11mo ago
How about unicode or emojis?

These don't have the full fidelity as hn scrubs emojis

add = (a, b) -> a + b

a, b ⟹ a + b

λ add(a, b): ↪ a + b

johncoltrane•11mo ago
"def" is too generic.

"fn" is too cryptic.

"function" is better than the two.

MultifokalHirn•11mo ago
Agreed

CrabTrap

https://github.com/brexhq/CrabTrap/
1•handfuloflight•2m ago•0 comments

Pixi: One Package Manager for Python and C/C++ Libraries

https://codecut.ai/uv-pixi-comparison/
1•lululpac•2m ago•0 comments

What's new in JavaScript (and what's coming next)

https://neciudan.dev/whats-new-in-javascript
1•theanonymousone•3m ago•0 comments

Emergency Prices: How Private Equity Captured the Ambulance Market

https://www.thebignewsletter.com/p/code-red-why-your-city-cant-affordor
1•xbmcuser•8m ago•0 comments

Gist.Science – Popular Science for All ArXiv/BioRxiv/MedRxiv Papers

https://gist.science/
1•gistscience•8m ago•0 comments

Roundtables: Unveiling the Things That Matter in AI

https://www.technologyreview.com/2026/04/21/1135486/roundtables-unveiling-the-10-things-that-matt...
1•joozio•9m ago•0 comments

Aspirin can reduce the risk of cancer – and we're starting to understand why

https://www.bbc.com/future/article/20260420-cancer-how-aspirin-may-be-a-powerful-new-weapon-again...
1•ranit•13m ago•0 comments

Show HN: A P2P Network Where Agents Collaborate on Code Optimization

https://community.computer/
2•lftherios•16m ago•0 comments

High Performance Git

https://gitperf.com/
1•handfuloflight•16m ago•0 comments

Geo Content Writer: a backlog-first system for AI visibility content

https://github.com/dageno-agents/geo-content-writer
3•timdageno•19m ago•0 comments

Show HN: Data-driven GEO and marketing agent platform

https://dageno.ai
5•timdageno•28m ago•0 comments

SpaceX is working with Cursor and has an option to buy the startup for $60B

https://techcrunch.com/2026/04/21/spacex-is-working-with-cursor-and-has-an-option-to-buy-the-star...
1•thiele•29m ago•0 comments

Reflecting on 50 years of environmental innovation

https://blogs.sas.com/content/sascom/2026/04/22/reflecting-on-50-years-of-environmental-innovation/
1•salkahfi•30m ago•0 comments

DuckDB Kernel – analytical execution runtime for Jupyter

https://github.com/hugr-lab/duckdb-kernel
1•articsputnik•34m ago•0 comments

XOR'ing a register with itself is the idiom for zeroing it out. Why not sub?

https://devblogs.microsoft.com/oldnewthing/20260421-00/?p=112247
3•ingve•34m ago•0 comments

Ask HN: Is USA at war with the rest of the world now?

2•roschdal•35m ago•1 comments

Creem Magazine is back in print and online after 33 years (2022)

https://sandboxworld.com/creem-magazine-is-back-in-print-and-online-after-33-years/
1•bjhess•39m ago•0 comments

Claude Cowork against your own cloud inference provider

https://claude.com/docs/cowork/3p/overview
2•nrsapt•40m ago•2 comments

Show HN: GPT-Image-2 Prompts

https://github.com/magiccreator-ai/awesome-gpt-image-2-prompts
1•kevinhacker•43m ago•0 comments

We found most apps send PII to LLMs and built a 2 line fix

https://getredacta.com/
2•SandiaDevGroup•50m ago•1 comments

Mistral Vibe

https://mistral.ai/products/vibe
2•hecanjog•50m ago•0 comments

Zappa: An AI powered mitmproxy

https://geohot.github.io//blog/jekyll/update/2026/04/15/zappa-mitmproxy.html
1•WithinReason•50m ago•0 comments

Show HN: Vibe Coding Games in Minutes

https://thornwood.bsct.so/
1•amin_biscuit•51m ago•0 comments

Valve's new Proton 11 ARM beta gets Hollow Knight on the Ayn Odin 2 Portal

https://www.notebookcheck.net/Valve-s-new-Proton-11-ARM-beta-gets-Hollow-Knight-Silksong-running-...
1•happymellon•54m ago•1 comments

The PowerShell-Haters Handbook

https://telcontar.net/Misc/rants/PowerShell
3•Mr_Minderbinder•55m ago•0 comments

Pioneer: Vibetune Your LLMs

https://pioneer.ai/
1•handfuloflight•56m ago•0 comments

Agents with Taste – How to transfer taste into an AI

https://emilkowal.ski/ui/agents-with-taste
2•dglzab•1h ago•0 comments

The FeMo-cofactor and classical and quantum computing

https://quantumfrontiers.com/2026/03/12/the-femo-cofactor-and-classical-and-quantum-computing/
1•EvgeniyZh•1h ago•0 comments

The Three Layers of Software Engineering

https://layers.lifebeyondfife.com/
1•lifebeyondfife•1h ago•0 comments

Open WebUI v0.9.0 adds desktop app with task scheduling

https://github.com/open-webui/open-webui/releases/tag/v0.9.0
2•simonjgreen•1h ago•0 comments