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

"fn" is too cryptic.

"function" is better than the two.

MultifokalHirn•12mo ago
Agreed

A PHP license change is imminent

https://lwn.net/Articles/1063993/
1•maxloh•2m ago•0 comments

Colored Shadow Penumbra

https://chosker.github.io/blog/colored-shadow-penumbra
2•ibobev•7m ago•0 comments

The PHP License Is Dead; Long Live the BSD 3-Clause

https://fossforce.com/2026/05/the-php-license-is-dead-long-live-the-bsd-3-clause/
2•birdculture•7m ago•1 comments

LLMs Distort Our Written Language

https://sites.google.com/view/llmwritingdistortion/home
2•gmays•8m ago•0 comments

Dirty Frag: Universal Linux LPE

https://github.com/V4bel/dirtyfrag
3•john_strinlai•8m ago•1 comments

The State of Grav: Where We Are and Where We're Going

https://getgrav.org/blog/state-of-grav-2026
2•speckx•9m ago•0 comments

Making cross-platform SIMD code pleasant

https://bkaradzic.github.io/posts/typeless-simd/
1•ibobev•10m ago•0 comments

State-backed hackers hammer Palo Alto firewall zero-day before patch lands

https://www.theregister.com/cyber-crime/2026/05/07/state-backed-hackers-hammer-palo-alto-firewall...
1•Bender•10m ago•0 comments

Writing a bindless GPU abstraction layer

https://www.kevin-gibson.com/blog/writing-a-bindless-gpu-abstraction-layer/
1•ibobev•10m ago•0 comments

60% of MD5 password hashes are crackable in under an hour

https://www.theregister.com/security/2026/05/07/60-of-md5-password-hashes-are-crackable-in-under-...
1•Bender•10m ago•0 comments

RIP social media. What comes next is messy

https://arstechnica.com/science/2026/05/rip-social-media-what-comes-next-is-messy/
3•Bender•11m ago•0 comments

Release PiClaw v2.3.0 – Tirion upon Túna · rcarmo/piclaw

https://github.com/rcarmo/piclaw/releases/tag/v2.3.0
1•rcarmo•18m ago•0 comments

CEOs want tariff refunds as earnings take a hit

https://www.cnbc.com/2026/05/06/tariff-refunds-earnings-hit-pandora-philips.html
2•tcp_handshaker•19m ago•0 comments

The AI fitness instructors selling unreal gains

https://www.bbc.com/sport/articles/c5ye7dnxv86o
1•reconnecting•19m ago•0 comments

Show HN: wfb-link, a userspace WiFiBroadcast radio stack for macOS

https://github.com/arc-edge/wfb-link/
4•mhamann•20m ago•2 comments

Show HN: Describe what makes a photo "bad" and let a local LLM flag them

https://github.com/iamnotagentleman/bad-photos-out
1•velieroglu•21m ago•0 comments

Using Clerk for Advent of Code (2023)

https://www.juxt.pro/blog/using-clerk-for-aoc/
1•tosh•22m ago•0 comments

DigitalOcean AI-Native Cloud for Production AI Workloads

https://www.digitalocean.com/blog/introducing-digitalocean-ai-native-cloud
1•ulrischa•24m ago•0 comments

AI at Discount

https://tomtunguz.com/ai-at-discount/
1•koolhead17•24m ago•0 comments

Show HN: I built a platform for experimenting with attention arbitrage

https://readyfaucet.com/
1•Odeh13•25m ago•0 comments

AI Slop Is Killing Online Communities

https://rmoff.net/2026/05/06/ai-slop-is-killing-online-communities/
19•thm•25m ago•0 comments

Having a religious affiliation doesn't prevent betting on sports

https://phys.org/news/2026-04-religious-affiliation-doesnt-sports.html
1•PaulHoule•26m ago•0 comments

The science of changing political beliefs

https://ozeanmedia.com/research/how-to-actually-change-political-beliefs-brain-shocks-and-friend-...
2•alexpatton•26m ago•0 comments

As U.S. Debt Hits a Worrying Milestone, Washington Barely Notices

https://www.nytimes.com/2026/05/07/business/us-debt-trump-policies-budget.html
4•tcp_handshaker•27m ago•0 comments

Show HN: A local-only image filter editor and batch processor in the browser

https://kaliedarik.github.io/sc-filter-builder/
1•rikroots•28m ago•0 comments

Ask HN: What is your go-to solution for a personal wiki in 2026?

3•ex-aws-dude•28m ago•4 comments

The Zen of Peter Frampton

https://www.nytimes.com/2026/05/04/arts/music/peter-frampton-carry-the-light.html
1•paulpauper•29m ago•0 comments

Incentives Drive Everything

https://yusufaytas.com/incentives-drive-everything
7•goonergoose•29m ago•0 comments

U.S. intelligence says Iran can outlast Trump's Hormuz blockade for months

https://www.washingtonpost.com/national-security/2026/05/07/cia-intelligence-iran-trump-blockade-...
12•tcp_handshaker•30m ago•1 comments

A per-prompt memory layer for Claude Code (26% Improvement in Task Completion)

https://github.com/Fergtic/chronicle-write-up/blob/main/Chronicle_Write_Up.pdf
1•ferguswhite•30m ago•0 comments