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•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

Writing Z80 assembly, 4 decades later:-)

https://github.com/ttsiodras/3D-on-a-ZX-Spectrum-48K/
1•ttsiodras•3m ago•0 comments

MegaTrain Full Precision Training of 100B+ Parameter LLMs on a Single GPU

https://github.com/DLYuanGod/MegaTrain
1•adulau•5m ago•0 comments

WHO declares Ebola outbreak in DR Congo a global health emergency

https://www.bbc.co.uk/news/articles/c2l2p0wwzzdo
1•lifeisstillgood•6m ago•0 comments

Ra

https://qntm.org/ra
2•sim04ful•17m ago•0 comments

How to Tell If You're Living in a Binary Crisis

https://www.honest-broker.com/p/how-to-tell-if-youre-living-in-a-8ee
1•Khaine•21m ago•0 comments

Strait of Hormuz submarine cable

https://www.cnn.com/2026/05/17/middleeast/iran-hormuz-undersea-cables-intl
1•reconnecting•22m ago•0 comments

Towards local plug-and-play AI

https://adlrocha.substack.com/p/adlrocha-towards-local-plug-and-play
1•adlrocha•28m ago•0 comments

Why are there squares everywhere in statistics?

https://statmodeling.stat.columbia.edu/2026/05/16/why-are-there-squares-everywhere-in-statistics-...
1•Tomte•32m ago•0 comments

Show HN: Extendable API Gateway Written in Go

2•starwalkn•33m ago•1 comments

Std: Is_heap Could Be Faster

https://quuxplusone.github.io/blog/2026/05/11/is-heap/
1•signa11•33m ago•0 comments

Trump's More Than 3,700 Trades Astonish Wall Street Insiders

https://www.bloomberg.com/news/articles/2026-05-14/trump-bought-nvidia-boeing-microsoft-in-flurry...
2•_tk_•33m ago•0 comments

Unit Testing's Eval Twin

https://volary.ai/articles/unit-testings-eval-twin
2•CamouflagedKiwi•41m ago•0 comments

Show HN: Onami Radio, a simple radio app for iOS

https://marigov.github.io/onami/
3•marigov•42m ago•0 comments

BT.1886 Shorthand Is a Trap

https://daejeonchronicles.com/2026/05/07/bt-1886-shorthand-is-a-trap/
1•Prasadnarava•43m ago•0 comments

Judge Says Krafton Must Rehire Fired 'Subnautica' CEO

https://www.bloomberg.com/news/articles/2026-03-16/judge-says-krafton-must-rehire-fired-subnautic...
1•_tk_•49m ago•0 comments

Softmax in front of CrossEntropyLoss: 16 other bugs PyTorch won't catch

https://gaox.substack.com/p/how-a-road-network-library-helped
1•neurarch•50m ago•0 comments

A Basic Interpreter in Markdown, Running "Natively" in Claude Code

https://dunkels.com/adam/llm-basic-interpreter-markdown/
1•adunk•55m ago•0 comments

Playing Atari ST Music on the Amiga with Zero CPU

https://arnaud-carre.github.io/2026-05-15-ym-fast-emu/
10•z303•58m ago•0 comments

Patrick Collison – Detroit Impressions

https://twitter.com/patrickc/status/2055733308877881807
1•rmason•1h ago•1 comments

UWB Mobile Suica isn't just walk-through gates, it's payments too

https://atadistance.net/2026/05/13/uwb-mobile-suica-isnt-just-walkthrough-gates-its-payments-too/
1•ksec•1h ago•0 comments

ConnectAI – LinkedIn DM Generator

https://chromewebstore.google.com/detail/connectai-—-linkedin-dm-g/cjfnhjpheldgcfmipcmibbmlfmpf...
1•sujalmeena•1h ago•2 comments

Contrast-Proofing Colors with CSS

https://dan-webnotes.com/posts/2026-05-16-contrast-proofing-colors/
1•dandep•1h ago•0 comments

Ten Signs of Fascism. America has all of them

https://rutgerbregman.substack.com/p/10-signs-of-fascism-america-has-all
33•fredski42•1h ago•8 comments

What the FDA won't tell you about your medications (transcript, Propublica)

https://www.propublica.org/podcast/what-fda-wont-tell-you-generic-drugs-safety
1•abawany•1h ago•0 comments

I built a fake Phantom wallet generator

https://larpwallet.app
1•Jhoney•1h ago•2 comments

Neptune: Direct3D Virtualization for QEMU

https://blog.getutm.app/2026/introducing-neptune-direct3d-virtualization-for-qemu/
2•oofdere•1h ago•0 comments

From raw logs to programmable EVM execution intelligence

https://blog.bridgexapi.io/the-anatomy-of-programmable-evm-execution-intelligence
1•Bridgexapi•1h ago•0 comments

kharp – k version 3 Language Interpreter in C#

https://github.com/ERufian/ksharp
1•tosh•1h ago•0 comments

2ality blog: temporarily offline due to AI stealing work

https://2ality.com/
3•mmarian•1h ago•2 comments

Domain Knowledge Is the Leverage

https://log.beshr.com/domain-knowledge-is-the-leverage/
1•beshrkayali•1h ago•0 comments