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

"fn" is too cryptic.

"function" is better than the two.

MultifokalHirn•10mo ago
Agreed

Company Records and Publishes Zoom Meetings

https://www.schneier.com/blog/archives/2026/04/company-that-secretly-records-and-publishes-zoom-m...
1•walterbell•26s ago•0 comments

Chiles v. Salazar: The Supreme Court Issues a Bad Good First Amendment Decision

https://www.techdirt.com/2026/04/03/in-chiles-v-salazar-the-supreme-court-issues-a-bad-good-first...
1•hn_acker•1m ago•1 comments

US targets Chinese chipmaking with proposed export restrictions

https://www.reuters.com/world/china/us-targets-chinese-chipmaking-with-proposed-export-restrictio...
1•abdelhousni•2m ago•0 comments

Trump's ballroom fight sheds new light on an underground White House bunker

https://www.npr.org/2026/04/03/nx-s1-5772665/trump-ballroom-underground-military-bunker
3•alamortsubite•6m ago•0 comments

SiteDialect – Make any website multilingual with one script tag

https://sitedialect.com/
1•xLFCx•11m ago•0 comments

OpenRazer 3.12.1 Enables Two More Razer Devices Under Linux

https://www.phoronix.com/news/OpenRazer-3.12.1-Released
1•doener•12m ago•0 comments

The FAA "Temporary" Drone Restriction Blatant Attempt to Criminalize Filming ICE

https://www.eff.org/deeplinks/2026/04/faas-temporary-flight-restriction-drones-blatant-attempt-cr...
4•detaro•15m ago•0 comments

Half of planned US data center builds have been delayed or cancelled

https://www.tomshardware.com/tech-industry/artificial-intelligence/half-of-planned-us-data-center...
3•jnord•16m ago•0 comments

The Last Quiet Thing

https://www.terrygodier.com/the-last-quiet-thing
2•wrxd•19m ago•0 comments

Linux Gaming Got an Upgrade

https://www.youtube.com/watch?v=Jyjwi4vhLtI
1•doener•19m ago•0 comments

Open Source Routing Machine

https://project-osrm.org/
1•omnibrain•20m ago•0 comments

Some victims of deadly Tahoe avalanche wore airbags that never inflated

https://www.sfgate.com/bayarea/article/deadly-tahoe-avalanche-report-22187407.php
2•randycupertino•21m ago•0 comments

Ask HN: What’s missing in this chat app (90% LLM cost savings)?

https://github.com/20centAI/20centai
1•20centAI•21m ago•0 comments

Anthropic just cut off Claude subscriptions for OpenClaw

2•stosssik•24m ago•1 comments

Claude Code Found a Linux Vulnerability Hidden for 23 Years

https://mtlynch.io/claude-code-found-linux-vulnerability/
3•eichin•25m ago•2 comments

Dragonbane is a classic fantasy tabletop roleplaying game

https://freeleaguepublishing.com/games/dragonbane/
1•doener•29m ago•0 comments

Tomorrow 12pm PT, Claude subscriptions no longer cover third-party tools

https://twitter.com/bcherny/status/2040206440556826908
2•empressplay•36m ago•1 comments

ENiGMA½ BBS Software

https://github.com/NuSkooler/enigma-bbs/
1•NuSkooler•37m ago•1 comments

Kids groups say they didn't know OpenAI was behind their child safety coalition

https://sfstandard.com/2026/04/01/openai-ai-kids-safety-coalition/
6•heavyset_go•39m ago•0 comments

Outdated language obscures the risks of autonomous weapons

https://thebulletin.org/2026/04/outdated-language-obscures-the-risks-of-autonomous-weapons/
2•jonbaer•40m ago•1 comments

No-AI code analysis found issue in HF tokenizers

https://zenodo.org/records/19409933
1•promptfluid•40m ago•0 comments

Flattening the Duck Curve: batteries reach 44% of evening demand in California

https://reneweconomy.com.au/grid-batteries-reach-stunning-new-peak-of-44-pct-of-evening-demand-in...
6•bronson•42m ago•0 comments

Extra usage credit for Claude to celebrate usage bundles launch (Pro, Max, Team)

https://support.claude.com/en/articles/14246053-extra-usage-credit-for-pro-max-and-team-plans
6•angst•45m ago•2 comments

Ask HN: Anthropic changing billing for third-party harnesses for Teams Accounts?

1•qdot76367•47m ago•0 comments

Rotato: Auto-rotate API keys on 429 rate limit errors (zero deps)

https://github.com/p32929/rotato
1•alexdevson42•47m ago•0 comments

How to Write Unmaintainable Code (1999)

https://www.doc.ic.ac.uk/%7Esusan/475/unmain.html
8•downbad_•49m ago•5 comments

Semantic Firewall

https://hijo790401.github.io/shen-yao-portal/
1•look888•49m ago•0 comments

Nutrax – a social calorie tracking app with AI food scanning (iOS)

https://apps.apple.com/no/app/nutrax-ai-food-tracker/id6761395869
1•ekornseter•50m ago•0 comments

ZooClaw – Separate workspace and soul per agent, built on OpenClaw

https://zooclaw.ai/en
2•nemofq•53m ago•1 comments

Friday Archaeology: A 25-Year-Old Crypto Library, the Cult of the Dead Cow

https://llama.gs/blog/index.php/2026/04/03/friday-archaeology-a-quarter-century-old-crypto-librar...
3•major4x•54m ago•0 comments