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

Smuggl – Share your localhost as an invite only link

https://smuggl.dev
1•Sayuj01•30s ago•1 comments

Macpow: Real-time power tree TUI for Apple Silicon

https://github.com/k06a/macpow
1•cactusplant7374•1m ago•0 comments

Show HN: Build queryable packs for AI agents from videos, podcasts, and files

https://github.com/buralog/beyin
1•buralog•3m ago•0 comments

Are Trump's H-1B Rules Protecting Monopolies?

https://openmarkets.substack.com/p/the-corner-newsletter-trumps-h1-b
1•knxnts•3m ago•0 comments

Dexter Hadley on building governed AI for healthcare – Achieve Podcast [video]

https://www.youtube.com/watch?v=hYGOFtjpcHY
1•idrdex•3m ago•1 comments

Show HN: Gurify – Your job search, on autopilot

https://www.gurify.com/signup
1•slavba•3m ago•0 comments

A Pale Blue Dot

https://www.planetary.org/worlds/pale-blue-dot
1•helloworld•3m ago•0 comments

GLM-5.1: Towards Long-Horizon Tasks

https://z.ai/blog/glm-5.1
2•meetpateltech•3m ago•0 comments

DNA polymerases can generate long, complex sequences without templates

https://www.nature.com/articles/s41467-026-69915-x
1•prabal97•3m ago•0 comments

Show HN: A (marginally) useful x86-64 ELF executable in 298 bytes

https://github.com/meribold/btry
1•meribold•4m ago•0 comments

China restricts airspace for 40 days in signal of intense military activity

https://www.msn.com/en-us/news/world/china-restricts-airspace-for-40-days-in-signal-of-intense-mi...
2•petethomas•4m ago•1 comments

Git turns 20: A Q&A with Linus Torvalds (2025)

https://github.blog/open-source/git/git-turns-20-a-qa-with-linus-torvalds/
1•pretext•5m ago•0 comments

"The problem is Sam Altman": OpenAI Insiders don't trust CEO

https://arstechnica.com/tech-policy/2026/04/the-problem-is-sam-altman-openai-insiders-dont-trust-...
1•randycupertino•6m ago•0 comments

The Limits of Integration (2021)

https://muse.jhu.edu/verify?url=%2Fpub%2F17%2Farticle%2F804858&r=2536187
1•Tomte•6m ago•0 comments

Delivery Deadlines Are a Mistake

https://waldo.jaquith.org/blog/2026/04/delivery-deadlines/
1•speckx•7m ago•0 comments

AI Agent Sandboxes Got Security Wrong

https://multikernel.io/2026/04/03/ai-agent-sandboxes-got-security-wrong/
1•wang_cong•7m ago•0 comments

Show HN: Hazmat – I made unrestricted Claude Code safe on macOS

https://github.com/dredozubov/hazmat
1•dredozubov•8m ago•0 comments

You not always need an autonomous team

https://cientifico.net/task-teams-vs-autonomous-teams/
1•cientifico•8m ago•0 comments

Why Japan has such good railways

https://worksinprogress.co/issue/why-japan-has-such-good-railways/
1•zdw•9m ago•0 comments

Impeaching Donald J. Trump for High Crimes and Misdemeanors [pdf]

https://www.congress.gov/119/bills/hres1155/BILLS-119hres1155ih.pdf
3•dmm•9m ago•1 comments

NASA Artemis II Multimedia Resources

https://www.nasa.gov/artemis-ii-multimedia/
1•kklisura•10m ago•0 comments

The Downfall and Enshittification of Microsoft in 2026

https://caio.ca/blog/the-downfall-and-enshittification-of-microsoft.html
1•stock_toaster•11m ago•0 comments

Stop Vibecoding [video]

https://www.youtube.com/shorts/cgD-bTTe20I
1•mooreds•13m ago•0 comments

Ask HN: What's everyone's API billing stack?

2•sigpwned•13m ago•0 comments

Show HN: Ace Influence – Turn your brand into stories people watch

https://aceinfluence.ai
2•SecularVan•15m ago•0 comments

Why NASA flight director Gene Kranz is the gold standard for incident commanders

https://greatcircle.com/blog/2026/04/07/gene-kranz-gold-standard/
1•mooreds•15m ago•0 comments

US Senator Calls Chinese Cars a 'Cancer,' Vowing Stricter Ban

https://insideevs.com/news/791834/chinese-cars-cancer-republican-senator/
1•akyuu•15m ago•0 comments

What History Can Teach Us About Sleep and Dreams

https://cswr.hds.harvard.edu/news/2026/03/30/what-history-can-teach-us-about-sleep-and-dreams
1•apollinaire•16m ago•0 comments

The Hard Problems Nobody Has Solved

https://www.nibzard.com/hard-problems
2•nkko•16m ago•0 comments

Show HN: Managarr – A TUI and CLI for managing *ARR servers, built in Rust

https://github.com/Dark-Alex-17/managarr
1•Dark-Alex-17•17m ago•0 comments