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

Dither Kit: A Free Dithered Chart Package

https://www.tripwire.sh/dither-kit
1•grapplingdev•35s ago•0 comments

JPEG-XL Libjxl 0.12 Brings More Performance Optimizations

https://www.phoronix.com/news/JPEG-XL-libjxl-0.12
1•ksec•5m ago•0 comments

Frame money with value, not morality

https://herbertlui.net/frame-money-with-value-not-morality/
1•herbertl•6m ago•0 comments

Open Book Touch – open-source e-reader

https://www.crowdsupply.com/oddly-specific-objects/open-book-touch
1•philips•7m ago•0 comments

We Tested $200 GPT-5.6 Sol on PhD Level Math [video]

https://www.youtube.com/watch?v=SkXbTrpTD7E
1•Topfi•13m ago•0 comments

My AI Model Tier List for Mid-2026

https://taoofmac.com/space/blog/2026/07/11/1500
1•rcarmo•13m ago•0 comments

Last American polio survivor in an iron lung dies at 78

https://www.kron4.com/news/national/last-american-polio-survivor-in-an-iron-lung-dies-at-78/
1•speckx•14m ago•0 comments

Forced Clicks and Stand-Down Violations by Shopping Plugin Phia

https://www.benedelman.org/phia-forced-clicks/
1•randycupertino•15m ago•1 comments

Tropical forests facing increasing risks of exposure to critical temp thresholds

https://www.pnas.org/doi/10.1073/pnas.2528622123
2•littlexsparkee•18m ago•0 comments

I've created a Workspace Comparator, I hope you use it

https://github.com/angelahack1/WorkspaceComparator/releases/tag/v1.7.0
1•angelahack1•18m ago•1 comments

Zero Knowledge Tolstoyan Art

https://max-amb.github.io/blog/zero_knowledge_tolstoyan_art/
1•max-amb•19m ago•0 comments

The Tonnetz

https://guichaoua.gitlab.io/web-hexachord/
2•mci•21m ago•0 comments

Is there any verified/signed bot traffic?

https://sitedex.github.io/web-bot-auth-lint/
2•zeppelin_7•21m ago•1 comments

An educational lab of AI agent architectures

https://github.com/Rudnik-Ilia/Agents-Sandbox
1•ilia53•23m ago•0 comments

Hard Questions

https://www.anthropic.com/news/hard-questions
1•mrmarket•24m ago•0 comments

Humanity Wallpaper

https://www.youtube.com/watch?v=uc_D0djnL1g
1•mabios•24m ago•1 comments

Random auditory stimulation during sleep disturbs declarative memory

https://www.cell.com/iscience/fulltext/S2589-0042(26)01976-0?_returnURL=https%3A%2F%2Flinkinghub....
2•bookofjoe•25m ago•0 comments

Surveillance of Cyclosporiasis

https://www.cdc.gov/cyclosporiasis/php/surveillance/index.html
2•bookmtn•25m ago•1 comments

We scaled PgBouncer to 4x throughput

https://clickhouse.com/blog/pgbouncer-clickhouse-managed-postgres
24•saisrirampur•29m ago•0 comments

Ginzburg-Landau equation simulation with various symmetries

https://symmhub.github.io/SymmHub/apps/symsim/ginzburg_landau/index.html
1•snorbleck•29m ago•0 comments

Economic Data Viewer

https://mesmeron.com/econ
1•rorkney•29m ago•0 comments

The early History of the Singular Value Decomposition (1993) [pdf]

https://www.math.ucdavis.edu/~saito/courses/229A/stewart-svd.pdf
2•wolfi1•31m ago•0 comments

A better Twitter alternative for readers

https://norotfeed.com/
1•namadaza•31m ago•0 comments

Show HN: Aether – Run Claude Code, Codex, or OpenCode in devboxes you can watch

https://www.runaether.dev/
1•pranav100000•32m ago•0 comments

I made AI agents play diplomacy

https://github.com/brendenehlers/diplomacy-ai
1•behlers99•32m ago•0 comments

Show HN: HoverSource – From pixel to source file in one keystroke

https://loerei.github.io/HoverSource/
1•Loerei•32m ago•0 comments

How to build a circular LCD clock

https://blinry.org/lcd-clock/
1•birdculture•33m ago•0 comments

Show HN: Aerial – DIY Orchestration and Agent Messaging

https://dcdeniz.github.io/aerial/
2•dcdeniz•34m ago•1 comments

The Prover, the Skeptic, and the Judge

https://insertchaos.bearblog.dev/prover-skeptic-and-judge/
1•snorbleck•34m ago•0 comments

1000 Iterations Beats One Perfect Plan

https://blog.trevormil.com/iterations
1•trevormil•35m ago•0 comments