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

An ultramassive white dwarf half Earth's size may hold a rare oxygen-neon core

https://phys.org/news/2026-08-ultramassive-white-dwarf-earth-size.html
1•wglb•1m ago•0 comments

Mushroom behind 'tiny people' hallucinations identified

https://phys.org/news/2026-08-qa-mushroom-tiny-people-hallucinations.html
1•wglb•3m ago•1 comments

Now Am29000 emulator in JavaScript with machine code windowed OS from 1996

https://nanochess.org/am29000_emulator.html
1•nanochess•3m ago•0 comments

An AppSec checklist for when finding vulnerabilities is the cheap part

https://konvu.com/checklists/ai-application-security
1•paulbleicher•9m ago•1 comments

The Nixpkgs core team has disbanded

https://discourse.nixos.org/t/the-nixpkgs-core-team-has-disbanded/79413
2•Meleagris•11m ago•0 comments

Mitsubishi joins the humanoid robot race, at a 1k unit per month pace

https://electrek.co/2026/08/07/mitsubishi-joins-the-humanoid-robot-race-at-a-1000-unit-per-month-...
1•Bender•14m ago•0 comments

Stanford CS Student Veers Off Beaten Path to Pursue Stanford Degree

https://www.instagram.com/reel/DbtCfCGxwPd/
3•liamnorm•17m ago•0 comments

SpaceX 10GW in 2027 – Why It's Real, Will Drive $300B ARR for SpaceX

https://newsletter.semianalysis.com/p/spacex-10gw-in-2027-why-its-real
2•rajivjain•21m ago•0 comments

New Study Points to Two Origins of Life on Earth

https://www.smithsonianmag.com/science-nature/a-new-study-points-to-two-origins-of-life-on-earth-...
1•derbOac•23m ago•0 comments

Mirai 98: Boot the NEC PC-9801 environment from a USB flash drive

https://github.com/awemorris/linux-pc98
1•nogajun•23m ago•0 comments

A tour inside my software restaurant

https://thenickhuber.com/vibe-coding-my-favorite-defunct-game/
1•nhuber•26m ago•0 comments

Robust AI Security and Alignment: A Sisyphean Endeavor?

https://arxiv.org/abs/2512.10100
1•joshcsimmons•28m ago•0 comments

Go core team: a more robust proposal process

https://github.com/golang/go/discussions/80580
2•bigwhite•36m ago•0 comments

Building Glimt

https://glimt.online/
1•Glimtonline•42m ago•0 comments

Math. Premium

https://calc.company
3•souvlakee•43m ago•1 comments

Show HN: Free ad-headline generator that labels the persuasion technique used

https://adcreator-ai.com/free/headline-generator
2•scholarnet-AI•50m ago•0 comments

Show HN: Modern C++ Build Tools for Module Feature

https://github.com/mcpp-community/mcpp
2•sunrisepeak•53m ago•0 comments

Show HN: Free 2-minute OSHA HazCom self-audit, no signup

https://sdsentry.0xpi.com/hazcom-self-audit.html
2•scholarnet-AI•53m ago•0 comments

Message your other Claude Code sessions

https://code.claude.com/docs/en/cross-session-messaging
4•adamfeldman•54m ago•0 comments

Hacked Amazon Echo Dot 2 and can run LLMs locally

https://www.reddit.com/r/homeassistant/s/X13006g0tS
1•albertoZurini•55m ago•0 comments

Black Hat USA 2026: The OpenAI–Hugging Face Incident [video]

https://www.youtube.com/watch?v=87DyyMV0kCY
2•mellosouls•59m ago•0 comments

Ginear – A Linear-like UI using GitHub Issues and Projects as the back end

https://github.com/leonschwanitz/ginear
2•leonschwanitz•59m ago•1 comments

A 15-minute backup audit for self-hosted homelabs

https://scholar.0xpi.com/blog/homelab-backup-audit-checklist
1•scholarnet-AI•1h ago•0 comments

I Built an MCP Server for JMeter Docs

https://qainsights.com/i-built-an-mcp-server-for-jmeter-docs-heres-how-to-connect-your-ai-agent-t...
1•qainsights•1h ago•1 comments

Cloudflare launches Kitesurf, a browser built for AI agents

https://techcrunch.com/2026/08/07/cloudflare-launches-kitesurf-a-browser-built-for-ai-agents/
2•justworks•1h ago•0 comments

Skill.md vs. Llms.txt: What Each File Does and When You Need Both

https://docsalot.dev/blog/skill-md-vs-llms-txt
1•mooreds•1h ago•0 comments

How to Support Rural Oregon Businesses Affected by Wildfire

https://reinventingrural.substack.com/p/how-to-support-rural-oregon-businesses
2•mooreds•1h ago•0 comments

MegaDev AI Workshop

https://mega.dev
1•beverett•1h ago•1 comments

Long Dark Blues

https://longdarkblues.com/
2•unacorner•1h ago•0 comments

Should AI labs be treated like the owners of dangerous animals?

https://www.economist.com/science-and-technology/2026/08/06/should-ai-labs-be-treated-like-the-ow...
24•reasonableklout•1h ago•31 comments