frontpage.
newsnewestaskshowjobs

Made with ♥ by @iamnishanth

Open Source @Github

fp.

Open in hackernews

Ask HN: Which function definition keyword do you prefer, def or fn?

1•winwang•9mo 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•9mo 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•9mo 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•9mo 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•9mo ago
"def" is too generic.

"fn" is too cryptic.

"function" is better than the two.

MultifokalHirn•9mo ago
Agreed

Show HN: Multiplayer "Hack My Agent" prompt injection game

https://alec.is/hack-my-agent/
1•arm32•2m ago•0 comments

Any Swiss devs found a "cheap" way to acces Banking APIs for a small project?

1•darktoto•3m ago•0 comments

Have your cake and decompress it too

https://spiraldb.com/post/cascading-compression-with-btrblocks
1•emschwartz•4m ago•0 comments

Show HN: Music Discovery Marketplace

https://www.secondtrack.co/discover
1•eriatarka•4m ago•0 comments

Tesla China delivery times collapse to 1-3 weeks as it extends financing again

https://electrek.co/2026/02/27/tesla-tsla-china-delivery-times-collapse-extends-financing-demand/
1•breve•5m ago•0 comments

2-3 Cups of Coffee a Day May Reduce Dementia Risk

https://www.nytimes.com/2026/02/09/health/coffee-tea-dementia-risk.html
1•brandonb•5m ago•0 comments

Mixture of Experts (MoEs) in Transformers

https://huggingface.co/blog/moe-transformers
1•ibobev•5m ago•0 comments

Tudumb

https://spyglass.org/netflix-warner-bros-paramount-deal/
1•colinprince•8m ago•0 comments

Mondrian Entered the Public Domain. The Estate Disagrees

https://copyrightlately.com/mondrian-public-domain-controversy/
1•Tomte•8m ago•0 comments

If you drive clock wise along the beach on an island

1•Cookingboy•9m ago•0 comments

Software Quality (and Reliability, and Frugality)

https://morrick.me/archives/10267
2•speckx•11m ago•0 comments

Show HN: Alba – Earn and bid on unique software using idle AI credits

https://alba-run.vercel.app/
1•WadeToEarth•12m ago•0 comments

Show HN: Treekei – understand project code structure in seconds

https://github.com/zihao-liu-qs/treekei
2•zihao-liu-qs•12m ago•1 comments

Apple Magic TouchstreamLP: Using the Apple Magic Trackpad as Keyboard

https://github.com/disarmyouwitha/AppleMagicTouchstreamLP
1•tosh•12m ago•0 comments

NASA shakes up its Artemis program to speed up lunar return

https://arstechnica.com/staff/2026/02/nasa-shakes-up-its-artemis-program-to-speed-up-lunar-return/
2•LorenDB•15m ago•0 comments

Show HN: Gas Town Control Plane – hosted monitoring for multi‑agent workspaces

https://github.com/SmolNero/gastown-control-plane
1•edgar_ortega•17m ago•0 comments

An Ode to Houseplant Programming

https://hannahilea.com/blog/houseplant-programming/
1•evakhoury•18m ago•0 comments

Toxic combinations: when small signals add up to a security incident

https://blog.cloudflare.com/toxic-combinations-security/
1•unknownhad•19m ago•0 comments

Show HN: ClawDocx – We built a skill and guide library for OpenClaw AI agents

https://clawdocx.com/
1•obobobo•20m ago•0 comments

Rivian was saved by software in 2025

https://techcrunch.com/2026/02/12/rivian-was-saved-by-software-in-2025/
1•PaulHoule•21m ago•0 comments

Show HN: Offline-First Agent Multiplexer

https://twitter.com/ethansteininger/status/2027401658272031108
1•Beefin•21m ago•0 comments

Media Diet

https://macwright.com/2026/02/05/media-diet
1•speckx•21m ago•0 comments

Traveling neighborhoods: a different kind of group trip (2024)

https://devon.postach.io/post/traveling-neighborhoods-a-different-kind-of-group-trip
1•surprisetalk•23m ago•0 comments

Colt's Revolutions (2024)

https://taylor.town/colt
1•surprisetalk•23m ago•0 comments

AI RSS feed summarizer that powers feeds.carmo.io

https://github.com/rcarmo/feed-summarizer
1•janandonly•23m ago•0 comments

Why Concepts Aren't Objects

https://essenceofsoftware.com/posts/concepts-and-oop/
1•surprisetalk•23m ago•0 comments

Show HN: Badge that shows how well your codebase fits in an LLM's context window

https://github.com/qwibitai/nanoclaw/tree/main/repo-tokens
12•jimminyx•23m ago•2 comments

The Simple Essence of Monomorphization [video]

https://www.youtube.com/watch?v=xqoTzQ9b9S0
1•surprisetalk•23m ago•0 comments

Ente Locker

https://ente.io/blog/locker/
3•pentagrama•23m ago•0 comments

Most Knowledge Management Systems Fail

https://desktopcommander.app/blog/ai-knowledge-management-system/
1•rafaepta•23m ago•0 comments