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

Reverse Sprinkler Physics Problem

https://www.nytimes.com/2026/07/14/science/reverse-sprinkler-physics-problem.html
1•7402•1m ago•0 comments

The Most Human Technology Ever Made

https://www.a16z.news/p/the-most-human-technology-ever-made
1•beklein•1m ago•0 comments

Bonsai 27B: The First 27B-Class Model to Run on a Phone

https://prismml.com/news/bonsai-27b
2•xenova•1m ago•0 comments

NightmareEclipse - LegacyHive (so-called Mother Of All Bugs)

https://git.projectnightcrawler.dev/NightmareEclipse/LegacyHive/commits/branch/main
1•guessmyname•2m ago•0 comments

Show HN: Discito – spaced repetition iOS flashcard app using fsrs-6

https://discito.app/features
1•anythingworks•3m ago•0 comments

Project Panama: Why an AI Company Cut Apart Books

https://www.tobiasreithmeier.de/en/blog/project-panama-anthropic-books
1•JuriKeller•4m ago•0 comments

SoftBank's Masayoshi Son ridicules AI critics for 'spitting upwards'

https://www.ft.com/content/fc0d48f4-a2ce-45b1-a0ad-83a0a8409f00
2•1vuio0pswjnm7•5m ago•0 comments

Firecracker disk snapshots in O(changed bytes), not O(disk size)

https://www.tensorlake.ai/blog/firecracker-disk-snapshots-o-changed-bytes
2•diptanu•6m ago•0 comments

AI Made Cloning Games Easier

https://www.404media.co/ai-made-cloning-games-easier-than-ever/
1•_____k•6m ago•0 comments

ADS-B Receiver for the Terminal

https://github.com/encse/adsb-tui
2•encse•6m ago•2 comments

A Chemical from Car Tires May Be Linked to Alzheimer's, New Study Suggests

https://www.vice.com/en/article/a-chemical-from-car-tires-may-be-linked-to-alzheimers-new-study-s...
1•littlexsparkee•6m ago•0 comments

Greenland Institute of Natural Resources Stops Collaboration with the US

https://knr.gl/da/nyheder/naturinstituttet-stopper-nyt-samarbejde-med-usa
2•tokai•6m ago•0 comments

AI lawsuits expose gaps in conventional insurance, says report

https://www.ft.com/content/8b3e2431-96b5-477e-b5ea-e3baae671b9c
1•1vuio0pswjnm7•6m ago•0 comments

The Most Expensive Dinosaur Just Sold for $50.1M

https://www.wsj.com/arts-culture/fine-art/gus-trex-auction-sothebys-sale-price-07f7ef40
2•fortran77•9m ago•2 comments

6× faster batched binary search in Rust

https://pythonspeed.com/articles/branchless-binary-search/
1•fanf2•10m ago•0 comments

Massive AI spending is driving up prices on laptops and electricity, Fed watches

https://www.fastcompany.com/91572617/massive-ai-spending-driving-up-prices-laptops-electricity-as...
3•1vuio0pswjnm7•10m ago•0 comments

Congressional Ratification of President Trump's Corporatism

https://ronpaulinstitute.org/congressional-ratification-of-president-trumps-corporatism/
1•metanoia_•11m ago•1 comments

I built a no-signup solar cost and payback calculator

https://sunmetriclab.com/
1•georgejr•11m ago•0 comments

Jovita one AI hub instead of five subscriptions

https://usejovita.com
1•Ayo245•11m ago•0 comments

Fibonacci's Liber Abaci [pdf]

https://www.mifami.org/eLibrary/Fibonacci-LiberAbaci-QuadClass-2pp.pdf
1•jruohonen•13m ago•0 comments

Weather App Could Soon Develop Blind Spots

https://www.bloomberg.com/opinion/articles/2026-07-14/your-weather-app-could-soon-develop-blind-s...
1•littlexsparkee•14m ago•1 comments

Tokenomics: View token usage, costs, and rate-limit metrics

https://github.com/skuznetsov/tokenomics-viewer
1•samaysharma•16m ago•0 comments

Migrate from Datadog to Grafana

https://shiftmetrics.com/
1•gunapologist99•16m ago•1 comments

Long Covid May Affect Motivation and Memory by Injuring Brain's Dopamine System

https://www.discovermagazine.com/long-covid-may-affect-motivation-and-memory-by-injuring-the-brai...
1•amichail•18m ago•1 comments

Korea Financial Telecommunications Files Patent for Won Stablecoin System

https://en.sedaily.com/finance/2026/06/19/korea-financial-telecommunications-files-patent-for-won
1•mushstory•19m ago•0 comments

Harness Engineering for Self-Improvement

https://lilianweng.github.io/posts/2026-07-04-harness/
2•gmays•19m ago•0 comments

Another Entry in the "Stuff Im Glad Im Not Responsible for" Ledger

https://blog.cloudflare.com/dnssec-nta-ede-33/
2•c_f_•20m ago•0 comments

AI makes learning feel too easy

https://blog.danielyj.com/blog/ai-makes-learning-feel-easy
1•bear_with_me•20m ago•0 comments

Generative AI Is an Engineering Disaster

https://www.theatlantic.com/technology/2026/07/generative-ai-engineering-disaster/687901/
4•Jtsummers•21m ago•1 comments

show hn: 1d data to 3D topology, AI deepfakes to protien folding

https://github.com/bitofabluetit/knotreel
1•bitofabluetit•22m ago•1 comments