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

Meta just created a moderation nightmare for its smart glasses

https://www.theverge.com/report/970901/instagram-meta-glasses-prank-harassment-ban
2•Brajeshwar•2m ago•0 comments

Codex now leads Claude Code in first-time Homebrew installs for last 30 days

https://formulae.brew.sh/analytics/cask-install/30d/
1•jackdanela•6m ago•1 comments

Show HN: Proton – An immediate-mode GUI library for Go built on Gio without CGO

1•CzaxTanmay•6m ago•0 comments

Scientists Uncover Lost ‘Golden Age’ of Languages That Ended 1,000 Years Ago

https://www.404media.co/scientists-uncover-lost-golden-age-of-languages-that-ended-1-000-years-ago/
1•Brajeshwar•7m ago•0 comments

Claude Code Lightbar for Mac OS

https://github.com/gregsramblings/claude-status-bar
1•gw5815•7m ago•1 comments

Open-weight AI is having its Kubernetes moment. Let's not ruin it

https://tobi.knaup.me/2026-07-25-open-weight-ai-is-having-its-kubernetes-moment/
1•tknaup•8m ago•0 comments

Show HN: Cubic Doggo 06R: 12-DOF 4-Legged Robot with IMU

https://github.com/SphericalCowww/CubicDoggo_06R
1•SphericalCowww•9m ago•0 comments

Try Unlimited Text to Image Generator for Free

https://free-ai-art-generator.pages.dev
3•rrrpro123•12m ago•4 comments

Arsonists used cats to spread Italy's wildfires – CNN

https://www.cnn.com/2026/07/22/europe/arson-cats-italy-wildfires-latam-intl
1•nic_wilson•13m ago•0 comments

Fast Synthesis of Basic Oscillators

https://artemis.sh/2026/07/23/fast-synthesis-basic-oscillators.html
1•fanf2•15m ago•0 comments

Show HN: IPAbet – A fast, memorable keyboard for International Phonetic Alphabet

https://ipabet.org
1•bikeshaving•16m ago•0 comments

Chinese retirees are driving a new wave of study abroad enrollment

https://www.sixthtone.com/news/1018818/China’sStudyAbroadBoomFindsaNewGeneration:Retirees
1•whiteblossom•16m ago•0 comments

The AI jobs apocalypse probably isn't coming anytime soon

https://www.theguardian.com/technology/2026/jul/25/ai-jobs-apocalypse-human-labor
3•beardyw•16m ago•0 comments

Task-centered iproute2 user guide

https://baturin.org/docs/iproute2/
1•greengreengrass•25m ago•0 comments

Ask HN: Why are Meta products so bad?

1•asxndu•25m ago•2 comments

UNESCO adds West Bank and Lebanese sites to heritage despite Israeli objections

https://apnews.com/article/unesco-sebastia-lebanon-mount-amel-israel-heritage-12c558a4b6aa03fa40a...
3•hebelehubele•28m ago•1 comments

2x, not 10x: coding with LLMs in 2026

https://obryant.dev/p/2x-not-10x/
2•tnisonoff•30m ago•0 comments

Yes, the Hong Kong of Old Is Over

https://www.project-syndicate.org/commentary/hong-kong-is-over-just-another-big-chinese-city-by-s...
2•ksec•36m ago•1 comments

Deep Brain Stimulation

https://en.wikipedia.org/wiki/Deep_brain_stimulation
2•soupspaces•36m ago•0 comments

Waymo's driverless cars involved in 68% fewer crashes, U.S. study finds

https://www.cbc.ca/news/world/waymo-driverless-car-safety-study-9.7282895
2•curmudgeon22•41m ago•0 comments

Who's making money from using/exploiting AI?

4•jonthepirate•46m ago•0 comments

Scanwheel is a drum style mechanical television you can build yourself

https://github.com/AncientJames/Scanwheel/
2•tobr•47m ago•0 comments

I timed 7,194 journeys to find London's most equidistant pub

https://equidistance.io/londons-most-equidistant-pub/
1•lambfruit•49m ago•0 comments

Introduction to Multiparty Computation Tutorials

https://docs.stoffelmpc.com/tutorials/overview
2•badcryptobitch•50m ago•0 comments

Silicon Valley Splits over Closing the Borders to Chinese A.I

https://www.nytimes.com/2026/07/25/technology/open-source-silicon-valley-china.html
2•sbulaev•50m ago•0 comments

Samsung wins $200B Broadcom AI chip partnership, boosting foundry push

https://www.reuters.com/business/autos-transportation/samsung-elec-wins-200-billion-broadcom-ai-c...
3•geox•54m ago•0 comments

RedisME: RDM tool for Java serialization in the world

https://www.hepengju.com/
1•hepengju•59m ago•0 comments

A Convergence of Health Crises Under Robert F. Kennedy Jr. Leadership

https://bluepressjournal.substack.com/p/us-faces-multipronged-public-health
2•WinstonWendell•1h ago•0 comments

FDA panel supports broadening access to peptides popular on the gray market

https://www.npr.org/2026/07/23/nx-s1-5903202/fda-peptides-restrictions
2•andsoitis•1h ago•0 comments

Real Linux for your smartphone: Ubuntu Touch release 24.04-2.0 and 24.04-1.4

https://ubports.com/blog/ubports-news-1/ubuntu-touch-24-04-2-0-and-24-04-1-4-release-4007
3•readyblue•1h ago•1 comments