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•6mo 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•6mo 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•6mo 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•6mo 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•6mo ago
"def" is too generic.

"fn" is too cryptic.

"function" is better than the two.

MultifokalHirn•6mo ago
Agreed

Hack Club strikes a promotion deal with Hacker News

1•Agreed3750•1m ago•0 comments

Novelty Automation: A collection of satirical home-made arcade machines

https://novelty-automation.com/
1•nanomonkey•3m ago•0 comments

Perfetto – Open Souce System profiling, app tracing and trace analysis by Google

https://github.com/google/perfetto
1•gpi•4m ago•0 comments

Busy day? Never miss a meeting

https://meeting-alarm.com/
1•AdamMyers17•11m ago•1 comments

Has anyone heard of the W Windowing System?

1•danceitbreakit•12m ago•0 comments

Buildkite CLI Homepage

https://buildkite.com/
2•woolywonder•13m ago•0 comments

Famine Claims in Gaza Fall Apart, Western Media Don't Even Blink

https://honestreporting.com/famine-claims-in-gaza-fall-apart-western-media-dont-even-blink/
3•mhb•15m ago•0 comments

AI Advent Calendar, vibe coded in 3 prompts

https://ai-creative-advent-calendar-b4ef04f6.base44.app/
2•astonfred•16m ago•0 comments

Vibe CADing an Interactive Data Physicalization

https://nicolas.kruchten.com/content/2025/11/vibe-cading-a-data-physicalization/
1•nicolaskruchten•18m ago•0 comments

Advent of FPGA Challenge

https://blog.janestreet.com/advent-of-fpga-challenge-2025/
3•ahlCVA•21m ago•0 comments

Amazon Employees for Climate Justice

https://www.amazonclimatejustice.org/open-letter
1•gpi•24m ago•1 comments

GSoC 2025 Showcase: Improved Console Output for Swift Testing

https://swift.org/blog/gsoc-2025-showcase-swift-testing-output/
1•frizlab•25m ago•1 comments

Losing Confidence

https://eclecticlight.co/2025/11/30/last-week-on-my-mac-losing-confidence/
16•frizlab•28m ago•5 comments

Show HN: Demo Scope – Show your work

https://demoscope.app/
1•admtal•30m ago•0 comments

Musk says H-1B visas being 'gamed' by outsourcing firms

https://www.bbc.com/news/articles/c1j9p43d0zzo
11•onemoresoop•35m ago•3 comments

Oxfmt Alpha

https://voidzero.dev/posts/announcing-oxfmt-alpha
1•patrikcsak•36m ago•0 comments

Meta's new EU regulator is contractually prohibited from hurting Meta's feelings

https://pluralistic.net/2025/12/01/erin-go-blagged/
8•hn_acker•37m ago•1 comments

Constructing the Word's First JPEG XL MD5 Hash Quine

https://stackchk.fail/blog/jxl_hashquine_writeup
2•luispa•40m ago•0 comments

Eiffel Llama: Open-Source Replication of Claude's Golden Gate Experiment

https://huggingface.co/spaces/dlouapre/eiffel-tower-llama
1•victormustar•41m ago•0 comments

Show HN: ER Intern Simulator Built in 3 Hours via Natural Language Rules

https://github.com/chwmath-netizen/NLCS-S-Engine
1•chwmath•41m ago•2 comments

Swift Implementation of DINOv3 with MLX Swift

https://github.com/vincentamato/MLXDINOv3
1•dvrp•42m ago•0 comments

3D Reversible Smart Energy-Saving Devices for Adaptive Energy Management

https://advanced.onlinelibrary.wiley.com/doi/10.1002/adma.202507682
1•gnabgib•42m ago•0 comments

podtrace: eBPF-based diagnostic tool for Kubernetes applications

https://github.com/gma1k/podtrace
1•tanelpoder•43m ago•0 comments

Lovely Docs: dehidrated docs in your projects folder

https://lovely-docs.github.io/
1•xl0•43m ago•1 comments

Apple's artificial intelligence chief is stepping down, company says

https://www.cnbc.com/2025/12/01/apple-ai.html
6•gslin•45m ago•1 comments

Renewables Are Too Cheap to Fail

https://oilprice.com/Energy/Energy-General/Renewables-Are-Too-Cheap-to-Fail.html
4•PaulHoule•45m ago•0 comments

A Decade of the Cloud Native Computing Foundation

https://www.spiceworks.com/software/a-decade-of-the-cloud-native-computing-foundation/
2•CrankyBear•46m ago•0 comments

OWASP AI Testing Guide

https://owasp.org/www-project-ai-testing-guide/
1•janpio•46m ago•0 comments

Why It's Harder to Tell Gambling from Investing Nowadays

https://www.bloomberg.com/news/features/2025-11-21/with-robinhood-kalshi-it-s-getting-harder-to-t...
2•wslh•48m ago•1 comments

Cities made a bet on millennials – but forgot one key thing

https://www.vox.com/policy/469816/cities-made-a-bet-on-millennials-but-forgot-one-key-thing
1•littlexsparkee•48m ago•1 comments