HN user

danpat

599 karma

contact me at danpat@danpat.net

[ my public key: https://keybase.io/danpat; my proof: https://keybase.io/danpat/sigs/s-kP3xrOGFw_4IURoo3qLHJOo0fWeJVMnGiU6vsgzpM ]

Posts6
Comments184
View on HN

It can be achieved with a zero-knowledge proof - there are many schemes, but in essence, they all allow you to prove something (e.g. your birthdate, validated by a government agency), without revealing who you are. You can prove to a third party "the government authenticated that I was born on 1970-01-01" without exposing who "I" is.

Some worthwhile reading on the topic if you're interested:

https://en.wikipedia.org/wiki/Zero-knowledge_proof#Zero-Know...

https://en.wikipedia.org/wiki/Blind_signature

It should even possible to construct a protocol where you can prove that you're over 18 without revealing your birthdate.

Zero-Knowledge Range Proofs: https://eprint.iacr.org/2024/430

"Zero-knowledge range proofs (ZKRPs) allow a prover to convince a verifier that a secret value lies in a given interval."

The AI coding trap 10 months ago

And you will never know code as well as a reader and you would have as the author for anything larger than a very small project.

This feels very true - but also consider how much code exists for which many of the current maintainers were not involved in the original writing.

There are many anecdotal rules out there about how much time is spent reading code vs writing. If you consider the industry as a whole, it seems to me that the introduction of generative code-writing tools is actually not moving the needle as far as people are claiming.

We _already_ live in a world where most of us spend much of our time reading and trying to comprehend code written by others from the past.

What's the difference between a messy codebase created by a genAI, and a messy codebase where all the original authors of the code have moved on and aren't available to ask questions?

Or shard it - divide your objects up based on some criteria (hash the name of the object, use the first N digits of the hash to assign to a shard), and distribute them across multiple redis instances. Yes, you then need to maintain some client code to pick the right redis instance to fetch from, but you can now pick the most $/memory efficient instance types to run redis, and you don't have to worry about introducing disk read latency and the edge cases that brings with it.

Edit: looks like redis has some built-in support for data sharding when used as a cluster (https://redis.io/docs/latest/commands/cluster-shards/) - I haven't used that, so not sure how easy it is to apply, and exactly what you'd have to change.

To add another anecdote to this thread, a few years ago, I picked up an old Consew 226R compound walking foot machine to do canvas work for a boat. That machine was a beast once I tuned it. Fast, powerful, smooth, quiet, and with a servo motor, had awesome slow and high speeds, would punch through anything. Its only real downside was the size, and it only did straight stitches. For canvas work, that was everything I needed.

I later picked up a Sailrite LSZ to do some zigzag work on sails. Compared to the Consew, the sailrite feels really clunky, even with the Sailrite servo motor upgrade. It's relatively rough and noisy compared to the Consew, and has less power. Main upsides are the size, and the zigzag stitch for sail work where you need some stretch.

I've ultimately kept the Sailrite because it's still pretty solid, and can be stored on the boat where I need it the most. If I was doing upholstery or canvas work in a permanent shop, I would've kept the Consew, hands down, it was a much more capable and pleasant machine.

The walking foot feature is very useful for heavy materials. I tried sewing light-weight materials on both of these machines and it was awful (bunching, tearing on the foot, can't use really fine needles, etc).

but why would you expect that from it?

If you understand what it is doing, then you don't. But the layman will just see a computer that talks in language they understand, and will infer intent and sentience are behind that, because that's the only analog they have for a thing that can talk back to them with words that appear to make sense at the complexity level that ChatGPT is achieving.

Most humans do not have sufficient background to understand what they're really being presented with, they will take it at face value.

You always have the option of creating a map style and using Mapbox's Raster Tile API - although that does mean you probably can't dynamically adjust your raster images in time for a request to be served.

How are you using the Static Maps API currently where you would be able to send a POST request and display the image back to the user? Most use-cases for the Static Maps API involve the HTML <img> tag or something similar, which all send GET requests.

My company is in a similar situation - have large teams in several eastern European cities (primarily Minsk), and a few long-term remote teammates in Ukraine. A couple have fled (from Kyiv) with children, others are worried about being conscripted. It makes me want to vomit just thinking about it. I'm amazed many of them are still on Slack and making PRs.

We're fortunate some of our leadership has quite close ties to the area, so our company's response so far has been extremely understanding.

Economics has also already given us lots of information on how much money people are prepared to sink into transportation - the owners of the self-driving cars/rental companies will attempt to extract that value.

I don't doubt there will be a shift in the overall economic picture, but it may not be as large for the car _user_ as we would hope. It will need to be better/cheaper in some dimension for it to get adopted, but the rent-seeking vultures are always circling, spoiling the utopia :-(

It's somewhat complicated - timing of cold weather is important to kill off the beetles:

https://www1.agric.gov.ab.ca/$department/deptdocs.nsf/all/fo...

For example, an under-bark temperature of –37°C will kill 50 per cent of a mountain pine beetle population, even in mid-winter; however, a low temperature of –20°C in the fall, be- fore the beetles are prepared for winter, or in the spring, when beetles are start- ing to become more active, will also kill beetles if it is preceded by temperatures above 0°C. The relatively warmer temper- ature causes the larvae to start to lose its natural antifreeze.

I would love to see something like this written by someone with a young family. I find myself living JIT subject to the whimsical demands of small children for extended periods, and often wonder if it's even possible to re-arrange life in this context to try to re-capture some sanity.

Usually I just give up and bathe myself in the chaos, hoping that it's just a few years and then some semblance of sanity will return naturally.

The sad news is that the credit card scammers have ruined this - automated credit card testing often looks for small donation pages like you're suggesting, then uses them to check if stolen card numbers are valid. This leads to chargebacks, loss of reputation by the donatee in the eyes of the card processor, and a whole bunch of wasted time. One of the "services" that organizations like Patreon actually perform is to take on this risk on behalf of their clients.

I guess bitcoin/etc payments are still OK, but except in some small niche subject areas, aren't generally accepted enough to make the direct donation setup worthwhile.

For running, this sounds very much like:

https://en.wikipedia.org/wiki/Iliotibial_band_syndrome

Non-specific knee ache leaving you crippled walking down stairs, and some other specific movements that cause the iliotibial band (on the outside of your knee) to rub over the bone/bursa. Super common running injury.

For me, the fix is - ice, stretching, instantly stop running if I feel a twinge, and, most importantly, ramp up mileage very very slowly (first week, 1 block, second week, 2 blocks, third week, ruin 3 blocks). Learning what it really means to "ramp up slowly" was the big challenge for me - it's always too tempting to go "hey, I used to be able to run 10mi easily, I'll just crank out an easy 5" - boom, limping for a week.

The difficulty is in deciding what needs to "stop". Do you "stop" rent payments when those businesses aren't allowed to operate? If yes, do you "stop" loan payments for landlords who depend on rent to repay loans? What about landlords who only half depend on rent for loan payments?

This is why it's an economic problem - it's easy enough to determine which physical activities need to stop to reduce disease spread. It's much much much harder to untangle the interrelated economic activity and decide where pauses should be made. There isn't a clear delineation between people whose economic activities are unaffected, and those who have been brought to a sudden stop.

I've had some success with some of the off-the-shelf laser distance measurement modules, like the ones Bosch sell at big-box hardware stores:

https://www.boschtools.com/us/en/boschtools-ocs/laser-measur...

They have 1-2mm accuracy and quite good precision, particularly if your environment is stable (temperature, movement, lighting). These modules use an interferometry approach rather than time of flight to achieve their accuracy.

Several of them have a Bluetooth interface which you could reverse-engineer. The work then would be creating a turret to rotate the unit around a known centerpoint and take a bunch of samples. It'd be slow, but it works.

There are also a bunch of modules available on Alibaba for a few tens of dollars that have serial interfaces and seem to have similar performance - they often have 10s of Hz sample rates, so you could speed up scanning quite a lot. They exhibit similar accuracy to the boxed units I've bought, but require you to be comfortable with things like SPI and soldering.

Not seriously. I work on other similar optimization problems for my day job though, I can definitely imagine adding a bunch more complexity to guide the solver toward the right solution shape (price, volume, meal frequency, preferred foods, variety, etc).

If you want to get fancy with your meal planning, you can use a constraint solver like Google's or-tools to figure out what recipes to cook to meet nutritional (and other) goals semi-optimally:

Example code:

https://github.com/google/or-tools/blob/stable/examples/pyth...

which solves the Stigler Diet problem: https://en.wikipedia.org/wiki/Stigler_diet

The combinatoric difficulty of optimal nutrition planning is not something I see brought up very often, and I find that fascinating in its own right. It's harder than it looks, and I feel many people don't understand why.

I addressed this with my side business by keeping the free option pretty limited. Only a very small set of my potential customers qualify for free (very small, volunteer orgs, with very small problem spaces), so their support burden is kept pretty low. I still feel good about being able to offer something free to folks that get some value but can't afford to pay anything, but I'm not overwhelmed by ungrateful masses.

The cruise control on our Subaru seems to behave like you’d expect here. If someone cuts in front of you going roughly the same speed, it backs off a bit to open up some space, but doesn’t slam on the brakes because someone is close.

I think "non-practical" was perhaps poor wording.

I assume what the parent meant was a "data structures and algorithms" course, compared with say, "How to code in Java using the standard library".

The latter is "practical" - you can take what you learn and churn out code in Java.

The former is "non-practical" - you can't make the theories you now understand function without a practical implementation. But you can recognize the implementation in any environment, and understand its implications.

The general assertion is that an understanding of the "non-practical" will serve you longer than a purely "practical" education. I tend to agree.

clang-format kinda does what it says - parses your code, then indents and spaces it according to the rules. It doesn't try to understand code intent, it just looks at syntax.

clang-tidy does some deeper inspection and can be used to flag things that are "bad practice", not just "bad formatting". There's a big list of checks here:

https://clang.llvm.org/extra/clang-tidy/checks/list.html

At a minimum, I like to enable all the `bugprone-*` tidy rules, they just seem sensible to turn on.

e.g. https://clang.llvm.org/extra/clang-tidy/checks/bugprone-stri...

You're able to run `clang-tidy -fix` to automate fixing of many of the things it will flag.

I was going to post this same comment. When I was a kid, I used to look out the window and worry that the wings might fall off because I could see them flexing.

Then I watched the video above, and I was like - huh, I've only ever seen the wings move maybe 1% of the max stress test amount, and that was in really bad turbulence.

I stopped worrying that the wings would fall off. Once you know the wings won't fall off, I found it very easy to picture a safe/glide recovery from any other basic accident, and I stopped worrying altogether.

Volvo proposed embedding small permanent magnets in the road surface that would allow vehicles to track more reliably.

Their press-release for it is here, and has a couple of minor technical details:

https://www.media.volvocars.com/global/en-gb/media/pressrele...

I kind of liked the idea - it's basically a higher-tech line-following robot concept, and doesn't look too expensive to roll out compare to other proposed infrastructure changes.

However, I haven't heard anything about it since the 2014 press frenzy over the release linked above. Maybe getting road maintainers to make changes like this really is too much to ask.