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

A Vision for Cargo

https://epage.github.io/blog/2026/08/cargo-vision/
1•ingve•37s ago•0 comments

Mathematicians make a breakthrough on Gauss's riddle, unsolved for 200 years

https://www.scientificamerican.com/article/mathematicians-make-a-breakthrough-on-gausss-riddle-un...
1•pykello•58s ago•0 comments

For Chinese LLMs, do you care about mainland-hosted vs. overseas endpoints?

https://api.realitypatch.net/
1•yangzhou-tech•3m ago•0 comments

Meta's Mac Coding Agent Costs Up to 20x Less If You Let It Train on Your Data

https://www.macrumors.com/2026/08/05/meta-muse-code-for-mac/
1•thm•5m ago•0 comments

Journey to Robbers Cave – Behavioral Scientist

https://behavioralscientist.org/journey-to-robbers-cave/
1•pulkonet•6m ago•0 comments

I built a postpartum recovery app after reading many stories from new mothers

https://play.google.com/store/apps/details?id=com.matrabloom.app&hl=en_IN
1•rahulsinghhh•10m ago•0 comments

Obsidian debuts Airtable to local Markdown file importer rescue tool

https://obsidian.md/help/import/airtable
1•thoughtpeddler•12m ago•0 comments

Dissection of Flock Safety Camera

https://www.cehrp.org/dissection-of-flock-safety-camera/
1•sandebert•12m ago•0 comments

Let's all meet up in the Y2K

https://blog.gingerbeardman.com/2026/08/06/lets-all-meet-up-in-the-y2k/
1•msephton•13m ago•0 comments

Design Test

1•ccbakla•14m ago•0 comments

You Can't Optimize for Rest (2021)

https://theconvivialsociety.substack.com/p/you-cant-optimize-for-rest
1•downbad_•15m ago•0 comments

Own-Goal Football (2022)

https://generalist.academy/2022/06/07/own-goal-football/
1•downbad_•15m ago•0 comments

The American Age in the Persian Gulf Is Over

https://phillipspobrien.substack.com/p/midweek-update-22-the-american-age
1•JumpCrisscross•17m ago•0 comments

Britain will soon be Europe's energy powerhouse

https://www.telegraph.co.uk/business/2026/08/04/britain-will-soon-be-europes-energy-powerhouse/
1•sbyse•22m ago•0 comments

Weezer CEO [video]

https://www.youtube.com/watch?v=F0N5Kg3FmtI
1•sgt•24m ago•0 comments

So within, so without. What grows from the datacentre

https://iain.so/so-within-so-without-what-grows-from-the-datacentre
1•iainharper•24m ago•0 comments

I gave Claude Code and KimiCode shared memory so they stop forgetting my project

https://github.com/ConradLu2740/ProactiveAgent
1•conradlu•31m ago•0 comments

On non-rooted Android 17, ADB uninstall of system apps fails

https://github.com/Universal-Debloater-Alliance/universal-android-debloater-next-generation/issue...
2•microtonal•32m ago•0 comments

OpenAI Didn't Notice Its AI Agents Using Message Board to Plan Hacking Spree

https://www.wired.com/story/openai-didnt-notice-its-ai-agents-using-a-message-board-to-plan-their...
2•TMWNN•33m ago•1 comments

Ask HN: What's wrong with my prompting for Claude 5?

1•SmolSpideritito•34m ago•0 comments

Shopify shares soar as AI efforts begin to pay off

https://www.theglobeandmail.com/business/article-shopify-shares-soar-as-ai-efforts-begin-to-pay-off/
1•petethomas•36m ago•0 comments

Prime Agent: A Self-Improving RLM Agent

https://github.com/PrimeIntellect-ai/prime-agent
1•wertyk•36m ago•0 comments

Who's legally to blame for Anthropic and OpenAI's autonomous AI hacks?

https://techcrunch.com/2026/08/03/whos-legally-to-blame-for-anthropic-and-openais-autonomous-ai-h...
1•reasonableklout•38m ago•0 comments

A CLI that deploys your Express/NestJS app to your own AWS or Azure – no IaC

https://www.indiehackers.com/post/7-weeks-solo-a-cli-that-deploys-your-express-nestjs-app-to-your...
1•feras_allaou•39m ago•0 comments

Token-Budget-Aware LLM Reasoning

https://arxiv.org/abs/2412.18547
1•ankitg12•39m ago•0 comments

Show HN: Scout – a self-hosted Discord AI memory bot

https://github.com/j-sofia/Scout
1•j-sofia•41m ago•0 comments

Reddit signals ominous upcoming "changes" for old.reddit.com

https://arstechnica.com/gadgets/2026/08/reddit-signals-ominous-upcoming-changes-for-old-reddit-com/
7•arto•41m ago•0 comments

RuleSync – ESLint and Babel for AI Agent Rules (Claude.md, .cursor/Rules)

https://github.com/juwonllee2024-dotcom/rulesync
1•JUWONLEA•44m ago•0 comments

Muse Spark 1.2: Improved Agentic Performance at Higher Cost per Task

https://artificialanalysis.ai/articles/muse-spark-1-2
1•theanonymousone•44m ago•0 comments

A Teenager Exposed the Truth Behind Israel's Gaza 'Voluntary Emigration' Plan

https://www.haaretz.com/opinion/2026-08-06/ty-article-opinion/.premium/a-teenager-exposed-the-tru...
2•xg15•48m ago•0 comments