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

If you're a button, you have one job

https://unsung.aresluna.org/if-youre-a-button-you-have-one-job/
1•nozzlegear•4m ago•0 comments

A rate-control scroll gesture for mobile reading

https://github.com/somekiwiplease/ThumbStick
1•somekiwiplease•17m ago•0 comments

The Dark Side of Open Source: SSPL, BSL, and the License-Change Problem

https://linuxidx.com/posts/the-dark-side-of-open-source-real-problems-no-hype.html
1•infoozle•23m ago•0 comments

Efficacy and Safety of Psilocybin in Treatment-Resistant Major Depression

https://jamanetwork.com/journals/jamapsychiatry/fullarticle/2846478
2•cpncrunch•26m ago•0 comments

Deterministic AI Auditing

https://claude.ai/new
1•whyharsh_•27m ago•0 comments

Show HN: Inches to MM converter for manufacturing and hardware checks

https://inches-to-mm.com
1•robot1996•32m ago•0 comments

We Scaled PgBouncer to 4× Higher Throughput

https://clickhouse.com/blog/pgbouncer-clickhouse-managed-postgres
1•saisrirampur•34m ago•0 comments

Anthropic performing prompt injection on its users

https://old.reddit.com/r/LLMDevs/comments/1udpw9h/just_got_this_response_from_claude_what_is_going/
3•murderfs•34m ago•0 comments

AI CLI that fixes broken dev tool installs

https://murderszn.github.io/sprout/
1•murderszn•39m ago•0 comments

Record-breaking solo rower Kelsey Pfendler arrives in Hawaii

https://www.hawaiinewsnow.com/2026/07/04/record-breaking-solo-rower-kelsey-pfendler-arrives-hawaii/
1•MaysonL•42m ago•0 comments

Show HN: Two-tier-memory – queryable long-term memory for AI coding agents

https://github.com/tadelstein9/two-tier-memory
1•tadelstein•43m ago•0 comments

Ubuntu 24.04 on Intel Mac

https://github.com/mozekin/apple-bce-drv/blob/aur/INSTALL-UBUNTU.md
3•mozzinator•48m ago•0 comments

Review Frontloading: Do You Love This App? Y/N

https://functionmouse.com/frontloading/
2•functionmouse•53m ago•0 comments

Bugs happen: The easy way to compare solo PQ to ECC+PQ

https://blog.cr.yp.to/20260704-bugs.html
2•zdw•1h ago•0 comments

If I designed a Commodore Phone

https://retrogamecoders.com/if-i-designed-a-commodore-phone/
3•ibobev•1h ago•1 comments

Egg consumption inversely correlated with Alzheimer's

https://pubmed.ncbi.nlm.nih.gov/42002260/
30•natbennett•1h ago•9 comments

My side quest measuring input latency with VK_EXT_present_timing

https://themaister.net/blog/2026/07/02/my-side-quest-measuring-input-latency-with-vk_ext_present_...
2•ibobev•1h ago•0 comments

Spritework on the ZX Spectrum: Rendering

https://bumbershootsoft.wordpress.com/2026/07/04/spritework-on-the-zx-spectrum-rendering/
2•ibobev•1h ago•0 comments

Benzo(a)pyrene

https://en.wikipedia.org/wiki/Benzo(a)pyrene
3•libpcap•1h ago•0 comments

Trying to buy a sandwich with HTTP 402

https://andrewacomb.substack.com/p/trying-to-buy-a-sandwich-with-http
4•acombandrew•1h ago•1 comments

Returning to Zig

https://gracefulliberty.com/articles/return-to-zig/
11•birdculture•1h ago•0 comments

CATL is building more than 200 battery swap stations every month

https://electrek.co/2026/07/04/catl-is-building-more-than-200-battery-swap-stations-every-month/
6•breve•1h ago•0 comments

French Police Dismantle Operation Behind the Defunct YggTorrent

https://torrentfreak.com/french-police-dismantle-operation-behind-the-already-defunct-yggtorrent/
2•gslin•1h ago•0 comments

Morph Reflexes

https://docs.morphllm.com/sdk/components/reflexes
3•handfuloflight•1h ago•0 comments

Return of the Nigerian Prince Redux: Beware Book Club and Book Review Scams

https://writerbeware.blog/2025/09/19/return-of-the-nigerian-prince-redux-beware-book-club-and-boo...
12•Anon84•1h ago•4 comments

Infographic – An Infographic Generation and Rendering Framework

https://infographic.antv.vision/
3•javatuts•1h ago•0 comments

Vibe Coded X11 Server Written in Rust Adds Xinerama, FreeBSD Support

https://www.phoronix.com/news/YSERVER-1.3-Released
2•breve•1h ago•0 comments

The Declaration of Independence

https://acoup.blog/2026/07/04/collections-on-the-declaration-of-independence/
4•colonCapitalDee•1h ago•0 comments

Obsidian AI Setup – Bootstrap a Personalized Obsidian Vault with AI

https://github.com/anliberant/obsidian-ai-setup
3•javatuts•1h ago•0 comments

Reticulum Is Interesting

https://bergie.iki.fi/blog/reticulum-is-interesting/
4•bergie•1h ago•0 comments