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

Pneumatic tube mail in New York City

https://en.wikipedia.org/wiki/Pneumatic_tube_mail_in_New_York_City
2•gkaemmer•3m ago•0 comments

MacGregor the Bridge Builder

https://www.astralcodexten.com/p/macgregor-the-bridge-builder
1•Ariarule•4m ago•0 comments

I gave Claude complete ownership over a website

https://freebot.dev/
1•BenediktHolm•6m ago•1 comments

Attack Techniques: Fake Captive Portals

https://textslashplain.com/2026/08/03/attack-techniques-fake-captive-portals/
1•rowbin•8m ago•0 comments

Improving Heuristics

https://www.redblobgames.com/pathfinding/heuristics/differential.html
1•ingve•12m ago•0 comments

Microsoft Tells Engineers 'Tokenmaxxing Is Not What We Are Optimizing For'

https://www.404media.co/microsoft-tells-engineers-tokenmaxxing-is-not-what-we-are-optimizing-for/
1•doener•14m ago•0 comments

How to write production-quality code with AI

https://curtispoe.org/paad/
1•Ovid•16m ago•1 comments

YouTube Mistakenly Penalizes Kurzgesagt for AI-Generated Slop

https://kotaku.com/youtube-mistakenly-penalizes-popular-science-channel-kurzgesagt-for-ai-generat...
3•guilamu•19m ago•0 comments

Instagram's AI Rewards Human Attention

https://ai-updates.net/instagram-ai-human-attention-content/
1•ashurandi•19m ago•0 comments

Show HN: Live beach data for Nova Scotia

https://whenshouldigotothebeach.ca/
1•recvonline•19m ago•0 comments

Is Justified True Belief Knowledge? [pdf]

https://courses.physics.illinois.edu/phys419/sp2021/Gettier.pdf
2•jsLavaGoat•20m ago•1 comments

You have to do above average

https://kipsmiling.com/you-have-to-do-above-average-actions/
2•imsurajkadam•21m ago•0 comments

Understanding std:counting_semaphore and std:binary_semaphore from C++20

https://www.cppstories.com/2026/semaphore/
1•jandeboevrie•22m ago•0 comments

Reservation Apps Have Made Getting into a Restaurant a Nightmare

https://www.wsj.com/business/restaurant-reservation-apps-30a29e6b
2•pseudolus•22m ago•2 comments

The Right Harness Is All You Need

https://hkinsley.com/reflections/right-harness-is-all-you-need
1•bjclark•24m ago•0 comments

OpenSSH Key Structure Guide

https://sshref.dev/
1•fanf2•25m ago•0 comments

A game made of sine waves (YouTube)

https://www.youtube.com/watch?v=Qr3VsZYQy4s
1•hanifbbz•25m ago•0 comments

Abolish the Top Ten Books List

https://thewalrus.ca/abolish-the-top-ten-books-list/
2•pseudolus•26m ago•0 comments

The Unreasonable Effectiveness of Mathematics in the Natural Sciences [pdf]

https://web.njit.edu/~akansu/PAPERS/The%20Unreasonable%20Effectiveness%20of%20Mathematics%20(EP%2...
2•pseudolus•29m ago•0 comments

One of China's Most Powerful AI Models Has Also Escaped Containment

https://www.wired.com/story/moonshot-kimi-k3-ai-model-escape-sandbox/
1•gpi•30m ago•0 comments

Show HN: Per-module tags and releases for Terraform monorepos

https://github.com/techpivot/terraform-module-releaser
1•virgofx•31m ago•0 comments

Kim Jong Un Flouted Sanctions to Amass $22B Windfall

https://www.bloomberg.com/graphics/2026-north-korea-windfall/
2•paulpauper•32m ago•0 comments

AI-written pieces that have won literary awards

https://twitter.com/jamesjyu/status/2085335285726900646
2•paulpauper•33m ago•0 comments

Kam remake (knights and merchants remake) Pascal into WASM on the web by AI

https://yohimik.github.io/kam_remake/
1•yohimik•35m ago•1 comments

Korea's AI-driven chip boom reorders country's society from careers to culture

https://www.bloomberg.com/news/features/2026-08-06/ai-sk-hynix-samsung-rewire-south-korea-s-caree...
3•thoughtpeddler•38m ago•1 comments

Trump-linked oil firm prepares to drill in Greenland but lacks permits

https://www.upi.com/Top_News/World-News/2026/08/08/greenland-trump-oil-drilling/2831786218141/
5•amarcheschi•39m ago•0 comments

Show HN: BotsArgue – Google Meet for AI Agents

https://botsargue.com/
1•avetiszakharyan•40m ago•0 comments

Signal can easily work across multiple Android devices and iPhones now

https://www.theverge.com/tech/975407/signal-linked-devices-sync
3•Cider9986•42m ago•0 comments

how Latin America's city of cycling is breaking gender barriers

https://www.theguardian.com/global-development/2026/aug/06/bikes-city-of-cycling-gender-barriers-...
3•raybb•42m ago•0 comments

Volkswagen plans to win America back with a pickup, report says

https://arstechnica.com/cars/2026/08/volkswagen-plans-to-win-america-back-with-a-pickup-report-says/
4•LorenDB•48m ago•0 comments