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

Applied Electrodynamics (YC S26) A new kind of camera that can see through walls

https://twitter.com/bavser/status/2082868602240385526
1•max_zorin_phd•4m ago•1 comments

Fall of Civilisations: Majapahit – Empire of the Islands [video]

https://www.youtube.com/watch?v=01CZBhZM430
1•hunglee2•6m ago•0 comments

The Open Weight Revolution with Simon Willison

https://oxide-and-friends.transistor.fm/episodes/the-open-weight-revolution-with-simon-willison
1•tosh•7m ago•0 comments

SodaSlim Refreshing Wellness Drink

https://finance.yahoo.com/healthcare/articles/sodaslim-releases-updated-2026-highlights-122400710...
1•miskaash•11m ago•0 comments

My PM agent suggests firing my coding agents and creating a replacement

https://twitter.com/samliuhappy/status/2083437451729949004
1•Bobby_Liu•18m ago•1 comments

Migrating pynfra gh actions pipeline to dsci

https://gemini.google.com/share/2cb21bc5b39a
1•melezhik•20m ago•1 comments

Fast Rust Library for PDF text extraction

https://github.com/firecrawl/pdf-inspector
2•abrbhat•21m ago•0 comments

UPC grants InterDigital second 11-country injunction against Disney

https://ipfray.com/breaking-upc-grants-interdigital-second-11-country-injunction-against-disney/
1•ksec•22m ago•0 comments

A Ton of Space Junk Tumbles Unpredictably to Earth Every Week

https://www.nytimes.com/2026/07/31/world/asia/space-debris-falling-crashing-earth-risk.html
1•0in•28m ago•0 comments

8u9iuh

https://kjjkjj.com
1•ewaawefawefawef•28m ago•0 comments

The Screen Act Threatens Privacy Far Beyond Adult Websites

https://www.eff.org/deeplinks/2026/07/screen-act-threatens-privacy-far-beyond-adult-websites
2•mdp2021•31m ago•0 comments

NeverWrite, the ultimate agentic Markdown workspace

https://github.com/jsgrrchg/NeverWrite
1•jsgrrchg•32m ago•0 comments

What Happened to NeXT Computer? Why Steve Jobs' Failed Workstation Became macOS

https://www.youtube.com/watch?v=2mrwr21XkBc
1•cable2600•33m ago•1 comments

The Old Man and the App

https://zhenyi.gibber.blog/the-old-man-and-the-app
1•zhenyi•35m ago•0 comments

Dependency Cultures [video]

https://www.youtube.com/watch?v=E82ly38YEEQ
1•bobajeff•35m ago•0 comments

Show HN: TikTok Coin Calculator – viewer costs vs. creator earnings

https://coinvaluecalc.com/
1•zhonglinxin•40m ago•0 comments

Audio8 TTS Preview 0.6B

https://huggingface.co/Audio8/Audio8-TTS-Preview-0.6B-ONNX-INT4
1•MehrdadKhnzd•44m ago•0 comments

Stateless MCP has recaptured my interest

https://simonwillison.net/2026/Jul/31/stateless-mcp/
1•tosh•49m ago•0 comments

Show HN: One no-subscriptions online search for all your agent needs

1•freakynit•52m ago•0 comments

Cross Validation vs. Leaderboard: When CV Is Too Timid

https://medium.com/@alanscottencinas/cross-validation-vs-leaderboard-when-cv-is-too-timid-2092156...
1•encinas88•54m ago•0 comments

Web and multimedia discovery, code search and local file exploration

https://kurzioai.vercel.app/
1•curzio•57m ago•0 comments

OpenAI Usage Reset 4th time in 7d

1•bavovna•1h ago•1 comments

Ten Ways NAS Is Getting Enshitified

https://nascompares.com/2026/07/31/the-10-ways-nas-is-getting-enshitified/
13•giuliomagnifico•1h ago•2 comments

LLMs can't trade and higher reasoning doesn't help

https://twitter.com/RRicefan/status/2082513323489202664
2•tosh•1h ago•0 comments

Thomson Reuters Built Its Own AI Model That Now Ranks Among the Best

https://www.thomsonreuters.com/en-us/posts/innovation/thomson-reuters-built-its-own-ai-model-that...
3•doener•1h ago•0 comments

PostgreSQL and the Linux OOM Killer: A Better Default

https://clickhouse.com/blog/strict-memory-overcommit-for-postgres
2•saisrirampur•1h ago•0 comments

Why one of the best mathematicians is joining OpenAI

https://www.theatlantic.com/technology/2026/07/jacob-tsimerman-math-fields-medal-openai/688120/
1•bryan0•1h ago•0 comments

The Four Horsemen of the AI Bubble Apocalypse

https://www.derekthompson.org/p/the-four-horsemen-of-the-ai-bubble
2•nreece•1h ago•0 comments

A 15-day autonomous coding run spent five days building no product code

https://github.com/nelsonwerd/proof-ate-the-project
1•nelsonwerd•1h ago•0 comments

The AI Data Center Explained – From Electricity to ChatGPT [video]

https://www.youtube.com/watch?v=ckoi0RTEgcY
1•chirau•1h ago•0 comments