frontpage.
newsnewestaskshowjobs

Made with ♥ by @iamnishanth

Open Source @Github

fp.

Open in hackernews

Ask HN: Which function definition keyword do you prefer, def or fn?

1•winwang•11mo 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•11mo 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•11mo 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•11mo 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•11mo ago
"def" is too generic.

"fn" is too cryptic.

"function" is better than the two.

MultifokalHirn•11mo ago
Agreed

Generative design of novel bacteriophages with genome language models [pdf]

https://www.biorxiv.org/content/10.1101/2025.09.12.675911v1.full.pdf
1•thunderbong•7m ago•0 comments

Built a safety-first options automation tool for covered calls

1•jansonlau•16m ago•0 comments

Why cars charge 5x faster in China when the research is shared?

https://cyrusradfar.com/thoughts/why-cars-charge-5x-faster-in-china/
2•cyrusradfar•21m ago•0 comments

America's Pandemic Car Bubble Is Now Trapping Buyers in Debt

https://www.wsj.com/business/autos/car-owners-debt-negative-equity-3cfcd031
2•JumpCrisscross•23m ago•0 comments

Our Principles

https://openai.com/index/our-principles/
1•salkahfi•37m ago•0 comments

A New Idea to Save the Climate? Dam the Bering Strait.

https://www.nytimes.com/2026/04/24/climate/amoc-bering-strait-dam.html
2•bookofjoe•40m ago•1 comments

Sabastian Sawe becomes first person to break two-hour marathon mark

https://www.rte.ie/sport/athletics/2026/0426/1570275-sawe-becomes-first-man-to-break-two-hour-mar...
2•austinallegro•43m ago•0 comments

Show HN: Nitrum – Rust Toolkit and CLI for AWS Nitro Enclaves

https://github.com/matzapata/nitrum
2•matzapata•44m ago•1 comments

I Learned to Stop Worrying and Love Coding with AI

https://jeffield.net/blog/claude-strangelove-or-how-i-learned-to-stop-worrying-and-love-coding-wi...
1•jsheffie•44m ago•0 comments

The Atari 1200XL – By Paul Lefebvre

https://www.goto10retro.com/p/inside-the-atari-1200xl
1•rbanffy•45m ago•0 comments

Did You Say "Intellectual Property"? It's a Seductive Mirage

https://www.gnu.org/philosophy/not-ipr.html.en
2•MontyCarloHall•48m ago•0 comments

FreeBSD Device Drivers Book

https://github.com/ebrandi/FDD-book
1•myth_drannon•48m ago•0 comments

Jaeger adopts OpenTelemetry at its core to solve the AI agent observability gap

https://thenewstack.io/jaeger-v2-ai-observability/
1•Brajeshwar•49m ago•0 comments

Intel reportedly says it boosted yields by selling what would normally be scrap

https://www.tomshardware.com/pc-components/cpus/intel-reportedly-says-it-boosted-yields-by-sellin...
2•rbanffy•50m ago•0 comments

The tortoise and the hare: will China beat the US in the race back to the moon?

https://www.theguardian.com/science/2026/apr/26/china-us-space-race-moon
3•pseudolus•52m ago•0 comments

Show HN: CheckThisOut – a filtered directory of side hustles and AI tools

https://checkthisout.com/
1•mbahlitz•54m ago•0 comments

SnakeBreak [a Browser Extension Game]

https://addons.mozilla.org/en-US/firefox/addon/snakebreak/
1•programmexxx•56m ago•1 comments

VPinFE – Cross-platform Front end for VPinball

https://github.com/superhac/vpinfe
1•terry107•1h ago•0 comments

JQuake – monitor real-time shaking events in Japan

https://jquake.net/en/
1•pndy•1h ago•0 comments

Statistical Structure and the Evolution of Languages

https://royalsocietypublishing.org/rspb/article/293/2068/20252374/481270/Statistical-structure-an...
1•Anon84•1h ago•0 comments

The Spinor Genus and the Distinguishing Lattice Isomorphism Problem(2024)

https://eprint.iacr.org/2024/1475
1•rolph•1h ago•0 comments

NSF science advisory board fired by Trump administration

https://www.nature.com/articles/d41586-026-01361-7
2•rguiscard•1h ago•1 comments

Show HN: Out Loud – open-source desktop TTS app for macOS/Windows/Linux

https://github.com/light-cloud-com/out-loud
2•julia-kafarska•1h ago•0 comments

Show HN: Logic Designer – Webapp

https://logic-designer.github.io/logic-designer-main/
2•logic-designer•1h ago•0 comments

Show HN: Startup Equity Adventure Game

https://options-game-polymathrobotics.pythonanywhere.com/
7•iliabara•1h ago•3 comments

CIOs struggle to find clarity in their organizations' AI strategies

https://www.cio.com/article/4162949/cios-struggle-to-find-clarity-in-their-organizations-ai-strat...
3•WaitWaitWha•1h ago•0 comments

DeepSeek drops input cache price to 1/10th

https://xcancel.com/deepseek_ai/status/2048440764368347611
5•alecco•1h ago•1 comments

The curious case of Sean Plankey's derailed CISA nomination

https://www.csoonline.com/article/4162801/the-curious-case-of-sean-plankeys-derailed-cisa-nominat...
2•WaitWaitWha•1h ago•0 comments

High energy sports drinks boost performance even if you spit them out

https://www.theguardian.com/science/2009/apr/15/high-energy-carbohydrate-drinks-performance-brain
6•bwoah•1h ago•1 comments

US Navy tests laser weapon that shoots down drones on the USS George H.W. Bush

https://www.tomshardware.com/tech-industry/us-navy-tests-laser-weapon-that-shoots-down-drones-on-...
3•rbanffy•1h ago•0 comments