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•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

Continual Harness: A reset-free self-improving harness for embodied agents

https://sethkarten.ai/continual-harness/
1•uniclaude•7m ago•0 comments

Let's try to build an apartment in NYC

https://friedkielbasa.substack.com/p/lets-try-to-build-an-apartment-in
1•fkozlowski•10m ago•0 comments

What I Actually Use Hermes and Obsidian For (Full Setup and Use Cases)

https://metedata.substack.com/p/013-my-hermes-and-obsidian-set-up
1•young_mete•13m ago•0 comments

HP QuickWeb, Singular and Pointless

https://gekk.info/articles/hp-quickweb.htm
1•HotGarbage•14m ago•0 comments

Open source Linux c2 inspired by void link C2

https://github.com/josephrw12/cortex-c2
1•josephrw12•14m ago•1 comments

The Surprising Origins of 'Left' and 'Right' in Politics

https://time.com/5673239/left-right-politics-origins/
1•thunderbong•17m ago•0 comments

Andy Matuschak: Apps and programming: two accidental tyrannies (MIT Talk) [video]

https://www.youtube.com/watch?v=ycyCGCtScdc
2•olejorgenb•20m ago•0 comments

Stop burning tokens on JSON maps – A 150-token spatial format for LLMs

https://ai-storycrafter.com/llsketch-editor.php
1•Xoraxx•20m ago•0 comments

The State of Texas vs. Meta Platforms, Inc. and WhatsApp, LLC [pdf]

https://www.texasattorneygeneral.gov/sites/default/files/images/press/WhatsApp%20Petition.pdf
1•plurby•28m ago•1 comments

Texas Woman files lawsuit after arrest for Facebook post about polluted water

https://www.fox4news.com/news/woman-arrested-facebook-post-concerning-trinidad-water-poisoning
8•SilverElfin•30m ago•0 comments

Google Betrayed the Web

https://www.machinesociety.ai/p/google-betrayed-the-web
3•mikelgan•31m ago•1 comments

To Understand AI, Think Like a Dragonfly

https://www.noemamag.com/to-understand-ai-think-like-a-dragonfly/
1•RickJWagner•31m ago•0 comments

The tech industry as a grass fire

https://nathanschneider.info/2026/05/the-tech-industry-as-a-grass-fire/
2•ntnsndr•35m ago•0 comments

Agentic AI token usage balloons cost at Microsoft, Meta, Amazon

https://www.tomshardware.com/tech-industry/artificial-intelligence/ai-cost-crisis-hits-tech-giant...
3•heresie-dabord•35m ago•1 comments

Lambda Soup – Functional HTML Scraping for OCaml

https://aantron.github.io/lambdasoup/
1•Tomte•37m ago•0 comments

Gradient Google icon redesign rolling out on Android and web

https://9to5google.com/2026/05/22/gradient-google-icon-redesign-web/
1•theanonymousone•38m ago•0 comments

Hardening against future module security issues with ModuleJail

https://linuxsecurity.com/features/linux-kernel-module-hardening-modulejail
1•thefreelantern•38m ago•0 comments

A World Without Apps

https://www.bigideainitiative.org/ideas/a-world-without-apps
3•sim04ful•39m ago•0 comments

Meditations in Color

https://meditationsincolor.com/colorists
1•pixelsymphony•40m ago•1 comments

New Attack "Megaladon" Compromises 5.5K+ GitHub Repos

https://www.theregister.com/security/2026/05/22/megalodon-chums-the-waters-in-55k-github-repo-poi...
4•theanonymousone•42m ago•0 comments

Polsia Raises $30M as Its AI Autonomously Runs 7,600 Businesses

https://noqta.tn/en/news/polsia-ai-autonomous-company-30m-funding-2026
1•Topology1•43m ago•0 comments

Kysely (the type-safe SQL query builder for TypeScript) v0.29 is out btw

https://github.com/kysely-org/kysely/releases/tag/v0.29.0
1•igalklebanov•43m ago•1 comments

Lisp in Vim (2019)

https://susam.net/lisp-in-vim.html
5•whent•43m ago•1 comments

Meta Settles School Suit over Social Media, Averting Trial

https://www.bloomberg.com/news/articles/2026-05-21/meta-settles-school-suit-over-social-media-ave...
2•1vuio0pswjnm7•48m ago•2 comments

A simple and free Markdown editor

https://marina-md.pages.dev/
2•alllen•48m ago•0 comments

CloudNativePG and Crunchy PGO: an honest, opinionated comparison

https://www.gabrielebartolini.it/articles/2026/05/cloudnativepg-and-crunchy-pgo-an-honest-opinion...
1•bo0tzz•49m ago•0 comments

I poisoned a Hugging Face dataset and it stayed up for 6 months

https://vechron.com/2026/05/i-poisoned-a-hugging-face-dataset-and-it-stayed-up-for-6-months/
4•GeorgeWoff25•52m ago•2 comments

AlphaProof Nexus solves 9 Erdős problems and proves 44 sequence conjectures

https://cryptobriefing.com/deepmind-alphaproof-nexus-erdos-problems/
2•hackernj•53m ago•1 comments

AI companies use malware proxies to mount DDoS attacks on web sites

https://packetstream.io/scraping-at-scale-without-breaking-the-bank-a-guide-for-ai-startups/
2•fanf2•57m ago•0 comments

Ask HN: Do you have a colophon for your personal website?

4•susam•58m ago•4 comments