HN user

brianush1

310 karma
Posts15
Comments79
View on HN

Don’t abuse DRY, a little duplication is better than unnecessary dependencies.

That's an interesting thing to include. I agree with this point in principle, but I've found that Claude, at least, duplicates logic FAR too often and needs nudging in the other direction.

Realistically, what are the odds that our not very large or clever brains really do have the potential to understand the entire universe

My belief on this is not entirely rational, of course, but it seems to me that there's probably a sort of Turing-completeness for intelligence/understanding, where as soon as a mind starts being able to understand abstraction, given enough time and resources, it can probably understand the entire universe.

It would also be presumptuous to say that brainfuck is equally powerful to every other programming language that exists, and yet we know it to be true. The fundamental reason we can prove that Turing-complete languages are equivalent to each other is that we can build the same abstractions in both, so intuitively it feels like a similar principle holds for human intelligence.

CSS Hell 1 year ago

apparently the pegs only have to touch the holes, they don't have to line up perfectly

Your initial translation into JavaScript is a representation of the statement "All my things are green hats", which is not the same as "All my hats are green."

The statement "All my hats are green" would map to

    things.every(thing => thing.type != 'hat' || thing.color == 'green')
i.e., everything the person owns must either be green or, if it isn't green, it must not be a hat since all hats are green.

The negated form would then be

    things.some(thing => thing.type == 'hat' && thing.color != 'green')
i.e., there are some hats that are not green.
Driving with D 5 years ago

such as the fact that a safe subset exists, but depends on GC,

@safe works perfectly fine and exactly the same in @nogc code as in GC-enabled code.

From what I understand, Firefox has a lower precision timer, which means you need to do more cache timer repetitions; try increasing it to 400,000, it should look more like the demo (though it still doesn't generate two entirely separate curves).

You can't use IPFS or the blockchain without having a connection to the internet in the first place. If all the ISPs decided to refuse you service, there'd be no way to stay connected to the internet.

WebAssembly Studio 6 years ago

Also for those wondering how you can get subpixel AA on your canvases anyway: if you use a classic 2d rendering context (not WebGL), you can use canvas.getContext("2d", {alpha: false}) to create a canvas with a fully opaque background, which will also cause fillText to render with subpixel AA on most browsers.