frontpage.
newsnewestaskshowjobs

Open Source @Github

fp.

Open in hackernews

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

1•winwang•1y 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•1y 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•1y 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•1y 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•1y ago
"def" is too generic.

"fn" is too cryptic.

"function" is better than the two.

MultifokalHirn•1y ago
Agreed

The formation of human populations in South and Central Asia

https://www.science.org/doi/10.1126/science.aat7487
1•teleforce•4m ago•0 comments

Show HN: Hatchr – Share Claude Designs with a public link

https://www.hatchr.link/
1•othmanosx•4m ago•0 comments

Show HN: Noise Lang, JIT stochastic programing language

https://noiselang.com/
1•manucorporat•5m ago•0 comments

PrismLib – semantic LLM cache and cluster mesh that cuts token spend

https://github.com/insightitsGit/prismlib
1•insightits•6m ago•0 comments

Economists have pushed for prediction markets. They're not what they'd hoped for

https://www.cnn.com/2026/06/21/business/prediction-markets-economists
1•JumpinJack_Cash•6m ago•0 comments

Routing for serverless servers with Pingora, Envoy, and Spanner

https://modal.com/blog/serverless-servers
1•birdculture•8m ago•0 comments

EU Trade Explorer

https://tradedashboard.eu/
1•abracadabrapouf•9m ago•1 comments

Utility for Multi-GPU Node Configuration

https://github.com/rghosh08/nvidia-nvswitch-setup/releases/tag/v0.1.0
1•rghosh8•14m ago•0 comments

Chief Mouser to the Cabinet Office

https://en.wikipedia.org/wiki/Chief_Mouser_to_the_Cabinet_Office
2•modzu•18m ago•0 comments

Build, Don't Posture

https://entertainmentindustry.ai/
2•DavidFrangiosa•19m ago•1 comments

We are capitalist, not socialist

https://www.thepromisetoamerica.com
2•donsupreme•23m ago•2 comments

U.S. Proposes to Drop Brake Pedal Requirements for Self-Driving Vehicles

https://www.cnbc.com/2026/06/25/us-proposes-to-drop-brake-pedal-requirements-for-self-driving-veh...
1•karakoram•24m ago•0 comments

Where Will Europe's Heatwave Be Most Deadly?

https://www.economist.com/graphic-detail/2026/06/25/where-will-europes-heatwave-be-most-deadly
1•karakoram•25m ago•1 comments

FIFA World Cup website in 2002

https://xcancel.com/WebDesignMuseum/status/2070517388290806137
1•airstrike•27m ago•1 comments

Add MCP Apps to Your AI SDK Application

https://vercel.com/kb/guide/ai-sdk-mcp-apps
1•flashbrew•29m ago•0 comments

Cartels of Mediocrity

https://blog.taylorwood.io/2026/06/19/social-norms-and-low-doers.html
3•1659447091•29m ago•0 comments

AI Powered Photo Gallery Without the Cloud

https://github.com/Arkalogy/best-photo-picker
1•anonu•33m ago•0 comments

I removed the vector database from my AI agent stack

https://github.com/usemoss/moss
2•philosopherr•34m ago•0 comments

Texas Public School Students Will Be Required to Read the Bible

https://www.nytimes.com/2026/06/25/us/texas-schools-book-list.html
2•droidjj•35m ago•0 comments

The Last Bottleneck Is Fear

https://runtimewire.com/article/the-last-bottleneck-is-fear
2•ryanmerket•39m ago•1 comments

The Indus Script-Computational Analysis and Interpretations (2020) [video]

https://www.youtube.com/watch?v=iF_nJ4vfG-A
1•teleforce•44m ago•0 comments

Intel's Chip Business Shows Signs of Life After Years of Struggle

https://www.nytimes.com/2026/06/26/technology/intel-turnaround.html
2•voxadam•45m ago•1 comments

Show HN: OCR.chat

https://ocr.chat/
1•nadermx•50m ago•1 comments

Thinking to recall: How reasoning unlocks parametric knowledge in LLMs

https://research.google/blog/thinking-to-recall-how-reasoning-unlocks-parametric-knowledge-in-llms/
3•krackers•50m ago•0 comments

ComAI – An open-source Linux assistant for troubleshooting with local LLMs

https://github.com/hossbit/comai-linux-assistant
2•mirhacker•53m ago•0 comments

My Addiction with Trading Apps

https://cat.strayforge.com/posts/investment-reflection/
1•litlig•54m ago•0 comments

Why It's So Hard to Add a Column in the Middle of a PostgreSQL Table

https://www.bytebase.com/blog/why-its-hard-to-add-a-column-in-the-middle-of-postgres-table/
2•jonbaer•54m ago•0 comments

Meta Patent: Prescription Lenses That Project Virtual Screens into Your Vision

https://patentlyze.com/patent/meta-holographic-ar-display-built-prescription-lenses/
2•patentlyze•56m ago•0 comments

Show HN: A shareable World Cup 2026 bracket simulator with live results

https://fifasim.com
2•bobbyy•57m ago•0 comments

With AI, researchers discover new way to detect sudden cardiac death risk

https://news.berkeley.edu/2026/06/24/with-ai-researchers-discover-new-way-to-detect-sudden-cardia...
1•hhs•59m ago•0 comments