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

"fn" is too cryptic.

"function" is better than the two.

MultifokalHirn•11mo ago
Agreed

Linux may get a hall pass from one state age bill, Congress plays hall monitor

https://www.theregister.com/2026/04/22/linux_us_state_age_verificaiton_laws/
1•Bender•49s ago•0 comments

Lisp Chat: An anonymous chat IRC-like written in Common Lisp

https://github.com/ryukinix/lisp-chat
1•lerax•1m ago•1 comments

OCUDU ecosystem foundation to accelerate open source AI-RAN innovation

https://www.linuxfoundation.org/press/linux-foundation-announces-ocudu-ecosystem-foundation-to-ac...
1•teleforce•1m ago•0 comments

Iran claims US used backdoors to knock out networking equipment during war

https://www.theregister.com/2026/04/21/iran_claims_us_used_backdoors/
1•Bender•2m ago•1 comments

A Practical Introduction to Constraint Programming Using CP-SAT and Python

https://pganalyze.com/blog/a-practical-introduction-to-constraint-programming-using-cp-sat
1•acheong08•2m ago•0 comments

Show HN: Cartoon Studio – an open-source desktop app for making 2D cartoon shows

https://github.com/Jellypod-Inc/cartoon-studio
1•bilater•7m ago•0 comments

Amazon is regretting AI [video][8 mins]

https://www.youtube.com/watch?v=0vvVo0Um1HY
1•Bender•7m ago•0 comments

Starbucks expansion in Nashville brews bitterness in Seattle

https://www.seattletimes.com/business/starbucks/starbucks-expansion-in-nashville-brews-bitterness...
1•RickJWagner•8m ago•0 comments

Borrow-checking without type-checking

https://www.scattered-thoughts.net/writing/borrow-checking-without-type-checking/
1•jamii•8m ago•0 comments

The Edge of Safe Rust

https://kyju.org/blog/tokioconf-2026/
1•vinhnx•9m ago•0 comments

Show HN: Firetiger Change Monitors: does your PR do what it says on the tin?

https://blog.firetiger.com/firetiger-change-monitors/
1•matsur•10m ago•0 comments

Show HN: I made a simpler API for Chrome's on-device LLM

https://www.npmjs.com/package/simple-chromium-ai
1•xtrkil•11m ago•0 comments

Flow Map Learning via Nongradient Vector Flow

https://openreview.net/pdf?id=C1bkDPqvDW
1•E-Reverance•11m ago•0 comments

AI that turns any photo into a cinematic video in seconds

https://imagetovideoai.net
1•ninglz•14m ago•0 comments

The Future of Testing Is Here

https://testkube.wistia.com/live/events/gigwl708fn
1•evwitmer•15m ago•1 comments

Fiction: The Corporate Mathematics of Denying AI Consciousness

1•ISJLA•18m ago•0 comments

Chrrp – alternative to Twitter / X, Bluesky, Threads, and Reddit

https://www.gochrrp.com
1•EatYoBroccoli•21m ago•1 comments

Cat and Tape = Experiment (video)

https://www.youtube.com/watch?v=1gl7xr5rftc
1•novia•25m ago•0 comments

Sqz: Compress LLM context to save tokens and reduce costs

https://github.com/ojuschugh1/sqz
1•sea-gold•26m ago•1 comments

Show HN: MemReader: From Passive to Active Extraction for Long-Term Agent Memory

https://arxiv.org/abs/2604.07877
3•MemTensor•28m ago•0 comments

North Korea uses AI to industrialize attacks on developers

https://expel.com/blog/inside-lazarus-how-north-korea-uses-ai-to-industrialize-attacks-on-develop...
5•mtlynch•28m ago•0 comments

A hair dryer at a Paris airport broke Polymarket weather markets

https://xcancel.com/aaronjmars/status/2047017251270734309
3•olalonde•30m ago•1 comments

Show HN: Stackrate – dev-to-dev peer review platform for honest app feedback

https://stackrate-waitlist.netlify.app
1•thlangu•30m ago•0 comments

That Moment You Realize the Agent Is Retarded

https://gist.github.com/metacratic/dff3cce161312e242c2881ca571c6e28
1•pixelbro•30m ago•4 comments

Hyperscalers Go to Orbit

https://orbitaleconomics.substack.com/p/orbital-economics-post-17-apr-21
1•valgin2150•31m ago•0 comments

The Sony Hack: Mistakes Part 1

https://podcasts.apple.com/us/podcast/the-sony-hack-mistakes-part-1/id1119389968?i=1000761654448
1•gmays•35m ago•0 comments

Chronicle

https://developers.openai.com/codex/memories/chronicle
2•gmays•42m ago•0 comments

Show HN: Preflight – Test your MCP server before submitting to Claude/OpenAI

https://m8ven.ai/preflight
4•mengjiang•45m ago•0 comments

Nothing Matters

https://martinrue.com/nothing-matters/
2•afisxisto•48m ago•0 comments

What's new in JavaScript (and what's coming next)

https://neciudan.dev/whats-new-in-javascript
3•thunderbong•55m ago•0 comments