frontpage.
newsnewestaskshowjobs

Made with ♥ by @iamnishanth

Open Source @Github

fp.

Fabrice Bellard Releases MicroQuickJS

https://github.com/bellard/mquickjs/blob/main/README.md
257•Aissen•1h ago•60 comments

We replaced H.264 streaming with JPEG screenshots (and it worked better)

https://blog.helix.ml/p/we-mass-deployed-15-year-old-screen
51•quesobob•59m ago•24 comments

Meta is using the Linux scheduler designed for Valve's Steam Deck on its servers

https://www.phoronix.com/news/Meta-SCX-LAVD-Steam-Deck-Server
192•yellow_lead•1h ago•74 comments

Test, don't (just) verify

https://alperenkeles.com/posts/test-dont-verify/
147•alpaylan•6h ago•93 comments

Adobe Photoshop 1.0 Source Code (1990)

https://computerhistory.org/blog/adobe-photoshop-source-code/
360•tosh•5d ago•99 comments

Instant database clones with PostgreSQL 18

https://boringsql.com/posts/instant-database-clones/
299•radimm•11h ago•124 comments

Executorch: On-device AI across mobile, embedded and edge for PyTorch

https://github.com/pytorch/executorch
88•klaussilveira•5d ago•12 comments

Towards a secure peer-to-peer app platform for Clan

https://clan.lol/blog/towards-app-platform-vmtech/
11•throawayonthe•1h ago•4 comments

Astrophotography Target Planner: Discover Hidden Nebulas

https://astroimagery.com/techniques/imaging/astrophotography-target-planner/
24•kianN•3d ago•1 comments

Font with Built-In Syntax Highlighting (2024)

https://blog.glyphdrawing.club/font-with-built-in-syntax-highlighting/
121•california-og•8h ago•24 comments

The Coffee Warehouse

https://www.scopeofwork.net/the-coffee-warehouse/
27•NaOH•3d ago•19 comments

Show HN: Yapi – FOSS terminal API client for power users

https://yapi.run/blog/what-is-yapi
29•jamiepond•1d ago•11 comments

The post-GeForce era: What if Nvidia abandons PC gaming?

https://www.pcworld.com/article/3013044/the-post-geforce-era-what-if-nvidia-abandons-pc-gaming.html
55•taubek•3d ago•97 comments

Show HN: CineCLI – Browse and torrent movies directly from your terminal

https://github.com/eyeblech/cinecli
269•samsep10l•13h ago•93 comments

Local AI is driving the biggest change in laptops in decades

https://spectrum.ieee.org/ai-models-locally
83•barqawiz•18h ago•68 comments

Carnap – A formal logic framework for Haskell

https://carnap.io/
91•ravenical•9h ago•19 comments

Dancing around the rhythm space with Euclid

https://pv.wtf/posts/euclidean-rhythms
20•dracyr•1d ago•0 comments

Snitch – A friendlier ss/netstat

https://github.com/karol-broda/snitch
284•karol-broda•17h ago•86 comments

Ryanair fined €256M over ‘abusive strategy’ to limit ticket sales by OTAs

https://www.theguardian.com/business/2025/dec/23/ryanair-fined-limit-online-travel-agencies-ticke...
184•aquir•8h ago•213 comments

It's Always TCP_NODELAY

https://brooker.co.za/blog/2024/05/09/nagle.html
423•eieio•21h ago•152 comments

Stop Slopware

https://stopslopware.net/
56•bradley_taunt•3h ago•80 comments

10 years bootstrapped: €6.5M revenue with a team of 13

https://www.datocms.com/blog/a-look-back-at-2025
224•steffoz•11h ago•88 comments

The Illustrated Transformer

https://jalammar.github.io/illustrated-transformer/
458•auraham•23h ago•84 comments

Ask HN: What are the best engineering blogs with real-world depth?

285•nishilpatel•9h ago•89 comments

Inside CECOT – 60 Minutes [video]

https://archive.org/details/insidececot
1304•lawlessone•18h ago•369 comments

Ultrasound Cancer Treatment: Sound Waves Fight Tumors

https://spectrum.ieee.org/ultrasound-cancer-treatment
320•rbanffy•23h ago•89 comments

When irate product support customers demand to speak to Bill Gates

https://devblogs.microsoft.com/oldnewthing/20251223-00/?p=111896
34•magnat•2h ago•13 comments

Partial inlining

https://xania.org/202512/18-partial-inlining
49•hasheddan•5d ago•1 comments

GLM-4.7: Advancing the Coding Capability

https://z.ai/blog/glm-4.7
401•pretext•1d ago•213 comments

NIST was 5 μs off UTC after last week's power cut

https://www.jeffgeerling.com/blog/2025/nist-was-5-μs-utc-after-last-weeks-power-cut
326•jtokoph•1d ago•142 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.