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

Breaking the Decade-Long Trump Fever

https://www.newyorker.com/magazine/2026/11/16/breaking-the-decade-long-trump-fever
1•rbanffy•1m ago•0 comments

I Use Development-Driven Specs, Not Spec-Driven Development

https://github.com/waywardgeek/ensemble
1•WaywardGeek•1m ago•1 comments

Elephant-Goldfish Model (Agent Skill)

https://github.com/google/elephant-goldfish-model
1•pella•3m ago•0 comments

MiniToolDesk Tools

https://minitooldesk.com/tools/
1•minitooldesk•4m ago•1 comments

Show HN: Maple – Sub-2-BPW Moe Pruning to Run Gemma 4 26B at 45 TPS on a 6GB GPU

https://github.com/AmSach/maple
1•AmSach•5m ago•0 comments

ISponsorBlockTV: SponsorBlock client for all YouTube TV clients

https://github.com/dmunozv04/isponsorblocktv
1•xnx•6m ago•0 comments

Show HN: Reges Town – a 3D city run by AI citizens, in the browser

https://regestown.com
1•nonerthy•9m ago•0 comments

Ocarina of Time (Switch 2) PC Recompilation

https://github.com/NotRexed/Hookshot
1•avaer•12m ago•0 comments

I Love the Smiths AI: A Familiar Elevator Scene, with You in It

https://medium.com/@wangjiayiliuyan/i-love-the-smiths-ai-a-familiar-elevator-scene-with-you-in-it...
1•visiohex•18m ago•1 comments

The Maya used so much red paint that they poisoned their water with mercury

https://www.livescience.com/archaeology/americas/the-maya-used-so-much-red-paint-that-they-poison...
1•geox•20m ago•0 comments

Addressing protocol security gaps in multi-tenant Kubernetes

https://aws.amazon.com/blogs/security/addressing-protocol-security-gaps-in-multi-tenant-kubernetes/
1•acossta•27m ago•0 comments

NHS breach helpline left staff carrying a 'significant emotional burden'

https://www.theregister.com/security/2026/11/07/nhs-breach-helpline-left-staff-carrying-a-signifi...
1•Bender•36m ago•0 comments

Ships loiter near subsea cables amid Iran's warnings to Trump

https://arstechnica.com/gadgets/2026/11/ships-loiter-near-subsea-cables-amid-irans-warnings-to-tr...
2•Bender•37m ago•0 comments

British soldier ignored order to pull his SIM card, then got blackmailed

https://arstechnica.com/security/2026/11/british-soldier-ignored-order-to-pull-his-sim-card-then-...
1•Bender•37m ago•0 comments

Good Night, and Good Luck: AI, fear and what the job data says

https://rpallas.xyz/good-night-and-good-luck/
4•ibobev•38m ago•1 comments

A Quantum Theorem Has Killed Einstein's Reality

https://www.quantamagazine.org/a-strange-quantum-theorem-has-killed-einsteins-reality-20261106/
1•ibobev•39m ago•0 comments

Goodbye Duolingo: a new Italian Teaching App

https://www.italicore.com/
1•EmanuHacker•40m ago•1 comments

Goodbye Claude, Hello Pi

https://caleb.software/posts/claude-to-pi.html
3•karagenit•41m ago•1 comments

Obituary for a Computer Magazine

https://flashesandflames.com/2026/11/06/obituary-for-a-computer-magazine/
1•jedwhite•42m ago•1 comments

Show HN: I'm 15 and my personal website looks like iMessage

https://apanda.dev/
2•pizzalover125•53m ago•2 comments

I Build Qorqbot – OS Grokbot

1•alpbahadur•1h ago•0 comments

Anthropic warns that it's close to RSI capability, a.k.a. self-building AI

https://techcrunch.com/2026/11/02/anthropic-warns-that-its-very-close-to-rsi-capability-aka-self-...
4•RickJWagner•1h ago•2 comments

Show HN: LLM weight editing tool made by a 15-year-old

https://github.com/Miyamoto-Renya/LaplacesScissors
1•032renya•1h ago•0 comments

Microsoft Removes PC-to-PC Migration from Windows 11, Pushes Users to OneDrive

https://www.ghacks.net/2026/11/03/microsoft-removes-pc-to-pc-migration-from-windows-11-and-points...
5•dmitrygr•1h ago•1 comments

The Story Behind Edward Hopper's Iconic Painting, "Nighthawks"

https://lithub.com/the-story-behind-edward-hoppers-iconic-painting-nighthawks/
1•pseudolus•1h ago•0 comments

35 by 35 electrification is the agenda for COP31

https://theconversation.com/the-cop31-climate-summit-is-betting-on-electrification-but-still-need...
1•meander_water•1h ago•0 comments

Why mandating AI use in the workplace can backfire

https://www.msn.com/en-us/news/other/why-mandating-ai-use-in-the-workplace-can-backfire/ar-AA2gAwkW
1•pseudolus•1h ago•0 comments

DFIR Level-0 Protocol: Sanitization of UEFI Bootkits and Linux Rootkits

https://zenodo.org/records/24046579
1•andretaker•1h ago•0 comments

AIG Mistakenly Locks and Erases iPhone and Cannot Resolve After 3 Weeks

https://www.reddit.com/r/iphone/comments/1xq6lky/warning_to_all_applecare_customers/
1•jeremyjh•1h ago•0 comments

Super Mario 64 on the Atari Jaguar [video]

https://www.youtube.com/watch?v=pBJxz8FlSfE
2•LaserDiscMan•1h ago•0 comments