frontpage.
newsnewestaskshowjobs

Open Source @Github

fp.

Midjourney Medical

https://www.midjourney.com/medical/blogpost
235•ricochet11•1h ago•210 comments

Lore – Open source version control system designed for scalability

https://lore.org/
1031•regnerba•13h ago•553 comments

Taxonomy of the Occlupanida (parasitoids on bread bag tags)

https://www.horg.com/horg/?page_id=921
95•beatthatflight•4h ago•17 comments

US holds off blacklisting DeepSeek, more than 100 firms deemed security risks

https://www.reuters.com/world/china/us-holds-off-blacklisting-chinas-deepseek-more-than-100-firms...
399•giuliomagnifico•1d ago•441 comments

Storied Colors – a catalogue of named colors

https://storiedcolors.com/
114•susiecambria•6h ago•27 comments

[x86] AI Compute Extensions (ACE) Specification

https://x86ecosystem.org/resource/ai-compute-extensions-ace-specification/
13•matt_d•1h ago•5 comments

Clojure Hosted on Go

https://github.com/glojurelang/glojure
51•dnlo•4h ago•9 comments

Show HN: Spin Lab

https://srijanshukla.com/artifacts/spin-lab/
13•srijanshukla18•1d ago•3 comments

Loreline – Tools for writing interactive fiction

https://loreline.app/en/
96•smartmic•7h ago•12 comments

U.S. science is in chaos

https://www.scientificamerican.com/article/americas-compact-between-science-and-politics-is-broken/
736•presspot•18h ago•885 comments

Show HN: We built an 8-bit CPU as 2nd year EE students

https://github.com/c0rRupT9/STEPLA-1
44•CorRupT9•2d ago•10 comments

Launch HN: Adam (YC W25) – Open-Source AI CAD

https://github.com/Adam-CAD/CADAM
167•zachdive•11h ago•84 comments

How we run Firecracker VMs inside EC2 and start browsers in less than 1s

https://browser-use.com/posts/firecracker-browser-infra
225•gregpr07•1d ago•147 comments

Biological evolution and information acquisition

https://www.construction-physics.com/p/biological-evolution-and-information
23•chmaynard•6d ago•1 comments

How Madrid built its metro cheaply (2024)

https://worksinprogress.co/issue/how-madrid-built-its-metro-cheaply/
55•trymas•8h ago•16 comments

RFC 10008: The new HTTP Query Method

https://www.rfc-editor.org/info/rfc10008/
335•schappim•17h ago•147 comments

Show HN: An 8-bit live gamecast for baseball

https://ribbie.tv/watch
215•brownrout•11h ago•120 comments

Tesco moving 40k server workloads off VMware amid Broadcom's abusive conduct

https://arstechnica.com/information-technology/2026/06/tesco-moving-40000-server-workloads-off-vm...
206•Bender•6h ago•113 comments

Volkswagen started blocking GrapheneOS users

https://discuss.grapheneos.org/d/35949-volkswagen-app?page=3
528•microtonal•12h ago•348 comments

Why thinking out loud with someone beats thinking alone

https://www.thesignalist.io/s/the-dialogue-dividend/
190•kodesko•14h ago•92 comments

Show HN: Inkwash, a watercolor sketching app and explanation

https://johnowhitaker.github.io/inkwash/about
186•Yenrabbit•4d ago•21 comments

GLM-5.2 is the new leading open weights model on Artificial Analysis

https://artificialanalysis.ai/articles/glm-5-2-is-the-new-leading-open-weights-model-on-the-artif...
816•himata4113•18h ago•391 comments

Kirkland Roundabouts

https://kirklandroundabouts.com
171•DenisM•3d ago•137 comments

The Return of Rigorous Full-System Timing Simulation

https://www.sigarch.org/the-return-of-rigorous-full-system-timing-simulation/
37•matt_d•1d ago•0 comments

A robot is sprinting towards you. Do you want it running on Claude or Grok?

https://openrouter.ai/blog/insights/royale-last-agent-standing/
193•Usu•6h ago•171 comments

MicroUI – A tiny, portable, immediate-mode UI library written in ANSI C

https://github.com/rxi/microui
205•peter_d_sherman•15h ago•72 comments

Made a free macOS menu bar app that fixes typing in the wrong keyboard layout

https://flickey.site
55•tal_alfi•8h ago•29 comments

Trellis AI (YC W24) hiring a product lead to build agents for healthcare access

https://www.ycombinator.com/companies/trellis-ai/jobs/Cg94htp-product-lead
1•macklinkachorn•10h ago

Image Compression

https://www.makingsoftware.com/chapters/image-compression
180•vinhnx•4d ago•28 comments

Pink Cosmo berries a hit in their trial season (2023)

https://fruitgrowersnews.com/article/pink-cosmo-berries-a-hit-in-their-trial-season/
11•mooreds•3d ago•3 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.