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

Ask HN: Can we do something about this impending AI dystopia

1•justforfunhere•1m ago•0 comments

A free, open-source WYSIWYG Markdown editor for macOS, Windows and Linux

https://github.com/solancer/sarala
1•solancer•1m ago•0 comments

Show HN: Kiiwi-Mechanical Keyboard Sound App for Mac

https://kiiwi.app/
1•tamilini92•1m ago•0 comments

Papers with Code is now open-source

https://github.com/huggingface/paperswithcode
1•nielz_r•3m ago•1 comments

Simple Sudoku Solvers SIII, EII: Assembly

https://blog.veitheller.de/Simple_Sudoku_Solvers_SIII%2C_EII%3A_Assembly.html
1•ibobev•4m ago•0 comments

Ramoira

https://ramoira.com
1•EtherForge14•6m ago•0 comments

Export Selected OLM Files to PST

https://www.perfectdatasolutions.com/en/olm/olm-to-pst-converter.html
1•tieanderson•7m ago•0 comments

US voters of all political persuasions loath 'Big Tech' billionaires

https://www.thenewdaily.com.au/opinion/2026/10/23/big-tech-billionaires
1•robtherobber•8m ago•0 comments

Offcut, design furniture by chatting with AI

https://offcut.diy
1•mixandgo•10m ago•0 comments

Just Eat apologises for AI food mistakes

https://www.bbc.com/news/articles/crz981p0klvgo
2•soheilpro•10m ago•0 comments

Onamae VDI hacked, customers reported unauthorized txs in their trading accounts

https://helix.ml/threat-watch/i/onamae-com-desktop-cloud-breach-gmo-virtual-desktop-service-hacke...
1•deforciant•11m ago•0 comments

Show HN: AMD EPYC Windows developer rigs in the UK/EU in ~10 minutes

1•ItsBob•12m ago•0 comments

AI is ruining haunted houses

https://www.plagiarismtoday.com/2026/10/26/ai-is-ruining-haunted-attractions/
3•mikelgan•16m ago•0 comments

Understanding Python Linters Through a Comprehensive and Empirical Study

https://arxiv.org/abs/2610.35485
1•runningmike•16m ago•1 comments

$100M in data center freight stolen since June, with thieves spoofing GPS

https://arstechnica.com/tech-policy/2026/10/highway-thieves-are-spoofing-gps-to-steal-millions-in...
2•sgiannopoulos•17m ago•0 comments

Show HN: Software Hate Index (real-time ranking of SaaS complaints)

https://hissingkitty.com/predictions
2•drewlem•20m ago•0 comments

The Passkey Is Worse

https://www.kcoleman.me/2026/10/22/hacked.html
1•ibobev•21m ago•0 comments

Police Pulling People over Because AI Deems Their Driving Patterns Suspicious

https://www.aclu.org/news/privacy-technology/ai-driven-police-stops
4•Markoff•24m ago•2 comments

Creating Dynamic Social Media Cards for User Content

https://blog.master.dev/what-should-you-put-on-a-dynamic-custom-social-media-card-image/
1•ibobev•24m ago•0 comments

Cloudflares Commitment to Free

https://blog.cloudflare.com/cloudflares-commitment-to-free/
2•cat-whisperer•24m ago•0 comments

AI slop is the new TLDR

https://grahamdumpleton.me/posts/2026/10/ai-slop-is-the-new-tldr/
2•lumpa•26m ago•0 comments

Choose Your Back End: Three TLS Bugs in GoAhead

https://foxio.io/blog/choose-your-backend-three-tls-bugs-in-goahead
1•n_plus_1_acc•28m ago•0 comments

Chinese markets lose trillions as race for AI supremacy with US takes its toll

https://www.theguardian.com/world/2026/oct/27/chinese-markets-lose-trillions-ai-race-beijing
2•YeGoblynQueenne•29m ago•0 comments

CocoTerra – Make Chocolate at Home

https://www.cocoterra.com/how-it-works/
1•sgt•33m ago•0 comments

Noctis: A short fiction series about an AI that goes after encryption keys

https://noctis.duokey.com
1•j_rcht•42m ago•0 comments

We sent 23 AI agents to our website. Most looked human

https://privatrak.com/blog/ai-agents-in-analytics
3•qwend•45m ago•0 comments

Adios.dev AI Native Cloud – Is Live on DevHunt

https://devhunt.org/tool/adiosdev-ai-workspace
1•clovis818•47m ago•0 comments

CVE-2026-40369: 12 Bytes to Escape the Browser Sandbox

https://voidsec.com/cve-2026-40369-browser-sandbox-escape/
3•DeepLogin•47m ago•0 comments

The focus on AI safety disasters ignores everyday harms

https://www.technologyreview.com/2026/10/26/1147645/the-focus-on-ai-safety-disasters-ignores-ever...
2•joozio•49m ago•0 comments

Reeve – A native PWA launcher in Rust to replace Electron

https://github.com/MarcelNazare/Reeve
1•marcelnazare050•50m ago•0 comments