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

Lessons We Learned Building a RAG Assistant Without a Separate Vector Database

https://blog.devgenius.io/lessons-we-learned-building-a-rag-assistant-without-a-separate-vector-d...
1•HermitX•1m ago•0 comments

Salesforce lays off employees in a new round of cuts

https://www.businessinsider.com/salesforce-cuts-jobs-agentforce-2026-6
1•toomuchtodo•3m ago•0 comments

Fundamental of Running Agentic Loops

https://www.beontheloop.com/deck
1•shekharupadhaya•13m ago•2 comments

Show HN: Draft an all-time XI and simulate a World Cup run

https://www.perfectworldcup.com
1•ASquare•18m ago•0 comments

Connecticut Approves Plug-In Solar

https://cleantechnica.com/2026/05/30/connecticut-approves-plug-in-solar-its-so-exciting/
2•toomuchtodo•19m ago•1 comments

Canadians told to "Exercise a high degree of caution in Germany"

https://travel.gc.ca/destinations/germany
2•theanonymousone•21m ago•0 comments

Offline streaming speech recognition on iOS with Nvidia Nemotron 3.5 and Core ML

https://github.com/lbj96347/nemotron-3.5-asr-ios
1•lbj96347•31m ago•0 comments

Microsoft's AI chief says superintelligence is near, but won't take your job

https://www.theverge.com/podcast/944138/microsoft-ai-ceo-mustafa-suleyman-superintelligence-agi-o...
1•gnabgib•32m ago•0 comments

Microsoft AI boss no longer believes that AI will replace human workers

https://www.neowin.net/news/microsoft-ai-boss-no-longer-believes-that-ai-will-replace-human-workers/
1•bundie•33m ago•1 comments

Getting Started with OpenAI Models on Amazon Bedrock

https://developers.openai.com/cookbook/examples/partners/aws/openai_models_with_amazon_bedrock
1•gmays•38m ago•0 comments

Initial impressions of Claude Fable 5

https://simonwillison.net/2026/Jun/9/claude-fable-5/
1•mfiguiere•41m ago•1 comments

What Happens If We Break Time

https://www.youtube.com/watch?v=8T4tW67hpJY
2•Asheed•41m ago•0 comments

Fund the tools that keep the internet free

https://internetfreedom.torproject.org/
3•Cider9986•47m ago•0 comments

Grok Build

https://docs.x.ai/build/overview
2•binyu•52m ago•1 comments

Vibe coding my way to a healthy family: Introducing Gamow Labs

https://www.ddmckinnon.com/2026/06/09/vibe-coding-my-way-to-a-healthy-family-introducing-gamow-labs/
3•dmckinno•56m ago•2 comments

Show HN: This Week in Obsidian – Obsidian Newsletter Published Every Tuesday

https://thisweekinobsidian.substack.com/p/this-week-in-obsidian-25
2•boundless88•59m ago•0 comments

Who Owns the Loop?

https://cardeo.substack.com/p/who-owns-the-loop
2•cardeo•1h ago•1 comments

The Evolution of 'More Like This'

https://manticoresearch.com/blog/the-evolution-of-more-like-this/
3•snikolaev•1h ago•0 comments

The Glitch That Broke Link's Cel Shading [video]

https://www.youtube.com/watch?v=By7qcgaqGI4
2•aw1621107•1h ago•0 comments

Show HN: Master – Rails-style full-stack productivity for Node.js

https://bookbag.ai/blog/i-built-master-because-i-missed-rails
2•Rbatista•1h ago•0 comments

WWDC26 – The Small Things – Oneberri Blog

https://blog.oneberri.com/posts/wwdc26-the-small-things
3•tambourine_man•1h ago•0 comments

Intel is reportedly providing three million chips to Google

https://www.pcgamer.com/hardware/google-reportedly-orders-at-least-three-million-chips-from-intel...
3•geoffbp•1h ago•0 comments

Show HN: MLL – image compression that runs well enough on DOS

https://github.com/guilt/MLL
2•vkaku•1h ago•0 comments

Google Alternative Search Engines in 2026

https://medium.com/@thesuperrepemail/8-google-alternative-search-engines-in-2026-0670c2af6e12
2•rajsuper123•1h ago•1 comments

Comparing Email Address Validating Regular Expressions (2006)

https://fightingforalostcause.net/content/misc/2006/compare-email-regex.php
3•mmh0000•1h ago•0 comments

QDRV – Quantum Dynamic Range Video

https://github.com/qdrv/QDRV
2•qdrv2026•1h ago•0 comments

I Am Rich

https://en.wikipedia.org/wiki/I_Am_Rich
3•hentrep•1h ago•0 comments

SafeAgentDB – Isolated databases for every AI agent branch

https://github.com/Aidan945/SafeAgentDB
2•zarskia9•1h ago•0 comments

Karmelo Anthony sentenced to 35 years in TX track meet murder of Austin Metcalf

https://www.cbsnews.com/texas/news/karmelo-anthony-sentenced-frisco-track-meet-murder/
3•donsupreme•1h ago•1 comments

Claude and ChatGPT are getting worse. It's not your imagination

https://www.artificialstudio.ai/blog/chatgpt-claude-getting-worse-compute-crisis
2•artificialstudi•1h ago•0 comments