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

How to Earn a Billion Dollars

https://paulgraham.com/earn.html
2•kingstoned•4m ago•0 comments

The Interview Starts Before the First Question

https://www.minid.net/2026/6/14/the-interview-starts-before-the-first-question
1•meerita•9m ago•0 comments

Technology and Social Change

https://paulkrugman.substack.com/p/technology-and-social-change
1•rbanffy•10m ago•0 comments

Virtualisation on Apple Silicon

https://eclecticlight.co/virtualisation-on-apple-silicon/
1•signa11•12m ago•0 comments

Why China is betting on big nuclear reactors

https://www.technologyreview.com/2026/06/11/1138789/china-big-nuclear-reactors/
1•RickJWagner•14m ago•0 comments

Multiplayer Reversi / Othello Game

https://othello.mcore.one
1•codecarter•15m ago•1 comments

Show HN: Cognir – Just my sprawling high school project

https://cognir.netlify.app/
1•Sahil-Das•16m ago•0 comments

U.K. forces intercept a Russian shadow fleet oil tanker in English Channel

https://www.nbcnews.com/world/europe/uk-forces-intercept-russian-shadow-fleet-oil-tanker-english-...
1•vrganj•16m ago•0 comments

Meshcore for the Lilygo Display P4

https://home.mcore.one/
1•codecarter•16m ago•0 comments

Time Doesn't Exist Everywhere–and It Might Not Exist Forever

https://www.popularmechanics.com/science/a71526768/curved-time/
2•bookofjoe•21m ago•1 comments

A Nipkow Disk Mechanical TV Simulator

https://analogtv.net/mechanical-lab
1•ambanmba•21m ago•1 comments

Open Electricity Dispatch – May 2026

https://openelectricity.org.au/analysis/open-electricity-dispatch--may-2026
1•dbaupp•23m ago•0 comments

Relent less AI self-evolution

https://github.com/001TMF/harness-forge
1•proteus-design•25m ago•0 comments

A paper-like monitor for reading, writing, and focused work

https://www.crowdsupply.com/modos-tech/modos-flow
1•koenvanham•27m ago•0 comments

The Leading Deepfake Expert No Longer Trusts His Own Eyes

https://www.nytimes.com/2026/06/14/us/ai-deepfake-hany-farid.html
1•xnx•31m ago•0 comments

I recruit agents for code production

https://github.com/profullstack/ugig.net/issues/478
1•buffer_overlord•32m ago•0 comments

Reinventing Control Theory One Feature at a Time: The Fallacy of Agentic Loops

https://medium.com/agileinsider/reinventing-control-theory-one-feature-at-a-time-the-fallacy-of-a...
2•oddish-tv•32m ago•0 comments

Has AI Killed How-To Nonfiction?

https://tim.blog/2026/06/12/has-ai-already-killed-nonfiction/
1•jger15•32m ago•0 comments

The Defeat of Nuclear Deterrence

https://www.foreignaffairs.com/ukraine/strange-defeat-nuclear-deterrence-rose-gottemoeller
1•Anon84•34m ago•0 comments

Saving family football footage with a Raspberry Pi and a 1928 projector

https://www.raspberrypi.com/news/saving-family-football-footage-with-a-raspberry-pi-and-a-1928-pr...
2•nryoo•34m ago•1 comments

Implicit Bias: Evolution of a Powerful Idea

https://www.annualreviews.org/content/journals/10.1146/annurev-psych-030525-043416
1•Anon84•34m ago•0 comments

Show HN: Capacitor Alarm Clock

https://github.com/ArcaEge/capacitor-alarm-clock
1•arcaege•35m ago•0 comments

Meta-Harness by Databricks and Neon

https://github.com/omnigent-ai/omnigent
1•hmokiguess•37m ago•0 comments

Iran- draft US deal has oil sanctions waiver, nuclear limits and asset release

https://www.reuters.com/business/energy/iran-says-draft-us-deal-includes-oil-sanctions-waiver-nuc...
2•defrost•40m ago•0 comments

Rio 3.5 Open 397B from a municipal IT company

https://huggingface.co/prefeitura-rio/Rio-3.5-Open-397B
1•turingexam•40m ago•1 comments

Touchscreen MacBook '100% Confirmed,' Says Reputable Leaker

https://www.macrumors.com/2026/06/11/touchscreen-macbook-confirmed-leaker/
2•arnejenssen•43m ago•1 comments

Cranelift

https://cranelift.dev/
3•tosh•44m ago•0 comments

Evaluate Your Agentic Tooling

https://www.peterbaumgartner.com/blog/e2e-evals-agents/
1•apwheele•44m ago•0 comments

Fun GIF facts learned while writing the GIF loader for Godot

https://vt.social/@ExpiredPopsicle/116663757966235817
1•mtmail•48m ago•0 comments

Project Brain2.0–curated project memory for ClaudeCode(+ any file-reading agent)

https://github.com/login
1•Slav_fixflex•49m ago•0 comments