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: Turn the prompts you keep retyping into slash commands

https://github.com/kishormorol/cli-faq-shortcuts
1•kishoremorol•56s ago•0 comments

EU tells countries to make plans to cope with 3C of global warming

https://www.ft.com/content/9640cae1-98bb-4509-adb1-729ca6a5f2a8
1•alephnerd•1m ago•0 comments

HLock: Harness Portability for Agent Configs

https://docs.hlock.ai/
1•handfuloflight•11m ago•0 comments

The Beleaguered Chip Sellers Getting Their Revenge on Apple

https://www.wsj.com/tech/apple-iphone-memory-chips-ai-c0084cc9
1•mudil•11m ago•0 comments

Tangled ongoing outage (>= 7 hours) due to AT protocol

https://status.tangled.org
1•paaloeye•11m ago•0 comments

The Fastest (long) ilog10 in the West

https://duplexsystem.org/blog/the-fastest-ilog10-in-the-west/
2•titaniumtown•11m ago•1 comments

A historical timeline of Show HN

https://www.worldintimelines.com/t/hacker-news-show-hn
1•thedreammachine•12m ago•0 comments

3pm – A private desktop calendar for people living with a mental disorder

https://3pm.ninja/
1•adamhott•14m ago•0 comments

A zero-dependency auditor for AI agent exposure (secrets, SSH, configs)

https://ai-agent-antivirus.space/
4•JohnMci•16m ago•1 comments

The campaign to push the Northstar browser into Linux distributions

https://lwn.net/SubscriberLink/1102738/e124c97f934a717e/
2•12_throw_away•16m ago•0 comments

Show HN: A Prolog-powered reverse WAF logic perimeter with SIMD acceleration

https://prologwaf.site/
1•lokinpendawa•20m ago•0 comments

Major Updates to Cloudflare Observability

https://blog.cloudflare.com/one-observability-platform/
1•thatslast•22m ago•0 comments

Latency, energy and memory of π0.5, GR00T, SmolVLA and more on Jetson boards)

https://ixian.zetic.ai/models/compare
2•kimys1324•23m ago•0 comments

Samenland – Plant a Seed. Watch It Grow

https://samenland.app/#
1•doener•26m ago•0 comments

More Math, Less Ego – Erik Demaine [video]

https://www.youtube.com/watch?v=Gdc1yll04qI
2•nill0•26m ago•0 comments

Remembering a Rare Thaw in the Cold War

https://maritime-executive.com/editorials/operation-breakthrough-remembering-a-rare-thaw-in-the-c...
1•gone35•26m ago•0 comments

Ask HN: Nepal Government wants Google Play Merchant access for its Developers

1•njsubedi•27m ago•0 comments

How is life at different levels of GDP per capita?

https://ourworldindata.org/data-insights/how-is-life-at-different-levels-of-gdp-per-capita
1•alphabetatango•30m ago•0 comments

Electronic fibers weave touchscreen into sleeve that survives machine washing

https://www.designboom.com/technology/electronic-fibers-touchscreen-sleeve-machine-washing-nation...
3•thunderbong•31m ago•0 comments

N-gram hinted language modeling: NanoGPT Speedrun in 6.7s

https://brunborg.com/n-gram-hinted-lm
1•simonpure•32m ago•0 comments

Historic records of exports Russian petrolium products including AGIOI FANENDES

https://www.blackseanews.net/en/read/223706
2•paaloeye•32m ago•0 comments

BlueChip

https://www.anduril.com/bluechip
1•bookofjoe•33m ago•1 comments

Natural Emergent Misalignment from Reward Hacking in Production RL [pdf]

https://www-cdn.anthropic.com/daad4360a8bdc707f8b22e3e745796ba27e57fb3.pdf
1•espeed•36m ago•0 comments

Opera adds local AI to its browsers

https://press.opera.com/2026/10/27/opera-doubles-down-on-local-ai-shipping-models-directly-in-its...
1•simonpure•42m ago•1 comments

Princeton to provide ChatGPT accounts for all students, faculty, staff

https://www.dailyprincetonian.com/article/2026/10/princeton-news-breaking-adpol-princeton-to-prov...
2•seam_carver•43m ago•0 comments

World Models explained in 7 mins

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

Oldest customer complaint in recorded history

https://en.wikipedia.org/wiki/Complaint_tablet_to_Ea-n%C4%81%E1%B9%A3ir
2•jameslk•45m ago•0 comments

Git for All Global Law

https://github.com/lexifina/global-law
1•alansaber•48m ago•1 comments

OpenAMRobot

https://github.com/openAMRobot
1•gmays•50m ago•0 comments

Microsoft Azure revenue surges 48% to $33.2B, beating expectations

https://www.geekwire.com/2026/microsoft-azure-revenue-surges-48-to-33-2b-beating-expectations-as-...
1•RoadieRoller•1h ago•0 comments