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

Japanese Firm to Train Robot with AI to Reproduce Runners' Movements

https://japannews.yomiuri.co.jp/science-nature/technology/20260403-320199/
1•mushstory•1m ago•0 comments

Setting up a remote environment for agentic coding on a VPS

https://ma.ttias.be/remote-coding-environment-vps/
1•nreece•3m ago•0 comments

Cut Token Costs in Half

https://tokenkits.vercel.app
1•mattmerrick•12m ago•0 comments

IT Atlas

https://www.levels.fyi/atlas
2•trekhleb•18m ago•0 comments

Show HN: RMCP.dev – An MCP server that finds other MCP servers

https://rmcp.dev/
1•garazy•18m ago•0 comments

Fountible: Agentic Figma

https://fountible.com/
1•handfuloflight•19m ago•0 comments

Reddit Calls Anthropic a 'Freeriding Pirate'

https://runtimewire.com/article/reddit-calls-anthropic-a-freeriding-pirate-and-cites-ruling-behin...
2•ryanmerket•21m ago•0 comments

Starship's Thirteenth Test Flight

https://www.spacex.com/launches/starship-flight-13v
1•JumpCrisscross•21m ago•0 comments

Hannah Fry Wins the Leelavati Prize in 2026 for Mathematics Outreach

https://www.maths.cam.ac.uk/features/professor-hannah-fry-wins-leelavati-prize
2•agnishom•22m ago•0 comments

US moves to regulate hidden car handles

https://www.semafor.com/article/07/23/2026/us-moves-to-regulate-hidden-car-handles
2•jmsflknr•25m ago•0 comments

Show HN: Maps of >100 theories for how society works inc. Graham / Thiel / Smith

https://society.clearerthinking.org/
1•bestOfSocrates•26m ago•0 comments

IBM Acquiring HRL Laboratories

https://newsroom.ibm.com/2026-07-23-ibm-to-acquire-hrl-laboratories-to-power-the-future-of-quantum
1•osnium123•27m ago•1 comments

Midjourney Releasing v8.2

1•endmund•35m ago•1 comments

Pliny the Liberator claims universal jailbreak of models

https://twitter.com/elder_plinius/status/2080767011614015543
1•dnw•38m ago•0 comments

Trump's Plan for Science: More Money for A.I., Less for Universities

https://www.nytimes.com/2026/07/22/us/politics/trump-research-funding-artificial-intelligence.html
4•cratermoon•44m ago•1 comments

22 Years of Rails

https://twitter.com/rails/status/2080580838530355432
1•vinnyglennon•54m ago•0 comments

Show HN: Codebeat – turn any function into a song (no signup)

https://www.codedswitch.com/codebeat
1•Asume21•56m ago•0 comments

A Great Deal of Information About Hacker News

https://vale.rocks/posts/hacker-news
2•OuterVale•1h ago•0 comments

Show HN: Jolta – Automatic per-project JDK switching (like Volta, for Java)

https://oneappplatform.github.io/jolta/
1•pdxdave•1h ago•0 comments

Ukraine' Simple But Effective Protection Against Russian Starlink Jamming (2023)

https://www.technology.org/2023/08/01/did-russia-learn-to-jam-starlink-satellites-ukraine-is-alre...
4•pinkmuffinere•1h ago•0 comments

Exercise Erased Half the Molecular Signature of Muscle Aging

https://www.gethealthspan.com/research/article/exercise-molecular-signature-muscle-aging?zp_type=...
2•bilsbie•1h ago•1 comments

Evaluation of a pentapropellant upper stage (1970) [pdf]

https://ntrs.nasa.gov/api/citations/19700022572/downloads/19700022572.pdf
2•Eridanus2•1h ago•0 comments

Show HN: Modelfac

1•IceRay•1h ago•1 comments

Wine 11.14 – Run Windows Applications on Linux, BSD, Solaris and macOS

https://www.winehq.org/announce/11.14
2•neustradamus•1h ago•0 comments

Show HN: git clone https://git.swerdlow.dev

https://git.swerdlow.dev/
2•benswerd•1h ago•3 comments

Creative Focus

https://herbertlui.net/creative-focus/
5•herbertl•1h ago•0 comments

OpenAI did not notice Hugging Face hack for a week

https://www.reuters.com/business/its-ai-agent-spent-days-hacking-company-sources-say-openai-did-n...
9•himaraya•1h ago•2 comments

The SharePoint zero-day panic this week is a marketing event

https://tensorust-site.vercel.app/
1•Shmungus•1h ago•0 comments

The computer has been surprising us

https://iwhalen.com/computer-surprise/
4•iwhalen•1h ago•0 comments

Claude used my pipeline to find a counterexample to the Jacobian conjecture

4•JGPTechCo•2h ago•2 comments