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

Offline and security-first tool for syncing and managing agent skills

https://github.com/asteroid-belt/skulto
1•a-b•42s ago•0 comments

Duff's Device

https://en.wikipedia.org/wiki/Duff%27s_device
1•TheBitBanger•1m ago•0 comments

The grey market of podcast appearances

https://pierce.dev/notes/the-grey-market-of-podcast-appearances
2•speckx•1m ago•0 comments

Reasons to think that the Claude Mythos announcement was overblown

https://garymarcus.substack.com/p/three-reasons-to-think-that-the-claude
1•guilamu•2m ago•0 comments

Show HN: chop.ax – strip sites down to just their content

https://chop.ax/
2•foax•3m ago•0 comments

Passwords acceptability needs a universal standard

https://zencapital.substack.com/p/passwords-acceptability-needs-a-universal
2•zenincognito•4m ago•0 comments

Ask HN: What Is a Hacker?

1•blahaj•4m ago•0 comments

EqSh: Hyprland Shell Inspired by Apple

https://github.com/eq-desktop/eqsh
1•LorenDB•4m ago•0 comments

CDC study shows Covid shot benefits; Trump official blocks release

https://arstechnica.com/health/2026/04/cdc-study-shows-covid-shot-benefits-trump-official-blocks-...
3•ColinWright•5m ago•1 comments

Show HN: Monetary policy tracker – AI sentiment analysis of 26 central bank

https://monetary.live/
1•ipotapov•6m ago•0 comments

YC: Adding Canada Back to Our List of Accepted Countries of Incorporation

https://www.ycombinator.com/blog/adding-canada-back
1•sarimkx•7m ago•0 comments

Stop using all USB peripherals and cables, says pundit Brian Livingston

https://www.askwoody.com/newsletter/free-edition-any-usb-drive-or-cable-you-plug-in-might-be-a-si...
1•larrybud•8m ago•0 comments

The FBI's router takedown that cut off APT28's 'tremendous access'

https://cyberscoop.com/fbi-operation-masquerade-russian-gru-router-takedown-brett-leatherman/
2•lschueller•8m ago•0 comments

Wild chimpanzees recorded waging 'civil war' with coordinated attacks

https://www.theguardian.com/environment/2026/apr/09/civil-war-chimpanzee-group-closer-to-human-co...
2•geox•10m ago•0 comments

We Uncovered the Illegal Scam Happening at Every Stadium [video]

https://www.youtube.com/watch?v=w7LPPTLDXu4
1•meandave•10m ago•0 comments

Inferring user actions from screen recordings to recommend better workflows [pdf]

https://yanlitao.github.io/papers/invisibleMentor.pdf
2•azhenley•10m ago•0 comments

Netflix Prices Went Up Again – I Bought a DVD Player Instead

https://aywren.com/2026/04/09/netflix-prices-went-up-again-i-bought-a-dvd-player-instead/
21•speckx•11m ago•6 comments

What products are generating actual value?

1•ippohadgrit•12m ago•0 comments

Code is not abstracted away

https://ahmethuseyindok.com/blog/code-is-not-abstracted-away
2•dokdev•14m ago•0 comments

Seed: Adding `vau` with an immutable dynamic environment to Chez Scheme

https://github.com/amirouche/seed
2•PaulHoule•14m ago•0 comments

US defense official overseeing AI reaped millions selling xAI stock

https://www.theguardian.com/us-news/2026/apr/09/pentagon-ai-xai-emil-michael
3•malshe•14m ago•1 comments

Show HN: Frictionless – scan any store and find out why customers don't buy

https://frictionlessai.net
2•FricitionlessAI•14m ago•1 comments

Spec Driven Development Isn't Waterfall

https://brooker.co.za/blog/2026/04/09/waterfall-vs-spec.html
3•nslog•16m ago•1 comments

Charcuterie – Visual similarity Unicode explorer

https://charcuterie.elastiq.ch/
4•rickcarlino•17m ago•0 comments

AI Changes Everything-and Nothing

https://greyenlightenment.com/2026/04/04/ai-changes-everything-and-nothing/
1•paulpauper•17m ago•0 comments

Dispatch – Open-source event routing for webhooks, APIs, and real-time data

https://dispatch.tech
5•arishaller•17m ago•2 comments

Discovering, detecting, and surgically removing Google's AI watermark

https://github.com/aloshdenny/reverse-SynthID
2•_tk_•18m ago•0 comments

Devoxx [video]

https://www.youtube.com/channel/UCCBVCTuk6uJrN3iFV_3vurg
1•__natty__•18m ago•0 comments

How Iran's Information War Machine Operates Online

https://www.nytimes.com/interactive/2026/04/09/business/iran-war-online-influence-propaganda.html
1•mikhael•19m ago•0 comments

What happens when an LLM becomes load-bearing infrastructure

https://kinarey.com/what-happens-when-ai-becomes-load-bearing/
1•indynz•20m ago•1 comments