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

Glados for Claude

https://github.com/prosecutorpotato/glados-claude-plugin
2•Divisibly3•1m ago•0 comments

How Aspiring Autocrats Exit

https://www.journalofdemocracy.org/online-exclusive/how-aspiring-autocrats-exit/
1•mooreds•2m ago•0 comments

Show HN: After years as data engineer, I built the tool I wish my colleagues had

2•salterisp•3m ago•0 comments

Slow Down and Sit with It

https://yaoyue.org/blog/2026-slowdown/
1•oumua_don17•3m ago•0 comments

UK Even Wants Image Scanners on Unsupported Devices

https://reclaimthenet.org/uk-even-wants-image-scanners-on-millions-of-unsupported-devices
1•arrowsmith•3m ago•0 comments

Stochastics

https://stochastics.vercel.app/
1•talos-better•4m ago•0 comments

Half of America Cannot Afford to Live, and Other Wrong Numbers

https://thedispatch.com/article/affordability-crisis-healthcare-housing-childcare/
1•paulpauper•4m ago•0 comments

"Lending Is Meritorious and Should Be Praised"

https://sebastiangarren.com/2026/06/17/lending-is-meritorious-and-should-be-praised-how-the-fifth...
1•paulpauper•4m ago•0 comments

Integer Quantization: Deep Dive

https://hello-fri-end.github.io/2026/06/integer-quantization-deep-dive/
1•matt_d•5m ago•0 comments

Show HN: In-Browser FAQ LLM

https://fred-terzi.github.io/totem-preview/
1•fred_terzi•5m ago•0 comments

A Cohort Perspective on Latin America's Fertility Transition

https://www.nber.org/papers/w35326
1•paulpauper•5m ago•0 comments

Show HN: AI Commander – TeamViewer for AI Agents, No VPN or SSH

https://aicommander.dev/
3•coderai•6m ago•0 comments

Amazon employees say they were interrogated over data center comments

https://www.seattletimes.com/business/amazon/amazon-employees-say-they-were-interrogated-over-dat...
2•dangle1•6m ago•0 comments

Yay v13 and the AURpocalypse

https://jguer.space/blog/2026-06-15-yay-v13
2•Tiberium•6m ago•0 comments

M* (M-Star): A Modular, Extensible, Serving System for Multimodal Models

https://mstar.stanford.edu/
3•matt_d•7m ago•0 comments

Show HN: An atlas of China's manufacturing geography

https://chinaindustryatlas.com/
3•hans863•8m ago•1 comments

First paying customer after months of building

https://www.traderscompanion.org
3•mathono•8m ago•0 comments

The Last Invention of Man

https://nautil.us/the-last-invention-of-man-236814
3•pulkas•9m ago•1 comments

Show HN: Turn any photo into a Fujifilm film-simulation recipe

https://fujicipe.com/
3•codebytrevor•11m ago•0 comments

Electric Asia

https://ember-energy.org/latest-insights/electric-asia/
4•mooreds•12m ago•0 comments

RTIC: The Hardware Accelerated Rust RTOS

https://rtic.rs/
3•liamkinne•12m ago•0 comments

Trade bans and local conservation helped save a dazzling blue gecko

https://news.mongabay.com/2026/06/how-trade-bans-and-local-conservation-helped-save-a-dazzling-bl...
3•mooreds•12m ago•0 comments

Mojo 1.0 Beta 2

https://mojolang.org/releases/v1.0.0b2/
4•melodyogonna•12m ago•0 comments

From Minutes to Seconds: LLM-Guided Autotuning for Helion Kernels

https://pytorch.org/blog/from-minutes-to-seconds-llm-guided-autotuning-for-helion-kernels/
3•matt_d•13m ago•0 comments

Gig workers are endlessly exploited. AI could make more of us share their fate

https://www.theguardian.com/technology/2026/jun/18/ai-threatens-gig-work-rise
6•devonnull•14m ago•0 comments

K

https://web.archive.org/web/20140223143440/http://www.math.bas.bg/bantchev/place/k.html
3•tosh•14m ago•0 comments

Machine Studying

https://jacobxli.com/blog/2026/machine-studying/
3•pr337h4m•16m ago•0 comments

Field Notes from a Year of Opsec Training

https://www.eff.org/deeplinks/2026/06/field-notes-year-opsec-training
5•hn_acker•16m ago•0 comments

AI Regulation Should Be Rational, Not Retaliatory

https://www.eff.org/deeplinks/2026/06/ai-regulation-should-be-rational-not-retaliatory
7•hn_acker•16m ago•0 comments

America Is Headed Toward the Infinite Workweek

https://www.theatlantic.com/technology/2026/06/ai-agents-jobs-exhaustion/687596/
5•Jtsummers•18m ago•1 comments