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

EU court rejects Apple's challenges to bloc's Big Tech rulebook

https://www.euractiv.com/news/eu-court-rejects-apples-challenges-to-blocs-big-tech-rulebook/
1•doener•10s ago•0 comments

The General Court dismisses Apple's actions over its designation as a gatekeeper [pdf]

https://curia.europa.eu/site/upload/docs/application/pdf/2026-07/cp260096en.pdf
1•ColinWright•3m ago•0 comments

Crypto Pin Bars Form and How to Detect Them: Lessons from a $19B Liquidation

https://medium.com/@DolphinDB_Inc/how-crypto-pin-bars-form-and-how-to-detect-them-lessons-from-a-...
1•yiweileng•5m ago•0 comments

Grok 4.5 arriving tomorrow

https://twitter.com/elonmusk/status/2074740539874775163
1•hit8run•6m ago•0 comments

Fibonacci's Real Mathematical Legacy

https://blogs.nature.com/aviewfromthebridge/2017/04/20/fibonaccis-mathematical-legacy/
2•ColinWright•10m ago•1 comments

Fiszki flashcards without an app: your AI quizzes you, FSRS keeps score

https://fiszki.zuzanow.pl/login
1•fiszki•10m ago•0 comments

Time to kill at Temple Meads. What's up with platform 2? Where is platform 14?

https://old.reddit.com/r/uktrains/comments/1uo9lwn/had_some_time_to_kill_at_temple_meads_whats_up/
1•ColinWright•11m ago•0 comments

Apple held accountable under the DMA

https://fsfe.org/news/2026/news-20260708-01.en.html
1•softwarefreedom•12m ago•1 comments

Machine

https://xkcd.com/2916/
1•close04•12m ago•0 comments

Show HN: Diagraw – hand-drawn diagrams, real-time collab, AI assistant

https://diagraw.com/es/
1•victoragudo•15m ago•0 comments

Viability of Local Models for Coding

https://martinfowler.com/articles/exploring-gen-ai/local-models-for-coding-factors.html
1•danebalia•16m ago•0 comments

Show HN: Comcent CE – An open-source self-hosted Voice Infrastructure platform

https://github.com/comcent-io/comcent-ce
1•pavanputhra•18m ago•0 comments

GitHub cuts short offer to burn repos on CD after mockery ensues

https://www.theregister.com/devops/2026/07/06/github-cuts-short-offer-to-burn-repos-on-cd-after-m...
1•beardyw•21m ago•0 comments

Gemma 4 Technical Report

https://arxiv.org/abs/2607.02770
1•ferretj•22m ago•0 comments

Software Engineers Used to Score Goals, Now We Keep Them Out

https://eran.pinh.as/posts/software-engineers-used-to-score-goals-now-we-keep-them-out
2•eranp•22m ago•1 comments

Open ISMS platform for GDPR and NIS-2

https://github.com/NISD2/open-isms
1•cjhisey•22m ago•0 comments

ClickHouse is winning the Observability Wars

https://matduggan.com/clickhouse-is-winning-the-observability-wars/
1•clemo_ra•23m ago•0 comments

How to Scale Robotics and Physical AI? TechDrive Zurich with Robert MacKenzie

https://www.youtube.com/watch?v=6Dw6llpUxqs
1•jmiseikis•25m ago•0 comments

Show HN: Tarit – Self-host sandbox cloud and hypervisor for AI agents

https://github.com/instavm/tarit
6•mkagenius•29m ago•0 comments

Astryx – open-source, agent ready design system from Meta

https://astryx.atmeta.com/
1•agilek•30m ago•0 comments

Maestral, an open-source Dropbox client, is no longer maintained

https://github.com/samschott/maestral
1•uu_titan•32m ago•0 comments

Show HN: Open-source market-making software that runs on your own server

https://github.com/Adamant-im/adamant-tradebot
3•izar-konti•33m ago•0 comments

Car tracking features for 'convenience not security' warns Kia

https://www.bbc.co.uk/news/articles/cp8r1798kp7o
2•edward•34m ago•0 comments

DSpark - DeepSeek's speculative drafts for LLMs

https://www.youtube.com/watch?v=1yBU41auQhw
3•zhirzh•36m ago•1 comments

Show HN: 0day Rubbish – AI-Discovered CVSS 9.8 RCE Chain in Cisco CUCM

https://0day-rubbish.com/blog/cisco-cucm-rce-chain
2•wisdomtreelzz•36m ago•0 comments

Electric aircraft makes historic flight from Sweden to Finland

https://yle.fi/a/74-20235372
3•marklit•37m ago•0 comments

Testing Smart TV Tracking

https://www.rtings.com/tv/learn/research/smart-tv-tracking
2•ledoge•37m ago•0 comments

GitHub project mantainer has a lot of issues

2•Asil_real•37m ago•2 comments

Taiwan solved tax evasion in 1951 with a trick

https://twitter.com/i/status/2073991580986609904
3•Michelangelo11•39m ago•1 comments

Mews Cuts 15% of Staff, Points to AI in Broad Restructuring

https://twitter.com/LayoffAI/status/2074571918255194361
2•agilek•39m ago•0 comments