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

Key Study: Social status and stress in Olive Baboons (1990)

https://www.themantic-education.com/ibpsych/2020/10/08/key-study-social-status-and-stress-in-oliv...
1•curmudgeon22•32s ago•0 comments

Agent-Assisted SGLang Development: An Initial Exploration

https://www.lmsys.org/blog/2026-07-02-agent-assisted-sglang-development/
1•gmays•2m ago•0 comments

Cache-Conscious Data Layout in Rust: Field Zoning, False Sharing, 128-Byte Rule

https://debasishg.github.io/blog/part1-cache-conscious-data-layout-in-rust/
1•eigenBasis•2m ago•0 comments

Run WSL2 Fedora with Mainstream/Rolling Linux Kernel

https://blog.benyamin.xyz/2026/06/27/run-wsl2-fedora-with-mainstream-rolling-linux-kernel/
1•benlimanto•2m ago•0 comments

GNU Parallel 20260622 ('Rape Gang Inquiry') Released

https://lists.gnu.org/archive/html/parallel/2026-06/msg00000.html
1•jiqiren•6m ago•1 comments

Panoptes – AI audit and alignment layer

https://github.com/miggy-code/Panoptes
1•mpadilla•6m ago•1 comments

I'm Not Good at Goodbyes

https://hannahaubry.online/im-not-good-at-goodbyes
1•backlit4034•7m ago•1 comments

Optimizing open-source FPGA 80386 for performance gains

https://hackaday.com/2026/07/06/performance-improvements-for-open-source-80386/
1•whiteblossom•9m ago•0 comments

Show HN: Emem.dev – signed earth memory for physical AI

1•avijeetsingh16•10m ago•0 comments

A nonsense phrase of shady provenance makes the rounds, Elsevier defends its use

https://retractionwatch.com/2025/02/10/vegetative-electron-microscopy-fingerprint-paper-mill/
1•jacquesm•10m ago•0 comments

Max Ginsburg, War Pieta, 2007

https://narrativepainting.net/max-ginsburg-war-pieta-2007/
2•halperter•20m ago•0 comments

'Our business today is not healthy': MSFT looks to 'reset' gaming division

https://fortune.com/2026/07/06/microsoft-xbox-layoffs-gaming-division-1600-4800-employees/
1•1vuio0pswjnm7•24m ago•1 comments

Albuquerque Modernism: Manera Nueva and Steve Baer

https://albuquerquemodernism.unm.edu/posts/cs14_manera_nueva_placitas.html
1•PaulDavisThe1st•24m ago•0 comments

Show HN: Storytelling for coding agents, using Pixar's story process

https://kashyab.com/blog/teaching-a-coding-agent-to-write-stories.html
2•Kashyab12•24m ago•0 comments

OSS Local AI Workspace

https://www.usestitch.ai/
2•tomEdison•30m ago•0 comments

Sculpt a Vase

https://killedbyapixel.github.io/VaseFX/
2•memalign•32m ago•2 comments

Microsoft to cut 4,800 jobs in major Xbox and gaming division 'reset'

https://www.fastcompany.com/91569769/xbox-layoffs-microsoft-sharma
2•1vuio0pswjnm7•39m ago•1 comments

Machine Is a Server. Do Not Power Down

https://adlternative.github.io/posts/ai/from-local-agent-to-cloud-agent/
1•adltereturn•40m ago•0 comments

AutomationBench-AA

https://artificialanalysis.ai/articles/announcing-zapier-automationbench-aa
1•jameson•40m ago•0 comments

Taste when your user has no eyes

https://twitter.com/renzo_viale/status/2068730076989186283
1•rvialep•40m ago•0 comments

Gadgets for People Who Don't Trust the Government [video]

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

How Do Synthesizers Work? (An Interactive Exploration)

https://perthirtysix.com/how-the-heck-do-synthesizers-work
2•gmays•42m ago•1 comments

Show HN: • Introducing Dotflowy

https://twitter.com/CameronPak/status/2074262605779124317
1•campak•43m ago•1 comments

Apple 'Hide My Email' Vulnerability Reveals Peoples' Real Email Addresses

https://www.404media.co/apple-hide-my-email-vulnerability-reveals-peoples-real-email-addresses/
2•1vuio0pswjnm7•47m ago•1 comments

Link Site

https://xxsml.com
1•sohocs509•49m ago•1 comments

First Kirby Game Was Created with a Trackball, No Keyboard

https://www.pcmag.com/news/first-kirby-game-was-created-with-a-trackball-no-keyboard
2•scottchiefbaker•51m ago•0 comments

Show HN: Foundation – A Tale of Tokens and Psychosis

https://github.com/nmxmxh/foundation
1•MomohNobert•53m ago•0 comments

Freemediaheckyeah

https://fmhy.net/reading
1•kamphey•56m ago•0 comments

Building a Datacenter in My Dorm Room

https://corvaglia.dev/blog/2026/datacenter-in-dorm/
1•corvad•57m ago•0 comments

Windows 11 will soon be able to reinstall itself and drivers without a USB drive

https://www.windowscentral.com/microsoft/windows-11/windows-11-will-soon-be-able-to-reinstall-its...
2•thunderbong•57m ago•1 comments