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

Jimmy is a tool to convert your notes from different formats to Markdown

https://marph91.github.io/jimmy/
1•CTOSian•41s ago•0 comments

Microsoft Bought a Nuclear Plant

https://moai.studio/blog/posts/microsoft-bought-a-nuke-plant.html
1•ionwake•2m ago•0 comments

France Is Too Hot for Shutters and Ceiling Fans

https://www.theatlantic.com/ideas/2026/06/france-air-conditioning-failure/687723/
1•paulpauper•3m ago•0 comments

Higher Ed Is Sorry

https://www.theatlantic.com/ideas/2026/06/higher-education-universities-public-trust/687714/
1•paulpauper•3m ago•0 comments

Show HN: Drift, write LLM agents in English and transpile to async Python

https://github.com/rileyq7/drift
1•rileyq12•5m ago•0 comments

The Memory Tax

https://bycig.substack.com/p/the-memory-tax
1•paulpauper•5m ago•0 comments

Token Capital Efficiency

https://kmad.ai/Token-Capital-Efficiency
1•kmad•8m ago•0 comments

Utility boss warns US faces blackouts due to power supply shortfall

https://www.ft.com/content/14d2e591-7cd5-4456-904f-1b7fdc5cbc1a
1•Geekette•8m ago•2 comments

Mel Brooks is 100 today

https://www.theatlantic.com/culture/2026/06/long-live-mel-brooks/687730/
3•shellback3•9m ago•0 comments

I made a tool to check out open source websites

https://github.com/Frenxys/portfolio-finder
1•Frenea•10m ago•0 comments

Visual Basic on the PC with Windows 3.1

https://stonetools.ghost.io/visualbasic-win31/
1•TMWNN•13m ago•0 comments

Rats and mice are mutating and becoming resistant to poison, researchers warn

https://www.independent.co.uk/news/world/americas/rats-mice-mutating-poison-resistance-warning-b3...
1•Vaslo•17m ago•0 comments

Show HN: NameSnag – Get alerted when a watched domain appears available

https://namesnag.io
1•pro_methe5•20m ago•0 comments

Strong Relationships, Loosely Held

https://www.jerry.wtf/posts/strong-relationships-loosely-held/
2•personjerry•21m ago•0 comments

There are 5.7M more childless women of prime child-bearing age than expected

https://carsey.unh.edu/publication/factors-contributing-demographic-cliff-more-us-women-childbear...
2•loughnane•25m ago•1 comments

My First Encounter with a Political Spambot

https://tombedor.dev/political-spam/
2•jjfoooo4•25m ago•0 comments

Question: Is matching fixed regexes with back-references in P?

https://branchfree.org/2019/04/04/question-is-matching-fixed-regexes-with-back-references-in-p/
1•fanf2•28m ago•0 comments

Ask HN: Books about Genetic Algorithms

5•andyjohnson0•30m ago•1 comments

POSIX Is Not a Shell

https://alganet.github.io/blog/2026-06-28-12-POSIX-Is-Not-A-Shell.html
2•gaigalas•30m ago•0 comments

Show HN: I reverse-engineered the RLF log format used by REMUS underwater drones

https://github.com/isaacgerg/remus-rlf-reader
1•ipunchghosts•31m ago•0 comments

Technology and Power

https://www.chrbutler.com/technology-and-power
3•delaugust•31m ago•0 comments

Attention is all we have: A conjectural theory of cognitive inequality

https://davidbessis.substack.com/p/attention-is-all-we-have
3•Luc•35m ago•0 comments

Startup Wants to Sell a U.S.-Built Tiny Truck for $21,500

https://www.roadandtrack.com/news/a71667299/reo-industries-runabout-aims-to-simplify-the-truck-ma...
3•rmason•39m ago•1 comments

Claude Code now uses dark UI patterns to gain Google account access via MCP

https://claude.com/docs/connectors/google/gmail
2•janpeuker•39m ago•1 comments

Duolicious – Open-source dating app

https://github.com/duolicious/duolicious
5•nietzscheese•41m ago•0 comments

The Last Museum: a search site for museum art

https://lastmuseum.com/
2•ohjeez•41m ago•0 comments

Why the Metaverse Failed

https://josh.earth/posts/metaverse-failed
4•joshmarinacci•42m ago•1 comments

Ask HN: What do SRE do at your company?

2•petemc_•44m ago•0 comments

Evolving Thoughts on AI in 2026

https://chriskiehl.com/article/evolving-thoughts-on-ai-2026
1•goostavos•51m ago•1 comments

Show HN: Gotaper – A minimalist, journal-inspired race planner for athletes

https://gotaper.app/
1•ezeoleaf•51m ago•0 comments