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

Fox Run Treatment Center Traumatized Troubled Children

https://www.themarshallproject.org/2026/07/30/fox-run-youth-residential-treatment-runaways
1•Jimmc414•1m ago•0 comments

qm

https://github.com/yc-software/qm
1•tosh•2m ago•0 comments

They Forgot What Happened Last Time: Hacking the Windows 365 Link [video]

https://media.ccc.de/v/emf2026-93-1-they-forgot-what-happened-last-time
1•Jimmc414•2m ago•0 comments

Britain Became a Poor Country

https://www.youtube.com/watch?v=vry5deT8lc0
2•penguin_booze•3m ago•0 comments

ESP-KVM – An IP-KVM on the ESP32-P4

https://espkvm.io/
2•Jimmc414•3m ago•0 comments

How to make a perfect cup of tea [pdf]

https://web.archive.org/web/20140811033029/http://www.rsc.org/pdf/pressoffice/2003/tea.pdf
2•marysminefnuf•3m ago•0 comments

Open-Source-Radar

https://opensourceradar.substack.com/p/open-source-radar
1•spran1•4m ago•0 comments

Show HN: Jacobian – I built tools to help anyone explore and solve conjectures

https://github.com/morluto/jacobian
1•Mplto•5m ago•0 comments

Tell HN: HackerOne Announces Mandatory identity verification

1•0xmattf•5m ago•0 comments

Chinese military researchers tap US AI models to train defense systems

https://www.defensenews.com/industry/techwatch/2026/07/31/chinese-military-researchers-tap-us-ai-...
1•0in•6m ago•0 comments

Suno loses lawsuit brought by GEMA

https://www.heise.de/en/news/AI-Music-GEMA-wins-legal-dispute-against-Suno-11389111.html
1•Aldipower•6m ago•0 comments

Make Every PR Prove Itself

https://builders.abnormal.ai/p/make-every-pr-prove-itself
1•sshh12•6m ago•0 comments

A.I. Hedge Fund Situational Awareness Rescued by Rival

https://www.nytimes.com/2026/07/30/business/artificial-intelligence-situational-awareness-citadel...
1•paulpauper•6m ago•0 comments

A New Theory of Economics

https://wilsoniumite.com/2026/07/31/a-new-theory-of-economics/
1•Wilsoniumite•9m ago•0 comments

KimiK3 Commercial License

https://twitter.com/rohanpaul_ai/status/2082024746410295754
2•savin-goyal•10m ago•0 comments

IPC-7351B Electronic Component Zero Orientation [pdf]

https://scancad.net/wp-content/uploads/2019/02/zero-orientation-cad-libaray.pdf
1•gregsadetsky•12m ago•0 comments

A playable retelling of Homer's Odyssey (with cleverly hidden Easter eggs)

https://sail-to-ithaca.vercel.app
1•mayilian•13m ago•0 comments

Fitch's Private Credit Default Rate Hit Record in Second Quarter

https://www.bloomberg.com/news/articles/2026-07-30/fitch-s-private-credit-default-rate-hit-record...
1•petethomas•14m ago•0 comments

The 1940s Elevator-Mirror Story and What It Teaches About Human Happiness

https://atticusli.com/blog/posts/idleness-aversion-chris-hsee-elevator-mirrors-customer-experience/
1•Leftium•15m ago•0 comments

Graph Engineering: The Missing Skill in AI

https://twitter.com/AnatoliKopadze/status/2080668775796314331
1•v-mdev•19m ago•0 comments

WebDuck: DuckDB as a Service

https://webduck.autumo.ch/
1•theanonymousone•19m ago•0 comments

Unsloth: DeepSeek V4 Flash 0731

https://unsloth.ai/docs/models/deepseek-v4
1•tosh•20m ago•0 comments

Task Manager for Mac (from author of Windows TaskManager)

https://tmog.org/
2•valgaze•20m ago•1 comments

The Young Are Richer Than You Think

https://faingezicht.com/articles/2026/07/31/the-young-are-richer-than-you-think/
1•avyfain•21m ago•1 comments

Correlated RNG in Games

https://knivesforcats.online/correlated-rng/
1•fanf2•25m ago•0 comments

Show HN: Shellphone, an MCP Extension to Link Claude Chat and Claude Code

https://www.npmjs.com/package/shellphone
1•geoffitect•25m ago•0 comments

A discarded SpaceX rocket is on a high-speed collision course with the moon

https://phys.org/news/2026-07-discarded-spacex-rocket-high-collision.html
2•0in•25m ago•0 comments

Worth your time – July '26

https://www.thetrueengineer.com/p/worth-your-time-july-26
1•adletbalzhanov•28m ago•0 comments

Contextor-spare LLM tokens required for full structural analysis of Python repo

https://github.com/WojciechJarka/Contextor/releases/tag/v.1.0.4
1•koniowizamelduj•28m ago•1 comments

ChronoWatch X2040

https://www.raspberrypi.com/news/chronowatch-x2040/
1•Brajeshwar•29m ago•0 comments