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

Frog bacterium wiped out cancer tumors in mice with a single dose

https://www.sciencedaily.com/releases/2026/07/260709160655.htm
1•dcyfr•51s ago•0 comments

Boeing's Graveyard. Investigation is not detergent

https://zboralski.substack.com/p/boeings-graveyard
1•kugutsumen•2m ago•0 comments

Show HN: We beat Cloudflare's bot detection (open-source stealth browser)

https://tilion.dev/blog/cloudflare-blocks-agents
3•armanluthra_•6m ago•0 comments

Guardrails Against Duplicated Code

https://www.technology.org/2026/07/03/dupehound-deterministic-guardrails-against-ai-code-duplicat...
1•rafaepta•7m ago•0 comments

Atlassian ordered to reinstate engineer sacked over Slack clash with leadership

https://www.hcamag.com/nz/news/general/atlassian-ordered-to-reinstate-engineer-sacked-over-slack-...
4•toomanyrichies•10m ago•0 comments

SF Farmers Market allows laundering food stamps for drug purchases

https://thevoicesf.org/snap-to-cash-how-food-assistance-vouchers-were-traded-for-cash-at-the-hear...
2•AcesoUnderGlass•11m ago•0 comments

Metamaterial Antennas Enhance MRI of the Eye and Occipital Brain

https://advanced.onlinelibrary.wiley.com/doi/10.1002/adma.202517760
2•bookofjoe•12m ago•0 comments

AI2Web: Open protocol to make any website work with every AI agent

https://ai2web.dev/
2•rolandfarkas•17m ago•0 comments

One Wikipedia page costs your AI agent 68,000 tokens

5•arhamislam5766•19m ago•1 comments

Baptism Saves You -This is the best explanation of why

https://silvestro2026.substack.com/p/baptism-saves-you
3•silvestromedia•20m ago•0 comments

Maura Gillison, who linked HPV to head and neck cancer, dies at 61

https://cancerletter.com/obituary/20260702_2/
3•tortilla•23m ago•0 comments

Math Visualizations of the AI Layoff Trap

https://mattlane.us/stories/dailemma
3•mmmaaatttttt•23m ago•0 comments

Ask HN: How has the internet devolved in recent years?

2•fridayblunt•28m ago•0 comments

Zero Sum Attribution Powered by AI

https://www.upside.tech/platform/pipedash/
2•mada299•29m ago•0 comments

Count Binface, Nigel Farage's space-warrior foe

https://www.economist.com/the-world-in-brief/2026/07/11/b240d63f-2768-43dd-89b6-2bdceb6df745
4•tagawa•29m ago•0 comments

Show HN: A pixel pet for your GitHub README that eats your commits

https://github.com/Nomlings/badge
2•franwbu•30m ago•0 comments

Show HN: Atuin AI Proxy bridges Hub AI to an OpenAI-compatible endpoint

https://github.com/Vlad1mir-D/atuin-ai-proxy
2•Am1G0•30m ago•0 comments

State Actors and AI Slop Are Amplifying the Homegrown Data Center Revolt

https://alethea.com/insights/how-state-actors-and-ai-slop-are-amplifying-data-center-revolt
3•m-hodges•31m ago•0 comments

Rise of the 'Slop Zombies'

https://www.machinesociety.ai/p/rise-of-the-slop-zombies
2•mikelgan•31m ago•1 comments

How to become a -10x Engineering Manager

https://medium.com/@jackiexu1228/how-to-be-a-10x-engineering-manager-a9fa8e3dd558
2•kokodoko•32m ago•0 comments

Which 'AI scientist' suits your lab? A guide for the perplexed

https://www.nature.com/articles/d41586-026-02091-6
1•gnabgib•33m ago•0 comments

I Like Using Scrollbars

https://www.arp242.net/scrollbar.html
1•ingve•36m ago•0 comments

From Venture Rankings to Venture Decisions

https://www.thestateofventure.com/p/from-venture-rankings-to-venture
1•kteare•37m ago•0 comments

Unlocking the PSP's Dual Core Setup

https://wololo.net/2026/06/16/unlocking-the-psps-dual-core-setup/
1•msephton•40m ago•0 comments

Show HN: Hana JIT – LLVM-backed Python JIT with genetic-algorithm superoptimizer

https://github.com/ezducate/HanaJit
1•iqbal1980•42m ago•0 comments

Security settings every GitHub maintainer should enable this week

https://github.blog/security/6-security-settings-every-github-maintainer-should-enable-this-week/
1•mooreds•52m ago•0 comments

Build your favorite technologies from scratch

https://github.com/codecrafters-io/build-your-own-x
1•kamphey•53m ago•0 comments

What Does a WordPress Development Company Do?

https://www.techwrath.com/what-does-wordpress-development-company-do/
1•techwrath11•56m ago•0 comments

Wine 11.13 – Run Windows Applications on Linux, BSD, Solaris and macOS

https://www.winehq.org/announce/11.13
2•neustradamus•58m ago•0 comments

Agents of Our Own Illiteracy

https://royalicing.com/2026/agents-of-our-own-illiteracy
1•burntcaramel•59m ago•0 comments