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

GCC Patch Adjusting AMD Zen 5 Misprediction Cost Nets 12% Win in Benchmark

https://www.phoronix.com/news/AMD-Zen-5-Mispredict-Cost
1•Alephinitesimal•38s ago•0 comments

Coupling free electrons to a trapped-ion quantum computer

https://arxiv.org/abs/2601.11446
1•rbanffy•1m ago•0 comments

I Tried to Solve Hangman

https://ballparkfigures.substack.com/p/hangman
1•jffry•1m ago•0 comments

GOP issues stark warning to AI companies

https://www.axios.com/2026/08/19/gop-data-center-memo-ai-election
1•adletbalzhanov•4m ago•0 comments

Show HN: World Models 101 - an interactive guide to World Models

https://worldmodels101.com/chapters/what-is-a-world-model
1•Niluk•9m ago•0 comments

Higher-Order List Operations

https://matt.might.net/articles/higher-order-list-operations/
1•azhenley•9m ago•0 comments

Linus Torvalds uses AI to debug an Intel GPU driver bug

https://github.com/torvalds/linux/commit/818bebeb63dd6bf5f4e07e145f6cdbace520a34c
2•birdculture•9m ago•0 comments

Fires are turning Forests into shrubland in America's West

https://www.nytimes.com/2026/08/23/climate/wildfire-forest-loss-california-southwest.html
2•cwwc•10m ago•1 comments

For anyone looking to make resumes

https://justquicktools.com/resume-builder
1•officialjerryno•11m ago•0 comments

Show HN: Kit – Not another events app

https://trykit.io/
1•sagsanne•17m ago•0 comments

Show HN: Locality – Sync engine to mount apps like Notion, Gmail as a filesystem

https://github.com/codeflash-ai/locality
1•misrasaurabh1•17m ago•0 comments

You can never go home again. But you can spend a lifetime trying

https://www.dwell.com/article/moving-out-of-your-childhood-home-john-petrarca-architect-b6d045d1-...
1•NaOH•18m ago•0 comments

CAD Benchmark

https://www.seldon.global/blog/cadbench
1•hmokiguess•26m ago•0 comments

Show HN: Substack Corpus Migration

https://www.shayanarman.com/archive
1•shayan-arman•27m ago•0 comments

Parallel development without the headaches using Git worktree

https://barrd.dev/article/parallel-development-without-the-headaches-using-git-worktree/
3•oogali•30m ago•0 comments

Getters, Setters, and Other Things I Loved Without Knowing Why

https://robertxworld.com/shadow-artist-software-engineer/
2•devrob•30m ago•0 comments

You probably use AI because your colleagues use AI

https://austinhenley.com/blog/aiadoption.html
1•azhenley•33m ago•1 comments

Ask HN: How to build an audience as a software engineer?

1•grandimam•33m ago•1 comments

How I Use Git Worktrees (2024)

https://matklad.github.io/2024/07/25/git-worktrees.html
1•oogali•34m ago•0 comments

AI scanner AgentGG found GeoServer SQL injection before zero-day

https://medium.com/@philipgarabandic/a-geoserver-zero-day-that-went-from-private-report-to-public...
2•PhilipGa•38m ago•0 comments

Show HN: Vidmoat – My Super Fantastic AI Native Video Editor (MCP, Web)

https://www.vidmoat.com
2•abilafredkb•40m ago•0 comments

The Planet Now Has More Trees Than It Did 35 Years Ago

https://psmag.com/environment/the-planet-now-has-more-trees-than-it-did-35-years-ago/
19•bookofjoe•40m ago•3 comments

A complex structure on S^6 [pdf]

https://alpo.ge/s6.pdf
24•robinhouston•48m ago•11 comments

Implementation of GPT-2 in pure CMake

https://github.com/AlpinDale/gpt2.cmake
2•porridgeraisin•54m ago•0 comments

Ask HN: How to Onboard to New Domains

3•kwojcicki•56m ago•0 comments

AI robotics companies love San Francisco. They're just too big to stay

https://sfstandard.com/2026/08/23/ai-robotics-san-francisco-bright-machines/
2•newsomix9xl•59m ago•0 comments

Inkwell: Software Factory and rebootable sandbox on a throwaway VM

https://github.com/disler/inkwell-agent-sandboxes-and-software-factory
1•mooreds•1h ago•0 comments

It's OK to not be passionate about your job

https://text.npr.org/1076978534
3•mooreds•1h ago•1 comments

Seven nobles' 1688 letter inviting William of Orange to take the English throne

https://www.nationalarchives.gov.uk/education/resources/glorious-revolution/glorious-revolution-s...
3•mooreds•1h ago•0 comments

AI reshapes India's IT services sector contracts as clients demand more for less

https://www.reuters.com/world/india/ai-reshapes-indias-it-services-sector-contracts-clients-deman...
2•prabal97•1h ago•0 comments