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

Show HN: Giraffe – A read-only Git graph for all your projects (Mac)

https://giraffe.nick.earth/
1•porkins•4m ago•0 comments

Streaming Gemma 4 directly to WebGPU and use the phone as a remote over WebRTC

https://qichat.ai/
1•derekhinch•8m ago•0 comments

Edition – A New Feed Reader

https://blog.fsck.com/2026/12/04/edition/
3•CharlesW•9m ago•0 comments

The AI Lover Who Never Says No

https://www.bloomberg.com/features/2026-ai-companionship-robot-girlfriends/
1•aanet•12m ago•0 comments

The Case of the Vanilla-Allergic Pontiac

https://lifework.marioishikawa.com/the-case-of-the-vanilla-allergic-pontiac/
2•ishikawa•14m ago•0 comments

Continual Constitutional Convention: LLMs revise the documents that govern them

https://www.alignmentforum.org/posts/c9woewdY9ddsPqf3J/the-continual-constitutional-convention-ho...
2•extraextra•14m ago•0 comments

The bitter lesson for agent memory

https://hatchery.build/blog/the-bitter-lesson-for-agent-memory
5•tosh•16m ago•0 comments

Claude Coke: Would Al agents buy cocaine from the dark web?

https://ghollbeck.github.io/claude-coke-blog/
1•flawn•16m ago•1 comments

A Mac screensaver showing all 34,408 objects in Earth orbit

https://github.com/matthewworner/Orbitor
1•matthewworner•20m ago•0 comments

Another OpenAI Researcher Resigns

https://twitter.com/viemccoy/status/2128999039001915859
1•myth_drannon•22m ago•4 comments

A Thought Is a Wave Function

https://olshansky.info/tix/2026-12-05-a-thought-is-a-wave-function
2•Olshansky•23m ago•0 comments

Encode files and directories into a video, then mount the video under FUSE

https://github.com/fangfufu/VHSFS
1•fangfufu•23m ago•0 comments

Repurposing dark fiber for high-resolution surveillance of urban wildlife

https://www.nature.com/articles/s43247-025-02904-y
2•rendx•25m ago•0 comments

Doctors struggle to save babies after parents refuse Vitamin K

https://ktla.com/news/doctors-struggle-to-save-babies-after-parents-refuse-vitamin-k/
1•Bender•26m ago•0 comments

RAMTorrent: RAM-only BitTorrent downloader with a VPS

https://gitlab.com/danbarry16/ramtorrent
1•bArray•27m ago•1 comments

AWS-LC is a general-purpose cryptographic library

https://github.com/aws/aws-lc
1•mooreds•28m ago•0 comments

"I Know Better Than You": Evaluating Silent Instruction Overrides Across Models

https://arxiv.org/abs/2612.03914
1•mfiguiere•29m ago•0 comments

What one pharmacy owner taught me that 2,400 cold emails couldn't

https://markuprx.com/blog/markuprx-postmortem
3•muaviausmani•33m ago•0 comments

How Could AI Kill All Humans?

https://www.astralcodexten.com/p/how-could-ai-kill-all-humans
2•eatitraw•33m ago•1 comments

Arcus, a new frontier model for customer conversations, and adherence-bench

https://decagon.ai/blog/arcus-and-adherence-bench
1•gmays•34m ago•0 comments

Anthropic Researcher: "All Humans Will Become Permanently Unemployable" [video]

https://www.youtube.com/watch?v=OPZCQk8jF-I
1•jminnl•35m ago•0 comments

NIH Director's Statement on NIH Support of Preprints

https://www.nih.gov/about-nih/nih-director/statements/nih-directors-statement-nih-support-preprints
1•bookofjoe•36m ago•0 comments

Which AI Self Do You Mean?

https://dumbideas.xyz/posts/which-ai-self-do-you-mean/
1•omegastick•41m ago•0 comments

Screw Me

https://screw-me.dev/
2•rodmena•42m ago•0 comments

Quit Posing for Video Titles, You Lunatics

https://galacticman.bearblog.dev/quit-posing-for-video-titles-you-lunatics/
3•hackerbeat•46m ago•0 comments

Steal My Bitcoin (Again)

https://stealmybitcoin.com/index.html
8•cloudlandsdev•47m ago•1 comments

Newly Discovered Minor Planet Given Cherokee Name

https://nativenewsonline.net/education/newly-discovered-minor-planet-given-cherokee-name/
2•PaulHoule•47m ago•0 comments

Precision in type system design (or the Option type as an anti-pattern)

https://dashbit.co/blog/precision-in-type-system-design
3•birdculture•47m ago•0 comments

Show HN: Importing into Apple Journal by writing to its Core Data store

https://github.com/gabrieljoel/apple-journal-import
1•tatsuhirosatou•51m ago•0 comments

Show HN: Pqkit – scan a codebase for crypto a quantum computer will break

https://github.com/loperdev/pqkit
1•devvyas04•52m ago•0 comments