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•10mo 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•10mo 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•10mo 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•10mo 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•10mo ago
"def" is too generic.

"fn" is too cryptic.

"function" is better than the two.

MultifokalHirn•10mo ago
Agreed

Show HN: ChaosDrive – Virtually Circuit Bend a Sega Genesis/Megadrive

https://chaosdrive.online
1•richstokes•1m ago•0 comments

Developing a 2FA Desktop Client in Go [video]

https://www.youtube.com/watch?v=HFu3CUtrOQ8
1•der_gopher•1m ago•0 comments

Improvised Manpads Prototype – Launcher and Rocket Assembly [video]

https://www.youtube.com/watch?v=DDO2EvXyncE
1•iamflimflam1•1m ago•0 comments

From spacecraft to cancer research: why pi matters

https://www.ynetnews.com/health_science/article/skjs0011xqzx
1•howard941•5m ago•0 comments

Trump says 'many countries' will send warships to keep Strait of Hormuz open

https://www.reuters.com/world/asia-pacific/trump-says-many-countries-will-send-warships-keep-stra...
1•geox•6m ago•1 comments

Creating effective AI software teams

https://twitter.com/kfirgollan/status/2032859506045051112
1•kfirg•6m ago•1 comments

Grillo Ingenious Italian Jumping Torpedo Boat of WW1

https://www.hisutton.com/Italian-Grillo-Jumping-Boat.html
1•wood_spirit•7m ago•0 comments

Show HN: Effect-log – Semantic crash recovery for AI agent side effects

https://github.com/xudong963/effect-log/blob/master/blog/show-hn.md
2•xudong963•8m ago•0 comments

Playing Doom on a Subleq Transformer

https://xcancel.com/DimitrisPapail/status/2031170771100512758
1•alasr•8m ago•1 comments

Ask HN: Would you use a tool that tells founders whether a startup should scale?

1•hamaoui_nabil•9m ago•0 comments

How not to fork an open source project

3•jsattler•10m ago•0 comments

Hundreds of GitHub Python Repos Compromised via Account Takeover and Force-Push

https://www.stepsecurity.io/blog/forcememo-hundreds-of-github-python-repos-compromised-via-accoun...
4•varunsharma07•12m ago•1 comments

About the Low Boom Flight Demonstrator Project

https://techxplore.com/news/2026-03-boom-flight.html
1•Brajeshwar•15m ago•0 comments

UBI Is Your Productivity Dividend – The Only Way to All Share What We All Built

https://scottsantens.substack.com/p/universal-basic-income-is-your-productivity
1•2noame•15m ago•0 comments

Ask HN: How do you use local LLMs productively?

2•virgildotcodes•16m ago•0 comments

I built an Agentic Writing Environment using DeepSeek to replace Word processors

https://www.minotauris.app/
1•minotauris•18m ago•0 comments

The Abstraction Fallacy: Why AI Can Simulate but Not Instantiate Consciousness

https://philpapers.org/rec/LERTAF
2•measurablefunc•19m ago•0 comments

Better data could lead to better sex

https://www.economist.com/christmas-specials/2024/12/19/how-better-data-could-lead-to-better-sex
2•andsoitis•22m ago•0 comments

Show HN: Porcfolio, Obsidian-like personal finance

https://porcfolio.com/
2•gregghy•22m ago•0 comments

HP has new incentive to stop blocking third-party ink in its printers

https://arstechnica.com/gadgets/2026/03/hp-has-new-incentive-to-stop-blocking-third-party-ink-in-...
4•tartoran•22m ago•1 comments

An AI is the CEO of a real company – community votes on every business decision

https://karukera.xyz
1•gustaveceo•23m ago•0 comments

BYD's latest EVs can get close to full charge in just 12 minutes

https://arstechnica.com/cars/2026/03/byds-latest-evs-can-get-close-to-full-charge-in-just-12-minu...
3•tartoran•23m ago•0 comments

Chrome extension that autodetects browsing context and adapts privacy protection

https://wushu75.github.io/VEIL---Virtual-Enhanced-Identity-Layer/
2•Ogbon•25m ago•1 comments

Intensifying global heat threatens livability for younger and older adults

https://iopscience.iop.org/article/10.1088/2752-5309/ae3c3a
2•coloradoave22•26m ago•0 comments

NMAP in the Movies

https://nmap.org/movies/
15•homebrewer•26m ago•0 comments

Show HN: Learn Arabic with spaced repetition and comprehensible input

https://abjadpro.com
1•adangit•28m ago•0 comments

Show HN: KeyID – Free email and phone infrastructure for AI agents (MCP)

https://keyid.ai/
3•vasilyt•29m ago•5 comments

'God, It's Terrifying': How The Pentagon Got Hooked on AI War Machines

https://www.bloomberg.com/news/features/2026-03-12/iran-war-tests-project-maven-us-ai-war-strategy
3•1vuio0pswjnm7•30m ago•0 comments

Meta is killing end-to-end encryption in Instagram DMs

https://www.engadget.com/social-media/meta-is-killing-end-to-end-encryption-in-instagram-dms-1952...
1•bookofjoe•33m ago•1 comments

Minimal – open-source hardened container images now publish cve info

https://rtvkiz.github.io/minimal/
2•theoo21•34m ago•0 comments