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

Mercury – Hermes HF Modem

https://github.com/Rhizomatica/mercury
1•noyesno•3m ago•0 comments

UN chief warns AI is developing faster than rules can keep up

https://www.reuters.com/technology/un-chief-warns-ai-is-developing-faster-than-rules-can-keep-up-...
1•adithyaharish•9m ago•0 comments

A Skiing Accident Put Our Development Practices to the Test

https://blog.enioka.com/2026/07/03/how-a-skiing-accident-put-our-development-practices-to-the-test/
3•hebus•11m ago•0 comments

14× faster embeddings: how we rebuilt the ONNX path in Manticore

https://medium.com/@s_nikolaev/14-faster-embeddings-how-we-rebuilt-the-onnx-path-in-manticore-fab...
1•snikolaev•13m ago•0 comments

Looking Forward to Postgres 19: Split Personality

https://www.pgedge.com/blog/looking-forward-to-postgres-19-split-personality
1•rellem•14m ago•1 comments

Defeat air-gapped systems by exfiltrating data using Apple Find My network

https://github.com/HouzuoGuo/hzgl-air-bridge
1•austinallegro•15m ago•0 comments

DJ USB T[ool]kit

https://github.com/haivala/dj-usb-tkit
1•chipheadi•16m ago•0 comments

Show HN: WatermarkGo – Gemini Watermark Remover

https://watermarkgo.com
1•qwikhost•18m ago•0 comments

HN: An automated CI/CD testing harness for Model Context Protocol servers

https://github.com/vaquarkhan/mcp-test-harness
1•vaquarkhan•18m ago•0 comments

AI-powered product photography suite designed specifically for Amazon sellers

https://loomadesign.ai/
1•loomadesignai•21m ago•0 comments

Show HN: Excalibur. The open-source AI coding agent for product engineers

https://getexcalibur.dev
3•Rafael_Casuso•23m ago•0 comments

Thoughts on the Near Future

https://x.com/bayeslord/article/2072056960430789032
1•grodriguez100•25m ago•0 comments

What America has meant to me

https://twitter.com/swyx/status/2073657149067321412
1•pretext•32m ago•0 comments

Built a Website for People Who Miss the Old Web

https://www.dailicle.com/
2•lucky-solanki•34m ago•0 comments

China wants to solve the hardest problem in robotics – making hands

https://www.theguardian.com/technology/ng-interactive/2026/jul/06/china-dextrous-robotic-hands-hu...
3•sandebert•35m ago•0 comments

Interdict: Stop agents from destroying production databases

https://github.com/prisharai/Interdict
1•handfuloflight•37m ago•1 comments

Building Software Is Learning

https://registerspill.thorstenball.com/p/building-software-is-learning
1•kiyanwang•37m ago•1 comments

TinyRetroPad: A working, Notepad-style Windows text editor in roughly 2.5 KB

https://github.com/plummersSoftwareLLC/TinyRetroPad
3•doener•38m ago•0 comments

Phi Browser 2.0: Spaces, Profiles, and Room for Your Agents

https://phibrowser.com/news/phi-browser-v2/
2•sjdhoome•39m ago•1 comments

When AI Costs More Than the Engineer

https://tomtunguz.com/ai-spend-breakeven-2029/
2•kiyanwang•41m ago•0 comments

Generate parametric, manufacturable 3D models in seconds

https://kyrall.com/
2•OsamaAtwi•42m ago•1 comments

How Russia Blackmails Ordinary Ukrainians to Spread Terror in Ukraine [video]

https://www.youtube.com/watch?v=1ypMQlXlWIg
2•consumer451•42m ago•1 comments

Revised Rules of Engineering Leadership

https://lethain.com/revised-rules-of-engineering-leadership/
1•kiyanwang•43m ago•0 comments

When Gemma Thinks About Resources – It Fails: A Behavioral Experiment

https://www.lesswrong.com/posts/9Gj9anZi95RgHQPv6/when-gemma-thinks-about-resources-it-fails-a-be...
1•joozio•43m ago•0 comments

Tastefile: Figma to Design.md

https://usetastefile.com/
1•handfuloflight•44m ago•0 comments

Show HN: AI block chain running on GPT2

https://github.com/raphaelwkago69-create/GLYPH
1•w4mwati•49m ago•1 comments

Show HN: Validating an OG-image API before I build the back end

https://autogranthunter.com/og/
1•averystone_hs•52m ago•0 comments

ViewKit – An interactive tool to view dataset files

https://viewkit.app/
1•ayu05•54m ago•1 comments

Saying the Obvious Thing

https://www.seangoedecke.com/saying-the-obvious-thing/
1•walterbell•57m ago•0 comments

Venice mayor proposes dynamic pricing for day-trippers with 50-euro ceiling

https://abcnews.com/International/wireStory/venice-mayor-proposes-dynamic-pricing-day-trippers-50...
2•simonebrunozzi•59m ago•0 comments