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

AI Slop and the Software Commons

https://arxiv.org/abs/2604.16754
1•jruohonen•26s ago•0 comments

Gbench Intelligence Benchmark

https://gertlabs.com/?mode=oneshot_coding
1•handfuloflight•5m ago•0 comments

Waiting for PostgreSQL 19 – Add pg_plan_advice contrib module

https://www.depesz.com/2026/03/22/waiting-for-postgresql-19-add-pg_plan_advice-contrib-module/
2•tux3•8m ago•0 comments

Amazon to invest up to $25B in Anthropic as part of $100B cloud deal

https://www.channelnewsasia.com/business/amazon-invest-up-25-billion-in-anthropic-part-100-billio...
2•doppp•10m ago•0 comments

A True Life Hack: What Physical 'Life Force' Turns Biology's Wheels?

https://www.quantamagazine.org/what-physical-life-force-turns-biologys-wheels-20260420/
2•Prof_Sigmund•15m ago•0 comments

Show HN: One board with tasks for all your projects

https://kanban.wtf
2•przemekdz•16m ago•0 comments

Show HN: Learn languages by tilting, shaking, and smiling at your phone

https://sensonym.com
2•mparas•17m ago•1 comments

Fossil Fuels

https://ourworldindata.org/fossil-fuels
1•leonidasrup•17m ago•0 comments

Granite-4.0-Tiny-Preview

https://huggingface.co/ibm-granite/granite-4.0-tiny-preview
1•handfuloflight•18m ago•0 comments

Your hex editor should color-code bytes

https://simonomi.dev/blog/color-code-your-bytes/
1•tobr•19m ago•0 comments

Show HN: Agensi – Curated marketplace for AI agent skills (SKILL.md)

https://www.agensi.io
1•Samuellrose•20m ago•0 comments

Locki v2 – Zero-knowledge text encryption inside any web app

https://lockisecurity.com/en
2•dtlnv•21m ago•0 comments

I built an AI SRE in 60mins, you should too

https://www.gouthamve.dev/i-built-an-ai-sre-in-60mins-you-should-too/
1•gouthamve•22m ago•0 comments

Two Months in Google OAuth Verification Hell

https://zencapital.substack.com/p/two-months-in-google-oauth-verification
5•zenincognito•23m ago•0 comments

Paris Blockchain Week 2026: Four Things the Main Stage Didn't Tell You

https://irishtechnews.ie/paris-blockchain-week-2026-four-key-takeaways/
1•ybelkin•25m ago•0 comments

Phototypesetting with the Berthold Diatype [video]

https://www.youtube.com/watch?v=76qwCF6ThLs
1•altilunium•27m ago•0 comments

Financial Data Integration: A Practical Guide

https://blog-2026-04-27-hidden-costs.layline-web-2026.pages.dev/resources/blog/2026-04-20-financi...
1•tandrew•31m ago•0 comments

'Robots don't bleed': Ukraine sends machines into battle in place of humans

https://www.cnn.com/2026/04/20/europe/robots-ukraine-battlefield-drones-intl-cmd
2•breve•33m ago•0 comments

Linotype Demonstration [video]

https://www.youtube.com/watch?v=MI2sYvUb4_0
1•altilunium•35m ago•0 comments

Personal data leak: French document agency ANTS hit by cyberattack

https://www.connexionfrance.com/news/personal-data-leak-french-document-agency-hit-by-cyberattack...
1•RockstarSprain•42m ago•0 comments

Monitoring CPU and Memory on Your VPS with AppSignal

https://blog.appsignal.com/2026/04/21/monitoring-cpu-and-memory-on-your-vps-with-appsignal.html
1•malinavojvodic•45m ago•0 comments

Show HN: Chrome extension for always on Work Assistant (ActorDo)

https://actordo.com/chrome-extension/
1•websku•46m ago•0 comments

Show HN: Anvil-uplink-CLI – agent-safe terminal CLI for Anvil.works apps

https://github.com/matshoppenbrouwers/anvil-uplink-cli
1•hoponthestack•50m ago•0 comments

Show HN: My AI Native Obsidian Setup

https://alexanderweichart.de/4_Projects/obsidian-setup-2026/My-AI-native-Obsidian-Setup
4•surrTurr•51m ago•0 comments

Republican Rep. Obsessed with Hating Muslims Unveils Mamdani Act

https://newrepublic.com/post/209272/republican-rep-chip-roy-mamdani-act-muslims-socialists-immigr...
2•handfuloflight•55m ago•0 comments

OpenMythos: A looped transformer take on how Claude Mythos might work

https://firethering.com/openmythos-open-source-claude-mythos-reconstruction/
2•steveharing1•56m ago•1 comments

China's energy fortress was built to withstand just this type of oil shock

https://www.cnn.com/2026/04/20/china/china-energy-security-global-oil-crisis-iran-intl-hnk
7•breve•1h ago•2 comments

Key Front End Architectural Patterns for Complex Applications

https://sometechblog.com/posts/frontend-architecture-decisions/
1•l5870uoo9y•1h ago•0 comments

PhantomChat – Post-quantum messenger with Monero-style stealth addresses

https://github.com/cengo441337-a11y/phantomchat
2•n0l3x•1h ago•0 comments

Modeling Sparse and Bursty Vulnerability Sightings

https://arxiv.org/abs/2604.16038
1•cedricbonhomme•1h ago•0 comments