frontpage.
newsnewestaskshowjobs

Made with ♥ by @iamnishanth

Open Source @Github

fp.

ACM Is Now Open Access

https://www.acm.org/articles/bulletins/2026/january/acm-open-access
96•leglock•1h ago•11 comments

OpenWorkers: Self-Hosted Cloudflare Workers in Rust

https://openworkers.com/introducing-openworkers
57•max_lt•1h ago•11 comments

2025 Letter

https://danwang.co/2025-letter/
19•Amorymeltzer•1h ago•2 comments

Bluetooth Headphone Jacking: A Key to Your Phone [video]

https://media.ccc.de/v/39c3-bluetooth-headphone-jacking-a-key-to-your-phone
240•AndrewDucker•5h ago•79 comments

50% of U.S. vinyl buyers don't own a record player

https://lightcapai.medium.com/the-great-return-from-digital-abundance-to-analog-meaning-cfda9e428752
28•ResisBey•40m ago•19 comments

Sony PS5 ROM keys leaked – jailbreaking could be made easier with BootROM codes

https://www.tomshardware.com/video-games/playstation/playstation-5-rom-keys-leaked-jailbreaking-c...
20•gloxkiqcza•28m ago•0 comments

2025: The Year in LLMs

https://simonwillison.net/2025/Dec/31/the-year-in-llms/
722•simonw•16h ago•376 comments

I rebooted my social life

https://takes.jamesomalley.co.uk/p/this-might-be-oversharing
178•edent•5h ago•105 comments

Heap Overflow in FFmpeg EXIF

https://bugs.pwno.io/0014
6•retr0reg•54m ago•1 comments

Build a Deep Learning Library

https://zekcrates.quarto.pub/deep-learning-library/
6•butanyways•1h ago•0 comments

Common Lisp SDK for the Datastar Hypermedia Framework

https://github.com/fsmunoz/datastar-cl
3•fsmunoz•39m ago•1 comments

DHS Says DHS-Certified Real IDs Too Unreliable to Confirm U.S. Citizenship

https://reason.com/2025/12/31/dhs-says-real-id-which-dhs-certifies-is-too-unreliable-to-confirm-u...
8•xenophonf•10m ago•1 comments

Meta made scam ads harder to find instead of removing them

https://sherwood.news/tech/rather-than-fully-cracking-down-on-scam-ads-meta-worked-to-make-them-h...
124•wtcactus•3h ago•30 comments

Python Numbers Every Programmer Should Know

https://mkennedy.codes/posts/python-numbers-every-programmer-should-know/
8•WoodenChair•1h ago•0 comments

BYD Sells 4.6M Vehicles in 2025, Meets Revised Sales Goal

https://www.bloomberg.com/news/articles/2026-01-01/byd-sells-4-6-million-vehicles-in-2025-meets-r...
17•toomuchtodo•36m ago•3 comments

Easel Turns One One year of building my own IDE in Clojure

https://blog.phronemophobic.com/easel-one-year.html
120•todsacerdoti•5d ago•9 comments

I canceled my book deal

https://austinhenley.com/blog/canceledbookdeal.html
556•azhenley•21h ago•306 comments

Partisan X posts boost political polarisation among users, research finds

https://www.theguardian.com/technology/2025/nov/27/partisan-x-posts-increase-political-polarisati...
9•PaulHoule•35m ago•0 comments

Pokémon Team Optimization

https://nchagnet.pages.dev/blog/pokemon-team-optimization/
125•nchagnet•5d ago•52 comments

Show HN: I created a tool to design and create foamcore inserts for boardgames

https://boxinsertdesigner.com/
31•Rabidgremlin•4d ago•7 comments

iOS allows alternative browser engines in Japan

https://developer.apple.com/support/alternative-browser-engines-jp/
7•eklavya•2h ago•1 comments

Beyond the Nat: Cgnat, Bandwidth, and Practical Tunneling

https://blog.rastrian.dev/post/beyond-the-nat-cgnat-bandwidth-and-practical-tunneling
5•rastrian•5d ago•0 comments

A font with built-in TeX syntax highlighting

https://rajeeshknambiar.wordpress.com/2025/12/27/a-font-with-built-in-tex-syntax-highlighting/
13•LorenDB•4d ago•2 comments

A Christmas Present to Myself – Vector Network Analyzer (2014)

https://axotron.se/blog/vector-network-analyzer-a-christmas-present-to-myself/
24•joebig•1w ago•2 comments

Web Browsers have stopped blocking pop-ups

https://www.smokingonabike.com/2025/12/31/web-browsers-have-stopped-blocking-pop-ups/
307•coldpie•22h ago•322 comments

Resistance training load does not determine hypertrophy

https://physoc.onlinelibrary.wiley.com/doi/10.1113/JP289684
192•Luc•18h ago•238 comments

Flow5 released to open source

https://flow5.tech/docs/releasenotes.html
126•picture•12h ago•9 comments

GoGoGrandparent (YC S16) Is Hiring Tech Leads

https://www.ycombinator.com/companies/gogograndparent/jobs/w2jGKM7-gogograndparent-yc-s16-is-hiri...
1•davidchl•15h ago

Worlds largest electric ship launched by Tasmanian boatbuilder

https://www.theguardian.com/australia-news/2025/may/02/hull-096-worlds-largest-electric-ship-batt...
86•aussieguy1234•5h ago•56 comments

The Mammoth Pirates – In Russia's Arctic north, a new kind of gold rush

https://www.rferl.org/a/the-mammoth-pirates/27939865.html
36•ece20•6d ago•11 comments
Open in hackernews

Falsify: Hypothesis-Inspired Shrinking for Haskell (2023)

https://www.well-typed.com/blog/2023/04/falsify/
90•birdculture•8mo ago

Comments

sshine•8mo ago
How does Hedgehog and Hypothesis differ in their shrinking strategies?

The article uses the words "integrated" vs. "internal" shrinking.

> the raison d’être of internal shrinking: it doesn’t matter that we cannot shrink the two generators independently, because we are not shrinking generators! Instead, we just shrink the samples that feed into those generators.

Besides that it seems like falsify has many of the same features like choice of ranges and distributions.

_jackdk_•8mo ago
This is the key sentence:

> The key insight of the Hypothesis library is that instead of shrinking generated values, we instead shrink the samples produced by the PRNG.

Hedgehog loses shrink information when you do a monadic bind (Gen a -> (a -> Gen b) -> Gen b). Hypothesis parses values out of the stream of data generated by the PRNG, so when it "binds", you are still just consuming off that stream of random numbers, and you can shrink the stream to shrink the generated values.

Here is a talk that applies the Hypothesis idea to test C++: https://www.youtube.com/watch?v=C6joICx1XMY . Discussion of PBT implementation approaches begins at 6:30.

thesz•8mo ago
This is fascinating!

If I understand correctly, they approximate language of inputs of a function to discover minimal (in some sense, like "shortest description length") inputs that violate relations between inputs and outputs of a function under scrutiny.

evertedsphere•8mo ago

    newtype Parser a = Parser ([Word] -> (a, [Word])
missing a paren here
moomin•8mo ago
I’m honestly completely failing to understand the basic idea here. What does this look like for generating and shrinking random strings,
chriswarbo•8mo ago
One straightforward approach would be:

- Generate a random number N for the size (maybe restricted to some Range)

- Generate N `Char` values, by using a random number for each code point.

- Combine those Chars into a string

falsify runs a generator by applying it to an infinite binary tree, with random numbers in the nodes. A generator can either consume a single number (taken from the root node of a tree), or it can run two other generators (one gets run on the left child, the other gets run on the right). Hence the above generator would use the value in the left child as N, then run the "generate N Chars" generator on the right child. The latter generator would run a Char generator on its left child, and an 'N-1 Chars' generator on its right child; and so on.

To shrink, we just run the generator on a tree with smaller numbers. In this case, a smaller number in the left child will cause fewer Chars to be generated; and smaller numbers in the right tree will cause lower code-points to be generated. falsify's tree representation also has a special case for the smallest tree (which returns 0 for its root, and itself for each child).

mjw1007•8mo ago
I've found in practice that shrinking to get the "smallest amount of detail" is often unhelpful.

Suppose I have a function which takes four string parameters, and I have a bug which means it crashes if the third is empty.

I'd rather see this in the failure report:

("ldiuhuh!skdfh", "nd#lkgjdflkgdfg", "", "dc9ofugdl ifugidlugfoidufog")

than this:

("", "", "", "")

gwern•8mo ago
Really? Your examples seem the opposite. I am left immediately thinking, "hm, is it failing on a '!', some sort of shell issue? Or is it truncating the string on '#', maybe? Or wait, there's a space in the third one, that looks pretty dangerous, as well as noticeably longer so there could be a length issue..." As opposed to the shrunk version where I immediately think, "uh oh: one of them is not handling an empty input correctly." Also, way easier to read, copy-paste, and type.
dullcrisp•8mo ago
Their point is that in the unshrunk example the “special” value stands out.

I guess if we were even more clever we could get to something more like (…, …, "", …).

gwern•8mo ago
The special value doesn't stand out, though. All three examples I gave were what I thought skimming his comment before my brain caught up to his caveat about an empty third argument. The empty string looked like it was by far the most harmless part... Whereas if they are all empty strings, then by definition the empty string stands out as the most suspicious possible part.
tybug•8mo ago
The Hypothesis explain phase [1][2] does this!

  fails_on_empty_third_arg(
      a = "",  # or any other generated value
      b = "",  # or any other generated value
      c = "",  
      d = "",  # or any other generated value
  )
[1] https://hypothesis.readthedocs.io/en/latest/reference/api.ht...

[2] https://github.com/HypothesisWorks/hypothesis/pull/3555

chriswarbo•8mo ago
> As opposed to the shrunk version where I immediately think, "uh oh: one of them is not handling an empty input correctly."

I agree that non-empty strings are worse, but unfortunately `("", "", "", "")` wouldn't only make me think of empty strings; e.g. I'd wonder whether duplicate/equal values are the problem.

chriswarbo•8mo ago
> I'd rather see this in the failure report:

> ("ldiuhuh!skdfh", "nd#lkgjdflkgdfg", "", "dc9ofugdl ifugidlugfoidufog")

I would prefer LazySmallcheck's result, which would be the following:

    (_, _, "", _)
Where `_` indicates that part of the input wasn't evaluated.
yorwba•8mo ago
A minimal reproducing example cannot guarantee that you'll correctly diagnose a bug just by looking at the example (because multiple potential bugs could cause the same example to fail) but it can guarantee that when you step through the code to understand what's happening, you won't have to deal with huge amounts of irrelevant data.

Maybe an alternative shrinking procedure could directly minimize the number of instructions that need to be executed to hit a failure...

edsko•8mo ago
(Author of falsify here.) You are absolutely correct that the empty string isn't always the best counter-example. The goal of shrinking is to shrink to the _simplest_ possible value (this is true for all approaches to shrinking). What constitutes "simple" is very much domain specific. It would certainly be possible to write a generator that would shrink to, say, "foo", as the canonical "simplest" example of a simple string. Indeed, since we are working in a lazy language, you could (with a bit of effort) shrink to `undefined` if the other arguments are not used at all.
mjw1007•8mo ago
I agree it can be domain-specific, but I think it's more common than not that empty containers, and the number zero, are corner cases rather than typical values.

So I think it would be a decent quality-of-life improvement to make generators of the sort you suggest easily available, and have the tutorial docs use them from the start.

shae•8mo ago
I care about the edge between "this value fails, one value over succeeds". I wish shrinking were fast enough to tell me if there are multiple edges between those values.