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

What If It's Not the Phones?

https://www.theatlantic.com/technology/2026/07/phones-haidt-play-gray/687846/
1•voisin•9m ago•0 comments

RISCBoy is an open-source portable games console, designed from scratch

https://github.com/Wren6991/RISCBoy
2•mariuz•11m ago•0 comments

Rhode Island is regulating grocery checkout lines now

https://reason.com/2026/07/09/rhode-island-is-regulating-grocery-checkout-lines-now/
1•gmays•14m ago•0 comments

Never Built: Lockheed CL-1201

https://foundandexplained.com/2021/05/01/never-built-cl-1201/
1•yubblegum•14m ago•0 comments

Rubber ducking is a mirror that says nothing

https://pilgrima.ge/p/the-mirror-that-says-nothing
1•momentmaker•15m ago•0 comments

AI found a secret computer bug hidden for 15 years.

https://www.untempled.com/guilhermen/art/ai-found-a-secret-computer-bug-hidden-for-15-years-plus-...
1•glmnes•16m ago•0 comments

Gates Heir's Shopping App Claimed Sales It Didn't Drive

https://www.bloomberg.com/news/articles/2026-07-09/gates-heir-s-shopping-app-took-credit-for-sale...
2•imichael•22m ago•0 comments

Why 'com_maxfps 250x' uncaps Quake Live's frame rate

https://marco-nett.de/blog/why-com_maxfps-250x-uncaps-quake-lives-frame-rate/
1•hoechst•23m ago•0 comments

Two LLMs play live chess and rewrite their own brains after each game

https://aitradingcompetition.com/chess.html
1•chumzygood•25m ago•0 comments

Evilcharts

https://evilcharts.com/docs/sankey-chart/static
2•handfuloflight•25m ago•0 comments

Dez minutinhos set envolvente [video]

https://www.youtube.com/watch?v=mBFDmV0W_i4
1•gdss•28m ago•0 comments

Why we stopped using an automated SRE agent

https://blog.neatcontext.com/operations/2026/07/12/why-we-stopped-using-an-automated-sre-agent/
1•tanglearncode•29m ago•2 comments

Remembering Disney Legend Don Iwerks

https://thewaltdisneycompany.com/news/remembering-disney-legend-don-iwerks/
1•toomuchtodo•29m ago•1 comments

Cleanplanet

https://www.cleanplanet.co.jp/technology/
1•theendisney•33m ago•0 comments

Postgres Makes Transactions Atomic

https://brandur.org/postgres-atomicity
1•gurjeet•39m ago•0 comments

Bootstrapping a Post-Quantum Shadow Ledger via Op_return [pdf]

https://github.com/Blackcoin-Dev/Blackcoin/blob/main/doc/whitepaper-quantum-quasar.pdf
1•QQ_Blackcoin•39m ago•0 comments

530A Trump Accounts Guide

https://www.chase.com/personal/investments/learning-and-insights/article/trump-accounts-for-kids-...
2•firasd•40m ago•0 comments

Secret Claude tracker surprises users after Anthropic's anti-surveillance stance

https://www.theregister.com/ai-and-ml/2026/07/01/anthropic-is-removing-its-covert-code-for-catchi...
2•gnabgib•42m ago•0 comments

Screen Time extensions are Intermittent Reinforcement

https://agentzlerich.blogspot.com/2026/07/do-not-use-screen-time-extensions.html
1•RhysU•43m ago•0 comments

Agentic Memory Transparency

https://medium.com/@vektormemory/memory-transparency-why-vektor-slipstream-now-shows-you-exactly-...
1•vektormemory•46m ago•1 comments

Waymo called the cops on teen riders, raising privacy concerns

https://www.npr.org/2026/07/10/nx-s1-5886113/waymo-police-privacy-driverless-autonomous-vehicles
1•sxp•52m ago•2 comments

The Art of Asking Questions

https://asteriskmag.com/issues/04/the-art-of-asking-questions
1•andsoitis•55m ago•0 comments

Selling Abstraction

https://asteriskmag.com/issues/14/selling-abstraction
1•andsoitis•56m ago•0 comments

GPT 5.6 chart analysis tool

http://derac.org/gpt56charts/
1•derac•1h ago•1 comments

Persistent memory for Claude Code that survives context compaction

https://mentedb.com
1•mentedb•1h ago•0 comments

Show HN: BoundFlow – an open-source control plane for AI agents

https://github.com/boundflow/boundflow
1•alama24•1h ago•0 comments

Show HN: The Quiet Map – Earth's quietest place, measured by seismometers

https://thequietmap.org/
1•theceka•1h ago•0 comments

Where did my segfault go?

https://rmpr.xyz/Where-did-my-segfault-go/
2•RMPR•1h ago•0 comments

Blocking Distracting News Links

https://retout.co.uk/2026/07/10/blocking-distracting-news-links/
1•edward•1h ago•0 comments

Here's Why Some Humans Can Hear Super Low-Frequency Sounds

https://nautil.us/heres-why-some-humans-can-hear-super-low-frequency-sounds-1282626
2•Brajeshwar•1h ago•0 comments