frontpage.
newsnewestaskshowjobs

Open Source @Github

fp.

Open in hackernews

Type-checked non-empty strings

https://exploring-better-ways.bellroy.com/haskell-koan-type-checked-non-empty-strings.html
26•surprisetalk•2d ago

Comments

ivanjermakov•1h ago
Language is not mentioned in a title, so my first thought was about TypeScript type wizardry. Turns out it's as simple as `Exclude<string, "">`.

https://www.typescriptlang.org/docs/handbook/utility-types.h...

ralferoo•1h ago
It is very much mentioned in the article title and the first sentence. It's just HN that's truncated the title.
antipurist•1h ago
It's simple, and it doesn't work as `Exclude` only applies to union types. For type `string` it just returns the same type `string`.
phpnode•11m ago
yup, it's not possible to do it safely with a simple unparameterised type: https://www.typescriptlang.org/play/?#code/C4TwDgpgBAcg9gOwK...
Cthulhu_•15m ago
Speaking of TS, there's stuff in there for typing strings / string formats: https://www.typescriptlang.org/docs/handbook/2/template-lite...
nvme0n1p1•9m ago
Daily reminder that TypeScript's type checker is not sound.

https://www.typescriptlang.org/play/?#code/C4TwDgpgBAcg9gOwK...

IshKebab•43m ago
"Huh never heard of Bellroy... I wonder what they're using Haskell for..."

Turns out it's some kind of bags and accessories brand!

qbane•37m ago
I pondered for a while, it IS the company I used to know
muglug•31m ago
Very cool that the language allows specification of a type in this way.

I added a similar type — “non-empty-string” to a typechecker for PHP, and it’s been adopted widely in the PHP ecosystem. It turns out to be pretty handy, especially when there’s a full type system to support it.

Mag 7 starting to underperform [pdf]

https://www.apollo.com/content/dam/apolloaem/pdf/daily-spark/2026/jun/28/062826-Mag7.pdf
26•mooreds•31m ago•4 comments

A field guide to the modern front end for developers who hand-wrote HTML

https://davidpoblador.com/deep-dives/the-descent/
10•nirvanis•21m ago•3 comments

Building Principia for Windows XP

https://voxelmanip.se/2026/06/28/building-principia-for-windows-xp/
33•LorenDB•1h ago•2 comments

Sandia National Labs SA3000 8085 CPU

https://www.cpushack.com/2026/06/03/sandia-national-labs-sa3000-8085-cpu/
93•rbanffy•4h ago•24 comments

What happens when you run a CUDA kernel?

https://fergusfinn.com/blog/what-happens-when-you-run-a-gpu-kernel/
29•mezark•1h ago•2 comments

HackerRank open sourced its ATS. My resume scored 90/100. Oh wait 74. No – 88

https://danunparsed.com/p/hackerrank-open-source-ats
731•sambellll•13h ago•310 comments

RocketLab Acquires Iridium

https://investors.rocketlabcorp.com/news-releases/news-release-details/rocket-lab-acquire-iridium...
7•everfrustrated•35m ago•1 comments

GLM 5.2 beats Claude in our benchmarks

https://semgrep.dev/blog/2026/we-have-mythos-at-home-glm-52-beats-claude-in-our-cyber-benchmarks/
991•jms703•20h ago•461 comments

Instagram is incorporating users' photos in ads for Meta Glasses

https://twitter.com/i/status/2071277885646868536
64•notRobot•1h ago•16 comments

Tidal AI Policy

https://tidal.com/ai-policy
123•hn8726•1h ago•124 comments

Type-checked non-empty strings

https://exploring-better-ways.bellroy.com/haskell-koan-type-checked-non-empty-strings.html
26•surprisetalk•2d ago•9 comments

Pollen (CEO Negus-Fancey, CTO Wright) tried to remove article, and Google helped

https://blog.pragmaticengineer.com/pollen-tried-to-remove-my-article-about-callum-negus-fancey-an...
556•taubek•5h ago•79 comments

Halvar's Guide to Entrepreneurship

https://thomasdullien.github.io/guides/entrepreneurship/
84•nekitamo•3d ago•22 comments

Rebuilding the Computer Room

https://alexwlchan.net/2026/computer-room/
33•ingve•3h ago•15 comments

Samsung, SK Hynix, Micron Sued in US over Memory Price Fixing

https://en.sedaily.com/international/2026/06/29/samsung-sk-hynix-micron-sued-in-us-over-memory-pr...
78•donohoe•2h ago•26 comments

NUMA: Cores, memory, and the distance between them

https://edera.dev/stories/numa-part-1-cores-memory-and-the-distance-between-them
78•sys_call•4d ago•14 comments

Studio Canal Movies purchased on PlayStation Store removed without refund

https://www.playstation.com/en-gb/legal/psvideocontent/
32•kugelblitz•1h ago•6 comments

How we made WINDOW JOIN parallel and vectorized

https://questdb.com/blog/window-join-parallel-vectorized/
9•tosh•3d ago•0 comments

Age verification is just a precursor to automated attribution of speech

https://nonogra.ph/age-verification-is-just-a-precursor-to-attribution-of-speech-06-29-2026
750•arkhiver•11h ago•457 comments

Dissecting Apple's Sparse Image Format (ASIF)

https://schamper.dev/dissecting-apples-sparse-image-format-asif/
118•supermatou•22h ago•18 comments

Federating Clusters for Zero-Downtime Kubernetes

https://linkerd.io/2026/06/24/federating-clusters-for-zero-downtime-kubernetes/index.html
20•PagCatOli•4d ago•1 comments

Historical memory prices 1960-2026

https://dam.stanford.edu/memory-prices.html
358•vga1•20h ago•136 comments

I used Claude Code to get a second opinion on my MRI

https://antoine.fi/mri-analysis-using-claude-code-opus
510•engmarketer•22h ago•637 comments

5k menus from the New York Public Library’s Buttolph Collection (1880-1920)

https://pudding.cool/2026/06/menu-story/
393•xbryanx•23h ago•102 comments

Data breach exposes up to 14.2M email logins at six ISPs

https://www.bleepingcomputer.com/news/security/data-breach-exposes-up-to-142-million-email-logins...
4•Brajeshwar•17m ago•0 comments

We found a bug in the hyper HTTP library

https://blog.cloudflare.com/hyper-bug/
123•Pop_-•4d ago•60 comments

Why did this journal retract two 1940s papers by Max Planck?

https://arstechnica.com/science/2026/06/why-did-this-journal-retract-two-1940s-papers-by-max-planck/
189•DR_MING•5h ago•19 comments

Show HN: Zanagrams

https://zanagrams.com/
346•pompomsheep•23h ago•93 comments

Knowledge Distillation of Black-Box Large Language Models (2024)

https://arxiv.org/abs/2401.07013
115•babelfish•16h ago•22 comments

The KIDS Act would require age checks to get online

https://www.eff.org/deeplinks/2026/06/kids-act-would-require-age-checks-get-online
579•bilsbie•1d ago•473 comments