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

More Time to Think

https://ma.ttias.be/more-time-to-think/
1•nreece•1m ago•0 comments

macOS Needs Its Grid Back

https://blog.hopefullyuseful.com/blog/macos-needs-its-grid-back/
1•ranebo•7m ago•0 comments

Interop 2026: Continuing to improve the web for developers

https://web.dev/blog/interop-2026
2•Topfi•10m ago•0 comments

Miasma supply chain attack: malicious code found in RedHat-cloud-services NPM

https://snyk.io/blog/miasma-supply-chain-attack-malicious-code-redhat-cloud-services-npm-packages/
1•jruohonen•12m ago•0 comments

Crystal Nights by Greg Egan

https://www.gregegan.net/MISC/CRYSTAL/Crystal.html
2•rorylawless•13m ago•0 comments

Let the agents democratize open source

https://world.hey.com/dhh/let-the-agents-democratize-open-source-9fd630a9
2•doppp•15m ago•0 comments

DeepMind CEO says those cutting jobs because of AI 'lack imagination'

https://www.inc.com/jessica-stillman/nobel-prize-winner-demis-hassabis-says-ai-job-cuts-are-dumb-...
3•cpeterso•15m ago•0 comments

AI costs how much? GitHub Copilot users react to new usage-based pricing system

https://arstechnica.com/ai/2026/06/ai-costs-how-much-github-copilot-users-react-to-new-usage-base...
2•spenvo•19m ago•0 comments

Show HN: NUA an agent that tests for product correctness

https://trynua.dev/
4•Paster335•20m ago•2 comments

Building an Open-Source Verilog Simulator with AI: 580K Lines in 43 Days

https://normalcomputing.com/blog/building-an-open-source-verilog-simulator-with-ai-580k-lines-in-...
1•hasheddan•26m ago•0 comments

US Online Banking Security Fail

https://adir1.com/2026/online-banking-security-fail
1•adir1•27m ago•1 comments

BorrowSanitizer: Find Rust aliasing violations even with FFI

https://github.com/borrowSanitizer/bsan
1•afdbcreid•28m ago•0 comments

How the hell is Groq raising more money?

https://www.zach.be/p/how-the-hell-is-groq-raising-more
3•hasheddan•30m ago•0 comments

Building a life and shipping code: An immigrant's journey

https://ranpara.net/posts/the-outsider-who-shipped-anyway/
1•DevarshRanpara•36m ago•0 comments

Chinese firm developing AI to predict dissent, leaked documents show

https://www.nytimes.com/2026/06/01/us/politics/china-ai-predicting-dissent.html
2•wunderlotus•36m ago•0 comments

Show HN: Native Markdown Reader for macOS

https://github.com/creativefisher/mdreader
1•intrepidsoldier•37m ago•0 comments

aweskills: Let Your AI Agent Manage skills for You

https://aweskill.webioinfo.top/articles/let-your-ai-agent-manage-aweskill-for-you/
1•mugpeng•40m ago•0 comments

Colorado Rolls Back Landmark AI Governance Law

https://www.bankinfosecurity.com/colorado-rolls-back-landmark-ai-governance-law-a-31804
1•mooreds•43m ago•0 comments

Response to Cegłowski on Superintelligence (2017)

https://intelligence.org/2017/01/13/response-to-ceglowski-on-superintelligence/
1•Jach•44m ago•0 comments

Vegvisir – Agentic Harness Built for Software Developers

https://github.com/Honorbound-Innovation/Vegvisir-harness
2•unkn0wnable•48m ago•1 comments

Show HN: Ported Cerebras REAP to MLX – Prune MoE Experts on a MacBook

https://github.com/egesabanci/reap-mlx
1•egesabanci•49m ago•0 comments

Tiny Guyana poised for big Iran oil gains and growth strains

https://www.reuters.com/business/energy/tiny-guyana-poised-big-iran-oil-gains-growth-strains-2026...
1•JumpCrisscross•51m ago•0 comments

LLM and Clojure

https://tusshah.codeberg.page/
1•mmts•54m ago•0 comments

Anthropic files for blockbuster initial public offering

https://www.ft.com/content/4f82f41c-24e7-4323-899a-17a04badd29e
2•geoffbp•56m ago•0 comments

Opus 4.8 Part 2: Model Welfare

https://thezvi.substack.com/p/opus-48-part-2-model-welfare
1•paulpauper•57m ago•0 comments

How to Silence the Federal Workforce

https://www.theatlantic.com/ideas/2026/06/trumps-intimidation-whistleblowers-nda/687377/
2•paulpauper•58m ago•0 comments

How Efficient Was the Affordable Care Act at Reducing Uninsured Rates?

https://www.nber.org/papers/w35263
1•paulpauper•59m ago•0 comments

Book Dedications

https://walzr.com/dedications
3•walz•1h ago•0 comments

Venezuela's oil exports rose to 1.25M bpd in May, shipping data shows

https://www.reuters.com/business/energy/venezuelas-oil-exports-rose-125-million-bpd-may-shipping-...
2•JumpCrisscross•1h ago•0 comments

SpaceX sets aside 5% of IPO shares for selected buyers, waives lock-up

https://www.reuters.com/legal/government/spacex-sets-aside-5-ipo-shares-selected-buyers-waives-lo...
2•JumpCrisscross•1h ago•0 comments