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•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

Literary AI Scandal Changes Everything

https://www.theatlantic.com/books/2026/05/granta-ai-fiction-book-scandal-changes-everything/687243/
1•JumpCrisscross•24s ago•0 comments

The State of CSS Centering in 2026

https://css-tricks.com/the-state-of-css-centering-in-2026/
1•soheilpro•2m ago•0 comments

Anthropic Code with Claude showed off coding's future–whether you like it or not

https://www.technologyreview.com/2026/05/21/1137735/anthropics-code-with-claude-showed-off-coding...
1•bookofjoe•2m ago•0 comments

Turkey court removes leader of opposition as Erdoğan tightens grip

https://www.ft.com/content/c1dce05a-c5f1-4b59-96f5-d9585ab64e91
1•JumpCrisscross•3m ago•0 comments

Ask HN: Who wants to hop in this 850 line chat room?

1•smalltorch•3m ago•1 comments

Ask HN: What is the least sycophantic frontier LLM?

1•Michelangelo11•3m ago•0 comments

Computational Complexity in Electronic Structure(2012)

https://arxiv.org/abs/1208.3334
1•o4c•4m ago•0 comments

Building Context-Aware Search in Python with LLM Embeddings and Metadata

https://machinelearningmastery.com/building-context-aware-search-in-python-with-llm-embeddings-me...
1•eigenBasis•6m ago•0 comments

Waymo's autonomous taxis remain drawn to floodwater

https://boingboing.net/2026/05/21/waymos-autonomous-taxis-remain-strangely-drawn-to-floodwater.html
1•DropDead•6m ago•0 comments

Software research must become more reusable

https://www.fightforthehuman.com/software-research-must-become-more-reusable/
1•mooreds•7m ago•0 comments

Microsoft is letting Office users remove an annoying Copilot button

https://www.theverge.com/news/935967/microsoft-copilot-floating-button-office-excel-apps-removal
1•newer_vienna•8m ago•0 comments

Ask HN: We need a standard way to say how much AI was used in a PR

1•heeton•8m ago•1 comments

Anthropic, Microsoft in talks about Maia AI chip deal

https://www.cnbc.com/2026/05/21/anthropic-microsoft-maia-200-ai-chip.html
1•gmays•9m ago•0 comments

The Life of a Bolt(2016) [video]

https://www.youtube.com/watch?v=iptAkpqjtMQ
1•num42•9m ago•0 comments

Ex-Samsung: memory crisis could be over thanks to a 'surge' in Chinese capacity

https://www.pcgamer.com/hardware/memory/former-samsung-boss-predicts-the-memory-crisis-could-be-o...
2•rjzzleep•11m ago•0 comments

Chunkah: OCI building tool for content-based layers

https://github.com/coreos/chunkah
1•jpitz•12m ago•0 comments

Phantasy Star IV – 1993 Developer Interviews

https://shmuplations.com/phantasystariv/
1•speckx•12m ago•0 comments

Show HN: Videowright – we made our launch video with Claude Code (open source)

https://github.com/scosman/videowright
1•scosman•12m ago•0 comments

Corsair DDR5 memory with 6000 MT/s with Chinese modules

https://videocardz.com/newz/corsair-vengeance-ddr5-module-spotted-with-chinese-cxmt-memory
3•rjzzleep•13m ago•0 comments

The Prompt Changed. No One Noticed. Everything Got Worse

https://www.promptvc.io/blog/introducing-promptvc
1•justicea83•14m ago•0 comments

Uto – Execute cross-venue crypto strategies from one prompt

https://auto.fun/
1•borkodotfun•14m ago•0 comments

Playing with my daughter and ended up with an idea

https://storypals.fun
1•hernol•14m ago•0 comments

Ebola outbreak spirals out of control: how might it have started?

https://www.nature.com/articles/d41586-026-01645-y
1•bookofjoe•15m ago•1 comments

Idea: Subreddits as curator blogs for the AI era

https://old.reddit.com/r/ideas/comments/1tkie1c/idea_subreddits_as_curator_blogs_for_the_ai_era/
1•amichail•15m ago•0 comments

Riot's Vanguard update reportedly disables DMA cheat hardware via IOMMU

https://videocardz.com/newz/riot-games-on-valorant-dma-cheat-firmware-block-congrats-to-the-owner...
1•encrux•16m ago•0 comments

The Spread of Christianity Animated

https://www.openculture.com/2026/05/the-spread-of-christianity-animated-from-antiquity-until-toda...
3•leopoldj•18m ago•0 comments

We hardened zizmor's GitHub Actions static analyzer

https://blog.trailofbits.com/2026/05/22/we-hardened-zizmors-github-actions-static-analyzer/
3•woodruffw•18m ago•0 comments

A hacker group is poisoning open source code at an unprecedented scale

https://www.wired.com/story/teampcp-software-supply-chain-attack-spree-github/
3•sbulaev•22m ago•0 comments

Nvidia Vera Rubin Bill of Materials and the Investment Opportunities

https://leoinai.substack.com/p/nvidia-vera-rubin-bill-of-materials-morgan-stanley
1•lboquillon•22m ago•0 comments

Second tranch of UFO files declassified

https://www.war.gov/News/Releases/Release/Article/4499305/department-of-war-publishes-second-rele...
1•pandoro•23m ago•1 comments