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

Meta's New AI Unit Is a Total Mess

https://www.wired.com/story/mark-zuckerberg-meta-employee-meeting-interrupt-ai/
1•reasonableklout•1m ago•0 comments

Solar-thermal desalination process operates at near 100% efficiency

https://physicsworld.com/a/solar-thermal-desalination-process-operates-at-near-100-efficiency/
1•zeristor•3m ago•0 comments

The Hacker Webring

https://ring.acab.dev/
1•thes1lv3r•8m ago•0 comments

Beeper – All your chats in one app

https://www.beeper.com/
1•thunderbong•11m ago•0 comments

Contrail Compute AIX the First RISC-V AI Execution Platform

https://www.epicsemi.com/products/contrail/contrail-compute/
1•EvgeniyZh•12m ago•0 comments

Factoring "short-sleeve" zero-heavy RSA keys with polynomials

https://blog.trailofbits.com/2026/06/12/factoring-short-sleeve-rsa-keys-with-polynomials/
2•fanf2•16m ago•0 comments

What if we legally required politicians to work regular jobs 2 months a year?

1•ekoeko•26m ago•1 comments

Validates AI

https://validates.ai/
2•bellannns•26m ago•0 comments

I got shadow banned on X, 3 mistakes that led me to it

https://www.indiehackers.com/post/i-got-shadow-banned-on-x-3-mistakes-that-led-me-to-it-MIYYUCRyR...
1•kartik0001•28m ago•0 comments

A major KPMG report on AI was found to be chock-full of AI hallucinations

https://www.techradar.com/pro/a-major-kpmg-report-on-ai-was-found-to-be-chock-full-of-ai-hallucin...
2•thm•29m ago•0 comments

US Government directive to suspend access to Claude Fable 5 and Mythos 5

https://twitter.com/AnthropicAI/status/2065597531644743999
1•corentin88•30m ago•0 comments

WhatCable 1.0 – USB-C cable inspector for macOS, now with a TUI

https://www.whatcable.uk/
2•sleepingNomad•31m ago•0 comments

I used sound waves to make espresso. It could cut coffee‑brewing energy use by ¾

https://theconversation.com/i-used-sound-waves-to-make-espresso-it-could-cut-coffee-brewing-energ...
1•zeristor•37m ago•0 comments

Patterns of Software [pdf]

https://www.dreamsongs.com/Files/PatternsOfSoftware.pdf
2•tosh•40m ago•0 comments

The Simple Plan and Phase 3 of the real human network

https://world.org/blog/foundational-topics/thesimpleplan
1•helloplanets•41m ago•0 comments

Whissle Gateway – Run Multi-Modal Voice AI Locally in a 500MB Docker

https://whissle.ai/gateway
2•ksingla025•42m ago•0 comments

Ukraine MoD and Palantir build drone detection using war data

https://defensemirror.com/news/41613/Ukrainian_MoD__Palantir_Tech_Developing_Drone_Detection_Mode...
1•01-_-•44m ago•0 comments

Ask HN: What's the biggest problem you ever prevented?

2•bschne•44m ago•0 comments

Controversial FISA spying law expires tonight. The spying will continue

https://arstechnica.com/tech-policy/2026/06/controversial-fisa-spying-law-expires-tonight-the-spy...
1•01-_-•47m ago•0 comments

Lojban

https://en.wikipedia.org/wiki/Lojban
2•tosh•49m ago•0 comments

The quantum computing revolution is closer than you think

https://www.ft.com/content/7e461be0-5c13-4a93-a0f8-0659ae5505a2
1•thm•53m ago•0 comments

focus - A simple and fast text editor

https://github.com/focus-editor/focus
1•modinfo•54m ago•0 comments

WASM_of_OCaml on WASI: A Working Prototype Looking for a Production User

https://ocaml.org/backstage/2026-06-09-wasm-of-ocaml-on-wasi-a-working-prototype-looking-for-a-pr...
1•TheWiggles•55m ago•0 comments

Ask HN: Automoderated by AI Alternative to Reddit

1•julienreszka•56m ago•0 comments

Teach Your Kids to Pirate. Now [video]

https://www.youtube.com/watch?v=CBFlWUnjkRc
1•Cider9986•1h ago•0 comments

Show HN: theta_py, bindings to the Theta CLI

https://github.com/tamarillo-ai/theta_py
1•ivanbelenky•1h ago•0 comments

The Department of War just released the third tranche of records

https://www.war.gov/UFO/release/03/
2•aggrrrh•1h ago•0 comments

Old games feel "hard" because modern emulators have layers of abstraction

https://twitter.com/lauriewired/status/2065553747078709500
1•tosh•1h ago•0 comments

For NBA fans: If you loved 82-0 you'll love this

https://nbabrawl.netlify.app
1•Mwalwala•1h ago•0 comments

Israeli firm BlackCore suspected of meddling in New York and Scotland votes

https://www.reuters.com/world/israeli-firm-blackcore-also-suspected-meddling-nyc-scotland-votes-f...
74•pera•1h ago•15 comments