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

"fn" is too cryptic.

"function" is better than the two.

MultifokalHirn•8mo ago
Agreed

MIT 15.773 Hands-On Deep Learning Spring 2024 [video]

https://www.youtube.com/watch?v=kyQ0CRkYhy4
1•mdp2021•28s ago•0 comments

Water Heater Mines Bitcoin. It Could Help Solve AI's Energy Problem

https://www.cnet.com/home/energy-and-utilities/superheat-bitcoin-water-heater-ces-2026/
1•rmason•3m ago•0 comments

Tips to Read More This Coming Year

https://www.millersbookreview.com/p/10-tips-to-read-more-this-coming-year
2•ingve•5m ago•0 comments

ChatGPT is losing market share as Google Gemini gains ground

https://www.bleepingcomputer.com/news/artificial-intelligence/chatgpt-is-losing-market-share-as-g...
1•speckx•5m ago•0 comments

Study examines carbon footprint of wearable health tech

https://news.cornell.edu/stories/2026/01/study-examines-carbon-footprint-wearable-health-tech
1•JeanKage•6m ago•0 comments

Why sports stars who head the ball are more likely to die of Alzheimer's

https://www.bbc.com/future/article/20260106-the-health-dangers-of-heading-the-ball-in-sport
1•breve•7m ago•0 comments

Search your past ChatGPT, Claude and perplexity chats with context

https://github.com/siv-io/Index-AI-Chat-Search
2•siv_io_•7m ago•0 comments

Operation Absolute Resolve: How the US Captured Nicolas Maduro

https://www.dailymail.co.uk/news/article-15435381/Nicolas-Maduro-captured-reconstruction-Trump-Op...
1•febed•9m ago•0 comments

Show HN: An LLM response cache that's aware of dynamic data

https://blog.butter.dev/on-automatic-template-induction-for-response-caching
3•raymondtana•9m ago•0 comments

Programming Languages in 2025 [video]

https://www.youtube.com/watch?v=CzFiPcuMnWM
1•todsacerdoti•12m ago•0 comments

Per-query energy consumption of LLMs

https://muxup.com/2026q1/per-query-energy-consumption-of-llms
2•hasheddan•12m ago•0 comments

SSDs, power loss protection and fsync latency

http://smalldatum.blogspot.com/2026/01/ssds-power-loss-protection-and-fsync.html
2•ingve•13m ago•0 comments

The Post-American Internet

https://pluralistic.net/2026/01/01/39c3/#the-new-coalition
2•csense•14m ago•1 comments

Book Review: The Jakarta Method: Washington's Anticommunist Crusade

https://blogs.lse.ac.uk/lsereviewofbooks/2020/07/29/book-review-the-jakarta-method-washingtons-an...
1•wahnfrieden•14m ago•0 comments

Show HN: Tool for Testing MCP Servers

https://www.mcp-workbench.ai/
2•opiniateddev•18m ago•0 comments

Pittsburgh Post-Gazette to Shut Down

https://www.post-gazette.com/local/city/2026/01/07/pittsburgh-post-gazette-final-edition/stories/...
2•keiferski•21m ago•1 comments

JPMorgan Chase Reaches a Deal to Take over the Apple Credit Card

https://www.wsj.com/finance/banking/jpmorgan-chase-reaches-a-deal-to-take-over-the-apple-credit-c...
4•stalfosknight•21m ago•0 comments

Coffeezilla: The most overrated scam investigator

https://greyenlightenment.com/2026/01/06/coffeezilla-the-most-overrated-scam-investigator/
4•paulpauper•21m ago•3 comments

Runkit.com has been down for months

https://runkit.com/
1•NeverBehave•25m ago•1 comments

Rare Iron Age war trumpet and boar standard found

https://www.bbc.com/news/articles/cr7jvj8d39eo
2•breve•27m ago•0 comments

LLM from scratch, part 29 – using DDP to train a base model in the cloud

https://www.gilesthomas.com/2026/01/llm-from-scratch-29-ddp-training-a-base-model-in-the-cloud
2•gpjt•29m ago•0 comments

Show HN: bikemap.nyc – visualization of the entire history of Citi Bike

https://github.com/freeman-jiang/bikemap.nyc
6•freemanjiang•29m ago•2 comments

We're Thinking About Addiction Wrong

https://jacobin.com/2026/01/social-causes-drug-addiction
1•wahnfrieden•29m ago•1 comments

Amazon wants to know what every corporate employee accomplished last year

https://www.businessinsider.com/amazon-corporate-employees-performance-reviews-accomplish-last-ye...
2•petethomas•31m ago•2 comments

AI Keeps Building the Same Purple Gradient Website

https://prg.sh/ramblings/Why-Your-AI-Keeps-Building-the-Same-Purple-Gradient-Website
2•satvikpendem•32m ago•0 comments

Pittsburgh Post-Gazette Announces It Will Cease Operations

https://www.nytimes.com/2026/01/07/business/media/pittsburgh-post-gazette-closing.html
1•bookofjoe•32m ago•1 comments

The Silence of the LLaMbs: Getting LLMs to Shut Up

https://ossa-ma.github.io/blog/silence-of-the-llambs
4•ossa-ma•33m ago•1 comments

Columbia Univ. Center on Global Energy Policy: Q&A on US Actions in Venezuela

https://www.energypolicy.columbia.edu/qa-on-us-actions-in-venezuela/
2•TMWNN•34m ago•0 comments

Key open source challenges in developing countries (2023)

https://opensource.com/article/23/4/challenges-open-source-developing-countries
4•devonnull•35m ago•0 comments

EMF Exposure from a Substation Could Be Cause of 49ers' Tendon Rupture Epidemic

https://peteranthonycowan.substack.com/p/could-chronic-emf-exposure-from-a
3•CGMthrowaway•35m ago•1 comments