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

Corporate Finance Explained – Free Cash Flow: Metric That Drives Valuation [video]

https://www.youtube.com/watch?v=iK0t4-vh0L8
1•kamaraju•41s ago•0 comments

OpenAI's Hugging Face Hack Triggers 'AI Kill Switch' Bill in Congress

https://www.cnbc.com/2026/07/23/open-ai-hugging-face-hack-kill-switch-bill-congress.html
1•pseudolus•1m ago•0 comments

Show HN: CLI Coding Agent that runs on llamafile and/or GGUF

https://github.com/kdeps/kdeps
1•jjuliano•2m ago•0 comments

B2B Software Is Still Stuck in the BlackBerry Era. That Is About to Change

https://www.attainoutcomes.com/blog/b2b-software-is-still-stuck-in-the-blackberry-era-that-is-abo...
1•tylerdane•4m ago•1 comments

Show HN: Turo – An Aggressive Token-Saving Proxy for CLI AI Agents

https://github.com/kdeps/turo
1•jjuliano•4m ago•0 comments

Plasma Tunnels Reveal How Dying Satellites Fall to Earth

https://spectrum.ieee.org/space-debris-atmosphere-burn-up
1•pseudolus•5m ago•0 comments

The model didn't escape. OpenAI ran the attack

https://adi2025.substack.com/p/the-model-didnt-escape-openai-ran
1•AdrianDrempetic•5m ago•0 comments

A Startling Glimpse at AI's Ruthless Efficiency

https://www.theatlantic.com/technology/2026/07/openai-hugging-face-hack/688025/
1•paulpauper•6m ago•0 comments

How the American Office Became Inevitable

https://www.theatlantic.com/newsletters/2026/07/office-white-collar-american-dream/688041/
1•paulpauper•7m ago•0 comments

Forgot your Google password? Now you can log in with a selfie

https://arstechnica.com/gadgets/2026/07/google-now-lets-you-log-into-your-account-with-a-selfie/
1•pseudolus•12m ago•1 comments

Intel stock jumps as it rides AI boom to fastest revenue growth in almost 15 yrs

https://www.cnbc.com/2026/07/23/intel-intc-earnings-report-q2-2026.html
1•ekorbia•18m ago•0 comments

Cosmological constant from Standard Model spin

https://zenodo.org/records/21515348
1•kisnorbert•18m ago•0 comments

Andrew Graham-Dixon on Vermeer, a Forgotten Sect, Underrated Artists (Ep. 284)

https://conversationswithtyler.com/episodes/andrew-graham-dixon/
1•paulpauper•19m ago•0 comments

Frontier intelligence, 10x lower cost

https://www.mixlayer.com/
1•becomevocal•20m ago•0 comments

Show HN: Life Tile – Passive time tracker that shows your day as a Mondrian grid

https://apps.apple.com/us/app/life-tile-auto-tracker/id6767332648
1•choyongjoon•23m ago•0 comments

Rising stars of mathematics awarded prestigious 2026 Fields Medal

https://www.nature.com/articles/d41586-026-02169-1
2•maxall4•23m ago•0 comments

Fred Wilson – The Clarity Act

https://avc.xyz/the-clarity-act
1•rmason•24m ago•0 comments

Australia to AI: Produce More Power Than You Burn, Stop Content 'Theft'

https://www.theregister.com/ai-and-ml/2026/07/15/australia-demands-ai-companies-must-produce-more...
2•gnabgib•24m ago•0 comments

Preliminary Assessment of Kimi K3's Cyber Capabilities

https://www.aisi.gov.uk/blog/preliminary-assessment-of-kimi-k3s-cyber-capabilities
2•antondd•25m ago•0 comments

Pixel phones getting ad notifications

3•explodes•26m ago•2 comments

If AI companies avoid AI slop, shouldn't we?

https://www.machinesociety.ai/p/if-ai-companies-avoid-ai-slop-shouldnt
3•mikelgan•32m ago•1 comments

Patreon Lays Off 20 Percent of Its Workforce

https://www.404media.co/patreon-lays-off-20-percent-of-its-workforce/
9•cdrnsf•44m ago•0 comments

Saying Goodbye to My Office

https://manilsuri.substack.com/p/on-saying-goodbye-to-my-office
5•tzury•46m ago•0 comments

Palo Alto Networks Plans to Buy Embrace in Observability Push

https://www.morningstar.com/news/dow-jones/202607219336/palo-alto-networks-plans-to-buy-embrace-i...
2•pranay01•49m ago•0 comments

Measuring the Performance Cost of High Availability in Postgres

https://clickhouse.com/blog/postgresbench-ha
3•saisrirampur•53m ago•0 comments

Middleware that catches when LLM conversations slowly drift off-topic

https://github.com/ojki74/hallucinatoff
1•ojki•57m ago•0 comments

Feral cats fail at urban rodent control (2018)

https://wildlife.org/rats-feral-cats-fail-at-urban-rodent-control/
5•vector_spaces•57m ago•0 comments

Now on the American Road: Bulletproof Cars

https://www.nytimes.com/2026/07/20/style/armored-cars-bulletproof-american-drivers.html
2•bookofjoe•58m ago•1 comments

The Visual 6502

http://visual6502.org/JSSim/index.html
10•infiniteregrets•1h ago•6 comments

How working out at the gym replaced the home improvement project

https://www.cnn.com/2026/07/23/business/gyms-millennials-gen-z-equinox
2•mooreds•1h ago•1 comments