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

Backstitch: Real-Time Version Control for Godot

https://backstitch.dev/
2•surprisetalk•2m ago•0 comments

Aluminum Foil

https://dernocua.github.io/notes/aluminum-foil.html
2•firephox•3m ago•0 comments

Building an Android App Was Harder Than I Expected

https://timleland.com/building-the-tly-android-app/
2•TimLeland•4m ago•0 comments

Building DIMMsum: a price tracker for used server RAM on eBay

https://austinsnerdythings.com/2026/07/05/building-dimmsum-used-server-ram-price-tracker/
2•LorenDB•5m ago•0 comments

'There Is No Going Back': The Inside Story of Europe's Rupture with America

https://www.wsj.com/world/europe/european-rupture-with-america-e3a9bb3c
2•Alien1Being•5m ago•0 comments

Syntethic Intelligence: from IT to AI, a semantic revolution

https://www.amazon.com/dp/B0H7Q9HMZ7
2•tuned•6m ago•0 comments

Target Figured Out a Teen Girl Was Pregnant Before Her Father Did

https://www.forbes.com/sites/kashmirhill/2012/02/16/how-target-figured-out-a-teen-girl-was-pregna...
2•stevekemp•8m ago•0 comments

Show HN: Belgie – Run TypeScript from Python in an Embedded Deno Sandbox

https://github.com/mplemay/belgie
3•mplemay97•9m ago•0 comments

Regression to the Mean: on LLMs and the quiet death of the new

https://rruxandra.github.io/regression-to-the-mean.html
3•rruxandra_l•11m ago•0 comments

Real time map of France's rail network

https://carto.tchoo.net/
2•appreciatorBus•11m ago•0 comments

Nintendo announces new product revisions in Europe with replaceable batteries

https://www.nintendo.com/en-gb/Support/Nintendo-Switch-2/Information-about-upcoming-battery-relat...
6•akyuu•14m ago•2 comments

China's Biren seeks US$900M to fund GPU push and challenge Nvidia amid AI boom

https://www.scmp.com/tech/tech-trends/article/3359528/chinas-biren-seeks-us900m-fund-gpu-push-and...
2•dstala•14m ago•0 comments

Show HN: Scan your AI agents for dangerous capabilities

https://github.com/makerchecker/MakerChecker
3•smashini•15m ago•1 comments

Global robotaxi market set to hit US$1T by 2040 as China tech costs plummet

https://www.scmp.com/tech/tech-trends/article/3359602/global-robotaxi-market-set-hit-us1t-2040-ch...
3•dstala•15m ago•0 comments

The Fear of Dying Before You Become Yourself

https://www.dailicle.com/read/the-fear-of-dying-before-you-become-yourself
3•dotcoma•15m ago•0 comments

Show HN: PDF reflow in the browser with local AI model

https://www.appblit.com/pdfreflow/demo
2•ldenoue•16m ago•0 comments

Huawei's next smartphone chip taps new scaling law for performance boost: paper

https://www.scmp.com/tech/article/3359592/huaweis-next-smartphone-chip-taps-new-scaling-law-perfo...
2•dstala•17m ago•0 comments

Another German State Swaps Microsoft for 'Born in the EU' Open Source

https://fossforce.com/2026/07/another-german-state-swaps-microsoft-for-born-in-the-eu-open-source/
3•brideoflinux•17m ago•0 comments

Show HN: A strategy game about the AI race where you can't verify alignment

https://criticalwindow.org/
3•micstradev•18m ago•0 comments

How Kalshi Infects the News

https://www.publicnotice.co/p/kalshi-cnn-cnbc
3•everybodyknows•19m ago•0 comments

Consistent Recurrent Neural Networks Embedded in Finite Element Simulations

https://zenodo.org/records/21207967
2•adamzwasserman•19m ago•0 comments

I packed 16 GB of GGUF quants into 1.8 GB, losslessly

https://github.com/theadamdanielsson/ggufpacker
5•adamdanielsson1•20m ago•0 comments

LLMs: A cause of, and solution to, UI drift

https://carom.io/notes/llms-ui-drift/
2•dpc10•20m ago•0 comments

EE Journal on the upcoming $99 dollar explorer board

https://www.eejournal.com/article/need-a-low-cost-fpga-dev-board-check-out-adiuvo-engineerings-99...
3•signalhound•21m ago•0 comments

Show HN: Python running on the Super Nintendo (in-browser demo)

https://fabian-kuebler.com/posts/fable-python-snes/
4•FabianCarbonara•23m ago•0 comments

Trump's red card call stirs political storm around World Cup

https://www.cnn.com/2026/07/06/politics/trump-world-cup-balogun-red-card-infantino-analysis
5•Tomte•25m ago•0 comments

Bryan Johnson: I have an autoimmune disease. My stomach is eating itself

https://twitter.com/bryan_johnson/status/2072069730517860385
4•danso•25m ago•1 comments

Playwright-style automation for Windows desktop apps

https://github.com/mihailDamchevski/win-auto
2•TheGurman•25m ago•0 comments

Whitepaper: The judgment problem in AI-generated API test suites

https://resources.kusho.ai/building-adaptive-coverage-systems-api-testing
4•riyajoshi•28m ago•0 comments

Home made GPU escalated quickly [video]

https://www.youtube.com/watch?v=qMR3IXF2sWw
2•Imustaskforhelp•28m ago•0 comments