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

Trump Expands Glyphosate, and Now the MAHA Moms Who Elected Him Are Done

https://www.ibtimes.co.uk/trump-glyphosate-order-backlash-1801442
1•smnthermes•1m ago•0 comments

SpaceX IPO demand is approaching four times oversubscribed

https://www.reuters.com/world/spacex-ipo-demand-is-approaching-four-times-oversubscribed-source-s...
1•ironyman•1m ago•0 comments

What is the sea drone that rescued US helicopter crew?

https://www.reuters.com/world/middle-east/five-facts-sea-drones-after-us-helicopter-rescue-2026-0...
1•JumpCrisscross•2m ago•0 comments

Nvidia CUDA Python 1.0 and CUDA 13.3 Release

https://developer.nvidia.com/blog/nvidia-cuda-13-3-enhances-gpu-development-with-tile-programming...
1•ashvardanian•2m ago•0 comments

Open Source Agent, Harness-1, Outperforms GPT-5.4 on Recall

https://venturebeat.com/orchestration/researchers-trained-an-open-source-ai-search-agent-harness-...
1•somewhatrandom9•4m ago•0 comments

Fable 5 remotion video benchmark and examples

https://mesmer.tools/benchmarks/ai-video-generation
2•mesmertech•4m ago•1 comments

Create WhatsApp screenshots from a 3D phone model

https://www.getmockly.com/chats/whatsapp
1•eRzy•4m ago•0 comments

Show HN: A minimal linear algebra library in pure Go

https://github.com/igomez10/linearalgebra
1•igomeza•4m ago•0 comments

Show HN: Elah – A browser-native, frame-accurate video editor

https://github.com/elahlabs/elah
1•paulSpaurgen•8m ago•0 comments

I Replaced a $144/Year App in <2 Hours. The Moat Was Never There

https://substack.com/@vmysla/p-197723867
1•vmysla•12m ago•0 comments

The contract that could get you FIRED (lexploit)

https://www.legalquants.com/blog/the-contract-that-could-get-you-fired
1•SaifAlYounan•12m ago•0 comments

Trump is becoming Jimmy Carter

https://www.ft.com/content/c6e506e0-4b95-437b-8fad-ac436a71c3de
2•GreenSalem•15m ago•1 comments

My side of the jqwik anti AI logging drama

https://blog.johanneslink.net/2026/06/09/the-jqwik-anti-ai-affair/
2•phoronixrly•19m ago•1 comments

Claude Fable 5: the first public Mythos-class model

https://artificialanalysis.ai/articles/claude-fable-5-mythos
3•Topfi•20m ago•0 comments

If Claude Fable stops helping you, you'll never know

https://jonready.com/blog/posts/claude-fable5-is-allowed-to-sabotage-your-app-if-youre-a-competit...
4•mips_avatar•21m ago•3 comments

Claude Fable 5 will sabotage "frontier LLM research" tasks

https://twitter.com/i/status/2064399902684139852
5•qwertyforce•24m ago•1 comments

Flathub disallows LLM-based submissions

https://social.treehouse.systems/@barthalion/116657011366876079
3•birdculture•27m ago•0 comments

I built a BNB Chain liquidity sniper bot and it proved a losing game

https://e-mahmoudi.me/blog/i-built-a-liquidity-sniper-bot-for-bnb-chain-and-it-proved-a-losing-game/
3•jeyem•28m ago•0 comments

I Stress-Tested Claude Mythos [video]

https://www.youtube.com/watch?v=t5xKkn8JXMM
1•bmahir22•28m ago•0 comments

Ask HN: Are you using a serverless SQL database?

1•dzonga•28m ago•0 comments

When production is infinite, judgment becomes the bottleneck

https://tasteisnotagift.com/
2•dilipkj•32m ago•0 comments

Just Be Normal About Things

https://www.joanwestenberg.com/p/just-be-normal-about-st
3•spking•32m ago•0 comments

Exif Smuggling

https://github.com/signalblur/exifsmugglingpoc
6•rolph•34m ago•1 comments

The Most Surprising Economic Success Story Is North Korea

https://www.wsj.com/world/asia/north-korea-economy-success-e80f7062
2•karakoram•34m ago•2 comments

What studying animals teaches us about toxic work environments

https://theconversation.com/predators-and-prey-what-studying-animals-teaches-us-about-toxic-work-...
2•PaulHoule•34m ago•0 comments

Show HN: LocalCode – turn plain English into CLI commands with Apple's local AI

https://github.com/localcodeai/localcode
1•rahlokzero•36m ago•0 comments

Dino-killing asteroid may have sparked millions of years of hydrothermal life

https://www.scientificamerican.com/article/the-asteroid-that-killed-the-dinosaurs-may-have-sparke...
4•rbanffy•37m ago•0 comments

Rare meteorite might be a relic from a 'lost world' – Scientific American

https://www.scientificamerican.com/article/rare-meteorite-might-be-a-relic-from-a-lost-world/
3•rbanffy•38m ago•0 comments

Company Will Add Phone, AirPod, and Smartwatch Trackers to ALPRs

https://www.404media.co/this-company-will-add-phone-airpod-and-smartwatch-trackers-to-license-pla...
14•Cider9986•38m ago•0 comments

Upcoming breaking changes for NPM v12

https://github.blog/changelog/2026-06-09-upcoming-breaking-changes-for-npm-v12/
12•plasma•39m ago•2 comments