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

Ask HN: Is there an anti-mosquito system that actually works?

1•simonebrunozzi•4m ago•0 comments

You can't buy anything on these food delivery and shopping sites

https://www.cbc.ca/lite/story/9.7313588
1•colinprince•5m ago•1 comments

He Said He Was the Healthiest Man. Then Came a Diagnosis

https://www.nytimes.com/2026/08/21/us/bryan-johnson-biohacker-autoimmune-gastritis.html
1•whack•7m ago•0 comments

One Step Away from Terminators

https://www.ukrinform.net/rubric-ato/4155812-one-step-away-from-terminators.html
1•rwmj•7m ago•0 comments

Ante: Self-contained coding agent that lives in your terminal and self-organizes

https://docs.antigma.ai/
1•Bluestein•9m ago•0 comments

Chinese robot runs 100M sprint quicker than Usain Bolt's world record

https://www.theguardian.com/sport/2026/aug/22/chinese-robot-runs-100m-sprint-quicker-usain-bolt-w...
3•bookofjoe•9m ago•0 comments

We Need a New Science of Progress (2019)

https://www.theatlantic.com/science/archive/2019/07/we-need-new-science-progress/594946/
1•ronfriedhaber•11m ago•0 comments

Official RC2014 repository for hardware schematics / software

https://github.com/RC2014Z80/RC2014
1•Bluestein•12m ago•0 comments

The New MCP Roadmap

https://blog.modelcontextprotocol.io/posts/mcp-roadmap/
1•pentagrama•17m ago•0 comments

Reading List Hotkey: Save Web Pages to Apple Reminders Using Shortcuts App

https://rdamodar.com.np/thought/2026/08/2026-08-22-reading-list-hotkey/
1•fhcxvbdb•20m ago•0 comments

Fine-Grained Shader Validation in Three.js

https://ben3d.ca/blog/fine-grained-shader-validation-in-threejs
1•bhouston•21m ago•0 comments

A Kantian Critique of "Sorry" by Justin Bieber

https://decodingvibes.com/blog/a-kantian-critique-of-sorry-by-justin-bieber/
10•altmanaltman•25m ago•1 comments

A Most Comfortable Dead End

https://monokai.com/articles/a-most-comfortable-dead-end/
2•monokai_nl•26m ago•0 comments

Font League – new website typography

https://fontleague.com/
4•stephenkelman_•29m ago•1 comments

Show HN: A Ruby IDE running on a microcontroller

https://github.com/engneer-hamachan/area512
2•hamachang•30m ago•0 comments

I finally did it.Custom 4K screens with analog knobs,beautiful feedbadk fractals

https://www.youtube.com/watch?v=koDCabeh5kQ
2•thelightherder•32m ago•0 comments

The fun thing about Electron apps

https://yoavmoshe.com/blog/electron/
3•yoavm•33m ago•0 comments

Improving matrix multiplication exponent w. modern optimization and AlphaEvolve

https://arxiv.org/abs/2608.16884
2•theanonymousone•33m ago•0 comments

Are we cooked? Algorithms have rewired our language

https://www.npr.org/2026/08/21/g-s1-139147/are-we-cooked-algorithms-have-rewired-our-language
2•theanonymousone•35m ago•0 comments

AI Stock Research Assistant · Streamlit

https://ai-stock-research-kiaan.streamlit.app
2•KiaanKothari•36m ago•0 comments

Show HN: Forst – migrate TypeScript back ends to Go

https://forst-lang.org/docs
2•haveyaseen•36m ago•0 comments

Boeing engineers, tech workers reject contract offer

https://www.kuow.org/topics/business/2026-08-21/boeing-engineers-tech-workers-reject-contract-offer
4•Wuzzl•37m ago•1 comments

National Security Science and Technology Strategy [pdf]

https://www.whitehouse.gov/wp-content/uploads/2026/08/NSSTS-082026.pdf
3•jonbaer•37m ago•0 comments

Visual Studio Code 1.0 (2016)

https://code.visualstudio.com/blogs/2016/04/14/vscode-1.0
3•prvt•38m ago•1 comments

Show HN: K8s-audit – 30-second Kubernetes security check (kubectl and jq only)

https://github.com/k8s-security-pro/k8s-audit
2•k8ssecuritypro•40m ago•0 comments

PDPR – Public Dark Pattern Registry

https://pdpr.lyfmail.com/
2•LYFMail•41m ago•1 comments

The Art of the Fugue: Minimizing Interleaving in Collaborative Text Editing

https://arxiv.org/abs/2305.00583
2•danbitengo•42m ago•0 comments

'Darth Vader' makes the case for Flock cameras at city council meeting [video]

https://www.youtube.com/watch?v=7xOURK7-UMs
2•kingleopold•44m ago•0 comments

Show HN: Knoku – cited AI answers from docs, files, and team knowledge

https://knoku.com
1•knoku•44m ago•0 comments

I made a sweater from scratch (it made me insane) [video]

https://www.youtube.com/watch?v=L7QMgbMlaek
1•ot•45m ago•0 comments