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

SpaceX Shares Stumble in Nasdaq-100 Debut

https://www.wsj.com/finance/stocks/spacex-shares-stumble-in-nasdaq-100-debut-9ec10565
1•JumpCrisscross•1m ago•0 comments

More Americans Are Moving Away from Flood Risk Than Toward It

https://www.bloomberg.com/news/articles/2026-06-24/flood-prone-us-counties-lose-residents-as-risk...
2•petethomas•3m ago•0 comments

The Case for Service-to-Service GraphQL

https://blog.larah.me/service-to-service-graphql/
2•markl42•4m ago•0 comments

Yggdrasil Agent: general purpose, parallel and adaptive reasoning depth

https://yggdrasilagent.com/
2•grasant•6m ago•0 comments

Show HN: OCR Buddy: local browser OCR for code, formulas (LaTeX) and tables

https://github.com/Fanfulla/OCR-buddy
2•Fanfulla•6m ago•0 comments

ASRock Rack Had One of the First Arm AGI Servers at Computex 2026 – ServeTheHome

https://www.servethehome.com/asrock-rack-had-one-of-the-first-arm-agi-servers-at-computex-2026/
3•rbanffy•10m ago•0 comments

Chinese AI models are gaining ground with U.S. companies as costs surge

https://www.cnbc.com/2026/07/07/chinese-ai-models-costs-us-openai-anthropic.html
3•herbertl•12m ago•0 comments

Show HN: Workflowy but Open Source

https://twitter.com/CameronPak/status/2074262605779124317
2•campak•15m ago•1 comments

Meta accused of discriminating against non-Chinese workers in latest layoff

https://old.reddit.com/r/cscareerquestions/comments/1uq4a92/meta_accused_of_discriminating_agains...
4•PieUser•16m ago•1 comments

IBM Expands Z17 and LinuxONE 5 Mainframe Lineups with Single Frame and Rackmount

https://www.servethehome.com/ibm-expands-z17-and-linuxone-5-mainframe-lineups-with-single-frame-a...
2•rbanffy•20m ago•0 comments

Choosing a Claude model and effort level in Claude Code

https://claude.com/blog/claude-model-and-effort-level-in-claude-code
4•geoffbp•21m ago•0 comments

Rumik: Voice AI

https://rumik.ai/
2•handfuloflight•21m ago•0 comments

On-call Engineer 2026 by Kai Lentit [YouTube]

https://www.youtube.com/watch?v=sY1UqUuBqQQ
2•thinkmassive•22m ago•0 comments

Chinese memory and storage firm expected to more than 60k% jump in profits

https://www.tomshardware.com/tech-industry/chinese-memory-and-storage-firm-expected-to-post-more-...
3•rbanffy•23m ago•0 comments

I coded a shoot 'em up alone at 18 after learning Lua in a single week

2•DamixLord•24m ago•0 comments

Show HN: Backlog – tasks and contexts manager for AI coding agents

https://github.com/mazen160/backlog
3•mazen160•31m ago•0 comments

Show HN: Instant GraphRAG over any Postgres database

https://polygres.com
3•daleverett•32m ago•2 comments

Agent Name Service: The universal AI Agents identity system

https://opensourcewatch.beehiiv.com/p/agent-name-service-the-universal-ai-agents-identity-system
3•CrankyBear•36m ago•0 comments

The End of Compute Scarcity? Not So Fast

https://cloudedjudgement.substack.com/p/clouded-judgement-7326-the-end-of
3•gmays•36m ago•0 comments

Omnibaas, a provider-agnostic Infrastructure-as-Code compiler for BaaS services

https://github.com/davidecampora/Omnibaas
3•davidecampora•37m ago•2 comments

Waymo reports teen riders for bad behavior and delivers them to the police

https://www.latimes.com/business/story/2026-07-07/waymo-reports-teen-riders-for-bad-behavior-deli...
12•pilingual•38m ago•1 comments

Fable 5 wrote a Windows kernel in 38 minutes

https://tolmo.com/blog/when-the-model-writes-the-kernel/
4•adolfoabegg•38m ago•2 comments

An agent in 100 lines of Lisp

https://thebeach.dev/posts/lisp-agent/
4•jamiebeach•40m ago•0 comments

Acceleration without fuel: superconducting thruster uses Earth's magnetic field

https://www.space.com/technology/acceleration-without-fuel-revolutionary-superconducting-thruster...
2•svggrfgovgf•41m ago•1 comments

Rejected Emoji Proposals

https://charlottebuff.com/unicode/misc/rejected-emoji-proposals/
3•gaws•41m ago•1 comments

Get recommended a cheaper model with this skill

https://www.rightmodeler.com
2•piyussh•42m ago•0 comments

Private Messaging App Isn't WhatsApp or Signal, It's Delta Chat

https://lifehacker.com/tech/delta-chat-messaging-app-privacy
3•aslandb•42m ago•1 comments

Software can unlock 300 GW of capacity on US grid without building power plants

https://www.pv-magazine.com/2026/07/07/software-can-unlock-300-of-capacity-on-u-s-grid-without-bu...
2•philipkglass•42m ago•0 comments

Avatar Aang: The Last Airbender

https://www.youtube.com/watch?v=7b20GRFZBFE
2•skogstokig•45m ago•0 comments

The Opportunity Atlas: Mapping the Childhood Roots of Social Mobility [pdf]

https://opportunityinsights.org/wp-content/uploads/2018/10/atlas_paper.pdf
3•simonebrunozzi•46m ago•0 comments