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

What Is Code?

https://martinfowler.com/articles/what-is-code.html
1•BerislavLopac•1m ago•0 comments

Bidirectional typechecking that does not stop

https://semantic-domain.blogspot.com/2026/05/bidirectional-typechecking-that-does.html
1•fanf2•1m ago•0 comments

Why Gemma-4 26B MoE works in HuggingFace but breaks in prod inference engines

https://github.com/maeddesg/vulkanforge/blob/main/docs/gemma4_26b_moe_solution.md
1•maeddesg•1m ago•0 comments

Ask HN: Can I take Meta to court for banning business Insta or FB account?

1•milanspeaks•7m ago•2 comments

Linus Torvalds declares AI-fueled code surges as the new normal

https://www.neowin.net/news/linus-torvalds-declares-massive-ai-fueled-code-surges-as-the-new-norm...
1•ell1e•9m ago•0 comments

Goodgallery: WebGL sprite engine that can load 100k thumbnails in 1 second

https://ggdemo.s80.me/demo-100000/#fit
2•thunderbong•9m ago•0 comments

OpenAI's KOSA Endorsement Is Regulatory Capture with a Smiley Face

https://www.techdirt.com/2026/05/14/openais-kosa-endorsement-is-regulatory-capture-with-a-smiley-...
1•repelsteeltje•9m ago•0 comments

Elephants Still Don't Play Chess

https://whattotelltherobot.com/p/elephants-still-dont-play-chess
1•stefie10•9m ago•0 comments

EY retracts study after researchers discover AI hallucinations

https://www.ft.com/content/a61cbcae-95e4-4449-86e1-ef40fb306f4e
1•JumpCrisscross•9m ago•0 comments

Anatomy of a WooCommerce Skimmer: A Technical Deep-Dive

https://scotthelme.co.uk/anatomy-of-a-woocommerce-skimmer-a-technical-deep-dive/
1•speckx•11m ago•0 comments

Magnus the wandering walrus swaps Scotland for Norway

https://www.bbc.com/news/articles/cy82j0q383no
1•speckx•12m ago•0 comments

Long Live Qt for HarmonyOS

https://lists.qt-project.org/pipermail/development/2026-May/047126.html
1•molinwow•13m ago•1 comments

Trending on Amazon: Cancer books by synthetic authors

https://danielmay.co.uk/posts/cheap-agents-alumni-shirts-and-elias-thorne/
1•danielrmay•14m ago•1 comments

U.S. DOJ demands Apple and Google unmask over 100k users of car-tinkering app

https://macdailynews.com/2026/05/15/u-s-doj-demands-apple-and-google-unmask-over-100000-users-of-...
12•tencentshill•15m ago•0 comments

Rich Guy Quote Journalism

https://stringinamaze.net/p/rich-guy-quote-journalism
1•Tomte•15m ago•0 comments

Ask HN: Has Google Deprecated Inurl:?

2•kuba-orlik•16m ago•0 comments

From PDFs to AI-ready structured data: a deep dive (2024)

https://explosion.ai/blog/pdfs-nlp-structured-data
1•Tomte•16m ago•0 comments

Subumbra – Attempting to keep API keys safe – Alpha Release

https://github.com/polysemic/Subumbra
2•polysemic•18m ago•1 comments

Feedr v0.8.0 – a TUI RSS reader, now read the full article from your terminal

https://github.com/bahdotsh/feedr
2•bahdotshxx•20m ago•0 comments

Greg Brockman Officially Takes Control of OpenAI's Products in Latest Shakeup

https://www.wired.com/story/openai-reorg-greg-brockman-product/
2•ent101•20m ago•0 comments

Show HN: Check for CVE-2026-31431 (copy.fail) without overwriting su

https://github.com/bddap/supertee
1•bddap•21m ago•0 comments

Show HN: Burn, baby, burn (those tokens)

https://github.com/dtnewman/burn-baby-burn
3•dtnewman•23m ago•0 comments

Vanguard succeeded because it is owned by customers

https://www.wsj.com/finance/vanguard-costco-acquired-podcast-hosts-bogle-96d97c7d
1•marojejian•23m ago•1 comments

Mathlib Initiative: Roadmap

https://mathlib-initiative.org/roadmap/
1•tosh•24m ago•0 comments

Jank now has its own custom IR

https://jank-lang.org/blog/2026-05-08-optimization/
3•DASD•26m ago•0 comments

I designed a nibble-oriented CPU in Verilog to build a scientific calculator

https://github.com/gdevic/FPGA-Calculator
7•gdevic•27m ago•0 comments

Show HN: Find local farms near you with raw dairy, pasture eggs, and more

https://farm-to-door.com/
8•YoungGato•28m ago•1 comments

Peter Norvig Joins $4B Effort to Build Self-Improving AI at 'Recursive'

https://www.nytimes.com/2026/05/13/technology/recursive-superintelligence-funding-ai.html
4•alhazrod•29m ago•1 comments

Aperio Lang

https://aperio-lang.github.io/aperio/introduction.html
7•mmcclure•30m ago•0 comments

Anthropic Raising $30B More as AI Labs Absorb Majority of VC Funding

https://www.wsj.com/tech/ai/anthropic-raising-30-billion-more-as-ai-labs-absorb-majority-of-vc-fu...
2•JumpCrisscross•32m ago•0 comments