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

The Future According to LLMs

https://www.thefutureaccordingtoai.com/
1•superted•3m ago•1 comments

VLC for Unity now supported on Linux

https://code.videolan.org/videolan/vlc-unity
1•martz•4m ago•1 comments

RS-485

https://en.wikipedia.org/wiki/RS-485
1•doener•5m ago•0 comments

SimpleDMARC – DMARC monitoring that turns the raw XML reports into plain English

https://simpledmarc.com/
1•maniargaurav•7m ago•0 comments

Show HN: Gitwig – Mouse-drivable Git TUI and multi-repo dashboard in Rust

https://gitwig.dev/
1•tareqmy•9m ago•0 comments

China memory chipmaker CXMT's shares soar in blockbuster listing

https://www.euronews.com/business/2026/07/27/china-memory-chipmaker-cxmts-shares-soar-in-blockbus...
2•amelius•10m ago•0 comments

ZeroEntropy Joins Notion

https://zeroentropy.dev/articles/zeroentropy-is-joining-notion/
1•kisamoto•11m ago•0 comments

The Indie Hacker Economy Is a Pyramid Scheme

https://medium.com/westenberg/the-indie-hacker-economy-is-a-pyramid-scheme-d06cb5789648
2•latexr•14m ago•0 comments

China State Media Says Support for Open AI Models Has Limits

https://www.bloomberg.com/news/articles/2026-07-27/china-state-media-says-support-for-open-ai-mod...
1•maxloh•21m ago•1 comments

Warden – run a fleet of coding agents without losing your mind

https://github.com/srjn45/warden
1•srjn45•22m ago•0 comments

Shake: Stimulating Haptics Add-In for Kinematic Enhancement

https://github.com/sideline-int/SHAKE
1•wertyk•24m ago•0 comments

Git Without a Forge

https://www.chiark.greenend.org.uk/~sgtatham/quasiblog/git-no-forge/
1•olexsmir•26m ago•0 comments

How Unix spell ran in 64 kB of RAM

https://blog.codingconfessions.com/p/how-unix-spell-ran-in-64kb-ram
3•donw•27m ago•0 comments

Opus Cost = Minimum Wage in South Africa

2•bridgettegraham•30m ago•1 comments

Show HN: We built an MCP server for document generation

https://docuqueue.com/#mcp
1•dvcoolarun•34m ago•0 comments

Why does everything feel so joyless?

https://www.theguardian.com/us-news/ng-interactive/2026/jul/26/age-of-decadence-pleasure-ai
2•mattjhall•38m ago•0 comments

Ask HN: Where do those LLM-generated outreach emails come from?

2•nicbou•40m ago•0 comments

Modern email can be built from borrowed parts

https://en.andros.dev/blog/d7ed8b07/modern-email-can-be-built-from-borrowed-parts/
2•andros•43m ago•0 comments

Would you choose £50k over the chance of £1M?

https://yougov.com/en-gb/daily-results/20260722-c0b92-3
2•yzydserd•46m ago•1 comments

Elevated errors on Claude Opus 5

https://status.claude.com/incidents/lhqp09kxq7pb
3•flyaway123•50m ago•1 comments

Sam Altman says we are in the singularity

https://www.businessinsider.com/sam-altman-openai-the-singularity-agi-prediction-anthropic-nvidia...
1•ColinEberhardt•51m ago•2 comments

Show HN: adCasa OS – AI marketing workspace built with Bayesian attribution

https://adcasa.io/
1•adcasa•52m ago•0 comments

Nvidia in talks with OpenAI to guarantee $250B financing for data center

https://www.reuters.com/business/media-telecom/nvidia-talks-with-openai-guarantee-250-billion-fin...
1•01-_-•53m ago•0 comments

Zeiss expands German site that caps ASML's EUV scanner output

https://www.tomshardware.com/tech-industry/zeiss-expands-german-site-that-caps-asmls-euv-scanner-...
1•01-_-•55m ago•0 comments

Doom Running on a Regex Engine

https://4rh1t3ct0r7.github.io/doom-regex/
1•abareplace•57m ago•0 comments

Meta launched a new AI optimism ad set to a song about human extinction

https://techcrunch.com/2026/07/23/meta-launched-a-new-ai-optimism-ad-set-to-a-song-about-human-ex...
10•robin_reala•1h ago•0 comments

Do Agent Benchmarks Measure Capability? Protocol Validity in the Age of Agentic

https://arxiv.org/abs/2607.22368
1•sbulaev•1h ago•0 comments

I'm running the ICFP programming contest

https://eieio.games/blog/im-running-the-icfp-programming-contest/
1•birdculture•1h ago•0 comments

The AI bioweapon risk isn't jailbreaks

https://point.free/blog/the-ai-bioweapon-risk-isnt-jailbreaks/
1•cafkafk•1h ago•1 comments

Keigo Higashino, author of The Devotion of Suspect X, dies at 68

https://www.oricon.co.jp/news/2470322/
4•linzhangrun•1h ago•0 comments