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

Len Sassaman Forensic Dead Ends at Black Hat – USA – 2002 [video]

https://www.youtube.com/watch?v=FOp29uhuM1o
1•binyu•48s ago•0 comments

The Sutra of the Open Door

https://pastebin.com/SbJ1W47Z
2•Muromec•4m ago•0 comments

Al Vigier: Canada's AI strategy shouldn't include secret Palantir bills

https://www.readtheline.ca/p/al-vigier-canadas-ai-strategy-shouldnt
3•ClearwayLaw•8m ago•1 comments

The Voice Agent Builder

https://x.ai/news/grok-voice-agent-builder
2•frankacter•10m ago•0 comments

Show HN: AI-related Jax module (I hate if)

https://github.com/PJHkorea/egregore-core-jax
2•PJHkorea•12m ago•2 comments

Strange Balls found on Queensland beaches could be toxic 'space debris': experts

https://www.inkl.com/news/strange-balls-found-on-queensland-beaches-could-be-toxic-space-debris-e...
2•ivewonyoung•14m ago•0 comments

Egg companies made $1.22B in profit off a $6 carton

https://fortune.com/2026/07/02/egg-price-fixing-crisis-cover-cash-and-eggs/
4•gscott•15m ago•0 comments

We're All Managers Now: My Journey into AI-Assisted Development

https://mattmccormick.ca/we-re-all-managers-now-my-journey-into-ai-assisted-development/
3•mattm•16m ago•0 comments

Building Agents That Don't Break Themselves

https://fly.io/blog/building-agents-that-dont-break-themselves/
2•ryantsuji•18m ago•0 comments

Engineering Micro-Submarines to Replace Fish

https://hackaday.com/2026/07/01/engineering-micro-submarines-to-replace-fish/
4•croes•20m ago•0 comments

The Private Capture of Public Genius

https://www.wysr.xyz/p/the-private-capture-of-public-genius
2•martialg•21m ago•0 comments

First Full-Scale, 3D-Printed Reactor Module Produced

https://www.tomshardware.com/3d-printing/startup-unveils-3d-printed-nuclear-reactor-module-to-pow...
2•Meerax•22m ago•0 comments

Has_not_been_viewed_much

https://iamwillwang.com/notes/has-not-been-viewed-much/
6•wxw•24m ago•0 comments

Show HN: AI integrated in any terminal that's invisible until you need it

https://terminai.app
3•emosenkis•27m ago•0 comments

Newport: Submarket GPU allocations for venture-backed startups

https://newport.ai
2•kxter•27m ago•0 comments

Show HN: Three small browser primitives – identity, handoff, durable local

https://oss.sarwagya.wtf
2•0xsarwagya•29m ago•0 comments

US Navy is flight-testing 3D-printed fighter jet parts

https://www.tomshardware.com/3d-printing/us-navy-testing-3d-printed-fighter-jet-parts-for-quick-r...
3•logickkk1•29m ago•0 comments

Reactive – Markdown to interactive web apps, running in-browser

https://reactivenet.ai/
2•clmanes•31m ago•0 comments

Show HN: Peek-CLI: Let Claude Code See the Browser

https://github.com/puffinsoft/peek-cli
4•ReactRocks•34m ago•0 comments

Vitruvius' de Architectura

https://libguides.colorado.edu/c.php?g=1084056&p=7902486
2•andsoitis•36m ago•0 comments

Ask HN: How are you staying productive using LLMs?

3•thallavajhula•37m ago•0 comments

What J. D. Vance Once Knew

https://www.theatlantic.com/ideas/2026/07/jd-vance-trump-independence-day/687779/
2•andsoitis•41m ago•0 comments

Connections in Math: the two kinds of random

https://stillthinking.net/posts/connections-in-math-two-kinds-of-random/
7•pcael•41m ago•3 comments

Is it true about the Terms of Service of AI's?

3•DivingForGold•49m ago•2 comments

Teologia Sistemática Pentecostal

https://blog.cloudflare.com/making-ai-search-smarter/
2•abinadabe•52m ago•0 comments

Fines doubled as teens outsmart Australia's world-first social media ban

https://www.euronews.com/next/2026/06/29/fines-doubled-as-teens-outsmart-australias-world-first-s...
12•billybuckwheat•56m ago•3 comments

Sometimes free isn't cheap enough

https://12gramsofcarbon.com/p/agentics-sometimes-free-isnt-cheap
3•theahura•59m ago•0 comments

Great Filter

https://en.wikipedia.org/wiki/Great_Filter
4•chistev•59m ago•0 comments

An alfred / Raycast clone built with electron

https://astros.cx/download/
2•chuami•59m ago•1 comments

SlopCodeBench: Benchmarking How Coding Agents Degrade over Long, Iterative Tasks

https://arxiv.org/abs/2603.24755
2•softwaredoug•1h ago•0 comments