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

Counting ArXiv Delays

https://fi-le.net/arxiv/
1•fi-le•1m ago•0 comments

China recovers Long March 10B rocket

https://www.bilibili.com/video/BV1n6NL6fEP9
1•ycui7•3m ago•1 comments

OpenAI and Google sell AI models to blacklisted China groups

https://www.ft.com/content/5d6aafa1-5d47-4585-aa95-6ec06a6cd20f
1•JumpCrisscross•4m ago•0 comments

China recovers reusable rocket used in the maiden launch of Long March 10B

https://www.scmp.com/news/china/science/article/3360069/china-recovers-long-march-10b-reusable-ro...
2•yms_hi•5m ago•0 comments

Think you can win on prediction markets? Here's why you're more likely to lose

https://www.cbc.ca/news/business/prediction-market-skilled-traders-9.7258090
1•1vuio0pswjnm7•7m ago•0 comments

I wrote about how we used Conway's Law to fix legacy architecture

https://one2n.io/blog/fixing-legacy-architectures-with-conways-law
1•chinmay185•12m ago•1 comments

"Worthless Idiot, Donkey Head": Parodies of Pedantry on the Renaissance Stage

https://publicdomainreview.org/essay/parodies-of-pedantry/
1•lermontov•14m ago•0 comments

Formally Verifying AI-Generated GPU Kernels

https://gimletlabs.ai/blog/formally-verifying-ai-generated-kernels
1•matt_d•15m ago•0 comments

Why is music so much easier for AI than code?

1•htlemur_bobby•16m ago•0 comments

Florida's OpenAI lawsuit moves to federal court, gets assigned to Aileen Cannon

https://www.politico.com/news/2026/07/08/floridas-openai-lawsuit-federal-court-aileen-cannon-0099...
1•1vuio0pswjnm7•25m ago•0 comments

Controlling the Human Body via EMS

https://github.com/danielkaijzer/Human-Operator
1•kaonwarb•26m ago•0 comments

Ask HN: MCP Native Tools?

2•edifil•26m ago•1 comments

NEO's Hands – An API to the Physical World

https://www.1x.tech/discover/neos-hands
1•dsr12•28m ago•0 comments

Sheaf theory: from deep geometry to deep learning (2025)

https://arxiv.org/abs/2502.15476
1•measurablefunc•30m ago•0 comments

Clamshell style cyberdeck built around the Raspberry Pi Compute Module 5

https://github.com/sb-ocr/cmdeck
1•tortilla•32m ago•0 comments

OpenAI unveils long-awaited "super app" as rivalry with Anthropic intensifies

https://www.reuters.com/business/openai-launches-chatgpt-work-2026-07-09/
1•adithyaharish•36m ago•0 comments

Migrating Code by Proof: From F# to Python

https://www.logosresearch.ai/news/migrating-code-by-proof/
1•peterkelly•36m ago•0 comments

Paranoid LLMs

https://whyjay.vercel.app/thoughts/paranoid-llms/
1•juggy69•37m ago•0 comments

Show HN: R3 – A Local Code Review Tool for You and Your AI Agent

https://github.com/hyperlogue/r3
1•rickye26•40m ago•0 comments

What Happened to Commodore? Why the Amiga Disappeared

https://www.youtube.com/watch?v=IXitMm7aeV8
2•cable2600•41m ago•0 comments

Earliest example of right-handedness found in Australian fossils

https://www.cnn.com/2026/07/09/science/earliest-animal-right-handedness-spriggina-floundersi
1•Tomte•42m ago•0 comments

Data Science Weekly – Issue 659

https://datascienceweekly.substack.com/p/data-science-weekly-issue-659
1•sebg•47m ago•0 comments

Brave Bat Roadmap 4.0

https://brave.com/blog/bat-roadmap-4-0/
1•twapi•52m ago•0 comments

The most, and least, liveable cities in 2026

https://www.economist.com/graphic-detail/2026/07/06/the-worlds-most-and-least-liveable-cities-in-...
2•andsoitis•54m ago•1 comments

Can you run every line of code in Super Mario Bros.?

https://www.youtube.com/watch?v=o0gOALTvkcc
1•badc0ffee•55m ago•0 comments

Show HN: AppleWalls – free 4K wallpapers for Apple devices

https://www.applewalls.com/en
1•fenggit•58m ago•0 comments

InternNav – Navigation Toolbox

https://github.com/InternRobotics/InternNav
1•rickcarlino•59m ago•0 comments

Audar-ASR-V1:Arabic-first speech recognition foundation models with open weights

1•AudarAI•1h ago•1 comments

LKML-reader: a Rust-based interactive reader for Linux Kernel Mailing Lists

https://github.com/RinHizakura/lkml-reader
1•RinHizakura•1h ago•0 comments

Class action suit over deepfake child sexual abuse material expands

https://text.npr.org/nx-s1-5885052
2•1659447091•1h ago•0 comments