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

"fn" is too cryptic.

"function" is better than the two.

MultifokalHirn•11mo ago
Agreed

Onyx Pro, a local desktop utility for resetting AI IDE trial state

https://getonyxpro.com
1•chloevalesquez•29s ago•0 comments

Universal patterns emerge across 22 languages, mapping how vocabularies evolve

https://phys.org/news/2026-04-universal-patterns-emerge-languages-vocabularies.html
1•wglb•49s ago•1 comments

Two blazing quasars caught waltzing into a merger

https://phys.org/news/2026-04-blazing-quasars-caught-waltzing-merger.html
1•wglb•2m ago•1 comments

Shutting Down the Goldmine

https://eed3si9n.com/shutting-down-the-goldmine/
1•switchbak•2m ago•0 comments

Name in Landsat

https://science.nasa.gov/specials/your-name-in-landsat/
1•vinnyglennon•4m ago•0 comments

Ask HN: Local or Cloud -based AI?

1•dickeeT•5m ago•0 comments

UFC fighter ELO ratings tracker

https://mma-elo.com/leaderboard
1•justaspacecadet•8m ago•1 comments

Agents Are Better Testers Than We Are

https://medium.com/@adamprout/agents-are-better-testers-than-we-are-30b1738114d6
1•AdamProut•9m ago•1 comments

Palo Alto Networks to Acquire Portkey to Secure the Rise of AI Agents

https://www.paloaltonetworks.com/company/press/2026/palo-alto-networks-to-acquire-portkey-to-secu...
1•htrp•11m ago•0 comments

Build Video Tools with Code (customizable video components using p5.js)

https://www.usebutter.com/developers?via=leftium
1•Leftium•13m ago•1 comments

US Supreme Court Guts Key Provision of Voting Rights Act

https://www.reuters.com/world/us-supreme-court-blocks-louisiana-voting-map-with-second-black-majo...
4•Jimmc414•14m ago•0 comments

Retailers using plug-in batteries to reduce electricity costs

https://www.fastcompany.com/91534376/beard-papas-emack-bolios-nyc-retailers-plug-in-batteries-sav...
1•satvikpendem•14m ago•0 comments

Urban birds are more scared of women than men – but scientists don't know why

https://www.independent.co.uk/news/uk/home-news/urban-birds-pigeons-women-men-study-b2966959.html
5•milchek•19m ago•1 comments

Scientists Unveil 'Long Lost' Map for Smell

https://www.nytimes.com/2026/04/29/science/nose-brain-smell-olfaction.html
1•bookofjoe•23m ago•1 comments

When an AI agent should refuse to answer

https://frigade.com/blog/when-an-agent-should-refuse
2•pancomplex•23m ago•0 comments

Lovable for iPhone

https://apps.apple.com/de/app/lovable-build-apps-with-ai/id6757471107
1•doener•23m ago•0 comments

MathDuels: Evaluating LLMs as Problem Posers and Solvers

https://arxiv.org/abs/2604.21916
1•matt_d•26m ago•1 comments

The Internet Is Falling Down- CPanel/WHM Authentication Bypass CVE-2026-41940

https://labs.watchtowr.com/the-internet-is-falling-down-falling-down-falling-down-cpanel-whm-auth...
2•zikani_03•26m ago•0 comments

Secure AI and Agent Coding Policy

https://galdren.com/secure-ai-agent-coding-policy/
1•stAInley•29m ago•0 comments

AI discovery reveals DNA isn’t locked away in cells after all

https://gladstone.org/news/ai-discovery-reveals-dna-isnt-locked-away-cells-after-all
3•hhs•30m ago•1 comments

Terafab

https://terafab.ai/
2•Abbit•31m ago•0 comments

WolfTPM Firmware TPM (FwTPM) Support

https://www.wolfssl.com/announcing-wolftpm-firmware-tpm-ftpm-support/
1•aidangarske•32m ago•0 comments

Is "one-person company" a real category or just indie hacking rebranded?

https://www.opc.community
2•patrickliu007•34m ago•0 comments

wolfTPM: A highly portable TPM 2.0 library, designed for embedded use

https://github.com/wolfSSL/wolfTPM
1•aidangarske•35m ago•0 comments

Cursor's Warchest, xAI's Redemption

https://ethanding.substack.com/p/cursors-warchest-xais-redemption
1•vinnyglennon•37m ago•1 comments

FusionCore: ROS 2 sensor fusion (IMU and GPS and encoders)

https://github.com/manankharwar/fusioncore
4•notmanaan•39m ago•2 comments

Group averages obscure how an individual's brain controls behavior: study

https://med.stanford.edu/news/all-news/2026/04/brain-scans-individual-versus-group.html
2•hhs•40m ago•0 comments

Ask HN: Rant, Am I bad or is this a company with a poor tech culture?

2•apatheticonion•40m ago•4 comments

Electro-chemo-mechanical modelling of structural battery composite full cells

https://www.nature.com/articles/s41524-025-01646-x
1•nill0•43m ago•0 comments

New study finds a simple rule behind how social norms spread

https://www.gc.cuny.edu/news/new-study-finds-simple-rule-behind-how-social-norms-spread
2•hhs•43m ago•2 comments