frontpage.
newsnewestaskshowjobs

Open Source @Github

fp.

OpenSSL 4.1.0

https://github.com/openssl/openssl/releases/tag/openssl-4.1.0
42•petecooper•59m ago•7 comments

Local Wikipedia: Wikipedia, but only for things a half hour walk from you

https://edjefferson.com/localwiki/
678•sohkamyung•14h ago•138 comments

Shitter – A Nitter Fork

https://codeberg.org/shitter/shitter
24•eustoria•39m ago•8 comments

Phone Is About to Stop Being Yours: 70 Days Until Lockdown

https://keepandroidopen.org/?
67•NackerHughes•22m ago•18 comments

No Need for Retirement When Utopia Is Around the Corner

https://blog.jim-nielsen.com/2026/skip-retirement-for-utopia/
41•speckx•2h ago•21 comments

Swedish government offices to ban ChatGPT and Claude

https://www.sverigesradio.se/artikel/chat-gpt-och-claude-forbjuder-regeringskansliet
151•armcat•2h ago•67 comments

Disney Raising Prices Days After Confirming Ads Will Now Show Up on Every Tier

https://www.tvfandomlounge.com/disney-plus-price-hike-ads-premium-tier-nielsen-emmys-2026/
65•robtherobber•5h ago•45 comments

Docker is weird

https://codeandcake.dev/posts/2026-10-22-docker-is-weird
621•psxuaw•13h ago•258 comments

Remove pgrust: the entry is cheating

https://github.com/ClickHouse/ClickBench/pull/2165
93•f311a•5h ago•43 comments

Is this the new cyber normal?

https://drew.silcock.dev/blog/is-this-the-new-cyber-normal/
102•drewsberry•2h ago•113 comments

Dutch government had hacked into Jared Kushner's phone

https://twitter.com/jaredkushner/status/2113376217415958767
172•teekert•3h ago•106 comments

The alien space of science: Coherent but cognitively unavailable directions

https://arxiv.org/abs/2603.01092
124•martincsweiss•1d ago•48 comments

The foolishness of "natural language programming" (1978)

https://www.cs.utexas.edu/~EWD/transcriptions/EWD06xx/EWD667.html
251•xiaoyu2006•12h ago•157 comments

Every AI model has the same "controversial" take on humans

https://www.modelcompare.ai/blog/ai-models-controversial-take-on-humans
512•rakannimer•21h ago•505 comments

How does Fable 5.1 hide messages in images?

https://www.lesswrong.com/posts/WHEQps5PK8LrrcTAb/how-does-fable-5-1-hide-messages-in-images
142•gmays•16h ago•46 comments

Show HN: OnKey – I'm a bad singer, so I built an app to show where I'm off-key

https://github.com/dsmurrell/onkey
92•dsmurrell•23h ago•48 comments

OpenShell – A safe, private runtime for fleets of autonomous AI agents

https://github.com/NVIDIA/OpenShell
440•niemandhier•19h ago•200 comments

Job Loss and Cortisone Mania

https://tilschuenemann.de/job-loss-cortisone-mania
49•speckx•3h ago•12 comments

The HTML-in-Canvas API origin trial

https://developer.chrome.com/blog/html-in-canvas-origin-trial
82•andrewstuart•17h ago•37 comments

Run full iOS 16.5 firmware on Android Devices

https://github.com/oosexgang/hackios-xnu-kernel
472•aghuang•22h ago•174 comments

Ask HN: If the models are so good, why doesn't OpenAI just start 100 companies?

268•ex-aws-dude•16h ago•300 comments

Getting ready to operate GNU Taler in Germany

https://www.taler.net/en/news/2026-13.html
331•dewey•21h ago•151 comments

This I Believe (1952)

https://www.awakin.org/v2/read/view.php?tid=468
113•ctoth•11h ago•48 comments

I reverse engineered a board game

https://wuemeli.com/blog/reversing-hitster-game/
65•wuemeli•2d ago•28 comments

WorldTUI: I trained a 360M model to pretend to be a terminal

https://simedw.com/2026/10/21/world-model-terminal/
567•alphax314•1d ago•176 comments

Show HN: Making a smart TV dumb and then smart

https://github.com/anubhavmalhotra/r2d2-tv
55•animalhot•13h ago•19 comments

Quad9 to exit France

https://quad9.net/news/blog/au-revoir-france/
1278•farrokhi•23h ago•431 comments

Tell HN: I unknowingly broke the PHP RCE embargo. I am sorry.

627•petecooper•1d ago•233 comments

Jank – The native Clojure dialect with seamless C++ interop

https://jank-lang.org/
133•giancarlostoro•13h ago•18 comments

Xbox wants you to pay 24 to 40 cents per hour to stream games you bought

https://arstechnica.com/gaming/2026/10/xbox-wants-you-to-pay-24-to-40-cents-per-hour-to-stream-ga...
338•entryleveljobsc•1d ago•306 comments
Open in hackernews

Falsify: Hypothesis-Inspired Shrinking for Haskell (2023)

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

Comments

sshine•1y 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_•1y 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•1y 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•1y ago

    newtype Parser a = Parser ([Word] -> (a, [Word])
missing a paren here
moomin•1y ago
I’m honestly completely failing to understand the basic idea here. What does this look like for generating and shrinking random strings,
chriswarbo•1y 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•1y 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•1y 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•1y 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•1y 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•1y ago
shae•1y 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.
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•1y 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•1y 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•1y 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•1y 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•1y 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.