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

Jesse Nickles, the guy behind SlickStack, is under a criminal arrest warrant

https://github.com/helenokoye/jesse-jacob-nickles-criminal-arrest-warrant
1•cleocole•4m ago•1 comments

Gas Station "Royal Honey" tests positive for opiates, Viagra component

https://www.youtube.com/watch?v=PHoBlbnA92A
1•tomcam•5m ago•0 comments

Proposed data centre would release 23 Hiroshima-sized atomic bombs of energy/day

https://www.cbc.ca/news/canada/edmonton/wonder-valley-slcn-court-physicist-9.7403677
1•BiraIgnacio•8m ago•0 comments

Postmortem on Claude Code Cursor extension hack

https://www.microsoft.com/en-us/security/blog/2026/10/30/inside-malicious-claude-code-branded-cur...
1•soundworlds•12m ago•1 comments

Ex-o2 FRITZ Box 6660 Cable: enabling LAN 1 as WAN via a bootloader variable

https://www.alpersaritas.com/writing/fritzbox-6660-lan1-wan/
1•lprsrts•17m ago•0 comments

Sub-microsecond SEC 15c3-5 risk checks on AWS F2 via FPGA MMIO

https://github.com/joeiko3424-svg/oikonomia-benchmarks
1•oikonomiaarchit•17m ago•0 comments

Why Agent Memory Benchmarks Need a Reproducible Evaluation Pipeline

https://x.com/AgentMemoryL/
1•SndOfViento•21m ago•0 comments

Trump Demands a Cut of Alina Habba's $50M Pardon Deal

https://newrepublic.com/post/217360/donald-trump-alina-habba-50-million-pardon
3•techlover14159•21m ago•3 comments

Iain McGilchrist: Great discoveries are not made following the scientific method

https://iai.tv/articles/iain-mcgilchrist-great-discoveries-are-not-made-by-following-the-scientif...
1•pella•23m ago•1 comments

Reason you should still learn Machine Learning/Deep Learning, etc.

https://hackertube.org/watch/P_fHJIYENdI
1•thomasjeff1•23m ago•0 comments

Show HN: The Agentic State

https://agenticstate.dev/
1•arionhardison•30m ago•0 comments

Katamari Damacy but it's The Met collection

https://katamari.vaguespac.es/
1•thebigship•32m ago•0 comments

Ask for Advice about JavaScript

1•zzyijiz•35m ago•4 comments

Silicon Socialism – East Germany's Microchip Race

https://www.youtube.com/watch?v=n7EkBl02iXk
1•coldnose•36m ago•0 comments

New AI-driven malware feeds stolen data to Claude to rank victims' assets

https://www.tomshardware.com/tech-industry/cyber-security/new-ai-driven-windows-malware-feeds-sto...
1•NordStreamYacht•36m ago•0 comments

ChatGPT: Chat and Work are coming together in one experience

1•beatcracker•37m ago•0 comments

Show HN: Complete Trading Chart engine for web

https://tradecanvas.dev/
1•bonguynvan•47m ago•0 comments

WeVisCut: The Whole Editing Room in One Agent, from Narration to Long-Form Video

https://tencent.github.io/WeVisCut
2•everygen_studio•47m ago•0 comments

A Powerful Mosquito-Hunting Laser Uses A.I. To Zap Winged Pests

https://www.nytimes.com/2026/10/30/business/mosquito-laser-ai.html
2•lxm•52m ago•0 comments

F/OSS Comics #13: BSD Unix, Part 3 – The Beginning of BSD Unix

https://fosscomics.com/posts/13.%20BSD%20Unix%20Part%203%20-%20The%20Beginning%20of%20BSD%20Unix/
8•joonehur•54m ago•0 comments

How to Model "Taarof" with AI [video]

https://youtu.be/X7vf7koPxKg?si=qTC7OOblJyWjibv6&t=829
1•armanj•1h ago•0 comments

AI fan wikis riddled with errors are muddying the waters of games culture

https://www.eurogamer.net/ai-fan-wikis-errors-complicating-games-culture
12•rdmuser•1h ago•3 comments

Junk debt rout sparks 'bloodbath' for credit investors

https://www.ft.com/content/fdc9a85d-d2c4-465f-99ca-609d68b6d443
2•angry_impala•1h ago•0 comments

AI Can Write More of the Code. We Still Have to Engineer the System

https://picon.dev/en/publications/ai-assisted-engineering/
26•devpicon•1h ago•8 comments

Optical Circuit Switch Technology Built on Low-Loss Silicon Photonics Platform

https://www.psiquantum.com/news-import/psiquantum-unveils-optical-circuit-switch-technology-built...
1•gmays•1h ago•0 comments

Zhipu AI: China's Enterprise AI Champion [video]

https://www.youtube.com/watch?v=y5YKL75e78Y
1•thatslast•1h ago•0 comments

An insecure world built on trust stores

https://eclecticlight.co/2026/11/01/last-week-on-my-mac-an-insecure-world-built-on-trust-stores/
1•DASD•1h ago•1 comments

Bones may release proteins that slow aging and extend life span

https://www.science.org/content/article/bones-may-release-proteins-slow-aging-and-extend-life-span
3•EA-3167•1h ago•0 comments

OS X crammed onto an HTC Shift tablet (2010)

https://liliputing.com/os-x-crammed-onto-an-htc-shift-tablet/
1•josh-wrale•1h ago•0 comments

Climate Data Scientist Explains What the Numbers Mean

https://atmos.earth/climate-solutions/this-climate-data-scientist-explains-what-the-numbers-reall...
2•bryanrasmussen•1h ago•0 comments