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

What the Singularity Means

https://danielmiessler.com/blog/what-the-singularity-actually-means
1•meetpateltech•8m ago•0 comments

Show HN: An AI skill for filtering and reading Hacker Newsletter and others

https://github.com/Promyer/stellar-inbox
1•miros_love•10m ago•0 comments

Built-in authentication and authorization for Manticore Search

https://medium.com/@s_nikolaev/built-in-authentication-and-authorization-for-manticore-search-0e2...
1•snikolaev•10m ago•0 comments

The bond market isn't buying what Fed Chair Warsh is selling

https://www.reuters.com/commentary/reuters-open-interest/bond-market-isnt-buying-what-fed-chair-w...
5•kaycebasques•11m ago•0 comments

I Pressed ⌘B. You Wouldn't Believe What Happened Next (2020) [video]

https://www.youtube.com/watch?v=kVD-sjtFoEI
1•colinprince•12m ago•0 comments

A California aquifer may have crossed the point of no return

https://www.science.org/content/article/california-aquifer-may-have-crossed-point-no-return
16•Jimmc414•15m ago•2 comments

Reverse engineering the Attack Shark keyboard protocol

https://dnim.dev/blog/royuan-keyboard-protocol
1•Jimmc414•16m ago•0 comments

A Trit Is the Trinary Analog of a Bit

https://www.alignmentforum.org/w/trit-1
1•connorboyle•17m ago•0 comments

Why is this one spot not warming? [video]

https://www.youtube.com/watch?v=dqLM65HfVEw
1•toomuchtodo•35m ago•0 comments

RSI: Recursive Self-Improvement

https://github.com/zartbot/blog/issues/12
1•matt_d•37m ago•0 comments

Emulating ALiBi with Rope

https://alexlitzenberger.com/blog/emulating_alibi_with_rope
1•alexlitz•37m ago•0 comments

GitHub Planet – GitHub pushes become real-time shooting stars

https://githubplanet-git-543426763451.asia-northeast2.run.app/
1•wakato•39m ago•0 comments

U.S. Weighs $100k Fee for Foreign Students Wanting to Work After Graduation

https://www.wsj.com/politics/policy/u-s-weighs-100-000-fee-for-foreign-students-wanting-to-work-a...
3•alephnerd•42m ago•4 comments

Ask HN: Can Apple Ever Be Disrputed?

2•Taikhoom2010•46m ago•2 comments

A practical index for evolving peptide research

https://www.researcher6076.com/
1•kentbrew•48m ago•1 comments

"the very foundation of modern academia has been blown to bits"

https://twitter.com/lemire/status/2082851447499088173
2•telotortium•49m ago•0 comments

Giving Nuclear Waste Another Chance

https://www.energy.gov/articles/nuclear-lifecycle-innovation-campuses-contenders-announced
1•gscott•52m ago•0 comments

Through the Lens of an Ancient Yisra'elite Bible Study

https://www.amazon.com/Through-Ancient-Yisraelite-Bible-Study/dp/B0FB8VKDNJ
1•thepowerofnow•59m ago•0 comments

The cure for AI slop is a 1986 aircraft manual

https://www.youtube.com/watch?v=uJblcC4lKYw
2•bananaboy•1h ago•2 comments

Audited APIs for public compliance data (SEC EDGAR, FINRA, OFAC, and more)

https://api.techcompass.com.au/index.html
1•techcompass•1h ago•0 comments

Show HN: Reclip – AI Video Clipper, Voiceover and Creator Tools

https://www.reclip.io
1•qwikhost•1h ago•0 comments

From CUDA to MLX: How K-Search Brings Kernel Expertise to Apple Silicon

https://bair.berkeley.edu/blog/2026/07/29/cuda-to-mlx-k-search/
1•williamjinq•1h ago•0 comments

Predictable RNG Fallback and 32-Bit Reseed in Coldcard Firmware

https://engineering.block.xyz/blog/predictable-rng-fallback-and-32-bit-reseed-in-coldcard-firmware
5•greyface-•1h ago•0 comments

Thousands of User Signals You're Missing Every Week

https://agenmatic.ai/features
2•Yummiy•1h ago•0 comments

Show HN: [Target: Calamity] A visualization of how long we have to change course

https://TargetCalamity.org
1•MaxONeill159•1h ago•2 comments

Genesis-Science-1, an Open-Weight Model for Scientific Research

https://www.arcee.ai/science-1
1•gmays•1h ago•0 comments

Conductor launches multiplayer cloud workspaces that keep coding agents running

https://runtimewire.com/article/conductor-launches-multiplayer-cloud-workspaces-coding-agents
2•ryanmerket•1h ago•0 comments

How a Worm Gave the South a Bad Name

https://www.pbs.org/wgbh/nova/article/how-a-worm-gave-the-south-a-bad-name/
1•thunderbong•1h ago•0 comments

Show HN: HereTool – A fast, client-side web utility suite with zero data logging

https://heretool.com/
1•heretool•1h ago•0 comments

AWS Interconnect – Multicloud Connectivity with Oracle Cloud Infrastructure

https://aws.amazon.com/about-aws/whats-new/2026/07/aws-announces-AWS-interconnect-multicloud-OCI-GA/
1•gslin•1h ago•0 comments