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: Singapore ACRA (2.13M entities) and GST API, MCP server, CSV checker

https://oxaide.com/developers
1•leewenjie•47s ago•0 comments

GameStop is selling Game Informer's vault and its former editor is angry

https://www.videogameschronicle.com/news/gamestop-is-selling-game-informers-entire-vault-of-nearl...
1•rdmuser•50s ago•0 comments

Show HN: KiwiBasil – MangoMint Data Export

https://chromewebstore.google.com/detail/kiwibasil-mangomint-data/kikibklpcknkalleefmpbonbiibbghfa
1•rrr_oh_man•4m ago•0 comments

No One Should Trust AI to Write Their Code

https://www.adacore.com/blog/no-one-should-trust-ai-to-write-their-code
1•RossBencina•5m ago•0 comments

Accelerated Bachelor's to PhD (AccelPhD)

https://www.nsf.gov/funding/opportunities/accelphd-accelerated-bachelors-phd
1•United857•5m ago•0 comments

Chamberlain is giving itself a permanent license to your data

https://www.theverge.com/tech/1050757/chamberlain-garage-door-smart-home-camera-tos-terms-service...
2•divbzero•11m ago•0 comments

John Bolton Is Sentenced to 6 Months in Prison for Mishandling Classified Info

https://www.nytimes.com/2026/12/04/us/politics/bolton-prison-classified-information.html
3•consumer451•13m ago•2 comments

Cannabis smoking probably causes cancer, WHO research agency says

https://www.reuters.com/business/healthcare-pharmaceuticals/who-research-agency-says-cannabis-smo...
2•geox•13m ago•0 comments

eBay bans sale of AI toys

https://www.nbcnews.com/tech/tech-news/ebay-bans-sale-ai-toys-nbc-news-investigation-rcna612886
2•cdrnsf•14m ago•0 comments

AI leaders clash over surrendering human free will

https://www.axios.com/2026/11/25/anthropic-ai-human-control-debate-free-will
3•mgh2•14m ago•1 comments

The human centipede that is AI Twitter

https://www.lesswrong.com/posts/Ctia6zyXF69N3tzhv/the-vast-human-centipede-that-is-ai-twitter
2•koreindian•16m ago•0 comments

G.Skill's Site Appears to Have Been Hijacked to Serve Malware

https://www.pcmag.com/news/gskills-site-appears-to-have-been-hijacked-to-serve-malware
4•Kuraj•16m ago•0 comments

Rethinking the source of truth for programming in the intelligence age

https://csailmit.substack.com/p/rethinking-the-source-of-truth-for
1•matt_d•21m ago•0 comments

Show HN: Hypothesis-Driven Autoresearch for DL Research

https://github.com/JonnaMat/magic-machine
1•JonnaMat•22m ago•0 comments

Public Data Worth Building With

https://www.wesleygrubbs.com/civic-data/
1•abetusk•28m ago•0 comments

Design, Not Content, Is the New Battleground for Technology Law

https://news.bloomberglaw.com/legal-exchange-insights-and-commentary/design-not-content-is-the-ne...
1•gwu78•31m ago•0 comments

Maybe Jensen Huang Needs a New Lawyer

https://www.theatlantic.com/national-security/2026/12/jensen-huang-security-clearance-nvidia/689684/
1•gwu78•34m ago•0 comments

Jensen Huang's congressional testimony on Nvidia, China and AI chip exports

https://www.scribd.com/document/1104073539/jensenhuangtranscript-pdf
1•mfiguiere•37m ago•0 comments

U.S. officials: The Moon is a national security priority

https://www.axios.com/2026/12/03/us-officials-cislunar-moon-national-security
1•extasetoi12•40m ago•0 comments

Show HN: Ferrow – a local-first Markdown vault with reversible AI agents

https://ferrow.ai/
1•ferrow•40m ago•0 comments

YouTube to exclude AI-generated music from royalties

https://blog.youtube/news-and-events/youtube-ai-music-artist-protections/
3•negura•41m ago•0 comments

Serving Custom Models

https://www.cerebellumlabs.ai/blog/serving-custom-models/
1•suhaaspk•41m ago•0 comments

Caddy: PQC, Disabling 256-bit ECC, Using P-384 Let's Encrypt Cert

https://www.triplebit.org/blog/pqc-2026-caddy/
2•reader9274•44m ago•0 comments

Kilo-builder – CLI-first embedded/RE toolkit for Kilo Code and OpenCode

https://github.com/HsucheChiang/kilo-builder
2•jeff19881022•47m ago•0 comments

ASCII Validation from 2.5 to 114 GB/s with SIMD

https://modulovalue.com/blog/vectorizing-ascii-decoding/
2•modulovalue•49m ago•0 comments

Easing Functions Cheat Sheet

https://easings.net/
1•gregsadetsky•52m ago•0 comments

Claude Cocaine: Prevent Automated Crime by Agents

https://ghollbeck.github.io/claude-coke-blog/
1•ghuntley•57m ago•0 comments

Bekenstein Bound

https://en.wikipedia.org/wiki/Bekenstein_bound
1•jonbaer•58m ago•0 comments

Computer Graphics from a foundational perspective

https://burzumm.pythonanywhere.com/intro
1•BSPtree•59m ago•1 comments

Poll: What's your level of AI-assisted coding these days?

5•gtirloni•1h ago•2 comments