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

Show HN: Kernelspace- interactive course on systems programming for LLM Serving

https://kernelspace.naigap.com/
1•praveer13•37s ago•0 comments

Why Tokenmaxxing Is for Fools. A Rant on Fake Productivity

https://joereis.substack.com/p/why-tokenmaxxing-is-for-fools-a-rant
1•doppp•1m ago•0 comments

Text Watermarking for Non-Academics

https://blog.gaborkoos.com/posts/2026-08-12-Text-Watermarking-for-Non-Academics/
1•nikolay•3m ago•0 comments

Gemini becomes Google's fastest-growing product ever as it hits 1B users

https://arstechnica.com/ai/2026/08/google-says-gemini-has-reached-1b-users-faster-than-any-other-...
2•Gaishan•4m ago•0 comments

Fastest Inference Meta Muse Glimmer 30B on Apple

https://www.basecompute.co/getbasert
2•lukasonedge•6m ago•0 comments

Almost nowhere in California is building enough, according to the state

https://calmatters.org/housing/2026/08/california-rhna-housing-affordable-progress/
1•littlexsparkee•8m ago•0 comments

We're in the Most Dangerous Period – With Doomberg [video]

https://www.youtube.com/watch?v=uP6PCZTPQ2U
2•Bender•8m ago•1 comments

Codex in ChatGPT desktop app for Linux in preview

https://community.openai.com/t/codex-in-chatgpt-desktop-app-for-linux-is-now-in-preview/1390027
1•tmp10423288442•11m ago•0 comments

Show HN: Spend.Report – See what you're spending money on each month

https://spend.report/
1•nadermx•12m ago•0 comments

A podcast trying to complete Campaign for North Africa

https://www.wargamer.com/board-games/the-campaign-for-north-africa-two-years
1•pavel_lishin•14m ago•0 comments

GPU Management: Why Idle GPUs Are the New Grounded Aircraft

https://huggingface.co/blog/Dharma-AI/gpu-management
1•gmays•15m ago•0 comments

Jellyfish force shutdown of three reactors at French nuclear plant

https://www.lemonde.fr/en/france/article/2026/08/11/jellyfish-force-shutdown-of-three-reactors-at...
2•gadcam•16m ago•2 comments

The Art of Not Buying Disk

https://sonirico.dev/posts/the-art-of-not-buying-disk/
1•sonirico•18m ago•0 comments

DEF CON crowd suspected in fake-hotspot attack on Delta flight

https://arstechnica.com/information-technology/2026/08/def-con-crowd-suspected-in-fake-hotspot-at...
6•dangle1•22m ago•0 comments

Show HN: Askance, a human-in-the-loop GUI for agentic coding

https://github.com/tobico/askance
1•tobicoh•23m ago•0 comments

Xirp – Spotify's macOS app for running AI coding agents

https://xirp.spotify.com/
1•hmokiguess•24m ago•0 comments

Let's stop talking about A.I

https://ckarchive.com/b/38uphkh2pkl07i37xxl75f455oo0da7hrz054
1•herbertl•26m ago•0 comments

Florida cops are quietly using Meta smart glasses

https://www.miaminewtimes.com/news/florida-cops-are-quietly-using-meta-smart-glasses-40573513/
3•thehoff•30m ago•0 comments

The +18 version of ChatGPT started accepting Crypto

4•samantha090909•36m ago•2 comments

US judge cites 'concerning' irregularities in Adani fraud case

https://www.ft.com/content/5010fd54-5982-47c7-801a-e0a354a71c31
3•petethomas•42m ago•1 comments

The Programming Ape (Code Hale, 2012) [video]

https://www.youtube.com/watch?v=e_6gkfTomUQ
1•dhorthy•43m ago•0 comments

Bugs in MS' Patch Tuesday release and NK's Lazarus has hit one already

https://www.theregister.com/security/2026/08/11/421-bugs-in-microsofts-patch-tuesday-release-and-...
2•Gaishan•44m ago•0 comments

Will failure in Iran reshape how the US fights?

https://www.ft.com/content/5bdb67a5-5c53-46aa-8a04-d0480e700ee4
1•petethomas•45m ago•0 comments

Panama Canal fees hit record high as El Niño and Iran war choke shipping

https://www.ft.com/content/38083cb5-3892-40a1-b90f-102109f96b17
2•petethomas•46m ago•0 comments

Belly Fat and Low Vitamin D May More Than Double the Risk of Early Death

https://scitechdaily.com/belly-fat-and-low-vitamin-d-may-more-than-double-the-risk-of-early-death/
2•Gaishan•46m ago•0 comments

Why one name will appear 4 times on Vermont's Republican primary ballot

https://www.vermontpublic.org/local-news/2026-06-23/why-h-brooke-paige-appear-4-times-republican-...
2•mauvehaus•48m ago•1 comments

In the US, one in seven leisurely moments comes with guilt

https://www.bps.org.uk/research-digest/us-one-seven-leisurely-moments-comes-guilt
1•littlexsparkee•50m ago•0 comments

Anthropic to start embedding invisible watermarks

https://fortune.com/2026/08/11/anthropic-claude-watermark-ai-text-police-ai-slop/
2•TruffleLabs•53m ago•4 comments

Use deployment context to your advantage

https://twitter.com/nikpil06/status/2087328872308285930
1•nikhilpillai23•53m ago•0 comments

A Watermark for Large Language Models

https://arxiv.org/abs/2301.10226
2•matheusmoreira•56m ago•0 comments